# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	star-1.5.2
#	star-1.5.2/star
#	star-1.5.2/star/Makefile
#	star-1.5.2/star/append.c
#	star-1.5.2/star/buffer.c
#	star-1.5.2/star/chdir.c
#	star-1.5.2/star/create.dgux.patch
#	star-1.5.2/star/checkerr.c
#	star-1.5.2/star/checkerr.h
#	star-1.5.2/star/diff.c
#	star-1.5.2/star/cpio.c
#	star-1.5.2/star/cpiohdr.c
#	star-1.5.2/star/create.c
#	star-1.5.2/star/defaults.c
#	star-1.5.2/star/device.c
#	star-1.5.2/star/diff.h
#	star-1.5.2/star/dirtime.c
#	star-1.5.2/star/star.c
#	star-1.5.2/star/dirtime.h
#	star-1.5.2/star/star.1
#	star-1.5.2/star/dumpdate.c
#	star-1.5.2/star/star.h
#	star-1.5.2/star/dumpdate.h
#	star-1.5.2/star/extract.c
#	star-1.5.2/star/acl_unix.c
#	star-1.5.2/star/star_fat.c
#	star-1.5.2/star/gnutar.c
#	star-1.5.2/star/fflags.c
#	star-1.5.2/star/fifo.c
#	star-1.5.2/star/fifo.h
#	star-1.5.2/star/Makefile.man
#	star-1.5.2/star/findinfo.c
#	star-1.5.2/star/spax.1
#	star-1.5.2/star/hole.c
#	star-1.5.2/star/star.dfl
#	star-1.5.2/star/header.c
#	star-1.5.2/star/lhash.c
#	star-1.5.2/star/list.c
#	star-1.5.2/star/longnames.c
#	star-1.5.2/star/match.c
#	star-1.5.2/star/star_fat.mk
#	star-1.5.2/star/pax.mk
#	star-1.5.2/star/movearch.c
#	star-1.5.2/star/suntar.mk
#	star-1.5.2/star/cpio.mk
#	star-1.5.2/star/movearch.h
#	star-1.5.2/star/starformatman.mk
#	star-1.5.2/star/star.4
#	star-1.5.2/star/pax.c
#	star-1.5.2/star/props.c
#	star-1.5.2/star/gnutar.mk
#	star-1.5.2/star/props.h
#	star-1.5.2/star/remove.c
#	star-1.5.2/star/restore.c
#	star-1.5.2/star/bitstring.h
#	star-1.5.2/star/restore.h
#	star-1.5.2/star/scpioman.mk
#	star-1.5.2/star/scpio.1
#	star-1.5.2/star/spaxman.mk
#	star-1.5.2/star/gnutarman.mk
#	star-1.5.2/star/gnutar.1
#	star-1.5.2/star/suntar.1
#	star-1.5.2/star/suntarman.mk
#	star-1.5.2/star/star.mk
#	star-1.5.2/star/starsubs.h
#	star-1.5.2/star/acltext.c
#	star-1.5.2/star/xheader.c
#	star-1.5.2/star/all.mk
#	star-1.5.2/star/Makefile.dfl
#	star-1.5.2/star/star_unix.c
#	star-1.5.2/star/suntar.c
#	star-1.5.2/star/subst.c
#	star-1.5.2/star/table.c
#	star-1.5.2/star/table.h
#	star-1.5.2/star/unicode.c
#	star-1.5.2/star/volhdr.c
#	star-1.5.2/star/README
#	star-1.5.2/star/Makefile.doc
#	star-1.5.2/star/xattr.c
#	star-1.5.2/star/README.ACL
#	star-1.5.2/star/xtab.h
#	star-1.5.2/star/xutimes.h
#	star-1.5.2/star/README.crash
#	star-1.5.2/star/README.largefiles
#	star-1.5.2/star/README.mtio
#	star-1.5.2/star/README.otherbugs
#	star-1.5.2/star/README.pattern
#	star-1.5.2/star/README.posix-2001
#	star-1.5.2/star/README.dgux
#	star-1.5.2/star/README.pax
#	star-1.5.2/star/STARvsGNUTAR
#	star-1.5.2/star/Racl.mk
#	star-1.5.2/star/Rcrash.mk
#	star-1.5.2/star/Rlargefiles.mk
#	star-1.5.2/star/Rmtio.mk
#	star-1.5.2/star/Rotherbugs.mk
#	star-1.5.2/star/Rpattern.mk
#	star-1.5.2/star/Rposix.mk
#	star-1.5.2/star/readme.mk
#	star-1.5.2/star/starvsgnutar.mk
#	star-1.5.2/star/testscripts
#	star-1.5.2/star/testscripts/00INDEX
#	star-1.5.2/star/testscripts/100char_longlink.tar
#	star-1.5.2/star/testscripts/100char_longlink.tar-non-compliant
#	star-1.5.2/star/testscripts/README.gtarfail
#	star-1.5.2/star/testscripts/README.largefiles
#	star-1.5.2/star/testscripts/README.longnames
#	star-1.5.2/star/testscripts/README.paxbug
#	star-1.5.2/star/testscripts/README.quicktest
#	star-1.5.2/star/testscripts/long.ustar.gz
#	star-1.5.2/star/testscripts/mk
#	star-1.5.2/star/testscripts/mk2
#	star-1.5.2/star/testscripts/not_a_tar_file
#	star-1.5.2/star/testscripts/pax-big-10g.tar.bz2
#	star-1.5.2/star/testscripts/quicktest.filelist
#	star-1.5.2/star/testscripts/tartest-quicktest.out
#	star-1.5.2/star/testscripts/typescript
#	star-1.5.2/star/testscripts/ustar-all-filetypes.tar
#	star-1.5.2/star/testscripts/ustar-all-quicktest.tar
#	star-1.5.2/star/testscripts/dirloop.tar
#	star-1.5.2/star/testscripts/ustar-all-quicktest.tar-without-cont-file
#	star-1.5.2/star/testscripts/ustar-bad-filetypes.tar
#	star-1.5.2/star/testscripts/ustar-bad-signedsum.tar
#	star-1.5.2/star/testscripts/ustar-big-2g.tar.bz2
#	star-1.5.2/star/testscripts/ustar-big-8g.tar.bz2
#	star-1.5.2/star/testscripts/README.create-and-remove
#	star-1.5.2/star/testscripts/create-and-remove.tar
#	star-1.5.2/star/testscripts/g-hdr.pax.gz
#	star-1.5.2/star/testscripts/gtarfail.tar
#	star-1.5.2/star/testscripts/gtarfail2.tar
#	star-1.5.2/star/testscripts/not_a_tar_file2
#	star-1.5.2/star/testscripts/old-file.tar
#	star-1.5.2/star/testscripts/remove.tar
#	star-1.5.2/star/testscripts/ustar-all-quicktest-past-contig.tar
#	star-1.5.2/star/testscripts.mk
#	star-1.5.2/libs
#	star-1.5.2/Makefile
#	star-1.5.2/lib
#	star-1.5.2/lib/astoi.c
#	star-1.5.2/lib/astoll.c
#	star-1.5.2/lib/astoull.c
#	star-1.5.2/lib/cvt.c
#	star-1.5.2/lib/getargs.c
#	star-1.5.2/lib/cmpbytes.c
#	star-1.5.2/lib/cmpnullbytes.c
#	star-1.5.2/lib/comerr.c
#	star-1.5.2/lib/error.c
#	star-1.5.2/lib/fconv.c
#	star-1.5.2/lib/fexec.c
#	star-1.5.2/lib/fillbytes.c
#	star-1.5.2/lib/format.c
#	star-1.5.2/lib/getav0.c
#	star-1.5.2/lib/geterrno.c
#	star-1.5.2/lib/getfp.c
#	star-1.5.2/lib/gethostname.c
#	star-1.5.2/lib/getpagesize.c
#	star-1.5.2/lib/jsprintf.c
#	star-1.5.2/lib/jssnprintf.c
#	star-1.5.2/lib/stdio
#	star-1.5.2/lib/stdio/cvmod.c
#	star-1.5.2/lib/stdio/dat.c
#	star-1.5.2/lib/stdio/fcons.c
#	star-1.5.2/lib/stdio/fcons64.c
#	star-1.5.2/lib/stdio/fdown.c
#	star-1.5.2/lib/stdio/ffileread.c
#	star-1.5.2/lib/stdio/ffilewrite.c
#	star-1.5.2/lib/stdio/fgetline.c
#	star-1.5.2/lib/stdio/file_raise.c
#	star-1.5.2/lib/stdio/filemopen.c
#	star-1.5.2/lib/stdio/filemopen64.c
#	star-1.5.2/lib/stdio/fileopen.c
#	star-1.5.2/lib/stdio/fileopen64.c
#	star-1.5.2/lib/stdio/filepos.c
#	star-1.5.2/lib/stdio/filepos64.c
#	star-1.5.2/lib/stdio/fileread.c
#	star-1.5.2/lib/stdio/fileseek.c
#	star-1.5.2/lib/stdio/filesize.c
#	star-1.5.2/lib/stdio/filesize64.c
#	star-1.5.2/lib/stdio/filewrite.c
#	star-1.5.2/lib/stdio/flag.c
#	star-1.5.2/lib/stdio/flush.c
#	star-1.5.2/lib/stdio/fpipe.c
#	star-1.5.2/lib/stdio/niread.c
#	star-1.5.2/lib/stdio/niwrite.c
#	star-1.5.2/lib/stdio/nixread.c
#	star-1.5.2/lib/stdio/nixwrite.c
#	star-1.5.2/lib/stdio/openfd.c
#	star-1.5.2/lib/stdio/openfd64.c
#	star-1.5.2/lib/stdio/schilyio.h
#	star-1.5.2/lib/stdio/file_getraise.c
#	star-1.5.2/lib/Targets
#	star-1.5.2/lib/jssprintf.c
#	star-1.5.2/lib/Makefile
#	star-1.5.2/lib/libschily.mk
#	star-1.5.2/lib/libschily_p.mk
#	star-1.5.2/lib/match.c
#	star-1.5.2/lib/movebytes.c
#	star-1.5.2/lib/getnum.c
#	star-1.5.2/lib/shlschily.mk
#	star-1.5.2/lib/raisecond.c
#	star-1.5.2/lib/rename.c
#	star-1.5.2/lib/saveargs.c
#	star-1.5.2/lib/seterrno.c
#	star-1.5.2/lib/gettnum.c
#	star-1.5.2/lib/strcatl.c
#	star-1.5.2/lib/streql.c
#	star-1.5.2/lib/strtod.c
#	star-1.5.2/lib/swabbytes.c
#	star-1.5.2/lib/usleep.c
#	star-1.5.2/lib/getxnum.c
#	star-1.5.2/lib/noshlschily.mk
#	star-1.5.2/lib/libschily-mapvers
#	star-1.5.2/lib/getxtnum.c
#	star-1.5.2/lib/libschily-mapvers.orig
#	star-1.5.2/lib/mem.c
#	star-1.5.2/lib/fjmem.c
#	star-1.5.2/lib/jmem.c
#	star-1.5.2/lib/fcomerr.c
#	star-1.5.2/lib/getperm.c
#	star-1.5.2/lib/findinpath.c
#	star-1.5.2/lib/eaccess.c
#	star-1.5.2/lib/fnmatch.c
#	star-1.5.2/RULES
#	star-1.5.2/RULES/9000-725-hp-ux-cc.rul
#	star-1.5.2/RULES/9000-725-hp-ux-gcc.rul
#	star-1.5.2/RULES/alpha-osf1-cc.rul
#	star-1.5.2/RULES/alpha-osf1-gcc.rul
#	star-1.5.2/RULES/aviion-dgux3-cc.rul
#	star-1.5.2/RULES/aviion-dgux3-gcc.rul
#	star-1.5.2/RULES/aviion-dgux4-cc.rul
#	star-1.5.2/RULES/aviion-dgux4-gcc.rul
#	star-1.5.2/RULES/bemac-beos-cc.rul
#	star-1.5.2/RULES/bemac-beos-mwcc.rul
#	star-1.5.2/RULES/bepc-beos-cc.rul
#	star-1.5.2/RULES/bepc-beos-gcc.rul
#	star-1.5.2/RULES/dn5500-domainos-cc.rul
#	star-1.5.2/RULES/dummy.dep
#	star-1.5.2/RULES/gmake.wrn
#	star-1.5.2/RULES/hppa-nextstep-cc.rul
#	star-1.5.2/RULES/hppa-nextstep-gcc.rul
#	star-1.5.2/RULES/i386-at386-gnu-cc.rul
#	star-1.5.2/RULES/i386-at386-gnu-gcc.rul
#	star-1.5.2/RULES/i386-bsd-os-cc.rul
#	star-1.5.2/RULES/i386-bsd-os-gcc.rul
#	star-1.5.2/RULES/i386-bsd-os3-cc.rul
#	star-1.5.2/RULES/i386-bsd-os3-gcc.rul
#	star-1.5.2/RULES/i386-freebsd-cc.rul
#	star-1.5.2/RULES/i386-freebsd-gcc.rul
#	star-1.5.2/RULES/i386-mingw32_nt-gcc.rul
#	star-1.5.2/RULES/i386-ms-dos-gcc.rul
#	star-1.5.2/RULES/i386-netbsd-cc.rul
#	star-1.5.2/RULES/i386-netbsd-gcc.rul
#	star-1.5.2/RULES/i386-openbsd-cc.rul
#	star-1.5.2/RULES/i386-openbsd-gcc.rul
#	star-1.5.2/RULES/i386-openserver-cc.rul
#	star-1.5.2/RULES/i386-openserver-gcc.rul
#	star-1.5.2/RULES/i386-os2-gcc.rul
#	star-1.5.2/RULES/i386-unixware-cc.rul
#	star-1.5.2/RULES/i386-unixware-gcc.rul
#	star-1.5.2/RULES/i486-cygwin32_nt-cc.rul
#	star-1.5.2/RULES/i486-cygwin32_nt-gcc.rul
#	star-1.5.2/RULES/i486-mingw32_nt-gcc.rul
#	star-1.5.2/RULES/i586-linux-cc.rul
#	star-1.5.2/RULES/i586-linux-gcc.rul
#	star-1.5.2/RULES/i586-mingw32_nt-gcc.rul
#	star-1.5.2/RULES/i686-mingw32_nt-gcc.rul
#	star-1.5.2/RULES/i786-mingw32_nt-gcc.rul
#	star-1.5.2/RULES/i86pc-sunos5-cc.rul
#	star-1.5.2/RULES/i86pc-sunos5-gcc.rul
#	star-1.5.2/RULES/ip22-irix-cc.rul
#	star-1.5.2/RULES/ip22-irix-gcc.rul
#	star-1.5.2/RULES/ldummy.cnf
#	star-1.5.2/RULES/local.cnf
#	star-1.5.2/RULES/m68k-amigaos-gcc.rul
#	star-1.5.2/RULES/man-bsd.def
#	star-1.5.2/RULES/man-sysv.def
#	star-1.5.2/RULES/mk-.id
#	star-1.5.2/RULES/MKLINKS
#	star-1.5.2/RULES/mk-gmake.id
#	star-1.5.2/RULES/r-smake.dep
#	star-1.5.2/RULES/mk-smake.id
#	star-1.5.2/RULES/news4000-newsos6-cc.rul
#	star-1.5.2/RULES/os-aix.def
#	star-1.5.2/RULES/os-aix.id
#	star-1.5.2/RULES/os-amigaos.def
#	star-1.5.2/RULES/os-amigaos.id
#	star-1.5.2/RULES/os-beos.def
#	star-1.5.2/RULES/os-beos.id
#	star-1.5.2/RULES/README
#	star-1.5.2/RULES/os-bsd-os.def
#	star-1.5.2/RULES/os-bsd-os.id
#	star-1.5.2/RULES/os-bsd-os3.def
#	star-1.5.2/RULES/os-cygwin32_nt.def
#	star-1.5.2/RULES/os-cygwin32_nt.id
#	star-1.5.2/RULES/os-cygwin_95-4.0.id
#	star-1.5.2/RULES/os-cygwin_98-4.10.id
#	star-1.5.2/RULES/os-cygwin_me-4.90.id
#	star-1.5.2/RULES/os-cygwin_nt-4.0.id
#	star-1.5.2/RULES/os-cygwin_nt-5.0.id
#	star-1.5.2/RULES/os-cygwin_nt-5.1.id
#	star-1.5.2/RULES/os-darwin.def
#	star-1.5.2/RULES/os-darwin.id
#	star-1.5.2/RULES/os-dgux.id
#	star-1.5.2/RULES/os-dgux3.def
#	star-1.5.2/RULES/os-dgux4.def
#	star-1.5.2/RULES/os-domainos.def
#	star-1.5.2/RULES/os-domainos.id
#	star-1.5.2/RULES/version
#	star-1.5.2/RULES/os-freebsd.def
#	star-1.5.2/RULES/os-freebsd.id
#	star-1.5.2/RULES/os-gnu.def
#	star-1.5.2/RULES/os-gnu.id
#	star-1.5.2/RULES/os-hp-ux.def
#	star-1.5.2/RULES/os-hp-ux.id
#	star-1.5.2/RULES/os-irix.def
#	star-1.5.2/RULES/os-irix.id
#	star-1.5.2/RULES/rules.top
#	star-1.5.2/RULES/os-linux.def
#	star-1.5.2/RULES/os-linux.id
#	star-1.5.2/RULES/os-mac-os.id
#	star-1.5.2/RULES/os-mac-os10.def
#	star-1.5.2/RULES/os-mingw32_95-4.0.id
#	star-1.5.2/RULES/os-mingw32_98-4.0.id
#	star-1.5.2/RULES/os-mingw32_98-4.10.id
#	star-1.5.2/RULES/os-mingw32_me-4.90.id
#	star-1.5.2/RULES/os-mingw32_nt-4.0.id
#	star-1.5.2/RULES/os-mingw32_nt-5.0.id
#	star-1.5.2/RULES/os-mingw32_nt-5.1.id
#	star-1.5.2/RULES/os-mingw32_nt-5.2.id
#	star-1.5.2/RULES/os-mingw32_nt.def
#	star-1.5.2/RULES/os-mingw32_nt.id
#	star-1.5.2/RULES/os-ms-dos.def
#	star-1.5.2/RULES/os-ms-dos.id
#	star-1.5.2/RULES/os-netbsd.def
#	star-1.5.2/RULES/os-netbsd.id
#	star-1.5.2/RULES/os-news-os.id
#	star-1.5.2/RULES/os-newsos6.def
#	star-1.5.2/RULES/os-nextstep.def
#	star-1.5.2/RULES/os-nextstep.id
#	star-1.5.2/RULES/os-openbsd.def
#	star-1.5.2/RULES/os-openbsd.id
#	star-1.5.2/RULES/os-openserver.def
#	star-1.5.2/RULES/cc-hp64.rul
#	star-1.5.2/RULES/os-os-2.id
#	star-1.5.2/RULES/os-os2.def
#	star-1.5.2/RULES/os-osf1.def
#	star-1.5.2/RULES/os-osf1.id
#	star-1.5.2/RULES/os-qnx.def
#	star-1.5.2/RULES/os-qnx.id
#	star-1.5.2/RULES/os-rhapsody.def
#	star-1.5.2/RULES/os-rhapsody.id
#	star-1.5.2/RULES/os-sco_sv.id
#	star-1.5.2/RULES/os-sunos.id
#	star-1.5.2/RULES/os-sunos4.def
#	star-1.5.2/RULES/os-sunos5.def
#	star-1.5.2/RULES/os-unix_sv.id
#	star-1.5.2/RULES/os-unixware.def
#	star-1.5.2/RULES/os-unixware.id
#	star-1.5.2/RULES/pci-qnx-cc.rul
#	star-1.5.2/RULES/power-macintosh-darwin-cc.rul
#	star-1.5.2/RULES/power-macintosh-darwin-gcc.rul
#	star-1.5.2/RULES/os-openvms.def
#	star-1.5.2/RULES/power-macintosh-rhapsody-cc.rul
#	star-1.5.2/RULES/power-macintosh-rhapsody-gcc.rul
#	star-1.5.2/RULES/powerpc-beos-gcc.rul
#	star-1.5.2/RULES/powerpc-beos-mwcc.rul
#	star-1.5.2/RULES/r-gmake.dep
#	star-1.5.2/RULES/cc-sgi.rul
#	star-1.5.2/RULES/r-gmake.tag
#	star-1.5.2/RULES/r-make.dep
#	star-1.5.2/RULES/r-make.obj
#	star-1.5.2/RULES/r-make.tag
#	star-1.5.2/RULES/r-smake.obj
#	star-1.5.2/RULES/r-smake.tag
#	star-1.5.2/RULES/rs6000-aix-cc.rul
#	star-1.5.2/RULES/rs6000-aix-gcc.rul
#	star-1.5.2/RULES/rules.aux
#	star-1.5.2/RULES/rules.clr
#	star-1.5.2/RULES/rules.cmd
#	star-1.5.2/RULES/rules.cnf
#	star-1.5.2/RULES/rules.dep
#	star-1.5.2/RULES/rules.dir
#	star-1.5.2/RULES/rules.drv
#	star-1.5.2/RULES/rules.hlp
#	star-1.5.2/RULES/rules.inc
#	star-1.5.2/RULES/rules.ins
#	star-1.5.2/RULES/rules.lib
#	star-1.5.2/RULES/rules.lnt
#	star-1.5.2/RULES/rules.loc
#	star-1.5.2/RULES/rules.man
#	star-1.5.2/RULES/rules.mkd
#	star-1.5.2/RULES/rules.mks
#	star-1.5.2/RULES/rules.mod
#	star-1.5.2/RULES/sub.htm
#	star-1.5.2/RULES/rules.obj
#	star-1.5.2/RULES/rules.prg
#	star-1.5.2/RULES/rules.rdi
#	star-1.5.2/RULES/rules.rel
#	star-1.5.2/RULES/rules.scr
#	star-1.5.2/RULES/rules.shl
#	star-1.5.2/RULES/rules.tag
#	star-1.5.2/RULES/rules1.dir
#	star-1.5.2/RULES/rules1.top
#	star-1.5.2/RULES/sun3-sunos4-cc.rul
#	star-1.5.2/RULES/sun3-sunos4-gcc.rul
#	star-1.5.2/RULES/sun4-sunos4-cc.rul
#	star-1.5.2/RULES/sun4-sunos4-gcc.rul
#	star-1.5.2/RULES/sun4-sunos5-cc.rul
#	star-1.5.2/RULES/sun4-sunos5-gcc.rul
#	star-1.5.2/RULES/os-openvms.id
#	star-1.5.2/RULES/x86pc-qnx-gcc.rul
#	star-1.5.2/RULES/rules.sps
#	star-1.5.2/RULES/rules.tpk
#	star-1.5.2/RULES/i86pc-sunos5-cc64.rul
#	star-1.5.2/RULES/cc-dec.rul
#	star-1.5.2/RULES/sun4-sunos5-cc64.rul
#	star-1.5.2/RULES/i86pc-sunos5-gcc64.rul
#	star-1.5.2/RULES/os-dragonfly.def
#	star-1.5.2/RULES/os-dragonfly.id
#	star-1.5.2/RULES/sun4-sunos5-gcc64.rul
#	star-1.5.2/RULES/cc-dg.rul
#	star-1.5.2/RULES/i486-cygwin32_nt-cl.rul
#	star-1.5.2/RULES/os-interix.def
#	star-1.5.2/RULES/os-interix.id
#	star-1.5.2/RULES/x86-interix-gcc.rul
#	star-1.5.2/RULES/cc-apollo.rul
#	star-1.5.2/RULES/cc-bemwcc.rul
#	star-1.5.2/RULES/cc-dumb.rul
#	star-1.5.2/RULES/cc-gcc.rul
#	star-1.5.2/RULES/cc-gcc64.rul
#	star-1.5.2/RULES/cc-hp.rul
#	star-1.5.2/RULES/cc-ibm.rul
#	star-1.5.2/RULES/cc-msc.rul
#	star-1.5.2/RULES/cc-sco_os.rul
#	star-1.5.2/RULES/cc-sco_uw.rul
#	star-1.5.2/RULES/cc-sony.rul
#	star-1.5.2/RULES/cc-sun.rul
#	star-1.5.2/RULES/cc-sunpro.rul
#	star-1.5.2/RULES/cc-sunpro64.rul
#	star-1.5.2/RULES/dynamic.lnk
#	star-1.5.2/RULES/static.lnk
#	star-1.5.2/RULES/rules.dyn
#	star-1.5.2/RULES/rules.cpl
#	star-1.5.2/RULES/os-cygwin_nt-5.2.id
#	star-1.5.2/RULES/rules.htm
#	star-1.5.2/RULES/x86-interix-cl.rul
#	star-1.5.2/RULES/cc-msposix.rul
#	star-1.5.2/RULES/x86-interix-cc.rul
#	star-1.5.2/RULES/rules.csw
#	star-1.5.2/RULES/os-interix-nt-4.0.id
#	star-1.5.2/RULES/os-interix-nt-5.0.id
#	star-1.5.2/RULES/os-interix-nt-5.1.id
#	star-1.5.2/RULES/os-interix-nt-5.2.id
#	star-1.5.2/RULES/i586-linux-suncc.rul
#	star-1.5.2/RULES/rules.pkg
#	star-1.5.2/RULES/i586-linux-suncc64.rul
#	star-1.5.2/RULES/atarist-freemint-gcc.rul
#	star-1.5.2/RULES/os-freemint.def
#	star-1.5.2/RULES/os-freemint.id
#	star-1.5.2/RULES/i586-syllable-cc.rul
#	star-1.5.2/RULES/i586-syllable-gcc.rul
#	star-1.5.2/RULES/os-haiku.id
#	star-1.5.2/RULES/os-syllable.def
#	star-1.5.2/RULES/os-syllable.id
#	star-1.5.2/RULES/bepc-haiku-cc.rul
#	star-1.5.2/RULES/bepc-haiku-gcc.rul
#	star-1.5.2/RULES/os-haiku.def
#	star-1.5.2/RULES/cc-msc64.rul
#	star-1.5.2/RULES/os-cygwin_nt-6.0.id
#	star-1.5.2/RULES/os-cygwin_nt-6.1.id
#	star-1.5.2/RULES/os-cygwin32_wow64.def
#	star-1.5.2/RULES/os-cygwin32_wow64.id
#	star-1.5.2/RULES/os-cygwin_nt-5.2-wow64.id
#	star-1.5.2/RULES/i686-cygwin32_wow64-cl64.rul
#	star-1.5.2/RULES/power-macintosh-darwin-cc64.rul
#	star-1.5.2/RULES/power-macintosh-darwin-gcc64.rul
#	star-1.5.2/RULES/os-cygwin_nt-6.0-wow64.id
#	star-1.5.2/RULES/rules.nul
#	star-1.5.2/RULES/os-cygwin_nt-6.1-wow64.id
#	star-1.5.2/RULES/i486-cygwin32_nt-cc64.rul
#	star-1.5.2/RULES/i486-cygwin32_nt-gcc64.rul
#	star-1.5.2/RULES/rules.env
#	star-1.5.2/RULES/cc-openvms.rul
#	star-1.5.2/RULES/9000-725-hp-ux-cc64.rul
#	star-1.5.2/RULES/alpha-openvms-cc.rul
#	star-1.5.2/RULES/ip22-irix-cc64.rul
#	star-1.5.2/RULES/ip22-irix-gcc64.rul
#	star-1.5.2/RULES/cc-sgi64.rul
#	star-1.5.2/RULES/cc-pcc.rul
#	star-1.5.2/RULES/i86pc-sunos5-pcc.rul
#	star-1.5.2/RULES/cc-gcc32.rul
#	star-1.5.2/RULES/power-macintosh-darwin-cc32.rul
#	star-1.5.2/RULES/power-macintosh-darwin-gcc32.rul
#	star-1.5.2/RULES/i586-linux-gcc32.rul
#	star-1.5.2/RULES/profiled.lnk
#	star-1.5.2/RULES/os-gnu-kfreebsd.def
#	star-1.5.2/RULES/os-gnu-kfreebsd.id
#	star-1.5.2/RULES/i586-pyro-cc.rul
#	star-1.5.2/RULES/i586-pyro-gcc.rul
#	star-1.5.2/RULES/os-pyro.def
#	star-1.5.2/RULES/os-pyro.id
#	star-1.5.2/DEFAULTS
#	star-1.5.2/DEFAULTS/Defaults
#	star-1.5.2/DEFAULTS/Defaults.aix
#	star-1.5.2/DEFAULTS/Defaults.dgux
#	star-1.5.2/DEFAULTS/Defaults.dgux3
#	star-1.5.2/DEFAULTS/Defaults.dgux4
#	star-1.5.2/DEFAULTS/Defaults.freebsd
#	star-1.5.2/DEFAULTS/Defaults.hp-ux
#	star-1.5.2/DEFAULTS/Defaults.irix
#	star-1.5.2/DEFAULTS/Defaults.linux
#	star-1.5.2/DEFAULTS/Defaults.sunos4
#	star-1.5.2/DEFAULTS/Defaults.sunos5
#	star-1.5.2/DEFAULTS/Defaults.netbsd
#	star-1.5.2/DEFAULTS/Defaults.openbsd
#	star-1.5.2/DEFAULTS/Defaults.cygwin32_nt
#	star-1.5.2/DEFAULTS/MKLINKS
#	star-1.5.2/DEFAULTS/Defaults.bsd-os
#	star-1.5.2/DEFAULTS/Defaults.osf1
#	star-1.5.2/DEFAULTS/Defaults.nextstep
#	star-1.5.2/DEFAULTS/Defaults.rhapsody
#	star-1.5.2/DEFAULTS/vc7-setup
#	star-1.5.2/DEFAULTS/Defaults.newsos6
#	star-1.5.2/DEFAULTS/Defaults.beos
#	star-1.5.2/DEFAULTS/Defaults.os2
#	star-1.5.2/DEFAULTS/Defaults.qnx
#	star-1.5.2/DEFAULTS/Defaults.openserver
#	star-1.5.2/DEFAULTS/Defaults.unixware
#	star-1.5.2/DEFAULTS/Defaults.mac-os10
#	star-1.5.2/DEFAULTS/Defaults.darwin
#	star-1.5.2/DEFAULTS/Defaults.domainos
#	star-1.5.2/DEFAULTS/Defaults.amigaos
#	star-1.5.2/DEFAULTS/Defaults.gnu
#	star-1.5.2/DEFAULTS/Defaults.bsd-os3
#	star-1.5.2/DEFAULTS/Defaults.ms-dos
#	star-1.5.2/DEFAULTS/Defaults.mingw32_nt
#	star-1.5.2/DEFAULTS/Defaults.interix
#	star-1.5.2/DEFAULTS/dummy-setup
#	star-1.5.2/DEFAULTS/vc6-setup
#	star-1.5.2/DEFAULTS/vc6-cygwin-setup
#	star-1.5.2/DEFAULTS/vc6-interix-setup
#	star-1.5.2/DEFAULTS/vc9-setup
#	star-1.5.2/DEFAULTS/vc7-cygwin-setup
#	star-1.5.2/DEFAULTS/vc7-interix-setup
#	star-1.5.2/DEFAULTS/Defaults.dragonfly
#	star-1.5.2/DEFAULTS/Defaults.freemint
#	star-1.5.2/DEFAULTS/Defaults.syllable
#	star-1.5.2/DEFAULTS/Defaults.haiku
#	star-1.5.2/DEFAULTS/vc7_64-cygwin-setup
#	star-1.5.2/DEFAULTS/vc7_64-setup
#	star-1.5.2/DEFAULTS/Defaults.cygwin32_wow64
#	star-1.5.2/DEFAULTS/vc9-cygwin-setup
#	star-1.5.2/DEFAULTS/Defaults.openvms
#	star-1.5.2/DEFAULTS/Defaults.gnu-kfreebsd
#	star-1.5.2/DEFAULTS/Defaults.pyro
#	star-1.5.2/DEFAULTS_ENG
#	star-1.5.2/DEFAULTS_ENG/Defaults
#	star-1.5.2/DEFAULTS_ENG/Defaults.aix
#	star-1.5.2/DEFAULTS_ENG/Defaults.dgux
#	star-1.5.2/DEFAULTS_ENG/Defaults.dgux3
#	star-1.5.2/DEFAULTS_ENG/Defaults.dgux4
#	star-1.5.2/DEFAULTS_ENG/Defaults.freebsd
#	star-1.5.2/DEFAULTS_ENG/Defaults.hp-ux
#	star-1.5.2/DEFAULTS_ENG/Defaults.irix
#	star-1.5.2/DEFAULTS_ENG/Defaults.linux
#	star-1.5.2/DEFAULTS_ENG/Defaults.sunos4
#	star-1.5.2/DEFAULTS_ENG/Defaults.sunos5
#	star-1.5.2/DEFAULTS_ENG/README
#	star-1.5.2/DEFAULTS_ENG/Defaults.netbsd
#	star-1.5.2/DEFAULTS_ENG/Defaults.openbsd
#	star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os
#	star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_nt
#	star-1.5.2/DEFAULTS_ENG/MKLINKS
#	star-1.5.2/DEFAULTS_ENG/Defaults.osf1
#	star-1.5.2/DEFAULTS_ENG/Defaults.nextstep
#	star-1.5.2/DEFAULTS_ENG/Defaults.rhapsody
#	star-1.5.2/DEFAULTS_ENG/Defaults.newsos6
#	star-1.5.2/DEFAULTS_ENG/Defaults.beos
#	star-1.5.2/DEFAULTS_ENG/Defaults.os2
#	star-1.5.2/DEFAULTS_ENG/Defaults.qnx
#	star-1.5.2/DEFAULTS_ENG/Defaults.openserver
#	star-1.5.2/DEFAULTS_ENG/Defaults.unixware
#	star-1.5.2/DEFAULTS_ENG/Defaults.mac-os10
#	star-1.5.2/DEFAULTS_ENG/Defaults.darwin
#	star-1.5.2/DEFAULTS_ENG/Defaults.domainos
#	star-1.5.2/DEFAULTS_ENG/Defaults.amigaos
#	star-1.5.2/DEFAULTS_ENG/Defaults.gnu
#	star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os3
#	star-1.5.2/DEFAULTS_ENG/Defaults.ms-dos
#	star-1.5.2/DEFAULTS_ENG/Defaults.mingw32_nt
#	star-1.5.2/DEFAULTS_ENG/Defaults.interix
#	star-1.5.2/DEFAULTS_ENG/vc7-setup
#	star-1.5.2/DEFAULTS_ENG/dummy-setup
#	star-1.5.2/DEFAULTS_ENG/vc6-setup
#	star-1.5.2/DEFAULTS_ENG/vc6-cygwin-setup
#	star-1.5.2/DEFAULTS_ENG/vc6-interix-setup
#	star-1.5.2/DEFAULTS_ENG/vc7-cygwin-setup
#	star-1.5.2/DEFAULTS_ENG/vc7-interix-setup
#	star-1.5.2/DEFAULTS_ENG/Defaults.dragonfly
#	star-1.5.2/DEFAULTS_ENG/Defaults.freemint
#	star-1.5.2/DEFAULTS_ENG/Defaults.syllable
#	star-1.5.2/DEFAULTS_ENG/Defaults.haiku
#	star-1.5.2/DEFAULTS_ENG/vc7_64-cygwin-setup
#	star-1.5.2/DEFAULTS_ENG/vc7_64-setup
#	star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_wow64
#	star-1.5.2/DEFAULTS_ENG/Defaults.openvms
#	star-1.5.2/DEFAULTS_ENG/vc9-cygwin-setup
#	star-1.5.2/DEFAULTS_ENG/vc9-setup
#	star-1.5.2/DEFAULTS_ENG/Defaults.gnu-kfreebsd
#	star-1.5.2/DEFAULTS_ENG/Defaults.pyro
#	star-1.5.2/include
#	star-1.5.2/include/schily
#	star-1.5.2/include/schily/fnmatch.h
#	star-1.5.2/include/schily/dirent.h
#	star-1.5.2/include/schily/btorder.h
#	star-1.5.2/include/schily/ccomdefs.h
#	star-1.5.2/include/schily/deflts.h
#	star-1.5.2/include/schily/device.h
#	star-1.5.2/include/schily/fcntl.h
#	star-1.5.2/include/schily/mman.h
#	star-1.5.2/include/schily/getargs.h
#	star-1.5.2/include/schily/getcwd.h
#	star-1.5.2/include/schily/intcvt.h
#	star-1.5.2/include/schily/jmpdefs.h
#	star-1.5.2/include/schily/libport.h
#	star-1.5.2/include/schily/librmt.h
#	star-1.5.2/include/schily/maxpath.h
#	star-1.5.2/include/schily/mconfig.h
#	star-1.5.2/include/schily/mtio.h
#	star-1.5.2/include/schily/signal.h
#	star-1.5.2/include/schily/patmatch.h
#	star-1.5.2/include/schily/prototyp.h
#	star-1.5.2/include/schily/rmtio.h
#	star-1.5.2/include/schily/schily.h
#	star-1.5.2/include/schily/sigblk.h
#	star-1.5.2/include/schily/stat.h
#	star-1.5.2/include/schily/time.h
#	star-1.5.2/include/schily/standard.h
#	star-1.5.2/include/schily/stdlib.h
#	star-1.5.2/include/schily/string.h
#	star-1.5.2/include/schily/stkframe.h
#	star-1.5.2/include/schily/termios.h
#	star-1.5.2/include/schily/termcap.h
#	star-1.5.2/include/schily/unistd.h
#	star-1.5.2/include/schily/utime.h
#	star-1.5.2/include/schily/varargs.h
#	star-1.5.2/include/schily/ioctl.h
#	star-1.5.2/include/schily/wait.h
#	star-1.5.2/include/schily/utypes.h
#	star-1.5.2/include/schily/alloca.h
#	star-1.5.2/include/schily/nlsdefs.h
#	star-1.5.2/include/schily/align.h
#	star-1.5.2/include/schily/avoffset.h
#	star-1.5.2/include/schily/xmconfig.h
#	star-1.5.2/include/schily/errno.h
#	star-1.5.2/include/schily/archdefs.h
#	star-1.5.2/include/schily/xconfig.h
#	star-1.5.2/include/schily/Makefile
#	star-1.5.2/include/schily/align.mk
#	star-1.5.2/include/schily/alloca.mk
#	star-1.5.2/include/schily/archdefs.mk
#	star-1.5.2/include/schily/avoffset.mk
#	star-1.5.2/include/schily/btorder.mk
#	star-1.5.2/include/schily/ccomdefs.mk
#	star-1.5.2/include/schily/deflts.mk
#	star-1.5.2/include/schily/device.mk
#	star-1.5.2/include/schily/dirent.mk
#	star-1.5.2/include/schily/errno.mk
#	star-1.5.2/include/schily/fcntl.mk
#	star-1.5.2/include/schily/fnmatch.mk
#	star-1.5.2/include/schily/getargs.mk
#	star-1.5.2/include/schily/getcwd.mk
#	star-1.5.2/include/schily/intcvt.mk
#	star-1.5.2/include/schily/jmpdefs.mk
#	star-1.5.2/include/schily/types.mk
#	star-1.5.2/include/schily/libport.mk
#	star-1.5.2/include/schily/librmt.mk
#	star-1.5.2/include/schily/maxpath.mk
#	star-1.5.2/include/schily/mconfig.mk
#	star-1.5.2/include/schily/mman.mk
#	star-1.5.2/include/schily/mtio.mk
#	star-1.5.2/include/schily/nlsdefs.mk
#	star-1.5.2/include/schily/patmatch.mk
#	star-1.5.2/include/schily/prototyp.mk
#	star-1.5.2/include/schily/rmtio.mk
#	star-1.5.2/include/schily/schily.mk
#	star-1.5.2/include/schily/sigblk.mk
#	star-1.5.2/include/schily/signal.mk
#	star-1.5.2/include/schily/standard.mk
#	star-1.5.2/include/schily/stat.mk
#	star-1.5.2/include/schily/stdlib.mk
#	star-1.5.2/include/schily/stkframe.mk
#	star-1.5.2/include/schily/string.mk
#	star-1.5.2/include/schily/termcap.mk
#	star-1.5.2/include/schily/termios.mk
#	star-1.5.2/include/schily/time.mk
#	star-1.5.2/include/schily/param.h
#	star-1.5.2/include/schily/unistd.mk
#	star-1.5.2/include/schily/utime.mk
#	star-1.5.2/include/schily/utypes.mk
#	star-1.5.2/include/schily/varargs.mk
#	star-1.5.2/include/schily/wait.mk
#	star-1.5.2/include/schily/xconfig.mk
#	star-1.5.2/include/schily/types.h
#	star-1.5.2/include/schily/xmconfig.mk
#	star-1.5.2/include/schily/iconv.h
#	star-1.5.2/include/schily/param.mk
#	star-1.5.2/include/schily/wchar.h
#	star-1.5.2/include/schily/wchar.mk
#	star-1.5.2/include/schily/schilyp.h
#	star-1.5.2/include/schily/schilyp.mk
#	star-1.5.2/include/schily/find.h
#	star-1.5.2/include/schily/iconv.mk
#	star-1.5.2/include/schily/siconv.h
#	star-1.5.2/include/schily/siconv.mk
#	star-1.5.2/include/schily/ioctl.mk
#	star-1.5.2/include/schily/checkerr.h
#	star-1.5.2/include/schily/checkerr.mk
#	star-1.5.2/include/schily/find.mk
#	star-1.5.2/include/schily/walk.h
#	star-1.5.2/include/schily/walk.mk
#	star-1.5.2/include/schily/fetchdir.h
#	star-1.5.2/include/schily/fetchdir.mk
#	star-1.5.2/include/schily/idcache.h
#	star-1.5.2/include/schily/idcache.mk
#	star-1.5.2/include/schily/fstream.mk
#	star-1.5.2/include/schily/fstream.h
#	star-1.5.2/include/schily/hostname.h
#	star-1.5.2/include/schily/hostname.mk
#	star-1.5.2/include/schily/stdio.h
#	star-1.5.2/include/schily/stdio.mk
#	star-1.5.2/include/schily/sysexits.h
#	star-1.5.2/include/schily/sysexits.mk
#	star-1.5.2/include/schily/wctype.h
#	star-1.5.2/include/schily/wctype.mk
#	star-1.5.2/include/schily/dlfcn.h
#	star-1.5.2/include/schily/dlfcn.mk
#	star-1.5.2/include/schily/shcall.h
#	star-1.5.2/include/schily/shcall.mk
#	star-1.5.2/include/schily/limits.h
#	star-1.5.2/include/schily/limits.mk
#	star-1.5.2/include/schily/locale.h
#	star-1.5.2/include/schily/locale.mk
#	star-1.5.2/include/schily/md4.h
#	star-1.5.2/include/schily/md4.mk
#	star-1.5.2/include/schily/md5.h
#	star-1.5.2/include/schily/md5.mk
#	star-1.5.2/include/schily/sigset.h
#	star-1.5.2/include/schily/sigset.mk
#	star-1.5.2/include/schily/pwd.h
#	star-1.5.2/include/schily/pwd.mk
#	star-1.5.2/include/schily/grp.h
#	star-1.5.2/include/schily/grp.mk
#	star-1.5.2/include/schily/ctype.h
#	star-1.5.2/include/schily/ctype.mk
#	star-1.5.2/include/schily/Targets
#	star-1.5.2/include/schily/sha1.h
#	star-1.5.2/include/schily/in.h
#	star-1.5.2/include/schily/in.mk
#	star-1.5.2/include/schily/inet.h
#	star-1.5.2/include/schily/inet.mk
#	star-1.5.2/include/schily/io.h
#	star-1.5.2/include/schily/io.mk
#	star-1.5.2/include/schily/systeminfo.h
#	star-1.5.2/include/schily/systeminfo.mk
#	star-1.5.2/include/schily/sha1.mk
#	star-1.5.2/include/schily/resource.h
#	star-1.5.2/include/schily/resource.mk
#	star-1.5.2/include/schily/priv.h
#	star-1.5.2/include/schily/netdb.h
#	star-1.5.2/include/schily/netdb.mk
#	star-1.5.2/include/schily/setjmp.h
#	star-1.5.2/include/schily/setjmp.mk
#	star-1.5.2/include/schily/shadow.h
#	star-1.5.2/include/schily/shadow.mk
#	star-1.5.2/include/schily/socket.h
#	star-1.5.2/include/schily/socket.mk
#	star-1.5.2/include/schily/times.h
#	star-1.5.2/include/schily/times.mk
#	star-1.5.2/include/schily/utsname.h
#	star-1.5.2/include/schily/utsname.mk
#	star-1.5.2/include/schily/vfork.h
#	star-1.5.2/include/schily/vfork.mk
#	star-1.5.2/include/schily/select.h
#	star-1.5.2/include/schily/select.mk
#	star-1.5.2/include/schily/priv.mk
#	star-1.5.2/include/schily/assert.h
#	star-1.5.2/include/schily/assert.mk
#	star-1.5.2/include/schily/syslog.h
#	star-1.5.2/include/schily/syslog.mk
#	star-1.5.2/include/schily/procfs.h
#	star-1.5.2/include/schily/procfs.mk
#	star-1.5.2/include/schily/float.h
#	star-1.5.2/include/schily/float.mk
#	star-1.5.2/include/schily/ipc.h
#	star-1.5.2/include/schily/ipc.mk
#	star-1.5.2/include/schily/sem.h
#	star-1.5.2/include/schily/sem.mk
#	star-1.5.2/include/schily/shm.h
#	star-1.5.2/include/schily/shm.mk
#	star-1.5.2/include/schily/rmd160.h
#	star-1.5.2/include/schily/rmd160.mk
#	star-1.5.2/include/schily/sha2.h
#	star-1.5.2/include/schily/sha2.mk
#	star-1.5.2/include/schily/math.h
#	star-1.5.2/include/schily/math.mk
#	star-1.5.2/include/schily/dbgmalloc.h
#	star-1.5.2/include/schily/dbgmalloc.mk
#	star-1.5.2/include/schily/libgen.h
#	star-1.5.2/include/schily/libgen.mk
#	star-1.5.2/include/schily/_regex.h
#	star-1.5.2/include/schily/_regex.mk
#	star-1.5.2/include/schily/regex.h
#	star-1.5.2/include/schily/regex.mk
#	star-1.5.2/include/schily/windows.h
#	star-1.5.2/include/schily/windows.mk
#	star-1.5.2/include/schily/stdint.h
#	star-1.5.2/include/schily/stdint.mk
#	star-1.5.2/include/schily/inttypes.h
#	star-1.5.2/include/schily/inttypes.mk
#	star-1.5.2/include/schily/err_arch.h
#	star-1.5.2/include/schily/err_arch.mk
#	star-1.5.2/include/schily/err_bit.h
#	star-1.5.2/include/schily/err_bit.mk
#	star-1.5.2/include/schily/err_char.h
#	star-1.5.2/include/schily/err_char.mk
#	star-1.5.2/include/Makefile
#	star-1.5.2/README
#	star-1.5.2/man
#	star-1.5.2/man/man1
#	star-1.5.2/man/man1/match.1
#	star-1.5.2/man/man1/Makefile
#	star-1.5.2/man/man4
#	star-1.5.2/man/man4/makefiles.4
#	star-1.5.2/man/man4/makerules.4
#	star-1.5.2/man/man4/Makefile
#	star-1.5.2/man/man4/makefiles.mk
#	star-1.5.2/man/man4/makerules.mk
#	star-1.5.2/man/Makefile
#	star-1.5.2/READMEs
#	star-1.5.2/READMEs/README.aix
#	star-1.5.2/READMEs/README.gmake
#	star-1.5.2/READMEs/README.hpux
#	star-1.5.2/READMEs/README.linux
#	star-1.5.2/READMEs/README.macosX
#	star-1.5.2/READMEs/README.macosX-old-versions
#	star-1.5.2/READMEs/README.mingw32
#	star-1.5.2/READMEs/README.msdos
#	star-1.5.2/READMEs/README.ppc
#	star-1.5.2/READMEs/README.solaris
#	star-1.5.2/READMEs/README.win32
#	star-1.5.2/READMEs/README.sunos
#	star-1.5.2/READMEs/README.install
#	star-1.5.2/TODO
#	star-1.5.2/Gmake
#	star-1.5.2/Gmake.linux
#	star-1.5.2/COPYING
#	star-1.5.2/README.compile
#	star-1.5.2/Changelog
#	star-1.5.2/.clean
#	star-1.5.2/AN-1.5
#	star-1.5.2/STATUS.alpha
#	star-1.5.2/AN-1.2
#	star-1.5.2/COMPILE
#	star-1.5.2/PORTING
#	star-1.5.2/BUILD
#	star-1.5.2/INSTALL
#	star-1.5.2/conf
#	star-1.5.2/conf/Makefile
#	star-1.5.2/conf/makeinc
#	star-1.5.2/conf/install-sh
#	star-1.5.2/conf/src-get
#	star-1.5.2/conf/oarch.sh
#	star-1.5.2/conf/mkdir-sh
#	star-1.5.2/conf/cc-config.sh
#	star-1.5.2/conf/mkdep-hpux.sh
#	star-1.5.2/conf/mkdep-sco.sh
#	star-1.5.2/conf/mkdep-aix.sh
#	star-1.5.2/conf/wget.sh
#	star-1.5.2/conf/srcroot.sh
#	star-1.5.2/conf/setup.sh
#	star-1.5.2/conf/mkdir.sh
#	star-1.5.2/conf/mkdep-msc.sh
#	star-1.5.2/conf/xconfig.mk
#	star-1.5.2/conf/post.html
#	star-1.5.2/conf/pre.html
#	star-1.5.2/conf/mkdep-msc-interix.sh
#	star-1.5.2/conf/runrmt_android
#	star-1.5.2/conf/runrmt_rsh
#	star-1.5.2/conf/runrmt_ssh
#	star-1.5.2/incs
#	star-1.5.2/inc
#	star-1.5.2/inc/Makefile
#	star-1.5.2/inc/align_test.c
#	star-1.5.2/inc/align_test.mk
#	star-1.5.2/inc/avoffset.c
#	star-1.5.2/inc/avoffset.mk
#	star-1.5.2/inc/getfp.c
#	star-1.5.2/inc/README
#	star-1.5.2/rmt
#	star-1.5.2/rmt/Makefile
#	star-1.5.2/rmt/rmt.c
#	star-1.5.2/rmt/rmt.1
#	star-1.5.2/rmt/Makefile.man
#	star-1.5.2/rmt/rmt.dfl
#	star-1.5.2/rmt/Makefile.dfl
#	star-1.5.2/rmt/Makefile.doc
#	star-1.5.2/rmt/default-rmt.sample
#	star-1.5.2/configure
#	star-1.5.2/TEMPLATES
#	star-1.5.2/TEMPLATES/Defaults.gcc
#	star-1.5.2/TEMPLATES/Defaults.xcc
#	star-1.5.2/TEMPLATES/temp-gcc.rul
#	star-1.5.2/TEMPLATES/temp-xcc.rul
#	star-1.5.2/TEMPLATES/Makefile.aux
#	star-1.5.2/TEMPLATES/Makefile.cmd
#	star-1.5.2/TEMPLATES/Makefile.dir
#	star-1.5.2/TEMPLATES/Makefile.drv
#	star-1.5.2/TEMPLATES/Makefile.lib
#	star-1.5.2/TEMPLATES/Makefile.loc
#	star-1.5.2/TEMPLATES/Makefile.man
#	star-1.5.2/TEMPLATES/Makefile.mks
#	star-1.5.2/TEMPLATES/Makefile.root
#	star-1.5.2/TEMPLATES/Makefile.scr
#	star-1.5.2/TEMPLATES/Makefile.shl
#	star-1.5.2/TEMPLATES/Makefile_de.man
#	star-1.5.2/TEMPLATES/Makefile.mod
#	star-1.5.2/TEMPLATES/Makefile.inc
#	star-1.5.2/TEMPLATES/Makefile.wrap
#	star-1.5.2/TEMPLATES/noshlxxx.mk
#	star-1.5.2/TEMPLATES/MKLINKS
#	star-1.5.2/mt
#	star-1.5.2/mt/Makefile
#	star-1.5.2/mt/mt.c
#	star-1.5.2/mt/Makefile.man
#	star-1.5.2/mt/smt.1
#	star-1.5.2/mt/mt.mk1
#	star-1.5.2/mt/mt.1
#	star-1.5.2/libdeflt
#	star-1.5.2/libdeflt/default.c
#	star-1.5.2/libdeflt/Makefile
#	star-1.5.2/libdeflt/libdeflt.mk
#	star-1.5.2/libdeflt/Targets
#	star-1.5.2/libdeflt/libdeflt_p.mk
#	star-1.5.2/libdeflt/noshldeflt.mk
#	star-1.5.2/libdeflt/shldeflt.mk
#	star-1.5.2/libdeflt/libdeflt-mapvers
#	star-1.5.2/AN-1.3
#	star-1.5.2/AN-1.3.1
#	star-1.5.2/AN-1.4
#	star-1.5.2/README.SSPM
#	star-1.5.2/tartest
#	star-1.5.2/tartest/tartest.c
#	star-1.5.2/tartest/Makefile
#	star-1.5.2/tartest/tartest.1
#	star-1.5.2/tartest/tartestman.mk
#	star-1.5.2/autoconf
#	star-1.5.2/autoconf/acgeneral.m4
#	star-1.5.2/autoconf/aclocal.m4
#	star-1.5.2/autoconf/acoldnames.m4
#	star-1.5.2/autoconf/acspecific.m4
#	star-1.5.2/autoconf/autoconf
#	star-1.5.2/autoconf/autoconf.m4
#	star-1.5.2/autoconf/autoheader.m4
#	star-1.5.2/autoconf/config.guess
#	star-1.5.2/autoconf/config.sub
#	star-1.5.2/autoconf/configure.in
#	star-1.5.2/autoconf/install-sh
#	star-1.5.2/autoconf/rules.cnf.in
#	star-1.5.2/autoconf/xconfig.h.in
#	star-1.5.2/autoconf/configure
#	star-1.5.2/librmt
#	star-1.5.2/librmt/Makefile
#	star-1.5.2/librmt/remote.c
#	star-1.5.2/librmt/librmt.mk
#	star-1.5.2/librmt/Targets
#	star-1.5.2/librmt/librmt.3
#	star-1.5.2/librmt/mtg2rmtg.3
#	star-1.5.2/librmt/rmtclose.3
#	star-1.5.2/librmt/rmtdebug.3
#	star-1.5.2/librmt/librmt_p.mk
#	star-1.5.2/librmt/shlrmt.mk
#	star-1.5.2/librmt/rmtfilename.3
#	star-1.5.2/librmt/rmtg2mtg.3
#	star-1.5.2/librmt/rmtgetconn.3
#	star-1.5.2/librmt/rmthostname.3
#	star-1.5.2/librmt/rmtinit.3
#	star-1.5.2/librmt/rmtioctl.3
#	star-1.5.2/librmt/rmtopen.3
#	star-1.5.2/librmt/rmtread.3
#	star-1.5.2/librmt/rmtseek.3
#	star-1.5.2/librmt/rmtstatus.3
#	star-1.5.2/librmt/rmtwrite.3
#	star-1.5.2/librmt/rmtxstatus.3
#	star-1.5.2/librmt/mtg2rmtg.mk3
#	star-1.5.2/librmt/rmtclose.mk3
#	star-1.5.2/librmt/rmtdebug.mk3
#	star-1.5.2/librmt/rmtfilename.mk3
#	star-1.5.2/librmt/rmtg2mtg.mk3
#	star-1.5.2/librmt/rmtgetconn.mk3
#	star-1.5.2/librmt/rmthostname.mk3
#	star-1.5.2/librmt/rmtinit.mk3
#	star-1.5.2/librmt/rmtioctl.mk3
#	star-1.5.2/librmt/rmtopen.mk3
#	star-1.5.2/librmt/rmtread.mk3
#	star-1.5.2/librmt/rmtseek.mk3
#	star-1.5.2/librmt/rmtstatus.mk3
#	star-1.5.2/librmt/rmtwrite.mk3
#	star-1.5.2/librmt/rmtxstatus.mk3
#	star-1.5.2/librmt/noshlrmt.mk
#	star-1.5.2/librmt/librmt-mapvers
#	star-1.5.2/librmt/Makefile.man
#	star-1.5.2/TARGETS
#	star-1.5.2/TARGETS/15conf
#	star-1.5.2/TARGETS/25inc
#	star-1.5.2/TARGETS/45librmt
#	star-1.5.2/TARGETS/25include
#	star-1.5.2/TARGETS/43lib
#	star-1.5.2/TARGETS/55rmt
#	star-1.5.2/TARGETS/55star
#	star-1.5.2/TARGETS/45libfind
#	star-1.5.2/TARGETS/55tartest
#	star-1.5.2/TARGETS/55star_sym
#	star-1.5.2/TARGETS/55mt
#	star-1.5.2/TARGETS/55cmd
#	star-1.5.2/TARGETS/85man
#	star-1.5.2/TARGETS/README
#	star-1.5.2/TARGETS/Targetdirs
#	star-1.5.2/TARGETS/__slot
#	star-1.5.2/TARGETS/44libdeflt
#	star-1.5.2/libfind
#	star-1.5.2/libfind/Makefile
#	star-1.5.2/libfind/Targets
#	star-1.5.2/libfind/fetchdir.c
#	star-1.5.2/libfind/find.c
#	star-1.5.2/libfind/find_list.c
#	star-1.5.2/libfind/find_list.h
#	star-1.5.2/libfind/find_misc.c
#	star-1.5.2/libfind/find_misc.h
#	star-1.5.2/libfind/find_main.c
#	star-1.5.2/libfind/libfind-mapvers
#	star-1.5.2/libfind/libfind.mk
#	star-1.5.2/libfind/libfind_p.mk
#	star-1.5.2/libfind/idcache.c
#	star-1.5.2/libfind/walk.c
#	star-1.5.2/libfind/noshlfind.mk
#	star-1.5.2/libfind/shlfind.mk
#	star-1.5.2/libfind/cmpdir.c
#	star-1.5.2/libfind/find_tok.h
#	star-1.5.2/star_sym
#	star-1.5.2/star_sym/star_sym.c
#	star-1.5.2/star_sym/Makefile
#	star-1.5.2/star_sym/MKLINKS
#	star-1.5.2/CDDL.Schily.txt
#	star-1.5.2/CDDL.Sun.txt
#	star-1.5.2/LGPL-2.1.txt
#	star-1.5.2/GPL-2.0.txt
#	star-1.5.2/CONTRIBUTING
#	star-1.5.2/Makefile.old
#	star-1.5.2/pkgdefs
#	star-1.5.2/pkgdefs/CSW
#	star-1.5.2/pkgdefs/CSW/CSWstar
#	star-1.5.2/pkgdefs/CSW/CSWstar/Makefile
#	star-1.5.2/pkgdefs/CSW/CSWstar/copyright
#	star-1.5.2/pkgdefs/CSW/CSWstar/depend
#	star-1.5.2/pkgdefs/CSW/CSWstar/pkginfo
#	star-1.5.2/pkgdefs/CSW/CSWstar/prototype
#	star-1.5.2/Mcsw
#	star-1.5.2/proto
#	star-1.5.2/packages
#	star-1.5.2/AN-1.5.1
#	star-1.5.2/.links
#	star-1.5.2/AN-1.5.2
#
echo c - star-1.5.2
mkdir -p star-1.5.2 > /dev/null 2>&1
echo c - star-1.5.2/star
mkdir -p star-1.5.2/star > /dev/null 2>&1
echo x - star-1.5.2/star/Makefile
sed 's/^X//' >star-1.5.2/star/Makefile << 'END-of-star-1.5.2/star/Makefile'
X#ident @(#)Makefile	1.24 10/05/13 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# This is star_fat.mk, it creates one "fat" binary for all functionality.
X#
X# If you like to create non "fat" binaries, remove Makefile
X# and copy all.mk to Makefile.
X#
XINSDIR=		bin
XTARGET=		star
X#SYMLINKS=	ustar tar
XSYMLINKS=	ustar tar gnutar suntar scpio spax
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DCOPY_LINKS_DELAYED
XCPPOPTS +=	-DSTAR_FAT
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		star_fat.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		\
X		findinfo.c
X
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h restore.h \
X		checkerr.h dumpdate.h bitstring.h
X
X#LIBS=		-lunos
X#LIBS=		-lschily -lc /usr/local/lib/gcc-gnulib
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
X#
X#	Wenn -lfind, dann auch  $(LIB_INTL)
X#
XXMK_FILE=	Makefile.man ustarman.mk starformatman.mk scpioman.mk gnutarman.mk \
X		spaxman.mk suntarman.mk Makefile.dfl Makefile.doc
X
Xstar_fat.c: star.c
X	$(RM) $(RM_FORCE) $@; cp star.c $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/Makefile
echo x - star-1.5.2/star/append.c
sed 's/^X//' >star-1.5.2/star/append.c << 'END-of-star-1.5.2/star/append.c'
X/* @(#)append.c	1.29 10/08/21 Copyright 1992, 2001-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)append.c	1.29 10/08/21 Copyright 1992, 2001-2010 J. Schilling";
X#endif
X/*
X *	Routines used to append files to an existing
X *	tape archive
X *
X *	Copyright (c) 1992, 2001-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include "star.h"
X#include <schily/schily.h>
X#include "starsubs.h"
X
Xextern	FILE	*vpr;
X
Xextern	BOOL	debug;
Xextern	BOOL	cflag;
Xextern	BOOL	uflag;
Xextern	BOOL	rflag;
X
X/*
X * XXX We should try to share the hash code with lhash.c
X */
Xstatic struct h_elem {
X	struct h_elem *h_next;
X	time_t		h_time;
X	long		h_nsec;
X	short		h_len;
X	char		h_flags;
X	char		h_data[1];			/* Variable size. */
X} **h_tab;
X
X#define	HF_NSEC		0x01				/* have nsecs	*/
X
Xstatic	unsigned	h_size;
XLOCAL	int		cachesize;
X
XEXPORT	void	skipall		__PR((void));
XLOCAL	void	hash_new	__PR((size_t size));
XLOCAL	struct h_elem *uhash_lookup	__PR((FINFO *info));
XLOCAL	void	hash_add	__PR((FINFO *info));
XEXPORT	BOOL	update_newer	__PR((FINFO *info));
XLOCAL	int	hashval		__PR((Uchar *str, Uint maxsize));
X
XEXPORT void
Xskipall()
X{
X		FINFO	finfo;
X		TCB	tb;
X		char	name[PATH_MAX+1];
X		char	lname[PATH_MAX+1];
X	register TCB 	*ptb = &tb;
X
X	if (uflag)
X		hash_new(100);
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X
X	finfo.f_tcb = ptb;
X	for (;;) {
X		if (get_tcb(ptb) == EOF)
X			break;
X
X		finfo.f_name = name;
X		finfo.f_lname = lname;
X		if (tcb_to_info(ptb, &finfo) == EOF)
X			break;
X
X		if (debug)
X			fprintf(vpr, "R %s\n", finfo.f_name);
X		if (uflag)
X			hash_add(&finfo);
X
X		void_file(&finfo);
X	}
X	if (debug)
X		error("used %d bytes for update cache.\n", cachesize);
X}
X
X#include <schily/string.h>
X
XLOCAL void
Xhash_new(size)
X	size_t	size;
X{
X	register	int	i;
X
X	h_size = size;
X	h_tab = (struct h_elem **)___malloc(size * sizeof (struct h_elem *), "new hash");
X	for (i = 0; i < size; i++) h_tab[i] = 0;
X
X	cachesize += size * sizeof (struct h_elem *);
X}
X
XLOCAL struct h_elem *
Xuhash_lookup(info)
X	FINFO	*info;
X{
X	register char		*name = info->f_name;
X	register struct h_elem *hp;
X	register int		hv;
X		BOOL		slash = FALSE;
X
X	if (info->f_namelen == 0)
X		info->f_namelen = strlen(info->f_name);
X
X	if (is_dir(info) && info->f_name[info->f_namelen-1] == '/') {
X		info->f_name[--info->f_namelen] = '\0';
X		slash = TRUE;
X	}
X
X	hv = hashval((unsigned char *)name, h_size);
X	for (hp = h_tab[hv]; hp; hp = hp->h_next) {
X		if (info->f_namelen == hp->h_len && *name == *hp->h_data) {
X			if (streql(name, hp->h_data)) {
X				if (slash)
X					info->f_name[info->f_namelen++] = '/';
X				return (hp);
X			}
X		}
X	}
X	if (slash)
X		info->f_name[info->f_namelen++] = '/';
X	return (0);
X}
X
XLOCAL void
Xhash_add(info)
X	FINFO	*info;
X{
X	register	int	len;
X	register struct h_elem	*hp;
X	register	int	hv;
X			BOOL	slash = FALSE;
X
X	/*
X	 * XXX nsec korrekt implementiert?
X	 */
X	if (info->f_namelen == 0)
X		info->f_namelen = strlen(info->f_name);
X
X	if (is_dir(info) && info->f_name[info->f_namelen-1] == '/') {
X		info->f_name[--info->f_namelen] = '\0';
X		slash = TRUE;
X	}
X	if ((hp = uhash_lookup(info)) != 0) {
X		if (hp->h_time < info->f_mtime) {
X			hp->h_time = info->f_mtime;
X			hp->h_nsec = info->f_mnsec;
X		} else if (hp->h_time == info->f_mtime) {
X			/*
X			 * If the current archive entry holds extended
X			 * time imformation, honor it.
X			 */
X			if (info->f_xflags & XF_MTIME)
X				hp->h_flags |= HF_NSEC;
X			else
X				hp->h_flags &= ~HF_NSEC;
X
X			if ((hp->h_flags & HF_NSEC) &&
X			    (hp->h_nsec < info->f_mnsec))
X				hp->h_nsec = info->f_mnsec;
X		}
X		if (slash)
X			info->f_name[info->f_namelen++] = '/';
X		return;
X	}
X
X	len = info->f_namelen;
X	hp = ___malloc((size_t)len + sizeof (struct h_elem), "add hash");
X	cachesize += len + sizeof (struct h_elem);
X	strcpy(hp->h_data, info->f_name);
X	hp->h_time = info->f_mtime;
X	hp->h_nsec = info->f_mnsec;
X	hp->h_len = len;
X	hp->h_flags = 0;
X	if (info->f_xflags & XF_MTIME)
X		hp->h_flags |= HF_NSEC;
X	hv = hashval((unsigned char *)info->f_name, h_size);
X	hp->h_next = h_tab[hv];
X	h_tab[hv] = hp;
X	if (slash)
X		info->f_name[info->f_namelen++] = '/';
X}
X
XEXPORT BOOL
Xupdate_newer(info)
X	FINFO	*info;
X{
X	register struct h_elem *hp;
X
X	/*
X	 * XXX nsec korrekt implementiert?
X	 */
X	if ((hp = uhash_lookup(info)) != 0) {
X		if (info->f_mtime > hp->h_time)
X			return (TRUE);
X		if ((hp->h_flags & HF_NSEC) && (info->f_flags & F_NSECS) &&
X		    info->f_mtime == hp->h_time && info->f_mnsec > hp->h_nsec)
X			return (TRUE);
X		return (FALSE);
X	}
X	return (TRUE);
X}
X
XLOCAL int
Xhashval(str, maxsize)
X	register Uchar *str;
X		Uint	maxsize;
X{
X	register int	sum = 0;
X	register int	i;
X	register int	c;
X
X	for (i = 0; (c = *str++) != '\0'; i++)
X		sum ^= (c << (i&7));
X	return (sum % maxsize);
X}
END-of-star-1.5.2/star/append.c
echo x - star-1.5.2/star/buffer.c
sed 's/^X//' >star-1.5.2/star/buffer.c << 'END-of-star-1.5.2/star/buffer.c'
X/* @(#)buffer.c	1.164 12/01/01 Copyright 1985, 1995, 2001-2012 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)buffer.c	1.164 12/01/01 Copyright 1985, 1995, 2001-2012 J. Schilling";
X#endif
X/*
X *	Buffer handling routines
X *
X *	Copyright (c) 1985, 1995, 2001-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X
X/*
X * XXX Until we find a better way, the next definitions must be in sync
X * XXX with the definitions in librmt/remote.c
X */
X#if !defined(HAVE_FORK) || !defined(HAVE_SOCKETPAIR) || !defined(HAVE_DUP2)
X#undef	USE_RCMD_RSH
X#endif
X#if !defined(HAVE_GETSERVBYNAME)
X#undef	USE_REMOTE				/* Cannot get rcmd() port # */
X#endif
X#if (!defined(HAVE_NETDB_H) || !defined(HAVE_RCMD)) && !defined(USE_RCMD_RSH)
X#undef	USE_REMOTE				/* There is no rcmd() */
X#endif
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/libport.h>	/* getpagesize() */
X#include <schily/fcntl.h>
X#include <schily/ioctl.h>
X#include <schily/varargs.h>
X#include "star.h"
X#include "props.h"
X#include <schily/errno.h>
X#include <schily/standard.h>
X#include "fifo.h"
X#include <schily/string.h>
X#include <schily/wait.h>
X#include <schily/schily.h>
X#include <schily/mtio.h>
X#include <schily/librmt.h>
X#include "starsubs.h"
X
X#include <schily/io.h>		/* for setmode() prototype */
X
Xlong	bigcnt	= 0;
Xint	bigsize	= 0;		/* Tape block size (may shrink < bigbsize) */
Xint	bigbsize = 0;		/* Big buffer size */
Xint	bufsize	= 0;		/* Available buffer size */
Xchar	*bigbase = NULL;
Xchar	*bigbuf	= NULL;
Xchar	*bigptr	= NULL;
Xchar	*eofptr	= NULL;
XLlong	curblockno;
X
Xm_stats	bstat;
Xm_stats	*stats	= &bstat;
Xint	pid;
X
X#ifdef	timerclear
XLOCAL	struct	timeval	starttime;
XLOCAL	struct	timeval	stoptime;
X#endif
X
XLOCAL	BOOL	isremote = FALSE;
XLOCAL	int	remfd	= -1;
XLOCAL	char	*remfn;
X
X#ifdef __DJGPP__
XLOCAL	FILE	*compress_tarf_save;	/* Old value of tarf	 */
XLOCAL	FILE	*compress_tmpf = NULL;	/* FILE * from tmpfile() */
X#endif
X
Xextern	FILE	*tarf;
Xextern	FILE	*tty;
Xextern	FILE	*vpr;
Xextern	char	*tarfiles[];
Xextern	int	ntarfiles;
Xextern	int	tarfindex;
Xextern	BOOL	force_noremote;
XLOCAL	int	lastremote = -1;
Xextern	BOOL	multivol;
Xextern	char	*newvol_script;
Xextern	BOOL	use_fifo;
Xextern	int	swapflg;
Xextern	int	cmptype;
Xextern	BOOL	debug;
Xextern	BOOL	print_artype;
Xextern	BOOL	silent;
Xextern	BOOL	showtime;
Xextern	BOOL	no_stats;
Xextern	BOOL	cpio_stats;
Xextern	BOOL	do_fifostats;
Xextern	BOOL	cflag;
Xextern	BOOL	uflag;
Xextern	BOOL	rflag;
Xextern	BOOL	copyflag;
Xextern	BOOL	Zflag;
Xextern	BOOL	zflag;
Xextern	BOOL	bzflag;
Xextern	BOOL	lzoflag;
Xextern	BOOL	p7zflag;
Xextern	BOOL	xzflag;
Xextern	BOOL	lzipflag;
Xextern	char	*compress_prg;
Xextern	BOOL	multblk;
Xextern	BOOL	partial;
Xextern	BOOL	wready;
Xextern	BOOL	nullout;
Xextern	Ullong	tsize;
Xextern	BOOL	nowarn;
X
Xextern	int	intr;
X
Xextern	GINFO	*gip;
X
X
XEXPORT	void	opt_remote	__PR((void));
XEXPORT	BOOL	openremote	__PR((void));
XEXPORT	void	opentape	__PR((void));
XEXPORT	void	closetape	__PR((void));
XEXPORT	void	changetape	__PR((BOOL donext));
XEXPORT	void	nextitape	__PR((void));
XEXPORT	void	nextotape	__PR((void));
XEXPORT	int	startvol	__PR((char *buf, int amount));
XEXPORT	void	newvolhdr	__PR((char *buf, int amount, BOOL do_fifo));
X#ifdef	FIFO
XLOCAL	void	fbit_ffss	__PR((bitstr_t *name, int startb, int stopb, int *value));
XLOCAL	BOOL	fifo_hpos	__PR((char *buf, off_t *posp));
X#endif
XEXPORT	void	initbuf		__PR((int nblocks));
XEXPORT	void	markeof		__PR((void));
XEXPORT	void	syncbuf		__PR((void));
XEXPORT	int	peekblock	__PR((char *buf, int amount));
XEXPORT	int	readblock	__PR((char *buf, int amount));
XLOCAL	int	readtblock	__PR((char *buf, int amount));
XLOCAL	void	readbuf		__PR((void));
XEXPORT	int	readtape	__PR((char *buf, int amount));
XEXPORT	void	filltcb		__PR((TCB *ptb));
XEXPORT	void	movetcb		__PR((TCB *from_ptb, TCB *to_ptb));
XEXPORT	void	*get_block	__PR((int amount));
XEXPORT	void	put_block	__PR((int amount));
XEXPORT	char	*writeblock	__PR((char *buf));
XEXPORT	int	writetape	__PR((char *buf, int amount));
XLOCAL	void	writebuf	__PR((int amount));
XLOCAL	void	flushbuf	__PR((void));
XEXPORT	void	writeempty	__PR((void));
XEXPORT	void	weof		__PR((void));
XEXPORT	void	buf_sync	__PR((int size));
XEXPORT	void	buf_drain	__PR((void));
XEXPORT	int	buf_wait	__PR((int amount));
XEXPORT	void	buf_wake	__PR((int amount));
XEXPORT	int	buf_rwait	__PR((int amount));
XEXPORT	void	buf_rwake	__PR((int amount));
XEXPORT	void	buf_resume	__PR((void));
XEXPORT	void	backtape	__PR((void));
XEXPORT	int	mtioctl		__PR((int cmd, int count));
XEXPORT	off_t	mtseek		__PR((off_t offset, int whence));
XEXPORT	void	marktcb		__PR((char *addr));
XEXPORT	Llong	tblocks		__PR((void));
XEXPORT	void	prstats		__PR((void));
XEXPORT	BOOL	checkerrs	__PR((void));
XEXPORT	void	exprstats	__PR((int ret));
XEXPORT	void	excomerrno	__PR((int err, char *fmt, ...)) __printflike__(2, 3);
XEXPORT	void	excomerr	__PR((char *fmt, ...)) __printflike__(1, 2);
XEXPORT	void	die		__PR((int err));
XLOCAL	void	compressopen	__PR((void));
XLOCAL	void	compressclose	__PR((void));
X
XEXPORT void
Xopt_remote()
X{
X#ifdef	USE_REMOTE
X	printf(" remote");
X#endif
X}
X
X/*
X * Check whether the current tarfiles[tarfindex] refers to a remote archive
X * location and open a remote connection if needed.
X * Called from star.c main() and from changetape().
X */
XEXPORT BOOL
Xopenremote()
X{
X	char	host[128];
X	char	lasthost[128];
X
X	if ((!nullout || (uflag || rflag)) && !force_noremote &&
X			(remfn = rmtfilename(tarfiles[tarfindex])) != NULL) {
X
X#ifdef	USE_REMOTE
X		isremote = TRUE;
X		rmtdebug(debug);
X		rmthostname(host, sizeof (host), tarfiles[tarfindex]);
X		if (debug)
X			errmsgno(EX_BAD, "Remote: %s Host: %s file: %s\n",
X					tarfiles[tarfindex], host, remfn);
X
X		if (lastremote >= 0) {
X			rmthostname(lasthost, sizeof (lasthost),
X							tarfiles[lastremote]);
X			if (!streql(host, lasthost)) {
X				close(remfd);
X				remfd = -1;
X				lastremote = -1;
X			}
X		}
X		if (remfd < 0 && (remfd = rmtgetconn(host, bigsize, 0)) < 0)
X			comerrno(EX_BAD, "Cannot get connection to '%s'.\n",
X				/* errno not valid !! */		host);
X		lastremote = tarfindex;
X#else
X		comerrno(EX_BAD, "Remote tape support not present.\n");
X#endif
X	} else {
X		isremote = FALSE;
X	}
X	return (isremote);
X}
X
X/*
X * Open the current tarfiles[tarfindex] (a remote connection must be open)
X * Called from star.c main() and from changetape().
X */
XEXPORT void
Xopentape()
X{
X	int	n = 0;
X	extern	dev_t	tape_dev;
X	extern	ino_t	tape_ino;
X	extern	BOOL	tape_isreg;
X
X	if (copyflag || (nullout && !(uflag || rflag))) {
X		tarfiles[tarfindex] = "null";
X		tarf = (FILE *)NULL;
X	} else if (streql(tarfiles[tarfindex], "-")) {
X		if (cflag) {
X			tarf = stdout;
X		} else {
X			tarf = stdin;
X			multblk = TRUE;
X		}
X		setbuf(tarf, (char *)NULL);
X		setmode(fileno(tarf), O_BINARY);
X	} else if (isremote) {
X#ifdef	USE_REMOTE
X		/*
X		 * isremote will always be FALSE if USE_REMOTE is not defined.
X		 * NOTE any open flag bejond O_RDWR is not portable across
X		 * different platforms. The remote tape library will check
X		 * whether the current /etc/rmt server supports symbolic
X		 * open flags. If there is no symbolic support in the
X		 * remote server, our rmt client code will mask off all
X		 * non portable bits. The remote rmt server defaults to
X		 * O_BINARY as the client (we) may not know about O_BINARY.
X		 * XXX Should we add an option that allows to specify O_TRUNC?
X		 */
X		while (rmtopen(remfd, remfn, (cflag ? O_RDWR|O_CREAT:O_RDONLY)|O_BINARY) < 0) {
X			if (!wready || n++ > 12 ||
X			    (geterrno() != EIO && geterrno() != EBUSY)) {
X				comerr("Cannot open remote '%s'.\n",
X						tarfiles[tarfindex]);
X			} else {
X				sleep(10);
X			}
X		}
X#endif
X	} else {
X		FINFO	finfo;
X	extern	BOOL	follow;
X	extern	BOOL	fcompat;
X	extern	int	ptype;
X
X		if (fcompat && (cflag && !(uflag || rflag))) {
X			/*
X			 * The old syntax has a high risk of corrupting
X			 * files if the user disorders the args.
X			 * For this reason, we do not allow to overwrite
X			 * a plain file in compat mode.
X			 * XXX What if we implement 'r' & 'u' ???
X			 */
X			follow++;
X			n = _getinfo(tarfiles[tarfindex], &finfo);
X			follow--;
X			if (n >= 0 && is_file(&finfo) && finfo.f_size > (off_t)0) {
X				if (ptype != P_SUNTAR) {
X					comerrno(EX_BAD,
X					"Will not overwrite non empty plain files in compat mode.\n");
X				} else {
X					errmsgno(EX_BAD,
X					"WARNING: Overwriting archive file '%s'.\n",
X					tarfiles[tarfindex]);
X				}
X			}
X		}
X
X		n = 0;
X		/*
X		 * XXX Should we add an option that allows to specify O_TRUNC?
X		 */
X		while ((tarf = fileopen(tarfiles[tarfindex],
X						cflag?"rwcub":"rub")) ==
X								(FILE *)NULL) {
X			if (!wready || n++ > 12 ||
X			    (geterrno() != EIO && geterrno() != EBUSY)) {
X				comerr("Cannot open '%s'.\n",
X						tarfiles[tarfindex]);
X			} else {
X				sleep(10);
X			}
X		}
X	}
X	if (tarf != (FILE *)NULL && isatty(fdown(tarf)))
X		comerrno(EX_BAD, "Archive cannot be a tty.\n");
X	if (!isremote && (!nullout || (uflag || rflag)) &&
X	    tarf != (FILE *)NULL) {
X		file_raise(tarf, FALSE);
X		checkarch(tarf);
X	}
X	vpr = tarf == stdout ? stderr : stdout;	/* f=stdout redirect listing */
X	if (samefile(tarf, vpr)) {		/* Catch -f /dev/stdout case */
X		if (tarf != stdin)		/* Don't redirect for -tv <  */
X			vpr = stderr;
X	}
X
X	/*
X	 * If the archive is a plain file and thus seekable
X	 * do automatic compression detection.
X	 */
X	if (stats->volno == 1 &&
X	    tape_isreg && !cflag && (!Zflag && !zflag && !bzflag && !lzoflag &&
X	    !p7zflag && !xzflag && !compress_prg)) {
X		long	htype;
X		TCB	*ptb;
X
X		readtblock(bigbuf, TBLOCK);
X		ptb = (TCB *)bigbuf;
X		htype = get_hdrtype(ptb, FALSE);
X
X		if (htype == H_UNDEF) {
X			switch (cmptype = get_compression(ptb)) {
X
X			case C_NONE:
X				break;
X			case C_PACK:
X			case C_GZIP:
X			case C_LZW:
X			case C_FREEZE:
X			case C_LZH:
X			case C_PKZIP:
X				if (!silent && !print_artype) errmsgno(EX_BAD,
X					"WARNING: Archive is '%s' compressed, trying to use the -z option.\n",
X						get_cmpname(cmptype));
X				zflag = TRUE;
X				break;
X			case C_BZIP2:
X				if (!silent && !print_artype) errmsgno(EX_BAD,
X					"WARNING: Archive is 'bzip2' compressed, trying to use the -bz option.\n");
X				bzflag = TRUE;
X				break;
X			case C_LZO:
X				if (!silent) errmsgno(EX_BAD,
X					"WARNING: Archive is 'lzop' compressed, trying to use the -lzo option.\n");
X				lzoflag = TRUE;
X				break;
X			case C_7Z:
X				if (!silent) errmsgno(EX_BAD,
X					"WARNING: Archive is '7z' compressed, trying to use the -7z option.\n");
X				p7zflag = TRUE;
X				break;
X			case C_XZ:
X				if (!silent) errmsgno(EX_BAD,
X					"WARNING: Archive is 'xz' compressed, trying to use the -xz option.\n");
X				xzflag = TRUE;
X				break;
X			case C_LZIP:
X				if (!silent) errmsgno(EX_BAD,
X					"WARNING: Archive is 'lzip' compressed, trying to use the -lzip option.\n");
X				lzipflag = TRUE;
X				break;
X			default:
X				if (!silent) errmsgno(EX_BAD,
X					"WARNING: Unknown compression type %d.\n", cmptype);
X				break;
X			}
X		}
X		mtseek((off_t)0, SEEK_SET);
X	}
X	if (Zflag || zflag || bzflag || lzoflag ||
X	    p7zflag || xzflag || lzipflag ||
X	    compress_prg) {
X		if (isremote)
X			comerrno(EX_BAD, "Cannot compress remote archives (yet).\n");
X		/*
X		 * If both values are zero, this is a device and thus may be a tape.
X		 */
X		if (tape_dev || tape_ino)
X			compressopen();
X		else
X			comerrno(EX_BAD, "Can only compress files.\n");
X	}
X
X#ifdef	timerclear
X	if (showtime && starttime.tv_sec == 0 && starttime.tv_usec == 0 &&
X	    gettimeofday(&starttime, (struct timezone *)0) < 0)
X		comerr("Cannot get starttime\n");
X#endif
X}
X
X/*
X * Close the current open tarf/remfd (a remote connection must be open)
X * Called from star.c main() and from changetape().
X */
XEXPORT void
Xclosetape()
X{
X	if (isremote) {
X#ifdef	USE_REMOTE
X		/*
X		 * isremote will always be FALSE if USE_REMOTE is not defined.
X		 */
X		if (rmtclose(remfd) < 0)
X			errmsg("Remote close failed.\n");
X#endif
X	} else {
X		compressclose();
X		if (tarf)
X			fclose(tarf);
X	}
X}
X
X/*
X * Low level medium change routine.
X * Called from nextitape()/nextotape() and fifo_owait().
X */
XEXPORT void
Xchangetape(donext)
X	BOOL	donext;
X{
X	char	ans[2];
X	int	nextindex;
X
X	if (donext) {
X		pid_t	opid = pid;
X
X		if (pid == 0)
X			pid = 1; /* Make sure the statistics are printed */
X		prstats();
X		pid = opid;
X		if (!cflag &&
X		    (gip->tapesize > 0) &&
X		    (stats->blocks*stats->nblocks + stats->parts/TBLOCK) !=
X							    gip->tapesize) {
X			errmsgno(EX_BAD,
X			"WARNING: Archive size error.\n");
X			errmsgno(EX_BAD,
X			"Expected size %llu blocks, actual size %lld blocks.\n",
X			gip->tapesize,
X			stats->blocks*stats->nblocks + stats->parts/TBLOCK);
X		}
X		stats->Tblocks += stats->blocks;
X		stats->Tparts += stats->parts;
X	}
X	stats->blocks = 0L;
X	stats->parts = 0L;
X	closetape();
X	/*
X	 * XXX Was passiert, wenn wir das 2. Mal bei einem Band vorbeikommen?
X	 * XXX Zur Zeit wird gnadenlos ueberschrieben.
X	 */
X	if (donext) {
X		stats->volno++;
X		gip->volno = stats->volno;
X		nextindex = tarfindex + 1;
X		if (nextindex >= ntarfiles)
X			nextindex = 0;
X	} else {
X		nextindex = tarfindex;
X	}
X	/*
X	 * XXX We need to add something like the -l & -o option from
X	 * XXX ufsdump.
X	 */
X	if (newvol_script) {
X		char	scrbuf[PATH_MAX];
X
X		fflush(vpr);
X		if (!donext) {
X			errmsgno(EX_BAD,
X			"Mounted volume on '%s' did not match archive",
X				tarfiles[nextindex]);
X			comerrno(EX_BAD, "Aborting.\n");
X		}
X		/*
X		 * The script is called with the next volume # and volume name
X		 * as argument.
X		 */
X		js_snprintf(scrbuf, sizeof (scrbuf), "%s '%d' '%s'",
X				newvol_script,
X				stats->volno, tarfiles[nextindex]);
X		system(scrbuf);
X	} else {
X		errmsgno(EX_BAD, "Mount volume #%d on '%s' and hit <RETURN>",
X			stats->volno, tarfiles[nextindex]);
X		fgetline(tty, ans, sizeof (ans));
X		if (feof(tty))
X			exit(1);
X	}
X	tarfindex = nextindex;
X	openremote();
X	opentape();
X}
X
X/*
X * High level input medium change routine.
X * Currently called from buf_rwait().
X * Volume verification in the fifo case is done in the fifo process.
X * For this reason, we only verify the new volume in the non fifo case.
X */
XEXPORT void
Xnextitape()
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_chitape();
X	} else
X#endif
X	{
X		int	skip;
X
X		changetape(TRUE);
X		readbuf();
X		while (bigcnt > 0 && !verifyvol(bigptr, bigcnt, stats->volno, &skip)) {
X			changetape(FALSE);
X			readbuf();
X		}
X		if (skip > 0)
X			buf_rwake(skip*TBLOCK);
X	}
X	if (intr)
X		exit(2);
X}
X
X/*
X * High level output medium change routine.
X * Currently called from write_tcb() and only used if
X * -multivol has not been specified. So this is always called
X * from the tar process and never from the fifo background process.
X */
XEXPORT void
Xnextotape()
X{
X	weof();
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_chotape();
X	} else
X#endif
X	changetape(TRUE);
X	if (intr)
X		exit(2);
X}
X
X/*
X * Called from writetape()
X */
XEXPORT int
Xstartvol(buf, amount)
X	char	*buf;		/* The original buffer address		*/
X	int	amount;		/* The related requested transfer count	*/
X{
X	char	*obuf = bigbuf;
X	char	*optr = bigptr;
X	long	ocnt = bigcnt;
X	long	xcnt = 0;
X	BOOL	ofifo = use_fifo;
Xstatic	BOOL	active = FALSE;	/* If TRUE: We are already in a media change */
Xextern	m_head	*mp;
X
X	if (amount <= 0)
X		return (amount);
X	if (active)
X		comerrno(EX_BAD, "Panic: recursive media change requested!\n");
X	if (amount > bigsize) {
X		comerrno(EX_BAD,
X		"Panic: trying to write more than bs (%d > %d)!\n",
X		amount, bigsize);
X	}
X	mp->chreel = TRUE;
X#ifdef	FIFO
X	if (use_fifo) {
X		/*
X		 * Make sure the put side of the FIFO is waiting either on
X		 * mp->iblocked (because the FIFO is full) or on mp->reelwait
X		 * before temporary disabling the FIFO during media change.
X		 */
X		while (mp->iblocked == FALSE && mp->reelwait == FALSE) {
X			usleep(100000);
X		}
X	}
X#endif
X	active = TRUE;
X
X	/*
X	 * Save the current write data in "bigbase".
X	 */
X	movebytes(buf, bigbase, amount);
X
X	use_fifo = FALSE;
X	bigbuf = &bigbase[bigsize];
X	bigptr = bigbuf;
X	bigcnt = 0;
X
X	newvolhdr(buf, amount, ofifo);
X
X	if (bigcnt > 0) {	/* We did create a volhdr */
X		xcnt = bigsize - bigcnt;
X		if (amount < xcnt)
X			xcnt = amount;
X		if (xcnt > 0) {
X			/*
X			 * Move data from original buffer past the volhdr to
X			 * fill up a complete block size.
X			 */
X			movebytes(bigbase, bigptr, xcnt);
X			bigcnt += xcnt;
X		}
X		writetape(bigbuf, bigcnt);
X	}
X
X	movebytes(bigbase, buf, amount);
X	bigbuf = obuf;
X	bigptr = optr;
X	bigcnt = ocnt;
X	use_fifo = ofifo;
X	active = FALSE;
X	mp->chreel = FALSE;
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_reelwake();
X	}
X#endif
X	return (xcnt);		/* Return the amount taken from orig. buffer */
X}
X
XEXPORT void
Xnewvolhdr(buf, amount, do_fifo)
X	char	*buf;		/* The original buffer address		*/
X	int	amount;		/* The related requested transfer count	*/
X	BOOL	do_fifo;
X{
Xextern	m_head	*mp;
X	off_t	scur_size;
X	off_t	scur_off;
X	off_t	sold_size;
X	off_t	sold_off;
X#ifdef	FIFO
X	off_t	new_size = 0;
X	BOOL	nsize_valid = FALSE;
X#endif
X
X	fifo_lock_critical();
X	scur_size = stats->cur_size;
X	scur_off  = stats->cur_off;
X	sold_size = stats->old_size;
X	sold_off  = stats->old_off;
X#ifdef	FIFO
X	/*
X	 * If needed, find next header position in FIFO bitmap.
X	 */
X	if (do_fifo && buf != NULL)	/* buf == NULL -> called from put_tcb */
X		nsize_valid = fifo_hpos(buf, &new_size);
X#endif
X	fifo_unlock_critical();
X
X	xbbackup();		/* Save current xheader data */
X
X	gip->blockoff = stats->Tblocks * stats->nblocks +
X			stats->Tparts / TBLOCK;
X
X	put_release();		/* Pax 'g' vendor unique */
X	put_archtype();		/* Pax 'g' vendor unique */
X
X#ifdef	FIFO
X	if (do_fifo && buf != NULL) {	/* buf == NULL -> called from put_tcb */
X		off_t	new_off = 0;
X
X		if (!nsize_valid) {
X			new_size = scur_size;
X			new_off  = scur_off - FIFO_AMOUNT(mp);
X		}
X		/*
X		 * Write a 'g'-header and either a 'V'-header
X		 * or a 'M'-header.
X		 */
X		put_volhdr(gip->label, new_size <= 0);
X		if (new_size > 0)
X			put_multhdr(new_size, new_off);
X	} else
X#endif
X	/*
X	 * Write a 'g'-header and either a 'V'-header
X	 * or a 'M'-header.
X	 */
X	if (!do_fifo && (sold_off < sold_size)) {
X		put_volhdr(gip->label, FALSE);
X		put_multhdr(sold_size, sold_off);
X	} else {
X		put_volhdr(gip->label, TRUE);
X	}
X
X	xbrestore();		/* Restore current xheader data */
X	stats->cur_size = scur_size;
X	stats->cur_off  = scur_off;
X	stats->old_size = sold_size;
X	stats->old_off  = sold_off;
X}
X
X#ifdef	FIFO
X/*
X * Make the macro a function...
X */
XLOCAL void
Xfbit_ffss(name, startb, stopb, value)
X	register bitstr_t *name;
X	register int	startb;
X	register int	stopb;
X	register int	*value;
X{
X	bit_ffss(name, startb, stopb, value);
X}
X
X/*
X * Find next header position in FIFO bitmap.
X */
XLOCAL BOOL
Xfifo_hpos(buf, posp)
X	char	*buf;
X	off_t	*posp;
X{
X		int	startb;
X		int	stopb;
X		int	endb;
X		int	bitpos = -1;
X	extern	m_head	*mp;
X
X	startb = (buf - mp->base) / TBLOCK;
X	stopb  = -1 + (mp->putptr - mp->base) / TBLOCK;
X	endb   = -1 + (mp->size) / TBLOCK;
X
X	if (buf < mp->base) {
X		stopb = mp->bmlast;
X		startb = stopb + 1 - (mp->base - buf) / TBLOCK;
X
X		fbit_ffss(mp->bmap, startb, stopb, &bitpos);
X		if (bitpos >= 0) {
X			*posp = (bitpos - startb) * TBLOCK;
X			return (TRUE);
X		}
X		startb = 0;
X		stopb = -1 + (mp->putptr - mp->base) / TBLOCK;
X	}
X	if (stopb < startb)
X		fbit_ffss(mp->bmap, startb, endb, &bitpos);
X	else
X		fbit_ffss(mp->bmap, startb, stopb, &bitpos);
X	if (bitpos >= 0) {
X		*posp = (bitpos - startb) * TBLOCK;
X		return (TRUE);
X	}
X	if (stopb < startb) {
X		fbit_ffss(mp->bmap, 0, stopb, &bitpos);
X		if (bitpos >= 0) {
X			/*
X			 * endb+1 - startb == # of bits in rear part
X			 */
X			*posp = (bitpos + endb+1 - startb) * TBLOCK;
X			return (TRUE);
X		}
X	}
X	return (FALSE);
X}
X#endif
X
X/*
X * Init buffer or fifo.
X * called from star.c main().
X */
XEXPORT void
Xinitbuf(nblocks)
X	int	nblocks;
X{
X	BOOL	cvolhdr = cflag && (multivol || tsize > 0);
X
X	pid = getpid();
X	bufsize = bigsize = nblocks * TBLOCK;
X#ifdef	FIFO
X	if (use_fifo) {
X		initfifo();
X	}
X#endif
X	/*
X	 * As bigbuf is allocated here only in case that we have no FIFO or we
X	 * are in create mode, there are no aliasing problems with bigbuf and
X	 * the shared memory in the FIFO while trying to detect the archive
X	 * format and byte swapping in read/extract modes.
X	 * Note that -r and -u currently disable the FIFO.
X	 */
X	if (!use_fifo || cvolhdr) {
X		int	pagesize = getpagesize();
X
X		/*
X		 * llitos() overshoots by one space (' ') in cpio mode,
X		 * add 10 bytes.
X		 * If we create multi volume archives that need volume
X		 * headers, we need additional space to prepare the
X		 * first write to a new medium after a medium change.
X		 * "bufsize" may be modified by initfifo() in the FIFO case,
X		 * so we use "bigsize" for the extra multivol buffer to
X		 * avoid allocating an unneeded huge amount of data here.
X		 */
X		if (cvolhdr)
X			bigsize *= 2;
X
X		/*
X		 * roundup(x, y), x needs to be unsigned or x+y non-genative.
X		 */
X#undef	roundup
X#define	roundup(x, y)	((((x)+((y)-1))/(y))*(y))
X
X		bigptr = bigbuf = ___malloc((size_t)bigsize+10+pagesize,
X								"buffer");
X		bigptr = bigbuf = (char *)roundup((UIntptr_t)bigptr, pagesize);
X		fillbytes(bigbuf, bigsize, '\0');
X		fillbytes(&bigbuf[bigsize], 10, 'U');
X
X		if (cvolhdr) {
X			bigsize /= 2;
X			bigbase = bigbuf;
X			bigbuf = bigptr = &bigbase[bigsize];
X		}
X	}
X	stats->nblocks = nblocks;
X	stats->blocksize = bigbsize = bigsize;
X	stats->volno = 1;
X	stats->swapflg = -1;
X}
X
X/*
X * Mark the EOF position (the position of the first logical TAR EOF block)
X * We need this position for later repositioning when appending to an archive.
X */
XEXPORT void
Xmarkeof()
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		/*
X		 * Remember current FIFO status.
X		 */
X		/* EMPTY */
X	}
X#endif
X	eofptr = bigptr - TBLOCK;
X
X	if (debug) {
X		error("Blocks: %lld\n", tblocks());
X		error("bigptr - bigbuff: %lld %p %p %p lastsize: %ld\n",
X			(Llong)(bigptr - bigbuf),
X			(void *)bigbuf, (void *)bigptr, (void *)eofptr,
X			stats->lastsize);
X	}
X}
X
XEXPORT void
Xmarktcb(addr)
X	char	*addr;
X{
X#ifdef	FIFO
X	extern	m_head  *mp;
X	register int	bit;
X#endif
X	if (!multivol || !use_fifo)
X		return;
X	/*
X	 * As long as we don't start supporting -multivol with CPIO archives,
X	 * we will never come here when writing unblocked archives.
X	 */
X#ifdef	FIFO
X	bit = addr - mp->base;
X	if (bit % TBLOCK)		/* Remove this paranoia test in future. */
X		error("TCB offset not mudulo 512.\n");
X	bit /= TBLOCK;
X	if (bit_test(mp->bmap, bit))	/* Remove this paranoia test in future. */
X		error("Bit %d is already set.\n", bit);
X	bit_set(mp->bmap, bit);
X#endif
X}
X
X/*
X * Prepare the buffer/fifo for reversing the direction from reading to writing.
X * Called from star.c main() after skipall() is ready.
X */
XEXPORT void
Xsyncbuf()
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		/*
X		 * Switch FIFO direction.
X		 */
X		excomerr("Cannot update tape with FIFO.\n");
X	}
X#endif
X	if (eofptr) {
X		/*
X		 * Only back up to "eofptr" if markeof() has been called,
X		 * this is not the case when we did ancounter a hard EOF
X		 * at the beginning of the archive (empty file),
X		 */
X		bigptr = eofptr;
X		bigcnt = eofptr - bigbuf;
X	}
X}
X
X/*
X * Peek into buffer for amount bytes.
X * Return at most TBLOCK (512) bytes.
X *
X * Called from get_tcb() for checking the archive format of the first
X * tape block.
X */
XEXPORT int
Xpeekblock(buf, amount)
X	register char	*buf;
X	register int	amount;
X{
X	register int	n;
X
X	if ((n = buf_rwait(amount)) == 0)
X		return (EOF);
X	if (n > amount)
X		n = amount;
X	if (n >= TBLOCK) {
X		n = TBLOCK;
X		movetcb((TCB *)bigptr, (TCB *)buf);
X	} else {
X		movebytes(bigptr, buf, n);
X	}
X	return (n);
X}
X
X/*
X * Read amount bytes.
X * Return at most TBLOCK (512) bytes.
X * Do CPIO buffer wrap handling here.
X *
X * Called from get_tcb() and from the sparse handling functions in hole.c
X */
XEXPORT int
Xreadblock(buf, amount)
X	register char	*buf;
X	register int	amount;
X{
X	register int	n;
X
X	if ((n = peekblock(buf, amount)) != EOF) {
X		buf_rwake(n);
X		if (n < amount) {
X			if ((amount = readblock(&buf[n], amount-n)) == EOF)
X				return (n);
X			return (n + amount);
X		}
X	}
X	return (n);
X}
X
X/*
X * Low level routine to read a TAPE Block (usually 10k)
X * Called from opentape() to check the compression and from readtape().
X */
XLOCAL int
Xreadtblock(buf, amount)
X	char	*buf;
X	int	amount;
X{
X	int	cnt;
X
X	stats->reading = TRUE;
X	if (isremote) {
X#ifdef	USE_REMOTE
X		/*
X		 * isremote will always be FALSE if USE_REMOTE is not defined.
X		 */
X		if ((cnt = rmtread(remfd, buf, amount)) < 0)
X			excomerr("Error reading '%s'.\n", tarfiles[tarfindex]);
X#endif
X	} else {
X		if ((cnt = _niread(fileno(tarf), buf, amount)) < 0)
X			excomerr("Error reading '%s'.\n", tarfiles[tarfindex]);
X	}
X	return (cnt);
X}
X
X/*
X * Refill the buffer if no fifo.
X * Called from buf_rwait()
X */
XLOCAL void
Xreadbuf()
X{
X	bigcnt = readtape(bigbuf, bigsize);
X	bigptr = bigbuf;
X}
X
X/*
X * Mid level function to read a tape block (usually 10k)
X * Called from the fifo fill code and from readbuf().
X */
XEXPORT int
Xreadtape(buf, amount)
X	char	*buf;
X	int	amount;
X{
X	int	amt;
X	int	cnt;
X	char	*bp;
X	int	size;
Xstatic	BOOL	teof = FALSE;
X
X	if (teof)
X		return (0);
X
X	amt = 0;
X	bp = buf;
X	size = amount;
X
X	do {
X		cnt = readtblock(bp, size);
X
X		amt += cnt;
X		bp += cnt;
X		size -= cnt;
X	} while (amt < amount && cnt > 0 && multblk);
X
X	if (amt == 0)
X		return (amt);
X	if (amt < TBLOCK) {
X		errmsgno(EX_BAD, "Error reading '%s' size (%d) too small.\n",
X						tarfiles[tarfindex], amt);
X		/*
X		 * Do not continue after we did read less than 512 bytes.
X		 */
X		teof = TRUE;
X	}
X	/*
X	 * First block
X	 */
X	if (stats->swapflg < 0) {
X		if ((amt % TBLOCK) != 0)
X			comerrno(EX_BAD, "Invalid blocksize %d bytes.\n", amt);
X		if (amt < amount) {
X			stats->blocksize = bigsize = amt;
X			stats->nblocks = bigsize/TBLOCK;
X#ifdef	FIFO
X			if (use_fifo)
X				fifo_ibs_shrink(amt);
X#endif
X			errmsgno(EX_BAD, "Blocksize = %ld records.\n",
X						stats->blocksize/TBLOCK);
X		}
X	}
X	if (stats->swapflg > 0)
X		swabbytes(buf, amt);
X
X	if (amt == stats->blocksize)
X		stats->blocks++;
X	else
X		stats->parts += amt;
X	stats->lastsize = amt;
X#ifdef	DEBUG
X	error("readbuf: cnt: %d.\n", amt);
X#endif
X	return (amt);
X}
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X#ifdef	MY_SWABBYTES
X
Xvoid
Xswabbytes(bp, cnt)
X	register char	*bp;
X	register int	cnt;
X{
X	register char	c;
X
X	cnt /= 2;	/* even count only */
X	while ((cnt -= 8) >= 0) {
X		DO8(c = *bp++; bp[-1] = *bp; *bp++ = c);
X	}
X	cnt += 8;
X
X	while (--cnt >= 0) {
X		c = *bp++; bp[-1] = *bp; *bp++ = c;
X	}
X}
X#endif
X
X#define	DO16(a)		DO8(a) DO8(a)
X
XEXPORT void
Xfilltcb(ptb)
X	register TCB	*ptb;
X{
X	register int	i;
X	register long	*lp = ptb->ldummy;
X
X	for (i = 512/sizeof (long)/16; --i >= 0; ) {
X		DO16(*lp++ = 0L)
X	}
X}
X
XEXPORT void
Xmovetcb(from_ptb, to_ptb)
X	register TCB	*from_ptb;
X	register TCB	*to_ptb;
X{
X	register int	i;
X	register long	*from = from_ptb->ldummy;
X	register long	*to   = to_ptb->ldummy;
X
X	for (i = 512/sizeof (long)/16; --i >= 0; ) {
X		DO16(*to++ = *from++)
X	}
X}
X
X/*
X * Try to allocate 'amount' bytes from the buffer or from the fifo.
X * If it is not possible to get 'amount' bytes in a single chunk, return NULL.
X */
XEXPORT void *
Xget_block(amount)
X	int	amount;
X{
X	if (buf_wait(amount) < amount)
X		return ((void *)NULL);
X	return ((void *)bigptr);
X}
X
X/*
X * Tell the buffer or the fifo that 'amount' bytes in the buffer/fifo space
X * are ready to be written.
X */
XEXPORT void
Xput_block(amount)
X	int	amount;
X{
X	buf_wake(amount);
X}
X
X/*
X * Write TBLOCK bytes into the buffer/fifo space and tell the buffer/fifo
X * that TBLOCK bytes are ready to be written.
X */
XEXPORT char *
Xwriteblock(buf)
X	char	*buf;
X{
X	char	*obp;
X
X	buf_wait(TBLOCK);
X	obp = bigptr;
X	movetcb((TCB *)buf, (TCB *)bigptr);
X	buf_wake(TBLOCK);
X
X	return (obp);
X}
X
X/*
X * Mid level function to write a tape block (usually 10k)
X * Called from the fifo fill output code and from writebuf().
X */
XEXPORT int
Xwritetape(buf, amount)
X	char	*buf;
X	int	amount;
X{
X	int	cnt;
X	int	err = 0;
X					/* hartes oder weiches EOF ???  */
X					/* d.h. < 0 oder <= 0		*/
X	stats->reading = FALSE;
X	if (multivol && tsize) {
X		Ullong	cursize;
X
X		cursize = stats->blocks * stats->nblocks + stats->parts / TBLOCK;
X
X		if (cursize >= tsize) {	/* tsize= induced change */
X			changetape(TRUE);
X			cnt = startvol(buf, amount);
X			if (cnt > 0)
X				return (cnt);
X		}
X	}
X	seterrno(0);
X	if (nullout) {
X		cnt = amount;
X#ifdef	USE_REMOTE
X	} else if (isremote) {
X		cnt = rmtwrite(remfd, buf, amount);	   /* Handles EINTR */
X#endif
X	} else {
X		cnt = _niwrite(fileno(tarf), buf, amount); /* Handles EINTR */
X	}
X	if (cnt == 0) {
X		err = EFBIG;
X	} else if (cnt < 0) {
X		err = geterrno();
X	}
X
X	if (multivol && (err == EFBIG || err == ENOSPC)) {
X		/*
X		 * QIC tapes (unblocked) may do partial writes at EOT.
X		 * We do the tape change not at the point when we write less
X		 * than a tape block (this may happen on pipes too) but after
X		 * we got a true EOF condition.
X		 */
X		return (-2);
X	}
X	if (multivol && (err == ENXIO)) {
X		/*
X		 * EOF condition on disk devices
X		 */
X		return (-2);
X	}
X
X	if (cnt == stats->blocksize)
X		stats->blocks++;
X	else if (cnt >= 0)
X		stats->parts += cnt;
X
X	if (cnt <= 0)
X		excomerrno(err, "Error writing '%s'.\n", tarfiles[tarfindex]);
X	return (cnt);
X}
X
X/*
X * Write output the buffer if no fifo.
X * Called from buf_wait()
X */
XLOCAL void
Xwritebuf(amount)
X	int	amount;
X{
X	long	cnt;
X
X
Xnextwrite:
X	cnt = writetape(bigbuf, amount);
X
X	if (cnt < amount) {
X		if (cnt == -2) {		/* EOT induced change */
X			changetape(TRUE);
X			if ((cnt = startvol(bigbuf, amount)) <= 0)
X				goto nextwrite;
X		}
X		/*
X		 * QIC tapes (unblocked) may do partial writes at EOT
X		 *
X		 * Even if we hit a "planned" tape change, the fact
X		 * that we need to write a vol header looks from higher
X		 * levels as if there was a partial write.
X		 */
X		bigptr  = &bigbuf[cnt];
X		bigcnt -= cnt;
X		movebytes(bigptr, bigbuf, bigcnt);
X		bigptr  = &bigbuf[bigcnt];
X	} else {
X		bigptr = bigbuf;
X		bigcnt = 0;
X	}
X	stats->old_size = stats->cur_size;
X	stats->old_off  = stats->cur_off;
X}
X
X/*
X * Called only from weof()
X */
XLOCAL void
Xflushbuf()
X{
X#ifdef	FIFO
X	if (!use_fifo)
X#endif
X	{
X		/*
X		 * Loop because a tape change and writing a vol header
X		 * may look like an incomplete write and need a second
X		 * write to really flush the buffer.
X		 */
X		while (bigcnt > 0)
X			writebuf(bigcnt);
X	}
X}
X
X/*
X * Write an empty TBLOCK
X * Called from weof() and cr_file()
X */
XEXPORT void
Xwriteempty()
X{
X	TCB	tb;
X
X	filltcb(&tb);
X	writeblock((char *)&tb);
X}
X
X/*
X * Write a logical TAR EOF (2 empty TBLOCK sized blocks)
X * or a CPIO EOF marker.
X */
XEXPORT void
Xweof()
X{
X	if ((props.pr_flags & PR_CPIO) != 0) {
X		cpio_weof();
X		buf_sync(TBLOCK);
X	} else {
X		writeempty();
X		writeempty();
X	}
X	if (!partial)
X		buf_sync(0);
X	flushbuf();
X}
X
X/*
X * If size == 0, fill the buffer up to a TAPE record (usually 10k),
X * if size != 0, fill the buffer up to size.
X */
XEXPORT void
Xbuf_sync(size)
X	int	size;
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_sync(size);
X	} else
X#endif
X	if (size) {
X		int	amt = 0;
X
X		if ((bigcnt % size) != 0)
X			amt = size - bigcnt%size;
X
X		fillbytes(bigptr, amt, '\0');
X		bigcnt += amt;
X		bigptr += amt;
X	} else {
X		fillbytes(bigptr, bigsize - bigcnt, '\0');
X		bigcnt = bigsize;
X	}
X}
X
X/*
X * Drain the fifo if in fifo mode.
X */
XEXPORT void
Xbuf_drain()
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_oflush();
X		wait(0);
X	}
X#endif
X}
X
X/*
X * Wait until we may put amount bytes into the buffer/fifo.
X * The returned count may be lower. Callers need to be prepared about this.
X */
XEXPORT int
Xbuf_wait(amount)
X	int	amount;
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		return (fifo_iwait(amount));
X	} else
X#endif
X	{
X		if (bigcnt >= bigsize)
X			writebuf(bigsize);
X		return (bigsize - bigcnt);
X	}
X}
X
X/*
X * Tell the buffer/fifo management that amount bytes are ready to be written.
X * The space may now be written to the media and the space may be made
X * avbailable for being filled up again.
X */
XEXPORT void
Xbuf_wake(amount)
X	int	amount;
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_owake(amount);
X	} else
X#endif
X	{
X		bigptr += amount;
X		bigcnt += amount;
X	}
X	if (copyflag) {
X		/*
X		 * In copy mode, there is no blocked read/write from the fifo
X		 * Tape process. For this reason, we increment the byte count
X		 * at this place.
X		 */
X		stats->parts += amount;
X	}
X}
X
X/*
X * Wait until we may read amount bytes from the buffer/fifo.
X * The returned count may be lower. Callers need to be prepared about this.
X */
XEXPORT int
Xbuf_rwait(amount)
X	int	amount;
X{
X	int	cnt;
X
Xagain:
X#ifdef	FIFO
X	if (use_fifo) {
X		cnt = fifo_owait(amount);
X	} else
X#endif
X	{
X		if (bigcnt <= 0)
X			readbuf();
X		cnt = bigcnt;
X	}
X	if (cnt == 0 && multivol) {
X		nextitape();
X		goto again;
X	}
X	return (cnt);
X}
X
X/*
X * Tell the buffer/fifo management that amount bytes are no longer needed for
X * read access. The space may now be filled up with new data from the medium.
X */
XEXPORT void
Xbuf_rwake(amount)
X	int	amount;
X{
X#ifdef	FIFO
X	if (use_fifo) {
X		fifo_iwake(amount);
X	} else
X#endif
X	{
X		bigptr += amount;
X		bigcnt -= amount;
X	}
X}
X
X/*
X * Resume the fifo if the fifo has been blocked after the first read
X * TAPE block (usually 10 k).
X * If the fifo is active, fifo_resume() triggers a shadow call to
X * setprops() in the fifo background process.
X */
XEXPORT void
Xbuf_resume()
X{
Xextern	long	hdrtype;
X	stats->swapflg = swapflg;	/* copy over for fifo process */
X	stats->hdrtype = hdrtype;	/* copy over for fifo process */
X	bigsize = stats->blocksize;	/* copy over for tar process */
X#ifdef	FIFO
X	if (use_fifo)
X		fifo_resume();
X#endif
X}
X
X/*
X * Backspace tape or medium to prepare it for appending to an archive.
X * Note that this currently only handles TAR archives and that even then it
X * will not work if the TAPE recordr size is < 2*TBLOCK (1024 bytes).
X */
XEXPORT void
Xbacktape()
X{
X	Llong	ret;
X	BOOL	istape = FALSE;
X
X	if (debug) {
X		error("Blocks: %lld\n", tblocks());
X		error("filepos: %lld seeking to: %lld bigsize: %d\n",
X		(Llong)mtseek((off_t)0, SEEK_CUR),
X		(Llong)mtseek((off_t)0, SEEK_CUR) - (Llong)stats->lastsize, bigsize);
X	}
X
X	if (mtioctl(MTNOP, 0) >= 0) {
X		istape = TRUE;
X		if (debug)
X			error("Is a tape: BSR 1...\n");
X		ret = mtioctl(MTBSR, 1);
X	} else {
X		if (debug)
X			error("Is a file: lseek()\n");
X		ret = mtseek(-stats->lastsize, SEEK_CUR);
X	}
X	if (ret == (Llong)-1)
X		excomerr("Cannot backspace %s.\n", istape ? "tape":"medium");
X
X	if (stats->lastsize == stats->blocksize)
X		stats->blocks--;
X	else
X		stats->parts -= stats->lastsize;
X}
X
X/*
X * Send an MTIOCTOP call to the file descriptor that is use for the medium.
X */
XEXPORT int
Xmtioctl(cmd, count)
X	int	cmd;
X	int	count;
X{
X	int	ret;
X
X	if (nullout && !(uflag || rflag)) {
X		return (0);
X#ifdef	USE_REMOTE
X	} else if (isremote) {
X		ret = rmtioctl(remfd, cmd, count);
X#endif
X	} else {
X#if	defined(MTIOCTOP) && defined(HAVE_IOCTL)
X		struct mtop mtop;
X
X		mtop.mt_op = cmd;
X		mtop.mt_count = count;
X
X		ret = ioctl(fdown(tarf), MTIOCTOP, &mtop);
X#else
X#ifdef	ENOSYS
X		seterrno(ENOSYS);
X#else
X		seterrno(EINVAL);
X#endif
X		return (-1);
X#endif
X	}
X	if (ret < 0 && debug) {
X		errmsg("Error sending mtioctl(%d, %d) to '%s'.\n",
X					cmd, count, tarfiles[tarfindex]);
X	}
X	return (ret);
X}
X
X/*
X * Make an lseek() call to the file descriptor that is use for the medium.
X */
XEXPORT off_t
Xmtseek(offset, whence)
X	off_t	offset;
X	int	whence;
X{
X	if (nullout && !(uflag || rflag)) {
X		return (0L);
X#ifdef	USE_REMOTE
X	} else if (isremote) {
X		return (rmtseek(remfd, offset, whence));
X#endif
X	} else {
X		return (lseek(fileno(tarf), offset, whence));
X	}
X}
X
X/*
X * Return the current archive block number based on 512 byte (TBLOCK) units.
X */
XEXPORT Llong
Xtblocks()
X{
X	long	fifo_cnt = 0;
X	Llong	ret;
X
X#ifdef	FIFO
X	if (use_fifo)
X		fifo_cnt = fifo_amount()/TBLOCK;
X#endif
X	if (stats->reading)
X		ret = (-fifo_cnt + stats->blocks * stats->nblocks +
X				(stats->parts - (bigcnt+TBLOCK))/TBLOCK);
X	else
X		ret = (fifo_cnt + stats->blocks * stats->nblocks +
X				(stats->parts + bigcnt)/TBLOCK);
X	if (debug) {
X		error("tblocks: %lld blocks: %lld blocksize: %ld parts: %lld bigcnt: %ld fifo_cnt: %ld\n",
X		ret, stats->blocks, stats->blocksize, stats->parts, bigcnt, fifo_cnt);
X	}
X	curblockno = ret;
X	return (ret);
X}
X
XEXPORT void
Xprstats()
X{
X	Llong	bytes;
X	Llong	kbytes;
X	int	per;
X#ifdef	timerclear
X	int	sec;
X	int	usec;
X	int	tmsec;
X#endif
X	char	*p;
X
X#ifdef	FIFO
X	if (use_fifo) {
X		extern	m_head  *mp;
X		p = mp->end;
X	} else
X#endif
X		p = &bigbuf[bigbsize];
X
X	if ((*p != 'U' && *p != ' ') || p[1] != 'U')
X		errmsgno(EX_BAD, "The buffer has been overwritten, please contact the author.\n");
X
X	if (no_stats)
X		return;
X	if (pid == 0)	/* child */
X		return;
X
X#ifdef	timerclear
X	if (showtime && gettimeofday(&stoptime, (struct timezone *)0) < 0)
X		comerr("Cannot get stoptime\n");
X#endif
X#ifdef	FIFO
X	if (use_fifo && do_fifostats)
X		fifo_stats();
X#endif
X
X	bytes = stats->blocks * (Llong)stats->blocksize + stats->parts;
X	kbytes = bytes >> 10;
X	per = ((bytes&1023)<<10)/10485;
X
X	if (cpio_stats) {
X		bytes = stats->Tblocks * (Llong)stats->blocksize + stats->Tparts;
X
X		error("%lld blocks\n", stats->eofblock + 1 + bytes/512);
X		return;
X	}
X
X	errmsgno(EX_BAD,
X		"%lld blocks + %lld bytes (total of %lld bytes = %lld.%02dk).\n",
X		stats->blocks, stats->parts, bytes, kbytes, per);
X
X	if (stats->Tblocks + stats->Tparts) {
X		bytes = (stats->blocks + stats->Tblocks) *
X						(Llong)stats->blocksize +
X						(stats->parts + stats->Tparts);
X		kbytes = bytes >> 10;
X		per = ((bytes&1023)<<10)/10485;
X
X		errmsgno(EX_BAD,
X		"Total %lld blocks + %lld bytes (total of %lld bytes = %lld.%02dk).\n",
X		stats->blocks + stats->Tblocks,
X		stats->parts + stats->Tparts,
X		bytes, kbytes, per);
X	}
X#ifdef	timerclear
X	if (showtime) {
X		Llong	kbs;
X
X		sec = stoptime.tv_sec - starttime.tv_sec;
X		usec = stoptime.tv_usec - starttime.tv_usec;
X		tmsec = sec*1000 + usec/1000;
X		if (usec < 0) {
X			sec--;
X			usec += 1000000;
X		}
X		if (tmsec == 0)
X			tmsec++;
X
X		kbs = kbytes*(Llong)1000/tmsec;
X
X		errmsgno(EX_BAD, "Total time %d.%03dsec (%lld kBytes/sec)\n",
X				sec, usec/1000, kbs);
X	}
X#endif
X}
X
XEXPORT BOOL
Xcheckerrs()
X{
X	if (xstats.s_staterrs	||
X#ifdef	USE_ACL
X	    xstats.s_getaclerrs	||
X#endif
X	    xstats.s_openerrs	||
X	    xstats.s_rwerrs	||
X	    xstats.s_misslinks	||
X	    xstats.s_toolong	||
X	    xstats.s_toobig	||
X	    xstats.s_isspecial	||
X	    xstats.s_sizeerrs	||
X	    xstats.s_chdir	||
X
X	    xstats.s_settime	||
X	    xstats.s_security	||
X	    xstats.s_lsecurity	||
X	    xstats.s_samefile	||
X#ifdef	USE_ACL
X	    xstats.s_badacl	||
X	    xstats.s_setacl	||
X#endif
X#ifdef USE_XATTR
X	    xstats.s_getxattr	||
X	    xstats.s_setxattr	||
X#endif
X	    xstats.s_setmodes	||
X	    xstats.s_restore) {
X		if (nowarn || no_stats || (pid == 0) /* child */)
X			return (TRUE);
X
X		errmsgno(EX_BAD, "The following problems occurred during archive processing:\n");
X		errmsgno(EX_BAD, "Cannot: stat %d, open %d, read/write %d, chdir %d. Size changed %d.\n",
X				xstats.s_staterrs,
X				xstats.s_openerrs,
X				xstats.s_rwerrs,
X				xstats.s_chdir,
X				xstats.s_sizeerrs);
X		errmsgno(EX_BAD, "Missing links %d, Name too long %d, File too big %d, Not dumped %d.\n",
X				xstats.s_misslinks,
X				xstats.s_toolong,
X				xstats.s_toobig,
X				xstats.s_isspecial);
X		if (xstats.s_settime || xstats.s_setmodes)
X			errmsgno(EX_BAD, "Cannot set: time %d, modes %d.\n",
X				xstats.s_settime,
X				xstats.s_setmodes);
X		if (xstats.s_security || xstats.s_lsecurity)
X			errmsgno(EX_BAD, "Skipped for security reason: path name %d, link name %d.\n",
X				xstats.s_security, xstats.s_lsecurity);
X		if (xstats.s_samefile)
X			errmsgno(EX_BAD, "Skipped same file %d.\n",
X				xstats.s_samefile);
X#ifdef	USE_ACL
X		if (xstats.s_getaclerrs || xstats.s_badacl || xstats.s_setacl)
X			errmsgno(EX_BAD, "Cannot get ACL: %d set ACL: %d. Bad ACL %d.\n",
X				xstats.s_getaclerrs,
X				xstats.s_setacl,
X				xstats.s_badacl);
X#endif
X#ifdef USE_XATTR
X		if (xstats.s_getxattr || xstats.s_setxattr)
X			errmsgno(EX_BAD, "Cannot get xattr: %d set xattr: %d.\n",
X				xstats.s_getxattr,
X				xstats.s_setxattr);
X#endif
X		if (xstats.s_restore)
X			errmsgno(EX_BAD, "Problems with restore database.\n");
X		return (TRUE);
X	}
X	return (FALSE);
X}
X
XEXPORT void
Xexprstats(ret)
X	int	ret;
X{
X	prstats();
X	checkerrs();
X	exit(ret);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT void
Xexcomerrno(int err, char *fmt, ...)
X#else
XEXPORT void
Xexcomerrno(err, fmt, va_alist)
X	int	err;
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	errmsgno(err, "%r", fmt, args);
X	va_end(args);
X#ifdef	FIFO
X	fifo_exit(err);
X#endif
X	exprstats(err);
X	/* NOTREACHED */
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT void
Xexcomerr(char *fmt, ...)
X#else
XEXPORT void
Xexcomerr(fmt, va_alist)
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	err = geterrno();
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	errmsgno(err, "%r", fmt, args);
X	va_end(args);
X#ifdef	FIFO
X	fifo_exit(err);
X#endif
X	exprstats(err);
X	/* NOTREACHED */
X}
X
XEXPORT void
Xdie(err)
X	int	err;
X{
X	excomerrno(err, "Cannot recover from error - exiting.\n");
X}
X
X/*
X * Quick hack to implement a -z flag. May be changed soon.
X */
X#include <schily/signal.h>
X#if	defined(SIGDEFER) || defined(SVR4)
X#define	signal	sigset
X#endif
XLOCAL void
Xcompressopen()
X{
X#ifdef	HAVE_FORK
X	FILE	*pp[2];
X	int	mypid;
X	char	*zip_prog = "gzip";
X
X	if (compress_prg)
X		zip_prog = compress_prg;
X	else if (bzflag)
X		zip_prog = "bzip2";
X	else if (Zflag)
X		zip_prog = "compress";
X	else if (lzoflag)
X		zip_prog = "lzop";
X	else if (p7zflag)
X		zip_prog = "p7zip";
X	else if (xzflag)
X		zip_prog = "xz";
X	else if (lzipflag)
X		zip_prog = "lzip";
X
X	multblk = TRUE;
X
X	if (cflag && (uflag || rflag))
X		comerrno(EX_BAD, "Cannot update compressed archives.\n");
X
X#ifdef __DJGPP__
X	if (cflag) {
X		/*
X		 * We try to emulate a command line like:
X		 *
X		 *	"star -c dir | %s > dir.tar.%s\n",
X		 *	zip_prog,
X		 *	Zflag?"Z":bzflag?"bz2":compress_prg?compress_prg:"gz");
X		 *
X		 * If we would use popen() instead, DJGPP will run the program
X		 * from popen() first, so there would
X		 * be no data from the "tarf" File pointer.
X		 * We use the temporary file instead.
X		 */
X		if ((compress_tmpf = tmpfile()) == NULL)
X			comerr("Compress pipe failed\n");
X		compress_tarf_save = tarf;
X		tarf = compress_tmpf;
X
X	} else {
X		int	stdin_save;
X		char	zip_cmd[256];
X
X		/*
X		 * We try to emulate a command line like:
X		 *
X		 *	"%s -d < archive.tar.%s | star -x\n",
X		 *	zip_prog,
X		 *	Zflag?"Z":bzflag?"bz2":compress_prg?compress_prg:"gz");
X		 */
X		js_snprintf(zip_cmd, sizeof (zip_cmd), "%s.exe -d", zip_prog);
X
X		stdin_save = dup(STDIN_FILENO);
X		dup2(fileno(tarf), STDIN_FILENO);
X		compress_tarf_save = tarf;
X		if ((tarf = popen(zip_cmd, "rb")) == NULL)
X			comerr("Compress pipe failed\n");
X		dup2(stdin_save, STDIN_FILENO);
X		fclose(compress_tarf_save);
X	}
X#else
X	if (fpipe(pp) == 0)
X		comerr("Compress pipe failed\n");
X	mypid = fork();
X	if (mypid < 0)
X		comerr("Compress fork failed\n");
X	if (mypid == 0) {
X		FILE	*null;
X		char	*flg = getenv("STAR_COMPRESS_FLAG"); /* Temporary ? */
X
X		signal(SIGQUIT, SIG_IGN);
X		if (cflag)
X			fclose(pp[1]);
X		else
X			fclose(pp[0]);
X
X#ifdef	NEED_O_BINARY
X		if (cflag)
X			setmode(fileno(pp[0]), O_BINARY);
X		else
X			setmode(fileno(pp[1]), O_BINARY);
X#endif
X
X		/* We don't want to see errors */
X		null = fileopen("/dev/null", "rw");
X
X		if (cflag)
X			fexecl(zip_prog, pp[0], tarf, null, zip_prog, flg, (char *)NULL);
X		else
X			fexecl(zip_prog, tarf, pp[1], null, zip_prog, "-d", (char *)NULL);
X		errmsg("Compress: exec of '%s' failed\n", zip_prog);
X		_exit(-1);
X	}
X	fclose(tarf);
X	if (cflag) {
X		tarf = pp[1];
X		fclose(pp[0]);
X	} else {
X		tarf = pp[0];
X		fclose(pp[1]);
X	}
X	setmode(fileno(tarf), O_BINARY);
X#endif /* !__DJGPP__ */
X#else  /* !HAVE_FORK */
X	comerrno(EX_BAD, "Inline compression not available.\n");
X#endif
X}
X
XLOCAL void
Xcompressclose()
X{
X#ifdef HAVE_FORK
X	char	*zip_prog = "gzip";
X
X	if (compress_prg)
X		zip_prog = compress_prg;
X	else if (bzflag)
X		zip_prog = "bzip2";
X	else if (Zflag)
X		zip_prog = "compress";
X	else if (lzoflag)
X		zip_prog = "lzop";
X	else if (p7zflag)
X		zip_prog = "p7zip";
X	else if (xzflag)
X		zip_prog = "xz";
X	else if (lzipflag)
X		zip_prog = "lzip";
X
X#ifdef __DJGPP__
X	if (cflag) {
X		if (compress_tmpf) {
X			char	zip_cmd[256];
X			FILE	*zipf;
X			int	cnt = -1;
X			char	buf[8192];
X
X			js_snprintf(zip_cmd, sizeof (zip_cmd), "%s.exe", zip_prog);
X
X			dup2(fileno(compress_tarf_save), STDOUT_FILENO);
X
X			if ((zipf = popen(zip_cmd, "wb")) == NULL)
X				comerr("Compress pipe failed\n");
X
X			fseek(compress_tmpf, 0l, SEEK_SET);
X
X			while ((cnt = ffileread(compress_tmpf, buf, sizeof (buf))) > 0)
X				ffilewrite(zipf, buf, cnt);
X
X			pclose(zipf);
X			fclose(compress_tmpf);
X			compress_tmpf = (FILE *)NULL;
X		}
X
X	} else {
X		pclose(tarf);
X	}
X#endif
X#endif
X}
END-of-star-1.5.2/star/buffer.c
echo x - star-1.5.2/star/chdir.c
sed 's/^X//' >star-1.5.2/star/chdir.c << 'END-of-star-1.5.2/star/chdir.c'
X/* @(#)chdir.c	1.7 09/07/11 Copyright 1997-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)chdir.c	1.7 09/07/11 Copyright 1997-2009 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1997-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include "star.h"
X#include "starsubs.h"
X#include "checkerr.h"
X
X#include <schily/dirent.h>
X#include <schily/maxpath.h>
X#include <schily/getcwd.h>
X
XEXPORT	char	*dogetwdir	__PR((void));
XEXPORT	BOOL	dochdir		__PR((const char *dir, BOOL doexit));
X
Xextern	BOOL	debug;		/* -debug has been specified	*/
X
XEXPORT char *
Xdogetwdir()
X{
X	char	dir[PATH_MAX+1];
X	char	*ndir;
X
X/* XXX MAXPATHNAME vs. PATH_MAX ??? */
X
X	if (getcwd(dir, PATH_MAX) == NULL)
X		comerr("Cannot get working directory\n");
X	ndir = ___malloc(strlen(dir)+1, "working dir");
X	strcpy(ndir, dir);
X	return (ndir);
X}
X
XEXPORT BOOL
Xdochdir(dir, doexit)
X	const char	*dir;
X	BOOL		doexit;
X{
X	if (debug) /* temporary */
X		error("dochdir(%s) = ", dir);
X
X	if (chdir(dir) < 0) {
X		int	ex = geterrno();
X
X		if (debug) /* temporary */
X			error("%d\n", ex);
X
X		if (!errhidden(E_CHDIR, dir)) {
X			if (!errwarnonly(E_CHDIR, dir))
X				xstats.s_chdir++;
X			errmsg("Cannot change directory to '%s'.\n", dir);
X			(void) errabort(E_CHDIR, dir, TRUE);
X		}
X		if (doexit)
X			exit(ex);
X		return (FALSE);
X	}
X	if (debug) /* temporary */
X		error("%d\n", 0);
X
X	return (TRUE);
X}
END-of-star-1.5.2/star/chdir.c
echo x - star-1.5.2/star/create.dgux.patch
sed 's/^X//' >star-1.5.2/star/create.dgux.patch << 'END-of-star-1.5.2/star/create.dgux.patch'
X*** create.c.orig	Sat Jun 14 15:53:45 1997
X--- create.c	Sun Jun 15 18:38:08 1997
X***************
X*** 35,40 ****
X--- 35,101 ----
X  #include <strdefs.h>
X  #include "starsubs.h"
X  
X+ #if defined(DGUX) && !defined(NO_DG_FILEREAD)
X+ 
X+ #include <fcntl.h>
X+ #include <sys/dg_unbuffered_io.h>
X+ 
X+ LOCAL	FILE	*dg_fileopen	__PR((FINFO *info));
X+ LOCAL	int	dg_fileclose	__PR((FILE *fp));
X+ LOCAL	int	dg_fileread	__PR((FILE *f, char *bp, int cnd));
X+ 
X+ FILE *dg_fileopen(info)
X+ 	FINFO	*info;
X+ {
X+ 	static	FILE	__f;
X+ 	int	f;
X+ 
X+ 	if ((f = open(info->f_name, O_DG_UNBUFFERED)) < 0)
X+ 		return ((FILE *)0);
X+ 
X+ 	__f._file = f;
X+ 	__f._cnt = 0;
X+ 	__f._ptr = info->f_rsize;
X+ 	return (&__f);
X+ }
X+ 
X+ int dg_fileclose(fp)
X+ 	FILE	*fp;
X+ {
X+ 	return (close(fp->_file));
X+ }
X+ 
X+ int dg_fileread(fp, bp, cnt)
X+ 	FILE	*fp;
X+ 	char	*bp;
X+ 	int	cnt;
X+ {
X+ 	int	n;
X+ 
X+ again:
X+ 	n = dg_unbuffered_read(fp->_file, bp, fp->_cnt, cnt/512);
X+ 	if (n < 0) {
X+ 		if (geterrno() == EINTR)
X+ 			goto again;
X+ 		return (-1);
X+ 	}
X+ 	if (n == 0)
X+ 		return (0);
X+ 
X+ 	fp->_cnt += n;
X+ 	if (fp->_cnt == tarblocks((int)fp->_ptr)) {
X+ 		if ((((int)fp->_ptr) % 512) == 0)
X+ 			return (n * 512);
X+ 
X+ 		n -= 1;
X+ 		n *= 512;
X+ 		n += ((int)fp->_ptr) % 512;
X+ 		return (n);
X+ 	}
X+ 	return (n * 512);
X+ }
X+ #endif
X+ 
X  typedef	struct	links {
X  	struct	links	*l_next;
X  		long	l_ino;
X***************
X*** 227,232 ****
X--- 288,296 ----
X  	else if (is_symlink(info) && !read_symlink(name, info, ptb))
X  		;
X  	else if (is_file(info) && info->f_size != 0 && !nullout &&
X+ #if defined(DGUX) && !defined(NO_DG_FILEREAD)
X+ 				(f = dg_fileopen(info)) == (FILE *)NULL) {
X+ #else
X  #ifdef	OLD_OPEN
X  				(f = fileopen(name,"ru")) == (FILE *)NULL) {
X  #else
X***************
X*** 236,241 ****
X--- 300,306 ----
X  				 */
X  				(f = fileopen(name,"r")) == (FILE *)NULL) {
X  #endif
X+ #endif
X  		errmsg("Cannot open '%s'.\n", name);
X  	} else {
X  		if (info->f_nlink > 1 && read_link(name, namlen, info, ptb))
X***************
X*** 280,286 ****
X--- 345,355 ----
X  		if (acctime && f != NULL)
X  			rs_acctime(f, info);
X  		if (f)
X+ #if defined(DGUX) && !defined(NO_DG_FILEREAD)
X+ 			dg_fileclose(f);
X+ #else
X  			fclose(f);
X+ #endif
X  	}
X  }
X  
X***************
X*** 421,428 ****
X--- 490,502 ----
X  		cr_file(info, (int(*)__PR((void *, char *, int)))nullread,
X  							f, 0, "reading");
X  	} else {
X+ #if defined(DGUX) && !defined(NO_DG_FILEREAD)
X+ 		cr_file(info, (int(*)__PR((void *, char *, int)))dg_fileread,
X+ 							f, 0, "reading");
X+ #else
X  		cr_file(info, (int(*)__PR((void *, char *, int)))ffileread,
X  							f, 0, "reading");
X+ #endif
X  	}
X  }
X  
END-of-star-1.5.2/star/create.dgux.patch
echo x - star-1.5.2/star/checkerr.c
sed 's/^X//' >star-1.5.2/star/checkerr.c << 'END-of-star-1.5.2/star/checkerr.c'
X/* @(#)checkerr.c	1.24 09/07/11 Copyright 2003-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)checkerr.c	1.24 09/07/11 Copyright 2003-2009 J. Schilling";
X#endif
X/*
X *	Error control for star.
X *
X *	Copyright (c) 2003-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/patmatch.h>
X#include <schily/string.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
X#include "starsubs.h"
X#include "checkerr.h"
X
Xtypedef struct errconf {
X	struct errconf	*ec_next;	/* Next in list			    */
X	const	Uchar	*ec_pat;	/* File name pattern		    */
X	int		*ec_aux;	/* Aux array from pattern compiler  */
X	int		ec_alt;		/* Alt return from pattern compiler */
X	int		ec_plen;	/* String length of pattern	    */
X	UInt32_t	ec_flags;	/* Error condition flags	    */
X} ec_t;
X
XLOCAL	int	*ec_state;		/* State array for pattern compiler */
XLOCAL	ec_t	*ec_root;		/* Root node of error config list   */
XLOCAL	ec_t	**ec_last = &ec_root;	/* Last pointer in root node list   */
XLOCAL	int	maxplen;
X
XEXPORT	int	errconfig	__PR((char *name));
XLOCAL	char	*_endword	__PR((char *p));
XLOCAL	void	parse_errctl	__PR((char *line));
XLOCAL	UInt32_t errflags	__PR((char *eflag, BOOL doexit));
XLOCAL	ec_t	*_errptr	__PR((int etype, const char *fname));
XEXPORT	BOOL	errhidden	__PR((int etype, const char *fname));
XEXPORT	BOOL	errwarnonly	__PR((int etype, const char *fname));
XEXPORT	BOOL	errabort	__PR((int etype, const char *fname, BOOL doexit));
X
X/*
X * Read and parse error configuration file
X */
XEXPORT int
Xerrconfig(name)
X	char	*name;
X{
X	char	line[8192];
X	FILE	*f;
X	int	omaxplen = maxplen;
X
X	if ((f = fileopen(name, "r")) == NULL) {
X		if (errflags(name, FALSE) != 0)
X			parse_errctl(name);
X		else
X			comerr("Cannot open '%s'.\n", name);
X	} else {
X		while (fgetline(f, line, sizeof (line)) >= 0) {
X			parse_errctl(line);
X		}
X		fclose(f);
X	}
X	if (maxplen > omaxplen) {
X		ec_state = ___realloc(ec_state, (maxplen+1)*sizeof (int),
X							"pattern state");
X	}
X	return (1);
X}
X
XLOCAL char *
X_endword(p)
X	char	*p;
X{
X	/*
X	 * Find end of word.
X	 */
X	for (;  *p != '\0' &&
X		*p != '\t' &&
X		*p != ' ';
X				p++) {
X		;
X		/* LINTED */
X	}
X	return (p);
X}
X
XLOCAL void
Xparse_errctl(line)
X	char	*line;
X{
X	int	plen;
X	char	*pattern;
X	ec_t	*ep;
X
X	/*
X	 * Find end of word.
X	 */
X	pattern = _endword(line);
X
X	if (pattern == line || *pattern == '\0') {
X		comerrno(EX_BAD,
X		"Bad error configuration line '%s'.\n", line);
X	}
X	/*
X	 * Find end of white space after word.
X	 */
X	for (pattern++; *pattern != '\0' &&
X	    (*pattern == '\t' || *pattern == ' ');
X				pattern++) {
X		;
X		/* LINTED */
X	}
X	ep = ___malloc(sizeof (ec_t), "errcheck node");
X	ep->ec_flags = errflags(line, TRUE);
X	ep->ec_plen = plen = strlen(pattern);
X	if (ep->ec_plen > maxplen)
X		maxplen = ep->ec_plen;
X	ep->ec_pat = (const Uchar *)___savestr(pattern);
X	ep->ec_aux = ___malloc(plen*sizeof (int), "compiled pattern");
X	if ((ep->ec_alt = patcompile((const Uchar *)pattern,
X						plen, ep->ec_aux)) == 0)
X		comerrno(EX_BAD, "Bad errctl pattern: '%s'.\n", pattern);
X
X	ep->ec_next = NULL;
X	*ec_last = ep;
X	ec_last = &ep->ec_next;
X}
X
XLOCAL struct eflags {
X	char	*fname;
X	UInt32_t fval;
X} eflags[] = {
X	{ "STAT",		E_STAT },
X	{ "GETACL",		E_GETACL },
X	{ "OPEN",		E_OPEN },
X	{ "READ",		E_READ },
X	{ "WRITE",		E_WRITE },
X	{ "GROW",		E_GROW },
X	{ "SHRINK",		E_SHRINK },
X	{ "MISSLINK",		E_MISSLINK },
X	{ "NAMETOOLONG",	E_NAMETOOLONG },
X	{ "FILETOOBIG",		E_FILETOOBIG },
X	{ "SPECIALFILE",	E_SPECIALFILE },
X	{ "READLINK",		E_READLINK },
X	{ "GETXATTR",		E_GETXATTR },
X	{ "CHDIR",		E_CHDIR },
X
X	{ "SETTIME",		E_SETTIME },
X	{ "SETMODE",		E_SETMODE },
X	{ "SECURITY",		E_SECURITY },
X	{ "LSECURITY",		E_LSECURITY },
X	{ "SAMEFILE",		E_SAMEFILE },
X	{ "BADACL",		E_BADACL },
X	{ "SETACL",		E_SETACL },
X	{ "SETXATTR",		E_SETXATTR },
X
X	{ "ALL",		E_ALL },
X
X	{ "DIFF",		E_DIFF },
X	{ "WARN",		E_WARN },
X	{ "ABORT",		E_ABORT },
X
X	{ NULL,			0 }
X};
X
X/*
X * Convert error condition string into flag word
X */
XLOCAL UInt32_t
Xerrflags(eflag, doexit)
X	char	*eflag;
X	BOOL	doexit;
X{
X	register char		*p = eflag;
X		char		*ef = _endword(eflag);
X	register struct eflags	*ep;
X	register int		slen;
X	register UInt32_t	nflags = 0;
X
X	do {
X		for (ep = eflags; ep->fname; ep++) {
X			slen = strlen(ep->fname);
X			if ((strncmp(ep->fname, p, slen) == 0) &&
X			    (p[slen] == '|' || p[slen] == ' ' ||
X			    p[slen] == '\0')) {
X				nflags |= ep->fval;
X				break;
X			}
X		}
X		if (ep->fname == NULL) {
X			if (doexit)
X				comerrno(EX_BAD, "Bad flag '%s'\n", p);
X			return (0);
X		}
X		p = strchr(p, '|');
X	} while (p < ef && p && *p++ == '|');
X
X	if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
X		if (doexit)
X			comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
X		return (0);
X	}
X	return (nflags);
X}
X
XLOCAL ec_t *
X_errptr(etype, fname)
X		int	etype;
X	const	char	*fname;
X{
X	ec_t		*ep = ec_root;
X	char		*ret;
X	const Uchar	*name = (const Uchar *)fname;
X	int		nlen;
X
X	if (fname == NULL) {
X		errmsgno(EX_BAD,
X			"Implementation botch for errhidden(0x%X, NULL)\n",
X			etype);
X		errmsgno(EX_BAD, "Please report this bug!\n");
X		errmsgno(EX_BAD, "Error cannot be ignored.\n");
X		return ((ec_t *)NULL);
X	}
X	nlen  = strlen(fname);
X	while (ep) {
X		if ((ep->ec_flags & etype) != 0) {
X			ret = (char *)patmatch(ep->ec_pat, ep->ec_aux,
X					name, 0,
X					nlen, ep->ec_alt, ec_state);
X			if (ret != NULL && *ret == '\0')
X				return (ep);
X		}
X		ep = ep->ec_next;
X	}
X	return ((ec_t *)NULL);
X}
X
X/*
X * Check whether error condition should be ignored for file name.
X */
XEXPORT BOOL
Xerrhidden(etype, fname)
X		int	etype;
X	const	char	*fname;
X{
X	ec_t		*ep;
X
X	if ((ep = _errptr(etype, fname)) != NULL) {
X		if ((ep->ec_flags & (E_ABORT|E_WARN)) != 0)
X			return (FALSE);
X		return (TRUE);
X	}
X	return (FALSE);
X}
X
X/*
X * Check whether error condition should not affect exit code for file name.
X */
XEXPORT BOOL
Xerrwarnonly(etype, fname)
X		int	etype;
X	const	char	*fname;
X{
X	ec_t		*ep;
X
X	if ((ep = _errptr(etype, fname)) != NULL) {
X		if ((ep->ec_flags & E_WARN) != 0)
X			return (TRUE);
X		return (FALSE);
X	}
X	return (FALSE);
X}
X
X/*
X * Check whether error condition should be fatal for file name.
X */
XEXPORT BOOL
Xerrabort(etype, fname, doexit)
X		int	etype;
X	const	char	*fname;
X		BOOL	doexit;
X{
X	ec_t	*ep;
Xextern	BOOL	cflag;
Xextern	BOOL	errflag;
Xextern	int	intr;
X
X	if ((ep = _errptr(etype, fname)) == NULL) {
X		if (!errflag)
X			return (FALSE);
X	} else if ((ep->ec_flags & E_ABORT) == 0)
X		return (FALSE);
X
X	if (doexit) {
X		errmsgno(EX_BAD, "Error is considered fatal, aborting.\n");
X		if (cflag) {
X			intr++;
X		} else {
X			prstats();
X			comexit(-3);
X		}
X	}
X	return (TRUE);
X}
END-of-star-1.5.2/star/checkerr.c
echo x - star-1.5.2/star/checkerr.h
sed 's/^X//' >star-1.5.2/star/checkerr.h << 'END-of-star-1.5.2/star/checkerr.h'
X/* @(#)checkerr.h	1.12 12/11/13 Copyright 2003-2012 J. Schilling */
X/*
X *	Error control for star.
X *
X *	Copyright (c) 2003-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_CHECKERR_H
X#define	_CHECKERR_H
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Error conditions handled by error control.
X */
X#define	E_STAT		0x0001		/* Could not stat(2) file	   */
X#define	E_GETACL	0x0002		/* Could not retrieve ACL info	   */
X#define	E_OPEN		0x0004		/* Could not open file		   */
X#define	E_READ		0x0008		/* Could not read file		   */
X#define	E_WRITE		0x0010		/* Could not write file		   */
X#define	E_GROW		0x0020		/* File did grow during backup	   */
X#define	E_SHRINK	0x0040		/* File did shrink during backup   */
X#define	E_MISSLINK	0x0080		/* Missing hard link(s) for file   */
X#define	E_NAMETOOLONG	0x0100		/* File name too long for archive  */
X#define	E_FILETOOBIG	0x0200		/* File too big for archive	   */
X#define	E_SPECIALFILE	0x0400		/* Improper file type for archive  */
X#define	E_READLINK	0x0800		/* Could not read symbolic link	   */
X#define	E_GETXATTR	0x1000		/* Could not get xattr		   */
X#define	E_CHDIR		0x2000		/* Could not chdir()		   */
X
X/*
X * Currently unused: 0x4000 .. 0x8000
X */
X
X#define	E_SETTIME	0x10000		/* Could not set file times	   */
X#define	E_SETMODE	0x20000		/* Could not set access modes	   */
X#define	E_SECURITY	0x40000		/* Skipped for security reasons	   */
X#define	E_LSECURITY	0x80000		/* Link skipped for security	   */
X#define	E_SAMEFILE	0x100000	/* Skipped from/to identical	   */
X#define	E_BADACL	0x200000	/* ACL string conversion error	   */
X#define	E_SETACL	0x400000	/* Could not set ACL for file	   */
X#define	E_SETXATTR	0x800000	/* Could not set xattr		   */
X
X/*
X * Currently unused: 0x1000000 .. 0x8000000
X */
X
X#define	E_DIFF		0x10000000	/* Diffs encountered		   */
X#define	E_WARN		0x20000000	/* Print this error but do exit(0) */
X#define	E_ABORT		0x40000000	/* Abort on this error		   */
X#define	E_EXT		0x80000000	/* Extended (TBD later)		   */
X
X#define	E_ALL		(~(UInt32_t)(E_DIFF|E_ABORT))
X
Xextern	int	errconfig	__PR((char *name));
Xextern	BOOL	errhidden	__PR((int etype, const char *fname));
Xextern	BOOL	errwarnonly	__PR((int etype, const char *fname));
Xextern	BOOL	errabort	__PR((int etype, const char *fname,
X					BOOL doexit));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _CHECKERR_H */
END-of-star-1.5.2/star/checkerr.h
echo x - star-1.5.2/star/diff.c
sed 's/^X//' >star-1.5.2/star/diff.c << 'END-of-star-1.5.2/star/diff.c'
X/* @(#)diff.c	1.87 10/08/23 Copyright 1993-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)diff.c	1.87 10/08/23 Copyright 1993-2010 J. Schilling";
X#endif
X/*
X *	List differences between a (tape) archive and
X *	the filesystem
X *
X *	Copyright (c) 1993-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/fcntl.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include "diff.h"
X#include <schily/schily.h>
X#include <schily/dirent.h>	/* XXX Wegen S_IFLNK */
X#include "starsubs.h"
X#include "checkerr.h"
X#include <schily/fetchdir.h>
X#ifdef	USE_FIND
X#include <schily/walk.h>
X#endif
X
Xtypedef	struct {
X	FILE	*cmp_file;
X	char	*cmp_buf;
X	int	cmp_diffs;
X} cmp_t;
X
Xextern	FILE	*tarf;
Xextern	char	*listfile;
Xextern	int	version;
X
Xextern	long	bigcnt;
Xextern	int	bigsize;
Xextern	char	*bigptr;
X
Xextern	BOOL	havepat;
Xextern	long	hdrtype;
Xextern	BOOL	debug;
Xextern	BOOL	no_stats;
Xextern	BOOL	abs_path;
Xextern	int	verbose;
Xextern	BOOL	tpath;
Xextern	BOOL	interactive;
X
X#ifdef USE_ACL
Xextern	BOOL	doacl;
X#else
X#define	doacl	FALSE
X#endif
X#ifdef USE_XATTR
Xextern	BOOL	doxattr;
X#else
X#define	doxattr	FALSE
X#endif
X#ifdef USE_FFLAGS
Xextern	BOOL	dofflags;
X#endif
X
X#ifdef	USE_FIND
Xextern	BOOL	dofind;
X#endif
X
XEXPORT	void	diff		__PR((void));
XLOCAL	void	diff_tcb	__PR((FINFO *info));
XLOCAL	BOOL	linkeql		__PR((char *n1, char *n2));
XLOCAL	BOOL	patheql		__PR((char *n1, char *n2));
XLOCAL	BOOL	dirdiffs	__PR((FILE *f, FINFO *info));
XLOCAL	int	cmp_func	__PR((cmp_t *cmp, char *p, int amount));
XLOCAL	BOOL	cmp_file	__PR((FINFO *info));
XEXPORT	void	prdiffopts	__PR((FILE *f, char *label, int flags));
XLOCAL	void	prdopt		__PR((FILE *f, char *name, int printed));
X
XEXPORT void
Xdiff()
X{
X#ifdef	USE_FIND
Xextern	struct WALK walkstate;
X#endif
X		FINFO	finfo;
X		TCB	tb;
X		char	name[PATH_MAX+1];
X		char	lname[PATH_MAX+1];
X	register TCB 	*ptb = &tb;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X
X	finfo.f_tcb = ptb;
X
X	/*
X	 * We first have to read a control block to know what type of
X	 * tar archive we are reading from.
X	 */
X	if (get_tcb(ptb) == EOF)
X		return;
X
X	diffopts &= ~props.pr_diffmask;
X	if (!no_stats)
X		prdiffopts(stderr, "diffopts=", diffopts);
X
X#ifdef	USE_FIND
X	if (dofind) {
X		walkopen(&walkstate);
X		walkgethome(&walkstate);	/* Needed in case we chdir */
X	}
X#endif
X	for (;;) {
X		finfo.f_name = name;
X		finfo.f_lname = lname;
X		if (tcb_to_info(ptb, &finfo) == EOF)
X			break;
X#ifdef	USE_FIND
X		if (dofind && !findinfo(&finfo)) {
X			void_file(&finfo);
X			goto cont;
X		}
X#endif
X
X		if (listfile && !hash_lookup(finfo.f_name)) {
X			void_file(&finfo);
X			goto cont;
X		}
X		if (hash_xlookup(finfo.f_name)) {
X			void_file(&finfo);
X			goto cont;
X		}
X		if (havepat && !match(finfo.f_name)) {
X			void_file(&finfo);
X			goto cont;
X		}
X		diff_tcb(&finfo);
X	cont:
X		if (get_tcb(ptb) == EOF)
X			break;
X	}
X#ifdef	USE_FIND
X	if (dofind) {
X		walkhome(&walkstate);
X		walkclose(&walkstate);
X		free(walkstate.twprivate);
X	}
X#endif
X}
X
XLOCAL void
Xdiff_tcb(info)
X	register FINFO	*info;
X{
X		char	lname[PATH_MAX+1];
X		TCB	tb;
X		FINFO	finfo;
X		FINFO	linfo;
X		FILE	*f;
X		int	diffs = 0;
X		BOOL	do_void = FALSE;	/* Make GCC happy */
X
X	f = tarf == stdout ? stderr : stdout; /* XXX FILE *vpr is the same */
X
X	finfo.f_lname = lname;
X	finfo.f_lnamelen = 0;
X
X	if (!abs_path &&	/* XXX VVV siehe skip_slash() */
X	    (info->f_name[0] == '/' /* || info->f_lname[0] == '/' */))
X		skip_slash(info);
X
X	if (is_volhdr(info)) {
X		void_file(info);
X		return;
X	}
X	/*
X	 * Use getinfo() if we like to compare ACLs/xattr too.
X	 */
X	if (((doacl || doxattr)? !getinfo(info->f_name, &finfo):
X				!_getinfo(info->f_name, &finfo))) {
X		if (!errhidden(E_STAT, info->f_name)) {
X			if (!errwarnonly(E_STAT, info->f_name))
X				xstats.s_staterrs++;
X			errmsg("Cannot stat '%s'.\n", info->f_name);
X			(void) errabort(E_STAT, info->f_name, TRUE);
X		}
X		void_file(info);
X		return;
X	}
X	/*
X	 * We cannot compare the link count if this is a CPIO archive
X	 * and the link count is < 2. Even if the link count is >= 2, it
X	 * may not be exact.
X	 */
X	if ((props.pr_flags & PR_CPIO) && info->f_nlink < 2)
X		info->f_nlink = 0;
X	if (info->f_nlink == 0)		/* If archive has no link counts    */
X		finfo.f_nlink = 0;	/* always suppress nlink in listing. */
X
X	fillbytes(&tb, sizeof (TCB), '\0');
X
X	info_to_tcb(&finfo, &tb);	/* XXX ist das noch nötig ??? */
X					/* z.Zt. wegen linkflag/uname/gname */
X
X	if ((diffopts & D_PERM) &&
X			(info->f_mode & 07777) != (finfo.f_mode & 07777)) {
X		if ((diffopts & D_SYMPERM) != 0 || !is_symlink(&finfo))
X			diffs |= D_PERM;
X	/*
X	 * XXX Diff ACLs not yet implemented.
X	 */
X
X	}
X
X	if ((diffopts & D_NLINK) && info->f_nlink > 0 &&
X			info->f_nlink != finfo.f_nlink) {
X		diffs |= D_NLINK;
X	}
X
X	if ((diffopts & D_UID) && info->f_uid != finfo.f_uid) {
X		diffs |= D_UID;
X	}
X	if ((diffopts & D_GID) && info->f_gid != finfo.f_gid) {
X		diffs |= D_GID;
X	}
X	if ((diffopts & D_UNAME) && info->f_uname && finfo.f_uname) {
X		if (!streql(info->f_uname, finfo.f_uname))
X			diffs |= D_UNAME;
X	}
X	if ((diffopts & D_GNAME) && info->f_gname && finfo.f_gname) {
X		if (!streql(info->f_gname, finfo.f_gname))
X			diffs |= D_GNAME;
X	}
X
X	/*
X	 * XXX hier kann es bei ustar/cpio inkompatibel werden!
X	 *
X	 * Z.Zt. hat nur das STAR Format auch bei Hardlinks den Filetype.
X	 *	Soll man die teilweise bei fehlerhaften USTAR
X	 *	Implementierungen vorhandenen Filetype Bits verwenden?
X	 *
X	 * XXX CPIO EXUSTAR, ... haben auch den Filetyp.
X	 */
X	if ((diffopts & D_TYPE) &&
X	    (info->f_filetype != finfo.f_filetype ||
X	    (is_special(info) && info->f_type != finfo.f_type)) &&
X	    (!fis_link(info) || H_TYPE(hdrtype) == H_STAR)) {
X
X		if (fis_meta(info) && is_file(&finfo)) {
X			/* EMPTY */
X			;
X		} else {
X			if (debug) {
X				fprintf(f,
X				"%s: different filetype  %llo != %llo\n",
X				info->f_name,
X				(Ullong)info->f_type, (Ullong)finfo.f_type);
X			}
X			diffs |= D_TYPE;
X		}
X	}
X
X	/*
X	 * XXX nsec beachten wenn im Archiv!
X	 */
X	if ((diffopts & D_ATIME) != 0) {
X		if (info->f_atime != finfo.f_atime)
X			diffs |= D_ATIME;
X
X#ifdef	should_we
X		if ((info->f_xflags & XF_ATIME) && (finfo.f_flags & F_NSECS) &&
X		    info->f_ansec != finfo.f_ansec)
X			diffs |= D_ATIME;
X#endif
X	}
X	if ((diffopts & D_MTIME) != 0) {
X		if ((diffopts & D_LMTIME) != 0 || !is_symlink(&finfo)) {
X			if (info->f_mtime != finfo.f_mtime)
X				diffs |= D_MTIME;
X#ifdef	should_we
X			if ((info->f_xflags & XF_MTIME) && (finfo.f_flags & F_NSECS) &&
X			    info->f_mnsec != finfo.f_mnsec)
X				diffs |= D_MTIME;
X#endif
X		}
X	}
X	if ((diffopts & D_CTIME) != 0) {
X		if (info->f_ctime != finfo.f_ctime)
X			diffs |= D_CTIME;
X#ifdef	should_we
X		if ((info->f_xflags & XF_CTIME) && (finfo.f_flags & F_NSECS) &&
X		    info->f_cnsec != finfo.f_cnsec)
X			diffs |= D_CTIME;
X#endif
X	}
X
X	if ((diffopts & D_DIR) && is_dir(info) && info->f_dir &&
X	    is_dir(&finfo)) {
X		if (dirdiffs(f, info))
X			diffs |= D_DIR;
X	}
X
X	if ((diffopts & D_HLINK) && is_link(info)) {
X		if (!_getinfo(info->f_lname, &linfo)) {
X			if (!errhidden(E_STAT, info->f_lname)) {
X				if (!errwarnonly(E_STAT, info->f_lname))
X					xstats.s_staterrs++;
X				errmsg("Cannot stat '%s'.\n", info->f_lname);
X				(void) errabort(E_STAT, info->f_lname, TRUE);
X			}
X			linfo.f_ino = (ino_t)0;
X		}
X		if ((finfo.f_ino != linfo.f_ino) ||
X		    (finfo.f_dev != linfo.f_dev)) {
X			if (debug || verbose)
X				fprintf(f, "%s: not linked to %s\n",
X					info->f_name, info->f_lname);
X
X			diffs |= D_HLINK;
X		}
X	}
X#ifdef	S_IFLNK
X	if (((diffopts & (D_SLINK|D_SLPATH)) || verbose) && is_symlink(&finfo)) {
X		if (read_symlink(info->f_name, info->f_name, &finfo, &tb)) {
X			if ((diffopts & D_SLINK) && is_symlink(info) &&
X			    !linkeql(info->f_lname, finfo.f_lname)) {
X				diffs |= D_SLINK;
X			}
X			if ((diffopts & D_SLPATH) && is_symlink(info) &&
X			    !streql(info->f_lname, finfo.f_lname)) {
X				diffs |= D_SLPATH;
X			}
X		}
X	}
X#endif
X
X	/*
X	 * Only plain files may have holes, so only open plain files.
X	 * We cannot compare the "sparseness" of hardlinks that do not
X	 * include data in the archive.
X	 */
X	if (diffopts & D_SPARS && is_a_file(&finfo) &&
X	    !(is_link(info) && info->f_size == 0)) {
X		/*
X		 * This is not the right place to check for SEEK_HOLE bit it is
X		 * the only way to avoid opening the file in case it does not
X		 * make sense.
X		 */
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
X		int	fd;
X
X#ifndef	O_NDELAY
X#define	O_NDELAY	0
X#define	NDELAY
X#endif
X		if ((fd = open(finfo.f_name, O_RDONLY|O_NDELAY)) >= 0) {
X			if (sparse_file(&fd, &finfo))
X				finfo.f_flags |= F_SPARSE;
X			else
X				finfo.f_flags &= ~F_SPARSE;
X			close(fd);
X		}
X#ifdef	NDELAY
X#undef	O_NDELAY
X#endif
X#endif
X		if (is_sparse(info) != ((finfo.f_flags & F_SPARSE) != 0)) {
X			if (debug || verbose) {
X				fprintf(f, "%s: %s not sparse\n",
X					info->f_name,
X					is_sparse(info) ? "target":"source");
X			}
X			diffs |= D_SPARS;
X		}
X	}
X
X	if ((diffopts & D_SIZE) && !is_link(info) &&
X	    is_file(info) && is_file(&finfo) &&
X	    info->f_size != finfo.f_size) {
X
X		diffs |= D_SIZE;
X	}
X	/*
X	 * Rdev makes only sense with char & blk devices.
X	 * Rdev is usually 0 for other special file types but at least
X	 * the SunOS/Solaris 'tmpfs' has random values in rdev.
X	 */
X	if ((diffopts & D_RDEV) && is_dev(info) && is_dev(&finfo) &&
X	    info->f_rdev != finfo.f_rdev) {
X		diffs |= D_RDEV;
X	}
X
X	/*
X	 * XXX Wann geht das evt. mit Hardlinks CPIO, neues Tar....
X	 */
X	if ((diffopts & D_DATA) && !is_meta(info) &&
X	    (info->f_rsize > (off_t)0 || !is_link(info)) &&
X	    is_file(info) && is_file(&finfo)) {
X
X		    /* avoid permission denied error */
X		if (info->f_size > (off_t)0 &&
X		    info->f_size == finfo.f_size) {
X			if (!cmp_file(info)) {
X				diffs |= D_DATA;
X			}
X			do_void = FALSE;
X		} else if (info->f_size != finfo.f_size) {
X			diffs |= D_DATA;
X			do_void = TRUE;
X		}
X	} else {
X		do_void = TRUE;
X	}
X
X#ifdef USE_ACL
X	if (doacl && (diffopts & D_ACL)) {
X		if ((info->f_xflags & XF_ACL_ACCESS) !=
X		    (finfo.f_xflags & XF_ACL_ACCESS)) {
X			diffs |= D_ACL;
X		} else if ((info->f_xflags & XF_ACL_ACCESS) != 0) {
X			if (strcmp(info->f_acl_access, finfo.f_acl_access))
X				diffs |= D_ACL;
X		}
X		if ((info->f_xflags & XF_ACL_DEFAULT) !=
X		    (finfo.f_xflags & XF_ACL_DEFAULT)) {
X			diffs |= D_ACL;
X		} else if ((info->f_xflags & XF_ACL_DEFAULT) != 0) {
X			if (strcmp(info->f_acl_default, finfo.f_acl_default))
X				diffs |= D_ACL;
X		}
X	}
X#endif
X
X#ifdef USE_XATTR
X	if (doxattr && (diffopts & D_XATTR)) {
X		if ((info->f_xflags & XF_XATTR) !=
X		    (finfo.f_xflags & XF_XATTR)) {
X			diffs |= D_XATTR;
X		} else if ((info->f_xflags & XF_XATTR) != 0) {
X			register star_xattr_t	*x1 = info->f_xattr;
X			register star_xattr_t	*x2 = finfo.f_xattr;
X
X			for (; x1->name && x2->name; x1++, x2++) {
X				if (strcmp(x1->name, x2->name))
X					break;
X				if (x1->value_len != x2->value_len)
X					break;
X				if (memcmp(x1->value, x2->value, x2->value_len))
X					break;
X			}
X			if (x1->name || x2->name)
X				diffs |= D_XATTR;
X		}
X	}
X#endif
X
X#ifdef	USE_FFLAGS
X	if (dofflags && (diffopts & D_FFLAGS)) {
X		if (info->f_fflags != finfo.f_fflags)
X			diffs |= D_FFLAGS;
X	}
X#endif
X
X	if (diffs) {
X		if (errhidden(E_DIFF, info->f_name))
X			goto out;
X
X		if (tpath) {
X			fprintf(f, "%s\n", info->f_name);
X		} else {
X			fprintf(f, "%s: ", info->f_name);
X			prdiffopts(f, "different ", diffs);
X		}
X	}
X
X	if (verbose && diffs) {
X		list_file(info);
X		list_file(&finfo);
X	}
X	if (diffs)
X		errabort(E_DIFF, info->f_name, TRUE);
Xout:
X	if (do_void)
X		void_file(info);
X}
X
XLOCAL BOOL
Xlinkeql(n1, n2)
X	register char	*n1;
X	register char	*n2;
X{
X	FINFO	l1info;
X	FINFO	l2info;
Xextern	BOOL	follow;
X	BOOL	ofollow = follow;
X
X	/*
X	 * If the names are identical, return TRUE
X	 */
X	if (streql(n1, n2))
X		return (TRUE);
X	/*
X	 * Not equal if only one of both names is an abs. path name.
X	 */
X	if (*n1 != *n2 && (*n1 == '/' || *n2 == '/'))
X		return (FALSE);
X	/*
X	 * If the names point to the same inode, return TRUE
X	 */
X	follow = TRUE;
X	if (_getinfo(n1, &l1info) && _getinfo(n2, &l2info)) {
X		follow = ofollow;
X		if (l1info.f_dev == l2info.f_dev &&
X		    l1info.f_ino == l2info.f_ino) {
X			return (TRUE);
X		} else {
X			return (FALSE);
X		}
X	}
X	follow = ofollow;
X
X	return (patheql(n1, n2));
X}
X
XLOCAL BOOL
Xpatheql(n1, n2)
X	register char	*n1;
X	register char	*n2;
X{
X	while (n1[0] == '.' && n1[1] == '/') {
X		n1 += 2;
X		while (n1[0] == '/')
X			n1++;
X	}
X	while (n2[0] == '.' && n2[1] == '/') {
X		n2 += 2;
X		while (n2[0] == '/')
X			n2++;
X	}
X	for (; n1[0] != '\0' && n2[0]  != '\0'; n1++, n2++) {
X		if (n1[0] == '/') {
X			while (n1[1] == '.' && n1[2] == '/') {
X				n1 += 2;
X				while (n1[1] == '/')
X					n1++;
X			}
X		}
X		if (n2[0] == '/') {
X			while (n2[1] == '.' && n2[2] == '/') {
X				n2 += 2;
X				while (n2[1] == '/')
X					n2++;
X			}
X		}
X		if (n1[0] != n2[0])
X			break;
X	}
X	return (n1[0] == n2[0]);
X}
X
XLOCAL BOOL
Xdirdiffs(f, info)
X	FILE	*f;
X	FINFO	*info;
X{
X	register char	**ep1;	   /* Directory entry pointer array (arch) */
X	register char	**ep2 = 0; /* Directory entry pointer array (disk) */
X	register char	*dp2;	   /* Directory names string from disk	   */
X	register char	**oa = 0;  /* Only in arch pointer array	   */
X	register char	**od = 0;  /* Only on disk pointer array	   */
X	register int	i;
X		int	ents1 = -1;
X		int	ents2;
X		int	dlen = 0;
X		int	alen = 0;
X		BOOL	diffs = FALSE;
X
X	/*
X	 * Old archives had only one nul at the end
X	 * xheader.c already increments info->f_dirlen in this case
X	 * but a newline may appear to be the last char.
X	 * Note that we receicve the space from the xheader
X	 * extract buffer.
X	 */
X	i = info->f_dirlen;
X	if (info->f_dir[i-1] != '\0')
X		info->f_dir[i-1] = '\0';	/* Kill '\n' */
X
X	ep1 = sortdir(info->f_dir, &ents1);	/* from archive */
X	dp2 = fetchdir(info->f_name, &ents2, 0, NULL);
X	if (dp2 == NULL) {
X		diffs = TRUE;
X		errmsg("Cannot read dir '%s'.\n", info->f_name);
X		goto no_dircmp;
X	}
X	ep2 = sortdir(dp2, &ents2);		/* from disk */
X
X	if (ents1 != ents2) {
X		if (debug || verbose > 2) {
X			fprintf(f, "Archive ents: %d Disk ents: %d '%s'\n",
X					ents1, ents2, info->f_name);
X		}
X		diffs = TRUE;
X	}
X
X	if (cmpdir(ents1, ents2, ep1, ep2, NULL, NULL, &alen, &dlen) > 0)
X		diffs = TRUE;
X
X	oa = ___malloc(alen * sizeof (char *), "dir diff array");
X	od = ___malloc(dlen * sizeof (char *), "dir diff array");
X	cmpdir(ents1, ents2, ep1, ep2, oa, od, &alen, &dlen);
X
X	if (debug || verbose > 1) {
X		for (i = 0; i < dlen; i++) {
X			fprintf(f, "Only on disk '%s': '%s'\n",
X					info->f_name, od[i] + 1);
X		}
X		for (i = 0; i < alen; i++) {
X			fprintf(f, "Only in archive '%s': '%s'\n",
X					info->f_name, oa[i] + 1);
X		}
X	}
X
Xno_dircmp:
X	if (dp2)
X		free(dp2);
X	if (ep1)
X		free(ep1);
X	if (ep2)
X		free(ep2);
X	if (od)
X		free(od);
X	if (oa)
X		free(oa);
X
X	return (diffs);
X}
X
X#define	vp_cmp_func	((int(*)__PR((void *, char *, int)))cmp_func)
X
XLOCAL int
Xcmp_func(cmp, p, amount)
X	register cmp_t	*cmp;
X	register char	*p;
X		int	amount;
X{
X	register int	cnt;
X
X	/*
X	 * If we already found diffs we save time and only pass tape ...
X	 */
X	if (cmp->cmp_diffs)
X		return (amount);
X
X	cnt = ffileread(cmp->cmp_file, cmp->cmp_buf, amount);
X	if (cnt != amount)
X		cmp->cmp_diffs++;
X
X	if (cmpbytes(cmp->cmp_buf, p, cnt) < cnt)
X		cmp->cmp_diffs++;
X	return (cnt);
X}
X
Xstatic char	*diffbuf;
X
XLOCAL BOOL
Xcmp_file(info)
X	FINFO	*info;
X{
X	FILE	*f;
X	cmp_t	cmp;
X
X	if (!diffbuf) {
X		/*
X		 * If we have no diffbuf, we cannot diff - abort.
X		 */
X		diffbuf = ___malloc((size_t)bigsize, "diff buffer");
X#ifdef	__notneeded
X		if (diffbuf == (char *)0) {
X			void_file(info);
X			return (FALSE);
X		}
X#endif
X	}
X
X	if ((f = fileopen(info->f_name, "rub")) == (FILE *)NULL) {
X		if (!errhidden(E_OPEN, info->f_name)) {
X			if (!errwarnonly(E_OPEN, info->f_name))
X				xstats.s_openerrs++;
X			errmsg("Cannot open '%s'.\n", info->f_name);
X			(void) errabort(E_OPEN, info->f_name, TRUE);
X		}
X		void_file(info);
X		return (FALSE);
X	} else
X		file_raise(f, FALSE);
X
X	if (is_sparse(info))
X		return (cmp_sparse(f, info));
X
X	cmp.cmp_file = f;
X	cmp.cmp_buf = diffbuf;
X	cmp.cmp_diffs = 0;
X	if (xt_file(info, vp_cmp_func, &cmp, bigsize, "reading") < 0)
X		die(EX_BAD);
X	fclose(f);
X	return (cmp.cmp_diffs == 0);
X}
X
XEXPORT void
Xprdiffopts(f, label, flags)
X	FILE	*f;
X	char	*label;
X	int	flags;
X{
X	int	printed = 0;
X
X	fprintf(f, "%s", label);
X	if (flags & D_PERM)
X		prdopt(f, "perm", printed++);
X	if (flags & D_SYMPERM)
X		prdopt(f, "symperm", printed++);
X	/*
X	 * XXX Diff ACLs not yet implemented.
X	 */
X	if (flags & D_TYPE)
X		prdopt(f, "type", printed++);
X	if (flags & D_NLINK)
X		prdopt(f, "nlink", printed++);
X	if (flags & D_UID)
X		prdopt(f, "uid", printed++);
X	if (flags & D_GID)
X		prdopt(f, "gid", printed++);
X	if (flags & D_UNAME)
X		prdopt(f, "uname", printed++);
X	if (flags & D_GNAME)
X		prdopt(f, "gname", printed++);
X	if (flags & D_SIZE)
X		prdopt(f, "size", printed++);
X	if (flags & D_DATA)
X		prdopt(f, "data", printed++);
X	if (flags & D_RDEV)
X		prdopt(f, "rdev", printed++);
X	if (flags & D_HLINK)
X		prdopt(f, "hardlink", printed++);
X	if (flags & D_SLINK)
X		prdopt(f, "symlink", printed++);
X	if (flags & D_SLPATH)
X		prdopt(f, "sympath", printed++);
X	if (flags & D_SPARS)
X		prdopt(f, "sparse", printed++);
X	if (flags & D_ATIME)
X		prdopt(f, "atime", printed++);
X	if (flags & D_MTIME)
X		prdopt(f, "mtime", printed++);
X	if (flags & D_CTIME)
X		prdopt(f, "ctime", printed++);
X	if (flags & D_LMTIME)
X		prdopt(f, "lmtime", printed++);
X	if (flags & D_DIR)
X		prdopt(f, "dir", printed++);
X#ifdef USE_ACL
X	if (flags & D_ACL)
X		prdopt(f, "acl", printed++);
X#endif
X#ifdef USE_XATTR
X	if (flags & D_XATTR)
X		prdopt(f, "xattr", printed++);
X#endif
X#ifdef	USE_FFLAGS
X	if (flags & D_FFLAGS)
X		prdopt(f, "fflags", printed++);
X#endif
X	fprintf(f, "\n");
X}
X
XLOCAL void
Xprdopt(f, name, printed)
X	FILE	*f;
X	char	*name;
X	int	printed;
X{
X	if (printed)
X		fprintf(f, ",");
X	fprintf(f, "%s", name);
X}
END-of-star-1.5.2/star/diff.c
echo x - star-1.5.2/star/cpio.c
sed 's/^X//' >star-1.5.2/star/cpio.c << 'END-of-star-1.5.2/star/cpio.c'
X/* @(#)cpio.c	1.27 11/04/16 Copyright 1989, 2005-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	const char _c_sccsid[] =
X	"@(#)cpio.c	1.27 11/04/16 Copyright 1989, 2005-2011 J. Schilling";
X#endif
X/*
X *	CPIO specific routines for star main program.
X *
X *	Copyright (c) 1989, 2005-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifdef	STAR_MAIN
X/*
X * We have been included from star.c
X */
X#define	opts		cpio_opts
X#define	_opts		_cpio_opts
X#define	gargs		cpio_gargs
X#define	susage		cpio_susage
X#define	usage		cpio_usage
X#define	xusage		cpio_xusage
X#else
X#define	NO_STAR_MAIN
X#define	CPIO_MAIN
X#define	PTYPE_DEFAULT	P_CPIO
X
X#include "star.c"
X#endif
X
XLOCAL	void	gargs		__PR((int ac, char *const *av));
XLOCAL	void	susage		__PR((int ret));
XLOCAL	void	usage		__PR((int ret));
XLOCAL	void	xusage		__PR((int ret));
X#ifdef	STAR_MAIN
XLOCAL	void	cpio_setopts	__PR((char *o));
X#endif
X
X/*
X * cpio -o[aBcv]
X *
X * cpio -i[Bcdmrtuvf] [pattern ...]
X *
X * cpio -p[adlmuv] directory
X *
X *	-o	Write					tar c
X *	-i	Read					tar x
X *	-i	Read -i -t				tar t
X *	-p	Pass					tar -copy
X *
X *	-a	Reset access times of input files after they have been copied
X *	-B	Block input/output to 5120 bytes records
X *	-c	Write/read header information in character form for portability
X *	-d	Create directories as needed
X *	-f	Copy in all files except those in patterns
X *	-l	Whenever possible, link files rather than copying them
X *	-m	Retain previous file modification time
X *	-r	Interactively rename files
X *	-t	Write a table of contents of the input
X *	-u	Copy unconditionally
X *	-v	Verbose: print the names of the affected files
X *		With the t option, provides a detailed listing
X *
X *	SVr4:
X *	-A	Append
X *	-b	swap bytes and halfwords
X *	-C	Bufsize
X *	-E	Solaris wie star list=
X *	-H	header type
X *	-I file
X *	-k	Skip corrupt
X *	-L	Follow symlinks
X *	-M msg	Message when switching media
X *	-O file
X *	-P	Preserve ACLs
X *	-R id	Reassign ids
X *	-s	Swaps bytes within each half word
X *	-S	Swaps halfwords within each word
X *	-V	Special verbose
X *	-6	ignored
X *	-@	Extended File Attributes
X */
X
X/*
X * CPIO related options
X *
X * The official POSIX options start after the -bz/-lzop/-7z/-xz/-lzip option.
X */
X/* BEGIN CSTYLED */
Xchar	_opts[] = "help,xhelp,version,debug,xdebug#,xd#,time,no-statistics,fifostats,numeric,no-fifo,no-fsync,do-fsync%0,bs&,fs&,/,..,secure-links,acl,xfflags,z,bz,lzo,7z,xz,lzip,i,o,p,a,A,b,B,c,C&,d,E*,f,H&,artype&,I&,O&,k,l,L,m,M*,P,r,R,s,S,t,u,6,@,V,v";
X/* END CSTYLED */
Xchar	*opts = _opts;
X
XLOCAL	void	cpio_info	__PR((void));
X
XLOCAL void
Xgargs(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int	files	 = 0;
X	BOOL	help	 = FALSE;
X	BOOL	xhelp	 = FALSE;
X	BOOL	prvers	 = FALSE;
X	BOOL	no_fifo	 = FALSE;
X	BOOL	cpioiflag = FALSE;
X	BOOL	cpiooflag = FALSE;
X	BOOL	cpiobflag = FALSE;
X	BOOL	cpioBflag = FALSE;
X	BOOL	cpiocflag = FALSE;
X	BOOL	cpiolflag = FALSE;
X	BOOL	cpiomflag = FALSE;
X	char	*cpioM	  = NULL;
X	char	*cpioR	  = NULL;
X	BOOL	cpiosflag = FALSE;
X	BOOL	cpioSflag = FALSE;
X	BOOL	cpio6flag = FALSE;
X	BOOL	sunxattr  = FALSE;
X	BOOL	cpioVflag = FALSE;
X	Llong	llbs	 = 0;
X
X
X	/*
X	 * It does not really make sense to follow the SVr4 rules and by
X	 * default create a UNIX-V7 binary CPIO archive. UNIX-V7 binary
X	 * CPIO archives are not byte order independent and other (non scpio
X	 * based) cpio implementations are unable to deal with byte order
X	 * problems without manual interventions.
X	 *
X	 * The POSIX 1003.1-1988 default archive format is H_CPIO_CHR. We by
X	 * default limit the file name length to 256 bytes with H_CPIO_ODC.
X	 *
X	 * POSIX 1003.1-1988 does not specifiy what archive format to use with
X	 * the -c option.
X	 */
X#ifdef	__notdef__
X	hdrtype = H_CPIO_BIN;			/* The SYSv cpio default format */
X#endif
X	hdrtype = H_CPIO_ODC;			/* POSIX 1003.1-1988 with SYSv compat */
X#ifdef	STAR_MAIN
X	cpio_setopts(opts);			/* set up opts for getfiles */
X#endif
X
X	iftype		= I_CPIO;		/* command line interface */
X	ptype		= P_CPIO;		/* program interface type */
X#ifdef	__never__
X	paxls		= TRUE;			/* If ever, implement cpiols */
X#endif
X	cpio_stats	= TRUE;
X	paxmatch	= TRUE;
X	pflag		= TRUE;			/* cpio always restores permissions */
X	xdir		= TRUE;			/* cpio restores dirs unconditionally */
X	do_install	= TRUE;			/* cpio always uses install(1) mode */
X	force_remove	= TRUE;			/* cpio always removes old files */
X	remove_recursive = TRUE;		/* cpio always removes recursively */
X	nblocks		= 1;			/* cpio standard blocksize is 512 */
X	no_fsync	= TRUE;			/* cpio by default does -no-fsync */
X	/*
X	 * NOTE: star by default writes into existing files if possible.
X	 *	If we like to emulate the Sun cpio behavior, we need to call
X	 *	star -x -install -force-remove -remove-recursive
X	 *	The only remaining difference to Sun cpio is that Sun cpio does
X	 * 	rename the old files before extracting the new files and star
X	 *	extracts the new file into a temporary name and renames the
X	 *	result to the original name. This is better for updating a life
X	 *	system without the risk of problems with old binaries.
X	 */
X
X	--ac, ++av;
X	files = getfilecount(ac, av, opts);
X	if (getallargs(&ac, &av, opts,
X				&help, &xhelp, &prvers, &debug,
X				&xdebug, &xdebug,
X#ifndef	__old__lint
X				&showtime, &no_stats, &do_fifostats,
X				&numeric,  &no_fifo, &no_fsync, &no_fsync,
X				getnum, &bs,
X				getnum, &fs,
X				&abs_path, &allow_dotdot, &secure_links,
X				&doacl, &dofflags,
X				&zflag, &bzflag, &lzoflag,
X				&p7zflag, &xzflag, &lzipflag,
X
X				&cpioiflag,		/* -i */
X				&cpiooflag,		/* -o */
X				&copyflag,		/* -p */
X				&acctime,		/* -a */
X				&rflag,			/* -A */
X				&cpiobflag,		/* -b */
X				&cpioBflag,		/* -B */
X				&cpiocflag,		/* -c */
X				getllnum, &llbs,	/* -C */
X				&noxdir,		/* -d */
X				&listfile,		/* -E */
X				&notarg,		/* -f */
X				gethdr, &chdrtype,	/* -H */
X				gethdr, &chdrtype,	/* artype= */
X				addtarfile, NULL,	/* -I */
X				addtarfile, NULL,	/* -O */
X				&ignoreerr,		/* -k */
X				&cpiolflag,		/* -l */
X				&paxfollow,		/* -L */
X				&cpiomflag,		/* -m */
X				&cpioM,			/* -M */
X				&doacl,			/* -P */
X				&paxinteract,		/* -r */
X				&cpioR,			/* -R */
X				&cpiosflag,		/* -s */
X				&cpioSflag,		/* -S */
X				&tflag,			/* -t */
X				&uncond,		/* -u */
X				&cpio6flag,		/* -6 */
X				&sunxattr,		/* -@ */
X				&cpioVflag,		/* -V */
X#endif /* __old__lint */
X				&verbose) < 0) {
X		errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
X		susage(EX_BAD);
X	}
X	star_helpvers("scpio", help, xhelp, prvers);
X
X	if ((cpioiflag + cpiooflag + copyflag) > 1) {
X		errmsgno(EX_BAD,
X		"Too many commands, only one of -i -o or -p is allowed.\n");
X		susage(EX_BAD);
X	}
X	if (!(cpioiflag | cpiooflag | copyflag)) {
X		errmsgno(EX_BAD,
X		"Missing command, one of -i, -o or -p must be specified.\n");
X		susage(EX_BAD);
X	}
X	if (cpioiflag && !tflag) {
X		xflag = TRUE;
X	} else if (cpioiflag) {
X		tflag = TRUE;
X		acctime = FALSE;
X	} else if (cpiooflag) {
X		cflag = TRUE;
X	}
X	if ((cflag || copyflag) && listfile == NULL)
X		listfile = "-";		/* This is always true for cpio. */
X
X
X	if (uflag || rflag) {
X		cflag = TRUE;
X		no_fifo = TRUE;	/* Until we are able to reverse the FIFO */
X	}
X
X	if (cpiobflag) {
X		/* swap all */
X		errmsgno(EX_BAD, "Unsupported option -b.\n");
X		susage(EX_BAD);
X	}
X	if (cpioBflag) {
X		if (llbs != 0 || bs != 0) {
X			errmsgno(EX_BAD, "Only one of -B -C bs=.\n");
X			susage(EX_BAD);
X		}
X		nblocks = 10;
X		bs = nblocks * TBLOCK;
X	}
X	if (llbs > 0) {
X		if (bs != 0) {
X			errmsgno(EX_BAD, "Only one of -B -C bs=.\n");
X			susage(EX_BAD);
X		}
X		nblocks = llbs / TBLOCK;
X		bs = (long)llbs;
X		if (bs != llbs) {
X			errmsgno(EX_BAD, "Blocksize used with -C too large.\n");
X			susage(EX_BAD);
X		}
X		bs = 0;
X	}
X	if (copyflag) {
X		if (nblocks == 1)
X			nblocks = 20;
X	}
X	if (cpiocflag) {
X		if (chdrtype != H_UNDEF) {
X			errmsgno(EX_BAD, "Only one of -c -H.\n");
X			susage(EX_BAD);
X		}
X		chdrtype = H_CPIO_ASC;
X	}
X	if (cpiolflag) {
X		/* link bei -copy */
X		errmsgno(EX_BAD, "Unsupported option -l.\n");
X		susage(EX_BAD);
X	}
X	if (cpioM) {
X		/* Message to use when switching media */
X		errmsgno(EX_BAD, "Unsupported option -M.\n");
X		susage(EX_BAD);
X	}
X	if (cpioR) {
X		/* Reassign ownership and group */
X		errmsgno(EX_BAD, "Unsupported option -R.\n");
X		susage(EX_BAD);
X	}
X	if (cpiosflag) {
X		/* Swap bytes */
X		errmsgno(EX_BAD, "Unsupported option -s.\n");
X		susage(EX_BAD);
X	}
X	if (cpioSflag) {
X		/* Swap halfwaords */
X		errmsgno(EX_BAD, "Unsupported option -S.\n");
X		susage(EX_BAD);
X	}
X	if (cpio6flag) {
X		/* UNIX V6 compat */
X		errmsgno(EX_BAD, "Unsupported option -6.\n");
X		susage(EX_BAD);
X	}
X	if (sunxattr) {
X		/* Extended File Attributes */
X		errmsgno(EX_BAD, "Unsupported option -@.\n");
X		susage(EX_BAD);
X	}
X	if (cpioVflag) {
X		/* Special Verbose */
X		errmsgno(EX_BAD, "Unsupported option -V.\n");
X		susage(EX_BAD);
X	}
X	if (paxinteract)
X		interactive = TRUE;
X
X	nomtime = !cpiomflag;
X
X	star_checkopts(/* oldtar */ FALSE, /* dodesc */ FALSE,
X				/* usetape */ FALSE,
X				/* archive */ -1, no_fifo, llbs);
X
X	nolinkerr = FALSE;
X}
X
XLOCAL void
Xcpio_info()
X{
X	error("\nFor a more complete user interface use the tar type command interface.\n");
X	error("See 'man star'. The %s command is more or less limited to the\n", get_progname());
X	error("SUSv2 standard cpio command line interface.\n");
X}
X
X/*
X * Short usage
X */
XLOCAL void
Xsusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("\nUse\t%s -help\n", get_progname());
X	error("and\t%s -xhelp\n", get_progname());
X	error("to get a list of valid cmds and options.\n");
X	error("\nUse\t%s -H help\n", get_progname());
X	error("to get a list of valid archive header formats.\n");
X	cpio_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Cmd:\n");
X	error("\t-o\t\tCopy out (write files to an archive)\n");
X	error("\t-i\t\tCopy in (extract files from archive)\n");
X	error("\t-it\t\tList (files from archive)\n");
X	error("\t-p\t\tPass (copy files to different location)\n");
X	error("Options:\n");
X	error("\t-help\t\t(*) print this help\n");
X	error("\t-xhelp\t\t(*) print extended help\n");
X	error("\t-version\t(*) print version information and exit\n");
X	error("\t-a\t\treset access time after storing file\n");
X	error("\t-A\t\t(+) append to an existing archive\n");
X	error("\t-b\t\t(+) swap bytes and halfwords\n");
X	error("\t-B\t\tblock input/output to 5120 bytes records\n");
X	error("\t-c\t\twrite/read header information in character form\n");
X	error("\t-C #\t\t(+) set (input/output) block size to #\n");
X	error("\t-d\t\tcreate directories as needed\n");
X	error("\t-E name\t\t(+) read filenames from named file\n");
X	error("\t-f\t\tinvert matching rules\n");
X	error("\t-H header\t(+) generate 'header' type archive (see -H help)\n");
X	error("\tartype=header\t(*) generate 'header' type archive (see artype=help)\n");
X	error("\t-I nm\t\t(+) use 'nm' as tape instead of stdin/stdout\n");
X	error("\t-k\t\t(+) inore errors - skip corrupt data\n");
X	error("\t-l\t\tlink files rather than copying them\n");
X	error("\t-L\t\t(+) follow symbolic links as if they were files\n");
X	error("\t-m\t\trestore access and modification time\n");
X	error("\t-M message\t(+) message to use when switching media\n");
X	error("\t-O nm\t\t(+) use 'nm' as tape instead of stdin/stdout\n");
X	error("\t-P\t\t(+) handle access control lists\n");
X	error("\t-r\t\tdo interactive creation/extraction/renaming\n");
X	error("\t-R nm\t\t(+) reassign ownership and group information\n");
X	error("\t-s\t\t(+) swap bytes\n");
X	error("\t-S\t\t(+) swap halfwords\n");
X	error("\t-t\t\twrite a table of contents\n");
X	error("\t-u\t\trestore files unconditionally\n");
X	error("\t-v\t\tincrement verbose level\n");
X	error("\t-V\t\t(+) special verbose\n");
X	error("\t-6\t\t(+) UNIX V6 binary cpio compatibility\n");
X	error("\t-@\t\t(+) manage extended file attributes\n");
X	error("\t-z\t\t(*) pipe input/output through gzip, does not work on tapes\n");
X	error("\t-bz\t\t(*) pipe input/output through bzip2, does not work on tapes\n");
X	error("\t-lzo\t\t(*) pipe input/output through lzop, does not work on tapes\n");
X	error("\t-7z\t\t(*) pipe input/output through p7zip, does not work on tapes\n");
X	error("\t-xz\t\t(*) pipe input/output through xp, does not work on tapes\n");
X	error("\t-lzip\t\t(*) pipe input/output through lzip, does not work on tapes\n");
X#ifdef	FIFO
X	error("\t-no-fifo\t(*) don't use a fifo to optimize data flow from/to tape\n");
X#endif
X	error("\nAll options marked with (*) are neither defined by SUSv2 nor by SVr4.\n");
X	error("All options marked with (+) are SVr4 extensions.\n");
X	error("\nThe -c option is compatible to SVr4 cpio and thus is equivalent to -Hasc.\n");
X	error("If you like the archive type from SUSv2 cpio -c, use -Hcpio instead.\n");
X	cpio_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xxusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Extended options:\n");
X	error("\t-debug\t\tprint additional debug messages\n");
X	error("\txdebug=#,xd=#\tset extended debug level\n");
X	error("\t-/\t\tdon't strip leading '/'s from file names\n");
X	error("\t-..\t\tdon't skip filenames that contain '..' in non-interactive extract\n");
X	error("\t-secure-links\tdon't extract links that start with '/' or contain '..'\n");
X	error("\t-acl\t\thandle access control lists\n");
X	error("\t-xfflags\thandle extended file flags\n");
X	error("\tbs=#\t\tset (output) block size to #\n");
X#ifdef	FIFO
X	error("\tfs=#\t\tset fifo size to #\n");
X#endif
X	error("\t-no-fsync\tdo not call fsync() for each extracted file (may be dangerous)\n");
X	error("\t-do-fsync\tcall fsync() for each extracted file\n");
X	error("\t-time\t\tprint timing info\n");
X	error("\t-no-statistics\tdo not print statistics\n");
X#ifdef	FIFO
X	error("\t-fifostats\tprint fifo statistics\n");
X#endif
X	error("\t-numeric\tdon't use user/group name from tape\n");
X	error("\nAll options above are not defined by SUSv2 nor by SVr4.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
X#ifdef	STAR_MAIN
X#undef	opts
X#undef	_opts
X#undef	gargs
X#undef	susage
X#undef	usage
X#undef	xusage
X
XLOCAL void
Xcpio_setopts(o)
X	char	*o;
X{
Xextern	char	*opts;
X	opts = o;
X}
X#endif
END-of-star-1.5.2/star/cpio.c
echo x - star-1.5.2/star/cpiohdr.c
sed 's/^X//' >star-1.5.2/star/cpiohdr.c << 'END-of-star-1.5.2/star/cpiohdr.c'
X/* @(#)cpiohdr.c	1.27 10/08/23 Copyright 1994-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)cpiohdr.c	1.27 10/08/23 Copyright 1994-2010 J. Schilling";
X#endif
X/*
X *	Handling routines to read/write, parse/create
X *	cpio archive headers
X *
X *	Copyright (c) 1994-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/dirent.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#define	__XDEV__	/* Needed to activate _dev_major()/_dev_minor() */
X#include <schily/device.h>
X#include <schily/schily.h>
X#include <schily/intcvt.h>
X#include "starsubs.h"
X#include "movearch.h"
X#include "fifo.h"
X
Xextern	long	hdrtype;
Xextern	BOOL	ignoreerr;
Xextern	BOOL	link_dirs;
X
XEXPORT	void	put_cpioh	__PR((TCB *ptb, FINFO *info));
XEXPORT	void	cpio_weof	__PR((void));
XEXPORT	void	cpioinfo_to_tcb	__PR((FINFO *info, TCB *ptb));
XEXPORT	int	cpiotcb_to_info	__PR((TCB *ptb, FINFO *info));
XEXPORT	void	cpio_resync	__PR((void));
XEXPORT	int	cpio_checkswab	__PR((TCB *ptb));
XLOCAL	Int32_t	cpio_cksum	__PR((char *name));
XLOCAL	void	astoo_cpio	__PR((char *s, Ulong *l, int cnt));
XLOCAL	void	astoh_cpio	__PR((char *s, Ulong *l, int cnt));
XLOCAL	void	litoh_cpio	__PR((char *s, Ulong l, int fieldw));
X
XEXPORT void
Xput_cpioh(ptb, info)
X	TCB	*ptb;
X	register FINFO	*info;
X{
X	move_t	move;
X	FINFO	ninfo;
X
X	if (is_file(info) && H_TYPE(hdrtype) == H_CPIO_ACRC) {
X		info->f_flags |= F_CRC;
X		cpioinfo_to_tcb(info, ptb);
X	}
X	if ((info->f_flags & F_TCB_BUF) != 0) {	/* TCB is on buffer */
X		put_block(props.pr_hdrsize);
X	} else {
X		int	i;
X	extern char	*bigptr;
X
X		/*
X		 * This is a writeblock() implementation that
X		 * deals with buffer wrap around problems.
X		 */
X		i = buf_wait(props.pr_hdrsize);
X		if (i < props.pr_hdrsize) {
X			int	rest;
X
X			movebytes(ptb, bigptr, i);
X			buf_wake(i);
X			rest = props.pr_hdrsize - i;
X			buf_wait(rest);
X			movebytes(((char *)ptb)+i, bigptr, rest);
X			buf_wake(rest);
X		} else {
X			movebytes(ptb, bigptr, props.pr_hdrsize);
X			buf_wake(props.pr_hdrsize);
X		}
X	}
X
X	/*
X	 * If we decide to be able to auto-add a slash at the end of a
X	 * directory we need to change name_to_tcb() in longname.c
X	 */
X	fillbytes(&ninfo, sizeof (ninfo), '\0');
X	move.m_data = info->f_name;
X	move.m_flags = 0;			/* No MF_ADDSLASH */
X	move.m_size = info->f_namelen + 1;
X	ninfo.f_rsize = info->f_namelen + 1;
X	ninfo.f_flags |= F_LONGNAME;
X	ninfo.f_name = "file name";
X	cr_file(&ninfo, vp_move_to_arch, &move, 0, "moving file name");
X
X	if (is_symlink(info)) {
X		move.m_data = info->f_lname;
X		move.m_size = info->f_lnamelen;
X		ninfo.f_rsize = info->f_lnamelen;
X		ninfo.f_flags = 0;
X		cr_file(&ninfo, vp_move_to_arch, &move, 0, "moving link name");
X	}
X}
X
XEXPORT void
Xcpio_weof()
X{
X		TCB	tb;
X	register TCB	*ptb;
X		FINFO	ninfo;
X
X	fillbytes(&ninfo, sizeof (ninfo), '\0');
X
X	if ((ptb = (TCB *)get_block(props.pr_hdrsize)) == NULL)
X		ptb = &tb;
X	else
X		ninfo.f_flags |= F_TCB_BUF;
X
X	ninfo.f_name = "TRAILER!!!";
X	ninfo.f_namelen = 10;
X	ninfo.f_nlink = 1;
X	cpioinfo_to_tcb(&ninfo, ptb);
X	put_cpioh(ptb, &ninfo);
X}
X
XEXPORT void
Xcpioinfo_to_tcb(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X	register char	*p = (char *)ptb;
X		nlink_t	nlink = info->f_nlink;
X		Ulong	crc = 0L;
X		Int16_t	s;
X		UInt16_t us;
X		Int32_t	l;
X
X
X	/*
X	 * The header is rewritten later in read_link()
X	 * with a new unique st_dev/st_ino.
X	 */
X	if (!link_dirs && is_dir(info))
X		nlink = 1;
X
X	switch (H_TYPE(hdrtype)) {
X
X	case H_CPIO_BIN:
X		/*
X		 * We always create binary archives in network byte order.
X		 */
X		*p++ = '\161'; *p++ = '\307';
X		s = info->f_dev;
X		i_to_2_byte(p, s); p += 2;
X		us = info->f_ino;
X		i_to_2_byte(p, us); p += 2;
X		us = info->f_type|info->f_mode;
X		i_to_2_byte(p, us); p += 2;
X		us = info->f_uid;
X		i_to_2_byte(p, us); p += 2;
X		us = info->f_gid;
X		i_to_2_byte(p, us); p += 2;
X		s = info->f_nlink;
X		i_to_2_byte(p, s); p += 2;
X		s = info->f_rdev;
X		i_to_2_byte(p, s); p += 2;
X		l = info->f_mtime;
X		i_to_4_byte(p, l); p += 4;
X		s = info->f_namelen+1;
X		i_to_2_byte(p, s); p += 2;
X		if (is_symlink(info))
X			l = info->f_lnamelen;
X		else
X			l = info->f_rsize;
X		i_to_4_byte(p, l); p += 4;
X		break;
X
X	case H_CPIO_CHR:
X	case H_CPIO_ODC:
X		*p++ = '0'; *p++ = '7';
X		*p++ = '0'; *p++ = '7';
X		*p++ = '0'; *p++ = '7';
X		llitos(&((char *)ptb)[6], (Ullong)info->f_dev, 6);
X		llitos(&((char *)ptb)[12], (Ullong)info->f_ino, 6);
X		llitos(&((char *)ptb)[18], (Ullong)(info->f_type|info->f_mode), 6);
X		llitos(&((char *)ptb)[24], (Ullong)info->f_uid, 6);
X		llitos(&((char *)ptb)[30], (Ullong)info->f_gid, 6);
X		llitos(&((char *)ptb)[36], (Ullong)nlink, 6);
X		llitos(&((char *)ptb)[42], (Ullong)info->f_rdev, 6);
X		llitos(&((char *)ptb)[48], (Ullong)info->f_mtime, 11);
X		llitos(&((char *)ptb)[59], (Ullong)info->f_namelen+1, 6);
X		if (is_symlink(info))
X			llitos(&((char *)ptb)[65], (Ullong)info->f_lnamelen, 11);
X		else
X			llitos(&((char *)ptb)[65], (Ullong)info->f_rsize, 11);
X		break;
X
X	case H_CPIO_ASC:
X	case H_CPIO_ACRC:
X		*p++ = '0'; *p++ = '7';
X		*p++ = '0'; *p++ = '7';
X		if (H_TYPE(hdrtype) == H_CPIO_ASC) {
X			*p++ = '0'; *p++ = '1';
X		} else {
X			*p++ = '0'; *p++ = '2';
X		}
X		litoh_cpio(&((char *)ptb)[6], (Ulong)info->f_ino, 8);
X		litoh_cpio(&((char *)ptb)[14], (Ulong)(info->f_type|info->f_mode), 8);
X		litoh_cpio(&((char *)ptb)[22], (Ulong)info->f_uid, 8);
X		litoh_cpio(&((char *)ptb)[30], (Ulong)info->f_gid, 8);
X		litoh_cpio(&((char *)ptb)[38], (Ulong)nlink, 8);
X		litoh_cpio(&((char *)ptb)[46], (Ulong)info->f_mtime, 8);
X		if (is_symlink(info))
X			litoh_cpio(&((char *)ptb)[54], (Ulong)info->f_lnamelen, 8);
X		else
X			litoh_cpio(&((char *)ptb)[54], (Ulong)info->f_rsize, 8);
X		litoh_cpio(&((char *)ptb)[62], (Ulong)major(info->f_dev), 8);
X		litoh_cpio(&((char *)ptb)[70], (Ulong)minor(info->f_dev), 8);
X		litoh_cpio(&((char *)ptb)[78], (Ulong)info->f_rdevmaj, 8);
X		litoh_cpio(&((char *)ptb)[86], (Ulong)info->f_rdevmin, 8);
X		litoh_cpio(&((char *)ptb)[94], (Ulong)info->f_namelen+1, 8);
X		if (is_file(info) && info->f_flags & F_CRC)
X			crc = cpio_cksum(info->f_name);
X		litoh_cpio(&((char *)ptb)[102], crc, 8);
X		break;
X
X	default:
X		errmsgno(EX_BAD, "Found CPIO type %ld/%d ", hdrtype, H_TYPE(hdrtype));
X		print_hdrtype(stderr, hdrtype);
X		comerrno(EX_BAD, "Can't handle this cpio archive type (yet).\n");
X	}
X}
X
X/*
X * CPIO header offsets:
X *
X *	-Hodc (POSIX)
X *	c_magic[6]		0
X *	c_dev[6]		6
X *	c_ino[6]		12
X *	c_mode[6]		18
X *	c_uid[6]		24
X *	c_gid[6]		30
X *	c_nlink[6]		36
X *	c_rdev[6]		42
X *	c_mtime[11]		48
X *	c_namesize[6]		59
X *	c_filesize[11]		65
X *	c_name[]		76
X *
X *	-Hcrc
X *	E_magic[6]		0
X *	E_ino[8]		6
X *	E_mode[8]		14
X *	E_uid[8]		22
X *	E_gid[8]		30
X *	E_nlink[8]		38
X *	E_mtime[8]		46
X *	E_filesize[8]		54
X *	E_maj[8]		62
X *	E_min[8]		70
X *	E_rmaj[8]		78
X *	E_rmin[8]		86
X *	E_namesize[8]		94
X *	E_chksum[8]		102
X *	E_name[]		110
X *
X *	Binary V7 default
X *	h_magic[2]		0
X *	h_dev[2]		2
X *	h_ino[2]		4
X *	h_mode[2]		6
X *	h_uid[2]		8
X *	h_gid[2]		10
X *	h_nlink[2]		12
X *	h_rdev[2]		14
X *	h_mtime[4]		16
X *	h_namesize[2]		20
X *	h_filesize[4]		22
X *
X */
X
XEXPORT int
Xcpiotcb_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	Ulong	ul;
X	move_t	move;
X	long	l1;
X	long	l2;
X	BOOL	swapped = FALSE;
X	char	binhdr[CPIOBIN_HDRSZ];
X
X
X	switch (H_TYPE(hdrtype)) {
X
X	case H_CPIO_BIN:
X		l1 = (((char *)ptb)[20] & 0xFF) * 256 + (((char *)ptb)[21] & 0xFF);
X		l2 = (((char *)ptb)[21] & 0xFF) * 256 + (((char *)ptb)[20] & 0xFF);
X		if (l1 <= 257 || l2 <= 257) {
X			if (l2 <= 257)
X				swapped = TRUE;
X		}
X		if (swapped) {
X			movebytes(ptb, binhdr, CPIOBIN_HDRSZ);
X			ptb = (TCB *)binhdr;
X			swabbytes((char *)ptb, props.pr_hdrsize);
X		}
X
X		l1 = ((char *)ptb)[2] * 256 + (((char *)ptb)[3] & 0xFF);
X		info->f_dev = l1;
X		ul = (((char *)ptb)[4] & 0xFF) * 256 + (((char *)ptb)[5] & 0xFF);
X		info->f_ino = ul;
X		ul = (((char *)ptb)[6] & 0xFF) * 256 + (((char *)ptb)[7] & 0xFF);
X		info->f_mode = ul;
X		info->f_type = info->f_mode & S_IFMT;
X		info->f_mode = info->f_mode & 07777;
X		info->f_rxftype = info->f_xftype = IFTOXT(info->f_type);
X		info->f_filetype = XTTOST(info->f_xftype);
X		info->f_typeflag = XTTOUS(info->f_xftype);
X		ul = (((char *)ptb)[8] & 0xFF) * 256 + (((char *)ptb)[9] & 0xFF);
X		info->f_uid = ul;
X		ul = (((char *)ptb)[10] & 0xFF) * 256 + (((char *)ptb)[11] & 0xFF);
X		info->f_gid = ul & 0xFFFF;
X		l1 = ((char *)ptb)[12] * 256 + (((char *)ptb)[13] & 0xFF);
X		if (is_dir(info) && !link_dirs)
X			l1 = 1;
X		info->f_nlink = l1;
X		l1 = ((char *)ptb)[14] * 256 + (((char *)ptb)[15] & 0xFF);
X		info->f_rdev = l1;
X		info->f_rdevmaj	= _dev_major(8, info->f_rdev);
X		info->f_rdevmin	= _dev_minor(8, info->f_rdev);
X		info->f_rdev = makedev(info->f_rdevmaj, info->f_rdevmin);
X
X		l1 = ((char *)ptb)[16] * 256 + (((char *)ptb)[17] & 0xFF);
X		l2 = (((char *)ptb)[18] & 0xFF) * 256 + (((char *)ptb)[19] & 0xFF);
X		l1 *= 0x10000;
X		l1 += l2;
X		info->f_atime = info->f_mtime = info->f_ctime = (time_t)l1;
X
X		l1 = ((char *)ptb)[20] * 256 + (((char *)ptb)[21] & 0xFF);
X		info->f_namelen = l1;
X
X		l1 = ((char *)ptb)[22] * 256 + (((char *)ptb)[23] & 0xFF);
X		l2 = (((char *)ptb)[24] & 0xFF) * 256 + (((char *)ptb)[25] & 0xFF);
X		l1 *= 0x10000;
X		l1 += l2;
X		info->f_size = l1;
X		break;
X
X	case H_CPIO_CHR:
X	case H_CPIO_ODC:
X
X		astoo_cpio(&((char *)ptb)[6], &ul, 6);
X		info->f_dev = ul;
X		astoo_cpio(&((char *)ptb)[12], &ul, 6);
X		info->f_ino = ul;
X		astoo_cpio(&((char *)ptb)[18], &ul, 6);
X		info->f_mode = ul;
X		info->f_type = info->f_mode & S_IFMT;
X		info->f_mode = info->f_mode & 07777;
X		info->f_rxftype = info->f_xftype = IFTOXT(info->f_type);
X		info->f_filetype = XTTOST(info->f_xftype);
X		info->f_typeflag = XTTOUS(info->f_xftype);
X		astoo_cpio(&((char *)ptb)[24], &ul, 6);
X		info->f_uid = ul;
X		astoo_cpio(&((char *)ptb)[30], &ul, 6);
X		info->f_gid = ul;
X		astoo_cpio(&((char *)ptb)[36], &ul, 6);
X		if (is_dir(info) && !link_dirs)
X			ul = 1;
X		info->f_nlink = ul;
X		astoo_cpio(&((char *)ptb)[42], &ul, 6);
X		info->f_rdev = ul;
X		/*
X		 * This is undefined by POSIX.
X		 * Let us hope that all implementations will assume 8 bits
X		 * in the minor number.
X		 */
X		info->f_rdevmaj	= _dev_major(8, info->f_rdev);
X		info->f_rdevmin	= _dev_minor(8, info->f_rdev);
X		info->f_rdev = makedev(info->f_rdevmaj, info->f_rdevmin);
X
X		astoo_cpio(&((char *)ptb)[48], &ul, 11);
X		info->f_atime = info->f_mtime = info->f_ctime = (time_t)ul;
X
X		astoo_cpio(&((char *)ptb)[59], &ul, 6);
X		info->f_namelen = ul;
X
X		astoo_cpio(&((char *)ptb)[65], &ul, 11);
X		info->f_size = ul;
X		break;
X
X	case H_CPIO_ASC:
X	case H_CPIO_ACRC:
X
X		astoh_cpio(&((char *)ptb)[6], &ul, 8);
X		info->f_ino = ul;
X		astoh_cpio(&((char *)ptb)[14], &ul, 8);
X		info->f_mode = ul;
X		info->f_type = info->f_mode & S_IFMT;
X		info->f_mode = info->f_mode & 07777;
X		info->f_rxftype = info->f_xftype = IFTOXT(info->f_type);
X		info->f_filetype = XTTOST(info->f_xftype);
X		info->f_typeflag = XTTOUS(info->f_xftype);
X		astoh_cpio(&((char *)ptb)[22], &ul, 8);
X		info->f_uid = ul;
X		astoh_cpio(&((char *)ptb)[30], &ul, 8);
X		info->f_gid = ul;
X		astoh_cpio(&((char *)ptb)[38], &ul, 8);
X		if (is_dir(info) && !link_dirs)
X			ul = 1;
X		info->f_nlink = ul;
X
X		astoh_cpio(&((char *)ptb)[46], &ul, 8);
X		info->f_atime = info->f_mtime = info->f_ctime = (time_t)ul;
X
X		astoh_cpio(&((char *)ptb)[54], &ul, 8);
X		info->f_size = ul;
X
X		astoh_cpio(&((char *)ptb)[62], &ul, 8);
X		info->f_rdevmaj = ul;
X		astoh_cpio(&((char *)ptb)[70], &ul, 8);
X		info->f_rdevmin = ul;
X		info->f_dev = makedev(info->f_rdevmaj, info->f_rdevmin);
X
X		astoh_cpio(&((char *)ptb)[78], &ul, 8);
X		info->f_rdevmaj = ul;
X		astoh_cpio(&((char *)ptb)[86], &ul, 8);
X		info->f_rdevmin = ul;
X		info->f_rdev = makedev(info->f_rdevmaj, info->f_rdevmin);
X
X		astoh_cpio(&((char *)ptb)[94], &ul, 8);
X		info->f_namelen = ul;
X		break;
X
X	default:
X		errmsgno(EX_BAD, "Found CPIO type %ld/%d ", hdrtype, H_TYPE(hdrtype));
X		print_hdrtype(stderr, hdrtype);
X		comerrno(EX_BAD, "Can't handle this cpio archive type (yet).\n");
X	}
X
X	move.m_data = info->f_name;
X	move.m_flags = 0;
X	info->f_rsize = info->f_llsize = info->f_namelen;
X	info->f_flags |= F_LONGNAME;
X	if (xt_file(info, vp_move_from_arch, &move, 0, "moving file name") < 0)
X		die(EX_BAD);
X	info->f_flags &= ~F_LONGNAME;
X	info->f_flags &= ~F_DATA_SKIPPED;
X	info->f_rsize = info->f_llsize = info->f_size;
X	info->f_namelen -= 1;		/* Null byte */
X
X	info->f_lname[0] = '\0';
X	if (is_symlink(info)) {
X		move.m_data = info->f_lname;
X		move.m_flags = 0;
X		if (xt_file(info, vp_move_from_arch, &move, 0, "moving link name") < 0)
X			die(EX_BAD);
X		info->f_flags &= ~F_DATA_SKIPPED;
X		info->f_lname[info->f_size] = '\0';
X		info->f_rsize = info->f_llsize = 0;
X	}
X
X	if (!is_file(info))
X		info->f_rsize = info->f_llsize = 0;
X
X	if (info->f_namelen == 10 &&
X	    info->f_name[0] == 'T' &&
X	    strncmp(info->f_name, "TRAILER!!!", 10) == 0) {
X		extern	m_stats	*stats;
X
X		stats->eofblock = tblocks();
X
X		if (ignoreerr)
X			errmsgno(EX_BAD, "EOF Block at: %lld ignored.\n",
X							tblocks());
X		return (EOF);
X	}
X	if (info->f_nlink > 1) {
X		TCB	tb;
X		ul = info->f_rsize;
X		info->f_flags |= F_EXTRACT;
X		if (read_link(info->f_name, info->f_namelen, info, &tb)) {
X			info->f_typeflag = LNKTYPE;
X			info->f_rsize = ul;
X			return (0);
X		}
X		info->f_flags &= ~F_EXTRACT;
X		info->f_rsize = ul;
X	}
X	return (0);
X}
X
XEXPORT void
Xcpio_resync()
X{
X	comerrno(EX_BAD, "Cpio resync not yet implemented.\n");
X}
X
X/*
X * Check whether the archive is completely byte swapped.
X * Unfortunately, this only works if the strlen(f->f_name) is odd.
X */
XEXPORT int
Xcpio_checkswab(ptb)
X	register TCB	*ptb;
X{
X	long	l1;
X	long	l2;
X
X
X	l1 = (((char *)ptb)[20] & 0xFF) * 256 + (((char *)ptb)[21] & 0xFF);
X	l2 = (((char *)ptb)[21] & 0xFF) * 256 + (((char *)ptb)[20] & 0xFF);
X	if (l1 <= 257 || l2 <= 257) {
X		if (l2 <= 257)
X			l1 = l2;
X	}
X	if (((char *)ptb)[CPIOBIN_HDRSZ+l1-2] == '\0' &&
X	    ((char *)ptb)[CPIOBIN_HDRSZ+l1-1] != '\0')
X		return (H_SWAPPED(H_CPIO_BIN));
X	return (H_CPIO_BIN);
X}
X
X/*
X * This simple sum is used for the SYSvr4 file content CRC
X * Use Int32_t to implement the same behavior as the AT&T cpio command.
X */
XLOCAL Int32_t
Xcpio_cksum(name)
X	char	*name;
X{
X		char		buf[8192];
X		int		f = _fileopen(name, "rb");
X	register int		amt;
X	register char		*p;
X	register char		*ep;
X	register Int32_t	sum = 0;
X
X	if (f >= 0) {
X		while ((amt = _fileread(&f, buf, sizeof (buf))) > 0) {
X			p = buf;
X			ep = &p[amt];
X			while (p < ep) {
X				sum += (long)*p++;
X			}
X		}
X		if (amt < 0)
X			sum = -1;
X		close(f);
X	} else {
X		sum = -1;
X	}
X	return (sum);
X}
X
X/*
X * Convert octal string -> long int
X */
XLOCAL void
Xastoo_cpio(s, l, cnt)
X	register char	*s;
X		Ulong	*l;
X	register int	cnt;
X{
X	register Ulong	ret = 0L;
X	register char	c;
X	register int	t;
X
X	for (; cnt > 0; cnt--) {
X		c = *s++;
X		if (isoctal(c))
X			t = c - '0';
X		else
X			break;
X		ret *= 8;
X		ret += t;
X	}
X	*l = ret;
X}
X
X/*
X * Convert hex string -> long int
X */
XLOCAL void
Xastoh_cpio(s, l, cnt)
X	register char	*s;
X		Ulong	*l;
X	register int	cnt;
X{
X	register Ulong	ret = 0L;
X	register char	c;
X	register int	t;
X
X	for (; cnt > 0; cnt--) {
X		c = *s++;
X		if (isdigit(c))
X			t = c - '0';
X		else if (c >= 'a' && c <= 'f')
X			t = c - 'a' + 10;
X		else if (c >= 'A' && c <= 'F')
X			t = c - 'A' + 10;
X		else
X			break;
X		ret *= 16;
X		ret += t;
X	}
X	*l = ret;
X}
X
X/*
X * Convert long int -> hex string.
X */
XLOCAL void
Xlitoh_cpio(s, l, fieldw)
X		char	*s;
X	register Ulong	l;
X	register int	fieldw;
X{
X	register char	*p	= &s[fieldw];
X	register char	fill	= props.pr_fillc;
X
X	do {
X		*--p = "0123456789abcdef"[l%16];	/* Compiler optimiert */
X
X	} while (--fieldw > 0 && (l /= 16) > 0);
X
X	switch (fieldw) {
X
X	default:
X		break;
X	case 11:	*--p = fill;	/* FALLTHROUGH */
X	case 10:	*--p = fill;	/* FALLTHROUGH */
X	case 9:		*--p = fill;	/* FALLTHROUGH */
X	case 8:		*--p = fill;	/* FALLTHROUGH */
X	case 7:		*--p = fill;	/* FALLTHROUGH */
X	case 6:		*--p = fill;	/* FALLTHROUGH */
X	case 5:		*--p = fill;	/* FALLTHROUGH */
X	case 4:		*--p = fill;	/* FALLTHROUGH */
X	case 3:		*--p = fill;	/* FALLTHROUGH */
X	case 2:		*--p = fill;	/* FALLTHROUGH */
X	case 1:		*--p = fill;	/* FALLTHROUGH */
X	case 0:		break;
X	}
X}
END-of-star-1.5.2/star/cpiohdr.c
echo x - star-1.5.2/star/create.c
sed 's/^X//' >star-1.5.2/star/create.c << 'END-of-star-1.5.2/star/create.c'
X/* @(#)create.c	1.132 11/12/03 Copyright 1985, 1995, 2001-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)create.c	1.132 11/12/03 Copyright 1985, 1995, 2001-2011 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1985, 1995, 2001-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/errno.h>	/* XXX seterrno() is better JS */
X#include <schily/standard.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/dirent.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "restore.h"
X#ifdef	USE_FIND
X#include <schily/stat.h>	/* Fuer stat_to_info() in starsubs.h */
X#include <schily/walk.h>
X#include <schily/find.h>
X#endif
X#include "starsubs.h"
X#include "checkerr.h"
X#include "fifo.h"
X#include <schily/fetchdir.h>
X
X#ifdef	USE_ACL
X
X#ifdef	OWN_ACLTEXT
X#if	defined(UNIXWARE) && defined(HAVE_ACL)
X#	define	HAVE_SUN_ACL
X#	define	HAVE_ANY_ACL
X#endif
X#endif
X/*
X * HAVE_ANY_ACL currently includes HAVE_POSIX_ACL and HAVE_SUN_ACL.
X * This definition must be in sync with the definition in acl_unix.c
X * As USE_ACL is used in star.h, we are not allowed to change the
X * value of USE_ACL before we did include star.h or we may not include
X * star.h at all.
X * HAVE_HP_ACL is currently not included in HAVE_ANY_ACL.
X */
X#	ifndef	HAVE_ANY_ACL
X#	undef	USE_ACL		/* Do not try to get or set ACLs */
X#	endif
X#endif
X
Xstruct pdirs {
X	struct pdirs	*p_last;
X	dev_t		p_dev;
X	ino_t		p_ino;
X};
X
Xtypedef	struct	lname {
X	struct	lname	*l_lnext;	/* Next in list */
X		char	l_lname[1];	/* actually longer */
X} LNAME;
X
Xtypedef	struct	links {
X	struct	links	*l_next;	/* Next in list */
X	struct	lname	*l_lnames;	/* Link names for SVr4 cpio */
X		ino_t	l_ino;		/* Inode number (st_ino) */
X		dev_t	l_dev;		/* Filesys number (st_dev) */
X		Ulong	l_linkno;	/* Link serial number in compl. list */
X		long	l_nlink;	/* Link count for file */
X		short	l_namlen;	/* strlen(l_name) */
X		Uchar	l_flags;	/* Flags (see below) */
X		char	l_name[1];	/* actually longer */
X} LINKS;
X
X#define	L_ISDIR		1		/* This entry refers to a directory  */
X#define	L_ISLDIR	2		/* A dir, hard linked to another dir */
X#define	L_DATA		4		/* SVr4 cpio file data encountered   */
X
X#define	L_HSIZE		256		/* must be a power of two */
X
X#define	l_hash(info)	(((info)->f_ino + (info)->f_dev) & (L_HSIZE-1))
X
XLOCAL	LINKS	*links[L_HSIZE];
X
Xextern	FILE	*vpr;
Xextern	FILE	*listf;
X
Xextern	BOOL	pkglist;
Xextern	BOOL	multivol;
Xextern	long	hdrtype;
Xextern	BOOL	tape_isreg;
Xextern	dev_t	tape_dev;
Xextern	ino_t	tape_ino;
X#define	is_tape(info)		((info)->f_dev == tape_dev && (info)->f_ino == tape_ino)
X
Xextern	int	bufsize;
Xextern	char	*bigptr;
X
Xextern	BOOL	havepat;
Xextern	dev_t	curfs;
Xextern	Ullong	maxsize;
Xextern	struct timeval	Newer;
Xextern	Ullong	tsize;
Xextern	BOOL	prblockno;
Xextern	BOOL	debug;
Xextern	int	dumplevel;
Xextern	int	verbose;
Xextern	BOOL	silent;
Xextern	BOOL	readnull;
Xextern	BOOL	cflag;
Xextern	BOOL	uflag;
Xextern	BOOL	nodir;
Xextern	BOOL	acctime;
Xextern	BOOL	dirmode;
Xextern	BOOL	paxfollow;
Xextern	BOOL	doacl;
Xextern	BOOL	nodesc;
Xextern	BOOL	nomount;
Xextern	BOOL	interactive;
Xextern	BOOL	nospec;
Xextern	int	Fflag;
Xextern	BOOL	abs_path;
Xextern	BOOL	nowarn;
Xextern	BOOL	match_tree;
Xextern	BOOL	force_hole;
Xextern	BOOL	sparse;
Xextern	BOOL	Ctime;
Xextern	BOOL	nodump;
Xextern	BOOL	nullout;
Xextern	BOOL	linkdata;
Xextern	BOOL	link_dirs;
Xextern	BOOL	dodump;
Xextern	BOOL	dometa;
Xextern	BOOL	dumpmeta;
Xextern	BOOL	lowmem;
Xextern	BOOL	do_subst;
X
Xextern	int	intr;
X
X/*
X * Variables that control overwriting the stat() struct members
X * controlled by the pkglist= option.
X */
XLOCAL	BOOL	statmod = FALSE;
XLOCAL	uid_t	statuid = _BAD_UID;
XLOCAL	gid_t	statgid = _BAD_GID;
XLOCAL	mode_t	statmode = _BAD_MODE;
X
XEXPORT	void	checklinks	__PR((void));
XLOCAL	int	take_file	__PR((char *name, FINFO *info));
XEXPORT	int	_fileopen	__PR((char *name, char *mode));
XEXPORT	int	_fileread	__PR((int *fp, void *buf, int len));
XEXPORT	void	create		__PR((char *name, BOOL Hflag, BOOL forceadd));
XLOCAL	void	createi		__PR((char *sname, char *name, int namlen, FINFO *info, struct pdirs *last));
XEXPORT	void	createlist	__PR((void));
XLOCAL	BOOL	get_metainfo	__PR((char *line));
XEXPORT	BOOL	read_symlink	__PR((char *sname, char *name, FINFO *info, TCB *ptb));
XLOCAL	LINKS	*find_link	__PR((FINFO *info));
XEXPORT	BOOL	last_cpio_link	__PR((FINFO *info));
XEXPORT	BOOL	xcpio_link	__PR((FINFO *info));
XLOCAL	BOOL	acpio_link	__PR((FINFO *info));
XEXPORT	void	flushlinks	__PR((void));
XLOCAL	void	flush_link	__PR((LINKS *lp));
XEXPORT	BOOL	read_link	__PR((char *name, int namlen, FINFO *info,
X								TCB *ptb));
XLOCAL	int	nullread	__PR((void *vp, char *cp, int amt));
XEXPORT	void	put_file	__PR((int *fp, FINFO *info));
XEXPORT	void	cr_file		__PR((FINFO *info,
X					int (*)(void *, char *, int),
X					void *arg, int amt, char *text));
XLOCAL	void	put_dir		__PR((char *sname, char *dname, int namlen, FINFO *info,
X								TCB *ptb, struct pdirs *last));
XLOCAL	BOOL	checkdirexclude	__PR((char *sname, char *name, int namlen, FINFO *info));
XEXPORT	BOOL	checkexclude	__PR((char *sname, char *name, int namlen, FINFO *info));
X
X#ifdef	USE_FIND
XEXPORT	int	walkfunc	__PR((char *nm, struct stat *fs, int type, struct WALK *state));
X#endif
X
XEXPORT void
Xchecklinks()
X{
X	register LINKS	*lp;
X	register int	i;
X	register int	used	= 0;
X	register int	curlen;
X	register int	maxlen	= 0;
X	register int	nlinks	= 0;
X	register int	ndirs	= 0;
X	register int	nldirs	= 0;
X
X	for (i = 0; i < L_HSIZE; i++) {
X		if (links[i] == (LINKS *)NULL)
X			continue;
X
X		curlen = 0;
X		used++;
X
X		for (lp = links[i]; lp != (LINKS *)NULL; lp = lp->l_next) {
X			curlen++;
X			nlinks++;
X			if ((lp->l_flags & L_ISDIR) != 0) {
X				ndirs++;
X				if ((lp->l_flags & L_ISLDIR) != 0)
X					nldirs++;
X			} else if (lp->l_nlink != 0) {
X				/*
X				 * The fact that UNIX uses '.' and '..' as hard
X				 * links to directories on all known file
X				 * systems is a design bug. It makes it hard to
X				 * find hard links to directories. Note that
X				 * POSIX neither requires '.' and '..' to be
X				 * implemented as hard links nor that these
X				 * directories are physical present in the
X				 * directory content.
X				 * As it is hard to find all links (we would
X				 * need to stat all directories as well as all
X				 * '.' and '..' entries, we only warn for non
X				 * directories.
X				 */
X				if (cflag &&
X				    !errhidden(E_MISSLINK, lp->l_name)) {
X					if (!errwarnonly(E_MISSLINK, lp->l_name))
X						xstats.s_misslinks++;
X					errmsgno(EX_BAD,
X						"Missing links to '%s'.\n",
X								lp->l_name);
X					(void) errabort(E_MISSLINK, lp->l_name,
X									TRUE);
X				}
X			}
X		}
X		if (maxlen < curlen)
X			maxlen = curlen;
X	}
X	if (debug) {
X		if (link_dirs) {
X			errmsgno(EX_BAD, "entries: %d hashents: %d/%d maxlen: %d\n",
X						nlinks, used, L_HSIZE, maxlen);
X			errmsgno(EX_BAD, "hardlinks total: %d linked dirs: %d/%d linked files: %d \n",
X						nlinks+nldirs-ndirs, nldirs, ndirs, nlinks-ndirs);
X		} else {
X			errmsgno(EX_BAD, "hardlinks: %d hashents: %d/%d maxlen: %d\n",
X						nlinks, used, L_HSIZE, maxlen);
X		}
X	}
X}
X
X/*
X * Returns:
X *	TRUE	take file
X *	FALSE	do not take file
X *	-1	pattern did not match
X */
XLOCAL int
Xtake_file(name, info)
X	register char	*name;
X	register FINFO	*info;
X{
X	if ((info->f_flags & F_FORCE_ADD) != 0)
X		return (TRUE);
X	if (nodump && (info->f_flags & F_NODUMP) != 0)
X		return (FALSE);
X
X	if (havepat && !match(name)) {
X		return (-1);
X			/* Bei Directories ist f_size == 0 */
X	} else if (maxsize && info->f_size > maxsize) {
X		return (FALSE);
X	} else if (dumplevel > 0) {
X		/*
X		 * For now, we cannot reliably deal with sub-second granularity
X		 * on all platforms. For this reason, some files to be on two
X		 * incrementals to make sure not to miss them completely.
X		 */
X		if (info->f_mtime >= Newer.tv_sec) {
X			/* EMPTY */
X			;
X		} else if (info->f_ctime >= Newer.tv_sec) {
X			if (dumpmeta)
X				info->f_xftype = XT_META;
X		} else {
X			return (FALSE);
X		}
X
X	} else if (Newer.tv_sec && (Ctime ? info->f_ctime:info->f_mtime) <=
X								Newer.tv_sec) {
X		/*
X		 * XXX nsec beachten wenn im Archiv!
X		 */
X		return (FALSE);
X	} else if (uflag && !update_newer(info)) {
X		return (FALSE);
X	} else if (!multivol &&
X		    tsize > 0 && tsize < (tarblocks(info->f_size)+1+2)) {
X		if (!errhidden(E_FILETOOBIG, name)) {
X			if (!errwarnonly(E_FILETOOBIG, name))
X				xstats.s_toobig++;
X			errmsgno(EX_BAD,
X			"'%s' does not fit on tape. Not dumped.\n",
X								name);
X			(void) errabort(E_FILETOOBIG, name, TRUE);
X		}
X		return (FALSE);
X	} else if (props.pr_maxsize > 0 && info->f_size > props.pr_maxsize) {
X		if (!errhidden(E_FILETOOBIG, name)) {
X			if (!errwarnonly(E_FILETOOBIG, name))
X				xstats.s_toobig++;
X			errmsgno(EX_BAD,
X			"'%s' file too big for current mode. Not dumped.\n",
X								name);
X			(void) errabort(E_FILETOOBIG, name, TRUE);
X		}
X		return (FALSE);
X	} else if (pr_unsuptype(info)) {
X		if (!errhidden(E_SPECIALFILE, name)) {
X			if (!errwarnonly(E_SPECIALFILE, name))
X				xstats.s_isspecial++;
X			errmsgno(EX_BAD,
X			"'%s' unsupported file type '%s'. Not dumped.\n",
X				name,  XTTONAME(info->f_xftype));
X			(void) errabort(E_SPECIALFILE, name, TRUE);
X		}
X		return (FALSE);
X	} else if (is_special(info) && nospec) {
X		if (!errhidden(E_SPECIALFILE, name)) {
X			if (!errwarnonly(E_SPECIALFILE, name))
X				xstats.s_isspecial++;
X			errmsgno(EX_BAD,
X			"'%s' is not a file. Not dumped.\n", name);
X			(void) errabort(E_SPECIALFILE, name, TRUE);
X		}
X		return (FALSE);
X	} else if (tape_isreg && is_tape(info)) {
X		errmsgno(EX_BAD, "'%s' is the archive. Not dumped.\n", name);
X		return (FALSE);
X	}
X	if (is_file(info) && dometa) {
X		/*
X		 * This is the right place for this code although it does not
X		 * look correct. Later in star-1.5 we decide here, based on
X		 * mtime and ctime of the file, whether we archive a file at
X		 * all and whether we only add the file's metadata.
X		 */
X		info->f_xftype = XT_META;
X		if (pr_unsuptype(info)) {
X			if (!errhidden(E_SPECIALFILE, name)) {
X				if (!errwarnonly(E_SPECIALFILE, name))
X					xstats.s_isspecial++;
X				errmsgno(EX_BAD,
X				"'%s' unsupported file type '%s'. Not dumped.\n",
X				name,  XTTONAME(info->f_xftype));
X				(void) errabort(E_SPECIALFILE, name, TRUE);
X			}
X			return (FALSE);
X		}
X	}
X#ifdef	USE_ACL
X	/*
X	 * If we return (FALSE) here, the file would not be archived at all.
X	 * This is not what we want, so ignore return code from get_acls().
X	 */
X	if (doacl)
X		(void) get_acls(info);
X#endif  /* USE_ACL */
X	return (TRUE);
X}
X
Xint
X_fileopen(name, smode)
X	char	*name;
X	char	*smode;
X{
X	int	ret;
X	int	omode = 0;
X	int	flag = 0;
X
X	if (!_cvmod(smode, &omode, &flag))
X		return (-1);
X
Xretry:
X	if ((ret = _openfd(name, omode)) < 0) {
X		if (geterrno() == EINTR)
X			goto retry;
X		return (-1);
X	}
X
X	return (ret);
X}
X
Xint
X_fileread(fp, buf, len)
X	register int	*fp;
X	void	*buf;
X	int	len;
X{
X	register int	fd = *fp;
X	register int	ret;
X		int	errcnt = 0;
X
Xretry:
X	while ((ret = read(fd, buf, len)) < 0 && geterrno() == EINTR)
X		/* LINTED */
X		;
X	if (ret < 0 && geterrno() == EINVAL && ++errcnt < 100) {
X		off_t oo;
X		off_t si;
X
X		/*
X		 * Work around the problem that we cannot read()
X		 * if the buffer crosses 2 GB in non large file mode.
X		 */
X		oo = lseek(fd, (off_t)0, SEEK_CUR);
X		if (oo == (off_t)-1)
X			return (ret);
X		si = lseek(fd, (off_t)0, SEEK_END);
X		if (si == (off_t)-1)
X			return (ret);
X		if (lseek(fd, oo, SEEK_SET) == (off_t)-1)
X			return (ret);
X		if (oo >= si) {	/* EOF */
X			ret = 0;
X		} else if ((si - oo) <= len) {
X			len = si - oo;
X			goto retry;
X		}
X	}
X	return (ret);
X}
X
XEXPORT void
Xcreate(name, Hflag, forceadd)
X	register char	*name;
X		BOOL	Hflag;
X		BOOL	forceadd;
X{
X		FINFO	finfo;
X	register FINFO	*info	= &finfo;
X		BOOL	opaxfollow = paxfollow;	/* paxfollow supersedes follow */
X
X	if (name[0] == '.' && name[1] == '/') {
X		for (name++; name[0] == '/'; name++)
X			/* LINTED */
X			;
X	}
X	if (name[0] == '\0')
X		name = ".";
X	if (Hflag)
X		paxfollow = Hflag;
X	if (!getinfo(name, info)) {
X		paxfollow = opaxfollow;
X		if (!errhidden(E_STAT, name)) {
X			if (!errwarnonly(E_STAT, name))
X				xstats.s_staterrs++;
X			errmsg("Cannot stat '%s'.\n", name);
X			(void) errabort(E_STAT, name, TRUE);
X		}
X		return;
X	}
X	if (forceadd)
X		info->f_flags |= F_FORCE_ADD;
X	paxfollow = opaxfollow;
X	createi(name, name, strlen(name), info, (struct pdirs *)0);
X}
X
XLOCAL void
Xcreatei(sname, name, namlen, info, last)
X		char	*sname;
X	register char	*name;
X		int	namlen;
X	register FINFO	*info;
X		struct pdirs *last;
X{
X		char	lname[PATH_MAX+1];
X		TCB	tb;
X	register TCB	*ptb		= &tb;
X		int	fd		= -1;
X		BOOL	was_link	= FALSE;
X		BOOL	do_sparse	= FALSE;
X
X	if (hash_xlookup(name))
X		return;
X
X	info->f_sname = sname;
X	info->f_name = name;	/* XXX Das ist auch in getinfo !!!?!!! */
X	info->f_namelen = namlen;
X	if (Fflag > 0 && !checkexclude(sname, name, namlen, info))
X		return;
X
X#ifdef	nonono_NICHT_BEI_CREATE	/* XXX */
X	if (!abs_path &&	/* XXX VVV siehe skip_slash() */
X		(info->f_name[0] == '/' /* || info->f_lname[0] == '/' */))
X		skip_slash(info);
X		info->f_namelen -= info->f_name - name;
X		if (info->f_namelen == 0) {
X			info->f_name = "./";
X			info->f_namelen = 2;
X		}
X		/* XXX das gleiche mit f_lname !!!!! */
X	}
X#endif	/* nonono_NICHT_BEI_CREATE	XXX */
X	info->f_lname = lname;	/* XXX nur Übergangsweise!!!!! */
X	info->f_lnamelen = 0;
X
X	if (prblockno)
X		(void) tblocks();		/* set curblockno */
X
X	if (do_subst && subst(info)) {
X		if (info->f_name[0] == '\0') {
X			if (verbose)
X			fprintf(vpr,
X				"'%s' substitutes to null string, skipping ...\n",
X							name);
X			return;
X		}
X	}
X
X	if (statmod) {
X		if (statmode != _BAD_MODE)
X			info->f_mode = statmode;
X		if (statuid != _BAD_UID)
X			info->f_uid = statuid;
X		if (statgid != _BAD_GID)
X			info->f_gid = statgid;
X	}
X
X	if (!(dirmode && is_dir(info)) &&
X				(info->f_namelen <= props.pr_maxsname)) {
X		/*
X		 * Allocate TCB from the buffer to avoid copying TCB
X		 * in the most frequent case.
X		 * If we are writing directories after the files they
X		 * contain, we cannot allocate the space for tcb
X		 * from the buffer.
X		 * With very long names we will have to write out
X		 * other data before we can write the TCB, so we cannot
X		 * alloc tcb from buffer too.
X		 */
X		if ((ptb = (TCB *)get_block(props.pr_hdrsize)) == NULL)
X			ptb = &tb;
X		else
X			info->f_flags |= F_TCB_BUF;
X	}
X	info->f_tcb = ptb;
X	if ((props.pr_flags & PR_CPIO) == 0)
X		filltcb(ptb);
X	if (!name_to_tcb(info, ptb))	/* Name too long */
X		return;
X
X#ifndef	__PRE_CPIO__
X	if (is_symlink(info) && !read_symlink(sname, name, info, ptb)) {
X		return;
X	}
X#endif
X	info_to_tcb(info, ptb);
X	if (is_dir(info)) {
X		/*
X		 * If we have been requested to check for hard linked
X		 * directories, first look for possible hard links.
X		 */
X		if (link_dirs && /* info->f_nlink > 1 && */ read_link(name, namlen, info, ptb))
X			was_link = TRUE;
X
X		if (was_link && !is_link(info))	/* link name too long */
X			return;
X
X		if (was_link && take_file(name, info) > 0) {
X			put_tcb(ptb, info);
X			vprint(info);
X		} else {
X			put_dir(sname, name, namlen, info, ptb, last);
X		}
X	} else if (take_file(name, info) <= 0) {	/* < TRUE */
X		return;
X	} else if (interactive && !ia_change(ptb, info)) {
X		fprintf(vpr, "Skipping ...\n");
X#ifdef	__PRE_CPIO__
X	} else if (is_symlink(info) && !read_symlink(sname, name, info, ptb)) {
X		/* EMPTY */
X		;
X#endif
X	} else if (is_meta(info)) {
X		/*
X		 * XXX Currently only TAR supports meta files.
X		 * XXX If we ever change this, we may need to remove the
X		 * XXX ptb->dbuf references here.
X		 */
X		if (info->f_nlink > 1 && read_link(name, namlen, info, ptb))
X			was_link = TRUE;
X
X		if (was_link && !is_link(info))	/* link name too long */
X			return;
X
X		if (!was_link) {
X			/*
X			 * XXX We definitely do not want that other tar
X			 * XXX implementations are able to read tar archives
X			 * XXX that contain meta files.
X			 * XXX If a tar implementation that does not understand
X			 * XXX meta files extracts archives with meta files,
X			 * XXX it will most likely destroy old files on disk.
X			 */
X			ptb->dbuf.t_linkflag = LF_META;
X			info->f_flags &= ~F_SPLIT_NAME;
X			if (ptb->dbuf.t_prefix[0] != '\0')
X				fillbytes(ptb->dbuf.t_prefix, props.pr_maxprefix, '\0');
X			if (props.pr_flags & PR_XHDR)
X				info->f_xflags |= XF_PATH;
X			else
X				info->f_flags |= F_LONGNAME;
X			ptb->dbuf.t_name[0] = 0;	/* Hide P-1988 name */
X			info_to_tcb(info, ptb);
X		}
X		put_tcb(ptb, info);
X		vprint(info);
X		return;
X
X	} else if (is_file(info) && info->f_size != 0 && !nullout &&
X				(fd = _fileopen(sname, "rb")) < 0) {
X		if (!errhidden(E_OPEN, name)) {
X			if (!errwarnonly(E_OPEN, name))
X				xstats.s_openerrs++;
X			errmsg("Cannot open '%s'.\n", name);
X			(void) errabort(E_OPEN, name, TRUE);
X		}
X	} else {
X		if (info->f_nlink > 1 && read_link(name, namlen, info, ptb) &&
X		    !linkdata) {
X			was_link = TRUE;
X		}
X		if (was_link && !is_link(info))	{ /* link name too long */
X			if (fd >= 0)
X				close(fd);
X			return;
X		}
X		/*
X		 * Special treatment for the idiosyncratic way of dealing with
X		 * hard links in the SVr4 CRC cpio archive format.
X		 * The link count is handled by calling read_link() in
X		 * cpiotcb_to_info() before.
X		 */
X		if ((props.pr_flags & PR_SV_CPIO_LINKS) != 0 &&
X		    info->f_nlink > 1) {
X			if (!last_cpio_link(info)) {	/* Ign. all but last */
X				if (fd >= 0)
X					close(fd);
X				return;
X			}
X			if (acpio_link(info)) {		/* Now extract all   */
X				put_file(&fd, info);
X				goto out;
X			}
X			/*
X			 * If the link count is increasing, do it the same way
X			 * as SVr4 cpio and archive the rest as plain files.
X			 */
X			if (is_file(info))
X				info->f_rsize = info->f_size;
X			info->f_xftype = info->f_rxftype;
X		}
X
X		if (!is_file(info) || was_link || info->f_rsize == 0) {
X			/*
X			 * Don't dump the content of hardlinks and empty files.
X			 * Hardlinks currently have f_rsize == 0 !
X			 */
X			put_tcb(ptb, info);
X			vprint(info);
X			if (fd >= 0)
X				close(fd);
X			return;
X		}
X
X		/*
X		 * In case we like to do sparse file handling via SEEK_HOLE we need
X		 * an open fd in order to check for a sparse file.
X		 */
X		do_sparse = sparse && (props.pr_flags & PR_SPARSE);
X		if (do_sparse && nullout &&
X				(fd = _fileopen(sname, "rb")) < 0) {
X			if (!errhidden(E_OPEN, name)) {
X				if (!errwarnonly(E_OPEN, name))
X					xstats.s_openerrs++;
X				errmsg("Cannot open '%s'.\n", name);
X				(void) errabort(E_OPEN, name, TRUE);
X			}
X			return;
X		}
X
X		if (do_sparse && sparse_file(&fd, info)) {
X			if (!silent)
X				error("'%s' is sparse\n", info->f_name);
X			put_sparse(&fd, info);
X		} else if (do_sparse && force_hole) {
X			/*
X			 * Treat all files as sparse when -force-hole
X			 * option is given.
X			 */
X			if (!silent)
X				error("Treating '%s' as sparse\n", info->f_name);
X			put_sparse(&fd, info);
X		} else {
X			put_tcb(ptb, info);
X			vprint(info);
X			put_file(&fd, info);
X		}
X		/*
X		 * Reset access time of file.
X		 * This is important when using star for dumps.
X		 * N.B. this has been done after fclose()
X		 * before _FIOSATIME has been used.
X		 *
X		 * If f == NULL, the file has not been accessed for read
X		 * and access time need not be reset.
X		 */
Xout:
X		if (acctime && fd >= 0)
X			rs_acctime(fd, info);
X		if (fd >= 0)
X			close(fd);
X	}
X}
X
XEXPORT void
Xcreatelist()
X{
X	register int	nlen;
X		char	*name;
X		int	nsize = PATH_MAX+1+512;	/* wegen laenge !!! */
X
X	/*
X	 * We need at least PATH_MAX+1 and add 512 to get better messages below
X	 */
X	name = ___malloc(nsize, "name buffer");
X
X	for (nlen = 1; nlen > 0; ) {
X		if ((nlen = readnull ? ngetline(listf, name, nsize) :
X					fgetline(listf, name, nsize)) < 0)
X			break;
X		if (nlen == 0)
X			continue;
X		if (pkglist) {
X			if (!get_metainfo(name))
X				continue;
X			nlen = strlen(name);
X		}
X		if (nlen >= PATH_MAX) {
X			if (!errhidden(E_NAMETOOLONG, name)) {
X				if (!errwarnonly(E_NAMETOOLONG, name))
X					xstats.s_toolong++;
X				errmsgno(EX_BAD,
X				"%s: Name too long (%d >= %d).\n",
X							name, nlen, PATH_MAX);
X				(void) errabort(E_NAMETOOLONG, name, TRUE);
X			}
X			continue;
X		}
X		if (intr)
X			break;
X		curfs = NODEV;
X		create(name, FALSE, FALSE); /* XXX Liste doch wie Kommandozeile? */
X	}
X	free(name);
X}
X
XLOCAL BOOL
Xget_metainfo(line)
X	char	*line;
X{
X	char	*p;
X	char	*p2;
X	uid_t	uid;
X	gid_t	gid;
X	long	lid;
X
X	p = strchr(line, ' ');
X	if (p == NULL) {
X		statmod = FALSE;
X		return (TRUE);
X	}
X
X	*p++ = '\0';
X	statmod = TRUE;
X	statmode = _BAD_MODE;
X	statuid = _BAD_UID;
X	statgid = _BAD_GID;
X	if (*p == '?') {
X		p2 = ++p;
X	} else {
X		p2 = astolb(p, &lid, 8);
X		if (*p2 == ' ')
X			statmode = lid;
X	}
X	if (*p2 == ' ') {
X		p = ++p2;
X	} else {
X		errmsgno(EX_BAD, "%s: illegal mode\n", line);
X		return (FALSE);
X	}
X	p2 = strchr(p, ' ');
X	if (p2 != NULL) {
X		*p2++ = '\0';
X	} else {
X		errmsgno(EX_BAD, "%s: illegal uid\n", line);
X		return (FALSE);
X	}
X	if (!streql(p, "?") && ic_uidname(p, strlen(p), &uid))
X		statuid = uid;
X	p = p2;
X	if (!streql(p, "?") && ic_gidname(p, strlen(p), &gid))
X		statgid = gid;
X
X	return (TRUE);
X}
X
XEXPORT BOOL
Xread_symlink(sname, name, info, ptb)
X	char	*sname;
X	char	*name;
X	register FINFO	*info;
X	TCB	*ptb;
X{
X	int	len;
X
X	info->f_lname[0] = '\0';
X
X#ifdef	HAVE_READLINK
X	if ((len = readlink(sname, info->f_lname, PATH_MAX)) < 0) {
X		if (!errhidden(E_READLINK, name)) {
X			if (!errwarnonly(E_READLINK, name))
X				xstats.s_rwerrs++;
X			errmsg("Cannot read link '%s'.\n", name);
X			(void) errabort(E_READLINK, name, TRUE);
X		}
X		return (FALSE);
X	}
X	info->f_lnamelen = len;
X	/*
X	 * string from readlink is not null terminated
X	 */
X	info->f_lname[len] = '\0';
X
X	if (len > props.pr_maxlnamelen) {
X		if (!errhidden(E_NAMETOOLONG, name)) {
X			if (!errwarnonly(E_NAMETOOLONG, name))
X				xstats.s_toolong++;
X			errmsgno(EX_BAD,
X			"%s: Symbolic link too long.\n", name);
X			(void) errabort(E_NAMETOOLONG, name, TRUE);
X		}
X		return (FALSE);
X	}
X	if ((props.pr_flags & PR_CPIO) != 0)
X		return (TRUE);
X
X	if (len > props.pr_maxslname) {
X		if (props.pr_flags & PR_XHDR)
X			info->f_xflags |= XF_LINKPATH;
X		else
X			info->f_flags |= F_LONGLINK;
X	}
X	/*
X	 * if linkname is not longer than props.pr_maxslname
X	 * that's all to do with linkname
X	 */
X	strncpy(ptb->dbuf.t_linkname, info->f_lname, props.pr_maxslname);
X	return (TRUE);
X#else
X	if (!errhidden(E_SPECIALFILE, name)) {
X		if (!errwarnonly(E_SPECIALFILE, name))
X			xstats.s_isspecial++;
X		errmsgno(EX_BAD,
X		"'%s' unsupported file type '%s'. Not dumped.\n",
X				name,  XTTONAME(info->f_xftype));
X		(void) errabort(E_SPECIALFILE, name, TRUE);
X	}
X	return (FALSE);
X#endif
X}
X
XLOCAL LINKS *
Xfind_link(info)
X	register FINFO	*info;
X{
X	register LINKS	*lp;
X
X	lp = links[l_hash(info)];
X
X	for (; lp != (LINKS *)NULL; lp = lp->l_next) {
X		if (lp->l_ino == info->f_ino && lp->l_dev == info->f_dev)
X			return (lp);
X	}
X	return ((LINKS *)NULL);
X}
X
X/*
X * Return TRUE in case we found the last entry (the one that may have data)
X * for a specific file.
X */
XEXPORT BOOL
Xlast_cpio_link(info)
X	register FINFO	*info;
X{
X	register LINKS	*lp;
X
X	if ((lp = find_link(info)) != NULL) {
X		if ((!cflag && info->f_size > 0) ||
X		    lp->l_nlink <= 0 ||
X		    (lp->l_flags & L_DATA) != 0)
X			return (TRUE);
X		return (FALSE);
X	}
X	return (TRUE);
X}
X
X/*
X * Extract all cpio CRC links.
X * XXX This should be in extract.c
X */
XEXPORT BOOL
Xxcpio_link(info)
X	register FINFO	*info;
X{
X	register LINKS	*lp;
X		char	*name = info->f_name;
X		char	*lname = info->f_lname;
X		off_t	rsize = info->f_rsize;
X		int	xftype = info->f_xftype;
X
X	if ((lp = find_link(info)) != NULL) {
X		/*
X		 * We come here if the link count increases and we need to
X		 * archive more "files" as expected.
X		 */
X		if ((lp->l_flags & L_DATA) != 0)
X			return (FALSE);
X	}
X	info->f_xftype = info->f_rxftype;
X	extracti(info, NULL);			/* Extract as real node */
X	info->f_xftype = xftype;
X	info->f_rsize = 0;
X
X	if (lp != NULL) {
X		register LNAME	*ln;
X
X		lp->l_flags |= L_DATA;
X		info->f_lname = name;
X		info->f_name = lp->l_name;
X		extracti(info, NULL);		/* Extract link info->f_lname */
X
X		for (ln = lp->l_lnames; ln; ln = ln->l_lnext) {
X			if (streql(name, ln->l_lname))
X				continue;
X			info->f_name = ln->l_lname;
X			extracti(info, NULL);	/* Extract all other links */
X		}
X	}
X	info->f_name = name;
X	info->f_lname = lname;
X	info->f_rsize = rsize;
X	return (TRUE);
X}
X
X/*
X * Archive all cpio CRC links.
X */
XLOCAL BOOL
Xacpio_link(info)
X	register FINFO	*info;
X{
X		TCB	tb;
X	register TCB	*ptb = info->f_tcb;
X	register LINKS	*lp;
X		int	namelen = info->f_namelen;
X		char	*name = info->f_name;
X		char	*lname = info->f_lname;
X		off_t	size = info->f_size;
X		off_t	rsize = info->f_rsize;
X
X	if ((lp = find_link(info)) != NULL) {
X		/*
X		 * We come here if the link count increases and we need to
X		 * archive more "files" as expected.
X		 */
X		if ((lp->l_flags & L_DATA) != 0)
X			return (FALSE);
X	}
X
X	info->f_size = 0;
X	info->f_rsize = 0;
X
X	if (lp != NULL) {
X		register LNAME	*ln;
X
X		lp->l_flags |= L_DATA;
X		info->f_lname = name;
X		info->f_namelen = strlen(lp->l_name);
X		info->f_name = lp->l_name;
X		info_to_tcb(info, ptb);
X		put_tcb(ptb, info);
X		vprint(info);
X
X		for (ln = lp->l_lnames; ln; ln = ln->l_lnext) {
X			if (streql(name, ln->l_lname))
X				continue;
X			info->f_namelen = strlen(ln->l_lname);
X			info->f_name = ln->l_lname;
X			info->f_flags &= ~F_TCB_BUF;
X			if ((ptb = (TCB *)get_block(props.pr_hdrsize)) == NULL)
X				ptb = &tb;
X			else
X				info->f_flags |= F_TCB_BUF;
X			info->f_tcb = ptb;
X			info_to_tcb(info, ptb);
X			put_tcb(ptb, info);
X			vprint(info);
X		}
X	}
X	info->f_namelen = namelen;
X	info->f_name  = name;
X	info->f_lname = lname;
X	info->f_size  = size;
X	info->f_rsize = rsize;
X	info->f_rsize = size;
X	info->f_xftype = info->f_rxftype;
X
X	info->f_flags &= ~F_TCB_BUF;
X	if ((ptb = (TCB *)get_block(props.pr_hdrsize)) == NULL)
X		ptb = &tb;
X	else
X		info->f_flags |= F_TCB_BUF;
X	info->f_tcb = ptb;
X	info_to_tcb(info, ptb);
X	put_tcb(ptb, info);
X	vprint(info);
X	return (TRUE);
X}
X
X/*
X * Flush all SVr4 cpio -Hcrc links that have not yet been archived.
X */
XEXPORT void
Xflushlinks()
X{
X	register LINKS	*lp;
X	register int	i;
X
X	if ((props.pr_flags & PR_SV_CPIO_LINKS) == 0)
X		return;
X
X	for (i = 0; i < L_HSIZE; i++) {
X		if (links[i] == (LINKS *)NULL)
X			continue;
X
X		for (lp = links[i]; lp != (LINKS *)NULL; lp = lp->l_next) {
X			if ((lp->l_flags & (L_ISDIR|L_DATA)) == 0 &&
X			    (lp->l_nlink > 0))
X				flush_link(lp);
X		}
X	}
X}
X
X/*
X * Flush a single cpio -Hcrc link.
X */
XLOCAL void
Xflush_link(lp)
X	register LINKS	*lp;
X{
X		TCB	tb;
X		TCB	*ptb;
X		FINFO	finfo;
X	register LNAME	*ln;
X		int	fd = 1;
X		BOOL	did_stat;
X		char	*name;
X
X	finfo.f_flags &= ~F_TCB_BUF;
X	if ((ptb = (TCB *)get_block(props.pr_hdrsize)) == NULL)
X		ptb = &tb;
X	else
X		finfo.f_flags |= F_TCB_BUF;
X	did_stat = getinfo(lp->l_name, &finfo);
X	name = lp->l_name;
X	for (ln = lp->l_lnames; ln; ln = ln->l_lnext) {
X		if (!did_stat) {
X			did_stat = getinfo(ln->l_lname, &finfo);
X			if (did_stat)
X				name = ln->l_lname;
X		}
X		fd++;
X	}
X	if (!did_stat) {
X		if (!errhidden(E_STAT, lp->l_name)) {
X			if (!errwarnonly(E_STAT, lp->l_name))
X				xstats.s_staterrs++;
X			errmsg("Cannot stat '%s'.\n", lp->l_name);
X			(void) errabort(E_STAT, lp->l_name, TRUE);
X		}
X		return;
X	}
X	finfo.f_name = lp->l_name;
X	finfo.f_namelen = strlen(lp->l_name);
X	finfo.f_lname = "";	/* XXX nur Übergangsweise!!!!! */
X	finfo.f_lnamelen = 0;
X
X	finfo.f_nlink = fd;
X	finfo.f_xftype = XT_LINK;
X	finfo.f_tcb = ptb;
X	fd = -1;
X	if (is_file(&finfo) && finfo.f_size != 0 && !nullout &&
X				(fd = _fileopen(name, "rb")) < 0) {
X		if (!errhidden(E_OPEN, name)) {
X			if (!errwarnonly(E_OPEN, name))
X				xstats.s_openerrs++;
X			errmsg("Cannot open '%s'.\n", name);
X			(void) errabort(E_OPEN, name, TRUE);
X		}
X		return;
X	}
X	if (acpio_link(&finfo))
X		put_file(&fd, &finfo);
X
X	if (acctime && fd >= 0)
X		rs_acctime(fd, &finfo);
X	if (fd >= 0)
X		close(fd);
X}
X
X/*
X * Cheating with st_dev & st_ino for CPIO:
X *	Do not use inode number 0 and start st_dev from an
X *	obscure value...
X */
X#define	dev_from_linkno(n)	(0x5555 + ((n) / 0xFFFF))
X#define	ino_from_linkno(n)	(1 +	  ((n) % 0xFFFF))
X
XEXPORT BOOL
Xread_link(name, namlen, info, ptb)
X	char	*name;
X	int	namlen;
X	register FINFO	*info;
X	TCB	*ptb;
X{
X	register LINKS	*lp;
X	static	Ulong	linkno = 0;
X
X	if ((lp = find_link(info)) != NULL) {
X		if (lp->l_namlen > props.pr_maxlnamelen) {
X			if (!errhidden(E_NAMETOOLONG, lp->l_name)) {
X				if (!errwarnonly(E_NAMETOOLONG, lp->l_name))
X					xstats.s_toolong++;
X				errmsgno(EX_BAD,
X				"%s: Link name too long.\n",
X							lp->l_name);
X				(void) errabort(E_NAMETOOLONG, lp->l_name,
X								TRUE);
X			}
X			return (TRUE);
X		}
X		if (lp->l_namlen > props.pr_maxslname) {
X			if (props.pr_flags & PR_XHDR)
X				info->f_xflags |= XF_LINKPATH;
X			else
X				info->f_flags |= F_LONGLINK;
X		}
X		if (--lp->l_nlink < 0) {
X			if (!nowarn && (info->f_flags & F_EXTRACT) == 0)
X				errmsgno(EX_BAD,
X				"%s: Linkcount below zero (%ld)\n",
X					lp->l_name, lp->l_nlink);
X		}
X		/*
X		 * We found a hard link to a directory that is already
X		 * known in the link cache. Mark it for later
X		 * statistical analysis.
X		 */
X		if (lp->l_flags & L_ISDIR)
X			lp->l_flags |= L_ISLDIR;
X		/*
X		 * if linkname is not longer than props.pr_maxslname
X		 * that's all to do with linkname
X		 */
X		if ((props.pr_flags & PR_CPIO) == 0) {
X			strncpy(ptb->dbuf.t_linkname, lp->l_name,
X						props.pr_maxslname);
X		}
X		info->f_lname = lp->l_name;
X		info->f_lnamelen = lp->l_namlen;
X		info->f_xftype = XT_LINK;
X
X		/*
X		 * With POSIX-1988, f_rsize is 0 for hardlinks
X		 *
X		 * XXX Should we add a property for old tar
X		 * XXX compatibility to keep the size field as before?
X		 */
X		if (!linkdata)
X			info->f_rsize = (off_t)0;
X		/*
X		 * XXX This is the wrong place but the TCB has already
X		 * XXX been set up (including size field) before.
X		 * XXX We only call info_to_tcb() to change size to 0.
X		 * XXX There should be a better way to deal with TCB.
X		 */
X		if ((info->f_flags & F_EXTRACT) == 0) {
X			/*
X			 * XXX Nicht bei extrakt
X			 */
X			info->f_dev = dev_from_linkno(lp->l_linkno);
X			info->f_ino = ino_from_linkno(lp->l_linkno);
X			info_to_tcb(info, ptb);
X			info->f_dev = lp->l_dev;
X			info->f_ino = lp->l_ino;
X		}
X		/*
X		 * XXX Dies ist eine ungewollte Referenz auf den
X		 * XXX TAR Control Block, aber hier ist der TCB
X		 * XXX schon fertig und wir wollen nur den Typ
X		 * XXX Modifizieren.
X		 */
X		if ((props.pr_flags & PR_CPIO) == 0)
X			ptb->dbuf.t_linkflag = LNKTYPE;
X		if ((props.pr_flags & PR_SV_CPIO_LINKS) != 0) {
X			register LNAME	*ln;
X
X			ln = (LNAME *)malloc(sizeof (*ln)+namlen);
X			if (ln == NULL) {
X				errmsg(
X				"Cannot alloc new link name for '%s'.\n",
X					name);
X			} else {
X				strcpy(ln->l_lname, name);
X				ln->l_lnext = lp->l_lnames;
X				lp->l_lnames = ln;
X			}
X		}
X		return (TRUE);
X	}
X	if ((lp = (LINKS *)malloc(sizeof (*lp)+namlen)) == (LINKS *)NULL) {
X		errmsg("Cannot alloc new link for '%s'.\n", name);
X	} else {
X		register LINKS	**lpp = &links[l_hash(info)];
X
X		lp->l_next = *lpp;
X		*lpp = lp;
X		lp->l_lnames = NULL;
X		lp->l_linkno = linkno++;
X		lp->l_ino = info->f_ino;
X		lp->l_dev = info->f_dev;
X		lp->l_nlink = info->f_nlink - 1;
X		lp->l_namlen = namlen;
X		if (is_dir(info))
X			lp->l_flags = L_ISDIR;
X		else
X			lp->l_flags = 0;
X		strcpy(lp->l_name, name);
X
X		if ((info->f_flags & F_EXTRACT) == 0) {
X			/*
X			 * XXX Nicht bei extrakt
X			 */
X			info->f_dev = dev_from_linkno(lp->l_linkno);
X			info->f_ino = ino_from_linkno(lp->l_linkno);
X			info_to_tcb(info, ptb);
X			info->f_dev = lp->l_dev;
X			info->f_ino = lp->l_ino;
X		}
X	}
X	return (FALSE);
X}
X
X/* ARGSUSED */
XLOCAL int
Xnullread(vp, cp, amt)
X	void	*vp;
X	char	*cp;
X	int	amt;
X{
X	return (amt);
X}
X
XEXPORT void
Xput_file(fp, info)
X	register int	*fp;
X	register FINFO	*info;
X{
X	if (nullout) {
X		cr_file(info, (int(*)__PR((void *, char *, int)))nullread,
X							fp, 0, "reading");
X	} else {
X		cr_file(info, (int(*)__PR((void *, char *, int)))_fileread,
X							fp, 0, "reading");
X	}
X}
X
XEXPORT void
Xcr_file(info, func, arg, amt, text)
X		FINFO	*info;
X		int	(*func) __PR((void *, char *, int));
X	register void	*arg;
X		int	amt;
X		char	*text;
X{
X	register int	amount;
X	register off_t	blocks;
X	register off_t	size;
X	register int	i = 0;
X	register off_t	n;
Xextern	m_stats	*stats;
X
X	size = info->f_rsize;
X
X	fifo_enter_critical();
X	stats->cur_size = size;
X	stats->cur_off = 0;
X	fifo_leave_critical();
X
X	if ((blocks = tarblocks(info->f_rsize)) == 0)
X		return;
X	if (amt == 0)
X		amt = bufsize;
X	do {
X		amount = buf_wait(TBLOCK);
X		amount = min(amount, amt);
X
X		if ((props.pr_flags & PR_CPIO) == 0) {
X			if ((i = (*func)(arg, bigptr, max(amount, TBLOCK))) <= 0)
X				break;
X		} else {
X			if ((i = (*func)(arg, bigptr, amount)) <= 0)
X				break;
X		}
X
X		size -= i;
X		fifo_enter_critical();
X		stats->cur_off += i;
X		fifo_leave_critical();
X
X		if (size < 0) {			/* File increased in size */
X			n = tarblocks(size+i);	/* use expected size only */
X		} else {
X			n = tarblocks(i);
X		}
X		if ((props.pr_flags & PR_CPIO) == 0) {
X
X			if (i % TBLOCK) {	/* Clear (better compression) */
X				fillbytes(bigptr+i, TBLOCK - (i%TBLOCK), '\0');
X			}
X			buf_wake(n*TBLOCK);
X		} else {
X			if (size < 0)		/* File increased in size */
X				buf_wake(size+i); /* use expected size only */
X			else
X				buf_wake(i);
X			n = blocks;
X		}
X	} while ((blocks -= n) >= 0 && i > 0 && size >= 0);
X	if (i < 0) {
X		if (!errhidden(E_READ, info->f_name)) {
X			if (!errwarnonly(E_READ, info->f_name))
X				xstats.s_rwerrs++;
X			errmsg("Error %s '%s'.\n", text, info->f_name);
X			(void) errabort(E_READ, info->f_name, TRUE);
X		}
X	} else if ((blocks != 0 || size != 0) && func != nullread) {
X		if (!errhidden(size < 0 ? E_GROW:E_SHRINK, info->f_name)) {
X			if (!errwarnonly(size < 0 ? E_GROW:E_SHRINK, info->f_name))
X				xstats.s_sizeerrs++;
X			errmsgno(EX_BAD,
X			"'%s': file changed size (%s).\n",
X			info->f_name, size < 0 ? "increased":"shrunk");
X			(void) errabort(size < 0 ? E_GROW:E_SHRINK,
X							info->f_name, TRUE);
X		}
X	}
X	/*
X	 * If the file did shrink, fill up to expected size...
X	 */
X	if ((props.pr_flags & PR_CPIO) == 0) {
X		while (--blocks >= 0)
X			writeempty();
X	} else {
X		while (size > 0) {
X			amount = buf_wait(1);
X			amount = min(amount, size);
X			fillbytes(bigptr, amount, '\0');
X			buf_wake(amount);
X			size -= amount;
X		}
X	}
X	/*
X	 * Honour CPIO padding
X	 */
X	if ((amount = props.pr_pad) != 0) {
X		size = info->f_rsize;
X		if (info->f_flags & F_LONGNAME)
X			size += props.pr_hdrsize;
X		amount = (amount + 1 - (size & amount)) & amount;
X		while (amount-- > 0) {
X			buf_wait(1);
X			*bigptr = '\0';
X			buf_wake(1);
X		}
X	}
X}
X
X#define	newfs(i)	((i)->f_dev != curfs)
X
XLOCAL void
Xput_dir(sname, dname, namlen, info, ptb, last)
X		char	*sname;
X	register char	*dname;
X	register int	namlen;
X	FINFO	*info;
X	TCB	*ptb;
X	struct pdirs	*last;
X{
X	static	int	depth	= -10;
X	static	int	dinit	= 0;
X		FINFO	nfinfo;
X	register FINFO	*ninfo	= &nfinfo;
X		DIR	*d = NULL;
X	struct	dirent	*dir;
X#ifdef	HAVE_SEEKDIR
X		long	offset	= 0L;
X#endif
X		char	fname[PATH_MAX+1];	/* XXX */
X	register char	*name;
X	register char	*xdname;
X		int	xlen;
X		BOOL	putdir = FALSE;
X		BOOL	direrr = FALSE;
X		int	dlen;
X		char	*dp = NULL;
X	struct pdirs	thisd;
X	struct pdirs	*pd = last;
X
X	if (!dinit) {
X#ifdef	_SC_OPEN_MAX
X		depth += sysconf(_SC_OPEN_MAX);
X#else
X		depth += getdtablesize();
X#endif
X		dinit = 1;
X	}
X
X	if (nodump && (info->f_flags & F_NODUMP) != 0)
X		return;
X
X	info->f_dir = NULL;
X	info->f_dirinos = NULL;
X	info->f_dirlen = 0;
X	info->f_dirents = 0;
X
X	switch (take_file(dname, info)) {
X
X	case -1:
X		if (match_tree)
X			return;
X		break;
X
X	case TRUE:
X		putdir = TRUE;
X	}
X
X	if ((!nodesc || dodump > 0) && (!nomount || !newfs(info))) {
X		/*
X		 * If this is a mounted directory and we have been called
X		 * with -M, it makes no sense to include the directorie's file
X		 * name list with -dump.
X		 * By not including this list, we also avoid error messages
X		 * like:
X		 *	star: Permission denied. Cannot open 'opt/SUNWddk'.
X		 *
X		 * which is a result of an automounted directory.
X		 *
X		 * Conclusion: try to use a filesystem snapshot whenever
X		 * possible.
X		 */
X		if (!lowmem) {
X			ino_t	*ino = NULL;
X			int	nents;
X
X			dp = fetchdir(sname, &nents, &dlen, dodump?&ino:NULL);
X			if (dp == NULL) {
X				if (!errhidden(E_OPEN, dname)) {
X					if (!errwarnonly(E_OPEN, dname))
X						xstats.s_openerrs++;
X					errmsg("Cannot open '%s'.\n", dname);
X					(void) errabort(E_OPEN, dname, TRUE);
X				}
X				direrr = TRUE;
X			} else {
X				info->f_dir = dp;
X				info->f_dirinos = ino;
X				info->f_dirlen = dlen;
X				info->f_dirents = nents;
X				/*
X				 * Don't count list terminator null Byte
X				 */
X				dlen--;
X			}
X		} else if (!(d = opendir(sname))) {
X			if (!errhidden(E_OPEN, dname)) {
X				if (!errwarnonly(E_OPEN, dname))
X					xstats.s_openerrs++;
X				errmsg("Cannot open '%s'.\n", dname);
X				(void) errabort(E_OPEN, dname, TRUE);
X			}
X			direrr = TRUE;
X		}
X	}
X	depth--;
X	if (!nodir) {
X		if (interactive && !ia_change(ptb, info)) {
X			fprintf(vpr, "Skipping ...\n");
X			if (d)
X				closedir(d);
X			if (dp)
X				free(info->f_dir);
X			if (info->f_dirinos)
X				free(info->f_dirinos);
X			depth++;
X			return;
X		}
X		if (putdir) {
X			if (!dirmode)
X				put_tcb(ptb, info);
X			vprint(info);
X		}
X	}
X	if (direrr) {
X		depth++;
X		return;
X	}
X
X	/*
X	 * Search parent dir structure for possible loops.
X	 */
X	thisd.p_last = last;
X	thisd.p_dev  = info->f_dev;
X	thisd.p_ino  = info->f_ino;
X
X	while (pd) {
X		if (pd->p_dev == info->f_dev &&
X		    pd->p_ino == info->f_ino) {
X			goto out;
X		}
X		pd = pd->p_last;
X	}
X
X	if (!nodesc && (!nomount || !newfs(info))) {
X
X		strcpy(fname, dname);
X		xdname = &fname[namlen];
X		if (namlen && xdname[-1] != '/') {
X			namlen++;
X			*xdname++ = '/';
X		}
X
X		while (!intr) {
X			if (d) {
X				if ((dir = readdir(d)) == NULL)
X					break;
X				if (streql(dir->d_name, ".") ||
X						streql(dir->d_name, ".."))
X					continue;
X				name = dir->d_name;
X				xlen = namlen + strlen(name);
X			} else {
X				if (dlen <= 0)
X					break;
X
X				name = &dp[1];
X				xlen = strlen(name);
X				dp += xlen + 2;
X				dlen -= xlen + 2;
X				xlen += namlen;
X			}
X
X			if (xlen > PATH_MAX) {
X				char	xname[2*PATH_MAX+1];
X
X				*xdname = '\0';
X				js_snprintf(xname, sizeof (xname), "%s%s",
X					fname, name);
X				if (!errhidden(E_NAMETOOLONG, xname)) {
X					if (!errwarnonly(E_NAMETOOLONG, xname))
X						xstats.s_toolong++;
X					errmsgno(EX_BAD,
X					"%s%s: Name too long (%d > %d).\n",
X						fname, name,
X						xlen, PATH_MAX);
X					(void) errabort(E_NAMETOOLONG, xname,
X									TRUE);
X				}
X				continue;
X			}
X
X			strcpy(xdname, name);
X			name = fname;
X
X			if (name[0] == '.' && name[1] == '/') {
X				for (name++; name[0] == '/'; name++)
X					/* LINTED */
X					;
X				xlen -= name - fname;
X			}
X			if (name[0] == '\0') {
X				name = ".";
X				xlen = 1;
X			}
X			if (!getinfo(name, ninfo)) {
X				if (!errhidden(E_STAT, name)) {
X					if (!errwarnonly(E_STAT, name))
X						xstats.s_staterrs++;
X					errmsg("Cannot stat '%s'.\n", name);
X					(void) errabort(E_STAT, name, TRUE);
X				}
X				continue;
X			}
X#ifdef	HAVE_SEEKDIR
X			if (d && is_dir(ninfo) && depth <= 0) {
X				seterrno(0);
X				offset = telldir(d);
X				if (geterrno()) {
X					if (!errhidden(E_OPEN, dname)) {
X						if (!errwarnonly(E_OPEN, dname))
X							xstats.s_openerrs++;
X						errmsg(
X						"WARNING: telldir does not work on '%s'.\n",
X						dname);
X						(void) errabort(E_OPEN, dname,
X									TRUE);
X					}
X					/*
X					 * XXX xstats.s_openerrs is wrong here.
X					 * Avoid an endless loop on unseekable
X					 * directories.
X					 */
X					/* closedir() is past end of loop */
X					break;
X				}
X				closedir(d);
X			}
X#endif
X			createi(name, name, xlen, ninfo, &thisd);
X#ifdef	HAVE_SEEKDIR
X			if (d && is_dir(ninfo) && depth <= 0) {
X				if (!(d = opendir(sname))) {
X					if (!errhidden(E_OPEN, dname)) {
X						if (!errwarnonly(E_OPEN, dname))
X							xstats.s_openerrs++;
X						errmsg("Cannot open '%s'.\n",
X							dname);
X						(void) errabort(E_OPEN, dname,
X									TRUE);
X					}
X					break;
X				}
X				seterrno(0);
X				seekdir(d, offset);
X				if (geterrno()) {
X					if (!errhidden(E_OPEN, dname)) {
X						if (!errwarnonly(E_OPEN, dname))
X							xstats.s_openerrs++;
X						errmsg(
X						"WARNING: seekdir does not work on '%s'.\n",
X						dname);
X						(void) errabort(E_OPEN, dname,
X									TRUE);
X					}
X					/*
X					 * XXX xstats.s_openerrs is wrong here.
X					 * Avoid an endless loop on unseekable
X					 * directories.
X					 */
X					break;
X				}
X			}
X#endif
X		}
X	}
Xout:
X	if (d)
X		closedir(d);
X	if (dp)
X		free(info->f_dir);
X	if (info->f_dirinos)
X		free(info->f_dirinos);
X	depth++;
X	if (!nodir && dirmode && putdir)
X		put_tcb(ptb, info);
X}
X
XLOCAL BOOL
Xcheckdirexclude(sname, name, namlen, info)
X	char	*sname;
X	char	*name;
X	int	namlen;
X	FINFO	*info;
X{
X	FINFO	finfo;
X	char	pname[PATH_MAX+1];
X	int	OFflag = Fflag;
X	char	*p;
X
X	Fflag = 0;
X	strcpy(pname, name);
X	p = &pname[namlen];
X	if (p[-1] != '/') {
X		*p++ = '/';
X	}
X	strcpy(p, ".mirror");
X	if (!_getinfo(pname, &finfo)) {
X		strcpy(p, ".exclude");
X		if (!_getinfo(pname, &finfo))
X			goto notfound;
X	}
X	if (is_file(&finfo)) {
X		if (OFflag == 3) {
X			nodesc++;
X			if (!dirmode)
X				createi(sname, name, namlen, info, (struct pdirs *)0);
X			create(pname, FALSE, FALSE);	/* Needed to strip off "./" */
X			if (dirmode)
X				createi(sname, name, namlen, info, (struct pdirs *)0);
X			nodesc--;
X		}
X		Fflag = OFflag;
X		return (FALSE);
X	}
Xnotfound:
X	Fflag = OFflag;
X	return (TRUE);
X}
X
XEXPORT BOOL
Xcheckexclude(sname, name, namlen, info)
X	char	*sname;
X	char	*name;
X	int	namlen;
X	FINFO	*info;
X{
X		int	len;
X	const	char	*fn;
X
X	if (Fflag <= 0)
X		return (TRUE);
X
X	fn = filename(name);
X
X	if (is_dir(info)) {
X		/*
X		 * Exclude with -F -FF -FFFFF 1, 2, 5+
X		 */
X		if (Fflag < 3 || Fflag > 4) {
X			if (streql(fn, "SCCS") ||	/* SCCS directory */
X			    streql(fn, "RCS"))		/* RCS directory  */
X				return (FALSE);
X		}
X		if (Fflag > 1 && streql(fn, "OBJ"))	/* OBJ directory  */
X			return (FALSE);
X		if (Fflag > 2 && !checkdirexclude(sname, name, namlen, info))
X			return (FALSE);
X		return (TRUE);
X	}
X	if ((len = strlen(fn)) < 3)		/* Will never match later */
X		return (TRUE);
X
X	if (Fflag > 1 && fn[len-2] == '.' && fn[len-1] == 'o')	/* obj files */
X		return (FALSE);
X
X	if (Fflag > 1 && is_file(info)) {
X		if (streql(fn, "core") ||
X		    streql(fn, "errs") ||
X		    streql(fn, "a.out"))
X			return (FALSE);
X	}
X
X	return (TRUE);
X}
X
X#ifdef	USE_FIND
X/*
X * The callback function for treewalk()
X *
X * XXX errhidden() support not yet implemented.
X */
XEXPORT int
Xwalkfunc(nm, fs, type, state)
X	char		*nm;
X	struct stat	*fs;
X	int		type;
X	struct WALK	*state;
X{
X	if (intr) {
X		state->flags |= WALK_WF_QUIT;
X		return (0);
X	}
X	if (type == WALK_NS) {
X		errmsg("Cannot stat '%s'.\n", nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) {
X		errmsg("Cannot follow symlink '%s'.\n", nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_DNR) {
X		if (state->flags & WALK_WF_NOCHDIR)
X			errmsg("Cannot chdir to '%s'.\n", nm);
X		else
X			errmsg("Cannot read '%s'.\n", nm);
X		state->err = 1;
X		return (0);
X	}
X	if (state->maxdepth >= 0 && state->level >= state->maxdepth)
X		state->flags |= WALK_WF_PRUNE;
X	if (state->mindepth >= 0 && state->level < state->mindepth)
X		return (0);
X
X	if (state->tree == NULL ||
X	    find_expr(nm, nm + state->base, fs, state, state->tree)) {
X		FINFO	finfo;
X
X		finfo.f_sname = nm + state->base;
X		finfo.f_name = nm;
X		stat_to_info(fs, &finfo);
X		createi(nm + state->base, nm, strlen(nm), &finfo, (struct pdirs *)0);
X	}
X	return (0);
X}
X#endif
END-of-star-1.5.2/star/create.c
echo x - star-1.5.2/star/defaults.c
sed 's/^X//' >star-1.5.2/star/defaults.c << 'END-of-star-1.5.2/star/defaults.c'
X/* @(#)defaults.c	1.13 09/07/11 Copyright 1998-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)defaults.c	1.13 09/07/11 Copyright 1998-2009 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/deflts.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X#include "star.h"
X#include "starsubs.h"
X
Xextern	const char	*tarfiles[];
Xextern	long		bs;
Xextern	int		nblocks;
Xextern	BOOL		not_tape;
Xextern	Ullong		tsize;
X
XEXPORT	char	*get_stardefaults __PR((char *name));
XLOCAL	int	open_stardefaults __PR((char *dfltname));
XEXPORT	void	star_defaults	__PR((long *fsp, char *dfltname));
XEXPORT	BOOL	star_darchive	__PR((char *arname, char *dfltname));
X
XEXPORT char *
Xget_stardefaults(name)
X	char	*name;
X{
X	if (name)
X		return (name);
X	/*
X	 * WARNING you are only allowed to change this filename if you also
X	 * change the documentation and add a statement that makes clear
X	 * where the official location of the file is why you did choose a
X	 * nonstandard location and that the nonstandard location only refers
X	 * to inofficial star versions.
X	 *
X	 * I was forced to add this because some people change star without
X	 * rational reason and then publish the result. As those people
X	 * don't contribute work and don't give support, they are causing extra
X	 * work for me and this way slow down the star development.
X	 */
X	return ("/etc/default/star");
X}
X
XLOCAL int
Xopen_stardefaults(dfltname)
X	char	*dfltname;
X{
X	/*
X	 * We may later set options here....
X	 */
X	return (defltopen(dfltname));
X}
X
XEXPORT void
Xstar_defaults(fsp, dfltname)
X	long	*fsp;
X	char	*dfltname;
X{
X	long	fs_cur	= 0L;
X	long	fs_max	= -1L;
X
X	dfltname = get_stardefaults(dfltname);
X
X	if (fsp != NULL)
X		fs_cur = *fsp;
X
X	if (fs_cur <= 0L) {
X		char	*p = NULL;
X
X		if (open_stardefaults(dfltname) == 0) {
X			p = defltread("STAR_FIFOSIZE=");
X		}
X		if (p) {
X			if (getnum(p, &fs_cur) != 1)
X				comerrno(EX_BAD, "Bad fifo size default.\n");
X		}
X	}
X	if (fs_cur > 0L) {
X		char	*p = NULL;
X
X		if (open_stardefaults(dfltname) == 0) {
X			p = defltread("STAR_FIFOSIZE_MAX=");
X		}
X		if (p) {
X			if (getnum(p, &fs_max) != 1) {
X				comerrno(EX_BAD,
X					"Bad max fifo size default.\n");
X			}
X		}
X		if (fs_cur > fs_max)
X			fs_cur = fs_max;
X	}
X
X	if (fs_cur > 0L && fsp != NULL)
X		*fsp = fs_cur;
X
X	defltclose();
X}
X
X/*
X * Check 'dfltname' for an 'arname' pattern.
X *
X * A correct entry has 3..4 space separated entries:
X *	1)	The device (archive0=/dev/tape)
X *	2)	The bloking factor in 512 byte units (20)
X *	3)	The max media size in 1024 byte units
X *		0 means unlimited (no multi volume handling)
X *	4)	Whether this is a tape or not
X * Examples:
X *	archive0=/dev/tape 512 0 y
X *	archive1=/dev/fd0 1 1440 n
X */
XEXPORT BOOL
Xstar_darchive(arname, dfltname)
X	char	*arname;
X	char	*dfltname;
X{
X	char	*p;
X	Llong	llbs	= 0;
X
X	dfltname = get_stardefaults(dfltname);
X	if (dfltname == NULL)
X		return (FALSE);
X	if (open_stardefaults(dfltname) != 0)
X		return (FALSE);
X
X	/*
X	 * XXX Sun tar arbeitet mit Ignore Case
X	 */
X	if ((p = defltread(arname)) == NULL) {
X		errmsgno(EX_BAD,
X		    "Missing or invalid '%s' entry in %s.\n",
X				arname, dfltname);
X		return (FALSE);
X	}
X	if ((p = strtok(p, " \t")) == NULL) {
X		errmsgno(EX_BAD,
X		    "'%s' entry in %s is empty!\n", arname, dfltname);
X		return (FALSE);
X	} else {
X		tarfiles[0] = ___savestr(p);
X	}
X	if ((p = strtok(NULL, " \t")) == NULL) {
X		errmsgno(EX_BAD,
X		    "Block component missing in '%s' entry in %s.\n",
X		    arname, dfltname);
X		return (FALSE);
X	}
X	if (getbnum(p, &llbs) != 1) {
X		comerrno(EX_BAD, "Bad blocksize entry for '%s' in %s.\n",
X			arname, dfltname);
X	} else {
X		int	iblocks = llbs;
X
X		if ((llbs <= 0) || (iblocks != llbs)) {
X			comerrno(EX_BAD,
X				"Invalid blocksize '%s'.\n", p);
X		}
X		bs = llbs;
X		nblocks = bs / TBLOCK;
X	}
X	if ((p = strtok(NULL, " \t")) == NULL) {
X		errmsgno(EX_BAD,
X		    "Size component missing in '%s' entry in %s.\n",
X		    arname, dfltname);
X		return (FALSE);
X	}
X	if (getknum(p, &llbs) != 1) {	/* tsize is Ullong */
X		comerrno(EX_BAD, "Bad size entry for '%s' in %s.\n",
X			arname, dfltname);
X	}
X	tsize = llbs / TBLOCK;
X	/* XXX Sun Tar hat check auf min size von 250 kB */
X
X	/*
X	 * XXX Sun Tar setzt not_tape auch wenn kein Tape Feld vorhanden ist
X	 * XXX und tsize != 0 ist.
X	 */
X	if ((p = strtok(NULL, " \t")) != NULL)		/* May be omited */
X		not_tape = (*p == 'n' || *p == 'N');
X	defltclose();
X#ifdef DEBUG
X	error("star_darchive: archive='%s'; tarfile='%s'\n", arname, tarfiles[0]);
X	error("star_darchive: nblock='%d'; tsize='%llu'\n",
X	    nblocks, tsize);
X	error("star_darchive: not tape = %d\n", not_tape);
X#endif
X	return (TRUE);
X}
END-of-star-1.5.2/star/defaults.c
echo x - star-1.5.2/star/device.c
sed 's/^X//' >star-1.5.2/star/device.c << 'END-of-star-1.5.2/star/device.c'
X/* @(#)device.c	1.15 09/07/11 Copyright 1996-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)device.c	1.15 09/07/11 Copyright 1996-2009 J. Schilling";
X#endif
X/*
X *	Handle local and remote device major/minor mappings
X *
X *	Copyright (c) 1996-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/schily.h>
X#define	__XDEV__	/* Needed to activate XDEV_T definitions */
X#include <schily/device.h>
X
X#ifdef	DEV_DEFAULTS
XEXPORT	int	minorbits = 8;
XEXPORT	XDEV_T	minormask = 0xFFLU;
X#else
XEXPORT	int	minorbits;
XEXPORT	XDEV_T	minormask;
X#endif
X
X#ifdef	__STDC__
XEXPORT	XDEV_T	_dev_mask[] = {
X	0x00000000LU,
X	0x00000001LU,
X	0x00000003LU,
X	0x00000007LU,
X	0x0000000FLU,
X	0x0000001FLU,
X	0x0000003FLU,
X	0x0000007FLU,
X	0x000000FFLU,
X	0x000001FFLU,
X	0x000003FFLU,
X	0x000007FFLU,
X	0x00000FFFLU,
X	0x00001FFFLU,
X	0x00003FFFLU,
X	0x00007FFFLU,
X	0x0000FFFFLU,
X	0x0001FFFFLU,
X	0x0003FFFFLU,
X	0x0007FFFFLU,
X	0x000FFFFFLU,
X	0x001FFFFFLU,
X	0x003FFFFFLU,
X	0x007FFFFFLU,
X	0x00FFFFFFLU,
X	0x01FFFFFFLU,
X	0x03FFFFFFLU,
X	0x07FFFFFFLU,
X	0x0FFFFFFFLU,
X	0x1FFFFFFFLU,
X	0x3FFFFFFFLU,
X	0x7FFFFFFFLU,
X	0xFFFFFFFFLU,
X#if SIZEOF_UNSIGNED_LONG_INT > 4
X	0x00000001FFFFFFFFLU,
X	0x00000003FFFFFFFFLU,
X	0x00000007FFFFFFFFLU,
X	0x0000000FFFFFFFFFLU,
X	0x0000001FFFFFFFFFLU,
X	0x0000003FFFFFFFFFLU,
X	0x0000007FFFFFFFFFLU,
X	0x000000FFFFFFFFFFLU,
X	0x000001FFFFFFFFFFLU,
X	0x000003FFFFFFFFFFLU,
X	0x000007FFFFFFFFFFLU,
X	0x00000FFFFFFFFFFFLU,
X	0x00001FFFFFFFFFFFLU,
X	0x00003FFFFFFFFFFFLU,
X	0x00007FFFFFFFFFFFLU,
X	0x0000FFFFFFFFFFFFLU,
X	0x0001FFFFFFFFFFFFLU,
X	0x0003FFFFFFFFFFFFLU,
X	0x0007FFFFFFFFFFFFLU,
X	0x000FFFFFFFFFFFFFLU,
X	0x001FFFFFFFFFFFFFLU,
X	0x003FFFFFFFFFFFFFLU,
X	0x007FFFFFFFFFFFFFLU,
X	0x00FFFFFFFFFFFFFFLU,
X	0x01FFFFFFFFFFFFFFLU,
X	0x03FFFFFFFFFFFFFFLU,
X	0x07FFFFFFFFFFFFFFLU,
X	0x0FFFFFFFFFFFFFFFLU,
X	0x1FFFFFFFFFFFFFFFLU,
X	0x3FFFFFFFFFFFFFFFLU,
X	0x7FFFFFFFFFFFFFFFLU,
X	0xFFFFFFFFFFFFFFFFLU,
X#endif
X};
X#else
XEXPORT	XDEV_T	_dev_mask[] = {
X	0x00000000L,
X	0x00000001L,
X	0x00000003L,
X	0x00000007L,
X	0x0000000FL,
X	0x0000001FL,
X	0x0000003FL,
X	0x0000007FL,
X	0x000000FFL,
X	0x000001FFL,
X	0x000003FFL,
X	0x000007FFL,
X	0x00000FFFL,
X	0x00001FFFL,
X	0x00003FFFL,
X	0x00007FFFL,
X	0x0000FFFFL,
X	0x0001FFFFL,
X	0x0003FFFFL,
X	0x0007FFFFL,
X	0x000FFFFFL,
X	0x001FFFFFL,
X	0x003FFFFFL,
X	0x007FFFFFL,
X	0x00FFFFFFL,
X	0x01FFFFFFL,
X	0x03FFFFFFL,
X	0x07FFFFFFL,
X	0x0FFFFFFFL,
X	0x1FFFFFFFL,
X	0x3FFFFFFFL,
X	0x7FFFFFFFL,
X	0xFFFFFFFFL,
X#if SIZEOF_UNSIGNED_LONG_INT > 4
X	0x00000001FFFFFFFFL,
X	0x00000003FFFFFFFFL,
X	0x00000007FFFFFFFFL,
X	0x0000000FFFFFFFFFL,
X	0x0000001FFFFFFFFFL,
X	0x0000003FFFFFFFFFL,
X	0x0000007FFFFFFFFFL,
X	0x000000FFFFFFFFFFL,
X	0x000001FFFFFFFFFFL,
X	0x000003FFFFFFFFFFL,
X	0x000007FFFFFFFFFFL,
X	0x00000FFFFFFFFFFFL,
X	0x00001FFFFFFFFFFFL,
X	0x00003FFFFFFFFFFFL,
X	0x00007FFFFFFFFFFFL,
X	0x0000FFFFFFFFFFFFL,
X	0x0001FFFFFFFFFFFFL,
X	0x0003FFFFFFFFFFFFL,
X	0x0007FFFFFFFFFFFFL,
X	0x000FFFFFFFFFFFFFL,
X	0x001FFFFFFFFFFFFFL,
X	0x003FFFFFFFFFFFFFL,
X	0x007FFFFFFFFFFFFFL,
X	0x00FFFFFFFFFFFFFFL,
X	0x01FFFFFFFFFFFFFFL,
X	0x03FFFFFFFFFFFFFFL,
X	0x07FFFFFFFFFFFFFFL,
X	0x0FFFFFFFFFFFFFFFL,
X	0x1FFFFFFFFFFFFFFFL,
X	0x3FFFFFFFFFFFFFFFL,
X	0x7FFFFFFFFFFFFFFFL,
X	0xFFFFFFFFFFFFFFFFL,
X#endif
X};
X#endif
X
XEXPORT void
Xdev_init(debug)
X	BOOL	debug;
X{
X	int	i;
X	dev_t	x;
X
X	for (i = 0, x = 1; minor(x) == x; i++, x <<= 1)
X		/* LINTED */
X		;
X
X	minorbits = i;
X	minormask = _dev_mask[i];
X
X	if (debug)
X		error("dev_minorbits:    %d\n", minorbits);
X}
X
X#ifdef	IS_LIBRARY
X
X#undef	dev_major
XEXPORT XDEV_T
Xdev_major(dev)
X	XDEV_T	dev;
X{
X	return (dev >> minorbits);
X}
X
X#undef	_dev_major
XEXPORT XDEV_T
X_dev_major(mbits, dev)
X	int	mbits;
X	XDEV_T	dev;
X{
X	return (dev >> mbits);
X}
X
X#undef	dev_minor
XEXPORT XDEV_T
Xdev_minor(dev)
X	XDEV_T	dev;
X{
X	return (dev & minormask);
X}
X
X#undef	_dev_minor
XEXPORT XDEV_T
X_dev_minor(mbits, dev)
X	int	mbits;
X	XDEV_T	dev;
X{
X	return (dev & _dev_mask[mbits]);
X}
X
X#undef	dev_make
XEXPORT XDEV_T
Xdev_make(majo, mino)
X	XDEV_T	majo;
X	XDEV_T	mino;
X{
X	return ((majo << minorbits) | mino);
X}
X
X#undef	_dev_make
XEXPORT XDEV_T
X_dev_make(mbits, majo, mino)
X	int	mbits;
X	XDEV_T	majo;
X	XDEV_T	mino;
X{
X	return ((majo << mbits) | mino);
X}
X#endif	/* IS_LIBRARY */
END-of-star-1.5.2/star/device.c
echo x - star-1.5.2/star/diff.h
sed 's/^X//' >star-1.5.2/star/diff.h << 'END-of-star-1.5.2/star/diff.h'
X/* @(#)diff.h	1.15 10/08/24 Copyright 1993-2010 J. Schilling */
X/*
X *	Definitions for the taylorable diff command
X *
X *	Copyright (c) 1993-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_DIFF_H
X#define	_DIFF_H
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	D_PERM		0x000001
X#define	D_TYPE		0x000002
X#define	D_NLINK		0x000004
X#define	D_SYMPERM	0x000008
X#define	D_UID		0x000010
X#define	D_GID		0x000020
X#define	D_UNAME		0x000040
X#define	D_GNAME		0x000080
X#define	D_ID	(D_UID|D_GID|D_UNAME|D_GNAME)
X#define	D_SIZE		0x000100
X#define	D_DATA		0x000200
X#define	D_RDEV		0x000400
X#define	D_HLINK		0x001000
X#define	D_SLINK		0x002000
X#define	D_SLPATH	0x004000
X#define	D_SPARS		0x008000
X#define	D_ATIME		0x010000
X#define	D_MTIME		0x020000
X#define	D_CTIME		0x040000
X#define	D_TIMES	(D_ATIME|D_MTIME|D_CTIME)
X#define	D_LMTIME	0x080000
X#define	D_XTIMES	(D_ATIME|D_MTIME|D_CTIME|D_LMTIME)
X#define	D_DIR		0x100000
X#define	D_ACL		0x200000
X#define	D_XATTR		0x400000
X#define	D_FFLAGS	0x800000
X
X/*
X * Atime frequently changes, it makes no sense to check it by default.
X * Mtime on symlinks cannot be copies, so do not check it too.
X */
X#define	D_DEFLT	(~(D_SYMPERM|D_ATIME|D_LMTIME))
X#define	D_ALL	(~0L);
X
Xextern	long	diffopts;
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _DIFF_H */
END-of-star-1.5.2/star/diff.h
echo x - star-1.5.2/star/dirtime.c
sed 's/^X//' >star-1.5.2/star/dirtime.c << 'END-of-star-1.5.2/star/dirtime.c'
X/* @(#)dirtime.c	1.28 10/08/23 Copyright 1988-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)dirtime.c	1.28 10/08/23 Copyright 1988-2010 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1988-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * Save directories and its times on a stack and set the times, if the new name
X * will not increase the depth of the directory stack.
X * The final flush of the stack is caused by a zero length filename.
X *
X * A string will be sufficient for the names of the directory stack because
X * all directories in a tree have a common prefix.  A counter for each
X * occurence of a slash '/' is the index into the array of times for the
X * directory stack. Directories with unknown times have atime.tv_usec == -1.
X *
X * If the order of the files on tape is not in an order that find(1) will
X * produce, this algorithm is not guaranteed to work. This is the case with
X * tapes that have been created with the -r option or with the list= option.
X *
X * The only alternative would be saving all directory times and setting them
X * at the end of an extract.
X *
X * NOTE: I am not shure if degenerate filenames will fool this algorithm.
X */
X#include <schily/types.h>	/* includes <sys/types.h> needed for mode_t */
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include "star.h"
X#include "xutimes.h"
X#include "checkerr.h"
X#include "dirtime.h"
X#include "starsubs.h"
X
X#ifdef DEBUG
Xextern	BOOL	debug;
X#define	EDBG(a)	if (debug) error a
X#else
X#define	EDBG(a)
X#endif
X
X/*
X * Maximum depth of directory nesting
X * will be reached if name has the form x/y/z/...
X *
X * NOTE: If PATH_MAX is 1024, sizeof(dtimes) will be 12 kBytes.
X */
X#define	NTIMES (PATH_MAX/2+1)
X
XLOCAL	char dirstack[PATH_MAX];
X#ifdef	SET_CTIME
X#define	NT	3
XLOCAL	struct timeval dtimes[NTIMES][NT];
XLOCAL	struct timeval dottimes[NT] = { {-1, -1}, {-1, -1}, {-1, -1}};
X#else
X#define	NT	2
XLOCAL	struct timeval dtimes[NTIMES][NT];
XLOCAL	struct timeval dottimes[NT] = { -1, -1, -1, -1};
X#endif
XLOCAL	struct timeval badtime = { -1, -1};
X
XLOCAL	mode_t	dmodes[NTIMES];
XLOCAL	mode_t	dotmodes = _BAD_MODE;
X
XEXPORT	void	sdirtimes	__PR((char *name, FINFO *info,
X						BOOL do_times, BOOL do_mode));
XEXPORT	void	sdirmode	__PR((char *name, mode_t mode));
XEXPORT	void	dirtimes	__PR((char *name, struct timeval *tp, mode_t mode));
XLOCAL	void	flushdirstack	__PR((char *, int));
XLOCAL	void	setdirtime	__PR((char *, struct timeval *));
X
XEXPORT void
Xsdirtimes(name, info, do_times, do_mode)
X	char	*name;
X	FINFO	*info;
X	BOOL	do_times;
X	BOOL	do_mode;
X{
X	struct timeval	tp[NT];
X	mode_t		mode = _BAD_MODE;
X
X	if (do_times) {
X		tp[0].tv_sec = info->f_atime;
X		tp[0].tv_usec = info->f_ansec/1000;
X
X		tp[1].tv_sec = info->f_mtime;
X		tp[1].tv_usec = info->f_mnsec/1000;
X#ifdef	SET_CTIME
X		tp[2].tv_sec = info->f_ctime;
X		tp[2].tv_usec = info->f_cnsec/1000;
X#endif
X	} else {
X		tp[0] = badtime;
X		tp[1] = badtime;
X#ifdef	SET_CTIME
X		tp[2] = badtime;
X#endif
X	}
X	if (do_mode) {
X		mode = info->f_mode;
X	}
X	dirtimes(name, tp, mode);
X}
X
XEXPORT void
X#ifdef	PROTOTYPES
Xsdirmode(char *name, mode_t mode)
X#else
Xsdirmode(name, mode)
X	char	*name;
X	mode_t	mode;
X#endif
X{
X	struct timeval	tp[NT];
X
X	tp[0] = badtime;
X	tp[1] = badtime;
X#ifdef	SET_CTIME
X	tp[2] = badtime;
X#endif
X	dirtimes(name, tp, mode);
X}
X
XEXPORT void
X#ifdef	PROTOTYPES
Xdirtimes(char *name, struct timeval tp[NT], mode_t mode)
X#else
Xdirtimes(name, tp, mode)
X	char		*name;
X	struct timeval	tp[NT];
X	mode_t		mode;
X#endif
X{
X	register char	*dp = dirstack;
X	register char	*np = name;
X	register int	idx = -1;
X
X	EDBG(("dirtimes('%s', %s", name, tp ? ctime(&tp[1].tv_sec):"NULL\n"));
X
X	if (np[0] == '\0') {				/* final flush */
X		if (dotmodes != _BAD_MODE) {
X			EDBG(("setmode: '.' to 0%o\n", dotmodes));
X			setdirmodes(".", dotmodes);
X		}
X		if (dottimes[0].tv_usec != badtime.tv_usec)
X			setdirtime(".", dottimes);
X		flushdirstack(dp, -1);
X		return;
X	}
X
X	if ((np[0] == '.' && np[1] == '/' && np[2] == '\0') ||
X				(np[0] == '.' && np[1] == '\0')) {
X		dottimes[0] = tp[0];
X		dottimes[1] = tp[1];
X#ifdef	SET_CTIME
X		dottimes[2] = tp[2];
X#endif
X		dotmodes = mode;
X	} else {
X		/*
X		 * Find end of common part
X		 */
X		while (*dp == *np) {
X			if (*dp == '\0')
X				break;
X			if (*dp++ == '/')
X				++idx;
X			np++;
X		}
X		/*
X		 * Make sure that the ending '/' always stays in dirstack.
X		 */
X		if (*dp == '/' && *np == '\0') {
X			dp++;
X			++idx;
X		}
X		EDBG(("DIR: '%.*s' DP: '%s' NP: '%s' idx: %d\n",
X				/* XXX Should not be > int */
X				(int)(dp - dirstack), dirstack, dp, np, idx));
X
X		if (*dp) {
X			/*
X			 * New directory does not increase the depth of the
X			 * directory stack. Flush all dirs below idx.
X			 */
X			flushdirstack(dp, idx);
X		}
X
X		/*
X		 * Put the new dir on the directory stack.
X		 * First append the name component, then
X		 * store times of "this" dir.
X		 */
X		while ((*dp = *np++) != '\0') {
X			if (*dp++ == '/') {
X				/*
X				 * Disable times of unknown dirs.
X				 */
X				EDBG(("zapping idx: %d\n", idx+1));
X				dtimes[++idx][0] = badtime;
X				dmodes[idx] = _BAD_MODE;
X			} else if (*np == '\0') {
X				/*
X				 * Make sure the dirname always ends with '/'.
X				 */
X				*dp++ = '/';
X				*dp = '\0';
X				idx++;
X			}
X		}
X		if (tp) {
X			EDBG(("set idx %d '%s'\n", idx, name));
X			dtimes[idx][0] = tp[0];	/* overwrite last atime */
X			dtimes[idx][1] = tp[1];	/* overwrite last mtime */
X#ifdef	SET_CTIME
X			dtimes[idx][2] = tp[2];	/* overwrite last ctime */
X#endif
X			dmodes[idx] = mode;
X		}
X	}
X}
X
XLOCAL void
Xflushdirstack(dp, depth)
X	register char	*dp;
X	register int	depth;
X{
X	if (depth == -1 && dp[0] == '/' && dirstack[0] == '/') {
X		/*
X		 * Flush the root dir, avoid flushing "".
X		 */
X		while (*dp == '/')
X			dp++;
X		if (dmodes[++depth] != _BAD_MODE) {
X			EDBG(("depth: %d setmode: '/' to 0%o\n", depth, dmodes[depth]));
X			setdirmodes("/", dmodes[depth]);
X		}
X		if (dtimes[depth][0].tv_usec != badtime.tv_usec) {
X			EDBG(("depth: %d ", depth));
X			setdirtime("/", dtimes[depth]);
X		}
X	}
X	/*
X	 * The dirname always ends with a '/' (see above).
X	 */
X	while (*dp) {
X		if (*dp++ == '/') {
X			*--dp = '\0';	/* temporarily delete '/' */
X			if (dmodes[++depth] != _BAD_MODE) {
X				EDBG(("depth: %d setmode: '%s' to 0%o\n", depth, dirstack, dmodes[depth]));
X				setdirmodes(dirstack, dmodes[depth]);
X			}
X			if (dtimes[depth][0].tv_usec != badtime.tv_usec) {
X				EDBG(("depth: %d ", depth));
X				setdirtime(dirstack, dtimes[depth]);
X			}
X			*dp++ = '/';	/* restore '/' */
X		}
X	}
X}
X
XLOCAL void
Xsetdirtime(name, tp)
X	char	*name;
X	struct timeval	tp[NT];
X{
X	EDBG(("settime: '%s' to %s", name, ctime(&tp[1].tv_sec)));
X#ifdef	SET_CTIME
X	if (xutimes(name, tp) < 0) {
X#else
X	if (utimes(name, tp) < 0) {
X#endif
X		if (!errhidden(E_SETTIME, name)) {
X			if (!errwarnonly(E_SETTIME, name))
X				xstats.s_settime++;
X			errmsg("Can't set time on '%s'.\n", name);
X			(void) errabort(E_SETTIME, name, TRUE);
X		}
X	}
X}
END-of-star-1.5.2/star/dirtime.c
echo x - star-1.5.2/star/star.c
sed 's/^X//' >star-1.5.2/star/star.c << 'END-of-star-1.5.2/star/star.c'
X/* @(#)star.c	1.339 13/01/09 Copyright 1985, 88-90, 92-96, 98, 99, 2000-2013 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)star.c	1.339 13/01/09 Copyright 1985, 88-90, 92-96, 98, 99, 2000-2013 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1985, 88-90, 92-96, 98, 99, 2000-2013 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	STAR_MAIN
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/signal.h>
X#include <schily/string.h>
X#include "star.h"
X#include "props.h"
X#include "diff.h"
X#include <schily/wait.h>
X#include <schily/standard.h>
X#define	__XDEV__	/* Needed to activate _dev_init() */
X#include <schily/device.h>
X#include <schily/stat.h>	/* Needed for umask(2) */
X#include <schily/getargs.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "fifo.h"	/* Needed for #undef FIFO */
X#include "dumpdate.h"
X#ifdef	USE_FIND
X#include <schily/walk.h>
X#include <schily/find.h>
X#endif
X#include "starsubs.h"
X#include "checkerr.h"
X
XEXPORT	int	main		__PR((int ac, char **av));
XLOCAL	void	star_create	__PR((int ac, char *const *av));
XLOCAL	void	checkdumptype	__PR((GINFO *gp));
XLOCAL	void	init_ddate	__PR((char *name));
XEXPORT	void	copy_create	__PR((int ac, char *const *av));
XLOCAL	int	getfilecount	__PR((int ac, char *const *av, const char *fmt));
XLOCAL	void	getdir		__PR((int *acp, char *const **avp,
X						const char **dirp));
XLOCAL	void	openlist	__PR((void));
XLOCAL	void	check_stdin	__PR((char *name));
XLOCAL	void	susage		__PR((int ret));
XLOCAL	void	usage		__PR((int ret));
XLOCAL	void	xusage		__PR((int ret));
XLOCAL	void	dusage		__PR((int ret));
XLOCAL	void	husage		__PR((int ret));
XLOCAL	void	gargs		__PR((int ac, char *const *av));
XLOCAL	void	star_mkvers	__PR((void));
XLOCAL	void	star_helpvers	__PR((char *name, BOOL help, BOOL xhelp, BOOL prvers));
XLOCAL	void	star_checkopts	__PR((BOOL oldtar, BOOL dodesc, BOOL usetape,
X					int archive, BOOL no_fifo,
X					Llong llbs));
XEXPORT	void	star_verifyopts	__PR((void));
XLOCAL	void	star_nfiles	__PR((int files, int minfiles));
XLOCAL	int	getpaxH		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getpaxL		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getpaxP		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getfind		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getpriv		__PR((char *arg, long *valp));
XLOCAL	int	getlldefault	__PR((char *arg, Llong *valp, int mult));
XEXPORT	int	getbnum		__PR((char *arg, Llong *valp));
XEXPORT	int	getknum		__PR((char *arg, Llong *valp));
XLOCAL	int	addtarfile	__PR((const char *tarfile));
XLOCAL	int	add_diffopt	__PR((char *optstr, long *flagp));
XLOCAL	int	gethdr		__PR((char *optstr, long *typep));
XLOCAL	int	getexclude	__PR((char *arg, long *valp, int *pac, char *const **pav));
X#ifdef	USED
XLOCAL	int	addfile		__PR((char *optstr, long *dummy));
X#endif
XLOCAL	void	set_signal	__PR((int sig, RETSIGTYPE (*handler)(int)));
XLOCAL	void	exsig		__PR((int sig));
XLOCAL	void	sighup		__PR((int sig));
XLOCAL	void	sigintr		__PR((int sig));
XLOCAL	void	sigquit		__PR((int sig));
XLOCAL	void	getstamp	__PR((void));
XLOCAL	void	set_ptype	__PR((int *pac, char *const **pav));
XLOCAL	void	docompat	__PR((int *pac, char *const **pav));
X
X#if	defined(SIGDEFER) || defined(SVR4)
X#define	signal	sigset
X#endif
X
X#define	QIC_24_TSIZE	122880		/*  61440 kBytes */
X#define	QIC_120_TSIZE	256000		/* 128000 kBytes */
X#define	QIC_150_TSIZE	307200		/* 153600 kBytes */
X#define	QIC_250_TSIZE	512000		/* 256000 kBytes (XXX not verified) */
X#define	QIC_525_TSIZE	1025000		/* 512500 kBytes */
X#define	TSIZE(s)	((s)*TBLOCK)
X
Xchar	strvers[] = "1.5.2";		/* The pure version string	*/
Xchar	*vers;				/* the full version string	*/
X
Xstruct star_stats	xstats;		/* for printing statistics	*/
X
Xextern	BOOL		havepat;	/* Pattern matching in use	*/
X
X#define	NTARFILE	100		/* Max # of archive files	*/
X
XFILE	*tarf;				/* The current archive		*/
XFILE	*listf;				/* File for list= option	*/
XFILE	*tty;				/* Open /dev/tty for questions	*/
XFILE	*vpr;				/* File for verbose printing	*/
XBOOL	did_stdin = FALSE;		/* Did use stdin for any option	*/
Xconst	char	*tarfiles[NTARFILE];	/* Cycle list of all archives	*/
Xint	ntarfiles;			/* Number of entries in list	*/
Xint	tarfindex;			/* Current index in list	*/
Xchar	*newvol_script;			/* -new-volume-script name	*/
XBOOL	multivol = FALSE;		/* -multivol specified		*/
XBOOL	force_noremote = FALSE;		/* -force-local specified	*/
Xchar	*listfile;			/* File name for list=		*/
XBOOL	pkglist = FALSE;		/* pkglist= specified		*/
Xchar	*stampfile;			/* Time stamp file for -newer	*/
XBOOL	errflag;			/* -e for abort on error	*/
Xconst	char	*wdir;			/* current working dir name	*/
Xconst	char	*currdir;		/* current -C dir argument	*/
Xconst	char	*dir_flags = NULL;	/* One/more -C options present	*/
XBOOL	bsdchdir = FALSE;		/* -C only valid for next arg	*/
Xchar	*volhdr;			/* VOLHDR= argument		*/
Xchar	*fs_name;			/* fs-name= for snapshot fs	*/
Xchar	*dd_name;			/* dumpdate= for snapshots	*/
Xdev_t	tape_dev;			/* st_dev for current archive	*/
Xino_t	tape_ino;			/* st_ino for current archive	*/
XBOOL	tape_isreg = FALSE;		/* Tape is a regular file	*/
X#ifdef	FIFO
XBOOL	use_fifo = TRUE;		/* Whether to use a FIFO or not	*/
X#else
XBOOL	use_fifo = FALSE;		/* Whether to use a FIFO or not	*/
X#endif
XBOOL	shmflag	= FALSE;		/* Whether to use shmem f. FIFO	*/
Xlong	fs;				/* FIFO size			*/
Xlong	bs;				/* TAPE block size (bytes)	*/
Xint	nblocks = 20;			/* TAPE blocks (512 byte units)	*/
XBOOL	not_tape = FALSE;		/* -sun-n not a Tape		*/
Xuid_t	dir_uid = _BAD_UID;		/* -dir-owner			*/
Xgid_t	dir_gid = _BAD_GID;		/* -dir-group			*/
Xuid_t	my_uid;				/* Current euid			*/
Xdev_t	curfs = NODEV;			/* Current st_dev for -M option	*/
Xstruct timeval	ddate;			/* The current dump date	*/
Xtime_t	sixmonth;			/* 6 months before limit (ls)	*/
Xtime_t	now;				/* now limit (ls)		*/
X/*
X * Change default header format into XUSTAR in 2004 (see below in gargs())
X */
Xlong	hdrtype	  = H_XSTAR;		/* default header format	*/
Xlong	chdrtype  = H_UNDEF;		/* command line hdrtype		*/
Xint	cmptype	  = C_NONE;		/* compression type		*/
Xint	iftype	  = I_TAR;		/* command line interface type	*/
Xint	ptype	  = P_STAR;		/* program interface type	*/
XBOOL	paxls	  = FALSE;		/* create PAX type listing	*/
Xint	version	  = 0;			/* Version from POSIX TAR  hdr	*/
Xint	swapflg	  = -1;			/* Whether to swap input	*/
XBOOL	debug	  = FALSE;		/* -debug has been specified	*/
Xint	xdebug	  = 0;			/* eXtended debug level		*/
Xint	dumplevel = -1;			/* level for incremental dumps	*/
Xint	oldlevel  = 0;			/* dumpleve this dump refers to	*/
XBOOL	dump_partial = FALSE;		/* Dump is not a full dump	*/
XBOOL	dump_cumulative = FALSE;	/* -cumulative has b. specified	*/
Xchar	*dumpdates = "/etc/tardumps";	/* Database for increment. dump	*/
XBOOL	wtardumps = FALSE;		/* Should update above file	*/
XBOOL	print_artype = FALSE;
XBOOL	showtime  = FALSE;		/* -time has been specified	*/
XBOOL	no_stats  = FALSE;		/* -no-statistics specified	*/
XBOOL	cpio_stats = FALSE;		/* -cpio-statistics specified	*/
XBOOL	do_fifostats = FALSE;		/* -fifostats specified		*/
XBOOL	numeric	  = FALSE;		/* -numeric user ids		*/
Xint	verbose   = 0;			/* -v has been specified	*/
XBOOL	silent    = FALSE;		/* -silent no informal msg	*/
XBOOL	prblockno = FALSE;		/* -block-number for all files	*/
XBOOL	no_xheader = FALSE;		/* -no-xheader ignore P.2001	*/
XBOOL	no_fsync  = FALSE;		/* -no-fsync on extract		*/
XBOOL	readnull  = FALSE;		/* -read0 on with list=		*/
XBOOL	tpath	  = FALSE;		/* -tpath print path only	*/
XBOOL	cflag	  = FALSE;		/* -c has been specified	*/
XBOOL	uflag	  = FALSE;		/* -u has been specified	*/
XBOOL	rflag	  = FALSE;		/* -r has been specified	*/
XBOOL	xflag	  = FALSE;		/* -x has been specified	*/
XBOOL	tflag	  = FALSE;		/* -t has been specified	*/
XBOOL	copyflag  = FALSE;		/* -copy has been specified	*/
XBOOL	nflag	  = FALSE;		/* -n dummy extract mode	*/
XBOOL	diff_flag = FALSE;		/* -diff has been specified	*/
XBOOL	Zflag	  = FALSE;		/* -Z has been specified	*/
XBOOL	zflag	  = FALSE;		/* -z has been specified	*/
XBOOL	bzflag	  = FALSE;		/* -bz has been specified	*/
XBOOL	lzoflag	  = FALSE;		/* -lzo has been specified	*/
XBOOL	p7zflag	  = FALSE;		/* -7z has been specified	*/
XBOOL	xzflag	  = FALSE;		/* -xz has been specified	*/
XBOOL	lzipflag  = FALSE;		/* -lzip has been specified	*/
Xchar	*compress_prg = NULL;		/* -compress-program specified	*/
XBOOL	multblk	  = FALSE;		/* -B has been specified	*/
XBOOL	ignoreerr = FALSE;		/* -i has been specified	*/
XBOOL	nodir	  = FALSE;		/* -d do not store dirs		*/
XBOOL	noxdir	  = FALSE;		/* -d do not create dirs	*/
XBOOL	noatime	  = FALSE;		/* -p a pax do not restore atime */
XBOOL	nomtime	  = FALSE;		/* -m do not restore times	*/
XBOOL	nochown	  = FALSE;		/* -o do not restore owner	*/
XBOOL	acctime	  = FALSE;		/* -atime has been specified	*/
XBOOL	pflag	  = FALSE;		/* -p restore permissions	*/
XBOOL	nopflag	  = FALSE;		/* -no-p don't restore perms	*/
XBOOL	dirmode	  = FALSE;		/* -dirmode wr. dirs past files	*/
XBOOL	nolinkerr = FALSE;		/* pr. link # err depends on -l	*/
XBOOL	follow	  = FALSE;		/* -h follow symbolic links	*/
XBOOL	paxfollow = FALSE;		/* PAX -L follow symbolic links	*/
XBOOL	paxHflag  = FALSE;		/* PAX -H follow symbolic links	*/
XBOOL	nodesc	  = FALSE;		/* -D do not descenc dirs	*/
XBOOL	nomount	  = FALSE;		/* -M do not cross mount points	*/
XBOOL	interactive = FALSE;		/* -w has been specified	*/
XBOOL	paxinteract = FALSE;		/* PAX -i has been specified	*/
XBOOL	signedcksum = FALSE;		/* -signed-checksum		*/
XBOOL	partial	  = FALSE;		/* -P write partial last record	*/
XBOOL	nospec	  = FALSE;		/* -S no special files		*/
Xint	Fflag	  = 0;			/* -F,-FF,... no SCCS/RCS/...	*/
XBOOL	uncond	  = FALSE;		/* -U unconditional extract	*/
XBOOL	xdir	  = FALSE;		/* -xdir uncond. dir extract	*/
XBOOL	xdot	  = FALSE;		/* -xdot uncond '.' dir extract	*/
XBOOL	keep_old  = FALSE;		/* -k do not overwrite files	*/
XBOOL	refresh_old = FALSE;		/* -refresh existing only	*/
XBOOL	abs_path  = FALSE;		/* -/ absolute path allowed	*/
XBOOL	allow_dotdot = FALSE;		/* -.. '..' in path allowed	*/
XBOOL	secure_links = FALSE;		/* -secure-links (no .. & /)	*/
XBOOL	no_dirslash = FALSE;		/* -no-dirslash option		*/
XBOOL	notpat	  = FALSE;		/* -not invert pattern matcher	*/
XBOOL	match_tree = FALSE;		/* -match-tree match dir -> tree */
XBOOL	notarg	  = FALSE;		/* PAX -c invert match		*/
XBOOL	paxmatch  = FALSE;		/* Do PAX like matching		*/
XBOOL	paxnflag  = FALSE;		/* PAX -n one match only	*/
XBOOL	force_hole = FALSE;		/* -force-hole on extract	*/
XBOOL	sparse	  = FALSE;		/* -sparse has been specified	*/
XBOOL	to_stdout = FALSE;		/* -to-stdout extraction	*/
XBOOL	wready    = FALSE;		/* -wready wait for ready tape	*/
XBOOL	force_remove = FALSE;		/* -force-remove on extraction	*/
XBOOL	ask_remove = FALSE;		/* -ask-remove on extraction	*/
XBOOL	remove_first = FALSE;		/* -remove-first on extraction	*/
XBOOL	remove_recursive = FALSE;	/* -remove-recursive on extract	*/
XBOOL	keep_nonempty_dirs = FALSE;	/* -keep-nonempty-dirs on extract */
XBOOL	do_install = FALSE;		/* -install on extract		*/
XBOOL	nullout   = FALSE;		/* -onull - simulation write	*/
XBOOL	prinodes  = FALSE;		/* -prinodes print ino # w. -tv */
X
XUllong	maxsize	  = 0;			/* max file size for create	*/
Xstruct timeval	Newer = {0, 0};		/* Time stamp to compare with	*/
XUllong	tsize	  = 0;			/* Max tape size in tar blocks	*/
Xlong	diffopts  = 0L;			/* diffopts= bit mask		*/
XBOOL	nowarn	  = FALSE;		/* -nowarn has been specified	*/
XBOOL	Ctime	  = FALSE;		/* -ctime has been specified	*/
XBOOL	nodump	  = FALSE;		/* -nodump has been specified	*/
X
XBOOL	listnew	  = FALSE;		/* -newest list newest only	*/
XBOOL	listnewf  = FALSE;		/* -newest-file list n. plain f	*/
XBOOL	hpdev	  = FALSE;		/* -hpdev non POSIX dev #	*/
XBOOL	modebits  = FALSE;		/* -modebits more than 12 bits	*/
XBOOL	copylinks = FALSE;		/* -copylinks rather than link	*/
XBOOL	copyhardlinks = FALSE;		/* -copyhardlinks rather than link */
XBOOL	copysymlinks = FALSE;		/* -copysymlinks rather than link */
XBOOL	copydlinks = FALSE;		/* copy content of linked dirs	*/
XBOOL	hardlinks = FALSE;		/* -hardlinks ext. sym as hard	*/
XBOOL	symlinks  = FALSE;		/* -symlinks ext. hard as syml	*/
XBOOL	linkdata  = FALSE;		/* -link-data data in hardlinks	*/
XBOOL	doacl	  = FALSE;		/* -acl handle ACLs		*/
XBOOL	doxattr	  = FALSE;		/* -xattr handle extended fattr	*/
XBOOL	dofflags  = FALSE;		/* -xfflags handle extended ffl	*/
XBOOL	link_dirs = FALSE;		/* -link-dirs hard linked dirs	*/
XBOOL	dodump	  = FALSE;		/* -dump mode with all ino prop	*/
XBOOL	dorestore = FALSE;		/* -restore in incremental mode	*/
XBOOL	forcerestore = FALSE;		/* -force-restore in incremental mode	*/
XBOOL	dometa	  = FALSE;		/* -meta ino metadata only	*/
XBOOL	dumpmeta  = FALSE;		/* -dumpmeta metadata for ctime	*/
XBOOL	xmeta	  = FALSE;		/* -xmeta extract meta files	*/
XBOOL	lowmem	  = FALSE;		/* -lowmem use less memory	*/
X#ifdef	USE_FIND
XBOOL	dofind	  = FALSE;		/* -find option found		*/
Xint	find_ac	  = 0;			/* ac past -find option		*/
Xchar	*const *find_av = NULL;		/* av past -find option		*/
Xint	find_pac  = 0;			/* ac for first find primary	*/
Xchar	*const *find_pav = NULL;	/* av for first find primary	*/
Xfindn_t	*find_node;			/* syntaxtree from find_parse()	*/
Xvoid	*plusp;				/* residual for -exec ...{} +	*/
Xint	find_patlen;			/* len for -find pattern state	*/
X
XLOCAL 	int		walkflags = WALK_CHDIR | WALK_PHYS | WALK_NOEXIT |
X				    WALK_STRIPLDOT;
XLOCAL	int		maxdepth = -1;
XLOCAL	int		mindepth = -1;
XEXPORT	struct WALK	walkstate;
X#endif
X
XBOOL	tcompat	  = FALSE;	/* Tar compatibility (av[0] is tar/ustar)   */
XBOOL	fcompat	  = FALSE;	/* Archive file compatibility was requested */
X
Xint	intr	  = 0;		/* Did catch a ^C	*/
X
XBOOL	do_subst;
X
XGINFO	_ginfo;				/* Global (volhdr) information	*/
XGINFO	_grinfo;			/* Global read information	*/
XGINFO	*gip  = &_ginfo;		/* Global information pointer	*/
XGINFO	*grip = &_grinfo;		/* Global read info pointer	*/
X
X#ifdef	STAR_FAT
X#include "suntar.c"
X#include "gnutar.c"
X#include "cpio.c"
X#include "pax.c"
X#endif
X
X#ifndef	NO_STAR_MAIN
X#define	PTYPE_DEFAULT	P_STAR
X/*
X * Achtung: Optionen wie f= sind problematisch denn dadurch dass -ffilename geht,
X * werden wird bei Falschschreibung von -fifo evt. eine Datei angelegt wird.
X */
X/* BEGIN CSTYLED */
Xchar	_opts[] = "C*,find~,help,xhelp,version,debug,xdebug#,xd#,bsdchdir,pax-ls,level#,tardumps*,wtardumps,time,no_statistics,no-statistics,cpio-statistics,fifostats,numeric,v+,block-number,tpath,c,u,r,x,t,copy,n,diff,diffopts&,H&,artype&,print-artype,fs-name*,force_hole,force-hole,sparse,to_stdout,to-stdout,wready,force_remove,force-remove,ask_remove,ask-remove,remove_first,remove-first,remove_recursive,remove-recursive,keep-nonempty-dirs,install,nullout,onull,fifo,no_fifo,no-fifo,shm,fs&,VOLHDR*,list*,pkglist*,multivol,new-volume-script*,force-local,restore,force-restore,file&,f&,T,Z,z,bz,j,lzo,7z,xz,lzip,compress-program*,bs&,blocks&,b&,B,pattern&,pat&,i,d,m,o,nochown,pax-p&,a,atime,p,no-p,dirmode,l,h,L,pax-L~,pax-H~,pax-P~,D,dodesc,M,xdev,w,pax-i,I,X&,exclude-from&,O,signed_checksum,signed-checksum,P,S,F+,U,xdir,xdot,k,keep_old_files,keep-old-files,refresh_old_files,refresh-old-files,refresh,/,..,secure-links,no-dirslash,not,V,match-tree,pax-match,pax-n,pax-c,notarg,maxsize&,newer*,ctime,nodump,tsize&,qic24,qic120,qic150,qic250,qic525,nowarn,newest_file,newest-file,newest,hpdev,modebits,copylinks,copyhardlinks,copysymlinks,copydlinks,hardlinks,symlinks,link-data,acl,xattr,xattr-linux,xfflags,link-dirs,dumpdate*,dump,cumulative,dump-cumulative,meta,dumpmeta,xmeta,silent,lowmem,no-xheader,no-fsync,read0,errctl&,e,data-change-warn,prinodes,dir-owner*,dir-group*,umask*,s&,?";
X/* END CSTYLED */
Xchar	*opts = _opts;
X#else
Xextern	char	*opts;
X#endif	/* NO_STAR_MAIN */
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	int		cac  = ac;
X	char *const	*cav = av;
X	int		oac;
X	char *const	*oav;
X	int		excode = 0;
X	char		*tgt_dir = NULL;
X
X	save_args(ac, av);
X
X	my_uid = geteuid();
X	my_uid = getuid();
X
X	docompat(&cac, &cav);
X
X	gargs(cac, cav);
X	--cac, cav++;
X	oac = cac;
X	oav = cav;
X
X#ifdef	SIGHUP
X	if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
X		set_signal(SIGHUP, sighup);
X#endif
X#ifdef	SIGINT
X	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
X		set_signal(SIGINT, sigintr);
X#endif
X#ifdef	SIGQUIT
X	if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
X		set_signal(SIGQUIT, sigquit);
X#endif
X#ifdef	SIGINFO
X	/*
X	 * Be polite to *BSD users.
X	 * They copied our idea and implemented intermediate status
X	 * printing in 'dd' in 1990.
X	 */
X	if (signal(SIGINFO, SIG_IGN) != SIG_IGN)
X		set_signal(SIGINFO, sigquit);
X#endif
X
X	file_raise((FILE *)NULL, FALSE);
X
X	initbuf(nblocks);		/* Calls initfifo() if needed	*/
X
X	(void) openremote();		/* This needs super user privilleges */
X
X	if (geteuid() != getuid()) {	/* AIX does not like to do this */
X					/* If we are not root		*/
X#ifdef	HAVE_SETREUID
X		if (setreuid(-1, getuid()) < 0)
X#else
X#ifdef	HAVE_SETEUID
X		if (seteuid(getuid()) < 0)
X#else
X		if (setuid(getuid()) < 0)
X#endif
X#endif
X			comerr("Panic cannot set back effective uid.\n");
X	}
X	my_uid = geteuid();
X	/*
X	 * WARNING: We now are no more able to open a new remote connection
X	 * unless we have been called by root.
X	 * It you like to do a remote multi-tape backup to different hosts
X	 * and do not call star from root, you are lost.
X	 */
X
X	opentape();
X
X	if (stampfile)
X		getstamp();
X
X	star_mkvers();		/* Create version string */
X	setprops(chdrtype);	/* Set up properties for archive format */
X
X	if (!(rflag || uflag) || chdrtype != H_UNDEF)
X		star_verifyopts(); /* Chk if options are valid for chdrtype */
X
X	if (dumplevel >= 0)
X		initdumpdates(dumpdates, wtardumps);
X	dev_init(debug);	/* Init device macro handling */
X	xbinit();		/* Initialize buffer for extended headers */
X
X	if (dir_flags && (!tflag || copyflag))
X		wdir = dogetwdir();
X
X	gettimeofday(&ddate, 0);
X	now	 = ddate.tv_sec + 60;
X	sixmonth = ddate.tv_sec - 6L*30L*24L*60L*60L;
X#ifdef	USE_FIND
X	find_timeinit(ddate.tv_sec);
X	walkinitstate(&walkstate);
X#endif
X	if (dd_name)
X		init_ddate(dd_name);
X
X	ginit();		/* Initialize global (volhdr) info */
X
X	if (copyflag) {
X		int		lac = cac;
X		char *const	*lav = cav;
X
X		if (tflag) {
X			/*
X			 * Flag no args at 'extract' side in -c -list mode.
X			 */
X			cav = &oav[oac];
X			cac = 0;
X		} else {
X			/*
X			 * Find last file type argument.
X			 */
X			for (; ; --cac, cav++) {
X				if (getfiles(&cac, &cav, opts) == 0)
X					break;
X				lac = cac;
X				lav = cav;
X			}
X			tgt_dir = lav[0];
X			cav = &lav[1];
X			cac = lac-1;
X			if (cac > 0) {
X				errmsgno(EX_BAD,
X				"Badly placed option after target directory.\n");
X				susage(EX_BAD);
X			}
X		}
X	}
X
X
X#ifdef	FIFO
X	if (use_fifo) {
X		runfifo(oac, oav);	/* Run FIFO, fork() is called here  */
X		on_comerr(fifo_onexit,	/* For foreground FIFO process only */
X			(void *)0);
X	}
X#endif
X
X	if (copyflag) {
X		do_subst = FALSE;	/* Substitution only at create side */
X		havepat = FALSE;	/* Patterns only at create side */
X		listfile = NULL;	/* Listfile only at create side */
X		swapflg = 0;		/* Don't try to find out the hdrtype */
X		dir_flags = tgt_dir;	/* Target directory only at extract */
X#ifdef	USE_FIND
X		dofind = FALSE;		/* -find expr only at create side */
X#endif
X	}
X
X	if (xflag || tflag || diff_flag) {
X		/*
X		 * cflag will never be TRUE in this case
X		 */
X		if (listfile) {
X			openlist();
X			hash_build(listf);
X			if ((currdir = dir_flags) != NULL)
X				dochdir(currdir, TRUE);
X		} else {
X#ifdef	USE_FIND
X			if (!dofind) {
X#endif
X			for (; ; --cac, cav++) {
X				if (dir_flags)
X					getdir(&cac, &cav, &currdir);
X				if (getfiles(&cac, &cav, opts) == 0)
X					break;
X				addarg(cav[0]);
X			}
X#ifdef	USE_FIND
X			}
X#endif
X			closepattern();
X		}
X		if (tflag) {
X			list();
X		} else {
X			/*
X			 * xflag || diff_flag
X			 * First change dir to the one or last -C arg
X			 * in case there is no pattern in list.
X			 */
X			if ((currdir = dir_flags) != NULL)
X				dochdir(currdir, TRUE);
X			if (xflag)
X				extract(volhdr);
X			else
X				diff();
X		}
X	}
X	closepattern();
X	if (uflag || rflag) {
X		/*
X		 * cflag will also be TRUE in this case
X		 */
X		skipall();
X		syncbuf();
X		backtape();
X	}
X	if (cflag) {
X		/*
X		 * xflag, tflag, diff_flag will never be TRUE in this case
X		 */
X		star_create(cac, cav);
X	}
X
X#ifdef	USE_FIND
X	find_plusflush(plusp, &walkstate);
X#endif
X	if (!nolinkerr)
X		checklinks();
X	if (!use_fifo)
X		closetape();
X#ifdef	FIFO
X	if (use_fifo)
X		fifo_exit(0);
X#endif
X
X#ifdef	HAVE_FORK
X	while (wait(0) >= 0) {
X		;
X		/* LINTED */
X	}
X#endif
X	if (!no_stats)
X		prpatstats();
X	prstats();
X	if (checkerrs()) {
X		if (!nowarn && !no_stats) {
X			errmsgno(EX_BAD,
X			"Processed all possible files, despite earlier errors.\n");
X		}
X		excode = -2;
X	}
X	if (!isatty(fdown(stderr))) {
X		/*
X		 * Try to avoid that the verbose or diagnostic messages are
X		 * sometimes lost if called on Linux via "ssh". Unfortunately
X		 * this does not always help. If you like to make sure that
X		 * nothing gets lost, call: ssh host "star .... ; sleep 10"
X		 */
X		fflush(vpr);
X		fflush(stderr);
X#ifdef	HAVE_FSYNC
X		if (!no_fsync) {
X			fsync(fdown(vpr));
X			fsync(fdown(stderr));
X		}
X#endif
X		usleep(100000);
X	}
X#ifdef	FIFO
X	/*
X	 * Fetch errno from FIFO if available.
X	 */
X	if (fifo_errno())
X		excode = fifo_errno();
X#endif
X	if (dumplevel >= 0 && wtardumps) {
X		if (excode != 0 || intr) {
X			errmsgno(EX_BAD, "'%s' not written due to problems during backup.\n",
X				dumpdates);
X		} else {
X			int	dflags = 0;
X
X			if (gip->dumptype != DT_FULL)
X				dflags |= DD_PARTIAL;
X			if (dump_cumulative)
X				dflags |= DD_CUMULATIVE;
X
X			writedumpdates(dumpdates, gip->filesys, dumplevel, dflags, &ddate);
X		}
X	}
X
X	exit(excode);
X	/* NOTREACHED */
X	return (excode);	/* keep lint happy */
X}
X
XLOCAL void
Xstar_create(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	/*
X	 * xflag, tflag, diff_flag will never be TRUE in this case
X	 */
X	put_release();		/* Pax 'g' vendor unique */
X	put_archtype();		/* Pax 'g' vendor unique */
X	if (dumplevel < 0)	/* In dump mode we first collect the data */
X		put_volhdr(volhdr, TRUE);
X#ifdef	USE_FIND
X	if (dumplevel >= 0 && (listfile || dofind))
X		comerrno(EX_BAD,
X			"Cannot do incremental dumps with list= or -find.\n");
X#else
X	if (dumplevel >= 0 && listfile)
X		comerrno(EX_BAD, "Cannot do incremental dumps with list=.\n");
X#endif
X#ifdef	USE_FIND
X	if (dofind) {
X		if (find_patlen > 0) {
X			walkstate.patstate = ___malloc(sizeof (int) * find_patlen,
X						"space for pattern state");
X		}
X
X		walkstate.walkflags	= walkflags;
X		walkstate.maxdepth	= maxdepth;
X		walkstate.mindepth	= mindepth;
X		walkstate.lname		= NULL;
X		walkstate.tree		= find_node;
X		walkstate.err		= 0;
X		walkstate.pflags	= 0;
X
X		nodesc = TRUE;
X		for (av = find_av; av != find_pav; av++) {
X			treewalk(*av, walkfunc, &walkstate);
X		}
X	} else
X#endif
X	if (listfile) {
X		openlist();
X		if ((currdir = dir_flags) != NULL)
X			dochdir(currdir, TRUE);
X		/*
X		 * We do not allow file type args together with list=
X		 * Note that Sun tar allows a mix.
X		 */
X		if (getfiles(&ac, &av, opts) > 0)
X			comerrno(EX_BAD, "Too many args for list= option.\n");
X		createlist();
X	} else {
X		const char	*cdir = NULL;
X
X		for (; ; --ac, av++) {
X			if (dir_flags)
X				getdir(&ac, &av, &currdir);
X			if (currdir && cdir != currdir) {
X				if (!(dochdir(wdir, FALSE) &&
X				    dochdir(currdir, FALSE)))
X					break;
X				cdir = currdir;
X			}
X
X			if (getfiles(&ac, &av, opts) == 0)
X				break;
X			if (dumplevel >= 0) {
X				dumpd_t	*dp;
X				int	dflags = 0;
X
X				/*
X				 * The next message is only for debugging
X				 * purposes to find problems related to option
X				 * parsing.
X				 */
X				if (ac > 1)
X					errmsgno(EX_BAD, "INFO: ac %c av[0] '%s'\n", ac, av[0]);
X
X				/*
X				 * We cannot have more than one file type
X				 * argument in dump mode if we like to grant
X				 * the consistency of dumps. In theory, it would
X				 * be possible to allow it, but then we will not
X				 * be able to deal with renames from outside the
X				 * scope to inside the scope.
X				 */
X				if (ac > 1)
X					comerrno(EX_BAD,
X					"Only one file type arg allowed in dump mode.\n");
X				if (cdir == NULL)
X					comerrno(EX_BAD,
X					"Need '-C dir' in dump mode.\n");
X				if (cdir[0] != '/')
X					comerrno(EX_BAD,
X					"Need absolute path with '-C dir' in dump mode.\n");
X				if (!streql(av[0], "."))
X					comerrno(EX_BAD,
X					"File type arg must be '.' in dump mode.\n");
X
X				gip->filesys = (char *)cdir;
X				gip->gflags |= GF_FILESYS;
X				if (fs_name) {
X					gip->filesys = fs_name;
X					gip->cwd    = (char *)cdir;
X					gip->gflags |= GF_CWD;
X				}
X				/*
X				 * Set dump type to full/partial.
X				 */
X				checkdumptype(gip);
X				if (gip->dumptype != DT_FULL)
X					dflags |= DD_PARTIAL;
X				if (dump_cumulative)
X					dflags |= DD_CUMULATIVE;
X				dp = checkdumpdates(gip->filesys, dumplevel, dflags);
X				if (dp == NULL && dumplevel > 0 && gip->dumptype != DT_FULL)
X					dp = checkdumpdates(gip->filesys, dumplevel, 0);
X				if (dp == NULL && dumplevel > 0) {
X					errmsgno(EX_BAD,
X					"No level 0 dump entry found in '%s'.\n",
X					dumpdates);
X					comerrno(EX_BAD, "Perform a level 0 dump first.\n");
X				}
X				if (dp) {
X					oldlevel = dp->level;
X					Newer = dp->date;
X					gip->reflevel = dp->level;
X					gip->refdate = dp->date;
X					gip->gflags |= (GF_REFLEVEL|GF_REFDATE);
X				}
X
X				adddumpdates(gip->filesys, dumplevel, dflags,
X								&ddate, TRUE);
X
X				error("Type of this level %d%s dump: %s\n",
X					dumplevel,
X					(dflags & DD_PARTIAL) ? "P":" ",
X					dt_name(gip->dumptype));
X				error("Date of this level %d%s dump: %s\n",
X					dumplevel,
X					(dflags & DD_PARTIAL) ? "P":" ",
X					dumpdate(&ddate));
X				error("Date of last level %d%s dump: %s\n",
X					oldlevel,
X					(dp && (dp->flags & DD_PARTIAL)) ? "P":" ",
X					dumpdate(&Newer));
X
X				put_volhdr(volhdr, TRUE);
X			}
X			if (intr)
X				break;
X			curfs = NODEV;
X			/*
X			 * To avoid empty incremental dumps, make sure that
X			 * av[0] is always in the archive in with dumplevel >= 0
X			 */
X			create(av[0], paxHflag, dumplevel >= 0);
X			if (bsdchdir && wdir && !dochdir(wdir, FALSE))
X				break;
X		}
X	}
X	flushlinks();
X	weof();
X	buf_drain();
X}
X
XLOCAL void
Xcheckdumptype(gp)
X	GINFO	*gp;
X{
X	FINFO	dinfo;
X	FINFO	ddinfo;
X	BOOL	full = FALSE;
X
X	if (!_getinfo(".", &dinfo))
X		return;
X	if (!_getinfo("..", &ddinfo))
X		return;
X
X	if (dinfo.f_ino == ddinfo.f_ino && dinfo.f_dev == ddinfo.f_dev)
X		full = TRUE;
X
X	if (dinfo.f_dev != ddinfo.f_dev)
X		full = TRUE;
X	if (full && !dump_partial && !havepat) {
X		gp->gflags |= GF_DUMPTYPE;
X		gp->dumptype = DT_FULL;
X	} else {
X		gp->gflags |= GF_DUMPTYPE;
X		gp->dumptype = DT_PARTIAL;
X	}
X}
X
XLOCAL void
Xinit_ddate(name)
X	char	*name;
X{
X	FINFO	ddinfo;
X
X	if (!_getinfo(name, &ddinfo))
X		comerr("Cannot star '%s'.\n", name);
X
X	ddate.tv_sec  = ddinfo.f_mtime;
X	ddate.tv_usec = ddinfo.f_mnsec / 1000;
X}
X
XEXPORT void
Xcopy_create(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int		oac = ac;
X	char *const	*oav = av;
X	int		lac = ac;
X#ifdef	__needed__
X	char *const	*lav = av;
X#endif
X
X	verbose = 0;		/* Verbose not at create side */
X	interactive = FALSE;	/* Interactive not at create side */
X
X	if (!tflag) {
X		/*
X		 * Cut off beginning at last file type arg.
X		 */
X		for (; ; --ac, av++) {
X			if (getfiles(&ac, &av, opts) == 0)
X				break;
X			lac = ac;
X#ifdef	__needed__
X			lav = av;
X#endif
X		}
X		ac = oac-lac;
X		av = oav;
X	}
X
X	star_create(ac, av);
X	/*
X	 * XXX Fehlerzusammenfassung fuer die -c reate Seite?
X	 */
X}
X
XLOCAL int
Xgetfilecount(ac, av, fmt)
X	int		ac;
X	char	*const *av;
X	const char	*fmt;
X{
X	int	files = 0;
X
X	for (; ; --ac, av++) {
X		if (getfiles(&ac, &av, fmt) == 0)
X			break;
X		files++;
X	}
X	return (files);
X}
X
XLOCAL void
Xgetdir(acp, avp, dirp)
X	int		*acp;
X	char *const	**avp;
X	const char	**dirp;
X{
X	int	len = strlen(opts);
X	char	*dir = NULL;
X
X	if (iftype == I_CPIO || iftype == I_PAX)
X		return;
X	/*
X	 * Skip all other flags.
X	 * Note that we need to patch away "...,?" at the end of the
X	 * option string so this will not interfere with a -C dir
X	 * option in the command line.
X	 */
X	if (opts[len-1] == '?' && opts[len-2] == ',')
X		opts[len-2] = '\0';
X	getfiles(acp, avp, &opts[3]);
X
X	if (debug) /* temporary */
X		errmsgno(EX_BAD, "Flag/File: '%s'.\n", (*avp)[0]);
X
Xagain:
X	/*
X	 * Get next '-C dir' option
X	 */
X	if (getargs(acp, avp, "C*", &dir) < 0) {
X		int	cac = *acp;
X		/*
X		 * Skip all other flags that are known to star.
X		 */
X		if (getfiles(acp, avp, &opts[3]) < 0) {
X			/*
X			 * If we did find other legal flags, try again.
X			 */
X			if (cac > *acp)
X				goto again;
X
X			errmsgno(EX_BAD, "Badly placed Option: %s.\n",
X						(*avp)[0]);
X			if ((*avp)[1] != NULL)
X				errmsgno(EX_BAD, "Next arg is '%s'.\n",
X						(*avp)[1]);
X			susage(EX_BAD);
X		}
X	}
X	if (opts[len-2] == '\0')
X		opts[len-2] = ',';
X	if (dir)
X		*dirp = dir;
X	if (debug) /* temporary */
X		errmsgno(EX_BAD, "Dirp: '%s' Dir: %s.\n", *dirp, dir);
X}
X
XLOCAL void
Xopenlist()
X{
X	if (streql(listfile, "-")) {
X		check_stdin("list=");
X		listf = stdin;
X		listfile = "stdin";
X	} else if ((listf = fileopen(listfile, "r")) == (FILE *)NULL)
X		comerr("Cannot open '%s'.\n", listfile);
X}
X
XLOCAL void
Xcheck_stdin(name)
X	char	*name;
X{
X	if (did_stdin) {
X		comerrno(EX_BAD,
X		"Did already use stdin, cannot use stdin for '%s' option.\n",
X		name);
X	}
X	did_stdin = TRUE;
X}
X
X#ifndef	NO_STAR_MAIN
X/*
X * Short usage
X */
XLOCAL void
Xsusage(ret)
X	int	ret;
X{
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_susage(ret); exit(ret);
X	case P_GNUTAR:
X		gnutar_susage(ret); exit(ret);
X	case P_PAX:
X		pax_susage(ret); exit(ret);
X	case P_CPIO:
X		cpio_susage(ret); exit(ret);
X	}
X#endif
X#ifdef	USE_FIND
X	error("Usage:\t%s cmd [options] [-find] file1 ... filen [find expression]\n", get_progname());
X#else
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X#endif
X	error("\nUse\t%s -help\n", get_progname());
X	error("and\t%s -xhelp\n", get_progname());
X	error("to get a list of valid cmds and options.\n");
X	error("\nUse\t%s H=help\n", get_progname());
X	error("to get a list of valid archive header formats.\n");
X	error("\nUse\t%s diffopts=help\n", get_progname());
X	error("to get a list of valid diff options.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_usage(ret); exit(ret);
X	case P_GNUTAR:
X		gnutar_usage(ret); exit(ret);
X	case P_PAX:
X		pax_usage(ret); exit(ret);
X	case P_CPIO:
X		cpio_usage(ret); exit(ret);
X	}
X#endif
X#ifdef	USE_FIND
X	error("Usage:\t%s cmd [options] [-find] file1 ... filen [find expression]\n", get_progname());
X#else
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X#endif
X	error("Cmd:\n");
X	error("\t-c/-u/-r\tcreate/update/replace archive with named files to tape\n");
X	error("\t-x/-t/-n\textract/list/trace named files from tape\n");
X	error("\t-copy\t\tcopy named files to destination directory\n");
X	error("\t-diff\t\tdiff archive against file system (see -xhelp)\n");
X	error("Options:\n");
X	error("\t-help\t\tprint this help\n");
X	error("\t-xhelp\t\tprint extended help\n");
X	error("\t-version\tprint version information and exit\n");
X	error("\tblocks=#,b=#\tset blocking factor to #x512 Bytes (default 20)\n");
X	error("\tfile=nm,f=nm\tuse 'nm' as tape instead of stdin/stdout\n");
X	error("\t-T\t\tuse $TAPE as tape instead of stdin/stdout\n");
X	error("\t-[0-7]\t\tSelect an alternative tape drive\n");
X#ifdef	FIFO
X	error("\t-fifo/-no-fifo\tuse/don't use a fifo to optimize data flow from/to tape\n");
X#if defined(USE_MMAP) && defined(USE_USGSHM)
X	error("\t-shm\t\tuse SysV shared memory for fifo\n");
X#endif
X#endif
X	error("\t-v\t\tincrement verbose level\n");
X	error("\t-block-number\tprint the block numbers where the TAR headers start\n");
X	error("\t-tpath\t\tuse with -t, -cv or -diff to list path names only\n");
X	error("\tH=header\tgenerate 'header' type archive (see H=help)\n");
X	error("\tartype=header\tgenerate 'header' type archive (see artype=help)\n");
X	error("\t-print-artype\tcheck and print archive and compression type on one line and exit.\n");
X	error("\tC=dir\t\tperform a chdir to 'dir' before storing/extracting next file\n");
X	error("\t-bsdchdir\tdo BSD style C= (only related to the next file type arg)\n");
X#ifdef	USE_FIND
X	error("\t-find\t\tOption separator: Use find command line to the right.\n");
X#endif
X	error("\t-Z\t\tpipe input/output through compress, does not work on tapes\n");
X	error("\t-z\t\tpipe input/output through gzip, does not work on tapes\n");
X	error("\t-j,-bz\t\tpipe input/output through bzip2, does not work on tapes\n");
X	error("\t-lzo\t\tpipe input/output through lzop, does not work on tapes\n");
X	error("\t-7z\t\tpipe input/output through p7zip, does not work on tapes\n");
X	error("\t-xz\t\tpipe input/output through xz, does not work on tapes\n");
X	error("\t-lzip\t\tpipe input/output through lzip, does not work on tapes\n");
X	error("\tcompress-program=name\tpipe input/output through program 'name', does not work on tapes\n");
X	error("\t-B\t\tperform multiple reads (needed on pipes)\n");
X	error("\t-i\t\tignore checksum errors\n");
X	error("\t-d\t\tdo not store/create directories\n");
X	error("\t-m\t\tdo not restore access and modification time\n");
X	error("\t-o,-nochown\tdo not restore owner and group\n");
X	error("\t-pax-p string\tuse PAX like privileges set up\n");
X	error("\t-a,-atime\treset access time after storing file\n");
X	error("\t-p\t\trestore file permissions\n");
X	error("\t-no-p\t\tdo not restore file permissions\n");
X	error("\t-l\t\tdo not print a message if not all links are dumped\n");
X	error("\t-h,-L\t\tfollow symbolic links as if they were files\n");
X	error("\t-pax-L\t\tfollow symbolic links as if they were files (PAX style)\n");
X	error("\t-pax-H\t\tfollow cmdline symbolic links as if they were files (PAX style)\n");
X	error("\t-D\t\tdo not descend directories\n");
X	error("\t-M,-xdev\tdo not descend mounting points\n");
X	error("\t-w\t\tdo interactive creation/extraction/renaming\n");
X	error("\t-pax-i\t\tdo interactive creation/extraction/renaming (PAX style)\n");
X	error("\t-O\t\tbe compatible to old tar (except for checksum bug)\n");
X	error("\t-P\t\tlast record may be partial (useful on cartridge tapes)\n");
X	error("\t-S\t\tdo not store/create special files\n");
X	error("\t-F,-FF,-FFF,...\tdo not store/create SCCS/RCS, core and object files\n");
X	error("\t-U\t\trestore files unconditionally\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xxusage(ret)
X	int	ret;
X{
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_xusage(ret); exit(ret);
X	case P_GNUTAR:
X		gnutar_xusage(ret); exit(ret);
X	case P_PAX:
X		pax_xusage(ret); exit(ret);
X	case P_CPIO:
X		cpio_xusage(ret); exit(ret);
X	}
X#endif
X#ifdef	USE_FIND
X	error("Usage:\t%s cmd [options] [-find] file1 ... filen [find expression]\n", get_progname());
X#else
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X#endif
X	error("Extended options:\n");
X	error("\tdiffopts=optlst\tcomma separated list of diffopts (see diffopts=help)\n");
X	error("\t-debug\t\tprint additional debug messages\n");
X	error("\txdebug=#,xd=#\tset extended debug level\n");
X	error("\t-pax-ls\t\tprint a PAX type file listing\n");
X	error("\t-silent\t\tno not print informational messages\n");
X	error("\t-lowmem\t\ttry to use less memory for operation\n");
X	error("\t-not,-V\t\tuse those files which do not match pat= pattern\n");
X	error("\t-pax-match\tuse PAX like pattern matching\n");
X	error("\t-pax-n\t\tonly one match per pattern allowed\n");
X	error("\t-notarg,-pax-c\tuse those files which do not match file type pattern\n");
X	error("\tVOLHDR=name\tuse name to generate a volume header\n");
X	error("\t-xdir\t\textract dir even if the current is never\n");
X	error("\t-xdot\t\textract first '.' or './' dir even if the current is never\n");
X	error("\t-dirmode\twrite directories after the files they contain\n");
X	error("\t-link-dirs\tlook for hard linked directories in create mode\n");
X	error("\t-dump\t\tarchive more ino metadata (needed for incremental dumps)\n");
X	error("\t-restore\trestore incremental dumps\n");
X	error("\t-force-restore\tforce to restore partial incremental dumps\n");
X	error("\t-no-xheader\tdo not read or write extended headers regardless of format\n");
X	error("\t-meta\t\tuse inode metadata only (omit file content)\n");
X	error("\t-xmeta\t\textract meta files\n");
X	error("\t-dupmeta\tuse inode metadata in dump mode if only ctime is newer\n");
X	error("\t-keep-old-files,-k\tkeep existing files\n");
X	error("\t-refresh-old-files\trefresh existing files, don't create new files\n");
X	error("\t-refresh\trefresh existing files, don't create new files\n");
X	error("\t-/\t\tdon't strip leading '/'s from file names\n");
X	error("\t-..\t\tdon't skip filenames that contain '..' in non-interactive extract\n");
X	error("\t-secure-links\tdon't extract links that start with '/' or contain '..'\n");
X	error("\t-no-dirslash\tdon't append a slash to directory names\n");
X	error("\tlist=name\tread filenames from named file\n");
X	error("\t-X name\t\texclude filenames from named file\n");
X	error("\t-exclude-from name\texclude filenames from named file\n");
X	error("\tpkglist=name\tread filenames from named file (unstable interface for sps)\n");
X	error("\t-read0\t\tread null terminated filenames with list=\n");
X	error("\t-data-change-warn\ttreat data/size changes in create more as warning only\n");
X	error("\t-e\t\tabort on all error conditions undefined by errctl=\n");
X	error("\terrctl=name\tread error contrl definitions from named file\n");
X	error("\t-dodesc\t\tdo descend directories found in a list= file\n");
X	error("\tpattern=p,pat=p\tset matching pattern\n");
X	error("\t-match-tree\tdo not scan the content of non matching dirs in create mode\n");
X	error("\ts=replstr\tApply ed like pattern substitution -s /old/new/gp on filenames\n");
X	error("\tlevel=dumplevel\tset current incremental dump level\n");
X	error("\t-cumulative\tmake a cumulative incremental dump (relative to same level)\n");
X	error("\ttardumps=name\tset file name for tar dump dates, default is %s\n", dumpdates);
X	error("\t-wtardumps\tupdate file for tar dump dates if in dump mode\n");
X	error("\tdumpdate=name\tuse timestamp from name instead of current time for %s\n", dumpdates);
X	error("\tfs-name=name\tuse name instead of mount point for %s\n", dumpdates);
X	error("\tmaxsize=#\tdo not store file if bigger than # (default mult is kB)\n");
X	error("\tnewer=name\tstore only files which are newer than 'name'\n");
X	error("\t-multivol\tread/write/list a multi volume archive\n");
X	error("\tnew-volume-script=script\tcall 'script' at end of each volume\n");
X	error("\t-ctime\t\tuse ctime for newer= option\n");
X	error("\t-nodump\t\tdo not dump files that have the nodump flag set\n");
X	error("\t-acl\t\thandle access control lists\n");
X	error("\t-xattr\t\thandle extended file attributes\n");
X	error("\t-xattr-linux\t\thandle extended file attributes (Linux variant)\n");
X	error("\t-xfflags\thandle extended file flags\n");
X	error("\t-prinodes\tif archive contains inode number, print them in list mode\n");
X	error("\tbs=#\t\tset (output) block size to #\n");
X#ifdef	FIFO
X	error("\tfs=#\t\tset fifo size to #\n");
X#endif
X	error("\ttsize=#\t\tset tape volume size to # (default multiplier is 512)\n");
X	error("\t-qic24\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_24_TSIZE)/1024);
X	error("\t-qic120\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_120_TSIZE)/1024);
X	error("\t-qic150\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_150_TSIZE)/1024);
X	error("\t-qic250\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_250_TSIZE)/1024);
X	error("\t-qic525\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_525_TSIZE)/1024);
X	error("\t-no-fsync\tdo not call fsync() for each extracted file (may be dangerous)\n");
X	error("\t-nowarn\t\tdo not print warning messages\n");
X	error("\t-time\t\tprint timing info\n");
X	error("\t-no-statistics\tdo not print statistics\n");
X	error("\t-cpio-statistics\tprint cpio style statistics\n");
X#ifdef	FIFO
X	error("\t-fifostats\tprint fifo statistics\n");
X#endif
X	error("\t-numeric\tdon't use user/group name from tape\n");
X	error("\t-newest\t\tfind newest file on tape\n");
X	error("\t-newest-file\tfind newest regular file on tape\n");
X	error("\t-hpdev\t\tuse HP's non POSIX compliant method to store dev numbers\n");
X	error("\t-modebits\tinclude all 16 bits from stat.st_mode, this violates POSIX-1003.1\n");
X	error("\t-copylinks\tCopy hard and symlinks rather than linking\n");
X	error("\t-copyhardlinks\tCopy hardlink source files rather than linking\n");
X	error("\t-copysymlinks\tCopy symlink source files rather than linking\n");
X	error("\t-copydlinks\tCopy the content of linked dirs\n");
X	error("\t-hardlinks\tExtract symlinks as hardlinks\n");
X	error("\t-link-data\tInclude data for hard linked files\n");
X	error("\t-symlinks\tExtract hardlinks as symlinks\n");
X	error("\t-signed-checksum\tuse signed chars to calculate checksum\n");
X	error("\t-sparse\t\thandle file with holes effectively on store/create\n");
X	error("\t-force-hole\ttry to extract all files with holes\n");
X	error("\t-to-stdout\textract files to stdout\n");
X	error("\t-wready\t\twait for tape drive to become ready\n");
X	error("\t-force-remove\tforce to remove non writable files on extraction\n");
X	error("\t-ask-remove\task to remove non writable files on extraction\n");
X	error("\t-remove-first\tremove files before extraction\n");
X	error("\t-remove-recursive\tremove files recursive\n");
X	error("\t-keep-nonempty-dirs\tdo not complain about non-empty dirs\n");
X	error("\t-install\tcarefully replace old files with -x, similar to install(1)\n");
X	error("\tdir-owner=user\tIntermediate created directories will be owned by 'user'.\n");
X	error("\tdir-group=user\tIntermediate created directories will be owned by 'group'.\n");
X	error("\tumask=mask\tSet star's umask to 'mask'.\n");
X	error("\t-onull,-nullout\tsimulate creating an achive to compute the size\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X#endif	/* NO_STAR_MAIN */
X
XLOCAL void
Xdusage(ret)
X	int	ret;
X{
X	error("Diff options:\n");
X	error("\tnot\t\tif this option is present, exclude listed options\n");
X	error("\t!\t\tif this option is present, exclude listed options\n");
X	error("\tall\t\tcompare everything\n");
X	error("\tperm\t\tcompare file permissions\n");
X	error("\tmode\t\tcompare file permissions\n");
X	error("\tsymperm\t\tcompare symlink permissions\n");
X	error("\ttype\t\tcompare file type\n");
X	error("\tnlink\t\tcompare linkcount (star dump mode only)\n");
X	error("\tuid\t\tcompare owner of file\n");
X	error("\tgid\t\tcompare group of file\n");
X	error("\tuname\t\tcompare name of owner of file\n");
X	error("\tgname\t\tcompare name of group of file\n");
X	error("\tid\t\tcompare owner, group, ownername and groupname of file\n");
X	error("\tsize\t\tcompare file size\n");
X	error("\tdata\t\tcompare content of file\n");
X	error("\tcont\t\tcompare content of file\n");
X	error("\trdev\t\tcompare rdev of device node\n");
X	error("\thardlink\tcompare target of hardlink\n");
X	error("\tsymlink\t\tcompare target of symlink\n");
X	error("\tsympath\t\tcompare target pathname of symlink\n");
X	error("\tsparse\t\tcompare if both files are sparse or not\n");
X	error("\tatime\t\tcompare access time of file (only star)\n");
X	error("\tmtime\t\tcompare modification time of file\n");
X	error("\tctime\t\tcompare creation time of file (only star)\n");
X	error("\ttimes\t\tcompare all times of file\n");
X	error("\tlmtime\t\tcompare modification time of symlinks\n");
X	error("\txtimes\t\tcompare all times and lmtime\n");
X	error("\tdir\t\tcompare directory content (star dump mode only)\n");
X#ifdef USE_ACL
X	error("\tacl\t\tcompare access control lists (specify -acl also)\n");
X#endif
X#ifdef USE_XATTR
X	error("\txattr\t\tcompare extended attributes (specify -xattr also)\n");
X#endif
X#ifdef USE_FFLAGS
X	error("\tfflags\t\tcompare extended file flags (specify -xfflags also)\n");
X#endif
X	error("\n");
X	error("Default is to compare everything except atime.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xhusage(ret)
X	int	ret;
X{
X	error("Header types (default marked with '*'):\n");
X	hdr_usage();
X	exit(ret);
X	/* NOTREACHED */
X}
X
X#ifndef	NO_STAR_MAIN
XLOCAL void
Xgargs(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int	files	 = 0;
X	int	minfiles = 1;
X	BOOL	help	 = FALSE;
X	BOOL	xhelp	 = FALSE;
X	BOOL	prvers	 = FALSE;
X	BOOL	oldtar	 = FALSE;
X	BOOL	no_fifo	 = FALSE;
X	BOOL	usetape	 = FALSE;
X	BOOL	dodesc	 = FALSE;
X	BOOL	qic24	 = FALSE;
X	BOOL	qic120	 = FALSE;
X	BOOL	qic150	 = FALSE;
X	BOOL	qic250	 = FALSE;
X	BOOL	qic525	 = FALSE;
X	BOOL	dchangeflag = FALSE;
X	char	*pkglistfile = NULL;
X	char	*diruid	 = NULL;
X	char	*dirgid	 = NULL;
X	char	*u_mask	 = NULL;
X	const	char	*p;
X	Llong	llbs	 = 0;
Xsigned	char	archive	 = -1;		/* On IRIX, we have unsigned chars by default */
XBOOL	Ointeractive	 = FALSE;
X
X/* BEGIN CSTYLED */
X/*char	_opts[] = "C*,find~,help,xhelp,version,debug,xdebug#,xd#,bsdchdir,pax-ls,level#,tardumps*,wtardumps,time,no_statistics,no-statistics,cpio-statistics,fifostats,numeric,v+,block-number,tpath,c,u,r,x,t,copy,n,diff,diffopts&,H&,artype&,print-artype,fs-name*,force_hole,force-hole,sparse,to_stdout,to-stdout,wready,force_remove,force-remove,ask_remove,ask-remove,remove_first,remove-first,remove_recursive,remove-recursive,keep-nonempty-dirs,install,nullout,onull,fifo,no_fifo,no-fifo,shm,fs&,VOLHDR*,list*,pkglist*,multivol,new-volume-script*,force-local,restore,force-restore,file&,f&,T,Z,z,bz,j,lzo,7z,xz,lzip,compress-program*,bs&,blocks&,b&,B,pattern&,pat&,i,d,m,o,nochown,pax-p&,a,atime,p,no-p,dirmode,l,h,L,pax-L~,pax-H~,pax-P~,D,dodesc,M,xdev,w,pax-i,I,X&,exclude-from&,O,signed_checksum,signed-checksum,P,S,F+,U,xdir,xdot,k,keep_old_files,keep-old-files,refresh_old_files,refresh-old-files,refresh,/,..,secure-links,no-dirslash,not,V,match-tree,pax-match,pax-n,pax-c,notarg,maxsize&,newer*,ctime,nodump,tsize&,qic24,qic120,qic150,qic250,qic525,nowarn,newest_file,newest-file,newest,hpdev,modebits,copylinks,copyhardlinks,copysymlinks,copydlinks,hardlinks,symlinks,link-data,acl,xattr,xattr-linux,xfflags,link-dirs,dumpdate*,dump,cumulative,dump-cumulative,meta,dumpmeta,xmeta,silent,lowmem,no-xheader,no-fsync,read0,errctl&,e,data-change-warn,prinodes,dir-owner*,dir-group*,umask*,s&,?";*/
X/* END CSTYLED */
X
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_gargs(ac, av);
X		return;
X	case P_GNUTAR:
X		gnutar_gargs(ac, av);
X		return;
X	case P_PAX:
X		pax_gargs(ac, av);
X		return;
X	case P_CPIO:
X		cpio_gargs(ac, av);
X		return;
X	}
X#endif
X
X	p = filename(av[0]);
X	if (streql(p, "ustar")) {
X		/*
X		 * If we are called as "ustar" we are as POSIX-1003.1-1988
X		 * compliant as possible. There are no enhancements at all.
X		 */
X		hdrtype = H_USTAR;
X	} else if (streql(p, "tar")) {
X		/*
X		 * If we are called as "tar" we are mostly POSIX compliant
X		 * and use POSIX-1003.1-2001 extensions. The differences of the
X		 * base format compared to POSIX-1003.1-1988 can only be
X		 * regocnised by star. Even the checsum bug of the "pax"
X		 * reference implementation is not hit by the fingerprint
X		 * used to allow star to discriminate XUSTAR from USTAR.
X		 */
X		hdrtype = H_XUSTAR;
X	}
X	/*
X	 * Current default archive format in all other cases is XSTAR (see
X	 * above). This will not change until 2004 (then the new XUSTAR format
X	 * is recognised by star for at least 5 years and we may asume that
X	 * all star installations will properly handle it.
X	 * XSTAR is USTAR with extensions similar to GNU tar.
X	 */
X
X	iftype = I_TAR;		/* command line interface */
X	ptype  = P_STAR;	/* program interface type */
X
X	--ac, ++av;
X	files = getfilecount(ac, av, opts);
X	if (getallargs(&ac, &av, opts,
X				&dir_flags,
X				getfind, NULL,
X				&help, &xhelp, &prvers, &debug, &xdebug, &xdebug,
X				&bsdchdir, &paxls,
X				&dumplevel, &dumpdates, &wtardumps,
X				&showtime, &no_stats, &no_stats, &cpio_stats,
X				&do_fifostats,
X				&numeric, &verbose, &prblockno, &tpath,
X#ifndef	__old__lint
X				&cflag,
X				&uflag,
X				&rflag,
X				&xflag,
X				&tflag,
X				&copyflag,
X				&nflag,
X				&diff_flag, add_diffopt, &diffopts,
X				gethdr, &chdrtype, gethdr, &chdrtype,
X				&print_artype,
X				&fs_name,
X				&force_hole, &force_hole, &sparse, &to_stdout, &to_stdout, &wready,
X				&force_remove, &force_remove, &ask_remove, &ask_remove,
X				&remove_first, &remove_first, &remove_recursive, &remove_recursive,
X				&keep_nonempty_dirs, &do_install,
X				&nullout, &nullout,
X				&use_fifo, &no_fifo, &no_fifo, &shmflag,
X				getnum, &fs,
X				&volhdr,
X				&listfile, &pkglistfile,
X				&multivol, &newvol_script,
X				&force_noremote,
X				&dorestore, &forcerestore,
X				/*
X				 * All options starting with -f need to appear
X				 * before this line.
X				 */
X				addtarfile, NULL,
X				addtarfile, NULL,
X				&usetape,
X				&Zflag, &zflag, &bzflag, &bzflag, &lzoflag,
X				&p7zflag, &xzflag, &lzipflag,
X				&compress_prg,
X				getnum, &bs,
X				getbnum, &llbs,
X				getbnum, &llbs,
X				&multblk,
X				addpattern, NULL,
X				addpattern, NULL,
X				&ignoreerr,
X				&nodir,
X				&nomtime, &nochown, &nochown,
X				getpriv, NULL,
X				&acctime, &acctime,
X				&pflag, &nopflag, &dirmode,
X				&nolinkerr,
X				&follow, &follow,
X#ifdef	USE_FIND
X				getpaxL, &walkflags,
X				getpaxH, &walkflags,
X				getpaxP, &walkflags,
X#else
X				getpaxL, NULL,
X				getpaxH, NULL,
X				getpaxP, NULL,
X#endif
X				&nodesc,
X				&dodesc,
X				&nomount, &nomount,
X				&interactive, &paxinteract,
X				&Ointeractive,
X				getexclude, NULL,
X				getexclude, NULL,
X				&oldtar, &signedcksum, &signedcksum,
X				&partial,
X				&nospec, &Fflag,
X				&uncond, &xdir, &xdot,
X				&keep_old, &keep_old, &keep_old,
X				&refresh_old, &refresh_old, &refresh_old,
X				&abs_path, &allow_dotdot, &secure_links,
X				&no_dirslash,
X				&notpat, &notpat, &match_tree,
X				&paxmatch, &paxnflag, &notarg, &notarg,
X				getknum, &maxsize,
X				&stampfile,
X				&Ctime,
X				&nodump,
X				getbnum, &tsize,
X				&qic24,
X				&qic120,
X				&qic150,
X				&qic250,
X				&qic525,
X				&nowarn,
X#endif /* __old__lint */
X				&listnewf, &listnewf,
X				&listnew,
X				&hpdev, &modebits,
X				&copylinks, &copyhardlinks, &copysymlinks,
X				&copydlinks,
X				&hardlinks, &symlinks, &linkdata,
X				&doacl, &doxattr, &doxattr, &dofflags,
X				&link_dirs,
X				&dd_name,
X				&dodump, &dump_cumulative, &dump_cumulative,
X				&dometa, &dumpmeta, &xmeta,
X				&silent, &lowmem, &no_xheader, &no_fsync, &readnull,
X				errconfig, NULL,
X				&errflag, &dchangeflag,
X				&prinodes,
X				&diruid, &dirgid, &u_mask,
X				parsesubst, &do_subst, &archive) < 0) {
X		errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
X		susage(EX_BAD);
X	}
X
X	if (archive != -1 && !(archive >= '0' && archive <= '7')) {
X		errmsgno(EX_BAD, "Bad Option: -%c.\n", archive);
X		susage(EX_BAD);
X	}
X	star_helpvers("star", help, xhelp, prvers);
X
X	if (Ointeractive) {
X		comerrno(EX_BAD, "Option -I is obsolete and will get a different meaning in next release, use -w instead.\n");
X	}
X	if (tsize == 0) {
X		if (qic24)  tsize = QIC_24_TSIZE;
X		if (qic120) tsize = QIC_120_TSIZE;
X		if (qic150) tsize = QIC_150_TSIZE;
X		if (qic250) tsize = QIC_250_TSIZE;
X		if (qic525) tsize = QIC_525_TSIZE;
X	}
X	if (pkglistfile != NULL) {
X		listfile = pkglistfile;
X		pkglist = TRUE;
X	}
X	if (u_mask) {
X		long	l;
X
X		if (*astolb(u_mask, &l, 8))
X			comerrno(EX_BAD, "Bad umask '%s'.\n", u_mask);
X		umask((mode_t)l);
X	}
X	if (diruid) {
X		Llong	ll;
X		uid_t	uid;
X
X		if (!ic_uidname(diruid, strlen(diruid), &uid)) {
X			if (*astollb(diruid, &ll, 10))
X				comerrno(EX_BAD, "Bad uid '%s'.\n", diruid);
X			dir_uid = ll;
X		} else {
X			dir_uid = uid;
X		}
X	}
X	if (dirgid) {
X		Llong	ll;
X		gid_t	gid;
X
X		if (!ic_gidname(dirgid, strlen(dirgid), &gid)) {
X			if (*astollb(dirgid, &ll, 10))
X				comerrno(EX_BAD, "Bad gid '%s'.\n", diruid);
X			dir_gid = ll;
X		} else {
X			dir_gid = gid;
X		}
X	}
X
X	if (dchangeflag)
X		errconfig("WARN|GROW|SHRINK *");
X
X	star_checkopts(oldtar, dodesc, usetape, archive, no_fifo, llbs);
X#ifdef	USE_FIND
X	if (dofind && find_ac > 0) {
X		int	cac = find_ac;
X		char *const * cav = find_av;
X		finda_t	fa;
X
X		find_firstprim(&cac, &cav);
X		find_pac = cac;
X		find_pav = cav;
X		files = find_ac - cac;
X		if (!cflag && files > 0)
X			comerrno(EX_BAD, "Path arguments not yet supported in extract mode.\n");
X
X		if (cac > 0) {
X			BOOL	did_stdout = FALSE;
X			int	i;
X
X			now = time(0);
X			now = now +60;
X			find_argsinit(&fa);
X			fa.walkflags = walkflags;
X			fa.Argc = cac;
X			fa.Argv = (char **)cav;
X			find_node = find_parse(&fa);
X			if (fa.primtype == FIND_ERRARG)
X				comexit(fa.error);
X			if (fa.primtype != FIND_ENDARGS)
X				comerrno(EX_BAD, "Incomplete expression.\n");
X			plusp = fa.plusp;
X			find_patlen = fa.patlen;
X			walkflags = fa.walkflags;
X			maxdepth = fa.maxdepth;
X			mindepth = fa.mindepth;
X
X			for (i = 0; i < ntarfiles; i++) {
X				if (tarfiles[i][0] == '-' && tarfiles[i][1] == '\0')
X					did_stdout = TRUE;
X			}
X			if (ntarfiles == 1 && nullout)
X				did_stdout = FALSE;
X
X			if (find_node && (did_stdin || did_stdout)) {
X				if (find_pname(find_node, "-exec") ||
X				    find_pname(find_node, "-execdir") ||
X				    find_pname(find_node, "-exec+") ||
X				    find_pname(find_node, "-execdir+") ||
X				    find_pname(find_node, "-ok") ||
X				    find_pname(find_node, "-okdir"))
X					comerrno(EX_BAD,
X					"Cannot -exec with f=-.\n");
X				if (cflag && did_stdout &&
X				    (find_pname(find_node, "-print") ||
X				    find_pname(find_node, "-print0") ||
X				    find_pname(find_node, "-printnnl") ||
X				    find_pname(find_node, "-ls")))
X					comerrno(EX_BAD,
X					"Cannot -print/-ls with f=-.\n");
X			}
X		}
X	}
X#endif
X	star_nfiles(files, minfiles);
X}
X#endif	/* NO_STAR_MAIN */
X
XLOCAL void
Xstar_mkvers()
X{
X	char	buf[512];
X
X	if (vers != NULL)
X		return;
X
X	js_snprintf(buf, sizeof (buf),
X		"%s %s (%s-%s-%s)", "star", strvers, HOST_CPU, HOST_VENDOR, HOST_OS);
X
X	vers = ___savestr(buf);
X}
X
XLOCAL void
Xstar_helpvers(name, help, xhelp, prvers)
X	char	*name;
X	BOOL	help;
X	BOOL	xhelp;
X	BOOL	prvers;
X{
X	if (help)
X		usage(0);
X	if (xhelp)
X		xusage(0);
X	star_mkvers();
X	if (prvers) {
X		printf("%s: %s\n\n", name, vers);
X		printf("Options:");
X#ifdef	USE_ACL
X		opt_acl();
X#endif
X#ifdef	USE_FIND
X		printf(" find");
X#endif
X#ifdef	USE_FFLAGS
X		opt_fflags();
X#endif
X#ifdef	USE_REMOTE
X		opt_remote();
X#endif
X#ifdef	USE_XATTR
X		opt_xattr();
X#endif
X		printf("\n\n");
X		printf("Copyright (C) 1985, 88-90, 92-96, 98, 99, 2000-2013 Jörg Schilling\n");
X		printf("This is free software; see the source for copying conditions.  There is NO\n");
X		printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
X		exit(0);
X	}
X}
X
XLOCAL void
Xstar_checkopts(oldtar, dodesc, usetape, archive, no_fifo, llbs)
X	BOOL		oldtar;
X	BOOL		dodesc;		/* descend dirs from listfile */
X	BOOL		usetape;
X	int		archive;
X	BOOL		no_fifo;
X	Llong		llbs;
X{
X	int	n;
X
X	if (print_artype) {
X		tflag = TRUE;
X		no_fifo = TRUE;
X	}
X	if ((n = xflag + cflag + uflag + rflag + tflag + copyflag + nflag + diff_flag) > 1) {
X		if ((n == 2) && copyflag && (tflag || diff_flag)) {
X			/*
X			 * This is OK: star -copy -t or star -copy -diff
X			 */
X			/* EMPTY */
X		} else if ((n == 2) && cflag && (tflag || diff_flag)) {
X			copyflag = TRUE;
X			cflag = FALSE;
X		} else {
X			errmsgno(EX_BAD,
X			"Too many commands, only one of -x -c -u -r -t -copy -n or -diff is allowed.\n");
X			susage(EX_BAD);
X		}
X	}
X	if (!(xflag | cflag | uflag | rflag | tflag | copyflag | nflag | diff_flag)) {
X		errmsgno(EX_BAD, "Missing command, must specify -x -c -u -r -t -copy -n or -diff.\n");
X		susage(EX_BAD);
X	}
X	if (uflag || rflag) {
X		cflag = TRUE;
X		no_fifo = TRUE;	/* Until we are able to reverse the FIFO */
X		dump_partial = TRUE;
X	}
X	if (nullout && !cflag) {
X		errmsgno(EX_BAD, "-nullout only makes sense in create mode.\n");
X		susage(EX_BAD);
X	}
X	if (no_fifo || nullout)
X		use_fifo = FALSE;
X#ifndef	FIFO
X	if (use_fifo) {
X		errmsgno(EX_BAD, "Fifo not configured in.\n");
X		susage(EX_BAD);
X	}
X#endif
X
X	if (ptype == P_SUNTAR)
X		nolinkerr ^= tcompat;
X
X	noxdir = nodir;
X	if (xdir)		/* Extract all dirs uncond */
X		xdot = FALSE;
X
X	if (copylinks) {
X		copyhardlinks = TRUE;
X		copysymlinks = TRUE;
X	}
X	if (copyflag) {
X		hdrtype = chdrtype = H_EXUSTAR;
X		dodump = TRUE;
X		partial = TRUE;	/* Important as we fiddle with FIFO obs */
X		nodir = FALSE;
X		multivol = FALSE;
X		linkdata = FALSE;
X
X		if (!tflag && !diff_flag)
X			xflag = TRUE;
X
X		if (!use_fifo) {
X			errmsgno(EX_BAD, "Need fifo for -copy mode.\n");
X			susage(EX_BAD);
X		}
X	}
X	if (cflag && linkdata && sparse)
X		linkdata = FALSE;	/* XXX Cannot yet do sparse datalinks */
X
X	if (dumplevel >= 0) {
X		/*
X		 * This is an articicial limitation, our code supports an
X		 * unlimited number of dump levels.
X		 */
X		if (dumplevel > 99)
X			comerrno(EX_BAD, "Illegal dump level, use 0..99\n");
X		dodump = TRUE;
X		if (!nomount)
X			comerrno(EX_BAD, "A dump needs the -M/-xdev option.\n");
X	}
X	if (dodump) {
X		chdrtype = H_EXUSTAR;
X		if (lowmem)
X			comerrno(EX_BAD, "Dump mode does not work with -lowmem.\n");
X	}
X	if (dump_cumulative) {
X		if (dumplevel < 0)
X			comerrno(EX_BAD, "With -cumulative, level= is needed.\n");
X	}
X	if (maxsize > 0 || Fflag > 0 || nospec || nodump)
X		dump_partial = TRUE;
X
X	if (forcerestore)
X		dorestore = TRUE;
X	if (dorestore) {
X		xdir = TRUE;
X		if (!uncond)
X			comerrno(EX_BAD, "A restore needs the -U option.\n");
X		if (do_install)
X			comerrno(EX_BAD, "-install not allowed in restore mode.\n");
X	}
X	if (oldtar)
X		chdrtype = H_OTAR;
X	if (chdrtype != H_UNDEF) {
X		if (H_TYPE(chdrtype) == H_OTAR)
X			oldtar = TRUE;	/* XXX hack */
X	}
X	/*
X	 * We do not set chdrtype here in case it is H_UNDEF and -r or -u have
X	 * been specified.
X	 */
X	if (cflag && (!(rflag || uflag) || chdrtype != H_UNDEF)) {
X		if (chdrtype != H_UNDEF)
X			hdrtype = chdrtype;
X		chdrtype = hdrtype;	/* wegen setprops(chdrtype) in main() */
X
X		/*
X		 * hdrtype und chdrtype
X		 * bei uflag, rflag sowie xflag, tflag, nflag, diff_flag
X		 * in get_tcb vergleichen !
X		 */
X	}
X	if (no_dirslash && chdrtype == H_OTAR) {
X		errmsgno(EX_BAD, "-no-dirslash cannot be used with the old tar format\n");
X		susage(EX_BAD);
X	}
X	if (diff_flag) {
X		if (diffopts == 0)
X			diffopts = D_DEFLT;
X	} else if (diffopts != 0) {
X		errmsgno(EX_BAD, "diffopts= only makes sense with -diff\n");
X		susage(EX_BAD);
X	}
X	if (fs == 0L) {
X		char	*ep = getenv("STAR_FIFOSIZE");
X
X		if (ep) {
X			if (getnum(ep, &fs) != 1) {
X				comerrno(EX_BAD,
X					"Bad fifo size environment '%s'.\n",
X									ep);
X			}
X		}
X	}
X	if (llbs != 0 && bs != 0) {
X		errmsgno(EX_BAD, "Only one of blocks= b= bs=.\n");
X		susage(EX_BAD);
X	}
X	if (llbs != 0) {
X		bs = (long)llbs;
X		if (bs != llbs) {
X			errmsgno(EX_BAD, "Blocksize used with blocks= or b= too large.\n");
X			susage(EX_BAD);
X		}
X	}
X	if (bs % TBLOCK) {
X		errmsgno(EX_BAD, "Invalid block size %ld.\n", bs);
X		susage(EX_BAD);
X	}
X	if (bs)
X		nblocks = bs / TBLOCK;
X	if (nblocks <= 0) {
X		errmsgno(EX_BAD, "Invalid block size %d blocks.\n", nblocks);
X		susage(EX_BAD);
X	}
X	bs = nblocks * TBLOCK;
X	if (debug) {
X		errmsgno(EX_BAD, "Block size %d blocks (%ld bytes).\n", nblocks, bs);
X	}
X	if (tsize > 0) {
X		if (tsize % TBLOCK) {
X			errmsgno(EX_BAD, "Invalid tape size %llu.\n", tsize);
X			susage(EX_BAD);
X		}
X		tsize /= TBLOCK;
X	}
X
X	if (pkglist) {
X		dodesc = FALSE;
X		readnull = FALSE;
X		if (!cflag)
X			comerrno(EX_BAD, "pkglist= option only works in create mode.\n");
X	}
X	if (listfile != NULL)
X		dump_partial = TRUE;
X
X	if (listfile != NULL && !dodesc)
X		nodesc = TRUE;
X	if (oldtar)
X		nospec = TRUE;
X	if (!tarfiles[0]) {
X		if (usetape) {
X			tarfiles[0] = getenv("TAPE");
X		}
X		if ((usetape || archive > 0) &&
X		    !tarfiles[0]) {
X			static char	arname[] = "archive0=";
X				Ullong	otsize = tsize;
X				char	*dfltfile = NULL;
X
X#ifdef	DFLT_FILE
X#define	DFILE	DFLT_FILE
X#else
X#define	DFILE	NULL
X#endif
X			/*
X			 * If we got a digit option, check for an 'archive#='
X			 * entry in /etc/default/[s!]tar. If there was no -f
X			 * or digit option, look for 'archive0='.
X			 */
X			if (archive < '0' || archive > '9')
X				archive = '0';
X			arname[7] = (char)archive;
X			if (ptype == P_SUNTAR)
X				dfltfile = DFILE;
X			if (!star_darchive(arname, dfltfile)) {
X				errmsgno(EX_BAD,
X					"Archive entry %c not found in %s. %s",
X					archive,
X					get_stardefaults(DFILE),
X					"Using stdin/stdout as archive.\n");
X				tarfiles[0] = NULL;
X				tsize = otsize;
X			}
X		}
X		if (!tarfiles[0])
X			tarfiles[0] = "-";
X		ntarfiles++;
X	}
X	if (!cflag && !copyflag) {
X		for (n = 0; n < ntarfiles; n++) {
X			if (tarfiles[n][0] == '-' && tarfiles[n][1] == '\0')
X				check_stdin("-f");
X		}
X	}
X	if (tsize % nblocks) {
X		/*
X		 * Silently round down to a multiple of the tape block size.
X		 */
X		tsize /= nblocks;
X		tsize *= nblocks;
X	}
X	/*
X	 * XXX This must be rethought with files split by multi volume and
X	 * XXX with with volume headers and continuation headers.
X	 */
X	if (tsize > 0 && tsize < 3) {
X		errmsgno(EX_BAD, "Tape size must be at least 3 blocks.\n");
X		susage(EX_BAD);
X	}
X	/*
X	 * XXX This is a place that should be checked every time, when
X	 * XXX possible interactivity is modified.
X	 */
X	if (interactive || ask_remove ||
X	    ((multivol || tsize > 0) && !newvol_script)) {
X#ifdef	JOS
X		tty = stderr;
X#else
X#ifdef	HAVE__DEV_TTY
X		if ((tty = fileopen("/dev/tty", "r")) == (FILE *)NULL)
X			comerr("Cannot open '/dev/tty'.\n");
X#else
X		tty = stderr;
X#endif
X#endif
X	}
X	if (nflag) {
X		xflag = TRUE;
X		interactive = TRUE;
X		if (verbose == 0 && !tpath)
X			verbose = 1;
X	}
X	if (to_stdout) {
X		force_hole = FALSE;
X	}
X	if (keep_old && refresh_old) {
X		errmsgno(EX_BAD, "Cannot use -keep-old-files and -refresh-old-files together.\n");
X		susage(EX_BAD);
X	}
X	if ((copylinks + hardlinks + symlinks) > 1) {
X		errmsgno(EX_BAD, "Only one of -copylinks -hardlinks -symlinks.\n");
X		susage(EX_BAD);
X	}
X
X	if (my_uid == 0 && !nopflag)
X		pflag = TRUE;
X
X	/*
X	 * -acl includes -p
X	 */
X	if (doacl)
X		pflag = TRUE;
X
X	star_defaults(&fs, NULL);
X}
X
XEXPORT void
Xstar_verifyopts()
X{
X	if (cflag && (props.pr_flags & PR_LINK_DATA) == 0)
X		linkdata = FALSE;
X	if (cflag && multivol && (props.pr_flags & PR_MULTIVOL) == 0) {
X		errmsgno(EX_BAD,
X		"Multi volume archives are not supported with %s format.\n",
X		hdr_name(chdrtype));
X		susage(EX_BAD);
X	}
X	if (cflag && doacl) {
X		/*
X		 * Check properties for archive format.
X		 */
X		if ((props.pr_xhmask & (XF_ACL_ACCESS|XF_ACL_DEFAULT)) == 0) {
X			errmsgno(EX_BAD,
X				"Archive format '%s' does not support -acl.\n",
X							hdr_name(chdrtype));
X			susage(EX_BAD);
X		}
X	}
X}
X
XLOCAL void
Xstar_nfiles(files, minfiles)
X	int	files;
X	int	minfiles;
X{
X	if (cflag || copyflag) {
X		if (copyflag && !tflag)
X			minfiles++;
X		if (listfile)
X			minfiles--;
X		if (files < minfiles) {
X			errmsgno(EX_BAD, "Too few arguments; will not create an empty archive.\n");
X			susage(EX_BAD);
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL int
XgetpaxH(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	GETARG_DEBUG
X	error("paxH\n");
X#endif
X	paxfollow = FALSE;
X	paxHflag = TRUE;
X#ifdef	USE_FIND
X	*(int *)valp |= WALK_ARGFOLLOW;
X#endif
X	return (1);
X}
X
X/* ARGSUSED */
XLOCAL int
XgetpaxL(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	GETARG_DEBUG
X	error("paxL\n");
X#endif
X	paxfollow = TRUE;
X	paxHflag = FALSE;
X#ifdef	USE_FIND
X	*(int *)valp |= WALK_ALLFOLLOW;
X#endif
X	return (1);
X}
X
X/* ARGSUSED */
XLOCAL int
XgetpaxP(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	GETARG_DEBUG
X	error("paxP\n");
X#endif
X	paxfollow = FALSE;
X	paxHflag = FALSE;
X#ifdef	USE_FIND
X	*(int *)valp &= ~(WALK_ARGFOLLOW | WALK_ALLFOLLOW);
X#endif
X	return (1);
X}
X
X/* ARGSUSED */
XLOCAL int
Xgetfind(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;	/* Not used until we introduce a ptr to opt struct */
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	USE_FIND
X	dofind = TRUE;
X	find_ac = *pac;
X	find_av = *pav;
X	find_ac--, find_av++;
X	return (NOARGS);
X#else
X	return (BADFLAG);
X#endif
X}
X
X/* ARGSUSED */
XLOCAL int
Xgetpriv(arg, valp)
X	char	*arg;
X	long	*valp;	/* Not used until we introduce a ptr to opt struct */
X{
X	register char	*p = arg;
X	register char	c;
X
X	while ((c = *p++) != '\0') {
X		switch (c) {
X
X		case 'a':	/* do not preserve access time */
X			noatime = TRUE;
X			break;
X
X		case 'e':	/* preserve everything */
X			pflag = TRUE;
X			doacl = TRUE;
X			doxattr = TRUE;
X			dofflags = TRUE;
X			noatime = FALSE;
X			nomtime = FALSE;
X			nochown = FALSE;
X			break;
X
X		case 'm':	/* do not preserve modification time */
X			nomtime = TRUE;
X			break;
X
X		case 'o':	/* preserve userid/grupid & SUID/SGID */
X			nochown = FALSE;
X			break;
X
X		case 'p':	/* preserve file mode bits (permissions) */
X			pflag = TRUE;
X			break;
X
X		default:
X			errmsgno(EX_BAD,
X				"Bad character '%c' in option '-p %s'.\n",
X				c, arg);
X			return (-1);
X		}
X	}
X	return (1);
X}
X
XLOCAL int
Xgetlldefault(arg, valp, mult)
X	char	*arg;
X	Llong	*valp;
X	int	mult;
X{
X	int	ret = 1;
X	int	len = strlen(arg);
X
X	if (len > 0) {
X		len = (Uchar)arg[len-1];
X		if (!isdigit(len))
X			mult = 1;
X	}
X	ret = getllnum(arg, valp);
X	if (ret == 1)
X		*valp *= mult;
X	return (ret);
X}
X
XEXPORT int
Xgetbnum(arg, valp)
X	char	*arg;
X	Llong	*valp;
X{
X	return (getlldefault(arg, valp, 512));
X}
X
XEXPORT int
Xgetknum(arg, valp)
X	char	*arg;
X	Llong	*valp;
X{
X	return (getlldefault(arg, valp, 1024));
X}
X
XLOCAL int
Xaddtarfile(tarfile)
X	const char	*tarfile;
X{
X#ifdef	ADDARG_DEBUG
X	if (debug)
X		error("Add tar file '%s'.\n", tarfile);
X#endif
X
X	if (ntarfiles >= NTARFILE)
X		comerrno(EX_BAD, "Too many tar files (max is %d).\n", NTARFILE);
X
X	if (ntarfiles > 0 && (streql(tarfile, "-") || streql(tarfiles[0], "-")))
X		comerrno(EX_BAD, "Cannot handle multi volume archives from/to stdin/stdout.\n");
X
X	tarfiles[ntarfiles] = tarfile;
X	ntarfiles++;
X	return (TRUE);
X}
X
XLOCAL int
Xadd_diffopt(optstr, flagp)
X	char	*optstr;
X	long	*flagp;
X{
X	char	*ep;
X	char	*np;
X	int	optlen;
X	long	optflags = 0;
X	BOOL	not = FALSE;
X
X	while (*optstr) {
X		if ((ep = strchr(optstr, ',')) != NULL) {
X			Intptr_t	pdiff = ep - optstr;
X
X			optlen = (int)pdiff;
X			if (optlen != pdiff)	/* lint paranoia */
X				return (-1);
X			np = &ep[1];
X		} else {
X			optlen = strlen(optstr);
X			np = &optstr[optlen];
X		}
X		if (optstr[0] == '!') {
X			optstr++;
X			optlen--;
X			not = TRUE;
X		}
X		if (strncmp(optstr, "not", optlen) == 0 ||
X				strncmp(optstr, "!", optlen) == 0) {
X			not = TRUE;
X		} else if (strncmp(optstr, "all", optlen) == 0) {
X			optflags |= D_ALL;
X		} else if (strncmp(optstr, "perm", optlen) == 0) {
X			optflags |= D_PERM;
X		} else if (strncmp(optstr, "mode", optlen) == 0) {
X			optflags |= D_PERM;
X		} else if (strncmp(optstr, "symperm", optlen) == 0) {
X			optflags |= D_SYMPERM;
X		} else if (strncmp(optstr, "type", optlen) == 0) {
X			optflags |= D_TYPE;
X		} else if (strncmp(optstr, "nlink", optlen) == 0) {
X			optflags |= D_NLINK;
X		} else if (strncmp(optstr, "uid", optlen) == 0) {
X			optflags |= D_UID;
X		} else if (strncmp(optstr, "gid", optlen) == 0) {
X			optflags |= D_GID;
X		} else if (strncmp(optstr, "uname", optlen) == 0) {
X			optflags |= D_UNAME;
X		} else if (strncmp(optstr, "gname", optlen) == 0) {
X			optflags |= D_GNAME;
X		} else if (strncmp(optstr, "id", optlen) == 0) {
X			optflags |= D_ID;
X		} else if (strncmp(optstr, "size", optlen) == 0) {
X			optflags |= D_SIZE;
X		} else if (strncmp(optstr, "data", optlen) == 0) {
X			optflags |= D_DATA;
X		} else if (strncmp(optstr, "cont", optlen) == 0) {
X			optflags |= D_DATA;
X		} else if (strncmp(optstr, "rdev", optlen) == 0) {
X			optflags |= D_RDEV;
X		} else if (strncmp(optstr, "hardlink", optlen) == 0) {
X			optflags |= D_HLINK;
X		} else if (strncmp(optstr, "symlink", optlen) == 0) {
X			optflags |= D_SLINK;
X		} else if (strncmp(optstr, "sympath", optlen) == 0) {
X			optflags |= D_SLPATH;
X		} else if (strncmp(optstr, "sparse", optlen) == 0) {
X			optflags |= D_SPARS;
X		} else if (strncmp(optstr, "atime", optlen) == 0) {
X			optflags |= D_ATIME;
X		} else if (strncmp(optstr, "mtime", optlen) == 0) {
X			optflags |= D_MTIME;
X		} else if (strncmp(optstr, "ctime", optlen) == 0) {
X			optflags |= D_CTIME;
X		} else if (strncmp(optstr, "lmtime", optlen) == 0) {
X			optflags |= D_LMTIME;
X		} else if (strncmp(optstr, "times", optlen) == 0) {
X			optflags |= D_TIMES;
X		} else if (strncmp(optstr, "xtimes", optlen) == 0) {
X			optflags |= D_XTIMES;
X		} else if (strncmp(optstr, "dir", optlen) == 0) {
X			optflags |= D_DIR;
X#ifdef USE_ACL
X		} else if (strncmp(optstr, "acl", optlen) == 0) {
X			optflags |= D_ACL;
X#endif
X#ifdef USE_XATTR
X		} else if (strncmp(optstr, "xattr", optlen) == 0) {
X			optflags |= D_XATTR;
X#endif
X#ifdef USE_FFLAGS
X		} else if (strncmp(optstr, "fflags", optlen) == 0) {
X			optflags |= D_FFLAGS;
X#endif
X		} else if (strncmp(optstr, "help", optlen) == 0) {
X			dusage(0);
X		} else {
X			error("Illegal diffopt.\n");
X			dusage(EX_BAD);
X			return (-1);
X		}
X		optstr = np;
X	}
X	if (not)
X		optflags = ~optflags;
X
X	if ((optflags & D_MTIME) == 0)
X		optflags &= ~D_LMTIME;
X
X	if ((optflags & D_SLINK) == 0)
X		optflags &= ~D_SLPATH;
X
X	*flagp = optflags;
X
X	return (TRUE);
X}
X
XLOCAL int
Xgethdr(optstr, typep)
X	char	*optstr;
X	long	*typep;
X{
X	BOOL	swapped = FALSE;
X	long	type	= H_UNDEF;
X
X	if (*optstr == 'S') {
X		swapped = TRUE;
X		optstr++;
X	}
X	if (streql(optstr, "help")) {
X		husage(0);
X	} else if ((type = hdr_type(optstr)) < 0) {
X		error("Illegal header type '%s'.\n", optstr);
X		husage(EX_BAD);
X		return (-1);
X	}
X	if (swapped)
X		*typep = H_SWAPPED(type);
X	else
X		*typep = type;
X	return (TRUE);
X}
X
X/* ARGSUSED */
XLOCAL int
Xgetexclude(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X	FILE	*xf;
X
X	if (streql(arg, "-")) {
X		check_stdin("-X");
X		xf = stdin;
X	} else if ((xf = fileopen(arg, "r")) == (FILE *)NULL)
X		comerr("Cannot open '%s'.\n", arg);
X	hash_xbuild(xf);
X	fclose(xf);
X	return (1);
X}
X
X#ifdef	USED
X/*
X * Add archive file.
X * May currently not be activated:
X *	If the option string ends with ",&", the -C option will not work
X *	anymore.
X */
XLOCAL int
Xaddfile(optstr, dummy)
X	char	*optstr;
X	long	*dummy;
X{
X	char	*p;
X
X#ifdef	ADDARG_DEBUG
X	error("got_it: %s\n", optstr);
X#endif
X
X	if (!strchr("01234567", optstr[0]))
X		return (NOTAFILE); /* Tell getargs that this may be a flag */
X
X	for (p = &optstr[1]; *p; p++) {
X		if (*p != 'l' && *p != 'm' && *p != 'h')
X			return (BADFLAG);
X	}
X#ifdef	ADDARG_DEBUG
X	error("is_tape: %s\n", optstr);
X#endif
X
X	comerrno(EX_BAD, "Options [0-7][lmh] currently not supported.\n");
X	/*
X	 * The tape device should be determined from the defaults file
X	 * in the near future.
X	 * Search for /etc/opt/schily/star, /etc/default/star, /etc/default/tar
X	 */
X
X	return (1);		/* Success */
X}
X#endif
X
XLOCAL void
Xset_signal(sig, handler)
X	int		sig;
X	RETSIGTYPE	(*handler)	__PR((int));
X{
X#if	defined(HAVE_SIGPROCMASK) && defined(SA_RESTART)
X	struct sigaction sa;
X
X	sigemptyset(&sa.sa_mask);
X	sa.sa_handler = handler;
X	sa.sa_flags = SA_RESTART;
X	(void) sigaction(sig, &sa, (struct sigaction *)0);
X#else
X#ifdef	HAVE_SIGSETMASK
X	struct sigvec	sv;
X
X	sv.sv_mask = 0;
X	sv.sv_handler = handler;
X	sv.sv_flags = 0;
X	(void) sigvec(sig, &sv, (struct sigvec *)0);
X#else
X	(void) signal(sig, handler);
X#endif
X#endif
X}
X
XLOCAL void
Xexsig(sig)
X	int	sig;
X{
X	(void) signal(sig, SIG_DFL);
X	kill(getpid(), sig);
X}
X
X/* ARGSUSED */
XLOCAL void
Xsighup(sig)
X	int	sig;
X{
X#ifdef	SIGHUP
X	set_signal(SIGHUP, sighup);
X#endif
X	prstats();
X	intr++;
X	if (!cflag)
X		exsig(sig);
X}
X
X/* ARGSUSED */
XLOCAL void
Xsigintr(sig)
X	int	sig;
X{
X#ifdef	SIGINT
X	set_signal(SIGINT, sigintr);
X#endif
X	prstats();
X	intr++;
X	if (!cflag)
X		exsig(sig);
X}
X
X/* ARGSUSED */
XLOCAL void
Xsigquit(sig)
X	int	sig;
X{
X	/*
X	 * sig may be either SIGQUIT or SIGINFO (*BSD only).
X	 */
X	set_signal(sig, sigquit);
X	prstats();
X}
X
XLOCAL void
Xgetstamp()
X{
X	FINFO	finfo;
X	BOOL	ofollow = follow;
X
X	follow = TRUE;
X	if (!_getinfo(stampfile, &finfo))
X		comerr("Cannot stat '%s'.\n", stampfile);
X	follow = ofollow;
X
X	Newer.tv_sec = finfo.f_mtime;
X	Newer.tv_usec = finfo.f_mnsec / 1000;
X}
X
XLOCAL void
Xset_ptype(pac, pav)
X	int	*pac;
X	char	*const **pav;
X{
X#ifdef	__needed__
X	int	ac		= *pac;
X#endif
X	char	*const *av	= *pav;
Xconst	char	*p;
X
X	p = filename(av[0]);
X
X	/*
X	 * If you like different behavior, you need to insert exceptional
X	 * code before the switch statement.
X	 *
X	 * These are the names we support:
X	 *
X	 *	cpio gnutar pax star suntar ustar
X	 */
X	switch (p[0]) {
X
X	case 'c':			/* 'c'pio */
X		ptype = P_CPIO;
X		return;
X
X	case 'g':			/* 'g'*tar */
X		ptype = P_GNUTAR;
X		return;
X
X	case 'p':			/* 'p'ax */
X		ptype = P_PAX;
X		return;
X
X	case 't':			/* 't'ar */
X		/*
X		 * If we put something different here (e.g. P_STAR), we may
X		 * set the default behavior to be the behavor of 'star'.
X		 */
X		ptype = P_SUNTAR;
X		return;
X	case 's':
X		if (streql(p, "suntar")) {
X			ptype = P_SUNTAR;
X			return;
X		}
X		if (streql(p, "scpio")) {
X			ptype = P_CPIO;
X			return;
X		}
X		if (streql(p, "spax")) {
X			ptype = P_PAX;
X			return;
X		}
X		/* FALLTHRU */
X
X	case 'u':			/* 'u'star */
X		ptype = P_STAR;
X		return;
X	default:
X		ptype = PTYPE_DEFAULT;
X		return;
X	}
X}
X
X/* BEGIN CSTYLED */
X/*
X * Convert old tar type syntax into the new UNIX option syntax.
X * Allow only a limited subset of the single character options to avoid
X * collisions between interpretation of options in different
X * tar implementations. The old syntax has a risk to damage files
X * which is avoided with the 'fcompat' flag (see opentape()).
X *
X * The UNIX-98 documentation lists the following tar options:
X *	Function Key:	crtux
X *			c	Create
X *			r	Append
X *			t	List
X *			u	Update
X *			x	Extract
X *	Additional Key:	vwfblmo
X *			v	Verbose
X *			w	Wait for confirmation
X *			f	Archive file
X *			b	Blocking factor
X *			l	Report missing links
X *			m	Do not restore mtime from archive
X *			o	Do not restore owner/group from archive
X *
X *	Incompatibilities with UNIX-98 tar:
X *			l	works the oposite way round as with star, but
X *				if TAR_COMPAT is defined, star will behave
X * 				as documented in UNIX-98 if av[0] is either
X *				"tar" or "ustar".
X *
X *	Additional functions from historic UNIX tar versions:
X *			0..7	magtape_0 .. magtape_7
X *
X *	Additional functions from historic BSD tar versions:
X *			p	Extract dir permissions too
X *			h	Follow symbolic links
X *			i	ignore directory checksum errors
X *			B	do multiple reads to reblock pipes
X *			F	Ommit unwanted files (e.g. core)
X *
X *	Additional functions from historic Star versions:
X *			T	Use $TAPE environment as archive
X *			L	Follow symbolic links
X *			d	do not archive/extract directories
X *			k	keep old files
X *			n	do not extract but tell what to do
X *
X *	Additional functions from historic SVr4 tar versions:
X *			e	Exit on unexpected errors
X *			X	Arg is File with unwanted filenames
X *
X *	Additional functions from historic GNU tar versions:
X *			z	do inline compression
X *
X *	Missing in star (from SVr4/Solaris tar):
X *			E	Extended headers
X *			P	Supress '/' at beginning of filenames
X *			q	quit after extracting first file
X *	Incompatibilities with SVr4/Solaris tar:
X *			I	Arg is File with filenames to be included
X *				The -I option is not handled as option.
X *			P	SVr4/solaris: Supress '/', star: last partial
X *			k	set tape size for multi volume archives
X *			n	non tape device (do seeks)
X *
X *	Incompatibilities with GNU tar:
X *		There are many. GNU programs in many cases make smooth
X *		coexistence hard.
X *
X * Problems:
X *	The 'e' and 'X' option are currently not implemented.
X *	There is a collision between the BSD -I (include) and
X *	star's -I (interactive) which may be solved by using -w instead.
X */
X/* END CSTYLED */
XLOCAL void
Xdocompat(pac, pav)
X	int	*pac;
X	char	*const **pav;
X{
X	int	ac		= *pac;
X	char	*const *av	= *pav;
X	int	nac;
X	char	**nav;
X	char	nopt[3];
X	char	*_copt = "crtuxbfXBFTLdehijklmnopvwz01234567";
X	char	*copt = _copt;
Xconst	char	*p;
X	char	c;
X	char	*const *oa;
X	char	**na;
X
X	set_ptype(pac, pav);
X	switch (ptype) {
X
X	case P_SUNTAR:
X		iftype = I_TAR;
X#ifdef	SUN_TAR
X		copt = sun_copt;
X#endif
X		break;
X	case P_GNUTAR:
X		iftype = I_TAR;
X#ifdef	GNU_TAR
X		copt = gnu_copt;
X#endif
X		break;
X	case P_PAX:
X		iftype = I_PAX;
X		break;
X	case P_CPIO:
X		iftype = I_CPIO;
X		break;
X	case P_STAR:
X	default:
X		iftype = I_TAR;
X		copt = _copt;
X	}
X
X	/*
X	 * We must check this first to be able to set 'tcompat'.
X	 */
X	p = filename(av[0]);
X	if (streql(p, "tar") || streql(p, "ustar") ||
X	    streql(p, "suntar") || streql(p, "gnutar") || streql(p, "gtar"))
X		tcompat = TRUE;
X
X	if (ac <= 1)
X		return;
X	if (iftype != I_TAR)
X		return;
X
X	if (ptype != P_SUNTAR && ptype != P_GNUTAR)
X	/*
X	 * For "suntar" & "gnutar" the first option string may start with '-',
X	 * else only convert to new syntax if the first arg is a non '-' arg.
X	 */
X	if (av[1][0] == '-')			/* Do not convert new syntax */
X		return;
X	if (av[1][0] == '-' && av[1][1] == '-')	/* Do not convert new syntax */
X		return;
X
X	if (strchr(av[1], '=') != NULL)		/* Do not try to convert bs= */
X		return;
X
X	if (strstr(p, "tar") == NULL)		/* Do not try to it for pax */
X		return;
X
X	nac = ac + strlen(av[1]);
X	nav = ___malloc(nac-- * sizeof (char *), /* keep space for NULL ptr */
X				"compat argv");
X	oa = av;				/* remember old arg pointer */
X	na = nav;				/* set up new arg pointer */
X	*na++ = *oa++;				/* copy over av[0] */
X	oa++;					/* Skip over av[1] */
X
X	nopt[0] = '-';
X	nopt[2] = '\0';
X
X	for (p = av[1]; (c = *p) != '\0'; p++) {
X		if (c == '-') {
X			nac--;
X			continue;
X		}
X		if (strchr(copt, c) == NULL) {
X			if (ptype == P_SUNTAR || ptype == P_GNUTAR)
X				errmsgno(EX_BAD, "Illegal option '%c'.\n", c);
X			else
X				errmsgno(EX_BAD, "Illegal option '%c' for compat mode.\n", c);
X
X			susage(EX_BAD);
X		}
X		nopt[1] = c;
X		*na++ = ___savestr(nopt);
X
X		if (c == 'f' || c == 'b' || (ptype == P_SUNTAR && c == 'k') || c == 'X') {
X			if ((av + ac) <= oa) {
X				comerrno(EX_BAD,
X					"Missing arg for '%s' option.\n",
X					nopt);
X			}
X			*na++ = *oa++;
X			/*
X			 * The old syntax has a high risk of corrupting
X			 * files if the user disorders the args.
X			 */
X			if (c == 'f')
X				fcompat = TRUE;
X		}
X	}
X
X	/*
X	 * Now copy over the rest...
X	 */
X	while ((av + ac) > oa)
X		*na++ = *oa++;
X	*na = NULL;
X
X	*pac = nac;
X	*pav = nav;
X
X#ifdef	COMPAT_DEBUG
X	{ int	i;
X		printf("agrc: %d\n", nac);
X		for (i = 0; i < nac; i++)
X			printf("%i: '%s'\n", i, nav[i]);
X	}
X#endif
X}
END-of-star-1.5.2/star/star.c
echo x - star-1.5.2/star/dirtime.h
sed 's/^X//' >star-1.5.2/star/dirtime.h << 'END-of-star-1.5.2/star/dirtime.h'
X/* @(#)dirtime.h	1.5 10/08/27 Copyright 1996-2010 J. Schilling */
X/*
X *	Prototypes for dirtime users
X *
X *	Copyright (c) 1996-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_DIRTIME_H
X#define	_DIRTIME_H
X
X#ifndef _STAR_H
X#include "star.h"
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * dirtime.c
X */
Xextern	void	sdirtimes	__PR((char *name, FINFO *info,
X						BOOL do_times, BOOL do_mode));
Xextern	void	sdirmode	__PR((char *name, mode_t mode));
Xextern	void	dirtimes	__PR((char *name, struct timeval *tp,
X						mode_t mode));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _DIRTIME_H */
END-of-star-1.5.2/star/dirtime.h
echo x - star-1.5.2/star/star.1
sed 's/^X//' >star-1.5.2/star/star.1 << 'END-of-star-1.5.2/star/star.1'
X. \" @(#)star.1	1.166 11/04/12 Copyr 1982-2009 J. Schilling
X. \"  Manual Seite fuer star
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U
X.if t .ds s \\(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH STAR 1 "11/04/12" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xstar \- unique standard tape archiver
X.SH SYNOPSIS
X.ie n .B "star\ "
X.el .B "star\ \ "
X.I command
X[\fIoptions\fP]
X[\fB\-find\fP]
X.I file1 .\|.\|. filen
X[\fIfind_expr\fP]
X.br
X.B ustar
X.I command
X[\fIoptions\fP]
X[\fB\-find\fP]
X.I file1 .\|.\|. filen
X[\fIfind_expr\fP]
X.br
X.ie n .B "tar\ \ "
X.el .B "tar\ \ \ "
X.I command
X[\fIoptions\fP]
X.ie n .B "\ \ \ \ \ \ \ "
X.el .B "\ \ \ \ \ \ \ \ \ "
X.I file1 .\|.\|. filen
X.br
X.B "star\ "
X.ie n .B "\-copy\ \ "
X.el .B "\-copy\ \ \ \ "
X[\fIoptions\fP] 
X[\fB\-find\fP]
X.I file1 .\|.\|.
X.ie n [\fIf_expr\fP]
X.el \fIfilen\fP [\fIfind_expr\fP]
Xdirectory
X.br
X.B "star\ "
X.ie n .B "\-copy\ \ "
X.el .B "\-copy\ \ \ \ "
X[\fIoptions\fP] 
X.B -C
X.I "from_directory . to_directory
X.SH DESCRIPTION
X.B Star
Xis a very fast
X.BR tar (1)
Xlike tape archiver with improved functionality.
X.PP
X.B Star
Xarchives and extracts multiple files to and from a single file
Xcalled a 
X.I tarfile. 
XA 
X.I tarfile
Xis usually a magnetic tape, but it can be any file.
XIn all cases, appearance of a directory name refers to the files and 
X(recursively) subdirectories of that directory.
X.PP
X.B "Star's
Xactions are controlled by the mandatory command flags from the 
Xlist below.
XThe way 
X.B star 
Xacts may be modified by additional options. 
X.PP
XNote that unpacking tar archives may be a security risk because 
X.B star
Xmay overwrite existing files.
XSee SECURITY NOTES for more information.
X.SH FEATURES
X.B Star
Xincludes the first free implementation of
X.B POSIX.1\-2001
Xextended
X.B tar
Xheaders. The
X.B POSIX.1\-2001
Xextended 
X.B tar
Xheaders define a new standard way
Xfor going beyond the limitations of the historic 
X.B tar
Xformat.
XThey allow (among others) to archive all UNIX time stamps in sub\-second
Xresolution, files of arbitrary size and filenames without length limitation
Xusing
X.B UNICODE UTF\-8
Xcoding for best exchange compatibility.
X.PP
X.B Star
Xby default uses a fifo to optimize data flow from/to tape. This results in 
Xa normally streaming tape during the whole backup.
XSee 
X.B \-fifo 
Xand
X.B fs=
Xoption to get information on how to find the best fifo size.
X.PP
X.B Star 
Xincludes a pattern matcher to control the list of files to be 
Xprocessed. This gives a convenient interface for archiving and 
Xrestoring complex lists of files. In conjunction with the 
X.B \-w 
Xflag it is easy to merge a
X.B tar
Xarchive into an existing file tree. See also 
X.B \-U 
Xoption.
XIn create mode use the 
X.B pat=
Xoption to specify either select or exclude patterns (depending on
Xthe 
X.B \-V
Xflag). In extract or list mode 
Xall file type arguments are interpreted as select patterns while
Xthe patterns specified with the
X.B pat=
Xoption may be used as select or exclude patterns (depending on
Xthe 
X.B \-V
Xflag).
XHave a look at the description of the
X.B \-C
Xoption to learn how to fetch files from a list of directories
X(in create mode) or to distribute files to a list of directories
X(in extract mode).
XA substitute option allows 
X.BR ed (1)
Xlike pattern substitution in file names. 
X.PP
X.B Star
Xincludes an enhanced function that is similar to the 
X.BR find (1)
Xcommand (see
X.BR sfind (1)).
XThis allows to use 
X.B find
Xexpressions, even in extract or list mode, directly on the 
Xcontent on an archive.
XThe extensions to
X.BR find (1)
Xallow to modify the file metadata.
X.PP
X.B Star 
Xincludes a sophisticated diff command. Several diff options 
Xallow user tailorable functionality. 
X.B Star 
Xwon't show you differences you are not interested in.
XCheck the 
X.B diffopts=
Xoption for more details.
X.PP
X.B Star 
Xhas no limitation on filename length. Pathnames and linknames up to
X.I PATH_MAX
X(1023\ bytes with old OS versions and 4095\ bytes with POSIX.1\-2001)
Xmay be archived. Later versions may be able to deal with 
Xlonger pathnames.
X.PP
X.B Star 
Xdeals with all 3 times, available for files on UNIX systems if the
Xarchive format is either chosen from the star specific formats or
Xis a format that uses POSIX.1\-2001 extended headers.
XThis is either done in second resolution by using a star specific
XPOSIX.1\-1988 compatible extension or in sub second resolution by 
Xusing POSIX.1\-2001 extended headers.
X.B Star 
Xis able to store and restore all 3 times (mtime, atime and even 
Xctime). On Solaris 2.x systems, 
X.B star 
Xis able to do backups without changing any of the 3 the times.
X.PP
XIf used with the 
X.BI H= ustar 
Xoption, or if called as
X.B ustar
Xor
X.B tar
Xwhile the
X.BR H= headertype
Xoption is not used,
X.B star
Xis 100% POSIX compliant.
X.PP
X.B "Star's 
Xdefault format (if called as
X.BR star )
Xis 
X.I xstar
Xand is as posix compliant as possible. Enhancements to the standard that 
Xprevent correct extraction of single files when using a different
X.B tar 
Ximplementation that is only POSIX.1\-1988 compliant may occur,
Xbut they only affect single files with a pathname that is longer than 100+130 chars 
Xor when archiving sparse files with the 
X.B \-sparse
Xoption in effect.
XAll other files will extract correctly.
XSee the description for the
X.BI H= headertype
Xoption below for more information on archive formats and possible archive
Xinterchange problems.
X.PP
X.B Star 
Xmakes it easy to repair corrupted filesystems. After a fsck \-y 
Xhas been run on the filesystem, 
X.B star 
Xis able to restore only 
Xthe missing files automatically. 
XUse then 
X.I "star \-diff
Xto check for differences (see EXAMPLES for more information).
X.PP
X.B Star 
Xautomatically recognizes the type of the archive.
X.B Star 
Xtherefore is able to handle features and properties of different 
Xarchive types in their native mode,
Xif it knows about the peculiarities of the archive type.
XSee the 
X.BR H= headertype 
Xoption for more details.
XTo be able to do this, 
X.B star
Xadds hidden fingerprints to the archive header that allows to recognise
Xall star specific archive formats. The GNU tar format is recognised by
Xthe way it deviates from the standard.
X.PP
X.B Star 
Xautomatically recognizes and handles byte swapped archives. There is no 
Xoption to manually control byte swapping.
X.PP
X.B Star
Xautomatically recognizes and handles compressed archives inside plain
Xfiles.
X.PP
X.B Star
Xis able to archive and restore 
X.B "Access Control Lists
Xfor files using POSIX.1\-2001 extended headers.
X.SH COMMAND
X.PP
XIn native mode, 
X.B star
Xis compatible to the command line syntax of a typical POSIX command
Xand for this reason expects 
X.I commands
Xand
X.I options
Xto start with a single dash (\-). In this case, commands
Xand options may be specified separately, all boolean or increment type
Xoptions may be specified either separately or combined.
XFor compatibility with GNU programs, long options may alternatively
Xstart with a double dash.
XIn compatibility mode to POSIX
X.BR tar ,
X.B star
Xexpects commands and options to appear as one single string that does not start
Xwith a dash.
XIn POSIX tar compatibility mode,
Xadditional non POSIX options may be specified but must appear after the
XPOSIX options and their args and need to start with a dash.
X.TP
X.B \-c
XCreate a new
X.I tarfile
Xand write named files into it.
XWriting starts at the beginning of
X.I tarfile.
XSee \-v option for information on how to increase verbosity while the 
Xarchive is written.
X.TP
X.B \-copy
XCopy named files to the target directory which is the last file type argument.
XThe target directory must exist.
XThe shorthand
X.B \-cx
Xinstead of
X.B \-copy
Xis not allowed because this could be a result of a typo.
X.sp
XIf the option
X.B \-diff
Xhas been specified in addition,
X.B star
Xperforms a one pass directory tree compare instead of copying files.
XThe shorthand
X.B \-c \-diff
Xinstead of
X.B \-copy \-diff
Xis also allowed.
X.sp
XOn operating systems with slow file I/O (such as Linux), it may help
Xto use
X.B \-no\-fsync
Xin addition, but then
X.B star
Xis unable to detect all error conditions; so use with care.
X.sp
XIf the option
X.B \-t
Xhas been specified in addition, the last file type argument is not a 
Xtarget directory and 
X.B star
Xis performing a one pass listing instead of copying files.
XThis makes sense as the listing from
X.B star
Xmay be better readable than the output from
X.BR "ls \-lR" .
XThe shorthand
X.B \-c \-t
Xor
X.B \-ct
Xinstead of
X.B \-copy \-t
Xis also allowed.
X.sp
XThe job is by default done in the best archive mode.
XThis implies that it defaults to 
X.BR "H=exustar \-dump" .
XWhen in
X.B \-copy
Xmode, 
X.B star
Xforks into two processes and data exchange is done via the shared memory from the FIFO.
XThis gives the best possible performance.
XWithout FIFO, the 
X.B \-copy
Xmode will not work.
X.sp
XThe
X.B list=
Xoption, patterns and substitutions apply only to the create side of the copy command.
X.TP
X.B \-diff
XCompare the content and the attributes of the files from the archive in
X.I tarfile
Xto the filesystem.
XThis may also be used to compare two file trees in the filesystem.
XIf you use a set of
X.I diffopts
Xthat fits your needs, it will give
X- in many cases - a more readable output than diff \-r.
XIf you use
X.B star's
Xdump extensions for the tar archive, the 
X.B \-diff
Xoption allows to find even if the directory in the file tree
Xcontains more files than the archive. This way, it is possible to
Xcompare all properties of two file trees in one run.
XSee 
X.I diffopts 
Xfor more details.
XAdding one or more 
X.B \-v
Xoptions increases the verbosity. With
X.B \-vv
Xand above, the directory content is compared also if
X.B star
Xis reading a tar archive that has been created in 
X.B \-dump
Xmode.
X.TP
X.B \-n
XNo extraction. Show what 
X.B star 
Xwould do, in case the
X.B \-x
Xcommand had been specified.
X.TP
X.B \-r
XReplace files in a
X.I tarfile.
XThe named files are written to the end of
X.I tarfile.
XThis implies that later,
Xthe appropriate files will be found more than once on the 
X.I tarfile.
X.TP
X.B \-t
XTable of contents.
XList the contents of the
X.I tarfile.
XIf the \-v flag is used, the listing is similar to the format of ls \-l output.
XWith this option, the flags
X.BR \-a ,
X.B \-atime
Xand
X.B \-ctime
Xhave a different meaning if the archive is in 
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xor
X.B pax 
Xformat.
XThe option
X.B \-a
Xor
X.B \-atime
Xlists the access time instead of the modification time, the option
X.B \-ctime
Xlists the file creation time instead of the modification time.
XThe option 
X.B \-tpath
Xmay be used in addition to modify the output so it may be used in shell scripts.
X.TP
X.B \-u
XUpdate a
X.I tarfile.
XThe named files are written to the end of
X.I tarfile
Xif they are not already there or if the files are newer than the files
Xof the same name found in the archive.
XThe \-r and \-u command only work if the
X.B tar
Xarchives is a regular file or
Xif the
X.B tar
Xarchive is an unblocked tape that may backspace.
X.TP
X.B \-x
XExtract the named files from the
X.I tarfile.
XIf no filename argument or pattern is specified, the entire content of the
X.I tarfile
Xis restored.
XIf the \-U flag is not used, 
X.B star 
Xextracts no file which is older than the corresponding file on disk.
X.sp
XOn operating systems with slow file I/O (such as Linux), it may help
Xto use
X.B \-no\-fsync
Xin addition, but then
X.B star
Xis unable to detect all error conditions; so use with care.
X.PP
XExcept for the shorthands documented above,
Xexactly one of the commands above must be specified.
X.PP
XIf one or more patterns or substitution commands have been specified,
Xthey apply to any of the command listed above.
XIn copy mode, all patterns and substitute commands apply to the create side.
X
X.SH OPTIONS
X.TP
X.B \-help
XPrint a summary of the most important options for
X.BR star (1).
X.TP
X.B \-xhelp
XPrint a summary of the less important options for
X.BR star (1).
X.TP
X.B \-/
XDon't strip leading slashes from file names when extracting an archive.
XTar archives containing absolute pathnames are usually a bad idea. 
XWith other 
X.B tar 
Ximplementations, 
Xthey may possibly never be extracted without clobbering existing files. 
X.B Star 
Xfor that reason, by default strips leading slashes from filenames 
Xwhen in extract mode.
XAs it may be impossible to create an archive where leading slashes have
Xbeen stripped while retaining correct path names, 
X.B star
Xdoes not strip leading slashes in create mode.
X.sp
XSee SECURITY NOTES for more information.
X.TP
X.B \-..
XDon't skip files that contain /../ in the name. Tar archives containing
Xnames with /../ could be used to compromise the system. If they are
Xunpacked together with a lot of other files, this would in most cases not
Xeven be noticed. For this reason, 
X.B star
Xby default does not extract files that contain /../ in the name if
X.B star
Xis not in interactive mode (see
X.B \-w
Xoption).
X.sp
XSee SECURITY NOTES for more information.
X.TP
X.B \-7z
Xrun the input or output through a
X.B p7zip
Xpipe - see option
X.B \-z
Xbelow.
X.sp
XNote that the
X.B p7zip
Xprogram currently does not operate on a pipe but on a
X/tmp file copy and thus limits the maximum archive size.
X
X.TP
X.B \-0
X.TP
X.B \-1
X.TP
X.B \-2
X.TP
X.B \-3
X.TP
X.B \-4
X.TP
X.B \-5
X.TP
X.B \-6
X.TP
X.B \-7
XSelect an archive entry from 
X.BR /etc/default/star .
XThe format for the archive entries is the same as the format in
X.B /etc/default/tar
Xin Solaris.
X.TP
X.B \-acl
XHandle 
X.B "Access Control List
X(ACL) information in create and extract mode.
XIf
X.B \-acl
Xhas been specified,
X.B star 
Xis in create mode and the header type is 
X.BR exustar ", " star
Xwill add ACL information to the archive using POSIX.1\-2001 extended headers.
XIf
X.B \-acl
Xhas been specified and
X.B star 
Xis in extract mode,
X.B star
Xwill try to restore ACL information. If there is no ACL information for
Xone or all files in the archive,
X.B star
Xwill clear the ACL information for the specific file.
XNote that if
X.B \-acl
Xhas not been specified,
X.B star
Xwill not handle ACL information at all and files may inherit ACL
Xinformation from the parent directories.
XIf the 
X.B \-acl
Xoption has been specified,
X.B star
Xassumes that the
X.B \-p
Xoption has been specified too.
X.TP
X.BI artype= headertype
XGenerate a tape archive in
X.I headertype
Xformat.
XIf this option is used in extract/list mode this forces 
X.B star
Xto interpret the headers to be of type 
X.I headertype.
XAs 
X.B star
Xeven in case of a user selected extract archive format does format checking,
Xit may be that you will not be able to unpack a specific archive with all
Xpossible forced archive formats. Selecting the old
X.B tar
Xformat for extraction will always work though.
XValid parameter for 
X.I headertype
Xare:
X.RS
X.TP 10
X.B help
XPrint a help message about possible header types.
X.TP 10
X.B v7tar
XOld UNIX V7
X.B tar
Xformat. 
XThis archive format may only store plain files.
XPathnames or linknames longer than 99 chars may not be archived.
X.sp
XIf the
X.B v7tar
Xformat has been selected, 
X.B star
Xwill not use enhancements to the historic UNIX V7 tar format.
XFile size is limited to 2 GB - 2 bytes, uid/gid is limited to 262143.
XSparse files will be filled up with zeroes.
X.TP 10
X.B tar
XOld BSD UNIX
X.B tar
Xformat. 
XThis archive format may only store plain files, directories and 
Xsymbolic links.
XPathnames or linknames longer than 99 chars may not be archived.
XSee also the 
X.B \-d
Xoption as a note to some even older tar implementations.
X.sp
XIf the
X.B tar
Xformat has been selected, 
X.B star
Xwill not use enhancements to the historic tar format.
XFile size is limited to 2 GB - 2 bytes, uid/gid is limited to 262143.
XSparse files will be filled up with zeroes.
X.TP 10
X.B star
XOld 
X.B star 
Xstandard format. This is an upward/downward compatible 
Xenhancement of the 
X.I old 
X(pre Posix) UNIX
X.B tar
Xformat.
XIt has been introduced in 1985 and therefore is not Posix compliant.
XThe
X.B star
Xformat allows to archive special files (even sockets) and records access time and 
Xcreation time besides the modification time. Newer versions of the old 
X.B star 
Xformat allow very long filenames (100+155\ chars and above), linknames > 100 chars
Xand sparse files (if
X.B \-sparse
Xis used).
XThis format is able to copy the device nodes on HP\-UX
Xthat have 24 bits in the minor device number, which is more then the 21 bits
Xthat are possible with the POSIX\-1003.1\-1988 archive format.
X.sp
XThe nonstandard extensions are located in the space between the link name and
Xthe POSIX file name prefix.
XAs the
X.B star
Xformat does not use a POSIX magic string, the extensions do not interfere
Xwith the POSIX tar formats.
XThe last 4 bytes of the
X.B tar
Xheader contain a 'tar\\0' signature.
X.TP 10
X.B gnutar
XThis is a commonly used, but unfortunately not Posix compliant
X(although designed after 1987)
Xenhancement to the old
X.B tar 
Xformat.
XThe 
X.B gnutar
Xformat has been defined between 1989 and 1994.
XDo not use the
X.B gnutar
Xarchive format unless you want to create an archive for a target system
Xthat is known to have only the gnutar program available.
XThe
X.B gnutar
Xarchive format violates basic rules for any (even the historic) tar archive
Xformat, in special when sparse files are archived using the
X.B \-sparse
Xoption.
XUsing the
X.B gnutar
Xarchive format causes a high risk that the resulting archive may only be read
Xby gnutar or by
X.BR star .
XThe implementation of the gnutar archive format within 
X.B star
Xis not complete, but 
Xsufficient for most gnutar archives.
XSee NOTES for more information.
X.TP 10
X.B ustar
XIEEE/Posix1003/IEC\-9945\-1\-1988 Standard Data Interchange format.
XWith this option in effect, 
X.B star 
Xwill generate 100% POSIX.1\-1988 compliant 
X.B tar
Xarchives.
XFiles with pathnames longer than 100+155 chars or linknames longer than
X100 chars may not be archived.
XIf 
X.B star
Xis called as
X.B ustar
Xthe default archive format is
X.BR ustar .
X.sp
XIf the
X.B ustar
Xformat has been selected, 
X.B star
Xwill not use enhancements to the POSIX.1\-1988 tar format, the archive
Xwill be strictly conforming.
XFile size is limited to 8 GB, uid/gid/major/minor is limited to 2097151.
XSparse files will be filled up with zeroes.
X.TP 10
X.B pax
XThe IEEE/Posix1003/IEC\-9945\-1\-1988 successor is
Xthe POSIX\-1003.1\-2001 Standard Data Interchange format.
XIt is called the
X.B pax
Xarchive format.
X.sp
XIf the
X.B pax
Xformat has been selected, 
X.B star
Xwill not use enhancements to the POSIX.1\-2001 tar format, the archive
Xwill be strictly conforming.
XFile size is unlimited, uid/gid/uname/gidname is unlimited,
Xmajor/minor is limited to 2097151.
XSparse files will be filled up with zeroes.
X.TP 10
X.B xstar
XThe extended standard
X.B tar
Xformat has been introduced in 1994.  
X.B Star
Xuses the
X.B xstar
Xformat as default archive format. 
XThis is an upward/downward compatible enhancement 
Xof the IEEE/Posix1003/IEC\-9945\-1 Standard Data Interchange format.
XIt allows among others very long filenames (100+130\ chars and above) 
Xand records access time and creation time.
XSparse files will be archived correctly (if
X.B \-sparse
Xis used).
X.sp
XThe access time and creation time are stored at the end of the POSIX
Xfile name prefix (this limits the prefix to 130 chars).
XThese extensions do not interfere with the POSIX standard as the
Xfields for mtime and ctime field are always separated from the 
XPOSIX file name prefix by a null byte.
XThe last 4 bytes of the
X.B tar
Xheader contain a 'tar\\0' signature.
X.sp
XThe 
X.B xstar
Xformat is the default format when
X.B star
Xis neither called as
X.B tar 
Xnor called as
X.BR ustar .
X.TP
X.B xustar
XA new format introduced 1998, that omits the
X\&'tar\\0' signature at the end of the
X.B tar
Xheader. It is otherwise identical
Xto the
X.B xstar
Xformat.
XAs some
X.B tar
Ximplementations do not follow the POSIX rules and compute
Xthe checksum for less than 512 bytes of the
X.B tar
Xheader, this format may help
Xto avoid problems with these broken
X.B tar
Ximplementations.
XThe main other difference to the
X.B xstar
Xformat is that the
X.B xustar
Xformat uses POSIX.1\-2001 extended headers to overcome limitations of the
Xhistoric
X.B tar
Xformat while the
X.B xstar
Xformat uses proprietary extensions.
XThe 
X.B xustar
Xformat is the default format when
X.B star
Xis called as
X.BR tar .
X.sp
XFile size is unlimited, uid/gid/uname/gidname is unlimited,
Xmajor/minor is unlimited.
XSparse files will be archived correctly (if
X.B \-sparse
Xis used).
X.TP
X.B exustar
XA format similar to the
X.B xustar
Xformat but with forced POSIX.1\-2001 extended headers.
XIf this format is used together with the
X.B \-acl
Xoption,
X.B star
Xrecords Access Control Lists (ACLs) in POSIX.1\-2001 extended headers.
X.sp
XThe
X.B exustar
Xformat allows to archive all file types but it does not
Xarchive more than the POSIX.1-1988 set by default.
XIf the
X.B \-dump
Xoption is used or if
X.B star
Xis otherwise on dump mode, star archives all file types
Xand in addition archives more meta data then usual.
X.sp
XFile size is unlimited, uid/gid/uname/gidname is unlimited,
Xmajor/minor is unlimited.
XSparse files will be archived correctly (if
X.B \-sparse
Xis used).
X.TP
X.B suntar
XThe extended header format found on Solaris 7/8/9. This format is similar to the
X.B pax
Xformat but does not handle 
X.I atime
Xand
X.I ctime
Xand in addition uses 'X' as the typeflag for the extended headers instead of
Xthe standard 'x'.
X.sp
XFile size is unlimited, uid/gid/uname/gidname is unlimited,
Xmajor/minor is unlimited.
XSparse files will be filled up with zeroes.
X.TP
X.B bin
XThe cpio UNIX V7 binary format.
XThis is a format with big interoperability problems. Try to avoid this format.
XIt is only present to make the
X.B scpio
Xcommand SVr4 compliant.
X.TP
X.B cpio
XThe POSIX.1-1988 
X.B cpio
Xformat. This format uses octal ascii headers. A similar format is
Xcreated by calling
X.I "cpio \-o \-c
Xon pre SYSVr4 systems and by calling
X.I "cpio \-o \-Hodc
Xon SYSVr4 systems.
XThe POSIX.1-1988 
X.B cpio
Xformat allows a file name length up to 262142 characters and allows to
Xarchive nearly any file type.
XFile size is limited to 8 GB, uid/gid/st_dev is limited to 262143.
XThe way major and minor device numbers are stored inside the st_dev
Xfield is implementation dependent.
X.sp
XEven though this archive format is covered by the POSIX.1-1988 standard,
Xit has a lower portability than the
X.B ustar
Xformat. Try to avoid the 
X.B cpio
Xarchive format.
X.TP
X.B odc
XThis archive format is similar to the The POSIX.1-1988
X.B cpio
Xformat but the file name length is limited to 255 characters and
Xthe socket file type is not allowed.
XThis archive format has been introduced to allow non POSIX cpio implementations
Xsuch as the cpio program on SYSV to accept the archive. Use this
Xformat whenever you are not sure if the target system offers a fully POSIX
Xcompliant cpio program.
X.sp
XEven though this archive format is covered by the POSIX.1-1988 standard,
Xit has a lower portability than the
X.B ustar
Xformat. Try to avoid the 
X.B odc
Xarchive format.
X.TP
X.B asc
XTell
X.B star
Xto create a
X.B cpio
Xarchive in the ascii format that is created with
X.I "cpio \-o \-c
Xon SYSVr4 systems.
XIt uses extended (32 bit) numbers for uid's, gid's and device numbers
Xbut limits the file size to 4 GB - 2 bytes although the format has been
Xspecified after the POSIX.1-1988 cpio format.
XTry to avoid the
X.B asc
Xarchive format because of its limited portability.
X.TP
X.B crc
XThis format is similar to the
X.B asc
Xcpio format but in addition uses a simple byte based checksum called
X.BR CRC .
XTry to avoid the
X.B crc
Xarchive format because of its limited portability.
X
X.PP
XAll
X.B tar
Xarchive formats may be interchanged if the archive contains 
Xno files that may not be archived by using the old
X.B tar
Xformat. 
XArchives in the 
X.I xstar 
Xformat may be extracted by any 100% POSIX compliant
X.B tar
Ximplementation if they contain no files with pathnames >\ 100+130\ chars 
Xand if they contain no sparse files that have been archived by using 
Xthe 
X.B \-sparse
Xoption.
X.RE
X
X.TP
X.B \-ask_remove
Xobsoleted by \-ask\-remove
X.TP
X.B \-ask\-remove
XAsk to remove non writable files on extraction.
XBy default, 
X.B star
Xwill not overwrite files that are read only.
XIf this option is in effect, 
X.B star
Xwill ask whether it should remove these files to allow the extraction of a file
Xin the following way:
X.RS
X.IP
X.BI "remove '" filename "' ? Y(es)/N(o) :
X.RE
X.TP
X.BR \-atime ", " \-a
XReset access time of files after storing them to 
X.I tarfile.
XOn Solaris 2.x, (if invoked by root) 
X.B star 
Xuses the 
X.I _FIOSATIME 
Xioctl to do this. This enables 
X.B star 
Xnot to trash the 
X.I ctime
Xwhile resetting the
X.I atime
Xof the files.
XIf the
X.B \-atime
Xoption is used in conjunction with the list command, 
X.B star 
Xlists access time instead of modification time. (This works only in 
Xconjunction with the
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xand with the 
X.B pax 
Xformat.)
XAnother option to retain the access time for the the files that
Xare going to be archives is to readonly mount a 
X.B "UFS snapshot
Xand to archive files from the mount point of the UFS snapshot.
X.TP
X.B \-B
XForce 
X.B star
Xto perform multiple reads (if necessary) to fill a block.
XThis option exists so that 
X.B star 
Xcan work across the Ethernet, since pipes and sockets return partial blocks 
Xeven when more data is coming.
XIf 
X.B star
Xuses 
X.I stdin
Xas archive file, 
X.B star
Xbehaves as if it has been called with the 
X.B \-B
Xoption.
XFor this reason, the option \-B in practice is rarely needed.
X.TP
X.B \-block\-number
XPrint the archive block number (archive offset / 512) at the beginning of
Xeach line when in verbose mode. This allows to write backup scripts
Xthat archive the offsets for files and that use
X.sp
X.BI "	mt fsr" " blockno" 
X.sp
Xto skip to the tape block number of interest in a fast way
Xif a single file needs to be restored.
X.TP
X.BR blocks= "#, " b= "#"
XSet the blocking factor of the 
X.I tarfile
Xto #\ times 512\ bytes (unless a different multiplication factor has 
Xbeen specified - see 
X.B bs=
Xoption for possible multiplication factors).
XChanging the blocking factor only makes sense
Xwhen the archive is located on a real tape device or when
Xthe archive is accessed via the remote tape protocol (see
X.B f=
Xoption below).
XThe default is to use a blocking factor of 20 i.e. 
X10\ kBytes.
XIncreasing the blocksize will speed up the backup.
XFor portability with very old
X.B tar
Ximplementations (pre BSD\ 4.2 or pre AT&T\ SVR4),
Xblocksize should not be more than 10\ kBytes.
XFor POSIX.1\-1988 compatibility, blocksize should be no more than 10\ kBytes.
XFor POSIX.1\-2001 compatibility, blocksize should be no more than 32\ kBytes.
XMost systems also have a hardware limitation for the blocksize, 32\ kBytes
Xand 63\ kBytes are common limits on many systems.
XThe upper limit in any case is the size of the buffer RAM in the tape drive.
XMake a test if you want to make sure that the target system will handle
Xthe intended blocksize.
XIf you use 
X.B star
Xfor data exchange via tape, it is a good idea to use a blocksize of 10\ kBytes
Xunless you are sure that the reading system will handle a larger blocksize.
XIf you use 
X.B star
Xfor backup purposes with recent hardware (e.g. DLT tape drives),
Xa blocksize of 256\ kBytes
Xresults in sufficient speed and seems to be a good choice.
X.B Star
Xallows block sizes up to 2 GByte if the system does not impose a smaller limit.
XIf you want to determine the blocking factor when reading an unknown
X.B tar
Xarchive 
Xon tape, specify a blocking factor that is higher than the supposed 
Xblocking factor of the tape. 
X.B Star 
Xthen will determine the blocking factor 
Xby reading the first record of the tape and print a message:
X.RS
X.IP
X.B 
Xstar: Blocksize = # records.
X.PP
XWhere # is the blocking factor in multiples of 512 bytes.
XThe
X.I blocks=
Xoption 
Xand the
X.I bs=
Xoption are equivalent methods to specify the tape block size.
XThe 
X.B blocks= 
Xoption is preferred by people who like to use an option that behaves
Xsimilar to the interface of the historic
X.BR tar (1)
Ximplementations.
X.RE
X.TP
X.BR bs= #
XSet output block size to #.
XYou may use the same method as in 
X.BR dd (1)
Xand
X.BR sdd (1).
XThe number representing the size is taken in bytes unless otherwise specified.
XIf a number is followed directly by the letter `.', `w', `b', `k', `m', `g',
X`t', or `p',
Xthe size is multiplied by 1, 2, 512, 1024, 1024*1024, 1024*1024*1024,
X1024*1024*1024*1024 or 1024*1024*1024*1024*1024.
XIf the size consists of numbers separated by `x' or `*', multiplication of the 
Xtwo numbers is performed.
XThus 
X.I "bs=7x8k
Xwill specify a blocksize of 56\ kBytes.
XBlocksize must be a multiple of 512 bytes.
XSee also the description of the
X.I blocks=
Xoption for more details on blocksizes.
XThe option
X.B bs=
Xis preferred by people who like to use an option that behaves
Xsimilar to the interface used by
X.BR dd (1)
Xand
X.BR sdd (1).
X.TP
X.B \-bsdchdir
XSwitch the behavior of the 
X.B C=
Xoption to BSD style.
XThe default behavior of
X.B star
Xis to stay in a working directory until a new 
X.B C=
Xis seen.
XWith BSD tar, the
X.B C=
Xoption is only related to the next file type argument.
X.TP
X.B \-bz
Xrun the input or output through a 
X.B bzip2
Xpipe - see option 
X.B \-z 
X.B \-Z
Xand
X.B \-j
Xbelow.
XAs the
X.B \-bz
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-z
Xoption are non standard, it makes sense to omit the
X.B \-bz
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-z
Xoptions inside shell scripts if you are going to extract a compressed
Xarchive that is located inside a plain file as
X.B star
Xwill auto detect compression and choose the right decompression
Xoption to extract.
X.TP
X.BI C= dir
X.TP
X.BI \-C " dir
XPerform a 
X.BR chdir (2)
Xoperation to 
X.I dir
Xbefore storing or extracting the next files.
XIn all cases, 
X.B star 
Xwill perform the
X.BR chdir (2)
Xoperation relative to the current working directory of the shell.
X.RS
X.TP
X.B \(bu
XIn list mode (with the 
X.B \-t
Xflag),
X.B star
Xignores all 
X.I \-C
Xoptions.
X.TP
X.B \(bu
XIn create mode (with the 
X.BR \-c ", " \-r " and " \-u
Xflag),
X.B star
Xwalks through all 
X.I \-C
Xoptions and file type arguments.
XWhile a BSD derived
X.BR tar (1)
Ximplementation
Xgoes back to the current working directory after storing
Xone file argument that immediately follows the
X.I \-C
Xoption,
X.B star
Xchanges the directory only if a new
X.B \-C
Xoption follows.
XTo emulate the behavior of a BSD derived
X.BR tar (1),
Xadd a
X.BI \-C " ."
Xoption after the file argument.
X.TP
X.B \(bu
XIn extract mode (with the 
X.BR \-x ", " \-n " and " \-diff
Xflag),
X.B star
Xbuilds a pattern list together with corresponding directories 
Xfrom previous 
X.BI C= dir
Xoptions and performs a
X.BR chdir (2)
Xto the corresponding directory of a matching pattern.
XAll 
X.B pat=
Xoptions that do not follow a
X.BI C= dir
Xoption are interpreted as if they were preceded by a 
X.BI \-C " ."
Xoption.
XSee EXAMPLES for more information. 
X.RE
X.TP
X.BI compress-program= name
XSet a named compress program.
XThe program must compress in a pipe when called without parameters
Xand decompress when run with the 
X.B \-d
Xoption in a pipe.
XThis option is otherwise similar to the
X.B \-z
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-bz
Xoption.
X.TP
X.B \-copydlinks
XTry to recursively copy the content of linked directories instead of
Xcreating the link. This is an experimental feature that may help
Xto unpack archives on DOS.
X.TP
X.B \-copyhardlinks
XThis option allows to copy hardlinked targets
Xrather than creating the link.
XIt helps to extract
X.B tar
Xfiles on systems that do not implement
Xhardlinks (e.g. BeOS).
X.TP
X.B \-copylinks
XThis option allows to copy both, hard- and symlinked targets
Xrather than creating a link.
XIt helps to extract
X.B tar
Xfiles on systems that do not implement
Xlinks (e.g. OS/2).
XTo extract and copy all symlinks correctly, you may need to call
X.B star
Xtwice as 
X.B star
Xcannot copy files that appear in the archive later than a symlink
Xpointing to them.
X.TP
X.B \-copysymlinks
XThis option allows to copy symlinked targets
Xrather than creating a symbolic link.
XIt helps to extract
X.B tar
Xfiles on systems that do not implement
Xlinks (e.g. OS/2).
XTo extract and copy all symlinks correctly, you may need to call
X.B star
Xtwice as 
X.B star
Xcannot copy files that appear in the archive later than a symlink
Xpointing to them.
X.TP
X.B \-cpio\-statistics
XInstead of the 
X.B star 
Xflavor of the statistics, print statistics in 
X.B cpio
Xflavor.
X.TP
X.B \-ctime
XIf used with the list command, this lists 
X.I ctime 
Xrather than 
X.I mtime
Xif the archive format is
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xor
X.BR pax .
X.sp
XIf star is run as root and if
X.B \-ctime 
Xis used with the extract command and the same archive formats,
Xthis causes
X.B star
Xto try to restore even the 
X.I ctime 
Xof a file by generating time storms.
XYou should not do this when in multi user mode because this may 
Xconfuse programs like cron and the news system.
XAlthough 
X.B star
Xtries to eliminate the accumulative effects of the time storm,
Xthere is a tendency for the system clock to slow down a bit.
XThe clock typically lags about one millisecond per extracted file.
XUse with care and check the system clock after using this feature.
X.sp
XIf used with the create command this changes the behavior of the
X.I newer=
Xoption. 
X.BR Star , 
Xin this case compares the
X.I ctime
Xof all files to the 
X.I mtime
Xof the stamp file rather then comparing the
X.I mtimes
Xof both files.
X.TP
X.B \-cumulative
XA shorthand for
X.BR \-dump\-cumulative .
XSee 
X.B \-dump\-cumulative
Xfor more information.
X.TP
X.B \-D
XDo not descend directories when in create mode.
XNormally, 
X.B star 
Xdescends the whole tree if it encounters a directory in 
Xin its file parameters.
XThe option 
X.B \-D
Xis in effect by default if the 
X.BI list= file
Xoption is used.
XIf you like 
X.B star
Xto descend directories found in the list file, use the
X.B \-dodesc
Xoption (see below).
X.TP
X.B \-d
XDo not store/create directories.
XOld versions of 
X.B tar 
Xsuch as published with the seventh edition of UNIX
Xare not able to deal with directories in
X.B tar
Xarchives. 
XIf a
X.B tar
Xarchive is generated without directories this avoids
Xproblems with
X.B tar
Ximplementations found on SYSVr3 and earlier.
XIf used during extract, no intermediate missing directories are created.
X.TP
X.B \-data\-change\-warn
XIf the size of a file changes while the file is being archived, treat this
Xcondition as a warning only that does not cause a non zero exit code.
XA warning message is still written if the condition is not otherwise
Xignored by another rule from an
X.B errctl=
Xoption.
XThe
X.B \-data\-change\-warn
Xoption works as if the last error control option was
X.sp
X	\fBerrctl=\fP\fI"WARN|GROW|SHRINK	*"\fP
X.sp
XThe
X.B \-e
Xoption or an
X.B ABORT
Xentry in a condition set up by
X.B errctl=
Xhas a higher precedence than the
X.B \-data\-change\-warn
Xoption.
XThis option is ignored in extract or list mode.
X.TP
X.B \-debug
XPrint debug messages. Among other things, this gives debug messages for
Xheader type recognition,
X.B tar
Xtype properties, EOF recognition, opening 
Xof remote archives and fifo internals.
X.TP
X.BI diffopts= optlst
XComma separated list of diffopts.
XValid members in
X.I optlst
Xare:
X.RS
X.TP 10
X.B help
XPrint a summary of possible members of the diffopts list.
X.TP 10
X.B !
XInvert the meaning of the following string. No comma is needed after the 
Xexclamation mark.
X.TP 10
X.B not
XInvert the meaning of all members in the diffopts list i.e. exclude 
Xall present options from an initially complete set compare list.
XWhen using 
X.BR csh (1)
Xyou might have problems to use 
X.B !
Xdue to its strange parser.
XThis is why the 
X.B not
Xalias exists.
X.TP 10
X.B perm
XCompare file permissions. With this option in effect, 
X.B star 
Xcompares the low order 12 bits of the st_mode field.
X.TP 10
X.B mode
XSame as 
X.I perm.
X.TP 10
X.B symperm
XCompare permissions even in case the target file on the local
Xfilesystem is a symbolic link.
XBy default,
X.B star
Xwill not compare the permission of symbolic links
Xas most systems cannot set the permission
Xof symbolic links.
X.B Star
Xcompares
X.B symperm
Xonly if
X.B perm
Xis compared also.
X.TP 10
X.B type
XCompare file type. 
XNote that 
X.B star
Xcannot compare the file type in case of a hard link.
X.TP 10
X.B nlink
XCompare link count on hardlinks.
XThis only works if the archive is in
X.B exustar
Xformat and contains
X.B star's
Xdump extensions.
X.TP 10
X.B uid
XCompare numerical user id of file.
X.TP 10
X.B gid
XCompare numerical group id of file.
X.TP 10
X.B uname
XCompare ASCII version of user id of file.
XThe user name is mapped via the file /etc/passwd.
X.TP 10
X.B gname
XCompare ASCII version of group id of file.
XThe group name is mapped via the file /etc/group.
X.TP 10
X.B id
XShorthand for:
X.IR "uid,gid,uname,gname" .
XCompare all user/group related info of file.
XNote that this will always find differences if the source and
Xtarget system use different user or group mappings.
X.TP 10
X.B size
XCompare file size.
XNote that 
X.B star
Xcannot compare the file size in case of a hard link.
X.TP 10
X.B data
XCompare content of file.
XIf
X.B star
Xalready found that the size of the files differ, it will not
Xcompare the content anymore.
XIf the size of the files differ,
X.B star
Xwill always report different data.
X.TP 10
X.B cont
XSame as 
X.I data.
X.TP
X.B rdev
XCompare major/minor numbers for device nodes.
X.TP 10
X.B hardlink
XCompare target of hardlinks.
X.TP 10
X.B symlink
XCompare target of symlinks. This evaluates the paths returned by the 
Xreadlink(2) call.
X.sp
XTwo symlinks are considered equal, it they either have a characterwise
Xidentical link-name, or if they either both use an absolute path name
Xor both use a relative path name and the following is true:
XBoth symlinks point to the same file that must exist or both pathnames look
Xsimilar enough.
X.TP 10
X.B sympath
XCompare the target pathnames of symlinks. This characterwise compares 
Xthe strings returned from the readlink(2) call.
X.TP 10
X.B sparse
XCompare if either both files are sparse or not. If only one of both files
Xis sparse, then a difference is flagged.
XThis only works with if the archive format is
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xor
X.BR gnutar .
X.TP 10
X.B atime
XCompare access time of file. 
XThis only works with if the archive format is
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xor
X.BR pax .
X.TP 10
X.B mtime
XCompare modification time of file.
X.TP 10
X.B ctime
XThis only works with if the archive format is
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xor
X.BR pax .
X.TP 10
X.B lmtime
XCompare the modification time 
Xeven in case the target file on the local filesystem is a
Xsymbolic link.
XBy default,
X.B star
Xwill not compare the modification time of symbolic links
Xas most systems cannot set the modification time
Xof symbolic links.
X.B Star
Xcompares
X.B lmtime
Xonly if
X.B mtime
Xis compared also.
X.TP 10
X.B times
XShorthand for:
X.IR "atime,mtime,ctime" .
X.TP 10
X.B dir
XCompare the content of directories.
XThis only works if the archive is in
X.B exustar
Xformat and contains
X.B star's
Xdump extensions.
XTogether with increased verbose level
X.RB ( \-vv )
Xthis will print a list of files that are only in the archive and a list of files
Xthat are only on the current filesystem.
X.TP 10
X.B xtimes
XShorthand for:
X.IR "atime,mtime,ctime,lmtime" .
X.TP 10
X.B acl
XCompare access control lists.
XThis only works if the archive is in
X.B exustar
Xformat and has been created with
X.B star's
X.B \-acl
Xoption.
XYou need to specify the
X.B \-acl
Xoption in addition when running the diff.
X.TP 10
X.B xattr
XCompare extended file attributes.
XThis only works if the archive is in
X.B exustar
Xformat and has been created with
X.B star's
X.B \-xattr
Xoption.
XYou need to specify the
X.B \-xattr
Xoption in addition when running the diff.
X.TP 10
X.B fflags
XCompare extended file flags.
XThis only works if the archive is in
X.B exustar
Xformat and has been created with
X.B star's
X.B \-xfflags
Xoption.
XYou need to specify the
X.B \-xfflags
Xoption in addition when running the diff.
X.PP
XIf 
X.I optlst
Xstarts with a ! the meaning of all members in 
X.I optlst
Xis inverted as with the 
X.I not
Xoptlist member.
XIn this case,
X.B star
Xstarts with a complete list that includes
X.B atime
Xand
X.BR lmtime .
XReasonable diff options to use when comparing against a copy of a
Xdirectory tree are
X.BR diffopts=!atime,ctime,lmtime .
X.PP
XIf 
X.I diffopts
Xare not specified, 
X.B star 
Xcompares everything but the access time of the files
Xand the modification time of symbolic links.
X.RE
X.TP
X.BI dir-group= group
XIf 
X.B star
Xextracts archives as root, this option allows to control the group id of
Xintermediate directories created by
X.BR star .
X.TP
X.BI dir-owner= user
XIf 
X.B star
Xextracts archives as root, this option allows to control the owner of
Xintermediate directories created by
X.TP
X.B \-dirmode
XIf in create mode (i.e. when storing files to archive),
X.B star 
Xstores directories past the corresponding files. This guarantees that even old 
X.B tar
Ximplementations without a directory cache will be able to restore the
Xcorrect times of directories.
XThe option
X.B \-dirmode
Xshould only be used if the archive needs to be extracted by an old
X.B tar
Ximplementation. If
X.B star
Xis used to extract an archive that has been created with
X.B \-dirmode
Xthe directories will not get an old time stamp unless the option
X.B \-U
Xis used while extracting the archive.
X.TP
X.B \-dodesc
XForce 
X.B star
Xto descend directories found in a
X.BI list= file.
XSee also the 
X.B \-D
Xoption above.
XThe
X.B \-dodesc
Xoption only works in create mode.
X.TP
X.B \-dump
XAllows to create archives with the same number of attributes as an archive that
Xhas been created with the 
X.B level=
Xoption but without the restrictions that apply to a true dump.
X.sp
XThe resultant archive may be seen as a 
X.I level-less
Xdump which includes similar attributes as a level 0 dump but may span more than 
Xa single file system and does not need to use a
X.B \-C
Xoption.
XIt has been originally introduced to make it easier to implement a
X.B star
Xversion that supports
X.IR "true incremental dumps" ,
Xbut it is kept as it gives additional benefits.
X.B Star
Xcurrently sets the archive type to
X.B exustar
Xand, in addition archives more inode meta data inside POSIX.1-2001 extended headers.
XSee also
X.B level=
Xoption and the section
X.B "INCREMENTAL BACKUPS
Xfor more information on
X.IR "true incremental dumps" .
X.TP
X.B \-dump\-cumulative
Xinstructs
X.B star
Xto perform incremental dumps relatively to the last incremental dump of the same level.
XIncremental dumps with a level higher than 0 are normally done relatively to
Xthe content of a previous dump with lower level. If incremental dumps and restores
Xare going to be used to synchronize filesystem content, every successive incremental
Xdump will increase in size if 
X.B \-dump\-cumulative
Xis not used.
XSee section
X.B "SYNCHRONIZING FILESYSTEMS
Xfor more information.
X
X.TP
X.BI dumpdate= name
XTells
X.B star
Xto use the 
X.B mtime
Xof the time stamp file
X.I name
Xinstead of using the start time of 
X.BR star .
XThis is needed when 
X.B star
Xis run on file system snapshots.
XIf
X.B star
Xwould use the the start time with snapshots, all files that
Xhave been modified between the setup of the snapshot and the start
Xof
X.B star
Xwould be missing on the backup.
X.TP
X.B \-dumpmeta
Xchanges the behavior of
X.B star
Xin incremental dump mode.
XIf 
X.B \-dumpmeta
Xis used and only the inode change time (st_ctime) of a file has been
Xupdated since the last incremental dump,
X.B star
Xwill archive only the
X.B meta
Xdata of the file (e.g. uid, permissions, ...) but not the
Xfile content.
XUsing
X.B \-dumpmeta
Xwill result in smaller incremental dumps, but files that have been created
Xbetween two incrementals and set to an old date in st_mtime (e.g. as a result
Xfrom a tar extract) will not be archived with full content.
XUsing
X.B \-dumpmeta
Xthus may result in incomplete incremental dumps,
Xuse with extreme care.
X.TP
X.B \-e
XExit immediately with exit status \-3 (253) if any unexpected error occurs.
XThe
X.B \-e
Xoption works as if the last error control option was
X.sp
X	\fBerrctl=\fP\fI"ABORT|ALL|DIFF	*"\fP
X.sp
XThis allows to use the
X.B errctl=
Xoption together with the
X.B \-e
Xoption and thus to ignore some error conditions while aborting on all
Xother conditions.
X.TP
X.BI errctl= " name
X.TP
X.BI errctl= " error control spec
XAdd the content from file
X.I name
Xto the error control definitions or add
X.I error control spec
Xto the error control definitions.
XMore than one error control file and more than one
X.I error control spec
Xas well as a mixture of both forms is possible. 
X.sp
XThe reason for using error control is to make
X.B star
Xquiet about error conditions that are known to be irrelevant on the quality 
Xof the archive or restore run or to tell 
X.B star 
Xto abort on certain error conditions instead of trying to continue
Xwith the archive.
X.sp
X.ne 6
XA typical reason to use error control is to
Xsuppress warnings about growing log files while doing a backup on a
Xlive file system.
XAnother typical reason to use error control is to tell
X.B star
Xto abort if e.g. a file could not be archived instead of continuing
Xto archive other files from a list.
X.sp
XThe error control file contains a set of lines, each starting with a list
Xof error conditions to be ignored followed by white space followed by a
Xfile name pattern (see 
X.BR match (1)
Xor
X.BR patmatch (3)
Xfor more information).
XThe
X.I error control spec
Xuses the same syntax as a single line from the error control file.
XIf the file name pattern needs to start with white space, use a backslash
Xto escape the start of the file name. It is not possible to have new line
Xcharacters in the file name pattern.
XWhenever an error situation is encountered, 
X.B star
Xchecks the lines in the error control file starting from the top.
XIf the current error condition is listed on a line in the error control file,
Xthen
X.B star
Xchecks whether the pattern on the rest of the line matches the current file name.
XIf this is the case, 
X.B star
Xuses the current error control specification to
Xcontrol the current error condition.
X.sp
XThe list of error conditions to be handled may use one or more (in this case
Xseparated by a '|' character) identifiers from the list below:
X.RS
X.TP 12
X.B ABORT
XIf this meta condition is included in an error condition,
X.B star
Xaborts (exits) as soon as possible after this error condition has been
Xseen instead of making
X.B star
Xquiet about the condition.
XThis error condition flag may only be used together with at another 
Xerror condition or a list of error conditions
X(separated by a '|' character).
X.TP 12
X.B WARN
XIf this meta condition is included in an error condition,
X.B star
Xprints the warning about the error condition but the error condition
Xdoes not affect the exit code of
X.B star
Xand the error statistics (which is printed to the end) does not
Xinclude the related errors.
XThis error condition flag may only be used together with at another 
Xerror condition or a list of error conditions
X(separated by a '|' character).
XThe
X.B WARN
Xmeta condition has a lower precedence than
X.BR ABORT .
X.TP 12
X.B DIFF
XSuppress output in case that 
X.B "star -diff
Xdid encounter any differences.
X.TP 12
X.B ALL
XThis is a shortcut for all error conditions below.
X.TP 12
X.B STAT
XSuppress warnings that 
X.B star 
Xcould not 
X.BR stat (2)
Xa file.
X.TP
X.B GETACL
XSuppress warnings about files on which
X.B star
Xhad problems to retrieve the ACL information.
X.TP
X.B OPEN
XSuppress warnings about files that could not be opened.
X.TP
X.B READ
XSuppress warnings read errors on files.
X.TP
X.B WRITE
XSuppress warnings write errors on files.
X.TP
X.B READLINK
XSuppress warnings 
X.BR readlink (2)
Xerrors on symbolic links.
X.TP
X.B GROW
XSuppress warnings about files that did grow while they have been
Xarchived.
X.TP
X.B SHRINK
XSuppress warnings about files that did shrink while they have been
Xarchived.
X.TP
X.B MISSLINK
XSuppress warnings about files for which 
X.B star
Xwas unable to archive all hard links.
X.TP
X.B NAMETOOLONG
XSuppress warnings about files that could not be archived because the name of
Xthe file is too long for the archive format.
X.TP
X.B FILETOOBIG
XSuppress warnings about files that could not be archived because the size of
Xthe file is too big for the archive format.
X.TP
X.B SPECIALFILE
XSuppress warnings about files that could not be archived because the file type
Xis not supported by the archive format.
X.TP
X.B GETXATTR
XSuppress warnings about files on that
X.B star
Xcould not retrieve the extended file attribute information.
X.TP
X.B SETTIME
XSuppress warnings about files on that
X.B star
Xcould not set the time information during extraction.
X.TP
X.B SETMODE
XSuppress warnings about files on that
X.B star
Xcould not set the access modes during extraction.
X.TP
X.B SECURITY
XSuppress warnings about files that
Xhave been skipped on extraction because they have been considered to be a
Xsecurity risk.
XThis currently applies to all files that have a '/../' sequence inside
Xwhen
X.B \-..
Xhas not been specified.
X.TP
X.B LSECURITY
XSuppress warnings about links that
Xhave been skipped on extraction because they have been considered to be a 
Xsecurity risk.
XThis currently applies to all link names that start with '/' or
Xhave a '/../' sequence inside when 
X.B \-secure\-links
Xhas been specified.
XIn this case, 
X.B star 
Xtries to match the link name against the pattern in the error control file.
X.TP
X.B SAMEFILE
XSuppress warnings about links that
Xhave been skipped on extraction because source and target of the link
Xare pointing to the same file.
XIf 
X.B star
Xwould not skip these files, it would end up with removing the file completely.
XIn this case, 
X.B star 
Xtries to match the link name against the pattern in the error control file.
X.TP
X.B BADACL
XSuppress warnings access control list conversion problems.
X.TP
X.B SETACL
XSuppress warnings about files on that
X.B star
Xcould not set the ACL information during extraction.
X.TP
X.B SETXATTR
XSuppress warnings about files on that
X.B star
Xcould not set the extended file attribute information during extraction.
X.RE
X.sp
XIf a specific error condition is ignored, then the error condition is not
Xonly handled in a silent way but also excluded from the error statistics
Xthat are printed at the end of the
X.B star
Xrun.
X.sp
XBe very careful when using error control as you may ignore any error condition.
XIf you ignore the wrong error conditions, you may not be able to see real
Xproblems anymore.
X.TP
X.BI \-exclude\-from " name
XExclude from named file, this is an alias for the
X.B \-X
Xoption. See 
X.B \-X
Xoption for more information.
X.TP
X.BR \-F , \-FF " ..."
XFast and simple exclude option for create mode.
XWith one
X.B \-F
Xargument,
X.B star
Xignores all directories called
X.IR SCCS " and " RCS.
XWith two
X.B \-F
Xarguments,
X.B star
Xin addition ignores all files called
X.I core errs a.out
Xall files ending with
X.IR .o  .
X.IR OBJ/ .
XWith three
X.B \-F
Xarguments,
X.B star
Xignores all sub trees starting from a directory that
Xincludes a file
X.I .mirror
Xor
X.I .exclude
Xand all object files and files called
X.I core errs a.out
Xall files ending with
X.IR .o  .
XWith four
X.B \-F
Xarguments,
X.B star
Xignores all sub trees starting from a directory that
Xincludes a file
X.I .mirror
Xor
X.I .exclude
Xthe latter files are excluded too as well as
Xand all object files and files called
X.I core errs a.out
Xall files ending with
X.IR .o  .
XWith five
X.B \-F
Xarguments,
X.B star
Xin addition again excludes 
Xall directories called
X.IR SCCS " and " RCS.
X.TP
X.B \-fifo
XUse a 
X.I fifo
Xto optimize data flow from/to 
X.I tarfile.
XThis option is in effect by default (it may be changed at compile time).
XThe default fifo size is 8 MBytes on all platforms except Linux versions
Xthat do not support mmap() (4 MB because kernels
Xbefore 2.4 did not handle big shared memory areas) and Sun/mc68000 (1 MB).
XThis will 
X.B star
Xmake even work on a tiny machine like
Xa Sun 3/50. The fifo size may be modified with the 
X.I fs=
Xoption. A rule of dumb for the fifo size is to use more than the buffer size
Xof the tape drive and less then half of the real memory of the machine.
XA good choice would be to use a fifo size between 8 and 256 MB.
XThis may increase backup speed up to 5% compared to the speed achieved
Xwith the default fifo size. Note that with a DLT drive that gives 12MB/s
Xtransfer rate, a fifo of 256 MB size will keep the tape at least streaming
Xin units of 20 seconds.
XAll options that start with the 
X.B \-f
Xsequence are sensitive to typo problems, see BUGS section for more information.
X.TP
X.B \-fifostats
XPrint fifo statistics at the end of a
X.B star
Xrun when the fifo has been in effect.
XAll options that start with the 
X.B \-f
Xsequence are sensitive to typo problems, see BUGS section for more information.
X.TP
X.BR file= "tarfilename, " f= "tarfilename"
XUse 
X.I tarfilename 
Xas the name for the
X.B tar
Xarchive. Currently up to 100 
X.B file=
Xoptions are possible. Specifying more then one 
X.B file= 
Xoption make sense in multi volume mode. In this case 
X.B star
Xwill use the next name in the list every time a media change is needed.
XTo make 
X.B star 
Xbehave consistent with the single file case, 
X.B star
Xloops over the list of known archive files.
XNote that if
X.B star
Xis installed suid root and the first tarfile is a remote archive,
Xonly the connection to this archive will be created with root privileges.
XAfter this connection has been established as root,
X.B star
Xswitches back to the id of the caller.
XIf any of the other archives in the list is located on a different host,
X.B star
Xwill not be able to open this archive later on, unless run by root.
X.sp
X.B Star
Xnormally uses
X.IR stdin / stdout
Xfor the
X.B tar
Xarchive because the most common way to use 
X.B star
Xis in conjunction with pipes.
XIf 
X.B star
Xis installed suid root or if it has been called by root,
X.I tarfilename
Xmay be in remote syntax: user@host:filename as in 
X.BR rcp (1)
Xeven if 
Xinvoked by non root users.
XSee SUID NOTES for more information.
X.sp
XTo make a file local although it includes a colon (:), the filename
Xmust start with:
X.IR "'/'" ,
X.IR "'./'" " or"
X.I "'../'"
X.sp
XNote that if
X.B star 
Xtalks to an old 
X.B rmt
Xremote tape server that does not support symbolic open modes,
Xit does not open a remote tape with the 
X.B O_CREAT
Xopen flag because this would be extremely dangerous.
XIf the 
X.B rmt 
Xserver on the other side is the 
X.B rmt
Xserver that comes with 
X.B star
Xor the GNU
X.B rmt
Xserver,
X.B star
Xmay use the symbolic mode for the open flags.
XOnly the symbolic open modes allow to send all possible open
Xmodes in a portable way to remote tape servers.
X.sp
XIt is recommended to use the 
X.B rmt
Xserver that comes with
X.BR star .
XIt is the only
X.B rmt
Xserver that gives platform independent compatibility with BSD, Sun and GNU
X.B rmt 
Xclients and it includes security features that may be set up in /etc/default/rmt.
XAll options that start with the 
X.B \-f
Xsequence are sensitive to typo problems, see BUGS section for more information.
X.sp
XSee ENVIRONMENT section for information on how to use 
X.B ssh(1)
Xto create a remote tape server connection.
X.sp
XNote that if
X.BI file= -
Xhas been specified, it is no longer possible to use the
X.B \-find
X.B \-exec
Xprimary.
X.TP
X.B \-find
XThis option acts a separator.
XIf it is used, all 
X.B star
Xoptions must be to the left of the
X.B \-find
Xoption. To the right of the
X.B \-find
Xoption,
X.B star
Xaccepts the
X.B find
Xcommand line syntax only.
X.sp
XThe
X.B find
Xexpression acts as a filter between the source of file names and the
Xconsumer, which may either be the archiving engine or list/extract
Xengine. If the
X.B find
Xexpression evaluated as TRUE, then the related file is selected for
Xprocessing, otherwise it is omited.
X.sp
XIn order to make the evaluation of the
X.B find
Xexpression more convenient, 
X.B star
Ximplements additional
X.B "find primaries
Xthat have side effects on the file meta data.
X.B Star
Ximplements the following additional
X.B find
Xprimaries:
X.RS
X.TP
X.BI \-chgrp " gname
XThe primary always evaluates as true;
Xit sets the group of the file to
X.IR gname .
X.TP
X.BI \-chmod " mode
XThe primary always evaluates as true;
Xit sets the permissions of the file to
X.IR mode .
XOctal and symbolic permissions are accepted for
X.I mode
Xas with
X.BR chmod (1).
X.TP
X.BI \-chown " uname
XThe primary always evaluates as true;
Xit sets the owner of the file to
X.IR uname .
X.TP
X.B \-false
XThe primary always evaluates as false;
Xit allows to make the result of the full expression different from
Xthe result of a part of the expression.
X.TP
X.B \-true
XThe primary always evaluates as true;
Xit allows to make the result of the full expression different from
Xthe result of a part of the expression.
X.PP
XThe command line:
X.PP
X.B "star -c f=o.tar -find . ( -type d -ls -o false ) -o ! -type d
X.PP
Xlists all directories and archives all non-directories to the archive
X.BR o.tar .
X.PP
XThe command line:
X.PP
X.B "star -c f=o.tar -find . ( -type d -chown root -o true )
X.PP
Xarchives all directories so they appear to be owned by root in the archive,
Xall non-directories are archived as they are in the file system.
X.PP
XNote that the
X.BR \-ls ,
X.B \-exec 
Xand the
X.B \-ok
Xprimary cannot be used if 
X.B stdin 
Xor
Xstdout
Xhas been redirected by the
X.BI list= \-
Xof by the
X.BI file= \-
Xoptions.
X.RE
X.TP
X.B \-force_hole
Xobsoleted by \-force\-hole
X.TP
X.B \-force\-hole
XTry to extract all files with holes. This even works with files that 
Xare created without the 
X.B \-sparse 
Xoption. 
X.BR Star , 
Xin this case examines 
Xthe content of the files in the archive and replaces writes to parts containing 
Xbinary zeroes with seeks. 
X.sp
XIf used together with the
X.B \-sparse
Xoption in create mode,
X.B star
Xassumes all files to be sparse and archives files with blocks of nulls as sparse files.
X.sp
XThis option should be used with extreme care 
Xbecause you sometimes get in trouble when files get unattended holes.
XAll options that start with the 
X.B \-f
Xsequence are sensitive to typo problems, see BUGS section for more information.
X.TP
X.B \-force_remove
Xobsoleted by \-force\-remove
X.TP
X.B \-force\-remove
XForce to remove non writable files on extraction.
XBy default, 
X.B star
Xwill not overwrite files that are read only.
XIf this option is in effect, 
X.B star
Xwill silently remove these files to allow the extraction of a file.
XAll options that start with the 
X.B \-f
Xsequence are sensitive to typo problems, see BUGS section for more information.
X.TP
X.B \-force-restore
XForce an incremental restore even if the incremental dump is only a partial
Xdump. See
X.BR \-wtardumps ,
X.B level=
Xand section
X.B "INCREMENTAL BACKUPS
Xfor more information.
X.TP
X.BR fs= #
XSet fifo size to #.
XSee 
X.I bs=
Xfor the possible syntax.
XThe default size of the fifo is 1 Mbyte on Sun mc68000 systems,
X4 Mbytes on non mmap() aware Linux systems and 8 Mbytes on all other systems.
XSee
X.B \-fifo
Xoption for hints on using the right fifo size.
X
X.TP
X.BI fs-name= mount_point
XUse
X.I mount_point
Xwhen recording information in
X.B /etc/tardumps
Xand when comparing against information in
X.B /etc/tardumps
Xfor incremental backups.
XThis makes sense when backups are made using file system snapshots
Xand allows 
X.B /etc/tardumps
Xand the archive to contain the real name of the file system instead of the
Xtemporary mount point that is used for the snapshot device.
X
X.TP
X.BI H= headertype
XSee
X.BI artype= headertype
Xoption.
XNote that POSIX.1-2001 defines an option
X.B \-H
Xthat follows symbolic links that have been encountered on the command line.
XFor this reason, the old star option
X.BI H= headertype
Xoption may go away in the future even though this option has been in use by
Xcpio since 1989.
X.TP
X.B \-h, \-L
XFollow symbolic links as if they were files.
XNormally 
X.B star
Xwill not follow symbolic links but stores their values in
X.I tarfile.
XSee also the
X.B \-L
Xoption.
X.TP
X.B \-hardlinks
XIn extract mode, this option tells
X.B star
Xto try to create a hardlink whenever a symlink is encountered in the archive.
XIn create mode, this option tells
X.B star
Xto try to archive a hardlink whenever a symlink is encountered in the
Xfile system.
X.TP
X.B \-hpdev
XAllow 24 bits for the minor device number using 8 octal digits.
XNote that although it allows to create
X.B tar
Xarchives
Xthat can be read with HP\-UX tar, this creates
X.B tar
Xarchives
Xwhich violate POSIX.1\-1988.
XThis option is only needed if you like to use a POSIX.1\-1988 based archive
Xformat that does not include extensions.
XIf you use the
X.B xstar
Xformat, 
X.B star
Xwill use a base 256 extension that allows bigger major/minor numbers by default,
Xif you use the
X.B xustar 
Xor the
X.B exustar
Xformat there is no limitation at all as these formats use POSIX.1\-2001
Xextended headers to archive the major/minor numbers by default.
X.TP
X.B \-i
XIgnore checksum errors on
X.B tar
Xheaders.
XIf this option is specified,
X.B star
Xwill not exit if a header with a bad checksum is found but search for the
Xnext valid header.
X.TP
X.B \-install
XCarefully replace existing files when extracting files. This is done
Xsimilar to
X.BR install "(1)
Xby first extracting the files into a temporary name and renaming
Xthe file to the final name after the extraction of that file was
Xsuccessful.
X.sp
XAs
X.B star
Xby default does not remove non-empty directories, an install that needs
Xto remove existing non-empty directories may also need the options
X.B \-force\-remove
Xand
X.BR \-remove\-recursive .
X.TP
X.B \-j
Xrun the input or output through a 
X.B bzip2
Xpipe - see option 
X.B \-z 
X.B \-Z
Xand
X.B \-bz
Xbelow.
XAs the
X.B \-bz
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-z
Xoption are non standard, it makes sense to omit the
X.B \-bz
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-z
Xoptions inside shell scripts if you are going to extract a compressed
Xarchive that is located inside a plain file as
X.B star
Xwill auto detect compression and choose the right decompression
Xoption to extract.
X.TP
X.B \-keep\-nonempty\-dirs
XDo not complain about trying to remove nonempty directories in case that
X.B \-remove\-recursive
Xhas not been specified.
X.TP
X.B \-keep_old_files
Xobsoleted by \-keep\-old\-files
X.TP
X.BR \-keep\-old\-files ", " \-k
XKeep existing files rather than restoring them from 
X.I tarfile. 
XThis saves files from being clobbered even if 
X.I tarfile
Xcontains a more recent version of the corresponding file.
X.sp
XSee SECURITY NOTES for more information.
X.TP
X.B \-L, \-h
XFollow symbolic links as if they were files.
XNormally 
X.B star
Xwill not follow symbolic links but stores their values in
X.I tarfile.
XSee also the
X.B \-h
Xoption.
X.TP
X.B \-l
XDo not print a warning message if not all links to hard linked files
Xcould be dumped. This option is evaluated in the opposite way to historic
X.BR tar (1)
Ximplementations and to POSIX.1.
XPOSIX.1 requests that by default no warning messages will be printed
Xand
X.B \-l
Xwill enable warning messages when not all links could be archived.
X.TP
X.BR level= dumplevel
XSet level for incremental dumps.
XThis option is used to switch 
X.B star
Xinto
X.I "true incremental dump"
Xmode.
XThe 
X.B dumplevel
Xmay be in the range between 0..99.
X.sp
XIn 
X.I "true incremental dump"
Xmode, a
X.B \-C
Xoption which is followed by the name a mount point and a dot ('.') as
Xstarting directory name is required. 
XOnly a single file system may be handled at a time.
XIf the directory following the
X.B \-C
Xoption is not referring to a root directory of a file system, the dump
Xis called a
X.BR "partial dump" .
XIf the directory following the
X.B \-C
Xoption is referring to a root directory of a file system
Xand no other restrictions apply that exclude certain files
Xfrom the dump, the dump is called a
X.BR "full dump" .
X.sp
XBy default, the
X.B tardumps
Xdatabase is not written.
XSee also the
X.BI tardumps= name
Xand
X.B \-wtardumps
Xoptions and the section
X.B "INCREMENTAL BACKUPS
Xfor more information.
X.TP
X.B \-link\-data
XIn create mode, include the data for files even if these files are
Xhard links. This feature in create mode is currently only available
Xfor the
X.B exustar
Xarchive format and only in case
X.B \-sparse
Xhas not been specified.
X.sp
XIn extract mode, allow
X.B star
Xto deal with data in hard linked files even if the standard would not 
Xallow this for the used archive format.
X.TP
X.B \-link\-dirs
XWhen in create mode, try to find hard linked directories.
XUsing
X.B \-link\-dirs
Xwill force 
X.B star
Xto keep track of all directories that will go into the archive and thus
Xcauses a lot more memory to be allocated than in the default case.
X.sp
XIf you like to extract a
X.B cpio
Xarchive that contains hard linked directories, you also need to specify
X.B \-link\-dirs
Xin extract or diff mode.
XThis is needed because many
X.B cpio
Ximplementations create buggy archives with respect to hard links.
XIf 
X.B star
Xwould look for hard linked directories in all cases, it would
Xdetect many pseudo hard links to directories.
XUse
X.B \-link\-dirs
Xwith care if you extract 
X.B cpio
Xarchives.
X.sp
XNote that not all filesystem allow to create hard links to directories.
XAlso note that even though a non-root user is able detect and archive
Xhard linked directories, all known operating systems require the extraction
Xto be done as root in order to be able to create or remove hard links to directories.
XFor this reason its only recommended to use this option when doing accurate
Xbackups and when hard links to directories are expected.
X.sp
XWhen the option
X.B \-link\-dirs
Xis not used and hard links to directories are present, the appendant sub-tree
Xwill appear more than once on the archive and
X.B star
Xwill print 
X.I "Linkcount below zero
Xwarnings for non directory hard links inside the sub-tree.
X.TP
X.BR list= filename
XRead filenames for store/create/list/diff command from
X.I filename.
XThe file
X.I filename
Xmust contain a list of path names, each on a separate line.
XThis option implies the 
X.B \-D 
Xoption.
XTo force
X.B star
Xto descend directories, use the
X.B \-dodesc
Xoption in this case.
XSee also the 
X.B \-X
Xoption.
X.sp
XNote that if
X.BI list= -
Xhas been specified, it is no longer possible to use the
X.B \-find
X.B \-exec
Xprimary.
X.TP
X.B \-lowmem
XTry to run with reduced memory requirements.
XThis causes
X.B star
Xto default to 1 MB of FIFO memory.
XInstead of allocating memory to hold the directory content and reading the
Xdirectory at once,
X.B star
Xreads the directory name by name. This may cause
X.B star
Xto close the directory if it rans out of file descriptors because of deeply
Xnested directories. If a directory then does not support
X.BR telldir(3)/seekdir(3) ,
X.B star
Xwill fail.
X.br
X.ne 5
X.TP
X.B \-lzip
Xrun the input or output through a
X.B lzip
Xpipe - see option
X.B \-z
Xbelow.
X.TP
X.B \-lzo
Xrun the input or output through a
X.B lzop
Xpipe - see option
X.B \-z
Xbelow.
X.TP
X.BR \-M ", " \-xdev
XDo not descend mount points.
XThis is useful when doing backups of complete file systems. 
XSee NOTES for more information.
X.TP
X.B \-m
XDo not restore access and modification time. 
X(Access time is only available if 
X.B star
Xis reading 
X.BR star ,
X.BR xstar ,
X.BR xustar ,
X.BR exustar ,
Xor
X.B pax
Xarchives). If 
X.B star
Xextracts other archive types, the 
X.B \-m
Xflag only refers to the modification time.
X
X.TP
X.B \-match\-tree
XIf in create mode a pattern does not match a directory, and 
X.B \-match\-tree
Xhas been specified, the whole directory tree is excluded from
Xthe archive and from further directory scans.
XBy default, 
X.B star
Xexcludes the directory but still recursively scans the content of this
Xdirectory as complex patterns could allow files inside the directory tree
Xto match.
XUsing
X.B \-match\-tree
Xallows to efficiently exclude whole trees from scanning. This helps to 
Xavoid scannings directory trees that are on remote file systems or contain
Xexcessive bad blocks.
X.TP
X.BR maxsize= #
XDo not store files in
X.I tarfile
Xif they are bigger than #.
XSee 
X.I bs=
Xfor the possible syntax.
XBy default, the number is multiplied by
X1024, so the value counts in units of kBytes.
XIf the size specifier ends with a valid multiplication character
X(e.g '.' for bytes or 'M' for MB) the specified size is used as specified
Xand not multiplied by 1024.
XSee
X.B bs=
Xoption for all possible multipliers.
X.TP
X.B \-meta
XIn create mode,
X.B \-meta
Xcauses
X.B star
Xto archive all 
X.B meta
Xdata of the file (e.g. uid, permissions, ...) but not the
Xfile content. In extract mode, it causes 
X.B star
Xto restore all 
X.B meta
Xdata but not the file content. In addition, in extract mode
Xno plain file, special file or directory will be created.
X.B Meta
Xfiles are needed to support incremental backups.
X.sp
XWarning: Do not try to extract
X.B star
Xarchives containing
X.B meta
Xfiles using other tar implementations if they are not aware of the
X.B meta
Xfile extensions of 
X.BR star .
X.B Star
Xtries to force all tar implementations that are not standard compliant to abort.
X.B Star 
Xalso tries to make all non POSIX.1-2001 compliant tar implementations unable
Xto find a valid filename. However when other POSIX.1-2001 aware tar implementations
Xcome up and don't know about
X.B meta
Xfiles, they will destroy files on disk.
X.sp
XThe problems result from the only current fallback in the POSIX standard that 
Xtells tar implementations to treat all unknown file types as if they were 
Xplain files. As 
X.B meta
Xfiles are needed for incremental backups, I am looking for people and companies 
Xwho like to support me to be able to add the 
X.B meta
Xfile concept to the POSIX.1-2005 standard.
X.TP
X.B \-modebits
XThis options allows you to create
X.B tar
Xarchives that include
Xmore than 12 bits from st_mode. Note this create
X.B tar
Xarchives
Xthat violate POSIX but some
X.B tar
Ximplementations insist in reading
Xsuch nonstandard archives.
X.TP
X.B \-multivol
XSwitch to multi volume mode.
XIn multi volume mode, there will be no logical EOF marker written to the end
Xof a single tape. If
X.B \-multivol
Xis used in read mode, a hard EOF on input (if not preceded by a logical EOF)
Xtriggers a medium change operation.
X.sp
XSpecifying
X.B \-multivol
Xtells
X.B star
Xto split files across volumes if needed.
XThis way, a virtual archive is created that spans more than one medium.
XMulti volume mode is needed whenever it is not possible to split the
Xarchiving or extracting into several logically independent tasks. This is
Xtrue for e.g. incremental dump/restore operations where inode numbers need
Xto be traced for the whole task.
X.sp
XWhen
X.BI tsize= #
Xhas been specified, but
X.B star 
Xis not in multi volume mode, files cannot be split across volumes.
X.sp
XWhen
X.B \-multivol
Xhas been specified in create mode together with
X.BI tsize= #
Xthen a media change is initiated exactly after an amount of
X.I tsize
Xdata has been written.
XWhen
X.B \-multivol
Xhas been specified in create mode and
X.BI tsize= #
Xhas not been specified, then the medium change is triggered by a EOT condition
Xfrom writing the medium. This allows to use media where the size cannot be known
Xin advance (e.g. tapes with build in compression); it does not work if the
XEOT condition is not returned in sync with the related write operation. For this
Xreason, it is expected that data buffering inside a device driver cannot be used.
X.sp
XDepending on the selected archive format,
X.B star
Xwrites a volume header at the beginning of a new medium. This medium header
Xallows to verify the correct volume after a change during read back.
XIt is recommended to use the
X.B exustar
Xformat for best results.
XIn create mode,
X.B \-multivol
Xis only supported for archives types that allow to write reliable multi volume
Xheader information.
X.sp
XSee
X.BI tsize= #
Xoption for more information.
X.sp
XNote that
X.B \-multivol
Xis an interactive option that prevents
X.B star
Xfrom being used in non-interactive environments.
XIf you like to use it in a non-interactive environment, you need to
Xspecify
X.BI new\-volume\-script= script
Xin addition in order to automate the media change procedure.
X.TP
X.BR newer= filename
XDo not store files to 
X.I tarfile
Xif their modification time is not newer than the modification time of
X.I filename.
XSee 
X.B \-ctime
Xoption for changing this behavior.
X.TP
X.B \-newest
XIn conjunction with the list command this lists you only the newest file in
X.I tarfile.
X.TP
X.B \-newest_file
Xobsoleted by \-newest\-file
X.TP
X.B \-newest\-file
XIn conjunction with the list command this lists you only the newest regular 
Xfile in
X.I tarfile.
X.TP
X.BI new\-volume\-script= script
XCall 
X.I script
Xat end of each tape if in multi volume mode.
XIf this option is not in effect, 
X.B star
Xwill ask the user to confirm the volume change.
XThe script is called with two parameters.
XThe first parameter is the next volume number and the second
Xparameter is the next archive file name.
X.TP
X.B \-nodump
XIf this option is set, 
X.B star
Xwill not dump files that have the
X.B nodump
Xflag set. Note that this currently only works on BSD\-4.4 derivates
Xand on Linux.
XOn Linux, using this option will cause a performance degradation
X(the system time increases by 10%) because of the unlucky kernel interface.
X.TP
X.B \-no-dirslash
XDo not add a slash to the end of directory names if writing to an archive.
XHistoric tar archive formats did only allow to specify plain files and hard links.
XAround 1980, BSD added a feature to specify a directory on tape by adding
Xa slash to the end of the name. POSIX.1-1988 defined the first official tar
Xarchive format that had a clean method to specify the type of a directory.
XAs old tar formats need the slash to recognize a directory,
X.B \-no-dirslash
Xmay not be used if archives should be compatible with the old tar format.
X.TP
X.B \-no_fifo
Xobsoleted by \-no\-fifo
X.TP
X.B \-no\-fifo
XDon't use a
X.I fifo
Xto optimize data flow from/to 
X.I tarfile.
XCurrently the 
X.I \-fifo 
Xoption is used as default. (This may be changed at compile time.)
X.TP
X.B \-no\-fsync
XDo not call
X.B fsync(2)
Xfor each file that has been extracted from the archive. 
XUsing
X.B \-no\-fsync
Xmay speed up extraction on operating systems
Xwith slow file I/O (such as Linux), but includes the risk that
X.B star
Xmay not be able to detect extraction problems that occur after the call
Xto
X.BR close (2).
XA typical cause for such problems is a NFS file system that
Xfills up before the buffer cache is synced or
Xa write error that occurs while the buffer cache is synced.
XThere may be other reasons.
XUse with extreme care.
X.TP
X.BR \-nochown ", " \-o
XDo not restore owner and group of files. 
XThis may be used if super user privileges are needed to overwrite 
Xexisting files but the local ownership of the existing files should 
Xnot change.
X.TP
X.B \-no\-p
XDo not restore files and directories to their original permissions.
XThis option is needed only if
X.B star
Xis called by the super user and the permissions should not be restored
Xfrom the archive.
XSee also the
X.B \-p
Xoption. The
X.B \-p
Xoptions has a higher precedence than the
X.B \-no\-p
Xoption.
X.TP
X.B \-no_statistics
Xobsoleted by \-no\-statistics
X.TP
X.B \-no\-statistics
XDo not print statistic messages at the end of a
X.B star
Xrun.
X.TP
X.B \-no\-xheader
XDo not create or extract POSIX.1-2001 extended headers.
XThis option may be used if you like to read an archive with broken
Xextended headers.
X.TP
X.BR \-not ", " \-V
XInvert the meaning of the pattern list. i.e. use those files which do not match
Xany of the pattern.
XNote that this option only applies to patterns that have been specified
Xvia the
X.BR pattern= "pattern or " pat= pattern
Xoption. Patterns specified as file type arguments will not be affected.
X.TP
X.BR \-notarg ", " \-pax-c
XMatch all file or archive members except those specified by the pattern or file operands.
X.TP
X.B \-nowarn
XDo not print warning messages.
XThis sometimes is useful to make the output more readable
X(e.g. when hundreds of files that are going to be extracted are not newer
Xin the archive then on the filesystem).
X.TP
X.B \-numeric
XUse the numeric user/group fields in the listing rather than the 
Xdefault.
XThe default allows to list the ASCII version of user/group of the file
Xand to extract the owners of the files based on numeric values rather
Xthan the names.
XIn create mode, no user/groups names are put on the archive.
XThe
X.B \-numeric
Xoption also applies when ACLs are going to be archived or extracted.
X.TP
X.B \-O
XBe compatible to old versions of
X.BR tar .
XIf 
X.B star 
Xis invoked with this option, 
X.B star 
Xgenerates archives which are 
Xfully compatible with old UNIX
X.B tar
Xarchives. If in extract mode, 
X.B star 
Xignores any additional info in the headers.
XThis implies neither that archives generated with this option are 
Xbinary equal with archives generated by old
X.B tar
Xversions nor that 
X.B star 
Xis trying to comprehend all bugs that are found in old
X.B tar
Xversions.
XThe bug in old
X.B tar
Xversions that cause a reversal of a space and a NULL byte 
Xin the checksum field is not repeated. 
XIf you want to have signed checksums you have to specify the
X.I \-singed\-checksum
Xoption too. 
XIf you want directories not to be archived in order to be compatible
Xto very old historic tar archives, you need to specify the
X.I \-d
Xoption too. 
X.sp
XThis option is superseeded by the 
X.BR H= headertype 
Xoption.
X.TP
X.BR \-o ", " \-nochown
XDo not restore owner and group of files. 
XThis may be used if super user privileges are needed to overwrite 
Xexisting files but the local ownership of the existing files should 
Xnot change.
X.TP
X.BR \-onull ", " \-nullout
XDo not actually write to the archive but compute and add the sizes.
XThis is useful when trying to figure out if a tape may hold
Xthe current backup.
XPlease only use the
X.B \-onull
Xoption as it is a similar option as used by the
X.BR sdd (1)
Xcommand.
X.TP
X.B \-P
XAllow 
X.B star
Xto write a partial record as the last record. 
XNormally, 
X.B star 
Xwrites each record with the same size.
XThis option is useful on unblocked tapes i.e. cartridge tapes like QIC tapes
Xas well as with archives that are located in files.
XIf you use this option on local files, the size of the archive will be smaller.
XIf you use this option on cartridge tapes, is makes sure that later - in extract mode -
X.B star
Xwill read up to the end of file marker on the tape and the next call to
X.B star
Xwill read from the next archive on the same tape.
X.TP
X.B \-p
XRestore files and directories to their original permissions.
XWithout this option, they are created using the permissions in the archive
Xand the present 
X.BR umask (2).
XIf
X.B star
Xis called by the super user,
X.B star
Xbehaves as if it has been called with the
X.B \-p
Xoption. See also 
X.B \-no\-p
Xoption.
XIf the archive contains Access Control Lists (ACLs) in
XPOSIX.1\-2001 extended headers,
X.B star
Xwill restore the access control lists from the archive for files
Xif the \-acl option is specified.
XIf the option \-acl has not been specified, ACLs are not restored at all.
X.TP
X.BR pattern= "pattern, " pat= pattern
XSet matching pattern to
X.I pattern.
XA maximum of 100 pattern=pat options may be specified. 
XAs each pattern is unlimited in length, this is no real limitation.
XIf more than one pattern is specified, a file matches if any of the 
Xspecified pattern matches.
XPatterns may be used in create mode to select or exclude files
Xfrom the list of file type arguments or the files located in a sub tree
Xof a file type argument directory.
XBy default,
X.B star
Xscans the whole directory tree underneath a directory that is in the argument
Xlist. This may be modified by using the
X.B \-match\-tree
Xoption.
XIn extract or list mode, all file type arguments are interpreted to be
Xselect pattern and all option type patterns may be either select or exclude patterns
Xdepending on the presence or absence of the
X.B \-not
Xoption.
XIf you use file type select patterns, they work exactly like the method
Xused by other (non pattern aware) 
X.BR tar (1)
Ximplementations.
XFile type select patterns do not offer pattern matching but allow to restore subtrees.
XTo extract a complete sub tree 
Xfrom the directory
X.I dir
Xwith 
X.B star
Xusing the 
X.B pattern=
Xoption, use
X.B pattern=
X.I "dir/\\\\*
Xif you like to select a subtree by using the historic method, use
X.I "dir
Xas file type argument.
XIf you only like to extract the directory itself, use
X.I "dir/
Xas file type argument.
XSee manual page for 
X.BR match (1)
Xfor more details of the pattern matcher.
XAll patterns are selection patterns by default. To make them exclude patterns,
Xuse the 
X.B \-not
Xor the
X.B \-V 
Xoption.
X.TP
X.BI pkglist= file
XThis is (for now) an internal interface for the Schily Source Package System (sps).
XIt only works in create mode and behaves similar to the
X.B list=
Xoption, but it allows to overwrite the 
X.BR permissions ,
Xthe 
X.B uid
Xand
X.B gid
Xvalues from the content of the 
X.B pkglist=
Xfile.
XEach line from the
X.B pkglist=
Xfile contains a file name followed by the permission, a user name and a group name.
XThe permission is an octal character string.
XEach value that is not used to overwrite the original values may be replaced by a '?'.
XThe fields are separated by spaces, so the
X.B pkglist=
Xoption does not allow files that contain newline or space characters.
X.TP
X.BR \-pax-c ", " \-notarg
XMatch all file or archive members except those specified by the pattern or file operands.
X.TP
X.B \-pax-H
XFollow symbolic links that have been encountered on the command line.
XIf the referenced file does not exist, the file information and type will be for the link itself.
XIf the link is referencing a file type that cannot be archived with the current archive format,
Xthe file information and type will be for the link itself.
X.TP
X.B \-pax-i
XDo interactive renaming in a way that has been defined for POSIX
X.BR pax .
X.B Star
Xwill print the original filename and prompt for a reply.
XIf you type just 
X.BR RETURN ,
Xthan the file is skipped.
XIf you type '.', then the original file name is retained.
XIf you type anything else, then this is taken as the new file name.
X.sp
XNote that
X.B \-pax\-i
Xis an interactive option that prevents
X.B star
Xfrom being used in non-interactive environments.
X.TP
X.B \-pax-L
XFollow symbolic links.
XIf the referenced file does not exist, the file information and type will be for the link itself.
XIf the link is referencing a file type that cannot be archived with the current archive format,
Xthe file information and type will be for the link itself.
X.TP
X.B \-pax-ls
XSwitch listing format to the format defined for POSIX 
X.B pax
Xand
X.BR ls .
X.TP
X.B \-pax-match
XAllow file type arguments to be recognised as regular expressions in a way that has been defined
Xfor POSIX
X.BR pax .
X.TP
X.B \-pax-n
XAllow each pattern to match only once.
XIf a pattern matches a directors, then the whole sub tree matches the pattern.
X.TP
X.BI \-pax-p " string
XPAX style privileges string.
XSeveral characters (each has its own meaning). The following characters are defined:
X.RS
X.TP
X.B a
XDo not preserve file access times.
XThis option is currently ignored.
X.TP
X.B e
XPreserve the user ID, group ID, file mode bits.
XThis is equivalent to calling
X.BR "star \-p \-acl \-xfflags" ".
X.TP
X.B m
XDo not preserve file modification times.
XThis is currently equivalent to calling
X.BR "star \-m" ".
X.TP
X.B o
XPreserve the user ID and group ID.
XThis is the default for
X.B star
Xif called as root.
X.TP
X.B p
XPreserve the file mode bits.
XThis is equivalent to calling
X.BR "star \-p" ".
X.RE
X.TP
X.B \-prinodes
XPrint inode numbers in verbose list mode if the archive contains
Xinode numbers.
X.TP
X.B \-print\-artype
XCheck the type of the archive, print the archive and compression type on a single
Xline and exit.
X.TP
X.B \-qic24
XSet tape volume size to 61440 kBytes.
XSee
X.BI tsize= #
Xoption for more information.
X.TP
X.B \-qic120
XSet tape volume size to 128000 kBytes.
XSee
X.BI tsize= #
Xoption for more information.
X.TP
X.B \-qic150
XSet tape volume size to 153600 kBytes.
XSee
X.BI tsize= #
Xoption for more information.
X.TP
X.B \-qic250
XSet tape volume size to 256000 kBytes.
XSee
X.BI tsize= #
Xoption for more information.
X.TP
X.B \-qic525
XSet tape volume size to 512500 kBytes.
XSee
X.BI tsize= #
Xoption for more information.
X.TP
X.B \-read0
XRead null terminated file names from the file specified with the 
X.B list=
Xoption.
X.TP
X.B \-refresh_old_files
Xobsoleted by \-refresh\-old\-files
X.TP
X.B \-refresh\-old\-files
X.TP
X.B \-refresh
XDo not create new files. Only already existing files may be overwritten from
X.I tarfile 
Xif either newer versions are present in the archive or if the 
X.B \-U
Xflag is used. 
XThis allows to overwrite files by more recent files from an archive 
Xthat contains more files than the target directory should contain.
XThe option
X.B \-refresh\-old\-files
Xis the same as the 
X.B \-refresh
Xoption.
X.TP
X.B \-remove_first
Xobsoleted by \-remove\-first
X.TP
X.B \-remove\-first
XRemove files before extraction.
XIf this option is in effect, 
X.B star
Xwill remove files before extracting a file from the archive.
XThis is needed if you want to change the file type or if you need
Xto break a hard link.
XIf you do not use either
X.B \-ask\-remove
Xor
X.B \-force\-remove
Xtogether with 
X.BR \-remove\-first , 
Xthis option is useless and no files will be removed.
X.TP
X.B \-remove_recursive
Xobsoleted by \-remove\-recursive
X.TP
X.B \-remove\-recursive
XRemove files recursive.
XIf removing of a file is permitted, 
X.B star
Xwill only remove files, specials and empty directories.
XIf this option is in effect,
X.B star
Xwill be allowed to recursively removes non empty directories too.
X.TP
X.B \-restore
Xswitches
X.B star
Xinto
X.I "true incremental restore"
Xmode.
XA file named
X.B star-symtable
Xand a directory named
X.B star-tmpdir
Xis created in the root directory of the file system where the extraction
Xtakes place.
XIf
X.B \-restore
Xhas been specified, star behaves as if
X.B \-xdot
Xhas been specified too.
XSee also
X.B level=
Xoption 
Xand section
X.B "INCREMENTAL BACKUPS
Xfor more information.
X.sp
XNote: Do not use the
X.B \-restore
Xoption if you only like to restore a single file or a list of selected files.
X.TP
X.B \-S
XDo not store/create special files.
XA special files is any file except plain files, symbolic links and directories.
XYou need to be super user to extract special files.
X.TP
X.BI \-s " replstr"
XModify file or archive member names named by a pattern according to the
Xsubstitution expression
X.IR replstr .
XThe format of 
X.I replstr
Xis:
X.sp
X.BI "	\-s\ " /old/new/[gp]
X.sp
XThe
X.B old
Xpattern may use regular expressions and the 
X.B new
Xstring may contain the special character '&'. The character '&' is substituted by the
Xstring that matches the
X.B old
Xpattern.
XThe optional trailing 'g' means global substitution. If 'g' is not used, a substitution
Xpattern is only used once on a name.
XIf the optional trailing 'p' is used, the substitution is printed to standard error.
X.sp
XUp to 100 substitute options may be used. If more than one substitute option has been
Xspecified,
X.B star
Xwill loop over all substitute patterns until one matches.
X.sp
XIf the name substitutes to the empty string, the file is skipped.
X.TP
X.B \-secure\-links
XDo not extract hard links or symbolic links if the link name (the target of the link)
Xstarts with a slash (/) or if /../ is contained in the link name.
XTar archives containing such links could be used to compromise the system. If they are
Xunpacked together with a lot of other files, this may not even be noticed.
X.sp
XAs the usability of a tar archiver would be limited if
X.B \-secure\-links
Xchecking would be done by default, 
X.B star
Xmakes link checking optional.
X.sp
XIf you unpacked a tar archive using the
X.B \-secure\-links
Xand did not get a security warning at the end of the 
X.B star
Xrun, all files and links have been extracted.
XIf you get a warning, you should unpack the archive a second time and specify the
Xoptions
X.BR \-k ", " \-w " and " \-nowarn
Xin addition to the options used for the first run.
XSee SECURITY NOTES for more information.
X.TP
X.B \-shm
XUse System V shared memory for fifo. 
XNormally 
X.B star
Xis compiled to use mapped /dev/zero pages for the fifo, if the operating system 
Xsupports this.
XIf 
X.B star
Xis compiled to have both code for mapped pages and for System V shared memory,
X.B star
Xwill use shared memory instead of the default.
XIf the 
X.I \-help
Xmenu doesn't show the 
X.I \-shm 
Xflag you have no choice.
XWhen using System V shared memory, you may have to raise the system's internal
Xlimit for shared memory resources to get enough shared memory for 
X.BR star . 
X.TP
X.B \-signed_checksum
Xobsoleted by \-signed\-checksum
X.TP
X.B \-signed\-checksum
XUse signed chars to calculate checksums. This violates the
X.B tar
Xspecs but old 
Xversions of 
X.B tar 
Xderived from the seventh edition of UNIX are implemented in this way.
XNote: Only filenames and linknames containing chars with the most 
Xsignificant bit set may trigger this problem because all 
Xother fields only contain 7 bit ASCII characters, octal digits or binary 
Xzeroes.
X.TP
X.B \-silent
XSuppress informational messages like
X.IR "foobar is sparse" .
X.TP
X.B \-sparse
XHandle files with holes effectively on store/create.
XNote that sparse files may not be archived this way if the archive format is
X.BR tar ,
X.BR ustar ,
X.BR suntar ,
X.BR pax ,
Xor any
X.B cpio
Xvariant.
XOn Solaris-2.3 ... Solaris-2.5.1 there is a special ioctl() called 
X.I _FIOAI
Xthat allows root to get the allocation info more efficiently.
XOn Solaris 11 there is an enhanced
X.BR lseek (2)
Xcall with addidional whence values
X.B SEEK_HOLE
Xand
X.B SEEK_DATA
Xthat allow to find holes in an efficient way.
XOther operating systems lack support to get the real allocation list
Xand force 
X.B star
Xto scan the files to look for blocks that only contain null characters.
XThis may 
X.B star
Xcause to assume more holes to be present than the number that the file really contains.
X.TP
X.B \-symlinks
XThis option tells
X.B star
Xin extract mode to try to create a symlink whenever a hardlink is encountered
Xin the archive.
X.TP
X.B \-T
XIf the option 
X.B file= 
Xor 
X.B f= 
Xis omitted and the \-T option is present, 
X.B star
Xwill use the device indicated by the 
X.SB TAPE 
Xenvironment variable, 
Xif set.
X.TP
X.BI tardumps= name
XSet the file name for tar dump dates database to
X.BR name .
XThe default name is 
X.BR /etc/tardumps .
XUse in combination with the
X.B level= 
Xoption to create
X.IR "true incremental dumps" .
XSee also 
X.B \-wtardumps
Xoption and section
X.B "INCREMENTAL BACKUPS
Xfor more information.
X.TP
X.B \-time
XPrint timing info.
XSee DIAGNOSTICS for more information.
X.TP
X.B \-to_stdout
Xobsoleted by \-to\-stdout
X.TP
X.B \-to\-stdout
XExtract files to stdout. This option may be used to extract
X.I tarfiles
Xcontaining
X.I tarfiles
X(see examples below).
X.TP
X.B \-tpath
XUse this option together with the 
X.I \-t
Xoption or with 
X.I \-cv
X(verbose create) to get only a list of the 
Xpathnames of the files in the archive.
XThis may be used in shell scripts to generate a name list.
XIf used together with the 
X.I \-diff 
Xoption, 
X.B star
Xwill only print the names of the files that differ.
XA second run of
X.B star 
Xmay then be used to restore all files that had differences to the archive.
XUse the
X.I list=
Xoption to specify the namelist in this case.
X.TP
X.BR tsize= #
XSet tape volume size to # to enable multi volume tape support.
XThe value refers to the archive size without compression.
XSee 
X.I bs=
Xfor the possible syntax.
XBy default, the number is multiplied by
X512, so the value counts in units of 512 byte blocks.
XIf the size specifier ends with a valid multiplication character
X(e.g '.' for bytes or 'M' for MB) the specified size is used as specified
Xand not multiplied by 512.
XWith this option in effect, 
X.B star 
Xis able to archive filesystems that are bigger then the tape size.
XIf the option
X.BR tsize= #
Xwithout
X.B \-multivol
Xthen no file will be split across volumes and each volume may in theory
Xbe read back separately.
XFiles that do not fit on a single tape may not be stored in this mode.
XIf
X.B \-multivol
Xhas been specified in addition,
X.B star
Xwill split files when the maximum allowed tape size has been reached.
XIf the tape volume size is not a multiple of the tape block size,
Xthe tape volume size is silently rounded down to a value that is a 
Xmultiple of the tape block size.
X.sp
XSee
X.B \-multivol
Xoption for more information.
X.TP
X.B \-U
XRestore files unconditionally.
XBy default, an older file from the archive will not replace a corresponding newer file on 
Xdisk.
X.TP
X.BI umask= mask
XSet
X.B star's
Xumask to
X.IR mask .
XThis allows to control the permissions for intermediate directories that
Xare created by
X.B star
Xin extract mode.
XSee also
X.B \-p
Xoption.
X.TP
X.B \-v
XIncrement verbose level by one.
XThis normally results in more output during operation.
XSee also in the description for the
X.I \-t
Xflag.
XNormally, 
X.B star
Xdoes its work silently.
XIf the verbose level is 2 or more and
X.B star
Xis in create or update mode, 
X.B star
Xwill produce a listing to the format of the ls \-l output.
X.TP
X.BR \-V ", " \-not
XInvert the meaning of the pattern list. i.e. use those files which do not match
Xany of the pattern.
XNote that this option only applies to patterns that have been specified
Xvia the
X.BR pattern= "pattern or " pat= pattern
Xoption. Patterns specified as file type arguments will not be affected.
X.TP
X.B \-version
XPrint version information and exit.
X.TP
X.BR VOLHDR= name
XUse
X.I name
Xto generate a volume header.
X.TP
X.B \-w
XDo interactive creation, extraction or renaming. 
XFor every file that matches the list of patterns and that has a more 
Xrecent modification time in the
X.B tar
Xarchive (if in extract mode and
Xthe \-U option is not specified) 
X.B star 
Xprints its name and asks:
X.RS
X.IP
X.B
Xget/put ? Y(es)/N(o)/C(hange name) :
X.PP
XYou may answer either `N' for No or <Return> to skip this file.
XIf you answer `Y' the file is extracted or archived on tape with its 
Xoriginal name.
XIf you answer `C', you are prompted for a new name. This name is used 
Xfor the filename on disk if 
X.B star 
Xis in extract mode or for the archive name if 
X.B star 
Xis in create mode.
X.RE
X.sp
XSee SECURITY NOTES for more information.
X.sp
XNote that
X.B \-w
Xis an interactive option that prevents
X.B star
Xfrom being used in non-interactive environments.
X.TP
X.B \-wready
XThis option tells
X.B Star 
Xto wait up to two minutes for the drive to become ready.
XIt has been added as a hack for a bug in the SunOS/Solaris
X.I st
Xdevice driver. This driver has problems to sense the loading time 
Xwith Exabyte drives with factory settings.
XIt also makes sense to use 
X.B \-wready
Xif multiple remote backups are made. In this case, the remote connection
Xis closed while the remote tape server is still writing a file mark.
XIf another remote backup is initiated before the old remote server did
Xfinish to write the file mark, it would be impossible to open the
Xtape driver unless
X.B \-wready
Xis specified to tell
X.B star
Xto wait for the drive to become ready again.
X.TP
X.B \-wtardumps
XTell 
X.B star
Xto update the file that contains the tar dump dates data base if in dump mode.
XIf the dump is not a
X.BR "full dump" ,
Xthe tar dump dates data base file is not written.
XSee also
X.BI tardumps= name
Xand
X.B \-C
Xoption or
X.B "INCREMENTAL BACKUPS
Xsection for more information.
X.TP
X.BI \-X " filename
XUse the file
X.I filename
Xas a file containing a list of path names to be excluded from the 
Xstore/create/list/diff operation.
XThe file
X.I filename
Xmust contain a list of path names, each on a separate line.
XBe careful with white space and note that path names in the list may not
Xcontain new lines.
XMultiple 
X.B \-X
Xoptions may be used. Each argument must refer to a file containing path names.
XThe 
X.B \-X
Xoption has precedence before other options that select files to be included
Xin the operation.
XSee also
X.B list=
Xoption.
X.TP
X.B \-xattr
X.TP
X.B \-xattr\-linux
XStore and extract extended file attributes as found on Linux systems.
XThis option only makes sense when creating or extracting 
X.B exustar
Xarchives as it is based on POSIX.1\-2001 extended tar headers.
X.sp
XThe method used in the current implementation could be used to store and extract
Xextended file attributes from BSD too.
XNote that the current implementation is not generic enough to cover more general
Xextended file attribute implementations as found on Solaris.
XIf
X.B star
Xstarts to implement a method that covers extended file attributes on Solaris,
Xthe new method will be used then
X.B \-xattr
Xhas been specified and
X.B \-xattr\-linux
Xwill refer to the old method.
XThe method used with
X.B \-xattr\-linux
Xmay go away in the future.
X.TP
X.BI xdebug= "#, " xd= #
XSet extended debug level to #.
X.TP
X.BR \-xdev ", " \-M
XDo not descend mount points.
XThis is useful when doing backups of complete file systems.
XSee NOTES for more information.
X.TP
X.B \-xdir
XExtract directories even if the corresponding directories on the
Xarchive are not newer.
XThis is useful when for some reason, the directories are recorded
Xafter their content (see
X.B \-dirmode
Xoption), or when the permissions of some directories
Xmust be set in any case.
XAs the classical UNIX
X.B cpio
Xprogram does not implement delayed directory permission and time stamp setting,
X.B cpio
Xusers often create archives in reverse order (directories past their
Xcontent). For this reason, it makes sense
Xto use
X.B \-xdir
Xwhile extracting
X.B cpio
Xarchives.
X.TP
X.B \-xdot
XUnconditionally extract the first directory in the archive if the name of this
Xdirectory is either '.' or './'.
XThis helps to extract archives in an expected way if the target directory is
Xa newly created empty directory. As this directory is newer than the top level
Xdirectory in the archive,
X.B star
Xwould usually skip this directory during extraction.
XThe effect of this directory is as if
X.B \-xdir
Xhas been specified but is switched off after the first directory has been found.
X.TP
X.B \-xfflags
XStore and extract extended file flags as found on BSD and Linux systems.
XThis option only makes sense when creating or extracting 
X.B exustar
Xarchives as it is based on POSIX.1\-2001 extended tar headers.
XSee NOTES section for problems with 
X.B \-xfflags
Xon Linux systems.
X.TP
X.B \-xmeta
XExtract 
X.B "meta files
Xas if they were files.
X.B "Meta files
Xin archives are plain files that do not contain any content data in the archive.
XThey may be created by using the
X.B \-meta
Xoption in
X.B star's 
Xcreate mode.
XExisting files are not overwritten. If a file is missing, a zero sized
Xfile is created.
XIf the option
X.B \-meta
Xis used together with the option
X.BR \-force\-hole ,
Xmissing plain files are created as sparse empty files of the original size.
X.TP
X.B \-xz
Xrun the input or output through a
X.B xz
Xpipe - see option
X.B \-z
Xbelow.
X.TP
X.B \-Z
Xrun the input or output through a 
X.B compress
Xpipe - see option 
X.B \-z 
Xbelow.
X.TP
X.B \-z
Xrun the input or output through a 
X.B gzip
Xpipe.
XThis is currently a quick and dirty hack, that mainly will cover
Xthe most common usage to compress the
X.B tar
Xoutput if it is a file.
XNo reblocking will be done, so this option will currently only make sense
Xon plain files.
XAs the
X.B \-bz
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-z
Xoption are non standard, it makes sense to omit the
X.B \-bz
Xthe
X.B \-j
Xthe
X.B \-Z
Xand the
X.B \-z
Xoptions inside shell scripts if you are going to extract a compressed
Xarchive that is located inside a plain file as
X.B star
Xwill auto detect compression and choose the right decompression
Xoption to extract.
XThe environment variable
X.B STAR_COMPRESS_FLAG
Xmay be used to specify one option for gzip.
XIf you want to write write compressed archives to tape, you should use
X.br
X.I "star \-c . | gzip | sdd ibs=4k obs=32k \-fill of=/dev/rmt/1bn
X.br
Xor
X.br
X.I "star \-c . | gzip | sdd ibs=4k obs=32k \-fill ovsize=60m of=/dev/rmt/1bn
X.br
Xif the tape can hold 60 MB.
X.SH "INCREMENTAL BACKUPS
X.PP
X.B Star
Xis able to back up file system in full and incremental mode.
XTo allow incremental backups, the file system must implement
XPOSIX semantics.
X.PP
XTo be more verbose:
X.TP
X.B \(bu
XThe filesystem needs to uniquely identify files by the two numbers
X.B st_dev
X(The device ID of the device containing the file) and
X.B st_ino
X(The file serial number).
XIf a file is renamed, these numbers need to be retained.
XBoth numbers need to be a cardinal
Xscalar that is expressible in a decimal number.
X.TP
X.B \(bu
XThe filesystem needs to implement at least two time stamps,
X.B st_mtime
Xthe file's last modification time and
X.B st_ctime
Xthe file's last status change time.
XBoth time stamps need to be dealt with as documented by
Xthe POSIX standard.
XBoth numbers need to be a cardinal
Xscalar that is expressible in a decimal number.
X.TP
X.B \(bu
XThe filesystem needs to allow to rename files
Xand directories by either calling
X.BR rename(2),
Xor
X.BR link(2)
Xand
X.BR unlink(2).
X.TP
X.B \(bu
XThe filesystem needs to honor and preserve the case of file names.
X.PP
XThe incremental backup method used by
X.B star
Xdepends on comparing the time stamps of all files against
Xthe time of the last backup. Note that this method only works
Xcorrectly if the level 0 backup and all higher level 
Xincrementals include the whole file system.
XAs 
X.B star
Xarchives all inode meta data,
X.B star
Xis able to detect renamed files by comparing the
X.B "inode numbers"
Xof all files while in incremental restore mode.
X.PP
XDetecting renamed files only works if 
X.BR star ,
Xwhile in backup mode,
Xscans the whole file system tree for each full and incremental backup.
XThis will work in case no files are excluded and the dump starts
Xat the root directory of a file system.
XIn case that no files are renamed from excluded parts to included parts,
Xpartial backups may be taken also. Partial backups only make sense if
Xa complete directory sub tree is excluded (e.g. by using the
X.B pat=
Xoption) or if a partial backup starts at a sub directory that is not the
Xroot directory of the file system.
X.PP
XTo create a level 0 dump call:
X.PP
X.B "star \-c \-xdev \-sparse \-acl \-link\-dirs level=0 \-wtardumps \e
X.br
X.B "\ \ \ \ f=\fIarchive-name\fP \-C /\fIfilestem-mount-point\fP .
X.PP
XTo create a level 1 dump call:
X.PP
X.B "star \-c \-xdev \-sparse \-acl \-link\-dirs level=1 \-wtardumps \e
X.br
X.B "\ \ \ \ f=\fIarchive-name\fP -C /\fIfilestem-mount-point\fP .
X.PP
XDo not forget the dot at the end of the command line that specifies the
Xdirectory to start the operation.
X.PP
XBackups from live filesystems should be avoided.
XOn operating systems that support 
X.BR "file system snapshots" ,
Xbackups should be made from a read-only mount of a
Xsnapshot. Be careful that all files that have been
Xcreated between setting up a snapshot and starting an
Xincremental backup may be missing from all backups unless the
X.BI dumpdate= name
Xoption is used.
X.PP
XIf the system that is going to be backed up is not
Xacting as a file server, it makes sense to shut down
Xall services that may result in inconsistent file states
Xbefore setting up the filesystem snapshot. After the
Xfilesystem snapshot has been set up, the services may be 
Xrestarted.
X.PP
XIf the the system that is going to be backed up is
Xacting as a file server, it may be that services
Xon remote clients cause inconsistent file states
Xunless all such services that remotely access files
Xare shut down before the snapshot is set up.
X.PP
X.B Star
Xincludes options that help to deal with 
X.BR "file system snapshots" .
XThe following example backs up a file system on Solaris using a
Xfile system snapshot:
X.PP
X.B "echo > /tmp/snapstamp"
X.sp
X.B "mount -r `fssnap -F ufs -o \e
X.br
X.B "\ \ \ \ backing-store=/var/tmp/EXPORT-NFS.snap /export/nfs` /mnt
X.sp
X.B "star \-c \-xdev \-sparse \-acl \-link\-dirs level=0 \-wtardumps \e
X.br
X.B "\ \ \ \ f=\fIarchive-name\fP dumpdate=/tmp/snapstamp \e
X.br
X.B "\ \ \ \ fs-name=/export/nfs \-C /mnt .
X.PP
XFirst a file with a current time stamp is created, then a snapshot for
X/export/nfs is created and mounted on /mnt.
XThe following 
X.B star
Xcommand then creates a level 0 backup from the file system using the
Xtime the snapshot was created and the original mount point of the 
Xfile system for /etc/tardumps and the archive header.
X.PP
XNote that if the backup is done on a live file system, it may be
Xunreliable. A typical problem problem in this context is caused
Xby growing log files.
XAs growing files are not a real problem with backups, the best way
Xof dealing with growing files is to set up a 
X.B star
Xerror control file (see
X.B errctl=
Xoption) and to tell
X.B star 
Xto ignore growing files.
X.SH "BACKUP SCHEDULES
XFull (level 0) dumps should be made on a regular base
X(e.g. once a month).
XAs a full dump may take a long time and takes a lot of tape,
Xit is wise to make higher level incremental dumps with shorter intervals.
XThe next table shows a dump level list that may be used if
Xmonthly full dumps take place:
X.PP
X.RS
X.nf
X.ta 12n 18n 24n 30n 36n 42n 48n
X	\f2Sun 	Mon	Tue	Wed	Thu	Fri\fP
X\f2Week 1:\f3	0	10	10	10	10	5
X\f2Week 2:\f3	10	10	10	10	10	5
X\f2Week 3:\f3	10	10	10	10	10	5
X\f2Week 4:\f3	10	10	10	10	10	5
X\f1
X.fi
X.RE
X.DT
X.PP
XThe level 10 dumps made between Monday and Friday accumulate all
Xchanges made within the week. If you don't like this, use the following
Xbackup schedule:
X.PP
X.RS
X.nf
X.ta 12n 18n 24n 30n 36n 42n 48n
X	\f2Sun 	Mon	Tue	Wed	Thu	Fri\fP
X\f2Week 1:\f3	0	20	30	40	50	5
X\f2Week 2:\f3	10	20	30	40	50	5
X\f2Week 3:\f3	10	20	30	40	50	5
X\f2Week 4:\f3	10	20	30	40	50	5
X\f1
X.fi
X.RE
X.DT
X.PP
XNote that in this case, 7 dumps need to be restored if the
Xa crash happens at the worst case date (just before the Friday dump
Xin week 2 or later).
X
X.SH "INCREMENTAL RESTORES
XIncremental restores should be made to an empty file system (except
Xfor the 
X.B lost+found
Xdirectory).
X.B Star
Xis currently unable to perform incremental restores to a
Xfile system that contains active mount points.
X.PP
XThe incremental restore procedure starts with restoring the last
Xfull (level 0) dump. Then the latest incremental dump of each
Xdump level (with ascending order of dump levels) need to be restored.
X.PP
XLet us assume the first example from the section 
X.B "BACKUP SCHEDULES
Xfor the backup schedule. If a disk
Xcrash happens before the Thursday dump of week 3 has been made,
Xthe following restore procedure needs to be applied:
X.TP
X.B level 0
Xstarting with an empty disk, the full (level 0) dump from week 1
Xis restored.
X.TP
X.B level 5
Xafter the level 0 restore has been finished, the level 5 dump from
XFriday in week 2 is restored.
X.TP
X.B level 10
Xafter the level 5 restore has been finished, the level 10 dump from
XWednesday in week 3 is restored.
X.PP
XThe disk now contains the same files as it did when the level 10
Xdump has been made on Wednesday of week 3.
X.PP
XTo extract a level 0 dump call:
X.PP
X.B "cd /\fIfilestem-mount-point\fP
X.br
X.B "star \-xpU \-restore f=\fIarchive-name\fP
X.PP
XThis creates the directory 
X.B star-tmpdir
Xand the database
X.B star-symtable
Xin the root directory of the new file system. 
XSubsequent restores with higher level backups
Xdepend on these files.
X.PP
XTo extract a level 1 (or higher) dump call:
X.PP
X.B "cd /\fIfilestem-mount-point\fP
X.br
X.B "star \-xpU \-restore f=\fIarchive-name\fP
X.PP
XNote that the environment variable
X.B STAR_DEBUG
Xexists,
X.B star
Xdoes not remove files with link count 1 that have been
Xremoved between incremental dumps. These files are moved to the
Xdirectory
X.BR star-tmpdir .
XBefore you start to extract the next
Xincremental, you need to remove all files in 
X.BR star-tmpdir .
X
X.SH "SYNCHRONIZING FILESYSTEMS
X.PP
X.B Star
Xmay be used to synchronize filesystem content.
XTo do this, an initial copy of the current content of the source
Xfilesystem needs to be performed first.
X.PP
XTo create an initial copy of a filesystem call:
X.PP
X.B "star \-c \-xdev \-sparse \-acl \-link\-dirs level=0 \-wtardumps \e
X.br
X.B "\ \ \ \ \-C /\fIfilestem-mount-point\fP . | \e
X.br
X.B "\ \ \ \ star \-xpU \-restore -C /\fIextract-target-dir\fP 
X.PP
XIn order to perform subsequent synchronization of the target filesystem
Xwith the content of the source filesystem, a modified incremental dump/restore
Xprocedure may be used.
X.PP
XTo copy incremental content of a filesystem call:
X.PP
X.B "star \-c \-xdev \-sparse \-acl \-link\-dirs level=1 \-wtardumps \e
X.br
X.B "\ \ \ \ \-cumulative \-C /\fIfilestem-mount-point\fP . | \e
X.br
X.B "\ \ \ \ star \-xpU \-restore -C /\fIextract-target-dir\fP 
X.PP
XNote that like with backups in general,
Xcopies from a live filesystem should be avoided.
XOn operating systems that support 
X.BR "file system snapshots" ,
Xcopies should be made from a read-only mount of a
Xsnapshot. Be careful that all files that have been
Xcreated between setting up a snapshot and starting an
Xincremental copy may be missing from all copies unless the
X.BI dumpdate= name
Xoption is used.
X.PP
XSee section
X.B "INCREMENTAL BACKUPS
Xto learn how to modify the command line in case 
X.B "file system snapshots"
Xare used.
X.SH SIGNALS
X.PP
XIf 
X.B star 
Xhandles a signal, it first prints the statistics. 
X.B Star 
Xhandles the following signals:
X.TP 10
X.B SIGINT
Xusually generated by ^C from the controlling tty. 
XUpon receipt of a SIGINT, 
X.B star 
Xprints statistics and exits. 
XIf in create mode i.e. storing files to archive, 
X.B star 
Xfinishes with the current file to ensure that no 
Xpartial file is written to the archive, write an eof record and then exits.
X.TP 10
X.B SIGHUP
Xnot to be generated from a tty. The actions are the same as upon receipt 
Xof a SIGINT.
X.TP 10
X.B SIGQUIT
Xusually generated by ^\\ from the controlling tty.
XUpon receipt of a SIGQUIT, 
X.B star 
Xprints statistics and continues with the current operation. This is 
Xuseful to watch the progress of the current operation.
X.SH "EXIT STATUS
XThe following exit values are returned:
X.TP
X.B 0
XAll files were processed successfully.
X.TP
X.B -3 / 253
X.B Star
Xhas been called with the option
X.BR \-e ,
Xor the
X.B errctl=
Xoption has been used to mark the current error fatal.
X.TP
X.B -2 / 254
XOne or more files could not be processed successfully.
X.TP
X.B -1 / 255
XCommand line parsing error.
X.TP
X.B >0
XOther positive exit codes: The
X.B errno
Xof the call that caused the fatal error.
X.SH EXAMPLES
X.PP
XTo get a listing in a way similar to ls \-l one might use:
X.IP
X.B
Xexample% star \-tv f=/dev/rmt/1bn
X.PP
XThe same command as listed above in a 
X.B "POSIX tar
Xcommand line syntax compliant way is:
X.IP
X.B
Xexample% star tvf /dev/rmt/1mbn
X.PP
XTo copy the directory tree in
X.I /home/someuser
Xto the directory
X.I /home/fs
Xuse:
X.IP
X.nf
X.B 
Xexample% (cd /home/someuser; star \-c .) | (cd /home/fs ; star \-xp)
X.fi
X.PP
Xor by using the change directory option of 
X.BR star :
X.IP
X.B
X.nf
Xexample% star \-c \-C /home/someuser . | star \-xp \-C /home/fs
X.fi
X.PP
XNote that both examples above are not the optimum way to copy a
Xdirectory tree. A more efficient way to copy a directory tree
Xis to use the
X.B \-copy
Xoption.
X.IP
X.nf
X.B
Xexample% star \-copy \-p \-xdot \-C /home/someuser . /home/fs
X.fi
X.PP
XTo copy a file tree including the 
X.B "Access Control List
Xentries for all files and to correctly copy sparse (holey) files use:
X.IP
X.B
X.nf
Xexample% star \-copy \-p \-xdot \-acl \-sparse \-C /home/someuser . /home/fs
X.fi
X.PP
XTo compare the content of a tape to the filesystem one might use:
X.IP
X.B
Xexample% star \-diff \-v f=/dev/rmt/1bn
X.PP
XTo compare two directory trees one might use:
X.IP
X.B
X.nf
Xexample% star \-c . | star \-C todir \-diff \-v diffopts=!times
X.fi
X.PP
Xor better by using a method similar to the
X.B \-copy
Xmethod above:
X.IP
X.B
X.nf
Xexample% star \-c \-diff \-v diffopts=!times \-C fromdir . todir
X.fi
X.PP
XTo compare all properties of two file trees, use:
X.IP
X.B
X.nf
Xexample% star \-c \-diff \-vv \-dump \-acl \-sparse \-C fromdir . todir
X.fi
X.PP
XTo extract a backup of the /usr tree without all files residing below 
X/usr/openwin one might use:
X.IP
X.B 
Xexample% star \-xp \-V pat=openwin/\\* f=/dev/rmt/1bn
X.PP
XTo extract all 
X.I .c 
Xfiles to 
X.BR src ,
Xall 
X.I .o 
Xfiles to 
X.B obj 
Xand all other files to /tmp one might use:
X.IP
X.B 
X.nf
Xexample% star \-xp \-C src '*.c' \-C obj '*.o' \-C /tmp '*' f=/dev/rmt/1bn
X.fi
X.PP
XTo extract files from a zipped
X.B tar
Xarchive that is located on a read only filesystem
Xe.g. a CD while having the shell's working directory on the CD one might use:
X.IP
X.B 
Xexample% star \-zxp \-C /tmp f=star\-1.1.tar.gz
X.PP
Xto extract the files from the
X.B tar
Xarchive to the /tmp directory.
X.PP
XTo backup a list of files generated by the 
X.BR find (1) 
Xcommand:
X.IP
X.B 
X.nf
Xexample% find . \fIfind_options\fP \-print | star \-c list=\- f=/dev/rmt/1bn
X.fi
X.PP
XNote that this does not work if the file names from output of the
X.B find 
Xcommand include new line characters.
X.PP
XTo extract a
X.I tarfile
Xthat contains a
X.I tarfile
Xone might use:
X.IP
X.B
X.nf
Xexample% star \-x \-to\-stdout f=/dev/rmt/1bn pat=\fIpat\fP | star \-xp
X.fi
X.PP
X.I Pat, 
Xin this case should match the
X.I tarfile
Xin the
X.I tarfile
Xon tape that 
Xshould be extracted.
X.PP
XTo make a backup of the root filesystem to a tape drive connected to a 
Xremote machine, one might use:
X.IP
X.B
Xexample# cd /
X.br
X.B
X.nf
Xexample# star \-cM fs=128m bs=63k f=tape@remotehost:/dev/rmt/1bn .
X.fi
X.PP
XYou need a line in /etc/passwd like the following to enable this:
X.IP
X.B
Xtape:NP:60001:60001:Tape:/etc/tapehome:/opt/schily/sbin/rmt
X.PP
XAnd a .rhosts file in /etc/tapehome to allow remote connections from 
Xthe appropriate hosts.
XMake sure that the file /etc/default/rmt exists and allows remote access
Xto the requested tape drive.
X.PP
XTo use a 
X.B ssh(1)
Xconnection for a backup to a remote tape server, one might use:
X.IP
X.B
Xexample# env RSH=/usr/bin/ssh star \-cM fs=128m bs=63k f=tape@remotehost:/dev/rmt/1bn .
X
X.PP
XTo repair a corrupted filesystem for which no recent backup exists, 
Xdo the following:
X.IP
X.B
Xexample# fsck \-y /filesys
X.br
X.B
Xexample# mount /filesys
X.br
X.B
Xexample# cd /filesys
X.br
X.B
Xexample# star \-xpk f=/dev/rmt/1bn
X.br
X.B
Xexample# mt \-f /dev/rmt/1bn rewind
X.br
X.B
Xexample# star \-diff \-v diffopts=!times f=/dev/rmt/1bn
X.PP
XNow check the differences and decide whether to restore additional 
Xfiles. This may be done by generating a list containing the needed 
Xfilenames and using the list= option or by using the interactive mode 
X(see \-w option).
X.PP
XIf you want a list that only contains all filenames from files with
Xdifferences you may use:
X.IP
X.B
Xexample# star \-diff \-tpath diffopts=!times f=/dev/rmt/1bn
X.PP
XIf you are looking for files that changed the type or the access permission
Xbecause this is a common case on still corrupted files, use:
X.IP
X.B
Xexample# star \-diff \-tpath diffopts=type,perm f=/dev/rmt/1bn
X.PP
XIf you like to archive all directories only that are part of the directory
Xtree under ".", use:
X.IP
X.B
Xexample# star \-c f=\fIarchive-name\fP \-find . \-type d
X.PP
XIf you like to archive all files as owner root and group root and
Xmake all files world readable in the archive, use:
X.IP
X.B
Xexample# star \-c f=\fIarchive-name\fP \-find . \-chown root \-chgrp root \-chmod o+r
X.PP
XIf you like to list all files in an archive in a way like
X.BR sfind (1),
Xinstead of the way used by star, use:
X.IP
X.B
Xexample# star \-t f=\fIarchive-name\fP \-find . \-ls \-false
X
X.SH ENVIRONMENT
X.TP
X.B STAR_COMPRESS_FLAG
XIf you like
X.B star
Xto always create compressed files that use maximum compression, you may set
Xthe environment variable
X.B STAR_COMPRESS_FLAG
Xto \-9.
X.TP
X.B STAR_DEBUG
XIf this environment variable is present,
X.B star
Xwill not remove temporary files from
X.BR ./star-tmpdir . 
XThe files in this directory are files that have been removed by users
Xbefore the last incremental dump did take place on the master filesystem.
X.TP
X.B STAR_FIFOSIZE
XIf you like to by default let 
X.B star
Xuse a different fifo size, set this environment variable to the desired size.
X.TP
X.B TAPE
XUnlike other
X.BR tar (1)
Ximplementations, 
X.B star
Xdefaults to use stdin/stdout for the archive.
XIf you like 
X.B star
Xto use the file name from the
X.B TAPE
Xenvironment instead, you need to specify the
X.B \-T
Xoption too.
X.TP
X.B RSH
XIf the 
X.B RSH
Xenvironment is present, the remote connection will not be created via
X.BR rcmd (3)
Xbut by calling the program pointed to by
X.BR RSH .
XUse e.g. 
X.BR RSH= /usr/bin/ssh
Xto create a secure shell connection.
X.sp
XNote that this forces 
X.B star
Xto create a pipe to the 
X.B rsh(1)
Xprogram and disallows
X.B star
Xto directly access the network socket to the remote server.
XThis makes it impossible to set up performance parameters and slows down
Xthe connection compared to a 
X.B root
Xinitiated
X.B rcmd(3)
Xconnection.
X.sp
XSee BUGS section for more information.
X.TP
X.B RMT
XIf the 
X.B RMT
Xenvironment is present, the remote tape server will not be the program
X.B /etc/rmt
Xbut the program pointed to by
X.BR RMT .
XNote that the remote tape server program name will be ignored if you log in
Xusing an account that has been created with a remote tape server program as
Xlogin shell.
X.SH FILES
X.TP
X.B "/etc/default/star
XDefault values can be set for the following options in /etc/default/star.
XFor example:
X.SM CDR_FIFOSIZE=64m
X.RS
X.TP
X.B STAR_FIFOSIZE
XSets the default size of the FIFO (see also 
X.BR fs= #
Xoption).
X.TP
X.B STAR_FIFOSIZE_MAX
XSets the maximum size of the FIFO (see also 
X.BR fs= #
Xoption).
XSetting 
X.B STAR_FIFOSIZE_MAX
Xin
X.B "/etc/default/star
Xallows to overwrite global values from backup scripts for machines
Xwith less memory.
X.TP
X.B archive0=
X.TP
X.B archive1=
X.TP
X.B archive2=
X.TP
X.B archive3=
X.TP
X.B archive4=
X.TP
X.B archive5=
X.TP
X.B archive6=
X.TP
X.B archive7=
XArchive entries for the 
X.B \-[0..7]
Xoption.
X.sp
XA correct 
X.B archive?=
Xline has 3..4 space separated entries.
XThe first is the device entry (e.g. 
X.IR archive0=/dev/tape ).
XThe second is the blocking factor in 512 byte units.
XThe third is the maximum media size in 1024 byte units.
XIf this entry contains a 0, then the media size is unlimited.
XThe fourth entry is optional. If it contains a 'n' or a 'N',
Xthen the archive device is not a tape.
X.sp
XExamples:
X.sp
Xarchive0=/dev/tape 512 0 y
X.br
Xarchive1=/dev/fd0 1 1440 n
X.br
Xarchive2=/dev/rmt/0mbn 512 0
X.sp
XIf the default file does not need to be shared with the tar program from
XSolaris, any number may be used like a generic size option like bs=.
X.sp
XExample:
X.sp
Xarchive0=/dev/tape 256k 40G y
X.RE
X.TP
X.B "/etc/tardumps
XThe default name for the dump level archive. The default name is used 
Xwhenever the
X.BI tardumps= name
Xoption has not been specified.
XThe file is written or updated when
X.B \-wtardumps
Xis used.
X.sp
XThe file holds one or more lines, each specifying a dump level entry.
XEach dump level entry starts with a mount point name followed by a
XTAB and one or more spaces, followed by the decimal dump level, a space and
Xthe dump time.
X.sp
XIf the dump level is directly followed by a 'P', then the dump refers to
Xa partial dump (a dump that does not include the whole filesystem).
X.sp
XThe dump time itself includes the decimal representation of the UTC seconds
Xsince Jan 01 1970, a space and the textual local time representation of the
Xdump time.
X.sp
XThe numerical decimal dump time representation may be followed by a dot and
Xa sub second value.
XThe textual local time representation is for informational use by humans only
Xand not evaluated by
X.BR star .
X.TP
X.B ./star-symtable
XContains a database that is needed in incremental restore mode.
X.TP
X.B ./star-symdump
XContains an intermediate dump of restore database after a fatal error
Xcondition was met during an incremental restore operation.
X.TP
X.B ./star-tmpdir
XIs the temporary directory that is used as intermediate file storage by
X.B star
Xif in incremental restore mode.
X.TP
X.B ./star-lock
XIs a lock file created by star when doing an incremental restore.
XIf this file is present, it prevents
X.B star
Xfrom running another incremental restore operation. This helps to
Xavoid more than one restore operation at a time (e.g. from a
Xcron script).
X.TP
X.B "/dev/tty
XIs used for the intercative user interface.
X.SH "SEE ALSO"
X.BR spax (1), 
X.BR suntar (1), 
X.BR scpio (1), 
X.BR tar (1), 
X.BR cpio (1), 
X.BR pax (1), 
X.BR rcp (1), 
X.BR mt (1),
X.BR rmt (1), 
X.BR match (1), 
X.BR dd (1), 
X.BR sdd (1), 
X.BR rsh (1),
X.BR ssh (1),
X.BR star (4/5),
X.BR rcmd (3),
X.BR fssnap (1m)
X.SH DIAGNOSTICS
Xstar: f records + p bytes (total of x bytes = d.nnk).
X.PP
XThe number of full records, the number of bytes in partial records
Xand the total amount of data in KBytes.
X.PP
Xstar: Total time x.yyysec (z kBytes/sec)
X.PP
XThe time used and the transfer speed from/to the archive.
X.PP
XIf there have been non fatal errors during the archive processing,
X.B star
Xwill display a delayed error summary before exiting.
X
X.SH NOTES
X.PP
XThe command line syntax for the tar command (as defined in SUSv2 - UNIX-98)
Xdeviates from the command line syntax defined for all other commands. While the 
X.B "POSIX command line syntax
Xrequests
Xall options to start with a dash (\-) and allows to either write options separately
Xor combined (in case of boolean flags), the
X.B tar
Xcommand line syntax
Xrequires all options to be combined into a single string that does not start with
Xa dash.
X.B Star
Xby default assumes a command line syntax like a typical POSIX command and includes
Xa compatibility mode that allows to specify a command line syntax as documented
Xfor the 
X.B UNIX-98 tar
Xcommand.
XIf you believe that you found a bug in the way 
X.B star
Xparses the command line, please first check your command line for correctness before
Xyou make a bug report for
X.BR star .
X.PP
XIf you like to write portable shell scripts that call tar, use the 
X.B UNIX-98 tar
Xcommand line syntax (i.e. a single option string and no dash), choose the
Xcommands and options from the following set of characters (
X.I "rxtuc vxfblmo"
X) and check the shell script with both, your local tar and
X.B star
Xfor correct behavior. It you expect the script to call gnutar, do not include
Xthe
X.B \-o
Xoption as gnutar implements this option in a way that violates UNIX-98.
X.PP
X.B Star 
Xstrips leading ./ sequences from pathnames. This lets 
X.B star 
Xin many cases store longer pathnames than other implementations.
X.PP
XThe POSIX.1\-1988 method (ustar format) of storing files with pathnames that are 
Xlonger than 100 chars has some limitations:
X.IP
XThe name field (100 chars) an inserted slash (`/') 
Xand the prefix field (155 chars) produce 
Xthe pathname of the file. When recreating the original filename, 
Xname and prefix are concatenated, using 
Xa slash character in the middle. If a pathname does not fit in the 
Xspace provided or may not be split at a slash character so that the 
Xparts will fit into 100 + 155 chars, the file may not be archived. 
XLinknames longer than 100 chars may not be archived too.
X.PP
XThe 
X.IR star ,
X.IR xstar ,
X.IR xustar ,
X.IR exustar ,
X.IR pax ,
Xand
X.I gnutar
Xarchive formats don't have these limitations. While gnutar uses a 
Xmethod that makes it impossible for other
X.B tar
Ximplementations (except 
X.BR star ) 
Xto restore filenames that are longer than 100 chars, the
X.IR xstar ,
X.IR xustar ,
X.IR exustar
Xand
X.I pax
Xarchive format uses a method that allows an POSIX.1\-1988 compliant way of 
Xstoring filenames, if the POSIX method would allow this.
XWhen the archive format is
X.IR xustar ,
X.IR exustar
Xor
X.I pax
Xvery long filenames are stored using extended headers from the POSIX.1\-2001 standard.
X.PP
XSome buggy
X.B tar
Ximplementations will generate incorrect filenames 
Xduring a restore operation if the archive contains pathnames or linknames of 
Xexactly 100 chars length.
X.PP
X.B Star
Xadds a 
X.I tar
Xsignature in the last four bytes of each
X.B tar
Xheader if the archive format is
X.I star
Xor
X.IR xstar .
XThis is no problem
Xwith the 
X.B star 
Xarchive format as it is an extension of the old pre POSIX.1\-1988 tar format.
XOn the other side, the 
X.B xstar
Xarchive format claims to be as POSIX.1\-1988 compliant as possible. 
XInserting this 
X.I tar 
Xsignature is a minor deviation from the standard that has the last 12 bytes
Xof each header reserved for future use. On the other side,
X.B tar
Ximplementations
Xsuch as some
X.B pax
Ximplementations that only compute checksums on the first 500 bytes of the header
Xare violating the standard that requests the checksum to be computed on all
X512 bytes of the tar header. All
X.B tar
Ximplementations that are 100% Posix
Xcompliant will be able to extract 
X.B xstar 
Xarchives as long as no new standard is defined that claims the last 12 bytes
Xof the header for a different use.
XBut then the 
X.B "ustar version
Xnumber should be changed from `00'
Xto `01'.
XNow, that the POSIX\-2001 standard has been accepted, it is even predictable
Xthat all extensions to the standard
X.B tar
Xformat will go into the POSIX.1\-2001 extended headers
Xwhich are extensible to include any feature without future limitation.
XThe only known
X.B tar
Ximplementation that also uses the last 12 bytes of the
X.B tar
Xheader is Sun's
X.B tar
Xwhich uses these 12 bytes for files that are split over
Xseveral archives. Such archives created by Sun's tar are not 
Xreadable by the buggy 
X.B pax
Ximplementation too. The Sun extension is not incompatible to the 
X.B star 
Xsignature because Sun expects an octal number at the beginning of the
X12 byte field which is a null character in the
X.B star
Xcase.
X.PP
X.B Star
Xuses these four bytes since 1985 without problems.
XIf you need a 100% POSIX.1\-1988 and 100% POSIX.1\-2001 compliant tar archive,
Xyou may use the
X.IR xustar ,
X.IR exustar
Xor the
X.I pax
Xarchive format.
XThe probability of falsely detecting other
X.B tar
Xformats as 
X.B xustar 
Xor
X.B exustar
Xformat however is higher.
X.PP
XThere is no way to ask for the 
X.IR n \-th
Xoccurrence of a file.
X.PP
XThe way EOF is handled by 
X.B star
Xdiffers, whether the fifo is in effect or not.
XIf the fifo is not used, 
X.B star 
Xstops reading the archive if it 
Xencounters a logical EOF record in the archive. 
XIf the fifo is used, 
X.B star 
Xmay read until the fifo is full or until the real EOF mark on tape is reached.
XHow much data 
X.B star actually reads depends on the time when the 
X.B star
Xforeground process sends a fifo shutdown signal to the background fifo read
Xprocess.
X.PP
XGnu tar often creates
X.B tar
Xarchives with incorrect logical EOF marks.
XThe standard requires two blocks that are completely zeroed, whereas gnutar
Xoften only adds one of them.
X.PP
XOld versions of
X.B tar
Xfound on SYSVr3 and earlier cannot read
X.B tar
Xarchives 
Xwith a blocksize greater than 10\ kBytes.
X.PP
XThe method of storing 
X.I sparse
Xfiles currently used with the 
X.I star
Xand
X.I xstar
Xformat is not guaranteed to be used in later versions of 
X.BR star .
XIf the author decides to change this method, later versions of 
X.B star 
Xmay not be able to restore sparse files from
X.B tar 
Xarchives made by the current version of 
X.BR star .
X.PP
XSome
X.B tar
Ximplementations violate the standard in using only the first 500 
XBytes of the header for checksum computation. These
X.B tar
Ximplementations 
Xwill not accept 
X.I star 
Xand 
X.I xstar
Xtype
X.B tar
Xarchives.
X.PP
XSun's Solaris 2.x
X.B tar
Ximplementation violates the Posix standard. Tar 
Xarchives generated by 
X.B star
Xcause Sun's
X.B tar
Xto print tar: impossible file type messages. You may 
Xignore these messages.
X.PP
XGnutar's dumpdirs are non standard and are currently not implemented.
X.PP
XIf gnutar archives sparse files with more than four holes, it produces 
Xarchives that violate the standard in a way that prevents other
X.B tar
Ximplementations to read these archives. 
X.B Star 
Xknows about that and is able to handle these gnutar archives.
X.PP
XThe filetype 
X.I N
X(LF_NAMES) from gnutar (an obsolete method of storing long names) will never be 
Ximplemented.
X.PP
XNote that on operating systems (like DOS) that do not implement real pipes,
X.B star
Ximplements compression via a temporary file.
XUsing compression thus is limited by the maximum file size and the available
Xdisk space.
X.PP
XThe extended file flags implementation (see
X.B \-xfflags
Xoption)
Xon Linux is buggy by design.
XIn order to retrieve the needed information, every file needs to be opened.
XIf the /dev directory is included in create mode, every possible driver will be
Xloaded which may hang the system for a long time. In the worst case, unwanted
Xside effects from opening devices (such as causing tape drives to rewind the media)
Xmay be caused.
X
X.SH "SECURITY NOTES
XIf you unpack a tar archive in a non empty directory, any file in that directory 
Xmay be overwritten unless you specify the 
X.B \-k
Xoption.
XIf the archive contains symbolic links or hard links, 
X.B star
Xmay even overwrite files outside the current directory.
XIf the directory where the archive is been unpacked is not empty and
Xcontains contains symbolic links or hard links to directories outside that
Xdirectory,
X.B star
Xmay also overwrite files outside the current directory.
XAs many other commands, 
X.B star
Xusually has all possible permissions when run as root.
XUnpacking archives as root thus may have fatal results to any file on your system.
XBe very careful when you try to extract an archive that has not been
Xcreated by you. It is possible to create hand crafted tar archives that may overwrite
Xcritical files (like /etc/passwd) on your system.
XIn addition all tar archives that have been created with the 
X.B list=
Xoption and tar archives where the
X.B C=
Xoption was not specified before all file type arguments may be critical.
X.PP
XA good advise is to extract all doubtful archives as non root in an empty
Xdirectory and to specify the 
X.B \-secure\-links
Xoption.
XIf you get a warning, you should unpack the archive a second time and specify the
Xoptions
X.BR \-k ", " \-w " and " \-nowarn
Xin addition to the options used for the first run.
X.SH SUID NOTES
XIf 
X.B star
Xis installed suid root, 
X.B star
Xis able to make connections to remote archives for non root users. 
XThis is done by using the
Xrcmd(3) interface to get a connection to a rmt(1) server.
X.PP
X.B Star
Xresets its effective uid back to the real user id immediately after setting up
Xthe remote connection to the rmt server and before opening any other file.
X.PP
XIf
X.B star 
Xhas not been installed suid root and not called by root, it will try to create
Xthe remote connection via
X.B rsh(1)
Xor
X.B ssh(1)
X(in case the environment
X.B RSH
Xhas been set to
X.BR ssh ).
XNote that in this case, the throughput to the remote tape server will be much
Xlower than with a connection that has been initiated via
X.BR rcmd(3) .
X.SH LIMITATIONS
XIf
X.B star
Xis running on a large file aware platform,
X.B star
Xis able to handle files up to 8 GB in a mode that is compliant to the POSIX.1\-1988
X.B ustar
Xformat. With a nonstandard 
X.B star
Xspecific extension, up to 95 bits may be used to code the filesize.
XThis will handle files up to 200,000,000 TB.
XWith the new POSIX.1\-2001 extended headers
Xused by the
X.IR xustar ,
X.I exustar
Xand
X.I pax
Xformat, any filesize may be archived.
X.SH BUGS
XThe fact that the 
X.B \-f
Xoption has to be implemented in a way that is compatible with old tar 
Ximplementations gives several problems.
XThe options
X.BR \-fifostats ,
X.BR \-force\-hole ,
X.B \-force\-remove
Xand
X.B \-fifo
Xinterfere with the
X.B \-f
Xoption and the fact that they exist prevents users from using filenames like
Xe.g.
X.B ifo
Xusing the traditional way where the filename directly follows the string
X.B \-f
Xwithout any space between the option name and the file name.
XHowever, there is no problem to use a file named
X.B ifo
Xby by calling 
X.BR "\-f ifo" ,
X.BR f=ifo ,
X.BR \-f=ifo
Xor
X.BR "\-f= ifo" .
XBe careful not to make typos with the above options. The result could be
Xthat a file is created as a result of the mistyped option.
X.PP
XThere is currently no way to set the fifo lowwater and highwater marks.
X.PP
XThere is currently no way to automatically delete files in the target file tree
Xif they are obsolete.
X.B Star 
Xshould implement something similar to gnutar's dumpdirs.
X.PP
XIf not invoked by the super user 
X.B star 
Xmay not be able to extract files 
Xif they reside in read only directories.
X.PP
X.B Star 
Xis not able to make a complete backup of a filesystem if files 
Xare hidden by a mount that is in effect on a directory of this 
Xfilesystem.
XThis may be avoided in case of the ufs filesystem 
Xif the backup is made off a ufs snapshot (see the man page for
X.BR fssnap (1m)
XIt could be avoided for any filesystem if the loopback filesystem had an 
Xoption that tells 
X.I lofs 
Xnot to traverse mountpoints.
X.PP
XFor now (late 2002), we know that the following programs
Xare broken and do not implement signal handling correctly:
X.TP
Xrsh
Xon SunOS-5.0...SunOS-5.9
X.TP
Xssh
Xfrom ssh.com
X.TP
Xssh
Xfrom openssh.org
X.LP
XSun already did accept a bug report for 
X.BR rsh (1) / ssh(1) . 
XOpenssh.org accepted and fixed
Xa bug for their implementation of 
X.BR ssh (1).
X.LP
XIf you use 
X.B star
Xto create a remote connection via an unfixed
X.BR rsh (1)
Xor 
X.BR ssh (1),
Xbe prepared that terminal generated signals may interrupt the
Xremote connection.
X
X.SH HISTORY
X.B Star
Xwas first created in 1982 to extract tapes on a UNIX clone that had no
X.B tar
Xcommand.
XIn 1985 the first fully functional version has been released as 
X.B mtar.
X.PP
XWhen the old 
X.B star 
Xformat extensions have been introduced in 1985, it was renamed to 
X.B star
X(Schily tar).
XIn 1994, Posix 1003.1\-1988 extensions were added and 
X.B star 
Xwas renamed to 
X.B star
X(Standard tar).
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xschilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu\-berlin.de
END-of-star-1.5.2/star/star.1
echo x - star-1.5.2/star/dumpdate.c
sed 's/^X//' >star-1.5.2/star/dumpdate.c << 'END-of-star-1.5.2/star/dumpdate.c'
X/* @(#)dumpdate.c	1.24 11/08/03 Copyright 2003-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)dumpdate.c	1.24 11/08/03 Copyright 2003-2011 J. Schilling";
X#endif
X/*
X *	Copyright (c) 2003-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/errno.h>
X#include <schily/utypes.h>
X#include <schily/standard.h>
X#include <schily/fcntl.h>
X#include <schily/schily.h>
X
X#include "dumpdate.h"
X#include "starsubs.h"
X
X#ifdef	HAVE_LARGEFILES
X/*
X * XXX Hack until fseeko()/ftello() are available everywhere or until
X * XXX we know a secure way to let autoconf ckeck for fseeko()/ftello()
X * XXX without defining FILE_OFFSETBITS to 64 in confdefs.h
X */
X#	define	fseek	fseeko
X#	define	ftell	ftello
X#endif
X
X#if	defined(HAVE_FLOCK) || defined(HAVE_LOCKF) || defined(HAVE_FCNTL_LOCKF)
X#	define	HAVE_LOCKING
X#endif
X
X#ifndef	HAVE_FLOCK
X#ifdef	HAVE_FCNTL_LOCKF
XLOCAL	struct flock	__fl;
X#define	flock(fd, flag)	(__fl.l_type = (flag), fcntl(fd, F_SETLKW, &__fl))
X/*
X * #undef before as AIX has left over junk from a no longer existing flock()
X */
X#undef	LOCK_EX
X#define	LOCK_EX	F_WRLCK
X#undef	LOCK_SH
X#define	LOCK_SH	F_RDLCK
X#undef	LOCK_UN
X#define	LOCK_UN	F_UNLCK
X#else
X#define	flock(fd, flag)	lockf(fd, flag, (off_t)0)
X#define	LOCK_EX	F_LOCK
X#define	LOCK_SH	F_LOCK
X#define	LOCK_UN	F_ULOCK
X#endif
X#endif	/* HAVE_FLOCK */
X
X#ifndef	HAVE_LOCKING
X#undef	flock
X#define	flock(fd, flag)	(0)
X#endif
X
XLOCAL	dumpd_t	*dumpdates;
XLOCAL	dumpd_t	**dumptail = &dumpdates;
X
XEXPORT	void	initdumpdates	__PR((char *fname, BOOL doupdate));
XLOCAL	void	readdumpdates	__PR((FILE *f, char *fname));
XEXPORT	void	writedumpdates	__PR((char *fname, const char *filesys,
X							int level, int dflags,
X							struct timeval *date));
XLOCAL	void	outentry	__PR((FILE *f, char *name, int level, int dflags,
X							struct timeval *date));
XEXPORT	char	*dumpdate	__PR((struct timeval *date));
XLOCAL	char	*skipwht	__PR((char *p));
XLOCAL	BOOL	getentry	__PR((char *line, char *fname));
XEXPORT	BOOL	getdumptime	__PR((char *p, struct timeval *tvp));
XEXPORT	dumpd_t *checkdumpdates	__PR((const char *name, int level, int dflags));
XLOCAL	dumpd_t *_checkdumpdates __PR((const char *name, int level, int dflags));
XEXPORT	void	adddumpdates	__PR((const char *name, int level, int dflags,
X							struct timeval *date,
X								BOOL useold));
XLOCAL	dumpd_t *newdumpdates	__PR((const char *name, int level, int dflags,
X							struct timeval *date));
XLOCAL	dumpd_t	*freedumpdates	__PR((dumpd_t *dp));
X
XEXPORT void
Xinitdumpdates(fname, doupdate)
X	char	*fname;
X	BOOL	doupdate;
X{
X	FILE	*f;
X
X	f = fileopen(fname, "r");
X	if (f == NULL) {
X		if (geterrno() == ENOENT) {
X			errmsg("Warning no %s.\n", fname);
X			return;
X		}
X		comerr("Cannot open %s.\n", fname);
X	}
X	if (doupdate && access(fname, W_OK) < 0)
X		comerr("Cannot access '%s' for update\n", fname);
X
X	(void) flock(fdown(f), LOCK_SH);
X	readdumpdates(f, fname);
X	(void) flock(fdown(f), LOCK_UN);
X	fclose(f);
X}
X
XLOCAL void
Xreaddumpdates(f, fname)
X	FILE	*f;
X	char	*fname;
X{
X	char	buf[4096];
X	int	line = 0;
X
X	while (fgetline(f, buf, sizeof (buf)) >= 0) {
X		line++;
X
X		if (!getentry(buf, fname)) {
X			if (*skipwht(buf) != '\0') {
X				errmsgno(EX_BAD,
X					"Unknown format in '%s' line %d\n",
X					fname, line);
X			}
X			continue;
X		}
X	}
X}
X
XEXPORT void
Xwritedumpdates(fname, filesys, level, dflags, date)
X	char		*fname;
X	const char	*filesys;
X	int		level;
X	int		dflags;
X	struct timeval	*date;
X{
X	FILE	*f;
X	dumpd_t	*dp;
X	off_t	fsize;
X	off_t	fpos;
X
X	f = fileopen(fname, "rwc");
X	if (f == NULL) {
X		errmsg("Cannot open '%s'.\n", fname);
X		return;
X	}
X	(void) flock(fdown(f), LOCK_EX);
X
X	for (dp = dumpdates; dp; dp = freedumpdates(dp))
X		;
X	dumpdates = NULL;
X	dumptail = &dumpdates;
X
X	readdumpdates(f, fname);
X	adddumpdates(filesys, level, dflags, date, TRUE); /* Upd. curr. entry */
X	fseek(f, 0L, SEEK_SET);
X
X	fsize = filesize(f);
X	for (dp = dumpdates; dp; dp = dp->next) {
X		outentry(f, dp->name, dp->level, dp->flags, &dp->date);
X	}
X	fflush(f);
X	fpos = filepos(f);
X#ifdef	HAVE_FTRUNCATE
X	if (fpos < fsize)
X		ftruncate(fdown(f), fpos);
X#else
X	while (fpos++ < fsize)
X		putc(' ', f);
X#endif
X
X	(void) flock(fdown(f), LOCK_UN);
X	fclose(f);
X	error("Dump record  level %d%s dump: %s written\n",
X			level, (dflags & DD_PARTIAL) ? "P":" ",
X			dumpdate(date));
X}
X
XLOCAL void
Xoutentry(f, name, level, dflags, date)
X	FILE		*f;
X	char		*name;
X	int		level;
X	int		dflags;
X	struct timeval	*date;
X{
X	int	len;
X	time_t	t = date->tv_sec; /* FreeBSD/MacOS X -> broken tv_sec/time_t */
X
X	len = strlen(name);
X	if ((len % 8) == 0)
X		len += 8;
X	len += 7;
X	len &= ~7;
X	len = 41 -len;
X	if (len < 1)
X		len = 1;
X
X	fprintf(f, "%s\t%*s%2d%s %10lld.%6.6lld %s",
X		name,
X		len,
X		"",
X		level,
X		(dflags & DD_PARTIAL) ? "P":"",
X		(Llong)date->tv_sec,
X		(Llong)date->tv_usec,
X		ctime(&t));
X}
X
XEXPORT char *
Xdumpdate(date)
X	struct timeval	*date;
X{
X	char	*p;
X	time_t	t = date->tv_sec; /* FreeBSD/MacOS X -> broken tv_sec/time_t */
X
X	if (date->tv_sec == 0)
X		return ("the epoch");
X	p = ctime(&t);
X	p[24] = '\0';
X	return (p);
X}
X
XLOCAL char *
Xskipwht(p)
X	char	*p;
X{
X	while (*p && (*p == ' ' || *p == '\t'))
X		p++;
X
X	return (p);
X}
X
XLOCAL BOOL
Xgetentry(line, fname)
X	char	*line;
X	char	*fname;
X{
X	char	*p;
X	int	level;
X	int	dflags = 0;
X	struct timeval	tdate;
X
X	p = line;
X	do {
X		p = strchr(++p, '\t');
X	} while (p && p[0] != '\0' && p[1] != ' ');
X
X	if (p == NULL || p[0] == '\0') {
X		errmsgno(EX_BAD, "Error parsing mount point in '%s'\n", fname);
X		return (FALSE);
X	}
X	*p++ = '\0';
X
X	p = skipwht(p);
X	p = astoi(p, &level);
X	if (*p == 'P') {
X		dflags |= DD_PARTIAL;
X		p++;
X	}
X	if (*p != ' ') {
X		errmsgno(EX_BAD, "Error parsing dump level in '%s'\n", fname);
X		return (FALSE);
X	}
X	p = skipwht(p);
X	if (!getdumptime(p, &tdate))
X		return (FALSE);
X	adddumpdates(line, level, dflags, &tdate, FALSE);
X
X	return (TRUE);
X}
X
XEXPORT BOOL
Xgetdumptime(p, tvp)
X	char		*p;
X	struct timeval	*tvp;
X{
X	Llong		date;
X	Llong		dfrac;
X
X	p = astollb(p, &date, 10);
X	if (*p == '.') {
X		int	l;
X		char	*s = ++p;
X
X		p = astollb(s, &dfrac, 10);
X		l = p - s;
X		if (l > 9) {		/* Number too big, limit to nsec */
X			char	*p2 = p;
X
X			l = s[9];
X			s[9] = '\0';
X			p = astollb(s, &dfrac, 10);
X			s[9] = l;
X			l = p - s;
X			p = p2;
X		}
X		while (l < 6) {		/* Convert to usecs */
X			dfrac  *= 10;
X			l++;
X		}
X		while (l > 6) {		/* Convert to usecs */
X			dfrac  /= 10;
X			l--;
X		}
X	}
X	if (*p != ' ' && *p != '\0') {
X		errmsgno(EX_BAD, "Error parsing dump date\n");
X		return (FALSE);
X	}
X	tvp->tv_sec = date;
X	tvp->tv_usec = dfrac;
X	return (TRUE);
X}
X
XEXPORT dumpd_t *
Xcheckdumpdates(name, level, dflags)
X	const char	*name;
X	int		level;
X	int		dflags;
X{
X	dumpd_t	*rp = NULL;
X	dumpd_t	*rp2 = NULL;
X
X	rp = _checkdumpdates(name, level, dflags & ~DD_CUMULATIVE);
X	rp2 = _checkdumpdates(name, level, dflags);
X
X	if (rp && rp2 && (rp2->date.tv_sec > rp->date.tv_sec))
X		return (rp2);
X	return (rp);
X}
X
XLOCAL dumpd_t *
X_checkdumpdates(name, level, dflags)
X	const char	*name;
X	int		level;
X	int		dflags;
X{
X	dumpd_t	*dp = dumpdates;
X	dumpd_t	*rp = NULL;
X
X	for (; dp; dp = dp->next) {
X		if (!streql(name, dp->name))
X			continue;
X		if ((dp->flags & DD_PARTIAL) != (dflags & DD_PARTIAL))
X			continue;
X		if ((dflags & DD_CUMULATIVE) && level == dp->level) {
X			rp = dp;
X			break;
X		}
X		/*
X		 * We are not interested in tardump entries for
X		 * this level or higher, so skip them.
X		 */
X		if (level <= dp->level)
X			continue;
X
X		/*
X		 * If we did already find a more recent entry in tardumps
X		 * we consider this one outdated.
X		 */
X		if (rp && rp->date.tv_sec > dp->date.tv_sec)
X			continue;
X		rp = dp;
X	}
X#ifdef	DEBUG
X	if (rp)
X		outentry(stderr, rp->name, rp->level, rp->flags, &rp->date);
X#endif
X	return (rp);
X}
X
XEXPORT void
Xadddumpdates(name, level, dflags, date, useold)
X	const char	*name;
X	int		level;
X	int		dflags;
X	struct timeval	*date;
X	BOOL		useold;
X{
X	dumpd_t	*dp = dumpdates;
X
X	for (; dp; dp = dp->next) {
X		if (streql(name, dp->name) && level == dp->level &&
X		    (dp->flags & DD_PARTIAL) == (dflags & DD_PARTIAL)) {
X			if (useold) {
X				dp->date = *date;
X				return;
X			}
X			errmsgno(EX_BAD,
X				"Duplicate tardumps entry '%s %d%s %lld'.\n",
X				dp->name, dp->level,
X				(dflags & DD_PARTIAL) ? "P":"",
X				(Llong)dp->date.tv_sec);
X
X			if (date->tv_sec == dp->date.tv_sec)
X				return;
X			comerrno(EX_BAD, "Timestamps differs - aborting.\n");
X		}
X	}
X	dp = newdumpdates(name, level, dflags, date);
X	*dumptail = dp;
X	dumptail = &dp->next;
X}
X
XLOCAL dumpd_t *
Xnewdumpdates(name, level, dflags, date)
X	const char	*name;
X	int		level;
X	int		dflags;
X	struct timeval	*date;
X{
X	dumpd_t	*dp;
X
X	dp	  = ___malloc(sizeof (*dp), "tardumps entry");
X	dp->next  = NULL;
X	dp->name  = ___savestr(name);
X	dp->level = level;
X	dp->flags = dflags;
X	dp->date  = *date;
X
X	return (dp);
X}
X
XLOCAL dumpd_t *
Xfreedumpdates(dp)
X	dumpd_t	*dp;
X{
X	dumpd_t	*next = dp->next;
X
X	free(dp->name);
X	free(dp);
X
X	return (next);
X}
END-of-star-1.5.2/star/dumpdate.c
echo x - star-1.5.2/star/star.h
sed 's/^X//' >star-1.5.2/star/star.h << 'END-of-star-1.5.2/star/star.h'
X/* @(#)star.h	1.125 11/04/12 Copyright 1985, 1995-2011 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_STAR_H
X#define	_STAR_H
X
X#include <schily/utypes.h>
X#include <schily/time.h>
X#include <schily/types.h>
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Be careful not to overflow off_t when computing tarblocks()
X */
X#define	tarblocks(s)	(((s) / TBLOCK) + (((s)%TBLOCK)?1:0))
X#define	tarsize(s)	(tarblocks(s) * TBLOCK)
X
X/*
X * Defines for header type recognition
X * N.B. these must kept in sync with hdrtxt[] in header.c
X */
X#define	H_SWAPPED(t)	((-1)*(t))
X#define	H_ISSWAPPED(t)	((t) < H_UNDEF)
X#define	H_TYPE(t)	((int)(H_ISSWAPPED(t) ? ((-1)*(t)):(t)))
X#define	H_UNDEF		0
X#define	H_TARMIN	1	/* Lowest TAR type # */
X#define	H_TAR		1	/* tar unbekanntes format */
X#define	H_V7TAR		2	/* UNIX V7 format (1978 ???) */
X#define	H_OTAR		3	/* tar altes BSD format (1978 ???) */
X#define	H_STAR		4	/* altes star format (1985) */
X#define	H_GNUTAR	5	/* gnu tar format (1989) */
X#define	H_USTAR		6	/* ieee 1003.1-1988 format (1987 ff.) */
X#define	H_XSTAR		7	/* extended 1003.1-1988 format (1994) */
X#define	H_XUSTAR	8	/* ext 1003.1-1988 fmt w/o "tar" sign. (1998) */
X#define	H_EXUSTAR	9	/* ext 1003.1-2001 fmt w/o "tar" sign. (2001) */
X#define	H_PAX		10	/* ieee 1003.1-2001 ext. ustar format (PAX) */
X#define	H_SUNTAR	11	/* Sun's tar implementaion from Solaris 7/8/9 */
X#define	H_TARMAX	11	/* Highest TAR type # */
X#define	H_RES12		12	/* Reserved */
X#define	H_RES13		13	/* Reserved */
X#define	H_RES14		14	/* Reserved */
X#define	H_BAR		15	/* SUN bar format */
X#define	H_CPIO_BASE	16	/* cpio Basis */
X#define	H_CPIO_BIN	16	/* cpio Binär */
X#define	H_CPIO_CHR	17	/* cpio -Hodc POSIX format */
X#define	H_CPIO_ODC	18	/* cpio -Hodc POSIX format 256 char filename */
X#define	H_CPIO_NBIN	19	/* cpio neu Binär */
X#define	H_CPIO_CRC	20	/* cpio crc Binär */
X#define	H_CPIO_ASC	21	/* cpio -c ascii expanded maj/min */
X#define	H_CPIO_ACRC	22	/* cpio -Hcrc ascii expanded maj/min */
X#define	H_CPIO_MAX	22	/* cpio Ende */
X#define	H_MAX_ARCH	22	/* Highest possible # */
X
X/*
X * Interface types
X */
X#define	I_TAR		1	/* tar, ustar, star	*/
X#define	I_PAX		2	/* pax, spax		*/
X#define	I_CPIO		3	/* cpio			*/
X
X/*
X * Program types
X */
X#define	P_STAR		1	/* star, ustar		*/
X#define	P_SUNTAR	2	/* suntar		*/
X#define	P_GNUTAR	3	/* gnutar		*/
X#define	P_PAX		10	/* pax, spax		*/
X#define	P_CPIO		20	/* cpio, scpio		*/
X
X/*
X * Return codes from compression type checker.
X */
X#define	C_NONE		0	/* Not compressed or unknown compression    */
X#define	C_PACK		1	/* Compr. with 'pack',   unpack with 'gzip' */
X#define	C_GZIP		2	/* Compr. with 'gzip',   unpack with 'gzip' */
X#define	C_LZW		3	/* Compr. with 'lzw',    unpack with 'gzip' */
X#define	C_FREEZE	4	/* Compr. with 'freeze', unpack with 'gzip' */
X#define	C_LZH		5	/* Compr. with 'SCO LZH', unpack with 'gzip' */
X#define	C_PKZIP		6	/* Compr. with 'pkzip',  unpack with 'gzip' */
X#define	C_BZIP2		7	/* Compr. with 'bzip2', unpack with 'bzip2' */
X#define	C_LZO		8	/* Compr. with 'lzop', unpack with 'lzop'   */
X#define	C_7Z		9	/* Compr. with 'p7zip', unpack with 'p7zip' */
X#define	C_XZ		10	/* Compr. with 'xz', unpack with 'xz'	    */
X#define	C_LZIP		11	/* Compr. with 'lzip', unpack with 'lzip'   */
X#define	C_MAX		11
X
X/*
X * Header size values
X */
X#define	TAR_HDRSZ	TBLOCK	/* TAR header size			  */
X#define	BAR_HDRSZ	TBLOCK	/* Sun bar header size			  */
X#define	CPIOBIN_HDRSZ	26	/* cpio Binär (default) CPIO header size  */
X#define	CPIOODC_HDRSZ	76	/* cpio -Hodc POSIX format header size    */
X#define	CPIOCRC_HDRSZ	110	/* cpio -c ascii / cpio -Hcrc header size */
X
X/*
X * POSIX.1-1988 field size values and magic.
X */
X#define	TBLOCK		512
X#define	NAMSIZ		100
X#define	PFXSIZ		155
X
X#define	TMODLEN		8
X#define	TUIDLEN		8
X#define	TGIDLEN		8
X#define	TSIZLEN		12
X#define	TMTMLEN		12
X#define	TCKSLEN		8
X
X#define	TMAGIC		"ustar"	/* ustar magic */
X#define	TMAGLEN		6	/* "ustar" including NULL byte */
X#define	TVERSION	"00"
X#define	TVERSLEN	2
X#define	TUNMLEN		32
X#define	TGNMLEN		32
X#define	TDEVLEN		8
X
X/*
X * The maximum number that we may handle with a 32 bit int
X */
X#define	MAXINT32	0x7FFFFFFFL
X
X/*
X * Large file summit: max size of a non-large file (2 GB - 2 Bytes)
X */
X#define	MAXNONLARGEFILE	(MAXINT32 - 1)
X
X/*
X * Max POSIX.1-1988 limit for numeric 12 byte fields such as size/mtime
X */
X#ifdef	USE_LONGLONG
X#define	MAXOCTAL11	077777777777ULL
X#else
X#define	MAXOCTAL11	MAXINT32
X#endif
X
X/*
X * Max POSIX.1-1988 limit for numeric 8 byte fields such as uid/gid/dev
X */
X#define	MAXOCTAL7	07777777
X
X/*
X * Pre POSIX.1-1988 limit for numeric 8 byte fields such as uid/gid/dev
X */
X#define	MAXOCTAL6	0777777
X
X/*
X * Non POSIX.1-1988 limit used by HP-UX tar for 8 byte devmajor/devminor
X */
X#define	MAXOCTAL8	077777777
X
X
X/*
X * POSIX.1-1988 typeflag values
X */
X#define	REGTYPE		'0'
X#define	AREGTYPE	'\0'
X#define	LNKTYPE		'1'
X#define	SYMTYPE		'2'
X#define	CHRTYPE		'3'
X#define	BLKTYPE		'4'
X#define	DIRTYPE		'5'
X#define	FIFOTYPE	'6'
X#define	CONTTYPE	'7'
X
X/*
X * POSIX.1-2001 typeflag extensions.
X * POSIX.1-2001 calls the extended USTAR format PAX although it is definitely
X * derived from and based on USTAR. The reason may be that POSIX.1-2001
X * calls the tar program outdated and lists the pax program as the successor.
X */
X#define	LF_GHDR		'g'	/* POSIX.1-2001 global extended header */
X#define	LF_XHDR		'x'	/* POSIX.1-2001 extended header */
X
X/*
X * star/gnu/Sun tar extensions:
X */
X/*
X * Note that the standards committee allows only capital A through
X * capital Z for user-defined expansion.  This means that defining something
X * as, say '8' is a *bad* idea.
X */
X
X#define	LF_ACL		'A'	/* Solaris Access Control List	*/
X#define	LF_DUMPDIR	'D'	/* This is a dir entry that contains */
X				/* the names of files that were in */
X				/* the dir at the time the dump was made */
X
X#define	LF_EXTATTR	'E'	/* Solaris Extended Attribute File	*/
X#define	LF_META		'I'	/* Inode (metadata only) no file content */
X#define	LF_LONGLINK	'K'	/* Identifies the NEXT file on the tape */
X				/* as having a long linkname */
X
X#define	LF_LONGNAME	'L'	/* Identifies the NEXT file on the tape */
X				/* as having a long name. */
X
X#define	LF_MULTIVOL	'M'	/* This is the continuation */
X				/* of a file that began on another volume */
X
X#define	LF_NAMES	'N'	/* For storing filenames that didn't */
X				/* fit in 100 characters */
X
X#define	LF_SPARSE	'S'	/* This is for sparse files */
X#define	LF_VOLHDR	'V'	/* This file is a tape/volume header */
X				/* Ignore it on extraction */
X#define	LF_VU_XHDR	'X'	/* POSIX.1-2001 xtended (VU version) */
X
X/*
X * Definitions for the t_mode field
X */
X#define	TSUID		04000	/* Set UID on execution */
X#define	TSGID		02000	/* Set GID on execution */
X#define	TSVTX		01000	/* On directories, restricted deletion flag */
X#define	TUREAD		00400	/* Read by owner */
X#define	TUWRITE		00200	/* Write by owner special */
X#define	TUEXEC		00100	/* Execute/search by owner */
X#define	TGREAD		00040	/* Read by group */
X#define	TGWRITE		00020	/* Write by group */
X#define	TGEXEC		00010	/* Execute/search by group */
X#define	TOREAD		00004	/* Read by other */
X#define	TOWRITE		00002	/* Write by other */
X#define	TOEXEC		00001	/* Execute/search by other */
X
X#define	TALLMODES	07777	/* The low 12 bits mentioned in the standard */
X
X
X/*
X * This is the ustar (Posix 1003.1) header.
X */
Xstruct header {
X	char t_name[NAMSIZ];	    /*   0 Dateiname			*/
X	char t_mode[8];		    /* 100 Zugriffsrechte		*/
X	char t_uid[8];		    /* 108 Benutzernummer		*/
X	char t_gid[8];		    /* 116 Benutzergruppe		*/
X	char t_size[12];	    /* 124 Dateigroesze			*/
X	char t_mtime[12];	    /* 136 Zeit d. letzten Aenderung	*/
X	char t_chksum[8];	    /* 148 Checksumme			*/
X	Uchar t_typeflag;	    /* 156 Typ der Datei		*/
X	char t_linkname[NAMSIZ];    /* 157 Zielname des Links		*/
X	char t_magic[TMAGLEN];	    /* 257 "ustar"			*/
X	char t_version[TVERSLEN];   /* 263 Version v. star		*/
X	char t_uname[TUNMLEN];	    /* 265 Benutzername			*/
X	char t_gname[TGNMLEN];	    /* 297 Gruppenname			*/
X	char t_devmajor[8];	    /* 329 Major bei Geraeten		*/
X	char t_devminor[8];	    /* 337 Minor bei Geraeten		*/
X	char t_prefix[PFXSIZ];	    /* 345 Prefix fuer t_name		*/
X				    /* 500 Ende				*/
X	char t_mfill[12];	    /* 500 Filler bis 512		*/
X};
X
X/*
X * This is the ustar (Posix 1003.1) header with extended name arrays.
X * Extended name arrays are needed to avoid compiler warnings for the code
X * that deals with 100/155 byte names that are not null terminated.
X */
Xstruct name_header {
X	char t_name[NAMSIZ+1];	    /*   0 Dateiname			*/
X	char t_res1[7];		    /* 101 Reserved: t_mode Rest	*/
X	char t_uid[8];		    /* 108 Benutzernummer		*/
X	char t_gid[8];		    /* 116 Benutzergruppe		*/
X	char t_size[12];	    /* 124 Dateigroesze			*/
X	char t_mtime[12];	    /* 136 Zeit d. letzten Aenderung	*/
X	char t_chksum[8];	    /* 148 Checksumme			*/
X	Uchar t_typeflag;	    /* 156 Typ der Datei		*/
X	char t_linkname[NAMSIZ+1];  /* 157 Zielname des Links		*/
X	char t_res2[TMAGLEN-1];	    /* 258 Reserved: t_magic Rest	*/
X	char t_version[TVERSLEN];   /* 263 Version v. star		*/
X	char t_uname[TUNMLEN];	    /* 265 Benutzername			*/
X	char t_gname[TGNMLEN];	    /* 297 Gruppenname			*/
X	char t_devmajor[8];	    /* 329 Major bei Geraeten		*/
X	char t_devminor[8];	    /* 337 Minor bei Geraeten		*/
X	char t_prefix[PFXSIZ+1];    /* 345 Prefix fuer t_name		*/
X				    /* 501 Ende				*/
X	char t_res3[11];	    /* 501 Filler bis 512		*/
X};
X
X/*
X * star header specific definitions
X */
X#define	STMAGIC		"tar"	/* star magic */
X#define	STMAGLEN	4	/* "tar" including NULL byte */
X#define	STVERSION	'1'	/* current star version */
X
X#define	STUNMLEN	16	/* star user name length */
X#define	STGNMLEN	15	/* star group name length */
X
X/*
X * This is the old (pre Posix 1003.1-1988) star header defined in 1985.
X */
Xstruct star_header {
X	char t_name[NAMSIZ];	    /*   0 Dateiname			*/
X	char t_mode[8];		    /* 100 Zugriffsrechte 		*/
X	char t_uid[8];		    /* 108 Benutzernummer		*/
X	char t_gid[8];		    /* 116 Benutzergruppe		*/
X	char t_size[12];	    /* 124 Dateigroesze			*/
X	char t_mtime[12];	    /* 136 Zeit d. letzten Aenderung	*/
X	char t_chksum[8];	    /* 148 Checksumme			*/
X	Uchar t_linkflag;	    /* 156 Linktyp der Datei		*/
X	char t_linkname[NAMSIZ];    /* 157 Zielname des Links		*/
X				    /* --- Ende historisches TAR	*/
X				    /* --- Anfang star Erweiterungen	*/
X	char t_vers;		    /* 257 Version v. star		*/
X	char t_filetype[8];	    /* 258 Interner Dateityp		*/
X	char t_type[12];	    /* 266 Dateityp (UNIX)		*/
X#ifdef	no_minor_bits_in_rdev
X	char t_rdev[12];	    /* 278 Major/Minor bei Geraeten	*/
X#else
X	char t_rdev[11];	    /* 278 Major/Minor bei Geraeten	*/
X	char t_devminorbits;	    /* 298 Anzahl d. Minor Bits in t_rdev */
X#endif
X	char t_atime[12];	    /* 290 Zeit d. letzten Zugriffs	*/
X	char t_ctime[12];	    /* 302 Zeit d. letzten Statusaend.	*/
X	char t_uname[STUNMLEN];	    /* 314 Benutzername			*/
X	char t_gname[STGNMLEN];	    /* 330 Gruppenname			*/
X	char t_prefix[PFXSIZ];	    /* 345 Prefix fuer t_name		*/
X	char t_mfill[8];	    /* 500 Filler bis magic		*/
X	char t_magic[4];	    /* 508 "tar"			*/
X};
X
X/*
X * This is the new (post Posix 1003.1-1988) xstar header defined in 1994.
X *
X * t_prefix[130]	is garanteed to be '\0' to prevent ustar compliant
X *			implementations from failing.
X * t_mfill & t_xmagic	need to be zero for a 100% ustar compliant
X *			implementation, so setting t_xmagic to "tar" should
X *			be avoided in the future.
X *
X * A different method to recognise this format is to verify that
X * t_prefix[130]	is equal to '\0' and
X * t_atime[0]/t_ctime[0] is an octal number and
X * t_atime[11]		is equal to ' ' and
X * t_ctime[11]		is equal to ' '.
X *
X * Note that t_atime[11]/t_ctime[11] may be changed in future.
X */
Xstruct xstar_header {
X	char t_name[NAMSIZ];	    /*   0 Dateiname			*/
X	char t_mode[8];		    /* 100 Zugriffsrechte 		*/
X	char t_uid[8];		    /* 108 Benutzernummer		*/
X	char t_gid[8];		    /* 116 Benutzergruppe		*/
X	char t_size[12];	    /* 124 Dateigroesze			*/
X	char t_mtime[12];	    /* 136 Zeit d. letzten Aenderung	*/
X	char t_chksum[8];	    /* 148 Checksumme			*/
X	Uchar t_typeflag;	    /* 156 Typ der Datei		*/
X	char t_linkname[NAMSIZ];    /* 157 Zielname des Links		*/
X	char t_magic[TMAGLEN];	    /* 257 "ustar"			*/
X	char t_version[TVERSLEN];   /* 263 Version v. star		*/
X	char t_uname[TUNMLEN];	    /* 265 Benutzername			*/
X	char t_gname[TGNMLEN];	    /* 297 Gruppenname			*/
X	char t_devmajor[8];	    /* 329 Major bei Geraeten		*/
X	char t_devminor[8];	    /* 337 Minor bei Geraeten		*/
X	char t_prefix[131];	    /* 345 Prefix fuer t_name		*/
X	char t_atime[12];	    /* 476 Zeit d. letzten Zugriffs	*/
X	char t_ctime[12];	    /* 488 Zeit d. letzten Statusaend.	*/
X	char t_mfill[8];	    /* 500 Filler bis magic		*/
X	char t_xmagic[4];	    /* 508 "tar"			*/
X};
X
Xstruct sparse {
X	char t_offset[12];
X	char t_numbytes[12];
X};
X
X#define	SPARSE_EXT_HDR  21
X#define	SPARSE_IN_HDR	4
X#define	SIH		SPARSE_IN_HDR
X#define	SEH		SPARSE_EXT_HDR
X
Xstruct xstar_in_header {
X	char t_fill[345];	    /*   0 Everything before t_prefix	    */
X	char t_prefix[1];	    /* 345 Prefix fuer t_name		    */
X	char t_fill2;		    /* 346				    */
X	char t_fill3[8];	    /* 347				    */
X	char t_isextended;	    /* 355				    */
X	struct sparse t_sp[SIH];    /* 356 8 x 12			    */
X	char t_realsize[12];	    /* 452 Echte Größe bei sparse Dateien   */
X	char t_offset[12];	    /* 464 Offset für Multivol cont. Dateien */
X	char t_atime[12];	    /* 476 Zeit d. letzten Zugriffs	    */
X	char t_ctime[12];	    /* 488 Zeit d. letzten Statusaend.	    */
X	char t_mfill[8];	    /* 500 Filler bis magic		    */
X	char t_xmagic[4];	    /* 508 "tar"			    */
X};
X
Xstruct xstar_ext_header {
X	struct sparse t_sp[SEH];
X	char t_isextended;
X};
X
Xtypedef struct {
X	off_t	sp_offset;
X	off_t	sp_numbytes;
X} sp_t;
X
X/*
X * gnu tar header specific definitions
X */
X
X#define	GMAGIC		"ustar  "   /* gnu tar magic			*/
X#define	GMAGLEN		8	    /* "ustar" two blanks and a NULL	*/
X
X/*
X * This is the GNUtar header defined in 1989.
X *
X * The nonstandard stuff could not be found in in the first pubslished versions
X * of the program. The first version I am aware of, is a program called SUGtar
X * published at the Sun User Group meeting in december 1987, a different
X * publishing of the same program which has been originally written by
X * John Gilmore was called PDtar. In 1987 PDtar/SUGtar was implementing a true
X * subset of the 1987 POSIX-1003 draft (missing only the long name splitting).
X *
X * FSF people then later added t_atime... making GNU tar non POSIX compliant.
X * When FSF added the sparse file handling stuff, this was done in a way that
X * even violates any tar document available since the late 1970's.
X *
X * GNU tar is not tar...
X */
Xstruct gnu_header {
X	char t_name[NAMSIZ];	    /*   0 Dateiname			*/
X	char t_mode[8];		    /* 100 Zugriffsrechte		*/
X	char t_uid[8];		    /* 108 Benutzernummer		*/
X	char t_gid[8];		    /* 116 Benutzergruppe		*/
X	char t_size[12];	    /* 124 Dateigroesze			*/
X	char t_mtime[12];	    /* 136 Zeit d. letzten Aenderung	*/
X	char t_chksum[8];	    /* 148 Checksumme			*/
X	Uchar t_linkflag;	    /* 156 Typ der Datei		*/
X	char t_linkname[NAMSIZ];    /* 157 Zielname des Links		*/
X	char t_magic[8];	    /* 257 "ustar"			*/
X	char t_uname[TUNMLEN];	    /* 265 Benutzername			*/
X	char t_gname[TGNMLEN];	    /* 297 Gruppenname			*/
X	char t_devmajor[8];	    /* 329 Major bei Geraeten		*/
X	char t_devminor[8];	    /* 337 Minor bei Geraeten		*/
X
X	/*
X	 * Jay Fenlason (hack@ai.mit.edu)
X	 * these following fields were added by JF for gnu
X	 * and are NOT standard
X	 */
X	char t_atime[12];	    /* 345				*/
X	char t_ctime[12];	    /* 357				*/
X	char t_offset[12];	    /* 369				*/
X	char t_longnames[4];	    /* 381				*/
X	/*
X	 * for the rest see struct gnu_in_header
X	 */
X};
X
Xstruct gnu_in_header {
X	char	t_fill[386];
X	struct sparse t_sp[SIH]; /* 386	4 sparse structures (2 x 12 bytes) */
X	char t_isextended;	 /* 482	an extended header follows	   */
X	char t_realsize[12];	 /* 483  true size of the sparse file	   */
X};
X
Xstruct gnu_extended_header {
X	struct sparse t_sp[SEH]; /*   0  21 sparse structures (2 x 12 bytes) */
X	char t_isextended;	 /* 504  another extended header follows    */
X};
X
X#undef	SIH
X#undef	SEH
X
X/*
X * This is the Sun tar header used on SunOS-5.x.
X */
Xstruct suntar_header {
X	char t_name[NAMSIZ];	    /*   0 Dateiname			*/
X	char t_mode[8];		    /* 100 Zugriffsrechte		*/
X	char t_uid[8];		    /* 108 Benutzernummer		*/
X	char t_gid[8];		    /* 116 Benutzergruppe		*/
X	char t_size[12];	    /* 124 Dateigroesze			*/
X	char t_mtime[12];	    /* 136 Zeit d. letzten Aenderung	*/
X	char t_chksum[8];	    /* 148 Checksumme			*/
X	Uchar t_typeflag;	    /* 156 Typ der Datei		*/
X	char t_linkname[NAMSIZ];    /* 157 Zielname des Links		*/
X	char t_magic[TMAGLEN];	    /* 257 "ustar"			*/
X	char t_version[TVERSLEN];   /* 263 Version v. star		*/
X	char t_uname[TUNMLEN];	    /* 265 Benutzername			*/
X	char t_gname[TGNMLEN];	    /* 297 Gruppenname			*/
X	char t_devmajor[8];	    /* 329 Major bei Geraeten		*/
X	char t_devminor[8];	    /* 337 Minor bei Geraeten		*/
X	char t_prefix[PFXSIZ];	    /* 345 Prefix fuer t_name		*/
X
X				    /* Sun Erweiterungen:		*/
X	char t_extno;		    /* 500 extent #, null if not split	*/
X	char t_extotal;		    /* 501 total # of extents		*/
X	char t_efsize[10];	    /* 502 size of entire file		*/
X};
X
X
X#define	BAR_UNSPEC	'\0'	/* XXX Volheader ??? */
X#define	BAR_REGTYPE	'0'
X#define	BAR_LNKTYPE	'1'
X#define	BAR_SYMTYPE	'2'
X#define	BAR_SPECIAL	'3'
X
X#define	BAR_VOLHEAD	"V"	/* The BAR Volume "magic" */
X
X/*
X * The Sun BAR header format as introduced with the Roadrunner Intel machines
X *
X * All header parts marked with "*VH" are set only in the volheader
X * and zero on any other headers.
X */
Xstruct bar_header {
X	char mode[8];		/*   0	file type and mode (top bit masked) */
X	char uid[8];		/*   8	Benutzernummer		*/
X	char gid[8];		/*  16	Benutzergruppe		*/
X	char size[12];		/*  24	Dateigroesze		*/
X	char mtime[12];		/*  36	Zeit d. letzten Aenderung */
X	char t_chksum[8];	/*  48	Checksumme		*/
X	char rdev[8];		/*  56	Major/Minor bei Geraeten */
X	Uchar linkflag;		/*  64	Linktyp der Datei	*/
X	char bar_magic[2];	/*  65	*VH xxx			*/
X	char volume_num[4];	/*  67	*VH Volume Nummer	*/
X	char compressed;	/*  71	*VH Compress Flag	*/
X	char date[12];		/*  72	*VH Aktuelles Datum YYMMDDhhmm */
X	char start_of_name[1];	/*  84	Dateiname		*/
X};
X
Xtypedef union hblock {
X	char dummy[TBLOCK];
X	long ldummy[TBLOCK/sizeof (long)];	/* force long alignement */
X	struct star_header dbuf;
X	struct star_header star_dbuf;
X	struct xstar_header xstar_dbuf;
X	struct xstar_in_header xstar_in_dbuf;
X	struct xstar_ext_header xstar_ext_dbuf;
X	struct header ustar_dbuf;
X	struct name_header ndbuf;
X	struct gnu_header gnu_dbuf;
X	struct gnu_in_header gnu_in_dbuf;
X	struct gnu_extended_header gnu_ext_dbuf;
X	struct suntar_header suntar_dbuf;
X	struct bar_header bar_dbuf;
X} TCB;
X
X/*
X * Used for internal extended file attribute processing
X */
Xtypedef struct star_xattr {
X	char	*name;		/* The name of the attribute		*/
X	void	*value;		/* The asociated value			*/
X	size_t	value_len;	/* The size of the attribute value	*/
X} star_xattr_t;
X
X/*
X * Our internal OS independant structure to hold file metadata.
X *
X * Some remarks to the different file type structure members:
X *
X *	f_xftype	The new tar general (x-tended) file type.
X *			This includes values XT_LINK XT_SPARSE XT_LONGNAME ...
X *
X *	f_rxftype	The 'real' general file type.
X *			Doesn't include XT_LINK XT_SPARSE XT_LONGNAME ...
X *			This is the 'real' file type and close to what has been
X *			set up in getinfo().
X *
X *	f_filetype	The coarse file type classification (star 1985 header)
X *
X *	f_typeflag	The file type flag used in the POSIX.1-1988 TAR header
X *
X *	f_type		The OS specific file type (e.g. UNIX st_mode & S_IFMT)
X */
Xtypedef	struct	{
X	TCB	*f_tcb;
X	char	*f_sname;	/* Zeiger auf den kurzen stat Dateinamen  */
X	char	*f_name;	/* Zeiger auf den langen Dateinamen	  */
X	Ulong	f_namelen;	/* Länge des Dateinamens		  */
X	char	*f_lname;	/* Zeiger auf den langen Linknamen	  */
X	Ulong	f_lnamelen;	/* Länge des Linknamens			  */
X	char	*f_uname;	/* User name oder NULL Pointer		  */
X	Ulong	f_umaxlen;	/* Maximale Länge des Usernamens	  */
X	char	*f_gname;	/* Group name oder NULL Pointer		  */
X	Ulong	f_gmaxlen;	/* Maximale Länge des Gruppennamens	  */
X	char	*f_dir;		/* Directory Inhalt			  */
X	ino_t	*f_dirinos;	/* Inode Liste fuer Directory Inhalt	  */
X	int	f_dirlen;	/* Extended strlen(f_dir)+1		  */
X	int	f_dirents;	/* # der Directory Eintraege		  */
X	dev_t	f_dev;		/* Geraet auf dem sich d. Datei befindet  */
X	ino_t	f_ino;		/* Dateinummer				  */
X	nlink_t	f_nlink;	/* Anzahl der Links			  */
X	mode_t	f_mode;		/* Zugriffsrechte			  */
X	uid_t	f_uid;		/* Benutzernummer			  */
X	gid_t	f_gid;		/* Benutzergruppe			  */
X	off_t	f_size;		/* Dateigroesze				  */
X	off_t	f_rsize;	/* Dateigroesze auf Band		  */
X	off_t	f_contoffset;	/* Offset für Multivol cont. Dateien	  */
X	Ullong	f_llsize;	/* Dateigroesze wenn off_t zu kein	  */
X	Ulong	f_flags;	/* Bearbeitungshinweise			  */
X	Ulong	f_xflags;	/* Flags für x-header			  */
X	Ulong	f_xftype;	/* Header Dateityp (neu generell)	  */
X	Ulong	f_rxftype;	/* Echter Dateityp (neu generell)	  */
X	Ulong	f_filetype;	/* Typ der Datei (star alt)		  */
X	Uchar	f_typeflag;	/* Kopie aus TAR Header			  */
X	mode_t	f_type;		/* Dateityp aus UNIX struct stat	  */
X#ifdef	NEW_RDEV
X	dev_t	f_rdev;		/* Major/Minor bei Geraeten		  */
X	major_t	f_rdevmaj;	/* Major bei Geraeten			  */
X	minor_t	f_rdevmin;	/* Minor bei Geraeten			  */
X#else
X	Ulong	f_rdev;		/* Major/Minor bei Geraeten		  */
X	Ulong	f_rdevmaj;	/* Major bei Geraeten			  */
X	Ulong	f_rdevmin;	/* Minor bei Geraeten			  */
X#endif
X	time_t	f_atime;	/* Zeit d. letzten Zugriffs		  */
X	long	f_ansec;	/* nsec Teil "				  */
X	time_t	f_mtime;	/* Zeit d. letzten Aenderung		  */
X	long	f_mnsec;	/* nsec Teil "				  */
X	time_t	f_ctime;	/* Zeit d. letzten Statusaend.		  */
X	long	f_cnsec;	/* nsec Teil "				  */
X	Ulong	f_fflags;	/* File flags				  */
X#ifdef	USE_ACL
X#ifdef	HAVE_ST_ACLCNT
X	int	f_aclcnt;
X#endif
X	char	*f_acl_access;	/* POSIX Access Control List		  */
X	char	*f_acl_default;	/* POSIX Default ACL			  */
X#endif
X#ifdef USE_XATTR
X	star_xattr_t *f_xattr;	/* Extended File Attributes		  */
X#endif
X} FINFO;
X
X#define	init_finfo(fip)	(fip)->f_flags = 0, (fip)->f_xflags = 0
X
X/*
X * Used with f_flags
X */
X#define	F_LONGNAME	0x01	/* Langer Name passt nicht in Header	  */
X#define	F_LONGLINK	0x02	/* Langer Linkname passt nicht in Header  */
X#define	F_SPLIT_NAME	0x04	/* Langer Name wurde gesplitted		  */
X#define	F_HAS_NAME	0x08	/* Langer Name in f_name/f_lname soll bl. */
X#define	F_SPARSE	0x10	/* Datei enthält Löcher			  */
X#define	F_TCB_BUF	0x20	/* TCB ist/war vom Buffer alloziert	  */
X#define	F_ADDSLASH	0x40	/* Langer Name benötigt Slash am Ende	  */
X#define	F_NSECS		0x80	/* stat() liefert Nanosekunden		  */
X#define	F_NODUMP	0x100	/* Datei hat OS spezifisches NODUMP flag  */
X#define	F_EXTRACT	0x200	/* Bearbeitung im 'extract' Modus	  */
X#define	F_CRC		0x400	/* CPIO CRC für Datei berechnen		  */
X#define	F_BAD_SIZE	0x1000	/* Bad size data detected		  */
X#define	F_BAD_META	0x2000	/* Bad meta data detected		  */
X#define	F_BAD_UID	0x4000	/* Bad uid value detected		  */
X#define	F_BAD_GID	0x8000	/* Bad gid value detected		  */
X#define	F_SP_EXTENDED	0x10000	/* Extended sparse area found		  */
X#define	F_SP_SKIPPED	0x20000	/* Extended sparse area already skipped	  */
X#define	F_FORCE_ADD	0x40000	/* Force take_file() to add the file	  */
X#define	F_SAME		0x80000	/* Same symlink of special found	  */
X#define	F_DATA_SKIPPED	0x100000 /* The data part of the file was skipped */
X#define	F_BAD_ACL	0x200000 /* Unsupported ACL encoding type	  */
X#define	F_ALL_HOLE	0x400000 /* File is sparse, one hole with no data */
X
X/*
X * Used with f_xflags
X */
X#define	XF_ATIME	0x0001	/* Zeit d. letzten Zugriffs		  */
X#define	XF_CTIME	0x0002	/* Zeit d. letzten Statusaend.		  */
X#define	XF_MTIME	0x0004	/* Zeit d. letzten Aenderung		  */
X#define	XF_COMMENT	0x0008	/* Beliebiger Kommentar			  */
X#define	XF_UID		0x0010	/* Benutzernummer			  */
X#define	XF_UNAME	0x0020	/* Langer Benutzername			  */
X#define	XF_GID		0x0040	/* Benutzergruppe			  */
X#define	XF_GNAME	0x0080	/* Langer Benutzergruppenname		  */
X#define	XF_PATH		0x0100	/* Langer Name				  */
X#define	XF_LINKPATH	0x0200	/* Langer Link Name			  */
X				/* Dateigröße auf Band (f_rsize)	  */
X#define	XF_SIZE		0x0400	/* Dateigröße wenn > 8 GB		  */
X#define	XF_CHARSET	0x0800	/* Zeichensatz für Dateiinhalte		  */
X
X#define	XF_DEVMAJOR	0x1000	/* Major bei Geräten			  */
X#define	XF_DEVMINOR	0x2000	/* Major bei Geräten			  */
X
X#define	XF_ACL_ACCESS	0x4000	/* POSIX Access Control List		  */
X#define	XF_ACL_DEFAULT	0x8000	/* POSIX Default ACL			  */
X
X#define	XF_FFLAGS	0x10000	/* File flags				  */
X				/* Echte Dateigröße (f_size)		  */
X#define	XF_REALSIZE	0x20000	/* Dateigröße wenn > 8 GB		  */
X#define	XF_OFFSET	0x40000	/* Multi Volume Offset			  */
X#define	XF_XATTR	0x80000	/* Extended Attributes			  */
X
X#define	XF_NOTIME    0x10000000	/* Keine extended Zeiten		  */
X
X/*
X * All Extended header tags that are covered by POSIX.1-2001
X */
X#define	XF_POSIX	(XF_ATIME|XF_CTIME|XF_MTIME|XF_COMMENT|\
X			XF_UID|XF_UNAME|XF_GID|XF_GNAME|\
X			XF_PATH|XF_LINKPATH|XF_SIZE|XF_CHARSET)
X
X/*
X * Used with f_filetype
X *
X * This is optimised for the old star (1986) extensions that were the first
X * tar extensions which allowed to archive files different from regular files,
X * directories and symbolic links.
X */
X#define	F_SPEC		0	/* Anything not mentioned below		*/
X#define	F_FILE		1	/* A reguar file			*/
X#define	F_SLINK		2	/* A symbolic link			*/
X#define	F_DIR		3	/* A directory				*/
X
X#define	is_special(i)	((i)->f_filetype == F_SPEC)
X#define	is_file(i)	((i)->f_filetype == F_FILE)
X#define	is_symlink(i)	((i)->f_filetype == F_SLINK)
X#define	is_dir(i)	((i)->f_filetype == F_DIR)
X
X#define	is_cont(i)	((i)->f_xftype == XT_CONT)
X#define	is_bdev(i)	((i)->f_xftype == XT_BLK)
X#define	is_cdev(i)	((i)->f_xftype == XT_CHR)
X#define	is_dev(i)	(is_bdev(i) || is_cdev(i))
X#define	is_fifo(i)	((i)->f_xftype == XT_FIFO)
X#define	is_door(i)	((i)->f_xftype == XT_DOOR)
X#define	is_link(i)	((i)->f_xftype == XT_LINK)
X#define	fis_link(i)	((i)->f_rxftype == XT_LINK)	/* Filetype unknown  */
X#define	is_volhdr(i)	((i)->f_xftype == XT_VOLHDR)
X#define	is_sparse(i)	((i)->f_xftype == XT_SPARSE)
X#define	is_multivol(i)	((i)->f_xftype == XT_MULTIVOL)
X#define	is_whiteout(i)	((i)->f_xftype == XT_WHT)
X#define	is_meta(i)	((i)->f_xftype == XT_META)
X#define	fis_meta(i)	((i)->f_rxftype == XT_META)	/* Really "regular"  */
X
X#define	is_a_file(i)	(is_file(i) || is_cont(i))
X/*
X * Defines for bad stat.st_mode, stat.st_uid and stat.st_gid
X */
X#define	_BAD_MODE	((mode_t)-1)
X#define	_BAD_UID	((gid_t)-1)
X#define	_BAD_GID	((gid_t)-1)
X
X/*
X * The global info structure holds volume header related information
X */
Xtypedef struct {
X	char		*label;		/* Volume label	*/
X	char		*hostname;	/* Hostname where the dump is from */
X	char		*filesys;	/* Mount point of the dump */
X	char		*cwd;		/* Working directory if != filesys */
X	char		*device;	/* Device for mount point */
X	char		*release;	/* Release string from creating tar */
X	int		archtype;	/* Archive type from 'g'lobal header */
X	int		dumptype;	/* Dump type see below */
X	int		dumplevel;	/* Level of this dump */
X	int		reflevel;	/* Level this dump refers to */
X	struct timeval	dumpdate;	/* Date of this dump */
X	struct timeval	refdate;	/* Date this dump refers to */
X	int		volno;		/* Volume number starting with 1 */
X	Ullong		tapesize;	/* Tape size in 512 byte units */
X	Ullong		blockoff;	/* 512 byte based offset within all */
X	int		blocksize;	/* Block size in 512 byte units */
X	Int32_t		gflags;
X} GINFO;
X
X/*
X * Defines for dumptype
X */
X#define	DT_UNKN		-1		/* DT_UNKNOWN used in BSD <dirent.h> */
X#define	DT_NONE		0
X#define	DT_PARTIAL	1
X#define	DT_FULL		2
X
X/*
X * Defines for gflags
X */
X#define	GF_LABEL	0x0001
X#define	GF_HOSTNAME	0x0002
X#define	GF_FILESYS	0x0004
X#define	GF_CWD		0x0008
X#define	GF_DEVICE	0x0010
X#define	GF_RELEASE	0x0020
X#define	GF_ARCHTYPE	0x0040
X#define	GF_DUMPTYPE	0x0080
X#define	GF_DUMPLEVEL	0x0100
X#define	GF_REFLEVEL	0x0200
X#define	GF_DUMPDATE	0x0400
X#define	GF_REFDATE	0x0800
X#define	GF_VOLNO	0x1000
X#define	GF_BLOCKOFF	0x2000
X#define	GF_BLOCKSIZE	0x4000
X#define	GF_TAPESIZE	0x8000
X#define	GF_MINIT	0x10000000	/* Structure initialized from media */
X#define	GF_NOALLOC	0x20000000	/* Strings in struct not allocated  */
X
X
X#ifdef	isdigit
X#undef	isdigit		/* Needed for HP-UX */
X#endif
X#define	isdigit(c)	((c) >= '0' && (c) <= '9')
X#define	isoctal(c)	((c) >= '0' && (c) <= '7')
X#ifdef	isupper
X#undef	isupper		/* Needed for HP-UX */
X#endif
X#define	isupper(c)	((c) >= 'A' && (c) <= 'Z')
X#define	toupper(c)	(isupper(c) ? (c) : (c) - ('a' - 'A'))
X/*
X * Needed for QNX
X */
X#ifdef	max
X#undef	max
X#endif
X#ifdef	min
X#undef	min
X#endif
X#define	max(a, b)	((a) < (b) ? (b) : (a))
X#define	min(a, b)	((a) < (b) ? (a) : (b))
X
X
Xstruct star_stats {
X	int	s_staterrs;	/* Could not stat(2) file		  */
X#ifdef	USE_ACL
X	int	s_getaclerrs;	/* Could not get ACL for file		  */
X#endif
X	int	s_openerrs;	/* Open/Create error for file		  */
X	int	s_rwerrs;	/* Read/Write error from file		  */
X	int	s_sizeerrs;	/* File changed size			  */
X	int	s_misslinks;	/* Missing links to file		  */
X	int	s_toolong;	/* File name too long			  */
X	int	s_toobig;	/* File does not fit on one tape	  */
X	int	s_isspecial;	/* File is special - not dumped		  */
X#ifdef USE_XATTR
X	int	s_getxattr;	/* get xattr for file failed		  */
X#endif
X	int	s_chdir;	/* chdir() failed			  */
X	/*
X	 * Extract only....
X	 */
X	int	s_settime;	/* utimes() on file failed		  */
X	int	s_setmodes;	/* chmod() on file failed		  */
X	int	s_security;	/* skipped for security reasons		  */
X	int	s_lsecurity;	/* link skipped for security reasons	  */
X	int	s_samefile;	/* skipped from/to are identical	  */
X#ifdef	USE_ACL
X	int	s_badacl;	/* ACL could not be converted		  */
X	int	s_setacl;	/* set ACL for file failed		  */
X#endif
X#ifdef USE_XATTR
X	int	s_setxattr;	/* set xattr for file failed		  */
X#endif
X	int	s_restore;	/* other incremental restore specific	  */
X};
X
Xextern	struct	star_stats	xstats;
X
X
X#include <schily/param.h>
X
X#if !defined(PATH_MAX) && defined(MAXPATHLEN)
X#define	PATH_MAX	MAXPATHLEN
X#endif
X
X#ifndef	PATH_MAX
X#define	PATH_MAX	1024
X#endif
X
X/*
X * Make sure that regardless what the OS defines, star reserves
X * space for 1024 chars in filenames.
X */
X#if	PATH_MAX < 1024
X#undef	PATH_MAX
X#define	PATH_MAX	1024
X#endif
X
X#ifdef	HAVE_LARGEFILES
X/*
X * XXX Hack until fseeko()/ftello() are available everywhere or until
X * XXX we know a secure way to let autoconf ckeck for fseeko()/ftello()
X * XXX without defining FILE_OFFSETBITS to 64 in confdefs.h
X */
X#define	fseek	fseeko
X#define	ftell	ftello
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _STAR_H */
END-of-star-1.5.2/star/star.h
echo x - star-1.5.2/star/dumpdate.h
sed 's/^X//' >star-1.5.2/star/dumpdate.h << 'END-of-star-1.5.2/star/dumpdate.h'
X/* @(#)dumpdate.h	1.13 07/10/28 Copyright 2003-2007 J. Schilling */
X/*
X *	Copyright (c) 2003-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	DUMPDATE_H
X#define	DUMPDATE_H
X
X#ifndef	_SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
Xtypedef struct dumpdates dumpd_t;
X
Xstruct dumpdates {
X	dumpd_t		*next;
X	char		*name;
X	int		level;
X	struct timeval	date;
X	Uchar		flags;
X};
X
X/*
X * Definitions for the dumpdates 'flags'.
X */
X#define	DD_PARTIAL	0x01	/* Dump is partial */
X#define	DD_CUMULATIVE	0x02	/* Dump is cumulative to same level */
X
X
Xextern	void	initdumpdates	__PR((char *fname, BOOL doupdate));
Xextern	void	writedumpdates	__PR((char *fname, const char *name,
X							int level, int dflags,
X							struct timeval *date));
Xextern	char	*dumpdate	__PR((struct timeval *date));
Xextern	BOOL	getdumptime	__PR((char *p, struct timeval *tvp));
Xextern	dumpd_t *checkdumpdates	__PR((const char *name, int level, int dflags));
Xextern	void	adddumpdates	__PR((const char *name, int level, int dflags,
X							struct timeval *date,
X								BOOL useold));
X
X#endif
END-of-star-1.5.2/star/dumpdate.h
echo x - star-1.5.2/star/extract.c
sed 's/^X//' >star-1.5.2/star/extract.c << 'END-of-star-1.5.2/star/extract.c'
X/* @(#)extract.c	1.141 11/12/03 Copyright 1985-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)extract.c	1.141 11/12/03 Copyright 1985-2011 J. Schilling";
X#endif
X/*
X *	extract files from archive
X *
X *	Copyright (c) 1985-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/dirent.h>	/* XXX Wegen S_IFLNK */
X#include <schily/unistd.h>
X#include <schily/fcntl.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/stdlib.h>
X#include <schily/errno.h>
X#ifdef	USE_FIND
X#include <schily/walk.h>
X#endif
X
X#ifdef	JOS
X#	define	mkdir	makedir
X#endif
X#include "dirtime.h"
X#include "restore.h"
X#include "starsubs.h"
X#include "checkerr.h"
X#include <schily/fetchdir.h>
X
X#define	ROOT_UID	0
X
X#if defined(ENOTEMPTY) && ENOTEMPTY != EEXIST
X#define	is_eexist(err)	((err) == EEXIST || (err) == ENOTEMPTY)
X#else
X#define	is_eexist(err)	((err) == EEXIST)
X#endif
X#if defined(EMISSDIR)
X#define	is_enoent(err)	((err) == ENOENT || (err) == EMISSDIR)
X#else
X#define	is_enoent(err)	((err) == ENOENT)
X#endif
X
X/*
X * Used for _make_copy()/make_copies()/copy_file()
X */
X#define	HIDE_ENOENT	0x01
X
X/*
X * Used by the what paramater of same_file()
X */
X#define	IS_COPY		0
X#define	IS_LINK		1
X
Xextern	FILE	*vpr;
X
Xextern	char	*listfile;
X
Xextern	int	bufsize;
Xextern	char	*bigptr;
X
Xextern	uid_t	dir_uid;
Xextern	gid_t	dir_gid;
Xextern	uid_t	my_uid;
Xextern	BOOL	no_fsync;
Xextern	BOOL	havepat;
Xextern	dev_t	curfs;
Xextern	int	xdebug;
Xextern	int	verbose;
Xextern	BOOL	prblockno;
Xextern	BOOL	nflag;
Xextern	BOOL	interactive;
Xextern	BOOL	noxdir;
Xextern	BOOL	follow;
Xextern	BOOL	nospec;
Xextern	BOOL	xdir;
Xextern	BOOL	xdot;
Xextern	BOOL	uncond;
Xextern	BOOL	keep_old;
Xextern	BOOL	refresh_old;
Xextern	BOOL	abs_path;
Xextern	BOOL	allow_dotdot;
Xextern	BOOL	secure_links;
Xextern	BOOL	nowarn;
Xextern	BOOL	force_hole;
Xextern	BOOL	to_stdout;
Xextern	BOOL	force_remove;
Xextern	BOOL	remove_first;
Xextern	BOOL	remove_recursive;
Xextern	BOOL	do_install;
Xextern	BOOL	copyhardlinks;
Xextern	BOOL	copysymlinks;
Xextern	BOOL	copydlinks;
Xextern	BOOL	hardlinks;
Xextern	BOOL	symlinks;
Xextern	BOOL	dorestore;
Xextern	BOOL	dometa;
Xextern	BOOL	xmeta;
Xextern	BOOL	lowmem;
Xextern	BOOL	do_subst;
X
X#ifdef	USE_FIND
Xextern	BOOL	dofind;
X#endif
X
XLOCAL	void	init_umask	__PR((void));
XEXPORT	void	extract		__PR((char *vhname));
XEXPORT	BOOL	extracti	__PR((FINFO *info, imap_t *imp));
XEXPORT	BOOL	newer		__PR((FINFO *info, FINFO *cinfo));
XEXPORT	BOOL	same_symlink	__PR((FINFO *info));
XLOCAL	BOOL	_create_dirs	__PR((char *name));
XLOCAL	void	_dir_setownwer	__PR((char *name));
XEXPORT	BOOL	create_dirs	__PR((char *name));
XEXPORT	BOOL	make_adir	__PR((FINFO *info));
XLOCAL	BOOL	make_dir	__PR((FINFO *info));
XLOCAL	BOOL	make_link	__PR((FINFO *info));
XLOCAL	BOOL	make_symlink	__PR((FINFO *info));
XLOCAL	BOOL	emul_symlink	__PR((FINFO *info));
XLOCAL	BOOL	emul_link	__PR((FINFO *info));
XLOCAL	BOOL	same_file	__PR((FINFO *info, int what, BOOL do_follow));
XLOCAL	BOOL	make_copy	__PR((FINFO *info, BOOL do_symlink, int eflags));
X#ifdef COPY_LINKS_DELAYED
XLOCAL	void	add_copy	__PR((FINFO *info, BOOL do_symlink));
XLOCAL	void	make_copies	__PR((void));
XLOCAL	BOOL	_make_dcopy	__PR((FINFO *info, BOOL do_symlink, int *retp, int eflags));
X#endif
XLOCAL	BOOL	_make_copy	__PR((FINFO *info, BOOL do_symlink, int eflags));
XLOCAL	int	copy_file	__PR((char *from, char *to, BOOL do_symlink, int eflags));
XLOCAL	BOOL	make_fifo	__PR((FINFO *info));
XLOCAL	BOOL	make_special	__PR((FINFO *info));
XLOCAL	BOOL	file_tmpname	__PR((FINFO *info, char *xname));
XLOCAL	FILE	*file_open	__PR((FINFO *info, char *name));
XLOCAL	BOOL	get_file	__PR((FINFO *info));
XLOCAL	BOOL	install_rename	__PR((FINFO *info, char *xname));
XLOCAL	BOOL	name_exists	__PR((char *name));
XLOCAL	void	remove_tmpname	__PR((char *name));
XLOCAL	BOOL	get_ofile	__PR((FILE *f, FINFO *info));
XLOCAL	int	void_func	__PR((void *vp, char *p, int amount));
XEXPORT	BOOL	void_file	__PR((FINFO * info));
XLOCAL	BOOL	void_bad	__PR((FINFO * info));
XEXPORT	int	xt_file		__PR((FINFO * info,
X					int (*)(void *, char *, int),
X					void *arg, int amt, char *text));
XEXPORT	void	skip_slash	__PR((FINFO * info));
XLOCAL	BOOL	has_dotdot	__PR((char *name));
X
X#ifdef COPY_LINKS_DELAYED
Xtypedef	struct _mcq {
X	struct _mcq *next;
X	FINFO	info;
X	BOOL	do_symlink;
X} MCQ;
X
XLOCAL	MCQ	*mcq_1st	= NULL;
XLOCAL	MCQ	*mcq_last	= NULL;
X
X#endif
X
X/*
X * This is used to allow extracting archives as non root when they
X * contain read only directories. It tries to stay as close as possible
X * to the user's umask when creating intermediate directories.
X * We do not modify the umask in a way that would even grant unepected
X * permissions to others for a short time.
X */
XLOCAL	mode_t	old_umask;
XLOCAL	mode_t	mode_mask;
X
X#define	PERM_BITS	(S_IRWXU|S_IRWXG|S_IRWXO)	/* u/g/o basic perm */
X
XLOCAL void
Xinit_umask()
X{
X	old_umask = umask((mode_t)0);
X	mode_mask = PERM_BITS & ~old_umask;
X	if (my_uid != ROOT_UID)
X		umask(old_umask & ~S_IRWXU);
X	else
X		umask(old_umask);
X}
X
XEXPORT void
Xextract(vhname)
X	char	*vhname;
X{
X#ifdef	USE_FIND
Xextern	struct WALK walkstate;
X#endif
X		FINFO	finfo;
X		TCB	tb;
X		char	name[PATH_MAX+1];
X		char	lname[PATH_MAX+1];
X	register TCB 	*ptb = &tb;
X		BOOL	restore_init = FALSE;
X		imap_t	*imp = NULL;
X
X	init_umask();		/* Needed to extract read only directories */
X
X	if (dorestore)		/* With incremental restore, we need to open */
X		sym_open(NULL);	/* the 'star-symtable' first.		    */
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X
X#ifdef	USE_FIND
X	if (dofind) {
X		walkopen(&walkstate);
X		walkgethome(&walkstate);	/* Needed in case we chdir */
X	}
X#endif
X	finfo.f_tcb = ptb;
X	for (;;) {
X		if (get_tcb(ptb) == EOF)
X			break;
X		finfo.f_name = name;
X		finfo.f_lname = lname;
X		if (tcb_to_info(ptb, &finfo) == EOF)
X			break;
X		if (xdebug > 0)
X			dump_info(&finfo);
X		if (prblockno)
X			(void) tblocks();		/* set curblockno */
X
X		if (is_volhdr(&finfo)) {
X			if (!get_volhdr(&finfo, vhname)) {
X				excomerrno(EX_BAD,
X				"Volume Header '%s' does not match '%s'.\n",
X							finfo.f_name, vhname);
X			}
X			void_file(&finfo);
X			continue;
X		}
X#ifdef	USE_FIND
X		if (dofind && !findinfo(&finfo)) {
X			void_file(&finfo);
X			continue;
X		}
X#endif
X		if (finfo.f_flags & F_BAD_META) {
X			if (!void_bad(&finfo))
X				break;
X			continue;
X		}
X
X		if (!abs_path &&	/* XXX VVV siehe skip_slash() */
X		    (finfo.f_name[0] == '/' /* || finfo.f_lname[0] == '/'*/))
X			skip_slash(&finfo);
X
X		if (dorestore) {
X			extern	GINFO	*grip;	/* Global read info pointer */
X
X			if (!restore_init) {
X				curfs = finfo.f_dev;
X				sym_init(grip);
X				restore_init = TRUE;
X			}
X
X			imp = sym_addrec(&finfo);
X			if (is_dir(&finfo) && grip->dumplevel > 0)
X				imp = sym_dirprepare(&finfo, imp);
X		}
X
X		/*
X		 * Special treatment for the idiosyncratic way of dealing with
X		 * hard links in the SVr4 CRC cpio archive format.
X		 * The link count is handled by calling read_link() in
X		 * cpiotcb_to_info() before.
X		 */
X		if ((props.pr_flags & PR_SV_CPIO_LINKS) != 0 &&
X		    !is_dir(&finfo) &&
X		    (is_link(&finfo) || finfo.f_nlink > 1)) {
X			if (!last_cpio_link(&finfo))	/* Ign. all but last */
X				continue;
X			if (xcpio_link(&finfo))		/* Now extract all   */
X				continue;
X		}
X		extracti(&finfo, imp);
X	}
X#ifdef	USE_FIND
X	if (dofind) {
X		walkhome(&walkstate);
X		walkclose(&walkstate);
X		free(walkstate.twprivate);
X	}
X#endif
X
X#ifdef COPY_LINKS_DELAYED
X	if (copyhardlinks || copysymlinks)
X		make_copies();
X#endif
X	dirtimes("", (struct timeval *)0, (mode_t)0);
X	if (dorestore)
X		sym_close();
X}
X
X/*
X * Extract one file from archive
X */
XEXPORT BOOL
Xextracti(info, imp)
X		FINFO	*info;
X		imap_t	*imp;
X{
X		FINFO	cinfo;
X		TCB	tb;
X	register TCB 	*ptb = &tb;
X		char	*name = info->f_name;
X
X	if (listfile && !hash_lookup(info->f_name)) {
X		void_file(info);
X		return (FALSE);
X	}
X	if (hash_xlookup(info->f_name)) {
X		void_file(info);
X		return (FALSE);
X	}
X	if (havepat && !match(info->f_name)) {
X		void_file(info);
X		return (FALSE);
X	}
X	if (!is_file(info) && to_stdout) {
X		void_file(info);
X		return (FALSE);
X	}
X	if (is_special(info) && nospec) {
X		if (!errhidden(E_SPECIALFILE, info->f_name)) {
X			if (!errwarnonly(E_SPECIALFILE, info->f_name))
X				xstats.s_isspecial++;
X			errmsgno(EX_BAD,
X				"'%s' is not a file. Not created.\n",
X							info->f_name);
X			(void) errabort(E_SPECIALFILE, info->f_name, TRUE);
X		}
X		void_file(info);
X		return (FALSE);
X	}
X	/*
X	 * If uncond is set and neither keep_old nor refresh_old is set,
X	 * then newer() doesn't call getinfo(&cinfo).
X	 * As newer() calls getinfo(&cinfo), it also checks for refresh_old.
X	 */
X	if (newer(info, &cinfo) && !(xdir && is_dir(info))) {
X		void_file(info);
X		return (FALSE);
X	}
X	if (is_symlink(info) && same_symlink(info)) {
X		void_file(info);
X		return (FALSE);
X	}
X	if (do_subst && subst(info)) {
X		if (info->f_name[0] == '\0') {
X			if (verbose)
X				fprintf(vpr,
X				"'%s' substitutes to null string, skipping ...\n",
X							name);
X			void_file(info);
X			return (FALSE);
X		}
X	}
X	if (interactive && !ia_change(ptb, info)) {
X		if (!nflag)
X			fprintf(vpr, "Skipping ...\n");
X		void_file(info);
X		return (FALSE);
X	}
X	if (!(interactive || allow_dotdot) && has_dotdot(info->f_name)) {
X		if (!errhidden(E_SECURITY, info->f_name)) {
X			if (!errwarnonly(E_SECURITY, info->f_name))
X				xstats.s_security++;
X			errmsgno(EX_BAD,
X			"'%s' contains '..', skipping ...\n", info->f_name);
X			(void) errabort(E_SECURITY, info->f_name, TRUE);
X		}
X		void_file(info);
X		return (FALSE);
X	}
X	if (secure_links && (is_link(info) || is_symlink(info)) &&
X	    (info->f_lname[0] == '/' || has_dotdot(info->f_lname))) {
X		if (!errhidden(E_LSECURITY, info->f_lname)) {
X			if (!errwarnonly(E_LSECURITY, info->f_lname))
X				xstats.s_lsecurity++;
X			errmsgno(EX_BAD,
X			"'%s' potentially insecure link, skipping ...\n", info->f_name);
X			(void) errabort(E_LSECURITY, info->f_lname, TRUE);
X		}
X		void_file(info);
X		return (FALSE);
X	}
X	vprint(info);
X	if (dorestore) {
X		/*
X		 * Check whether the target file exists and has a
X		 * different type or is a dev node with different
X		 * major/minor numbers. In this case, we need to
X		 * remove the file. This happend when the original
X		 * file has been removed and a new (different) file
X		 * with the same name did get the same inode number.
X		 */
X		imp = sym_typecheck(info, &cinfo, imp);
X
X	} else if (remove_first && !dometa) {
X		/*
X		 * With keep_old we do not come here.
X		 *
X		 * Even if the archive and the current node are both
X		 * directories call remove_file() because the new dir
X		 * may get our ownership this way if we are not root.
X		 *
X		 * In order to avoid annoying messages, call remove_file()
X		 * only if the file exists.
X		 */
X		if (name_exists(info->f_name))
X			(void) remove_file(info->f_name, TRUE);
X	}
X	if (is_dir(info)) {
X#ifdef	MKD_DEBUG
X		{ extern char *mkdwhy; mkdwhy = "extract"; }
X#endif
X		if (!make_adir(info)) {
X			void_file(info);
X			return (FALSE);
X		}
X		void_file(info);
X	} else if (is_link(info)) {
X		if (!make_link(info)) {
X			void_file(info);
X			return (FALSE);
X		}
X		void_file(info);
X	} else if (is_symlink(info)) {
X		if (dorestore && imp) {
X			/*
X			 * Do not create a new link if the old one is the same.
X			 */
X			if (cinfo.f_rxftype != XT_NONE && (cinfo.f_flags & F_SAME))
X				goto set_modes;
X		}
X		if (!make_symlink(info)) {
X			void_file(info);
X			return (FALSE);
X		}
X		void_file(info);
X	} else if (is_special(info)) {
X		if (dorestore && imp) {
X			/*
X			 * Do not create a new node if the old one is the same.
X			 */
X			if (cinfo.f_rxftype != XT_NONE && (cinfo.f_flags & F_SAME))
X				goto set_modes;
X		}
X		if (is_door(info)) {
X			if (!nowarn) {
X				errmsgno(EX_BAD,
X				"WARNING: Extracting door '%s' as plain file.\n",
X						info->f_name);
X			}
X			if (!get_file(info))
X				return (FALSE);
X		} else if (is_fifo(info)) {
X			if (!make_fifo(info)) {
X				void_file(info);
X				return (FALSE);
X			}
X			void_file(info);
X		} else {
X			if (!make_special(info)) {
X				void_file(info);
X				return (FALSE);
X			}
X			void_file(info);
X		}
X	} else if (is_meta(info)) {
X		FINFO	finfo;
X
X		/*
X		 * Make sure not to overwrite existing files.
X		 */
X		if (xmeta && !_getinfo(info->f_name, &finfo)) {
X			if (!get_file(info))
X				return (FALSE);
X		} else {
X			void_file(info);
X		}
X	} else if (!get_file(info)) {
X		return (FALSE);
X	}
X
X#ifdef COPY_LINKS_DELAYED
X	if ((copyhardlinks && is_link(info)) ||
X	    (copysymlinks && is_symlink(info)))
X		return (TRUE);
X#endif
Xset_modes:
X	if (!to_stdout)
X		setmodes(info);
X#ifdef	TEST_DEBUG
Xif (info->f_mode == 0700)
Xerror("-->setmode(%s, %llo)\n", info->f_name, (Ullong)info->f_mode);
X#endif
X	if (dorestore)
X		sym_addstat(info, imp);
X	return (TRUE);
X}
X
X/*
X * Return TRUE if the file on disk is newer than the file on the archive.
X */
XEXPORT BOOL
Xnewer(info, cinfo)
X	FINFO	*info;
X	FINFO	*cinfo;
X{
X
X	if (uncond && !keep_old && !refresh_old)
X		return (FALSE);
X	if (!_getinfo(info->f_name, cinfo)) {
X		if (refresh_old) {
X			errmsgno(EX_BAD, "file '%s' does not exists.\n", info->f_name);
X			return (TRUE);
X		}
X		return (FALSE);
X	}
X	if (keep_old) {
X		if (!nowarn)
X			errmsgno(EX_BAD, "file '%s' exists.\n", info->f_name);
X		return (TRUE);
X	}
X	if (uncond)
X		return (FALSE);
X
X	if (xdot) {
X		if (info->f_name[0] == '.' &&
X		    (info->f_name[1] == '\0' ||
X		    (info->f_name[1] == '/' &&
X		    info->f_name[2] == '\0'))) {
X
X			return (FALSE);
X		}
X	}
X
X	/*
X	 * XXX nsec beachten wenn im Archiv!
X	 */
X	if (cinfo->f_mtime >= info->f_mtime) {
X
X	isnewer:
X		if (xdir && is_dir(info))	/* Be silent, we handle it later */
X			return (TRUE);
X		if (!nowarn)
X			errmsgno(EX_BAD, "current '%s' newer.\n", info->f_name);
X		return (TRUE);
X	} else if ((cinfo->f_mtime % 2) == 0 && (cinfo->f_mtime + 1) == info->f_mtime) {
X		/*
X		 * The DOS FAT filestem does only support a time granularity
X		 * of 2 seconds. So we need to be a bit more generous.
X		 * XXX We should be able to test the filesytem type.
X		 */
X		goto isnewer;
X	}
X	return (FALSE);
X}
X
XEXPORT BOOL
Xsame_symlink(info)
X	FINFO	*info;
X{
X	FINFO	finfo;
X	char	lname[PATH_MAX+1];
X	TCB	tb;
X
X	finfo.f_lname = lname;
X	finfo.f_lnamelen = 0;
X
X	if (uncond || !_getinfo(info->f_name, &finfo))
X		return (FALSE);
X
X	/*
X	 * Bei symlinks gehen nicht: lchmod lchtime & teilweise lchown
X	 */
X#ifdef	S_IFLNK
X	if (!is_symlink(&finfo))	/* File on disk */
X		return (FALSE);
X
X	fillbytes(&tb, sizeof (TCB), '\0');
X	info_to_tcb(&finfo, &tb);	/* XXX ist das noch nötig ??? */
X					/* z.Zt. wegen linkflag/uname/gname */
X
X	if (read_symlink(info->f_name, info->f_name, &finfo, &tb)) {
X		if (streql(info->f_lname, finfo.f_lname)) {
X			if (!nowarn)
X				errmsgno(EX_BAD, "current '%s' is same symlink.\n",
X								info->f_name);
X			return (TRUE);
X		}
X	}
X#ifdef	XXX
X	/*
X	 * XXX nsec beachten wenn im Archiv!
X	 */
X	if (finfo.f_mtime >= info->f_mtime) {
X		if (!nowarn)
X			errmsgno(EX_BAD, "current '%s' newer.\n", info->f_name);
X		return (TRUE);
X	}
X#endif	/* XXX */
X
X#endif
X	return (FALSE);
X}
X
XEXPORT BOOL
Xsame_special(info)
X	FINFO	*info;
X{
X	FINFO	finfo;
X
X	if (uncond || !_getinfo(info->f_name, &finfo))
X		return (FALSE);
X
X	if (info->f_xftype != finfo.f_xftype)
X		return (FALSE);
X
X	if (is_bdev(info) || is_cdev(info)) {
X		if (info->f_rdevmaj != finfo.f_rdevmaj)
X			return (FALSE);
X		if (info->f_rdevmin != finfo.f_rdevmin)
X			return (FALSE);
X	}
X	return (TRUE);
X}
X
X/*
X * Create intermediate directories.
X * If the user is not root and the umask is degenerated or read-only,
X * we add 0700 to the granted permissions. For this reason, we may need
X * to correct the permissins of intermediate directories later from the
X * directory stack.
X */
XLOCAL BOOL
X_create_dirs(name)
X	register char	*name;
X{
X	mode_t	mode;
X
X	mode = mode_mask;				/* used to be 0777 */
X	if (my_uid != ROOT_UID)
X		mode |= S_IRWXU;	/* Make sure we will be able write */
X
X	if (mkdir(name, mode) < 0) {
X		if (create_dirs(name) &&
X		    mkdir(name, mode) >= 0) {
X			_dir_setownwer(name);
X			if (mode != mode_mask)
X				sdirmode(name, mode_mask); /* Push umask */
X			return (TRUE);
X		}
X		return (FALSE);
X	}
X	_dir_setownwer(name);
X	if (mode != mode_mask)
X		sdirmode(name, mode_mask);	/* Push umask on dirstack */
X	return (TRUE);
X}
X
X/*
X * Set the owner/group of intermedia directories.
X * Be very careful not to overwrite sgid directory semantics.
X */
XLOCAL void
X_dir_setownwer(name)
X	char	*name;
X{
X	FINFO	dinfo;
X
X	if (my_uid != ROOT_UID)
X		return;
X
X	if (dir_uid == _BAD_UID && dir_gid == _BAD_GID)
X		return;
X
X	if (!_getinfo(name, &dinfo) || !is_dir(&dinfo))
X		return;
X
X	if (dir_uid != _BAD_UID)
X		dinfo.f_uid = dir_uid;
X	if (dir_gid != _BAD_GID)
X		dinfo.f_gid = dir_gid;
X
X	chown(name, dinfo.f_uid, dinfo.f_gid);
X}
X
XEXPORT BOOL
Xcreate_dirs(name)
X	register char	*name;
X{
X	register char	*np;
X	register char	*dp;
X		int	err;
X		int	olderr = 0;
X
X	if (noxdir) {
X		errmsgno(EX_BAD, "Directories not created.\n");
X		return (FALSE);
X	}
X	np = dp = name;
X	do {
X		if (*np == '/')
X			dp = np;
X	} while (*np++);
X	if (dp == name) {
X		/*
X		 * Do not create the very last directory
X		 */
X		return (TRUE);
X	}
X	*dp = '\0';
X	if (access(name, F_OK) < 0) {
X		if (_create_dirs(name)) {
X			*dp = '/';
X			return (TRUE);
X		}
X		err = geterrno();
X		if ((err == EACCES || is_eexist(err))) {
X			olderr = err;
X			goto exists;
X		}
X		*dp = '/';
X		return (FALSE);
X	} else {
X		FINFO	dinfo;
X
X	exists:
X		if (_getinfo(name, &dinfo)) {
X			if (is_dir(&dinfo)) {
X				*dp = '/';
X				return (TRUE);
X			}
X
X			if (remove_file(name, FALSE)) {
X				if (_create_dirs(name)) {
X					*dp = '/';
X					return (TRUE);
X				}
X				*dp = '/';
X				return (FALSE);
X			} else {
X				*dp = '/';
X				return (FALSE);
X			}
X		}
X		*dp = '/';
X		if (olderr == EACCES)
X			seterrno(olderr);
X		return (FALSE);
X	}
X}
X
X#ifdef	MKD_DEBUG
XEXPORT char	*mkdwhy;
X#endif
X
XEXPORT BOOL
Xmake_adir(info)
X	FINFO	*info;
X{
X	if (is_link(info))
X		return (make_link(info));
X	else
X		return (make_dir(info));
X}
X
X/*
X * This function is used only to create directories found on the archive.
X * Intermediate directories are created using create_dirs().
X */
XLOCAL BOOL
Xmake_dir(info)
X	FINFO	*info;
X{
X	FINFO	dinfo;
X	mode_t	mode;
X	int	err;
X
X	if (dometa)
X		return (TRUE);
X
X	mode = osmode(info->f_mode);	/* Convert TAR modes to OS modes */
X	mode &= mode_mask;		/* Apply current umask */
X	if (my_uid != ROOT_UID)
X		mode |= S_IRWXU;	/* Make sure we will be able write */
X
X	if (_getinfo(info->f_name, &dinfo) && is_dir(&dinfo))
X		return (TRUE);
X
X	if (create_dirs(info->f_name)) {
X		if (_getinfo(info->f_name, &dinfo) && is_dir(&dinfo))
X			return (TRUE);
X		if (mkdir(info->f_name, mode) >= 0)
X			return (TRUE);
X		err = geterrno();
X		if ((err == EACCES || is_eexist(err)) &&
X				remove_file(info->f_name, FALSE)) {
X			if (mkdir(info->f_name, mode) >= 0)
X				return (TRUE);
X		}
X	}
X#ifdef	MKD_DEBUG
X	errmsgno(EX_BAD, "make_dir(%s) called from '%s'\n", info->f_name, mkdwhy);
X#endif
X	if (!errhidden(E_OPEN, info->f_name)) {
X		if (!errwarnonly(E_OPEN, info->f_name))
X			xstats.s_openerrs++;
X		errmsg("Cannot make dir '%s'.\n", info->f_name);
X		(void) errabort(E_OPEN, info->f_name, TRUE);
X	}
X	return (FALSE);
X}
X
XLOCAL BOOL
Xmake_link(info)
X	FINFO	*info;
X{
X	int	err;
X#ifdef	USE_FFLAGS
X	FINFO	linfo;
X	Ulong	oldflags = 0L;
X#endif
X	char	xname[PATH_MAX+1];
X	char	*name = info->f_name;
X
X	/*
X	 * void_file() is needed for CPIO and done by our callers.
X	 */
X
X	if (dometa)
X		return (TRUE);
X
X#ifdef	HAVE_LINK_NOFOLLOW
X	/*
X	 * This OS allows hard links to symlinks and does not follow symlinks
X	 * when making hard links to symlinks. We may not follow symlinks while
X	 * we check if source & sestination are the same.
X	 */
X	if (same_file(info, IS_LINK, FALSE)) {
X#else
X	/*
X	 * This OS either does not allow hard links to symlinks or follows
X	 * symlinks if possible before making a hard link to a symlink.
X	 * We need not follow symlinks while we check if source & sestination
X	 * are the same.
X	 */
X	if (same_file(info, IS_LINK, TRUE)) {
X#endif
X		/*
X		 * As it seems that from/to for the hard link are already
X		 * identical files, return TRUE to indicate success with
X		 * creating the hard link.
X		 */
X		return (TRUE);
X	}
X
X	if (copyhardlinks)
X		return (make_copy(info, FALSE, 0));
X	else if (hardlinks)
X		return (emul_link(info));
X
X#ifdef	HAVE_LINK
X	xname[0] = '\0';
X	if (do_install && name_exists(name)) {
X		if (!file_tmpname(info, xname))
X			return (FALSE);
X		name = xname;
X	}
X	if (link(info->f_lname, name) >= 0)
X		goto ok;
X	err = geterrno();
X	if (info->f_rsize > 0 && is_enoent(err))
X		return (get_file(info));
X#ifdef	USE_FFLAGS
X	/*
X	 * SF_IMMUTABLE might be set on the source-file. Clear the flags
X	 * and try again.
X	 */
X	if (_getinfo(info->f_lname, &linfo) && (linfo.f_xflags & XF_FFLAGS)) {
X		oldflags = linfo.f_fflags;
X		linfo.f_fflags = 0L;
X		set_fflags(&linfo);
X		if (link(info->f_lname, name) >= 0)
X			goto restore_flags;
X		err = geterrno();
X	}
X#endif
X	if (create_dirs(info->f_name)) {
X		if (link(info->f_lname, name) >= 0)
X			goto restore_flags;
X		err = geterrno();
X	}
X	if ((err == EACCES || is_eexist(err)) &&
X			remove_file(name, FALSE)) {
X		if (link(info->f_lname, name) >= 0)
X			goto restore_flags;
X	}
X	if (!errhidden(E_OPEN, info->f_name)) {
X		if (!errwarnonly(E_OPEN, info->f_name))
X			xstats.s_openerrs++;
X		errmsg("Cannot link '%s' to '%s'.\n",
X				info->f_name, info->f_lname);
X		(void) errabort(E_OPEN, info->f_name, TRUE);
X	}
X	if (do_install)
X		remove_tmpname(xname);
X	return (FALSE);
X
Xrestore_flags:
X#ifdef	USE_FFLAGS
X	if (oldflags != 0L) {
X		linfo.f_fflags = oldflags;
X		set_fflags(&linfo);
X	}
X#endif
Xok:
X	if (do_install)
X		return (install_rename(info, xname));
X	return (TRUE);
X
X#else	/* HAVE_LINK */
X	if (!errhidden(E_SPECIALFILE, info->f_name)) {
X		if (!errwarnonly(E_SPECIALFILE, info->f_name))
X			xstats.s_isspecial++;
X		errmsgno(EX_BAD,
X		"Not supported. Cannot link '%s' to '%s'.\n",
X						info->f_name, info->f_lname);
X		(void) errabort(E_SPECIALFILE, info->f_name, TRUE);
X	}
X	return (FALSE);
X#endif	/* HAVE_LINK */
X}
X
XLOCAL BOOL
Xmake_symlink(info)
X	FINFO	*info;
X{
X	int	err;
X	char	xname[PATH_MAX+1];
X	char	*name = info->f_name;
X
X	if (dometa)
X		return (TRUE);
X
X	if (copysymlinks)
X		return (make_copy(info, TRUE, 0));
X	else if (symlinks)
X		return (emul_symlink(info));
X
X#ifdef	S_IFLNK
X	xname[0] = '\0';
X	if (do_install && name_exists(name)) {
X		if (!file_tmpname(info, xname))
X			return (FALSE);
X		name = xname;
X	}
X	if (sxsymlink(name, info) >= 0)
X		goto ok;
X	err = geterrno();
X	if (create_dirs(info->f_name)) {
X		if (sxsymlink(name, info) >= 0)
X			goto ok;
X		err = geterrno();
X	}
X	/*
X	 * XXX at least with same symlinks we should return success
X	 */
X	if ((err == EACCES || is_eexist(err)) &&
X			remove_file(name, FALSE)) {
X		if (sxsymlink(name, info) >= 0)
X			goto ok;
X	}
X	if (!errhidden(E_OPEN, info->f_name)) {
X		if (!errwarnonly(E_OPEN, info->f_name))
X			xstats.s_openerrs++;
X		errmsg("Cannot create symbolic link '%s' to '%s'.\n",
X						info->f_name, info->f_lname);
X		(void) errabort(E_OPEN, info->f_name, TRUE);
X	}
X	if (do_install)
X		remove_tmpname(xname);
X	return (FALSE);
Xok:
X	if (do_install)
X		return (install_rename(info, xname));
X	return (TRUE);
X#else	/* S_IFLNK */
X	if (!errhidden(E_SPECIALFILE, info->f_name)) {
X		if (!errwarnonly(E_SPECIALFILE, info->f_name))
X			xstats.s_isspecial++;
X		errmsgno(EX_BAD,
X		"Not supported. Cannot create symbolic link '%s' to '%s'.\n",
X						info->f_name, info->f_lname);
X		(void) errabort(E_SPECIALFILE, info->f_name, TRUE);
X	}
X	return (FALSE);
X#endif	/* S_IFLNK */
X}
X
XLOCAL BOOL
Xemul_symlink(info)
X	FINFO	*info;
X{
X	errmsgno(EX_BAD, "Option -symlinks not yet implemented.\n");
X	errmsgno(EX_BAD, "Cannot create symbolic link '%s' to '%s'.\n",
X						info->f_name, info->f_lname);
X	return (FALSE);
X}
X
XLOCAL BOOL
Xemul_link(info)
X	FINFO	*info;
X{
X	errmsgno(EX_BAD, "Option -hardlinks not yet implemented.\n");
X	errmsgno(EX_BAD, "Cannot link '%s' to '%s'.\n", info->f_name, info->f_lname);
X#ifdef	HAVE_LINK
X	return (FALSE);
X#else
X	return (FALSE);
X#endif	/* S_IFLNK */
X}
X
XLOCAL BOOL
Xsame_file(info, what, do_follow)
X	FINFO	*info;
X	int	what;
X	BOOL	do_follow;
X{
X	FINFO	finfo;
X	FINFO	linfo;
X	BOOL	ofollow = follow;
X	BOOL	ret = FALSE;
X
X	follow = do_follow;
X	if (_getinfo(info->f_name, &finfo) && _getinfo(info->f_lname, &linfo)) {
X		if (finfo.f_dev == linfo.f_dev && finfo.f_ino == linfo.f_ino) {
X			if (what == IS_COPY) {
X				if (!errhidden(E_SAMEFILE, info->f_lname)) {
X					if (!errwarnonly(E_SAMEFILE, info->f_lname))
X						xstats.s_samefile++;
X					errmsgno(EX_BAD,
X					"copy_file: '%s' from/to identical, skipping ...\n",
X						info->f_name);
X					(void) errabort(E_SAMEFILE,
X							info->f_lname, TRUE);
X				}
X			} else {
X				/*
X				 * If in restore mode, we do not like to see
X				 * this informational message. The hard link
X				 * is already present and this is all we need.
X				 * If -force-remove has been specified (default
X				 * for "tar") we do not like to see this message
X				 * either.
X				 */
X				if (!nowarn && !dorestore && !force_remove) {
X					errmsgno(EX_BAD,
X					"Notice: link_file: '%s' from/to identical, skipping ...\n",
X						info->f_name);
X				}
X			}
X			ret = TRUE;
X		}
X	}
X	follow = ofollow;
X	return (ret);
X}
X
XLOCAL BOOL
Xmake_copy(info, do_symlink, eflags)
X	FINFO	*info;
X	BOOL	do_symlink;
X	int	eflags;
X{
X#ifdef COPY_LINKS_DELAYED
X	if (!lowmem) {
X		add_copy(info, do_symlink);
X		return (TRUE);
X	} else {
X		return (_make_copy(info, do_symlink, eflags));
X	}
X#else
X	return (_make_copy(info, do_symlink, eflags));
X#endif
X}
X
XLOCAL BOOL
X_make_copy(info, do_symlink, eflags)
X	FINFO	*info;
X	BOOL	do_symlink;
X	int	eflags;
X{
X	int	ret;
X	int	err;
X
X#ifdef COPY_LINKS_DELAYED
X	if (!lowmem && copydlinks) {
X		if (_make_dcopy(info, do_symlink, &ret, eflags))
X			return (ret);
X	}
X#endif
X	/*
X	 * As we can only copy plain files, we need to follow symlinks when
X	 * we check if source & destination are the same file.
X	 */
X	if (same_file(info, IS_COPY, TRUE)) {
X		return (FALSE);
X	}
X
X	if ((ret = copy_file(info->f_lname, info->f_name, do_symlink, eflags)) >= 0)
X		return (TRUE);
X	err = geterrno();
X	if (ret != -2 && create_dirs(info->f_name)) {
X		if (copy_file(info->f_lname, info->f_name, do_symlink, eflags) >= 0)
X			return (TRUE);
X		err = geterrno();
X	}
X	if ((err == EACCES || is_eexist(err) || err == EISDIR) &&
X			remove_file(info->f_name, FALSE)) {
X		if (copy_file(info->f_lname, info->f_name, do_symlink, eflags) >= 0)
X			return (TRUE);
X	}
X	if (!errhidden(E_OPEN, info->f_name) &&
X	    ((eflags & HIDE_ENOENT) == 0 || geterrno() != ENOENT)) {
X		if (!errwarnonly(E_OPEN, info->f_name))
X			xstats.s_openerrs++;
X		errmsg("Cannot create link copy '%s' from '%s'.\n",
X					info->f_name, info->f_lname);
X		(void) errabort(E_OPEN, info->f_name, TRUE);
X	}
X	return (FALSE);
X}
X
X#ifdef COPY_LINKS_DELAYED
XLOCAL void
Xadd_copy(info, do_symlink)
X	FINFO	*info;
X	BOOL	do_symlink;
X{
X	MCQ	*mcqp	   = ___malloc(sizeof (MCQ), "make_copy()");
X	char	*f_namep   = ___savestr(info->f_name);
X	char	*f_lnamep  = ___savestr(info->f_lname);
X
X	mcqp->next	   = NULL;
X	mcqp->do_symlink   = do_symlink;
X	mcqp->info	   = *info;
X	mcqp->info.f_name  = f_namep;
X	mcqp->info.f_lname = f_lnamep;
X
X	if (mcq_last) {
X		mcq_last->next = mcqp;
X		mcq_last = mcqp;
X	} else {
X		mcq_1st = mcqp;
X		mcq_last = mcqp;
X	}
X}
X
XLOCAL void
Xmake_copies()
X{
X	int	eflags	= HIDE_ENOENT;
X
X	do {
X		MCQ	*mcqp		= mcq_1st;
X		MCQ	*mcqp_prev	= NULL;
X		int	mcq_removed	= 0;
X
X		while (mcqp) {
X			MCQ	*mcqp_save	= mcqp;
X			BOOL	ret		= _make_copy(&mcqp->info, mcqp->do_symlink, eflags);
X
X			if (ret) {
X				if (!to_stdout)
X					setmodes(&mcqp->info);
X				if (dorestore)
X					sym_addstat(&mcqp->info, NULL);
X			}
X			mcqp = mcqp->next;
X
X			if (ret || (eflags & HIDE_ENOENT) == 0 || geterrno() != ENOENT) {
X
X				if (mcqp_prev)
X					mcqp_prev->next = mcqp;
X				if (mcq_1st == mcqp_save)
X					mcq_1st = mcqp;
X				if (mcq_last == mcqp_save)
X					mcq_last = mcqp;
X
X				free(mcqp_save->info.f_name);
X				free(mcqp_save->info.f_lname);
X				free(mcqp_save);
X
X				mcq_removed++;
X
X			} else {
X				mcqp_prev = mcqp_save;
X			}
X		}
X		if (!mcq_removed)
X			eflags = 0;	/* queue has not decreased - last attempt */
X
X	} while (mcq_1st);
X}
X
XLOCAL BOOL
X_make_dcopy(info, do_symlink, retp, eflags)
X	FINFO	*info;
X	BOOL	do_symlink;
X	int	*retp;
X	int	eflags;
X{
X	char	nbuf[PATH_MAX+1];
X	char	*dir = info->f_lname;
X	char	*dp;
X	int	nents;
X	int	ret = TRUE;
X	FINFO	ninfo;
X
X	if (do_symlink && info->f_lname[0] != '/') {
X
X		char	*p = strrchr(info->f_name, '/');
X		int	len;
X
X		if (p) {
X			len = p - info->f_name + 1;
X			strncpy(nbuf, info->f_name, len);
X			if ((len + strlen(info->f_lname)) > PATH_MAX) {
X				if (!errhidden(E_NAMETOOLONG, info->f_lname)) {
X					if (!errwarnonly(E_NAMETOOLONG, info->f_lname))
X						xstats.s_toolong++;
X					errmsgno(EX_BAD,
X					"Name too long. Cannot copy from '%s'.\n",
X					info->f_lname);
X					(void) errabort(E_NAMETOOLONG,
X							info->f_lname, TRUE);
X				}
X				if (retp)
X					*retp = FALSE;
X				return (TRUE);
X			}
X			strcpy(&nbuf[len], info->f_lname);
X			dir = nbuf;
X		}
X	}
X
X	if ((dp = fetchdir(dir, &nents, NULL, NULL)) == NULL)
X		return (FALSE);
X
X	if (!_getinfo(info->f_name, &ninfo)) {
X		_getinfo(dir, &ninfo);
X		ninfo.f_name = info->f_name;
X		make_dir(&ninfo);
X	}
X
X	while (nents > 0) {
X		char	*name;
X		int	nlen;
X
X		name = &dp[1];
X		nlen = strlen(name);
X
X		ninfo.f_name = ___malloc(strlen(info->f_name) +
X					1 + nlen + 1, "make_copy()");
X
X		strcpy(ninfo.f_name, info->f_name);
X		if (ninfo.f_name[strlen(ninfo.f_name)-1] != '/')
X			strcat(ninfo.f_name, "/");
X		strcat(ninfo.f_name, name);
X
X		ninfo.f_lname = ___malloc(3 +
X					strlen(info->f_lname) +	1 +
X					nlen + 1, "make_copy()");
X
X		ninfo.f_lname[0] = '\0';
X		if (do_symlink)
X			strcpy(ninfo.f_lname, "../");
X		strcat(ninfo.f_lname, info->f_lname);
X		if (ninfo.f_lname[strlen(ninfo.f_lname)-1] != '/')
X			strcat(ninfo.f_lname, "/");
X		strcat(ninfo.f_lname, name);
X
X		if (!_make_copy(&ninfo, do_symlink, eflags))
X			ret = FALSE;
X
X		free(ninfo.f_lname);
X		free(ninfo.f_name);
X
X		nents--;
X		dp += nlen +2;
X	}
X	if (retp)
X		*retp = ret;
X	return (TRUE);
X}
X#endif	/* COPY_LINKS_DELAYED */
X
XLOCAL int
Xcopy_file(from, to, do_symlink, eflags)
X	char	*from;
X	char	*to;
X	BOOL	do_symlink;
X	int	eflags;
X{
X	FINFO	finfo;
X	FILE	*fin;
X	FILE	*fout;
X	int	cnt = -1;
X	char	buf[8192];
X	char	nbuf[PATH_MAX+1];
X
X	/*
X	 * When tar archives hard links, both names (from/to) are relative to
X	 * the current directory. With symlinks this does not work. Symlinks
X	 * are always evaluated relative to the directory they reside in.
X	 * For this reason, we cannot simply open the from/to files if we
X	 * like to emulate a symbolic link. To emulate the behavior of a
X	 * symbolic link, we concat the the directory part of the 'to' name
X	 * (which is the path that becomes the sombolic link) to the complete
X	 * 'from' name (which is the path the symbolic linkc pints to) in case
X	 * the 'from' name is a relative path name.
X	 */
X	if (do_symlink && from[0] != '/') {
X		char	*p = strrchr(to, '/');
X		int	len;
X
X		if (p) {
X			len = p - to + 1;
X			strncpy(nbuf, to, len);
X			if ((len + strlen(from)) > PATH_MAX) {
X				if (!errhidden(E_NAMETOOLONG, from)) {
X					if (!errwarnonly(E_NAMETOOLONG, from))
X						xstats.s_toolong++;
X					errmsgno(EX_BAD,
X					"Name too long. Cannot copy from '%s'.\n",
X					from);
X					(void) errabort(E_NAMETOOLONG, from,
X									TRUE);
X				}
X				return (-2);
X			}
X			strcpy(&nbuf[len], from);
X			from = nbuf;
X		}
X	}
X	if (!_getinfo(from, &finfo)) {
X
X		if (!errhidden(E_STAT, from) &&
X		    ((eflags & HIDE_ENOENT) == 0 || geterrno() != ENOENT)) {
X			if (!errwarnonly(E_STAT, from))
X				xstats.s_staterrs++;
X			errmsg("Cannot stat '%s'.\n", from);
X			(void) errabort(E_STAT, from, TRUE);
X		}
X		return (-2);
X	}
X	if (!is_file(&finfo)) {
X		errmsgno(EX_BAD, "Not a file. Cannot copy from '%s'.\n", from);
X		seterrno(EINVAL);
X		return (-2);
X	}
X
Xrretry:
X	if ((fin = fileopen(from, "rub")) == 0) {
X		if (geterrno() == EINTR)
X			goto rretry;
X		errmsg("Cannot open '%s'.\n", from);
X	} else {
Xwretry:
X		if ((fout = fileopen(to, "wtcub")) == 0) {
X			if (geterrno() == EINTR)
X				goto wretry;
X#ifdef	__really__
X			errmsg("Cannot create '%s'.\n", to);
X#endif
X			return (-1);
X		} else {
X			while ((cnt = ffileread(fin, buf, sizeof (buf))) > 0)
X				ffilewrite(fout, buf, cnt);
X			fclose(fout);
X		}
X		fclose(fin);
X	}
X	return (cnt);
X}
X
XLOCAL BOOL
Xmake_fifo(info)
X	FINFO	*info;
X{
X	mode_t	mode;
X	int	err;
X	char	xname[PATH_MAX+1];
X	char	*name = info->f_name;
X
X	if (dometa)
X		return (TRUE);
X
X#ifdef	HAVE_MKFIFO
X	xname[0] = '\0';
X	if (do_install && name_exists(name)) {
X		if (!file_tmpname(info, xname))
X			return (FALSE);
X		name = xname;
X	}
X	mode = osmode(info->f_mode);
X	mode &= mode_mask;
X	if (mkfifo(name, mode) >= 0)
X		goto ok;
X	err = geterrno();
X	if (create_dirs(info->f_name)) {
X		if (mkfifo(name, mode) >= 0)
X			goto ok;
X		err = geterrno();
X	}
X	if ((err == EACCES || is_eexist(err)) &&
X			remove_file(name, FALSE)) {
X		if (mkfifo(name, mode) >= 0)
X			goto ok;
X	}
X	if (!errhidden(E_OPEN, info->f_name)) {
X		if (!errwarnonly(E_OPEN, info->f_name))
X			xstats.s_openerrs++;
X		errmsg("Cannot make fifo '%s'.\n", info->f_name);
X		(void) errabort(E_OPEN, info->f_name, TRUE);
X	}
X	if (do_install)
X		remove_tmpname(xname);
X	return (FALSE);
Xok:
X	if (do_install)
X		return (install_rename(info, xname));
X	return (TRUE);
X#else
X#ifdef	HAVE_MKNOD
X	return (make_special(info));
X#endif
X	if (!errhidden(E_SPECIALFILE, info->f_name)) {
X		if (!errwarnonly(E_SPECIALFILE, info->f_name))
X			xstats.s_isspecial++;
X		errmsgno(EX_BAD,
X			"Not supported. Cannot make fifo '%s'.\n",
X							info->f_name);
X		(void) errabort(E_SPECIALFILE, info->f_name, TRUE);
X	}
X	return (FALSE);
X#endif
X}
X
XLOCAL BOOL
Xmake_special(info)
X	FINFO	*info;
X{
X	mode_t	mode;
X	dev_t	dev;
X	int	err;
X	char	xname[PATH_MAX+1];
X	char	*name = info->f_name;
X
X	if (dometa)
X		return (TRUE);
X
X#ifdef	HAVE_MKNOD
X	xname[0] = '\0';
X	if (do_install && name_exists(name)) {
X		if (!file_tmpname(info, xname))
X			return (FALSE);
X		name = xname;
X	}
X	mode = osmode(info->f_mode);
X	mode &= mode_mask;
X	mode |= info->f_type;	/* Add file type bits */
X	dev = info->f_rdev;
X	if (mknod(name, mode, dev) >= 0)
X		goto ok;
X	err = geterrno();
X	if (create_dirs(info->f_name)) {
X		if (mknod(name, mode, dev) >= 0)
X			goto ok;
X		err = geterrno();
X	}
X	if ((err == EACCES || is_eexist(err)) &&
X			remove_file(name, FALSE)) {
X		if (mknod(name, mode, dev) >= 0)
X			goto ok;
X	}
X	if (!errhidden(E_OPEN, info->f_name)) {
X		if (!errwarnonly(E_OPEN, info->f_name))
X			xstats.s_openerrs++;
X		errmsg("Cannot make %s '%s'.\n",
X					is_fifo(info)?"fifo":"special",
X							info->f_name);
X		(void) errabort(E_OPEN, info->f_name, TRUE);
X	}
X	if (do_install)
X		remove_tmpname(xname);
X	return (FALSE);
Xok:
X	if (do_install)
X		return (install_rename(info, xname));
X	return (TRUE);
X#else
X	if (!errhidden(E_SPECIALFILE, info->f_name)) {
X		if (!errwarnonly(E_SPECIALFILE, info->f_name))
X			xstats.s_isspecial++;
X		errmsgno(EX_BAD, "Not supported. Cannot make %s '%s'.\n",
X					is_fifo(info)?"fifo":"special",
X							info->f_name);
X		(void) errabort(E_SPECIALFILE, info->f_name, TRUE);
X	}
X	return (FALSE);
X#endif
X}
X
X/*
X * Create a temporary path name for the extraction in -install mode.
X */
XLOCAL BOOL
Xfile_tmpname(info, xname)
X	FINFO	*info;
X	char	*xname;
X{
X	register char	*xp = xname;
X	register char	*np;
X	register char	*dp;
X
X	np = info->f_name;
X	dp = xp;
X	do {
X		if ((*xp++ = *np) == '/')
X			dp = xp;
X	} while (*np++);
X	if ((dp - xname) >= (PATH_MAX-6)) {
X		errmsgno(ENAMETOOLONG,
X				"Cannot make temporary name for '%s'.\n",
X				info->f_name);
X		return (FALSE);
X	}
X	strcpy(dp, "XXXXXX");
X	seterrno(0);
X	mktemp(xname);
X	if (xname[0] == '\0') {
X		errmsg("Cannot make temporary name for '%s'.\n",
X				info->f_name);
X		return (FALSE);
X	}
X	return (TRUE);
X}
X
XLOCAL FILE *
Xfile_open(info, name)
X	FINFO	*info;
X	char	*name;
X{
X	FILE	*f;
X
X	while ((f = filemopen(name, "wctub",
X				osmode(info->f_mode) & mode_mask)) == NULL &&
X				geterrno() == EINTR)
X		;
X	return (f);
X}
X
X/*
X * Rename the temporary path to the official path name when in -install mode.
X */
XLOCAL BOOL
Xinstall_rename(info, xname)
X	FINFO	*info;
X	char	*xname;
X{
X	int	err;
X	BOOL	oforce_remove = force_remove;
X
X	/*
X	 * If xname is empty, then we do not need to rename the file as
X	 * there was no temporary name.
X	 */
X	if (xname[0] == '\0')
X		return (TRUE);
X
X	if (rename(xname, info->f_name) >= 0)
X		return (TRUE);
X	err = geterrno();
X	/*
X	 * EISDIR is the error code if we try to rename a non-directory to the
X	 * name of an existing directory. In this case we silently remove this
X	 * directory if it is empty.
X	 */
X	if (err == EISDIR)
X		force_remove = TRUE;
X	if ((err == EACCES || is_eexist(err) || err == EISDIR) &&
X					remove_file(info->f_name, FALSE)) {
X		if (rename(xname, info->f_name) >= 0) {
X			force_remove = oforce_remove;
X			return (TRUE);
X		}
X	}
X	force_remove = oforce_remove;
X	/*
X	 * Rename to the official name did not work, remove the temporary name
X	 */
X	remove_tmpname(xname);
X	return (FALSE);
X}
X
XLOCAL BOOL
Xname_exists(name)
X	char	*name;
X{
X	FINFO	finfo;
X	BOOL	ofollow = follow;
X
X	follow = FALSE;
X	if (!_getinfo(name, &finfo)) {
X		follow = ofollow;
X		return (FALSE);
X	}
X	follow = ofollow;
X	return (TRUE);
X}
X
X/*
X * remove_tmpname() is used to remove the temporary file used with -install
X * in case that the extraction did fail. For this reason make the remove
X * silent and unconditionally.
X */
XLOCAL void
Xremove_tmpname(name)
X	char	*name;
X{
X	BOOL	oforce_remove = force_remove;
X	BOOL	oremove_recursive = remove_recursive;
X
X	/*
X	 * Rename to the official name did not work, remove the temporary name
X	 * in case that the temporary file still exists.
X	 */
X	if (name[0] == '\0')
X		return;
X	if (!name_exists(name))
X		return;
X	/*
X	 * In order to avoid annoying messages, call remove_file()
X	 * only if the file exists.
X	 */
X	force_remove = TRUE;
X	remove_recursive = TRUE;
X	remove_file(name, FALSE);
X	remove_recursive = oremove_recursive;
X	force_remove = oforce_remove;
X}
X
XLOCAL BOOL
Xget_file(info)
X		FINFO	*info;
X{
X		FILE	*f;
X		int	err;
X		char	xname[PATH_MAX+1];
X		char	*name = info->f_name;
X
X	if (dometa) {
X		void_file(info);
X		return (TRUE);
X	}
X
X	if (to_stdout) {
X		f = stdout;
X		goto ofile;
X	}
X	xname[0] = '\0';
X	if (do_install && name_exists(name)) {
X		if (!file_tmpname(info, xname))
X			return (FALSE);
X		name = xname;
X	}
X	if ((f = file_open(info, name)) == (FILE *)NULL) {
X		err = geterrno();
X		if (err == EMISSDIR && create_dirs(info->f_name)) {
X			if ((f = file_open(info, name)) != (FILE *)NULL) {
X				goto ofile;
X			}
X			err = geterrno();
X		}
X		if ((err == EACCES || is_eexist(err) || err == EISDIR) &&
X					remove_file(name, FALSE)) {
X			if ((f = file_open(info, name)) != (FILE *)NULL) {
X				goto ofile;
X			}
X		}
X
X		if (!errhidden(E_OPEN, info->f_name)) {
X			if (!errwarnonly(E_OPEN, info->f_name))
X				xstats.s_openerrs++;
X			errmsg("Cannot create '%s'.\n", info->f_name);
X			(void) errabort(E_OPEN, info->f_name, TRUE);
X		}
X		void_file(info);
X		return (FALSE);
X	}
Xofile:
X	if (!get_ofile(f, info)) {
X		if (!to_stdout && do_install)
X			remove_tmpname(xname);
X		return (FALSE);
X	}
X	if (!to_stdout && do_install)
X		return (install_rename(info, xname));
X	return (TRUE);
X}
X
XLOCAL BOOL
Xget_ofile(f, info)
X		FILE	*f;
X		FINFO	*info;
X{
X		int	err;
X		int	ret;
X
X	file_raise(f, FALSE);
X
X#if	defined(F_GETFL) && defined(O_DSYNC)
X	/*
X	 * Try to write file data as soon as possible to avoid
X	 * longer wait when fsync() is called later.
X	 */
X	if (!no_fsync) {
X		int	fl;
X
X		fl = fcntl(fdown(f), F_GETFL, 0);
X		fl |= O_DSYNC;
X		fcntl(fdown(f), F_SETFL, fl);
X	}
X#endif
X
X	if (is_sparse(info)) {
X		ret = get_sparse(f, info);
X	} else if (force_hole) {
X		if (xmeta)
X			ret = get_as_hole(f, info);
X		else
X			ret = get_forced_hole(f, info);
X	} else {
X		ret = xt_file(info, (int(*)__PR((void *, char *, int)))ffilewrite,
X						f, 0, "writing");
X	}
X	if (ret < 0) {
X		snulltimes(info->f_name, info);
X		die(EX_BAD);
X	}
X	if (!to_stdout) {
X#ifdef	HAVE_FSYNC
X		int	cnt;
X#endif
X		if (ret == FALSE)
X			xstats.s_rwerrs--;	/* Compensate overshoot below */
X
X		if (fflush(f) != 0)
X			ret = FALSE;
X#ifdef	HAVE_FSYNC
X		err = 0;
X		cnt = 0;
X		do {
X			if (!no_fsync && fsync(fdown(f)) != 0)
X				err = geterrno();
X
X			if (err == EINVAL)
X				err = 0;
X		} while (err == EINTR && ++cnt < 10);
X		if (err != 0)
X			ret = FALSE;
X#endif
X		if (fclose(f) != 0)
X			ret = FALSE;
X		if (ret == FALSE) {
X			xstats.s_rwerrs++;
X			snulltimes(info->f_name, info);
X		}
X	}
X	return (ret);
X}
X
X/* ARGSUSED */
XLOCAL int
Xvoid_func(vp, p, amount)
X	void	*vp;
X	char	*p;
X	int	amount;
X{
X	return (amount);
X}
X
XEXPORT BOOL
Xvoid_file(info)
X		FINFO	*info;
X{
X	int	ret = TRUE;
X	Ullong	llsize = info->f_llsize;
X	off_t	size   = info->f_rsize;
X
X	/*
X	 * handle botch in gnu sparse file definitions
X	 */
X	if (props.pr_flags & PR_GNU_SPARSE_BUG)
X		if (gnu_skip_extended(info) < 0)
X			die(EX_BAD);
X
X	if (info->f_flags & F_DATA_SKIPPED)
X		return (ret);
X
X	/*
X	 * Try to do our best to skip even files with a size that
X	 * is more then off_t may handle on the local machine.
X	 */
X	do {
X		if (info->f_flags & F_BAD_SIZE) {
X			if (llsize > 1024*1024*1024)
X				info->f_rsize = 1024*1024*1024;
X			else
X				info->f_rsize = llsize;
X		}
X
X		ret = xt_file(info, void_func, 0, 0, "void");
X		if (ret < 0)
X			die(EX_BAD);
X
X		llsize -= info->f_rsize;
X
X	} while ((info->f_flags & F_BAD_SIZE) && llsize > 0);
X
X	info->f_rsize = size;
X	info->f_flags |= F_DATA_SKIPPED;
X
X	return (ret);
X}
X
XLOCAL BOOL
Xvoid_bad(info)
X		FINFO	*info;
X{
X	int	ret;
X
X	if (!nowarn)
X		errmsgno(EX_BAD,
X			"WARNING: bad metadata for '%s', skipping...\n",
X			info->f_name);
X	ret = void_file(info);
X	return (ret);
X}
X
X/*
X * Extract file using callback function "func"
X * Returns:
X *	TRUE	Extract OK
X *	FALSE	Extract not OK, may continue
X *	-1	An error occured, max not continue
X */
XEXPORT int
Xxt_file(info, func, arg, amt, text)
X		FINFO	*info;
X		int	(*func) __PR((void *, char *, int));
X		void	*arg;
X		int	amt;
X		char	*text;
X{
X	register int	amount; /* XXX ??? */
X	register off_t	size;
X	register int	tasize;
X		BOOL	ret = TRUE;
X
X	size = info->f_rsize;
X	if (amt == 0)
X		amt = bufsize;
X	while (size > 0) {
X
X		if ((props.pr_flags & PR_CPIO) == 0) {
X			amount = buf_rwait(TBLOCK);
X			if (amount < TBLOCK) {
X				goto waseof;
X			}
X			amount = (amount / TBLOCK) * TBLOCK;
X			amount = min(size, amount);
X			amount = min(amount, amt);
X			tasize = tarsize(amount);
X		} else {
X			amount = buf_rwait(1);	/* Request what is available */
X			if (amount <= 0) {
X				goto waseof;
X			}
X			amount = min(size, amount);
X			amount = min(amount, amt);
X			tasize = amount;
X		}
X
X		if ((*func)(arg, bigptr, amount) != amount) {
X			ret = FALSE;
X			if (!errhidden(E_WRITE, info->f_name)) {
X				if (!errwarnonly(E_WRITE, info->f_name))
X					xstats.s_rwerrs++;
X				errmsg("Error %s '%s'.\n", text, info->f_name);
X				(void) errabort(E_WRITE, info->f_name, TRUE);
X			}
X			/*
X			 * func -> void_func() to skip the rest of the file.
X			 */
X			func = void_func;
X		}
X
X		size -= amount;
X		buf_rwake(tasize);
X	}
X	info->f_flags |= F_DATA_SKIPPED;
X	/*
X	 * Honour CPIO padding
X	 */
X	if ((amount = props.pr_pad) != 0) {
X		size = info->f_rsize;
X		if (info->f_flags & F_LONGNAME)
X			size += props.pr_hdrsize;
X		amount = (amount + 1 - (size & amount)) & amount;
X		if (amount > 0) {
X			buf_rwait(amount);
X			buf_rwake(amount);
X		}
X	}
X	return (ret);
Xwaseof:
X	errmsgno(EX_BAD, "Tar file too small (amount: %d bytes).\n", amount);
X	errmsgno(EX_BAD, "Unexpected EOF on input.\n");
X	return (-1);
X}
X
XEXPORT void
Xskip_slash(info)
X	FINFO	*info;
X{
X	static	BOOL	warned = FALSE;
X
X	if (!warned && !nowarn) {
X		errmsgno(EX_BAD, "WARNING: skipping leading '/' on filenames.\n");
X		warned = TRUE;
X	}
X	/*
X	 * XXX
X	 * XXX ACHTUNG: ia_change kann es nötig machen, den String umzukopieren
X	 * XXX denn sonst ist die Länge des Speicherplatzes unbestimmt!
X	 *
X	 * XXX ACHTUNG: mir ist noch unklar, ob es richtig ist, auch in jedem
X	 * XXX Fall Führende slashes vom Linknamen zu entfernen.
X	 * XXX Bei Hard-Link ist das sicher richtig und ergibt sich auch
X	 * XXX automatisch, wenn man nur vor dem Aufruf von skip_slash()
X	 * XXX auf f_name[0] == '/' abfragt.
X	 */
X	while (info->f_name[0] == '/')
X		info->f_name++;
X
X	/*
X	 * Don't strip leading '/' from targets of symlinks.
X	 */
X	if (is_symlink(info))
X		return;
X
X	while (info->f_lname[0] == '/')
X		info->f_lname++;
X}
X
XLOCAL BOOL
Xhas_dotdot(name)
X	char	*name;
X{
X	register char	*p = name;
X
X	while (*p) {
X		if ((p[0] == '.' && p[1] == '.') &&
X		    (p[2] == '/' || p[2] == '\0')) {
X			return (TRUE);
X		}
X		do {
X			if (*p++ == '\0')
X				return (FALSE);
X		} while (*p != '/');
X		p++;
X		while (*p == '/')	/* Skip multiple slashes */
X			p++;
X	}
X	return (FALSE);
X}
END-of-star-1.5.2/star/extract.c
echo x - star-1.5.2/star/acl_unix.c
sed 's/^X//' >star-1.5.2/star/acl_unix.c << 'END-of-star-1.5.2/star/acl_unix.c'
X/* @(#)acl_unix.c	1.41 10/08/23 Copyright 2001-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)acl_unix.c	1.41 10/08/23 Copyright 2001-2010 J. Schilling";
X#endif
X/*
X *	ACL get and set routines for unix like operating systems.
X *
X *	Copyright (c) 2001-2010 J. Schilling
X *
X *	This implementation currently supports POSIX.1e and Solaris ACLs.
X *	Thanks to Andreas Gruenbacher <ag@bestbits.at> for the first POSIX ACL
X *	implementation.
X *
X *	As True64 does not like ACL "mask" entries and this version of the
X * 	ACL code does not generate "mask" entries on True64, ACl support for
X *	True64 is currently broken. You cannot read back archives created
X *	on true64.
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#include <schily/mconfig.h>
X#ifdef	USE_ACL
X
X#ifdef	OWN_ACLTEXT
X#if	defined(UNIXWARE) && defined(HAVE_ACL)
X#	define	HAVE_SUN_ACL
X#	define	HAVE_ANY_ACL
X#endif
X#endif
X/*
X * HAVE_ANY_ACL currently includes HAVE_POSIX_ACL and HAVE_SUN_ACL.
X * This definition must be in sync with the definition in star_unix.c
X * As USE_ACL is used in star.h, we are not allowed to change the
X * value of USE_ACL before we did include star.h or we may not include
X * star.h at all.
X * HAVE_HP_ACL is currently not included in HAVE_ANY_ACL.
X */
X#	ifndef	HAVE_ANY_ACL
X#	undef	USE_ACL		/* Do not try to get or set ACLs */
X#	endif
X#endif
X
X#include <schily/stdio.h>
X#include <schily/errno.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/standard.h>
X#include <schily/stdlib.h>	/* Needed for Solaris ACL code (malloc/free) */
X#include <schily/unistd.h>
X#include <schily/dirent.h>
X#include <schily/string.h>
X#include <schily/stat.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "starsubs.h"
X#include "checkerr.h"
X
X#ifdef	USE_ACL
X
X#ifdef	HAVE_SYS_ACL_H
X#	include <sys/acl.h>
X#endif
X
X/*
X * Define some things that either are missing or defined in a different way
X * on SCO UnixWare
X */
X#if	defined(UNIXWARE)
Xtypedef struct acl	aclent_t;
X#endif
X#ifndef	GETACL
X#define	GETACL	ACL_GET
X#endif
X#ifndef	SETACL
X#define	SETACL	ACL_SET
X#endif
X#ifndef	GETACLCNT
X#define	GETACLCNT	ACL_CNT
X#endif
X#ifndef	MIN_ACL_ENTRIES
X#define	MIN_ACL_ENTRIES	NACLBASE
X#endif
X
X#define	ROOT_UID	0
X
Xextern	BOOL	nochown;
Xextern	BOOL	numeric;
X
X/*
X * XXX acl_access_text/acl_default_text are a bad idea. (see xheader.c)
X * XXX Note that in 'dirmode' dir ACLs get hosed because getinfo() is
X * XXX called for the directory before the directrory content is written
X * XXX and the directory itself is archived after the dir content.
X */
XLOCAL char acl_access_text[PATH_MAX+1];
XLOCAL char acl_default_text[PATH_MAX+1];
X
XEXPORT	void	opt_acl		__PR((void));
XEXPORT	BOOL	get_acls	__PR((FINFO *info));
XEXPORT	void	set_acls	__PR((FINFO *info));
X
X#ifdef	HAVE_POSIX_ACL
XLOCAL	BOOL	acl_to_info	__PR((char *name, int type, char *acltext));
XLOCAL	BOOL	acl_add_ids	__PR((char *name, char *infotext, char *acltext));
X#endif
X
X#ifdef	HAVE_SUN_ACL
XLOCAL	char	*acl_add_ids	__PR((char *dst, char *from, char *end, int *sizep));
X#endif
X
XLOCAL	char	*base_acl	__PR((mode_t mode));
XLOCAL	void	acl_check_ids	__PR((char *acltext, char *infotext));
X
X
X#ifdef HAVE_POSIX_ACL
X
X#define	DID_OPT_ACL
XEXPORT void
Xopt_acl()
X{
X	printf(" acl");
X}
X
X/*
X * Get the access control list for a file and convert it into the format
X * used by star.
X */
XEXPORT BOOL
Xget_acls(info)
X	register FINFO	*info;
X{
X	info->f_acl_access = NULL;
X	info->f_acl_default = NULL;
X
X	/*
X	 * Symlinks don't have ACLs
X	 */
X	if (is_symlink(info))
X		return (TRUE);
X
X	if (!acl_to_info(info->f_sname, ACL_TYPE_ACCESS, acl_access_text))
X		return (FALSE);
X	if (*acl_access_text != '\0') {
X		info->f_xflags |= XF_ACL_ACCESS;
X		info->f_acl_access = acl_access_text;
X	}
X	if (!is_dir(info))
X		return (TRUE);
X	if (!acl_to_info(info->f_sname, ACL_TYPE_DEFAULT, acl_default_text))
X		return (FALSE);
X	if (*acl_default_text != '\0') {
X		info->f_xflags |= XF_ACL_DEFAULT;
X		info->f_acl_default = acl_default_text;
X	}
X	return (TRUE);
X}
X
XLOCAL BOOL
Xacl_to_info(name, type, acltext)
X	char	*name;
X	int	type;
X	char	*acltext;
X{
X	acl_t	acl;
X	char	*text, *c;
X	int entries = 1;
X
X	acltext[0] = '\0';
X	if ((acl = acl_get_file(name, type)) == NULL) {
X		register int err = geterrno();
X#ifdef	ENOTSUP
X		/*
X		 * This FS does not support ACLs.
X		 */
X		if (err == ENOTSUP)
X			return (TRUE);
X#endif
X#ifdef	ENOSYS
X		if (err == ENOSYS)
X			return (TRUE);
X#endif
X		if (!errhidden(E_GETACL, name)) {
X			if (!errwarnonly(E_GETACL, name))
X				xstats.s_getaclerrs++;
X			errmsg("Cannot get %sACL for '%s'.\n",
X				type == ACL_TYPE_DEFAULT ? "default ":"", name);
X			(void) errabort(E_GETACL, name, TRUE);
X		}
X		return (FALSE);
X	}
X	seterrno(0);
X	text = acl_to_text(acl, NULL);
X	acl_free(acl);
X	if (text == NULL) {
X		if (geterrno() == 0)
X			seterrno(EX_BAD);
X		if (!errhidden(E_BADACL, name)) {
X			if (!errwarnonly(E_BADACL, name))
X				xstats.s_badacl++;
X			errmsg(
X			    "Cannot convert %sACL entries to text for '%s'.\n",
X				type == ACL_TYPE_DEFAULT ? "default ":"", name);
X			(void) errabort(E_BADACL, name, TRUE);
X		}
X		return (FALSE);
X	}
X
X	/* remove trailing newlines */
X	c = strrchr(text, '\0');
X	while (c > text && *(c-1) == '\n')
X		*(--c) = '\0';
X
X	/* remove comment fields */
X	c = text;
X	while ((c = strchr(c, '#')) != NULL) {
X		char *d = c, *e;
X
X		while (c > text && strchr(" \t\r", *(c-1)))
X			c--;
X		if (c == d) {
X			/* No whitespace before '#': assume it's no comment. */
X			c++;
X			continue;
X		}
X		while (*d && *d != '\n')
X			d++;
X		e = c;
X		while ((*e++ = *d++) != '\0')
X			;
X	}
X
X	/* count fields */
X	for (c = text; *c != '\0'; c++) {
X		if (*c == '\n') {
X			*c = ',';
X			entries++;
X		}
X	}
X	if ((entries > 3) || /* > 4 on Solaris? */
X	    (type == ACL_TYPE_DEFAULT && entries >= 3)) {
X		if (!acl_add_ids(name, acltext, text)) {
X			acl_free((acl_t)text);
X			return (FALSE);
X		}
X	}
X	/*
X	 * XXX True64 prints a compile time warning when we use
X	 * XXX acl_free(text) but it is standard...
X	 * XXX we need to check whether we really have to call
X	 * XXX free() instead of acl_free() if we are on True64.
X	 * XXX Cast the string to acl_t to supress the warning.
X	 */
X	acl_free((acl_t)text);
X	return (TRUE);
X}
X
XLOCAL BOOL
Xacl_add_ids(name, infotext, acltext)
X	char	*name;
X	char	*infotext;
X	char	*acltext;
X{
X	int	size = PATH_MAX;
X	int	len;
X	char	*token;
X	uid_t	uid;
X	gid_t	gid;
X
X	/*
X	 * Add final nul to guarantee that the string is nul terminated.
X	 */
X	infotext[PATH_MAX] = '\0';
X
X	token = strtok(acltext, ",\n\r");
X	while (token) {
X		strncpy(infotext, token, size);
X		infotext += strlen(token);
X		size -= strlen(token);
X		if (size < 0)
X			size = 0;
X
X		if (strncmp(token, "user:", 5) == 0 &&
X		    strchr(":,\n\r", token[5]) == NULL) {
X			char *username = &token[5], *c = username+1;
X
X			while (strchr(":,\n\r", *c) == NULL)
X				c++;
X			*c = '\0';
X			/* check for all-numeric user name */
X			while (c > username && isdigit(*(c-1)))
X				c--;
X			if (c > username &&
X			    ic_uidname(username, c-username, &uid)) {
X				len = js_snprintf(infotext, size,
X					":%lld", (Llong)uid);
X				infotext += len;
X				size -= len;
X			}
X		} else if (strncmp(token, "group:", 6) == 0 &&
X			    strchr(":,\n\r", token[6]) == NULL) {
X			char *groupname = &token[6], *c = groupname+1;
X
X			while (strchr(":,\n\r", *c) == NULL)
X				c++;
X			*c = '\0';
X			/* check for all-numeric group name */
X			while (c > groupname && isdigit(*(c-1)))
X				c--;
X			if (c > groupname &&
X			    ic_gidname(groupname, c-groupname, &gid)) {
X				len = js_snprintf(infotext, size,
X					":%lld", (Llong)gid);
X				infotext += len;
X				size -= len;
X			}
X		}
X		if (size > 0) {
X			*infotext++ = ',';
X			size--;
X		}
X
X		token = strtok(NULL, ",\n\r");
X	}
X	if (size >= 0) {
X		*(--infotext) = '\0';
X	} else {
X		if (!errhidden(E_BADACL, name)) {
X			if (!errwarnonly(E_BADACL, name))
X				xstats.s_badacl++;
X			errmsgno(EX_BAD,
X			"Cannot convert ACL entries (string too long) for '%s'.\n",
X						name);
X			(void) errabort(E_BADACL, name, TRUE);
X		}
X		return (FALSE);
X	}
X	return (TRUE);
X}
X
X/*
X * Use ACL info from archive to set access control list for the file if needed.
X */
XEXPORT void
Xset_acls(info)
X	register FINFO	*info;
X{
X	char	acltext[PATH_MAX+1];
X	acl_t	acl;
X
X	if (info->f_xflags & XF_ACL_ACCESS) {
X		acl_check_ids(acltext, info->f_acl_access);
X	} else {
X		/*
X		 * We may need to delete an inherited ACL.
X		 */
X		strcpy(acltext,  base_acl(info->f_mode));
X	}
X	if ((acl = acl_from_text(acltext)) == NULL) {
X		if (!errhidden(E_BADACL, info->f_name)) {
X			if (!errwarnonly(E_BADACL, info->f_name))
X				xstats.s_badacl++;
X			errmsg("Cannot convert ACL '%s' to internal format for '%s'.\n",
X					acltext, info->f_name);
X			(void) errabort(E_BADACL, info->f_name, TRUE);
X		}
X	} else {
X		if (acl_set_file(info->f_name, ACL_TYPE_ACCESS, acl) < 0) {
X			/*
X			 * XXX What should we do if errno is ENOTSUP/ENOSYS?
X			 */
X			if (!errhidden(E_SETACL, info->f_name)) {
X				if (!errwarnonly(E_SETACL, info->f_name))
X					xstats.s_setacl++;
X				errmsg("Cannot set ACL '%s' for '%s'.\n",
X					acltext, info->f_name);
X				(void) errabort(E_SETACL, info->f_name, TRUE);
X			}
X
X#ifdef	__needed__
X			/* Fall back to chmod */
X			/* XXX chmod has already been done! */
X			chmod(info->f_name, info->f_mode);
X#endif
X		}
X		acl_free(acl);
X	}
X
X	/*
X	 * Only directories can have Default ACLs
X	 */
X	if (!is_dir(info))
X		return;
X
X	if (info->f_xflags & XF_ACL_DEFAULT) {
X		acl_check_ids(acltext, info->f_acl_default);
X	} else {
X		acltext[0] = '\0';
X#ifdef	HAVE_ACL_DELETE_DEF_FILE
X		/*
X		 * FreeBSD does not like acl_from_text("")
X		 */
X		if (acl_delete_def_file(info->f_name) < 0) {
X			/*
X			 * XXX What should we do if errno is ENOTSUP/ENOSYS?
X			 */
X			if (!errhidden(E_SETACL, info->f_name)) {
X				if (!errwarnonly(E_SETACL, info->f_name))
X					xstats.s_setacl++;
X				errmsg("Cannot remove default ACL from '%s'.\n",
X								info->f_name);
X				(void) errabort(E_SETACL, info->f_name, TRUE);
X			}
X		}
X		return;
X#endif
X	}
X	if ((acl = acl_from_text(acltext)) == NULL) {
X		if (!errhidden(E_BADACL, info->f_name)) {
X			if (!errwarnonly(E_BADACL, info->f_name))
X				xstats.s_badacl++;
X			errmsg("Cannot convert default ACL '%s' to internal format for '%s'.\n",
X					acltext, info->f_name);
X			(void) errabort(E_BADACL, info->f_name, TRUE);
X		}
X	} else {
X		if (acl_set_file(info->f_name, ACL_TYPE_DEFAULT, acl) < 0) {
X			/*
X			 * XXX What should we do if errno is ENOTSUP/ENOSYS?
X			 */
X			if (!errhidden(E_SETACL, info->f_name)) {
X				if (!errwarnonly(E_SETACL, info->f_name))
X					xstats.s_setacl++;
X				errmsg("Cannot set default ACL '%s' for '%s'.\n",
X					acltext, info->f_name);
X				(void) errabort(E_SETACL, info->f_name, TRUE);
X			}
X		}
X		acl_free(acl);
X	}
X}
X
X#endif  /* HAVE_POSIX_ACL */
X
X#ifdef	HAVE_SUN_ACL	/* Solaris */
X
X#define	DID_OPT_ACL
XEXPORT void
Xopt_acl()
X{
X	printf(" acl");
X}
X
X/*
X * Get the access control list for a file and convert it into the format
X * used by star.
X */
XEXPORT BOOL
Xget_acls(info)
X	register FINFO	*info;
X{
X		int		aclcount;
X		aclent_t	*aclp;
X	register char		*acltext;
X	register char		*ap;
X	register char		*dp;
X	register char		*cp;
X	register char		*ep;
X		int		asize;
X		int		dsize;
X
X	info->f_acl_access = NULL;
X	info->f_acl_default = NULL;
X
X	/*
X	 * Symlinks don't have ACLs
X	 */
X	if (is_symlink(info))
X		return (TRUE);
X
X#ifdef	HAVE_ST_ACLCNT
X	aclcount = info->f_aclcnt;	/* UnixWare */
X#else
X	if ((aclcount = acl(info->f_sname, GETACLCNT, 0, NULL)) < 0) {
X#ifdef	ENOSYS
X		if (geterrno() == ENOSYS)
X			return (TRUE);
X#endif
X		if (!errhidden(E_GETACL, info->f_name)) {
X			if (!errwarnonly(E_GETACL, info->f_name))
X				xstats.s_getaclerrs++;
X			errmsg("Cannot get ACL count for '%s'.\n",
X							info->f_name);
X			(void) errabort(E_GETACL, info->f_name, TRUE);
X		}
X		return (FALSE);
X	}
X#endif
X#ifdef	ACL_DEBUG
X	error("'%s' acl count %d\n", info->f_name, aclcount);
X#endif
X	if (aclcount <= MIN_ACL_ENTRIES) {
X		/*
X		 * This file has only the traditional UNIX access list.
X		 * This case includes a filesystem that does not support ACLs
X		 * like the tmpfs.
X		 */
X		return (TRUE);
X	}
X	if ((aclp = (aclent_t *)malloc(sizeof (aclent_t) * aclcount)) == NULL) {
X		if (!errhidden(E_GETACL, info->f_name)) {
X			if (!errwarnonly(E_GETACL, info->f_name))
X				xstats.s_getaclerrs++;
X			errmsg("Cannot malloc ACL buffer for '%s'.\n",
X							info->f_name);
X			(void) errabort(E_GETACL, info->f_name, TRUE);
X		}
X		return (FALSE);
X	}
X	if (acl(info->f_sname, GETACL, aclcount, aclp) < 0) {
X		if (!errhidden(E_GETACL, info->f_name)) {
X			if (!errwarnonly(E_GETACL, info->f_name))
X				xstats.s_getaclerrs++;
X			errmsg("Cannot get ACL entries for '%s'.\n",
X							info->f_name);
X			(void) errabort(E_GETACL, info->f_name, TRUE);
X		}
X		return (FALSE);
X	}
X	seterrno(0);
X	acltext = acltotext(aclp, aclcount);
X	free(aclp);
X	if (acltext == NULL) {
X		if (geterrno() == 0)
X			seterrno(EX_BAD);
X		if (!errhidden(E_BADACL, info->f_name)) {
X			if (!errwarnonly(E_BADACL, info->f_name))
X				xstats.s_badacl++;
X			errmsg("Cannot convert ACL entries to text for '%s'.\n",
X								info->f_name);
X			(void) errabort(E_BADACL, info->f_name, TRUE);
X		}
X		return (FALSE);
X	}
X#ifdef	ACL_DEBUG
X	error("acltext '%s'\n", acltext);
X#endif
X
X	ap = acl_access_text;
X	dp = acl_default_text;
X	asize = PATH_MAX;
X	dsize = PATH_MAX;
X
X	for (cp = acltext; *cp; cp = ep) {
X		if (*cp == ',')
X			cp++;
X		ep = strchr(cp, ',');
X		if (ep == NULL)
X			ep = strchr(cp, '\0');
X
X		if (*cp == 'd' && strncmp(cp, "default", 7) == 0) {
X			cp += 7;
X			dp = acl_add_ids(dp, cp, ep, &dsize);
X			if (dp == NULL)
X				break;
X		} else {
X			ap = acl_add_ids(ap, cp, ep, &asize);
X			if (ap == NULL)
X				break;
X		}
X	}
X	if (ap == NULL || dp == NULL) {
X		acl_access_text[0] = '\0';
X		acl_default_text[0] = '\0';
X		if (!errhidden(E_BADACL, info->f_name)) {
X			if (!errwarnonly(E_BADACL, info->f_name))
X				xstats.s_badacl++;
X			errmsgno(EX_BAD, "Cannot convert ACL entries (string too long) for '%s'.\n",
X							info->f_name);
X			(void) errabort(E_BADACL, info->f_name, TRUE);
X		}
X		return (FALSE);
X	}
X
X	if (ap > acl_access_text && ap[-1] == ',')
X		--ap;
X	*ap = '\0';
X	if (dp > acl_default_text && dp[-1] == ',')
X		--dp;
X	*dp = '\0';
X
X	if (*acl_access_text != '\0') {
X		info->f_xflags |= XF_ACL_ACCESS;
X		info->f_acl_access = acl_access_text;
X	}
X	if (*acl_default_text != '\0') {
X		info->f_xflags |= XF_ACL_DEFAULT;
X		info->f_acl_default = acl_default_text;
X	}
X
X#ifdef	ACL_DEBUG
Xerror("access:  '%s'\n", acl_access_text);
Xerror("default: '%s'\n", acl_default_text);
X#endif
X
X	return (TRUE);
X}
X
X/*
X * Convert Solaris ACL text into POSIX ACL text and add numerical user/group
X * ids.
X *
X * Solaris uses only one colon in the ACL text format for "other" and "mask".
X * Solaris ACL text is:	"user::rwx,group::rwx,mask:rwx,other:rwx"
X * while POSIX text is:	"user::rwx,group::rwx,mask::rwx,other::rwx"
X */
XLOCAL char *
Xacl_add_ids(dst, from, end, sizep)
X	char	*dst;
X	char	*from;
X	char	*end;
X	int	*sizep;
X{
X	register char	*cp = from;
X	register char	*ep = end;
X	register char	*np = dst;
X	register int	size = *sizep;
X	register int	amt;
X		uid_t	uid;
X		gid_t	gid;
X
X	if (cp[0] == 'u' &&
X	    strncmp(cp, "user:", 5) == 0) {
X		if (size <= (ep - cp +1)) {
X			*sizep = 0;
X			return (NULL);
X		}
X		size -= ep - cp +1;
X		strncpy(np, cp, ep - cp +1);
X		np += ep - cp + 1;
X
X		cp += 5;
X		ep = strchr(cp, ':');
X		if (ep)
X			*ep = '\0';
X		if (*cp) {
X			if (ic_uidname(cp, 1000, &uid)) {
X				if (np[-1] == ',') {
X					--np;
X					size++;
X				}
X				amt = js_snprintf(np, size,
X					":%lld,", (Llong)uid);
X				np += amt;
X				size -= amt;
X			}
X		}
X		if (ep)
X			*ep = ':';
X
X	} else if (cp[0] == 'g' &&
X	    strncmp(cp, "group:", 6) == 0) {
X		if (size <= (ep - cp +1)) {
X			*sizep = 0;
X			return (NULL);
X		}
X		size -= ep - cp +1;
X		strncpy(np, cp, ep - cp + 1);
X		np += ep - cp + 1;
X
X		cp += 6;
X		ep = strchr(cp, ':');
X		if (ep)
X			*ep = '\0';
X		if (*cp) {
X			if (ic_gidname(cp, 1000, &gid)) {
X				if (np[-1] == ',') {
X					--np;
X					size++;
X				}
X				amt = js_snprintf(np, size,
X					":%lld,", (Llong)gid);
X				np += amt;
X				size -= amt;
X			}
X		}
X		if (ep)
X			*ep = ':';
X
X	} else if (cp[0] == 'm' &&
X	    strncmp(cp, "mask:", 5) == 0) {
X		cp += 4;
X		if (size < 5) {
X			*sizep = 0;
X			return (NULL);
X		}
X		/*
X		 * Add one additional ':' to the string for POSIX compliance.
X		 */
X		strcpy(np, "mask:");
X		np += 5;
X		if (size <= (ep - cp +1)) {
X			*sizep = 0;
X			return (NULL);
X		}
X		strncpy(np, cp, ep - cp + 1);
X		np += ep - cp + 1;
X
X	} else if (cp[0] == 'o' &&
X	    strncmp(cp, "other:", 6) == 0) {
X		cp += 5;
X		if (size < 6) {
X			*sizep = 0;
X			return (NULL);
X		}
X		/*
X		 * Add one additional ':' to the string for POSIX compliance.
X		 */
X		strcpy(np, "other:");
X		np += 6;
X		if (size <= (ep - cp +1)) {
X			*sizep = 0;
X			return (NULL);
X		}
X		strncpy(np, cp, ep - cp + 1);
X		np += ep - cp + 1;
X	}
X	if (size <= 0) {
X		size = 0;
X		np = NULL;
X	}
X	*sizep = size;
X	return (np);
X}
X
X/*
X * Convert ACL info from archive into Sun's format and set access control list
X * for the file if needed.
X */
XEXPORT void
Xset_acls(info)
X	register FINFO	*info;
X{
X	int		aclcount;
X	aclent_t	*aclp;
X	char		acltext[PATH_MAX+1];
X	char		aclbuf[8192];
X	BOOL		no_acl = FALSE;
X
X	aclbuf[0] = '\0';
X	if (info->f_xflags & XF_ACL_ACCESS) {
X		acl_check_ids(aclbuf, info->f_acl_access);
X	}
X	if (info->f_xflags & XF_ACL_DEFAULT) {
X		register char *cp;
X		register char *dp;
X		register char *ep;
X
X		acl_check_ids(acltext, info->f_acl_default);
X
X		dp = aclbuf + strlen(aclbuf);
X		if (dp > aclbuf)
X			*dp++ = ',';
X		for (cp = acltext; *cp; cp = ep) {
X			/*
X			 * XXX Eigentlich muesste man hier bei den Eintraegen
X			 * XXX "mask" und "other" jeweils ein ':' beseitigten
X			 * XXX aber es sieht so aus, als ob es bei Solaris 9
X			 * XXX auch funktionert wenn man das nicht tut.
X			 * XXX Nach Solaris 7 "libsec" Source kann es nicht
X			 * XXX mehr funktionieren wenn man das ':' beseitigt.
X			 * XXX Moeglicherweise ist das der Grund warum
X			 * XXX Solaris immer Probleme mit den ACLs hatte.
X			 */
X			if (*cp == ',')
X				cp++;
X			ep = strchr(cp, ',');
X			if (ep == NULL)
X				ep = strchr(cp, '\0');
X			strcpy(dp, "default");
X			dp += 7;
X			strncpy(dp, cp, ep - cp + 1);
X			dp += ep - cp + 1;
X		}
X	}
X#ifdef	ACL_DEBUG
X	error("aclbuf: '%s'\n", aclbuf);
X#endif
X
X	if (aclbuf[0] == '\0') {
X		/*
X		 * We may need to delete an inherited ACL.
X		 */
X		strcpy(aclbuf, base_acl(info->f_mode));
X		no_acl = TRUE;
X	} else if (streql(aclbuf, base_acl(info->f_mode))) {
X		no_acl = TRUE;
X	}
X
X	seterrno(0);
X	if ((aclp = aclfromtext(aclbuf, &aclcount)) == NULL) {
X		if (geterrno() == 0)
X			seterrno(EX_BAD);
X		if (!errhidden(E_BADACL, info->f_name)) {
X			if (!errwarnonly(E_BADACL, info->f_name))
X				xstats.s_badacl++;
X			errmsg("Cannot convert ACL '%s' to internal format for '%s'.\n",
X				aclbuf, info->f_name);
X			(void) errabort(E_BADACL, info->f_name, TRUE);
X		}
X	} else {
X		if (acl(info->f_name, SETACL, aclcount, aclp) < 0) {
X			BOOL	no_error = FALSE;
X			/*
X			 * XXX What should we do if errno is ENOSYS?
X			 */
X			if (no_acl) {
X				int	aclcnt;
X
X				/*
X				 * This should catch the ENOSYS case which
X				 * happens e.g. if the target is a socket.
X				 */
X				aclcnt = acl(info->f_name, GETACLCNT, 0, NULL);
X				if (aclcnt <= MIN_ACL_ENTRIES)
X					no_error = TRUE;
X			}
X			if (!no_error && !errhidden(E_SETACL, info->f_name)) {
X				if (!errwarnonly(E_SETACL, info->f_name))
X				errmsg("Cannot set ACL '%s' for '%s'.\n",
X					aclbuf, info->f_name);
X					xstats.s_setacl++;
X				(void) errabort(E_SETACL, info->f_name, TRUE);
X			}
X		}
X		free(aclp);
X	}
X}
X
X#endif	/* HAVE_SUN_ACL Solaris */
X
X/*
X * Convert UNIX standard mode bits into base ACL
X */
XLOCAL char *
X#ifdef	PROTOTYPES
Xbase_acl(mode_t mode)
X#else
Xbase_acl(mode)
X	mode_t	mode;
X#endif
X{
X	static char _acltxt[] = "user::***,group::***,other::***";
X
X	_acltxt[ 6] = (mode & 0400) ? 'r' : '-';
X	_acltxt[ 7] = (mode & 0200) ? 'w' : '-';
X	_acltxt[ 8] = (mode & 0100) ? 'x' : '-';
X	_acltxt[17] = (mode & 0040) ? 'r' : '-';
X	_acltxt[18] = (mode & 0020) ? 'w' : '-';
X	_acltxt[19] = (mode & 0010) ? 'x' : '-';
X	_acltxt[28] = (mode & 0004) ? 'r' : '-';
X	_acltxt[29] = (mode & 0002) ? 'w' : '-';
X	_acltxt[30] = (mode & 0001) ? 'x' : '-';
X
X	return (_acltxt);
X}
X
X/*
X * If we are in -numeric mode, we replace the user and groups names by the
X * user and group numbers from our internal format.
X *
X * If we are in non numeric mode, we check whether a user name or group name
X * is present on our current system. It the user/group name is known, then we
X * remove the numeric value from out internal format. If the user/group name
X * is not known, then we replace the name by the numeric value.
X */
XLOCAL void
Xacl_check_ids(acltext, infotext)
X	char	*acltext;
X	char	*infotext;
X{
X	char	entry_buffer[PATH_MAX];
X	char	*token = strtok(infotext, ",");
X
X	if (!token)
X		return;
X
X	while (token) {
X		char *x = strchr(token, '#');
X		if (x != NULL) {
X			/*
X			 * Cut off any "[ \t]#" at the end of the token.
X			 */
X			while (x > token+1 && strchr(" \t", *(x-1)) != NULL)
X				x--;
X			*x = '\0';
X		}
X		if (strncmp(token, "user:", 5) == 0 &&
X		    strchr(":,", token[5]) == NULL) {
X			char *username = &token[5], *c = username;
X			char *perms, *auid;
X			uid_t	udummy;
X			/* uidname does not check for NULL! */
X
X			/* check for damaged user names with spaces */
X			if (strchr(username, ':') == NULL) {
X				/*
X				 * Looks like a damaged user name that had
X				 * spaces in it, like "Joe,User". Repair.
X				 */
X				char *unexpected_sep = strchr(username, '\0');
X
X				if (strtok(NULL, ",")) {
X					*unexpected_sep = ' ';
X					continue;
X				}
X			}
X
X			/* user name */
X			if (*username != ':') {
X				c++;
X				while (strchr(":,", *c) == NULL)
X					c++;
X			}
X			if (*c)
X				*c++ = '\0';
X
X			/* permissions */
X			perms = c;
X			while (strchr(":,", *c) == NULL)
X				c++;
X			if (*c)
X				*c++ = '\0';
X
X			/* identifier */
X			auid = c;
X			while (strchr(":,", *c) == NULL)
X				c++;
X			if (*c)
X				*c++ = '\0';
X
X			/*
X			 * XXX We use strlen(username)+1 to tell uidname not
X			 * XXX to stop comparing before the end of the
X			 * XXX username has been reached. Otherwise "joe" and
X			 * XXX "joeuser" would be recognized as identical.
X			 */
X			if (*auid && (numeric ||
X			    !ic_uidname(username, strlen(username)+1, &udummy)))
X				username = auid;
X			js_snprintf(entry_buffer, PATH_MAX, "user:%s:%s",
X				username, perms);
X			token = entry_buffer;
X
X		} else if (strncmp(token, "group:", 6) == 0 &&
X		    strchr(",", token[6]) == NULL) {
X			char *groupname = &token[6], *c = groupname;
X			char *perms, *agid;
X			gid_t	gdummy;
X			/* gidname does not check for NULL! */
X
X			/* check for damaged group names with spaces */
X			if (strchr(groupname, ':') == NULL) {
X				/*
X				 * Looks like a damaged group name that had
X				 * spaces in it, like "Domain,Users". Repair.
X				 */
X				char *unexpected_sep = strchr(groupname, '\0');
X
X				if (strtok(NULL, ",")) {
X					*unexpected_sep = ' ';
X					continue;
X				}
X			}
X
X			/* group name */
X			if (*groupname != ':') {
X				c++;
X				while (strchr(":,", *c) == NULL)
X					c++;
X			}
X			if (*c)
X				*c++ = '\0';
X
X			/* permissions */
X			perms = c;
X			while (strchr(":,", *c) == NULL)
X				c++;
X			if (*c)
X				*c++ = '\0';
X
X			/* identifier */
X			agid = c;
X			while (strchr(":,", *c) == NULL)
X				c++;
X			if (*c)
X				*c++ = '\0';
X
X			/*
X			 * XXX We use strlen(groupname)+1 to tell gidname not
X			 * XXX to stop comparing before the end of the
X			 * XXX groupname has been reached. Otherwise "joe" and
X			 * XXX "joeuser" would be compared as identical.
X			 */
X			if (*agid && (numeric ||
X			    !ic_gidname(groupname, strlen(groupname)+1, &gdummy)))
X				groupname = agid;
X			js_snprintf(entry_buffer, PATH_MAX, "group:%s:%s",
X				groupname, perms);
X			token = entry_buffer;
X		}
X		if (*token != '\0') {
X			strcpy(acltext, token);
X			acltext += strlen(token);
X			*acltext++ = ',';
X		}
X
X		token = strtok(NULL, ",");
X	}
X	*(--acltext) = '\0';
X}
X
X#endif  /* USE_ACL */
X
X#ifndef	DID_OPT_ACL
XEXPORT void
Xopt_acl()
X{
X}
X#endif
END-of-star-1.5.2/star/acl_unix.c
echo x - star-1.5.2/star/star_fat.c
sed 's/^X//' >star-1.5.2/star/star_fat.c << 'END-of-star-1.5.2/star/star_fat.c'
X/* @(#)star.c	1.339 13/01/09 Copyright 1985, 88-90, 92-96, 98, 99, 2000-2013 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)star.c	1.339 13/01/09 Copyright 1985, 88-90, 92-96, 98, 99, 2000-2013 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1985, 88-90, 92-96, 98, 99, 2000-2013 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	STAR_MAIN
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/signal.h>
X#include <schily/string.h>
X#include "star.h"
X#include "props.h"
X#include "diff.h"
X#include <schily/wait.h>
X#include <schily/standard.h>
X#define	__XDEV__	/* Needed to activate _dev_init() */
X#include <schily/device.h>
X#include <schily/stat.h>	/* Needed for umask(2) */
X#include <schily/getargs.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "fifo.h"	/* Needed for #undef FIFO */
X#include "dumpdate.h"
X#ifdef	USE_FIND
X#include <schily/walk.h>
X#include <schily/find.h>
X#endif
X#include "starsubs.h"
X#include "checkerr.h"
X
XEXPORT	int	main		__PR((int ac, char **av));
XLOCAL	void	star_create	__PR((int ac, char *const *av));
XLOCAL	void	checkdumptype	__PR((GINFO *gp));
XLOCAL	void	init_ddate	__PR((char *name));
XEXPORT	void	copy_create	__PR((int ac, char *const *av));
XLOCAL	int	getfilecount	__PR((int ac, char *const *av, const char *fmt));
XLOCAL	void	getdir		__PR((int *acp, char *const **avp,
X						const char **dirp));
XLOCAL	void	openlist	__PR((void));
XLOCAL	void	check_stdin	__PR((char *name));
XLOCAL	void	susage		__PR((int ret));
XLOCAL	void	usage		__PR((int ret));
XLOCAL	void	xusage		__PR((int ret));
XLOCAL	void	dusage		__PR((int ret));
XLOCAL	void	husage		__PR((int ret));
XLOCAL	void	gargs		__PR((int ac, char *const *av));
XLOCAL	void	star_mkvers	__PR((void));
XLOCAL	void	star_helpvers	__PR((char *name, BOOL help, BOOL xhelp, BOOL prvers));
XLOCAL	void	star_checkopts	__PR((BOOL oldtar, BOOL dodesc, BOOL usetape,
X					int archive, BOOL no_fifo,
X					Llong llbs));
XEXPORT	void	star_verifyopts	__PR((void));
XLOCAL	void	star_nfiles	__PR((int files, int minfiles));
XLOCAL	int	getpaxH		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getpaxL		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getpaxP		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getfind		__PR((char *arg, long *valp, int *pac, char *const **pav));
XLOCAL	int	getpriv		__PR((char *arg, long *valp));
XLOCAL	int	getlldefault	__PR((char *arg, Llong *valp, int mult));
XEXPORT	int	getbnum		__PR((char *arg, Llong *valp));
XEXPORT	int	getknum		__PR((char *arg, Llong *valp));
XLOCAL	int	addtarfile	__PR((const char *tarfile));
XLOCAL	int	add_diffopt	__PR((char *optstr, long *flagp));
XLOCAL	int	gethdr		__PR((char *optstr, long *typep));
XLOCAL	int	getexclude	__PR((char *arg, long *valp, int *pac, char *const **pav));
X#ifdef	USED
XLOCAL	int	addfile		__PR((char *optstr, long *dummy));
X#endif
XLOCAL	void	set_signal	__PR((int sig, RETSIGTYPE (*handler)(int)));
XLOCAL	void	exsig		__PR((int sig));
XLOCAL	void	sighup		__PR((int sig));
XLOCAL	void	sigintr		__PR((int sig));
XLOCAL	void	sigquit		__PR((int sig));
XLOCAL	void	getstamp	__PR((void));
XLOCAL	void	set_ptype	__PR((int *pac, char *const **pav));
XLOCAL	void	docompat	__PR((int *pac, char *const **pav));
X
X#if	defined(SIGDEFER) || defined(SVR4)
X#define	signal	sigset
X#endif
X
X#define	QIC_24_TSIZE	122880		/*  61440 kBytes */
X#define	QIC_120_TSIZE	256000		/* 128000 kBytes */
X#define	QIC_150_TSIZE	307200		/* 153600 kBytes */
X#define	QIC_250_TSIZE	512000		/* 256000 kBytes (XXX not verified) */
X#define	QIC_525_TSIZE	1025000		/* 512500 kBytes */
X#define	TSIZE(s)	((s)*TBLOCK)
X
Xchar	strvers[] = "1.5.2";		/* The pure version string	*/
Xchar	*vers;				/* the full version string	*/
X
Xstruct star_stats	xstats;		/* for printing statistics	*/
X
Xextern	BOOL		havepat;	/* Pattern matching in use	*/
X
X#define	NTARFILE	100		/* Max # of archive files	*/
X
XFILE	*tarf;				/* The current archive		*/
XFILE	*listf;				/* File for list= option	*/
XFILE	*tty;				/* Open /dev/tty for questions	*/
XFILE	*vpr;				/* File for verbose printing	*/
XBOOL	did_stdin = FALSE;		/* Did use stdin for any option	*/
Xconst	char	*tarfiles[NTARFILE];	/* Cycle list of all archives	*/
Xint	ntarfiles;			/* Number of entries in list	*/
Xint	tarfindex;			/* Current index in list	*/
Xchar	*newvol_script;			/* -new-volume-script name	*/
XBOOL	multivol = FALSE;		/* -multivol specified		*/
XBOOL	force_noremote = FALSE;		/* -force-local specified	*/
Xchar	*listfile;			/* File name for list=		*/
XBOOL	pkglist = FALSE;		/* pkglist= specified		*/
Xchar	*stampfile;			/* Time stamp file for -newer	*/
XBOOL	errflag;			/* -e for abort on error	*/
Xconst	char	*wdir;			/* current working dir name	*/
Xconst	char	*currdir;		/* current -C dir argument	*/
Xconst	char	*dir_flags = NULL;	/* One/more -C options present	*/
XBOOL	bsdchdir = FALSE;		/* -C only valid for next arg	*/
Xchar	*volhdr;			/* VOLHDR= argument		*/
Xchar	*fs_name;			/* fs-name= for snapshot fs	*/
Xchar	*dd_name;			/* dumpdate= for snapshots	*/
Xdev_t	tape_dev;			/* st_dev for current archive	*/
Xino_t	tape_ino;			/* st_ino for current archive	*/
XBOOL	tape_isreg = FALSE;		/* Tape is a regular file	*/
X#ifdef	FIFO
XBOOL	use_fifo = TRUE;		/* Whether to use a FIFO or not	*/
X#else
XBOOL	use_fifo = FALSE;		/* Whether to use a FIFO or not	*/
X#endif
XBOOL	shmflag	= FALSE;		/* Whether to use shmem f. FIFO	*/
Xlong	fs;				/* FIFO size			*/
Xlong	bs;				/* TAPE block size (bytes)	*/
Xint	nblocks = 20;			/* TAPE blocks (512 byte units)	*/
XBOOL	not_tape = FALSE;		/* -sun-n not a Tape		*/
Xuid_t	dir_uid = _BAD_UID;		/* -dir-owner			*/
Xgid_t	dir_gid = _BAD_GID;		/* -dir-group			*/
Xuid_t	my_uid;				/* Current euid			*/
Xdev_t	curfs = NODEV;			/* Current st_dev for -M option	*/
Xstruct timeval	ddate;			/* The current dump date	*/
Xtime_t	sixmonth;			/* 6 months before limit (ls)	*/
Xtime_t	now;				/* now limit (ls)		*/
X/*
X * Change default header format into XUSTAR in 2004 (see below in gargs())
X */
Xlong	hdrtype	  = H_XSTAR;		/* default header format	*/
Xlong	chdrtype  = H_UNDEF;		/* command line hdrtype		*/
Xint	cmptype	  = C_NONE;		/* compression type		*/
Xint	iftype	  = I_TAR;		/* command line interface type	*/
Xint	ptype	  = P_STAR;		/* program interface type	*/
XBOOL	paxls	  = FALSE;		/* create PAX type listing	*/
Xint	version	  = 0;			/* Version from POSIX TAR  hdr	*/
Xint	swapflg	  = -1;			/* Whether to swap input	*/
XBOOL	debug	  = FALSE;		/* -debug has been specified	*/
Xint	xdebug	  = 0;			/* eXtended debug level		*/
Xint	dumplevel = -1;			/* level for incremental dumps	*/
Xint	oldlevel  = 0;			/* dumpleve this dump refers to	*/
XBOOL	dump_partial = FALSE;		/* Dump is not a full dump	*/
XBOOL	dump_cumulative = FALSE;	/* -cumulative has b. specified	*/
Xchar	*dumpdates = "/etc/tardumps";	/* Database for increment. dump	*/
XBOOL	wtardumps = FALSE;		/* Should update above file	*/
XBOOL	print_artype = FALSE;
XBOOL	showtime  = FALSE;		/* -time has been specified	*/
XBOOL	no_stats  = FALSE;		/* -no-statistics specified	*/
XBOOL	cpio_stats = FALSE;		/* -cpio-statistics specified	*/
XBOOL	do_fifostats = FALSE;		/* -fifostats specified		*/
XBOOL	numeric	  = FALSE;		/* -numeric user ids		*/
Xint	verbose   = 0;			/* -v has been specified	*/
XBOOL	silent    = FALSE;		/* -silent no informal msg	*/
XBOOL	prblockno = FALSE;		/* -block-number for all files	*/
XBOOL	no_xheader = FALSE;		/* -no-xheader ignore P.2001	*/
XBOOL	no_fsync  = FALSE;		/* -no-fsync on extract		*/
XBOOL	readnull  = FALSE;		/* -read0 on with list=		*/
XBOOL	tpath	  = FALSE;		/* -tpath print path only	*/
XBOOL	cflag	  = FALSE;		/* -c has been specified	*/
XBOOL	uflag	  = FALSE;		/* -u has been specified	*/
XBOOL	rflag	  = FALSE;		/* -r has been specified	*/
XBOOL	xflag	  = FALSE;		/* -x has been specified	*/
XBOOL	tflag	  = FALSE;		/* -t has been specified	*/
XBOOL	copyflag  = FALSE;		/* -copy has been specified	*/
XBOOL	nflag	  = FALSE;		/* -n dummy extract mode	*/
XBOOL	diff_flag = FALSE;		/* -diff has been specified	*/
XBOOL	Zflag	  = FALSE;		/* -Z has been specified	*/
XBOOL	zflag	  = FALSE;		/* -z has been specified	*/
XBOOL	bzflag	  = FALSE;		/* -bz has been specified	*/
XBOOL	lzoflag	  = FALSE;		/* -lzo has been specified	*/
XBOOL	p7zflag	  = FALSE;		/* -7z has been specified	*/
XBOOL	xzflag	  = FALSE;		/* -xz has been specified	*/
XBOOL	lzipflag  = FALSE;		/* -lzip has been specified	*/
Xchar	*compress_prg = NULL;		/* -compress-program specified	*/
XBOOL	multblk	  = FALSE;		/* -B has been specified	*/
XBOOL	ignoreerr = FALSE;		/* -i has been specified	*/
XBOOL	nodir	  = FALSE;		/* -d do not store dirs		*/
XBOOL	noxdir	  = FALSE;		/* -d do not create dirs	*/
XBOOL	noatime	  = FALSE;		/* -p a pax do not restore atime */
XBOOL	nomtime	  = FALSE;		/* -m do not restore times	*/
XBOOL	nochown	  = FALSE;		/* -o do not restore owner	*/
XBOOL	acctime	  = FALSE;		/* -atime has been specified	*/
XBOOL	pflag	  = FALSE;		/* -p restore permissions	*/
XBOOL	nopflag	  = FALSE;		/* -no-p don't restore perms	*/
XBOOL	dirmode	  = FALSE;		/* -dirmode wr. dirs past files	*/
XBOOL	nolinkerr = FALSE;		/* pr. link # err depends on -l	*/
XBOOL	follow	  = FALSE;		/* -h follow symbolic links	*/
XBOOL	paxfollow = FALSE;		/* PAX -L follow symbolic links	*/
XBOOL	paxHflag  = FALSE;		/* PAX -H follow symbolic links	*/
XBOOL	nodesc	  = FALSE;		/* -D do not descenc dirs	*/
XBOOL	nomount	  = FALSE;		/* -M do not cross mount points	*/
XBOOL	interactive = FALSE;		/* -w has been specified	*/
XBOOL	paxinteract = FALSE;		/* PAX -i has been specified	*/
XBOOL	signedcksum = FALSE;		/* -signed-checksum		*/
XBOOL	partial	  = FALSE;		/* -P write partial last record	*/
XBOOL	nospec	  = FALSE;		/* -S no special files		*/
Xint	Fflag	  = 0;			/* -F,-FF,... no SCCS/RCS/...	*/
XBOOL	uncond	  = FALSE;		/* -U unconditional extract	*/
XBOOL	xdir	  = FALSE;		/* -xdir uncond. dir extract	*/
XBOOL	xdot	  = FALSE;		/* -xdot uncond '.' dir extract	*/
XBOOL	keep_old  = FALSE;		/* -k do not overwrite files	*/
XBOOL	refresh_old = FALSE;		/* -refresh existing only	*/
XBOOL	abs_path  = FALSE;		/* -/ absolute path allowed	*/
XBOOL	allow_dotdot = FALSE;		/* -.. '..' in path allowed	*/
XBOOL	secure_links = FALSE;		/* -secure-links (no .. & /)	*/
XBOOL	no_dirslash = FALSE;		/* -no-dirslash option		*/
XBOOL	notpat	  = FALSE;		/* -not invert pattern matcher	*/
XBOOL	match_tree = FALSE;		/* -match-tree match dir -> tree */
XBOOL	notarg	  = FALSE;		/* PAX -c invert match		*/
XBOOL	paxmatch  = FALSE;		/* Do PAX like matching		*/
XBOOL	paxnflag  = FALSE;		/* PAX -n one match only	*/
XBOOL	force_hole = FALSE;		/* -force-hole on extract	*/
XBOOL	sparse	  = FALSE;		/* -sparse has been specified	*/
XBOOL	to_stdout = FALSE;		/* -to-stdout extraction	*/
XBOOL	wready    = FALSE;		/* -wready wait for ready tape	*/
XBOOL	force_remove = FALSE;		/* -force-remove on extraction	*/
XBOOL	ask_remove = FALSE;		/* -ask-remove on extraction	*/
XBOOL	remove_first = FALSE;		/* -remove-first on extraction	*/
XBOOL	remove_recursive = FALSE;	/* -remove-recursive on extract	*/
XBOOL	keep_nonempty_dirs = FALSE;	/* -keep-nonempty-dirs on extract */
XBOOL	do_install = FALSE;		/* -install on extract		*/
XBOOL	nullout   = FALSE;		/* -onull - simulation write	*/
XBOOL	prinodes  = FALSE;		/* -prinodes print ino # w. -tv */
X
XUllong	maxsize	  = 0;			/* max file size for create	*/
Xstruct timeval	Newer = {0, 0};		/* Time stamp to compare with	*/
XUllong	tsize	  = 0;			/* Max tape size in tar blocks	*/
Xlong	diffopts  = 0L;			/* diffopts= bit mask		*/
XBOOL	nowarn	  = FALSE;		/* -nowarn has been specified	*/
XBOOL	Ctime	  = FALSE;		/* -ctime has been specified	*/
XBOOL	nodump	  = FALSE;		/* -nodump has been specified	*/
X
XBOOL	listnew	  = FALSE;		/* -newest list newest only	*/
XBOOL	listnewf  = FALSE;		/* -newest-file list n. plain f	*/
XBOOL	hpdev	  = FALSE;		/* -hpdev non POSIX dev #	*/
XBOOL	modebits  = FALSE;		/* -modebits more than 12 bits	*/
XBOOL	copylinks = FALSE;		/* -copylinks rather than link	*/
XBOOL	copyhardlinks = FALSE;		/* -copyhardlinks rather than link */
XBOOL	copysymlinks = FALSE;		/* -copysymlinks rather than link */
XBOOL	copydlinks = FALSE;		/* copy content of linked dirs	*/
XBOOL	hardlinks = FALSE;		/* -hardlinks ext. sym as hard	*/
XBOOL	symlinks  = FALSE;		/* -symlinks ext. hard as syml	*/
XBOOL	linkdata  = FALSE;		/* -link-data data in hardlinks	*/
XBOOL	doacl	  = FALSE;		/* -acl handle ACLs		*/
XBOOL	doxattr	  = FALSE;		/* -xattr handle extended fattr	*/
XBOOL	dofflags  = FALSE;		/* -xfflags handle extended ffl	*/
XBOOL	link_dirs = FALSE;		/* -link-dirs hard linked dirs	*/
XBOOL	dodump	  = FALSE;		/* -dump mode with all ino prop	*/
XBOOL	dorestore = FALSE;		/* -restore in incremental mode	*/
XBOOL	forcerestore = FALSE;		/* -force-restore in incremental mode	*/
XBOOL	dometa	  = FALSE;		/* -meta ino metadata only	*/
XBOOL	dumpmeta  = FALSE;		/* -dumpmeta metadata for ctime	*/
XBOOL	xmeta	  = FALSE;		/* -xmeta extract meta files	*/
XBOOL	lowmem	  = FALSE;		/* -lowmem use less memory	*/
X#ifdef	USE_FIND
XBOOL	dofind	  = FALSE;		/* -find option found		*/
Xint	find_ac	  = 0;			/* ac past -find option		*/
Xchar	*const *find_av = NULL;		/* av past -find option		*/
Xint	find_pac  = 0;			/* ac for first find primary	*/
Xchar	*const *find_pav = NULL;	/* av for first find primary	*/
Xfindn_t	*find_node;			/* syntaxtree from find_parse()	*/
Xvoid	*plusp;				/* residual for -exec ...{} +	*/
Xint	find_patlen;			/* len for -find pattern state	*/
X
XLOCAL 	int		walkflags = WALK_CHDIR | WALK_PHYS | WALK_NOEXIT |
X				    WALK_STRIPLDOT;
XLOCAL	int		maxdepth = -1;
XLOCAL	int		mindepth = -1;
XEXPORT	struct WALK	walkstate;
X#endif
X
XBOOL	tcompat	  = FALSE;	/* Tar compatibility (av[0] is tar/ustar)   */
XBOOL	fcompat	  = FALSE;	/* Archive file compatibility was requested */
X
Xint	intr	  = 0;		/* Did catch a ^C	*/
X
XBOOL	do_subst;
X
XGINFO	_ginfo;				/* Global (volhdr) information	*/
XGINFO	_grinfo;			/* Global read information	*/
XGINFO	*gip  = &_ginfo;		/* Global information pointer	*/
XGINFO	*grip = &_grinfo;		/* Global read info pointer	*/
X
X#ifdef	STAR_FAT
X#include "suntar.c"
X#include "gnutar.c"
X#include "cpio.c"
X#include "pax.c"
X#endif
X
X#ifndef	NO_STAR_MAIN
X#define	PTYPE_DEFAULT	P_STAR
X/*
X * Achtung: Optionen wie f= sind problematisch denn dadurch dass -ffilename geht,
X * werden wird bei Falschschreibung von -fifo evt. eine Datei angelegt wird.
X */
X/* BEGIN CSTYLED */
Xchar	_opts[] = "C*,find~,help,xhelp,version,debug,xdebug#,xd#,bsdchdir,pax-ls,level#,tardumps*,wtardumps,time,no_statistics,no-statistics,cpio-statistics,fifostats,numeric,v+,block-number,tpath,c,u,r,x,t,copy,n,diff,diffopts&,H&,artype&,print-artype,fs-name*,force_hole,force-hole,sparse,to_stdout,to-stdout,wready,force_remove,force-remove,ask_remove,ask-remove,remove_first,remove-first,remove_recursive,remove-recursive,keep-nonempty-dirs,install,nullout,onull,fifo,no_fifo,no-fifo,shm,fs&,VOLHDR*,list*,pkglist*,multivol,new-volume-script*,force-local,restore,force-restore,file&,f&,T,Z,z,bz,j,lzo,7z,xz,lzip,compress-program*,bs&,blocks&,b&,B,pattern&,pat&,i,d,m,o,nochown,pax-p&,a,atime,p,no-p,dirmode,l,h,L,pax-L~,pax-H~,pax-P~,D,dodesc,M,xdev,w,pax-i,I,X&,exclude-from&,O,signed_checksum,signed-checksum,P,S,F+,U,xdir,xdot,k,keep_old_files,keep-old-files,refresh_old_files,refresh-old-files,refresh,/,..,secure-links,no-dirslash,not,V,match-tree,pax-match,pax-n,pax-c,notarg,maxsize&,newer*,ctime,nodump,tsize&,qic24,qic120,qic150,qic250,qic525,nowarn,newest_file,newest-file,newest,hpdev,modebits,copylinks,copyhardlinks,copysymlinks,copydlinks,hardlinks,symlinks,link-data,acl,xattr,xattr-linux,xfflags,link-dirs,dumpdate*,dump,cumulative,dump-cumulative,meta,dumpmeta,xmeta,silent,lowmem,no-xheader,no-fsync,read0,errctl&,e,data-change-warn,prinodes,dir-owner*,dir-group*,umask*,s&,?";
X/* END CSTYLED */
Xchar	*opts = _opts;
X#else
Xextern	char	*opts;
X#endif	/* NO_STAR_MAIN */
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	int		cac  = ac;
X	char *const	*cav = av;
X	int		oac;
X	char *const	*oav;
X	int		excode = 0;
X	char		*tgt_dir = NULL;
X
X	save_args(ac, av);
X
X	my_uid = geteuid();
X	my_uid = getuid();
X
X	docompat(&cac, &cav);
X
X	gargs(cac, cav);
X	--cac, cav++;
X	oac = cac;
X	oav = cav;
X
X#ifdef	SIGHUP
X	if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
X		set_signal(SIGHUP, sighup);
X#endif
X#ifdef	SIGINT
X	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
X		set_signal(SIGINT, sigintr);
X#endif
X#ifdef	SIGQUIT
X	if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
X		set_signal(SIGQUIT, sigquit);
X#endif
X#ifdef	SIGINFO
X	/*
X	 * Be polite to *BSD users.
X	 * They copied our idea and implemented intermediate status
X	 * printing in 'dd' in 1990.
X	 */
X	if (signal(SIGINFO, SIG_IGN) != SIG_IGN)
X		set_signal(SIGINFO, sigquit);
X#endif
X
X	file_raise((FILE *)NULL, FALSE);
X
X	initbuf(nblocks);		/* Calls initfifo() if needed	*/
X
X	(void) openremote();		/* This needs super user privilleges */
X
X	if (geteuid() != getuid()) {	/* AIX does not like to do this */
X					/* If we are not root		*/
X#ifdef	HAVE_SETREUID
X		if (setreuid(-1, getuid()) < 0)
X#else
X#ifdef	HAVE_SETEUID
X		if (seteuid(getuid()) < 0)
X#else
X		if (setuid(getuid()) < 0)
X#endif
X#endif
X			comerr("Panic cannot set back effective uid.\n");
X	}
X	my_uid = geteuid();
X	/*
X	 * WARNING: We now are no more able to open a new remote connection
X	 * unless we have been called by root.
X	 * It you like to do a remote multi-tape backup to different hosts
X	 * and do not call star from root, you are lost.
X	 */
X
X	opentape();
X
X	if (stampfile)
X		getstamp();
X
X	star_mkvers();		/* Create version string */
X	setprops(chdrtype);	/* Set up properties for archive format */
X
X	if (!(rflag || uflag) || chdrtype != H_UNDEF)
X		star_verifyopts(); /* Chk if options are valid for chdrtype */
X
X	if (dumplevel >= 0)
X		initdumpdates(dumpdates, wtardumps);
X	dev_init(debug);	/* Init device macro handling */
X	xbinit();		/* Initialize buffer for extended headers */
X
X	if (dir_flags && (!tflag || copyflag))
X		wdir = dogetwdir();
X
X	gettimeofday(&ddate, 0);
X	now	 = ddate.tv_sec + 60;
X	sixmonth = ddate.tv_sec - 6L*30L*24L*60L*60L;
X#ifdef	USE_FIND
X	find_timeinit(ddate.tv_sec);
X	walkinitstate(&walkstate);
X#endif
X	if (dd_name)
X		init_ddate(dd_name);
X
X	ginit();		/* Initialize global (volhdr) info */
X
X	if (copyflag) {
X		int		lac = cac;
X		char *const	*lav = cav;
X
X		if (tflag) {
X			/*
X			 * Flag no args at 'extract' side in -c -list mode.
X			 */
X			cav = &oav[oac];
X			cac = 0;
X		} else {
X			/*
X			 * Find last file type argument.
X			 */
X			for (; ; --cac, cav++) {
X				if (getfiles(&cac, &cav, opts) == 0)
X					break;
X				lac = cac;
X				lav = cav;
X			}
X			tgt_dir = lav[0];
X			cav = &lav[1];
X			cac = lac-1;
X			if (cac > 0) {
X				errmsgno(EX_BAD,
X				"Badly placed option after target directory.\n");
X				susage(EX_BAD);
X			}
X		}
X	}
X
X
X#ifdef	FIFO
X	if (use_fifo) {
X		runfifo(oac, oav);	/* Run FIFO, fork() is called here  */
X		on_comerr(fifo_onexit,	/* For foreground FIFO process only */
X			(void *)0);
X	}
X#endif
X
X	if (copyflag) {
X		do_subst = FALSE;	/* Substitution only at create side */
X		havepat = FALSE;	/* Patterns only at create side */
X		listfile = NULL;	/* Listfile only at create side */
X		swapflg = 0;		/* Don't try to find out the hdrtype */
X		dir_flags = tgt_dir;	/* Target directory only at extract */
X#ifdef	USE_FIND
X		dofind = FALSE;		/* -find expr only at create side */
X#endif
X	}
X
X	if (xflag || tflag || diff_flag) {
X		/*
X		 * cflag will never be TRUE in this case
X		 */
X		if (listfile) {
X			openlist();
X			hash_build(listf);
X			if ((currdir = dir_flags) != NULL)
X				dochdir(currdir, TRUE);
X		} else {
X#ifdef	USE_FIND
X			if (!dofind) {
X#endif
X			for (; ; --cac, cav++) {
X				if (dir_flags)
X					getdir(&cac, &cav, &currdir);
X				if (getfiles(&cac, &cav, opts) == 0)
X					break;
X				addarg(cav[0]);
X			}
X#ifdef	USE_FIND
X			}
X#endif
X			closepattern();
X		}
X		if (tflag) {
X			list();
X		} else {
X			/*
X			 * xflag || diff_flag
X			 * First change dir to the one or last -C arg
X			 * in case there is no pattern in list.
X			 */
X			if ((currdir = dir_flags) != NULL)
X				dochdir(currdir, TRUE);
X			if (xflag)
X				extract(volhdr);
X			else
X				diff();
X		}
X	}
X	closepattern();
X	if (uflag || rflag) {
X		/*
X		 * cflag will also be TRUE in this case
X		 */
X		skipall();
X		syncbuf();
X		backtape();
X	}
X	if (cflag) {
X		/*
X		 * xflag, tflag, diff_flag will never be TRUE in this case
X		 */
X		star_create(cac, cav);
X	}
X
X#ifdef	USE_FIND
X	find_plusflush(plusp, &walkstate);
X#endif
X	if (!nolinkerr)
X		checklinks();
X	if (!use_fifo)
X		closetape();
X#ifdef	FIFO
X	if (use_fifo)
X		fifo_exit(0);
X#endif
X
X#ifdef	HAVE_FORK
X	while (wait(0) >= 0) {
X		;
X		/* LINTED */
X	}
X#endif
X	if (!no_stats)
X		prpatstats();
X	prstats();
X	if (checkerrs()) {
X		if (!nowarn && !no_stats) {
X			errmsgno(EX_BAD,
X			"Processed all possible files, despite earlier errors.\n");
X		}
X		excode = -2;
X	}
X	if (!isatty(fdown(stderr))) {
X		/*
X		 * Try to avoid that the verbose or diagnostic messages are
X		 * sometimes lost if called on Linux via "ssh". Unfortunately
X		 * this does not always help. If you like to make sure that
X		 * nothing gets lost, call: ssh host "star .... ; sleep 10"
X		 */
X		fflush(vpr);
X		fflush(stderr);
X#ifdef	HAVE_FSYNC
X		if (!no_fsync) {
X			fsync(fdown(vpr));
X			fsync(fdown(stderr));
X		}
X#endif
X		usleep(100000);
X	}
X#ifdef	FIFO
X	/*
X	 * Fetch errno from FIFO if available.
X	 */
X	if (fifo_errno())
X		excode = fifo_errno();
X#endif
X	if (dumplevel >= 0 && wtardumps) {
X		if (excode != 0 || intr) {
X			errmsgno(EX_BAD, "'%s' not written due to problems during backup.\n",
X				dumpdates);
X		} else {
X			int	dflags = 0;
X
X			if (gip->dumptype != DT_FULL)
X				dflags |= DD_PARTIAL;
X			if (dump_cumulative)
X				dflags |= DD_CUMULATIVE;
X
X			writedumpdates(dumpdates, gip->filesys, dumplevel, dflags, &ddate);
X		}
X	}
X
X	exit(excode);
X	/* NOTREACHED */
X	return (excode);	/* keep lint happy */
X}
X
XLOCAL void
Xstar_create(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	/*
X	 * xflag, tflag, diff_flag will never be TRUE in this case
X	 */
X	put_release();		/* Pax 'g' vendor unique */
X	put_archtype();		/* Pax 'g' vendor unique */
X	if (dumplevel < 0)	/* In dump mode we first collect the data */
X		put_volhdr(volhdr, TRUE);
X#ifdef	USE_FIND
X	if (dumplevel >= 0 && (listfile || dofind))
X		comerrno(EX_BAD,
X			"Cannot do incremental dumps with list= or -find.\n");
X#else
X	if (dumplevel >= 0 && listfile)
X		comerrno(EX_BAD, "Cannot do incremental dumps with list=.\n");
X#endif
X#ifdef	USE_FIND
X	if (dofind) {
X		if (find_patlen > 0) {
X			walkstate.patstate = ___malloc(sizeof (int) * find_patlen,
X						"space for pattern state");
X		}
X
X		walkstate.walkflags	= walkflags;
X		walkstate.maxdepth	= maxdepth;
X		walkstate.mindepth	= mindepth;
X		walkstate.lname		= NULL;
X		walkstate.tree		= find_node;
X		walkstate.err		= 0;
X		walkstate.pflags	= 0;
X
X		nodesc = TRUE;
X		for (av = find_av; av != find_pav; av++) {
X			treewalk(*av, walkfunc, &walkstate);
X		}
X	} else
X#endif
X	if (listfile) {
X		openlist();
X		if ((currdir = dir_flags) != NULL)
X			dochdir(currdir, TRUE);
X		/*
X		 * We do not allow file type args together with list=
X		 * Note that Sun tar allows a mix.
X		 */
X		if (getfiles(&ac, &av, opts) > 0)
X			comerrno(EX_BAD, "Too many args for list= option.\n");
X		createlist();
X	} else {
X		const char	*cdir = NULL;
X
X		for (; ; --ac, av++) {
X			if (dir_flags)
X				getdir(&ac, &av, &currdir);
X			if (currdir && cdir != currdir) {
X				if (!(dochdir(wdir, FALSE) &&
X				    dochdir(currdir, FALSE)))
X					break;
X				cdir = currdir;
X			}
X
X			if (getfiles(&ac, &av, opts) == 0)
X				break;
X			if (dumplevel >= 0) {
X				dumpd_t	*dp;
X				int	dflags = 0;
X
X				/*
X				 * The next message is only for debugging
X				 * purposes to find problems related to option
X				 * parsing.
X				 */
X				if (ac > 1)
X					errmsgno(EX_BAD, "INFO: ac %c av[0] '%s'\n", ac, av[0]);
X
X				/*
X				 * We cannot have more than one file type
X				 * argument in dump mode if we like to grant
X				 * the consistency of dumps. In theory, it would
X				 * be possible to allow it, but then we will not
X				 * be able to deal with renames from outside the
X				 * scope to inside the scope.
X				 */
X				if (ac > 1)
X					comerrno(EX_BAD,
X					"Only one file type arg allowed in dump mode.\n");
X				if (cdir == NULL)
X					comerrno(EX_BAD,
X					"Need '-C dir' in dump mode.\n");
X				if (cdir[0] != '/')
X					comerrno(EX_BAD,
X					"Need absolute path with '-C dir' in dump mode.\n");
X				if (!streql(av[0], "."))
X					comerrno(EX_BAD,
X					"File type arg must be '.' in dump mode.\n");
X
X				gip->filesys = (char *)cdir;
X				gip->gflags |= GF_FILESYS;
X				if (fs_name) {
X					gip->filesys = fs_name;
X					gip->cwd    = (char *)cdir;
X					gip->gflags |= GF_CWD;
X				}
X				/*
X				 * Set dump type to full/partial.
X				 */
X				checkdumptype(gip);
X				if (gip->dumptype != DT_FULL)
X					dflags |= DD_PARTIAL;
X				if (dump_cumulative)
X					dflags |= DD_CUMULATIVE;
X				dp = checkdumpdates(gip->filesys, dumplevel, dflags);
X				if (dp == NULL && dumplevel > 0 && gip->dumptype != DT_FULL)
X					dp = checkdumpdates(gip->filesys, dumplevel, 0);
X				if (dp == NULL && dumplevel > 0) {
X					errmsgno(EX_BAD,
X					"No level 0 dump entry found in '%s'.\n",
X					dumpdates);
X					comerrno(EX_BAD, "Perform a level 0 dump first.\n");
X				}
X				if (dp) {
X					oldlevel = dp->level;
X					Newer = dp->date;
X					gip->reflevel = dp->level;
X					gip->refdate = dp->date;
X					gip->gflags |= (GF_REFLEVEL|GF_REFDATE);
X				}
X
X				adddumpdates(gip->filesys, dumplevel, dflags,
X								&ddate, TRUE);
X
X				error("Type of this level %d%s dump: %s\n",
X					dumplevel,
X					(dflags & DD_PARTIAL) ? "P":" ",
X					dt_name(gip->dumptype));
X				error("Date of this level %d%s dump: %s\n",
X					dumplevel,
X					(dflags & DD_PARTIAL) ? "P":" ",
X					dumpdate(&ddate));
X				error("Date of last level %d%s dump: %s\n",
X					oldlevel,
X					(dp && (dp->flags & DD_PARTIAL)) ? "P":" ",
X					dumpdate(&Newer));
X
X				put_volhdr(volhdr, TRUE);
X			}
X			if (intr)
X				break;
X			curfs = NODEV;
X			/*
X			 * To avoid empty incremental dumps, make sure that
X			 * av[0] is always in the archive in with dumplevel >= 0
X			 */
X			create(av[0], paxHflag, dumplevel >= 0);
X			if (bsdchdir && wdir && !dochdir(wdir, FALSE))
X				break;
X		}
X	}
X	flushlinks();
X	weof();
X	buf_drain();
X}
X
XLOCAL void
Xcheckdumptype(gp)
X	GINFO	*gp;
X{
X	FINFO	dinfo;
X	FINFO	ddinfo;
X	BOOL	full = FALSE;
X
X	if (!_getinfo(".", &dinfo))
X		return;
X	if (!_getinfo("..", &ddinfo))
X		return;
X
X	if (dinfo.f_ino == ddinfo.f_ino && dinfo.f_dev == ddinfo.f_dev)
X		full = TRUE;
X
X	if (dinfo.f_dev != ddinfo.f_dev)
X		full = TRUE;
X	if (full && !dump_partial && !havepat) {
X		gp->gflags |= GF_DUMPTYPE;
X		gp->dumptype = DT_FULL;
X	} else {
X		gp->gflags |= GF_DUMPTYPE;
X		gp->dumptype = DT_PARTIAL;
X	}
X}
X
XLOCAL void
Xinit_ddate(name)
X	char	*name;
X{
X	FINFO	ddinfo;
X
X	if (!_getinfo(name, &ddinfo))
X		comerr("Cannot star '%s'.\n", name);
X
X	ddate.tv_sec  = ddinfo.f_mtime;
X	ddate.tv_usec = ddinfo.f_mnsec / 1000;
X}
X
XEXPORT void
Xcopy_create(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int		oac = ac;
X	char *const	*oav = av;
X	int		lac = ac;
X#ifdef	__needed__
X	char *const	*lav = av;
X#endif
X
X	verbose = 0;		/* Verbose not at create side */
X	interactive = FALSE;	/* Interactive not at create side */
X
X	if (!tflag) {
X		/*
X		 * Cut off beginning at last file type arg.
X		 */
X		for (; ; --ac, av++) {
X			if (getfiles(&ac, &av, opts) == 0)
X				break;
X			lac = ac;
X#ifdef	__needed__
X			lav = av;
X#endif
X		}
X		ac = oac-lac;
X		av = oav;
X	}
X
X	star_create(ac, av);
X	/*
X	 * XXX Fehlerzusammenfassung fuer die -c reate Seite?
X	 */
X}
X
XLOCAL int
Xgetfilecount(ac, av, fmt)
X	int		ac;
X	char	*const *av;
X	const char	*fmt;
X{
X	int	files = 0;
X
X	for (; ; --ac, av++) {
X		if (getfiles(&ac, &av, fmt) == 0)
X			break;
X		files++;
X	}
X	return (files);
X}
X
XLOCAL void
Xgetdir(acp, avp, dirp)
X	int		*acp;
X	char *const	**avp;
X	const char	**dirp;
X{
X	int	len = strlen(opts);
X	char	*dir = NULL;
X
X	if (iftype == I_CPIO || iftype == I_PAX)
X		return;
X	/*
X	 * Skip all other flags.
X	 * Note that we need to patch away "...,?" at the end of the
X	 * option string so this will not interfere with a -C dir
X	 * option in the command line.
X	 */
X	if (opts[len-1] == '?' && opts[len-2] == ',')
X		opts[len-2] = '\0';
X	getfiles(acp, avp, &opts[3]);
X
X	if (debug) /* temporary */
X		errmsgno(EX_BAD, "Flag/File: '%s'.\n", (*avp)[0]);
X
Xagain:
X	/*
X	 * Get next '-C dir' option
X	 */
X	if (getargs(acp, avp, "C*", &dir) < 0) {
X		int	cac = *acp;
X		/*
X		 * Skip all other flags that are known to star.
X		 */
X		if (getfiles(acp, avp, &opts[3]) < 0) {
X			/*
X			 * If we did find other legal flags, try again.
X			 */
X			if (cac > *acp)
X				goto again;
X
X			errmsgno(EX_BAD, "Badly placed Option: %s.\n",
X						(*avp)[0]);
X			if ((*avp)[1] != NULL)
X				errmsgno(EX_BAD, "Next arg is '%s'.\n",
X						(*avp)[1]);
X			susage(EX_BAD);
X		}
X	}
X	if (opts[len-2] == '\0')
X		opts[len-2] = ',';
X	if (dir)
X		*dirp = dir;
X	if (debug) /* temporary */
X		errmsgno(EX_BAD, "Dirp: '%s' Dir: %s.\n", *dirp, dir);
X}
X
XLOCAL void
Xopenlist()
X{
X	if (streql(listfile, "-")) {
X		check_stdin("list=");
X		listf = stdin;
X		listfile = "stdin";
X	} else if ((listf = fileopen(listfile, "r")) == (FILE *)NULL)
X		comerr("Cannot open '%s'.\n", listfile);
X}
X
XLOCAL void
Xcheck_stdin(name)
X	char	*name;
X{
X	if (did_stdin) {
X		comerrno(EX_BAD,
X		"Did already use stdin, cannot use stdin for '%s' option.\n",
X		name);
X	}
X	did_stdin = TRUE;
X}
X
X#ifndef	NO_STAR_MAIN
X/*
X * Short usage
X */
XLOCAL void
Xsusage(ret)
X	int	ret;
X{
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_susage(ret); exit(ret);
X	case P_GNUTAR:
X		gnutar_susage(ret); exit(ret);
X	case P_PAX:
X		pax_susage(ret); exit(ret);
X	case P_CPIO:
X		cpio_susage(ret); exit(ret);
X	}
X#endif
X#ifdef	USE_FIND
X	error("Usage:\t%s cmd [options] [-find] file1 ... filen [find expression]\n", get_progname());
X#else
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X#endif
X	error("\nUse\t%s -help\n", get_progname());
X	error("and\t%s -xhelp\n", get_progname());
X	error("to get a list of valid cmds and options.\n");
X	error("\nUse\t%s H=help\n", get_progname());
X	error("to get a list of valid archive header formats.\n");
X	error("\nUse\t%s diffopts=help\n", get_progname());
X	error("to get a list of valid diff options.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_usage(ret); exit(ret);
X	case P_GNUTAR:
X		gnutar_usage(ret); exit(ret);
X	case P_PAX:
X		pax_usage(ret); exit(ret);
X	case P_CPIO:
X		cpio_usage(ret); exit(ret);
X	}
X#endif
X#ifdef	USE_FIND
X	error("Usage:\t%s cmd [options] [-find] file1 ... filen [find expression]\n", get_progname());
X#else
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X#endif
X	error("Cmd:\n");
X	error("\t-c/-u/-r\tcreate/update/replace archive with named files to tape\n");
X	error("\t-x/-t/-n\textract/list/trace named files from tape\n");
X	error("\t-copy\t\tcopy named files to destination directory\n");
X	error("\t-diff\t\tdiff archive against file system (see -xhelp)\n");
X	error("Options:\n");
X	error("\t-help\t\tprint this help\n");
X	error("\t-xhelp\t\tprint extended help\n");
X	error("\t-version\tprint version information and exit\n");
X	error("\tblocks=#,b=#\tset blocking factor to #x512 Bytes (default 20)\n");
X	error("\tfile=nm,f=nm\tuse 'nm' as tape instead of stdin/stdout\n");
X	error("\t-T\t\tuse $TAPE as tape instead of stdin/stdout\n");
X	error("\t-[0-7]\t\tSelect an alternative tape drive\n");
X#ifdef	FIFO
X	error("\t-fifo/-no-fifo\tuse/don't use a fifo to optimize data flow from/to tape\n");
X#if defined(USE_MMAP) && defined(USE_USGSHM)
X	error("\t-shm\t\tuse SysV shared memory for fifo\n");
X#endif
X#endif
X	error("\t-v\t\tincrement verbose level\n");
X	error("\t-block-number\tprint the block numbers where the TAR headers start\n");
X	error("\t-tpath\t\tuse with -t, -cv or -diff to list path names only\n");
X	error("\tH=header\tgenerate 'header' type archive (see H=help)\n");
X	error("\tartype=header\tgenerate 'header' type archive (see artype=help)\n");
X	error("\t-print-artype\tcheck and print archive and compression type on one line and exit.\n");
X	error("\tC=dir\t\tperform a chdir to 'dir' before storing/extracting next file\n");
X	error("\t-bsdchdir\tdo BSD style C= (only related to the next file type arg)\n");
X#ifdef	USE_FIND
X	error("\t-find\t\tOption separator: Use find command line to the right.\n");
X#endif
X	error("\t-Z\t\tpipe input/output through compress, does not work on tapes\n");
X	error("\t-z\t\tpipe input/output through gzip, does not work on tapes\n");
X	error("\t-j,-bz\t\tpipe input/output through bzip2, does not work on tapes\n");
X	error("\t-lzo\t\tpipe input/output through lzop, does not work on tapes\n");
X	error("\t-7z\t\tpipe input/output through p7zip, does not work on tapes\n");
X	error("\t-xz\t\tpipe input/output through xz, does not work on tapes\n");
X	error("\t-lzip\t\tpipe input/output through lzip, does not work on tapes\n");
X	error("\tcompress-program=name\tpipe input/output through program 'name', does not work on tapes\n");
X	error("\t-B\t\tperform multiple reads (needed on pipes)\n");
X	error("\t-i\t\tignore checksum errors\n");
X	error("\t-d\t\tdo not store/create directories\n");
X	error("\t-m\t\tdo not restore access and modification time\n");
X	error("\t-o,-nochown\tdo not restore owner and group\n");
X	error("\t-pax-p string\tuse PAX like privileges set up\n");
X	error("\t-a,-atime\treset access time after storing file\n");
X	error("\t-p\t\trestore file permissions\n");
X	error("\t-no-p\t\tdo not restore file permissions\n");
X	error("\t-l\t\tdo not print a message if not all links are dumped\n");
X	error("\t-h,-L\t\tfollow symbolic links as if they were files\n");
X	error("\t-pax-L\t\tfollow symbolic links as if they were files (PAX style)\n");
X	error("\t-pax-H\t\tfollow cmdline symbolic links as if they were files (PAX style)\n");
X	error("\t-D\t\tdo not descend directories\n");
X	error("\t-M,-xdev\tdo not descend mounting points\n");
X	error("\t-w\t\tdo interactive creation/extraction/renaming\n");
X	error("\t-pax-i\t\tdo interactive creation/extraction/renaming (PAX style)\n");
X	error("\t-O\t\tbe compatible to old tar (except for checksum bug)\n");
X	error("\t-P\t\tlast record may be partial (useful on cartridge tapes)\n");
X	error("\t-S\t\tdo not store/create special files\n");
X	error("\t-F,-FF,-FFF,...\tdo not store/create SCCS/RCS, core and object files\n");
X	error("\t-U\t\trestore files unconditionally\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xxusage(ret)
X	int	ret;
X{
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_xusage(ret); exit(ret);
X	case P_GNUTAR:
X		gnutar_xusage(ret); exit(ret);
X	case P_PAX:
X		pax_xusage(ret); exit(ret);
X	case P_CPIO:
X		cpio_xusage(ret); exit(ret);
X	}
X#endif
X#ifdef	USE_FIND
X	error("Usage:\t%s cmd [options] [-find] file1 ... filen [find expression]\n", get_progname());
X#else
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X#endif
X	error("Extended options:\n");
X	error("\tdiffopts=optlst\tcomma separated list of diffopts (see diffopts=help)\n");
X	error("\t-debug\t\tprint additional debug messages\n");
X	error("\txdebug=#,xd=#\tset extended debug level\n");
X	error("\t-pax-ls\t\tprint a PAX type file listing\n");
X	error("\t-silent\t\tno not print informational messages\n");
X	error("\t-lowmem\t\ttry to use less memory for operation\n");
X	error("\t-not,-V\t\tuse those files which do not match pat= pattern\n");
X	error("\t-pax-match\tuse PAX like pattern matching\n");
X	error("\t-pax-n\t\tonly one match per pattern allowed\n");
X	error("\t-notarg,-pax-c\tuse those files which do not match file type pattern\n");
X	error("\tVOLHDR=name\tuse name to generate a volume header\n");
X	error("\t-xdir\t\textract dir even if the current is never\n");
X	error("\t-xdot\t\textract first '.' or './' dir even if the current is never\n");
X	error("\t-dirmode\twrite directories after the files they contain\n");
X	error("\t-link-dirs\tlook for hard linked directories in create mode\n");
X	error("\t-dump\t\tarchive more ino metadata (needed for incremental dumps)\n");
X	error("\t-restore\trestore incremental dumps\n");
X	error("\t-force-restore\tforce to restore partial incremental dumps\n");
X	error("\t-no-xheader\tdo not read or write extended headers regardless of format\n");
X	error("\t-meta\t\tuse inode metadata only (omit file content)\n");
X	error("\t-xmeta\t\textract meta files\n");
X	error("\t-dupmeta\tuse inode metadata in dump mode if only ctime is newer\n");
X	error("\t-keep-old-files,-k\tkeep existing files\n");
X	error("\t-refresh-old-files\trefresh existing files, don't create new files\n");
X	error("\t-refresh\trefresh existing files, don't create new files\n");
X	error("\t-/\t\tdon't strip leading '/'s from file names\n");
X	error("\t-..\t\tdon't skip filenames that contain '..' in non-interactive extract\n");
X	error("\t-secure-links\tdon't extract links that start with '/' or contain '..'\n");
X	error("\t-no-dirslash\tdon't append a slash to directory names\n");
X	error("\tlist=name\tread filenames from named file\n");
X	error("\t-X name\t\texclude filenames from named file\n");
X	error("\t-exclude-from name\texclude filenames from named file\n");
X	error("\tpkglist=name\tread filenames from named file (unstable interface for sps)\n");
X	error("\t-read0\t\tread null terminated filenames with list=\n");
X	error("\t-data-change-warn\ttreat data/size changes in create more as warning only\n");
X	error("\t-e\t\tabort on all error conditions undefined by errctl=\n");
X	error("\terrctl=name\tread error contrl definitions from named file\n");
X	error("\t-dodesc\t\tdo descend directories found in a list= file\n");
X	error("\tpattern=p,pat=p\tset matching pattern\n");
X	error("\t-match-tree\tdo not scan the content of non matching dirs in create mode\n");
X	error("\ts=replstr\tApply ed like pattern substitution -s /old/new/gp on filenames\n");
X	error("\tlevel=dumplevel\tset current incremental dump level\n");
X	error("\t-cumulative\tmake a cumulative incremental dump (relative to same level)\n");
X	error("\ttardumps=name\tset file name for tar dump dates, default is %s\n", dumpdates);
X	error("\t-wtardumps\tupdate file for tar dump dates if in dump mode\n");
X	error("\tdumpdate=name\tuse timestamp from name instead of current time for %s\n", dumpdates);
X	error("\tfs-name=name\tuse name instead of mount point for %s\n", dumpdates);
X	error("\tmaxsize=#\tdo not store file if bigger than # (default mult is kB)\n");
X	error("\tnewer=name\tstore only files which are newer than 'name'\n");
X	error("\t-multivol\tread/write/list a multi volume archive\n");
X	error("\tnew-volume-script=script\tcall 'script' at end of each volume\n");
X	error("\t-ctime\t\tuse ctime for newer= option\n");
X	error("\t-nodump\t\tdo not dump files that have the nodump flag set\n");
X	error("\t-acl\t\thandle access control lists\n");
X	error("\t-xattr\t\thandle extended file attributes\n");
X	error("\t-xattr-linux\t\thandle extended file attributes (Linux variant)\n");
X	error("\t-xfflags\thandle extended file flags\n");
X	error("\t-prinodes\tif archive contains inode number, print them in list mode\n");
X	error("\tbs=#\t\tset (output) block size to #\n");
X#ifdef	FIFO
X	error("\tfs=#\t\tset fifo size to #\n");
X#endif
X	error("\ttsize=#\t\tset tape volume size to # (default multiplier is 512)\n");
X	error("\t-qic24\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_24_TSIZE)/1024);
X	error("\t-qic120\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_120_TSIZE)/1024);
X	error("\t-qic150\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_150_TSIZE)/1024);
X	error("\t-qic250\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_250_TSIZE)/1024);
X	error("\t-qic525\t\tset tape volume size to %d kBytes\n",
X						TSIZE(QIC_525_TSIZE)/1024);
X	error("\t-no-fsync\tdo not call fsync() for each extracted file (may be dangerous)\n");
X	error("\t-nowarn\t\tdo not print warning messages\n");
X	error("\t-time\t\tprint timing info\n");
X	error("\t-no-statistics\tdo not print statistics\n");
X	error("\t-cpio-statistics\tprint cpio style statistics\n");
X#ifdef	FIFO
X	error("\t-fifostats\tprint fifo statistics\n");
X#endif
X	error("\t-numeric\tdon't use user/group name from tape\n");
X	error("\t-newest\t\tfind newest file on tape\n");
X	error("\t-newest-file\tfind newest regular file on tape\n");
X	error("\t-hpdev\t\tuse HP's non POSIX compliant method to store dev numbers\n");
X	error("\t-modebits\tinclude all 16 bits from stat.st_mode, this violates POSIX-1003.1\n");
X	error("\t-copylinks\tCopy hard and symlinks rather than linking\n");
X	error("\t-copyhardlinks\tCopy hardlink source files rather than linking\n");
X	error("\t-copysymlinks\tCopy symlink source files rather than linking\n");
X	error("\t-copydlinks\tCopy the content of linked dirs\n");
X	error("\t-hardlinks\tExtract symlinks as hardlinks\n");
X	error("\t-link-data\tInclude data for hard linked files\n");
X	error("\t-symlinks\tExtract hardlinks as symlinks\n");
X	error("\t-signed-checksum\tuse signed chars to calculate checksum\n");
X	error("\t-sparse\t\thandle file with holes effectively on store/create\n");
X	error("\t-force-hole\ttry to extract all files with holes\n");
X	error("\t-to-stdout\textract files to stdout\n");
X	error("\t-wready\t\twait for tape drive to become ready\n");
X	error("\t-force-remove\tforce to remove non writable files on extraction\n");
X	error("\t-ask-remove\task to remove non writable files on extraction\n");
X	error("\t-remove-first\tremove files before extraction\n");
X	error("\t-remove-recursive\tremove files recursive\n");
X	error("\t-keep-nonempty-dirs\tdo not complain about non-empty dirs\n");
X	error("\t-install\tcarefully replace old files with -x, similar to install(1)\n");
X	error("\tdir-owner=user\tIntermediate created directories will be owned by 'user'.\n");
X	error("\tdir-group=user\tIntermediate created directories will be owned by 'group'.\n");
X	error("\tumask=mask\tSet star's umask to 'mask'.\n");
X	error("\t-onull,-nullout\tsimulate creating an achive to compute the size\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X#endif	/* NO_STAR_MAIN */
X
XLOCAL void
Xdusage(ret)
X	int	ret;
X{
X	error("Diff options:\n");
X	error("\tnot\t\tif this option is present, exclude listed options\n");
X	error("\t!\t\tif this option is present, exclude listed options\n");
X	error("\tall\t\tcompare everything\n");
X	error("\tperm\t\tcompare file permissions\n");
X	error("\tmode\t\tcompare file permissions\n");
X	error("\tsymperm\t\tcompare symlink permissions\n");
X	error("\ttype\t\tcompare file type\n");
X	error("\tnlink\t\tcompare linkcount (star dump mode only)\n");
X	error("\tuid\t\tcompare owner of file\n");
X	error("\tgid\t\tcompare group of file\n");
X	error("\tuname\t\tcompare name of owner of file\n");
X	error("\tgname\t\tcompare name of group of file\n");
X	error("\tid\t\tcompare owner, group, ownername and groupname of file\n");
X	error("\tsize\t\tcompare file size\n");
X	error("\tdata\t\tcompare content of file\n");
X	error("\tcont\t\tcompare content of file\n");
X	error("\trdev\t\tcompare rdev of device node\n");
X	error("\thardlink\tcompare target of hardlink\n");
X	error("\tsymlink\t\tcompare target of symlink\n");
X	error("\tsympath\t\tcompare target pathname of symlink\n");
X	error("\tsparse\t\tcompare if both files are sparse or not\n");
X	error("\tatime\t\tcompare access time of file (only star)\n");
X	error("\tmtime\t\tcompare modification time of file\n");
X	error("\tctime\t\tcompare creation time of file (only star)\n");
X	error("\ttimes\t\tcompare all times of file\n");
X	error("\tlmtime\t\tcompare modification time of symlinks\n");
X	error("\txtimes\t\tcompare all times and lmtime\n");
X	error("\tdir\t\tcompare directory content (star dump mode only)\n");
X#ifdef USE_ACL
X	error("\tacl\t\tcompare access control lists (specify -acl also)\n");
X#endif
X#ifdef USE_XATTR
X	error("\txattr\t\tcompare extended attributes (specify -xattr also)\n");
X#endif
X#ifdef USE_FFLAGS
X	error("\tfflags\t\tcompare extended file flags (specify -xfflags also)\n");
X#endif
X	error("\n");
X	error("Default is to compare everything except atime.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xhusage(ret)
X	int	ret;
X{
X	error("Header types (default marked with '*'):\n");
X	hdr_usage();
X	exit(ret);
X	/* NOTREACHED */
X}
X
X#ifndef	NO_STAR_MAIN
XLOCAL void
Xgargs(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int	files	 = 0;
X	int	minfiles = 1;
X	BOOL	help	 = FALSE;
X	BOOL	xhelp	 = FALSE;
X	BOOL	prvers	 = FALSE;
X	BOOL	oldtar	 = FALSE;
X	BOOL	no_fifo	 = FALSE;
X	BOOL	usetape	 = FALSE;
X	BOOL	dodesc	 = FALSE;
X	BOOL	qic24	 = FALSE;
X	BOOL	qic120	 = FALSE;
X	BOOL	qic150	 = FALSE;
X	BOOL	qic250	 = FALSE;
X	BOOL	qic525	 = FALSE;
X	BOOL	dchangeflag = FALSE;
X	char	*pkglistfile = NULL;
X	char	*diruid	 = NULL;
X	char	*dirgid	 = NULL;
X	char	*u_mask	 = NULL;
X	const	char	*p;
X	Llong	llbs	 = 0;
Xsigned	char	archive	 = -1;		/* On IRIX, we have unsigned chars by default */
XBOOL	Ointeractive	 = FALSE;
X
X/* BEGIN CSTYLED */
X/*char	_opts[] = "C*,find~,help,xhelp,version,debug,xdebug#,xd#,bsdchdir,pax-ls,level#,tardumps*,wtardumps,time,no_statistics,no-statistics,cpio-statistics,fifostats,numeric,v+,block-number,tpath,c,u,r,x,t,copy,n,diff,diffopts&,H&,artype&,print-artype,fs-name*,force_hole,force-hole,sparse,to_stdout,to-stdout,wready,force_remove,force-remove,ask_remove,ask-remove,remove_first,remove-first,remove_recursive,remove-recursive,keep-nonempty-dirs,install,nullout,onull,fifo,no_fifo,no-fifo,shm,fs&,VOLHDR*,list*,pkglist*,multivol,new-volume-script*,force-local,restore,force-restore,file&,f&,T,Z,z,bz,j,lzo,7z,xz,lzip,compress-program*,bs&,blocks&,b&,B,pattern&,pat&,i,d,m,o,nochown,pax-p&,a,atime,p,no-p,dirmode,l,h,L,pax-L~,pax-H~,pax-P~,D,dodesc,M,xdev,w,pax-i,I,X&,exclude-from&,O,signed_checksum,signed-checksum,P,S,F+,U,xdir,xdot,k,keep_old_files,keep-old-files,refresh_old_files,refresh-old-files,refresh,/,..,secure-links,no-dirslash,not,V,match-tree,pax-match,pax-n,pax-c,notarg,maxsize&,newer*,ctime,nodump,tsize&,qic24,qic120,qic150,qic250,qic525,nowarn,newest_file,newest-file,newest,hpdev,modebits,copylinks,copyhardlinks,copysymlinks,copydlinks,hardlinks,symlinks,link-data,acl,xattr,xattr-linux,xfflags,link-dirs,dumpdate*,dump,cumulative,dump-cumulative,meta,dumpmeta,xmeta,silent,lowmem,no-xheader,no-fsync,read0,errctl&,e,data-change-warn,prinodes,dir-owner*,dir-group*,umask*,s&,?";*/
X/* END CSTYLED */
X
X#ifdef	STAR_FAT
X	switch (ptype) {
X
X	case P_SUNTAR:
X		suntar_gargs(ac, av);
X		return;
X	case P_GNUTAR:
X		gnutar_gargs(ac, av);
X		return;
X	case P_PAX:
X		pax_gargs(ac, av);
X		return;
X	case P_CPIO:
X		cpio_gargs(ac, av);
X		return;
X	}
X#endif
X
X	p = filename(av[0]);
X	if (streql(p, "ustar")) {
X		/*
X		 * If we are called as "ustar" we are as POSIX-1003.1-1988
X		 * compliant as possible. There are no enhancements at all.
X		 */
X		hdrtype = H_USTAR;
X	} else if (streql(p, "tar")) {
X		/*
X		 * If we are called as "tar" we are mostly POSIX compliant
X		 * and use POSIX-1003.1-2001 extensions. The differences of the
X		 * base format compared to POSIX-1003.1-1988 can only be
X		 * regocnised by star. Even the checsum bug of the "pax"
X		 * reference implementation is not hit by the fingerprint
X		 * used to allow star to discriminate XUSTAR from USTAR.
X		 */
X		hdrtype = H_XUSTAR;
X	}
X	/*
X	 * Current default archive format in all other cases is XSTAR (see
X	 * above). This will not change until 2004 (then the new XUSTAR format
X	 * is recognised by star for at least 5 years and we may asume that
X	 * all star installations will properly handle it.
X	 * XSTAR is USTAR with extensions similar to GNU tar.
X	 */
X
X	iftype = I_TAR;		/* command line interface */
X	ptype  = P_STAR;	/* program interface type */
X
X	--ac, ++av;
X	files = getfilecount(ac, av, opts);
X	if (getallargs(&ac, &av, opts,
X				&dir_flags,
X				getfind, NULL,
X				&help, &xhelp, &prvers, &debug, &xdebug, &xdebug,
X				&bsdchdir, &paxls,
X				&dumplevel, &dumpdates, &wtardumps,
X				&showtime, &no_stats, &no_stats, &cpio_stats,
X				&do_fifostats,
X				&numeric, &verbose, &prblockno, &tpath,
X#ifndef	__old__lint
X				&cflag,
X				&uflag,
X				&rflag,
X				&xflag,
X				&tflag,
X				&copyflag,
X				&nflag,
X				&diff_flag, add_diffopt, &diffopts,
X				gethdr, &chdrtype, gethdr, &chdrtype,
X				&print_artype,
X				&fs_name,
X				&force_hole, &force_hole, &sparse, &to_stdout, &to_stdout, &wready,
X				&force_remove, &force_remove, &ask_remove, &ask_remove,
X				&remove_first, &remove_first, &remove_recursive, &remove_recursive,
X				&keep_nonempty_dirs, &do_install,
X				&nullout, &nullout,
X				&use_fifo, &no_fifo, &no_fifo, &shmflag,
X				getnum, &fs,
X				&volhdr,
X				&listfile, &pkglistfile,
X				&multivol, &newvol_script,
X				&force_noremote,
X				&dorestore, &forcerestore,
X				/*
X				 * All options starting with -f need to appear
X				 * before this line.
X				 */
X				addtarfile, NULL,
X				addtarfile, NULL,
X				&usetape,
X				&Zflag, &zflag, &bzflag, &bzflag, &lzoflag,
X				&p7zflag, &xzflag, &lzipflag,
X				&compress_prg,
X				getnum, &bs,
X				getbnum, &llbs,
X				getbnum, &llbs,
X				&multblk,
X				addpattern, NULL,
X				addpattern, NULL,
X				&ignoreerr,
X				&nodir,
X				&nomtime, &nochown, &nochown,
X				getpriv, NULL,
X				&acctime, &acctime,
X				&pflag, &nopflag, &dirmode,
X				&nolinkerr,
X				&follow, &follow,
X#ifdef	USE_FIND
X				getpaxL, &walkflags,
X				getpaxH, &walkflags,
X				getpaxP, &walkflags,
X#else
X				getpaxL, NULL,
X				getpaxH, NULL,
X				getpaxP, NULL,
X#endif
X				&nodesc,
X				&dodesc,
X				&nomount, &nomount,
X				&interactive, &paxinteract,
X				&Ointeractive,
X				getexclude, NULL,
X				getexclude, NULL,
X				&oldtar, &signedcksum, &signedcksum,
X				&partial,
X				&nospec, &Fflag,
X				&uncond, &xdir, &xdot,
X				&keep_old, &keep_old, &keep_old,
X				&refresh_old, &refresh_old, &refresh_old,
X				&abs_path, &allow_dotdot, &secure_links,
X				&no_dirslash,
X				&notpat, &notpat, &match_tree,
X				&paxmatch, &paxnflag, &notarg, &notarg,
X				getknum, &maxsize,
X				&stampfile,
X				&Ctime,
X				&nodump,
X				getbnum, &tsize,
X				&qic24,
X				&qic120,
X				&qic150,
X				&qic250,
X				&qic525,
X				&nowarn,
X#endif /* __old__lint */
X				&listnewf, &listnewf,
X				&listnew,
X				&hpdev, &modebits,
X				&copylinks, &copyhardlinks, &copysymlinks,
X				&copydlinks,
X				&hardlinks, &symlinks, &linkdata,
X				&doacl, &doxattr, &doxattr, &dofflags,
X				&link_dirs,
X				&dd_name,
X				&dodump, &dump_cumulative, &dump_cumulative,
X				&dometa, &dumpmeta, &xmeta,
X				&silent, &lowmem, &no_xheader, &no_fsync, &readnull,
X				errconfig, NULL,
X				&errflag, &dchangeflag,
X				&prinodes,
X				&diruid, &dirgid, &u_mask,
X				parsesubst, &do_subst, &archive) < 0) {
X		errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
X		susage(EX_BAD);
X	}
X
X	if (archive != -1 && !(archive >= '0' && archive <= '7')) {
X		errmsgno(EX_BAD, "Bad Option: -%c.\n", archive);
X		susage(EX_BAD);
X	}
X	star_helpvers("star", help, xhelp, prvers);
X
X	if (Ointeractive) {
X		comerrno(EX_BAD, "Option -I is obsolete and will get a different meaning in next release, use -w instead.\n");
X	}
X	if (tsize == 0) {
X		if (qic24)  tsize = QIC_24_TSIZE;
X		if (qic120) tsize = QIC_120_TSIZE;
X		if (qic150) tsize = QIC_150_TSIZE;
X		if (qic250) tsize = QIC_250_TSIZE;
X		if (qic525) tsize = QIC_525_TSIZE;
X	}
X	if (pkglistfile != NULL) {
X		listfile = pkglistfile;
X		pkglist = TRUE;
X	}
X	if (u_mask) {
X		long	l;
X
X		if (*astolb(u_mask, &l, 8))
X			comerrno(EX_BAD, "Bad umask '%s'.\n", u_mask);
X		umask((mode_t)l);
X	}
X	if (diruid) {
X		Llong	ll;
X		uid_t	uid;
X
X		if (!ic_uidname(diruid, strlen(diruid), &uid)) {
X			if (*astollb(diruid, &ll, 10))
X				comerrno(EX_BAD, "Bad uid '%s'.\n", diruid);
X			dir_uid = ll;
X		} else {
X			dir_uid = uid;
X		}
X	}
X	if (dirgid) {
X		Llong	ll;
X		gid_t	gid;
X
X		if (!ic_gidname(dirgid, strlen(dirgid), &gid)) {
X			if (*astollb(dirgid, &ll, 10))
X				comerrno(EX_BAD, "Bad gid '%s'.\n", diruid);
X			dir_gid = ll;
X		} else {
X			dir_gid = gid;
X		}
X	}
X
X	if (dchangeflag)
X		errconfig("WARN|GROW|SHRINK *");
X
X	star_checkopts(oldtar, dodesc, usetape, archive, no_fifo, llbs);
X#ifdef	USE_FIND
X	if (dofind && find_ac > 0) {
X		int	cac = find_ac;
X		char *const * cav = find_av;
X		finda_t	fa;
X
X		find_firstprim(&cac, &cav);
X		find_pac = cac;
X		find_pav = cav;
X		files = find_ac - cac;
X		if (!cflag && files > 0)
X			comerrno(EX_BAD, "Path arguments not yet supported in extract mode.\n");
X
X		if (cac > 0) {
X			BOOL	did_stdout = FALSE;
X			int	i;
X
X			now = time(0);
X			now = now +60;
X			find_argsinit(&fa);
X			fa.walkflags = walkflags;
X			fa.Argc = cac;
X			fa.Argv = (char **)cav;
X			find_node = find_parse(&fa);
X			if (fa.primtype == FIND_ERRARG)
X				comexit(fa.error);
X			if (fa.primtype != FIND_ENDARGS)
X				comerrno(EX_BAD, "Incomplete expression.\n");
X			plusp = fa.plusp;
X			find_patlen = fa.patlen;
X			walkflags = fa.walkflags;
X			maxdepth = fa.maxdepth;
X			mindepth = fa.mindepth;
X
X			for (i = 0; i < ntarfiles; i++) {
X				if (tarfiles[i][0] == '-' && tarfiles[i][1] == '\0')
X					did_stdout = TRUE;
X			}
X			if (ntarfiles == 1 && nullout)
X				did_stdout = FALSE;
X
X			if (find_node && (did_stdin || did_stdout)) {
X				if (find_pname(find_node, "-exec") ||
X				    find_pname(find_node, "-execdir") ||
X				    find_pname(find_node, "-exec+") ||
X				    find_pname(find_node, "-execdir+") ||
X				    find_pname(find_node, "-ok") ||
X				    find_pname(find_node, "-okdir"))
X					comerrno(EX_BAD,
X					"Cannot -exec with f=-.\n");
X				if (cflag && did_stdout &&
X				    (find_pname(find_node, "-print") ||
X				    find_pname(find_node, "-print0") ||
X				    find_pname(find_node, "-printnnl") ||
X				    find_pname(find_node, "-ls")))
X					comerrno(EX_BAD,
X					"Cannot -print/-ls with f=-.\n");
X			}
X		}
X	}
X#endif
X	star_nfiles(files, minfiles);
X}
X#endif	/* NO_STAR_MAIN */
X
XLOCAL void
Xstar_mkvers()
X{
X	char	buf[512];
X
X	if (vers != NULL)
X		return;
X
X	js_snprintf(buf, sizeof (buf),
X		"%s %s (%s-%s-%s)", "star", strvers, HOST_CPU, HOST_VENDOR, HOST_OS);
X
X	vers = ___savestr(buf);
X}
X
XLOCAL void
Xstar_helpvers(name, help, xhelp, prvers)
X	char	*name;
X	BOOL	help;
X	BOOL	xhelp;
X	BOOL	prvers;
X{
X	if (help)
X		usage(0);
X	if (xhelp)
X		xusage(0);
X	star_mkvers();
X	if (prvers) {
X		printf("%s: %s\n\n", name, vers);
X		printf("Options:");
X#ifdef	USE_ACL
X		opt_acl();
X#endif
X#ifdef	USE_FIND
X		printf(" find");
X#endif
X#ifdef	USE_FFLAGS
X		opt_fflags();
X#endif
X#ifdef	USE_REMOTE
X		opt_remote();
X#endif
X#ifdef	USE_XATTR
X		opt_xattr();
X#endif
X		printf("\n\n");
X		printf("Copyright (C) 1985, 88-90, 92-96, 98, 99, 2000-2013 Jörg Schilling\n");
X		printf("This is free software; see the source for copying conditions.  There is NO\n");
X		printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
X		exit(0);
X	}
X}
X
XLOCAL void
Xstar_checkopts(oldtar, dodesc, usetape, archive, no_fifo, llbs)
X	BOOL		oldtar;
X	BOOL		dodesc;		/* descend dirs from listfile */
X	BOOL		usetape;
X	int		archive;
X	BOOL		no_fifo;
X	Llong		llbs;
X{
X	int	n;
X
X	if (print_artype) {
X		tflag = TRUE;
X		no_fifo = TRUE;
X	}
X	if ((n = xflag + cflag + uflag + rflag + tflag + copyflag + nflag + diff_flag) > 1) {
X		if ((n == 2) && copyflag && (tflag || diff_flag)) {
X			/*
X			 * This is OK: star -copy -t or star -copy -diff
X			 */
X			/* EMPTY */
X		} else if ((n == 2) && cflag && (tflag || diff_flag)) {
X			copyflag = TRUE;
X			cflag = FALSE;
X		} else {
X			errmsgno(EX_BAD,
X			"Too many commands, only one of -x -c -u -r -t -copy -n or -diff is allowed.\n");
X			susage(EX_BAD);
X		}
X	}
X	if (!(xflag | cflag | uflag | rflag | tflag | copyflag | nflag | diff_flag)) {
X		errmsgno(EX_BAD, "Missing command, must specify -x -c -u -r -t -copy -n or -diff.\n");
X		susage(EX_BAD);
X	}
X	if (uflag || rflag) {
X		cflag = TRUE;
X		no_fifo = TRUE;	/* Until we are able to reverse the FIFO */
X		dump_partial = TRUE;
X	}
X	if (nullout && !cflag) {
X		errmsgno(EX_BAD, "-nullout only makes sense in create mode.\n");
X		susage(EX_BAD);
X	}
X	if (no_fifo || nullout)
X		use_fifo = FALSE;
X#ifndef	FIFO
X	if (use_fifo) {
X		errmsgno(EX_BAD, "Fifo not configured in.\n");
X		susage(EX_BAD);
X	}
X#endif
X
X	if (ptype == P_SUNTAR)
X		nolinkerr ^= tcompat;
X
X	noxdir = nodir;
X	if (xdir)		/* Extract all dirs uncond */
X		xdot = FALSE;
X
X	if (copylinks) {
X		copyhardlinks = TRUE;
X		copysymlinks = TRUE;
X	}
X	if (copyflag) {
X		hdrtype = chdrtype = H_EXUSTAR;
X		dodump = TRUE;
X		partial = TRUE;	/* Important as we fiddle with FIFO obs */
X		nodir = FALSE;
X		multivol = FALSE;
X		linkdata = FALSE;
X
X		if (!tflag && !diff_flag)
X			xflag = TRUE;
X
X		if (!use_fifo) {
X			errmsgno(EX_BAD, "Need fifo for -copy mode.\n");
X			susage(EX_BAD);
X		}
X	}
X	if (cflag && linkdata && sparse)
X		linkdata = FALSE;	/* XXX Cannot yet do sparse datalinks */
X
X	if (dumplevel >= 0) {
X		/*
X		 * This is an articicial limitation, our code supports an
X		 * unlimited number of dump levels.
X		 */
X		if (dumplevel > 99)
X			comerrno(EX_BAD, "Illegal dump level, use 0..99\n");
X		dodump = TRUE;
X		if (!nomount)
X			comerrno(EX_BAD, "A dump needs the -M/-xdev option.\n");
X	}
X	if (dodump) {
X		chdrtype = H_EXUSTAR;
X		if (lowmem)
X			comerrno(EX_BAD, "Dump mode does not work with -lowmem.\n");
X	}
X	if (dump_cumulative) {
X		if (dumplevel < 0)
X			comerrno(EX_BAD, "With -cumulative, level= is needed.\n");
X	}
X	if (maxsize > 0 || Fflag > 0 || nospec || nodump)
X		dump_partial = TRUE;
X
X	if (forcerestore)
X		dorestore = TRUE;
X	if (dorestore) {
X		xdir = TRUE;
X		if (!uncond)
X			comerrno(EX_BAD, "A restore needs the -U option.\n");
X		if (do_install)
X			comerrno(EX_BAD, "-install not allowed in restore mode.\n");
X	}
X	if (oldtar)
X		chdrtype = H_OTAR;
X	if (chdrtype != H_UNDEF) {
X		if (H_TYPE(chdrtype) == H_OTAR)
X			oldtar = TRUE;	/* XXX hack */
X	}
X	/*
X	 * We do not set chdrtype here in case it is H_UNDEF and -r or -u have
X	 * been specified.
X	 */
X	if (cflag && (!(rflag || uflag) || chdrtype != H_UNDEF)) {
X		if (chdrtype != H_UNDEF)
X			hdrtype = chdrtype;
X		chdrtype = hdrtype;	/* wegen setprops(chdrtype) in main() */
X
X		/*
X		 * hdrtype und chdrtype
X		 * bei uflag, rflag sowie xflag, tflag, nflag, diff_flag
X		 * in get_tcb vergleichen !
X		 */
X	}
X	if (no_dirslash && chdrtype == H_OTAR) {
X		errmsgno(EX_BAD, "-no-dirslash cannot be used with the old tar format\n");
X		susage(EX_BAD);
X	}
X	if (diff_flag) {
X		if (diffopts == 0)
X			diffopts = D_DEFLT;
X	} else if (diffopts != 0) {
X		errmsgno(EX_BAD, "diffopts= only makes sense with -diff\n");
X		susage(EX_BAD);
X	}
X	if (fs == 0L) {
X		char	*ep = getenv("STAR_FIFOSIZE");
X
X		if (ep) {
X			if (getnum(ep, &fs) != 1) {
X				comerrno(EX_BAD,
X					"Bad fifo size environment '%s'.\n",
X									ep);
X			}
X		}
X	}
X	if (llbs != 0 && bs != 0) {
X		errmsgno(EX_BAD, "Only one of blocks= b= bs=.\n");
X		susage(EX_BAD);
X	}
X	if (llbs != 0) {
X		bs = (long)llbs;
X		if (bs != llbs) {
X			errmsgno(EX_BAD, "Blocksize used with blocks= or b= too large.\n");
X			susage(EX_BAD);
X		}
X	}
X	if (bs % TBLOCK) {
X		errmsgno(EX_BAD, "Invalid block size %ld.\n", bs);
X		susage(EX_BAD);
X	}
X	if (bs)
X		nblocks = bs / TBLOCK;
X	if (nblocks <= 0) {
X		errmsgno(EX_BAD, "Invalid block size %d blocks.\n", nblocks);
X		susage(EX_BAD);
X	}
X	bs = nblocks * TBLOCK;
X	if (debug) {
X		errmsgno(EX_BAD, "Block size %d blocks (%ld bytes).\n", nblocks, bs);
X	}
X	if (tsize > 0) {
X		if (tsize % TBLOCK) {
X			errmsgno(EX_BAD, "Invalid tape size %llu.\n", tsize);
X			susage(EX_BAD);
X		}
X		tsize /= TBLOCK;
X	}
X
X	if (pkglist) {
X		dodesc = FALSE;
X		readnull = FALSE;
X		if (!cflag)
X			comerrno(EX_BAD, "pkglist= option only works in create mode.\n");
X	}
X	if (listfile != NULL)
X		dump_partial = TRUE;
X
X	if (listfile != NULL && !dodesc)
X		nodesc = TRUE;
X	if (oldtar)
X		nospec = TRUE;
X	if (!tarfiles[0]) {
X		if (usetape) {
X			tarfiles[0] = getenv("TAPE");
X		}
X		if ((usetape || archive > 0) &&
X		    !tarfiles[0]) {
X			static char	arname[] = "archive0=";
X				Ullong	otsize = tsize;
X				char	*dfltfile = NULL;
X
X#ifdef	DFLT_FILE
X#define	DFILE	DFLT_FILE
X#else
X#define	DFILE	NULL
X#endif
X			/*
X			 * If we got a digit option, check for an 'archive#='
X			 * entry in /etc/default/[s!]tar. If there was no -f
X			 * or digit option, look for 'archive0='.
X			 */
X			if (archive < '0' || archive > '9')
X				archive = '0';
X			arname[7] = (char)archive;
X			if (ptype == P_SUNTAR)
X				dfltfile = DFILE;
X			if (!star_darchive(arname, dfltfile)) {
X				errmsgno(EX_BAD,
X					"Archive entry %c not found in %s. %s",
X					archive,
X					get_stardefaults(DFILE),
X					"Using stdin/stdout as archive.\n");
X				tarfiles[0] = NULL;
X				tsize = otsize;
X			}
X		}
X		if (!tarfiles[0])
X			tarfiles[0] = "-";
X		ntarfiles++;
X	}
X	if (!cflag && !copyflag) {
X		for (n = 0; n < ntarfiles; n++) {
X			if (tarfiles[n][0] == '-' && tarfiles[n][1] == '\0')
X				check_stdin("-f");
X		}
X	}
X	if (tsize % nblocks) {
X		/*
X		 * Silently round down to a multiple of the tape block size.
X		 */
X		tsize /= nblocks;
X		tsize *= nblocks;
X	}
X	/*
X	 * XXX This must be rethought with files split by multi volume and
X	 * XXX with with volume headers and continuation headers.
X	 */
X	if (tsize > 0 && tsize < 3) {
X		errmsgno(EX_BAD, "Tape size must be at least 3 blocks.\n");
X		susage(EX_BAD);
X	}
X	/*
X	 * XXX This is a place that should be checked every time, when
X	 * XXX possible interactivity is modified.
X	 */
X	if (interactive || ask_remove ||
X	    ((multivol || tsize > 0) && !newvol_script)) {
X#ifdef	JOS
X		tty = stderr;
X#else
X#ifdef	HAVE__DEV_TTY
X		if ((tty = fileopen("/dev/tty", "r")) == (FILE *)NULL)
X			comerr("Cannot open '/dev/tty'.\n");
X#else
X		tty = stderr;
X#endif
X#endif
X	}
X	if (nflag) {
X		xflag = TRUE;
X		interactive = TRUE;
X		if (verbose == 0 && !tpath)
X			verbose = 1;
X	}
X	if (to_stdout) {
X		force_hole = FALSE;
X	}
X	if (keep_old && refresh_old) {
X		errmsgno(EX_BAD, "Cannot use -keep-old-files and -refresh-old-files together.\n");
X		susage(EX_BAD);
X	}
X	if ((copylinks + hardlinks + symlinks) > 1) {
X		errmsgno(EX_BAD, "Only one of -copylinks -hardlinks -symlinks.\n");
X		susage(EX_BAD);
X	}
X
X	if (my_uid == 0 && !nopflag)
X		pflag = TRUE;
X
X	/*
X	 * -acl includes -p
X	 */
X	if (doacl)
X		pflag = TRUE;
X
X	star_defaults(&fs, NULL);
X}
X
XEXPORT void
Xstar_verifyopts()
X{
X	if (cflag && (props.pr_flags & PR_LINK_DATA) == 0)
X		linkdata = FALSE;
X	if (cflag && multivol && (props.pr_flags & PR_MULTIVOL) == 0) {
X		errmsgno(EX_BAD,
X		"Multi volume archives are not supported with %s format.\n",
X		hdr_name(chdrtype));
X		susage(EX_BAD);
X	}
X	if (cflag && doacl) {
X		/*
X		 * Check properties for archive format.
X		 */
X		if ((props.pr_xhmask & (XF_ACL_ACCESS|XF_ACL_DEFAULT)) == 0) {
X			errmsgno(EX_BAD,
X				"Archive format '%s' does not support -acl.\n",
X							hdr_name(chdrtype));
X			susage(EX_BAD);
X		}
X	}
X}
X
XLOCAL void
Xstar_nfiles(files, minfiles)
X	int	files;
X	int	minfiles;
X{
X	if (cflag || copyflag) {
X		if (copyflag && !tflag)
X			minfiles++;
X		if (listfile)
X			minfiles--;
X		if (files < minfiles) {
X			errmsgno(EX_BAD, "Too few arguments; will not create an empty archive.\n");
X			susage(EX_BAD);
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL int
XgetpaxH(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	GETARG_DEBUG
X	error("paxH\n");
X#endif
X	paxfollow = FALSE;
X	paxHflag = TRUE;
X#ifdef	USE_FIND
X	*(int *)valp |= WALK_ARGFOLLOW;
X#endif
X	return (1);
X}
X
X/* ARGSUSED */
XLOCAL int
XgetpaxL(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	GETARG_DEBUG
X	error("paxL\n");
X#endif
X	paxfollow = TRUE;
X	paxHflag = FALSE;
X#ifdef	USE_FIND
X	*(int *)valp |= WALK_ALLFOLLOW;
X#endif
X	return (1);
X}
X
X/* ARGSUSED */
XLOCAL int
XgetpaxP(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	GETARG_DEBUG
X	error("paxP\n");
X#endif
X	paxfollow = FALSE;
X	paxHflag = FALSE;
X#ifdef	USE_FIND
X	*(int *)valp &= ~(WALK_ARGFOLLOW | WALK_ALLFOLLOW);
X#endif
X	return (1);
X}
X
X/* ARGSUSED */
XLOCAL int
Xgetfind(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;	/* Not used until we introduce a ptr to opt struct */
X	int	*pac;
X	char	*const	**pav;
X{
X#ifdef	USE_FIND
X	dofind = TRUE;
X	find_ac = *pac;
X	find_av = *pav;
X	find_ac--, find_av++;
X	return (NOARGS);
X#else
X	return (BADFLAG);
X#endif
X}
X
X/* ARGSUSED */
XLOCAL int
Xgetpriv(arg, valp)
X	char	*arg;
X	long	*valp;	/* Not used until we introduce a ptr to opt struct */
X{
X	register char	*p = arg;
X	register char	c;
X
X	while ((c = *p++) != '\0') {
X		switch (c) {
X
X		case 'a':	/* do not preserve access time */
X			noatime = TRUE;
X			break;
X
X		case 'e':	/* preserve everything */
X			pflag = TRUE;
X			doacl = TRUE;
X			doxattr = TRUE;
X			dofflags = TRUE;
X			noatime = FALSE;
X			nomtime = FALSE;
X			nochown = FALSE;
X			break;
X
X		case 'm':	/* do not preserve modification time */
X			nomtime = TRUE;
X			break;
X
X		case 'o':	/* preserve userid/grupid & SUID/SGID */
X			nochown = FALSE;
X			break;
X
X		case 'p':	/* preserve file mode bits (permissions) */
X			pflag = TRUE;
X			break;
X
X		default:
X			errmsgno(EX_BAD,
X				"Bad character '%c' in option '-p %s'.\n",
X				c, arg);
X			return (-1);
X		}
X	}
X	return (1);
X}
X
XLOCAL int
Xgetlldefault(arg, valp, mult)
X	char	*arg;
X	Llong	*valp;
X	int	mult;
X{
X	int	ret = 1;
X	int	len = strlen(arg);
X
X	if (len > 0) {
X		len = (Uchar)arg[len-1];
X		if (!isdigit(len))
X			mult = 1;
X	}
X	ret = getllnum(arg, valp);
X	if (ret == 1)
X		*valp *= mult;
X	return (ret);
X}
X
XEXPORT int
Xgetbnum(arg, valp)
X	char	*arg;
X	Llong	*valp;
X{
X	return (getlldefault(arg, valp, 512));
X}
X
XEXPORT int
Xgetknum(arg, valp)
X	char	*arg;
X	Llong	*valp;
X{
X	return (getlldefault(arg, valp, 1024));
X}
X
XLOCAL int
Xaddtarfile(tarfile)
X	const char	*tarfile;
X{
X#ifdef	ADDARG_DEBUG
X	if (debug)
X		error("Add tar file '%s'.\n", tarfile);
X#endif
X
X	if (ntarfiles >= NTARFILE)
X		comerrno(EX_BAD, "Too many tar files (max is %d).\n", NTARFILE);
X
X	if (ntarfiles > 0 && (streql(tarfile, "-") || streql(tarfiles[0], "-")))
X		comerrno(EX_BAD, "Cannot handle multi volume archives from/to stdin/stdout.\n");
X
X	tarfiles[ntarfiles] = tarfile;
X	ntarfiles++;
X	return (TRUE);
X}
X
XLOCAL int
Xadd_diffopt(optstr, flagp)
X	char	*optstr;
X	long	*flagp;
X{
X	char	*ep;
X	char	*np;
X	int	optlen;
X	long	optflags = 0;
X	BOOL	not = FALSE;
X
X	while (*optstr) {
X		if ((ep = strchr(optstr, ',')) != NULL) {
X			Intptr_t	pdiff = ep - optstr;
X
X			optlen = (int)pdiff;
X			if (optlen != pdiff)	/* lint paranoia */
X				return (-1);
X			np = &ep[1];
X		} else {
X			optlen = strlen(optstr);
X			np = &optstr[optlen];
X		}
X		if (optstr[0] == '!') {
X			optstr++;
X			optlen--;
X			not = TRUE;
X		}
X		if (strncmp(optstr, "not", optlen) == 0 ||
X				strncmp(optstr, "!", optlen) == 0) {
X			not = TRUE;
X		} else if (strncmp(optstr, "all", optlen) == 0) {
X			optflags |= D_ALL;
X		} else if (strncmp(optstr, "perm", optlen) == 0) {
X			optflags |= D_PERM;
X		} else if (strncmp(optstr, "mode", optlen) == 0) {
X			optflags |= D_PERM;
X		} else if (strncmp(optstr, "symperm", optlen) == 0) {
X			optflags |= D_SYMPERM;
X		} else if (strncmp(optstr, "type", optlen) == 0) {
X			optflags |= D_TYPE;
X		} else if (strncmp(optstr, "nlink", optlen) == 0) {
X			optflags |= D_NLINK;
X		} else if (strncmp(optstr, "uid", optlen) == 0) {
X			optflags |= D_UID;
X		} else if (strncmp(optstr, "gid", optlen) == 0) {
X			optflags |= D_GID;
X		} else if (strncmp(optstr, "uname", optlen) == 0) {
X			optflags |= D_UNAME;
X		} else if (strncmp(optstr, "gname", optlen) == 0) {
X			optflags |= D_GNAME;
X		} else if (strncmp(optstr, "id", optlen) == 0) {
X			optflags |= D_ID;
X		} else if (strncmp(optstr, "size", optlen) == 0) {
X			optflags |= D_SIZE;
X		} else if (strncmp(optstr, "data", optlen) == 0) {
X			optflags |= D_DATA;
X		} else if (strncmp(optstr, "cont", optlen) == 0) {
X			optflags |= D_DATA;
X		} else if (strncmp(optstr, "rdev", optlen) == 0) {
X			optflags |= D_RDEV;
X		} else if (strncmp(optstr, "hardlink", optlen) == 0) {
X			optflags |= D_HLINK;
X		} else if (strncmp(optstr, "symlink", optlen) == 0) {
X			optflags |= D_SLINK;
X		} else if (strncmp(optstr, "sympath", optlen) == 0) {
X			optflags |= D_SLPATH;
X		} else if (strncmp(optstr, "sparse", optlen) == 0) {
X			optflags |= D_SPARS;
X		} else if (strncmp(optstr, "atime", optlen) == 0) {
X			optflags |= D_ATIME;
X		} else if (strncmp(optstr, "mtime", optlen) == 0) {
X			optflags |= D_MTIME;
X		} else if (strncmp(optstr, "ctime", optlen) == 0) {
X			optflags |= D_CTIME;
X		} else if (strncmp(optstr, "lmtime", optlen) == 0) {
X			optflags |= D_LMTIME;
X		} else if (strncmp(optstr, "times", optlen) == 0) {
X			optflags |= D_TIMES;
X		} else if (strncmp(optstr, "xtimes", optlen) == 0) {
X			optflags |= D_XTIMES;
X		} else if (strncmp(optstr, "dir", optlen) == 0) {
X			optflags |= D_DIR;
X#ifdef USE_ACL
X		} else if (strncmp(optstr, "acl", optlen) == 0) {
X			optflags |= D_ACL;
X#endif
X#ifdef USE_XATTR
X		} else if (strncmp(optstr, "xattr", optlen) == 0) {
X			optflags |= D_XATTR;
X#endif
X#ifdef USE_FFLAGS
X		} else if (strncmp(optstr, "fflags", optlen) == 0) {
X			optflags |= D_FFLAGS;
X#endif
X		} else if (strncmp(optstr, "help", optlen) == 0) {
X			dusage(0);
X		} else {
X			error("Illegal diffopt.\n");
X			dusage(EX_BAD);
X			return (-1);
X		}
X		optstr = np;
X	}
X	if (not)
X		optflags = ~optflags;
X
X	if ((optflags & D_MTIME) == 0)
X		optflags &= ~D_LMTIME;
X
X	if ((optflags & D_SLINK) == 0)
X		optflags &= ~D_SLPATH;
X
X	*flagp = optflags;
X
X	return (TRUE);
X}
X
XLOCAL int
Xgethdr(optstr, typep)
X	char	*optstr;
X	long	*typep;
X{
X	BOOL	swapped = FALSE;
X	long	type	= H_UNDEF;
X
X	if (*optstr == 'S') {
X		swapped = TRUE;
X		optstr++;
X	}
X	if (streql(optstr, "help")) {
X		husage(0);
X	} else if ((type = hdr_type(optstr)) < 0) {
X		error("Illegal header type '%s'.\n", optstr);
X		husage(EX_BAD);
X		return (-1);
X	}
X	if (swapped)
X		*typep = H_SWAPPED(type);
X	else
X		*typep = type;
X	return (TRUE);
X}
X
X/* ARGSUSED */
XLOCAL int
Xgetexclude(arg, valp, pac, pav)
X	char	*arg;
X	long	*valp;
X	int	*pac;
X	char	*const	**pav;
X{
X	FILE	*xf;
X
X	if (streql(arg, "-")) {
X		check_stdin("-X");
X		xf = stdin;
X	} else if ((xf = fileopen(arg, "r")) == (FILE *)NULL)
X		comerr("Cannot open '%s'.\n", arg);
X	hash_xbuild(xf);
X	fclose(xf);
X	return (1);
X}
X
X#ifdef	USED
X/*
X * Add archive file.
X * May currently not be activated:
X *	If the option string ends with ",&", the -C option will not work
X *	anymore.
X */
XLOCAL int
Xaddfile(optstr, dummy)
X	char	*optstr;
X	long	*dummy;
X{
X	char	*p;
X
X#ifdef	ADDARG_DEBUG
X	error("got_it: %s\n", optstr);
X#endif
X
X	if (!strchr("01234567", optstr[0]))
X		return (NOTAFILE); /* Tell getargs that this may be a flag */
X
X	for (p = &optstr[1]; *p; p++) {
X		if (*p != 'l' && *p != 'm' && *p != 'h')
X			return (BADFLAG);
X	}
X#ifdef	ADDARG_DEBUG
X	error("is_tape: %s\n", optstr);
X#endif
X
X	comerrno(EX_BAD, "Options [0-7][lmh] currently not supported.\n");
X	/*
X	 * The tape device should be determined from the defaults file
X	 * in the near future.
X	 * Search for /etc/opt/schily/star, /etc/default/star, /etc/default/tar
X	 */
X
X	return (1);		/* Success */
X}
X#endif
X
XLOCAL void
Xset_signal(sig, handler)
X	int		sig;
X	RETSIGTYPE	(*handler)	__PR((int));
X{
X#if	defined(HAVE_SIGPROCMASK) && defined(SA_RESTART)
X	struct sigaction sa;
X
X	sigemptyset(&sa.sa_mask);
X	sa.sa_handler = handler;
X	sa.sa_flags = SA_RESTART;
X	(void) sigaction(sig, &sa, (struct sigaction *)0);
X#else
X#ifdef	HAVE_SIGSETMASK
X	struct sigvec	sv;
X
X	sv.sv_mask = 0;
X	sv.sv_handler = handler;
X	sv.sv_flags = 0;
X	(void) sigvec(sig, &sv, (struct sigvec *)0);
X#else
X	(void) signal(sig, handler);
X#endif
X#endif
X}
X
XLOCAL void
Xexsig(sig)
X	int	sig;
X{
X	(void) signal(sig, SIG_DFL);
X	kill(getpid(), sig);
X}
X
X/* ARGSUSED */
XLOCAL void
Xsighup(sig)
X	int	sig;
X{
X#ifdef	SIGHUP
X	set_signal(SIGHUP, sighup);
X#endif
X	prstats();
X	intr++;
X	if (!cflag)
X		exsig(sig);
X}
X
X/* ARGSUSED */
XLOCAL void
Xsigintr(sig)
X	int	sig;
X{
X#ifdef	SIGINT
X	set_signal(SIGINT, sigintr);
X#endif
X	prstats();
X	intr++;
X	if (!cflag)
X		exsig(sig);
X}
X
X/* ARGSUSED */
XLOCAL void
Xsigquit(sig)
X	int	sig;
X{
X	/*
X	 * sig may be either SIGQUIT or SIGINFO (*BSD only).
X	 */
X	set_signal(sig, sigquit);
X	prstats();
X}
X
XLOCAL void
Xgetstamp()
X{
X	FINFO	finfo;
X	BOOL	ofollow = follow;
X
X	follow = TRUE;
X	if (!_getinfo(stampfile, &finfo))
X		comerr("Cannot stat '%s'.\n", stampfile);
X	follow = ofollow;
X
X	Newer.tv_sec = finfo.f_mtime;
X	Newer.tv_usec = finfo.f_mnsec / 1000;
X}
X
XLOCAL void
Xset_ptype(pac, pav)
X	int	*pac;
X	char	*const **pav;
X{
X#ifdef	__needed__
X	int	ac		= *pac;
X#endif
X	char	*const *av	= *pav;
Xconst	char	*p;
X
X	p = filename(av[0]);
X
X	/*
X	 * If you like different behavior, you need to insert exceptional
X	 * code before the switch statement.
X	 *
X	 * These are the names we support:
X	 *
X	 *	cpio gnutar pax star suntar ustar
X	 */
X	switch (p[0]) {
X
X	case 'c':			/* 'c'pio */
X		ptype = P_CPIO;
X		return;
X
X	case 'g':			/* 'g'*tar */
X		ptype = P_GNUTAR;
X		return;
X
X	case 'p':			/* 'p'ax */
X		ptype = P_PAX;
X		return;
X
X	case 't':			/* 't'ar */
X		/*
X		 * If we put something different here (e.g. P_STAR), we may
X		 * set the default behavior to be the behavor of 'star'.
X		 */
X		ptype = P_SUNTAR;
X		return;
X	case 's':
X		if (streql(p, "suntar")) {
X			ptype = P_SUNTAR;
X			return;
X		}
X		if (streql(p, "scpio")) {
X			ptype = P_CPIO;
X			return;
X		}
X		if (streql(p, "spax")) {
X			ptype = P_PAX;
X			return;
X		}
X		/* FALLTHRU */
X
X	case 'u':			/* 'u'star */
X		ptype = P_STAR;
X		return;
X	default:
X		ptype = PTYPE_DEFAULT;
X		return;
X	}
X}
X
X/* BEGIN CSTYLED */
X/*
X * Convert old tar type syntax into the new UNIX option syntax.
X * Allow only a limited subset of the single character options to avoid
X * collisions between interpretation of options in different
X * tar implementations. The old syntax has a risk to damage files
X * which is avoided with the 'fcompat' flag (see opentape()).
X *
X * The UNIX-98 documentation lists the following tar options:
X *	Function Key:	crtux
X *			c	Create
X *			r	Append
X *			t	List
X *			u	Update
X *			x	Extract
X *	Additional Key:	vwfblmo
X *			v	Verbose
X *			w	Wait for confirmation
X *			f	Archive file
X *			b	Blocking factor
X *			l	Report missing links
X *			m	Do not restore mtime from archive
X *			o	Do not restore owner/group from archive
X *
X *	Incompatibilities with UNIX-98 tar:
X *			l	works the oposite way round as with star, but
X *				if TAR_COMPAT is defined, star will behave
X * 				as documented in UNIX-98 if av[0] is either
X *				"tar" or "ustar".
X *
X *	Additional functions from historic UNIX tar versions:
X *			0..7	magtape_0 .. magtape_7
X *
X *	Additional functions from historic BSD tar versions:
X *			p	Extract dir permissions too
X *			h	Follow symbolic links
X *			i	ignore directory checksum errors
X *			B	do multiple reads to reblock pipes
X *			F	Ommit unwanted files (e.g. core)
X *
X *	Additional functions from historic Star versions:
X *			T	Use $TAPE environment as archive
X *			L	Follow symbolic links
X *			d	do not archive/extract directories
X *			k	keep old files
X *			n	do not extract but tell what to do
X *
X *	Additional functions from historic SVr4 tar versions:
X *			e	Exit on unexpected errors
X *			X	Arg is File with unwanted filenames
X *
X *	Additional functions from historic GNU tar versions:
X *			z	do inline compression
X *
X *	Missing in star (from SVr4/Solaris tar):
X *			E	Extended headers
X *			P	Supress '/' at beginning of filenames
X *			q	quit after extracting first file
X *	Incompatibilities with SVr4/Solaris tar:
X *			I	Arg is File with filenames to be included
X *				The -I option is not handled as option.
X *			P	SVr4/solaris: Supress '/', star: last partial
X *			k	set tape size for multi volume archives
X *			n	non tape device (do seeks)
X *
X *	Incompatibilities with GNU tar:
X *		There are many. GNU programs in many cases make smooth
X *		coexistence hard.
X *
X * Problems:
X *	The 'e' and 'X' option are currently not implemented.
X *	There is a collision between the BSD -I (include) and
X *	star's -I (interactive) which may be solved by using -w instead.
X */
X/* END CSTYLED */
XLOCAL void
Xdocompat(pac, pav)
X	int	*pac;
X	char	*const **pav;
X{
X	int	ac		= *pac;
X	char	*const *av	= *pav;
X	int	nac;
X	char	**nav;
X	char	nopt[3];
X	char	*_copt = "crtuxbfXBFTLdehijklmnopvwz01234567";
X	char	*copt = _copt;
Xconst	char	*p;
X	char	c;
X	char	*const *oa;
X	char	**na;
X
X	set_ptype(pac, pav);
X	switch (ptype) {
X
X	case P_SUNTAR:
X		iftype = I_TAR;
X#ifdef	SUN_TAR
X		copt = sun_copt;
X#endif
X		break;
X	case P_GNUTAR:
X		iftype = I_TAR;
X#ifdef	GNU_TAR
X		copt = gnu_copt;
X#endif
X		break;
X	case P_PAX:
X		iftype = I_PAX;
X		break;
X	case P_CPIO:
X		iftype = I_CPIO;
X		break;
X	case P_STAR:
X	default:
X		iftype = I_TAR;
X		copt = _copt;
X	}
X
X	/*
X	 * We must check this first to be able to set 'tcompat'.
X	 */
X	p = filename(av[0]);
X	if (streql(p, "tar") || streql(p, "ustar") ||
X	    streql(p, "suntar") || streql(p, "gnutar") || streql(p, "gtar"))
X		tcompat = TRUE;
X
X	if (ac <= 1)
X		return;
X	if (iftype != I_TAR)
X		return;
X
X	if (ptype != P_SUNTAR && ptype != P_GNUTAR)
X	/*
X	 * For "suntar" & "gnutar" the first option string may start with '-',
X	 * else only convert to new syntax if the first arg is a non '-' arg.
X	 */
X	if (av[1][0] == '-')			/* Do not convert new syntax */
X		return;
X	if (av[1][0] == '-' && av[1][1] == '-')	/* Do not convert new syntax */
X		return;
X
X	if (strchr(av[1], '=') != NULL)		/* Do not try to convert bs= */
X		return;
X
X	if (strstr(p, "tar") == NULL)		/* Do not try to it for pax */
X		return;
X
X	nac = ac + strlen(av[1]);
X	nav = ___malloc(nac-- * sizeof (char *), /* keep space for NULL ptr */
X				"compat argv");
X	oa = av;				/* remember old arg pointer */
X	na = nav;				/* set up new arg pointer */
X	*na++ = *oa++;				/* copy over av[0] */
X	oa++;					/* Skip over av[1] */
X
X	nopt[0] = '-';
X	nopt[2] = '\0';
X
X	for (p = av[1]; (c = *p) != '\0'; p++) {
X		if (c == '-') {
X			nac--;
X			continue;
X		}
X		if (strchr(copt, c) == NULL) {
X			if (ptype == P_SUNTAR || ptype == P_GNUTAR)
X				errmsgno(EX_BAD, "Illegal option '%c'.\n", c);
X			else
X				errmsgno(EX_BAD, "Illegal option '%c' for compat mode.\n", c);
X
X			susage(EX_BAD);
X		}
X		nopt[1] = c;
X		*na++ = ___savestr(nopt);
X
X		if (c == 'f' || c == 'b' || (ptype == P_SUNTAR && c == 'k') || c == 'X') {
X			if ((av + ac) <= oa) {
X				comerrno(EX_BAD,
X					"Missing arg for '%s' option.\n",
X					nopt);
X			}
X			*na++ = *oa++;
X			/*
X			 * The old syntax has a high risk of corrupting
X			 * files if the user disorders the args.
X			 */
X			if (c == 'f')
X				fcompat = TRUE;
X		}
X	}
X
X	/*
X	 * Now copy over the rest...
X	 */
X	while ((av + ac) > oa)
X		*na++ = *oa++;
X	*na = NULL;
X
X	*pac = nac;
X	*pav = nav;
X
X#ifdef	COMPAT_DEBUG
X	{ int	i;
X		printf("agrc: %d\n", nac);
X		for (i = 0; i < nac; i++)
X			printf("%i: '%s'\n", i, nav[i]);
X	}
X#endif
X}
END-of-star-1.5.2/star/star_fat.c
echo x - star-1.5.2/star/gnutar.c
sed 's/^X//' >star-1.5.2/star/gnutar.c << 'END-of-star-1.5.2/star/gnutar.c'
X/* @(#)gnutar.c	1.27 10/08/23 Copyright 1989, 2003-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	const char _g_sccsid[] =
X	"@(#)gnutar.c	1.27 10/08/23 Copyright 1989, 2003-2010 J. Schilling";
X#endif
X/*
X *	GNU TAR specific routines for star main program.
X *
X *	Copyright (c) 1989, 2003-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
Xstatic char *gnu_copt = "HcrtuxdAWkUSOGgmpsfMLFbiBVojzZCTXPhlKNvRw01234567";
X
X#ifdef	STAR_MAIN
X/*
X * We have been included from star.c
X */
X#define	opts		gnutar_opts
X#define	_opts		_gnutar_opts
X#define	gargs		gnutar_gargs
X#define	susage		gnutar_susage
X#define	usage		gnutar_usage
X#define	xusage		gnutar_xusage
X#else
X#define	NO_STAR_MAIN
X#define	GNUTAR_MAIN
X#define	PTYPE_DEFAULT	P_GNUTAR
X
X#include "star.c"
X#endif
X
X#define	GNU_TAR
X
XLOCAL	void	gargs		__PR((int ac, char *const *av));
XLOCAL	void	susage		__PR((int ret));
XLOCAL	void	usage		__PR((int ret));
XLOCAL	void	xusage		__PR((int ret));
X#ifdef	STAR_MAIN
XLOCAL	void	gnutar_setopts	__PR((char *o));
X#endif
X
X/*
X * Main operation mode:
X *   -t, --list              list the contents of an archive
X *   -x, --extract, --get    extract files from an archive
X *   -c, --create            create a new archive
X *   -d, --diff, --compare   find differences between archive and file system
X *   -r, --append            append files to the end of an archive
X *   -u, --update            only append files newer than copy in archive
X *   -A, --catenate          append tar files to an archive
X *       --concatenate       same as -A
X *       --delete            delete from the archive (not on mag tapes!)
X *
X * Operation modifiers:
X *   -W, --verify               attempt to verify the archive after writing it
X *       --remove-files         remove files after adding them to the archive
X *   -k, --keep-old-files       don't replace existing files when extracting
X *       --overwrite            overwrite existing files when extracting
X *       --overwrite-dir        overwrite directory metadata when extracting
X *   -U, --unlink-first         remove each file prior to extracting over it
X *       --recursive-unlink     empty hierarchies prior to extracting directory
X *   -S, --sparse               handle sparse files efficiently
X *   -O, --to-stdout            extract files to standard output
X *   -G, --incremental          handle old GNU-format incremental backup
X *   -g, --listed-incremental=FILE
X *                              handle new GNU-format incremental backup
X *       --ignore-failed-read   do not exit with nonzero on unreadable files
X *
X * Handling of file attributes:
X *       --owner=NAME             force NAME as owner for added files
X *       --group=NAME             force NAME as group for added files
X *       --mode=CHANGES           force (symbolic) mode CHANGES for added files
X *       --atime-preserve         don't change access times on dumped files
X *   -m, --modification-time      don't extract file modified time
X *       --same-owner             try extracting files with the same ownership
X *       --no-same-owner          extract files as yourself
X *       --numeric-owner          always use numbers for user/group names
X *   -p, --same-permissions       extract permissions information
X *       --no-same-permissions    do not extract permissions information
X *       --preserve-permissions   same as -p
X *   -s, --same-order             sort names to extract to match archive
X *       --preserve-order         same as -s
X *       --preserve               same as both -p and -s
X *
X * Device selection and switching:
X *   -f, --file=ARCHIVE             use archive file or device ARCHIVE
X *       --force-local              archive file is local even if has a colon
X *       --rsh-command=COMMAND      use remote COMMAND instead of rsh
X *   -[0-7][lmh]                    specify drive and density
X *   -M, --multi-volume             create/list/extract multi-volume archive
X *   -L, --tape-length=NUM          change tape after writing NUM x 1024 bytes
X *   -F, --info-script=FILE         run script at end of each tape (implies -M)
X *       --new-volume-script=FILE   same as -F FILE
X *       --volno-file=FILE          use/update the volume number in FILE
X *
X * Device blocking:
X *   -b, --blocking-factor=BLOCKS   BLOCKS x 512 bytes per record
X *       --record-size=SIZE         SIZE bytes per record, multiple of 512
X *   -i, --ignore-zeros             ignore zeroed blocks in archive (means EOF)
X *   -B, --read-full-records        reblock as we read (for 4.2BSD pipes)
X *
X * Archive format selection:
X *
X *   -H, --format=FORMAT                create archive of the given format
X *
X *   -V, --label=NAME                   create archive with volume name NAME
X *               PATTERN                at list/extract time, a globbing PATTERN
X *   -o, --old-archive, --portability   write a V7 format archive
X *       --posix                        write a POSIX format archive
X *   -j, --bzip2                        filter the archive through bzip2
X *   -z, --gzip, --ungzip               filter the archive through gzip
X *   -Z, --compress, --uncompress       filter the archive through compress
X *       --use-compress-program=PROG    filter through PROG (must accept -d)
X *
X * Local file selection:
X *   -C, --directory=DIR          change to directory DIR
X *   -T, --files-from=NAME        get names to extract or create from file NAME
X *       --null                   -T reads null-terminated names, disable -C
X *       --exclude=PATTERN        exclude files, given as a PATTERN
X *   -X, --exclude-from=FILE      exclude patterns listed in FILE
X *       --anchored               exclude patterns match file name start (default)
X *       --no-anchored            exclude patterns match after any /
X *       --ignore-case            exclusion ignores case
X *       --no-ignore-case         exclusion is case sensitive (default)
X *       --wildcards              exclude patterns use wildcards (default)
X *       --no-wildcards           exclude patterns are plain strings
X *       --wildcards-match-slash  exclude pattern wildcards match '/' (default)
X *       --no-wildcards-match-slash exclude pattern wildcards do not match '/'
X *   -P, --absolute-names         don't strip leading `/'s from file names
X *   -h, --dereference            dump instead the files symlinks point to
X *       --no-recursion           avoid descending automatically in directories
X *   -l, --one-file-system        stay in local file system when creating archive
X *   -K, --starting-file=NAME     begin at file NAME in the archive
X *   -N, --newer=DATE             only store files newer than DATE
X *       --newer-mtime=DATE       compare date and time when data changed only
X *       --after-date=DATE        same as -N
X *       --backup[=CONTROL]       backup before removal, choose version control
X *       --suffix=SUFFIX          backup before removal, override usual suffix
X *
X * Informative output:
X *       --help            print this help, then exit
X *       --version         print tar program version number, then exit
X *   -v, --verbose         verbosely list files processed
X *       --checkpoint      print directory names while reading the archive
X *       --totals          print total bytes written while creating archive
X *   -R, --block-number    show block number within archive with each message
X *   -w, --interactive     ask for confirmation for every action
X *       --confirmation    same as -w
X */
X
X/*
X * GNU TAR related options
X */
X/* BEGIN CSTYLED */
Xchar	_opts[] = "C*,help,xhelp,version,debug,xdebug#,xd#,time,no-statistics,do-statistics,fifostats,numeric,no-fifo,no-fsync,bs&,fs&,/,..,secure-links,acl,xfflags,copy,diff,H&,format&,z,bz,create,c,append,r,list,t,update,u,extract,get,x,compare,d,catenate,concatenate,A,delete,verify,W,remove-files,keep-old-files,k,unlink-first,U,recursive-unlink,sparse,S,to-stdout,O,incremental,G,listed-incremental*,g*,ignore-failed-read,owner*,group*,mode*,atime-preserve,modification-time,m,same-owner,no-same-owner,numeric-owner,same-permissions,preserve-permissions,p,no-same-permissions,same-order,preserve,preserve-order,s,force-local,file&,f&,rsh-command*,multi-volume,M,tape-length&,L&,new-volume-script*,info-script*,F*,volno-file*,blocking-factor&,b&,record-size&,ignore-zeros,i,read-full-records,B,label*,V*,old-archive,portability,o,posix,bzip2,j,gzip,ungzip,compress,uncompress,Z,use-compress-program*,files-from*,T*,null,exclude&,exclude-from&,X&,anchored,no-anchored,ignore-case,no-ignore-case,wildcards,no-wildcards,wildcards-match-slash,no-wildcards-match-slash,absolute-names,P,dereference,h,no-recursion,one-file-system,l,starting-file*,K*,newer*,after-date*,N*,newer-mtime*,backup*,suffix*,v+,verbose+,checkpoint,totals,block-number,R,interactive,confirmation,w,?";
X/* END CSTYLED */
Xchar	*opts = _opts;
X
XLOCAL	void	gnutar_info	__PR((void));
X
XLOCAL void
Xgargs(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int	files	 = 0;
X	int	minfiles = 1;
X	BOOL	help	 = FALSE;
X	BOOL	xhelp	 = FALSE;
X	BOOL	prvers	 = FALSE;
X	BOOL	no_fifo	 = FALSE;
X	BOOL	oldtar   = FALSE;
X	BOOL	gnuconcat = FALSE;
X	BOOL	gnudel	  = FALSE;
X	BOOL	gnuveri	  = FALSE;
X	BOOL	gnuremove = FALSE;
X	BOOL	gnuincrem = FALSE;
X	char	*gnulinc  = NULL;
X	BOOL	gnuignfail = FALSE;
X	char	*gnuowner  = NULL;
X	char	*gnugroup  = NULL;
X	char	*gnumode   = NULL;
X	BOOL	gnuchown = FALSE;
X	BOOL	gnuorder = FALSE;
X	char	*rsh_command = NULL;
X	char	*gnuvolno_file = NULL;
X	BOOL	gnuposix = FALSE;
X	BOOL	gnuanchored = FALSE;
X	BOOL	gnuno_anchored = FALSE;
X	BOOL	gnuignorecase = FALSE;
X	BOOL	gnuno_ignorecase = FALSE;
X	BOOL	gnuwildchards = FALSE;
X	BOOL	gnuno_wildchards = FALSE;
X	BOOL	gnumatchslash = FALSE;
X	BOOL	gnuno_matchslash = FALSE;
X	char	*gnustartf = NULL;
X	char	*gnunewer = NULL;
X	char	*gnunewermt = NULL;
X	char	*gnubackup = NULL;
X	char	*gnusuffix = NULL;
X	BOOL	gnucheckpoint = FALSE;
X	BOOL	gnutotals = FALSE;
X	BOOL	do_stats = FALSE;
X	Llong	llbs	 = 0;
Xsigned	char	archive	 = -1;		/* On IRIX, we have unsigned chars by default */
X
X	/*
X	 * Current default archive format in all other cases is USTAR.
X	 * We may change this to PAX in the future.
X	 */
X	hdrtype = H_USTAR;
X#ifdef	STAR_MAIN
X	gnutar_setopts(opts);			/* set up opts for getfiles */
X#endif
X
X	iftype		= I_TAR;		/* command line interface */
X	ptype		= P_GNUTAR;		/* program interface type */
X	bsdchdir	= TRUE;
X	no_dirslash	= FALSE;
X	no_stats	= TRUE;			/* and -no-statitstics	   */
X
X	--ac, ++av;
X	files = getfilecount(ac, av, opts);
X	if (getallargs(&ac, &av, opts,
X				&dir_flags,
X				&help, &xhelp, &prvers, &debug, &xdebug, &xdebug,
X#ifndef	__old__lint
X				&showtime, &no_stats, &do_stats, &do_fifostats,
X				&numeric,  &no_fifo, &no_fsync,
X				getnum, &bs,
X				getnum, &fs,
X				&abs_path, &allow_dotdot, &secure_links,
X				&doacl, &dofflags,
X				&copyflag, &diff_flag,
X				gethdr, &chdrtype, gethdr, &chdrtype,
X				&zflag, &bzflag,
X
X				&cflag, &cflag,
X				&rflag, &rflag,
X				&tflag, &tflag,
X				&uflag, &uflag,
X				&xflag, &xflag, &xflag,
X				&diff_flag, &diff_flag,
X				&gnuconcat, &gnuconcat, &gnuconcat,
X				&gnudel,
X
X				&gnuveri, &gnuveri,
X				&gnuremove,
X				&keep_old, &keep_old,
X/*				--overwrite */
X/*				--overwrite-dir / --nooverwrite-dir */
X				&remove_first, &remove_first,
X				&remove_recursive,
X				&sparse, &sparse,
X				&to_stdout, &to_stdout,
X				&gnuincrem, &gnuincrem,
X				&gnulinc, &gnulinc,
X				&gnuignfail,
X				&gnuowner, &gnugroup, &gnumode,
X				&acctime,
X				&nomtime, &nomtime,
X				&gnuchown,
X				&nochown,
X				&numeric,
X				&pflag, &pflag, &pflag,
X				&nopflag,
X				&gnuorder, &gnuorder, &gnuorder, &gnuorder,
X
X				&force_noremote,
X				addtarfile, NULL,	/* -file archive */
X				addtarfile, NULL,	/* -f archive */
X				&rsh_command,
X
X				&multivol, &multivol,
X				getknum, &tsize,
X				getknum, &tsize,
X				&newvol_script, &newvol_script, &newvol_script,
X				&gnuvolno_file,
X
X				getnum, &bs,		/* -b blocks */
X				getnum, &bs,		/* -b blocks */
X				getllnum, &llbs,
X				&ignoreerr, &ignoreerr,
X				&multblk, &multblk,
X				&volhdr, &volhdr,
X				&oldtar, &oldtar, &oldtar,
X				&gnuposix,
X				&bzflag, &bzflag,
X				&zflag, &zflag,
X				&Zflag, &Zflag, &Zflag,
X				&compress_prg,
X				&listfile, &listfile,
X				&readnull,
X				addpattern, NULL,
X				getexclude, NULL,
X				getexclude, NULL,
X				&gnuanchored,
X				&gnuno_anchored,
X				&gnuignorecase,
X				&gnuno_ignorecase,
X				&gnuwildchards,
X				&gnuno_wildchards,
X				&gnumatchslash,
X				&gnuno_matchslash,
X				&abs_path, &abs_path,
X				&follow, &follow,
X				&nodesc,
X				&nomount, &nomount,
X				&gnustartf, &gnustartf,
X				&gnunewer, &gnunewer, &gnunewer,
X				&gnunewermt,
X				&gnubackup,
X				&gnusuffix,
X
X				&verbose, &verbose,
X				&gnucheckpoint,
X				&gnutotals,
X				&prblockno, &prblockno,
X				&interactive, &interactive, &interactive,
X#endif /* __old__lint */
X				&archive) < 0) {
X		errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
X		susage(EX_BAD);
X	}
X	if (archive != -1 && !(archive >= '0' && archive <= '7')) {
X		errmsgno(EX_BAD, "Bad Option: -%c.\n", archive);
X		susage(EX_BAD);
X	}
X	star_helpvers("gnutar", help, xhelp, prvers);
X
X	if (gnuconcat) {
X		errmsgno(EX_BAD, "The --concatenate option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnudel) {
X		errmsgno(EX_BAD, "The --delete option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuveri) {
X		errmsgno(EX_BAD, "The --verify option is not implemented.\n");
X		errmsgno(EX_BAD, "Use the rewind and -diff from star instead.\n");
X		susage(EX_BAD);
X	}
X	if (gnuremove) {
X		errmsgno(EX_BAD, "The --remove-files option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuincrem) {
X		errmsgno(EX_BAD, "The --incremental option is not implemented.\n");
X		errmsgno(EX_BAD, "Use the true incremental dump feature from star instead.\n");
X		susage(EX_BAD);
X	}
X	if (gnulinc) {
X		errmsgno(EX_BAD, "The --listed-incremental option is not implemented.\n");
X		errmsgno(EX_BAD, "Use the true incremental dump feature from star instead.\n");
X		susage(EX_BAD);
X	}
X	if (gnuignfail) {
X		errmsgno(EX_BAD, "The --ignore-failed-read option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuowner) {
X		errmsgno(EX_BAD, "The --owner option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnugroup) {
X		errmsgno(EX_BAD, "The --group option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnumode) {
X		errmsgno(EX_BAD, "The --mode option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuchown)
X		nochown = FALSE;
X	if (gnuorder) {
X		errmsgno(EX_BAD, "The --same-order option is completely useless.\n");
X		errmsgno(EX_BAD, "It is not needed as star uses hash tables.\n");
X		susage(EX_BAD);
X	}
X	if (rsh_command) {
X		int	len = strlen(rsh_command) + 4;	/* + "RSH=" */
X		char	*p;
X
X		p = ___malloc(len, "putenv");
X		strcatl(p, "RSH=", rsh_command, (char *)NULL);
X#ifdef	HAVE_PUTENV
X		putenv(p);
X#else
X		comerrno(EX_BAD, "No putenv() on this platform, cannot use --rsh-command.\n");
X#endif
X	}
X	if (gnuvolno_file) {
X		errmsgno(EX_BAD, "The --volno-file option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuposix) {
X		errmsgno(EX_BAD, "The --posix option is outdated - ignored.\n");
X		errmsgno(EX_BAD, "Star is posix by default.\n");
X		errmsgno(EX_BAD, "If you like to create other archive types, use -Htype from star instead.\n");
X	}
X	if (gnuanchored) {
X		errmsgno(EX_BAD, "The --anchored option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuno_anchored) {
X		errmsgno(EX_BAD, "The --no-anchored option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuignorecase) {
X		errmsgno(EX_BAD, "The --ignore-case option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuno_ignorecase) {
X		errmsgno(EX_BAD, "The --no-ignore-case option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuwildchards) {
X		errmsgno(EX_BAD, "The --wildcards option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuno_wildchards) {
X		errmsgno(EX_BAD, "The --no-wildcards option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnumatchslash) {
X		errmsgno(EX_BAD, "The --wildcards-match-slash option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnuno_matchslash) {
X		errmsgno(EX_BAD, "The --no-wildcards-match-slash option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnustartf) {
X		errmsgno(EX_BAD, "The --starting-file option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnunewer) {
X		errmsgno(EX_BAD, "The --newer option is not implemented.\n");
X		errmsgno(EX_BAD, "Use the -newer option from star with -ctime instead.\n");
X		susage(EX_BAD);
X	}
X	if (gnunewermt) {
X		errmsgno(EX_BAD, "The --newer-mtime option is not implemented.\n");
X		errmsgno(EX_BAD, "Use the -newer option from star without -ctime instead.\n");
X		susage(EX_BAD);
X	}
X	if (gnubackup) {
X		errmsgno(EX_BAD, "The --backup option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnusuffix) {
X		errmsgno(EX_BAD, "The --suffix option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnucheckpoint) {
X		errmsgno(EX_BAD, "The --checkpoint option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (gnutotals)
X		showtime = TRUE;
X	if (do_stats)
X		no_stats = FALSE;
X
X	notpat = TRUE;	/* GNU tar only supports exclude patterns */
X
X	star_checkopts(oldtar, /* dodesc */ FALSE, /* usetape */ TRUE,
X					archive, no_fifo, llbs);
X	star_nfiles(files, minfiles);
X
X	if ((cflag || xflag) && verbose == 1)
X		tpath = TRUE;
X	/*
X	 * Strange GNU tar semantics:
X	 * 	tar -cf /dev/null . equals star -cf -nullout .
X	 */
X	if (cflag && archisnull(tarfiles[0]))
X		nullout = TRUE;
X}
X
XLOCAL void
Xgnutar_info()
X{
X	error("\nFor a more complete user interface use the star type command interface.\n");
X	error("See 'man star'. The %s command is more or less limited to the\n", get_progname());
X	error("GNU tar command line interface.\n");
X}
X
X/*
X * Short usage
X */
XLOCAL void
Xsusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("\nUse\t%s --help\n", get_progname());
X	error("and\t%s --xhelp\n", get_progname());
X	error("to get a list of valid cmds and options.\n");
X	error("\nUse\t%s -H help\n", get_progname());
X	error("to get a list of valid archive header formats.\n");
X	gnutar_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Cmd:\n");
X	error("\t-c/-u/-r\tcreate/update/replace archive with named files to tape\n");
X	error("\t-x/-t\t\textract/list named files from tape\n");
X	error("\t--copy\t\t(*) copy named files to destination directory\n");
X	error("\t--diff\t\tdiff archive against file system (see -xhelp)\n");
X	error("Options:\n");
X	error("\t--help\t\t(*) print this help\n");
X	error("\t--xhelp\t\tprint extended help\n");
X	error("\t--version\tprint version information and exit\n");
X
X	error("\tH=header\tgenerate 'header' type archive (see H=help)\n");
X	error("\t-z\t\tpipe input/output through gzip, does not work on tapes\n");
X	error("\t--bz\t\t(*) pipe input/output through bzip2, does not work on tapes\n");
X#ifdef	FIFO
X	error("\t--no-fifo\t(*) don't use a fifo to optimize data flow from/to tape\n");
X#endif
X	error("\nAll options marked with (*) are not defined by GNU tar.\n");
X
X	/* BEGIN CSTYLED */
X	error("\n\
XGNU tar help:\n\
XMain operation mode:\n\
X  -t, --list              list the contents of an archive\n\
X  -x, --extract, --get    extract files from an archive\n\
X  -c, --create            create a new archive\n\
X  -d, --diff, --compare   find differences between archive and file system\n\
X  -r, --append            append files to the end of an archive\n\
X  -u, --update            only append files newer than copy in archive\n\
X  -A, --catenate          append tar files to an archive\n\
X      --concatenate       same as -A\n\
X      --delete            delete from the archive (not on mag tapes!)\n");
X
X	error("\n\
XOperation modifiers:\n\
X  -W, --verify               attempt to verify the archive after writing it\n\
X      --remove-files         remove files after adding them to the archive\n\
X  -k, --keep-old-files       don't replace existing files when extracting\n\
X      --overwrite            overwrite existing files when extracting\n\
X      --overwrite-dir        overwrite directory metadata when extracting\n\
X  -U, --unlink-first         remove each file prior to extracting over it\n\
X      --recursive-unlink     empty hierarchies prior to extracting directory\n\
X  -S, --sparse               handle sparse files efficiently\n\
X  -O, --to-stdout            extract files to standard output\n\
X  -G, --incremental          handle old GNU-format incremental backup\n\
X  -g, --listed-incremental=FILE\n\
X                             handle new GNU-format incremental backup\n\
X      --ignore-failed-read   do not exit with nonzero on unreadable files\n");
X
X	error("\n\
XHandling of file attributes:\n\
X      --owner=NAME             force NAME as owner for added files\n\
X      --group=NAME             force NAME as group for added files\n\
X      --mode=CHANGES           force (symbolic) mode CHANGES for added files\n\
X      --atime-preserve         don't change access times on dumped files\n\
X  -m, --modification-time      don't extract file modified time\n\
X      --same-owner             try extracting files with the same ownership\n\
X      --no-same-owner          extract files as yourself\n\
X      --numeric-owner          always use numbers for user/group names\n\
X  -p, --same-permissions       extract permissions information\n\
X      --no-same-permissions    do not extract permissions information\n\
X      --preserve-permissions   same as -p\n\
X  -s, --same-order             sort names to extract to match archive\n\
X      --preserve-order         same as -s\n\
X      --preserve               same as both -p and -s\n");
X
X	error("\n\
XDevice selection and switching:\n\
X  -f, --file=ARCHIVE             use archive file or device ARCHIVE\n\
X      --force-local              archive file is local even if has a colon\n\
X      --rsh-command=COMMAND      use remote COMMAND instead of rsh\n\
X  -[0-7][lmh]                    specify drive and density\n\
X  -M, --multi-volume             create/list/extract multi-volume archive\n\
X  -L, --tape-length=NUM          change tape after writing NUM x 1024 bytes\n\
X  -F, --info-script=FILE         run script at end of each tape (implies -M)\n\
X      --new-volume-script=FILE   same as -F FILE\n\
X      --volno-file=FILE          use/update the volume number in FILE\n");
X
X	error("\n\
XDevice blocking:\n\
X  -b, --blocking-factor=BLOCKS   BLOCKS x 512 bytes per record\n\
X      --record-size=SIZE         SIZE bytes per record, multiple of 512\n\
X  -i, --ignore-zeros             ignore zeroed blocks in archive (means EOF)\n\
X  -B, --read-full-records        reblock as we read (for 4.2BSD pipes)\n");
X
X	error("\n\
XArchive format selection:\n\
X  -H, --format=FORMAT                create archive of the given format\n\
X  -V, --label=NAME                   create archive with volume name NAME\n\
X              PATTERN                at list/extract time, a globbing PATTERN\n\
X  -o, --old-archive, --portability   write a V7 format archive\n\
X      --posix                        write a POSIX format archive\n\
X  -j, --bzip2                        filter the archive through bzip2\n\
X  -z, --gzip, --ungzip               filter the archive through gzip\n\
X  -Z, --compress, --uncompress       filter the archive through compress\n\
X      --use-compress-program=PROG    filter through PROG (must accept -d)\n");
X
X	error("\n\
XLocal file selection:\n\
X  -C, --directory=DIR          change to directory DIR\n\
X  -T, --files-from=NAME        get names to extract or create from file NAME\n\
X      --null                   -T reads null-terminated names, disable -C\n\
X      --exclude=PATTERN        exclude files, given as a PATTERN\n\
X  -X, --exclude-from=FILE      exclude patterns listed in FILE\n\
X      --anchored               exclude patterns match file name start (default)\n\
X      --no-anchored            exclude patterns match after any /\n\
X      --ignore-case            exclusion ignores case\n\
X      --no-ignore-case         exclusion is case sensitive (default)\n\
X      --wildcards              exclude patterns use wildcards (default)\n\
X      --no-wildcards           exclude patterns are plain strings\n\
X      --wildcards-match-slash  exclude pattern wildcards match '/' (default)\n\
X      --no-wildcards-match-slash exclude pattern wildcards do not match '/'\n\
X  -P, --absolute-names         don't strip leading `/'s from file names\n\
X  -h, --dereference            dump instead the files symlinks point to\n\
X      --no-recursion           avoid descending automatically in directories\n\
X  -l, --one-file-system        stay in local file system when creating archive\n\
X  -K, --starting-file=NAME     begin at file NAME in the archive\n");
X
X	error("\
X  -N, --newer=DATE             only store files newer than DATE\n\
X      --newer-mtime=DATE       compare date and time when data changed only\n\
X      --after-date=DATE        same as -N\n");
X
X	error("\
X      --backup[=CONTROL]       backup before removal, choose version control\n\
X      --suffix=SUFFIX          backup before removal, override usual suffix\n");
X
X	error("\n\
XInformative output:\n\
X      --help            print this help, then exit\n\
X      --version         print tar program version number, then exit\n\
X  -v, --verbose         verbosely list files processed\n\
X      --checkpoint      print directory names while reading the archive\n\
X      --totals          print total bytes written while creating archive\n\
X  -R, --block-number    show block number within archive with each message\n\
X  -w, --interactive     ask for confirmation for every action\n\
X      --confirmation    same as -w\n");
X	/* END CSTYLED */
X
X	gnutar_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xxusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Extended options:\n");
X	error("\t--debug\t\tprint additional debug messages\n");
X	error("\txdebug=#,xd=#\tset extended debug level\n");
X	error("\t-/\t\tdon't strip leading '/'s from file names\n");
X	error("\t-..\t\tdon't skip filenames that contain '..' in non-interactive extract\n");
X	error("\t--secure-links\tdon't extract links that start with '/' or contain '..'\n");
X	error("\t--acl\t\thandle access control lists\n");
X	error("\t--xfflags\thandle extended file flags\n");
X	error("\tbs=#\t\tset (output) block size to #\n");
X#ifdef	FIFO
X	error("\tfs=#\t\tset fifo size to #\n");
X#endif
X	error("\t--no-fsync\tdo not call fsync() for each extracted file (may be dangerous)\n");
X	error("\t--time\t\tprint timing info\n");
X	error("\t--no-statistics\tdo not print statistics\n");
X	error("\t--do-statistics\tprint statistics\n");
X#ifdef	FIFO
X	error("\t--fifostats\tprint fifo statistics\n");
X#endif
X	error("\t--numeric\tdon't use user/group name from tape\n");
X	error("\nAll options above are not defined by GNU tar.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
X#ifdef	STAR_MAIN
X#undef	opts
X#undef	_opts
X#undef	gargs
X#undef	susage
X#undef	usage
X#undef	xusage
X
XLOCAL void
Xgnutar_setopts(o)
X	char	*o;
X{
Xextern	char	*opts;
X	opts = o;
X}
X#endif
END-of-star-1.5.2/star/gnutar.c
echo x - star-1.5.2/star/fflags.c
sed 's/^X//' >star-1.5.2/star/fflags.c << 'END-of-star-1.5.2/star/fflags.c'
X/* @(#)fflags.c	1.25 11/12/12 Copyright 2001-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)fflags.c	1.25 11/12/12 Copyright 2001-2011 J. Schilling";
X#endif
X/*
X *	Routines to handle extended file flags
X *
X *	Copyright (c) 2001-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifdef	USE_FFLAGS
X#include <schily/stdio.h>
X#include <schily/errno.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/dirent.h>
X#include <schily/string.h>
X#include <schily/stat.h>
X#include <schily/schily.h>
X#include "starsubs.h"
X#ifdef	__linux__
X#include <schily/fcntl.h>
X#ifdef	HAVE_EXT2FS_EXT2_FS_H
X/*
X * The Linux Kernel appears to be unplanned and full of moving targets :-(
X */
X#include <ext2fs/ext2_fs.h>
X
X#else	/* !HAVE_EXT2FS_EXT2_FS_H */
X#if defined(HAVE_USABLE_EXT2_FS_H) || defined(TRY_EXT2_FS)
X/*
X * Be very careful in case that the Linux Kernel maintainers
X * unexpectedly fix the bugs in the Linux Lernel include files.
X * Only introduce the attempt for a workaround in case the include
X * files are broken anyway.
X *
X * If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple
X * #include <linux/ex2_fs.h> will work.
X *
X * If TRY_EXT2_FS is defined, we will asume that
X */
X#ifdef	TRY_EXT2_FS
X#define	__KERNEL__
X#ifdef	HAVE_LINUX_TYPES_H
X#include <linux/types.h>
X#endif
X#define	KBUILD_BASENAME	"foo"
X#define	CONFIG_X86_L1_CACHE_SHIFT 7
X#ifdef	HAVE_LINUX_GFP_H
X#include <linux/gfp.h>
X#endif
X#ifdef	HAVE_ASM_TYPES_H
X#include <asm/types.h>
X#endif
X#undef	__KERNEL__
X#endif	/* TRY_EXT2_FS */
X#include <linux/ext2_fs.h>
X#endif	/* defined(HAVE_USABLE_EXT2_FS_H) || defined(TRY_EXT2_FS) */
X#endif	/* HAVE_EXT2FS_EXT2_FS_H */
X#include <schily/ioctl.h>
X#endif	/* __linux__ */
X
XEXPORT	void	opt_fflags	__PR((void));
XEXPORT	void	get_fflags	__PR((FINFO *info));
XEXPORT	void	set_fflags	__PR((FINFO *info));
XEXPORT	char	*textfromflags	__PR((FINFO *info, char *buf));
XEXPORT	int	texttoflags	__PR((FINFO *info, char *buf));
X
XEXPORT void
Xopt_fflags()
X{
X	/*	Linux							*BSD */
X#if (defined(__linux__) && defined(EXT2_IOC_GETFLAGS)) || defined(HAVE_ST_FLAGS)
X	printf(" fflags");
X#endif
X}
X
XEXPORT void
Xget_fflags(info)
X	register FINFO	*info;
X{
X#if defined(__linux__) && defined(EXT2_IOC_GETFLAGS)
X	int	f;
X	long	l = 0L;
X
X	if ((f = open(info->f_name, O_RDONLY|O_NDELAY)) >= 0) {
X		if (ioctl(f, EXT2_IOC_GETFLAGS, &l) >= 0) {
X			info->f_fflags = l;
X			if ((l & EXT2_NODUMP_FL) != 0)
X				info->f_flags |= F_NODUMP;
X			if (info->f_fflags != 0)
X				info->f_xflags |= XF_FFLAGS;
X		} else {
X			info->f_fflags = 0L;
X		}
X		close(f);
X	}
X#else	/* !__linux__ */
X	info->f_fflags = 0L;
X#endif
X}
X
XEXPORT void
Xset_fflags(info)
X	register FINFO	*info;
X{
X/*
X * Be careful: True64 includes a chflags() stub but no #defines for st_flags
X */
X#if	defined(HAVE_CHFLAGS) && defined(UF_SETTABLE)
X	char	buf[512];
X	BOOL	err = TRUE;
X
X	/*
X	 * As for 14.2.2002 the man page of chflags() is wrong, the following
X	 * code is a result of kernel source study.
X	 * If we are not allowed to set the flags, try to only set the user
X	 * settable flags.
X	 */
X	if (chflags(info->f_name, info->f_fflags) >= 0)
X		err = FALSE;
X	else if (geterrno() == EPERM &&
X	    chflags(info->f_name, info->f_fflags & UF_SETTABLE) >= 0)
X		err = FALSE;
X
X	if (err)
X		errmsg("Cannot set file flags '%s' for '%s'.\n",
X				textfromflags(info, buf), info->f_name);
X#else
X#if defined(__linux__) && defined(EXT2_IOC_GETFLAGS)
X	char	buf[512];
X	int	f;
X	Ulong	flags;
X	Ulong	oldflags;
X	BOOL	err = TRUE;
X	/*
X	 * Linux bites again! There is no define for the flags that are only
X	 * settable by the root user.
X	 */
X#ifdef	EXT3_JOURNAL_DATA_FL			/* 'j' */
X#define	SF_MASK		(EXT2_IMMUTABLE_FL|EXT2_APPEND_FL|EXT3_JOURNAL_DATA_FL)
X#else
X#define	SF_MASK		(EXT2_IMMUTABLE_FL|EXT2_APPEND_FL)
X#endif
X
X	if ((f = open(info->f_name, O_RDONLY|O_NONBLOCK)) >= 0) {
X		if (ioctl(f, EXT2_IOC_SETFLAGS, &info->f_fflags) >= 0) {
X			err = FALSE;
X
X		} else if (geterrno() == EPERM) {
X			if (ioctl(f, EXT2_IOC_GETFLAGS, &oldflags) >= 0) {
X
X				flags	 =  info->f_fflags & ~SF_MASK;
X				oldflags &= SF_MASK;
X				flags	 |= oldflags;
X				if (ioctl(f, EXT2_IOC_SETFLAGS, &flags) >= 0)
X					err = FALSE;
X			}
X		}
X		close(f);
X	}
X	if (err)
X		errmsg("Cannot set file flags '%s' for '%s'.\n",
X				textfromflags(info, buf), info->f_name);
X#endif
X
X#endif
X}
X
X
X/*
X * UF_* flags are flags settable by any user, defied by *BSD
X * SF_* flags are *BSD flags settable obly be the super user
X * EXT_* flags are Linux specific.
X */
XLOCAL struct {
X	char	*name;
X	Ulong	flag;
X} flagnames[] = {
X	/* shorter names per flag first, all prefixed by "no" */
X	/* Super user settable flags first */
X#ifdef	SF_APPEND
X	{ "sappnd",		SF_APPEND },
X	{ "sappend",		SF_APPEND },
X#endif
X
X#ifdef	EXT2_APPEND_FL				/* 'a' */
X	{ "sappnd",		EXT2_APPEND_FL },
X	{ "sappend",		EXT2_APPEND_FL },
X#endif
X
X#ifdef	SF_ARCHIVED
X	{ "arch",		SF_ARCHIVED },
X	{ "archived",		SF_ARCHIVED },
X#endif
X
X#ifdef	SF_IMMUTABLE
X	{ "schg",		SF_IMMUTABLE },
X	{ "schange",		SF_IMMUTABLE },
X	{ "simmutable",		SF_IMMUTABLE },
X#endif
X#ifdef	EXT2_IMMUTABLE_FL			/* 'i' */
X	{ "schg",		EXT2_IMMUTABLE_FL },
X	{ "schange",		EXT2_IMMUTABLE_FL },
X	{ "simmutable",		EXT2_IMMUTABLE_FL },
X#endif
X
X#ifdef	SF_NOUNLINK
X	{ "sunlnk",		SF_NOUNLINK },
X	{ "sunlink",		SF_NOUNLINK },
X#endif
X
X#ifdef	EXT3_JOURNAL_DATA_FL			/* 'j' */
X	{ "journal-data",	EXT3_JOURNAL_DATA_FL },
X#endif
X
X/* ------------------------------------------------------------------------- */
X
X	/* The following flags may be set without being super user. */
X#ifdef	UF_APPEND
X	{ "uappnd",		UF_APPEND },
X	{ "uappend",		UF_APPEND },
X#endif
X
X#ifdef	UF_IMMUTABLE
X	{ "uchg",		UF_IMMUTABLE },
X	{ "uchange",		UF_IMMUTABLE },
X	{ "uimmutable",		UF_IMMUTABLE },
X#endif
X
X#ifdef	EXT2_COMPR_FL				/* 'c' */
X	{ "compress",		EXT2_COMPR_FL },
X#endif
X
X#ifdef	EXT2_NOATIME_FL				/* 'A' */
X	{ "noatime",		EXT2_NOATIME_FL },
X#endif
X
X#ifdef	UF_NODUMP
X	{ "nodump",		UF_NODUMP },
X#endif
X#ifdef	EXT2_NODUMP_FL				/* 'd' */
X	{ "nodump",		EXT2_NODUMP_FL },
X#endif
X
X#ifdef	UF_OPAQUE
X	{ "opaque",		UF_OPAQUE },
X#endif
X
X#ifdef	EXT2_SECRM_FL				/* 's' Purge before unlink */
X	{ "secdel",		EXT2_SECRM_FL },
X#endif
X
X#ifdef	EXT2_SYNC_FL				/* 'S' */
X	{ "sync",		EXT2_SYNC_FL },
X#endif
X
X#ifdef	EXT2_UNRM_FL				/* 'u' Allow to 'unrm' file the */
X	{ "undel",		EXT2_UNRM_FL },
X#endif
X
X#ifdef	UF_NOUNLINK
X	{ "uunlnk",		UF_NOUNLINK },
X	{ "uunlink",		UF_NOUNLINK },
X#endif
X	{ NULL,			0 }
X};
X#define	nflagnames	((sizeof (flagnames) / sizeof (flagnames[0])) -1)
X
X/*
X * With 32 bits for flags and 512 bytes for the text buffer any name
X * for a single flag may be <= 16 bytes.
X */
XEXPORT char *
Xtextfromflags(info, buf)
X	register FINFO	*info;
X	register char	*buf;
X{
X	register Ulong	flags = info->f_fflags;
X	register char	*n;
X	register char	*p;
X	register int	i;
X
X	buf[0] = '\0';
X	p = buf;
X
X	for (i = 0; i < nflagnames; i++) {
X		if (flags & flagnames[i].flag) {
X			flags &= ~flagnames[i].flag;
X			if (p != buf)
X				*p++ = ',';
X			for (n = flagnames[i].name; *n; *p++ = *n++)
X				;
X		}
X	}
X	*p = '\0';
X	return (buf);
X}
X
XEXPORT int
Xtexttoflags(info, buf)
X	register FINFO	*info;
X	register char	*buf;
X{
X	register char	*p;
X	register char	*sep;
X	register int	i;
X	register Ulong	flags = 0;
X
X	p = buf;
X
X	while (*p) {
X		if ((sep = strchr(p, ',')) != NULL)
X			*sep = '\0';
X
X		for (i = 0; i < nflagnames; i++) {
X			if (streql(flagnames[i].name, p)) {
X				flags |= flagnames[i].flag;
X				break;
X			}
X		}
X#ifdef	nonono
X		if (i == nflagnames) {
X			not found!
X		}
X#endif
X		if (sep != NULL) {
X			*sep++ = ',';
X			p = sep;
X		} else {
X			break;
X		}
X	}
X	info->f_fflags = flags;
X	return (0);
X}
X
X#endif  /* USE_FFLAGS */
END-of-star-1.5.2/star/fflags.c
echo x - star-1.5.2/star/fifo.c
sed 's/^X//' >star-1.5.2/star/fifo.c << 'END-of-star-1.5.2/star/fifo.c'
X/* @(#)fifo.c	1.77 12/01/01 Copyright 1989, 1994-2012 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)fifo.c	1.77 12/01/01 Copyright 1989, 1994-2012 J. Schilling";
X#endif
X/*
X *	A "fifo" that uses shared memory between two processes
X *
X *	s*wakeup() 2nd parameter character:
X *
X *		t	fifo_iwait() wake up put side to start read Tape change
X *		d	fifo_owake() wake up get side if mp->oblocked == TRUE
X *		e	fifo_oflush() wake up get side if EOF
X *		T	fifo_owait() wake up put side after write Tape change
X *		s	fifo_iwake() wake up put side if mp->iblocked == TRUE
X *		S	fifo_resume() wake up put side after reading first blk
X *		n	fifo_chitape() wake up put side to start wrt Tape chng
X *		N	fifo_chotape()	wake up get side if mp->oblocked == TRUE
X *		R	fifo_reelwake() wake up put side if mp->reelwait == TRUE
X *
X *	Copyright (c) 1989, 1994-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>	/* includes <sys/types.h> */
X#include <schily/libport.h>	/* getpagesize() */
X#include <schily/fcntl.h>
X#include <schily/standard.h>
X#include <schily/errno.h>
X#include "star.h"
X#include "fifo.h"	/* #undef FIFO may happen here */
X#include <schily/schily.h>
X#include "starsubs.h"
X
X#ifdef	FIFO
X
X#if !defined(USE_MMAP) && !defined(USE_USGSHM)
X#define	USE_MMAP
X#endif
X#if defined(HAVE_SMMAP) && defined(USE_MMAP)
X#include <schily/mman.h>
X#endif
X
X#ifndef	HAVE_SMMAP
X#	undef	USE_MMAP
X#	define	USE_USGSHM	/* SYSV shared memory is the default */
X#endif
X
X#ifdef	HAVE_DOSALLOCSHAREDMEM	/* This is for OS/2 */
X#	undef	USE_MMAP
X#	undef	USE_USGSHM
X#	define	USE_OS2SHM
X#endif
X
X#ifdef	HAVE_BEOS_AREAS		/* This is for BeOS/Zeta */
X#	undef	USE_MMAP
X#	undef	USE_USGSHM
X#	undef	USE_OS2SHM
X#	define	USE_BEOS_AREAS
X#endif
X
X#ifdef DEBUG
X#define	EDEBUG(a)	if (debug) error a
X#else
X#define	EDEBUG(a)
X#endif
X
X	/*
X	 * roundup(x, y), x needs to be unsigned or x+y non-genative.
X	 */
X#undef	roundup
X#define	roundup(x, y)	((((x)+((y)-1))/(y))*(y))
X
Xchar	*buf;
Xm_head	*mp;
Xint	buflen;
X
Xextern	BOOL	multivol;
Xextern	BOOL	debug;
Xextern	BOOL	shmflag;
Xextern	BOOL	no_stats;
Xextern	BOOL	lowmem;
Xextern	long	fs;
Xextern	long	bs;
Xextern	long	ibs;
Xextern	long	obs;
Xextern	int	hiw;
Xextern	int	low;
Xextern	BOOL	copyflag;
Xextern	long	chdrtype;
X
Xextern	m_stats	*stats;
Xextern	int	pid;
X
Xextern	GINFO	*gip;
X
Xlong	ibs;
Xlong	obs;
Xint	hiw;
Xint	low;
X
XEXPORT	void	initfifo	__PR((void));
XLOCAL	void	fifo_setparams	__PR((void));
XEXPORT	void	fifo_ibs_shrink	__PR((int newsize));
XEXPORT	void	runfifo		__PR((int ac, char *const *av));
XLOCAL	void	prmp		__PR((void));
XEXPORT	void	fifo_stats	__PR((void));
XLOCAL	int	swait		__PR((int f));
XLOCAL	int	swakeup		__PR((int f, int c));
XEXPORT	int	fifo_amount	__PR((void));
XEXPORT	int	fifo_iwait	__PR((int amount));
XEXPORT	void	fifo_owake	__PR((int amount));
XEXPORT	void	fifo_oflush	__PR((void));
XEXPORT	int	fifo_owait	__PR((int amount));
XEXPORT	void	fifo_iwake	__PR((int amt));
XEXPORT	void	fifo_reelwake	__PR((void));
XEXPORT	void	fifo_resume	__PR((void));
XEXPORT	void	fifo_sync	__PR((int size));
XEXPORT	void	fifo_chitape	__PR((void));
XEXPORT	void	fifo_chotape	__PR((void));
XLOCAL	void	do_in		__PR((void));
XLOCAL	void	do_out		__PR((void));
XLOCAL	void	fbit_nclear	__PR((bitstr_t *name, int startb, int stopb));
X#ifdef	USE_MMAP
XLOCAL	char	*mkshare	__PR((int size));
X#endif
X#ifdef	USE_USGSHM
XLOCAL	char	*mkshm		__PR((int size));
X#endif
X#ifdef	USE_OS2SHM
XLOCAL	char	*mkos2shm	__PR((int size));
X#endif
X#ifdef	USE_BEOS_AREAS
XLOCAL	char	*mkbeosshm	__PR((int size));
XLOCAL	void	beosshm_child	__PR((void));
X#endif
X
XEXPORT void
Xinitfifo()
X{
Xextern	BOOL	cflag;
X	int	pagesize;
X	int	addsize;
X
X	if (obs == 0)
X		obs = bs;
X	if (fs == 0) {
X#if	defined(sun) && defined(mc68000)
X		fs = 1*1024*1024;
X#else
X#if defined(__linux) && !defined(USE_MMAP)
X		fs = 4*1024*1024;
X#else
X		fs = 8*1024*1024;
X#endif
X#endif
X		if (lowmem)
X			fs = 1*1024*1024;
X	}
X	if (fs < bs + obs)
X		fs = bs + obs;
X	/*
X	 * We need at least 2x obs for the visible part of the FIFO to allow
X	 * the inout and the output act independently.
X	 */
X	if (fs < 2*obs)
X		fs = 2*obs;
X	fs = roundup(fs, obs);
X	pagesize = getpagesize();
X	if (pagesize <= 0)
X		pagesize = TBLOCK;
X
X	/*
X	 * 'addsize' covers the invisible part of the FIFO.
X	 * The start of the real shared memory carries m_head, followed by
X	 * the space needed for moving residual bytes "down" before the
X	 * official start of the vivible part of the FIFO.
X	 * This is needed to grant that the FIFO output may always be done
X	 * in "obs" chunks to grant a unique tape output block size.
X	 * If we ony need to support CPIO to be fed into a tar inout, it
X	 * would be sufficient to add TBLOCK size. If we like to support
X	 * auto split multi volume archives, we need to count on QIC drives
X	 * that are unblocked and write less than a TAR "tape block" on EOT.
X	 * In this case we may need to move anything < obs "down" before the
X	 * official start of the FIFO.
X	 * We reserve at least 300 bytes for the GINFO string table.
X	 */
X#ifdef	CPIO_ONLY
X	addsize = sizeof (m_head) + 300 + TBLOCK;
X#else
X	addsize = sizeof (m_head) + 300 + obs;
X#endif
X	if (multivol && cflag)
X		addsize += bitstr_size(fs/TBLOCK);
X	addsize = roundup(addsize, pagesize);
X
X	buflen = roundup(fs, pagesize) + addsize;
X	/* CSTYLED */
X	EDEBUG(("bs: %ld obs: %ld fs: %ld buflen: %d addsize: %d bitstr size: %ld\n", bs, obs, fs, buflen, addsize, bitstr_size(fs/TBLOCK)));
X	/*
X	 * llitos() overshoots by one space (' ') in cpio mode, add pagesize.
X	 * See also fifo_setparams().
X	 */
X	buflen += pagesize;
X
X#if	defined(USE_MMAP) && defined(USE_USGSHM)
X	if (shmflag)
X		buf = mkshm(buflen);
X	else
X		buf = mkshare(buflen);
X#else
X#if	defined(USE_MMAP)
X	buf = mkshare(buflen);
X#endif
X#if	defined(USE_USGSHM)
X	buf = mkshm(buflen);
X#endif
X#if	defined(USE_OS2SHM)
X	buf = mkos2shm(buflen);
X#endif
X#if	defined(USE_BEOS_AREAS)
X	buf = mkbeosshm(buflen);
X#endif
X#endif
X	mp = (m_head *)buf;
X	fillbytes(buf, addsize, '\0');	/* We init the complete add. space */
X	stats = &mp->stats;
X	stats->hdrtype = chdrtype;
X	mp->base = &buf[addsize];
X	mp->iblocked = FALSE;
X	mp->oblocked = FALSE;
X	/*
X	 * Note that R'est'size is used to store shareable strings from the
X	 * 'g'lobal P-1.2001 headers.
X	 */
X#ifdef	CPIO_ONLY
X	mp->rsize = addsize - sizeof (m_head) - TBLOCK;
X#else
X	mp->rsize = addsize - sizeof (m_head) - obs;
X#endif
X	if (multivol && cflag) {
X		/*
X		 * Subtract bitmap size from restsize and set up bitmap pointer
X		 */
X		mp->bmlast = (fs/TBLOCK) - 1;
X		mp->rsize -= bitstr_size(fs/TBLOCK);
X		mp->bmap  = (bitstr_t *)(((char *)(&(&mp->ginfo)[1])) + mp->rsize);
X	}
X	gip = &mp->ginfo;
X
X	fifo_setparams();
X
X	if (pipe(mp->gp) < 0)
X		comerr("Cannot create get pipe\n");
X	if (pipe(mp->pp) < 0)
X		comerr("Cannot create put pipe\n");
X
X#ifdef	F_SETFD
X	/*
X	 * Set close on exec() flag so the compress program
X	 * or other programs will not inherit out pipes.
X	 */
X	fcntl(mp->gp[0], F_SETFD, FD_CLOEXEC);
X	fcntl(mp->gp[1], F_SETFD, FD_CLOEXEC);
X	fcntl(mp->pp[0], F_SETFD, FD_CLOEXEC);
X	fcntl(mp->pp[1], F_SETFD, FD_CLOEXEC);
X#endif
X
X	mp->putptr = mp->getptr = mp->base;
X	prmp();
X	{
X		/* Temporary until all modules know about mp->xxx */
X		extern int	bufsize;
X		extern char	*bigbuf;
X		extern char	*bigptr;
X
X		bufsize = mp->size;
X		bigptr = bigbuf = mp->base;
X	}
X}
X
XLOCAL void
Xfifo_setparams()
X{
X	if (mp == NULL) {
X		comerrno(EX_BAD, "Panic: NULL fifo parameter structure.\n");
X		/* NOTREACHED */
X		return;
X	}
X	mp->end = &mp->base[fs];
X	fillbytes(mp->end, 10, 'U');	/* Mark llitos() overshoot reserve. */
X	mp->size = fs;
X	mp->ibs = ibs;
X	mp->obs = obs;
X	if (mp->bmap)
X		mp->bmlast = (fs/TBLOCK) - 1;
X
X	if (hiw)
X		mp->hiw = hiw;
X	else
X		mp->hiw = mp->size / 3 * 2;
X	if (low)
X		mp->low = low;
X	else
X		mp->low = mp->size / 3;
X	if (mp->low < mp->obs)
X		mp->low = mp->obs;
X	if (mp->low > mp->hiw)
X		mp->low = mp->hiw;
X
X	if (ibs == 0 || mp->ibs > mp->size)
X		mp->ibs = mp->size;
X}
X
XEXPORT void
Xfifo_ibs_shrink(newsize)
X	int	newsize;
X{
X	ibs = newsize;
X	fs = (fs/newsize)*newsize;
X	fifo_setparams();
X}
X
X/*
X * Der eigentliche star Prozess ist immer im Vordergrund.
X * Der Band Prozess ist immer im Hintergrund.
X *
X * Band -> fifo -> star
X * star -> fifo -> star	-copy	flag
X * star -> fifo -> Band	-c	flag
X *
X * Beim Lesen ist der star Prozess der get Prozess.
X * Beim Schreiben ist der star Prozess der put Prozess.
X */
XEXPORT void
Xrunfifo(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	extern	BOOL	cflag;
X
X	if ((pid = fork()) < 0)
X		comerr("Cannot fork.\n");
X
X#ifdef USE_OS2SHM
X	if (pid == 0)
X		DosGetSharedMem(buf, 3);	/* PAG_READ|PAG_WRITE */
X#endif
X#ifdef	USE_BEOS_AREAS
X	if (pid == 0)
X		beosshm_child();
X#endif
X
X	if ((pid != 0) ^ cflag) {
X		EDEBUG(("Get prozess: cflag: %d pid: %d\n", cflag, pid));
X		/* Get Prozess */
X		close(mp->gpout);
X		close(mp->ppin);
X	} else {
X		EDEBUG(("Put prozess: cflag: %d pid: %d\n", cflag, pid));
X		/* Put Prozess */
X		close(mp->gpin);
X		close(mp->ppout);
X	}
X
X	if (pid == 0) {
X		/*
X		 * The background process
X		 */
X		if (copyflag) {
X			mp->ibs = mp->size;
X			mp->obs = mp->size;
X
X			copy_create(ac, av);
X		} else if (cflag) {	/* In create mode .... */
X			mp->ibs = mp->size;
X			mp->obs = bs;
X			do_out();	/* Write archive in background */
X		} else {
X			mp->flags |= FIFO_IWAIT;
X			mp->ibs = bs;
X			mp->obs = mp->size;
X			do_in();	/* Extract mode: read archive in bg. */
X		}
X#ifdef	USE_OS2SHM
X		DosFreeMem(buf);
X#ifdef	__needed__
X		sleep(30000);	/* XXX If calling _exit() here the parent process seems to be blocked */
X				/* XXX This should be fixed soon */
X#endif
X#endif
X		exit(0);
X		/* NOTREACHED */
X	} else {
X		extern	FILE	*tarf;
X
X		if (tarf)
X			fclose(tarf);
X		/*
X		 * Here we return from the FIFO set up to the foreground
X		 * TAR process.
X		 */
X	}
X}
X
XLOCAL void
Xprmp()
X{
X#ifdef	DEBUG
X	if (!debug)
X		return;
X#ifdef	TEST
X	error("putptr: %p\n", mp->putptr);
X	error("getptr: %p\n", mp->getptr);
X#endif
X	error("base:  %p\n", mp->base);
X	error("end:   %p\n", mp->end);
X	error("size:  %d\n", mp->size);
X	error("ibs:   %d\n", mp->ibs);
X	error("obs:   %d\n", mp->obs);
X	error("amt:   %ld\n", FIFO_AMOUNT(mp));
X	error("hiw:   %d\n", mp->hiw);
X	error("low:   %d\n", mp->low);
X	error("flags: %X\n", mp->flags);
X#ifdef	TEST
X	error("wpin:  %d\n", mp->wpin);
X	error("wpout: %d\n", mp->wpout);
X	error("rpin:  %d\n", mp->rpin);
X	error("rpout: %d\n", mp->rpout);
X#endif
X#endif	/* DEBUG */
X}
X
XEXPORT void
Xfifo_stats()
X{
X	if (no_stats)
X		return;
X
X	errmsgno(EX_BAD, "fifo had %d puts %d gets.\n", mp->puts, mp->gets);
X	errmsgno(EX_BAD, "fifo was %d times empty and %d times full.\n",
X						mp->empty, mp->full);
X	errmsgno(EX_BAD, "fifo held %d bytes max, size was %d bytes\n",
X						mp->maxfill, mp->size);
X	if (mp->moves) {
X		errmsgno(EX_BAD,
X			"fifo had %d moves, total of %lld moved bytes\n",
X						mp->moves, mp->mbytes);
X	}
X	if ((mp->flags & (FIFO_MEOF|FIFO_EXIT)) == 0 || FIFO_AMOUNT(mp) > 0) {
X		errmsgno(EX_BAD, "fifo is %lld%% full (%luk), size %dk.\n",
X				(Llong)FIFO_AMOUNT(mp) * (Llong)100 / mp->size,
X				FIFO_AMOUNT(mp)/1024, mp->size/1024);
X	}
X}
X
X
X/*
X * Semaphore wait
X */
XLOCAL int
Xswait(f)
X	int	f;
X{
X		int	ret;
X	unsigned char	c;
X
X	seterrno(0);
X	do {
X		ret = read(f, &c, 1);
X	} while (ret < 0 && geterrno() == EINTR);
X	if (ret < 0 || (ret == 0 && pid)) {
X		/*
X		 * If pid != 0, this is the foreground process
X		 */
X		if ((mp->flags & FIFO_EXIT) == 0)
X			errmsg("Sync pipe read error on pid %d flags 0x%X.\n", pid, mp->flags);
X		if ((mp->flags & FIFO_EXERRNO) != 0)
X			ret = mp->ferrno;
X		else
X			ret = 1;
X		exprstats(ret);
X		/* NOTREACHED */
X	}
X	if (ret == 0) {
X		/*
X		 * this is the background process!
X		 */
X		exit(0);
X	}
X	return ((int)c);
X}
X
X/*
X * Semaphore wakeup
X */
XLOCAL int
Xswakeup(f, c)
X	int	f;
X	char	c;
X{
X	return (write(f, &c, 1));
X}
X
X#define	sgetwait(m)		swait((m)->gpin)
X#define	sgetwakeup(m, c)	swakeup((m)->gpout, (c))
X
X#define	sputwait(m)		swait((m)->ppin)
X#define	sputwakeup(m, c)	swakeup((m)->ppout, (c))
X
XEXPORT int
Xfifo_amount()
X{
X	return (FIFO_AMOUNT(mp));
X}
X
X
X/*
X * wait until at least amount bytes may be put into the fifo
X */
XEXPORT int
Xfifo_iwait(amount)
X	int	amount;
X{
X	register int	cnt;
X	register m_head *rmp = mp;
X
X	if (rmp->chreel) {	/* Block FIFO to allow to change reel */
X		EDEBUG(("C"));
X		rmp->reelwait = TRUE;
X		sputwait(rmp);
X	}
X	if (rmp->flags & FIFO_MEOF) {
X		EDEBUG(("E"));
X		cnt = sputwait(rmp);
X		if (cnt != 'n') {
X			errmsgno(EX_BAD,
X			"Implementation botch: with FIFO_MEOF\n");
X			comerrno(EX_BAD,
X			"Did not wake up from fifo_chitape() - got '%c'.\n",
X				cnt);
X		}
X		if (rmp->flags & FIFO_I_CHREEL) {
X			changetape(TRUE);
X			rmp->flags &= ~FIFO_I_CHREEL;
X			rmp->flags &= ~FIFO_MEOF;
X			EDEBUG(("t"));
X			sgetwakeup(rmp, 't');
X		} else {
X			return (-1);
X		}
X	}
X	while ((cnt = rmp->size - FIFO_AMOUNT(rmp)) < amount) {
X		if (rmp->flags & FIFO_MERROR) {
X			fifo_stats();
X			exit(1);
X		}
X		rmp->full++;
X		rmp->iblocked = TRUE;
X		EDEBUG(("i"));
X		sputwait(rmp);
X	}
X	if (cnt > rmp->ibs)
X		cnt = rmp->ibs;
X	if ((rmp->end - rmp->putptr) < cnt) {
X		EDEBUG(("at end: cnt: %d max: %d\n",
X						cnt, rmp->end - rmp->putptr));
X		cnt = rmp->end - rmp->putptr;
X	}
X	{
X		/* Temporary until all modules know about mp->xxx */
X		extern char *bigptr;
X
X		bigptr = rmp->putptr;
X	}
X	return (cnt);
X}
X
X
X/*
X * add amount bytes to putcount and wake up get side if necessary
X */
XEXPORT void
Xfifo_owake(amount)
X	int	amount;
X{
X	register m_head *rmp = mp;
X
X	if (amount <= 0)
X		return;
X	rmp->puts++;
X	rmp->putptr += amount;
X	rmp->icnt += amount;
X	if (rmp->putptr >= rmp->end)
X		rmp->putptr = rmp->base;
X
X	if (rmp->oblocked &&
X			((rmp->flags & FIFO_IWAIT) ||
X					(FIFO_AMOUNT(rmp) >= rmp->low))) {
X		rmp->oblocked = FALSE;
X		EDEBUG(("d"));
X		sgetwakeup(rmp, 'd');
X	}
X	if ((rmp->flags & FIFO_IWAIT)) {
X		EDEBUG(("I"));
X		sputwait(rmp);
X		/*
X		 * Set up shadow properties for this proc.
X		 */
X		setprops(stats->hdrtype);
X	}
X}
X
X
X/*
X * send EOF condition to get side
X */
XEXPORT void
Xfifo_oflush()
X{
X	mp->flags |= FIFO_MEOF;
X	if (mp->oblocked) {
X		mp->oblocked = FALSE;
X		EDEBUG(("e"));
X		sgetwakeup(mp, 'e');
X	}
X}
X
X/*
X * wait until at least obs bytes may be taken out of fifo
X */
XEXPORT int
Xfifo_owait(amount)
X	int	amount;
X{
X	int	c;
X	register int	cnt;
X	register m_head *rmp = mp;
X
Xagain:
X	cnt = FIFO_AMOUNT(rmp);
X	if (cnt == 0 && (rmp->flags & FIFO_MEOF))
X		return (cnt);
X
X	if (cnt < amount && (rmp->flags & (FIFO_MEOF|FIFO_O_CHREEL)) == 0) {
X		rmp->empty++;
X		rmp->oblocked = TRUE;
X		EDEBUG(("o"));
X		c = sgetwait(rmp);
X		cnt = FIFO_AMOUNT(rmp);
X	}
X	if (cnt == 0 && (rmp->flags & FIFO_O_CHREEL)) {
X		changetape(TRUE);
X		rmp->flags &= ~FIFO_O_CHREEL;
X		EDEBUG(("T"));
X		sputwakeup(mp, 'T');
X		goto again;
X	}
X
X	if (rmp->maxfill < cnt)
X		rmp->maxfill = cnt;
X
X	if (cnt > rmp->obs)
X		cnt = rmp->obs;
X
X	c = rmp->end - rmp->getptr;
X#ifdef	CPIO_ONLY
X	if (c < TBLOCK && c < cnt) {	/* XXX Check for c < amount too? */
X#else
X	if (c < obs && c < cnt) {	/* Check for initial obs val */
X#endif
X		/*
X		 * A left over residual at the end of the FIFO is smaller
X		 * than 512 bytes (CPIO_ONLY) or 'obs' (auto-detect multivol
X		 * split) and there is additional data at the beginning
X		 * of the FIFO.
X		 * Move the residual before the beginning of the FIFO to make
X		 * the content continuous.
X		 */
X		char *p;
X
X		p = rmp->base - c;
X		movebytes(rmp->getptr, p, c);
X		rmp->moves++;
X		rmp->mbytes += c;
X		rmp->getptr = p;
X		c = rmp->end - rmp->getptr;
X	}
X	if (cnt > c && c >= amount)
X		cnt = c;
X
X	if (rmp->getptr + cnt > rmp->end) {
X		errmsgno(EX_BAD, "getptr >: %p %p %d end: %p\n",
X				(void *)rmp->getptr, (void *)&rmp->getptr[cnt],
X				cnt, (void *)rmp->end);
X	}
X	{
X		/* Temporary until all modules know about mp->xxx */
X		extern char *bigptr;
X
X		bigptr = rmp->getptr;
X	}
X	return (cnt);
X}
X
X
X/*
X * add amount bytes to getcount and wake up put side if necessary
X */
XEXPORT void
Xfifo_iwake(amt)
X	int	amt;
X{
X	register m_head *rmp = mp;
X
X	if (amt <= 0) {
X		rmp->flags |= FIFO_MERROR;
X		exit(1);
X	}
X
X	rmp->gets++;
X	rmp->getptr += amt;
X	rmp->ocnt += amt;
X
X	if (rmp->getptr >= rmp->end)
X		rmp->getptr = rmp->base;
X
X	if ((FIFO_AMOUNT(rmp) <= rmp->hiw) && rmp->iblocked) {
X		rmp->iblocked = FALSE;
X		EDEBUG(("s"));
X		sputwakeup(rmp, 's');
X	}
X}
X
X/*
X * Wake up the put side in case it is wating on rmp->reelwait
X */
XEXPORT void
Xfifo_reelwake()
X{
X	register m_head *rmp = mp;
X
X	if (rmp->reelwait) {
X		rmp->reelwait = FALSE;
X		EDEBUG(("R"));
X		sputwakeup(rmp, 'R');
X	}
X}
X
XEXPORT void
Xfifo_resume()
X{
X	register m_head *rmp = mp;
X
X	if ((rmp->flags & FIFO_IWAIT) != 0) {
X		rmp->flags &= ~FIFO_IWAIT;
X		EDEBUG(("S"));
X		sputwakeup(rmp, 'S');
X	}
X}
X
XEXPORT void
Xfifo_sync(size)
X	int	size;
X{
X	register m_head *rmp = mp;
X		int	rest = 0;
X		int	smax = rmp->end - rmp->putptr;
X		int	amt  = FIFO_AMOUNT(rmp);
X
X	if (size) {
X		if ((amt % size) != 0)
X			rest = size - amt%size;
X	} else {
X		if ((amt % rmp->obs) != 0)
X			rest = rmp->obs - amt%rmp->obs;
X	}
X
X	/*
X	 * Be careful with the size, as we might have changed mp->obs.
X	 */
X	if (rest > smax)
X		rest = smax;
X	fifo_iwait(rest);
X	fillbytes(rmp->putptr, rest, '\0');
X	fifo_owake(rest);
X}
X
XEXPORT int
Xfifo_errno()
X{
X	/*
X	 * Note that we may be called with fifo not active.
X	 */
X	if (mp == NULL)
X		return (0);
X
X	if ((mp->flags & FIFO_EXERRNO) != 0)
X		return (mp->ferrno);
X	return (0);
X}
X
X/* ARGSUSED */
XEXPORT void
Xfifo_onexit(err, ignore)
X	int	err;
X	void	*ignore;
X{
X	fifo_exit(err);
X}
X
XEXPORT void
Xfifo_exit(err)
X	int	err;
X{
X	extern	BOOL	cflag;
X
X	/*
X	 * Note that we may be called with fifo not active.
X	 */
X	if (mp == NULL)
X		return;
X
X	/*
X	 * Tell other side of FIFO to exit().
X	 */
X	mp->flags |= FIFO_EXIT;
X	if (err != 0) {
X		mp->flags |= FIFO_EXERRNO;
X		mp->ferrno = err;
X	}
X
X	/*
X	 * Wake up other side by closing the sync pipes.
X	 */
X	if ((pid != 0) ^ cflag) {
X		EDEBUG(("Fifo_exit() from get prozess: cflag: %d pid: %d\n", cflag, pid));
X		/* Get Prozess */
X		close(mp->gpin);
X		close(mp->ppout);
X	} else {
X		EDEBUG(("Fifo_exit() from put prozess: cflag: %d pid: %d\n", cflag, pid));
X		/* Put Prozess */
X		close(mp->gpout);
X		close(mp->ppin);
X	}
X}
X
XEXPORT void
Xfifo_chitape()
X{
X	char	c;
X
X	mp->flags |= FIFO_I_CHREEL;
X	if (mp->flags & FIFO_MEOF) {
X		EDEBUG(("n"));
X		sputwakeup(mp, 'n');
X	} else {
X		comerrno(EX_BAD,
X		"Implementation botch: FIFO_MEOF not set in fifo_chitape()\n");
X	}
X	EDEBUG(("w"));
X	c = sgetwait(mp);
X}
X
XEXPORT void
Xfifo_chotape()
X{
X	char	c;
X
X	mp->flags |= FIFO_O_CHREEL;
X	if (mp->oblocked) {
X		mp->oblocked = FALSE;
X		EDEBUG(("N"));
X		sgetwakeup(mp, 'N');
X	}
X	EDEBUG(("W"));
X	c = sputwait(mp);
X}
X
X/*
X * Tape -> FIFO
X *
X * Tape input process for the FIFO.
X * This process runs in background and fills the FIFO with data from the TAPE.
X * Also wait in fifo_owake() if FIFO_IWAIT and we ware reading the first block.
X */
XLOCAL void
Xdo_in()
X{
X	int	amt;
X	int	cnt;
X
Xnextread:
X	do {
X		cnt = fifo_iwait(mp->ibs);
X		amt = readtape(mp->putptr, cnt);
X		fifo_owake(amt);
X	} while (amt > 0);
X
X	fifo_oflush();
X	if (multivol) {
X		/*
X		 * In theory, we don't need to test 'multivol' here.
X		 * We would die later from EOF in the sync pipe.
X		 */
X		cnt = fifo_iwait(mp->ibs);	/* Media is changed here */
X		if (cnt > 0) {
X			int	skip;
X
X			amt = readtape(mp->putptr, cnt);
X			while (amt > 0 &&
X				!verifyvol(mp->putptr, amt,
X							stats->volno, &skip)) {
X				changetape(FALSE);
X				amt = readtape(mp->putptr, cnt);
X			}
X			if (skip > 0)
X				fifo_iwake(skip*TBLOCK);
X			if (amt > 0) {
X				fifo_owake(amt);
X				goto nextread;
X			}
X		}
X	}
X	closetape();
X}
X
X/*
X * FIFO -> Tape
X *
X * Tape output process for the FIFO.
X * This process runs in background and writes to the TAPE using
X * data from the FIFO.
X */
XLOCAL void
Xdo_out()
X{
X	int	cnt;
X	int	amt;
X
X	for (;;) {
X		cnt = fifo_owait(mp->obs);
X		if (cnt == 0)
X			break;
Xnextwrite:
X		amt = writetape(mp->getptr, cnt);
X		if (amt == -2) {
X			changetape(TRUE);
X			if ((amt = startvol(mp->getptr, cnt)) <= 0)
X				goto nextwrite;
X		}
X		if (multivol) {
X			int	startb = (mp->getptr - mp->base) / TBLOCK;
X			int	stopb = startb - 1 + amt / TBLOCK;
X
X			if (mp->getptr < mp->base) {
X				stopb = mp->bmlast;
X				startb = stopb + 1 - (mp->base - mp->getptr) / TBLOCK;
X				if ((mp->getptr + amt) < mp->base)
X					stopb = startb - 1 + amt / TBLOCK;
X				fbit_nclear(mp->bmap, startb, stopb);
X				if ((mp->getptr + amt) < mp->base) {
X					startb = stopb = -1;
X				} else {
X					startb = 0;
X					stopb = -1 + (amt - (mp->base - mp->getptr)) / TBLOCK;
X				}
X			}
X			if (startb >= 0)
X				fbit_nclear(mp->bmap, startb, stopb);
X		}
X		fifo_iwake(amt);
X	}
X	closetape();
X}
X
X/*
X * Make the macro a function...
X */
XLOCAL void
Xfbit_nclear(name, startb, stopb)
X	register bitstr_t *name;
X	register int	startb;
X	register int	stopb;
X{
X	bit_nclear(name, startb, stopb);
X}
X
X#ifdef	USE_MMAP
XLOCAL char *
Xmkshare(size)
X	int	size;
X{
X	int	f;
X	char	*addr;
X
X#ifdef	MAP_ANONYMOUS	/* HP/UX */
X	f = -1;
X	addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0);
X#else
X	if ((f = open("/dev/zero", O_RDWR)) < 0)
X		comerr("Cannot open '/dev/zero'.\n");
X	addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
X#endif
X	if (addr == (char *)-1)
X		comerr("Cannot get mmap for %d Bytes on /dev/zero.\n", size);
X	if (f >= 0)
X		close(f);
X
X	if (debug) errmsgno(EX_BAD, "shared memory segment attached at: %p size %d\n",
X				(void *)addr, size);
X
X#ifdef	HAVE_MLOCK
X	if (getuid() == 0 && mlock(addr, size) < 0)
X		errmsg("Cannot lock fifo memory.\n");
X#endif
X
X	return (addr);
X}
X#endif
X
X#ifdef	USE_USGSHM
X#include <schily/ipc.h>
X#include <schily/shm.h>
XLOCAL char *
Xmkshm(size)
X	int	size;
X{
X	int	id;
X	char	*addr;
X	/*
X	 * Unfortunately, a declaration of shmat() is missing in old
X	 * implementations such as AT&T SVr0 and SunOS.
X	 * We cannot add this definition here because the return-type
X	 * changed on newer systems.
X	 *
X	 * We will get a warning like this:
X	 *
X	 * warning: assignment of pointer from integer lacks a cast
X	 * or
X	 * warning: illegal combination of pointer and integer, op =
X	 */
X#ifdef	__never__
X	extern	char *shmat();
X#endif
X
X	if ((id = shmget(IPC_PRIVATE, size, IPC_CREAT|0600)) == -1)
X		comerr("shmget failed\n");
X
X	if (debug) errmsgno(EX_BAD, "shared memory segment allocated: %d\n", id);
X
X	if ((addr = shmat(id, (char *)0, 0600)) == (char *)-1)
X		comerr("shmat failed\n");
X
X	if (debug) errmsgno(EX_BAD, "shared memory segment attached at: %p size %d\n",
X				(void *)addr, size);
X
X	if (shmctl(id, IPC_RMID, 0) < 0)
X		comerr("shmctl failed\n");
X
X#ifdef	SHM_LOCK
X	/*
X	 * Although SHM_LOCK is standard, it seems that all versions of AIX
X	 * ommit this definition.
X	 */
X	if (getuid() == 0 && shmctl(id, SHM_LOCK, 0) < 0)
X		errmsg("shmctl failed to lock shared memory segment\n");
X#endif
X
X	return (addr);
X}
X#endif
X
X#ifdef	USE_OS2SHM
XLOCAL char *
Xmkos2shm(size)
X	int	size;
X{
X	char	*addr;
X
X	/*
X	 * The OS/2 implementation of shm (using shm.dll) limits the size of one shared
X	 * memory segment to 0x3fa000 (aprox. 4MBytes). Using OS/2 native API we have
X	 * no such restriction so I decided to use it allowing fifos of arbitrary size.
X	 */
X	if (DosAllocSharedMem(&addr, NULL, size, 0X100L | 0x1L | 0x2L | 0x10L))
X		comerr("DosAllocSharedMem() failed\n");
X
X	if (debug) errmsgno(EX_BAD, "shared memory allocated attached at: %p size %d\n",
X				(void *)addr, size);
X
X	return (addr);
X}
X#endif
X
X#ifdef	USE_BEOS_AREAS
XLOCAL	area_id	fifo_aid;
XLOCAL	void	*fifo_addr;
XLOCAL	char	fifo_name[32];
X
XLOCAL char *
Xmkbeosshm(size)
X	int	size;
X{
X	snprintf(fifo_name, sizeof (fifo_name), "star FIFO %lld",
X		(Llong)getpid());
X
X	fifo_aid = create_area(fifo_name, &fifo_addr,
X			B_ANY_ADDRESS,
X			size,
X			B_NO_LOCK, B_READ_AREA|B_WRITE_AREA);
X	if (fifo_addr == NULL) {
X		comerrno(fifo_aid,
X			"Cannot get create_area for %d Bytes FIFO.\n", size);
X	}
X	if (debug) errmsgno(EX_BAD, "shared memory allocated attached at: %p size %d\n",
X				(void *)fifo_addr, size);
X
X	return (fifo_addr);
X}
X
XLOCAL void
Xbeosshm_child()
X{
X	/*
X	 * Delete the area created by fork that is copy-on-write.
X	 */
X	delete_area(area_for(fifo_addr));
X	/*
X	 * Clone (share) the original one.
X	 */
X	fifo_aid = clone_area(fifo_name, &fifo_addr,
X			B_ANY_ADDRESS, B_READ_AREA|B_WRITE_AREA,
X			fifo_aid);
X	if (buf != fifo_addr) {
X		comerrno(EX_BAD, "Panic FIFO addr.\n");
X		/* NOTREACHED */
X	}
X}
X#endif
X
X#endif	/* FIFO */
END-of-star-1.5.2/star/fifo.c
echo x - star-1.5.2/star/fifo.h
sed 's/^X//' >star-1.5.2/star/fifo.h << 'END-of-star-1.5.2/star/fifo.h'
X/* @(#)fifo.h	1.31 12/01/01 Copyright 1989-2012 J. Schilling */
X/*
X *	Definitions for a "fifo" that uses
X *	shared memory between two processes
X *
X *	Copyright (c) 1989-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_FIFO_H
X#define	_FIFO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef	_BITSTRING_H
X#include "bitstring.h"
X#endif
X
X#if	defined(HAVE_OS_H) && \
X	defined(HAVE_CLONE_AREA) && defined(HAVE_CREATE_AREA) && \
X	defined(HAVE_DELETE_AREA)
X#include <OS.h>
X#	define	HAVE_BEOS_AREAS	/* BeOS/Zeta */
X#endif
X#if	!defined(HAVE_SMMAP) && !defined(HAVE_USGSHM) && \
X	!defined(HAVE_DOSALLOCSHAREDMEM) && !defined(HAVE_BEOS_AREAS)
X#undef	FIFO			/* We cannot have a FIFO on this platform */
X#endif
X#if	!defined(HAVE_FORK)
X#undef	FIFO			/* We cannot have a FIFO on this platform */
X#endif
X
X/*
X * Statistics data that needs to be in shared memory
X */
Xtypedef	struct	{
X	BOOL	reading;	/* true if currently reading from tape	    */
X	int	swapflg;	/* -1: init, 0: FALSE, 1: TRUE		    */
X	int	hdrtype;	/* Hdrtype used for read/write		    */
X	int	volno;		/* Volume #				    */
X	int	nblocks;	/* Blocksize for each transfer in TBLOCK    */
X	long	blocksize;	/* Blocksize for each transfer in bytes	    */
X	long	lastsize;	/* Size of last transfer (for backtape)	    */
X	Llong	eofblock;	/* EOF block # on Volume		    */
X	Llong	blocks;		/* Full blocks transfered on Volume	    */
X	Llong	parts;		/* Bytes fom partial transferes on Volume   */
X	Llong	Tblocks;	/* Total blocks transfered		    */
X	Llong	Tparts;		/* Total Bytes fom partial transferes	    */
X	off_t	cur_size;	/* The size of the current file (multivol)  */
X	off_t	cur_off;	/* The off for the current file (multivol)  */
X	off_t	old_size;	/* The size for the last block write	    */
X	off_t	old_off;	/* The off for the last block wrte	    */
X} m_stats;
X
X/*
X * Shared data used to control the FIFO
X */
Xtypedef struct {
X	char	*putptr;	/* put pointer within shared memory	    */
X	char	*getptr;	/* get pointer within shared memory	    */
X	char	*base;		/* base of fifo within shared memory segment */
X	char	*end;		/* end of real shared memory segment	    */
X	int	size;		/* size of fifo within shared memory segment */
X	int	ibs;		/* input transfer size			    */
X	int	obs;		/* output transfer size			    */
X	int	rsize;		/* rest size between head struct and .base  */
X	unsigned long	icnt;	/* input count (incremented on each put)    */
X	unsigned long	ocnt;	/* output count (incremented on each get)   */
X	char	iblocked;	/* input  (put side) is blocked		    */
X	char	oblocked;	/* output (get side) is blocked		    */
X	char	m1;		/* Semaphore claimed by newvolhdr()	    */
X	char	m2;		/* Semaphore claimed by cr_file()	    */
X	char	chreel;		/* Semaphore claimed by startvol()	    */
X	char	reelwait;	/* input  (put side) is blocked on "chreel" */
X	int	hiw;		/* highwater mark			    */
X	int	low;		/* lowwater mark			    */
X	int	flags;		/* fifo flags				    */
X	int	ferrno;		/* errno from fifo background process	    */
X	int	gp[2];		/* sync pipe for get process		    */
X	int	pp[2];		/* sync pipe for put process		    */
X	int	puts;		/* fifo put count statistic		    */
X	int	gets;		/* fifo get get statistic		    */
X	int	empty;		/* fifo was empty count statistic	    */
X	int	full;		/* fifo was full count statistic	    */
X	int	maxfill;	/* max # of bytes in fifo		    */
X	int	moves;		/* # of moves of residual bytes		    */
X	Llong	mbytes;		/* # of residual bytes moved		    */
X	m_stats	stats;		/* statistics				    */
X	bitstr_t *bmap;		/* Bitmap used to store TCB positions	    */
X	int	bmlast;		/* Last bits # in use in above Bitmap	    */
X	GINFO	ginfo;		/* To share GINFO for P.1-2001 'g' headers  */
X} m_head;
X
X#define	gpin	gp[0]		/* get pipe in  */
X#define	gpout	gp[1]		/* get pipe out */
X#define	ppin	pp[0]		/* put pipe in  */
X#define	ppout	pp[1]		/* put pipe out */
X
X#define	FIFO_AMOUNT(p)	((p)->icnt - (p)->ocnt)
X
X#define	FIFO_FULL	0x004	/* fifo is full			*/
X#define	FIFO_MEOF	0x008	/* EOF on input (put side)	*/
X#define	FIFO_MERROR	0x010	/* error on input (put side)	*/
X#define	FIFO_EXIT	0x020	/* exit() on non tape side	*/
X#define	FIFO_EXERRNO	0x040	/* errno from non tape side	*/
X
X#define	FIFO_IWAIT	0x200	/* input (put side) waits after first record */
X#define	FIFO_I_CHREEL	0x400	/* change input tape reel if fifo gets empty */
X#define	FIFO_O_CHREEL	0x800	/* change output tape reel if fifo gets empty */
X
X#ifdef	FIFO
X/*
X * Critical section handling for multi volume support.
X *
X * This code is used to protect access to stat->cur_size & stat->cur_off
X * when preparing the multi volume header. Calling blocking code from
X * within a critical section is not permitted. For this reason, and because
X * this only may block when a media change is done, the delay time is not
X * important or critical.
X */
Xextern	BOOL	use_fifo;
X
X#define	fifo_enter_critical()	if (use_fifo) { \
X				extern  m_head  *mp;		\
X								\
X				while (mp->m1)			\
X					usleep(100000);		\
X				mp->m2 = TRUE;			\
X			}
X
X#define	fifo_leave_critical()	if (use_fifo) { \
X				extern  m_head  *mp;		\
X								\
X				mp->m2 = FALSE;			\
X			}
X
X#define	fifo_lock_critical()	if (use_fifo) { \
X				extern  m_head  *mp;		\
X								\
X				mp->m1 = TRUE;			\
X				while (mp->m2)			\
X					usleep(100000);		\
X			}
X
X#define	fifo_unlock_critical()	if (use_fifo) { \
X				extern  m_head  *mp;		\
X								\
X				mp->m1 = FALSE;			\
X			}
X#else
X#define	fifo_enter_critical()
X#define	fifo_leave_critical()
X#define	fifo_lock_critical()
X#define	fifo_unlock_critical()
X#endif
X
X#endif /* _FIFO_H */
END-of-star-1.5.2/star/fifo.h
echo x - star-1.5.2/star/Makefile.man
sed 's/^X//' >star-1.5.2/star/Makefile.man << 'END-of-star-1.5.2/star/Makefile.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	star
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	star.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/star/Makefile.man
echo x - star-1.5.2/star/findinfo.c
sed 's/^X//' >star-1.5.2/star/findinfo.c << 'END-of-star-1.5.2/star/findinfo.c'
X/* @(#)findinfo.c	1.12 11/08/03 Copyright 2005-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)findinfo.c	1.12 11/08/03 Copyright 2005-2011 J. Schilling";
X#endif
X/*
X *	Convert FINFO -> struct stat for find_expr()
X *
X *	Copyright (c) 2005-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include "star.h"
X#include <schily/stat.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "starsubs.h"
X#include <schily/param.h>
X#include <schily/walk.h>
X#include <schily/find.h>
X
X#ifdef	USE_FIND
X
Xextern	findn_t	*find_node;
X
XEXPORT	BOOL	findinfo	__PR((FINFO *info));
X
X/*
X * Called from extract.c, diff.c and list.c
X */
XEXPORT BOOL
Xfindinfo(info)
X	FINFO	*info;
X{
X	struct stat sb;
X	BOOL	ret;
Xextern	struct WALK walkstate;
X
X	if (find_node == NULL)
X		return (TRUE);
X
X	sb.st_dev = info->f_dev;
X	sb.st_ino = info->f_ino;
X	sb.st_mode = info->f_mode|info->f_type;
X	sb.st_nlink = info->f_nlink;
X	sb.st_uid = info->f_uid;
X	sb.st_gid = info->f_gid;
X	sb.st_rdev = info->f_rdev;
X	sb.st_size = info->f_rsize;
X	sb.st_atime = info->f_atime;
X	sb.st_mtime = info->f_mtime;
X	sb.st_ctime = info->f_ctime;
X#ifdef	HAVE_ST_BLKSIZE
X	sb.st_blksize = 0;
X#endif
X#ifdef	HAVE_ST_BLOCKS
X	sb.st_blocks = (info->f_size+1023) / DEV_BSIZE;
X#endif
X	walkstate.lname = info->f_lname;
X	walkstate.pflags = PF_ACL|PF_XATTR;
X	if (info->f_xflags & (XF_ACL_ACCESS|XF_ACL_DEFAULT))
X		walkstate.pflags |= PF_HAS_ACL;
X	if (info->f_xflags & XF_XATTR)
X		walkstate.pflags |= PF_HAS_XATTR;
X	ret = find_expr(info->f_name, (char *)filename(info->f_name),
X						&sb, &walkstate, find_node);
X	if (!ret)
X		return (ret);
X	info->f_mode = sb.st_mode & 07777;
X	if (info->f_uid != sb.st_uid) {
X		static  char    nuid[32+1];
X
X		info->f_uid = sb.st_uid;
X		if (ic_nameuid(nuid, sizeof (nuid), info->f_uid)) {
X			info->f_uname = nuid;
X			info->f_umaxlen = sizeof (nuid)-1;
X		} else {
X			snprintf(nuid, sizeof (nuid), "%llu", (Llong)info->f_uid);
X			info->f_uname = nuid;
X			info->f_umaxlen = sizeof (nuid)-1;
X		}
X	}
X	if (info->f_gid != sb.st_gid) {
X		static  char    ngid[32+1];
X
X		info->f_gid = sb.st_gid;
X		if (ic_namegid(ngid, sizeof (ngid), info->f_gid)) {
X			info->f_gname = ngid;
X			info->f_gmaxlen = sizeof (ngid)-1;
X		} else {
X			snprintf(ngid, sizeof (ngid), "%llu", (Llong)info->f_gid);
X			info->f_gname = ngid;
X			info->f_gmaxlen = sizeof (ngid)-1;
X		}
X	}
X	return (ret);
X}
X
X#endif	/* USE_FIND */
END-of-star-1.5.2/star/findinfo.c
echo x - star-1.5.2/star/spax.1
sed 's/^X//' >star-1.5.2/star/spax.1 << 'END-of-star-1.5.2/star/spax.1'
X'\" t
X. \" @(#)spax.1	1.11 10/08/01 Copyr 2004-2010 J. Schilling
X. \" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
X. \" Manual page for spax
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.\" Header with no indent
X.de HD
X.ti 0
X.I \\$1
X..
X.\" Ruler line
X.de RU
X.ti 0
X\l'\n(.lu'
X..
X.\" Table caption
X.de CA
X.ce
X.B \\$1
X..
X.TH SPAX 1L "10/08/01" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xpax \- portable archive interchange
X.SH SYNOPSIS
X.TP
X.B
Xspax
X\ \ \ \ \ [\fIother\ options\fR]
X[\-cdnv] [\-H|\-L] [\-f\ \fIarchive] [\-o\ \fIoptions\fR].\|.\|.
X[\-s \fIreplstr].\|.\|.
X[\fIpattern\fR\&.\|.\|.\|]
X.sp
X.TP
X.B
Xspax
X\-r\ \ \ [\fIother\ options\fR]
X[\-cdiknuv] [\-H|\-L] [\-f\ \fIarchive] [\-o\ \fIoptions\fR].\|.\|.
X[\-p\ \fIstring\fR].\|.\|.
X[\-s\ \fIreplstr\fR].\|.\|.
X[\fIpattern\&.\|.\|.\|]
X.sp
X.TP
X.B
Xspax
X\-w\ \ \ [\fIother\ options\fR]
X[\-dituvX] [\-H|\-L] [\-b\ \fIblocksize\fR]
X[\-a]
X[\-f\ \fIarchive] [\-o\ \fIoptions\fR].\|.\|.
X[\-s\ \fIreplstr\fR].\|.\|.
X[\-x\ \fIformat\fR]
X[\fIfile\fR\&.\|.\|.\|]
X.sp
X.TP
X.B
Xspax
X\-r\ \-w[\fIother\ options\fR]
X[\-diklntuvX] [\-H|\-L] [\-o\ \fIoptions\fR].\|.\|.
X[\-p\ \fIstring\fR].\|.\|.
X[\-s\ \fIreplstr\fR].\|.\|.
X[\fIfile\fR\&.\|.\|.\|]
X.I directory
X.SH DESCRIPTION
X.PP
XThe 
X.B pax 
Xutility shall read, write, and write lists of the members
Xof archive files and copy directory hierarchies. A variety of
Xarchive formats shall be supported; see the
X.B \-x
Xformat option.
X.PP
XThe action to be taken depends on the presence of the
X.B \-r
Xand
X.B \-w
Xoptions. The four combinations of
X.B \-r
Xand
X.B \-w
Xare referred to as the
Xfour modes of operation:
X.BR list ,
X.BR read ,
X.BR write ,
Xand
X.B copy
Xmodes, corresponding respectively to the four forms shown in the SYNOPSIS
Xsection.
X.TP
X.B list
XIn
X.B list
Xmode (when neither
X.B \-r
Xnor
X.B \-w
Xare specified),
X.B pax
Xshall write the names of the members of the archive file read
Xfrom the standard input, with pathnames matching the
Xspecified
X.IR patterns ,
Xto standard output. If a named file is of
Xtype directory, the file hierarchy rooted at that file shall
Xbe listed as well.
X.TP
X.B read
XIn
X.B read
Xmode (when
X.B \-r
Xis specified, but
X.B \-w
Xis not),
X.B pax
Xshall extract the members of the archive file read from the
Xstandard input, with pathnames matching the specified
X.IR patterns .
XIf an extracted file is of type directory, the file
Xhierarchy rooted at that file shall be extracted as well. The
Xextracted files shall be created performing pathname
Xresolution with the directory in which
X.B pax
Xwas invoked as the
Xcurrent working directory.
X.sp
XIf an attempt is made to extract a directory when the
Xdirectory already exists, this shall not be considered an
Xerror. If an attempt is made to extract a FIFO when the FIFO
Xalready exists, this shall not be considered an error.
X.sp
XThe ownership, access, and modification times, and file mode
Xof the restored files are discussed under the
X.B \-p
Xoption.
X.TP
X.B write
XIn
X.B write
Xmode (when
X.B \-w
Xis specified, but
X.B \-r
Xis not), 
X.B pax
Xshall write the contents of the file operands to the standard
Xoutput in an archive format. If no file operands are
Xspecified, a list of files to copy, one per line, shall be
Xread from the standard input. A file of type directory shall
Xinclude all of the files in the file hierarchy rooted at the
Xfile.
X.TP
X.B copy
XIn
X.B copy
Xmode (when both
X.B \-r
Xand
X.B \-w
Xare specified), 
X.B pax
Xshall copy the file operands to the destination directory.
X.sp
XIf no file operands are specified, a list of files to copy,
Xone per line, shall be read from the standard input. A file
Xof type directory shall include all of the files in the file
Xhierarchy rooted at the file.
X.sp
XThe effect of the
X.B copy
Xshall be as if the copied files were
Xwritten to an archive file and then subsequently extracted,
Xexcept that there may be hard links between the original and
Xthe copied files. If the destination directory is a
Xsubdirectory of one of the files to be copied, the results
Xare unspecified. If the destination directory is a file of a
Xtype not defined by the System Interfaces volume of
XIEEE Std 1003.1-2001, the results are implementation-defined;
Xotherwise, it shall be an error for the file named by the
Xdirectory operand not to exist, not be writable by the user,
Xor not be a file of type directory.
X.PP
XIn
X.B read
Xor 
X.B copy
Xmodes, if intermediate directories are necessary
Xto extract an archive member, 
X.B pax 
Xshall perform actions equivalent
Xto the 
X.BR mkdir ()
Xfunction defined in the System Interfaces volume of
XIEEE Std 1003.1-2001, called with the following arguments:
X.TP
X.B \(bu
XThe intermediate directory used as the 
X.B path
Xargument.
X.TP
X.B \(bu
XThe value of the bitwise-inclusive 
X.B OR 
Xof
X.BR S_IRWXU ,
X.BR S_IRWXG ,
Xand
X.B S_IRWXO
Xas the
X.I mode
Xargument.
X.PP
XIf any specified
X.I pattern
Xor
X.I file
Xoperands are not matched by at
Xleast one file or archive member, 
X.B pax 
Xshall write a diagnostic
Xmessage to standard error for each one that did not match and exit
Xwith a non-zero exit status.
X.PP
XThe archive formats described in the 
X.B EXTENDED DESCRIPTION
Xsection
Xshall be automatically detected on input. The default output
Xarchive format shall be implementation-defined.
X.PP
XThe 
X.B spax
Ximplementation defaults to
X.BR "\-x ustar" .
X.PP
XA single archive can span multiple files. The
X.B pax
Xutility shall
Xdetermine, in an implementation-defined manner, what file to read
Xor write as the next file.
X.PP
XIf the selected archive format supports the specification of
Xlinked files, it shall be an error if these files cannot be linked
Xwhen the archive is extracted, except that if the files to be
Xlinked are symbolic links and the system is not capable of making
Xhard links to symbolic links, then separate copies of the symbolic
Xlink shall be created instead. For archive formats that do not
Xstore file contents with each name that causes a hard link, if the
Xfile that contains the data is not extracted during this
X.B pax
Xsession, either the data shall be restored from the original file,
Xor a diagnostic message shall be displayed with the name of a file
Xthat can be used to extract the data. In traversing directories,
X.B pax
Xshall detect infinite loops; that is, entering a previously
Xvisited directory that is an ancestor of the last file visited.
XWhen it detects an infinite loop,
X.B pax
Xshall write a diagnostic
Xmessage to standard error and shall terminate.
X
X.SH OPTIONS
X.PP
XThe
X.B pax
Xutility shall conform to the Base Definitions volume of
XIEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
Xexcept that the order of presentation of the
X.BR \-o ,
X.BR \-p ,
Xand
X.B \-s
Xoptions is significant.
X.PP
XThe following options shall be supported:
X.TP
X.B \-r
XRead an archive file from standard input.
X.TP
X.B \-w
XWrite files to the standard output in the specified archive
Xformat.
X.TP
X.B \-a
XAppend files to the end of the archive. It is
Ximplementation-defined which devices on the system support
Xappending. Additional file formats unspecified by this volume
Xof IEEE Std 1003.1-2001 may impose restrictions on appending.
X.TP
X.BI \-b " blocksize
XBlock the output at a positive decimal integer number of
Xbytes per write to the archive file. Devices and archive
Xformats may impose restrictions on blocking. Blocking shall
Xbe automatically determined on input. Conforming applications
Xshall not specify a blocksize value larger than 32256.
XDefault blocking when creating archives depends on the
Xarchive format. (See the 
X.B \-x 
Xoption below.)
X.TP
X.B \-c
XMatch all file or archive members except those specified by
Xthe pattern or file operands.
X.TP
X.B \-d
XCause files of type directory being copied or archived or
Xarchive members of type directory being extracted or listed
Xto match only the file or archive member itself and not the
Xfile hierarchy rooted at the file.
X.\".....XXX Ab hier noch nicht fertig
X.TP
X.BI \-f " archive
XSpecify the pathname of the input or output archive,
Xoverriding the default standard input (in 
X.B list
Xor
X.B read
Xmodes)
Xor standard output 
X.RB ( write 
Xmode).
X.TP
X.B \-H
XIf a symbolic link referencing a file of type directory is
Xspecified on the command line, 
X.B pax 
Xshall archive the file
Xhierarchy rooted in the file referenced by the link, using
Xthe name of the link as the root of the file hierarchy.
XOtherwise, if a symbolic link referencing a file of any other
Xfile type which 
X.B pax 
Xcan normally archive is specified on the
Xcommand line, then 
X.B pax 
Xshall archive the file referenced by
Xthe link, using the name of the link. The default behavior
Xshall be to archive the symbolic link itself.
X.TP
X.B \-i
XInteractively rename files or archive members. For each
Xarchive member matching a pattern operand or file matching a
Xfile operand, a prompt shall be written to the file /dev/tty.
XThe prompt shall contain the name of the file or archive
Xmember, but the format is otherwise unspecified. A line shall
Xthen be read from /dev/tty. If this line is blank, the file
Xor archive member shall be skipped. If this line consists of
Xa single period, the file or archive member shall be
Xprocessed with no modification to its name. Otherwise, its
Xname shall be replaced with the contents of the line. The 
X.B pax
Xutility shall immediately exit with a non-zero exit status if
Xend-of-file is encountered when reading a response or if
X/dev/tty cannot be opened for reading and writing.
X.sp
XThe results of extracting a hard link to a file that has been
Xrenamed during extraction are unspecified.
X.TP
X.B \-k
XPrevent the overwriting of existing files.
X.TP
X.B \-l
X(The letter ell.) In copy mode, hard links shall be made
Xbetween the source and destination file hierarchies whenever
Xpossible. If specified in conjunction with 
X.B \-H 
Xor 
X.BR \-L ,
Xwhen a
Xsymbolic link is encountered, the hard link created in the
Xdestination file hierarchy shall be to the file referenced by
Xthe symbolic link. If specified when neither 
X.B \-H 
Xnor 
X.B \-L 
Xis
Xspecified, when a symbolic link is encountered, the
Ximplementation shall create a hard link to the symbolic link
Xin the source file hierarchy or copy the symbolic link to the
Xdestination.
X.TP
X.B \-L
XIf a symbolic link referencing a file of type directory is
Xspecified on the command line or encountered during the
Xtraversal of a file hierarchy, 
X.B pax 
Xshall archive the file
Xhierarchy rooted in the file referenced by the link, using
Xthe name of the link as the root of the file hierarchy.
XOtherwise, if a symbolic link referencing a file of any other
Xfile type which 
X.B pax 
Xcan normally archive is specified on the
Xcommand line or encountered during the traversal of a file
Xhierarchy, 
X.B pax 
Xshall archive the file referenced by the link,
Xusing the name of the link. The default behavior shall be to
Xarchive the symbolic link itself.
X.TP
X.B \-n
XSelect the first archive member that matches each pattern
Xoperand. No more than one archive member shall be matched for
Xeach pattern (although members of type directory shall still
Xmatch the file hierarchy rooted at that file).
X.TP
X.BI \-o " options
XProvide information to the implementation to modify the
Xalgorithm for extracting or writing files. The value of
Xoptions shall consist of one or more comma-separated keywords
Xof the form:
X.RS
X.PP
X.BI          keyword[[:]= value ][,keyword[[:]= value ], .\|.\|.\|]
X.PP
XSome keywords apply only to certain file formats, as
Xindicated with each description. Use of keywords that are
Xinapplicable to the file format being processed produces
Xundefined results.
X.PP
XKeywords in the options argument shall be a string that would
Xbe a valid portable filename as described in the Base
XDefinitions volume of IEEE Std 1003.1-2001, Section 3.276,
XPortable Filename Character Set.
X.TP
X.B Note:
XKeywords are not expected to be filenames, merely to
Xfollow the same character composition rules as portable
Xfilenames.
X.PP
XKeywords can be preceded with white space. The value field
Xshall consist of zero or more characters; within value, the
Xapplication shall precede any literal comma with a backslash,
Xwhich shall be ignored, but preserves the comma as part of
Xvalue. A comma as the final character, or a comma followed
Xsolely by white space as the final characters, in options
Xshall be ignored. Multiple 
X.B \-o 
Xoptions can be specified; if
Xkeywords given to these multiple 
X.B \-o 
Xoptions conflict, the
Xkeywords and values appearing later in command line sequence
Xshall take precedence and the earlier shall be silently
Xignored. The following keyword values of options shall be
Xsupported for the file formats as indicated:
X.TP
X.BI delete= pattern
X(Applicable only to the 
X.B "\-x pax 
Xformat.) When used in
Xwrite or copy mode, 
X.B pax 
Xshall omit from extended header
Xrecords that it produces any keywords matching the
Xstring pattern. When used in read or list mode, 
X.B pax
Xshall ignore any keywords matching the string pattern in
Xthe extended header records. In both cases, matching
Xshall be performed using the pattern matching notation
Xdescribed in Patterns Matching a Single Character and
XPatterns Matching Multiple Characters. For example:
X.RS
X.PP
X\fB\-o\ delete=\fIsecurity.*\fR
X.PP
Xwould suppress security-related information. See 
X.B pax Extended Header 
Xfor extended header record keyword
Xusage.
X.PP
XWhen multiple 
X.BI "\-o delete=" pattern 
Xoptions are specified,
Xthe patterns shall be additive; all keywords matching
Xthe specified string patterns shall be omitted from
Xextended header records that 
X.B pax 
Xproduces.
X.RE
X.TP
X.BI exthdr.name= string
X(Applicable only to the 
X.B "\-x pax 
Xformat.) This keyword
Xallows user control over the name that is written into
Xthe ustar header blocks for the extended header produced
Xunder the circumstances described in 
X.BR "pax Header Block".
XThe name shall be the contents of string, after the
Xfollowing character substitutions have been made:
X.RS
X.PP
X.TS
Xcenter box;
Xlb|lb
Xl|l.
Xstring Includes:	Replaced By:
X_
X%d	The directory name of the file, equivalent
X	to the result of the dirname utility on the
X	translated pathname.
X_
X%f	The filename of the file, equivalent to the
X	result of the basename utility on the
X	translated pathname.
X_
X%p	The process ID of the pax process.
X_
X%%	A '%' character.
X.TE
X.PP
XAny other '%' characters in string produce undefined
Xresults.
X.PP
XIf no \-o exthdr.name= string is specified, 
X.B pax 
Xshall use
Xthe following default value:
X.PP
X        %d/PaxHeaders.%p/%f
X.PP
X.RE
X.TP
X.BI globexthdr.name= string
X(Applicable only to the 
X.B "\-x pax 
Xformat.) When used in
Xwrite or copy mode with the appropriate options, 
X.B pax
Xshall create global extended header records with ustar
Xheader blocks that will be treated as regular files by
Xprevious versions of 
X.BR pax .
XThis keyword allows user
Xcontrol over the name that is written into the ustar
Xheader blocks for global extended header records. The
Xname shall be the contents of string, after the
Xfollowing character substitutions have been made:
X.RS
X.PP
X.TS
Xcenter box;
Xlb|lb
Xl|l.
Xstring Includes:	Replaced By:
X_
X%n	An integer that represents the sequence
X	number of the global extended header record
X	in the archive, starting at 1.
X_
X%p	The process ID of the pax process.
X_
X%%	A '%' character.
X.TE
X.PP
XAny other '%' characters in string produce undefined
Xresults.
X.PP
XIf no 
X.BI "\-o globexthdr.name=" string
Xis specified, 
X.B pax 
Xshall
Xuse the following default value:
X.PP
X$TMPDIR/GlobalHead.%p.%n
X.PP
Xwhere 
X.B $TMPDIR 
Xrepresents the value of the 
X.B TMPDIR
Xenvironment variable. If 
X.B TMPDIR 
Xis not set, 
X.B pax 
Xshall
Xuse /tmp.
X.RE
X.TP
X.BI invalid= action
X(Applicable only to the 
X.B "\-x pax 
Xformat.) This keyword
Xallows user control over the action 
X.B pax 
Xtakes upon
Xencountering values in an extended header record that,
Xin read or copy mode, are invalid in the destination
Xhierarchy or, in list mode, cannot be written in the
Xcodeset and current locale of the implementation. The
Xfollowing are invalid values that shall be recognized by
X.BR pax :
X.RS
X.TP
X.B +
XIn read or copy mode, a filename or link name that
Xcontains character encodings invalid in the
Xdestination hierarchy. (For example, the name may
Xcontain embedded NULs.)
X.TP
X.B +
XIn read or copy mode, a filename or link name that
Xis longer than the maximum allowed in the
Xdestination hierarchy (for either a pathname
Xcomponent or the entire pathname).
X.TP
X.B +
XIn list mode, any character string value (filename,
Xlink name, user name, and so on) that cannot be
Xwritten in the codeset and current locale of the
Ximplementation.
X.PP
XThe following mutually-exclusive values of the action
Xargument are supported:
X.TP
X.B bypass
XIn read or copy mode, 
X.B pax 
Xshall bypass the file,
Xcausing no change to the destination hierarchy. In
Xlist mode, 
X.B pax 
Xshall write all requested valid
Xvalues for the file, but its method for writing
Xinvalid values is unspecified.
X.TP
X.B rename
XIn read or copy mode, 
X.B pax 
Xshall act as if the 
X.B \-i
Xoption were in effect for each file with invalid
Xfilename or link name values, allowing the user to
Xprovide a replacement name interactively. In list
Xmode, 
X.B pax 
Xshall behave identically to the bypass
Xaction.
X.TP
X.B UTF-8
XWhen used in read, copy, or list mode and a
Xfilename, link name, owner name, or any other field
Xin an extended header record cannot be translated
Xfrom the 
X.B pax 
XUTF-8 codeset format to the codeset
Xand current locale of the implementation, 
X.B pax 
Xshall
Xuse the actual UTF-8 encoding for the name.
X.TP
X.B write
XIn read or copy mode, 
X.B pax 
Xshall write the file,
Xtranslating the name, regardless of whether this
Xmay overwrite an existing file with a valid name.
XIn list mode, 
X.B pax 
Xshall behave identically to the
Xbypass action.
X.PP
XIf no 
X.BI "\-o invalid=" option
Xis specified, 
X.B pax 
Xshall act as
Xif 
X.B "\-o invalid= bypass 
Xwere specified. Any overwriting of
Xexisting files that may be allowed by the 
X.B "\-o invalid=
Xactions shall be subject to permission(\fB\-p\fR) and
Xmodification time (\fB\-u\fR) restrictions, and shall be
Xsuppressed if the 
X.B \-k 
Xoption is also specified.
X.RE
X.TP
X.B linkdata
X(Applicable only to the 
X.B "\-x pax 
Xformat.) In write mode,
X.B pax 
Xshall write the contents of a file to the archive
Xeven when that file is merely a hard link to a file
Xwhose contents have already been written to the archive.
X.TP
X.BI listopt= format
XThis keyword specifies the output format of the table of
Xcontents produced when the 
X.B \-v 
Xoption is specified in
Xlist mode. See List Mode Format Specifications. To avoid
Xambiguity, the listopt= format shall be the only or
Xfinal keyword= value pair in a 
X.BI "\-o " option-argument\fR;
Xall characters in the remainder of the option-argument shall
Xbe considered part of the format string. When multiple
X\-o listopt= format options are specified, the format
Xstrings shall be considered a single, concatenated
Xstring, evaluated in command line order.
X.TP
X.B times
X(Applicable only to the 
X.B "\-x pax 
Xformat.) When used in
Xwrite or copy mode, 
X.B pax 
Xshall include atime and mtime
Xextended header records for each file. See 
X.BR "pax Extended Header File Times" .
X.PP
XIn addition to these keywords, if the 
X.B "\-x pax 
Xformat is
Xspecified, any of the keywords and values defined in 
X.BR "pax Extended Header" ,
Xincluding implementation extensions, can be
Xused in 
X.BI \-o " option-arguments\fR,
Xin either of two modes:
X.TP
X.BI keyword= value
XWhen used in write or copy mode, these keyword/value
Xpairs shall be included at the beginning of the archive
Xas typeflag g global extended header records. When used
Xin read or list mode, these keyword/value pairs shall
Xact as if they had been at the beginning of the archive
Xas typeflag g global extended header records.
X.TP
X.BI keyword:= value
XWhen used in write or copy mode, these keyword/value
Xpairs shall be included as records at the beginning of a
Xtypeflag x extended header for each file. (This shall be
Xequivalent to the equal-sign form except that it creates
Xno typeflag g global extended header records.) When used
Xin read or list mode, these keyword/value pairs shall
Xact as if they were included as records at the end of
Xeach extended header; thus, they shall override any
Xglobal or file-specific extended header record keywords
Xof the same names. For example, in the command:
X.RS
X.PP
X\fBpax \-r \-o "gname:=mygroup," <archive\fR
X.PP
Xthe group name will be forced to a new value for all
Xfiles read from the archive.
X.RE
X.PP
XThe precedence of 
X.B \-o
Xkeywords over various fields in the
Xarchive is described in 
X.BR "pax Extended Header Keyword Precedence" .
X.RE
X.TP
X.BI \-p " string
XSpecify one or more file characteristic options (privileges).
XThe string option-argument shall be a string specifying file
Xcharacteristics to be retained or discarded on extraction.
XThe string shall consist of the specification characters a ,
Xe, m, o, and p. Other implementation-defined characters can
Xbe included. Multiple characteristics can be concatenated
Xwithin the same string and multiple 
X.B \-p 
Xoptions can be
Xspecified. The meaning of the specification characters are as
Xfollows:
X.RS
X.TP
X.B a
XDo not preserve file access times.
X.TP
X.B e
XPreserve the user ID, group ID, file mode bits (see the
XBase Definitions volume of IEEE Std 1003.1-2001, Section
X3.168, File Mode Bits), access time, modification time,
Xand any other implementation-defined file
Xcharacteristics.
X.TP
X.B m
X
XDo not preserve file modification times.
X.TP
X.B o
XPreserve the user ID and group ID.
X.TP
X.B p
XPreserve the file mode bits. Other
Ximplementation-defined file mode attributes may be
Xpreserved.
X.PP
XIn the preceding list, "preserve" indicates that an attribute
Xstored in the archive shall be given to the extracted file,
Xsubject to the permissions of the invoking process. The
Xaccess and modification times of the file shall be preserved
Xunless otherwise specified with the 
X.B \-p 
Xoption or not stored
Xin the archive. All attributes that are not preserved shall
Xbe determined as part of the normal file creation action (see
XFile Read, Write, and Creation).
X.PP
XIf neither the e nor the o specification character is
Xspecified, or the user ID and group ID are not preserved for
Xany reason, 
X.B pax 
Xshall not set the S_ISUID and S_ISGID bits of
Xthe file mode.
X.PP
XIf the preservation of any of these items fails for any
Xreason,
X.B pax 
Xshall write a diagnostic message to standard
Xerror. Failure to preserve these items shall affect the final
Xexit status, but shall not cause the extracted file to be
Xdeleted.
X.PP
XIf file characteristic letters in any of the string
Xoption-arguments are duplicated or conflict with each other,
Xthe ones given last shall take precedence. For example, if 
X.B "\-p eme
Xis specified, file modification times are preserved.
X.RE
X.TP
X.BI \-s " replstr
XModify file or archive member names named by pattern or file
Xoperands according to the substitution expression replstr,
Xusing the syntax of the ed utility. The concepts of "address"
Xand "line" are meaningless in the context of the 
X.B pax 
Xutility,
Xand shall not be supplied. The format shall be:
X.RS
X.PP
X.B \-s /old/new/[gp]
X.PP
Xwhere as in ed, old is a basic regular expression and new can
Xcontain an ampersand, '\en' (where n is a digit)
Xbackreferences, or subexpression matching. The old string
Xshall also be permitted to contain <newline>s.
X.PP
XAny non-null character can be used as a delimiter ( '/' shown
Xhere). Multiple 
X.B \-s 
Xexpressions can be specified; the
Xexpressions shall be applied in the order specified,
Xterminating with the first successful substitution. The
Xoptional trailing 'g' is as defined in the ed utility. The
Xoptional trailing 'p' shall cause successful substitutions to
Xbe written to standard error. File or archive member names
Xthat substitute to the empty string shall be ignored when
Xreading and writing archives.
X.RE
X.TP
X.B \-t
XWhen reading files from the file system, and if the user has
Xthe permissions required by utime() to do so, set the access
Xtime of each file read to the access time that it had before
Xbeing read by 
X.BR pax .
X.TP
X.B \-u
XIgnore files that are older (having a less recent file
Xmodification time) than a pre-existing file or archive member
Xwith the same name. In read mode, an archive member with the
Xsame name as a file in the file system shall be extracted if
Xthe archive member is newer than the file. In write mode, an
Xarchive file member with the same name as a file in the file
Xsystem shall be superseded if the file is newer than the
Xarchive member. If 
X.B \-a 
Xis also specified, this is accomplished
Xby appending to the archive; otherwise, it is unspecified
Xwhether this is accomplished by actual replacement in the
Xarchive or by appending to the archive. In copy mode, the
Xfile in the destination hierarchy shall be replaced by the
Xfile in the source hierarchy or by a link to the file in the
Xsource hierarchy if the file in the source hierarchy is
Xnewer.
X.TP
X.B \-v
XIn list mode, produce a verbose table of contents (see the
XSTDOUT section). Otherwise, write archive member pathnames to
Xstandard error (see the STDERR section).
X.TP
X.BI \-x " format
XSpecify the output archive format. The 
X.B pax 
Xutility shall
Xsupport the following formats:
X.RS
X.TP
X.B cpio
XThe cpio interchange format; see the EXTENDED
XDESCRIPTION section. The default blocksize for this
Xformat for character special archive files shall be
X5120. Implementations shall support all blocksize values
Xless than or equal to 32256 that are multiples of 512.
X.TP
X.B pax
XThe 
X.B pax
Xinterchange format; see the 
X.B EXTENDED DESCRIPTION
Xsection. The default blocksize for this format for
Xcharacter special archive files shall be 5120.
XImplementations shall support all blocksize values less
Xthan or equal to 32256 that are multiples of 512.
X.TP
X.B ustar
XThe tar interchange format; see the EXTENDED DESCRIPTION
Xsection. The default blocksize for this format for
Xcharacter special archive files shall be 10240.
XImplementations shall support all blocksize values less
Xthan or equal to 32256 that are multiples of 512.
X.PP
XImplementation-defined formats shall specify a default block
Xsize as well as any other block sizes supported for character
Xspecial archive files.
X.PP
XAny attempt to append to an archive file in a format
Xdifferent from the existing archive format shall cause 
X.B pax 
Xto
Xexit immediately with a non-zero exit status.
X.PP
XIn copy mode, if no 
X.B \-x 
Xformat is specified, 
X.B pax 
Xshall behave
Xas if 
X.B "\-x pax
Xwere specified.
X.RE
X.TP
X.B \-X
XWhen traversing the file hierarchy specified by a pathname,
X.B pax 
Xshall not descend into directories that have a different
Xdevice ID ( st_dev; see the System Interfaces volume of
XIEEE Std 1003.1-2001, stat()).
X.PP
XSpecifying more than one of the mutually-exclusive options 
X.B \-H 
Xand
X.B \-L 
Xshall not be considered an error and the last option specified
Xshall determine the behavior of the utility.
X.PP
XThe options that operate on the names of files or archive members
X.RB ( \-c ,
X.BR \-i ,
X.BR \-n ,
X.BR \-s ,
X.BR \-u ,
Xand 
X.BR \-v )
Xshall interact as follows. In read
Xmode, the archive members shall be selected based on the
Xuser-specified pattern operands as modified by the 
X.BR \-c , 
X.BR \-n ,
Xand 
X.B \-u
Xoptions. Then, any 
X.B \-s 
Xand 
X.B \-i 
Xoptions shall modify, in that order,
Xthe names of the selected files. The 
X.B \-v
Xoption shall write names
Xresulting from these modifications.
X.PP
XIn write mode, the files shall be selected based on the
Xuser-specified pathnames as modified by the 
X.B \-n 
Xand 
X.B \-u options.
XThen, any 
X.B \-s 
Xand 
X.B \-i 
Xoptions shall modify, in that order, the names
Xof these selected files. The 
X.B \-v 
Xoption shall write names resulting
Xfrom these modifications.
X.PP
XIf both the 
X.B \-u 
Xand 
X.B \-n 
Xoptions are specified, 
X.B pax 
Xshall not
Xconsider a file selected unless it is newer than the file to which
Xit is compared.
X
X.SS "List Mode Format Specifications
X
X.PP
XThe manual page for
X.B spax
Xis not yet ready.
XThe following text is a quotation from the POSIX.1-2001 standard.
X.PP
XIn
X.B list
Xmode with the
X.BI "\-o listopt=" format
Xoption, the
X.I format
Xargument shall be applied for each selected file. The 
X.B pax 
Xutility
Xshall append a <newline> to the
X.B listopt
Xoutput for each selected
Xfile. The
X.I format
Xargument shall be used as the
X.I format
Xstring
Xdescribed in the Base Definitions volume of IEEE Std 1003.1-2001,
XChapter 5, File Format Notation, with the exceptions 1. through 5.
Xdefined in the EXTENDED DESCRIPTION section of
X.BR printf (3),
Xplus the following exceptions:
X.TP
X.B 6.
XThe sequence
X.RI ( keyword )
Xcan occur before a format conversion
Xspecifier. The conversion argument is defined by the value of
X.IR keyword .
XThe implementation shall support the following
X.IR keywords :
X.RS
X.TP
X.B \(bu
XAny of the Field Name entries in ustar Header Block and
XOctet-Oriented cpio Archive Entry. The implementation
Xmay support the
X.I cpio
Xkeywords without the leading 
X.B c_
Xin addition to the form required by Values for 
X.B cpio
X.B c_mode
XField.
X.TP
X.B \(bu
XAny keyword defined for the extended header in 
X.BR "pax Extended Header" .
X.TP
X.B \(bu
XAny keyword provided as an implementation-defined
Xextension within the extended header defined in 
X.BR "pax Extended Header" .
X.PP
XFor example, the sequence "%(charset)s" is the string value
Xof the name of the character set in the extended header.
X.PP
XThe result of the keyword conversion argument shall be the
Xvalue from the applicable header field or extended header,
Xwithout any trailing NULs.
X.PP
XAll keyword values used as conversion arguments shall be
Xtranslated from the UTF-8 encoding to the character set
Xappropriate for the local file system, user database, and so
Xon, as applicable.
X.RE
X.TP
X.B 7.
XAn additional conversion specifier character,
X.BR T ,
Xshall be
Xused to specify time formats. The
X.B T
Xconversion specifier
Xcharacter can be preceded by the sequence
X(\fBkeyword=\fIsubformat\fR), 
Xwhere 
X.I subformat
Xis a date format as defined by
Xdate operands. The default 
X.I keyword
Xshall be
X.B mtime 
Xand the default subformat shall be:
X.PP
X          %b %e %H:%M %Y
X.PP
X.TP
X.B 8.
XAn additional conversion specifier character,
X.BR M ,
Xshall be
Xused to specify the file mode string as defined in
X.BR ls (1)
XStandard Output. If
X.RI ( keyword )
Xis omitted, the
X.B mode 
X.I keyword
Xshall be used. For example, 
X.B %.1M
Xwrites the single character
Xcorresponding to the 
X.I "<entry\ type>"
Xfield of the 
X.B ls \-l
Xcommand.
X.TP
X.B 9.
XAn additional conversion specifier character,
X.BR D ,
Xshall be used to specify the device for block or special files, if
Xapplicable, in an implementation-defined format. If not
Xapplicable, and
X.RI ( keyword )
Xis specified, then this conversion
Xshall be equivalent to
X.BR "%(keyword)u" .
XIf not applicable, and
X.RI ( keyword )
Xis omitted, then this conversion shall be equivalent
Xto <space>.
X.TP
X.B 10.
XAn additional conversion specifier character,
X.BR F ,
Xshall be used to specify a pathname. The
X.B F
Xconversion character can be
Xpreceded by a sequence of comma-separated keywords:
X.PP
X          (keyword[,keyword] .\|.\|. )
X.RS
XThe values for all the keywords that are non-null shall be
Xconcatenated together, each separated by a '/'. The default
Xshall be
X.RB ( path )
Xif the keyword path is defined; otherwise,
Xthe default shall be
X.RB ( "prefix, name" ).
X.RE
X.TP
X.B 11. 
XAn additional conversion specifier character, 
X.BR L ,
Xshall be used to specify a symbolic line expansion. If the current
Xfile is a symbolic link, then 
X.B %L
Xshall expand to:
X.PP
X          "%s\ \->\ %s", <value of keyword>, <contents of link>
X.PP
XOtherwise, the 
X.B %L
Xconversion specification shall be the
Xequivalent of 
X.BR %F .
X
X.SH OPERANDS
X.PP
XThe following operands shall be supported:
X.TP
X.I directory
XThe destination directory pathname for copy mode.
X.TP
X.I file
XA pathname of a file to be copied or archived.
X.TP
X.I pattern
XA pattern matching one or more pathnames of archive members.
XA pattern must be given in the name-generating notation of
Xthe pattern matching notation in Pattern Matching Notation ,
Xincluding the filename expansion rules in Patterns Used for
XFilename Expansion. The default, if no pattern is specified,
Xis to select all members in the archive.
X
X.SH STDIN
X.PP
XIn
X.B write
Xmode, the standard input shall be used only if no 
X.I file
Xoperands are specified. It shall be a text file containing a list
Xof pathnames, one per line, without leading or trailing <blank>s.
X.PP
XIn
X.B list
Xand 
X.B read
Xmodes, if 
X.B \-f
Xis not specified, the standard input
Xshall be an archive file.
X.PP
XOtherwise, the standard input shall not be used.
X
X.SH "INPUT FILES
X.PP
XThe input file named by the 
X.I archive 
Xoption-argument, or standard
Xinput when the archive is read from there, shall be a file
Xformatted according to one of the specifications in the EXTENDED
XDESCRIPTION section or some other implementation-defined format.
X.PP
XThe file 
X.B /dev/tty
Xshall be used to write prompts and read
Xresponses.
X
X.SH "ENVIRONMENT VARIABLES
X.PP
XThe following environment variables shall affect the execution of
X.BR pax :
X.TP
X.B LANG
XProvide a default value for the internationalization
Xvariables that are unset or null. (See the Base Definitions
Xvolume of IEEE Std 1003.1-2001, Section 8.2,
XInternationalization Variables for the precedence of
Xinternationalization variables used to determine the values
Xof locale categories.)
X.TP
X.B LC_ALL
XIf set to a non-empty string value, override the values of
Xall the other internationalization variables.
X.TP
X.B LC_COLLATE
XDetermine the locale for the behavior of ranges, equivalence
Xclasses, and multi-character collating elements used in the
Xpattern matching expressions for the pattern operand, the
Xbasic regular expression for the 
X.B \-s
Xoption, and the extended
Xregular expression defined for the 
X.B yesexpr
Xlocale keyword in
Xthe LC_MESSAGES category.
X.TP
X.B LC_CTYPE
XDetermine the locale for the interpretation of sequences of
Xbytes of text data as characters (for example, single-byte as
Xopposed to multi-byte characters in arguments and input
Xfiles), the behavior of character classes used in the
Xextended regular expression defined for the 
X.B yesexpr
Xlocale
Xkeyword in the LC_MESSAGES category, and pattern matching.
X.TP
X.B LC_MESSAGES
XDetermine the locale for the processing of affirmative
Xresponses that should be used to affect the format and
Xcontents of diagnostic messages written to standard error.
X.TP
X.B LC_TIME
XDetermine the format and contents of date and time strings
Xwhen the 
X.B \-v 
Xoption is specified.
X.TP
X.B NLSPATH
X[XSI] [Option Start] Determine the location of message
Xcatalogs for the processing of LC_MESSAGES . [Option End]
X.TP
X.B TMPDIR
XDetermine the pathname that provides part of the default
Xglobal extended header record file, as described for the 
X.B \-o globexthdr=
Xkeyword in the OPTIONS section.
X.TP
X.B TZ
XDetermine the timezone used to calculate date and time
Xstrings when the 
X.B \-v 
Xoption is specified. If TZ is unset or
Xnull, an unspecified default timezone shall be used.
X
X.SH "ASYNCHRONOUS EVENTS
X.PP
XDefault.
X
X.SH STDOUT
X.PP
XIn
X.B write 
Xmode, if 
X.B \-f 
Xis not specified, the standard output shall
Xbe the archive formatted according to one of the specifications in
Xthe EXTENDED DESCRIPTION section, or some other
Ximplementation-defined format (see 
X.BI \-x " format" ).
X.PP
XIn 
X.B list 
Xmode, when the 
X.B \-o listopt= 
Xformat has been specified, the
Xselected archive members shall be written to standard output using
Xthe format described under List Mode Format Specifications. In
X.B list 
Xmode without the 
X.B \-o listopt= 
Xformat option, the table of
Xcontents of the selected archive members shall be written to
Xstandard output using the following format:
X.PP
X     "%s\en", <pathname>
X.PP
XIf the 
X.B \-v 
Xoption is specified in 
X.B list 
Xmode, the table of contents
Xof the selected archive members shall be written to standard
Xoutput using the following formats.
X.PP
XFor pathnames representing hard links to previous members of the
Xarchive:
X.PP
X.\"     "%s[Image]==[Image]%s\en", <ls \-l listing>, <linkname>
X     "%s\ ==\ %s\en", <ls \-l listing>, <linkname>
X.PP
XFor all other pathnames:
X.PP
X     "%s\en", <ls \-l listing>
X.PP
Xwhere
X.I <ls \-l listing>
Xshall be the format specified by the
X.BR ls (1)
Xutility with the 
X.B \-l 
Xoption. When writing pathnames in this format,
Xit is unspecified what is written for fields for which the
Xunderlying archive format does not have the correct information,
Xalthough the correct number of <blank>-separated fields shall be
Xwritten.
X.PP
XIn 
X.B list 
Xmode, standard output shall not be buffered more than a
Xline at a time.
X
X.SH STDERR
X.PP
XIf 
X.B \-v 
Xis specified in 
X.BR read , 
X.BR write , 
Xor 
X.B copy 
Xmodes, 
X.B pax 
Xshall write
Xthe pathnames it processes to the standard error output using the
Xfollowing format:
X.PP
X     "%s\en", <pathname>
X.PP
XThese pathnames shall be written as soon as processing is begun on
Xthe file or archive member, and shall be flushed to standard
Xerror. The trailing <newline>, which shall not be buffered, is
Xwritten when the file has been read or written.
X.PP
XIf the 
X.B \-s 
Xoption is specified, and the replacement string has a
Xtrailing 
X.BR 'p' , 
Xsubstitutions shall be written to standard error in
Xthe following format:
X.PP
X.\"     "%s[Image]>>[Image]%s\en", <original pathname>, <new pathname>
X     "%s\ >>\ %s\en", <original pathname>, <new pathname>
X.PP
XIn all operating modes of 
X.BR pax ,
Xoptional messages of unspecified
Xformat concerning the input archive format and volume number, the
Xnumber of files, blocks, volumes, and media parts as well as other
Xdiagnostic messages may be written to standard error.
X.PP
XIn all formats, for both standard output and standard error, it is
Xunspecified how non-printable characters in pathnames or link
Xnames are written.
X.PP
XWhen 
X.B pax
Xis in 
X.B read 
Xmode or 
X.B list 
Xmode, using the 
X.B "\-x pax 
Xarchive
Xformat, and a filename, link name, owner name, or any other field
Xin an extended header record cannot be translated from the 
X.B pax
XUTF-8 codeset format to the codeset and current locale of the
Ximplementation, 
X.B pax 
Xshall write a diagnostic message to standard
Xerror, shall process the file as described for the 
X.B \-o invalid=
Xoption, and then shall process the next file in the archive.
X
X.SH "OUTPUT FILES
X.PP
XIn 
X.B read 
Xmode, the extracted output files shall be of the archived
Xfile type. In 
X.B copy 
Xmode, the copied output files shall be the type
Xof the file being copied. In either mode, existing files in the
Xdestination hierarchy shall be overwritten only when all
Xpermission 
X.RB ( \-p ), 
Xmodification time 
X.RB ( \-u ),
Xand invalid-value 
X.RB ( "\-o invalid=" )
Xtests allow it.
X.PP
XIn 
X.B write 
Xmode, the output file named by the 
X.B \-f 
Xoption-argument
Xshall be a file formatted according to one of the specifications
Xin the EXTENDED DESCRIPTION section, or some other
Ximplementation-defined format.
X
X.SH "EXTENDED DESCRIPTION
X.PP
X.SS "pax Interchange Format
X.PP
XA
X.B pax 
Xarchive tape or file produced in the 
X.B "\-x pax 
Xformat shall
Xcontain a series of blocks. The physical layout of the archive
Xshall be identical to the 
X.B ustar 
Xformat described in ustar
XInterchange Format. Each file archived shall be represented by the
Xfollowing sequence:
X.RS
X.TP
X.B \(bu
XAn optional header block with extended header records. This
Xheader block is of the form described in 
X.BR "pax Header Block" ,
Xwith a 
X.I typeflag 
Xvalue of 
X.BR x " or " g .
XThe extended header records,
Xdescribed in 
X.BR "pax Extended Header" ,
Xshall be included as the
Xdata for this header block.
X.TP
X.B \(bu
XA header block that describes the file. Any fields in the
Xpreceding optional extended header shall override the
Xassociated fields in this header block for this file.
X.TP
X.B \(bu
XZero or more blocks that contain the contents of the file.
X.RE
X.PP
XAt the end of the archive file there shall be two 512-byte blocks
Xfilled with binary zeros, interpreted as an end-of-archive
Xindicator.
X.PP
XA schematic of an example archive with global extended header
Xrecords and two actual files is shown in 
X.B pax Format Archive
XExample. In the example, the second file in the archive has no
Xextended header preceding it, presumably because it has no need
Xfor extended attributes.
X.PP
X.ne 30
X.CA "Figure: pax Format Archive Example"
X.TS
Xcenter box;
Xl|c
X.
Xustar Header [typeflag = 'g']
X_	Global Extended header
XGlobal Extended Header Data
X_	_	
Xustar Header [typeflag = 'x']
X_	
XExtended Header Data
X_	File 1: Extended Header data is included
Xustar Header [typeflag = '0']
X_	
XData for File 1
X_	_
Xustar Header [typeflag = '0']
X_	File 2: No Extended Header data is included
XData for File 2
X_	_
XBlock of binary Zeroes
X_	End of Archive Indicator
XBlock of binary Zeroes
X.TE
X
X.SS "pax Header Block
X.PP
XThe
X.B pax
Xheader block shall be identical to the
X.B ustar
Xheader block
Xdescribed in
X.BR "ustar Interchange Format" ,
Xexcept that two additional 
X.I typeflag 
Xvalues are defined:
X.TP
X.B x
XRepresents extended header records for the following file in
Xthe archive (which shall have its own 
X.B ustar 
Xheader block).
XThe format of these extended header records shall be as
Xdescribed in 
X.BR "pax Extended Header" .
X.TP
X.B g
XRepresents global extended header records for the following
Xfiles in the archive. The format of these extended header
Xrecords shall be as described in 
X.BR "pax Extended Header" .
XEach
Xvalue shall affect all subsequent files that do not override
Xthat value in their own extended header record and until
Xanother global extended header record is reached that
Xprovides another value for the same field. The 
X.I typeflag 
X.B g
Xglobal headers should not be used with interchange media that
Xcould suffer partial data loss in transporting the archive.
X.PP
XFor both of these types, the size field shall be the size of the
Xextended header records in octets. The other fields in the header
Xblock are not meaningful to this version of the
X.B pax
Xutility.
XHowever, if this archive is read by a
X.B pax 
Xutility conforming to
Xthe ISO POSIX\-2:1993 standard, the header block fields are used to
Xcreate a regular file that contains the extended header records as
Xdata. Therefore, header block field values should be selected to
Xprovide reasonable file access to this regular file.
X.PP
XA further difference from the 
X.B ustar 
Xheader block is that data
Xblocks for files of 
X.I typeflag 
X.B 1
X(the digit one) (hard link) may be
Xincluded, which means that the size field may be greater than
Xzero. Archives created by 
X.B "pax \-o linkdata 
Xshall include these data
Xblocks with the hard links.
X
X.SS "pax Extended Header
X.PP
XA 
X.B pax 
Xextended header contains values that are inappropriate for
Xthe 
X.B ustar
Xheader block because of limitations in that format:
Xfields requiring a character encoding other than that described in
Xthe ISO/IEC 646:1991 standard, fields representing file attributes
Xnot described in the
X.B ustar
Xheader, and fields whose format or
Xlength do not fit the requirements of the
X.B ustar
Xheader. The values
Xin an extended header add attributes to the following file (or
Xfiles; see the description of the
X.I typeflag 
X.B g 
Xheader block) or
Xoverride values in the following header block(s), as indicated in
Xthe following list of keywords.
X.PP
XAn extended header shall consist of one or more records, each
Xconstructed as follows:
X.PP
X     "%d %s=%s\en", <length>, <keyword>, <value>
X.PP
XThe extended header records shall be encoded according to the
XISO/IEC 10646\-1:2000 standard (UTF-8). The 
X.I <length> 
Xfield,
X<blank>, equals sign, and <newline> shown shall be limited to the
Xportable character set, as encoded in UTF-8. The 
X.I <keyword> 
Xand
X.I <value> 
Xfields can be any UTF-8 characters. The 
X.I <length>
Xfield
Xshall be the decimal length of the extended header record in
Xoctets, including the trailing <newline>.
X.PP
XThe
X.I <keyword>
Xfield shall be one of the entries from the following
Xlist or a keyword provided as an implementation extension.
XKeywords consisting entirely of lowercase letters, digits, and
Xperiods are reserved for future standardization. A keyword shall
Xnot include an equals sign. (In the following list, the notations
X"file(s)" or "block(s)" is used to acknowledge that a keyword
Xaffects the following single file after a
X.I typeflag 
X.B x 
Xextended
Xheader, but possibly multiple files after 
X.I typeflag 
X.BR g . 
XAny requirements in the list for 
X.B pax 
Xto include a record when in 
X.B write
Xor
X.B copy 
Xmode shall apply only when such a record has not already
Xbeen provided through the use of the 
X.B \-o 
Xoption. When used in 
X.B copy
Xmode, 
X.B pax 
Xshall behave as if an archive had been created with
Xapplicable extended header records and then extracted.)
X.TP
X.B atime
XThe file access time for the following file(s), equivalent to
Xthe value of the 
X.I st_atime 
Xmember of the 
X.B stat 
Xstructure for a
Xfile, as described by the 
X.BR stat (2)
Xfunction. The access time
Xshall be restored if the process has the appropriate
Xprivilege required to do so. The format of the 
X.I <value> 
Xshall be as described in 
X.BR "pax Extended Header File Times" .
X.TP
X.B charset
XThe name of the character set used to encode the data in the
Xfollowing file(s). The entries in the following table are
Xdefined to refer to known standards; additional names may be
Xagreed on between the originator and recipient.
X.PP
X.TS
Xcenter box;
Xcb|cB
Xl|l.
X<value>	Formal Standard
X_
XISO\-IR\ 646\ 1990	ISO/IEC 646:1990
XISO\-IR\ 8859\ 1\ 1998	ISO/IEC 8859\-1:1998
XISO\-IR\ 8859\ 2\ 1999	ISO/IEC 8859\-2:1999
XISO\-IR\ 8859\ 3\ 1999	ISO/IEC 8859\-3:1999
XISO\-IR\ 8859\ 4\ 1998	ISO/IEC 8859\-4:1998
XISO\-IR\ 8859\ 5\ 1999	ISO/IEC 8859\-5:1999
XISO\-IR\ 8859\ 6\ 1999	ISO/IEC 8859\-6:1999
XISO\-IR\ 8859\ 7\ 1987	ISO/IEC 8859\-7:1987
XISO\-IR\ 8859\ 8\ 1999	ISO/IEC 8859\-8:1999
XISO\-IR\ 8859\ 9\ 1999	ISO/IEC 8859\-9:1999
XISO\-IR\ 8859\ 10\ 1998	ISO/IEC 8859\-10:1998
XISO\-IR\ 8859\ 13\ 1998	ISO/IEC 8859\-13:1998
XISO\-IR\ 8859\ 14\ 1998	ISO/IEC 8859\-14:1998
XISO\-IR\ 8859\ 15\ 1999	ISO/IEC 8859\-15:1999
XISO\-IR\ 10646\ 2000	ISO/IEC 10646:2000
XISO\-IR\ 10646\ 2000\ UTF\-8	ISO/IEC 10646, UTF\-8 encoding
XBINARY	None
X.TE
X.PP
XThe encoding is included in an extended header for
Xinformation only; when 
X.B pax 
Xis used as described in
XIEEE Std 1003.1-2001, it shall not translate the file data
Xinto any other encoding. The 
X.B BINARY 
Xentry indicates unencoded binary data.
X.PP
XWhen used in 
X.B write
Xor
X.B copy 
Xmode, it is implementation-defined
Xwhether 
X.B pax 
Xincludes a charset extended header record for a file.
X.TP
X.B comment
XA series of characters used as a comment. All characters in
Xthe
X.I <value> 
Xfield shall be ignored by 
X.BR pax .
X.TP
X.B gid
XThe group ID of the group that owns the file, expressed as a
Xdecimal number using digits from the ISO/IEC 646:1991
Xstandard. This record shall override the 
X.I gid 
Xfield in the following header block(s). When used in 
X.B write 
Xor 
X.B copy 
Xmode,
X.B pax 
Xshall include a gid extended header record for each file
Xwhose group ID is greater than 2097151 (octal 7777777).
X.TP
X.B gname
XThe group of the file(s), formatted as a group name in the
Xgroup database. This record shall override the 
X.B gid 
Xand 
X.B gname
Xfields in the following header block(s), and any 
X.B gid 
Xextended
Xheader record. When used in 
X.BR read , 
X.BR copy ,
Xor 
X.B list 
Xmode, 
X.B pax
Xshall translate the name from the UTF-8 encoding in the
Xheader record to the character set appropriate for the group
Xdatabase on the receiving system. If any of the UTF-8
Xcharacters cannot be translated, and if the 
X.BR "\-o invalid=" UTF-8
Xoption is not specified, the results are
Ximplementation-defined. When used in 
X.B write 
Xor 
X.B copy 
Xmode, 
X.B pax
Xshall include a 
X.B gname 
Xextended header record for each file
Xwhose group name cannot be represented entirely with the
Xletters and digits of the portable character set.
X.TP
X.B linkpath
XThe pathname of a link being created to another file, of any
Xtype, previously archived. This record shall override the
X.I linkname 
Xfield in the following 
X.B ustar 
Xheader block(s). The
Xfollowing 
X.B ustar 
Xheader block shall determine the type of link
Xcreated. If 
X.I typeflag 
Xof the following header block is 1, it
Xshall be a hard link. If 
X.I typeflag 
Xis 2, it shall be a
Xsymbolic link and the linkpath value shall be the contents of
Xthe symbolic link. The 
X.B pax 
Xutility shall translate the name
Xof the link (contents of the symbolic link) from the UTF-8
Xencoding to the character set appropriate for the local file
Xsystem. When used in 
X.B write 
Xor 
X.B copy 
Xmode, 
X.B pax 
Xshall include a
Xlinkpath extended header record for each link whose pathname
Xcannot be represented entirely with the members of the
Xportable character set other than NUL.
X.TP
X.B mtime
XThe file modification time of the following file(s),
Xequivalent to the value of the 
X.I st_mtime 
Xmember of the 
X.B stat
Xstructure for a file, as described in the 
X.BR stat (2)
Xfunction.
XThis record shall override the 
X.I mtime 
Xfield in the following
Xheader block(s). The modification time shall be restored if
Xthe process has the appropriate privilege required to do so.
XThe format of the 
X.I <value> 
Xshall be as described in 
X.BR "pax Extended Header File Times" .
X.TP
X.B path
XThe pathname of the following file(s). This record shall
Xoverride the 
X.I name 
Xand 
X.I prefix 
Xfields in the following header
Xblock(s). The 
X.B pax 
Xutility shall translate the pathname of the
Xfile from the UTF-8 encoding to the character set appropriate
Xfor the local file system.
X.sp
XWhen used in 
X.B write 
Xor 
X.B copy 
Xmode, 
X.B pax 
Xshall include a 
X.I path
Xextended header record for each file whose pathname cannot be
Xrepresented entirely with the members of the portable
Xcharacter set other than NUL.
X.TP
X.BI realtime. any
XThe keywords prefixed by "realtime." are reserved for future
Xstandardization.
X.TP
X.BI security. any
XThe keywords prefixed by "security." are reserved for future
Xstandardization.
X.TP
X.B size
XThe size of the file in octets, expressed as a decimal number
Xusing digits from the ISO/IEC 646:1991 standard. This record
Xshall override the 
X.I size 
Xfield in the following header
Xblock(s). When used in 
X.B write 
Xor 
X.B copy 
Xmode, 
X.B pax 
Xshall include
Xa 
X.I size 
Xextended header record for each file with a size value
Xgreater than 8589934591 (octal 77777777777).
X.TP
X.B uid
XThe user ID of the file owner, expressed as a decimal number
Xusing digits from the ISO/IEC 646:1991 standard. This record
Xshall override the 
X.I uid 
Xfield in the following header
Xblock(s). When used in 
X.B write 
Xor 
X.B copy
Xmode, 
X.B pax 
Xshall include a 
X.I uid 
Xextended header record for each file whose owner ID is 
Xgreater than 2097151 (octal 7777777).
X.TP
X.B uname
XThe owner of the following file(s), formatted as a user name
Xin the user database. This record shall override the 
X.I uid 
Xand
X.I uname 
Xfields in the following header block(s), and any 
X.I uid
Xextended header record. When used in 
X.BR read , 
X.BR copy ", or"
X.B list
Xmode, 
X.B pax 
Xshall translate the name from the UTF-8 encoding in
Xthe header record to the character set appropriate for the
Xuser database on the receiving system. If any of the UTF-8
Xcharacters cannot be translated, and if the 
X.BR "\-o invalid=" UTF-8
Xoption is not specified, the results are
Ximplementation-defined. When used in 
X.B write 
Xor 
X.B copy 
Xmode, 
X.B pax
Xshall include a 
X.I uname 
Xextended header record for each file
Xwhose user name cannot be represented entirely with the
Xletters and digits of the portable character set.
X.PP
XIf the 
X.I <value> 
Xfield is zero length, it shall delete any header
Xblock field, previously entered extended header value, or global
Xextended header value of the same name.
X.PP
XIf a keyword in an extended header record (or in a 
X.B \-o
Xoption-argument) overrides or deletes a corresponding field in the
X.B ustar 
Xheader block, 
X.B pax 
Xshall ignore the contents of that header block field.
X.PP
XUnlike the 
X.B ustar 
Xheader block fields, NULs shall not delimit
X.IR <value> s;
Xall characters within the 
X.I <value> 
Xfield shall be
Xconsidered data for the field. None of the length limitations of
Xthe
X.B ustar 
Xheader block fields in 
X.B "ustar Header Block 
Xshall apply to the extended header records.
X
X.SS "pax Extended Header Keyword Precedence
X.PP
XThis section describes the precedence in which the various header
Xrecords and fields and command line options are selected to apply
Xto a file in the archive. When 
X.B pax 
Xis used in 
X.B read 
Xor 
X.B list 
Xmodes, it shall determine a file attribute in the following sequence:
X.RS
X.TP
X1.
XIf
X.BI "\-o delete=" keyword-prefix
Xis used, the affected attributes
Xshall be determined from step 7., if applicable, or ignored
Xotherwise.
X.TP
X2.
XIf 
X.BI "\-o " keyword:=
Xis used, the affected attributes shall be ignored.
X.TP
X3.
XIf 
X.BI "\-o " keyword:=value
Xis used, the affected attribute shall be assigned the value.
X.TP
X4.
XIf there is a 
X.I typeflag 
X.B x 
Xextended header record, the affected
Xattribute shall be assigned the 
X.IR <value> . 
XWhen extended header
Xrecords conflict, the last one given in the header shall take
Xprecedence.
X.TP
X5.
XIf 
X.BI "\-o " keyword=value
Xis used, the affected attribute shall
Xbe assigned the value.
X.TP
X6.
XIf there is a 
X.I typeflag 
X.B g 
Xglobal extended header record, the
Xaffected attribute shall be assigned the 
X.IR <value> .
XWhen global
Xextended header records conflict, the last one given in the
Xglobal header shall take precedence.
X.TP
X7.
XOtherwise, the attribute shall be determined from the 
X.B ustar
Xheader block.
X.RE
X
X.SS "pax Extended Header File Times
X.PP
XThe 
X.B pax 
Xutility shall write an 
X.B mtime 
Xrecord for each file in 
X.B write
Xor 
X.B copy 
Xmodes if the file's modification time cannot be
Xrepresented exactly in the 
X.B ustar 
Xheader logical record described
Xin 
X.BR "ustar Interchange Format" . 
XThis can occur if the time is out of
X.B ustar 
Xrange, or if the file system of the underlying
Ximplementation supports non-integer time granularities and the
Xtime is not an integer. All of these time records shall be
Xformatted as a decimal representation of the time in seconds since
Xthe Epoch. If a period ('.') decimal point character is present,
Xthe digits to the right of the point shall represent the units of
Xa subsecond timing granularity, where the first digit is tenths of
Xa second and each subsequent digit is a tenth of the previous
Xdigit. In 
X.B read 
Xor 
X.B copy 
Xmode, the 
X.B pax 
Xutility shall truncate the
Xtime of a file to the greatest value that is not greater than the
Xinput header file time. In 
X.B write 
Xor 
X.B copy 
Xmode, the 
X.B pax 
Xutility
Xshall output a time exactly if it can be represented exactly as a
Xdecimal number, and otherwise shall generate only enough digits so
Xthat the same time shall be recovered if the file is extracted on
Xa system whose underlying implementation supports the same time
Xgranularity.
X
X.SS "ustar Interchange Format
XA 
X.B ustar 
Xarchive tape or file shall contain a series of logical
Xrecords. Each logical record shall be a fixed-size logical record
Xof 512 octets (see below). Although this format may be thought of
Xas being stored on 9-track industry-standard 12.7 mm (0.5 in)
Xmagnetic tape, other types of transportable media are not
Xexcluded. Each file archived shall be represented by a header
Xlogical record that describes the file, followed by zero or more
Xlogical records that give the contents of the file. At the end of
Xthe archive file there shall be two 512-octet logical records
Xfilled with binary zeros, interpreted as an end-of-archive
Xindicator.
X.PP
XThe logical records may be grouped for physical I/O operations, as
Xdescribed under the 
X.BI \-b " blocksize 
Xand
X.BI \-x " ustar 
Xoptions. Each group
Xof logical records may be written with a single operation
Xequivalent to the 
X.BR write (2)
Xfunction. On magnetic tape, the result
Xof this write shall be a single tape physical block. The last
Xphysical block shall always be the full size, so logical records
Xafter the two zero logical records may contain undefined data.
X.PP
XThe header logical record shall be structured as shown in the
Xfollowing table. All lengths and offsets are in decimal.
X.PP
X.sp
X.ne 20
X.CA "Table: ustar Header Block"
X.TS
Xcenter box;
Xcb|cb|cb
Xl|n|n.
XField Name	Octet Offset	Length (in Octets)
X_
Xname	0	100
Xmode	100	8
Xuid	108	8
Xgid	116	8
Xsize	124	12
Xmtime	136	12
Xchksum	148	8
Xtypeflag	156	1
Xlinkname	157	100
Xmagic	257	6
Xversion	263	2
Xuname	265	32
Xgname	297	32
Xdevmajor	329	8
Xdevminor	337	8
Xprefix	345	155
X.TE
X.PP
XAll characters in the header logical record shall be represented
Xin the coded character set of the ISO/IEC 646:1991 standard. For
Xmaximum portability between implementations, names should be
Xselected from characters represented by the portable filename
Xcharacter set as octets with the most significant bit zero. If an
Ximplementation supports the use of characters outside of slash and
Xthe portable filename character set in names for files, users, and
Xgroups, one or more implementation-defined encodings of these
Xcharacters shall be provided for interchange purposes.
X.PP
XHowever, the 
X.B pax 
Xutility shall never create filenames on the local
Xsystem that cannot be accessed via the procedures described in
XIEEE Std 1003.1-2001. If a filename is found on the medium that
Xwould create an invalid filename, it is implementation-defined
Xwhether the data from the file is stored on the file hierarchy and
Xunder what name it is stored. The 
X.B pax 
Xutility may choose to ignore
Xthese files as long as it produces an error indicating that the
Xfile is being ignored.
X.PP
XEach field within the header logical record is contiguous; that
Xis, there is no padding used. Each character on the archive medium
Xshall be stored contiguously.
X.PP
XThe fields 
X.IR magic ,
X.IR uname ,
Xand 
X.I gname 
Xare character strings each
Xterminated by a NUL character. The fields 
X.IR name ,
X.IR linkname ,
Xand
X.I prefix 
Xare NUL-terminated character strings except when all
Xcharacters in the array contain non-NUL characters including the
Xlast character. The 
X.I version 
Xfield is two octets containing the
Xcharacters "00" (zero-zero). The 
X.I typeflag 
Xcontains a single
Xcharacter. All other fields are leading zero-filled octal numbers
Xusing digits from the ISO/IEC 646:1991 standard IRV. Each numeric
Xfield is terminated by one or more <space> or NUL characters.
X.PP
XThe 
X.I name 
Xand the 
X.I prefix 
Xfields shall produce the pathname of the
Xfile. A new pathname shall be formed, if 
X.I prefix 
Xis not an empty
Xstring (its first character is not NUL), by concatenating 
X.I prefix
X(up to the first NUL character), a slash character, and 
X.IR name ;
Xotherwise, 
X.I name
Xis used alone. In either case, 
X.I name 
Xis terminated
Xat the first NUL character. If 
X.I prefix 
Xbegins with a NUL character,
Xit shall be ignored. In this manner, pathnames of at most 256
Xcharacters can be supported. If a pathname does not fit in the
Xspace provided, 
X.B pax 
Xshall notify the user of the error, and shall
Xnot store any part of the file-header or data-on the medium.
X.PP
XThe 
X.I linkname 
Xfield, described below, shall not use the 
X.I prefix 
Xto
Xproduce a pathname. As such, a 
X.I linkname 
Xis limited to 100
Xcharacters. If the name does not fit in the space provided, 
X.B pax
Xshall notify the user of the error, and shall not attempt to store
Xthe link on the medium.
X.PP
XThe 
X.I mode 
Xfield provides 12 bits encoded in the ISO/IEC 646:1991
Xstandard octal digit representation. The encoded bits shall
Xrepresent the following values:
X.PP
X.sp
X.ne 25
X.CA "Table: ustar mode Field"
X.TS
Xcenter box;
Xcb|cb|cb
Xcb|cb|cb
Xl|l|l.
XBit	IEEE Std	Description
XValue	1003.1-2001 Bit	
X_
X04000	S_ISUID	Set UID on execution.
X02000	S_ISGID	Set GID on execution.
X01000	<reserved>	Reserved for future standardization.
X00400	S_IRUSR	Read permission for file owner class.
X00200	S_IWUSR	Write permission for file owner class.
X00100	S_IXUSR	Execute/search permission for file owner class.
X00040	S_IRGRP	Read permission for file group class.
X00020	S_IWGRP	Write permission for file group class.
X00010	S_IXGRP	Execute/search permission for file group class.
X00004	S_IROTH	Read permission for file other class.
X00002	S_IWOTH	Write permission for file other class.
X00001	S_IXOTH	Execute/search permission for file other class.
X.TE
X.PP
XWhen appropriate privilege is required to set one of these mode
Xbits, and the user restoring the files from the archive does not
Xhave the appropriate privilege, the mode bits for which the user
Xdoes not have appropriate privilege shall be ignored. Some of the
Xmode bits in the archive format are not mentioned elsewhere in
Xthis volume of IEEE Std 1003.1-2001. If the implementation does
Xnot support those bits, they may be ignored.
X.PP
XThe
X.I uid and 
X.I gid 
Xfields are the user and group ID of the owner and
Xgroup of the file, respectively.
X.PP
XThe 
X.I size 
Xfield is the size of the file in octets. If the 
X.I typeflag
Xfield is set to specify a file to be of type 1 (a link) or 2 (a
Xsymbolic link), the 
X.I size 
Xfield shall be specified as zero. If the
X.I typeflag 
Xfield is set to specify a file of type 5 (directory), the
Xsize field shall be interpreted as described under the definition
Xof that record type. No data logical records are stored for types
X1, 2, or 5. If the typeflag field is set to 3 (character special
Xfile), 4 (block special file), or 6 (FIFO), the meaning of the
X.I size 
Xfield is unspecified by this volume of IEEE Std 1003.1-2001,
Xand no data logical records shall be stored on the medium.
XAdditionally, for type 6, the 
X.I size 
Xfield shall be ignored when
Xreading. If the 
X.I typeflag 
Xfield is set to any other value, the
Xnumber of logical records written following the header shall be
X(size+511)/512, ignoring any fraction in the result of the
Xdivision.
X.PP
XThe
X.I mtime 
Xfield shall be the modification time of the file at the
Xtime it was archived. It is the ISO/IEC 646:1991 standard
Xrepresentation of the octal value of the modification time
Xobtained from the 
X.BR stat (2)
Xfunction.
X.PP
XThe
X.I chksum 
Xfield shall be the ISO/IEC 646:1991 standard IRV
Xrepresentation of the octal value of the simple sum of all octets
Xin the header logical record. Each octet in the header shall be
Xtreated as an unsigned value. These values shall be added to an
Xunsigned integer, initialized to zero, the precision of which is
Xnot less than 17 bits. When calculating the checksum, the 
X.I chksum
Xfield is treated as if it were all spaces.
X.PP
XThe 
X.I typeflag 
Xfield specifies the type of file archived. If a
Xparticular implementation does not recognize the type, or the user
Xdoes not have appropriate privilege to create that type, the file
Xshall be extracted as if it were a regular file if the file type
Xis defined to have a meaning for the 
X.I size 
Xfield that could cause
Xdata logical records to be written on the medium (see the previous
Xdescription for 
X.IR size ).
XIf conversion to a regular file occurs, the
X.B pax 
Xutility shall produce an error indicating that the conversion
Xtook place. All of the 
X.I typeflag 
Xfields shall be coded in the
XISO/IEC 646:1991 standard IRV:
X.TP
X.B 0
XRepresents a regular file. For backwards-compatibility, a
X.I typeflag
Xvalue of binary zero ('\e0') should be recognized
Xas meaning a regular file when extracting files from the
Xarchive. Archives written with this version of the archive
Xfile format create regular files with a 
X.I typefla
Xvalue of the
XISO/IEC 646:1991 standard IRV '0'.
X.TP
X.B 1
XRepresents a file linked to another file, of any type,
Xpreviously archived. Such files are identified by having the
Xsame device and file serial numbers, and pathnames that refer
Xto different directory entries. All such files shall be
Xarchived as linked files. The linked-to name is specified in
Xthe 
X.I linkname 
Xfield with a NUL-character terminator if it is
Xless than 100 octets in length.
X.TP
X.B 2
XRepresents a symbolic link. The contents of the symbolic link
Xshall be stored in the 
X.I linkname 
Xfield.
X.TP
X.B 3,4 
XRepresent character special files and block special files
Xrespectively. In this case the 
X.I devmajor 
Xand 
X.I devminor 
Xfields
Xshall contain information defining the device, the format of
Xwhich is unspecified by this volume of IEEE Std 1003.1-2001.
XImplementations may map the device specifications to their
Xown local specification or may ignore the entry.
X.TP
X.B 5
XSpecifies a directory or subdirectory. On systems where disk
Xallocation is performed on a directory basis, the 
X.I size 
Xfield
Xshall contain the maximum number of octets (which may be
Xrounded to the nearest disk block allocation unit) that the
Xdirectory may hold. A 
X.I size 
Xfield of zero indicates no such
Xlimiting. Systems that do not support limiting in this manner
Xshould ignore the 
X.I size 
Xfield.
X.TP
X.B 6
XSpecifies a FIFO special file. Note that the archiving of a
XFIFO file archives the existence of this file and not its
Xcontents.
X.TP
X.B 7
XReserved to represent a file to which an implementation has
Xassociated some high-performance attribute. Implementations
Xwithout such extensions should treat this file as a regular
Xfile (type 0).
X.TP
X.B A\-Z
XThe letters 'A' to 'Z', inclusive, are reserved for custom
Ximplementations. All other values are reserved for future
Xversions of IEEE Std 1003.1-2001.
X.PP
XIt is unspecified whether files with pathnames that refer to the
Xsame directory entry are archived as linked files or as separate
Xfiles. If they are archived as linked files, this means that
Xattempting to extract both pathnames from the resulting archive
Xwill always cause an error (unless the 
X.B \-u 
Xoption is used) because
Xthe link cannot be created.
X.PP
XIt is unspecified whether files with the same device and file
Xserial numbers being appended to an archive are treated as linked
Xfiles to members that were in the archive before the append.
X.PP
XAttempts to archive a socket using 
X.B ustar
Xinterchange format shall
Xproduce a diagnostic message. Handling of other file types is
Ximplementation-defined.
X.PP
XThe 
X.I magic 
Xfield is the specification that this archive was output
Xin this archive format. If this field contains 
X.B ustar 
X(the five
Xcharacters from the ISO/IEC 646:1991 standard IRV shown followed
Xby NUL), the 
X.I uname 
Xand 
X.I gname 
Xfields shall contain the
XISO/IEC 646:1991 standard IRV representation of the owner and
Xgroup of the file, respectively (truncated to fit, if necessary).
XWhen the file is restored by a privileged, protection-preserving
Xversion of the utility, the user and group databases shall be
Xscanned for these names. If found, the user and group IDs
Xcontained within these files shall be used rather than the values
Xcontained within the 
X.I uid 
Xand 
X.I gid 
Xfields.
X
X.SS "cpio Interchange Format
X.PP
XThe octet-oriented 
X.B cpio 
Xarchive format shall be a series of
Xentries, each comprising a header that describes the file, the
Xname of the file, and then the contents of the file.
X.PP
XAn archive may be recorded as a series of fixed-size blocks of
Xoctets. This blocking shall be used only to make physical I/O more
Xefficient. The last group of blocks shall always be at the full
Xsize.
X.PP
XFor the octet-oriented 
X.B cpio 
Xarchive format, the individual entry
Xinformation shall be in the order indicated and described by the
Xfollowing table; see also the 
X.B <cpio.h> 
Xheader.
X.PP
X.sp
X.ne 25
X.CA "Table: Octet-Oriented cpio Archive Entry"
X.TS
Xcenter box;
Xcb|cb|cb
Xl|l|l.
XHeader Field Name	Length (in Octets)	Interpreted as
X_
Xc_magic	6	Octal number
Xc_dev	6	Octal number
Xc_ino	6	Octal number
Xc_mode	6	Octal number
Xc_uid	6	Octal number
Xc_gid	6	Octal number
Xc_nlink	6	Octal number
Xc_rdev	6	Octal number
Xc_mtime	11	Octal number
Xc_namesize	6	Octal number
Xc_filesize	11	Octal number
X
X\fBFilename Field Name	Length	Interpreted as\fP
Xc_name	c_namesize	Pathname string
X
X\fBFile Data Field Name	Length	Interpreted as\fP
Xc_filedata	c_filesize	Data
X.TE
X.PP
X.SS "cpio Header
X.PP
XFor each file in the archive, a header as defined previously shall
Xbe written. The information in the header fields is written as
Xstreams of the ISO/IEC 646:1991 standard characters interpreted as
Xoctal numbers. The octal numbers shall be extended to the
Xnecessary length by appending the ISO/IEC 646:1991 standard IRV
Xzeros at the most-significant-digit end of the number; the result
Xis written to the most-significant digit of the stream of octets
Xfirst. The fields shall be interpreted as follows:
X.PP
X.TP
X.B c_magic
XIdentify the archive as being a transportable archive by
Xcontaining the identifying value "070707".
X.TP
X.BR c_dev ", " c_ino
XContains values that uniquely identify the file within the
Xarchive (that is, no files contain the same pair of 
X.I c_dev 
Xand
X.I c_ino 
Xvalues unless they are links to the same file). The
Xvalues shall be determined in an unspecified manner.
X.TP
X.B c_mode
XContains the file type and access permissions as defined in
Xthe following table.
X.RS
X.PP
X.sp
X.ne 35
X.CA "Table: Values for cpio c_mode Field"
X.TS
Xcenter box;
Xcb|cb|cb
Xl|l|l.
XFile Permissions Name	Value	Indicates
X_
XC_IRUSR	000400	Read by owner
XC_IWUSR	000200	Write by owner
XC_IXUSR	000100	Execute by owner
XC_IRGRP	000040	Read by group
XC_IWGRP	000020	Write by group
XC_IXGRP	000010	Execute by group
XC_IROTH	000004	Read by others
XC_IWOTH	000002	Write by others
XC_IXOTH	000001	Execute by others
XC_ISUID	004000	Set uid
XC_ISGID	002000	Set gid
XC_ISVTX	001000	Reserved
X_
X\fBFile Type Name	Value	Indicates\fP
X_
XC_ISDIR	0040000	Directory
XC_ISFIFO	0010000	FIFO
XC_ISREG	0100000	Regular file
XC_ISLNK	0120000	Symbolic link
XC_ISBLK	0060000	Block special file
XC_ISCHR	0020000	Character special file
XC_ISSOCK	0140000	Socket
XC_ISCTG	0110000	Reserved
X.TE
X.PP
XDirectories, FIFOs, symbolic links, and regular files shall
Xbe supported on a system conforming to this volume of
XIEEE Std 1003.1-2001; additional values defined previously
Xare reserved for compatibility with existing systems.
XAdditional file types may be supported; however, such files
Xshould not be written to archives intended to be transported
Xto other systems.
X.RE
X.TP
X.B c_uid
XContains the user ID of the owner.
X.TP
X.B c_gid
XContains the group ID of the group.
X.TP
X.B c_nlink
XContains a number greater than or equal to the number of
Xlinks in the archive referencing the file. If the 
X.B \-a 
Xoption
Xis used to append to a 
X.I cpio
Xarchive, then the 
X.B pax 
Xutility
Xneed not account for the files in the existing part of the
Xarchive when calculating the 
X.I c_nlink 
Xvalues for the appended
Xpart of the archive, and need not alter the 
X.I c_nlink 
Xvalues in
Xthe existing part of the archive if additional files with the
Xsame 
X.I c_dev 
Xand 
X.I c_ino 
Xvalues are appended to the archive.
X.TP
X.B c_rdev
XContains implementation-defined information for character or
Xblock special files.
X.TP
X.B c_mtime
XContains the latest time of modification of the file at the
Xtime the archive was created.
X.TP
X.B c_namesize
XContains the length of the pathname, including the
Xterminating NUL character.
X.TP
X.B c_filesize
XContains the length of the file in octets. This shall be the
Xlength of the data section following the header structure.
X
X.SS "cpio Filename
X.PP
XThe 
X.I c_name 
Xfield shall contain the pathname of the file. The
Xlength of this field in octets is the value of 
X.IR c_namesize .
X.PP
XIf a filename is found on the medium that would create an invalid
Xpathname, it is implementation-defined whether the data from the
Xfile is stored on the file hierarchy and under what name it is
Xstored.
X.PP
XAll characters shall be represented in the ISO/IEC 646:1991
Xstandard IRV. For maximum portability between implementations,
Xnames should be selected from characters represented by the
Xportable filename character set as octets with the most
Xsignificant bit zero. If an implementation supports the use of
Xcharacters outside the portable filename character set in names
Xfor files, users, and groups, one or more implementation-defined
Xencodings of these characters shall be provided for interchange
Xpurposes. However, the 
X.B pax 
Xutility shall never create filenames on
Xthe local system that cannot be accessed via the procedures
Xdescribed previously in this volume of IEEE Std 1003.1-2001. If a
Xfilename is found on the medium that would create an invalid
Xfilename, it is implementation-defined whether the data from the
Xfile is stored on the local file system and under what name it is
Xstored. The 
X.B pax 
Xutility may choose to ignore these files as long
Xas it produces an error indicating that the file is being ignored.
X
X.SS cpio File Data
X.PP
XFollowing 
X.IR c_name ,
Xthere shall be 
X.I c_filesize 
Xoctets of data.
XInterpretation of such data occurs in a manner dependent on the
Xfile. If 
X.I c_filesize 
Xis zero, no data shall be contained in
X.IR c_filedata .
X.PP
XWhen restoring from an archive:
X.TP
X.B \(bu
XIf the user does not have the appropriate privilege to create
Xa file of the specified type, 
X.B pax
Xshall ignore the entry and
Xwrite an error message to standard error.
X.TP
X.B \(bu
XOnly regular files have data to be restored. Presuming a
Xregular file meets any selection criteria that might be
Ximposed on the format-reading utility by the user, such data
Xshall be restored.
X.TP
X.B \(bu
XIf a user does not have appropriate privilege to set a
Xparticular mode flag, the flag shall be ignored. Some of the
Xmode flags in the archive format are not mentioned elsewhere
Xin this volume of IEEE Std 1003.1-2001. If the implementation
Xdoes not support those flags, they may be ignored.
X
X.SS "cpio Special Entries
X.PP
XFIFO special files, directories, and the trailer shall be recorded
Xwith 
X.I c_filesize 
Xequal to zero. For other special files, 
X.I c_filesize
Xis unspecified by this volume of IEEE Std 1003.1-2001. The header
Xfor the next file entry in the archive shall be written directly
Xafter the last octet of the file entry preceding it. A header
Xdenoting the filename 
X.B "TRAILER!!!"
Xshall indicate the end of the
Xarchive; the contents of octets in the last block of the archive
Xfollowing such a header are undefined.
X
X.SH "EXIT STATUS
X.PP
XThe following exit values shall be returned:
X.TP
X.B " 0
XAll files were processed successfully.
X.TP
X.B >0
XAn error occurred.
X
X.SH "CONSEQUENCES OF ERRORS
X.PP
XIf 
X.B pax 
Xcannot create a file or a link when reading an archive or
Xcannot find a file when writing an archive, or cannot preserve the
Xuser ID, group ID, or file mode when the 
X.B \-p 
Xoption is specified, a
Xdiagnostic message shall be written to standard error and a
Xnon-zero exit status shall be returned, but processing shall
Xcontinue. In the case where 
X.B pax 
Xcannot create a link to a file,
X.B pax 
Xshall not, by default, create a second copy of the file.
X.PP
XIf the extraction of a file from an archive is prematurely
Xterminated by a signal or error, 
X.B pax 
Xmay have only partially
Xextracted the file or (if the 
X.B \-n 
Xoption was not specified) may
Xhave extracted a file of the same name as that specified by the
Xuser, but which is not the file the user wanted. Additionally, the
Xfile modes of extracted directories may have additional bits from
Xthe S_IRWXU mask set as well as incorrect modification and access
Xtimes.
X
X.ne 5
X.PP
X.RU
X.HD "The following sections are informative."
X
X.SH "APPLICATION USAGE
X.PP
XCaution is advised when using the 
X.B \-a 
Xoption to append to a 
X.I cpio
Xformat archive. If any of the files being appended happen to be
Xgiven the same 
X.I c_dev 
Xand 
X.I c_ino 
Xvalues as a file in the existing
Xpart of the archive, then they may be treated as links to that
Xfile on extraction. Thus, it is risky to use 
X.B \-a 
Xwith 
X.I cpio 
Xformat
Xexcept when it is done on the same system that the original
Xarchive was created on, and with the same 
X.B pax 
Xutility, and in the
Xknowledge that there has been little or no file system activity
Xsince the original archive was created that could lead to any of
Xthe files appended being given the same 
X.I c_dev 
Xand 
X.I c_ino 
Xvalues as
Xan unrelated file in the existing part of the archive. Also, when
X(intentionally) appending additional links to a file in the
Xexisting part of the archive, the 
X.I c_nlink 
Xvalues in the modified
Xarchive can be smaller than the number of links to the file in the
Xarchive, which may mean that the links are not preserved on
Xextraction.
X.PP
XThe 
X.B \-p 
X(privileges) option was invented to reconcile differences
Xbetween historical 
X.B tar 
Xand 
X.B cpio 
Ximplementations. In particular,
Xthe two utilities use 
X.B \-m 
Xin diametrically opposed ways. The 
X.B \-p
Xoption also provides a consistent means of extending the ways in
Xwhich future file attributes can be addressed, such as for
Xenhanced security systems or high-performance files. Although it
Xmay seem complex, there are really two modes that are most
Xcommonly used:
X.TP
X.B \-p e
X``Preserve everything". This would be used by the historical
Xsuperuser, someone with all the appropriate privileges, to
Xpreserve all aspects of the files as they are recorded in the
Xarchive. The 
X.B e 
Xflag is the sum of 
X.B o 
Xand 
X.BR p ,
Xand other implementation-defined attributes.
X.TP
X.B \-p p
X``Preserve" the file mode bits. This would be used by the
Xuser with regular privileges who wished to preserve aspects
Xof the file other than the ownership. The file times are
Xpreserved by default, but two other flags are offered to
Xdisable these and use the time of extraction.
X.PP
XThe one pathname per line format of standard input precludes
Xpathnames containing <newline>s. Although such pathnames violate
Xthe portable filename guidelines, they may exist and their
Xpresence may inhibit usage of 
X.B pax 
Xwithin shell scripts. This
Xproblem is inherited from historical archive programs. The problem
Xcan be avoided by listing filename arguments on the command line
Xinstead of on standard input.
X.PP
XIt is almost certain that appropriate privileges are required for
X.B pax 
Xto accomplish parts of this volume of IEEE Std 1003.1-2001.
XSpecifically, creating files of type block special or character
Xspecial, restoring file access times unless the files are owned by
Xthe user (the 
X.B \-t 
Xoption), or preserving file owner, group, and
Xmode (the 
X.B \-p 
Xoption) all probably require appropriate privileges.
X.PP
XIn 
X.B read 
Xmode, implementations are permitted to overwrite files
Xwhen the archive has multiple members with the same name. This may
Xfail if permissions on the first version of the file do not permit
Xit to be overwritten.
X.PP
XThe 
X.B cpio 
Xand 
X.B ustar 
Xformats can only support files up to 8589934592
Xbytes (8 * 2^30) in size.
X
X.SH EXAMPLES
X.PP
XThe following command:
X.PP
X.B
X     pax \-w \-f /dev/rmt/1m .
X.PP
Xcopies the contents of the current directory to tape drive 1,
Xmedium density (assuming historical System V device naming
Xprocedures-the historical BSD device name would be /dev/rmt9).
X.PP
XThe following commands:
X.PP
X.B
X     mkdir newdirpax \-rw olddir newdir
X.PP
Xcopy the olddir directory hierarchy to newdir.
X.PP
X.B
X     pax \-r \-s ',^//*usr//*,,' \-f a.pax
X.PP
Xreads the archive a.pax, with all files rooted in /usr in the
Xarchive extracted relative to the current directory.
X.PP
XUsing the option:
X.PP
X.B
X     \-o listopt="%M %(atime)T %(size)D %(name)s"
X.PP
Xoverrides the default output description in Standard Output and
Xinstead writes:
X.PP
X.B
X     \-rw\-rw\-\-\- Jan 12 15:53 1492 /usr/foo/bar
X.PP
XUsing the options:
X.PP
X.B
X     \-o listopt='%L\et%(size)D\en%.7' \e
X.br
X.B
X     \-o listopt='(name)s\en%(atime)T\en%T'
X.P
Xoverrides the default output description in Standard Output and
Xinstead writes:
X.PP
X.B "/usr/foo/bar \-> /tmp   1492
X.br
X.B "/usr/fo
X.br
X.B "Jan 12 1991
X.br
X.B "Jan 31 15:53
X
X.SH RATIONALE
X.PP
XThe 
X.B pax
Xutility was new for the ISO POSIX-2:1993 standard. It
Xrepresents a peaceful compromise between advocates of the
Xhistorical 
X.B tar 
Xand 
X.B cpio 
Xutilities.
X.PP
XA fundamental difference between 
X.B cpio 
Xand 
X.B tar 
Xwas in the way
Xdirectories were treated. The 
X.B cpio 
Xutility did not treat
Xdirectories differently from other files, and to select a
Xdirectory and its contents required that each file in the
Xhierarchy be explicitly specified. For 
X.BR tar ,
Xa directory matched
Xevery file in the file hierarchy it rooted.
X.PP
XThe
X.B pax 
Xutility offers both interfaces; by default, directories
Xmap into the file hierarchy they root. The 
X.B \-d 
Xoption causes 
X.B pax 
Xto
Xskip any file not explicitly referenced, as 
X.I cpio 
Xhistorically did.
XThe 
X.B tar 
X- style behavior was chosen as the default because it was
Xbelieved that this was the more common usage and because 
X.B tar 
Xis
Xthe more commonly available interface, as it was historically
Xprovided on both System V and BSD implementations.
X.PP
XThe data interchange format specification in this volume of
XIEEE Std 1003.1-2001 requires that processes with "appropriate
Xprivileges" shall always restore the ownership and permissions of
Xextracted files exactly as archived. If viewed from the historic
Xequivalence between superuser and "appropriate privileges", there
Xare two problems with this requirement. First, users running as
Xsuperusers may unknowingly set dangerous permissions on extracted
Xfiles. Second, it is needlessly limiting, in that superusers
Xcannot extract files and own them as superuser unless the archive
Xwas created by the superuser. (It should be noted that restoration
Xof ownerships and permissions for the superuser, by default, is
Xhistorical practice in 
X.IR cpio ,
Xbut not in 
X.BR tar .)
XIn order to avoid
Xthese two problems, the 
X.I pax 
Xspecification has an additional
X"privilege" mechanism, the 
X.B \-p 
Xoption. Only a 
X.B pax 
Xinvocation with
Xthe privileges needed, and which has the 
X.B \-p 
Xoption set using the 
X.B e
Xspecification character, has the "appropriate privilege" to
Xrestore full ownership and permission information.
X.PP
XNote also that this volume of IEEE Std 1003.1-2001 requires that
Xthe file ownership and access permissions shall be set, on
Xextraction, in the same fashion as the 
X.BR creat (2)
Xfunction when
Xprovided with the mode stored in the archive. This means that the
Xfile creation mask of the user is applied to the file permissions.
X.PP
XUsers should note that directories may be created by 
X.B pax 
Xwhile
Xextracting files with permissions that are different from those
Xthat existed at the time the archive was created. When extracting
Xsensitive information into a directory hierarchy that no longer
Xexists, users are encouraged to set their file creation mask
Xappropriately to protect these files during extraction.
X.PP
XThe table of contents output is written to standard output to
Xfacilitate pipeline processing.
X.PP
XAn early proposal had hard links displaying for all pathnames.
XThis was removed because it complicates the output of the case
Xwhere 
X.B \-v 
Xis not specified and does not match historical 
X.B cpio
Xusage. The hard-link information is available in the 
X.B \-v 
Xdisplay.
X.PP
XThe description of the 
X.B \-l 
Xoption allows implementations to make
Xhard links to symbolic links. IEEE Std 1003.1-2001 does not
Xspecify any way to create a hard link to a symbolic link, but many
Ximplementations provide this capability as an extension. If there
Xare hard links to symbolic links when an archive is created, the
Ximplementation is required to archive the hard link in the archive
X(unless 
X.B \-H 
Xor 
X.B \-L 
Xis specified). When in 
X.B read 
Xmode and in 
X.B copy
Xmode, implementations supporting hard links to symbolic links
Xshould use them when appropriate.
X.PP
XThe archive formats inherited from the POSIX.1-1990 standard have
Xcertain restrictions that have been brought along from historical
Xusage. For example, there are restrictions on the length of
Xpathnames stored in the archive. When 
X.B pax is used in 
X.BR copy " (" \-rw )
Xmode (copying directory hierarchies), the ability to use
Xextensions from the 
X.BI \-x " pax 
Xformat overcomes these restrictions.
X.PP
XThe default blocksize value of 5120 bytes for 
X.B cpio 
Xwas selected
Xbecause it is one of the standard block-size values for 
X.BR cpio ,
Xset
Xwhen the 
X.B \-B 
Xoption is specified. (The other default block-size
Xvalue for 
X.B cpio 
Xis 512 bytes, and this was considered to be too
Xsmall.) The default block value of 10240 bytes for 
X.B tar 
Xwas selected because that is the standard block-size value for BSD
X.BR tar .
XThe maximum block size of 32256 bytes (2^15-512 bytes) is the
Xlargest multiple of 512 bytes that fits into a signed 16-bit tape
Xcontroller transfer register. There are known limitations in some
Xhistorical systems that would prevent larger blocks from being
Xaccepted. Historical values were chosen to improve compatibility
Xwith historical scripts using
X.BR dd (1)
Xor similar utilities to
Xmanipulate archives. Also, default block sizes for any file type
Xother than character special file has been deleted from this
Xvolume of IEEE Std 1003.1-2001 as unimportant and not likely to
Xaffect the structure of the resulting archive.
X.PP
XImplementations are permitted to modify the block-size value based
Xon the archive format or the device to which the archive is being
Xwritten. This is to provide implementations with the opportunity
Xto take advantage of special types of devices, and it should not
Xbe used without a great deal of consideration as it almost
Xcertainly decreases archive portability.
X.PP
XThe intended use of the 
X.B \-n 
Xoption was to permit extraction of one
Xor more files from the archive without processing the entire
Xarchive. This was viewed by the standard developers as offering
Xsignificant performance advantages over historical
Ximplementations. The 
X.B \-n 
Xoption in early proposals had three
Xeffects; the first was to cause special characters in patterns to
Xnot be treated specially. The second was to cause only the first
Xfile that matched a pattern to be extracted. The third was to
Xcause 
X.B pax 
Xto write a diagnostic message to standard error when no
Xfile was found matching a specified pattern. Only the second
Xbehavior is retained by this volume of IEEE Std 1003.1-2001, for
Xmany reasons. First, it is in general not acceptable for a single
Xoption to have multiple effects. Second, the ability to make
Xpattern matching characters act as normal characters is useful for
Xparts of
X.B pax
Xother than file extraction. Third, a finer degree of
Xcontrol over the special characters is useful because users may
Xwish to normalize only a single special character in a single
Xfilename. Fourth, given a more general escape mechanism, the
Xprevious behavior of the 
X.B \-n 
Xoption can be easily obtained using
Xthe 
X.B \-s 
Xoption or a sed script. Finally, writing a diagnostic
Xmessage when a pattern specified by the user is unmatched by any
Xfile is useful behavior in all cases.
X.PP
XIn this version, the 
X.B \-n 
Xwas removed from the copy mode synopsis of
X.BR pax ;
Xit is inapplicable because there are no pattern operands
Xspecified in this mode.
X.PP
XThere is another method than 
X.B pax 
Xfor copying subtrees in
XIEEE Std 1003.1-2001 described as part of the 
X.BR cp (1)
Xutility. Both
Xmethods are historical practice: 
X.BR cp (1)
Xprovides a simpler, more
Xintuitive interface, while 
X.B pax 
Xoffers a finer granularity of
Xcontrol. Each provides additional functionality to the other; in
Xparticular, 
X.B pax 
Xmaintains the hard-link structure of the hierarchy
Xwhile 
X.BR cp (1)
Xdoes not. It is the intention of the standard developers
Xthat the results be similar (using appropriate option combinations
Xin both utilities). The results are not required to be identical;
Xthere seemed insufficient gain to applications to balance the
Xdifficulty of implementations having to guarantee that the results
Xwould be exactly identical.
X.PP
XA single archive may span more than one file. It is suggested that
Ximplementations provide informative messages to the user on
Xstandard error whenever the archive file is changed.
X.PP
XThe 
X.B \-d 
Xoption (do not create intermediate directories not listed
Xin the archive) found in early proposals was originally provided
Xas a complement to the historic 
X.B \-d 
Xoption of 
X.BR cpio .
XIt has been deleted.
X.PP
XThe 
X.B \-s 
Xoption in early proposals specified a subset of the
Xsubstitution command from the ed utility. As there was no reason
Xfor only a subset to be supported, the 
X.B \-s 
Xoption is now compatible
Xwith the current ed specification. Since the delimiter can be any
Xnon-null character, the following usage with single spaces is
Xvalid:
X.PP
X.B
X     pax \-s " foo bar " .\|.\|.
X.PP
XThe 
X.B \-t description is worded so as to note that this may cause the
Xaccess time update caused by some other activity (which occurs
Xwhile the file is being read) to be overwritten.
X.PP
XThe default behavior of 
X.B pax 
Xwith regard to file modification times
Xis the same as historical implementations of 
X.BR tar .
XIt is not the
Xhistorical behavior of 
X.BR cpio .
X.PP
XBecause the 
X.B \-i 
Xoption uses 
X.BR /dev/tty ,
Xutilities without a
Xcontrolling terminal are not able to use this option.
X.PP
XThe 
X.B \-y 
Xoption, found in early proposals, has been deleted because
Xa line containing a single period for the 
X.B \-i 
Xoption has equivalent
Xfunctionality. The special lines for the 
X.B \-i 
Xoption (a single
Xperiod and the empty line) are historical practice in 
X.BR cpio .
X.PP
XIn early drafts, a 
X.BI \-e " charmap
Xoption was included to increase
Xportability of files between systems using different coded
Xcharacter sets. This option was omitted because it was apparent
Xthat consensus could not be formed for it. In this version, the
Xuse of UTF-8 should be an adequate substitute.
X.PP
XThe 
X.B \-k 
Xoption was added to address international concerns about
Xthe dangers involved in the character set transformations of 
X.B \-e
X(if the target character set were different from the source, the
Xfilenames might be transformed into names matching existing files)
Xand also was made more general to protect files transferred
Xbetween file systems with different 
X.I {NAME_MAX} 
Xvalues (truncating
Xa filename on a smaller system might also inadvertently overwrite
Xexisting files). As stated, it prevents any overwriting, even if
Xthe target file is older than the source. This version adds more
Xgranularity of options to solve this problem by introducing the 
X.BI "\-o invalid=" option
X\-specifically the UTF-8 action. (Note that an
Xexisting file that is named with a UTF-8 encoding is still subject
Xto overwriting in this case. The 
X.B \-k 
Xoption closes that loophole.)
X.PP
XSome of the file characteristics referenced in this volume of
XIEEE Std 1003.1-2001 might not be supported by some archive
Xformats. For example, neither the 
X.B tar 
Xnor 
X.B cpio 
Xformats contain the
Xfile access time. For this reason, the 
X.B e 
Xspecification character
Xhas been provided, intended to cause all file characteristics
Xspecified in the archive to be retained.
X.PP
XIt is required that extracted directories, by default, have their
Xaccess and modification times and permissions set to the values
Xspecified in the archive. This has obvious problems in that the
Xdirectories are almost certainly modified after being extracted
Xand that directory permissions may not permit file creation. One
Xpossible solution is to create directories with the mode specified
Xin the archive, as modified by the 
X.I umask 
Xof the user, with
Xsufficient permissions to allow file creation. After all files
Xhave been extracted, 
X.B pax 
Xwould then reset the access and
Xmodification times and permissions as necessary.
X.PP
XThe list-mode formatting description borrows heavily from the one
Xdefined by the 
X.BR printf (1)
Xutility. However, since there is no separate
Xoperand list to get conversion arguments, the format was extended
Xto allow specifying the name of the conversion argument as part of
Xthe conversion specification.
X.PP
XThe
X.B T 
Xconversion specifier allows time fields to be displayed in
Xany of the date formats. Unlike the 
X.BR ls (1)
Xutility, 
X.B pax 
Xdoes not
Xadjust the format when the date is less than six months in the
Xpast. This makes parsing the output more predictable.
X.PP
XThe 
X.B D 
Xconversion specifier handles the ability to display the
Xmajor/minor or file size, as with 
X.BR ls (1), 
Xby using %-8(size)D.
X.PP
XThe 
X.B L 
Xconversion specifier handles the ls display for symbolic
Xlinks.
X.PP
XConversion specifiers were added to generate existing known types
Xused for 
X.BR ls (1).
X
X.SS "pax Interchange Format
X.PP
XThe new POSIX data interchange format was developed primarily to
Xsatisfy international concerns that the 
X.B ustar 
Xand 
X.B cpio 
Xformats did
Xnot provide for file, user, and group names encoded in characters
Xoutside a subset of the ISO/IEC 646:1991 standard. The standard
Xdevelopers realized that this new POSIX data interchange format
Xshould be very extensible because there were other requirements
Xthey foresaw in the near future:
X.TP
X.B \(bu
XSupport international character encodings and locale
Xinformation
X.TP
X.B \(bu
XSupport security information (ACLs, and so on)
X.TP
X.B \(bu
XSupport future file types, such as realtime or contiguous files
X.TP
X.B \(bu
XInclude data areas for implementation use
X.TP
X.B \(bu
XSupport systems with words larger than 32 bits and timers
Xwith subsecond granularity
X.PP
XThe following were not goals for this format because these are
Xbetter handled by separate utilities or are inappropriate for a
Xportable format:
X.TP
X.B \(bu
XEncryption
X.TP
X.B \(bu
XCompression
X.TP
X.B \(bu
XData translation between locales and codesets
X.TP
X.B \(bu
Xinode storage
X.PP
XThe format chosen to support the goals is an extension of the
X.B ustar 
Xformat. Of the two formats previously available, only the
X.B ustar 
Xformat was selected for extensions because:
X.TP
X.B \(bu
XIt was easier to extend in an upwards-compatible way. It
Xoffered version flags and header block type fields with room
Xfor future standardization. The 
X.B cpio 
Xformat, while possessing
Xa more flexible file naming methodology, could not be
Xextended without breaking some theoretical implementation or
Xusing a dummy filename that could be a legitimate filename.
X.TP
X.B \(bu
XIndustry experience since the original "\fBtar\fP\ wars"
Xfought in
Xdeveloping the ISO POSIX-1 standard has clearly been in favor
Xof the 
X.B ustar 
Xformat, which is generally the default output
Xformat selected for 
X.B pax 
Ximplementations on new systems.
X.PP
XThe new format was designed with one additional goal in mind:
Xreasonable behavior when an older 
X.B tar 
Xor 
X.B pax 
Xutility happened to
Xread an archive. Since the POSIX.1-1990 standard mandated that a
X"format-reading utility" had to treat unrecognized 
X.I typeflag 
Xvalues
Xas regular files, this allowed the format to include all the
Xextended information in a pseudo-regular file that preceded each
Xreal file. An option is given that allows the archive creator to
Xset up reasonable names for these files on the older systems.
XAlso, the normative text suggests that reasonable file access
Xvalues be used for this 
X.B ustar 
Xheader block. Making these header
Xfiles inaccessible for convenient reading and deleting would not
Xbe reasonable. File permissions of 600 or 700 are suggested.
X.PP
XThe ustar 
X.I typeflag 
Xfield was used to accommodate the additional
Xfunctionality of the new format rather than 
X.I magic 
Xor 
X.I version
Xbecause the POSIX.1-1990 standard (and, by reference, the previous
Xversion of 
X.BR pax ),
Xmandated the behavior of the format-reading
Xutility when it encountered an unknown 
X.IR typeflag ,
Xbut was silent about the other two fields.
X.PP
XEarly proposals of the first revision to IEEE Std 1003.1-2001
Xcontained a proposed archive format that was based on
Xcompatibility with the standard for tape files (ISO 1001, similar
Xto the format used historically on many mainframes and
Xminicomputers). This format was overly complex and required
Xconsiderable overhead in volume and header records. Furthermore,
Xthe standard developers felt that it would not be acceptable to
Xthe community of POSIX developers, so it was later changed to be a
Xformat more closely related to historical practice on POSIX
Xsystems.
X.PP
XThe
X.I prefix
Xand 
X.I name 
Xsplit of pathnames in 
X.B ustar 
Xwas replaced by
Xthe single path extended header record for simplicity.
X.PP
XThe concept of a global extended header 
X.RB "(typeflag" " g" )
Xwas
Xcontroversial. If this were applied to an archive being recorded
Xon magnetic tape, a few unreadable blocks at the beginning of the
Xtape could be a serious problem; a utility attempting to extract
Xas many files as possible from a damaged archive could lose a
Xlarge percentage of file header information in this case. However,
Xif the archive were on a reliable medium, such as a CD-ROM, the
Xglobal extended header offers considerable potential size
Xreductions by eliminating redundant information. Thus, the text
Xwarns against using the global method for unreliable media and
Xprovides a method for implanting global information in the
Xextended header for each file, rather than in the
X.IB typeflag " g
Xrecords.
X.PP
XNo facility for data translation or filtering on a per-file basis
Xis included because the standard developers could not invent an
Xinterface that would allow this in an efficient manner. If a
Xfilter, such as encryption or compression, is to be applied to all
Xthe files, it is more efficient to apply the filter to the entire
Xarchive as a single file. The standard developers considered
Xinterfaces that would invoke a shell script for each file going
Xinto or out of the archive, but the system overhead in this
Xapproach was considered to be too high.
X.PP
XOne such approach would be to have 
X.B filter= 
Xrecords that give a
Xpathname for an executable. When the program is invoked, the file
Xand archive would be open for standard input/output and all the
Xheader fields would be available as environment variables or
Xcommand-line arguments. The standard developers did discuss such
Xschemes, but they were omitted from IEEE Std 1003.1-2001 due to
Xconcerns about excessive overhead. Also, the program itself would
Xneed to be in the archive if it were to be used portably.
X.PP
XThere is currently no portable means of identifying the character
Xset(s) used for a file in the file system. Therefore, 
X.B pax 
Xhas not
Xbeen given a mechanism to generate charset records automatically.
XThe only portable means of doing this is for the user to write the
Xarchive using the 
X.IR "\-o charset=" string
Xcommand line option. This
Xassumes that all of the files in the archive use the same
Xencoding. The "implementation-defined" text is included to allow
Xfor a system that can identify the encodings used for each of its
Xfiles.
X.PP
XThe table of standards that accompanies the charset record
Xdescription is acknowledged to be very limited. Only a limited
Xnumber of character set standards is reasonable for maximal
Xinterchange. Any character set is, of course, possible by prior
Xagreement. It was suggested that EBCDIC be listed, but it was
Xomitted because it is not defined by a formal standard. Formal
Xstandards, and then only those with reasonably large followings,
Xcan be included here, simply as a matter of practicality. The
X.IR <value> s
Xrepresent names of officially registered character sets
Xin the format required by the ISO 2375:1985 standard.
X.PP
XThe normal comma or <blank>-separated list rules are not followed
Xin the case of keyword options to allow ease of argument parsing
Xfor 
X.BR getopts .
X.PP
XFurther information on character encodings is in 
X.B pax 
XArchive
X.BR "Character Set Encoding/Decoding" .
X.PP
XThe standard developers have reserved keyword name space for
Xvendor extensions. It is suggested that the format to be used is:
X.PP
X.BI "    VENDOR." keyword
X.PP
Xwhere 
X.B VENDOR 
Xis the name of the vendor or organization in all
Xuppercase letters. It is further suggested that the keyword
Xfollowing the period be named differently than any of the standard
Xkeywords so that it could be used for future standardization, if
Xappropriate, by omitting the 
X.B VENDOR 
Xprefix.
X.PP
XThe 
X.RI < length >
Xfield in the extended header record was included to
Xmake it simpler to step through the records, even if a record
Xcontains an unknown format (to a particular 
X.BR pax )
Xwith complex
Xinteractions of special characters. It also provides a minor
Xintegrity checkpoint within the records to aid a program
Xattempting to recover files from a damaged archive.
X.PP
XThere are no extended header versions of the 
X.I devmajor 
Xand 
X.I devminor
Xfields because the unspecified format 
X.B ustar 
Xheader field should be
Xsufficient. If they are not, vendor-specific extended keywords
X(such as 
X.BR VENDOR.devmajor )
Xshould be used.
X.PP
XDevice and i-number labeling of files was not adopted from 
X.BR cpio ;
Xfiles are interchanged strictly on a symbolic name basis, as in
X.BR ustar .
X.PP
XJust as with the 
X.B ustar 
Xformat descriptions, the new format makes
Xno special arrangements for multi-volume archives. Each of the 
X.B pax
Xarchive types is assumed to be inside a single POSIX file and
Xsplitting that file over multiple volumes (diskettes, tape
Xcartridges, and so on), processing their labels, and mounting each
Xin the proper sequence are considered to be implementation details
Xthat cannot be described portably.
X.PP
XThe 
X.B pax 
Xformat is intended for interchange, not only for backup on
Xa single (family of) systems. It is not as densely packed as might
Xbe possible for backup:
X.TP
X.B \(bu
XIt contains information as coded characters that could be
Xcoded in binary.
X.TP
X.B \(bu
XIt identifies extended records with name fields that could be
Xomitted in favor of a fixed-field layout.
X.TP
X.B \(bu
XIt translates names into a portable character set and
Xidentifies locale-related information, both of which are
Xprobably unnecessary for backup.
X.PP
XThe requirements on restoring from an archive are slightly
Xdifferent from the historical wording, allowing for non-monolithic
Xprivilege to bring forward as much as possible. In particular,
Xattributes such as "high performance file" might be broadly but
Xnot universally granted while set-user-ID or 
X.BR chown (2)
Xmight be much
Xmore restricted. There is no implication in IEEE Std 1003.1-2001
Xthat the security information be honored after it is restored to
Xthe file hierarchy, in spite of what might be improperly inferred
Xby the silence on that topic. That is a topic for another
Xstandard.
X.PP
XLinks are recorded in the fashion described here because a link
Xcan be to any file type. It is desirable in general to be able to
Xrestore part of an archive selectively and restore all of those
Xfiles completely. If the data is not associated with each link, it
Xis not possible to do this. However, the data associated with a
Xfile can be large, and when selective restoration is not needed,
Xthis can be a significant burden. The archive is structured so
Xthat files that have no associated data can always be restored by
Xthe name of any link name of any link, and the user may choose
Xwhether data is recorded with each instance of a file that
Xcontains data. The format permits mixing of both types of links in
Xa single archive; this can be done for special needs, and 
X.B pax 
Xis
Xexpected to interpret such archives on input properly, despite the
Xfact that there is no 
X.B pax 
Xoption that would force this mixed case
Xon output. (When 
X.BI \-o " linkdata 
Xis used, the output must contain the
Xduplicate data, but the implementation is free to include it or
Xomit it when 
X.BI \-o " linkdata 
Xis not used.)
X.PP
XThe time values are included as extended header records for those
Ximplementations needing more than the eleven octal digits allowed
Xby the 
X.B ustar 
Xformat. Portable file timestamps cannot be negative.
XIf 
X.B pax 
Xencounters a file with a negative timestamp in 
X.B copy 
Xor
X.B write 
Xmode, it can reject the file, substitute a non-negative
Xtimestamp, or generate a non-portable timestamp with a leading
X\&'\-'. Even though some implementations can support finer file-time
Xgranularities than seconds, the normative text requires support
Xonly for seconds since the Epoch because the ISO POSIX-1 standard
Xstates them that way. The 
X.B ustar 
Xformat includes only 
X.IR mtime ;
Xthe
Xnew format adds 
X.I atime 
Xand 
X.I ctime 
Xfor symmetry. The atime access
Xtime restored to the file system will be affected by the 
X.BI \-p " a
Xand
X.BI \-p " e
Xoptions. The 
X.I ctime 
Xcreation time (actually 
X.I inode 
Xmodification
Xtime) is described with "appropriate privilege" so that it can be
Xignored when writing to the file system. POSIX does not provide a
Xportable means to change file creation time. Nothing is intended
Xto prevent a non-portable implementation of 
X.B pax 
Xfrom restoring the
Xvalue.
X.PP
XThe 
X.IR gid ,
X.IR size ,
Xand 
X.I uid 
Xextended header records were included to
Xallow expansion beyond the sizes specified in the regular 
X.B tar
Xheader. New file system architectures are emerging that will
Xexhaust the 12-digit size field. There are probably not many
Xsystems requiring more than 8 digits for user and group IDs, but
Xthe extended header values were included for completeness,
Xallowing overrides for all of the decimal values in the 
X.B tar
Xheader.
X.PP
XThe standard developers intended to describe the effective results
Xof 
X.B pax 
Xwith regard to file ownerships and permissions;
Ximplementations are not restricted in timing or sequencing the
Xrestoration of such, provided the results are as specified.
X.PP
XMuch of the text describing the extended headers refers to use in
X"\fBwrite\fP or \fBcopy\fP modes". The 
X.B copy 
Xmode references are due to the
Xnormative text: "The effect of the copy shall be as if the copied
Xfiles were written to an archive file and then subsequently
Xextracted ...". There is certainly no way to test whether 
X.B pax 
Xis
Xactually generating the extended headers in 
X.B copy 
Xmode, but the
Xeffects must be as if it had.
X
X.SS "pax Archive Character Set Encoding/Decoding
X.PP
XThere is a need to exchange archives of files between systems of
Xdifferent native codesets. Filenames, group names, and user names
Xmust be preserved to the fullest extent possible when an archive
Xis read on the receiving platform. Translation of the contents of
Xfiles is not within the scope of the 
X.B pax 
Xutility.
X.PP
XThere will also be the need to represent characters that are not
Xavailable on the receiving platform. These unsupported characters
Xcannot be automatically folded to the local set of characters due
Xto the chance of collisions. This could result in overwriting
Xprevious extracted files from the archive or pre-existing files on
Xthe system.
X.PP
XFor these reasons, the codeset used to represent characters within
Xthe extended header records of the 
X.B pax 
Xarchive must be
Xsufficiently rich to handle all commonly used character sets. The
Xfields requiring translation include, at a minimum, filenames,
Xuser names, group names, and link pathnames. Implementations may
Xwish to have localized extended keywords that use non-portable
Xcharacters.
X.PP
XThe standard developers considered the following options:
X.TP
X.B \(bu
XThe archive creator specifies the well-defined name of the
Xsource codeset. The receiver must then recognize the codeset
Xname and perform the appropriate translations to the
Xdestination codeset.
X.TP
X.B \(bu
XThe archive creator includes within the archive the character
Xmapping table for the source codeset used to encode extended
Xheader records. The receiver must then read the character
Xmapping table and perform the appropriate translations to the
Xdestination codeset.
X.TP
X.B \(bu
XThe archive creator translates the extended header records in
Xthe source codeset into a canonical form. The receiver must
Xthen perform the appropriate translations to the destination
Xcodeset.
X.PP
XThe approach that incorporates the name of the source codeset
Xposes the problem of codeset name registration, and makes the
Xarchive useless to 
X.B pax 
Xarchive decoders that do not recognize that
Xcodeset.
X.PP
XBecause parts of an archive may be corrupted, the standard
Xdevelopers felt that including the character map of the source
Xcodeset was too fragile. The loss of this one key component could
Xresult in making the entire archive useless. (The difference
Xbetween this and the global extended header decision was that the
Xlatter has a workaround-duplicating extended header records on
Xunreliable media-but this would be too burdensome for large
Xcharacter set maps.)
X.PP
XBoth of the above approaches also put an undue burden on the 
X.B pax
Xarchive receiver to handle the cross-product of all source and
Xdestination codesets.
X.PP
XTo simplify the translation from the source codeset to the
Xcanonical form and from the canonical form to the destination
Xcodeset, the standard developers decided that the internal
Xrepresentation should be a stateless encoding. A stateless
Xencoding is one where each codepoint has the same meaning, without
Xregard to the decoder being in a specific state. An example of a
Xstateful encoding would be the Japanese Shift-JIS; an example of a
Xstateless encoding would be the ISO/IEC 646:1991 standard
X(equivalent to 7-bit ASCII).
X.PP
XFor these reasons, the standard developers decided to adopt a
Xcanonical format for the representation of file information
Xstrings. The obvious, well-endorsed candidate is the
XISO/IEC 10646-1:2000 standard (based in part on Unicode), which
Xcan be used to represent the characters of virtually all
Xstandardized character sets. The standard developers initially
Xagreed upon using UCS2 (16-bit Unicode) as the internal
Xrepresentation. This repertoire of characters provides a
Xsufficiently rich set to represent all commonly-used codesets.
X.PP
XHowever, the standard developers found that the 16-bit Unicode
Xrepresentation had some problems. It forced the issue of
Xstandardizing byte ordering. The 2-byte length of each character
Xmade the extended header records twice as long for the case of
Xstrings coded entirely from historical 7-bit ASCII. For these
Xreasons, the standard developers chose the UTF-8 defined in the
XISO/IEC 10646-1:2000 standard. This multi-byte representation
Xencodes UCS2 or UCS4 characters reliably and deterministically,
Xeliminating the need for a canonical byte ordering. In addition,
XNUL octets and other characters possibly confusing to POSIX file
Xsystems do not appear, except to represent themselves. It was
Xrealized that certain national codesets take up more space after
Xthe encoding, due to their placement within the UCS range; it was
Xfelt that the usefulness of the encoding of the names outweighs
Xthe disadvantage of size increase for file, user, and group names.
X.PP
X.sp
X.ne 10
XThe encoding of UTF-8 is as follows:
X.PP
X.TS
Xlb lb
Xl l.
XUCS4 Hex Encoding	UTF-8 Binary Encoding
X00000000-0000007F	0xxxxxxx
X00000080-000007FF	110xxxxx 10xxxxxx
X00000800-0000FFFF	1110xxxx 10xxxxxx 10xxxxxx
X00010000-001FFFFF	11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
X00200000-03FFFFFF	111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
X04000000-7FFFFFFF	1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
X.TE
X.PP
Xwhere each '\fIx\fP' represents a bit value from the character being
Xtranslated.
X
X.SS "ustar Interchange Format
X.PP
XThe description of the 
X.B ustar 
Xformat reflects numerous enhancements
Xover pre-1988 versions of the historical 
X.B tar 
Xutility. The goal of
Xthese changes was not only to provide the functional enhancements
Xdesired, but also to retain compatibility between new and old
Xversions. This compatibility has been retained. Archives written
Xusing the old archive format are compatible with the new format.
X.PP
XImplementors should be aware that the previous file format did not
Xinclude a mechanism to archive directory type files. For this
Xreason, the convention of using a filename ending with slash was
Xadopted to specify a directory on the archive.
X.PP
XThe total size of the 
X.I name 
Xand 
X.I prefix 
Xfields have been set to meet
Xthe minimum requirements for 
X.IR {PATH_MAX} 
XIf a pathname will fit
Xwithin the 
X.I name 
Xfield, it is recommended that the pathname be
Xstored there without the use of the 
X.I prefix 
Xfield. Although the
Xname field is known to be too small to contain 
X.I {PATH_MAX}
Xcharacters, the value was not changed in this version of the
Xarchive file format to retain backwards-compatibility, and instead
Xthe
X.I prefix 
Xwas introduced. Also, because of the earlier version of
Xthe format, there is no way to remove the restriction on the
X.I linkname 
Xfield being limited in size to just that of the 
X.I name
Xfield.
X.PP
XThe 
X.I size 
Xfield is required to be meaningful in all implementation
Xextensions, although it could be zero. This is required so that
Xthe data blocks can always be properly counted.
X.PP
XIt is suggested that if device special files need to be
Xrepresented that cannot be represented in the standard format,
Xthat one of the extension types
X.RB ( A \- Z )
Xbe used, and that the
Xadditional information for the special file be represented as data
Xand be reflected in the 
X.I size 
Xfield.
X.PP
XAttempting to restore a special file type, where it is converted
Xto ordinary data and conflicts with an existing filename, need not
Xbe specially detected by the utility. If run as an ordinary user,
X.B pax 
Xshould not be able to overwrite the entries in, for example,
X.B /dev 
Xin any case (whether the file is converted to another type or
Xnot). If run as a privileged user, it should be able to do so, and
Xit would be considered a bug if it did not. The same is true of
Xordinary data files and similarly named special files; it is
Ximpossible to anticipate the needs of the user (who could really
Xintend to overwrite the file), so the behavior should be
Xpredictable (and thus regular) and rely on the protection system
Xas required.
X.PP
XThe value 
X.B 7 
Xin the 
X.I typeflag 
Xfield is intended to define how
Xcontiguous files can be stored in a 
X.B ustar 
Xarchive.
XIEEE Std 1003.1-2001 does not require the contiguous file
Xextension, but does define a standard way of archiving such files
Xso that all conforming systems can interpret these file types in a
Xmeaningful and consistent manner. On a system that does not
Xsupport extended file types, the 
X.B pax 
Xutility should do the best it
Xcan with the file and go on to the next.
X.PP
XThe file protection modes are those conventionally used by the 
X.BR ls (1)
Xutility. This is extended beyond the usage in the ISO POSIX-2
Xstandard to support the "shared text" or "sticky" bit. It is
Xintended that the conformance document should not document
Xanything beyond the existence of and support of such a mode.
XFurther extensions are expected to these bits, particularly with
Xoverloading the set-user-ID and set-group-ID flags.
X
X.SS "cpio Interchange Format
X.PP
XThe reference to appropriate privilege in the 
X.B cpio 
Xformat refers
Xto an error on standard output; the 
X.B ustar 
Xformat does not make
Xcomparable statements.
X.PP
XThe model for this format was the historical System V 
X.B "cpio \-c 
Xdata
Xinterchange format. This model documents the portable version of
Xthe 
X.B cpio 
Xformat and not the binary version. It has the flexibility
Xto transfer data of any type described within
XIEEE Std 1003.1-2001, yet is extensible to transfer data types
Xspecific to extensions beyond IEEE Std 1003.1-2001 (for example,
Xcontiguous files). Because it describes existing practice, there
Xis no question of maintaining upwards-compatibility.
X
X.SS "cpio Header
X.PP
XThere has been some concern that the size of the 
X.I c_ino 
Xfield of
Xthe header is too small to handle those systems that have very
Xlarge inode numbers. However, the 
X.I c_ino 
Xfield in the header is
Xused strictly as a hard-link resolution mechanism for archives. It
Xis not necessarily the same value as the inode number of the file
Xin the location from which that file is extracted.
X.PP
XThe name 
X.I c_magic 
Xis based on historical usage.
X
X.SS "cpio Filename
X.PP
XFor most historical implementations of the 
X.B cpio 
Xutility,
X.I {PATH_MAX} 
Xoctets can be used to describe the pathname without the
Xaddition of any other header fields (the NUL character would be
Xincluded in this count). 
X.I {PATH_MAX} 
Xis the minimum value for
Xpathname size, documented as 256 bytes. However, an implementation
Xmay use 
X.I c_namesize 
Xto determine the exact length of the pathname.
XWith the current description of the 
X.B <cpio.h> 
Xheader, this pathname
Xsize can be as large as a number that is described in six octal
Xdigits.
X.PP
XTwo values are documented under the 
X.I c_mode
Xfield values to provide
Xfor extensibility for known file types:
X.TP
X.B "0110 000
XReserved for contiguous files. The implementation may treat
Xthe rest of the information for this archive like a regular
Xfile. If this file type is undefined, the implementation may
Xcreate the file as a regular file.
X.PP
XThis provides for extensibility of the 
X.B cpio 
Xformat while allowing
Xfor the ability to read old archives. Files of an unknown type may
Xbe read as "regular files" on some implementations. On a system
Xthat does not support extended file types, the 
X.B pax 
Xutility should
Xdo the best it can with the file and go on to the next.
X
X.SH "FUTURE DIRECTIONS
X.PP
XNone.
X
X.ne 5
X.PP
X.HD "End of informative sections."
X.RU
X
X.SH "SEE ALSO
X.PP
XShell Command Language, 
X.BR cp (1), 
X.BR ed (1), 
X.BR getopts (1), 
X.BR ls (1),
X.BR printf (3),
Xthe Base
XDefinitions volume of IEEE Std 1003.1-2001, 
X.BR <cpio.h> ,
Xthe System
XInterfaces volume of IEEE Std 1003.1-2001, 
X.BR chown (2), 
X.BR creat (2),
X.BR mkdir (2),
X.BR mkfifo (2),
X.BR stat (2),
X.BR utime (2),
X.BR write (2).
X
X.SH "CHANGE HISTORY
X.PP
XFirst released in Issue 4.
X
X.SS "Issue 5
X.PP
XA note is added to the APPLICATION USAGE indicating that the 
X.B cpio
Xand 
X.B tar 
Xformats can only support files up to 8 gigabytes in size.
X
X.SS "Issue 6
X.PP
XThe 
X.B pax 
Xutility is aligned with the IEEE P1003.2b draft standard:
X.TP
X.B \(bu
XSupport has been added for symbolic links in the options and
Xinterchange formats.
X.TP
X.B \(bu
XA new format has been devised, based on extensions to 
X.BR ustar .
X.TP
X.B \(bu
XReferences to the "extended" 
X.B tar 
Xand 
X.B cpio 
Xformats derived
Xfrom the POSIX.1-1990 standard have been changed to remove
Xthe "extended" adjective because this could cause confusion
Xwith the extended 
X.B tar 
Xheader added in this revision. (All
Xreferences to tar are actually to 
X.BR ustar .)
X.PP
XThe 
X.B TZ 
Xentry is added to the ENVIRONMENT VARIABLES section.
X.PP
XIEEE PASC Interpretation 1003.2 #168 is applied, clarifying that
X.BR mkdir (2)
Xand 
X.BR mkfifo (2)
Xcalls can ignore an [EEXIST] error when
Xextracting an archive.
X.PP
XIEEE PASC Interpretation 1003.2 #180 is applied, clarifying how
Xextracted files are created when in 
X.B read 
Xmode.
X.PP
XIEEE PASC Interpretation 1003.2 #181 is applied, clarifying the
Xdescription of the 
X.B \-t 
Xoption.
X.PP
XIEEE PASC Interpretation 1003.2 #195 is applied.
X.PP
XIEEE PASC Interpretation 1003.2 #206 is applied, clarifying the
Xhandling of links for the 
X.BR \-H ,
X.BR \-L ,
Xand 
X.B \-l 
Xoptions.
X.PP
XIEEE Std 1003.1-2001/Cor 1-2002, item XCU/TC1/D6/35 is applied,
Xadding the process ID of the 
X.B pax 
Xprocess into certain fields. This
Xchange provides a method for the implementation to ensure that
Xdifferent instances of 
X.B pax 
Xextracting a file named 
X.B /a/b/foo 
Xwill
Xnot collide when processing the extended header information
Xassociated with 
X.BR foo .
X.PP
XIEEE Std 1003.1-2001/Cor 1-2002, item XCU/TC1/D6/36 is applied,
Xchanging 
X.B "\-x B 
Xto 
X.B "\-x pax 
Xin the OPTIONS section.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/20 is applied,
Xupdating the SYNOPSIS to be consistent with the normative text.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/21 is applied,
Xupdating the DESCRIPTION to describe the behavior when files to be
Xlinked are symbolic links and the system is not capable of making
Xhard links to symbolic links.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/22 is applied,
Xupdating the OPTIONS section to describe the behavior for how
Xmultiple 
X.BI \"-o delete=" pattern
Xoptions are to be handled.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/23 is applied,
Xupdating the 
X.B write 
Xoption within the OPTIONS section.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/24 is applied,
Xadding a paragraph into the OPTIONS section that states that
Xspecifying more than one of the mutually-exclusive options 
X.RB ( \-H
Xand 
X.BR \-L )
Xis not considered an error and that the last option
Xspecified will determine the behavior of the utility.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/25 is applied,
Xremoving the 
X.I ctime 
Xparagraph within the EXTENDED DESCRIPTION.
XThere is a contradiction in the definition of the 
X.I ctime 
Xkeyword
Xfor the 
X.B pax 
Xextended header, in that the 
X.I st_ctime 
Xmember of the
X.B stat 
Xstructure does not refer to a file creation time. No field in
Xthe standard stat structure from 
X.B <sys/stat.h> 
Xincludes a file
Xcreation time.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/26 is applied,
Xmaking it clear that 
X.I typeflag 
X.B 1 
XRB ( ustar 
XInterchange Format)
Xapplies not only to files that are hard-linked, but also to files
Xthat are aliased via symlinks.
X.PP
XIEEE Std 1003.1-2001/Cor 2-2004, item XCU/TC2/D6/27 is applied,
Xclarifying the 
X.B cpio 
X.I c_nlink
Xfield.
X.PP
XEnd of quoted text from the POSIX.1-2001 standard.
X. \" .SH RETURNS
X. \" .SH ERRORS
X.SH OPTIONS
XThe following 
X.I "other options
Xare implemented as extension to the POSIX standard:
X.TP
X.B \-help
XPrints a summary of the most important options for
X.BR spax (1)
Xand exits.
X.TP
X.B \-xhelp
XPrints a summary of the less important options for
X.BR spax (1)
Xand exits.
X.TP
X.B \-version
XPrints the 
X.B spax
Xversion number string and exists.
X
X.SH EXAMPLES
X.SH ENVIRONMENT
X.SH FILES
X.SH "SEE ALSO"
X.SH DIAGNOSTICS
X.SH NOTES
X.PP
XThe Institute of Electrical and Electronics Engineers and The Open Group,
Xhave given us permission to reprint portions of their documentation. In
Xthe following statement, the phrase ``this text'' refers to portions of
Xthe system documentation.
X.PP
XPortions of this text are reprinted and reproduced in electronic form
Xin the 
X.B sfind 
Xmanual,
Xfrom IEEE Std 1003.1, 2004 Edition, Standard for
XInformation Technology -- Portable Operating System Interface (POSIX),
XThe Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by
Xthe Institute of Electrical and Electronics Engineers, Inc and The Open
XGroup. In the event of any discrepancy between these versions and the
Xoriginal IEEE and The Open Group Standard, the original IEEE and The
XOpen Group Standard is the referee document. The original Standard can
Xbe obtained online at 
X.BR "http://www.opengroup.org/unix/online.html" .
X.SH BUGS
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xschilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu\-berlin.de
END-of-star-1.5.2/star/spax.1
echo x - star-1.5.2/star/hole.c
sed 's/^X//' >star-1.5.2/star/hole.c << 'END-of-star-1.5.2/star/hole.c'
X/* @(#)hole.c	1.61 11/04/08 Copyright 1993-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)hole.c	1.61 11/04/08 Copyright 1993-2011 J. Schilling";
X#endif
X/*
X *	Handle files with holes (sparse files)
X *
X *	Copyright (c) 1993-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/errno.h>
X#include <schily/standard.h>
X#include "star.h"
X#include <schily/schily.h>
X#include "props.h"
X#include "table.h"
X#include "starsubs.h"
X#include "checkerr.h"
X#ifdef	sun
X#	include <sys/filio.h>
X#	if	_FIOAI == _FIOOBSOLETE67
X#	undef	_FIOAI
X#	endif
X#	ifdef	_FIOAI
X#	include <sys/fs/ufs_filio.h>
X#	endif
X#endif	/* sun */
X
X#ifdef	SEEK_DEBUG
X#define	SEEK_DATA	3
X#define	SEEK_HOLE	4
X#endif
X
X/*
X * Initial sparse (sp_t) array allocation.
X * We currently use SPARSE_IN_HDR + SPARSE_EXT_HDR,
X * if we implement a new POSIX.1-2001 based sparse file handling method, we
X * need to rething this ad it would make sense to start with 512 (8 KB).
X */
X#define	NSPARSE_INIT	25
X
X#define	DEBUG
X#ifdef DEBUG
X#define	EDEBUG(a)	if (debug) error a
X#else
X#define	EDEBUG(a)
X#endif
X
Xextern	long	bigcnt;
Xextern	char	*bigptr;
X
Xextern	BOOL	debug;
Xextern	BOOL	force_hole;
Xextern	BOOL	nullout;
X
X/*
X * XXX If we have really big files, there could in theory be more than
X * XXX 2 billions of hole/nohole pairs in a file.
X * XXX But if this happens, we would need > 32 GB of RAM for the hole list.
X */
Xtypedef	struct {
X	FILE	*fh_file;
X	char	*fh_name;
X	off_t	fh_size;
X	off_t	fh_newpos;
X	sp_t	*fh_sparse;
X	int	fh_nsparse;
X	int	fh_spindex;
X	int	fh_diffs;
X} fh_t;
X
XLOCAL	int	force_hole_func	__PR((fh_t *fh, char *p, int amount));
XEXPORT	int	get_forced_hole	__PR((FILE *f, FINFO *info));
XLOCAL	void	bad_sparse_index __PR((fh_t *fh));
XLOCAL	int	get_sparse_func	__PR((fh_t *fh, char *p, int amount));
XLOCAL	int	get_ssparse_func __PR((fh_t *fh, char *p, int amount));
XLOCAL	int	cmp_sparse_func	__PR((fh_t *fh, char *p, int amount));
XLOCAL	int	put_sparse_func	__PR((fh_t *fh, char *p, int amount));
XLOCAL	sp_t	*grow_sp_list	__PR((sp_t *sparse, int *nspp));
XLOCAL	sp_t	*get_sp_list	__PR((FINFO *info, int *nsparsep));
XLOCAL	int	mk_sp_list	__PR((int *fp, FINFO *info, sp_t **spp));
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
XLOCAL	int	smk_sp_list	__PR((int f, FINFO *info, sp_t **spp, off_t hpos));
X#endif
XLOCAL	int	get_end_hole	__PR((fh_t *fh));
XLOCAL	int	write_end_hole	__PR((fh_t *fh));
XEXPORT	int	gnu_skip_extended __PR((FINFO *info));
XEXPORT	int	get_sparse	__PR((FILE *f, FINFO *info));
XEXPORT	int	get_as_hole	__PR((FILE *f, FINFO *info));
XEXPORT	BOOL	cmp_sparse	__PR((FILE *f, FINFO *info));
XEXPORT	void	put_sparse	__PR((int *fp, FINFO *info));
XLOCAL	void	put_sp_list	__PR((FINFO *info, sp_t *sparse, int nsparse));
XEXPORT	BOOL	sparse_file	__PR((int *fp, FINFO *info));
X
X#define	vp_force_hole_func ((int(*)__PR((void *, char *, int)))force_hole_func)
X
XLOCAL int
Xforce_hole_func(fh, p, amount)
X	register fh_t	*fh;
X	register char	*p;
X		int	amount;
X{
X	register int	cnt;
X
X	fh->fh_newpos += amount;
X	if (amount < fh->fh_size &&
X				cmpnullbytes(bigptr, amount) >= amount) {
X		if (lseek(fdown(fh->fh_file), fh->fh_newpos, SEEK_SET) == (off_t)-1) {
X			if (!errhidden(E_WRITE, fh->fh_name)) {
X				if (!errwarnonly(E_WRITE, fh->fh_name))
X					xstats.s_rwerrs++;
X				errmsg("Error seeking '%s'.\n", fh->fh_name);
X				(void) errabort(E_WRITE, fh->fh_name, TRUE);
X			}
X		}
X
X		fh->fh_size -= amount;
X		return (amount);
X	}
X	cnt = ffilewrite(fh->fh_file, p, amount);
X	fh->fh_size -= amount;
X	return (cnt);
X}
X
XEXPORT BOOL
Xget_forced_hole(f, info)
X	FILE	*f;
X	FINFO	*info;
X{
X	fh_t	fh;
X
X	fh.fh_file = f;
X	fh.fh_name = info->f_name;
X	fh.fh_size = info->f_rsize;
X	fh.fh_newpos = (off_t)0;
X	return (xt_file(info, vp_force_hole_func, &fh, TBLOCK, "writing"));
X}
X
XLOCAL void
Xbad_sparse_index(fh)
X	register fh_t	*fh;
X{
X	errmsgno(EX_BAD,
X		"Trying to access sparse aray beyond end (index %d).\n",
X							fh->fh_spindex);
X}
X
X/*
X * Get "amount" bytes from the buffer and write it into the file.
X * If "amount" spans more then a single data chunk in the resulting file,
X * cut it into several chunks that probably start with a seek and get this
X * done by get_ssparse_func().
X */
X#define	vp_get_sparse_func ((int(*)__PR((void *, char *, int)))get_sparse_func)
XLOCAL int
Xget_sparse_func(fh, p, amount)
X	register fh_t	*fh;
X	register char	*p;
X	register int	amount;
X{
X	register int	cnt = 0;
X	register int	amt;
X	off_t		next_hole;
X	off_t		newpos = fh->fh_newpos;
X
X	do {
X		if (fh->fh_spindex >= fh->fh_nsparse) {
X			seterrno(EX_BAD);
X			bad_sparse_index(fh);
X			return (-1);
X		}
X		if (fh->fh_sparse[fh->fh_spindex].sp_offset > newpos) {
X			newpos = fh->fh_sparse[fh->fh_spindex].sp_offset;
X		} else {
X			newpos = fh->fh_newpos;
X		}
X		next_hole = fh->fh_sparse[fh->fh_spindex].sp_offset +
X				fh->fh_sparse[fh->fh_spindex].sp_numbytes;
X		amt = amount - cnt;
X		if ((newpos + amt) > next_hole)
X			amt = next_hole - newpos;
X		amt = get_ssparse_func(fh, p, amt);
X		if (amt < 0)
X			return (-1);
X		cnt += amt;
X		p += amt;
X	} while (cnt < amount);
X	return (cnt);
X}
X
X/*
X * Get a single chunk of data from the buffer and write it into the file.
X */
XLOCAL int
Xget_ssparse_func(fh, p, amount)
X	register fh_t	*fh;
X	register char	*p;
X		int	amount;
X{
X	register int	cnt;
X
X	EDEBUG(("amount: %d newpos: %lld index: %d\n",
X					amount, (Llong)fh->fh_newpos, fh->fh_spindex));
X
X	if (fh->fh_sparse[fh->fh_spindex].sp_offset > fh->fh_newpos) {
X
X		EDEBUG(("seek to: %lld\n",
X				(Llong)fh->fh_sparse[fh->fh_spindex].sp_offset));
X
X		if (lseek(fdown(fh->fh_file),
X				fh->fh_sparse[fh->fh_spindex].sp_offset, SEEK_SET) < 0) {
X			if (!errhidden(E_WRITE, fh->fh_name)) {
X				if (!errwarnonly(E_WRITE, fh->fh_name))
X					xstats.s_rwerrs++;
X				errmsg("Error seeking '%s'.\n", fh->fh_name);
X				(void) errabort(E_WRITE, fh->fh_name, TRUE);
X			}
X		}
X
X		fh->fh_newpos = fh->fh_sparse[fh->fh_spindex].sp_offset;
X	}
X	EDEBUG(("write %d at: %lld\n", amount, (Llong)fh->fh_newpos));
X
X	cnt = ffilewrite(fh->fh_file, p, amount);
X	fh->fh_size -= cnt;
X	fh->fh_newpos += cnt;
X
X	EDEBUG(("off: %lld numb: %lld cnt: %d off+numb: %lld newpos: %lld index: %d\n",
X		(Llong)fh->fh_sparse[fh->fh_spindex].sp_offset,
X		(Llong)fh->fh_sparse[fh->fh_spindex].sp_numbytes, cnt,
X		(Llong)(fh->fh_sparse[fh->fh_spindex].sp_offset +
X			fh->fh_sparse[fh->fh_spindex].sp_numbytes),
X		(Llong)fh->fh_newpos,
X		fh->fh_spindex));
X
X	if ((fh->fh_sparse[fh->fh_spindex].sp_offset +
X	    fh->fh_sparse[fh->fh_spindex].sp_numbytes)
X	    <= fh->fh_newpos) {
X
X		fh->fh_spindex++;
X
X		EDEBUG(("new index: %d\n", fh->fh_spindex));
X	}
X	EDEBUG(("return (%d)\n", cnt));
X	return (cnt);
X}
X
X#define	vp_cmp_sparse_func ((int(*)__PR((void *, char *, int)))cmp_sparse_func)
X
XLOCAL int
Xcmp_sparse_func(fh, p, amount)
X	register fh_t	*fh;
X	register char	*p;
X		int	amount;
X{
X	register int	cnt;
X		char	*cmp_buf[TBLOCK];
X
X	EDEBUG(("amount: %d newpos: %lld index: %d\n",
X					amount,
X					(Llong)fh->fh_newpos, fh->fh_spindex));
X
X	if (fh->fh_spindex >= fh->fh_nsparse) {
X		seterrno(EX_BAD);
X		bad_sparse_index(fh);
X		return (-1);
X	}
X
X	/*
X	 * If we already found diffs we save time and only pass tape ...
X	 */
X	if (fh->fh_diffs)
X		return (amount);
X
X	if (fh->fh_sparse[fh->fh_spindex].sp_offset > fh->fh_newpos) {
X		EDEBUG(("seek to: %lld\n",
X				(Llong)fh->fh_sparse[fh->fh_spindex].sp_offset));
X
X		while (fh->fh_newpos < fh->fh_sparse[fh->fh_spindex].sp_offset) {
X			register int	amt;
X
X			amt = min(TBLOCK,
X				fh->fh_sparse[fh->fh_spindex].sp_offset -
X				fh->fh_newpos);
X
X			cnt = ffileread(fh->fh_file, cmp_buf, amt);
X			if (cnt != amt)
X				fh->fh_diffs++;
X
X			if (cmpnullbytes(cmp_buf, amt) < cnt)
X				fh->fh_diffs++;
X
X			fh->fh_newpos += cnt;
X
X			if (fh->fh_diffs)
X				return (amount);
X		}
X	}
X	EDEBUG(("read %d at: %lld\n", amount, (Llong)fh->fh_newpos));
X
X	cnt = ffileread(fh->fh_file, cmp_buf, amount);
X	if (cnt != amount)
X		fh->fh_diffs++;
X
X	if (cmpbytes(cmp_buf, p, cnt) < cnt)
X		fh->fh_diffs++;
X
X	fh->fh_size -= cnt;
X	fh->fh_newpos += cnt;
X
X	EDEBUG(("off: %lld numb: %lld cnt: %d off+numb: %lld newpos: %lld index: %d\n",
X		(Llong)fh->fh_sparse[fh->fh_spindex].sp_offset,
X		(Llong)fh->fh_sparse[fh->fh_spindex].sp_numbytes, cnt,
X		(Llong)(fh->fh_sparse[fh->fh_spindex].sp_offset +
X			fh->fh_sparse[fh->fh_spindex].sp_numbytes),
X		(Llong)fh->fh_newpos,
X		fh->fh_spindex));
X
X	if ((fh->fh_sparse[fh->fh_spindex].sp_offset +
X	    fh->fh_sparse[fh->fh_spindex].sp_numbytes)
X	    <= fh->fh_newpos) {
X
X		fh->fh_spindex++;
X
X		EDEBUG(("new index: %d\n", fh->fh_spindex));
X	}
X	EDEBUG(("return (%d) diffs: %d\n", cnt, fh->fh_diffs));
X	return (cnt);
X}
X
X#define	vp_put_sparse_func ((int(*)__PR((void *, char *, int)))put_sparse_func)
X
XLOCAL int
Xput_sparse_func(fh, p, amount)
X	register fh_t	*fh;
X	register char	*p;
X		int	amount;
X{
X	register int	cnt;
X
X	EDEBUG(("amount: %d newpos: %lld index: %d\n",
X					amount,
X					(Llong)fh->fh_newpos, fh->fh_spindex));
X
X	if (fh->fh_spindex < fh->fh_nsparse &&
X		fh->fh_sparse[fh->fh_spindex].sp_offset > fh->fh_newpos) {
X
X		EDEBUG(("seek to: %lld\n",
X				(Llong)fh->fh_sparse[fh->fh_spindex].sp_offset));
X
X		if (!nullout &&
X		    lseek(*(int *)(fh->fh_file),
X				fh->fh_sparse[fh->fh_spindex].sp_offset, SEEK_SET) < 0) {
X			if (!errhidden(E_READ, fh->fh_name)) {
X				if (!errwarnonly(E_READ, fh->fh_name))
X					xstats.s_rwerrs++;
X				errmsg("Error seeking '%s'.\n", fh->fh_name);
X				(void) errabort(E_READ, fh->fh_name, TRUE);
X			}
X		}
X
X		fh->fh_newpos = fh->fh_sparse[fh->fh_spindex].sp_offset;
X	}
X	/*
X	 * I former times, cr_file has been called with an amt value of 512,
X	 * we now try to optimize the I/O for the data chunk size.
X	 * In case we are not yet at the expected end of the file, we limit the
X	 * the amount to the end of the current data region, else (when cr_file
X	 * tries to find whether the file did grow, we just pass the original.
X	 */
X	if (fh->fh_spindex < fh->fh_nsparse &&
X	    (fh->fh_newpos + amount) >
X	    (fh->fh_sparse[fh->fh_spindex].sp_offset +
X	    fh->fh_sparse[fh->fh_spindex].sp_numbytes)) {
X		amount =   (fh->fh_sparse[fh->fh_spindex].sp_offset +
X			    fh->fh_sparse[fh->fh_spindex].sp_numbytes) -
X			    fh->fh_newpos;
X	}
X	EDEBUG(("read %d at: %lld\n", amount, (Llong)fh->fh_newpos));
X
X	if (nullout) {
X		cnt = amount;
X		if (cnt > fh->fh_size)
X			cnt = fh->fh_size;
X	} else {
X		cnt = _fileread((int *)fh->fh_file, p, amount);
X	}
X	fh->fh_size -= cnt;
X	fh->fh_newpos += cnt;
X
X	EDEBUG(("off: %lld numb: %lld cnt: %d off+numb: %lld newpos: %lld index: %d\n",
X		(Llong)fh->fh_sparse[fh->fh_spindex].sp_offset,
X		(Llong)fh->fh_sparse[fh->fh_spindex].sp_numbytes, cnt,
X		(Llong)(fh->fh_sparse[fh->fh_spindex].sp_offset +
X			fh->fh_sparse[fh->fh_spindex].sp_numbytes),
X		(Llong)fh->fh_newpos,
X		fh->fh_spindex));
X
X	if ((fh->fh_sparse[fh->fh_spindex].sp_offset +
X	    fh->fh_sparse[fh->fh_spindex].sp_numbytes)
X	    <= fh->fh_newpos) {
X
X		fh->fh_spindex++;
X
X		EDEBUG(("new index: %d\n", fh->fh_spindex));
X	}
X	EDEBUG(("return (%d)\n", cnt));
X	return (cnt);
X}
X
XLOCAL sp_t *
Xgrow_sp_list(sparse, nspp)
X	sp_t	*sparse;
X	int	*nspp;
X{
X	sp_t	*new;
X
X	if (*nspp < 512)
X		*nspp *= 2;
X	else
X		*nspp += 512;
X	new = (sp_t *)realloc(sparse, *nspp*sizeof (sp_t));
X	if (new == 0) {
X		errmsg("Cannot grow sparse buf.\n");
X		free(sparse);
X	}
X	return (new);
X}
X
XLOCAL sp_t *
Xget_sp_list(info, nsparsep)
X	FINFO	*info;
X	int	*nsparsep;
X{
X	TCB	tb;
X	TCB	*ptb = info->f_tcb;
X	sp_t	*sparse;
X	int	nsparse = NSPARSE_INIT;
X	int	extended;
X	register int	i;
X	register int	sparse_in_hdr = props.pr_sparse_in_hdr;
X	register int	ind;
X		char	*p;
X	extern long hdrtype;	/* XXX */
X
X	EDEBUG(("rsize: %lld\n", (Llong)info->f_rsize));
X
X	sparse = (sp_t *)malloc(nsparse*sizeof (sp_t));
X	if (sparse == 0) {
X		errmsg("Cannot alloc sparse buf.\n");
X		*nsparsep = 0;
X		return (sparse);
X	}
X
X	if (H_TYPE(hdrtype) == H_GNUTAR) {
X		p = (char *)ptb->gnu_in_dbuf.t_sp;
X	} else {
X		p = (char *)ptb->xstar_in_dbuf.t_sp;
X
X		if (ptb->xstar_dbuf.t_prefix[0] == '\0' &&
X		    ptb->xstar_in_dbuf.t_sp[0].t_offset[10] != '\0') {
X			static	BOOL	warned;
X			extern	BOOL	nowarn;
X
X			if (!nowarn && !warned) {
X				errmsgno(EX_BAD, "WARNING: Archive uses old sparse format. Please upgrade!\n");
X				warned = TRUE;
X			}
X			sparse_in_hdr = SPARSE_IN_HDR;
X		}
X	}
X
X	for (i = 0; i < sparse_in_hdr; i++) {
X		Ullong	ull;
X
X		stolli(p, &ull); p += 12;
X		sparse[i].sp_offset = ull;
X		stolli(p, &ull);   p += 12;
X		sparse[i].sp_numbytes = ull;
X		if (sparse[i].sp_offset == 0 &&
X		    sparse[i].sp_numbytes == 0)
X			break;
X	}
X#ifdef	DEBUG
X	/* CSTYLED */
X	if (debug) for (i = 0; i < sparse_in_hdr; i++) {
X		error("i: %d offset: %lld numbytes: %lld\n", i,
X				(Llong)sparse[i].sp_offset,
X				(Llong)sparse[i].sp_numbytes);
X		if (sparse[i].sp_offset == 0 &&
X		    sparse[i].sp_numbytes == 0)
X			break;
X	}
X#endif
X	ind = sparse_in_hdr-SPARSE_EXT_HDR;
X
X	if (H_TYPE(hdrtype) == H_GNUTAR)
X		extended = ptb->gnu_in_dbuf.t_isextended;
X	else
X		extended = ptb->xstar_in_dbuf.t_isextended;
X
X	extended |= (sparse_in_hdr == 0);
X	/*
X	 * Set "ind" to allow us to set *nsparsep past while loop.
X	 */
X	if (!extended) {
X		info->f_flags |= F_SP_EXTENDED;
X		ind = 0;
X	}
X
X	EDEBUG(("isextended: %d\n", extended));
X
X	ptb = &tb;	/* don't destroy orig TCB */
X	while (extended) {
X		if (readblock((char *)ptb, TBLOCK) == EOF) {
X			free(sparse);
X			*nsparsep = 0;
X			return (0);
X		}
X		if ((props.pr_flags & PR_GNU_SPARSE_BUG) == 0)
X			info->f_rsize -= TBLOCK;
X
X		EDEBUG(("rsize: %lld\n", (Llong)info->f_rsize));
X
X		ind += SPARSE_EXT_HDR;
X
X		EDEBUG(("ind: %d\n", ind));
X
X		if ((ind+SPARSE_EXT_HDR) > nsparse) {
X			if ((sparse = grow_sp_list(sparse, &nsparse)) == 0) {
X				*nsparsep = 0;
X				return ((sp_t *)0);
X			}
X		}
X		p = (char *)ptb;
X		for (i = 0; i < SPARSE_EXT_HDR; i++) {
X			Ullong	ull;
X
X			stolli(p, &ull);	p += 12;
X			sparse[i+ind].sp_offset = ull;
X			stolli(p, &ull);	p += 12;
X			sparse[i+ind].sp_numbytes = ull;
X
X			EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X				(Llong)sparse[i+ind].sp_offset,
X				(Llong)sparse[i+ind].sp_numbytes));
X
X			if (sparse[i+ind].sp_offset == 0 &&
X			    sparse[i+ind].sp_numbytes == 0)
X				break;
X		}
X		extended = ptb->gnu_ext_dbuf.t_isextended;
X	}
X	info->f_flags |= F_SP_SKIPPED;
X	ind += i;
X	*nsparsep = ind;
X	EDEBUG(("nsparse: %d\n", ind));
X	if (ind < 1)
X		return (sparse);
X	EDEBUG(("i: %d offset: %lld numbytes: %lld\n", 0,
X				(Llong)sparse[0].sp_offset,
X				(Llong)sparse[0].sp_numbytes));
X	for (i = 1; i < ind; i++) {
X		if (((sparse[i-1].sp_offset + sparse[i-1].sp_numbytes) >
X							sparse[i].sp_offset) &&
X		    (sparse[i].sp_offset != 0 || sparse[i].sp_numbytes != 0)) {
X			errmsgno(EX_BAD,
X			"Bad sparse data:   offset %lld, numbytes %lld at idx %d.\n",
X				(Llong)sparse[i].sp_offset,
X				(Llong)sparse[i].sp_numbytes, i);
X			errmsgno(EX_BAD, "Current write position is %lld.\n",
X				(Llong)(sparse[i-1].sp_offset +
X					sparse[i-1].sp_numbytes));
X			free(sparse);
X			*nsparsep = 0;
X			return (0);
X		}
X		EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X				(Llong)sparse[i].sp_offset,
X				(Llong)sparse[i].sp_numbytes));
X	}
X	EDEBUG(("rsize: %lld\n", (Llong)info->f_rsize));
X
X	return (sparse);
X}
X
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
X/*
X * The seek based sparse list parser for files.
X * The interface has been defined in 2004 for Solaris & star and will hopefully
X * be integrated into a future POSIX standard.
X */
XLOCAL int
Xsmk_sp_list(f, info, spp, hpos)
X	int	f;
X	FINFO	*info;
X	sp_t	**spp;
X	register off_t	hpos;
X{
X	register off_t	dpos;
X	register sp_t	*sparse = *spp;
X		int	nsparse = NSPARSE_INIT;
X	register int	i = 0;
X
X	*spp = (sp_t *)0;
X	if (hpos != 0) {			/* Starts with data */
X		if ((hpos % 512) != 0)		/* Unaligned hole ? */
X			hpos = (hpos + 511) / 512 * 512;
X
X		if (hpos >= info->f_size) {	/* File has no hole */
X			lseek(f, (off_t)0, SEEK_SET);
X			free(sparse);
X			return (0);
X		}
X		sparse[i].sp_offset = 0;
X		sparse[i].sp_numbytes = hpos;
X
X		EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X			(Llong)sparse[i].sp_offset,
X			(Llong)sparse[i].sp_numbytes));
X
X		info->f_rsize += sparse[i].sp_numbytes;
X		i++;
X	}
X	while (hpos < info->f_size) {
X		dpos = lseek(f, hpos, SEEK_DATA);
X		if (dpos == (off_t)-1 && geterrno() == ENXIO) {
X			/*
X			 * Catch the case "No more data past 'hpos'".
X			 */
X			dpos = info->f_size;
X		} else if (dpos == (off_t)-1) {
X			if (!errhidden(E_SHRINK, info->f_name)) {
X				if (!errwarnonly(E_SHRINK, info->f_name))
X					xstats.s_sizeerrs++;
X				errmsg(
X				"'%s': SEEK_DATA file shrunk at offset %lld.\n",
X				info->f_name, (Llong)hpos);
X				(void) errabort(E_SHRINK, info->f_name, TRUE);
X			}
X			lseek(f, (off_t)0, SEEK_SET);
X			free(sparse);
X			return (0);
X		}
X		hpos = lseek(f, dpos, SEEK_HOLE);
X		if (hpos == (off_t)-1 && geterrno() == ENXIO) {
X			/*
X			 * Catch the case "No more holes past 'dpos'".
X			 */
X			hpos = info->f_size;
X		} else if (hpos == (off_t)-1) {
X			if (!errhidden(E_SHRINK, info->f_name)) {
X				if (!errwarnonly(E_SHRINK, info->f_name))
X					xstats.s_sizeerrs++;
X				errmsg(
X				"'%s': SEEK_HOLE file shrunk at offset %lld.\n",
X				info->f_name, (Llong)dpos);
X				(void) errabort(E_SHRINK, info->f_name, TRUE);
X			}
X			lseek(f, (off_t)0, SEEK_SET);
X			free(sparse);
X			return (0);
X		}
X		if (dpos < info->f_size &&	/* Not the hole at EOF ? */
X		    (dpos % 512) != 0) {	/* Unaligned data ? */
X			dpos = dpos / 512 * 512;
X			if (i > 0 &&		/* Combine with previous ? */
X			    (sparse[i-1].sp_offset +
X			    sparse[i-1].sp_numbytes) >= dpos) {
X				i--;
X				dpos = sparse[i].sp_offset;
X			}
X		}
X		if (hpos < info->f_size &&	/* Not the hole at EOF ? */
X		    (hpos % 512) != 0) {	/* Unaligned hole ? */
X			hpos = (hpos + 511) / 512 * 512;
X			if (hpos > info->f_size)
X				hpos = info->f_size;
X		}
X
X		sparse[i].sp_offset = dpos;
X		sparse[i].sp_numbytes = hpos - dpos;
X
X		info->f_rsize += sparse[i].sp_numbytes;
X
X		EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X			(Llong)sparse[i].sp_offset,
X			(Llong)sparse[i].sp_numbytes));
X
X		i++;
X		if (i >= nsparse) {
X			if ((sparse = grow_sp_list(sparse,
X					&nsparse)) == 0) {
X				lseek(f, (off_t)0, SEEK_SET);
X				return (0);
X			}
X		}
X	}
X	lseek(f, (off_t)0, SEEK_SET);
X	*spp = sparse;
X	return (i);
X}
X#endif
X
XLOCAL int
Xmk_sp_list(fp, info, spp)
X	int	*fp;
X	FINFO	*info;
X	sp_t	**spp;
X{
X	long	rbuf[32*1024/sizeof (long)];	/* Force it be long aligned */
X	sp_t	*sparse;
X	int	nsparse = NSPARSE_INIT;
X	register int	amount = 0;
X	register int	cnt = 0;
X	register char	*rbp = (char *)rbuf;
X	register off_t	pos = (off_t)0;
X	register int	i = 0;
X	register BOOL	data = FALSE;
X	register BOOL	use_ai = FALSE;
X	register BOOL	is_hole = FALSE;
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
X#else
X#ifdef	_FIOAI
X		int	fai_idx;
X	struct fioai	fai;
X	struct fioai	*faip;
X#	define	NFAI	1024
X	daddr_t		fai_arr[NFAI];
X#endif	/* _FIOAI */
X#endif	/* SEEK_HOLE */
X
X	*spp = (sp_t *)0;
X	info->f_rsize = 0;
X	sparse = (sp_t *)malloc(nsparse*sizeof (sp_t));
X	if (sparse == 0) {
X		errmsg("Cannot alloc sparse buf.\n");
X		return (i);
X	}
X
X	/*
X	 * Shortcut for files which consist of a single hole and no written
X	 * data. In that case on some file systems a file may occupy 0 blocks
X	 * on disk, and the F_ALL_HOLE flag could be set in info->f_flags. In
X	 * such a case, we can avoid scanning the file on dumb operating
X	 * systems that do not support SEEK_HOLE nor something equivalent.
X	 */
X	if (info->f_flags & F_ALL_HOLE) {
X		pos = info->f_size;
X		goto scan_done;
X	}
X
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
X	/*
X	 * Error codes: EINVAL -> OS does not support SEEK_HOLE
X	 * ENOTSUP -> Current filesystem does not support SEEK_HOLE.
X	 */
X	if (force_hole)
X		pos = (off_t)-1;
X	else
X		pos = lseek(*fp, (off_t)0, SEEK_HOLE);
X	if (pos != (off_t)-1) {			/* Use if operational */
X		*spp = sparse;
X		return (smk_sp_list(*fp, info, spp, pos));
X	}
X	pos = (off_t)0;
X#else
X#ifdef	_FIOAI
X	fai.fai_off = 0;
X	fai.fai_size = 512;
X	fai.fai_num = 1;
X	fai.fai_daddr = fai_arr;
X	use_ai = ioctl(*fp, _FIOAI, &fai) >= 0;	/* Use if operational */
X	fai_idx = 0;
X	fai.fai_num = 0;			/* start at 0 again  */
X#endif	/* _FIOAI */
X#endif	/* SEEK_HOLE */
X
X	for (;;) {
X		if (use_ai) {
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
X			/* EMPTY */
X#else
X#ifdef	_FIOAI
X			if (fai_idx >= fai.fai_num) {
X				fai.fai_off = pos;
X				fai.fai_size = 512 * NFAI;
X				fai.fai_num = NFAI;
X			retry:
X				ioctl(*fp, _FIOAI, &fai);
X				if (fai.fai_num == 0) {
X					/*
X					 * Check whether we crossed the end of
X					 * the file or off_t wrapps.
X					 */
X					if (pos < lseek(*fp, (off_t)0, SEEK_END)) {
X						off_t	di;
X
X						di = lseek(*fp, (off_t)0, SEEK_END);
X						di -= pos;
X						fai.fai_off = pos;
X						fai.fai_size = (di/512) * 512;
X						fai.fai_num = di/512;
X						if (fai.fai_num != 0)
X							goto retry;
X						if (di > 0 && di < 512) {
X							/*
X							 * The last entry
X							 * cannot be checked
X							 * via the ooctl.
X							 */
X							fai.fai_size = 512;
X							fai.fai_num = 1;
X							fai.fai_daddr[0] = !_FIOAI_HOLE;
X							goto fake;
X						}
X					}
X					break;
X				}
X			fake:
X				fai_idx = 0;
X			}
X			is_hole = fai.fai_daddr[fai_idx++] == _FIOAI_HOLE;
X
X			amount = 512;
X			if (pos + amount < 0)
X				amount = info->f_size - pos;
X			else if (pos + amount > info->f_size)
X				amount = info->f_size - pos;
X#else
X			/* EMPTY */
X#endif	/* _FIOAI */
X#endif	/* SEEK_HOLE */
X		} else {
X			if (cnt <= 0) {
X				if ((cnt = _fileread(fp, rbuf, sizeof (rbuf))) == 0)
X					break;
X				if (cnt < 0) {
X					errmsg(
X					"Error scanning for holes in '%s'.\n",
X					info->f_name);
X
X					errmsg("Current pos: %lld\n",
X					(Llong)lseek(*fp, (off_t)0, SEEK_CUR));
X
X					free(sparse);
X					return (0);
X				}
X				rbp = (char *)rbuf;
X			}
X			if ((amount = cmpnullbytes(rbp, cnt)) >= cnt) {
X				is_hole = TRUE;
X				cnt = 0;
X			} else {
X				amount = (amount / TBLOCK) * TBLOCK;
X				if ((is_hole = amount != 0) == FALSE) {
X					amount += TBLOCK;
X					if (amount > cnt)
X						amount = cnt;
X				}
X				rbp += amount;
X				cnt -= amount;
X			}
X		}
X
X		if (is_hole) {
X			if (data) {
X				sparse[i].sp_numbytes =
X						pos - sparse[i].sp_offset;
X				info->f_rsize += sparse[i].sp_numbytes;
X
X				EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X					(Llong)sparse[i].sp_offset,
X					(Llong)sparse[i].sp_numbytes));
X
X				data = FALSE;
X				i++;
X				if (i >= nsparse) {
X					if ((sparse = grow_sp_list(sparse,
X							&nsparse)) == 0) {
X						lseek(*fp, (off_t)0, SEEK_SET);
X						return (0);
X					}
X				}
X			}
X		} else {
X			if (!data) {
X				sparse[i].sp_offset = pos;
X				data = TRUE;
X			}
X		}
X		pos += amount;
X	}
X
Xscan_done:
X	EDEBUG(("data: %d\n", data));
X
X	if (data) {
X		sparse[i].sp_numbytes = pos - sparse[i].sp_offset;
X		info->f_rsize += sparse[i].sp_numbytes;
X
X		EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X				(Llong)sparse[i].sp_offset,
X				(Llong)sparse[i].sp_numbytes));
X	} else {
X#ifdef	NO_HOLE_AT_END
X		sparse[i].sp_offset = pos -1;
X		sparse[i].sp_numbytes = 1;
X		info->f_rsize += 1;
X#else
X		sparse[i].sp_offset = pos;
X		sparse[i].sp_numbytes = 0;
X#endif
X		EDEBUG(("i: %d offset: %lld numbytes: %lld\n", i,
X				(Llong)sparse[i].sp_offset,
X				(Llong)sparse[i].sp_numbytes));
X	}
X	lseek(*fp, (off_t)0, SEEK_SET);
X	*spp = sparse;
X	return (++i);
X}
X
XLOCAL int
Xget_end_hole(fh)
X	register fh_t	*fh;
X{
X#ifdef	HAVE_FTRUNCATE
X	int	f;
X	off_t	off;
X	int	add = 0;
X#endif
X
X	/*
X	 * At end of sparse array: return TRUE.
X	 * There is no "end hole" in this case.
X	 */
X	if (fh->fh_spindex == fh->fh_nsparse)
X		return (TRUE);
X	/*
X	 * Out of sparse array: return FALSE.
X	 */
X	if (fh->fh_spindex > fh->fh_nsparse)
X		return (0);
X
X	/*
X	 * New offset is not > fh->fh_newpos: return.
X	 */
X	if (fh->fh_sparse[fh->fh_spindex].sp_offset <= fh->fh_newpos)
X		return (0);
X
X	/*
X	 * No hole at end of file: return.
X	 */
X	if (fh->fh_sparse[fh->fh_spindex].sp_numbytes != 0)
X		return (0);
X
X#ifdef	HAVE_FTRUNCATE
X	/*
X	 * In order to prevent Solaris from allocating space at the end of the
X	 * file we need to shrink the file. For this reason, we first create
X	 * the file a bit too large.
X	 */
X	f = fdown(fh->fh_file);
X	off = fh->fh_sparse[fh->fh_spindex].sp_offset;
X
X#ifdef	_PC_MIN_HOLE_SIZE
X	add = fpathconf(f, _PC_MIN_HOLE_SIZE);
X#endif
X	if (add <= 0)
X		add = 8192;
X
X	if ((OFF_T_MAX - off) > add)
X		(void) ftruncate(f, off+add);
X
X	if (ftruncate(f, off) < 0)
X		return (write_end_hole(fh));
X	return (TRUE);
X#else
X	return (write_end_hole(fh));
X#endif
X}
X
XLOCAL int
Xwrite_end_hole(fh)
X	register fh_t	*fh;
X{
X	int	f;
X	off_t	off;
X
X	f = fdown(fh->fh_file);
X	off = fh->fh_sparse[fh->fh_spindex].sp_offset;
X
X	seterrno(0);
X	if (lseek(f, off-1, SEEK_SET) == (off_t)-1) {
X		if (!errhidden(E_WRITE, fh->fh_name)) {
X			if (!errwarnonly(E_WRITE, fh->fh_name))
X				xstats.s_rwerrs++;
X			errmsg("Error seeking '%s'.\n", fh->fh_name);
X			(void) errabort(E_WRITE, fh->fh_name, TRUE);
X			return (FALSE);
X		}
X	} else if (ffilewrite(fh->fh_file, "", 1) != 1) {
X		if (!errhidden(E_WRITE, fh->fh_name)) {
X			if (!errwarnonly(E_WRITE, fh->fh_name))
X				xstats.s_rwerrs++;
X			errmsg("Error writing '%s'.\n", fh->fh_name);
X			(void) errabort(E_WRITE, fh->fh_name, TRUE);
X			return (FALSE);
X		}
X	}
X	return (TRUE);
X}
X
XEXPORT int
Xgnu_skip_extended(info)
X	FINFO	*info;
X{
X	TCB	*ptb;
X
X	if (info->f_flags & F_SP_SKIPPED)
X		return (0);
X
X	ptb = info->f_tcb;
X	if (((info->f_flags & F_SP_EXTENDED) != 0) ||
X	    ptb->gnu_in_dbuf.t_isextended) do {
X		info->f_flags |= F_SP_EXTENDED;
X		if (readblock((char *)ptb, TBLOCK) == EOF)
X			return (EOF);
X	} while (ptb->gnu_ext_dbuf.t_isextended);
X
X	info->f_flags |= F_SP_SKIPPED;
X	return (0);
X}
X
XEXPORT int
Xget_sparse(f, info)
X	FILE	*f;
X	FINFO	*info;
X{
X	fh_t	fh;
X	sp_t	*sparse;
X	int	nsparse;
X	int	ret;
X
X	sparse = get_sp_list(info, &nsparse);
X	if (sparse == 0) {
X		errmsgno(EX_BAD, "Skipping '%s' sorry ...\n", info->f_name);
X		errmsgno(EX_BAD, "WARNING: '%s' is damaged\n", info->f_name);
X		void_file(info);
X		return (FALSE);
X	}
X	fh.fh_file = f;
X	fh.fh_name = info->f_name;
X	fh.fh_size = info->f_rsize;
X	fh.fh_newpos = (off_t)0;
X	fh.fh_sparse = sparse;
X	fh.fh_nsparse = nsparse;
X	fh.fh_spindex = 0;
X	ret = xt_file(info, vp_get_sparse_func, &fh, 0, "writing");
X	if (ret == TRUE)
X		ret = get_end_hole(&fh);
X	free(sparse);
X	return (ret);
X}
X
XEXPORT int
Xget_as_hole(f, info)
X	FILE	*f;
X	FINFO	*info;
X{
X	fh_t	fh;
X	sp_t	sparse;
X
X	sparse.sp_offset = info->f_size;
X	sparse.sp_numbytes = 0;
X
X	fh.fh_file = f;
X	fh.fh_name = info->f_name;
X	fh.fh_size = info->f_rsize;
X	fh.fh_newpos = (off_t)0;
X	fh.fh_sparse = &sparse;
X	fh.fh_nsparse = 1;
X	fh.fh_spindex = 0;
X
X	return (get_end_hole(&fh));
X}
X
XEXPORT BOOL
Xcmp_sparse(f, info)
X	FILE	*f;
X	FINFO	*info;
X{
X	fh_t	fh;
X	sp_t	*sparse;
X	int	nsparse;
X
X	sparse = get_sp_list(info, &nsparse);
X	if (sparse == 0) {
X		errmsgno(EX_BAD, "Skipping '%s' sorry ...\n", info->f_name);
X		void_file(info);
X		fclose(f);
X		return (FALSE);
X	}
X	fh.fh_file = f;
X	fh.fh_name = info->f_name;
X	fh.fh_size = info->f_rsize;
X	fh.fh_newpos = (off_t)0;
X	fh.fh_sparse = sparse;
X	fh.fh_nsparse = nsparse;
X	fh.fh_spindex = 0;
X	fh.fh_diffs = 0;
X	if (xt_file(info, vp_cmp_sparse_func, &fh, TBLOCK, "reading") < 0)
X		die(EX_BAD);
X	if (fclose(f) != 0) {
X		if (!errhidden(E_READ, info->f_name)) {
X			if (!errwarnonly(E_SHRINK, info->f_name))
X				xstats.s_rwerrs++;
X			(void) errabort(E_READ, info->f_name, TRUE);
X		}
X	}
X	free(sparse);
X	return (fh.fh_diffs == 0);
X}
X
XEXPORT void
Xput_sparse(fp, info)
X	int	*fp;
X	FINFO	*info;
X{
X	fh_t	fh;
X	sp_t	*sparse;
X	int	nsparse;
X	off_t	rsize;
X
X	nsparse = mk_sp_list(fp, info, &sparse);
X	if (debug)
X		error("numsparse: %d\n", nsparse);
X	if (nsparse == 0) {
X		info->f_rsize = info->f_size;
X		put_tcb(info->f_tcb, info);
X		vprint(info);
X		errmsgno(EX_BAD, "Dumping SPARSE '%s' as file\n", info->f_name);
X		put_file(fp, info);
X		return;
X	}
X	rsize = info->f_rsize;
X
X	EDEBUG(("rsize: %lld\n", (Llong)rsize));
X
X	put_sp_list(info, sparse, nsparse);
X	fh.fh_file = (FILE *)fp;
X	fh.fh_name = info->f_name;
X	fh.fh_size = info->f_rsize = rsize;
X	fh.fh_newpos = (off_t)0;
X	fh.fh_sparse = sparse;
X	fh.fh_nsparse = nsparse;
X	fh.fh_spindex = 0;
X	cr_file(info, vp_put_sparse_func, &fh, 0, "reading");
X	free(sparse);
X}
X
XLOCAL void
Xput_sp_list(info, sparse, nsparse)
X	FINFO	*info;
X	sp_t	*sparse;
X	int	nsparse;
X{
X	register int	i;
X	register int	sparse_in_hdr = props.pr_sparse_in_hdr;
X	register char	*p;
X		TCB	tb;
X		TCB	*ptb = info->f_tcb;
X	extern long hdrtype;	/* XXX */
X
X	EDEBUG(("1nsparse: %d rsize: %lld\n", nsparse, (Llong)info->f_rsize));
X
X	if (nsparse > sparse_in_hdr) {
X		if ((props.pr_flags & PR_GNU_SPARSE_BUG) == 0)
X			info->f_rsize +=
X				(((nsparse-sparse_in_hdr)+SPARSE_EXT_HDR-1)/
X				SPARSE_EXT_HDR)*TBLOCK;
X	}
X	EDEBUG(("2nsparse: %d rsize: %lld added: %d\n", nsparse, (Llong)info->f_rsize,
X				(((nsparse-sparse_in_hdr)+SPARSE_EXT_HDR-1)/
X				SPARSE_EXT_HDR)*TBLOCK));
X	EDEBUG(("addr sp: %zd\n", (size_t)&((TCB *)0)->xstar_in_dbuf.t_sp));
X	EDEBUG(("addr rs: %zd\n", (size_t)&((TCB *)0)->xstar_in_dbuf.t_realsize));
X	EDEBUG(("flags: 0x%lX\n", info->f_flags));
X
X	info->f_rxftype = info->f_xftype = XT_SPARSE;
X	if (info->f_flags & F_SPLIT_NAME && props.pr_nflags & PR_PREFIX_REUSED)
X		tcb_undo_split(ptb, info);
X
X	info->f_xflags &= ~XF_SIZE;	/* Condensed file is smaller	*/
X	info_to_tcb(info, ptb);		/* Re-Compute anything		*/
X
X	if (H_TYPE(hdrtype) == H_GNUTAR)
X		p = (char *)ptb->gnu_in_dbuf.t_sp;
X	else
X		p = (char *)ptb->xstar_in_dbuf.t_sp;
X	for (i = 0; i < sparse_in_hdr && i < nsparse; i++) {
X		llitos(p, (Ullong)sparse[i].sp_offset, 11);   p += 12;
X		llitos(p, (Ullong)sparse[i].sp_numbytes, 11); p += 12;
X	}
X	if (sparse_in_hdr > 0 && nsparse > sparse_in_hdr) {
X		if (H_TYPE(hdrtype) == H_GNUTAR)
X			ptb->gnu_in_dbuf.t_isextended = 1;
X		else
X			ptb->xstar_in_dbuf.t_isextended = '1';
X	}
X
X	put_tcb(ptb, info);
X	vprint(info);
X
X	nsparse -= sparse_in_hdr;
X	sparse += sparse_in_hdr;
X	ptb = &tb;
X	while (nsparse > 0) {
X		filltcb(ptb);
X		p = (char *)ptb;
X		for (i = 0; i < SPARSE_EXT_HDR && i < nsparse; i++) {
X			llitos(p, (Ullong)sparse[i].sp_offset, 11);   p += 12;
X			llitos(p, (Ullong)sparse[i].sp_numbytes, 11); p += 12;
X		}
X		nsparse -= SPARSE_EXT_HDR;
X		sparse += SPARSE_EXT_HDR;
X		if (nsparse > 0)
X			ptb->gnu_ext_dbuf.t_isextended = '1';
X		writeblock((char *)ptb);
X	}
X}
X
XEXPORT BOOL
Xsparse_file(fp, info)
X	int	*fp;
X	FINFO	*info;
X{
X#if	defined(SEEK_HOLE) && defined(SEEK_DATA)
X	off_t	pos;
X	int	f = *fp;
X
X	/*
X	 * If we have been compiled on an OS that supports SEEK_HOLE but run
X	 * on an OS that does not support SEEK_HOLE, we get EINVAL.
X	 * If the underlying filesystem does not support the SEEK_HOLE call,
X	 * we get ENOTSUP. In all other cases, we will get either the position
X	 * of the first real hole in the file or statb.st_size in case the file
X	 * definitely has no holes.
X	 */
X	pos = lseek(f, (off_t)0, SEEK_HOLE);	/* Check for first hole	   */
X	if (pos == (off_t)-1)			/* SEEK_HOLE not supported */
X		return ((info->f_flags & F_SPARSE) != 0);
X
X	if (pos != 0)				/* Not at pos 0: seek back */
X		(void) lseek(f, 0, SEEK_SET);
X
X
X	if (pos >= info->f_size) {		/* Definitely not sparse */
X#ifdef	_PC_MIN_HOLE_SIZE
X		/*
X		 * If we are on an unfixed Solaris kernel and if the
X		 * underlying filesystem does not support SEEK_HOLE,
X		 * the file may be sparse, but SEEK_HOLE returns info->f_size.
X		 * Fortunately, the fpathconf call only takes 1usec on a 550MHz
X		 * Pentium III, so this call typically takes less than 1% of
X		 * the total system time.
X		 */
X		if (fpathconf(f, _PC_MIN_HOLE_SIZE) < 0)
X			return ((info->f_flags & F_SPARSE) != 0);
X#endif
X		return (FALSE);
X	}
X	return (TRUE);				/* Definitely sparse */
X#else
X	return ((info->f_flags & F_SPARSE) != 0);
X#endif
X}
END-of-star-1.5.2/star/hole.c
echo x - star-1.5.2/star/star.dfl
sed 's/^X//' >star-1.5.2/star/star.dfl << 'END-of-star-1.5.2/star/star.dfl'
X# @(#)star.dfl	1.2 05/08/09 Copyright 2003 J. Schilling
X#
X# This file is /etc/default/star
X#
X
X#
X# Uncomment this to set star's default FIFO size (e.g. the value that is used
X# when no fs= option is present on the star command line).
X#
X#STAR_FIFOSIZE=		32m
X
X#
X# Uncomment this to set star's MAX FIFO size.
X# This tag may be used to limit the FIFO size used by star to a certain value
X# even if the fs= option on the command line would request for more FIFO.
X# This makes sense if you like to have a unique backup script that requests
X# e.g. 256 MB if FIFO but one of the backup client machines only has 128 MB
X# of RAM.
X#
X#STAR_FIFOSIZE_MAX=	100m
X
X#
X# Compatibility entries for Sun's tar. There are up to four entries per line:
X#
X#	1)	The device name
X#	2)	The blocking factor in units of 512 bytes
X#	3)	The max media size in 1024 byte units 
X#		0 means unlimited (no multi volume handling) 
X#	4)	Whether this is a tape or not ('n' or 'N' means no tape).
X#
X#	   device     		block    size	istape
Xarchive0=/dev/rmt/0		20	0
Xarchive1=/dev/rmt/0n		20	0
Xarchive2=/dev/rmt/1		20	0
Xarchive3=/dev/rmt/1n		20	0
Xarchive4=/dev/rmt/0		126	0
Xarchive5=/dev/rmt/0n		126	0
Xarchive6=/dev/rmt/1		126	0
Xarchive7=/dev/rmt/1n		126	0
END-of-star-1.5.2/star/star.dfl
echo x - star-1.5.2/star/header.c
sed 's/^X//' >star-1.5.2/star/header.c << 'END-of-star-1.5.2/star/header.c'
X/* @(#)header.c	1.148 11/04/12 Copyright 1985, 1994-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)header.c	1.148 11/04/12 Copyright 1985, 1994-2011 J. Schilling";
X#endif
X/*
X *	Handling routines to read/write, parse/create
X *	archive headers
X *
X *	Copyright (c) 1985, 1994-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/dirent.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#define	__XDEV__	/* Needed to activate _dev_major()/_dev_minor() */
X#include <schily/device.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "starsubs.h"
X#include "fifo.h"
X
X	/* ustar */
XLOCAL	char	magic[TMAGLEN] = TMAGIC;
X	/* star */
XLOCAL	char	stmagic[STMAGLEN] = STMAGIC;
X	/* gnu tar */
XLOCAL	char	gmagic[GMAGLEN] = GMAGIC;
X
Xtypedef struct {
X	char	*h_name;
X	char	*h_text;
X	Int8_t	h_type;
X	UInt8_t	h_flags;
X} htab_t;
X
X#define	HF_RO	0x01	/* Read only entry - may not be set via cmd line */
X
XLOCAL	htab_t	htab[] = {
X/* BEGIN CSTYLED */
X/* 0 */	{ "UNDEFINED",	"Undefined archive",			H_UNDEF, HF_RO	},
X/* 1 */	{ "unknown tar", "Unknown tar format", 			H_TAR,   HF_RO	},
X/* 2 */	{ "v7tar",	"Old UNIX V7 tar format",		H_V7TAR,  0	},
X/* 3 */	{ "tar",	"Old BSD tar format",			H_OTAR,  0	},
X/* 4 */	{ "star",	"Old star format from 1985",		H_STAR,  0	},
X/* 5 */	{ "gnutar",	"GNU tar format 1989 (violates POSIX)",	H_GNUTAR, 0	},
X/* 6 */	{ "ustar",	"Standard POSIX.1-1988 tar format",	H_USTAR, 0	},
X/* 7 */	{ "xstar",	"Extended standard tar (star 1994)",	H_XSTAR, 0	},
X/* 8 */	{ "xustar",	"'xstar' format without tar signature",	H_XUSTAR, 0	},
X/* 9 */	{ "exustar",	"'xustar' format - always x-header",	H_EXUSTAR, 0	},
X/*10 */	{ "pax",	"Extended POSIX.1-2001 standard tar",	H_PAX,    0	},
X/*11 */	{ "suntar",	"Sun's extended pre-POSIX.1-2001",	H_SUNTAR, 0	},
X
X/*15 */	{ "bar",	"SunOS 4.x bar format",			H_BAR,    HF_RO	},
X
X/*16 */	{ "bin",	"cpio UNIX V7 binary format",		H_CPIO_BIN, 0	},
X/*17 */	{ "cpio",	"cpio POSIX.1-1988 format",		H_CPIO_CHR, 0	},
X/*18 */	{ "odc",	"cpio POSIX.1-1988 with SYSv compat",	H_CPIO_ODC, 0	},
X/*19 */	{ "nbin",	"CPIO NBIN",				H_CPIO_NBIN, HF_RO	},
X/*20 */	{ "crcbin",	"CPIO CRCBIN",				H_CPIO_CRC, HF_RO	},
X/*21 */	{ "asc",	"SYSvr4 cpio ascii expanded device #",	H_CPIO_ASC, 0	},
X/*22 */	{ "crc",	"'asc' format + CRC",			H_CPIO_ACRC, 0	},
X
X	{ NULL,		NULL, 					0, 0 },
X};
X/* END CSTYLED */
X
X/*
X * Compression names
X */
XLOCAL	char	*cnames[] = {
X	"unknown",		/*  0 C_NONE	*/
X	"pack",			/*  1 C_PACL	*/
X	"gzip",			/*  2 C_GZIP	*/
X	"lzw",			/*  3 C_LZW	*/
X	"freeze",		/*  4 C_FREEZE	*/
X	"lzh",			/*  5 C_LZH	*/
X	"pkzip",		/*  6 C_PKZIP	*/
X	"bzip2",		/*  7 C_BZIP2	*/
X	"lzo",			/*  8 C_LZO	*/
X	"7z",			/*  9 C_7Z	*/
X	"xz",			/* 10 C_XZ	*/
X	"lzip",			/* 11 C_LZIP	*/
X};
X
Xextern	FILE	*tty;
Xextern	FILE	*vpr;
Xextern	const	char	*tarfiles[];		/* Cycle list of all archives	*/
Xextern	int	tarfindex;			/* Current index in list	*/
Xextern	BOOL	multivol;
Xextern	long	hdrtype;
Xextern	long	chdrtype;
Xextern	int	cmptype;
Xextern	int	version;
Xextern	int	swapflg;
Xextern	BOOL	print_artype;
Xextern	BOOL	debug;
Xextern	BOOL	numeric;
Xextern	int	verbose;
Xextern	BOOL	rflag;
Xextern	BOOL	uflag;
Xextern	BOOL	xflag;
Xextern	BOOL	nflag;
Xextern	BOOL	ignoreerr;
Xextern	BOOL	signedcksum;
Xextern	BOOL	nowarn;
Xextern	BOOL	nullout;
Xextern	BOOL	modebits;
Xextern	BOOL	linkdata;
X
Xextern	Ullong	tsize;
X
Xextern	char	*bigbuf;
Xextern	int	bigsize;
X
XLOCAL	Ulong	checksum	__PR((TCB *ptb));
XLOCAL	Ulong	bar_checksum	__PR((TCB *ptb));
XLOCAL	BOOL	signedtarsum	__PR((TCB *ptb, Ulong ocheck));
XEXPORT	BOOL	tarsum_ok	__PR((TCB *ptb));
XLOCAL	BOOL	isstmagic	__PR((char *s));
XLOCAL	BOOL	isxmagic	__PR((TCB *ptb));
XLOCAL	BOOL	ismagic		__PR((char *s));
XLOCAL	BOOL	isgnumagic	__PR((char *s));
XLOCAL	BOOL	strxneql	__PR((char *s1, char *s2, int l));
XLOCAL	BOOL	ustmagcheck	__PR((TCB *ptb));
XEXPORT	void	print_hdrtype	__PR((FILE *f, int type));
XEXPORT	char	*hdr_name	__PR((int type));
XEXPORT	char	*hdr_text	__PR((int type));
XEXPORT	int	hdr_type	__PR((char *name));
XEXPORT	void	hdr_usage	__PR((void));
XEXPORT	int	get_hdrtype	__PR((TCB *ptb, BOOL isrecurse));
XLOCAL	int	get_xhtype	__PR((TCB *ptb, int htype));
XEXPORT	int	get_compression	__PR((TCB *ptb));
XEXPORT	char	*get_cmpname	__PR((int type));
XEXPORT	int	get_tcb		__PR((TCB *ptb));
XEXPORT	void	put_tcb		__PR((TCB *ptb, FINFO *info));
XEXPORT	void	write_tcb	__PR((TCB *ptb, FINFO *info));
XEXPORT	void	info_to_tcb	__PR((FINFO *info, TCB *ptb));
XLOCAL	void	info_to_star	__PR((FINFO *info, TCB *ptb));
XLOCAL	void	info_to_ustar	__PR((FINFO *info, TCB *ptb));
XLOCAL	void	info_to_xstar	__PR((FINFO *info, TCB *ptb));
XLOCAL	void	info_to_gnutar	__PR((FINFO *info, TCB *ptb));
XEXPORT	int	tcb_to_info	__PR((TCB *ptb, FINFO *info));
XLOCAL	void	tar_to_info	__PR((TCB *ptb, FINFO *info));
XLOCAL	void	star_to_info	__PR((TCB *ptb, FINFO *info));
XLOCAL	void	ustar_to_info	__PR((TCB *ptb, FINFO *info));
XLOCAL	void	xstar_to_info	__PR((TCB *ptb, FINFO *info));
XLOCAL	void	gnutar_to_info	__PR((TCB *ptb, FINFO *info));
XLOCAL	int	ustoxt		__PR((int ustype));
XLOCAL	BOOL	checkeof	__PR((TCB *ptb));
XLOCAL	BOOL	eofblock	__PR((TCB *ptb));
XLOCAL	void	stoli		__PR((char *s, Ulong * l));
XEXPORT	void	stolli		__PR((char *s, Ullong *ull));
XLOCAL	void	litos		__PR((char *s, Ulong l, int fieldw));
XEXPORT	void	llitos		__PR((char *s, Ullong ull, int fieldw));
XLOCAL	void	stob		__PR((char *s, Ulong *l, int fieldw));
XLOCAL	void	stollb		__PR((char *s, Ullong *ull, int fieldw));
X#if	DEV_MINOR_BITS > 21
XLOCAL	void	btos		__PR((char *s, Ulong l, int fieldw));
X#endif
XLOCAL	void	llbtos		__PR((char *s, Ullong ull, int fieldw));
XLOCAL	void	print_hrange	__PR((char *type, Ullong ull));
XEXPORT	void	dump_info	__PR((FINFO *info));
X
X/*
X * XXX Hier sollte eine tar/bar universelle Checksummenfunktion sein!
X */
X#define	CHECKS	sizeof (ptb->ustar_dbuf.t_chksum)
X/*
X * We know, that sizeof (TCP) is 512 and therefore has no
X * reminder when dividing by 8
X *
X * CHECKS is known to be 8 too, use loop unrolling.
X */
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
XLOCAL Ulong
Xchecksum(ptb)
X	register	TCB	*ptb;
X{
X	register	int	i;
X	register	Ulong	sum = 0;
X	register	Uchar	*us;
X
X	if (signedcksum) {
X		register	char	*ss;
X		register	long	ssum = 0;
X
X		ss = (char *)ptb;
X		for (i = sizeof (*ptb)/8; --i >= 0; ) {
X			DO8(ssum += *ss++);
X		}
X		if (ssum == 0L)		/* Block containing 512 nul's */
X			return (0);
X
X		ss = (char *)ptb->ustar_dbuf.t_chksum;
X		DO8(ssum -= *ss++);
X		ssum += CHECKS*' ';
X		sum = ssum;
X	} else {
X		us = (Uchar *)ptb;
X		for (i = sizeof (*ptb)/8; --i >= 0; ) {
X			DO8(sum += *us++);
X		}
X		if (sum == 0L)		/* Block containing 512 nul's */
X			return (sum);
X
X		us = (Uchar *)ptb->ustar_dbuf.t_chksum;
X		DO8(sum -= *us++);
X		sum += CHECKS*' ';
X	}
X	return (sum);
X}
X#undef	CHECKS
X
X#define	CHECKS	sizeof (ptb->bar_dbuf.t_chksum)
X
XLOCAL Ulong
Xbar_checksum(ptb)
X	register	TCB	*ptb;
X{
X	register	int	i;
X	register	Ulong	sum = 0;
X	register	Uchar	*us;
X
X	if (signedcksum) {
X		register	char	*ss;
X		register	long	ssum = 0;
X
X		ss = (char *)ptb;
X		for (i = sizeof (*ptb); --i >= 0; )
X			ssum += *ss++;
X		if (ssum == 0L)		/* Block containing 512 nul's */
X			return (0);
X
X		for (i = CHECKS, ss = (char *)ptb->bar_dbuf.t_chksum; --i >= 0; )
X			ssum -= *ss++;
X		ssum += CHECKS*' ';
X		sum = ssum;
X	} else {
X		us = (Uchar *)ptb;
X		for (i = sizeof (*ptb); --i >= 0; )
X			sum += *us++;
X		if (sum == 0L)		/* Block containing 512 nul's */
X			return (sum);
X
X		for (i = CHECKS, us = (Uchar *)ptb->bar_dbuf.t_chksum; --i >= 0; )
X			sum -= *us++;
X		sum += CHECKS*' ';
X	}
X	return (sum);
X}
X#undef	CHECKS
X
XLOCAL BOOL
Xsignedtarsum(ptb, ocheck)
X	TCB	*ptb;
X	Ulong	ocheck;
X{
X	BOOL	osigned = signedcksum;
X	Ulong	check;
X
X	if (ocheck == 0)
X		return (FALSE);
X
X	signedcksum = !signedcksum;
X	check = checksum(ptb);
X	if (ocheck == check) {
X		errmsgno(EX_BAD, "WARNING: archive uses %s checksums.\n",
X				signedcksum?"signed":"unsigned");
X		return (TRUE);
X	}
X	signedcksum = osigned;
X	return (FALSE);
X}
X
X/*
X * XXX Shouldn't we use this or something similar from get_tcb() too?
X */
XEXPORT BOOL
Xtarsum_ok(ptb)
X	TCB	*ptb;
X{
X	Ulong	ocheck;
X	Ulong	check;
X
X	stoli(ptb->dbuf.t_chksum, &ocheck);
X	if (ocheck == 0)
X		return (FALSE);
X	check = checksum(ptb);
X	if (ocheck != check && !signedtarsum(ptb, ocheck))
X		return (FALSE);
X	return (TRUE);
X}
X
XLOCAL BOOL
Xisstmagic(s)
X	char	*s;
X{
X	return (strxneql(s, stmagic, STMAGLEN));
X}
X
X/*
X * Check for XUSTAR format.
X *
X * This is star's upcoming new standard format. This format understands star's
X * old extended POSIX format and in future will write POSIX.1-2001 extensions
X * using 'x' headers.
X * Star also detects the archive format from the value of
X * the "SCHILY.archtype=" POSIX.1-2001 header tag.
X */
XLOCAL BOOL
Xisxmagic(ptb)
X	TCB	*ptb;
X{
X	register int	i;
X
X	/*
X	 * prefix[130] is is granted to be '\0' with 'xstar'.
X	 */
X	if (ptb->xstar_dbuf.t_prefix[130] == '\0') {
X		/*
X		 * True for all 'standard' TCBs except with typeflag 'M'
X		 */
X		/* EMPTY */
X		;
X	} else if (ptb->ustar_dbuf.t_typeflag == 'M') {
X		/*
X		 * We come only here if we try to read in a multivol archive
X		 * starting past volume #0. If we start with volume #0, all
X		 * multi volume headers are skiped by the low level multi
X		 * volume handling code.
X		 */
X		if ((ptb->xstar_in_dbuf.t_offset[11] != ' ') &&
X		    ((ptb->xstar_in_dbuf.t_offset[0] & 0x80) == 0))
X			return (FALSE);
X	} else {
X		return (FALSE);
X	}
X
X	/*
X	 * If atime[0]...atime[10] or ctime[0]...ctime[10]
X	 * is not a POSIX octal number it cannot be 'xstar'.
X	 * With the octal representation we may store any date
X	 * for 1970 +- 136 years (1834 ... 2106). After 2106
X	 * we will most likely always use POSIX.1-2001 'x'
X	 * headers and thus don't need to check for base 256
X	 * numbers.
X	 */
X	for (i = 0; i < 11; i++) {
X		if (ptb->xstar_dbuf.t_atime[i] < '0' ||
X		    ptb->xstar_dbuf.t_atime[i] > '7')
X			return (FALSE);
X		if (ptb->xstar_dbuf.t_ctime[i] < '0' ||
X		    ptb->xstar_dbuf.t_ctime[i] > '7')
X			return (FALSE);
X	}
X
X	/*
X	 * Check for both POSIX compliant end of number characters.
X	 */
X	if ((ptb->xstar_dbuf.t_atime[11] != ' ' &&
X	    ptb->xstar_dbuf.t_atime[11]  != '\0') ||
X	    (ptb->xstar_dbuf.t_ctime[11] != ' ' &&
X	    ptb->xstar_dbuf.t_ctime[11]  != '\0'))
X		return (FALSE);
X
X	return (TRUE);
X}
X
XLOCAL BOOL
Xismagic(s)
X	char	*s;
X{
X	return (strxneql(s, magic, TMAGLEN));
X}
X
XLOCAL BOOL
Xisgnumagic(s)
X	char	*s;
X{
X	return (strxneql(s, gmagic, GMAGLEN));
X}
X
XLOCAL BOOL
Xstrxneql(s1, s2, l)
X	register char	*s1;
X	register char	*s2;
X	register int	l;
X{
X	while (--l >= 0)
X		if (*s1++ != *s2++)
X			return (FALSE);
X	return (TRUE);
X}
X
XLOCAL BOOL
Xustmagcheck(ptb)
X	TCB	*ptb;
X{
X	if (ismagic(ptb->xstar_dbuf.t_magic) &&
X				strxneql(ptb->xstar_dbuf.t_version, "00", 2))
X		return (TRUE);
X	return (FALSE);
X}
X
XEXPORT void
Xprint_hdrtype(f, type)
X	FILE	*f;
X	int	type;
X{
X		BOOL	isswapped = H_ISSWAPPED(type);
X
X	if (H_TYPE(type) > H_MAX_ARCH)
X		type = H_UNDEF;
X	type = H_TYPE(type);
X
X	fprintf(f, "%s%s archive.\n", isswapped?"swapped ":"", hdr_name(type));
X}
X
XEXPORT char *
Xhdr_name(type)
X	int	type;
X{
X	register htab_t	*htp = htab;
X
X	for (; htp->h_name; htp++) {
X		if (htp->h_type == type)
X			return (htp->h_name);
X	}
X	return (htab->h_name);
X}
X
XEXPORT char *
Xhdr_text(type)
X	int	type;
X{
X	register htab_t	*htp = htab;
X
X	for (; htp->h_name; htp++) {
X		if (htp->h_type == type)
X			return (htp->h_text);
X	}
X	return (htab->h_text);
X}
X
XEXPORT int
Xhdr_type(name)
X	char	*name;
X{
X	register htab_t	*htp = htab;
X
X	for (; htp->h_name; htp++) {
X		if (htp->h_flags & HF_RO)
X			continue;
X		if (streql(name, htp->h_name))
X			return (htp->h_type);
X	}
X	return (-1);
X}
X
XEXPORT void
Xhdr_usage()
X{
X	register htab_t	*htp = htab;
X
X	for (; htp->h_name; htp++) {
X		if (htp->h_flags & HF_RO)
X			continue;
X		error("%s\t%s\t%s\n",
X			hdrtype == htp->h_type ? "*":"",
X			htp->h_name, htp->h_text);
X	}
X}
X
XEXPORT int
Xget_hdrtype(ptb, isrecurse)
X	TCB	*ptb;
X	BOOL	isrecurse;
X{
X	Ulong	check;
X	Ulong	ocheck;
X	int	ret = H_UNDEF;
X
X	stoli(ptb->dbuf.t_chksum, &ocheck);
X	if (ocheck == 0)
X		goto nottar;
X	check = checksum(ptb);
X	if (ocheck != check && !signedtarsum(ptb, ocheck)) {
X		if (debug && !isrecurse) {
X			errmsgno(EX_BAD,
X				"Bad tar checksum at: %lld: 0%lo should be 0%lo.\n",
X							tblocks(),
X							ocheck, check);
X		}
X		goto nottar;
X	}
X
X	if (isstmagic(ptb->dbuf.t_magic)) {	/* Check for 'tar\0' at end */
X		if (ustmagcheck(ptb))
X			ret = H_XSTAR;
X		else
X			ret = H_STAR;
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (ustmagcheck(ptb)) {			/* 'ustar\000' POSIX magic */
X		if (isxmagic(ptb)) {
X			if (ptb->ustar_dbuf.t_typeflag == 'g' ||
X			    ptb->ustar_dbuf.t_typeflag == 'x')
X				ret = H_EXUSTAR;
X			else
X				ret = H_XUSTAR;
X		} else {
X			if (ptb->ustar_dbuf.t_typeflag == 'g' ||
X			    ptb->ustar_dbuf.t_typeflag == 'x')
X				ret = H_PAX;
X			else if (ptb->ustar_dbuf.t_typeflag == 'X')
X				ret = H_SUNTAR;
X			else
X				ret = H_USTAR;
X		}
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (isgnumagic(&ptb->dbuf.t_vers)) {	/* 'ustar  ' GNU magic */
X		ret = H_GNUTAR;
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if ((ptb->dbuf.t_mode[6] == ' ' && ptb->dbuf.t_mode[7] == '\0')) {
X		ret = H_OTAR;
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (ptb->ustar_dbuf.t_typeflag == LF_VOLHDR ||
X			    ptb->ustar_dbuf.t_typeflag == LF_MULTIVOL) {
X		/*
X		 * Gnu volume headers & multi volume headers
X		 * are no real tar headers.
X		 */
X		if (debug) error("gnutar buggy archive.\n");
X		ret = H_GNUTAR;
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	/*
X	 * The only thing we know here is:
X	 * we found a header with a correct tar checksum.
X	 */
X	ret = H_TAR;
X	if (debug) print_hdrtype(stderr, ret);
X	return (ret);
X
Xnottar:
X	if (ptb->bar_dbuf.bar_magic[0] == 'V') {
X		stoli(ptb->bar_dbuf.t_chksum, &ocheck);
X		check = bar_checksum(ptb);
X
X		if (ocheck == 0) {
X			/* EMPTY */
X			;
X		} else if (ocheck == check) {
X			ret = H_BAR;
X			if (debug) print_hdrtype(stderr, ret);
X			return (ret);
X		} else if (debug && !isrecurse) {
X			errmsgno(EX_BAD,
X				"Bad bar checksum at: %lld: 0%lo should be 0%lo.\n",
X							tblocks(),
X							ocheck, check);
X		}
X
X	}
X	if (strxneql((char *)ptb, "070701", 6)) {
X		/*
X		 * CPIO ASCII hex header with expanded device numbers
X		 */
X		ret = H_CPIO_ASC;		/* cpio -c */
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (strxneql((char *)ptb, "070702", 6)) {
X		/*
X		 * CPIO ASCII hex header with expanded device numbers and CRC
X		 */
X		ret = H_CPIO_ACRC;		/* cpio -Hcrc */
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (strxneql((char *)ptb, "070707", 6)) {
X		/*
X		 * POSIX small (6 octal digit device numbers)
X		 */
X		ret = H_CPIO_CHR;		/* cpio -Hodc */
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X
X	}
X	if (strxneql((char *)ptb, "\161\301", 2)) {
X		/*
X		 * 0161 0301 -> 0x71 0xC1 -> 070701
X		 */
X		ret = H_CPIO_NBIN;
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (strxneql((char *)ptb, "\161\302", 2)) {
X		/*
X		 * 0161 0302 -> 0x71 0xC2 -> 070702
X		 */
X		ret = H_CPIO_CRC;
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (strxneql((char *)ptb, "\161\307", 2) ||
X	    strxneql((char *)ptb, "\307\161", 2)) {
X		/*
X		 * cpio default
X		 * 0161 0307 -> 0x71 0xC7 -> 070707
X		 * 0307 0161 -> 0xC7 0x71 -> 0143561
X		 *
X		 * If strlen(info->f_name) is odd, we may autodetect
X		 * whether this archive has been swapped as whole.
X		 * cpio_checkswab() returns either H_CPIO_BIN or
X		 * H_SWAPPED(H_CPIO_BIN).
X		 */
X		ret = cpio_checkswab(ptb);
X		if (debug) print_hdrtype(stderr, ret);
X		return (ret);
X	}
X	if (debug) error("no tar archive??\n");
X
X	if (!isrecurse) {
X		int	rret;
X		swabbytes((char *)ptb, TBLOCK);
X		rret = get_hdrtype(ptb, TRUE);
X		swabbytes((char *)ptb, TBLOCK);
X		rret = H_SWAPPED(rret);
X		if (debug) print_hdrtype(stderr, rret);
X		return (rret);
X	}
X
X	if (debug) print_hdrtype(stderr, ret);
X	return (ret);
X}
X
XLOCAL int
Xget_xhtype(ptb, htype)
X	TCB	*ptb;
X	int	htype;
X{
X	FINFO	finfo;
X	Ullong	ull;
X	int	xhsiz = bigsize-TBLOCK;
X	char	*xhp = &bigbuf[TBLOCK];
X	BOOL	swapped;
X	int	t;
X	GINFO	gsav;
Xextern	GINFO	*grip;				/* Global read info pointer */
X
X	gsav = *grip;				/* Save old content */
X
X	t = H_TYPE(htype);
X	if (t < H_TARMIN || t > H_TARMAX)
X		return (htype);
X
X	swapped = H_ISSWAPPED(htype);
X	/*
X	 * Swap TCB & io buffer.
X	 */
X	if (swapped) {
X		swabbytes(ptb, TBLOCK);
X		swabbytes(bigbuf, bigsize);
X	}
X
X	if (ptb->ustar_dbuf.t_typeflag != 'g' &&
X	    ptb->ustar_dbuf.t_typeflag != 'x')
X		goto out;
X
X	/*
X	 * File size is strlen of extended header
X	 */
X	stolli(ptb->dbuf.t_size, &ull);
X	finfo.f_size = ull;
X	finfo.f_rsize = (off_t)finfo.f_size;
X
X	if (xhsiz > ull)
X		xhsiz = ull;
X
X	/*
X	 * Mark the path name and link name pointer uninitalized to avoid that
X	 * xhparse() will try to copy a possible path= or lpath= entry in the
X	 * first extended header to finfo->f_name & finfo->f_lname.
X	 */
X	finfo.f_name = NULL;
X	finfo.f_lname = NULL;
X
X	grip->archtype = H_UNDEF;
X	xhparse(&finfo, xhp, xhp+xhsiz);
X	if (grip->archtype != H_UNDEF) {
X		htype = grip->archtype;
X		if (swapped)
X			htype = H_SWAPPED(htype);
X	}
X	*grip = gsav;				/* Restore old content */
X
Xout:
X	/*
X	 * Swap back TCB & io buffer.
X	 */
X	if (swapped) {
X		swabbytes(ptb, TBLOCK);
X		swabbytes(bigbuf, bigsize);
X	}
X	return (htype);
X}
X
XEXPORT int
Xget_compression(ptb)
X	TCB	*ptb;
X{
X	char	*p = (char *)ptb;
X
X	if (p[0] == '\037') {
X		if (p[1] == '\036')	/* Packed		*/
X			return (C_PACK);
X		if (p[1] == '\213')	/* Gzip compressed	*/
X			return (C_GZIP);
X		if (p[1] == '\235')	/* LZW compressed	*/
X			return (C_LZW);
X		if (p[1] == '\236')	/* Freezed		*/
X			return (C_FREEZE);
X		if (p[1] == '\240')	/* SCO LZH compressed	*/
X			return (C_LZH);
X	}
X	if (p[0] == 'P' && p[1] == 'K' && p[2] == '\003' && p[3] == '\004')
X		return (C_PKZIP);
X	if (p[0] == 'B' && p[1] == 'Z' && p[2] == 'h')
X		return (C_BZIP2);
X	if (p[0] == '\211' && p[1] == 'L' && p[2] == 'Z' && p[3] == 'O')
X		return (C_LZO);
X
X	/*
X	 * p[6] && p[7] contain the version number
X	 */
X	if (p[0] == '7' && p[1] == 'z' && p[2] == '\274' && p[3] == '\257' &&
X	    p[4] == '\047' && p[5] == '\034')
X		return (C_7Z);
X
X	/*
X	 * p[6] && p[7] contain the stream flags
X	 */
X	if (p[0] == '\375' &&
X	    p[1] == '7' && p[2] == 'z' && p[3] == 'X' && p[4] == 'Z' &&
X	    p[5] == '\0')
X		return (C_XZ);
X
X	/*
X	 * The lzip file format has four "magic bytes", followed by a version
X	 * byte (0 or 1 currently), then the coded dictionary size. To reduce
X	 * the number of false-positive detections, require the version byte
X	 * be 0 or 1, and validate the dictionary size.
X	 */
X	if (p[0] == 'L' && p[1] == 'Z' && p[2] == 'I' && p[3] == 'P' &&
X	    (p[4] == '\0' || p[4] == '\001') &&
X	    ((p[5] & 0x1f) > 12 || (p[5] & 0x1f) == 0 || p[5] == 12))
X		return (C_LZIP);
X
X	return (C_NONE);
X}
X
XEXPORT char *
Xget_cmpname(type)
X	int	type;
X{
X	if (type < 0 || type > C_MAX)
X		type = C_NONE;
X
X	return (cnames[type]);
X}
X
XEXPORT int
Xget_tcb(ptb)
X	TCB	*ptb;
X{
X	Ulong	check;
X	Ulong	ocheck;
X	BOOL	eof = FALSE;
X
X	/*
X	 * bei der Option -i wird ein genulltes File
X	 * fehlerhaft als EOF Block erkannt !
X	 * wenn nicht t_magic gesetzt ist.
X	 */
X	do {
X		/*
X		 * First tar control block
X		 */
X		if (swapflg < 0) {
X			BOOL	swapped;
X
X			if (peekblock((char *)ptb, TBLOCK) == EOF) {
X				/*
X				 * The minimal size of a senseful TAR archive is
X				 * 3 blocks (1536).
X				 * The minimal size of a senseful CPIO archive is
X				 * 26+2 + 26+12 = 66 bytes for a BIN archive, but
X				 * a CPIO archive in whole needs to a multiple of
X				 * 512 bytes.
X				 */
X				errmsgno(EX_BAD,
X				"Hard EOF on input, first EOF block is missing at %lld.\n",
X				tblocks());
X				return (EOF);
X			}
X			hdrtype = get_hdrtype(ptb, FALSE);
X			hdrtype = get_xhtype(ptb, hdrtype);
X			if (print_artype) {
X				printf("%s: ", tarfiles[tarfindex]);
X				if (cmptype != C_NONE)
X					printf("%s compressed ", get_cmpname(cmptype));
X				print_hdrtype(stdout, hdrtype);
X				exit(0);
X			}
X			swapped = H_ISSWAPPED(hdrtype);
X			if (chdrtype != H_UNDEF &&
X					swapped != H_ISSWAPPED(chdrtype)) {
X
X				swapped = H_ISSWAPPED(chdrtype);
X			}
X			if (swapped) {
X				swapflg = 1;
X				/*
X				 * We swap everything already read here.
X				 * We tell the input routines later (inside the
X				 * buf_resume() call) that further swapping is
X				 * needed.
X				 */
X				swabbytes((char *)ptb, TBLOCK);	/* copy of TCB */
X				swabbytes(bigbuf, bigsize);	/* io buffer  */
X			} else {
X				swapflg = 0;
X			}
X			if (H_TYPE(hdrtype) == H_BAR) {
X				comerrno(EX_BAD, "Can't handle bar archives (yet).\n");
X			}
X			if (H_TYPE(hdrtype) == H_UNDEF) {
X				int	t;
X
X				switch (t = get_compression(ptb)) {
X
X				case C_NONE:
X					break;
X				case C_PACK:
X				case C_GZIP:
X				case C_LZW:
X				case C_FREEZE:
X				case C_LZH:
X				case C_PKZIP:
X					comerrno(EX_BAD, "Archive is '%s' compressed, try to use the -z option.\n",
X							get_cmpname(t));
X					break;
X				case C_BZIP2:
X					comerrno(EX_BAD, "Archive is 'bzip2' compressed, try to use the -bz option.\n");
X					break;
X				case C_LZO:
X					comerrno(EX_BAD, "Archive is 'lzop' compressed, try to use the -bz option.\n");
X					break;
X				case C_7Z:
X					comerrno(EX_BAD, "Archive is '7z' compressed, try to use the -7z option.\n");
X					break;
X				case C_XZ:
X					comerrno(EX_BAD, "Archive is 'xz' compressed, try to use the -xz option.\n");
X					break;
X				default:
X					errmsgno(EX_BAD, "WARNING: Unknown compression type %d.\n", t);
X					break;
X				}
X				if (!ignoreerr) {
X					comerrno(EX_BAD,
X					"Unknown archive type (neither tar, nor bar/cpio).\n");
X				}
X			}
X			if ((chdrtype != H_UNDEF || (rflag || uflag)) &&
X			    chdrtype != hdrtype) {
X				errmsgno(EX_BAD, "Found: ");
X				print_hdrtype(stderr, hdrtype);
X				if (chdrtype == H_UNDEF) {
X					chdrtype = hdrtype;
X					if (rflag || uflag) {
X						setprops(hdrtype);
X						star_verifyopts();
X					}
X				} else {
X					errmsgno(EX_BAD,
X						"WARNING: extracting as ");
X					print_hdrtype(stderr, chdrtype);
X				}
X				hdrtype = chdrtype;
X			}
X			setprops(hdrtype);
X			/*
X			 * Wake up fifo (first block has been swapped above)
X			 * buf_resume() will trigger a shadow call to
X			 * setprops() in the fifo process to make sure that
X			 * the props structure is correct even in the second
X			 * process.
X			 */
X			buf_resume();
X			buf_rwake(props.pr_hdrsize); /* eat up archive header */
X		} else {
X			if (readblock((char *)ptb, props.pr_hdrsize) == EOF) {
X				errmsgno(EX_BAD,
X				"Hard EOF on input, first EOF block is missing at %lld.\n",
X				tblocks());
X				return (EOF);
X			}
X		}
X
X		if (H_TYPE(hdrtype) >= H_CPIO_BASE) {
X			/*
X			 * CPIO EOF check is currently in cpiotcb_to_info()
X			 * There is no checksum for the CPIO header.
X			 */
X			check = ocheck = 1;
X		} else {
X			eof = (ptb->dbuf.t_name[0] == '\0') && checkeof(ptb);
X			if (eof && !ignoreerr) {
X				return (EOF);
X			}
X			/*
X			 * XXX Hier muß eine Universalchecksummenüberprüfung hin
X			 * XXX Shouldn't we use tarsum_ok() from here?
X			 */
X			stoli(ptb->dbuf.t_chksum, &ocheck);
X			check = checksum(ptb);
X		}
X		/*
X		 * check == 0 : genullter Block.
X		 */
X		if (check != 0 && ocheck == check) {
X			char	*tmagic = ptb->ustar_dbuf.t_magic;
X
X			switch (H_TYPE(hdrtype)) {
X
X			case H_XUSTAR:
X			case H_EXUSTAR:
X				if (ismagic(tmagic) && isxmagic(ptb))
X					return (0);
X				/*
X				 * Both formats are equivalent.
X				 * Acept XSTAR too.
X				 */
X				/* FALLTHROUGH */
X			case H_XSTAR:
X				if (ismagic(tmagic) &&
X				    isstmagic(ptb->xstar_dbuf.t_xmagic))
X					return (0);
X				break;
X			case H_PAX:
X			case H_USTAR:
X			case H_SUNTAR:
X				if (ismagic(tmagic))
X					return (0);
X				break;
X			case H_GNUTAR:
X				if (isgnumagic(tmagic))
X					return (0);
X				break;
X			case H_STAR:
X				tmagic = ptb->star_dbuf.t_magic;
X				if (ptb->dbuf.t_vers < STVERSION ||
X				    isstmagic(tmagic))
X				return (0);
X				break;
X			default:
X			case H_TAR:
X			case H_OTAR:
X				return (0);
X
X			case H_CPIO_CHR:		/* cpio -Hodc */
X				if (strxneql((char *)ptb, "070707", 6))
X					return (0);
X				break;
X			case H_CPIO_ASC:		/* cpio -c */
X				if (strxneql((char *)ptb, "070701", 6))
X					return (0);
X				break;
X			case H_CPIO_ACRC:		/* cpio -Hcrc */
X				if (strxneql((char *)ptb, "070702", 6))
X					return (0);
X				break;
X			case H_CPIO_NBIN:
X			case H_CPIO_CRC:
X				errmsgno(EX_BAD, "Unimplemented %ld cpio format.\n",
X					hdrtype);
X				break;
X			case H_CPIO_BIN:		/* cpio default */
X				if (strxneql((char *)ptb, "\161\307", 2))
X					return (0);
X				if (strxneql((char *)ptb, "\307\161", 2))
X					return (0);
X				break;
X			}
X			switch (H_TYPE(hdrtype)) {
X
X			case H_CPIO_CHR:		/* cpio -Hodc */
X			case H_CPIO_ASC:		/* cpio -c */
X			case H_CPIO_ACRC:		/* cpio -Hcrc */
X							/* First Block# is 0 */
X				errmsgno(EX_BAD, "Wrong magic at: %lld: '%.6s'.\n",
X						tblocks(), (char *)ptb);
X				break;
X			case H_CPIO_NBIN:
X			case H_CPIO_CRC:
X			case H_CPIO_BIN:		/* cpio default */
X							/* First Block# is 0 */
X				errmsgno(EX_BAD, "Wrong magic at: %lld: '0%6.6o'.\n",
X						tblocks(),
X						(((char *)ptb)[0] & 0xFF) * 256 +
X						(((char *)ptb)[1] & 0xFF));
X				break;
X			default:
X							/* First Block# is 0 */
X				errmsgno(EX_BAD, "Wrong magic at: %lld: '%.8s'.\n",
X						tblocks(), tmagic);
X			}
X			/*
X			 * Allow buggy gnu Volheaders & Multivolheaders to work
X			 */
X			if (H_TYPE(hdrtype) == H_GNUTAR)
X				return (0);
X
X		} else if (eof) {
X			errmsgno(EX_BAD, "EOF Block at: %lld ignored.\n",
X							tblocks());
X		} else {
X			if (signedtarsum(ptb, ocheck))
X				return (0);
X			errmsgno(EX_BAD, "Checksum error at: %lld: 0%lo should be 0%lo.\n",
X							tblocks(),
X							ocheck, check);
X		}
X		if (ignoreerr) {
X			if (H_TYPE(hdrtype) >= H_CPIO_BASE)
X				cpio_resync();
X		}
X	} while (ignoreerr);
X	exprstats(EX_BAD);
X	/* NOTREACHED */
X	return (EOF);		/* Keep lint happy */
X}
X
XEXPORT void
Xput_tcb(ptb, info)
X	TCB	*ptb;
X	register FINFO	*info;
X{
X	TCB	tb;
X	int	x1 = 0;
X	int	x2 = 0;
X	BOOL	xhdr = FALSE;
Xextern	BOOL	ghdr;
X
X	if ((props.pr_flags & PR_CPIO) != 0) {
X		put_cpioh(ptb, info);
X		return;
X	}
X
X	if (info->f_flags & (F_LONGNAME|F_LONGLINK))
X		x1++;
X	if (info->f_xflags & (XF_PATH|XF_LINKPATH))
X		x1++;
X
X/* XXX start alter code und Test */
X	if (((info->f_flags & F_ADDSLASH) ? 1:0 +
X	    info->f_namelen > props.pr_maxsname &&
X	    (ptb->dbuf.t_prefix[0] == '\0' || H_TYPE(hdrtype) == H_GNUTAR)) ||
X		    info->f_lnamelen > props.pr_maxslname)
X		x2++;
X
X	if ((x1 != x2) && info->f_xftype != XT_META) {
Xerror("type: %ld name: '%s' x1 %d x2 %d namelen: %ld prefix: '%s' lnamelen: %ld\n",
Xinfo->f_filetype, info->f_name, x1, x2,
Xinfo->f_namelen, ptb->dbuf.t_prefix, info->f_lnamelen);
X	}
X/* XXX ende alter code und Test */
X
X	if (x1 || x2 || (info->f_xflags != 0) || ghdr)
X		xhdr = TRUE;
X
X	if (!multivol && tsize > 0) {
X		Llong	left;
X		off_t	size = info->f_rsize;
X
X		left = tsize - tblocks();
X		if (xhdr)
X			left -= 6;	/* Extimated for Longname/Longlink */
X
X		if (is_link(info))
X			size = 0L;
X						/* file + tcb + EOF */
X		if (left < (tarblocks(size)+1+2)) {
Xextern	BOOL	use_fifo;
X			if ((info->f_flags & F_TCB_BUF) != 0) {
X				movetcb(ptb, &tb);
X				ptb = &tb;
X				info->f_flags &= ~F_TCB_BUF;
X			}
X			nextotape();
X			newvolhdr((char *)NULL, 0, use_fifo);
X		}
X	}
X
X	if (xhdr) {
X		if ((info->f_flags & F_TCB_BUF) != 0) {	/* TCB is on buffer */
X			movetcb(ptb, &tb);
X			ptb = &tb;
X			info->f_flags &= ~F_TCB_BUF;
X		}
X		if ((info->f_xflags != 0) || ghdr)
X			info_to_xhdr(info, ptb);
X		else
X			write_longnames(info);
X	}
X	write_tcb(ptb, info);
X}
X
XEXPORT void
Xwrite_tcb(ptb, info)
X	TCB	*ptb;
X	register FINFO	*info;
X{
X	char	*addr;
X
X	if (!nullout) {				/* 17 (> 16) Bit !!! */
X		if (props.pr_fillc == '0')
X			litos(ptb->dbuf.t_chksum, checksum(ptb) & 0x1FFFF, 7);
X		else
X			litos(ptb->dbuf.t_chksum, checksum(ptb) & 0x1FFFF, 6);
X	}
X	if ((info->f_flags & F_TCB_BUF) != 0) {	/* TCB is on buffer */
X		addr = (char *)ptb;
X		put_block(TBLOCK);
X	} else {
X		addr = writeblock((char *)ptb);
X	}
X	marktcb(addr);
X}
X
XEXPORT void
Xinfo_to_tcb(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X	if (nullout)
X		return;
X
X	if (H_TYPE(hdrtype) >= H_CPIO_BASE) {
X		cpioinfo_to_tcb(info, ptb);
X		return;
X	}
X
X	if (props.pr_fillc == '0') {
X		/*
X		 * This is a POSIX compliant header, it is allowed to use
X		 * 7 bytes from 8 byte headers as POSIX only requires a ' ' or
X		 * '\0' as last char.
X		 */
X		if (modebits)
X			litos(ptb->dbuf.t_mode, (Ulong)(info->f_mode|info->f_type) & 0xFFFF, 7);
X		else
X			litos(ptb->dbuf.t_mode, (Ulong)info->f_mode & 0xFFFF, 7);
X
X		if (info->f_uid > MAXOCTAL7 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_UID;
X		}
X/* XXX */
X		litos(ptb->dbuf.t_uid, info->f_uid & MAXOCTAL7, 7);
X
X		if (info->f_gid > MAXOCTAL7 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_GID;
X		}
X/* XXX */
X		litos(ptb->dbuf.t_gid, info->f_gid & MAXOCTAL7, 7);
X	} else {
X		/*
X		 * This is a pre POSIX header, it is only allowed to use
X		 * 6 bytes from 8 byte headers as historic TAR requires a ' '
X		 * and a '\0' as last char.
X		 */
X		if (modebits)
X			litos(ptb->dbuf.t_mode, (Ulong)(info->f_mode|info->f_type) & 0xFFFF, 6);
X		else
X			litos(ptb->dbuf.t_mode, (Ulong)info->f_mode & 0xFFFF, 6);
X
X		if (info->f_uid > MAXOCTAL6 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_UID;
X		}
X/* XXX */
X		litos(ptb->dbuf.t_uid, info->f_uid & MAXOCTAL6, 6);
X
X		if (info->f_gid > MAXOCTAL6 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_GID;
X		}
X/* XXX */
X		litos(ptb->dbuf.t_gid, info->f_gid & MAXOCTAL6, 6);
X	}
X
X	if (info->f_rsize > MAXOCTAL11 && (props.pr_flags & PR_XHDR)) {
X		info->f_xflags |= XF_SIZE;
X	}
X/* XXX */
X	if (info->f_rsize <= MAXINT32) {
X		litos(ptb->dbuf.t_size, (Ulong)info->f_rsize, 11);
X	} else {
X		if (info->f_rsize > MAXOCTAL11 &&
X		    (props.pr_flags & PR_BASE256) == 0) {
X			litos(ptb->dbuf.t_size, (Ulong)0, 11);
X		} else {
X			llitos(ptb->dbuf.t_size, (Ullong)info->f_rsize, 11);
X		}
X	}
X	litos(ptb->dbuf.t_mtime, (Ulong)info->f_mtime, 11);
X	ptb->dbuf.t_linkflag = XTTOUS(info->f_xftype);
X
X	if (H_TYPE(hdrtype) == H_USTAR) {
X		info_to_ustar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_PAX) {
X		info_to_ustar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_SUNTAR) {
X		info_to_ustar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_XSTAR) {
X		info_to_xstar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_XUSTAR) {
X		info_to_xstar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_EXUSTAR) {
X		info_to_xstar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_GNUTAR) {
X		info_to_gnutar(info, ptb);
X	} else if (H_TYPE(hdrtype) == H_STAR) {
X		info_to_star(info, ptb);
X	}
X}
X
X/*
X * Used to create old star format header.
X */
XLOCAL void
Xinfo_to_star(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X	ptb->dbuf.t_vers = STVERSION;
X	litos(ptb->dbuf.t_filetype, info->f_filetype & 0xFFFF, 6);	/* XXX -> 7 ??? */
X	litos(ptb->dbuf.t_type, (Ulong)info->f_type & 0xFFFF, 11);
X#ifdef	needed
X	/* XXX we need to do something if st_rdev is > 32 bits */
X	if ((info->f_rdevmaj > MAXOCTAL7 || info->f_rdevmin > MAXOCTAL7) &&
X	    (props.pr_flags & PR_XHDR)) {
X		info->f_xflags |= XF_DEVMAJOR|XF_DEVMINOR;
X	}
X#endif
X	litos(ptb->dbuf.t_rdev, info->f_rdev, 11);
X#ifdef	DEV_MINOR_NONCONTIG
X	ptb->dbuf.t_devminorbits = '@';
X	if (props.pr_flags & PR_XHDR) {
X		info->f_xflags |= XF_DEVMAJOR|XF_DEVMINOR;
X	}
X#else
X	ptb->dbuf.t_devminorbits = '@' + minorbits;
X#endif
X
X	litos(ptb->dbuf.t_atime, (Ulong)info->f_atime, 11);
X	litos(ptb->dbuf.t_ctime, (Ulong)info->f_ctime, 11);
X	ptb->dbuf.t_magic[0] = 't';
X	ptb->dbuf.t_magic[1] = 'a';
X	ptb->dbuf.t_magic[2] = 'r';
X	if (!numeric) {
X		ic_nameuid(ptb->dbuf.t_uname, STUNMLEN, info->f_uid);
X		/* XXX Korrektes overflowchecking */
X		if (ptb->dbuf.t_uname[STUNMLEN-1] != '\0' &&
X		    props.pr_flags & PR_XHDR) {
X			info->f_xflags |= XF_UNAME;
X		}
X		ic_namegid(ptb->dbuf.t_gname, STGNMLEN, info->f_gid);
X		/* XXX Korrektes overflowchecking */
X		if (ptb->dbuf.t_gname[STGNMLEN-1] != '\0' &&
X		    props.pr_flags & PR_XHDR) {
X			info->f_xflags |= XF_GNAME;
X		}
X		if (*ptb->dbuf.t_uname) {
X			info->f_uname = ptb->dbuf.t_uname;
X			info->f_umaxlen = STUNMLEN;
X		}
X		if (*ptb->dbuf.t_gname) {
X			info->f_gname = ptb->dbuf.t_gname;
X			info->f_gmaxlen = STGNMLEN;
X		}
X	}
X
X	if (is_sparse(info) || is_multivol(info)) {
X		if (info->f_size > MAXOCTAL11 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_REALSIZE;
X		}
X		/* XXX Korrektes overflowchecking fuer xhdr */
X		if (info->f_size <= MAXINT32) {
X			litos(ptb->xstar_in_dbuf.t_realsize, (Ulong)info->f_size, 11);
X		} else {
X			llitos(ptb->xstar_in_dbuf.t_realsize, (Ullong)info->f_size, 11);
X		}
X	}
X	if (is_multivol(info)) {
X		if (info->f_contoffset > MAXOCTAL11 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_OFFSET;
X		}
X		if ((info->f_xflags & XF_OFFSET) == 0) {
X			/*
X			 * Don't fill out contoffset if we have a xheader.
X			 */
X			if (info->f_contoffset <= MAXINT32) {
X				litos(ptb->xstar_in_dbuf.t_offset,
X					(Ulong)info->f_contoffset, 11);
X			} else {
X				llitos(ptb->xstar_in_dbuf.t_offset,
X					(Ullong)info->f_contoffset, 11);
X			}
X		}
X	}
X}
X
X/*
X * Used to create USTAR, PAX, SunTAR format header.
X */
XLOCAL void
Xinfo_to_ustar(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X	ptb->ustar_dbuf.t_magic[0] = 'u';
X	ptb->ustar_dbuf.t_magic[1] = 's';
X	ptb->ustar_dbuf.t_magic[2] = 't';
X	ptb->ustar_dbuf.t_magic[3] = 'a';
X	ptb->ustar_dbuf.t_magic[4] = 'r';
X
X	/*
X	 * strncpy is slow: use handcrafted replacement.
X	 */
X	ptb->ustar_dbuf.t_version[0] = '0';
X	ptb->ustar_dbuf.t_version[1] = '0';
X
X	if (!numeric) {
X		/* XXX Korrektes overflowchecking fuer xhdr */
X		ic_nameuid(ptb->ustar_dbuf.t_uname, TUNMLEN, info->f_uid);
X		/* XXX Korrektes overflowchecking fuer xhdr */
X		ic_namegid(ptb->ustar_dbuf.t_gname, TGNMLEN, info->f_gid);
X		if (*ptb->ustar_dbuf.t_uname) {
X			info->f_uname = ptb->ustar_dbuf.t_uname;
X			info->f_umaxlen = TUNMLEN;
X		}
X		if (*ptb->ustar_dbuf.t_gname) {
X			info->f_gname = ptb->ustar_dbuf.t_gname;
X			info->f_gmaxlen = TGNMLEN;
X		}
X	}
X	if (info->f_rdevmaj > MAXOCTAL7 && (props.pr_flags & PR_XHDR)) {
X		info->f_xflags |= XF_DEVMAJOR;
X	}
X/* XXX */
X	litos(ptb->ustar_dbuf.t_devmajor, info->f_rdevmaj, 7);
X#if	DEV_MINOR_BITS > 21		/* XXX */
X	/*
X	 * XXX The DEV_MINOR_BITS autoconf macro is only tested with 32 bit
X	 * XXX ints but this does not matter as it is sufficient to know that
X	 * XXX it will not fit into a 7 digit octal number.
X	 */
X	if (info->f_rdevmin > MAXOCTAL7) {
X		extern	BOOL	hpdev;
X
X		if (props.pr_flags & PR_XHDR) {
X			info->f_xflags |= XF_DEVMINOR;
X		}
X		if ((info->f_rdevmin <= MAXOCTAL8) && hpdev) {
X			char	c;
X
X			/*
X			 * Implement the method from HP-UX that allows 24 bit
X			 * for the device minor number. Note that this method
X			 * violates the POSIX specs.
X			 */
X			c = ptb->ustar_dbuf.t_prefix[0];
X			litos(ptb->ustar_dbuf.t_devminor, info->f_rdevmin, 8);
X			ptb->ustar_dbuf.t_prefix[0] = c;
X		} else {
X			/*
X			 * XXX If we ever need to write more than a long into
X			 * XXX devmajor, we need to change llitos() to check
X			 * XXX for 7 char limits too.
X			 */
X/* XXX */
X			btos(ptb->ustar_dbuf.t_devminor, info->f_rdevmin, 7);
X		}
X	} else
X#endif
X		{
X		litos(ptb->ustar_dbuf.t_devminor, info->f_rdevmin, 7);
X	}
X}
X
X/*
X * Used to create XSTAR, XUSTAR, EXUSTAR format header.
X */
XLOCAL void
Xinfo_to_xstar(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X	info_to_ustar(info, ptb);
X	litos(ptb->xstar_dbuf.t_atime, (Ulong)info->f_atime, 11);
X	litos(ptb->xstar_dbuf.t_ctime, (Ulong)info->f_ctime, 11);
X
X	/*
X	 * Help recognition in isxmagic(), make sure that prefix[130] is null.
X	 */
X	ptb->xstar_dbuf.t_prefix[130] = '\0';
X
X	if (H_TYPE(hdrtype) == H_XSTAR) {
X		ptb->xstar_dbuf.t_xmagic[0] = 't';
X		ptb->xstar_dbuf.t_xmagic[1] = 'a';
X		ptb->xstar_dbuf.t_xmagic[2] = 'r';
X	}
X	if (is_sparse(info) || is_multivol(info)) {
X		if (info->f_size > MAXOCTAL11 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_REALSIZE;
X		}
X		/* XXX Korrektes overflowchecking fuer xhdr */
X		if (info->f_size <= MAXINT32) {
X			litos(ptb->xstar_in_dbuf.t_realsize, (Ulong)info->f_size, 11);
X		} else {
X			llitos(ptb->xstar_in_dbuf.t_realsize, (Ullong)info->f_size, 11);
X		}
X	}
X	if (is_multivol(info)) {
X		if (info->f_contoffset > MAXOCTAL11 && (props.pr_flags & PR_XHDR)) {
X			info->f_xflags |= XF_OFFSET;
X		}
X		if ((info->f_xflags & XF_OFFSET) == 0) {
X			/*
X			 * Don't fill out contoffset if we have a xheader.
X			 */
X			if (info->f_contoffset <= MAXINT32) {
X				litos(ptb->xstar_in_dbuf.t_offset,
X					(Ulong)info->f_contoffset, 11);
X			} else {
X				llitos(ptb->xstar_in_dbuf.t_offset,
X					(Ullong)info->f_contoffset, 11);
X			}
X		}
X	}
X}
X
X/*
X * Used to create GNU tar format header.
X */
XLOCAL void
Xinfo_to_gnutar(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X	strcpy(ptb->gnu_dbuf.t_magic, gmagic);
X
X	if (!numeric) {
X		ic_nameuid(ptb->ustar_dbuf.t_uname, TUNMLEN, info->f_uid);
X		ic_namegid(ptb->ustar_dbuf.t_gname, TGNMLEN, info->f_gid);
X		if (*ptb->ustar_dbuf.t_uname) {
X			info->f_uname = ptb->ustar_dbuf.t_uname;
X			info->f_umaxlen = TUNMLEN;
X		}
X		if (*ptb->ustar_dbuf.t_gname) {
X			info->f_gname = ptb->ustar_dbuf.t_gname;
X			info->f_gmaxlen = TGNMLEN;
X		}
X	}
X	if (info->f_xftype == XT_CHR || info->f_xftype == XT_BLK) {
X		litos(ptb->ustar_dbuf.t_devmajor, info->f_rdevmaj, 6);	/* XXX -> 7 ??? */
X		litos(ptb->ustar_dbuf.t_devminor, info->f_rdevmin, 6);	/* XXX -> 7 ??? */
X	}
X
X	/*
X	 * XXX GNU tar only fill this if doing a gnudump.
X	 */
X	litos(ptb->gnu_dbuf.t_atime, (Ulong)info->f_atime, 11);
X	litos(ptb->gnu_dbuf.t_ctime, (Ulong)info->f_ctime, 11);
X
X	if (is_sparse(info)) {
X		if (info->f_size <= MAXINT32) {
X			litos(ptb->gnu_in_dbuf.t_realsize, (Ulong)info->f_size, 11);
X		} else {
X			llitos(ptb->gnu_in_dbuf.t_realsize, (Ullong)info->f_size, 11);
X		}
X	}
X}
X
XEXPORT int
Xtcb_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	int	ret = 0;
X	char	xname;
X	char	xlink;
X	char	xpfx;
X	Ulong	ul;
X	Ullong	ull;
X	int	xt = XT_BAD;
X	int	rxt = XT_BAD;
Xstatic	BOOL	posixwarn = FALSE;
Xstatic	BOOL	namewarn = FALSE;
Xstatic	BOOL	modewarn = FALSE;
X
X	/*
X	 * F_HAS_NAME is only used from list.c when the -listnew option is
X	 * present. Keep f_lname and f_name, don't read LF_LONGLINK/LF_LONGNAME
X	 * in this case.
X	 */
X	info->f_namelen = info->f_lnamelen = 0;
X	info->f_uname = info->f_gname = NULL;
X	info->f_umaxlen = info->f_gmaxlen = 0L;
X	info->f_xftype = XT_BAD;
X	info->f_rxftype = XT_BAD;
X	info->f_xflags = 0;
X	info->f_contoffset = (off_t)0;
X	info->f_flags &= F_HAS_NAME;
X	info->f_fflags = 0L;
X	info->f_nlink = 0;
X	info->f_dir = NULL;
X	info->f_dirinos = NULL;
X	info->f_dirents = 0;
X	info->f_llsize = 0;
X
X	tcb_to_xhdr_reset();	/* Falsch wenn wir mehr als @ in list wollen */
X
X	if (H_TYPE(hdrtype) >= H_CPIO_BASE)
X		return (cpiotcb_to_info(ptb, info));
X
X	while (pr_isxheader(ptb->dbuf.t_linkflag)) {
X		/*
X		 * Handle POSIX.1-2001 extensions.
X		 */
X		if ((ptb->dbuf.t_linkflag == LF_XHDR ||
X				    ptb->dbuf.t_linkflag == LF_GHDR ||
X				    ptb->dbuf.t_linkflag == LF_VU_XHDR)) {
X			ret = tcb_to_xhdr(ptb, info);
X			info->f_flags &= ~F_DATA_SKIPPED;
X			if (ret != 0)
X				return (ret);
X
X			xt  = info->f_xftype;
X			rxt = info->f_rxftype;
X		}
X		/*
X		 * Handle very long names the old (star & gnutar) way.
X		 */
X		if ((info->f_flags & F_HAS_NAME) == 0 &&
X					props.pr_nflags & PR_LONG_NAMES) {
X			while (ptb->dbuf.t_linkflag == LF_LONGLINK ||
X				    ptb->dbuf.t_linkflag == LF_LONGNAME) {
X				ret = tcb_to_longname(ptb, info);
X				info->f_flags &= ~F_DATA_SKIPPED;
X			}
X		}
X	}
X	if (!pr_validtype(ptb->dbuf.t_linkflag)) {
X		errmsgno(EX_BAD,
X		"WARNING: Archive contains unknown typeflag '%c' (0x%02X) at %lld.\n",
X			ptb->dbuf.t_linkflag, ptb->dbuf.t_linkflag, tblocks());
X	}
X
X	if (ptb->ndbuf.t_name[NAMSIZ] == '\0') { /* "ndbuf" is NAMSIZE+1 */
X		if (ptb->dbuf.t_name[NAMSIZ-1] == '\0') {
X			if (!nowarn && !modewarn) {
X				errmsgno(EX_BAD,
X				"WARNING: Archive violates POSIX 1003.1 (mode field starts with null byte).\n");
X				modewarn = TRUE;
X			}
X		} else if (!nowarn && !namewarn) {
X			errmsgno(EX_BAD,
X			"WARNING: Archive violates POSIX 1003.1 (100 char filename is null terminated).\n");
X			namewarn = TRUE;
X		}
X		ptb->ndbuf.t_name[NAMSIZ] = ' ';
X	}
X	stoli(ptb->dbuf.t_mode, &ul);
X	info->f_mode = ul;
X	if (info->f_mode & ~07777) {
X		if (!nowarn && !modebits && H_TYPE(hdrtype) == H_USTAR && !posixwarn) {
X			errmsgno(EX_BAD,
X			"WARNING: Archive violates POSIX 1003.1 (too many bits in mode field).\n");
X			posixwarn = TRUE;
X		}
X		info->f_mode &= 07777;
X	}
X	if ((info->f_xflags & XF_UID) == 0) {
X		stoli(ptb->dbuf.t_uid, &ul);
X		info->f_uid = ul;
X		if (info->f_uid != ul) {
X			print_hrange("uid", (Ullong)ul);
X			info->f_flags |= F_BAD_UID;
X			info->f_uid = ic_uid_nobody();
X		}
X	}
X	if ((info->f_xflags & XF_UID) == 0) {
X		stoli(ptb->dbuf.t_gid, &ul);
X		info->f_gid = ul;
X		if (info->f_gid != ul) {
X			print_hrange("gid", (Ullong)ul);
X			info->f_flags |= F_BAD_GID;
X			info->f_gid = ic_gid_nobody();
X		}
X	}
X
X	/*
X	 * Possible flags from extended header:
X	 * XF_SIZE|XF_REALSIZE	Found either	"size" or
X	 *					"SCHILY.realsize" and "size"
X	 * XF_REALSIZE		Found only	"SCHILY.realsize"
X	 * 0			Found neither	"SCHILY.realsize" nor "size"
X	 */
X	if ((info->f_xflags & XF_SIZE) == 0) {
X		stolli(ptb->dbuf.t_size, &ull);
X		if ((info->f_xflags & XF_SIZE) == 0) {
X			info->f_rsize = info->f_llsize = ull;
X			if (info->f_rsize != ull) {
X				print_hrange("size", ull);
X				info->f_rsize = 0,
X				info->f_flags |= (F_BAD_META | F_BAD_SIZE);
X			}
X		}
X		if ((info->f_xflags & XF_REALSIZE) == 0)
X			info->f_size = ull;
X	}
X
X	switch (ptb->dbuf.t_linkflag) {
X
X	case LNKTYPE:
X		if (linkdata)
X			break;
X		if (props.pr_flags & PR_LINK_DATA)
X			break;
X		/* FALLTHROUGH */
X	case DIRTYPE:
X	case CHRTYPE:
X	case BLKTYPE:
X	case FIFOTYPE:
X	case LF_META:
X		info->f_rsize = 0L;
X		info->f_llsize = 0L;
X		break;
X
X	default:
X		/*
X		 * Nothing to do here, we did handle this already above the
X		 * switch statement.
X		 */
X		break;
X	}
X
X	if ((info->f_xflags & XF_MTIME) == 0) {
X		stoli(ptb->dbuf.t_mtime, &ul);
X		info->f_mtime = (time_t)ul;
X		info->f_mnsec = 0L;
X		if (info->f_mtime != ul) {
X			print_hrange("time", (Ullong)ul);
X			info->f_mtime = 0;
X		}
X	}
X
X	info->f_typeflag = ptb->ustar_dbuf.t_typeflag;
X
X	switch (H_TYPE(hdrtype)) {
X
X	default:
X	case H_TAR:
X	case H_OTAR:
X		tar_to_info(ptb, info);
X		break;
X	case H_PAX:
X	case H_USTAR:
X	case H_SUNTAR:
X		ustar_to_info(ptb, info);
X		break;
X	case H_XSTAR:
X	case H_XUSTAR:
X	case H_EXUSTAR:
X		xstar_to_info(ptb, info);
X		break;
X	case H_GNUTAR:
X		gnutar_to_info(ptb, info);
X		break;
X	case H_STAR:
X		star_to_info(ptb, info);
X		break;
X	}
X	info->f_rxftype = info->f_xftype;
X	if (rxt != XT_BAD) {
X		info->f_rxftype = rxt;
X		info->f_filetype = XTTOST(info->f_rxftype);
X		info->f_type = XTTOIF(info->f_rxftype);
X		/*
X		 * XT_LINK may be any 'real' file type,
X		 * XT_META may be either a regular file or a contigouos file.
X		 */
X		if (info->f_xftype != XT_LINK && info->f_xftype != XT_META)
X			info->f_xftype = info->f_rxftype;
X	}
X	if (xt != XT_BAD) {
X		info->f_xftype = xt;
X	}
X
X	/*
X	 * Hack for list module (option -newest) ...
X	 * Save and restore t_name[NAMSIZ] & t_linkname[NAMSIZ]
X	 * Use "ndbuf" to permit NAMESIZE as index.
X	 */
X	xname = ptb->ndbuf.t_name[NAMSIZ];
X	ptb->ndbuf.t_name[NAMSIZ] = '\0';	/* allow 100 chars in name */
X	xlink = ptb->ndbuf.t_linkname[NAMSIZ];
X	ptb->ndbuf.t_linkname[NAMSIZ] = '\0'; /* allow 100 chars in linkname */
X	xpfx = ptb->ndbuf.t_prefix[PFXSIZ];
X	ptb->ndbuf.t_prefix[PFXSIZ] = '\0';	/* allow 155 chars in prefix */
X
X	/*
X	 * Handle long name in posix split form now.
X	 * Also copy ptb->dbuf.t_linkname[] if namelen is == 100.
X	 */
X	tcb_to_name(ptb, info);
X
X	ptb->ndbuf.t_name[NAMSIZ] = xname;	/* restore remembered value */
X	ptb->ndbuf.t_linkname[NAMSIZ] = xlink;	/* restore remembered value */
X	ptb->ndbuf.t_prefix[PFXSIZ] = xpfx;	/* restore remembered value */
X
X	if (info->f_flags & F_BAD_UID)
X		info->f_mode &= ~TSUID;
X	if (info->f_flags & F_BAD_GID)
X		info->f_mode &= ~TSGID;
X
X	return (ret);
X}
X
X/*
X * Used to convert from old tar format header.
X */
XLOCAL void
Xtar_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	register int	typeflag = ptb->ustar_dbuf.t_typeflag;
X
X	if (ptb->dbuf.t_name[strlen(ptb->dbuf.t_name) - 1] == '/') {
X		typeflag = DIRTYPE;
X		info->f_filetype = F_DIR;
X		info->f_rsize = (off_t)0;	/* XXX hier?? siehe oben */
X	} else if (typeflag == SYMTYPE) {
X		info->f_filetype = F_SLINK;
X	} else if (typeflag != DIRTYPE) {
X		info->f_filetype = F_FILE;
X	}
X	info->f_xftype = USTOXT(typeflag);
X	info->f_type = XTTOIF(info->f_xftype);
X	info->f_rdevmaj = info->f_rdevmin = info->f_rdev = 0;
X	info->f_ctime = info->f_atime = info->f_mtime;
X	info->f_cnsec = info->f_ansec = 0L;
X}
X
X/*
X * Used to convert from old star format header.
X */
XLOCAL void
Xstar_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	Ulong	id;
X	uid_t	uid;
X	gid_t	gid;
X	Ullong	ull;
X	int	mbits;
X
X	version = ptb->dbuf.t_vers;
X	if (ptb->dbuf.t_vers < STVERSION) {
X		tar_to_info(ptb, info);
X		return;
X	}
X	stoli(ptb->dbuf.t_filetype, &info->f_filetype);
X	stoli(ptb->dbuf.t_type, &id);
X	info->f_type = id;
X	/*
X	 * star Erweiterungen sind wieder ANSI kompatibel, d.h. linkflag
X	 * hält den echten Dateityp (LONKLINK, LONGNAME, SPARSE ...)
X	 */
X	if (ptb->dbuf.t_linkflag < '1')
X		info->f_xftype = IFTOXT(info->f_type);
X	else
X		info->f_xftype = USTOXT(ptb->ustar_dbuf.t_typeflag);
X
X	stoli(ptb->dbuf.t_rdev, &id);
X	info->f_rdev = id;
X	if ((info->f_rdev != id) && is_dev(info)) {
X		print_hrange("rdev", (Ullong)id);
X		info->f_flags |= F_BAD_META;
X	}
X	if ((info->f_xflags & (XF_DEVMAJOR|XF_DEVMINOR)) !=
X						(XF_DEVMAJOR|XF_DEVMINOR)) {
X		mbits = ptb->dbuf.t_devminorbits - '@';
X		if (mbits == 0) {
X			static	BOOL	dwarned = FALSE;
X			if (!dwarned) {
X#ifdef	DEV_MINOR_NONCONTIG
X				errmsgno(EX_BAD,
X				"WARNING: Minor device numbers are non contiguous.\n");
X				errmsgno(EX_BAD,
X				"WARNING: Devices may not be extracted correctly.\n");
X#else
X				errmsgno(EX_BAD,
X				"WARNING: The archiving system used non contiguous minor numbers.\n");
X				errmsgno(EX_BAD,
X				"WARNING: Cannot extract devices correctly.\n");
X#endif
X				dwarned = TRUE;
X			}
X			/*
X			 * Let us hope that both, the archiving and the
X			 * extracting system use the same major()/minor()
X			 * mapping.
X			 */
X			info->f_rdevmaj	= major(info->f_rdev);
X			info->f_rdevmin	= minor(info->f_rdev);
X		} else {
X			/*
X			 * Convert from remote major()/minor() mapping to
X			 * local major()/minor() mapping.
X			 */
X			if (mbits < 0)		/* Old star format */
X				mbits = 8;
X			info->f_rdevmaj	= _dev_major(mbits, info->f_rdev);
X			info->f_rdevmin	= _dev_minor(mbits, info->f_rdev);
X			info->f_rdev = makedev(info->f_rdevmaj, info->f_rdevmin);
X		}
X	}
X
X	if ((info->f_xflags & XF_ATIME) == 0) {
X		stoli(ptb->dbuf.t_atime, &id);
X		info->f_atime = (time_t)id;
X		info->f_ansec = 0L;
X	}
X	if ((info->f_xflags & XF_CTIME) == 0) {
X		stoli(ptb->dbuf.t_ctime, &id);
X		info->f_ctime = (time_t)id;
X		info->f_cnsec = 0L;
X	}
X
X	if ((info->f_xflags & XF_UNAME) == 0) {
X		if (*ptb->dbuf.t_uname) {
X			info->f_uname = ptb->dbuf.t_uname;
X			info->f_umaxlen = STUNMLEN;
X		}
X	}
X	if (info->f_uname) {
X		if (!numeric && ic_uidname(info->f_uname, info->f_umaxlen, &uid)) {
X			info->f_flags &= ~F_BAD_UID;
X			info->f_uid = uid;
X		}
X	}
X	if ((info->f_xflags & XF_GNAME) == 0) {
X		if (*ptb->dbuf.t_gname) {
X			info->f_gname = ptb->dbuf.t_gname;
X			info->f_gmaxlen = STGNMLEN;
X		}
X	}
X	if (info->f_gname) {
X		if (!numeric && ic_gidname(info->f_gname, info->f_gmaxlen, &gid)) {
X			info->f_flags &= ~F_BAD_GID;
X			info->f_gid = gid;
X		}
X	}
X
X	if (is_sparse(info) || is_multivol(info)) {
X		if ((info->f_xflags & XF_REALSIZE) == 0) {
X			stolli(ptb->xstar_in_dbuf.t_realsize, &ull);
X			info->f_size = ull;
X		}
X	}
X	if (is_multivol(info)) {
X		if ((info->f_xflags & XF_OFFSET) == 0) {
X			stolli(ptb->xstar_in_dbuf.t_offset, &ull);
X			info->f_contoffset = ull;
X		}
X	}
X}
X
X/*
X * Used to convert from USTAR, PAX, SunTAR format header.
X */
XLOCAL void
Xustar_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	uid_t	uid;
X	gid_t	gid;
X	dev_t	d;
X	Ulong	ul;
X	char	c;
X
X	info->f_xftype = USTOXT(ptb->ustar_dbuf.t_typeflag);
X	info->f_filetype = XTTOST(info->f_xftype);
X	info->f_type = XTTOIF(info->f_xftype);
X
X	if ((info->f_xflags & XF_UNAME) == 0) {
X		if (*ptb->ustar_dbuf.t_uname) {
X			info->f_uname = ptb->ustar_dbuf.t_uname;
X			info->f_umaxlen = TUNMLEN;
X		}
X	}
X	if (info->f_uname) {
X		if (!numeric && ic_uidname(info->f_uname, info->f_umaxlen, &uid)) {
X			info->f_flags &= ~F_BAD_UID;
X			info->f_uid = uid;
X		}
X	}
X	if ((info->f_xflags & XF_GNAME) == 0) {
X		if (*ptb->ustar_dbuf.t_gname) {
X			info->f_gname = ptb->ustar_dbuf.t_gname;
X			info->f_gmaxlen = TGNMLEN;
X		}
X	}
X	if (info->f_gname) {
X		if (!numeric && ic_gidname(info->f_gname, info->f_gmaxlen, &gid)) {
X			info->f_flags &= ~F_BAD_GID;
X			info->f_gid = gid;
X		}
X	}
X
X	if ((info->f_xflags & XF_DEVMAJOR) == 0) {
X		if (ptb->ustar_dbuf.t_devmajor[0] & 0x80)
X			stob(ptb->ustar_dbuf.t_devmajor, &ul, 7);
X		else
X			stoli(ptb->ustar_dbuf.t_devmajor, &ul);
X		info->f_rdevmaj = ul;
X		d = makedev(info->f_rdevmaj, 0);
X		d = major(d);
X		if ((d != ul) && is_dev(info)) {
X			print_hrange("rdevmajor", (Ullong)ul);
X			info->f_flags |= F_BAD_META;
X		}
X	}
X
X	if ((info->f_xflags & XF_DEVMINOR) == 0) {
X		if (ptb->ustar_dbuf.t_devminor[0] & 0x80) {
X			stob(ptb->ustar_dbuf.t_devminor, &ul, 7);
X		} else {
X			/*
X			 * The 'tar' that comes with HP-UX writes illegal tar
X			 * archives. It includes 8 characters in the minor
X			 * field and allows to archive 24 bits for the minor
X			 * device which are used by HP-UX. As we like to be
X			 * able to read these archives, we need to convert
X			 * the number carefully by temporarily writing a NULL
X			 * to the next character and restoring the right
X			 * content afterwards.
X			 */
X			c = ptb->ustar_dbuf.t_prefix[0];
X			ptb->ustar_dbuf.t_prefix[0] = '\0';
X			stoli(ptb->ustar_dbuf.t_devminor, &ul);
X			ptb->ustar_dbuf.t_prefix[0] = c;
X		}
X		info->f_rdevmin = ul;
X		d = makedev(0, info->f_rdevmin);
X		d = minor(d);
X		if ((d != ul) && is_dev(info)) {
X			print_hrange("rdevminor", (Ullong)ul);
X			info->f_flags |= F_BAD_META;
X		}
X	}
X
X	info->f_rdev = makedev(info->f_rdevmaj, info->f_rdevmin);
X
X	/*
X	 * ANSI Tar hat keine atime & ctime im Header!
X	 */
X	if ((info->f_xflags & XF_ATIME) == 0) {
X		info->f_atime = info->f_mtime;
X		info->f_ansec = 0L;
X	}
X	if ((info->f_xflags & XF_CTIME) == 0) {
X		info->f_ctime = info->f_mtime;
X		info->f_cnsec = 0L;
X	}
X}
X
X/*
X * Used to convert from XSTAR, XUSTAR, EXUSTAR format header.
X */
XLOCAL void
Xxstar_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	Ulong	ul;
X	Ullong	ull;
X
X	ustar_to_info(ptb, info);
X
X	if ((info->f_xflags & XF_ATIME) == 0) {
X		stoli(ptb->xstar_dbuf.t_atime, &ul);
X		info->f_atime = (time_t)ul;
X		info->f_ansec = 0L;
X	}
X	if ((info->f_xflags & XF_CTIME) == 0) {
X		stoli(ptb->xstar_dbuf.t_ctime, &ul);
X		info->f_ctime = (time_t)ul;
X		info->f_cnsec = 0L;
X	}
X
X	if (is_sparse(info) || is_multivol(info)) {
X		if ((info->f_xflags & XF_REALSIZE) == 0) {
X			stolli(ptb->xstar_in_dbuf.t_realsize, &ull);
X			info->f_size = ull;
X		}
X	}
X	if (is_multivol(info)) {
X		if ((info->f_xflags & XF_OFFSET) == 0) {
X			stolli(ptb->xstar_in_dbuf.t_offset, &ull);
X			info->f_contoffset = ull;
X		}
X	}
X}
X
X/*
X * Used to convert from GNU tar format header.
X */
XLOCAL void
Xgnutar_to_info(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	Ulong	ul;
X	Ullong	ull;
X
X	ustar_to_info(ptb, info);
X
X	if ((info->f_xflags & XF_ATIME) == 0) {
X		stoli(ptb->gnu_dbuf.t_atime, &ul);
X		info->f_atime = (time_t)ul;
X		info->f_ansec = 0L;
X		if (info->f_atime == 0 && ptb->gnu_dbuf.t_atime[0] == '\0')
X			info->f_atime = info->f_mtime;
X	}
X
X	if ((info->f_xflags & XF_CTIME) == 0) {
X		stoli(ptb->gnu_dbuf.t_ctime, &ul);
X		info->f_ctime = (time_t)ul;
X		info->f_cnsec = 0L;
X		if (info->f_ctime == 0 && ptb->gnu_dbuf.t_ctime[0] == '\0')
X			info->f_ctime = info->f_mtime;
X	}
X
X	if (is_sparse(info)) {
X		stolli(ptb->gnu_in_dbuf.t_realsize, &ull);
X		info->f_size = ull;
X	}
X	if (is_multivol(info)) {
X		stolli(ptb->gnu_dbuf.t_offset, &ull);
X		info->f_contoffset = ull;
X	}
X}
X
XLOCAL int
Xustoxt(ustype)
X	char	ustype;
X{
X	/*
X	 * Map ANSI types
X	 */
X	if (ustype >= REGTYPE && ustype <= CONTTYPE)
X		return (_USTOXT(ustype));
X
X	/*
X	 * Map Vendor Unique (Gnu tar & Star) types ANSI: "local enhancements"
X	 */
X	if ((props.pr_flags & (PR_LOCAL_STAR|PR_LOCAL_GNU)) &&
X					ustype >= 'A' && ustype <= 'Z')
X		return (_VTTOXT(ustype));
X
X	/*
X	 * treat unknown types as regular files conforming to standard
X	 */
X	return (XT_FILE);
X}
X
XLOCAL BOOL
Xcheckeof(ptb)
X	TCB	*ptb;
X{
Xextern	m_stats	*stats;
X
X	if (!eofblock(ptb))
X		return (FALSE);
X	if (debug)
X		errmsgno(EX_BAD, "First  EOF Block at %lld OK\n", tblocks());
X
X	stats->eofblock = tblocks();
X	markeof();
X
X	if (readblock((char *)ptb, TBLOCK) == EOF) {
X		errmsgno(EX_BAD,
X		"Incorrect EOF, second EOF block is missing at %lld.\n",
X		tblocks());
X		return (TRUE);
X	}
X	if (!eofblock(ptb)) {
X		if (!nowarn)
X			errmsgno(EX_BAD,
X			"WARNING: Partial (single block) EOF detected at %lld.\n",
X			tblocks());
X		return (FALSE);
X	}
X	if (debug)
X		errmsgno(EX_BAD, "Second EOF Block OK at %lld\n", tblocks());
X
X	stats->eofblock = tblocks();
X	return (TRUE);
X}
X
XLOCAL BOOL
Xeofblock(ptb)
X	TCB	*ptb;
X{
X	register short	i;
X	register char	*s = (char *)ptb;
X
X	if (props.pr_nflags & PR_DUMB_EOF)
X		return (ptb->dbuf.t_name[0] == '\0');
X
X	for (i = 0; i < TBLOCK; i++)
X		if (*s++ != '\0')
X			return (FALSE);
X	return (TRUE);
X}
X
X/*
X * Convert string -> long int
X */
XLOCAL void
Xstoli(s, l)
X	register char	*s;
X		Ulong	*l;
X{
X	register Ulong	ret = 0L;
X	register char	c;
X	register int	t;
X
X	while (*s == ' ')
X		s++;
X
X	for (;;) {
X		c = *s++;
X		if (isoctal(c))
X			t = c - '0';
X		else
X			break;
X		ret *= 8;
X		ret += t;
X	}
X	*l = ret;
X}
X
X/*
X * Convert string -> long long int
X */
XEXPORT void
Xstolli(s, ull)
X	register char	*s;
X		Ullong	*ull;
X{
X	register Ullong	ret = (Ullong)0;
X	register char	c;
X	register int	t;
X
X	if (*((Uchar*)s) & 0x80) {
X		stollb(s, ull, 11);
X		return;
X	}
X
X	while (*s == ' ')
X		s++;
X
X	for (;;) {
X		c = *s++;
X		if (isoctal(c))
X			t = c - '0';
X		else
X			break;
X		ret *= 8;
X		ret += t;
X	}
X	*ull = ret;
X}
X
X/*
X * Convert long int -> string.
X */
XLOCAL void
Xlitos(s, l, fieldw)
X		char	*s;
X	register Ulong	l;
X	register int	fieldw;
X{
X	register char	*p	= &s[fieldw+1];
X	register char	fill	= props.pr_fillc;
X
X	/*
X	 * Bei 12 Byte Feldern würde hier das Nächste Feld überschrieben, wenn
X	 * entgegen der normalen Reihenfolge geschrieben wird!
X	 * Da der TCB sowieso vorher genullt wird ist es aber kein Problem
X	 * das bei 8 Bytes Feldern notwendige Nullbyte wegzulassen.
X	 */
X#ifdef	__needed__
X	*p = '\0';
X#endif
X	/*
X	 * Das Zeichen nach einer Zahl.
X	 * XXX Soll hier besser ein NULL Byte bei POSIX Tar hin?
X	 * XXX Wuerde das Probleme mit einer automatischen Erkennung geben?
X	 */
X	*--p = ' ';
X
X	do {
X		*--p = (l%8) + '0';	/* Compiler optimiert */
X
X	} while (--fieldw > 0 && (l /= 8) > 0);
X
X	switch (fieldw) {
X
X	default:
X		break;
X	case 11:	*--p = fill;	/* FALLTHROUGH */
X	case 10:	*--p = fill;	/* FALLTHROUGH */
X	case 9:		*--p = fill;	/* FALLTHROUGH */
X	case 8:		*--p = fill;	/* FALLTHROUGH */
X	case 7:		*--p = fill;	/* FALLTHROUGH */
X	case 6:		*--p = fill;	/* FALLTHROUGH */
X	case 5:		*--p = fill;	/* FALLTHROUGH */
X	case 4:		*--p = fill;	/* FALLTHROUGH */
X	case 3:		*--p = fill;	/* FALLTHROUGH */
X	case 2:		*--p = fill;	/* FALLTHROUGH */
X	case 1:		*--p = fill;	/* FALLTHROUGH */
X	case 0:;
X	}
X}
X
X/*
X * Convert long long int -> string.
X */
XEXPORT void
Xllitos(s, ull, fieldw)
X		char	*s;
X	register Ullong	ull;
X	register int	fieldw;
X{
X	register char	*p	= &s[fieldw+1];
X	register char	fill	= props.pr_fillc;
X
X	/*
X	 * Currently only used with fieldwidth == 11.
X	 * XXX Large 8 byte fields are handled separately.
X	 */
X	if (/* fieldw == 11 && */ ull > MAXOCTAL11) {
X		llbtos(s, ull, fieldw);
X		return;
X	}
X
X	/*
X	 * Bei 12 Byte Feldern würde hier das Nächste Feld überschrieben, wenn
X	 * entgegen der normalen Reihenfolge geschrieben wird!
X	 * Da der TCB sowieso vorher genullt wird ist es aber kein Problem
X	 * das bei 8 Bytes Feldern notwendige Nullbyte wegzulassen.
X	 */
X#ifdef	__needed__
X	*p = '\0';
X#endif
X	/*
X	 * Das Zeichen nach einer Zahl.
X	 * XXX Soll hier besser ein NULL Byte bei POSIX Tar hin?
X	 * XXX Wuerde das Probleme mit einer automatischen Erkennung geben?
X	 */
X	*--p = ' ';
X
X	do {
X		*--p = (ull%8) + '0';	/* Compiler optimiert */
X
X	} while (--fieldw > 0 && (ull /= 8) > 0);
X
X	switch (fieldw) {
X
X	default:
X		break;
X	case 11:	*--p = fill;	/* FALLTHROUGH */
X	case 10:	*--p = fill;	/* FALLTHROUGH */
X	case 9:		*--p = fill;	/* FALLTHROUGH */
X	case 8:		*--p = fill;	/* FALLTHROUGH */
X	case 7:		*--p = fill;	/* FALLTHROUGH */
X	case 6:		*--p = fill;	/* FALLTHROUGH */
X	case 5:		*--p = fill;	/* FALLTHROUGH */
X	case 4:		*--p = fill;	/* FALLTHROUGH */
X	case 3:		*--p = fill;	/* FALLTHROUGH */
X	case 2:		*--p = fill;	/* FALLTHROUGH */
X	case 1:		*--p = fill;	/* FALLTHROUGH */
X	case 0:;
X	}
X}
X
X/*
X * Convert binary (base 256) string -> long int.
X */
XLOCAL void
Xstob(s, l, fieldw)
X	register char	*s;
X		Ulong	*l;
X	register int	fieldw;
X{
X	register Ulong	ret = 0L;
X	register Uchar	c;
X
X	c = *s++ & 0x7F;
X	ret = c * 256;
X
X	while (--fieldw >= 0) {
X		c = *s++;
X		ret *= 256;
X		ret += c;
X	}
X	*l = ret;
X}
X
X/*
X * Convert binary (base 256) string -> long long int.
X */
XLOCAL void
Xstollb(s, ull, fieldw)
X	register char	*s;
X		Ullong	*ull;
X	register int	fieldw;
X{
X	register Ullong	ret = 0L;
X	register Uchar	c;
X
X	c = *s++ & 0x7F;
X	ret = c * 256;
X
X	while (--fieldw >= 0) {
X		c = *s++;
X		ret *= 256;
X		ret += c;
X	}
X	*ull = ret;
X}
X
X#if	DEV_MINOR_BITS > 21
X/*
X * Convert long int -> binary (base 256) string.
X */
XLOCAL void
Xbtos(s, l, fieldw)
X		char	*s;
X	register Ulong	l;
X	register int	fieldw;
X{
X	register char	*p	= &s[fieldw+1];
X
X	do {
X		*--p = l%256;	/* Compiler optimiert */
X
X	} while (--fieldw > 0 && (l /= 256) > 0);
X
X	s[0] |= 0x80;
X}
X#endif
X
X/*
X * Convert long long int -> binary (base 256) string.
X */
XLOCAL void
Xllbtos(s, ull, fieldw)
X		char	*s;
X	register Ullong	ull;
X	register int	fieldw;
X{
X	register char	*p	= &s[fieldw+1];
X
X	do {
X		*--p = ull%256;	/* Compiler optimiert */
X
X	} while (--fieldw > 0 && (ull /= 256) > 0);
X
X	s[0] |= 0x80;
X}
X
XLOCAL void
Xprint_hrange(type, ull)
X	char	*type;
X	Ullong	ull;
X{
X	if (nowarn)
X		return;
X	errmsgno(EX_BAD,
X		"WARNING: %s '%llu' in header exceeds local range at %lld.\n",
X		type, ull, tblocks());
X}
X
X/* ------------------------------------------------------------------------- */
XEXPORT void
Xdump_info(info)
X	FINFO	*info;
X{
X	error("f_name:      '%s'\n", info->f_name);
X	error("f_namelen:   %lu\n", info->f_namelen);
X	error("f_lname:     '%s'\n", info->f_lname);
X	error("f_lnamelen:  %lu\n", info->f_lnamelen);
X	error("f_uname:     '%s'\n", info->f_uname);
X	error("f_umaxlen:   %lu\n", info->f_umaxlen);
X	error("f_gname:     '%s'\n", info->f_gname);
X	error("f_gmaxlen:   %lu\n", info->f_gmaxlen);
X
X	error("f_dir:       %p\n", info->f_dir);
X	error("f_dirinos:   %p\n", info->f_dirinos);
X	error("f_dirlen:    %d\n", info->f_dirlen);
X	error("f_dirents:    %d\n", info->f_dirents);
X	error("f_dev:       0x%llX\n", (Ullong)info->f_dev);
X	error("f_ino:       %llu\n", (Ullong)info->f_ino);
X	error("f_nlink:     %llu\n", (Ullong)info->f_nlink);
X	error("f_mode:      0%llo\n", (Ullong)info->f_mode);
X	error("f_uid:       %lld\n", (Llong)info->f_uid);
X	error("f_gid:       %lld\n", (Llong)info->f_gid);
X
X	error("f_size:      %lld\n", (Llong)info->f_size);
X	error("f_rsize:     %lld\n", (Llong)info->f_rsize);
X	error("f_contoffset:%lld\n", (Llong)info->f_contoffset);
X	error("f_flags:     0x%lX\n", info->f_flags);
X	error("f_xflags:    0x%lX\n", info->f_xflags);
X	error("f_xftype:    %lu (%s)\n", info->f_xftype, XTTONAME(info->f_xftype));
X	error("f_rxftype:   %lu (%s)\n", info->f_rxftype, XTTONAME(info->f_rxftype));
X	error("f_filetype:  %lu\n", info->f_filetype);
X	error("f_typeflag:  '%c'\n", info->f_typeflag);
X	error("f_type:      0%llo\n", (Ullong)info->f_type);
X	error("f_rdev:      %lu\n", info->f_rdev);
X	error("f_rdevmaj:   %lu\n", info->f_rdevmaj);
X	error("f_rdevmin:   %lu\n", info->f_rdevmin);
X	error("f_atime:     %.24s +0.%9.9ld s\n", ctime(&info->f_atime), info->f_ansec);
X	error("f_mtime:     %.24s +0.%9.9ld s\n", ctime(&info->f_mtime), info->f_mnsec);
X	error("f_ctime:     %.24s +0.%9.9ld s\n", ctime(&info->f_ctime), info->f_cnsec);
X	error("f_fflags:    0x%lX\n", info->f_fflags);
X}
END-of-star-1.5.2/star/header.c
echo x - star-1.5.2/star/lhash.c
sed 's/^X//' >star-1.5.2/star/lhash.c << 'END-of-star-1.5.2/star/lhash.c'
X/* @(#)lhash.c	1.20 09/07/11 Copyright 1988, 1993-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)lhash.c	1.20 09/07/11 Copyright 1988, 1993-2009 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1988, 1993-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * Hash table name lookup.
X *
X *	Implemented 1988 with help from B. Mueller-Zimmermann
X *
X *	hash_size(nqueue) size_t nqueue;
X *		`nqueue' ist ein tuning parameter und gibt die Zahl der
X *		Hash-queues an. Pro Hashqueue werden 4 Bytes benoetigt.
X *
X *	hash_build(fp) FILE *fp;
X *
X *		Liest das File `fp' zeilenweise. Jede Zeile enthaelt genau
X *		einen Namen. Blanks werden nicht entfernt. Alle so
X *		gefundenen Namen werden in der Hashtabelle gespeichert.
X *
X *	hash_lookup(str) char *str;
X *
X *		Liefert TRUE, wenn der angegebene String in der
X *		Hashtabelle vorkommt.
X *
X * Scheitert malloc(), gibt es eine Fehlermeldung und exit().
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include "star.h"
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "starsubs.h"
X
Xextern	BOOL	notpat;
Xextern	BOOL	readnull;
X
X#define	HASH_DFLT_SIZE	1024
X
Xstatic struct h_elem {
X	struct h_elem	*h_next;
X	char		h_data[1];			/* Variable size. */
X} **h_tab, **h_xtab;
X
Xstatic size_t	h_size;
X
XEXPORT	size_t	hash_size	__PR((size_t size));
XEXPORT	void	hash_build	__PR((FILE *fp));
XEXPORT	void	hash_xbuild	__PR((FILE *fp));
XLOCAL	void	_hash_build	__PR((FILE *fp, struct h_elem **htab));
XEXPORT	BOOL	hash_lookup	__PR((char *str));
XEXPORT	BOOL	hash_xlookup	__PR((char *str));
XLOCAL	int	hashval		__PR((unsigned char *str, unsigned int maxsize));
X
XEXPORT size_t
Xhash_size(size)
X	size_t	size;
X{
X	if (h_size == 0)
X		h_size = size;
X	return (h_size);
X}
X
XEXPORT void
Xhash_build(fp)
X	FILE	*fp;
X{
X	if (h_tab == NULL) {
X		register	int	i;
X		register	size_t	size = hash_size(HASH_DFLT_SIZE);
X
X		h_tab = ___malloc(size * sizeof (struct h_elem *), "list option");
X		for (i = 0; i < size; i++) h_tab[i] = 0;
X	}
X	_hash_build(fp, h_tab);
X}
X
XEXPORT void
Xhash_xbuild(fp)
X	FILE	*fp;
X{
X
X	if (h_xtab == NULL) {
X		register	int	i;
X		register	size_t	size = hash_size(HASH_DFLT_SIZE);
X
X		h_xtab = ___malloc(size * sizeof (struct h_elem *), "exclude option");
X		for (i = 0; i < size; i++) h_xtab[i] = 0;
X	}
X	_hash_build(fp, h_xtab);
X}
X
XLOCAL void
X_hash_build(fp, htab)
X	FILE			*fp;
X	register struct h_elem	**htab;
X{
X	register struct h_elem	*hp;
X	register	int	len;
X	register	int	hv;
X			char	buf[PATH_MAX+1];
X	register	size_t	size;
X
X	size = hash_size(HASH_DFLT_SIZE);
X	while ((len = readnull ? ngetline(fp, buf, sizeof (buf)) :
X				fgetline(fp, buf, sizeof (buf))) >= 0) {
X		if (len == 0)
X			continue;
X		if (len >= PATH_MAX) {
X			errmsgno(EX_BAD, "%s: Name too long (%d > %d).\n",
X							buf, len, PATH_MAX);
X			continue;
X		}
X		hp = ___malloc((size_t)len + 1 + sizeof (struct h_elem *), "list option");
X		strcpy(hp->h_data, buf);
X		hv = hashval((unsigned char *)buf, size);
X		hp->h_next = htab[hv];
X		htab[hv] = hp;
X	}
X}
X
X/*
X * Hash Include lookup
X * may be modfied via "notpat".
X */
XEXPORT BOOL
Xhash_lookup(str)
X	char	*str;
X{
X	register struct h_elem *hp;
X	register int		hv;
X
X	/*
X	 * If no include list exists, all files are included.
X	 */
X	if (h_tab == NULL)
X		return (TRUE);
X
X	hv = hashval((unsigned char *)str, h_size);
X	for (hp = h_tab[hv]; hp; hp = hp->h_next)
X	    if (streql(str, hp->h_data))
X		return (!notpat);
X	return (notpat);
X}
X
X/*
X * Hash eXclude lookup.
X */
XEXPORT BOOL
Xhash_xlookup(str)
X	char	*str;
X{
X	register struct h_elem *hp;
X	register int		hv;
X
X	/*
X	 * If no exclude list exists, no files are excluded.
X	 */
X	if (h_xtab == NULL)
X		return (FALSE);
X
X	hv = hashval((unsigned char *)str, h_size);
X	for (hp = h_xtab[hv]; hp; hp = hp->h_next)
X	    if (streql(str, hp->h_data))
X		return (TRUE);
X	return (FALSE);
X}
X
XLOCAL int
Xhashval(str, maxsize)
X	register unsigned char *str;
X		unsigned	maxsize;
X{
X	register int	sum = 0;
X	register int	i;
X	register int	c;
X
X	for (i = 0; (c = *str++) != '\0'; i++)
X		sum ^= (c << (i&7));
X	return (sum % maxsize);
X}
END-of-star-1.5.2/star/lhash.c
echo x - star-1.5.2/star/list.c
sed 's/^X//' >star-1.5.2/star/list.c << 'END-of-star-1.5.2/star/list.c'
X/* @(#)list.c	1.74 10/08/23 Copyright 1985, 1995, 2000-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)list.c	1.74 10/08/23 Copyright 1985, 1995, 2000-2010 J. Schilling";
X#endif
X/*
X *	List the content of an archive
X *
X *	Copyright (c) 1985, 1995, 2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/dirent.h>
X#include <schily/standard.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "starsubs.h"
X#ifdef	USE_FIND
X#include <schily/walk.h>
X#endif
X
Xextern	FILE	*tarf;
Xextern	FILE	*vpr;
Xextern	char	*listfile;
Xextern	Llong	curblockno;
X
Xextern	time_t	sixmonth;		/* 6 months before limit (ls)	*/
Xextern	time_t	now;			/* now limit (ls)		*/
X
Xextern	BOOL	havepat;
Xextern	int	iftype;
Xextern	BOOL	paxls;
Xextern	int	xdebug;
Xextern	BOOL	numeric;
Xextern	int	verbose;
Xextern	BOOL	prblockno;
Xextern	BOOL	tpath;
Xextern	BOOL	cflag;
Xextern	BOOL	xflag;
Xextern	BOOL	interactive;
X
Xextern	BOOL	acctime;
Xextern	BOOL	no_dirslash;
Xextern	BOOL	Ctime;
Xextern	BOOL	prinodes;
X
Xextern	BOOL	listnew;
Xextern	BOOL	listnewf;
X
Xextern	BOOL	do_subst;
X
X#ifdef	USE_FIND
Xextern	BOOL	dofind;
X#endif
X
XEXPORT	void	list		__PR((void));
XLOCAL	void	modstr		__PR((FINFO *info, char *s, mode_t  mode));
XEXPORT	void	list_file	__PR((FINFO *info));
XEXPORT	void	vprint		__PR((FINFO *info));
X
XEXPORT void
Xlist()
X{
X#ifdef	USE_FIND
Xextern	struct WALK walkstate;
X#endif
X		FINFO	finfo;
X		FINFO	newinfo;
X		TCB	tb;
X		TCB	newtb;
X		char	name[PATH_MAX+1];
X		char	lname[PATH_MAX+1];
X		char	newname[PATH_MAX+1];
X		char	newlname[PATH_MAX+1];
X	register TCB 	*ptb = &tb;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	fillbytes((char *)&newinfo, sizeof (newinfo), '\0');
X
X#ifdef	USE_FIND
X	if (dofind) {
X		walkopen(&walkstate);
X		walkgethome(&walkstate);	/* Needed in case we chdir */
X	}
X#endif
X	finfo.f_tcb = ptb;
X	for (;;) {
X		if (get_tcb(ptb) == EOF)
X			break;
X		if (prblockno)
X			(void) tblocks();		/* set curblockno */
X
X		finfo.f_name = name;
X		finfo.f_lname = lname;
X		if (tcb_to_info(ptb, &finfo) == EOF)
X			break;
X		if (xdebug > 0)
X			dump_info(&finfo);
X
X#ifdef	USE_FIND
X		if (dofind && !findinfo(&finfo)) {
X			void_file(&finfo);
X			continue;
X		}
X#endif
X
X		if (do_subst) {
X			subst(&finfo);
X		}
X
X		if (listnew || listnewf) {
X			/*
X			 * XXX nsec beachten wenn im Archiv!
X			 */
X			if (((finfo.f_mtime > newinfo.f_mtime) ||
X			    ((finfo.f_xflags & XF_MTIME) &&
X			    (newinfo.f_xflags & XF_MTIME) &&
X			    (finfo.f_mtime == newinfo.f_mtime) &&
X			    (finfo.f_mnsec > newinfo.f_mnsec))) &&
X					(!listnewf || is_file(&finfo))) {
X				movebytes(&finfo, &newinfo, sizeof (finfo));
X				movetcb(&tb, &newtb);
X				/*
X				 * Paranoia.....
X				 */
X				strncpy(newname, name, PATH_MAX);
X				newname[PATH_MAX] = '\0';
X				newinfo.f_name = newname;
X				if (newinfo.f_lname[0] != '\0') {
X					/*
X					 * Paranoia.....
X					 */
X					strncpy(newlname, newinfo.f_lname,
X								PATH_MAX);
X					newlname[PATH_MAX] = '\0';
X					newinfo.f_lname = newlname;
X				}
X				newinfo.f_flags |= F_HAS_NAME;
X			}
X			void_file(&finfo);
X			continue;
X		}
X		if (listfile && !hash_lookup(finfo.f_name)) {
X			void_file(&finfo);
X			continue;
X		}
X		if (hash_xlookup(finfo.f_name)) {
X			void_file(&finfo);
X			continue;
X		}
X		if (havepat && !match(finfo.f_name)) {
X			void_file(&finfo);
X			continue;
X		}
X		list_file(&finfo);
X		void_file(&finfo);
X	}
X#ifdef	USE_FIND
X	if (dofind) {
X		walkhome(&walkstate);
X		walkclose(&walkstate);
X		free(walkstate.twprivate);
X	}
X#endif
X	if ((listnew || listnewf) && newinfo.f_mtime != 0L) {
X		/*
X		 * XXX
X		 * XXX Achtung!!! tcb_to_info zerstört t_name[NAMSIZ]
X		 * XXX und t_linkname[NAMSIZ].
X		 * XXX Ist dies noch richtig?
X		 * XXX Es sieht so aus as ob nur noch t_name[NAMSIZ] auf ' '
X		 * XXX gesetzt wird wenn dort ein null Byte steht.
X		 */
X		if ((props.pr_flags & PR_CPIO) == 0) {
X			/*
X			 * Needed to set up the uname/gname fields for the
X			 * various TAR headers.
X			 */
X			tcb_to_info(&newtb, &newinfo);
X		}
X		list_file(&newinfo);
X	}
X}
X
X/*
X * Convert POSIX.1 TAR mode/permission flags into string.
X */
XLOCAL void
X#ifdef	PROTOTYPES
Xmodstr(FINFO *info, char *s, register mode_t  mode)
X#else
Xmodstr(info, s, mode)
X		FINFO	*info;
X		char	*s;
X	register mode_t	mode;
X#endif
X{
X	register char	*mstr = "xwrxwrxwr";
X	register char	*str = s;
X	register int	i;
X
X	for (i = 9; --i >= 0; ) {
X		if (mode & (1 << i))
X			*str++ = mstr[i];
X		else
X			*str++ = '-';
X	}
X#ifdef	USE_ACL
X	*str++ = ' ';
X#endif
X#ifdef	USE_XATTR
X	*str++ = '\0';				/* Don't claim space for '@' */
X#endif
X	*str = '\0';
X	str = s;
X	if (mode & TSVTX) {
X		if (mode & TOEXEC) {
X			str[8] = 't';		/* Sticky & exec. by others  */
X		} else {
X			str[8] = 'T';		/* Sticky but !exec. by oth  */
X		}
X	}
X	if (mode & TSGID) {
X		if (mode & TGEXEC) {
X			str[5] = 's';		/* Sgid & executable by grp  */
X		} else {
X			if (is_dir(info))
X				str[5] = 'S';	/* Sgid directory	    */
X			else
X				str[5] = 'l';	/* Mandatory lock file	    */
X		}
X	}
X	if (mode & TSUID) {
X		if (mode & TUEXEC)
X			str[2] = 's';		/* Suid & executable by own. */
X		else
X			str[2] = 'S';		/* Suid but not executable   */
X	}
X	i = 9;
X#ifdef	USE_ACL
X	if ((info->f_xflags & (XF_ACL_ACCESS|XF_ACL_DEFAULT)) != 0)
X		str[i++] = '+';
X#endif
X#ifdef	USE_XATTR
X	if ((info->f_xflags & XF_XATTR) != 0)
X		str[i++] = '@';
X#endif
X	i++;	/* Make lint believe that we always use i. */
X}
X
XEXPORT void
Xlist_file(info)
X	register FINFO	*info;
X{
X		FILE	*f;
X		time_t	*tp;
X		char	*tstr;
X		char	mstr[12]; /* 9 UNIX chars + ACL '+' XATTR '@' + nul */
X		char	lstr[11]; /* contains link count as string */
X	static	char	nuid[11]; /* XXXX 64 bit longs??? */
X	static	char	ngid[11]; /* XXXX 64 bit longs??? */
X		char	*add = "";
X
X	f = vpr;
X	if (prblockno)
X		fprintf(f, "block %9lld: ", curblockno);
X	if (cflag)
X		fprintf(f, "a ");
X	else if (xflag)
X		fprintf(f, "x ");
X
X	if (prinodes && info->f_ino > 0)
X		fprintf(f, "%7llu ", (Llong)info->f_ino);
X	if (cflag && is_dir(info) && !no_dirslash) {
X		int	len = info->f_namelen;
X
X		if (len == 0)
X			len = strlen(info->f_name);
X		if (info->f_name[len-1] != '/')
X			add = "/";
X	}
X	if (verbose) {
X		register Uint	xft = info->f_xftype;
X
X		tp = acctime ? &info->f_atime :
X				(Ctime ? &info->f_ctime : &info->f_mtime);
X		tstr = ctime(tp);
X		if (numeric || info->f_uname == NULL) {
X			sprintf(nuid, "%lld", (Llong)info->f_uid);
X			info->f_uname = nuid;
X			info->f_umaxlen = sizeof (nuid)-1;
X		}
X		if (numeric || info->f_gname == NULL) {
X			sprintf(ngid, "%lld", (Llong)info->f_gid);
X			info->f_gname = ngid;
X			info->f_gmaxlen = sizeof (ngid)-1;
X		}
X
X		if (!paxls) {
X			if (is_special(info))
X				fprintf(f, "%3lu %3lu",
X					info->f_rdevmaj, info->f_rdevmin);
X			else
X				fprintf(f, "%7llu", (Llong)info->f_size);
X		}
X		modstr(info, mstr, info->f_mode);
X
X		if (paxls && info->f_nlink == 0 && is_link(info)) {
X			info->f_nlink = 2;
X		}
X		if (paxls || info->f_nlink > 0) {
X			/*
X			 * UNIX ls uses %3d for the link count
X			 * and does not claim space for ACL '+'
X			 */
X			js_sprintf(lstr, " %2llu", (Ullong)info->f_nlink);
X		} else {
X			lstr[0] = 0;
X		}
X/*
X * XXX Übergangsweise, bis die neue Filetypenomenklatur sauber eingebaut ist.
X */
Xif (xft == 0 || xft == XT_BAD) {
X	xft = info->f_xftype = IFTOXT(info->f_type);
X	errmsgno(EX_BAD, "XXXXX xftype == 0 (typeflag = '%c' 0x%02X)\n",
X				info->f_typeflag, info->f_typeflag);
X}
X		if (xft == XT_LINK)
X			xft = info->f_rxftype;
X		if (!paxls) {
X			fprintf(f,
X				" %s%s%s %3.*s/%-3.*s %.12s %4.4s ",
X#ifdef	OLD
X				typetab[info->f_filetype & 07],
X#else
X				XTTOSTR(xft),
X#endif
X				mstr,
X				lstr,
X				(int)info->f_umaxlen, info->f_uname,
X				(int)info->f_gmaxlen, info->f_gname,
X				&tstr[4], &tstr[20]);
X		} else {
X			fprintf(f,
X				"%s%s%s %-8.*s %-8.*s ",
X#ifdef	OLD
X				typetab[info->f_filetype & 07],
X#else
X				XTTOSTR(xft),
X#endif
X				mstr,
X				lstr,
X				(int)info->f_umaxlen, info->f_uname,
X				(int)info->f_gmaxlen, info->f_gname);
X			if (is_special(info))
X				fprintf(f, "%3lu %3lu",
X					info->f_rdevmaj, info->f_rdevmin);
X			else
X				fprintf(f, "%7llu", (Llong)info->f_size);
X			if ((*tp < sixmonth) || (*tp > now)) {
X				fprintf(f, " %.6s  %4.4s ",
X					&tstr[4], &tstr[20]);
X			} else {
X				fprintf(f, " %.12s ",
X					&tstr[4]);
X			}
X		}
X	}
X	fprintf(f, "%s%s", info->f_name, add);
X	if (tpath) {
X		fprintf(f, "\n");
X		return;
X	}
X	if (is_link(info)) {
X		if (is_dir(info))
X			fprintf(f, " directory");
X		fprintf(f, " %s %s",
X			paxls ? "==" : "link to",
X			info->f_lname);
X	}
X	if (is_symlink(info))
X		fprintf(f, " -> %s", info->f_lname);
X	if (is_volhdr(info))
X		fprintf(f, " --Volume Header--");
X	if (is_multivol(info)) {
X		fprintf(f, " --Continued at byte %lld--",
X						(Llong)info->f_contoffset);
X	}
X	fprintf(f, "\n");
X}
X
XEXPORT void
Xvprint(info)
X	FINFO	*info;
X{
X		FILE	*f;
X	char	*mode;
X	char	*add = "";
X
X	if (verbose || interactive) {
X		if (verbose > 1) {
X			list_file(info);
X			return;
X		}
X
X		f = vpr;
X
X		if (prblockno)
X			fprintf(f, "block %9lld: ", curblockno);
X		if (cflag)
X			mode = "a ";
X		else if (xflag)
X			mode = "x ";
X		else
X			mode = "";
X
X		if (cflag && is_dir(info) && !no_dirslash) {
X			int	len = info->f_namelen;
X
X			if (len == 0)
X				len = strlen(info->f_name);
X			if (info->f_name[len-1] != '/')
X				add = "/";
X		}
X		if (tpath) {
X			fprintf(f, "%s%s\n", info->f_name, add);
X			return;
X		}
X		if (is_dir(info)) {
X			if (is_link(info)) {
X				fprintf(f, "%s%s%s directory %s %s\n",
X					mode, info->f_name, add,
X					paxls ? "==" : "link to",
X					info->f_lname);
X			} else {
X				fprintf(f, "%s%s%s directory\n", mode,
X							info->f_name, add);
X			}
X		} else if (is_link(info)) {
X			fprintf(f, "%s%s %s %s\n",
X				mode, info->f_name,
X				paxls ? "==" : "link to",
X				info->f_lname);
X		} else if (is_symlink(info)) {
X			fprintf(f, "%s%s %s %s\n",
X				mode, info->f_name,
X				paxls ? "->" : "symbolic link to",
X				info->f_lname);
X		} else if (is_special(info)) {
X			fprintf(f, "%s%s special\n", mode, info->f_name);
X		} else {
X			fprintf(f, "%s%s %lld bytes, %lld tape blocks\n",
X				mode, info->f_name, (Llong)info->f_size,
X				(Llong)tarblocks(info->f_rsize));
X		}
X	}
X}
END-of-star-1.5.2/star/list.c
echo x - star-1.5.2/star/longnames.c
sed 's/^X//' >star-1.5.2/star/longnames.c << 'END-of-star-1.5.2/star/longnames.c'
X/* @(#)longnames.c	1.56 11/09/05 Copyright 1993, 1995, 2001-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)longnames.c	1.56 11/09/05 Copyright 1993, 1995, 2001-2011 J. Schilling";
X#endif
X/*
X *	Handle filenames that cannot fit into a single
X *	string of 100 charecters
X *
X *	Copyright (c) 1993, 1995, 2001-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/types.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include "starsubs.h"
X#include "movearch.h"
X#include "checkerr.h"
X
Xextern	BOOL	no_dirslash;
X
XLOCAL	void	enametoolong	__PR((char *name, int len, int maxlen));
XLOCAL	char	*split_posix_name __PR((char *name, int namlen, int add));
XEXPORT	BOOL	name_to_tcb	__PR((FINFO *info, TCB *ptb));
XEXPORT	void	tcb_to_name	__PR((TCB *ptb, FINFO *info));
XEXPORT	void	tcb_undo_split	__PR((TCB *ptb, FINFO *info));
XEXPORT	int	tcb_to_longname	__PR((TCB *ptb, FINFO *info));
XEXPORT	void	write_longnames	__PR((FINFO *info));
XLOCAL	void	put_longname	__PR((FINFO *info,
X					char *name, int namelen, char *tname,
X							Ulong  xftype));
X
XLOCAL void
Xenametoolong(name, len, maxlen)
X	char	*name;
X	int	len;
X	int	maxlen;
X{
X	if (!errhidden(E_NAMETOOLONG, name)) {
X		if (!errwarnonly(E_NAMETOOLONG, name))
X			xstats.s_toolong++;
X		errmsgno(EX_BAD, "%s: Name too long (%d > %d chars)\n",
X							name, len, maxlen);
X		(void) errabort(E_NAMETOOLONG, name, TRUE);
X	}
X}
X
X
XLOCAL char *
Xsplit_posix_name(name, namlen, add)
X	char	*name;
X	int	namlen;
X	int	add;
X{
X	register char	*low;	/* Lower margin to start searching for '/' */
X	register char	*high;	/* Upper margin to start searching for '/' */
X
X	if (namlen+add > props.pr_maxprefix+1+props.pr_maxsname) {
X		/*
X		 * Name too long to be split (does not fit in pfx + '/' + name)
X		 */
X		if ((props.pr_nflags & PR_LONG_NAMES) == 0) /* No longnames */
X			enametoolong(name, namlen+add,
X				props.pr_maxprefix+1+props.pr_maxsname);
X		return (NULL);
X	}
X	/*
X	 * 'low' is set to (namelen - 100) because we cannot split more than
X	 * 100 chars before the end of the name.
X	 * 'high' is set to 155 because we cannot put more than 155 chars into
X	 * the prefix.
X	 * Then start to look backwards from the rightmost position if there is
X	 * slash where we may split.
X	 */
X	low = &name[namlen+add - props.pr_maxsname];
X	if (--low < name)
X		low = name;
X	high = &name[props.pr_maxprefix > namlen ? namlen:props.pr_maxprefix];
X
X#ifdef	DEBUG
Xerror("low: %d:%s high: %d:'%c',%s\n",
X			strlen(low), low, strlen(high), *high, high);
X#endif
X	high++;
X	while (--high >= low)
X		if (*high == '/')
X			break;
X	if (high < low) {
X		if ((props.pr_nflags & PR_LONG_NAMES) == 0) {
X			if (!errhidden(E_NAMETOOLONG, name)) {
X				if (!errwarnonly(E_NAMETOOLONG, name))
X					xstats.s_toolong++;
X				errmsgno(EX_BAD,
X				"%s: Name too long (cannot split)\n",
X									name);
X				(void) errabort(E_NAMETOOLONG, name, TRUE);
X			}
X		}
X		return (NULL);
X	}
X#ifdef	DEBUG
Xerror("solved: add: %d prefix: %d suffix: %d\n",
X			add, high-name, strlen(high+1)+add);
X#endif
X	return (high);
X}
X
X/*
X * Es ist sichergestelt, daß namelen >= 1 ist.
X */
XEXPORT BOOL
Xname_to_tcb(info, ptb)
X	FINFO	*info;
X	TCB	*ptb;
X{
X	char	*name = info->f_name;
X	int	namelen = info->f_namelen;
X	int	add = 0;
X	char	*np = NULL;
X
X	if (namelen == 0)
X		raisecond("name_to_tcb: namelen", 0L);
X
X	/*
X	 * We need a test without 'add' because we currently never add a slash
X	 * at the end of a directiry name when in CPIO mode.
X	 */
X	if (namelen > props.pr_maxnamelen) {
X		enametoolong(name, namelen, props.pr_maxnamelen);
X		return (FALSE);
X	}
X	if ((props.pr_flags & PR_CPIO) != 0)
X		return (TRUE);
X
X	if (is_dir(info) && !no_dirslash && name[namelen-1] != '/')
X		add++;
X
X	if ((namelen+add) <= props.pr_maxsname) {	/* Fits in shortname */
X		if (add)
X			strcatl(ptb->ndbuf.t_name, name, "/", (char *)NULL);
X		else
X			strcpy(ptb->ndbuf.t_name, name);
X		return (TRUE);
X	}
X
X	if (namelen+add > props.pr_maxnamelen) {	/* Now we know 'add' */
X		enametoolong(name, namelen+add, props.pr_maxnamelen);
X		return (FALSE);
X	}
X	if (props.pr_nflags & PR_POSIX_SPLIT)
X		np = split_posix_name(name, namelen, add);
X	if (np == NULL) {
X		/*
X		 * Cannot split
X		 * (namelen+add <= props.pr_maxnamelen) has been checked before
X		 */
X		if (props.pr_nflags & PR_LONG_NAMES) {
X			if (props.pr_flags & PR_XHDR)
X				info->f_xflags |= XF_PATH;
X			else
X				info->f_flags |= F_LONGNAME;
X			if (add)
X				info->f_flags |= F_ADDSLASH;
X			strncpy(ptb->dbuf.t_name, name, props.pr_maxsname);
X			return (TRUE);
X		} else {
X			/*
X			 * In case of PR_POSIX_SPLIT we did already print the
X			 * error message.
X			 */
X			if ((props.pr_nflags & PR_POSIX_SPLIT) == 0) {
X				enametoolong(name, namelen+add,
X							props.pr_maxnamelen);
X			}
X			return (FALSE);
X		}
X	}
X
X	/*
X	 * Do actual splitting based on split name pointer 'np'.
X	 */
X	if (add)
X		strcatl(ptb->ndbuf.t_name, &np[1], "/", (char *)NULL);
X	else
X		strcpy(ptb->ndbuf.t_name, &np[1]);
X	strncpy(ptb->dbuf.t_prefix, name, np - name);
X	info->f_flags |= F_SPLIT_NAME;
X	return (TRUE);
X}
X
X/*
X * This function is only called by tcb_to_info() with
X * dbuf.t_name[100], dbuf.t_linkname[100] and dbuf.t_prefix[155] set to '\0'.
X * If we ever decide to call it from somewhere else check if the linkname
X * kludge for 100 char linknames does not make problems.
X */
XEXPORT void
Xtcb_to_name(ptb, info)
X	TCB	*ptb;
X	FINFO	*info;
X{
X	/*
X	 * Name has already been set up from somwhere else.
X	 * We have nothing to do.
X	 */
X	if (info->f_flags & F_HAS_NAME)
X		return;
X
X	if ((info->f_flags & F_LONGLINK) == 0 &&	/* name from 'K' head */
X	    (info->f_xflags & XF_LINKPATH) == 0) {	/* name from 'x' head */
X
X		/*
X		 * Our caller has set ptb->dbuf.t_linkname[NAMSIZ] to '\0'
X		 * if the link name len is exactly 100 chars.
X		 */
X		strcpy(info->f_lname, ptb->ndbuf.t_linkname);
X	}
X
X	/*
X	 * Name has already been set up because it is a very long name.
X	 */
X	if (info->f_flags & F_LONGNAME)
X		return;
X	/*
X	 * Name has already been set up from a POSIX.1-2001 extended header.
X	 */
X	if (info->f_xflags & XF_PATH)
X		return;
X
X	if (props.pr_nflags & PR_POSIX_SPLIT) {
X		strcatl(info->f_name, ptb->ndbuf.t_prefix,
X					*ptb->ndbuf.t_prefix?"/":"",
X					ptb->ndbuf.t_name, (char *)NULL);
X	} else {
X		strcpy(info->f_name, ptb->ndbuf.t_name);
X	}
X}
X
XEXPORT void
Xtcb_undo_split(ptb, info)
X	TCB	*ptb;
X	FINFO	*info;
X{
X	fillbytes(ptb->dbuf.t_name, NAMSIZ, '\0');
X	fillbytes(ptb->dbuf.t_prefix, props.pr_maxprefix, '\0');
X
X	info->f_flags &= ~F_SPLIT_NAME;
X
X	if (props.pr_flags & PR_XHDR)
X		info->f_xflags |= XF_PATH;
X	else
X		info->f_flags |= F_LONGNAME;
X
X	strncpy(ptb->dbuf.t_name, info->f_name, props.pr_maxsname);
X}
X
X/*
X * A bad idea to do this here!
X * We have to set up a more generalized pool of namebuffers wich are allocated
X * on an actual MAX_PATH base or even better allocated on demand.
X *
X * XXX If we change the code to allocate the data, we need to make sure that
X * XXX the allocated data holds one byte more than needed as movearch.c
X * XXX adds a second null byte to the buffer to enforce null-termination.
X */
X#ifdef	__needed__
Xchar	longlinkname[PATH_MAX+1];
X#endif
X
XEXPORT int
Xtcb_to_longname(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	move_t	move;
X	Ullong	ull;
X
X	/*
X	 * File size is strlen of name + 1
X	 */
X	stolli(ptb->dbuf.t_size, &ull);
X	info->f_size = ull;
X	info->f_rsize = info->f_size;
X	if (info->f_size > PATH_MAX) {
X		/*
X		 * We do not know the name here,
X		 * we only have the short ptb->dbuf.t_name
X		 */
X#ifdef	__can_we__
X		if (!errhidden(E_NAMETOOLONG, name)) {
X			if (!errwarnonly(E_NAMETOOLONG, name))
X#endif
X				xstats.s_toolong++;
X			errmsgno(EX_BAD,
X			"Long name too long (%lld) ignored.\n",
X							(Llong)info->f_size);
X#ifdef	__can_we__
X			(void) errabort(E_NAMETOOLONG, name, TRUE);
X		}
X#endif
X		void_file(info);
X		return (get_tcb(ptb));
X	}
X	if (ptb->dbuf.t_linkflag == LF_LONGNAME) {
X		if ((info->f_xflags & XF_PATH) != 0) {
X			/*
X			 * Ignore old star/gnutar extended headers for very
X			 * long filenames if we already found a POSIX.1-2001
X			 * compliant long PATH name.
X			 */
X			void_file(info);
X			return (get_tcb(ptb));
X		}
X		info->f_namelen = info->f_size -1;
X		info->f_flags |= F_LONGNAME;
X		move.m_data = info->f_name;
X	} else {
X		if ((info->f_xflags & XF_LINKPATH) != 0) {
X			/*
X			 * Ignore old star/gnutar extended headers for very
X			 * long linknames if we already found a POSIX.1-2001
X			 * compliant long LINKPATH name.
X			 */
X			void_file(info);
X			return (get_tcb(ptb));
X		}
X		info->f_lnamelen = info->f_size -1;
X		info->f_flags |= F_LONGLINK;
X		move.m_data = info->f_lname;
X	}
X	move.m_flags = 0;
X	if (xt_file(info, vp_move_from_arch, &move, 0, "moving long name") < 0)
X		die(EX_BAD);
X
X	return (get_tcb(ptb));
X}
X
XEXPORT void
Xwrite_longnames(info)
X	register FINFO	*info;
X{
X	/*
X	 * XXX Should test for F_LONGNAME & F_FLONGLINK
X	 */
X	if ((info->f_flags & F_LONGNAME) ||
X	    (info->f_namelen > props.pr_maxsname)) {
X		put_longname(info, info->f_name, info->f_namelen+1,
X						"././@LongName", XT_LONGNAME);
X	}
X	if ((info->f_flags & F_LONGLINK) ||
X	    (info->f_lnamelen > props.pr_maxslname)) {
X		put_longname(info, info->f_lname, info->f_lnamelen+1,
X						"././@LongLink", XT_LONGLINK);
X	}
X}
X
XLOCAL void
Xput_longname(info, name, namelen, tname, xftype)
X	FINFO	*info;
X	char	*name;
X	int	namelen;
X	char	*tname;
X	Ulong	xftype;
X{
X	FINFO	finfo;
X	TCB	tb;
X	TCB	*ptb;
X	move_t	move;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X
X	if ((ptb = (TCB *)get_block(TBLOCK)) == NULL)
X		ptb = &tb;
X	else
X		finfo.f_flags |= F_TCB_BUF;
X	filltcb(ptb);
X
X	strcpy(ptb->dbuf.t_name, tname);
X
X	move.m_flags = 0;
X	if ((info->f_flags & F_ADDSLASH) != 0 && xftype == XT_LONGNAME) {
X		/*
X		 * A slash is only added to the filename and not to the
X		 * linkname.
X		 */
X		move.m_flags |= MF_ADDSLASH;
X		namelen++;
X	}
X	finfo.f_mode = TUREAD|TUWRITE;
X	finfo.f_rsize = finfo.f_size = namelen;
X	finfo.f_xftype = xftype;
X	info_to_tcb(&finfo, ptb);
X	write_tcb(ptb, &finfo);
X
X	move.m_data = name;
X	move.m_size = finfo.f_size;
X	cr_file(&finfo, vp_move_to_arch, &move, 0, "moving long name");
X}
END-of-star-1.5.2/star/longnames.c
echo x - star-1.5.2/star/match.c
sed 's/^X//' >star-1.5.2/star/match.c << 'END-of-star-1.5.2/star/match.c'
X/* @(#)match.c	1.14 10/08/23 Copyright 1985, 88-90, 92-96, 98, 99, 2000-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)match.c	1.14 10/08/23 Copyright 1985, 88-90, 92-96, 98, 99, 2000-2010 J. Schilling";
X#endif
X/*
X *	Pattern matching routines for star
X *
X *	Copyright (c) 1985, 88-90, 92-96, 98, 99, 2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include <schily/patmatch.h>
X#include "starsubs.h"
X
XEXPORT	const char *filename	__PR((const char *name));
XLOCAL	BOOL	nameprefix	__PR((int i, const char *name));
XLOCAL	BOOL	patprefix	__PR((int i, const char *name, int namelen));
XLOCAL	int	namefound	__PR((const char *name));
XEXPORT	BOOL	match		__PR((const char *name));
XEXPORT	int	addpattern	__PR((const char *pattern));
XEXPORT	int	addarg		__PR((const char *pattern));
XEXPORT	void	closepattern	__PR((void));
XEXPORT	void	prpatstats	__PR((void));
XLOCAL	void	printpattern	__PR((void));
XLOCAL	BOOL	issimple	__PR((const char *pattern));
X
Xextern	BOOL	debug;			/* -debug has been specified	*/
Xextern	BOOL	cflag;			/* -c has been specified	*/
Xextern	BOOL	xflag;			/* -x has been specified	*/
Xextern	BOOL	diff_flag;		/* -diff has been specified	*/
Xextern	BOOL	nodesc;			/* -D do not descenc dirs	*/
Xextern	BOOL	notpat;			/* -not invert pattern matcher	*/
Xextern	BOOL	notarg;			/* PAX -c invert match		*/
Xextern	BOOL	paxmatch;		/* Do PAX like matching		*/
Xextern	BOOL	paxnflag;		/* PAX -n one match only	*/
X
Xextern	const	char	*wdir;		/* current working dir name	*/
Xextern	const	char	*dir_flags;	/* -C dir from getallargs()	*/
Xextern	const	char	*currdir;	/* current -C dir argument	*/
X
X#define	NPAT	100			/* Max. number of patterns	*/
X
XEXPORT	BOOL		havepat = FALSE; /* Pattern matching in use	*/
XLOCAL	int		npat	= 0;	/* Number of pat= patterns	*/
XLOCAL	int		narg	= 0;	/* Number of file arg patterns	*/
XLOCAL	int		maxplen	= 0;	/* Max pat len for state array	*/
XLOCAL	int		*aux[NPAT+1];	/* Aux array for pat matcher	*/
XLOCAL	int		alt[NPAT+1];	/* Alt values for pat matcher	*/
XLOCAL	int		*state;		/* State array for matching	*/
XLOCAL	const	Uchar	*pat[NPAT+1];	/* The plain text patterns	*/
XLOCAL	const	char	*dirs[NPAT+1];	/* The coresponding directories	*/
XLOCAL	char		didm[NPAT+1];	/* If a match did happen	*/
X
XEXPORT const char *
Xfilename(name)
X	const char	*name;
X{
X	char	*p;
X
X	if ((p = strrchr(name, '/')) == NULL)
X		return (name);
X	return (++p);
X}
X
XLOCAL BOOL
Xnameprefix(i, name)
X			int	i;
X	register const char	*name;
X{
X	register const char	*patp;
X
X	patp = (const char *)pat[i];
X	while (*patp) {
X		if (*patp++ != *name++)
X			return (FALSE);
X	}
X	if (*name) {
X		if (nodesc)
X			return (FALSE);
X		if (*name != '/')	/* Directory tree match	*/
X			return (FALSE);
X	}
X	if (paxnflag && didm[i])	/* Only one exact match */
X		return (FALSE);
X	didm[i] = TRUE;
X	return (TRUE);			/* Names are equal	*/
X}
X
X/*
X * XXX POSIX PAX requires that '/' characters need to be specified explicitly
X * XXX as in shell pattern matching. We do not yet support this.
X */
XLOCAL BOOL
Xpatprefix(i, name, namelen)
X	register int	i;
X	register const char	*name;
X	register int	namelen;
X{
X	char	*ret;
X
X	ret = (char *)patmatch(pat[i], aux[i],
X			(const Uchar *)name, 0,
X			namelen, alt[i], state);
X	if (ret != NULL) {
X		if (*ret == '\0' || *ret == '/') {
X			if (*ret == '\0') {
X				if (paxnflag && didm[i])
X					return (FALSE);
X				didm[i] = TRUE;
X			} else {
X				if (nodesc)
X					return (FALSE);
X			}
X			return (TRUE);
X		}
X	}
X	return (FALSE);
X}
X
X/*
X * Match 'dirname' against 'dirname' and 'dirname/any'
X * Match 'dirname/' against 'dirname' only.
X *
X * Return index in pattern list for a match. The index is used
X * for indexing in the matching directory array later.
X */
XLOCAL int
Xnamefound(name)
X	const	char	*name;
X{
X	register int	i;
X	register int	namelen = -1;
X
X	for (i = npat; i < narg; i++) {
X		if (aux[i] != NULL) {
X			if (namelen < 0)
X				namelen = strlen(name);
X			if (patprefix(i, name, namelen)) {
X				if (notarg)
X					return (-1);
X				return (i);
X			}
X		} else if (nameprefix(i, name)) {
X			if (notarg)
X				return (-1);
X			return (i);
X		}
X	}
X	if (notarg)
X		return (narg);
X	return (-1);
X}
X
XEXPORT BOOL
Xmatch(name)
X	const	char	*name;
X{
X	register int	i;
X	register int	namelen;
X		char	*ret = NULL;
X
X	if (!cflag && narg > 0) {
X		if ((i = namefound(name)) < 0)
X			return (FALSE);
X		if (npat == 0)
X			goto found;
X	}
X
X	namelen = strlen(name);
X
X	for (i = 0; i < npat; i++) {
X		if (paxnflag && didm[i])
X			continue;
X		ret = (char *)patmatch(pat[i], aux[i],
X					(const Uchar *)name, 0,
X					namelen, alt[i], state);
X		if (ret != NULL && *ret == '\0') {
X			didm[i] = TRUE;
X			break;
X		}
X	}
X	if (notpat ^ (ret != NULL && *ret == '\0')) {
Xfound:
X		if (!(xflag || diff_flag))	/* Chdir only on -x or -diff */
X			return (TRUE);
X		if (dirs[i] != NULL && currdir != dirs[i]) {
X			currdir = dirs[i];
X			dochdir(wdir, TRUE);
X			dochdir(currdir, TRUE);
X		}
X		return (TRUE);
X	}
X	return (FALSE);
X}
X
XEXPORT int
Xaddpattern(pattern)
X	const char	*pattern;
X{
X	int	plen;
X
X#ifdef	ADDP_DEBUG
X	if (debug)
X		error("Add pattern: '%s' currdir: '%s'.\n",
X			pattern, currdir == NULL ? dir_flags:currdir);
X#endif
X
X	if (npat >= NPAT)
X		comerrno(EX_BAD, "Too many patterns (max is %d).\n", NPAT);
X	plen = strlen(pattern);
X	pat[npat] = (const Uchar *)pattern;
X
X	if (plen > maxplen)
X		maxplen = plen;
X
X	aux[npat] = ___malloc(plen*sizeof (int), "compiled pattern");
X	if ((alt[npat] = patcompile((const Uchar *)pattern,
X							plen, aux[npat])) == 0)
X		comerrno(EX_BAD, "Bad pattern: '%s'.\n", pattern);
X
X	if (currdir == NULL)
X		dirs[npat] = dir_flags;
X	else
X		dirs[npat] = currdir;
X	npat++;
X	return (TRUE);
X}
X
XEXPORT int
Xaddarg(pattern)
X	const char	*pattern;
X{
X	int	plen;
X
X	/*
X	 * Patterns from 'file type args' start after pat= patterns in the
X	 * pat[] array.
X	 */
X	if (narg == 0)
X		narg = npat;
X
X#ifdef	ADDARG_DEBUG
X	if (debug)
X		error("Add arg '%s'.\n", pattern);
X#endif
X
X	if (narg >= NPAT)
X		comerrno(EX_BAD, "Too many patterns (max is %d).\n", NPAT);
X
X	plen = strlen(pattern);
X	pat[narg] = (const Uchar *)pattern;
X
X	if (!paxmatch || issimple(pattern)) {
X		aux[narg] = NULL;
X		alt[narg] = 0;
X	} else {
X		if (plen > maxplen)
X			maxplen = plen;
X		aux[npat] = ___malloc(plen*sizeof (int), "compiled pattern");
X		if ((alt[npat] = patcompile((const Uchar *)pattern,
X						plen, aux[npat])) == 0) {
X			comerrno(EX_BAD, "Bad pattern: '%s'.\n", pattern);
X		}
X	}
X	dirs[narg] = currdir;
X	narg++;
X	return (TRUE);
X}
X
X/*
X * Close pattern list: insert useful default directories.
X */
XEXPORT void
Xclosepattern()
X{
X	register int	i;
X
X	if (debug) {	/* temporary */
X		error("closepattern(), maxplen %d\n", maxplen);
X		printpattern();
X	}
X
X	for (i = 0; i < npat; i++) {
X		if (dirs[i] != NULL)
X			break;
X	}
X	while (--i >= 0)
X		dirs[i] = wdir;
X
X	if (debug) /* temporary */
X		printpattern();
X
X	if (npat > 0 || narg > 0)
X		havepat = TRUE;
X
X	if (maxplen > 0) {
X		state = ___malloc((maxplen+1)*sizeof (int), "pattern state");
X	}
X}
X
XEXPORT void
Xprpatstats()
X{
X	register int	i;
X
X	for (i = 0; i < narg; i++) {
X		if (didm[i])
X			continue;
X		errmsgno(EX_BAD, "'%s' did not match\n", pat[i]);
X	}
X}
X
XLOCAL void
Xprintpattern()
X{
X	register int	i;
X
X	error("npat: %d narg: %d\n", npat, narg);
X	for (i = 0; i < npat; i++) {
X		error("pat %s dir %s\n", pat[i], dirs[i]);
X	}
X	for (i = npat; i < narg; i++) {
X		error("arg %s dir %s\n", pat[i], dirs[i]);
X	}
X}
X
X/*
X * Check if the pattern contains special characters of the pattern matcher.
X * Do not look for characters that may be used only inside of a character set.
X */
XLOCAL BOOL
Xissimple(pattern)
X	register const char	*pattern;
X{
X	while (*pattern != '\0') {
X		switch (*pattern++) {
X
X		casePAT
X			return (FALSE);
X		}
X	}
X	return (TRUE);
X}
END-of-star-1.5.2/star/match.c
echo x - star-1.5.2/star/star_fat.mk
sed 's/^X//' >star-1.5.2/star/star_fat.mk << 'END-of-star-1.5.2/star/star_fat.mk'
X#ident @(#)star_fat.mk	1.23 08/04/06 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# This is star_fat.mk, it creates one "fat" binary for all functionality.
X#
X# If you like to create non "fat" binaries, remove Makefile
X# and copy all.mk to Makefile.
X#
XINSDIR=		bin
XTARGET=		star
X#SYMLINKS=	ustar tar
XSYMLINKS=	ustar tar gnutar suntar scpio spax
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DCOPY_LINKS_DELAYED
XCPPOPTS +=	-DSTAR_FAT
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		star_fat.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		\
X		findinfo.c
X
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h restore.h \
X		checkerr.h dumpdate.h bitstring.h
X
X#LIBS=		-lunos
X#LIBS=		-lschily -lc /usr/local/lib/gcc-gnulib
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
X#
X#	Wenn -lfind, dann auch  $(LIB_INTL)
X#
XXMK_FILE=	Makefile.man starformatman.mk scpioman.mk gnutarman.mk \
X		spaxman.mk suntarman.mk Makefile.dfl Makefile.doc
X
Xstar_fat.c: star.c
X	$(RM) $(RM_FORCE) $@; cp star.c $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/star_fat.mk
echo x - star-1.5.2/star/pax.mk
sed 's/^X//' >star-1.5.2/star/pax.mk << 'END-of-star-1.5.2/star/pax.mk'
X#ident @(#)pax.mk	1.19 09/03/26 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		spax
X#SYMLINKS=	ustar tar
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DPAX
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		pax.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		findinfo.c
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h \
X		checkerr.h dumpdate.h bitstring.h
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
XXMK_FILE=	spaxman.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/pax.mk
echo x - star-1.5.2/star/movearch.c
sed 's/^X//' >star-1.5.2/star/movearch.c << 'END-of-star-1.5.2/star/movearch.c'
X/* @(#)movearch.c	1.35 09/10/16 Copyright 1993, 1995, 2001-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)movearch.c	1.35 09/10/16 Copyright 1993, 1995, 2001-2009 J. Schilling";
X#endif
X/*
X *	Handle non-file type data that needs to be moved from/to the archive.
X *
X *	Copyright (c) 1993, 1995, 2001-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/types.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include "starsubs.h"
X#include "movearch.h"
X
XEXPORT	int	move_from_arch	__PR((move_t *move, char *p, int amount));
XEXPORT	int	move_to_arch	__PR((move_t *move, char *p, int amount));
X
X
X/*
X * Move data from archive.
X */
XEXPORT int
Xmove_from_arch(move, p, amount)
X	move_t	*move;
X	char	*p;
X	int	amount;
X{
X	movebytes(p, move->m_data, amount);
X	move->m_data += amount;
X	/*
X	 * If we make sure that the buffer holds at least one character more
X	 * than needed, then we may safely add another null byte at the end of
X	 * the extracted buffer.
X	 * This makes sure, that a buggy tar implementation which wight archive
X	 * non null-terminated long filenames with 'L' or 'K' filetype may
X	 * not cause us to core dump.
X	 * It is needed when extracting extended attribute buffers from
X	 * POSIX.1-2001 archives as POSIX.1-2001 makes the buffer '\n' but not
X	 * null-terminated.
X	 */
X	move->m_data[0] = '\0';
X	return (amount);
X}
X
X/*
X * Move data to archive.
X */
XEXPORT int
Xmove_to_arch(move, p, amount)
X	move_t	*move;
X	char	*p;
X	int	amount;
X{
X	if (amount > move->m_size)
X		amount = move->m_size;
X	movebytes(move->m_data, p, amount);
X	move->m_data += amount;
X	move->m_size -= amount;
X	if (move->m_flags & MF_ADDSLASH) {
X		if (move->m_size == 1) {
X			p[amount-1] = '/';
X		} else if (move->m_size == 0) {
X			if (amount > 1)
X				p[amount-2] = '/';
X			p[amount-1] = '\0';
X		}
X	}
X	return (amount);
X}
END-of-star-1.5.2/star/movearch.c
echo x - star-1.5.2/star/suntar.mk
sed 's/^X//' >star-1.5.2/star/suntar.mk << 'END-of-star-1.5.2/star/suntar.mk'
X#ident @(#)suntar.mk	1.17 09/03/26 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		suntar
X#SYMLINKS=	ustar tar
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		suntar.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		findinfo.c
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h \
X		checkerr.h dumpdate.h bitstring.h
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
XXMK_FILE=	suntarman.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/suntar.mk
echo x - star-1.5.2/star/cpio.mk
sed 's/^X//' >star-1.5.2/star/cpio.mk << 'END-of-star-1.5.2/star/cpio.mk'
X#ident @(#)cpio.mk	1.18 09/03/26 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		scpio
X#SYMLINKS=	ustar tar
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		cpio.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		findinfo.c
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h \
X		checkerr.h dumpdate.h bitstring.h
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
XXMK_FILE=	scpioman.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/cpio.mk
echo x - star-1.5.2/star/movearch.h
sed 's/^X//' >star-1.5.2/star/movearch.h << 'END-of-star-1.5.2/star/movearch.h'
X/* @(#)movearch.h	1.2 03/06/12 Copyright 1993, 1995, 2001-2003 J. Schilling */
X/*
X *	Handle non-file type data that needs to be moved from/to the archive.
X *
X *	Copyright (c) 1993, 1995, 2001-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
Xtypedef struct {
X	char	*m_data;	/* Pointer to data to be moved ftom/to arch */
X	int	m_size;		/* Size of data to be moved from/to arch    */
X	int	m_flags;	/* Flags holding different move options	    */
X} move_t;
X
X#define	MF_ADDSLASH	0x01	/* Add a slash to the data on archive	    */
X
X
Xextern	int	move_from_arch	__PR((move_t *move, char *p, int amount));
Xextern	int	move_to_arch	__PR((move_t *move, char *p, int amount));
X
X#define	vp_move_from_arch ((int(*)__PR((void *, char *, int)))move_from_arch)
X#define	vp_move_to_arch	((int(*)__PR((void *, char *, int)))move_to_arch)
END-of-star-1.5.2/star/movearch.h
echo x - star-1.5.2/star/starformatman.mk
sed 's/^X//' >star-1.5.2/star/starformatman.mk << 'END-of-star-1.5.2/star/starformatman.mk'
X#ident @(#)starformatman.mk	1.1 05/08/28 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	star
XMANSECT=	$(MANSECT_FILEFORM)
XMANSUFFIX=	$(MANSUFF_FILEFORM)
XMANFILE=	star.4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/star/starformatman.mk
echo x - star-1.5.2/star/star.4
sed 's/^X//' >star-1.5.2/star/star.4 << 'END-of-star-1.5.2/star/star.4'
X'\" t
X. \" @(#)star.4	1.20 11/12/12 Copyr 2003-2011 J. Schilling
X. \" star archive formats
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH STAR 4L "11/12/12" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xstar \- tape archive file format
X.SH DESCRIPTION
X.PP
X.B Tar
XArchives are layered archives.
XThe basic structure is defined by the POSIX.1-1988 archive format and 
Xdocumented in the
X.B "BASIC TAR HEADER DESCRIPTION
Xsection below.
XThe higher level structure is defined by the POSIX.1-2001 extended headers
Xand documented in the
X.B "EXTENDED TAR (PAX) HEADER STRUCTURE"
Xsection below.
XPOSIX.1-2001 extended headers are pseudo files that contain an unlimited number
Xof extended header keywords and associated values. The header keywords are
Xdocumented in the
X.B "EXTENDED TAR (PAX) HEADER KEYWORDS
Xsection below.
X.SH "BASIC TAR HEADER DESCRIPTION
X.PP
XPhysically, a POSIX.1-1988
X.B tar
Xarchive consists of a series of fixed sized blocks of TBLOCK (512) characters.
XIt contains a series of file entries terminated by a logical
Xend\-of\-archive marker, which consists of two blocks of 512 bytes of binary zeroes.
XEach file entry is represented by a header block that describes the file followed by
Xone or more blocks with the content of the file. The length of each file is rounded up
Xto a multiple of 512 bytes.
X.PP
XA number of TBLOCK sizes blocks are grouped together to a tape record for physical I/O
Xoperations. Each record of 
X.I n
Xblocks is written with a single
X.BR write (2)
Xoperation.
XOn magnetic tapes, this results in a single tape record in case the tape drive is in
X.BR "variable length record mode" .
X.PP
XThe header block is defined in star.h as follows:
X.nf
X/*
X * POSIX.1-1988 field size values and magic.
X */
X#define	TBLOCK		512
X#define	NAMSIZ		100
X#define	PFXSIZ		155
X
X#define	TMODLEN		8
X#define	TUIDLEN		8
X#define	TGIDLEN		8
X#define	TSIZLEN		12
X#define	TMTMLEN		12
X#define	TCKSLEN		8
X
X#define	TMAGIC		"ustar"	/* ustar magic 6 chars + '\e0' */
X#define	TMAGLEN		6     	/* "ustar" including '\e0' */
X#define	TVERSION		"00"
X#define	TVERSLEN		2
X#define	TUNMLEN		32
X#define	TGNMLEN		32
X#define	TDEVLEN		8
X
X/*
X * POSIX.1-1988 typeflag values
X */
X#define	REGTYPE		'0'	/* Regular File		*/
X#define	AREGTYPE		'\e0'	/* Regular File (outdated) */
X#define	LNKTYPE		'1'	/* Hard Link     		*/
X#define	SYMTYPE		'2'	/* Symbolic Link		*/
X#define	CHRTYPE		'3'	/* Character Special	*/
X#define	BLKTYPE		'4'	/* Block Special		*/
X#define	DIRTYPE		'5'	/* Directory     		*/
X#define	FIFOTYPE		'6'	/* FIFO (named pipe)	*/
X#define	CONTTYPE		'7'	/* Contiguous File		*/
X
X/*
X * POSIX.1-2001 typeflag extensions.
X * POSIX.1-2001 calls the extended USTAR format PAX although it is
X * definitely derived from and based on USTAR. The reason may be that
X * POSIX.1-2001 calls the tar program outdated and lists the
X * pax program as the successor.
X */
X#define	LF_GHDR		'g'	/* POSIX.1-2001 global extended header */
X#define	LF_XHDR		'x'	/* POSIX.1-2001 extended header */
X.fi
X.PP
XSee section
X.B "EXTENDED TAR (PAX) HEADER KEYWORDS
Xfor more information about the structure of a POSIX.1-2001 header.
X.PP
X.nf
X/*
X * star/gnu/Sun tar extensions:
X *
X * Note that the standards committee allows only capital A through
X * capital Z for user-defined expansion.  This means that defining
X * something as, say '8' is a *bad* idea.
X */
X
X#define	LF_ACL     	'A'	/* Solaris Access Control List	*/
X#define	LF_DUMPDIR 	'D'	/* GNU dump dir               	*/
X#define	LF_EXTATTR 	'E'	/* Solaris Extended Attribute File	*/
X#define	LF_META    	'I'	/* Inode (metadata only) no file content */
X#define	LF_LONGLINK	'K'	/* NEXT file has a long linkname	*/
X#define	LF_LONGNAME    'L'	/* NEXT file has a long name    	*/
X#define	LF_MULTIVOL	'M'	/* Continuation file rest to be skipped */
X#define	LF_NAMES   	'N'	/* OLD GNU for names > 100 characters	*/
X#define	LF_SPARSE  	'S'	/* This is for sparse files		*/
X#define	LF_VOLHDR  	'V'	/* tape/volume header Ignore on extraction */
X#define	LF_VU_XHDR 	'X'	/* POSIX.1-2001 xtended (Sun VU version) */
X
X/*
X * Definitions for the t_mode field
X */
X#define	TSUID   	04000	/* Set UID on execution	*/
X#define	TSGID   	02000	/* Set GID on execution	*/
X#define	TSVTX   	01000	/* On directories, restricted deletion flag */
X#define	TUREAD  	00400	/* Read by owner    	*/
X#define	TUWRITE 	00200	/* Write by owner special */
X#define	TUEXEC  	00100	/* Execute/search by owner */
X#define	TGREAD  	00040	/* Read by group      	*/
X#define	TGWRITE 	00020	/* Write by group     	*/
X#define	TGEXEC  	00010	/* Execute/search by group */
X#define	TOREAD  	00004	/* Read by other		*/
X#define	TOWRITE 	00002	/* Write by other		*/
X#define	TOEXEC  	00001	/* Execute/search by other */
X
X#define	TALLMODES	07777	/* The low 12 bits   	*/
X
X/*
X * This is the ustar (Posix 1003.1) header.
X */
Xstruct header {
X	char t_name[NAMSIZ];	/*   0 Filename			*/
X	char t_mode[8];		/* 100 Permissions   		*/
X	char t_uid[8];  		/* 108 Numerical User ID		*/
X	char t_gid[8];  		/* 116 Numerical Group ID	*/
X	char t_size[12];		/* 124 Filesize			*/
X	char t_mtime[12];   	/* 136 st_mtime			*/
X	char t_chksum[8];   	/* 148 Checksum			*/
X	char t_typeflag;		/* 156 Typ of File   		*/
X	char t_linkname[NAMSIZ]; /* 157 Target of Links		*/
X	char t_magic[TMAGLEN];   /* 257 "ustar"        		*/
X	char t_version[TVERSLEN]; /* 263 Version fixed to 00	*/
X	char t_uname[TUNMLEN];   /* 265 User Name          	*/
X	char t_gname[TGNMLEN];   /* 297 Group Name         	*/
X	char t_devmajor[8];   	/* 329 Major for devices		*/
X	char t_devminor[8];   	/* 337 Minor for devices		*/
X	char t_prefix[PFXSIZ];	/* 345 Prefix for t_name		*/
X	                  		/* 500 End            		*/
X	char t_mfill[12];    	/* 500 Filler up to 512		*/
X};
X
X/*
X * star header specific definitions
X */
X#define	STMAGIC		"tar"	/* star magic */
X#define	STMAGLEN		4    	/* "tar" including '\e0' */
X
X/*
X * This is the new (post Posix 1003.1-1988) xstar header
X * defined in 1994.
X *
X * t_prefix[130]	is guaranteed to be '\0' to prevent ustar
X *				compliant implementations from failing.
X * t_mfill & t_xmagic need to be zero for a 100% ustar compliant
X *				implementation, so setting t_xmagic to
X *				"tar" should be avoided in the future.
X *
X * A different method to recognize this format is to verify that
X * t_prefix[130]    		is equal to '\0' and
X * t_atime[0]/t_ctime[0]    	is an octal number and
X * t_atime[11]      		is equal to ' ' and
X * t_ctime[11]      		is equal to ' '.
X *
X * Note that t_atime[11]/t_ctime[11] may be changed in future.
X */
Xstruct xstar_header {
X	char t_name[NAMSIZ];	/*   0 Filename			*/
X	char t_mode[8];		/* 100 Permissions   		*/
X	char t_uid[8];  		/* 108 Numerical User ID		*/
X	char t_gid[8];  		/* 116 Numerical Group ID	*/
X	char t_size[12];		/* 124 Filesize			*/
X	char t_mtime[12];   	/* 136 st_mtime			*/
X	char t_chksum[8];   	/* 148 Checksum			*/
X	char t_typeflag;		/* 156 Typ of File   		*/
X	char t_linkname[NAMSIZ]; /* 157 Target of Links		*/
X	char t_magic[TMAGLEN];   /* 257 "ustar"        		*/
X	char t_version[TVERSLEN]; /* 263 Version fixed to 00	*/
X	char t_uname[TUNMLEN];   /* 265 User Name          	*/
X	char t_gname[TGNMLEN];   /* 297 Group Name         	*/
X	char t_devmajor[8];   	/* 329 Major for devices		*/
X	char t_devminor[8];   	/* 337 Minor for devices		*/
X	char t_prefix[131];   	/* 345 Prefix for t_name		*/
X	char t_atime[12];		/* 476 st_atime			*/
X	char t_ctime[12];		/* 488 st_ctime			*/
X	char t_mfill[8];		/* 500 Filler up to star magic	*/
X	char t_xmagic[4];     	/* 508 "tar"           		*/
X};
X
Xstruct sparse {
X	char t_offset[12];
X	char t_numbytes[12];
X};
X
X#define	SPARSE_EXT_HDR  21
X
Xstruct xstar_ext_header {
X	struct sparse t_sp[21];
X	char t_isextended;
X};
X
Xtypedef union hblock {
X	char dummy[TBLOCK];
X	long ldummy[TBLOCK/sizeof (long)];	/* force long alignment */
X	struct header          	dbuf;
X	struct xstar_header    	xstar_dbuf;
X	struct xstar_ext_header	xstar_ext_dbuf;
X} TCB;
X.fi
X.PP
XFor maximum portability, all fields that contain character strings should be
Xlimited to use the low 7 bits of a character.
X.PP
XThe
X.IR name ,
X.I linkname
Xand
X.I prefix
Xfield contain character strings. The strings are null terminated
Xexcept when they use the full space of 100 characters for the
X.I name
Xor
X.I linkname
Xfield or 155 characters
Xfor the
X.I prefix
Xfield.
X.PP
XIf the
X.I prefix
Xdoes not start with a null character, then
X.I prefix
Xand
X.I name
Xneed to be concatenated by using the
X.IR prefix ,
Xfollowed by a slash character followed by the
X.I name
Xfield.
XIf a null character appears in
X.I name
Xor
X.I prefix
Xbefore the maximum size is reached, the field in question is terminated.
XThis way file names up to 256 characters may be archived.
XThe
X.I prefix
Xis not used together with the
X.I linkname
Xfield, so the maximum length of a link name is 100 characters.
X.PP
XThe fields
X.IR magic ,
X.I uname
Xand
X.I gname
Xcontain null terminated character strings.
X.PP
XThe version field contains the string \fB"00"\fP
Xwithout a trailing zero. It cannot be set to different values as POSIX.1-1988
Xdid not specify a way to handle different version strings.
X.PP
XThe
X.I typeflag
Xfield contains a single character.
X.PP
XAll numeric fields contain
X.I size-1
Xleading zero-filled numbers using octal digits.
XThey are followed by one or more space or null characters.
XAll recent implementations only use one space or null character at the end
Xof a numerical field to get maximum space for the octal number.
X.B Star
Xalways uses a space character as terminator.
XNumeric fields with 8 characters may hold up to 7 octal digits (7777777)
Xwhich results is a maximum value of 2097151.
XNumeric fields with 12 characters may hold up to 11 octal digits (77777777777)
Xwhich results is a maximum value of 8589934591.
X.PP
X.I Star
Ximplements a vendor specific (and thus non-POSIX) extension to put bigger numbers
Xinto the numeric fields. This is done by using a 
X.B base 256
Xcoding.
XThe top bit of the first character in the appropriate 8 character or
X12 character field is set to flag non octal coding.
XIf base 256 coding is in use, then all remaining characters are used to code
Xthe number. This results in 7 base 256 digits in 8 character fields and in
X11 base 256 digits in 12 character fields.
XAll base 256 numbers are two's complement numbers. A base 256 number in a
X8 character field may hold 56 bits, a base 256 number in a 12 character
Xfield may hold 88 bits. This may be extended to 63 bits for 8 character fields
Xand to 95 bits for 12 character fields. For a negative number the first
Xcharacter currently is set to a value of 255 (all 8 bits are set).
XThe rightmost character in a 8 or 12 character field contains the least
Xsignificant base 256 number.
XRecent GNU tar versions implement the same extension.
X.PP
XWhile the POSIX standard makes it obvious that the fields
X.IR "mode" , " uid" , " gid" ,
X.IR " size", " chksum" ,
X.I devmajor
Xand
X.I devminor
Xshould be treated as unsigned numbers, there is no such definition for the
X.I time
Xfield.
X.PP
XThe mode field contains 12 bits holding permissions,
Xsee above for the definitions for each of the permission bits.
X.PP
XThe
X.I uid
Xand
X.I gid
Xfields contain the numerical user id of the file.
X.PP
XThe
X.I size
Xfield contains the size of the file in characters.
XIf the
X.I tar header
Xis followed by file data, then the amount of data that follows is computed by
X.IR "(size + 511) / 512" .
X.PP
XThe
X.I mtime
Xfield contains the number of seconds since Jan 1st 1970 00:00 UTC
Xas retrived via 
X.BR stat (2)
Xin 
X.IR st_mtime .
XIf the
X.I mtime
Xfiels is assumed to be a signed 33 bit number, the latest representable time
Xis 2106 Feb  7 06:28:15 GMT.
X.PP
XThe
X.I chksum
Xfield contains a simple checksum over all bytes of the header.
XTo compute the value, all characters in the header are treated as
Xunsigned integers and the characters in the
X.I chksum
Xfield are treated as if they were all spaces. When the computation starts,
Xthe checksum value is initialized to 0.
X.PP
XThe
X.I typeflag
Xfield specifies the type of the file that is archived. If a specific
X.B tar
Ximplementation does not include support for a specific typeflag value,
Xthis implementation will extract the unknown file types as if they were
Xplain files. For this reason, the
X.I size
Xfield for any file type except directories, hard links, symbolic links,
Xcharacter special, block specials and FIFOs
Xmust always follow the rules for plain files.
X.TP
X.B '0' REGTYPE
XA regular file.
XIf the
X.I size
Xfield is non zero, then file data follows the header.
X.TP
X.B '\e0' AREGTYPE
XFor backwards compatibility with pre POSIX.1-1988
X.B tar
Ximplementations, a nul character is also recognized as marker for plain files.
XIt is not generated by recent
X.B tar
Ximplementations.
XIf the
X.I size
Xfield is non zero, then file data follows the header.
X.TP
X.B '1' LNKTYPE
XThe file is a hard link to another file.
XThe name of the file that the file is linked to is in the 
X.I linkname
Xpart of the header.
XFor
X.B tar
Xarchives written by pre POSIX.1-1988 implementations, the
X.I size
Xfield usually contains the size of the file and
Xneeds to be ignored as no data may follow this header type.
XFor POSIX.1-1988 compliant archives, the
X.I size
Xfield needs to be 0.
XFor POSIX.1-2001 compliant archives, the
X.I size
Xfield may be non zero, indicating that file data is included in the archive.
X.TP
X.B '2' SYMTYPE
XThe file is a symbolic link to another file.
XThe name of the file that the file is linked to is in the 
X.I linkname
Xpart of the header.
XThe
X.I size
Xfield needs to be 0.
XNo file data may follow the header.
X.TP
X.B '3' CHRTYPE
XA character special file.
XThe fields
X.I devmajor
Xand
X.I devminor
Xcontain information that defines the file.
XThe meaning of the
X.I size
Xfield is unspecified by the POSIX standard.
XNo file data may follow the header.
X.TP
X.B '4' BLKTYPE
XA block special file.
XThe fields
X.I devmajor
Xand
X.I devminor
Xcontain information that defines the file.
XThe meaning of the
X.I size
Xfield is unspecified by the POSIX standard.
XNo file data may follow the header.
X.TP
X.B '5' DIRTYPE
XA directory or sub directory. Old (pre POSIX.1-1988)
X.B tar
Ximplementations did use the same
X.I typeflag
Xvalue as for plain files and added a slash to the name.
XIf the
X.I size
Xfield is non zero then it indicates the maximum size in characters
Xthe system may allocate for this directory. If the
X.I size
Xfield is 0, then
Xthe system shall not limit the size of the directory. On operating systems
Xwhere the disk allocation is not done on a directory base, the
X.I size
Xfield is ignored on extraction.
XNo file data may follow the header.
X.TP
X.B '6' FIFOTYPE
XA named pipe.
XThe meaning of the size field is unspecified by the POSIX standard.
XThe
X.I size
Xfield must be ignored on extraction.
XNo file data may follow the header.
X.TP
X.B '7' CONTTYPE
XA contiguous file.
XThis is a file that gives special performance attributes.
XOperating systems that don't support this file type extract this file type
Xas plain files.
XIf the
X.I size
Xfield is non zero, then file data follows the header.
X.TP
X.B 'g' GLOBAL POSIX.1-2001 HEADER
XWith POSIX.1-2001 pax archives, this type defines a global extended header.
XThe
X.I size
Xis always non zero and denotes the sum of the length fields in the extended
Xheader data.
XThe data that follows the header is in the
X.B pax extended header
Xformat.
XThe extended header records in this header type affect all
Xfollowing files in the archive unless they are overwritten by new values.
XSee
X.B "EXTENDED TAR (PAX) HEADER FORMAT
Xsection below.
X.TP
X.B 'x' EXTENDED POSIX.1-2001 HEADER
XWith POSIX.1-2001 pax archives, this type defines an extended header.
XThe
X.I size
Xis always non zero and denotes the sum of the length fields in the extended
Xheader data.
XThe data that follows the header is in the
X.B pax extended header
Xformat.
XThe extended header records in this header type only affect the
Xfollowing file in the archive.
XSee
X.B "EXTENDED TAR (PAX) HEADER FORMAT
Xsection below.
X.TP
X.B 'A' - 'Z'
XReserved for vendor specific implementations.
X.TP
X.B 'A'
XA Solaris ACL entry as used by the 
X.B tar
Ximplementation from Sun.
XThe
X.I size
Xis always non zero and denotes the length of the data that follows the header.
X.B Star
Xcurrently is not able to handle this header type.
X.TP
X.B 'D'
XA GNU dump directory.
XThis header type is not created by
X.B star
Xand handled like a directory during an extract operation, so the content
Xis ignored by
X.BR star .
XThe
X.I size
Xfield denotes the length of the data that follows the header.
X.TP
X.B 'E'
XA Solaris Extended Attribute File.
XThe
X.I size
Xfield denotes the length of the data that follows the header.
X.B Star
Xcurrently is not able to handle this header type.
X.TP
X.B 'I'
XA
X.B inode metadata
Xentry.
XThis header type is used by
X.B star
Xto archive inode meta data only.
XTo archive more inode meta data than possible with a POSIX-1.1988
X.B tar
Xheader, a header with type
X.B 'I'
Xis usually preceded by a
X.B 'x'
Xheader.
XIt is used with incremental backups.
XThe
X.I size
Xfield holds the length of the file.
XNo file data follows this header.
X.TP
X.B 'K'
XA long link name.
X.B Star
Xis able to read and write this type of header with the
X.BR star ", " xstar " and " gnutar
Xformats.
XWith the
X.BR xustar " and " exustar
Xformats,
X.B star
Xprefers to store long link names using the POSIX.1-2001 method.
XThe
X.I size
Xis always non zero and denotes the length of the long link name including
Xthe trailing null byte. The link name is in the data that follows the header.
X.TP
X.B 'L'
XA long file name.
X.B Star
Xis able to read and write this type of header with the
X.BR star ", " xstar " and " gnutar
Xformats.
XWith the
X.BR xustar " and " exustar
Xformats,
X.B star
Xprefers to store long file names using the POSIX.1-2001 method.
XThe
X.I size
Xis always non zero and denotes the length of the long file name including
Xthe trailing null byte. The file name is in the data that follows the header.
X.TP
X.B 'M'
XA multi volume continuation entry.
XIt is used by
X.B star
Xto tell the extraction program via the 
X.I size
Xfield when the next regular archive header will follow.
XThis allows to start extracting multi volume archives with a volume
Xnumber greater than one.
XIt is used by GNU tar to verify multi volume continuation volumes.
XOther fields in the GNU multi volume continuation header are a result of
Xa GNU tar miss conception and cannot be used in a reliable tar implementation.
XIf the
X.I size
Xfield is non zero the data following the header is skipped by
X.B star
Xif the volume that starts with it is mounted as the first volume.
XThis header is ignored if the volume that starts with it is mounted
Xas continuation volume.
X.TP
X.B 'N'
XAn outdated linktype used by old GNU tar versions to store long file names.
XThis type is unsupported by
X.BR star .
X.TP
X.B 'S'
XA sparse file.
XThis header type is used by
X.B star
Xand
X.BR "GNU tar" .
XA sparse header is used instead of a plain file header to denote a sparse
Xfile that follows. Directly after the header, a list of sparse hole descriptors
Xfollows followed by the compacted file data.
XWith 
X.I star
Xformats, the
X.I size
Xfield holds a size that represents the sum of the sparse hole descriptors
Xplus the size of the compacted file data. This allows other
X.B tar
Ximplementations to correctly skip to the next
X.BR "tar header" .
XWith GNU tar, up to 4 sparse hole descriptors fit into the sparse header.
XAdditional hole descriptors are not needed if the file has less than 4 holes.
XWith GNU tar, the size field breaks general
X.I tar
Xheader rules in case more than 4 sparse hole descriptors are used
Xand is meaningless because the size of the additional sparse hole
Xdescriptors used by GNU tar does not count and cannot be determined before
Xparsing all sparse hole descriptors.
X.TP
X.B 'V'
XA volume header.
XThe 
X.I name
Xfield is is used to hold the volume name.
X.B Star 
Xuses the
X.I atime
Xfield to hold the volume number in case there is no POSIX.1-2001 extended header.
XThis header type is used by
X.B star
Xand
X.BR "GNU tar" .
XIf the
X.I size
Xfield is non zero the data following the header is skipped by
X.BR star .
X.TP
X.B 'X'
XA vendor unique variant of the POSIX.1-2001 extended header type.
XIt has been implemented by Sun many years before the POSIX.1-2001
Xstandard has been approved.
XSee also the
X.I typeflag
X\&'x' header type.
X.B Star
Xis able to read and write this type of header.
X.ne 10
X.SH "EXTENDED TAR (PAX) HEADER STRUCTURE
X.PP
X.TS
Xtab (/);
Xlb  cb
Xl  ci .
XBlock type/Description
X
XUstar Header [typeflag='g']/Global Extended Header
XGlobal Extended Data/
XUstar Header [typeflag='x']/Extended Header
XExtended Data/
XUstar header [typeflag='0']/File with Extended Header
XData for File #1/
XUstar header [typeflag='0']/File without Extended Header
XData for File #2/
XBlock of binary zeroes/First EOF Block
XBlock of binary zeroes/Second EOF Block
X.TE
X
X.ne 10
X.SH "EXTENDED TAR (PAX) HEADER FORMAT
X.PP
XThe data block that follows a
X.B tar
Xarchive header with
X.I typeflag
X.B "\&'g'
Xor
X.B "\&'x'
Xcontains one or more records in the following format:
X.PP
X.RS
X\&"%d %s=%s\en",
X.IR <length> ", " <keyword> ", " <value>
X.RE
X.PP
XEach record starts with a a decimal length field. The length includes
Xthe total size of a record including the length field itself and the trailing
Xnew line.
X.PP
XThe
X.I keyword
Xmay not include an equal sign.
XAll keywords beginning with lower case letters and digits are reserved for
Xfuture use by the POSIX standard.
X.PP
XIf the value field is of zero length, it deletes any header field of the same
Xname that is in effect from the same extended header or from a previous global
Xheader.
X.PP
XNull characters do not delimit any value. The data used for
X.I value 
Xis only limited by its
Ximplicit length.
X.SH "EXTENDED TAR (PAX) HEADER KEYWORDS
XPOSIX.1-2001 extended
X.B pax
Xheader keywords. All numerical values are represented as decimal strings.
XAll texts are represented as 7-bit ascii or UTF-8:
X.TP
X.B atime
XThe time from
X.B st_atime
Xin sub second granularity. 
X.B Star
Xcurrently supports a nanosecond granularity.
X.TP
X.B charset
XThe name of the character set used to encode the data in the following file(s).
X.RS
X.PP
XThe following values are supported for
X.BR charset :
X.TP 25
X.B "ISO-IR 646 1990
XSO/IEC 646:1990
X.TP
X.B "ISO-IR 8859 1 1998
XISO/IEC 8859-1:1998
X.TP
X.B "ISO-IR 8859 2 1998
XISO/IEC 8859-2:1998
X.TP
X.B "ISO-IR 8859 3 1998
XISO/IEC 8859-3:1998
X.TP
X.B "ISO-IR 8859 4 1998
XISO/IEC 8859-4:1998
X.TP
X.B "ISO-IR 8859 5 1998
XISO/IEC 8859-5:1998
X.TP
X.B "ISO-IR 8859 6 1998
XISO/IEC 8859-6:1998
X.TP
X.B "ISO-IR 8859 7 1998
XISO/IEC 8859-7:1998
X.TP
X.B "ISO-IR 8859 8 1998
XISO/IEC 8859-8:1998
X.TP
X.B "ISO-IR 8859 9 1998
XISO/IEC 8859-9:1998
X.TP
X.B "ISO-IR 8859 10 1998
XISO/IEC 8859-10:1998
X.TP
X.B "ISO-IR 8859 11 1998
XISO/IEC 8859-11:1998
X.TP
X.B "ISO-IR 8859 12 1998
XISO/IEC 8859-12:1998
X.TP
X.B "ISO-IR 8859 13 1998
XISO/IEC 8859-13:1998
X.TP
X.B "ISO-IR 8859 14 1998
XISO/IEC 8859-14:1998
X.TP
X.B "ISO-IR 8859 15 1998
XISO/IEC 8859-15:1998
X.TP
X.B "ISO-IR 10646 2000
XISO/IEC 10646:2000
X.TP
X.B "ISO-IR 10646 2000 UTF-8"
XISO/IEC 10646, UTF-8 encoding
X.TP
X.B BINARY
XNone
X.PP
XThis keyword is currently ignored by
X.BR star .
X.RE
X.TP
X.B comment
XAny number of characters that  should be treated as comment.
X.B Star
Xignores the comment as documented by the POSIX standard.
X.TP
X.B ctime
XThe time from
X.B st_ctime
Xin sub second granularity. 
X.B Star
Xcurrently supports a nanosecond granularity.
X.TP
X.B gid
XThe group ID of the group that owns the file.
XThe argument is a decimal number.
XThis field is used if the group ID of a file is greater than 2097151 (octal 7777777).
X.TP
X.B gname
XThe group name of the following file(s) coded in UTF-8 if the group name does not
Xfit into 32 characters or cannot be expressed in 7-Bit ASCII.
X.TP
X.B hdrcharset
XThe name of the character set used to encode the data for the
X.BR gname ,
X.BR linkpath ,
X.BR path " and
X.B uname
Xfields in the POSIX.1-2001 extended header records.
X.RS
X.PP
XThe following values are supported for
X.BR hdrcharset :
X.TP 25
X.B "ISO-IR 10646 2000 UTF-8"
XISO/IEC 10646, UTF-8 encoding
X.TP
X.B BINARY
XNone
X.PP
XThis keyword is currently ignored by
X.BR star .
X.RE
X.TP
X.B linkpath
XThe name of the 
X.I linkpath
Xcoded in UTF-8 if it is longer than 100 characters or cannot be expressed in 7-Bit ASCII.
X.TP
X.B mtime
XThe time from
X.B st_mtime
Xin sub second granularity. 
X.B Star
Xcurrently supports a nanosecond granularity.
X.TP
X.B path
XThe name of the 
X.I linkpath
Xcoded in UTF-8 if it does not fit into 100 characters + 155 characters prefix
Xor cannot be expressed in 7-Bit ASCII.
X.TP
X.BI realtime. any
XThe keywords prefixed by
X.B realtime.
Xare reserved for future standardization. 
X.TP
X.BI security. any
XThe keywords prefixed by
X.B security.
Xare reserved for future standardization. 
X.TP
X.B size
XThe size of the file as decimal number if the file size is greater than 8589934591 (octal 77777777777). 
XThe
X.B size
Xkeyword may not refer to the real file size but is related to the size if the file in the archive.
XSee also
X.B SCHILY.realsize
Xfor more information.
X.TP
X.B uid
XThe uid ID of the group that owns the file.
XThe argument is a decimal number.
XThis field is used if the uid ID of a file is greater than 2097151 (octal 7777777).
X.TP
X.B uname
XThe user name of the following file(s) coded in UTF-8 if the user name does not
Xfit into 32 characters or cannot be expressed in 7-Bit ASCII.
X.TP
X.IR VENDOR .keyword
XAny keyword that starts with a vendor name in capital letters is reserved 
Xfor vendor specific extensions
Xby the standard.
X.B Star
Xuses a lot of these vendor specific extension. See below for more informations.
X.SH "SCHILY PAX EXTENSION KEYWORDS
X.B Star
Xuses own vendor specific extensions. The
X.B SCHILY
Xvendor specific extended
X.B pax
Xheader keywords are:
X.TP
X.B SCHILY.acl.access
XThe ACL for a file.
X.sp
XSince no official backup format for POSIX access control lists has been defined,
X.B star
Xuses the vendor defined attributes
X.B SCHILY.acl.access
Xand
X.B SCHILY.acl.default
Xfor storing the
X.B ACL 
Xand 
X.B "Default ACL
Xof a file, respectively.
XThe access control lists are stored in the short text form as defined in
X.BR "POSIX 1003.1e draft standard 17" .
X.sp
XNote that the POSIX 1003.1e draft has been withdrawn in 1997 but some 
Xoperating systems still support it with some filesystems.
X.sp
XTo each named user 
X.B ACL
Xentry a fourth colon separated field field containing the
X.I "user identifier (UID)
Xof the associated user is appended.
XTo each named group entry a fourth colon separated field containing the
X.I "group identifier (GID)
Xof the associated group is appended.
X(POSIX 1003.1e draft standard 17 allows to add fields to ACL entries.) 
X.sp
X.ne 7
XThis is an example of the format used for
X.B SCHILY.acl.access
X(a space has been inserted after the equal sign and lines are broken
X[marked with '\e' ] for readability, additional fields in bold):
X.sp
X.nf
XSCHILY.acl.access= user::rwx,user:lisa:r\-x:\fB502\fP,\ \e
X                   group::r\-x,group:toolies:rwx:\fB102\fP,\ \e
X                   mask::rwx,other::r\-\-x
X.fi
X.sp
XThe numerical user and group identifiers are essential when restoring a system completely
Xfrom a backup, as initially the name-to-identifier mappings may not be available,
Xand then file ownership restoration would not work.
X.sp
XAs the archive format that is used for backing up access control lists is compatible
Xwith the
X.B pax
Xarchive format, archives created that way can be restored by
X.B star
Xor a POSIX.1-2001 compliant
X.BR pax .
XNote that programs other than
X.B star
Xwill ignore the ACL information.
X.TP
X.B SCHILY.acl.default
XThe default ACL for a file. See 
X.B SCHILY.acl.access
Xfor more information.
X.sp
XThis is an example of the format used for
X.B SCHILY.acl.default
X(a space has been inserted after the equal sign and lines are broken
X[marked with '\e' ] for readability, additional fields in bold):
X.sp
X.nf
XSCHILY.acl.default= user::rwx,user:lisa:r-x:\fB502\fP,\ \e
X                    group::r-x,mask::r-x,other::r-x
X.fi
X.TP
X.B SCHILY.acl.type
XThe ACL type used for coding access control lists.
X.sp
XThe following ACL types are possible:
X.RS
X.TP
X.B "POSIX\ draft"
XACLs as defined in
X.BR "POSIX 1003.1e draft standard 17" .
X.TP
X.B NFSv4
XACLs as used by
X.BR NFSv4 ,
X.B NTFS
Xand
X.BR ZFS .
X.RE
X.sp
X.B Star
Xcurrently only implements
X.B "POSIX\ draft"
XACLs.
XIf the
X.B SCHILY.acl.type
Xkeyword is missing,
X.B "POSIX\ draft"
XACLs are asumed.
X.TP
X.B SCHILY.ddev
XThe device ids for names used is the
X.B SCHILY.dir
Xdump directory list from
X.B st_dev
Xof the file as decimal number.
XThe
X.B SCHILY.ddev
Xkeyword is followed by a space separated list of device id numbers. Each corresponds
Xexactly to a name in the list found in
X.BR SCHILY.dir .
XIf a specific device id number is repeated, a comma (,) without a following space may be
Xuse to denote that the current device id number is identical to the previous number.
XThis keyword is used in
X.B dump
Xmode.
XThis keyword is not yet implemented.
X.sp
XThe value is a signed int.
XAn implementation should be able to handle at least 64 bit values.
XNote that the value is signed because POSIX does not specify
Xmore than the type should be an int.
X.TP
X.B SCHILY.dev
XThe device id from
X.B st_dev
Xof the file as decimal number.
XThis keyword is used in
X.B dump
Xmode.
X.sp
XThe value is a signed int.
XAn implementation should be able to handle at least 64 bit values.
XNote that the value is signed because POSIX does not specify
Xmore than the type should be an int.
X.TP
X.B SCHILY.devmajor
XThe device major number of the file if it is a character or block special file.
XThe argument is a decimal number.
XThis field is used if the device major of the file is greater than 2097151 (octal 7777777).
X.sp
XThe value is a signed int.
XAn implementation should be able to handle at least 64 bit values.
XNote that the value is signed because POSIX does not specify
Xmore than the type should be an int.
X.TP
X.B SCHILY.devminor
XThe device minor number of the file if it is a character or block special file.
XThe argument is a decimal number.
XThis field is used if the device minor of the file is greater than 2097151 (octal 7777777).
X.sp
XThe value is a signed int.
XAn implementation should be able to handle at least 64 bit values.
XNote that the value is signed because POSIX does not specify
Xmore than the type should be an int.
X.TP
X.B SCHILY.dino
XThe inode numbers for names used is the
X.B SCHILY.dir
Xdump directory list from
X.B st_ino
Xof the file as decimal number.
XThe
X.B SCHILY.dino
Xkeyword is followed by a space separated list of inode numbers. Each corresponds
Xexactly to a name in the list found in
X.BR SCHILY.dir .
XThis keyword is used in
X.B dump
Xmode.
X.sp
XThe values are unsigned int.
XAn implementation should be able to handle at least 64 bit unsigned values.
X.TP
X.B SCHILY.dir
XA list of filenames (the content) for the current directory.
XThe names are coded in UTF-8.
XEach file name is prefixed by a single character that is used as a flag.
XEach file name is limited by a null character.
XThe null character is directly followed
Xby he flag character for the next file name in case the list is not terminated
Xby the current file name.
XThe flag character must not be a null character.
XBy default, a ^A (octal 001) is used.
XThe following flags are defined:
X.RS
X.TP
X.B \e000
XThis is the list terminator character - the second null byte, see below.
X.TP
X.B ^A
XThe default flag that is used in case the 
X.B "dump dir
Xfeatures have not been active.
X.TP
X.B Y
XA non directory file that is in the current (incremental) dump.
X.TP
X.B N
XA non directory file that is not in the current (incremental) dump.
X.TP
X.B D
XA directory that is in the current (incremental) dump.
X.TP
X.B d
XA directory that is not in the current (incremental) dump.
X.PP
XThe list is terminated by two successive null bytes.
XThe first is the null byte for the last file name.
XThe second null byte is at the position where a flag character
Xwould be expected, it acts ad a list terminator. The length
Xtag for the 
X.B SCHILY.dir
Xdata includes both null bytes.
X.PP
XIf a dump mode has been selected that writes
Xcompact complete directory information to the beginning of 
Xthe archive, the flag character may contain values different
Xfrom ^A.
X.B Star
Ximplementations at least up to
X.B star-1.5.1
Xdo not use the feature to tag entries and use the default
Xentry \e001 (^A) for all files.
XTar implementations that like to read archives that use the
X.B SCHILY.dir
Xkeyword, shall not rely on values other than \e000 (^@) or \e001 (^A).
X.PP
XThis keyword is used in
X.B dump
Xmode.
X.RE
X.TP
X.B SCHILY.fflags
XA textual version of the BSD or Linux extended file flags.
X.sp
XThe following flags are defined by star:
X.RS
X.TP 15
X.B arch
Xset the archived flag (super-user only).
X.TP
Xarchived
XAlias for
X.BR arch .
X.TP
X.B nodump
Xset the nodump flag (owner or super-user).
X.TP
X.B opaque
Xset the opaque flag (owner or super-user).
X.TP
X.B sappnd
Xset the system append-only flag (super-user only).
X.TP
Xsappend
XAlias for
X.BR sappnd .
X.TP
X.B schg
Xset the system immutable flag (super-user only).
X.TP
Xschange
XAlias for
X.BR schg .
X.TP
Xsimmutable
XAlias for
X.BR schg .
X.TP
X.B sunlnk
Xset the system undeletable flag (super-user only).
X.TP
Xsunlink
XAlias for
X.BR sunlnk .
X.TP
X.B uappnd
Xset the user append-only flag (owner or super-user).
X.TP
Xuappend
XAlias for
X.BR uappnd .
X.TP
X.B uchg
Xset the user immutable flag (owner or super-user).
X.TP
Xuchange
XAlias for
X.BR uchg .
X.TP
Xuimmutable
XAlias for
X.BR uchg .
X.TP
X.B uunlnk
Xset the user undeletable flag (owner or super-user).
X.TP
Xuunlink
XAlias for
X.BR uunlnk .
X.br
X.ne 4
X.LP
XThe following flags are only available on Linux:
X.TP 15
X.B compress
XSet the Linux ext3 journal data flag (owner or super-user).
X.TP
X.B journal-data
XSet the Linux ext3 journal data flag (super-user only).
X.TP
X.B noatime
XSet the Linux ext3 no access time flag (owner or super-user).
X.TP
X.B secdel
XSet the Linux ext3 secure deletion (purge before delete) flag (owner or super-user).
X.TP
X.B sync
XSet the Linux ext3 sync flag (owner or super-user).
X.TP
X.B undel
XSet the Linux ext3 "allow unrm" flag (owner or super-user).
X.RE
X.TP
X.B SCHILY.filetype
XA textual version of the real file type of the file.
XThe following names are used:
X.RS
X.TP 24
X.B unallocated
XAn unknown file type that may be a result of a
X.BR unlink (2)
Xoperation.
XThis should never happen.
X.TP
X.B regular
XA regular file.
X.TP
X.B contiguous
XA contiguous file. On operating systems or file systems that don't support
Xthis file type, it is handled like a regular file.
X.TP
X.B symlink
XA symbolic link to any file type.
X.TP
X.B directory
XA directory.
X.TP
X.B "character special"
XA character special file.
X.TP
X.B "block special"
XA block special file.
X.TP
X.B fifo
XA named pipe.
X.TP
X.B socket
XA UNIX domain socket.
X.TP
X.B "mpx character special"
XA multiplexed character special file.
X.TP
X.B "mpx block special"
XA multiplexed block special file.
X.TP
X.B "XENIX nsem"
XA XENIX named semaphore.
X.TP
X.B "XENIX nshd"
XXENIX shared data.
X.TP
X.B door
XA Solaris door.
X.TP
X.B eventcount
XA UNOS event count.
X.TP
X.B whiteout
XA BSD whiteout directory entry.
X.TP
X.B sparse
XA sparse regular file.
X.TP
X.B volheader
XA volume header.
X.TP
X.B "unknown/bad"
XAny other unknown file type.
XThis should never happen.
X
X.RE
X.TP
X.B SCHILY.ino
XThe inode number from
X.B st_ino
Xof the file as decimal number.
XThis keyword is used in
X.B dump
Xmode.
X.sp
XThe value is an unsigned int.
XAn implementation should be able to handle at least 64 bit unsigned values.
X.TP
X.B SCHILY.nlink
XThe link count of the file as decimal number.
XThis keyword is used in
X.B dump
Xmode.
X.sp
XThe value is an unsigned int.
XAn implementation should be able to handle at least 32 bit unsigned values.
X.TP
X.B SCHILY.offset
XThe 
X.B offset
Xvalue for a multi volume continuation header.
XThis keyword is used with multi volume continuation headers.
XMulti volume continuation headers are used to allow to start reading
Xa multi volume archive past the first volume.
X.sp
X.B SCHILY.offset
Xspecifies the byte offset within a file that was split across volumes
Xas a result of a multi volume media change operation.
X.sp
XThe value is an unsigned int.
XAn implementation should be able to handle at least 64 bit unsigned values.
X.TP
X.B SCHILY.realsize
XThe real size of the file as decimal number.
XThis keyword is used if the real size of the file differs from the
Xvisible size of the file in the archive.
XThe real file size differs from the size in the archive if the
Xfile type is
X.B sparse
Xor if the file is a continuation file on a multi volume archive.
XIn case the
X.B SCHILY.realsize
Xkeyword is needed, it must be past any 
X.B size
Xkeyword in case a
X.B size
Xkeyword is also present.
X.sp
XAs sparse files allocate less space on tape than a regular file and as a
Xcontinued file that started on a previous volume only holds parts of the
Xfile, the
X.B SCHILY.realsize
Xkeyword holds a bigger number than the
X.B size
Xkeyword.
X.sp
XThe value is an unsigned int.
XAn implementation should be able to handle at least 64 bit unsigned values.
X.TP
X.B SCHILY.tarfiletype
XThe following additional file types are used in
X.BR SCHILY.tarfiletype :
X.RS
X.TP
X.B hardlink
XA hard link to any file type.
X.TP
X.B dumpdir
XA directory with dump entries
X.TP
X.B "multivol continuation"
XA multi volume continuation for any file type.
X.TP
X.B meta
XA meta entry (inode meta data only) for any file type.
X.RE
X.TP
X.BI SCHILY.xattr. attr
XA POSIX.1-2001 coded version of the Linux extended file attributes.
XLinux extended file attributes are name/value pairs. Every
Xattribute 
X.I name
Xresults in a
X.BI SCHILY.xattr. name
Xtag and the value of the extended attribute is used as the value of the
XPOSIX.1-2001 header tag.
XNote that this way of coding is not portable across platforms.
XA version for BSD may be created but Solaris includes far more
Xfeatures with extended attribute files than Linux does.
X.sp
XA future version of
X.B star
Xwill implement a similar method as the 
X.B tar
Xprogram on Solaris currently uses. When this implementation is ready,
Xthe
X.BI SCHILY.xattr. name
Xfeature may be removed in favor of a truly portable implementation
Xthat supports Solaris also.
X
X.SH "SCHILY 'G'LOBAL PAX EXTENSION KEYWORDS
XThe following 
X.B star
Xvendor unique extensions may only appear in
X.B "'g'lobal
Xextended
X.B pax
Xheaders:
X.TP
X.B SCHILY.archtype
XThe textual version of the archive type used.
XThe textual values used for
X.B SCHILY.archtype
Xare the same names that are used in the 
X.B star
Xcommand line options to set up a specific archive type.
X.sp
XThe following values may currently appear in a global extended header:
X.RS
X.TP 15
X.B xustar
X\&'xstar' format without "tar" signature at header offset 508.
X.TP
X.B exustar
X\&'xustar' format variant that always includes x-headers and g-headers.
X.LP
XA complete tar implementation must be prepared to handle all archives names
Xas documented in
X.BR star (1).
X.LP
XIn order to allow archive type recognition from this keyword,
Xthe minimum tape block size must be 2x512 bytes (1024 bytes)
Xand the 
X.B SCHILY.archtype
Xkeyword needs to be in the first 512 bytes of the content of the
Xfirst
X.B "'g'lobal pax
Xheader. Then the first tape block may be scanned to recognize
Xthe archive type.
X.RE
X.TP
X.B SCHILY.release
XThe textual version of the
X.B star
Xversion string and the platform name where this
X.B star
Xhas been compiled.
XThe same text appears when calling
X.IR "star -version" .
X.sp
XOther implementations may use a version string that does not start with
Xthe text
X.BR star .
X.TP
X.B SCHILY.volhdr.blockoff
XThis keyword is used for multi volume archives.
XIt represents the offset within the whole archive expressed
Xin 512 byte units.
X.sp
XThe value is an unsigned int with a valid range between 1 and
Xinfinity. An implementation should be able to handle at least 64 bit
Xunsigned values.
X.TP
X.B SCHILY.volhdr.blocksize
XThe tape blocksize expressed in 512 byte units that was used
Xwhen writing the archive.
X.sp
XThe value is an unsigned int with a valid range between 1 and
Xinfinity. An implementation should be able to handle at least 31 bit
Xunsigned values.
X.TP
X.B SCHILY.volhdr.cwd
XThis keyword is used in dump mode.
XIt is only emitted in case the
X.B "fs\-name=
Xoption of star was used to overwrite the
X.B SCHILY.volhdr.filesys
Xvalue.
XIf
X.B SCHILY.volhdr.cwd
Xis present, it contains the real backup working directory.
X.sp
XOverwriting
X.B SCHILY.volhdr.filesys
Xis needed when backups are run on file system snapshots rather
Xthan on the real file system.
X.TP
X.B SCHILY.volhdr.device
XThis keyword is used in dump mode.
XIt represents the name of the device that holds the file system
Xdata. For disk based file systems, this is the device name of the
Xmounted device.
X.sp
XThis keyword is optional. It helps to correctly identify the
Xfile system from which this dump has been made.
X.TP
X.B SCHILY.volhdr.dumpdate
XThis keyword is used in dump mode.
XIt represents the time the current dump did start.
X.TP
X.B SCHILY.volhdr.dumplevel
XThis keyword is used in dump mode.
XIt represents the level of the current dump.
XDump levels are small numbers, the lowest possible number is 0.
XDump level 0 represents a full backup.
XDump level 1 represents a backup that contains all changes that
Xdid occur since the last level 0 dump.
XDump level 2 represents a backup that contains all changes that
Xdid occur since the last level 1 dump.
X.B Star
Xdoes not specify a maximum allowed dump level but you should try
Xto keep the numbers less than 100.
X.sp
XThe value is an unsigned int with a valid range between 0 and at least 100.
X.TP
X.B SCHILY.volhdr.dumptype
XThis keyword is used in dump mode.
XIf the dump is a complete dump of a file system
X(i.e. no files are excluded via command line), then the argument
Xis the text
X.BR full ,
Xelse the argument is the text
X.BR partial .
X.TP
X.B SCHILY.volhdr.filesys
XThis keyword is used in dump mode.
XIt represents the top level directory for the file system from
Xwhich this dump has been made.
XIf the dump represents a dump that has an associated level, then
Xthe this directory needs to be identical to the root directory
Xof this file system which is the mount point.
X.TP
X.B SCHILY.volhdr.hostname
XThis keyword is used in dump mode.
XThe value is retrieved from
X.B gethostname(3)
Xor
X.BR uname(2) .
X.TP
X.B SCHILY.volhdr.label
XThe textual volume label.
XThe volume label must be identical within a set of
Xmulti volume archives.
X.TP
X.B SCHILY.volhdr.refdate
XThis keyword is used in dump mode if the current dump is an
Xincremental dump with a level > 0.
XIt represents the time the related dump did start.
X.TP
X.B SCHILY.volhdr.reflevel
XThis keyword is used in dump mode if the current dump is an
Xincremental dump with a level > 0.
XIt represents the level of the related dump.
XThe related dump is the last dump with a level that is lower
Xthat the level of this dump.
XIf a dump with the level of the current dump \-1 exists, then
Xthis is the related dump level. Otherwise, the dump level is
Xdecremented until a valid dump level could be found in the
Xdump database.
X.sp
XThe value is an unsigned int with a valid range between 0 and at least 100.
X.TP
X.B SCHILY.volhdr.tapesize
XThis keyword is used for multi volume archives and may be used
Xto verify the volume size on read back.
XIt represents the tape size expressed in 512 byte units.
XThis keyword is set in multi volume mode if the size of the tape
Xwas not autodetected but set from a command line option.
X.sp
XThe value is an unsigned int with a valid range between 1 and
Xinfinity. An implementation should be able to handle at least 64 bit
Xunsigned values.
X.TP
X.B SCHILY.volhdr.volume
XThis keyword is used for multi volume archives.
XIt represents the volume number within a volume set.
XThe number used for the first volume is 1.
X.sp
XThe value is an unsigned int with a valid range between 1 and
Xinfinity. An implementation should be able to handle at least 31 bit
Xunsigned values.
X.SH "MULTI VOLUME ARCHIVE HANDLING
X.PP
XTo be documented in the future.
X.SH "SEE ALSO"
X.SH NOTES
X.SH BUGS
X.SH AUTHOR
END-of-star-1.5.2/star/star.4
echo x - star-1.5.2/star/pax.c
sed 's/^X//' >star-1.5.2/star/pax.c << 'END-of-star-1.5.2/star/pax.c'
X/* @(#)pax.c	1.28 11/04/16 Copyright 1989, 2003-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	const char _p_sccsid[] =
X	"@(#)pax.c	1.28 11/04/16 Copyright 1989, 2003-2011 J. Schilling";
X#endif
X/*
X *	PAX specific routines for star main program.
X *
X *	Copyright (c) 1989, 2003-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifdef	STAR_MAIN
X/*
X * We have been included from star.c
X */
X#define	opts		pax_opts
X#define	_opts		_pax_opts
X#define	gargs		pax_gargs
X#define	susage		pax_susage
X#define	usage		pax_usage
X#define	xusage		pax_xusage
X#else
X#define	NO_STAR_MAIN
X#define	PAX_MAIN
X#define	PTYPE_DEFAULT	P_PAX
X
X#include "star.c"
X#endif
X
XLOCAL	void	gargs		__PR((int ac, char *const *av));
XLOCAL	void	susage		__PR((int ret));
XLOCAL	void	usage		__PR((int ret));
XLOCAL	void	xusage		__PR((int ret));
X#ifdef	STAR_MAIN
XLOCAL	void	pax_setopts	__PR((char *o));
X#endif
X
X/*
X *	-r	Read					tar x
X *	-w	Write					tar c
X *	-a	Append -w -a				tar r
X *		Update -w -a -u				tar u
X *
X *	-b	Blocksize in Bytes
X *	-c	Invert match for pattern and files
X *	-d	Do not descend dirs
X *	-f	Archive File
X *	-i	Interactive Rename
X *	-k	Noklobber
X *	-l	Create hard links in copy mode
X *	-n	Select first archive member per pattern only
X *	-o	Future Options
X *	-p	Privilleges:
X *		e	everything
X *		a	Do NOT preserve access	time
X *		m	Do NOT preserve mod	time
X *		o	Preserve UID/GID
X *		p	Preserve perm
X *	-s	Substitution
X *	-t	Reset access time
X *	-u	Gegenteil von -U
X *	-v	List Verbose
X *	-x	Archive Format
X *	-X	Wie star -M
X *
X *	-H	SUSv3
X *	-L	SUSv3
X */
X
X/*
X * PAX related options
X *
X * The official POSIX options start after the -bz/-lzo/-7z/-xz/-lzip option.
X */
X/* BEGIN CSTYLED */
Xchar	_opts[] = "help,xhelp,version,debug,xdebug#,xd#,time,no-statistics,do-statistics,fifostats,numeric,no-fifo,no-fsync,bs&,fs&,/,..,secure-links,acl,xfflags,z,bz,lzo,7z,xz,lzip,r,w,a,b&,c,d,f&,H,i,k,L,l,n,o*,p&,s&,t,u,v+,x&,artype&,X";
X/* END CSTYLED */
Xchar	*opts = _opts;
X
XLOCAL	void	pax_info	__PR((void));
X
XLOCAL void
Xgargs(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int	files	 = 0;
X	BOOL	help	 = FALSE;
X	BOOL	xhelp	 = FALSE;
X	BOOL	prvers	 = FALSE;
X	BOOL	no_fifo	 = FALSE;
X	BOOL	paxrflag = FALSE;
X	BOOL	paxwflag = FALSE;
X	BOOL	paxaflag = FALSE;
X	BOOL	paxtflag = FALSE;
X	BOOL	paxdflag = FALSE;
X	BOOL	paxiflag = FALSE;
X	BOOL	paxlflag = FALSE;
X	char	*paxopts = NULL;
X	BOOL	paxuflag = FALSE;
X	BOOL	do_stats = FALSE;
X
X	/*
X	 * Current default archive format in all other cases is USTAR.
X	 * We may change this to PAX in the future.
X	 */
X	hdrtype = H_USTAR;
X#ifdef	STAR_MAIN
X	pax_setopts(opts);			/* set up opts for getfiles */
X#endif
X
X	iftype		= I_PAX;		/* command line interface */
X	ptype		= P_PAX;		/* program interface type */
X	paxls		= TRUE;
X	paxmatch	= TRUE;
X	nopflag		= TRUE;			/* pax default */
X	no_stats	= TRUE;			/* -no-statitstics	   */
X
X	--ac, ++av;
X	files = getfilecount(ac, av, opts);
X	if (getallargs(&ac, &av, opts,
X				&help, &xhelp, &prvers, &debug, &xdebug, &xdebug,
X#ifndef	__old__lint
X				&showtime, &no_stats, & do_stats, &do_fifostats,
X				&numeric,  &no_fifo, &no_fsync,
X				getnum, &bs,
X				getnum, &fs,
X				&abs_path, &allow_dotdot, &secure_links,
X				&doacl, &dofflags,
X				&zflag, &bzflag, &lzoflag,
X				&p7zflag, &xzflag, &lzipflag,
X				&paxrflag,
X				&paxwflag,
X				&paxaflag,
X				getnum, &bs,
X				&notarg,		/* -c */
X				&paxdflag,		/* -d */
X				addtarfile, NULL,	/* -f */
X				&paxHflag,		/* -H */
X				&paxiflag,		/* -i */
X				&keep_old,		/* -k */
X				&paxfollow,		/* -L */
X				&paxlflag,		/* -l */
X				&paxnflag,		/* -n */
X				&paxopts,		/* -o */
X				getpriv, NULL,		/* -p */
X				parsesubst, &do_subst,	/* -s */
X				&paxtflag,		/* -t */
X				&paxuflag,		/* -u */
X				&verbose,		/* -v */
X				gethdr, &chdrtype,	/* -x */
X				gethdr, &chdrtype,	/* artype= */
X#endif /* __old__lint */
X				nomount) < 0) {
X		errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
X		susage(EX_BAD);
X	}
X	star_helpvers("spax", help, xhelp, prvers);
X
X	if (!paxrflag && !paxwflag) {
X		tflag = TRUE;
X	} else if (paxrflag && paxwflag) {
X		copyflag = TRUE;
X		if (files == 1)
X			listfile = "-";
X	} else if (paxwflag && paxaflag) {
X		if (paxuflag)
X			uflag = TRUE;
X		else
X			rflag = TRUE;
X	} else if (paxwflag) {
X		cflag = TRUE;
X		if (files == 0)
X			listfile = "-";
X	} else {
X		xflag = TRUE;
X	}
X
X	if ((cflag || uflag || rflag || copyflag) && paxtflag)
X		acctime = TRUE;
X
X	if (paxdflag) {
X		/* XXX nodesc aber mit pattern match bei extract */
X		nodesc = TRUE;
X	}
X	if (paxiflag) {
X		interactive = TRUE;
X		paxinteract = TRUE;
X	}
X	if (paxlflag) {
X		/* link bei -copy */
X		errmsgno(EX_BAD, "Unsupported option -l.\n");
X		susage(EX_BAD);
X	}
X	if (paxopts) {
X		/* Unsupported in UNIX-98 */
X		errmsgno(EX_BAD, "SUSv2 / UNIX-98 does not specify any option for -o.\n");
X		susage(EX_BAD);
X	}
X	uncond = !paxuflag;
X
X	if (do_stats)
X		no_stats = FALSE;
X
X	star_checkopts(/* oldtar */ FALSE, /* dodesc */ TRUE,
X				/* usetape */ FALSE,
X				/* archive */ -1, no_fifo, /* llbs */ 0);
X
X	nolinkerr = FALSE;
X}
X
XLOCAL void
Xpax_info()
X{
X	error("\nFor a more complete user interface use the tar type command interface.\n");
X	error("See 'man star'. The %s command is more or less limited to the\n", get_progname());
X	error("POSIX standard pax command line interface.\n");
X}
X
X/*
X * Short usage
X */
XLOCAL void
Xsusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("\nUse\t%s -help\n", get_progname());
X	error("and\t%s -xhelp\n", get_progname());
X	error("to get a list of valid cmds and options.\n");
X	error("\nUse\t%s -x help\n", get_progname());
X	error("to get a list of valid archive header formats.\n");
X	pax_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Cmd:\n");
X	error("\t<none>\t\tlist named files from tape\n");
X	error("\t-r\t\textract named files from tape\n");
X	error("\t-w\t\twrite archive with named files to tape\n");
X	error("\t-w -a\t\tupdate/replace named files to tape\n");
X	error("\t-r -w\t\tcopy named files to destination directory\n");
X	error("Options:\n");
X	error("\t-help\t\t(*) print this help\n");
X	error("\t-xhelp\t\t(*) print extended help\n");
X	error("\t-version\t(*) print version information and exit\n");
X	error("\t-b #\t\tset blocking factor to # Bytes (default 10240)\n");
X	error("\t-c\t\tinvert matching rules\n");
X	error("\t-d\t\tdo not descend directories\n");
X	error("\t-f nm\t\tuse 'nm' as tape instead of stdin/stdout\n");
X	error("\t-i\t\tdo interactive creation/extraction/renaming\n");
X	error("\t-k\t\tkeep existing files\n");
X	error("\t-l\t\tlink files rather than copying them\n");
X	error("\t-n\t\tone match per pattern only\n");
X	error("\t-o\t\toptions (none specified with SUSv2 / UNIX-98)\n");
X	error("\t-p string\tset privileges\n");
X	error("\t-s replstr\tApply ed like pattern substitution -s /old/new/gp on filenames\n");
X	error("\t-t\t\tTIME\n");
X	error("\t-u\t\treplace/restore files only if they are newer\n");
X	error("\t-v\t\tincrement verbose level\n");
X	error("\t-x header\tgenerate 'header' type archive (see -x help)\n");
X	error("\tartype=header\t(*) generate 'header' type archive (see artype=help)\n");
X	error("\t-X\t\tdo not descend mounting points\n");
X	error("\t-z\t\t(*) pipe input/output through gzip, does not work on tapes\n");
X	error("\t-bz\t\t(*) pipe input/output through bzip2, does not work on tapes\n");
X	error("\t-lzo\t\t(*) pipe input/output through lzop, does not work on tapes\n");
X	error("\t-7z\t\t(*) pipe input/output through p7zip, does not work on tapes\n");
X	error("\t-xz\t\t(*) pipe input/output through xz, does not work on tapes\n");
X	error("\t-lzip\t\t(*) pipe input/output through lzip, does not work on tapes\n");
X#ifdef	FIFO
X	error("\t-no-fifo\t(*) don't use a fifo to optimize data flow from/to tape\n");
X#endif
X	error("\nAll options marked with (*) are not defined by POSIX.\n");
X	pax_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xxusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Extended options:\n");
X	error("\t-debug\t\tprint additional debug messages\n");
X	error("\txdebug=#,xd=#\tset extended debug level\n");
X	error("\t-/\t\tdon't strip leading '/'s from file names\n");
X	error("\t-..\t\tdon't skip filenames that contain '..' in non-interactive extract\n");
X	error("\t-secure-links\tdon't extract links that start with '/' or contain '..'\n");
X	error("\t-acl\t\thandle access control lists\n");
X	error("\t-xfflags\thandle extended file flags\n");
X	error("\tbs=#\t\tset (output) block size to #\n");
X#ifdef	FIFO
X	error("\tfs=#\t\tset fifo size to #\n");
X#endif
X	error("\t-no-fsync\tdo not call fsync() for each extracted file (may be dangerous)\n");
X	error("\t-time\t\tprint timing info\n");
X	error("\t-no-statistics\tdo not print statistics\n");
X	error("\t-do-statistics\tprint statistics\n");
X#ifdef	FIFO
X	error("\t-fifostats\tprint fifo statistics\n");
X#endif
X	error("\t-numeric\tdon't use user/group name from tape\n");
X	error("\nAll options above are not defined by POSIX.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
X#ifdef	STAR_MAIN
X#undef	opts
X#undef	_opts
X#undef	gargs
X#undef	susage
X#undef	usage
X#undef	xusage
X
XLOCAL void
Xpax_setopts(o)
X	char	*o;
X{
Xextern	char	*opts;
X	opts = o;
X}
X#endif
END-of-star-1.5.2/star/pax.c
echo x - star-1.5.2/star/props.c
sed 's/^X//' >star-1.5.2/star/props.c << 'END-of-star-1.5.2/star/props.c'
X/* @(#)props.c	1.56 12/12/04 Copyright 1994-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)props.c	1.56 12/12/04 Copyright 1994-2011 J. Schilling";
X#endif
X/*
X *	Set up properties for different archive types
X *
X *	NOTE that part of the information in struct propertiesis available more
X *	than once. This is needed as different parts of the source need the
X *	information in different ways. Partly for performance reasons, partly
X *	because one method of storing the information is inappropriate for all
X *	places in the source.
X *
X *	If you add new features or information related to the fields
X *	pr_flags/pr_nflags or the fields pr_xftypetab[]/pr_typeflagtab[]
X *	take care of possible problems due to this fact.
X *
X *	Copyright (c) 1994-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include "diff.h"
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include "starsubs.h"
X
Xextern	BOOL	debug;
Xextern	BOOL	dodump;
X
Xstruct properties props;
X
XEXPORT	void	setprops	__PR((long htype));
XEXPORT	void	printprops	__PR((void));
XLOCAL	void	prsettypeflags	__PR((char *types, int typeflag));
X
XEXPORT void
Xsetprops(htype)
X	long	htype;
X{
X	fillbytes(props.pr_typeflagtab, sizeof (props.pr_typeflagtab), '\0');
X
X	switch (H_TYPE(htype)) {
X
X	case H_STAR:				/* Old star format (1985)    */
X		props.pr_maxsize = 0;
X		props.pr_hdrsize = TAR_HDRSZ;
X		props.pr_flags = PR_LOCAL_STAR|PR_SPARSE|PR_VOLHDR|PR_BASE256;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = ' ';		/* Use old tar octal format  */
X		props.pr_xc    = 'x';		/* Use POSIX.1-2001 x-hdr    */
X		props.pr_pad   = 0;
X		props.pr_diffmask = 0L;
X		props.pr_nflags =
X			PR_POSIX_SPLIT|PR_PREFIX_REUSED|PR_LONG_NAMES;
X		props.pr_maxnamelen =  PATH_MAX;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ;
X		props.pr_maxslname =   NAMSIZ;
X		props.pr_maxprefix =   PFXSIZ;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * The STAR format extensions from 1986 archive nearly any UNIX file type
X		 */
X		movebytes(xtstar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X
X		/*
X		 * The STAR format is pre-POSIX but supports many POSIX/GNU
X		 * extensions.
X		 */
X		prsettypeflags("01234567gxIKLMSV", TF_VALIDTYPE);
X		prsettypeflags("gxKL",		   TF_XHEADERS);
X		break;
X
X	case H_XSTAR:				/* ext P-1988 format (1994)  */
X	case H_XUSTAR:				/* ext ^ no "tar" sig (1998) */
X	case H_EXUSTAR:				/* ext P-2001 format (2001)  */
X		props.pr_maxsize = 0;
X		props.pr_hdrsize = TAR_HDRSZ;
X		props.pr_flags =
X			PR_POSIX_OCTAL|PR_LOCAL_STAR|PR_SPARSE|
X			PR_MULTIVOL|PR_VOLHDR|PR_BASE256;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		if (H_TYPE(htype) == H_XUSTAR || H_TYPE(htype) == H_EXUSTAR) {
X			props.pr_flags |= (PR_XHDR|PR_VU_XHDR);
X			props.pr_xhmask = ~0;
X		}
X		if (H_TYPE(htype) == H_EXUSTAR) {
X			props.pr_flags |= PR_LINK_DATA;
X			props.pr_xhdflags |= (XF_ATIME|XF_CTIME|XF_MTIME);
X		}
X		props.pr_fillc = '0';		/* Use ustar octal format    */
X		props.pr_xc    = 'x';		/* Use POSIX.1-2001 x-hdr    */
X		props.pr_pad   = 0;
X		props.pr_diffmask = 0L;
X		props.pr_nflags =
X			PR_POSIX_SPLIT|PR_PREFIX_REUSED|PR_LONG_NAMES;
X		props.pr_maxnamelen =  PATH_MAX;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ;
X		props.pr_maxslname =   NAMSIZ;
X		props.pr_maxprefix =   130;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * As long as we don't support the POSIX.1-2001 speudo 'x' file
X		 * We can only archive file types from the USTAR list and
X		 * sparse files as well as
X		 * meta files (regular files without archived content).
X		 */
X		movebytes(xtustar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X		props.pr_xftypetab[XT_SPARSE] = 1;
X		props.pr_xftypetab[XT_META] = 1;
X
X		/*
X		 * Extended PAX format may allow more filetypes in a vendor
X		 * unique extension of the POSIX.1-2001 extended headers.
X		 * XXX As we currently only add the SCHILY.filetype headers
X		 * XXX if -dump has been specified, we can only allow more
X		 * XXX filetypes in this case.
X		 */
X		if (dodump && H_TYPE(htype) == H_EXUSTAR)
X			movebytes(xtexustar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X
X		/*
X		 * The X-STAR format family is POSIX with extensions.
X		 */
X		prsettypeflags("01234567gxIKLMSV", TF_VALIDTYPE);
X		prsettypeflags("gxKL",		   TF_XHEADERS);
X		break;
X
X	case H_PAX:				/* ieee 1003.1-2001 ext ustar */
X	case H_USTAR:				/* ieee 1003.1-1988 ustar    */
X	case H_SUNTAR:				/* Sun's tar from Solaris 7-9 */
X		props.pr_maxsize = MAXOCTAL11;
X		props.pr_hdrsize = TAR_HDRSZ;
X		props.pr_flags = PR_POSIX_OCTAL;
X		if (H_TYPE(htype) == H_PAX || H_TYPE(htype) == H_SUNTAR) {
X			props.pr_maxsize = 0;
X			props.pr_flags |= PR_XHDR;
X		}
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		if (H_TYPE(htype) == H_PAX)
X			props.pr_xhmask = XF_POSIX;
X		props.pr_fillc = '0';		/* Use ustar octal format    */
X		props.pr_xc    = 'x';		/* Use POSIX.1-2001 x-hdr    */
X		props.pr_pad   = 0;
X		if (H_TYPE(htype) == H_SUNTAR) {
X			props.pr_flags |= PR_VU_XHDR;
X			props.pr_xhdflags = XF_MTIME;
X			props.pr_xhmask =   XF_MTIME|XF_UID|XF_UNAME|
X					    XF_GID|XF_GNAME|
X					    XF_PATH|XF_LINKPATH|
X					    XF_SIZE|XF_DEVMAJOR|XF_DEVMINOR;
X			props.pr_xc    = 'X';	/* Use Sun Solaris  X-hdr    */
X		}
X		props.pr_diffmask = (D_SPARS|D_ATIME|D_CTIME);
X		if (H_TYPE(htype) == H_PAX) {
X			props.pr_diffmask = 0L;
X		}
X		props.pr_nflags = PR_POSIX_SPLIT;
X		props.pr_maxnamelen =  NAMSIZ + 1 + PFXSIZ;	/* 256 */
X		props.pr_maxlnamelen = NAMSIZ;
X		if (H_TYPE(htype) == H_PAX || H_TYPE(htype) == H_SUNTAR) {
X			props.pr_nflags |= PR_LONG_NAMES;
X			props.pr_maxnamelen =  PATH_MAX;
X			props.pr_maxlnamelen = PATH_MAX;
X		}
X		props.pr_maxsname =    NAMSIZ;
X		props.pr_maxslname =   NAMSIZ;
X		props.pr_maxprefix =   PFXSIZ;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * USTAR is limited to 7 basic file types
X		 */
X		movebytes(xtustar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X
X		/*
X		 * Even the USTAR format should support POSIX extension headers.
X		 */
X		prsettypeflags("01234567gx",	TF_VALIDTYPE);
X		prsettypeflags("gx",		TF_XHEADERS);
X		if (H_TYPE(htype) == H_SUNTAR) {
X			prsettypeflags("01234567gxX",	TF_VALIDTYPE);
X			prsettypeflags("gxX",		TF_XHEADERS);
X		}
X		break;
X
X	case H_GNUTAR:				/* gnu tar format (1989)    */
X		props.pr_maxsize = 0;
X		props.pr_hdrsize = TAR_HDRSZ;
X		props.pr_flags =
X			PR_LOCAL_GNU|PR_SPARSE|PR_GNU_SPARSE_BUG|PR_VOLHDR|PR_BASE256;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = ' ';		/* Use old tar octal format  */
X		props.pr_xc    = 'x';		/* Really ??? */
X		props.pr_pad   = 0;
X		props.pr_diffmask = 0L;
X		props.pr_nflags = PR_LONG_NAMES;
X		props.pr_maxnamelen =  PATH_MAX;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ-1;
X		props.pr_maxslname =   NAMSIZ-1;
X		props.pr_maxprefix =   0;
X		props.pr_sparse_in_hdr = SPARSE_IN_HDR;
X		/*
X		 * GNU tar is limited to the USTAR file types + sparse files
X		 */
X		movebytes(xtustar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X		props.pr_xftypetab[XT_SPARSE] = 1;
X
X		prsettypeflags("01234567DKLMNSV", TF_VALIDTYPE);
X		prsettypeflags("KL",		  TF_XHEADERS);
X		break;
X
X	default:
X		errmsgno(EX_BAD, "setprops: unexpected header type %ld '%s' (%s).\n",
X						htype,
X						hdr_name(htype),
X						hdr_text(htype));
X		errmsgno(EX_BAD, "setprops: defaulting to '%s' (%s).\n",
X						hdr_name(H_OTAR),
X						hdr_text(H_OTAR));
X
X	case H_UNDEF:				/* from star main read mode  */
X	case H_TAR:				/* tar with unknown format   */
X	case H_V7TAR:				/* tar old UNIX V7 format    */
X	case H_OTAR:				/* tar old BSD format (1978) */
X		/*
X		 * Since the large file summit was in 1995, we may assume
X		 * that any large file aware TAR implementation must be POSIX
X		 * compliant too. The only known exception is GNU tar which
X		 * is recognised separately.
X		 * Limit max file size to the max that is supported
X		 * by non large file aware systems.
X		 */
X		props.pr_maxsize = MAXNONLARGEFILE;
X		props.pr_hdrsize = TAR_HDRSZ;
X		props.pr_flags = 0;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = ' ';		/* Use old tar octal format  */
X		props.pr_xc    = 'x';		/* Really ??? */
X		props.pr_pad   = 0;
X		props.pr_diffmask = (D_SPARS|D_ATIME|D_CTIME);
X		props.pr_nflags = PR_DUMB_EOF;
X		props.pr_maxnamelen =  NAMSIZ-1;
X		props.pr_maxlnamelen = NAMSIZ-1;
X		props.pr_maxsname =    NAMSIZ-1;
X		props.pr_maxslname =   NAMSIZ-1;
X		props.pr_maxprefix =   0;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * Only a very limited set of file types (file,symlink,dir)
X		 */
X		if (H_TYPE(htype) == H_V7TAR)
X			movebytes(xtv7tar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X		else
X			movebytes(xttar_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X
X		/*
X		 * Old BSD tar does no know about file types beyond "012" but
X		 * the USTAR basic format has been designed to be compatible
X		 * with the old tar format.
X		 * OLD UNIX V7 tar does not know anything but plain files and
X		 * hard links. Note that we never see H_TYPE(htype) == H_V7TAR
X		 * in extract mode.
X		 */
X		if (H_TYPE(htype) == H_V7TAR)
X			prsettypeflags("01", TF_VALIDTYPE);
X		else
X			prsettypeflags("01234567", TF_VALIDTYPE);
X		prsettypeflags("",	   TF_XHEADERS);
X		break;
X
X	case H_BAR:				/* Sun bar format */
X		props.pr_maxsize = MAXNONLARGEFILE; /* bar is pre-largefile */
X		props.pr_hdrsize = BAR_HDRSZ;
X		props.pr_flags = 0;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = ' ';		/* Use old tar octal format  */
X		props.pr_xc    = 'x';		/* Really ??? */
X		props.pr_pad   = 0;
X		props.pr_diffmask = (D_SPARS|D_ATIME|D_CTIME);
X		props.pr_nflags = PR_DUMB_EOF;
X		props.pr_maxnamelen =  PATH_MAX;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxslname =   NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxprefix =   0;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * BAR is limited to 7 basic file types
X		 */
X		movebytes(xtcpio_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X		props.pr_xftypetab[XT_SOCK] = 0;
X		break;
X
X	case H_CPIO_BIN:
X		props.pr_maxsize = MAXNONLARGEFILE;
X		props.pr_hdrsize = CPIOBIN_HDRSZ;
X		props.pr_flags = PR_CPIO;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = '0';
X		props.pr_xc    = 'x';		/* Not needed */
X		props.pr_pad   = 1;
X		props.pr_diffmask = (D_SPARS|D_ATIME|D_CTIME);
X		props.pr_nflags = PR_LONG_NAMES;
X		props.pr_maxnamelen =  256;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxslname =   NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxprefix =   0;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * CPIO is limited to 7 basic file types
X		 */
X		movebytes(xtcpio_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X		props.pr_xftypetab[XT_SOCK] = 0;
X		break;
X
X	case H_CPIO_CHR:
X	case H_CPIO_ODC:
X		props.pr_maxsize = MAXOCTAL11;
X		props.pr_hdrsize = CPIOODC_HDRSZ;
X		props.pr_flags = PR_CPIO;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = '0';
X		props.pr_xc    = 'x';		/* Not needed */
X		props.pr_pad   = 0;
X		props.pr_diffmask = (D_SPARS|D_ATIME|D_CTIME);
X		props.pr_nflags = PR_LONG_NAMES;
X		props.pr_maxnamelen =  PATH_MAX;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxslname =   NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxprefix =   0;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * CPIO is limited to 7 basic file types + sockets
X		 */
X		movebytes(xtcpio_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X
X		if (H_TYPE(htype) == H_CPIO_ODC) {
X			/*
X			 * Be compatible to the useless SYSv cpio -Hodc
X			 * limitations.
X			 */
X			props.pr_maxnamelen =  255;
X			props.pr_xftypetab[XT_SOCK] = 0;
X		}
X		break;
X
X	case H_CPIO_ASC:
X	case H_CPIO_ACRC:
X		props.pr_maxsize = (unsigned long)0xFFFFFFFF;
X		props.pr_hdrsize = CPIOCRC_HDRSZ;
X		props.pr_flags = PR_CPIO | PR_SV_CPIO_LINKS;
X		props.pr_xhdflags = 0;
X		props.pr_xhmask = 0;
X		props.pr_fillc = '0';
X		props.pr_xc    = 'x';		/* Not needed */
X		props.pr_pad   = 3;
X		props.pr_diffmask = (D_SPARS|D_ATIME|D_CTIME);
X		props.pr_nflags = PR_LONG_NAMES;
X		props.pr_maxnamelen =  PATH_MAX;
X		props.pr_maxlnamelen = PATH_MAX;
X		props.pr_maxsname =    NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxslname =   NAMSIZ-1; /* XXX Really ??? */
X		props.pr_maxprefix =   0;
X		props.pr_sparse_in_hdr = 0;
X		/*
X		 * CPIO is limited to 7 basic file types
X		 */
X		movebytes(xtcpio_tab, props.pr_xftypetab, sizeof (props.pr_xftypetab));
X		props.pr_xftypetab[XT_SOCK] = 0;
X		break;
X	}
X	if (debug) printprops();
X}
X
XEXPORT void
Xprintprops()
X{
Xextern long hdrtype;
X	error("hdrtype:          %s (%ld)\n", hdr_name(hdrtype), hdrtype);
X	if (props.pr_maxsize)
X		error("pr_maxsize:       %llu\n", (Ullong)props.pr_maxsize);
X	else
X		error("pr_maxsize:       unlimited\n");
X	error("pr_flags:         0x%X\n", props.pr_flags);
X	error("pr_xhdflags:      0x%X\n", props.pr_xhdflags);
X	error("pr_xhmask:        0x%X\n", props.pr_xhmask);
X	error("pr_fillc:         '%c'\n", props.pr_fillc);
X	prdiffopts(stderr, "pr_diffmask:      ", props.pr_diffmask);
X	error("pr_nflags:        0x%X\n", props.pr_nflags);
X	error("pr_maxnamelen:    %d\n", props.pr_maxnamelen);
X	error("pr_maxlnamelen:   %d\n", props.pr_maxlnamelen);
X	error("pr_maxsname:      %d\n", props.pr_maxsname);
X	error("pr_maxslname:     %d\n", props.pr_maxslname);
X	error("pr_maxprefix:     %d\n", props.pr_maxprefix);
X	error("pr_sparse_in_hdr: %d\n", props.pr_sparse_in_hdr);
X}
X
XLOCAL void
Xprsettypeflags(types, typeflag)
X	char	*types;
X	int	typeflag;
X{
X	register Uchar	*ucp = (Uchar *)types;
X
X	/*
X	 * 'Otar' flag for plain file is always a valid typeflag.
X	 */
X	if (typeflag == TF_VALIDTYPE)
X		props.pr_typeflagtab[0] = typeflag;
X
X	while (*ucp != '\0')
X		props.pr_typeflagtab[*ucp++] |= typeflag;
X}
END-of-star-1.5.2/star/props.c
echo x - star-1.5.2/star/gnutar.mk
sed 's/^X//' >star-1.5.2/star/gnutar.mk << 'END-of-star-1.5.2/star/gnutar.mk'
X#ident @(#)gnutar.mk	1.16 09/03/26 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		gnutar
X#SYMLINKS=	ustar tar
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		gnutar.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		findinfo.c
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h \
X		checkerr.h dumpdate.h bitstring.h
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
XXMK_FILE=	gnutarman.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/gnutar.mk
echo x - star-1.5.2/star/props.h
sed 's/^X//' >star-1.5.2/star/props.h << 'END-of-star-1.5.2/star/props.h'
X/* @(#)props.h	1.24 10/08/27 Copyright 1994-2010 J. Schilling */
X/*
X *	Properties definitions to handle different
X *	archive types
X *
X *	Copyright (c) 1994-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/utypes.h>
X
X/*
X *	Properties to describe the different archive formats.
X *
X *	if pr_maxnamelen id == pr_maxsname, we cannot have long names
X *	besides file name splitting.
X *
X *	NOTE that part of the information in struct propertiesis available more
X *	than once. This is needed as different parts of the source need the
X *	information in different ways. Partly for performance reasons, partly
X *	because one method of storing the information is inappropriate for all
X *	places in the source.
X *
X *	If you add new features or information related to the fields
X *	pr_flags/pr_nflags or the fields pr_xftypetab[]/pr_typeflagtab[]
X *	take care of possible problems due to this fact.
X *
X */
Xstruct properties {
X	Ullong	pr_maxsize;		/* max file size */
X	int	pr_hdrsize;		/* header size */
X	int	pr_flags;		/* gerneral flags */
X	int	pr_xhdflags;		/* default extended header flags */
X	int	pr_xhmask;		/* supported extended header tags */
X	char	pr_fillc;		/* fill prefix for numbers in TCB */
X	char	pr_xc;			/* typeflag used for extended headers */
X	char	pr_pad;			/* cpio filename/data size padding */
X	long	pr_diffmask;		/* diffopts not supported */
X	int	pr_nflags;		/* name related flags */
X	int	pr_maxnamelen;		/* max length for filename */
X	int	pr_maxlnamelen;		/* max length for linkname */
X	int	pr_maxsname;		/* max length for short filename */
X	int	pr_maxslname;		/* max length for short linkname */
X	int	pr_maxprefix;		/* max length of prefix if splitting */
X	int	pr_sparse_in_hdr;	/* # of sparse entries in header */
X	char	pr_xftypetab[32];	/* (*1) list of supported file types */
X	char	pr_typeflagtab[256];	/* (*2) list of supported TCB typeflg */
X};
X
X/*
X * 1) pr_xftypetab is used when creating archives only.
X * 2) pr_typeflagtab is used when extracting archives only.
X */
X
X/*
X * general flags (pr_flags)
X */
X#define	PR_POSIX_OCTAL		0x0001	/* left fill octal number with '0'  */
X#define	PR_LOCAL_STAR		0x0002	/* can handle local star filetypes  */
X#define	PR_LOCAL_GNU		0x0004	/* can handle local gnu filetypes   */
X#define	PR_CPIO			0x0008	/* Unblocked CPIO archive	    */
X#define	PR_SPARSE		0x0010	/* can handle sparse files	    */
X#define	PR_GNU_SPARSE_BUG	0x0020	/* size does not contain ext. headr */
X#define	PR_VOLHDR		0x0100	/* can handle volume headers	    */
X#define	PR_XHDR			0x0200	/* POSIX.1-2001 extended headers    */
X#define	PR_VU_XHDR		0x0400	/* emit vendor unique P-2001 xhdrs  */
X#define	PR_BASE256		0x0800	/* can handle base 256 for numbers  */
X#define	PR_MULTIVOL		0x1000	/* can handle reliable multi vol ar */
X#define	PR_SV_CPIO_LINKS	0x2000	/* hard link handling for SVr4 cpio */
X#define	PR_LINK_DATA		0x4000	/* may include data for hard links  */
X
X/*
X * name related flags (pr_nflags)
X */
X#define	PR_POSIX_SPLIT		0x01	/* can do posix filename splitting  */
X#define	PR_PREFIX_REUSED	0x02	/* prefix space used by other option */
X#define	PR_LONG_NAMES		0x04	/* can handle very long names	    */
X#define	PR_DUMB_EOF		0x10	/* handle t_name[0] == '\0' as EOF  */
X
X/*
X * Macro to make pr_xftypetab easier to use. See also table.h/table.c.
X */
X#define	pr_unsuptype(i)		(props.pr_xftypetab[(i)->f_xftype] == 0)
X
X/*
X * typeflagtab related flags
X */
X#define	TF_VALIDTYPE		0x01	/* A valid typeflag for extraction */
X#define	TF_XHEADERS		0x02	/* This is a valid extended header */
X
X#define	_pr_typeflags(c)	(props.pr_typeflagtab[(Uchar)(c)])
X#define	pr_validtype(c)		((_pr_typeflags(c) & TF_VALIDTYPE) != 0)
X#define	pr_isxheader(c)		((_pr_typeflags(c) & TF_XHEADERS) != 0)
X
Xextern	struct properties	props;
END-of-star-1.5.2/star/props.h
echo x - star-1.5.2/star/remove.c
sed 's/^X//' >star-1.5.2/star/remove.c << 'END-of-star-1.5.2/star/remove.c'
X/* @(#)remove.c	1.55 10/08/23 Copyright 1985, 1991-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)remove.c	1.55 10/08/23 Copyright 1985, 1991-2010 J. Schilling";
X#endif
X/*
X *	remove files an file trees
X *
X *	Copyright (c) 1985, 1992-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include "star.h"
X#include "table.h"
X#include <schily/dirent.h>	/* XXX Wegen S_IFLNK */
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X#include "starsubs.h"
X
X
Xextern	FILE	*tty;
Xextern	FILE	*vpr;
Xextern	BOOL	interactive;
Xextern	BOOL	force_remove;
Xextern	BOOL	ask_remove;
Xextern	BOOL	remove_first;
Xextern	BOOL	remove_recursive;
Xextern	BOOL	keep_nonempty_dirs;
X
XEXPORT	BOOL	remove_file	__PR((char *name, BOOL isfirst));
XLOCAL	BOOL	_remove_file	__PR((char *name, BOOL isfirst, int depth));
XLOCAL	BOOL	remove_tree	__PR((char *name, BOOL isfirst, int depth));
X
X/*
X * Remove a file or a directory tree.
X * If star has been called with -remove-first "isfirst" needs to be set.
X */
XEXPORT BOOL
Xremove_file(name, isfirst)
X	register char	*name;
X		BOOL	isfirst;
X{
X	static	int	depth	= -10;
X	static	int	dinit	= 0;
X
X	if (!dinit) {
X#ifdef	_SC_OPEN_MAX
X		depth += sysconf(_SC_OPEN_MAX);
X#else
X		depth += getdtablesize();
X#endif
X		dinit = 1;
X	}
X	return (_remove_file(name, isfirst, depth));
X}
X
XLOCAL BOOL
X_remove_file(name, isfirst, depth)
X	register char	*name;
X		BOOL	isfirst;
X		int	depth;
X{
X	char	buf[32];
X	char	ans = '\0';
X	int	err = EX_BAD;
X	BOOL	fr_save = force_remove;
X	BOOL	rr_save = remove_recursive;
X	BOOL	ret;
X
X	if (remove_first && !isfirst)
X		return (FALSE);
X	if (!force_remove && (interactive || ask_remove)) {
X		fprintf(vpr, "remove '%s' ? Y(es)/N(o) :", name); fflush(vpr);
X		fgetline(tty, buf, 2);
X	}
X	if (force_remove ||
X	    ((interactive || ask_remove) && (ans = toupper(buf[0])) == 'Y')) {
X
X		/*
X		 * only unlink non directories or empty directories
X		 */
X		if (rmdir(name) < 0) {
X			err = geterrno();
X			if (err == ENOTDIR) {
X				if (unlink(name) < 0) {
X					err = geterrno();
X#ifdef	RM_DEBUG
X					errmsg("rmdir: Not a dir but cannot unlink file.\n");
X#endif
X					goto cannot;
X				}
X				return (TRUE);
X			}
X#if defined(ENOTEMPTY) && ENOTEMPTY != EEXIST
X			if (err == EEXIST || err == ENOTEMPTY) {
X#else
X			if (err == EEXIST) {
X#endif
X				if (!remove_recursive) {
X					if (ans == 'Y') {
X						fprintf(vpr,
X						"Recursive remove nonempty '%s' ? Y(es)/N(o) :",
X							name);
X						fflush(vpr);
X						fgetline(tty, buf, 2);
X						if (toupper(buf[0]) == 'Y') {
X							force_remove = TRUE;
X							remove_recursive = TRUE;
X						} else {
X							goto nonempty;
X						}
X					} else {
X				nonempty:
X						if (!keep_nonempty_dirs)
X						errmsgno(err,
X						"Nonempty directory '%s' not removed.\n",
X						name);
X						return (FALSE);
X					}
X				}
X				ret = remove_tree(name, isfirst, depth);
X
X				force_remove = fr_save;
X				remove_recursive = rr_save;
X				return (ret);
X			}
X#ifdef	RM_DEBUG
X			else {
X				errmsgno(err, "rmdir: err != EEXIST.\n");
X			}
X			errmsgno(err, "rmdir: unknown reason.\n");
X#endif
X			goto cannot;
X		}
X		return (TRUE);
X	}
X#ifdef	RM_DEBUG
X	else {
X		errmsgno(EX_BAD, "remove_file: if (force_remove || .... else part\n");
X		errmsgno(EX_BAD, "force_remove %d interactive %d ask_remove %d ans '%c' (%d)\n",
X			force_remove, interactive, ask_remove, ans, ans);
X	}
X#endif
Xcannot:
X	errmsgno(err, "File '%s' not removed.\n", name);
X	return (FALSE);
X}
X
XLOCAL BOOL
Xremove_tree(name, isfirst, depth)
X	register char	*name;
X		BOOL	isfirst;
X		int	depth;
X{
X	DIR		*d;
X	struct dirent	*dir;
X	BOOL		ret = TRUE;
X	char		xn[PATH_MAX];	/* XXX A bad idea for a final solution */
X	char		*p;
X
X	if ((d = opendir(name)) == NULL) {
X		return (FALSE);
X	}
X	depth--;
X
X	strcpy(xn, name);
X	p = &xn[strlen(name)];
X	*p++ = '/';
X
X	while ((dir = readdir(d)) != NULL) {
X
X		if (streql(dir->d_name, ".") ||
X				streql(dir->d_name, ".."))
X			continue;
X
X		strcpy(p, dir->d_name);
X
X		if (depth <= 0) {
X			closedir(d);
X		}
X		if (!_remove_file(xn, isfirst, depth))
X			ret = FALSE;
X		if (depth <= 0 && (d = opendir(name)) == NULL) {
X			return (FALSE);
X		}
X	}
X
X	closedir(d);
X
X	if (ret == FALSE)
X		return (ret);
X
X	if (rmdir(name) >= 0)
X		return (ret);
X
X	errmsg("Directory '%s' not removed.\n", name);
X	return (FALSE);
X}
END-of-star-1.5.2/star/remove.c
echo x - star-1.5.2/star/restore.c
sed 's/^X//' >star-1.5.2/star/restore.c << 'END-of-star-1.5.2/star/restore.c'
X/* @(#)restore.c	1.65 12/02/05 Copyright 2003-2012 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)restore.c	1.65 12/02/05 Copyright 2003-2012 J. Schilling";
X#endif
X/*
X *	Data base management for incremental restores
X *	needed to detect and execute rename() and unlink()
X *	operations between two incremental dumps.
X *
X *	Copyright (c) 2003-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X *	Problems:
X *
X *	-	lost+found will usually not extracted and thus
X *		get no new inode number.
X *		**** Solution: Use -U ****
X *
X *	-	chmod(1) only changes st_ctime but star will
X *		extract neither data nor permissions if only
X *		a chmod(1), chown(1) or smilar change did ocur.
X *		**** Solution: Use -U ****
X *
X *	-	unlink(dev) .... create(dev) and get same inode #
X *		**** Solution: sym_typecheck() ****
X *		The Solution creates a new problem that the new
X *		node created after sym_typecheck() may have a
X *		different inode number and we need to change the node.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include "diff.h"
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/dirent.h>	/* XXX Wegen S_IFLNK */
X#include <schily/stat.h>	/* XXX Wegen S_IRWXU */
X#include <schily/errno.h>	/* XXX Wegen ENOENT */
X#include "restore.h"
X#include "dumpdate.h"
X#include "starsubs.h"
X#include <schily/fetchdir.h>
X
X#define	PADD_NODE_DEBUG
X
X#define	PRINT_L_SYM		/* Include symbols for star_sym.c */
X
Xextern	BOOL	debug;
Xextern	int	xdebug;
Xextern	int	verbose;
Xextern	dev_t	curfs;
Xextern	BOOL	forcerestore;
Xextern	char	*vers;
Xextern	GINFO	*grip;		/* Global read info pointer	*/
X
XLOCAL	char	*overs;		/* Star version used with last restore */
XLOCAL	int	odtype;		/* Old Dump type */
XLOCAL	GINFO	*ogp;		/* Global information from last restore	*/
XEXPORT	BOOL	restore_valid;	/* TRUE when after we did read a valid header */
X				/* Also needed by star_sym.c	*/
XEXPORT	BOOL	is_star = TRUE;	/* TRUE with star and we check the version */
X				/* We do not abort if this is for star_sym.c */
X
X#define	HASH_ENTS	1024
X
XLOCAL	imap_t	*iroot = NULL;		/* The root directory		  */
XLOCAL	imap_t	*itmp = NULL;		/* The temp directory star-tmpdir */
XLOCAL	imap_t	*isym = NULL;		/* The temp directory star-symtable */
XLOCAL	imap_t	*imaps = NULL;
XLOCAL	imap_t	**himaps = NULL;
XLOCAL	imap_t	**hoimaps = NULL;
XLOCAL	imap_t	**hnimaps = NULL;
X#ifdef	DEBUG
XLOCAL	int	nimp;
X#endif
X
X#ifdef	PADD_NODE_DEBUG
Xchar	*padd_node_caller = NULL;
X#endif
X
XLOCAL	char	sym_tmpdir[]	= "star-tmpdir";
XLOCAL	char	sym_symtable[]	= "star-symtable";
XLOCAL	char	sym_oldsymtable[] = "star-symtable.old";
XLOCAL	char	sym_symdump[]	= "star-symdump";
XLOCAL	char	sym_lock[]	= "star-lock";
X
XLOCAL	ino_t	lock_ino;
X
XLOCAL	int	hashval		__PR((Uchar *str));
XLOCAL	imap_t	*nfind_node	__PR((char *name, imap_t *idir));
XLOCAL	imap_t	*pfind_node	__PR((char *name));
XEXPORT	imap_t	*padd_node	__PR((char *name, ino_t oino, ino_t nino, Int32_t flags));
XLOCAL	imap_t	*oifind_node	__PR((imap_t *idir, ino_t nino));
XLOCAL	imap_t	*nifind_node	__PR((imap_t *idir, ino_t nino));
XLOCAL	imap_t	*add_node	__PR((imap_t *cwd, char *name, ino_t oino, ino_t nino, Int32_t flags));
XEXPORT	imap_t	*sym_addrec	__PR((FINFO *info));
XEXPORT	void	sym_addstat	__PR((FINFO *info, imap_t *imp));
XEXPORT	imap_t	*sym_dirprerpare __PR((FINFO *info, imap_t *idir));
XLOCAL	void	move2tmp	__PR((char *dir, char *name, ino_t oino, ino_t nino));
XLOCAL	void	move2dir	__PR((char *dir, char *name, ino_t oino));
XEXPORT	imap_t	*sym_typecheck	__PR((FINFO *info, FINFO *cinfo, imap_t *imp));
XLOCAL	BOOL	removefile	__PR((char *name));
XLOCAL	BOOL	removetree	__PR((char *name));
XEXPORT	void	sym_initmaps	__PR((void));
XEXPORT	void	sym_open	__PR((char *name));
XLOCAL	int	xgetline	__PR((FILE *f, char *buf, int len, char *name));
XLOCAL	void	checknl		__PR((FILE *f));
XLOCAL	void	sym_initsym	__PR((void));
XLOCAL	void	tmpnotempty	__PR((void));
XLOCAL	void	purgeent	__PR((imap_t *imp));
XLOCAL	void	purgetree	__PR((imap_t *imp));
XEXPORT	void	sym_init	__PR((GINFO *gp));
XEXPORT	int	ngetline	__PR((FILE *f, char *buf, int len));
XEXPORT	void	sym_close	__PR((void));
XLOCAL	void	sym_dump	__PR((void));
XLOCAL	void	writeheader	__PR((FILE *f));
XLOCAL	void	readheader	__PR((FILE *f));
XLOCAL	void	checkheader	__PR((void));
XLOCAL	void	useforce	__PR((void));
XLOCAL	char	*fullname	__PR((imap_t *imp, char *cp, char *ep, BOOL top));
XLOCAL	void	printfullname	__PR((FILE *f, imap_t *imp));
XLOCAL	void	printonesym	__PR((FILE *f, imap_t *imp));
XLOCAL	void	printsyms	__PR((FILE *f, imap_t *imp));
X#ifdef	PRINT_L_SYM
XLOCAL	void	printoneLsym	__PR((FILE *f, imap_t *imp));
XLOCAL	void	printLsyms	__PR((FILE *f, imap_t *imp));
XEXPORT	void	printLsym	__PR((FILE *f));
X#endif
X#ifdef	__needed__
XLOCAL	BOOL	dirdiskonly	__PR((FINFO *info, int *odep, char ***odp));
X#endif
X
XLOCAL int
Xhashval(str)
X	register Uchar	*str;
X{
X	register int	sum = 0;
X	register int	i;
X	register int	c;
X
X	for (i = 0; (c = *str++) != '\0'; i++)
X		sum ^= (c << (i&7));
X	return (sum);
X}
X
X/*
X * Find a node by path name component and directory node pointer
X */
XLOCAL imap_t *
Xnfind_node(name, idir)
X	char	*name;
X	register imap_t	*idir;
X{
X	register imap_t	*imp;
X	register char	*np;
X	register char	*inp;
X	register int	nhash;
X
X	np = name;
X	if (np[0] == '\0')
X		return (idir);
X	if (np[0] == '.') {
X		if (np[1] == '\0')
X			return (idir);
X		if (np[1] == '.' && np[2] == '\0')
X			return (idir->i_dparent);
X	}
X	nhash = hashval((Uchar *)name);
X	imp = himaps[nhash%HASH_ENTS];
X
X	for (; imp; imp = imp->i_hnext) {
X
X		if (nhash != imp->i_hash)
X			continue;
X		if (imp->i_dparent != idir)
X			continue;
X		if (imp->i_flags & I_DELETE)
X			continue;
X
X		np = name;
X		inp = imp->i_name;
X		while (*inp) {
X			if (*np++ != *inp++)
X				goto nextmatch;
X		}
X		if (np[0] == '\0')
X			break;
Xnextmatch:
X		;
X	}
X	return (imp);
X}
X
X/*
X * Find a node by full path name
X */
XLOCAL imap_t *
Xpfind_node(name)
X	char	*name;
X{
X	register imap_t	*imp = iroot;
X	register char	*np = name;
X	register char	*sp;
X
X	if (imp == NULL)
X		return (imp);
X
X	while (*np) {
X		if ((sp = strchr(np, '/')) != NULL)
X			*sp = '\0';
X		if ((imp->i_flags & I_DIR) == 0) {
X			errmsgno(EX_BAD,
X				"pfind_node(): Not a directory '%s' for '%s' flags %X i_dir %p.\n",
X				imp->i_name, name,
X				imp->i_flags, imp->i_dir);
X			return (NULL);
X		}
X		imp = nfind_node(np, imp);
X		if (sp)
X			*sp = '/';
X		else
X			break;
X		np = &sp[1];
X		if (imp == NULL)
X			break;
X	}
X	return (imp);
X}
X
X/*
X * Add a new full path name and return a node pointer
X * Also used by star_sym.c
X */
XEXPORT imap_t *
Xpadd_node(name, oino, nino, flags)
X	char	*name;
X	ino_t	oino;
X	ino_t	nino;
X	Int32_t	flags;
X{
X	register imap_t	*imp = iroot;
X	register imap_t	*idir;
X	register char	*np = name;
X	register char	*sp;
X
X	if (imp == NULL) {
X		if ((np[0] == '.' && np[1] == '\0') ||
X		    (np[0] == '.' && np[1] == '/' && np[2] == '\0')) {
X			imp = add_node(NULL, ".", oino, nino, flags);
X			imp->i_dparent = imp;
X			iroot = imp;
X			return (imp);
X		}
X		comerrno(EX_BAD, "Panic no root to add '%s'.\n", name);
X	}
X
X	while (*np) {
X		if ((sp = strchr(np, '/')) != NULL)
X			*sp = '\0';
X
X		if ((imp->i_flags & I_DIR) == 0) {
X#ifdef	PADD_NODE_DEBUG
X			errmsgno(EX_BAD, "padd_node(): caller '%s'.\n", padd_node_caller);
X#endif
X			errmsgno(EX_BAD,
X				"padd_node(): Not a directory '%s' for '%s' flags %X i_dir %p.\n",
X				imp->i_name, name,
X				imp->i_flags, imp->i_dir);
X			return (NULL);
X		}
X		idir = imp;
X		imp = nfind_node(np, idir);
X		if (imp == NULL) {
X			if (sp != NULL && strchr(&sp[1], '/') != NULL)
X				imp = add_node(idir, np, 0, 0, I_DIR);
X			else
X				imp = add_node(idir, np, oino, nino, flags);
X		}
X		if (sp)
X			*sp = '/';
X		else
X			break;
X		np = &sp[1];
X	}
X	if (imp->i_oino == 0 && oino != 0) {
X		int	hv;
X
X		imp->i_oino = oino;
X		hv = oino % HASH_ENTS;
X		imp->i_honext = hoimaps[hv];
X		hoimaps[hv] = imp;
X	}
X	if (imp->i_nino == 0 && nino != 0) {
X		int	hv;
X
X		/*
X		 * This is (most likely) a temporary node.
X		 * We need to set up the flags acording to the right file.
X		 */
X		if (imp->i_flags != 0) {
X			/*
X			 * Not a temporarary node found?
X			 */
X#ifdef	PADD_NODE_DEBUG
X			errmsgno(EX_BAD, "padd_node(): caller '%s'.\n", padd_node_caller);
X#endif
X			errmsgno(EX_BAD,
X			"padd_node(): Panic: Flags 0x%X on temp node '%s' for '%s'.\n",
X			imp->i_flags, imp->i_name, name);
X		}
X		imp->i_flags = flags;
X		imp->i_nino = nino;
X		hv = nino % HASH_ENTS;
X		imp->i_hnnext = hnimaps[hv];
X		hnimaps[hv] = imp;
X	}
X	return (imp);
X}
X
X/*
X * Find a node by old inode number
X */
XLOCAL imap_t *
Xoifind_node(idir, oino)
X	imap_t	*idir;
X	ino_t	oino;
X{
X	register imap_t	*imp;
X
X	imp = hoimaps[oino%HASH_ENTS];
X
X	for (; imp; imp = imp->i_honext) {
X
X		if (imp->i_flags & I_DELETE)
X			continue;
X		if (idir && idir != imp->i_dparent)
X			continue;
X
X		/*
X		 * XXX Dies ist eine halbfertige Directory.
X		 * XXX Hoffentlich brauchen wir diesen Knoten nie.
X		 */
X		if (imp->i_nino == 0)
X			continue;
X		if (oino == imp->i_oino)
X			break;
X	}
X	return (imp);
X}
X
X/*
X * Find a node by new inode number
X */
XLOCAL imap_t *
Xnifind_node(idir, nino)
X	imap_t	*idir;
X	ino_t	nino;
X{
X	register imap_t	*imp;
X
X	imp = hnimaps[nino%HASH_ENTS];
X
X	for (; imp; imp = imp->i_hnnext) {
X
X		if (imp->i_flags & I_DELETE)
X			continue;
X		if (idir && idir != imp->i_dparent)
X			continue;
X		if (nino == imp->i_nino)
X			break;
X	}
X	return (imp);
X}
X
X/*
X * Add a new node by path name component and directory node pointer
X * return a node pointer
X */
XLOCAL imap_t *
Xadd_node(cwd, name, oino, nino, flags)
X	imap_t	*cwd;
X	char	*name;
X	ino_t	oino;
X	ino_t	nino;
X	Int32_t	flags;
X{
X	register imap_t	*imp;
X	register int	hv;
X
X	imp = ___malloc(sizeof (imap_t), "new imap");
X	imp->i_name = ___savestr(name);
X	imp->i_hash = hashval((Uchar *)imp->i_name);
X	imp->i_oino = oino;
X	imp->i_nino = nino;
X	imp->i_flags = flags;
X	imp->i_next = imaps;
X	imaps = imp;
X
X	imp->i_dir = NULL;
X	imp->i_dnext = NULL;
X	imp->i_dxnext = NULL;
X	imp->i_dparent = cwd;
X	if (cwd) {
X		imp->i_dxnext = cwd->i_dir;
X		cwd->i_dir = imp;
X	}
X
X	hv = imp->i_hash % HASH_ENTS;
X	imp->i_hnext = himaps[hv];
X	himaps[hv] = imp;
X
X	if (oino) {
X		hv = oino % HASH_ENTS;
X		imp->i_honext = hoimaps[hv];
X		hoimaps[hv] = imp;
X	} else {
X		imp->i_honext = NULL;
X	}
X	if (nino) {
X		hv = nino % HASH_ENTS;
X		imp->i_hnnext = hnimaps[hv];
X		hnimaps[hv] = imp;
X	} else {
X		imp->i_hnnext = NULL;
X	}
X#ifdef	DEBUG
X	nimp++;
X#endif
X
X	return (imp);
X}
X
X/*
X * Add a record for a file. If this is a directory, add entries for the
X * directory content.
X */
XEXPORT imap_t *
Xsym_addrec(info)
X	FINFO	*info;
X{
X	imap_t	*imp;
X	BOOL	isold = TRUE;
X
X#ifdef	XXX_DEBUG
X	if (grip->dumplevel > 0) {
X		error("sym_addrec(%s) Type %s\n",
X			info->f_name, XTTONAME(info->f_rxftype));
X	}
X#endif
X	if ((imp = pfind_node(info->f_name)) == NULL) {
X		isold = FALSE;
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "sym_addrec";
X#endif
X		imp = padd_node(info->f_name, info->f_ino, (ino_t)0, 0);
X#ifdef	PADD_NODE_DEBUG
X		if (imp == NULL)
X			errmsgno(EX_BAD, "padd_node(%s, %lld, 0, 0) = NULL\n",
X				info->f_name, (Llong)info->f_ino);
X#endif
X	} else {
X#ifdef	XXX_DEBUG
X		if (grip->dumplevel > 0) {
X			error("sym_addrec(%s) found dir: %d TYPECHANGE: %d\n",
X				info->f_name,
X				imp->i_flags & I_DIR,
X				is_dir(info) != ((imp->i_flags & I_DIR) != 0));
X		}
X#endif
X	}
X	if (imp == NULL) {
X		sym_dump();
X		comerrno(EX_BAD,
X			"Panic: cannot add node '%s' in sym_addrec().\n",
X			info->f_name);
X	}
X
X	if (is_dir(info)) {
X		/*
X		 * If the node for the name of this dir is an old node and
X		 * does not have the DIR flag set, we may not set up the dir
X		 * content as we later will move this node away and create a
X		 * new one for the new dir that is going to be created.
X		 */
X		if (isold && (imp->i_flags & I_DIR) == 0)
X			return (imp);
X
X		imp->i_flags |= I_DIR;
X	}
X
X	if (is_dir(info)) {
X		imap_t	*idir;
X		char	*dp;
X		ino_t	*ip;
X		int	len;
X		int	i;
X
X		idir = imp;
X		dp = info->f_dir;
X		ip = info->f_dirinos;
X		if (dp == NULL || ip == NULL)
X			return (idir);
X
X		i = 0;
X		while (*dp) {
X			dp++;
X			len = strlen(dp);
X
X			if ((imp = nfind_node(dp, idir)) == NULL) {
X				imp = add_node(idir, dp, (ino_t)0, (ino_t)0, 0);
X			}
X			if (imp->i_oino == (ino_t)0) {
X				int	hv;
X
X				imp->i_oino = ip[i];
X				hv = imp->i_oino % HASH_ENTS;
X				imp->i_honext = hoimaps[hv];
X				hoimaps[hv] = imp;
X			}
X			i++;
X			dp += len+1;
X		}
X		return (idir);
X	}
X	return (imp);
X}
X
X/*
X * Add status information for a node.
X */
XEXPORT void
Xsym_addstat(info, imp)
X	FINFO	*info;
X	imap_t	*imp;
X{
X	FINFO	finfo;
X	BOOL	isold = TRUE;
X	int	hv;
X
X	if (imp == NULL && (imp = pfind_node(info->f_name)) == NULL) {
X		isold = FALSE;
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "sym_addstat";
X#endif
X		imp = padd_node(info->f_name, info->f_ino, (ino_t)0, 0);
X#ifdef	PADD_NODE_DEBUG
X		if (imp == NULL)
X			errmsgno(EX_BAD, "padd_node(%s, %lld, 0, 0) = NULL\n",
X				info->f_name, (Llong)info->f_ino);
X#endif
X	}
X	if (imp == NULL) {
X		sym_dump();
X		comerrno(EX_BAD,
X			"Panic: cannot add node '%s' in sym_addstat().\n",
X			info->f_name);
X	}
X	if (imp->i_oino == 0) {
X		if (imp != iroot) {
X			errmsgno(EX_BAD,
X			"WARNING: late old inode add for '%s'\n", info->f_name);
X		}
X		imp->i_oino = info->f_ino;
X		hv = imp->i_oino % HASH_ENTS;
X		imp->i_honext = hoimaps[hv];
X		hoimaps[hv] = imp;
X	}
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	_getinfo(info->f_name, &finfo);
X	if (imp->i_nino != 0 && imp->i_nino != finfo.f_ino) {
X		errmsgno(EX_BAD, "sym_addstat(): %s nino change from %lld to %lld flags %X\n",
X			info->f_name,
X			(Llong)imp->i_nino, (Llong)finfo.f_ino,
X			imp->i_flags);
X	}
X
X	/*
X	 * An nino change implies a hash change. We need to remove the node
X	 * from the old hash list and put it into the new list.
X	 */
X	if (imp->i_nino != finfo.f_ino) {
X		BOOL	newhash = FALSE;
X
X		if ((imp->i_nino != 0) &&
X		    ((imp->i_nino % HASH_ENTS) != (finfo.f_ino % HASH_ENTS))) {
X			imap_t	*tnp;
X
X			tnp = hnimaps[imp->i_nino % HASH_ENTS];
X			for (; tnp; tnp = tnp->i_hnnext) {
X				if (imp == tnp->i_hnnext) {
X					tnp->i_hnnext = imp->i_hnnext;
X					break;
X				}
X			}
X			newhash = TRUE;
X		}
X
X		if (imp->i_nino == 0 || newhash) {
X			hv = finfo.f_ino % HASH_ENTS;
X			imp->i_hnnext = hnimaps[hv];
X			hnimaps[hv] = imp;
X		}
X		imp->i_nino = finfo.f_ino;
X	}
X
X	if (is_dir(info)) {
X		int	len = strlen(imp->i_name);
X
X		if (imp->i_name[len-1] == '/')
X			imp->i_name[len-1] = '\0';
X		imp->i_flags |= I_DIR;
X	}
X}
X
X/*
X * Prepare the directory for the following extraction.
X * This is done by first removing all files that are no longer present on the
X * current incremental and then trying to move/link missing files that are
X * a result of a rename or link operation.
X */
XEXPORT imap_t *
Xsym_dirprepare(info, idir)
X	FINFO	*info;
X	imap_t	*idir;
X{
X	int	dlen;
X	ino_t	*oino;
X	char	**dname;
X	char	*p;
X	int	i;
X	int	j;
X	FINFO	finfo;
X	char	*dp2;
X	int	ents2;
X	char	**dname2;
X	ino_t	*ino2;
X	ino_t	*oino2;
X	char	*slashp = NULL;
X
X	if (info->f_dir == NULL) {
X		/*
X		 * Most likely a mount point
X		 */
X		if (info->f_dev == curfs) {
X			unlink(sym_lock);
X			comerrno(EX_BAD, "Archive contains directory '%s' without name list\n", info->f_name);
X		}
X		return (idir);
X	}
X
X#ifdef	DIRP_DEBUG
X	if (!_getinfo(info->f_name, &finfo) && geterrno() != ENOENT)
X		errmsg("DEBUG1: stat for '%s' failed.\n",
X			info->f_name);
X#endif
X	/*
X	 * Try to work around a moving POSIX target.
X	 * POSIX.1-1988 requires that stat("/etc/passwd/", ) works.
X	 * While POSIX.1-2001 requires to return ENOTDIR.
X	 */
X	info->f_namelen = strlen(info->f_name);
X	if (info->f_name[info->f_namelen-1] == '/') {
X		slashp = &info->f_name[info->f_namelen-1];
X		*slashp = '\0';
X	}
X	/*
X	 * Check if the node on disk is really a directory.
X	 * As we did already check the directory content of the higher direcory
X	 * it should never happen that the on disk node is not a directory.
X	 */
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	seterrno(0);
X	(void) _getinfo(info->f_name, &finfo);
X
X	if (!is_dir(&finfo)) {		/* Also catches the ENOENT case */
X		/*
X		 * There is either no file on disk, we cannot stat() it, or
X		 * the file on the disk has the same name and inode number
X		 * as the directory in the archive.
X		 * XXX Should we rather use move2tmp()?
X		 */
X		imap_t	*imp;
X
X		imp = idir;
X		if (geterrno() != ENOENT) {
X			if (unlink(info->f_name) < 0)
X				comerr("Cannot unlink '%s'.\n", info->f_name);
X		}
X#ifdef	MKD_DEBUG
X		{ extern char *mkdwhy; mkdwhy = "restore"; }
X#endif
X		if (!make_adir(info)) {
X			if (slashp)
X				*slashp = '/';
X			return (imp);
X		}
X		if ((imp->i_flags & I_DIR) == 0) {
X			purgeent(imp);
X			imp = sym_addrec(info);
X		}
X		if (!_getinfo(info->f_name, &finfo)) {
X			if (slashp)
X				*slashp = '/';
X			return (imp);
X		}
X		sym_addstat(&finfo, imp);
X		idir = imp;
X	}
X	if (slashp)
X		*slashp = '/';
X
X	if ((dname = ___malloc(info->f_dirents * sizeof (char *), "sym_dirprepare name")) == NULL) {
X		return (idir);
X	}
X	/*
X	 * Put directory names from archive into array.
X	 */
X	p = info->f_dir;
X	oino = info->f_dirinos;
X	dlen = info->f_dirents;
X	for (i = 0; i < dlen; i++) {
X		dname[i] = &p[1];
X		p += strlen(&p[1]) + 2;
X	}
X
X#ifdef	RES_DEBUG
X	for (i = 0; i < dlen; i++) {
X		error("INO %lld NAME %s\n",
X			(Llong)info->f_dirinos[i],
X			dname[i]);
X	}
X#endif
X
X	dp2 = fetchdir(info->f_name, &ents2, 0, &ino2);
X	if ((oino2 = ___malloc(ents2 * sizeof (ino_t), "sym_dirprepare oino2")) == NULL) {
X		return (idir);
X	}
X	if ((dname2 = ___malloc(ents2 * sizeof (char *), "sym_dirprepare name2")) == NULL) {
X		return (idir);
X	}
X	/*
X	 * Put directory names from disk into array.
X	 */
X	p = dp2;
X	for (i = 0; i < ents2; i++) {
X		dname2[i] = &p[1];
X		p += strlen(&p[1]) + 2;
X	}
X	for (i = 0; i < ents2; i++) {
X		imap_t	*imp;
X		imp = nifind_node((imap_t *)0, ino2[i]);
X		if (imp == NULL) {
X			if (ino2[i] != lock_ino) {
X				errmsgno(EX_BAD,
X				"Panic: No symbol entry for inode %lld (%s).\n",
X				(Llong)ino2[i], dname2[i]);
X			}
X			oino2[i] = 0;
X			continue;
X		}
X		if (imp->i_oino == (ino_t)0) {
X			if (imp != itmp && imp != isym) {
X				errmsgno(EX_BAD,
X				"Panic: No old inode for inode %lld (%s).\n",
X				(Llong)ino2[i], dname2[i]);
X			}
X		}
X		oino2[i] = imp->i_oino;
X	}
X
X	if (xdebug)
X		error("sym_dirprepare(%s)\n", info->f_name);
X	/*
X	 * Check for all files that are in the current on disk directory
X	 * but no longer exist on the current incremental with the same
X	 * name and inode number as before.
X	 */
X	for (i = 0; i < ents2; i++) {
X		ino_t	in;
X		if (oino2[i] == 0)
X			continue;
X		in = oino2[i];
X
X		if (xdebug)
X			error("Checking ino %lld (%s)...", (Llong)oino2[i], dname2[i]);
X		for (j = 0; j < dlen; j++) {
X			if (xdebug > 1)
X				error("in %lld oino %lld\n", (Llong)in, (Llong)oino[j]);
X			if (in == oino[j] && streql(dname2[i], dname[j]))
X				break;
X		}
X		if (j >= dlen) {
X			if (xdebug)
X				error("RM\n");
X				/* dir name, file name,  old inode#, new inode # */
X			move2tmp(info->f_name, dname2[i], in, ino2[i]);
X		} else {
X			if (xdebug)
X				error("found\n");
X		}
X	}
X
X	if (xdebug)
X		error("sym_dirprepare(%s) <<<<\n", info->f_name);
X	/*
X	 * Check for all files that are on the current incremental but
X	 * are not in the current on disk directory  with the same
X	 * and inode number.
X	 */
X	for (i = 0; i < dlen; i++) {
X		ino_t	in;
X		in = oino[i];
X
X		if (xdebug)
X			error("Checking ino %lld (%s)...", (Llong)oino[i], dname[i]);
X		for (j = 0; j < ents2; j++) {
X			if (in == oino2[j] && streql(dname2[j], dname[i]))
X				break;
X		}
X		if (j >= ents2) {
X			if (xdebug)
X				error("LINK\n");
X				/* dir name, file name,  old inode# */
X			move2dir(info->f_name, dname[i], in);
X		} else {
X			if (xdebug)
X				error("found\n");
X		}
X	}
X
X	if (dname != NULL)
X		free(dname);
X	if (oino2 != NULL)
X		free(oino2);
X	if (dname2 != NULL)
X		free(dname2);
X	if (dp2 != NULL)
X		free(dp2);
X	if (ino2 != NULL)
X		free(ino2);
X	return (idir);
X}
X
X/*
X * Move a file to the temp directory. This file has been identified
X * to be no longer in the current directory pointed to by 'dir'.
X */
XLOCAL void
Xmove2tmp(dir, name, oino, nino)
X	char	*dir;
X	char	*name;
X	ino_t	oino;
X	ino_t	nino;
X{
X	char	path[2*PATH_MAX+1];
X	char	tpath[128];
X	imap_t	*onp;
X	imap_t	*nnp;
X
X	js_snprintf(path, sizeof (path), "%s/%s", dir, name);
X	js_snprintf(tpath, sizeof (tpath), "%s/#%lld", sym_tmpdir, (Llong)nino);
X
X	onp = pfind_node(path);
X	if (onp == NULL) {
X		sym_dump();
X		comerrno(EX_BAD,
X			"Panic: amnesia in inode data base for '%s'.\n",
X			path);
X	}
X	nnp = nifind_node(itmp, nino);
X	if (nnp) {			/* inode is already in star-tmpdir */
X		if (xdebug)
X			error("unlink(%s)\n", path);
X		if (unlink(path) < 0)
X			comerr("Cannot unlink '%s'.\n", path);
X		purgeent(onp);
X		return;
X	}
X
X	if (xdebug)
X		error("rename(%s, %s)\n", path, tpath);
X	if (rename(path, tpath) < 0)
X		comerr("Cannot rename '%s' to '%s'.\n", path, tpath);
X
X#ifdef	PADD_NODE_DEBUG
X	padd_node_caller = "move2tmp";
X#endif
X	nnp = padd_node(tpath, onp->i_oino, onp->i_nino, onp->i_flags);
X#ifdef	PADD_NODE_DEBUG
X	if (nnp == NULL)
X		errmsgno(EX_BAD, "padd_node(%s, %lld, %lld, %X) = NULL\n",
X			tpath, (Llong)onp->i_oino,
X			(Llong)onp->i_nino, onp->i_flags);
X#endif
X	if (xdebug)
X		error("move2tmp() itmp %p onp %p nnp %p\n", itmp, onp, nnp);
X
X	purgeent(onp);
X	nnp->i_dir = onp->i_dir;
X	for (onp = nnp->i_dir; onp; onp = onp->i_dxnext) {
X		onp->i_dparent = nnp;
X	}
X}
X
X/*
X * Try to move a file from the temp directory to the current directory
X * pointed to by 'dir'.
X */
XLOCAL void
Xmove2dir(dir, name, oino)
X	char	*dir;
X	char	*name;
X	ino_t	oino;
X{
X	char	path[2*PATH_MAX+1];
X	char	tpath[2*PATH_MAX+1];
X	imap_t	*onp;
X	imap_t	*nnp;
X	char	*p;
X
X	js_snprintf(path, sizeof (path), "%s/%s", dir, name);
X	onp = oifind_node(itmp, oino);
X
X#ifdef	RES_DEBUG
X	if (onp)
X		error("move2dir(%s, %s, %lld) = %s\n",
X			dir, name, (Llong)oino, onp->i_name);
X	else
X		error("move2dir(%s, %s, %lld) = NOT FOUND\n",
X			dir, name, (Llong)oino);
X#endif
X
X	if (onp) {
X		js_snprintf(tpath, sizeof (tpath), "%s/%s",
X						sym_tmpdir, onp->i_name);
X		if (xdebug)
X			error("rename(%s, %s)\n", tpath, path);
X		if (rename(tpath, path) < 0) {
X			errmsg("Cannot rename '%s' to '%s'.\n", tpath, path);
X			/* XXX set error code */
X			return;
X		}
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "move2dir";
X#endif
X		nnp = padd_node(path, onp->i_oino, onp->i_nino, onp->i_flags);
X#ifdef	PADD_NODE_DEBUG
X		if (nnp == NULL)
X			errmsgno(EX_BAD, "padd_node(%s, %lld, %lld, %X) = NULL\n",
X				path, (Llong)onp->i_oino,
X				(Llong)onp->i_nino, onp->i_flags);
X#endif
X		if (xdebug) {
X			error("move2dir() itmp %p onp %p nnp %p\n",
X							itmp, onp, nnp);
X		}
X		purgeent(onp);
X		nnp->i_dir = onp->i_dir;
X		for (onp = nnp->i_dir; onp; onp = onp->i_dxnext) {
X			onp->i_dparent = nnp;
X		}
X		return;
X	}
X
X	/*
X	 * XXX Wenn nicht in star-tmpdir, dann
X	 *
X	 * -	hard link zu File versuchen
X	 *
X	 * -	rename einer Directory versuchen und Flag setzen
X	 *
X	 * -	Ist Flag gesetzt, dann Hard Link auf Dir setzen.
X	 */
X	if (xdebug)
X		error("Cannot rename '%s' from '%s'.\n", path, sym_tmpdir);
X
X	onp = oifind_node((imap_t *)0, oino);
X	if (onp == NULL) {
X		if (xdebug)
X			error("Cannot link/move any file to '%s'.\n",
X								path);
X		return;
X	}
X	p = fullname(onp, tpath, &tpath[sizeof (tpath)], TRUE);
X	if (p == NULL) {
X		/* XXX error code */
X		errmsgno(EX_BAD, "Path name '");
X		printfullname(stderr, onp);
X		error("' too long, cannot rename\n");
X		return;
X	}
X	if (xdebug)
X		error("move2dir(%s, %s, %lld) found path => '%s'\n",
X			dir, name, (Llong)oino, tpath);
X
X	if ((onp->i_flags & (I_DIR|I_DID_RENAME)) == I_DIR) {
X		if (xdebug)
X			error("rename(%s, %s)\n", tpath, path);
X		if (rename(tpath, path) < 0) {
X			/* XXX error code */
X			errmsg("Cannot rename(%s, %s)\n", tpath, path);
X		} else {
X#ifdef	PADD_NODE_DEBUG
X			padd_node_caller = "move2dir 2";
X#endif
X			nnp = padd_node(path, onp->i_oino, onp->i_nino, onp->i_flags);
X#ifdef	PADD_NODE_DEBUG
X			if (nnp == NULL)
X				errmsgno(EX_BAD, "padd_node(%s, %lld, %lld, %X) = NULL\n",
X					path, (Llong)onp->i_oino,
X					(Llong)onp->i_nino, onp->i_flags);
X#endif
X			purgeent(onp);
X			nnp->i_flags |= I_DID_RENAME;
X			if ((onp->i_flags & I_DIR) == 0)
X				comerrno(EX_BAD, "Panic: Not a dir '%s'.\n", path);
X			nnp->i_dir = onp->i_dir;
X			for (onp = nnp->i_dir; onp; onp = onp->i_dxnext) {
X				onp->i_dparent = nnp;
X			}
X		}
X		return;
X	}
X	if (xdebug)
X		error("link(%s, %s)\n", tpath, path);
X#ifdef	HAVE_LINK
X	if (link(tpath, path) < 0) {
X#else
X	if (1) {
X#ifdef	ENOSYS
X		seterrno(ENOSYS);
X#else
X		seterrno(EINVAL);
X#endif
X#endif
X		/* XXX error code */
X		errmsg("Cannot link(%s, %s)\n", tpath, path);
X	} else {
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "move2dir 3";
X#endif
X		nnp = padd_node(path, onp->i_oino, onp->i_nino, onp->i_flags);
X#ifdef	PADD_NODE_DEBUG
X		if (nnp == NULL)
X			errmsgno(EX_BAD, "padd_node(%s, %lld, %lld, %X) = NULL\n",
X				path, (Llong)onp->i_oino,
X				(Llong)onp->i_nino, onp->i_flags);
X#endif
X#ifdef	nonono
X		/*
X		 * XXX It is not clear how to handle new hard links
X		 * XXX to directories correctly.
X		 */
X		nnp->i_dir = onp->i_dir;
X		for (onp = nnp->i_dir; onp; onp = onp->i_dxnext) {
X			onp->i_dparent = nnp;
X		}
X#endif
X	}
X}
X
X/*
X * Check whether the target file exists and has a
X * different type or is a dev node with different
X * major/minor numbers. In this case, we need to
X * remove the file. This happend when the original
X * file has been removed and a new (different) file
X * with the same name did get the same inode number.
X */
XEXPORT imap_t *
Xsym_typecheck(info, cinfo, imp)
X	FINFO	*info;
X	FINFO	*cinfo;
X	imap_t	*imp;
X{
X	char	*slashp = NULL;
Xextern	BOOL	uncond;
Xextern	BOOL	nowarn;
X	BOOL	ouncond = uncond;
X	BOOL	onowarn = nowarn;
X
X#ifdef	RES2_DEBUG
X	error("sym_typecheck(%s) NEW type: %s\n",
X			info->f_name,
X			XTTONAME(info->f_rxftype));
X#endif
X#ifdef	RES2_DEBUG
X	seterrno(0);
X#endif
X	/*
X	 * Try to work around a moving POSIX target.
X	 * POSIX.1-1988 requires that stat("/etc/passwd/", ) works.
X	 * While POSIX.1-2001 requires to return ENOTDIR.
X	 */
X	info->f_namelen = strlen(info->f_name);
X	if (info->f_name[info->f_namelen-1] == '/') {
X		slashp = &info->f_name[info->f_namelen-1];
X		*slashp = '\0';
X	}
X	fillbytes((char *)cinfo, sizeof (*cinfo), '\0');
X	if (!_getinfo(info->f_name, cinfo)) {
X		cinfo->f_rxftype = XT_NONE;
X#ifdef	RES2_DEBUG
X		errmsg("sym_typecheck(%s) ---> OLD FILE NOT found\n",
X			info->f_name);
X#endif
X		if (slashp)
X			*slashp = '/';
X		return (imp);
X	}
X
X#ifdef	RES2_DEBUG
X	error("sym_typecheck(%s) OLD FILE found, type: %s\n",
X			info->f_name,
X			XTTONAME(cinfo->f_rxftype));
X#endif
X
X	if (info->f_filetype == cinfo->f_filetype &&
X	    !is_special(cinfo) && !is_symlink(cinfo)) {
X		if (slashp)
X			*slashp = '/';
X		return (imp);
X	}
X
X	uncond = FALSE;
X	nowarn = TRUE;
X	if (is_symlink(cinfo) && same_symlink(cinfo))
X		cinfo->f_flags |= F_SAME;
X	if (is_special(cinfo) && same_special(cinfo))
X		cinfo->f_flags |= F_SAME;
X	uncond = ouncond;
X	onowarn = nowarn;
X
X	if ((is_symlink(cinfo) || is_special(cinfo)) &&
X	    (cinfo->f_flags & F_SAME) == 0) {
X#ifdef	RES2_DEBUG
X		error("sym_typecheck(%s) REMOVE OLD\n",
X			info->f_name);
X#endif
X		removefile(info->f_name);
X		purgeent(imp);
X		if (slashp)
X			*slashp = '/';
X		return (NULL);
X	}
X
X	if (info->f_type == cinfo->f_type) {
X		if (slashp)
X			*slashp = '/';
X		return (imp);
X	}
X
X	if (imp == NULL)
X		return (imp);
X
X	if (is_dir(cinfo)) {
X		imap_t	*cmp;
X
X#ifdef	RES2_DEBUG
X		error("sym_typecheck(%s) MOVE DIRCONT\n",
X			info->f_name);
X#endif
X		for (cmp = imp->i_dir; cmp; cmp = cmp->i_dxnext) {
X			if (cmp->i_flags & I_DELETE)
X				continue;
X
X			move2tmp(info->f_name, cmp->i_name, cmp->i_oino, cmp->i_nino);
X		}
X	}
X
X#ifdef	RES2_DEBUG
X	error("sym_typecheck(%s) REMOVE OLD\n",
X			info->f_name);
X#endif
X	removefile(info->f_name);
X	purgeent(imp);
X	if (slashp)
X		*slashp = '/';
X	return (NULL);
X}
X
XLOCAL BOOL
Xremovefile(name)
X	char	*name;
X{
X	extern	BOOL	force_remove;
X		BOOL	of = force_remove;
X		BOOL	ret;
X
X	if (xdebug)
X		error("REMOVE %s\n", name);
X
X	force_remove = TRUE;
X	ret = remove_file(name, TRUE);
X	force_remove = of;
X	return (ret);
X}
X
XLOCAL BOOL
Xremovetree(name)
X	char	*name;
X{
X	extern	BOOL	force_remove;
X	extern	BOOL	remove_recursive;
X		BOOL	of = force_remove;
X		BOOL	or = remove_recursive;
X		BOOL	ret;
X
X	if (xdebug)
X		error("REMOVE tree %s\n", name);
X
X	force_remove	 = TRUE;
X	remove_recursive = TRUE;
X	ret = remove_file(name, TRUE);
X	force_remove	 = of;
X	remove_recursive = or;
X	return (ret);
X}
X
X/*
X * Needed separately by star_sym
X */
XEXPORT void
Xsym_initmaps()
X{
X	if (himaps == NULL) {
X		register int	hv;
X
X		himaps  = ___malloc(HASH_ENTS * sizeof (imap_t *), "imap hash");
X		hoimaps = ___malloc(HASH_ENTS * sizeof (imap_t *), "oimap hash");
X		hnimaps = ___malloc(HASH_ENTS * sizeof (imap_t *), "nimap hash");
X		for (hv = 0; hv < HASH_ENTS; hv++) {
X			himaps[hv] = 0;
X			hoimaps[hv] = 0;
X			hnimaps[hv] = 0;
X		}
X	}
X}
X
X/*
X * Read in the old inode symbol table
X */
XEXPORT void
Xsym_open(name)
X	char	*name;
X{
X	char	buf[2*PATH_MAX+1];
X	FILE	*f;
X	int	amt;
X	char	*p;
X	Llong	ll;
X	ino_t	oino;
X	ino_t	nino;
X	mode_t	old_umask;
Xstatic	char	td[] = "star-tmpdir/.";
X	imap_t	*ilast = NULL;
X	imap_t	*icwd = NULL;
X	FINFO	finfo;
X
X#define	PERM_BITS	(S_IRWXU|S_IRWXG|S_IRWXO)	/* u/g/o basic perm */
X
X	if (name)
X		f = fileopen(name, "r");
X	else
X		f = fileopen(sym_symtable, "r");
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	if (_getinfo(sym_symtable, &finfo) && !is_file(&finfo)) {
X		errmsgno(EX_BAD, "'%s' is not a file.\n", sym_symtable);
X		comerrno(EX_BAD, "Remove '%s' and try again.\n", sym_symtable);
X	}
X	sym_initmaps();
X
X	old_umask = umask((mode_t)0);
X	umask(PERM_BITS & ~S_IRWXU);
X	if (!create_dirs(td)) {
X		/*
X		 * This also fails if star-tmpdir is not a directory.
X		 */
X		comerrno(EX_BAD, "Cannot create '%s'.\n", sym_tmpdir);
X	}
X	umask(old_umask);
X
X	if (f == NULL)
X		return;
X
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	if (!streql(buf, vers)) {
X		errmsgno(EX_BAD, "Restore version missmatch '%s' '%s'.\n",
X			buf, vers);
X		if (is_star) {
X			comerrno(EX_BAD,
X			"All restores need to be done with the same star version.\n");
X		}
X	}
X	overs = ___savestr(buf);		/* Restore SCHILY.release */
X
X	readheader(f);
X
X	while ((amt = ngetline(f, buf, sizeof (buf))) > 0) {
X		Int32_t	flags;
X
X		checknl(f);
X
X		if (buf[0] == '>' && buf[1] == '\0') {
X			if (iroot == NULL) {
X				iroot = icwd = ilast;
X				icwd->i_dparent = icwd;
X				if (icwd->i_name[0] != '.' || icwd->i_name[1] != '\0')
X					comerrno(EX_BAD, "Bad root dir '%s' in '%s'.\n",
X						icwd->i_name,
X						sym_symtable);
X			} else {
X				icwd->i_dnext = ilast;
X				if (ilast->i_dparent != icwd)
X					comerrno(EX_BAD, "Bad parent dir.\n");
X				ilast->i_dparent = icwd;
X				icwd = ilast;
X			}
X			continue;
X		}
X		if (buf[0] == '<' && buf[1] == '\0') {
X			icwd = icwd->i_dparent;
X			icwd->i_dnext = NULL;
X			continue;
X		}
X
X		p = buf;
X		flags = 0;
X		if (*p == 'D')
X			flags |= I_DIR;
X
X		p++;	/* Skip Flag */
X		p = astollb(p, &ll, 10);
X		if (*p != '\t') {
X			comerrno(EX_BAD,
X				"Missing TAB after old ino in '%s'.\n",
X				sym_symtable);
X		}
X		oino = ll;
X		p = astollb(p, &ll, 10);
X		if (*p != '\t') {
X			comerrno(EX_BAD,
X				"Missing TAB after NEW ino '%s'.\n",
X				sym_symtable);
X		}
X		nino = ll;
X		ilast = add_node(icwd, ++p, oino, nino, flags);
X#ifdef	__needed__
X		if (0) {
X		imap_t	*ip = iroot;
X
X			for (; ip; ip = ip->i_dnext) {
X				printf("%s/", ip->i_name);
X				if (ip == icwd)
X					break;
X			}
X			printf("%s\n", p);
X		}
X#endif
X	}
X	fclose(f);
X
X#ifdef	OLDSYM_DEBUG
X	printsyms(stderr, iroot);
X	printLsyms(stderr, iroot);
X#endif
X}
X
XLOCAL int
Xxgetline(f, buf, len, name)
X	FILE	*f;
X	char	*buf;
X	int	len;
X	char	*name;
X{
X	int	amt;
X
X	seterrno(0);
X	if ((amt = ngetline(f, buf, len)) < 0) {
X		if (geterrno() == 0 && amt == EOF) {
X			/*
X			 * If errno is 0, this must be EOF from getc()
X			 */
X			amt = 0;
X		} else {
X			comerr("Cannot read '%s'.\n", name);
X		}
X	}
X	if (amt == 0)
X		comerrno(EX_BAD, "File '%s' too short.\n", name);
X	if (amt >= len)
X		comerrno(EX_BAD, "Line too long in '%s'.\n", name);
X	checknl(f);
X	return (amt);
X}
X
XLOCAL void
Xchecknl(f)
X	FILE	*f;
X{
X	if (getc(f) != '\n') {
X		comerrno(EX_BAD,
X			"Missing newline at end of record in '%s'.\n",
X			sym_symtable);
X	}
X}
X
X/*
X * Make sure "star-tmpdir" exists and is part of the inode symbol cache.
X * Make sure that "star-symtable" is part of the inode symbol cache if
X * it exists.
X */
XLOCAL void
Xsym_initsym()
X{
X	char	tpath[PATH_MAX+1];
X	FINFO	finfo;
X	imap_t	*imp;
X	char	*dp;
X	int	ents;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	if (!_getinfo(sym_tmpdir, &finfo)) {
X		unlink(sym_lock);
X		comerr("Cannot stat '%s'\n", sym_tmpdir);
X	}
X
X	if (iroot == NULL) {
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "sym_initsym";
X#endif
X		imp = padd_node(".", (ino_t)0, (ino_t)0, I_DIR);
X	}
X	if ((imp = pfind_node(sym_tmpdir)) == NULL) {
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "sym_initsym 2";
X#endif
X		imp = padd_node(sym_tmpdir, (ino_t)0, finfo.f_ino, I_DIR);
X	}
X	if (imp->i_nino != finfo.f_ino)
X		errmsgno(EX_BAD, "sym_initsym(): %s nino change from %lld to %lld flags %X\n",
X			sym_tmpdir,
X			(Llong)imp->i_nino, (Llong)finfo.f_ino,
X			imp->i_flags);
X
X	imp->i_nino = finfo.f_ino;
X	itmp = imp;
X
X	for (imp = imp->i_dir; imp; imp = imp->i_dxnext) {
X		if (imp->i_flags & I_DELETE)
X			continue;
X
X		js_snprintf(tpath, sizeof (tpath), "%s/%s",
X						sym_tmpdir, imp->i_name);
X		if (!_getinfo(tpath, &finfo))
X			purgetree(imp);
X		else
X			tmpnotempty();
X	}
X	ents = 0;
X	dp = fetchdir(sym_tmpdir, &ents, 0, (ino_t **)0);
X	if (dp)
X		free(dp);
X	if (ents > 0)
X		tmpnotempty();
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	if (_getinfo(sym_symtable, &finfo)) {
X		if ((imp = pfind_node(sym_symtable)) == NULL) {
X#ifdef	PADD_NODE_DEBUG
X			padd_node_caller = "sym_initsym 3";
X#endif
X			imp = padd_node(sym_symtable, (ino_t)0, finfo.f_ino, 0);
X		}
X		isym = imp;
X	}
X}
X
XLOCAL void
Xtmpnotempty()
X{
X	errmsgno(EX_BAD, "The directory '%s' is not empty.\n", sym_tmpdir);
X	comerrno(EX_BAD, "Remove all files in '%s' and try again.\n", sym_tmpdir);
X}
X
XLOCAL void
Xpurgeent(imp)
X	imap_t	*imp;
X{
X	if (imp == NULL)
X		return;
X	imp->i_flags |= I_DELETE;
X	free(imp->i_name);
X	imp->i_name = NULL;
X}
X
XLOCAL void
Xpurgetree(imp)
X	imap_t	*imp;
X{
X	if (imp == NULL)
X		return;
X
X	for (; imp; imp = imp->i_dxnext) {
X
X		if (imp->i_flags & I_DELETE)
X			continue;
X
X		purgetree(imp->i_dir);
X		purgeent(imp);
X	}
X}
X
X/*
X * Do some checks and initialisations before the symbols are going to be used
X */
XEXPORT void
Xsym_init(gp)
X	GINFO	*gp;
X{
X	FILE	*f;
X	FINFO	finfo;
X#ifdef	VERS_DEBUG
X	extern	char	*vers;
X
X	error("Star version '%s'\n", vers);
X	error("imaps: %p level %d\n", imaps, gp->dumplevel);
X#endif
X
X	f = fileopen(sym_lock, "wce");
X	if (f == NULL) {
X		comerr("Cannot create '%s', restore is already running.\n",
X			sym_lock);
X	}
X	fclose(f);
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	_getinfo(sym_lock, &finfo);
X	lock_ino = finfo.f_ino;
X
X	if (ogp == NULL)			/* If star-symtable not read */
X		odtype = gp->dumptype;		/* Use this dump type */
X
X	/*
X	 * XXX imaps -> iroot ???
X	 */
X	if (gp->dumplevel == 0 && imaps != NULL) {
X		errmsgno(EX_BAD, "Trying to extract a level 0 dump but '%s' exists.\n", sym_symtable);
X		unlink(sym_lock);
X		comerrno(EX_BAD, "Remove '%s' and try again.\n", sym_symtable);
X	}
X	if (gp->dumplevel > 0 && imaps == NULL) {
X		errmsgno(EX_BAD, "Trying to extract a level %d dump but '%s' does not exist.\n",
X				gp->dumplevel, sym_symtable);
X		unlink(sym_lock);
X		comerrno(EX_BAD, "Restore the level 0 dump first and try again.\n");
X	}
X	if (gp->dumptype != DT_FULL || odtype != DT_FULL) {
X		if (gp->dumptype != DT_FULL) {
X			errmsgno(EX_BAD,
X			"WARNING: This dump is a '%s' dump and not a 'full' dump.\n",
X			dt_name(gp->dumptype));
X		} else {
X			errmsgno(EX_BAD,
X			"WARNING: Restore status is '%s' and not from a 'full' dump.\n",
X			dt_name(odtype));
X		}
X		errmsgno(EX_BAD, "WARNING: An incremental restore may not work correctly.\n");
X		if (!forcerestore) {
X			useforce();
X			/* NOTREACHED */
X		}
X		if (gp->dumptype < odtype)
X			odtype = gp->dumptype;
X	}
X
X	checkheader();	/* Check Dump level & Dump date */
X	sym_initsym();
X}
X
X/*
X * A special version of fgetline() that does not stop on '\n' but only on '\0'.
X */
XEXPORT int
Xngetline(f, buf, len)
X	register	FILE	*f;
X			char	*buf;
X	register	int	len;
X{
X	register int	c	= '\0';
X	register char	*bp	= buf;
X	register int	nul	= '\0';
X
X	for (;;) {
X		if ((c = getc(f)) < 0)
X			break;
X		if (c == nul)
X			break;
X		if (--len > 0) {
X			*bp++ = (char)c;
X		} else {
X			/*
X			 * Read up to end of line
X			 */
X			while ((c = getc(f)) >= 0 && c != nul)
X				/* LINTED */
X				;
X			break;
X		}
X	}
X	*bp = '\0';
X	/*
X	 * If buffer is empty and we hit EOF, return EOF
X	 */
X	if (c < 0 && bp == buf)
X		return (c);
X
X	return (bp - buf);
X}
X
X/*
X * Write back the inode symbol table
X */
XEXPORT void
Xsym_close()
X{
X	char	tpath[PATH_MAX+1];
X	FINFO	finfo;
X	FILE	*f;
X	imap_t	*imp;
X	BOOL	warned = FALSE;
X	BOOL	tmpremove = TRUE;
X	BOOL	ok = TRUE;
X	int	err;
X#ifdef	HAVE_FSYNC
X	int	cnt;
X#endif
X
X	if (!restore_valid) {
X		errmsgno(EX_BAD,
X			"Invalid or empty dump, will not overwrite '%s'\n",
X								sym_symtable);
X		return;
X	}
X	if (_getinfo(sym_symtable, &finfo) &&
X	    rename(sym_symtable, sym_oldsymtable) < 0) {
X		errmsg("Cannot rename %s to %s.\n",
X				sym_symtable, sym_oldsymtable);
X	}
X	f = filemopen(sym_symtable, "wct", S_IRUSR|S_IWUSR);
X	if (f == NULL) {
X		errmsg("Cannot create '%s'.\n", sym_symtable);
X		return;
X	}
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	if (!_getinfo(sym_symtable, &finfo))
X		comerr("Cannot stat '%s'\n", sym_symtable);
X	if ((imp = pfind_node(sym_symtable)) == NULL) {
X
X#ifdef	PADD_NODE_DEBUG
X		padd_node_caller = "sym_close";
X#endif
X		imp = padd_node(sym_symtable, (ino_t)0, finfo.f_ino, 0);
X	}
X	imp->i_nino = finfo.f_ino;
X
X	if (isym == NULL)
X		isym = imp;
X
X	if (getenv("STAR_DEBUG"))
X		tmpremove = FALSE;
X	else if (itmp != NULL)
X		error("Removing all in '%s'.\n", sym_tmpdir);
X	if (itmp != NULL)
X	for (imp = itmp->i_dir; imp; imp = imp->i_dxnext) {
X		if (imp->i_flags & I_DELETE)
X			continue;
X
X		js_snprintf(tpath, sizeof (tpath), "%s/%s",
X						sym_tmpdir, imp->i_name);
X		fillbytes((char *)&finfo, sizeof (finfo), '\0');
X		if (_getinfo(tpath, &finfo)) {
X			if (is_dir(&finfo)) {
X				if (rmdir(tpath) >= 0) {
X					purgeent(imp);
X				} else if (tmpremove) {
X					/*
X					 * This is a shortcut. We do not walk
X					 * through the imap tree but rather
X					 * remove anything we find via readdir.
X					 */
X					if (removetree(tpath))
X						purgeent(imp);
X				}
X			} else {
X				if (tmpremove || finfo.f_nlink > 1) {
X					if (unlink(tpath) >= 0)
X						purgeent(imp);
X				}
X			}
X			if ((imp->i_flags & I_DELETE) == 0 && !warned) {
X				if (tmpremove) {
X					errmsgno(EX_BAD,
X					"A problem occured, not all files in '%s' could be removed.\n",
X					sym_tmpdir);
X				}
X				errmsgno(EX_BAD,
X				"Don't forget to remove the files in '%s'.\n",
X				sym_tmpdir);
X				warned = TRUE;
X			}
X		}
X	}
X
X	writeheader(f);
X	printsyms(f, iroot);
X
X	if (fflush(f) != 0)
X		ok = FALSE;
X#ifdef	HAVE_FSYNC
X	err = 0;
X	cnt = 0;
X	do {
X		if (fsync(fdown(f)) != 0)
X			err = geterrno();
X
X		if (err == EINVAL)
X			err = 0;
X	} while (err == EINTR && ++cnt < 10);
X	if (err != 0)
X		ok = FALSE;
X#endif
X	if (fclose(f) != 0)
X		ok = FALSE;
X	if (ok) {
X		unlink(sym_oldsymtable);
X	} else {
X		xstats.s_restore++;
X		if (rename(sym_oldsymtable, sym_symtable) < 0)
X			errmsg("Cannot rename %s to %s.\n",
X					sym_oldsymtable, sym_symtable);
X	}
X
X	unlink(sym_lock);
X}
X
XLOCAL void
Xsym_dump()
X{
X	FILE	*f;
X
X	f = filemopen(sym_symdump, "wct", S_IRUSR|S_IWUSR);
X	if (f == NULL) {
X		errmsg("Panic: cannot open '%s'\n", sym_symdump);
X		return;
X	}
X	writeheader(f);
X	printsyms(f, iroot);
X	fclose(f);
X}
X
X/*
X * star 1.5 (i386-pc-solaris2.9)	last star
X * partial				last Dump
X * star 1.5 (i386-pc-solaris2.9)	last Dump star
X * exustar				last Dump archive type
X * hugo					last Dump host name
X * /tmp					last Dump filesys
X * partial				last Dump dumptype
X * 1					last Dump dumplevel
X * 0					last Dump reflevel
X * 1097092599.544044			last Dump dumpdate
X * 1096935113.887915			last Dump refdate
X */
XLOCAL void
Xwriteheader(f)
X	FILE	*f;
X{
X	fprintf(f, "%s%c\n", vers, 0);
X	fprintf(f, "%s%c\n", dt_name(odtype), 0);
X	fprintf(f, "%s%c\n", grip->release, 0);
X	fprintf(f, "%s%c\n", hdr_name(grip->archtype), 0);
X	fprintf(f, "%s%c\n", grip->hostname, 0);
X	fprintf(f, "%s%c\n", grip->filesys, 0);
X	fprintf(f, "%s%c\n", dt_name(grip->dumptype), 0);
X	fprintf(f, "%d%c\n", grip->dumplevel, 0);
X	fprintf(f, "%d%c\n", grip->reflevel, 0);
X	fprintf(f, "%10lld.%6.6lld%c\n",
X		(Llong)grip->dumpdate.tv_sec,
X		(Llong)grip->dumpdate.tv_usec,
X		0);
X	fprintf(f, "%10lld.%6.6lld%c\n",
X		(Llong)grip->refdate.tv_sec,
X		(Llong)grip->refdate.tv_usec,
X		0);
X}
X
XLOCAL void
Xreadheader(f)
X	FILE	*f;
X{
X	char	buf[2*PATH_MAX+1];
X	char	*p;
X	Llong	ll;
X
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	odtype = dt_type(buf);			/* Old Dump type */
X
X	ogp = ___malloc(sizeof (*ogp), "ogp");
X	fillbytes(ogp, sizeof (*ogp), '\0');
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	ogp->release = ___savestr(buf);		/* Last dump SCHILY.release */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	ogp->archtype = hdr_type(buf);		/* Last dump SCHILY.archtype */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	ogp->hostname = ___savestr(buf);		/* " SCHILY.volhdr.hostname */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	ogp->filesys = ___savestr(buf);		/* " SCHILY.volhdr.filesys */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	ogp->dumptype = dt_type(buf);		/* " SCHILY.volhdr.dumptype */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	p = astollb(buf, &ll, 10);
X	if (*p != '\0')
X		comerrno(EX_BAD, "Bad dumplevel '%s' in '%s'.\n",
X			buf, sym_symtable);
X	ogp->dumplevel = ll;			/* " SCHILY.volhdr.dumplevel */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	p = astollb(buf, &ll, 10);
X	if (*p != '\0')
X		comerrno(EX_BAD, "Bad reflevel '%s' in '%s'.\n",
X			buf, sym_symtable);
X	ogp->reflevel = ll;			/* " SCHILY.volhdr.reflevel */
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	if (!getdumptime(buf, &ogp->dumpdate))	/* " SCHILY.volhdr.dumpdate */
X		exit(EX_BAD);
X	(void) xgetline(f, buf, sizeof (buf), sym_symtable);
X	if (!getdumptime(buf, &ogp->refdate))	/* " SCHILY.volhdr.refdate */
X		exit(EX_BAD);
X	ogp->gflags = GF_RELEASE | GF_ARCHTYPE | GF_HOSTNAME | GF_FILESYS |
X			GF_DUMPTYPE | GF_DUMPLEVEL | GF_REFLEVEL |
X			GF_DUMPDATE | GF_REFDATE;
X
X}
X
XLOCAL void
Xcheckheader()
X{
X#ifdef	DEBUG
X	extern	FILE	*vpr;
X
X	fprintf(vpr, "Last restored dump:\n");
X	verbose++;
X	if (ogp)
X		griprint(ogp);
X	fprintf(vpr, "This dump:\n");
X	griprint(grip);
X	verbose--;
X#endif
X
X	error("Validating this dump against restored filesystem...\n");
X	if (ogp == NULL) {			/* star-symtable not read */
X		if (grip->dumplevel == 0) {
X			restore_valid = TRUE;
X			error("Dump level 0 on empty filesystem, starting restore.\n");
X			return;
X		}
X	}
X	if (!streql(grip->hostname, ogp->hostname))
X		comerrno(EX_BAD, "Wrong dumphost '%s', last restored dump is from '%s'.\n",
X			grip->hostname, ogp->hostname);
X	if (!streql(grip->filesys, ogp->filesys))
X		comerrno(EX_BAD, "Wrong filesys '%s', last restored dump is from '%s'.\n",
X			grip->filesys, ogp->filesys);
X	if ((grip->dumplevel == ogp->dumplevel) &&
X	    (grip->reflevel == ogp->reflevel) &&
X	    (grip->refdate.tv_sec == ogp->refdate.tv_sec) &&
X	    (grip->dumpdate.tv_sec == ogp->dumpdate.tv_sec)) {
X		comerrno(EX_BAD, "This dump has already been restored.\n");
X	}
X	if ((grip->dumplevel == ogp->dumplevel) &&
X	    (grip->reflevel == ogp->reflevel) &&
X	    (grip->refdate.tv_sec == ogp->refdate.tv_sec) &&
X	    (grip->dumpdate.tv_sec > ogp->dumpdate.tv_sec)) {
X		errmsgno(EX_BAD, "A level %d dump has already been restored.\n",
X			grip->dumplevel);
X		errmsgno(EX_BAD, "Is is sufficient to restore the most recent dump of each level.\n");
X	} else {
X		if (grip->reflevel != ogp->dumplevel) {
X			errmsgno(EX_BAD,
X				"Wrong reflevel %d, last restored dump level was %d.\n",
X				grip->reflevel, ogp->dumplevel);
X			if (!forcerestore) {
X				errmsgno(EX_BAD,
X				"Restore a level %d (or higher) dump with reflevel %d.\n",
X				ogp->dumplevel+1, ogp->dumplevel);
X				useforce();
X				/* NOTREACHED */
X			}
X		}
X		if (grip->refdate.tv_sec != ogp->dumpdate.tv_sec) {
X			if (ogp->dumpdate.tv_sec > grip->refdate.tv_sec) {
X				errmsgno(EX_BAD, "WARNING: refdate %s is older than last restored dump ",
X					dumpdate(&grip->refdate));
X				error("%s.\n", dumpdate(&ogp->dumpdate));
X			} else {
X				errmsgno(EX_BAD, "Wrong refdate %s, last restored dump was from ",
X					dumpdate(&grip->refdate));
X				error("%s.\n", dumpdate(&ogp->dumpdate));
X				if (forcerestore)
X					goto force;
X				useforce();
X				/* NOTREACHED */
X			}
X		}
X	}
X	restore_valid = TRUE;
X	error("Dump is valid, starting restore.\n");
X	return;
Xforce:
X	restore_valid = TRUE;
X	error("Dump is not valid, starting restore because of -force-restore.\n");
X}
X
XLOCAL void
Xuseforce()
X{
X	unlink(sym_lock);
X	comerrno(EX_BAD, "Use -force-restore if you want to restore anyway.\n");
X	/* NOTREACHED */
X}
X
X/*
X * Create a full path name for imp in cp
X */
XLOCAL char *
Xfullname(imp, cp, ep, top)
X	imap_t 	*imp;
X	char	*cp;
X	char	*ep;
X	BOOL	top;
X{
X	int	len;
X
X	if (imp == iroot)
X		return (cp);
X
X	if (imp == NULL) {
X		errmsgno(EX_BAD, "Panic: fullname(NULL)\n");
X		return (NULL);
X	}
X	cp = fullname(imp->i_dparent, cp, ep, FALSE);
X	if (cp == NULL)
X		return (NULL);
X
X	if (imp->i_name == NULL) {
X		errmsgno(EX_BAD, "Panic: fullname NULL i_name\n");
X		return (NULL);
X	}
X	len = strlen(imp->i_name) + (top ? 0:1);
X	if (cp + len >= ep)
X		return (NULL);
X
X	strcpy(cp, imp->i_name);
X	if (!top) {
X		cp += len-1;
X		*cp++ = '/';
X		*cp   = '\0';
X	} else {
X		cp += len;
X	}
X	return (cp);
X}
X
X/*
X * Print a full path name by parsing the tree of parent directories
X */
XLOCAL void
Xprintfullname(f, imp)
X	FILE	*f;
X	imap_t 	*imp;
X{
X	if (imp == iroot)
X		return;
X	printfullname(f, imp->i_dparent);
X	fprintf(f, "/%s", imp->i_name);
X}
X
X/*
X * Print a single symbol to a file
X */
XLOCAL void
Xprintonesym(f, imp)
X	FILE	*f;
X	imap_t 	*imp;
X{
X	/*	Flags	Old ino	New Ino		Name */
X	fprintf(f, "%c %lld	%lld	%s%c\n",
X			imp->i_flags & I_DIR ? 'D':' ',
X			(Llong)imp->i_oino, (Llong)imp->i_nino,
X			imp->i_name,
X			0);
X
X	if (imp->i_oino == 0) {
X		if (imp != itmp && imp != isym) {
X			errmsgno(EX_BAD, "WARNING: No old inode number for ");
X			printfullname(stderr, imp);
X			fprintf(stderr, "\n");
X		}
X	}
X	if (imp->i_nino == 0) {
X		errmsgno(EX_BAD, "WARNING: No new inode number for ");
X		printfullname(stderr, imp);
X		fprintf(stderr, "\n");
X	}
X}
X
X/*
X * Print all symbols to a file
X */
XLOCAL void
Xprintsyms(f, imp)
X	FILE	*f;
X	imap_t 	*imp;
X{
X#ifdef	DEBUG
X	error("nimp %d\n", nimp);
X#endif
X	for (; imp; imp = imp->i_dxnext) {
X
X		if (imp->i_flags & I_DELETE)
X			continue;
X
X		printonesym(f, imp);
X
X		if (imp->i_flags & I_DIR && imp->i_dir) {
X			fprintf(f, ">%c\n", 0);
X			printsyms(f, imp->i_dir);
X			fprintf(f, "<%c\n", 0);
X		}
X	}
X}
X
X
X#ifdef	PRINT_L_SYM
X/*
X * Print a single symbol with long filenames to a file
X */
XLOCAL void
XprintoneLsym(f, imp)
X	FILE	*f;
X	imap_t 	*imp;
X{
X	/*	Flags	Old ino	New Ino		Name */
X	fprintf(f, "%c %lld	%lld	",
X			imp->i_flags & I_DIR ? 'D':' ',
X			(Llong)imp->i_oino, (Llong)imp->i_nino);
X	printfullname(f, imp);
X	fprintf(f, "\n");
X
X	if (imp->i_oino == 0) {
X		if (imp != itmp && imp != isym) {
X			errmsgno(EX_BAD, "WARNING: No old inode number for ");
X			printfullname(stderr, imp);
X			fprintf(stderr, "\n");
X		}
X	}
X}
X
X/*
X * Print all symbols with long filenames to a file
X */
XLOCAL void
XprintLsyms(f, imp)
X	FILE	*f;
X	imap_t 	*imp;
X{
X#ifdef	DEBUG
X	error("nimp %d\n", nimp);
X#endif
X	for (; imp; imp = imp->i_dxnext) {
X
X		if (imp->i_flags & I_DELETE)
X			continue;
X
X		printoneLsym(f, imp);
X
X		if (imp->i_flags & I_DIR && imp->i_dir)
X			printLsyms(f, imp->i_dir);
X	}
X}
X
XEXPORT void
XprintLsym(f)
X	FILE	*f;
X{
X	printLsyms(f, iroot);
X}
X#endif	/* PRINT_L_SYM */
X
X#ifdef	__needed__
X/* EXPORT BOOL */
XLOCAL BOOL
Xdirdiskonly(info, odep, odp)
X	FINFO	*info;
X	int	*odep;
X	char	***odp;
X{
X	register char	**ep1;	   /* Directory entry pointer array (arch) */
X	register char	**ep2 = 0; /* Directory entry pointer array (disk) */
X	register char	*dp2;	   /* Directory names string from disk	   */
X	register char	**oa = 0;  /* Only in arch pointer array	   */
X	register char	**od = 0;  /* Only on disk pointer array	   */
X	register int	i;
X		int	ents1 = -1;
X		int	ents2;
X		int	dlen = 0;  /* # of entries only on disk		*/
X		int	alen = 0;  /* # of entries only in arch		*/
X		BOOL	diffs = FALSE;
X
X	/*
X	 * Old archives had only one nul at the end
X	 * xheader.c already increments info->f_dirlen in this case
X	 * but a newline may appear to be the last char.
X	 * Note that we receicve the space from the xheader
X	 * extract buffer.
X	 */
X	i = info->f_dirlen;
X	if (info->f_dir[i-1] != '\0')
X		info->f_dir[i-1] = '\0';	/* Kill '\n' */
X
X	ep1 = sortdir(info->f_dir, &ents1);	/* from archive */
X	dp2 = fetchdir(info->f_name, &ents2, 0, (ino_t **)0);
X	if (dp2 == NULL) {
X		diffs = TRUE;
X		errmsg("Cannot read dir '%s'.\n", info->f_name);
X		goto no_dircmp;
X	}
X	ep2 = sortdir(dp2, &ents2);		/* from disk */
X
X	if (ents1 != ents2) {
X		if (debug || verbose > 2) {
X			error("Archive ents: %d Disk ents: %d '%s'\n",
X					ents1, ents2, info->f_name);
X		}
X		diffs = TRUE;
X	}
X
X	if (cmpdir(ents1, ents2, ep1, ep2, NULL, NULL, &alen, &dlen) > 0)
X		diffs = TRUE;
X
X	oa = ___malloc(alen * sizeof (char *), "dir diff array");
X	od = ___malloc(dlen * sizeof (char *), "dir diff array");
X	cmpdir(ents1, ents2, ep1, ep2, oa, od, &alen, &dlen);
X
X#ifdef	DEBUG
X	for (i = 0; i < dlen; i++) {
X		error("Only on disk '%s': '%s'\n",
X				info->f_name, od[i] + 1);
X	}
X	for (i = 0; i < alen; i++) {
X		error("Only in archive '%s': '%s'\n",
X				info->f_name, oa[i] + 1);
X	}
X#endif
X
Xno_dircmp:
X	if (odep)
X		*odep = dlen;
X
X	if (dp2)
X		free(dp2);
X	if (ep1)
X		free(ep1);
X	if (ep2)
X		free(ep2);
X	if (odp)
X		*odp = od;
X	else if (od)
X		free(od);
X	if (oa)
X		free(oa);
X
X	return (diffs);
X}
X#endif	/* __needed__ */
END-of-star-1.5.2/star/restore.c
echo x - star-1.5.2/star/bitstring.h
sed 's/^X//' >star-1.5.2/star/bitstring.h << 'END-of-star-1.5.2/star/bitstring.h'
X/* @(#)bitstring.h	1.7 10/08/24 J. Schilling */
X/*
X * Copyright (c) 2003, 2007, 2010 J. Schilling
X *
X * Copyright (c) 1989, 1993
X *	The Regents of the University of California.  All rights reserved.
X *
X * This code is derived from software contributed to Berkeley by
X * Paul Vixie.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X * $FreeBSD: src/sys/sys/bitstring.h,v 1.3 2003/06/13 19:40:13 phk Exp $
X */
X
X#ifndef _BITSTRING_H
X#define	_BITSTRING_H
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef	unsigned char bitstr_t;
X
X/* internal macros */
X				/* byte of the bitstring bit is in */
X#define	_bit_byte(bit) \
X	((bit) >> 3)
X
X				/* mask for the bit within its byte */
X#define	_bit_mask(bit) \
X	(1 << ((bit)&0x7))
X
X/* external macros */
X				/* bytes in a bitstring of nbits bits */
X#define	bitstr_size(nbits) \
X	(((nbits) + 7) >> 3)
X
X				/* allocate a bitstring */
X#define	bit_alloc(nbits) \
X	(bitstr_t *)calloc((size_t)bitstr_size(nbits), sizeof (bitstr_t))
X
X				/* allocate a bitstring on the stack */
X#define	bit_decl(name, nbits) \
X	((name)[bitstr_size(nbits)])
X
X#ifdef	_SCHILY_SCHILY_H	/* initialize a bitstring */
X#define	bit_init(name, nbits) \
X	fillbytes(name, bitstr_size(nbits), '\0')
X#else
X#define	bit_init(name, nbits) \
X	memset(name, '\0', bitstr_size(nbits))
X#endif
X
X#ifdef	_SCHILY_SCHILY_H	/* fill a bitstring */
X#define	bit_fill(name, nbits) \
X	fillbytes(name, bitstr_size(nbits), '\377')
X#else
X#define	bit_fill(name, nbits) \
X	memset(name, '\377', bitstr_size(nbits))
X#endif
X
X				/* is bit N of bitstring name set? */
X#define	bit_test(name, bit) \
X	((name)[_bit_byte(bit)] & _bit_mask(bit))
X
X				/* set bit N of bitstring name */
X#define	bit_set(name, bit) \
X	((name)[_bit_byte(bit)] |= _bit_mask(bit))
X
X				/* clear bit N of bitstring name */
X#define	bit_clear(name, bit) \
X	((name)[_bit_byte(bit)] &= ~_bit_mask(bit))
X
X				/* clear bits start ... stop in bitstring */
X#define	bit_nclear(name, start, stop) do { \
X	register bitstr_t *_name = (name); \
X	register int _start = (start), _stop = (stop); \
X	register int _startbyte = _bit_byte(_start); \
X	register int _stopbyte = _bit_byte(_stop); \
X	if (_startbyte == _stopbyte) { \
X		_name[_startbyte] &=	((0xff >> (8 - (_start&0x7))) | \
X					(0xff << ((_stop&0x7) + 1))); \
X	} else { \
X		_name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \
X		while (++_startbyte < _stopbyte) \
X			_name[_startbyte] = 0; \
X		_name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \
X	} \
X} while (0)
X
X				/* set bits start ... stop in bitstring */
X#define	bit_nset(name, start, stop) do { \
X	register bitstr_t *_name = (name); \
X	register int _start = (start), _stop = (stop); \
X	register int _startbyte = _bit_byte(_start); \
X	register int _stopbyte = _bit_byte(_stop); \
X	if (_startbyte == _stopbyte) { \
X		_name[_startbyte] |= ((0xff << (_start&0x7)) & \
X				    (0xff >> (7 - (_stop&0x7)))); \
X	} else { \
X		_name[_startbyte] |= 0xff << ((_start)&0x7); \
X		while (++_startbyte < _stopbyte) \
X			_name[_startbyte] = 0xff; \
X		_name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \
X	} \
X} while (0)
X
X				/* find first bit clear in name */
X#define	bit_ffc(name, nbits, value) do { \
X	register bitstr_t *_name = (name); \
X	register int _byte, _nbits = (nbits); \
X	register int _stopbyte = _bit_byte(_nbits - 1), _value = -1; \
X	if (_nbits > 0) \
X		for (_byte = 0; _byte <= _stopbyte; ++_byte) \
X			if (_name[_byte] != 0xff) { \
X				bitstr_t _lb; \
X				_value = _byte << 3; \
X				for (_lb = _name[_byte]; (_lb&0x1); \
X				    ++_value, _lb >>= 1); \
X				break; \
X			} \
X	if (_value >= nbits) \
X		_value = -1; \
X	*(value) = _value; \
X} while (0)
X
X				/* find first bit set in name */
X#define	bit_ffs(name, nbits, value) do { \
X	register bitstr_t *_name = (name); \
X	register int _byte, _nbits = (nbits); \
X	register int _stopbyte = _bit_byte(_nbits - 1), _value = -1; \
X	if (_nbits > 0) \
X		for (_byte = 0; _byte <= _stopbyte; ++_byte) \
X			if (_name[_byte]) { \
X				bitstr_t _lb; \
X				_value = _byte << 3; \
X				for (_lb = _name[_byte]; !(_lb&0x1); \
X				    ++_value, _lb >>= 1); \
X				break; \
X			} \
X	if (_value >= nbits) \
X		_value = -1; \
X	*(value) = _value; \
X} while (0)
X
X				/* find first bit clear in name */
X#define	bit_ffcs(name, start, stop, value) do { \
X	register bitstr_t *_name = (name); \
X	register int _start = (start), _stop = (stop); \
X	register int _byte = _bit_byte(_start); \
X	register int _stopbyte = _bit_byte(_stop), _value = -1; \
X	if (_stop >= _start) { \
X		if ((_start&0x7) && \
X		    (_name[_byte] & (0xff >> (8 - (_start&0x7)))) != \
X		    (0xff >> (8 - (_start&0x7)))) { \
X			bitstr_t _lb; \
X			_value = _start; \
X			_lb = _name[_byte]; \
X			for (_lb >>= (8 - (_start&0x7)); (_lb&0x1); \
X			    ++_value, _lb >>= 1); \
X		} else for (; _byte <= _stopbyte; ++_byte) \
X			if (_name[_byte] != 0xff) { \
X				bitstr_t _lb; \
X				_value = _byte << 3; \
X				for (_lb = _name[_byte]; (_lb&0x1); \
X				    ++_value, _lb >>= 1); \
X				break; \
X			} \
X	} \
X	if (_value > _stop) \
X		_value = -1; \
X	*(value) = _value; \
X} while (0)
X
X				/* find first bit set in name */
X#define	bit_ffss(name, start, stop, value) do { \
X	register bitstr_t *_name = (name); \
X	register int _start = (start), _stop = (stop); \
X	register int _byte = _bit_byte(_start); \
X	register int _stopbyte = _bit_byte(_stop), _value = -1; \
X	if (_stop >= _start) { \
X		if ((_start&0x7) && \
X		    (_name[_byte] & (0xff >> (8 - (_start&0x7))))) { \
X			bitstr_t _lb; \
X			_value = _start; \
X			_lb = _name[_byte]; \
X			for (_lb >>= (8 - (_start&0x7)); !(_lb&0x1); \
X			    ++_value, _lb >>= 1); \
X		} else for (; _byte <= _stopbyte; ++_byte) \
X			if (_name[_byte]) { \
X				bitstr_t _lb; \
X				_value = _byte << 3; \
X				for (_lb = _name[_byte]; !(_lb&0x1); \
X				    ++_value, _lb >>= 1); \
X				break; \
X			} \
X	} \
X	if (_value > _stop) \
X		_value = -1; \
X	*(value) = _value; \
X} while (0)
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* !_BITSTRING_H */
END-of-star-1.5.2/star/bitstring.h
echo x - star-1.5.2/star/restore.h
sed 's/^X//' >star-1.5.2/star/restore.h << 'END-of-star-1.5.2/star/restore.h'
X/* @(#)restore.h	1.3 04/09/06 Copyright 2004 J. Schilling */
X/*
X *	Data structures used to map old to new inode numbers
X *	when in incremental restore mode.
X *
X *	Copyright (c) 2004 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_RESTORE_H
X#define	_RESTORE_H
X
X/*
X * Inode mapping from archive and /star-symtable
X */
Xtypedef struct imap imap_t;
X
Xstruct imap {
X/* ? */	imap_t	*i_next;	/* Next in list			*/
X	imap_t	*i_hnext;	/* Next in name hash list	*/
X	imap_t	*i_honext;	/* Next in old inode hash list	*/
X	imap_t	*i_hnnext;	/* Next in new inode hash list	*/
X/* ? */	imap_t	*i_dnext;	/* Next Directory in cwd list	*/
X	imap_t	*i_dparent;	/* Parent Directory		*/
X	imap_t	*i_dir;		/* Directory content		*/
X	imap_t	*i_dxnext;	/* Next entry in Directory cont	*/
X	char	*i_name;	/* File name			*/
X	int	i_hash;		/* File name hash value		*/
X	ino_t	i_oino;		/* Old inode number		*/
X	ino_t	i_nino;		/* New inode number		*/
X	Int32_t	i_flags;	/* Flags (see below)		*/
X};
X
X/*
X * Flags for i_flags:
X */
X#define	I_DIR		0x01	/* This is a directory		*/
X#define	I_NOARCHIVE	0x02	/* Name in archive, file is not	*/
X#define	I_DID_RENAME	0x04	/* Entry (dir) has been renamed	*/
X#define	I_DELETE	0x80	/* Entry has been deleted	*/
X
X#define	I_NO_INO	(ino_t)-1
X
X#endif	/* _RESTORE_H */
END-of-star-1.5.2/star/restore.h
echo x - star-1.5.2/star/scpioman.mk
sed 's/^X//' >star-1.5.2/star/scpioman.mk << 'END-of-star-1.5.2/star/scpioman.mk'
X#ident @(#)scpioman.mk	1.1 04/09/26 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	scpio
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	scpio.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/star/scpioman.mk
echo x - star-1.5.2/star/scpio.1
sed 's/^X//' >star-1.5.2/star/scpio.1 << 'END-of-star-1.5.2/star/scpio.1'
X. \" @(#)scpio.1	1.6 07/06/03 Copyright (C) 1997 by The Open Group, Copyright (C) 2004 J. Schilling
X. \" Manual page for scpio
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH SCPIO 1L "07/06/03" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xscpio \- copy file archives in and out (LEGACY)
X.SH SYNOPSIS
X.B
Xscpio
X[
X.I "other options
X]
X\-o[aBcv]
X.br
X.B
Xscpio
X[
X.I "other options
X]
X\-i[Bcdmruvf]
X[
X.I "pattern ...
X]
X.br
X.B
Xscpio
X[
X.I "other options
X]
X\-it[Bcvf]
X[
X.I "pattern ...
X]
X.br
X.B
Xscpio
X[
X.I "other options
X]
X\-p[adlmuv]
X.I directory
X.SH DESCRIPTION
XThe
X.B scpio
Xutility, depending on the options used:
X.TP
X.B \(bu
Xcopies files to an archive file
X.TP
X.B \(bu
Xextracts files from an archive file
X.TP
X.B \(bu
Xlists files from an archive file
X.TP
X.B \(bu
Xcopies files from one directory tree to another.
X. \" .SH RETURNS
X. \" .SH ERRORS
X.SH OPTIONS
XThe
X.B scpio
Xutility supports the XBD specification Utility Syntax
XGuidelines. The 
X.B cpio 
Xstandard does not allow
Xthe option modifiers to be presented as
Xseparate arguments from the option letters.
XThe
X.B scpio
Ximplementation allows option modifiers to be presented as
Xseparate arguments from the option letters. When writing
Xportable shell scripts do never make use of this feature.
X.PP
XThe following options are supported:
X.TP
X.B \-o
X(Copy Out.) Read the standard input to obtain a list of
Xpathnames and copy those files onto the standard output
Xtogether with pathname and status information. Output is
Xpadded to a 512-byte boundary.
X.TP
X.B \-i
X(Copy In.) Extract files from the standard input, which is
Xassumed to be the product of a previous
X.BR "scpio \-o" .
XOnly files
Xwith names that match
X.I patterns
Xare selected. The extracted
Xfiles are conditionally created and copied into the current
Xdirectory tree based upon the options described below. The
Xpermissions of the files will be those of the previous
X.BR "scpio \-o" .
XThe owner and group of the files will be that of the
Xcurrent user unless the user has appropriate privileges,
Xwhich causes
X.B scpio
Xto retain the owner and group of the files
Xof the previous
X.BR "scpio \-o" .
XIf the archive being read does not
Xmatch the modifier specified,
X.B scpio
Xmay consider this to be an
Xerror and exit or may recognise the archive and continue
Xprocessing. Only a user with appropriate privileges can
Xextract block special or character special files from an
Xarchive.
X.TP
X.B \-it
X(List.) List files from the archive. This is a sub mode of the
Xcopy in mode, no files are created in list mode.
X.TP
X.B \-p
X(Pass.) Read the standard input to obtain a list of pathnames
Xof files that are conditionally created and copied into the
Xdestination directory tree based upon the option modifiers
Xdescribed below.
X.PP
XThe following option modifiers can be appended in any sequence to
Xthe
X.BR \-o ", " \-i " or " \-p
Xoptions:
X.TP
X.B a
XReset access times of input files after they have been
Xcopied. (When option
X.B l
X(see below) is also specified, the
Xaccess times of the linked files are not reset.)
X.TP
X.B B
XBlock input/output 5120 bytes to the record (does not apply
Xto the
X.B \-p
Xoption; meaningful only with data directed to or
Xfrom character special files).
X.TP
X.B d
XCreate directories as needed.
X.TP
X.B c
XWrite or read header information in character form for
Xportability.
XNote that the Open Group standard does not specify the archive
Xformat that should be used with the
X.B c
Xoption.
XFor this reason it is questionable wether the
X.B c
Xoption increases portability in general.
X.sp
XThe archive format used by
X.B scpio
Xwith the
X.B c
Xoption is the format from the
X.B "\-H asc
Xoption.
XIt gives best
X.B cpio
Xcompatibility when transferring files to SVR4-based systems
X(except that the file size is limited to 2\ gigabytes).
XWhen transferring files in
X.B cpio
Xarchives to unknown operating systems, it is unwise to use the
X.BR c "\ option.
X.TP
X.B r
XInteractively rename files. For each archive member matching
X.I pattern
Xoperand, a prompt will be written to the file
X.BR /dev/tty .
XThe prompt will contain the name of the archive
Xmember, but the format is otherwise unspecified. A line will
Xthen be read from 
X.BR /dev/tty .
XIf this line is blank, the
Xarchive member will be skipped. If this line consists of a
Xsingle period, the archive member will be processed with no
Xmodification to its name. Otherwise, its name will be
Xreplaced with the contents of the line. The
X.B scpio
Xutility will
Ximmediately exit with a non-zero exit status if end-of-file is
Xencountered when reading a response, or if
X.B /dev/tty
Xcannot be
Xopened for reading and writing.
X.TP
X.B t
XWrite a table of contents of the input. No files are created.
X.TP
X.B u
XCopy unconditionally (normally, an older file will not
Xreplace a newer file with the same name).
X.TP
X.B v
XVerbose: print the names of the affected files. With the
X.B t
Xoption, provides a detailed listing.
X.TP
X.B l
XWhenever possible, link files rather than copying them.
XUsable only with the
X.B \-p
Xoption.
XThe
X.B l
Xoption modifier is not yet supported by
X.BR scpio .
X
X.TP
X.B m
XRetain previous file modification time. This option is
Xineffective on directories that are being copied.
X.TP
X.B f
XCopy in all files except those in
X.IR patterns .
X
X.PP
XThe following 
X.I "other options
Xare implemented as 
X.B SVr4 compliant
Xextension to the Open Group standard:
X.PP
X.TP
X.B \-6
XExtract
X.B UNIX System Sixth Edition
Xcpio archives. This option is not valid in archive create mode,
Xit is mutually exclusive with
X.BR \-c ,
X.BR \-H ,
Xand
X.BR artype= .
XAs is is unclear how
X.B UNIX System Sixth Edition
Xcpio archives look like, this option is currently unsupported.
X.TP
X.B \-@
XInclude extended file attributes in the archive.
XThis option is currently unsupported.
X.TP
X.B \-A
XAppend files to an existing archive.
XThe
X.B \-A
Xoption only works together with the
X.B \-O 
Xoption.
XSee
X.B star -r
Xfor more information.
X.TP
X.B \-b
XReverses the order of the bytes within each word.
XIt is unclear what a
X.I word
Xis supposed to be.
XThis option is unsupported but not needed as
X.B scpio
Xincludes automatic byte order recognition.
X.TP
X.BI \-C " #
XSets (input/output) archive block size to # bytes.
X.TP
X.BI \-E " name
XRead filenames for store/create/list command from
X.IR name .
XThe file
X.I name
Xmust contain a list of filenames, each on a separate line.
X.TP
X.BI \-H " header
XSet the archive type to
X.IR header .
XSee
X.BR star (1)
Xfor more information.
X.TP
X.BI \-I " nm
XUse
X.I nm
Xas archive file name instead of stdin.
X.TP
X.B \-k
XTry to skip corrupt archive headers.
X.TP
X.B \-L
XFollow symbolic links as if they were files.
X.TP
X.BI \-M " message
XDefine a message that is uses when switching media.
XThis option is currently unsupported.
X.TP
X.BI \-O " nm
XUse
X.I nm
Xas archive file name instead of stdout.
X.TP
X.B \-P
XHandle 
X.B Access Control List
X(ACL) information in create and extract mode.
XSee
X.B star -acl
Xfor more information.
X.TP
X.BI \-R " nm
XReassign ownership and group for all files based on
X.IR nm .
XThis option is currently unsupported.
X.TP
X.B \-s
XReverses the order of the bytes within each word.
XIt is unclear what a
X.I word
Xis supposed to be.
XThis option is unsupported but not needed as
X.B scpio
Xincludes automatic byte order recognition.
X.TP
X.B \-S
XReverses the order of the halfwords within each word.
XIt is unclear what a
X.I word
Xis supposed to be.
XThis option is unsupported but not needed as
X.B scpio
Xincludes automatic byte order recognition.
X.TP
X.B \-V
XSpecial verbose. Print a dot for each file that is read or written.
XThis option is currently unsupported.
X.PP
XThe following 
X.I "other options
Xare implemented as 
X.B star
Xextension to the Open Group standard:
X.TP
X.B \-help
XPrints a summary of the most important options for
X.BR scpio (1)
Xand exits.
X.TP
X.B \-xhelp
XPrints a summary of the less important options for
X.BR scpio (1)
Xand exits.
X.TP
X.B \-version
XPrints the 
X.B scpio
Xversion number string and exists.
X.TP
X.B \-/
XDon't strip leading slashes from file names when extracting an archive.  
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B ..
XDon't skip files that contain /../ in the name.
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-7z
Xrun the input or output through a
X.B p7zip
Xpipe - see option
X.B \-z
Xbelow.
X.sp
XNote that the
X.B p7zip
Xprogram currently does not operate on a pipe but on a
X/tmp file copy and thus limits the maximum archive size.
X
X.TP
X.B \-acl
XHandle 
X.B Access Control List
X(ACL) information in create and extract mode.
XSee
X.BR star (1)
Xfor more information.
X.TP
X.BI artype= header
XSet the archive type to
X.IR header .
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-lzo
XRun the input or output through a
X.B lzop
Xpipe - see option
X.B \-z
Xbelow.
X.TP
X.B \-bz
XRun the input or output through a
X.B bzip2
Xpipe - see option
X.B \-z
Xbelow. As the
X.B \-bz
Xthe
X.B \-z
Xoptions are non standard, it makes sense to omit
X.B \-bz  
Xoptions the inside shell scripts.
XIf you are going to extract a compressed archive that is located
Xinside a plain file,
X.B scpio
Xwill auto detect compression and choose the right
Xdecompression option to extract.
X.TP
X.BI bs= #
XSet block size to #. You may use the same method as in
X.BR dd (1)
Xand
X.BR sdd (1). 
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-fifostats
XPrint fifo statistics at the end of a
X.B scpio
Xrun when the fifo has been in effect.
X.TP
X.BI fs= #
XSet fifo size to #.
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-no\-fifo
XDo not use a fifo to optimize data flow from/to tape.
XSee 
X.BR star (1)
Xfor more information.
X.TP
X.B \-no\-fsync
XDo not call
X.BR fsync (2)
Xfor each file that has been extracted from the archive.
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-no-statistics
XDo not print statistic messages at the end of a
X.B scpio
Xrun.
X.TP
X.B \-secure\-links
XDo not extract hard links or symbolic links if the link
Xname (the target of the link) starts with a slash (/)
Xor if /../ is contained in the link name. 
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-numeric
XUse the numeric user/group fields in the listing rather than the default.
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B \-time
XPrint timing info.
XSee
X.BR star (1)
Xfor more information.
X.TP
X.B -xfflags
XStore and extract extended file flags as found on BSD
Xand Linux systems.
XSee
X.B star -acl
Xfor more information.
X.TP
X.B \-z
XRun the input or output through a
X.B gzip
Xpipe - see option
X.B \-bz
Xabove. As the
X.B \-bz
Xthe
X.B \-z
Xoptions are non standard, it makes sense to omit
X.B \-bz  
Xoptions the inside shell scripts.
XIf you are going to extract a compressed archive that is located
Xinside a plain file,
X.B scpio
Xwill auto detect compression and choose the right
Xdecompression option to extract.
X
X.SH OPERANDS
X.PP
XThe following operands are supported:
X.TP
X.I directory
XA pathname of an existing directory to be used as the target
Xof
X.BR "scpio \-p" .
X.TP
X.I pattern
XExpressions making use of a pattern-matching notation similar
Xto that used by the shell for filename pattern matching, and
Xsimilar to regular expressions. The following metacharacters
Xare defined:
X.RS
X.TP
X.B "*"
XMatches any string, including the empty string.
X.TP
X.B "?"
XMatches any single character.
X.TP
X.B "[...]"
XMatches any one of the enclosed characters. A pair of
Xcharacters separated by `-' matches any symbol between
Xthe pair (inclusive), as defined by the system default
Xcollating sequence. If the first character following the
Xopening `[' is a `!', the results are unspecified.
X.PP
XIn
X.IR pattern ,
Xthe special characters "?", "*" and "[" also
Xmatch the "/" character. Multiple cases of
X.I pattern
Xcan be
Xspecified and if no
X.I pattern
Xis specified, the default for
X.I pattern
Xis "*" (that is, select all files).
X.PP
XNote that
X.B scpio
Xdoes not use
X.BR fnmatch (3)
Xbased pattern matching as documented above,
Xit rather uses the pattern matcher documented in
X.BR match (1).
X.RE
X.SH STDIN
X.PP
XWhen the
X.BR \-o " or " \-p
Xoptions are used, the standard input is a text
Xfile containing a list of pathnames, one per line, to be copied.
X.PP
XWhen the
X.B \-i
Xoption is used, the standard input is an archive file
Xformatted in any way that is understood by the archive handling
Xengine (see
X.B "\-H help
Xoption for a complete list).
X.SH "INPUT FILES
X.PP
XThe files identified by the pathnames in the standard input are of
Xany type.
X.PP
XWhen the
X.B \-r
Xoption is used, the file
X.B /dev/tty
Xis used to write
Xprompts and read responses.
X.SH "ASYNCHRONOUS EVENTS
X.PP
XDefault.
X.SH STDOUT
XWhen the
X.B \-o
Xoption is used, the standard output is an archive file
Xformatted as specified by
X.B pax
Xwith the
X.B "\-x cpio
Xoption. For better compatibility with SVR4-based systems that
Xdo not implement the 
X.B cpio
Xformat correctly,
X.B scpio
Xby default limits the length of file names to 256 bytes.
XUse 
X.B "scpio \-H cpio
Xto explicitly switch to the full POSIX 1003.1-1988
X.B cpio
Xarchive format.
X.PP
XOtherwise,
Xthe standard output contains commentary in an unspecified format
Xconcerning the progress of the execution.
X.SH STDERR
XWhen the
X.B \-o
Xoption is not used, the standard error contains
Xcommentary in an unspecified format concerning the progress of the
Xexecution. Otherwise, the standard error is used only for
Xdiagnostic messages.
X.SH "OUTPUT FILES
XOutput files are created, as specified by the archive, when the
X.B \-i
Xor
X.B \-p
Xoptions are used.
X.SH "EXTENDED DESCRIPTION
X.PP
XNone.
X
X.SH "EXIT STATUS
X.PP
XThe following exit values are returned:
X.TP
X.B 0
XSuccessful completion.
X.TP
X.B >0
XAn error occurred.
X.SH "CONSEQUENCES OF ERRORS
X.PP
XIf a file or directory cannot be created or overwritten,
X.B scpio
Xcontinues with the next file in the archive or file to be added to
Xthe archive.
X
X.SH "APPLICATION USAGE
X.PP
XArchives created by
X.B scpio
Xare portable between XSI-conformant
Xsystems provided the same procedures are used.
X.PP
XThe shell metacharacter notation is not fully compatible with that
Xused by the shell and the
X.B pax
Xutility. Not all systems support the
Xuse of the negation character [! ...] in
X.B cpio
Xpatterns. Portable
Xapplications must avoid the use of this notation.
X.PP
XFor portable communication of data between XSI-conformant systems,
Xit is recommended that only characters defined in the
XISO/IEC 646:1991 standard International Reference Version
X(equivalent to ASCII) 7-bit range of characters be used and that
Xonly characters defined in the Portable Filename Character Set be
Xused for naming files. This recommendation is given because
XXSI-conformant systems support diverse codesets and run in various
Xgeographical areas and there is no single, well-established
Xcodeset that incorporates all of the characters of the languages
Xof the various geographical areas.
X.PP
XThe
X.B cpio
Xarchive format only supports file sizes up to 8\ gigabytes.
X.PP
XApplications should migrate to the
X.B pax
Xarchive format which is the POSIX 1003.1-2001 standard archive format
Xand based on an extended
X.B tar
Xformat.
X
X.SH "FUTURE DIRECTIONS
XNone.
X
X.SH EXAMPLES
X.PP
X1. Copy the contents of a directory onto an archive:
X.PP
X.B          ls | scpio -o >../cpio.out
X.PP
X2. Duplicate a directory hierarchy:
X.PP
X.B          cd olddir
X.br
X.B          find . -depth -print | scpio -pd ../newdir
X
X.SH ENVIRONMENT
X.PP
XThe following environment variables may affect the execution of
X.BR scpio :
X.TP
X.B TZ
XDetermine the timezone used with date and time strings.
X.\".SH FILES
X.SH "SEE ALSO"
X.BR ar (1),
X.BR find (1),
X.BR sfind (1),
X.BR ls (1),
X.BR match (1),
X.BR pax (1),
X.BR spax (1),
X.BR tar (1),
X.BR star (1).
X.SH DIAGNOSTICS
X.SH NOTES
X.PP
XThe default block size for
X.B cpio
Xis 512 bytes, this slows down write speed.
XUse 
X.BR \-B ", " \-C ", or " bs=
Xto set a different block size.
X.PP
X.B "Scpio -iu
Xis equivalent to
X.B "star \-xU \-install \-force\-remove \-remove\-recursive
Xand for this reason may remove nonempty directory trees in extrace mode
Xwithout printing a warning.
X.PP
XThe Open Group,
Xhave given us permission to reprint portions of their documentation. In
Xthe following statement, the phrase ``this text'' refers to portions of
Xthe system documentation.
X.PP
XPortions of this text are reprinted and reproduced in electronic form
Xin the 
X.B scpio
Xmanual,
Xfrom The Open Group Base Specifications
XIssue 5, Copyright (C) 1997 by The Open Group. In the event
Xof any discrepancy between these versions and the original
Xspecification, the original The Open Group Standard is the
Xreferee document. The original Standard can be obtained online at
X.BR "http://www.opengroup.org/unix/single_unix_specification_v2" .
X.SH BUGS
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xschilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu\-berlin.de
END-of-star-1.5.2/star/scpio.1
echo x - star-1.5.2/star/spaxman.mk
sed 's/^X//' >star-1.5.2/star/spaxman.mk << 'END-of-star-1.5.2/star/spaxman.mk'
X#ident @(#)spaxman.mk	1.1 04/09/26 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	spax
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	spax.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/star/spaxman.mk
echo x - star-1.5.2/star/gnutarman.mk
sed 's/^X//' >star-1.5.2/star/gnutarman.mk << 'END-of-star-1.5.2/star/gnutarman.mk'
X#ident @(#)gnutarman.mk	1.1 04/09/26 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	gnutar
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	gnutar.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/star/gnutarman.mk
echo x - star-1.5.2/star/gnutar.1
sed 's/^X//' >star-1.5.2/star/gnutar.1 << 'END-of-star-1.5.2/star/gnutar.1'
X. \" @(#)gnutar.1	1.3 04/09/26 Copyr 2004 J. Schilling
X. \"  Manual Seite fuer gnutar
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U
X.if t .ds s \\(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH GNUTAR 1 "04/09/26" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xgnutar \- emulates the GNU version of the tar archiver
X.SH SYNOPSIS
X.B "gnutar\ "
X.I command
X[
X.I options
X] 
X.I file1 .\|.\|. filen
X.SH DESCRIPTION
X.PP
XThis manual page documents the GNU version of
X.BR tar ,
Xan archiving program designed to store and extract files from 
Xan archive file known as a 
X.IR tarfile.
XA 
X.IR tarfile 
Xmay be made on a tape drive, however, it is also common
Xto write a
X.IR tarfile
Xto a normal file. 
XThe first argument to 
X.B gnutar
Xmust be one of the options:
X.BR Acdrtux ,
Xfollowed by any optional functions.
XThe final arguments to 
X.B gnutar
Xare the names of the files or directories which should be archived. The use
Xof a directory name always implies that the subdirectories below should be
Xincluded in the archive.
X.SH COMMAND
X.TP
X.B "One of the following commands must be used:
X.TP
X.BR \-A ", " \-\-catenate ", " \-\-concatenate
Xappend tar files to an archive
X.TP
X.BR \-c ", " \-\-create	
Xcreate a new archive
X.TP
X.BR \-d ", " \-\-diff ", " \-\-compare
Xfind differences between archive and file system
X.TP
X.B \-\-delete
Xdelete from the archive (not for use on mag tapes!)
X.TP
X.BR \-r ", " \-\-append
Xappend files to the end of an archive
X.TP
X.BR \-t ", " \-\-list	
Xlist the contents of an archive
X.TP
X.BR \-u ", " \-\-update		
Xonly append files that are newer than copy in archive
X.TP
X.BR \-x ", " \-\-extract ", " \-\-get		
Xextract files from an archive
X.SH OPTIONS
X.TP
X.B \-\-atime\-preserve	
Xdon't change access times on dumped files
X.TP
X.BR \-b ", " \-\-block\-size " N	
Xblock size of Nx512 bytes (default N=20)
X.TP
X.BR \-B ", " \-\-read\-full\-blocks	
Xreblock as we read (for reading 4.2BSD pipes)
X.TP 
X.BR \-C ", " \-\-directory " DIR	
Xchange to directory DIR
X.TP 
X.B \-\-checkpoint		
Xprint directory names while reading the archive
X.TP
X.BR \-f ", " \-\-file " [HOSTNAME:]F	
Xuse archive file or device F (default /dev/rmt0)
X.TP
X.B \-\-force\-local		
Xarchive file is local even if has a colon
X.TP 
X.BR \-F ", " \-\-info\-script " F, " \-\-new\-volume\-script " F
Xrun script at end of each tape (implies \-M)
X.TP
X.BR \-G ", " \-\-incremental	
Xcreate/list/extract old GNU-format incremental backup
X.TP
X.BR \-g ", " \-\-listed\-incremental " F
Xcreate/list/extract new GNU-format incremental backup
X.TP 
X.BR \-h ", " \-\-dereference	
Xdon't dump symlinks; dump the files they point to
X.TP
X.BR \-i ", " \-\-ignore\-zeros	
Xignore blocks of zeros in archive (normally mean EOF)
X.TP
X.BR \-j ", " \-\-bzip
Xfilter the archive through bzip2.
X.TP
X.B \-\-ignore\-failed\-read	
Xdon't exit with non-zero status on unreadable files
X.TP
X.BR \-k ", " \-\-keep\-old\-files	
Xkeep existing files; don't overwrite them from archive
X.TP
X.BR \-K ", " \-\-starting\-file " F
Xbegin at file F in the archive
X.TP
X.BR \-l ", " \-\-one\-file\-system	
Xstay in local file system when creating an archive
X.TP
X.BR \-L ", " \-\-tape\-length " N
Xchange tapes after writing N*1024 bytes
X.TP
X.BR \-m ", " \-\-modification\-time
Xdon't extract file modified time
X.TP
X.BR \-M ", " \-\-multi\-volume	
Xcreate/list/extract multi-volume archive
X.TP
X.BR \-N ", " \-\-after\-date " DATE, " \-\-newer " DATE
Xonly store files newer than DATE
X.TP
X.BR \-o ", " \-\-old\-archive  ", " \-\-portability
Xwrite a V7 format archive, rather than ANSI format
X.TP
X.BR \-O ", " \-\-to\-stdout		
Xextract files to standard output
X.TP
X.BR \-p ", " \-\-same\-permissions ", " \-\-preserve\-permissions 
Xextract all protection information
X.TP
X.BR \-P ", " \-\-absolute\-paths	
Xdon't strip leading `/'s from file names
X.TP
X.B \-\-preserve		
Xlike
X.BR "\-p \-s" .
X.TP
X.BR \-R ", " \-\-record\-number	
Xshow record number within archive with each message
X.TP 
X.B \-\-remove\-files		
Xremove files after adding them to the archive
X.TP
X.BR \-s ", " \-\-same\-order ", " \-\-preserve\-order	
Xlist of names to extract is sorted to match archive
X.TP
X.B \-\-same\-owner
Xcreate extracted files with the same ownership 
X.TP
X.BR \-S ", " \-\-sparse		
Xhandle sparse files efficiently
X.TP 
X.BR \-T ", " \-\-files\-from= " F	
Xget names to extract or create from file F
X.TP
X.B \-\-null			
X\-T reads null-terminated names, disable \-C
X.TP
X.B \-\-totals
Xprint total bytes written with \-\-create
X.TP
X.BR \-v ", " \-\-verbose
Xverbosely list files processed
X.TP
X.BR \-V ", " \-\-label " NAME
Xcreate archive with volume name NAME
X.TP 
X.B \-\-version		
Xprint
X.B gnutar
Xprogram version number
X.TP
X.BR \-w ", " \-\-interactive ", " \-\-confirmation	
Xask for confirmation for every action
X.TP
X.BR \-W ", " \-\-verify
Xattempt to verify the archive after writing it
X.TP
X.BI \-\-exclude " FILE		
Xexclude file FILE
X.TP
X.BR \-X ", " \-\-exclude\-from " FILE	
Xexclude files listed in FILE
X.TP
X.BR \-Z ", " \-\-compress ", " \-\-uncompress      	
Xfilter the archive through compress
X.TP 
X.BR \-z ", " \-\-gzip ", " \-\-ungzip		
Xfilter the archive through gzip
X.TP
X.BI \-\-use\-compress\-program " PROG
Xfilter the archive through PROG (which must accept \-d)
X.SH "EXTENDED OPTIONS
X.PP
XThe extended options are options taken from
X.BR star .
X.TP
X.B \-\-help
XPrints a summary of the most important options for
X.BR gnutar (1)
Xand exits.
X.TP
X.B \-\-xhelp
XPrints a summary of the less important options for
X.BR gnutar (1)
Xand exits.
X.TP
X.B \-\-version
XPrints the 
X.B gnutar
Xversion number string and exists.
X.TP
X.B \-\-debug
Xprint additional debug messages
X.TP
X.BI xdebug= #
X.TP
X.BI xd= #
Xset extended debug level
X.TP
X.B \-/
Xdon't strip leading '/'s from file names
X.TP
X.B \-..
Xdon't skip filenames that contain '..' in non-interactive extract
X.TP
X.B \-\-secure\-links
Xdon't extract links that start with '/' or contain '..'
X.TP
X.B \-\-acl
Xhandle access control lists
X.TP
X.B \-\-xfflags
Xhandle extended file flags
X.TP
X.BI bs= #
Xset (output) block size to #
X.TP
X.BI fs= #
Xset fifo size to #
X.TP
X.B \-\-no\-fsync
Xdo not call fsync() for each extracted file (may be dangerous)
X.TP
X.B \-\-time
X print timing info
X.TP
X.B \-\-no\-statistics
Xdo not print statistics
X.TP
X.B \-\-fifostats
Xprint fifo statistics
X.TP
X.B \-\-no\-fifo
Xdon't use a fifo to optimize data flow from/to tape
X.TP
X.B \-\-numeric
Xdon't use user/group name from tape
X.PP
XThe options above are not defined by GNU tar.
X.PP
XFor a complete documentation of the
X.B star
Xbased optione check
X.BR star (1).
X
X.SH EXAMPLES
X.SH ENVIRONMENT
X.SH FILES
X.SH "SEE ALSO"
X.BR spax (1), 
X.BR suntar (1), 
X.BR scpio (1), 
X.BR tar (1), 
X.BR cpio (1), 
X.BR pax (1), 
X.BR rcp (1), 
X.BR mt (1),
X.BR rmt (1), 
X.BR match (1), 
X.BR dd (1), 
X.BR sdd (1), 
X.BR rsh (1),
X.BR ssh (1),
X.BR star (1),
X.BR star (4/5),
X.BR rcmd (3),
X.BR fssnap (1m)
X.SH DIAGNOSTICS
X.SH NOTES
X.PP
XThis
X.B gnutar
Ximplementation is based on the
X.B star
Ximplementation and does not implement all features of the original GNU tar
Xprogram.
X.SH BUGS
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xschilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu\-berlin.de
END-of-star-1.5.2/star/gnutar.1
echo x - star-1.5.2/star/suntar.1
sed 's/^X//' >star-1.5.2/star/suntar.1 << 'END-of-star-1.5.2/star/suntar.1'
X. \" @(#)suntar.1	1.8 08/03/19 Copyr 2004-2008 J. Schilling
X. \"  Manual Seite fuer suntar
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U
X.if t .ds s \\(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH STUNAR 1 "08/03/19" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xsuntar \- create tape archives and add or extract files
X.SH SYNOPSIS
X.B "suntar\ "
X.I command
X[
X.I options
X] 
X.I file1 .\|.\|. filen
X.SH DESCRIPTION
X.PP
XThis manual page documents an emulation of the Sun version of
X.BR tar .
XIt has been implemented on top of the
X.B star
Xprogram.
X.PP
XFor a description of the Sun tar program check the Sun tar manual page.
X.SH OPTIONS
X.B Star
Xsupports the Sun tar options.
X
X.SH "EXTENDED OPTIONS
X.PP
XThe extended options are options taken from
X.BR star .
X.TP
X.B \-\-help
XPrints a summary of the most important options for
X.BR suntar (1)
Xand exits.
X.TP
X.B \-\-xhelp
XPrints a summary of the less important options for
X.BR suntar (1)
Xand exits.
X.TP
X.B \-\-version
XPrints the 
X.B suntar
Xversion number string and exists.
X.TP
X.B \-\-debug
Xprint additional debug messages
X.TP
X.BI xdebug= #
X.TP
X.BI xd= #
Xset extended debug level
X.TP
X.BI artype= headertype
XGenerate a tape archive in
X.I headertype
Xformat. 
XFor more information, see
X.BR star (1) .
X.TP
X.B \-/
Xdon't strip leading '/'s from file names
X.TP
X.B \-\-..
Xdon't skip filenames that contain '..' in non-interactive extract
X.TP
X.B \-\-7z
Xrun the input or output through a
X.B p7zip
Xpipe - see option
X.B \-z
Xbelow.
X.sp
XNote that the
X.B p7zip
Xprogram currently does not operate on a pipe but on a
X/tmp file copy and thus limits the maximum archive size.
X.TP
X.B \-\-secure\-links
Xdon't extract links that start with '/' or contain '..'
X.TP
X.B \-\-acl
Xhandle access control lists
X.TP
X.B \-\-xfflags
Xhandle extended file flags
X.TP
X.BI bs= #
Xset (output) block size to #
X.TP
X.BI fs= #
Xset fifo size to #
X.TP
X.B \-\-no\-fsync
Xdo not call fsync() for each extracted file (may be dangerous)
X.TP
X.B \-\-time
X print timing info
X.TP
X.B \-\-no\-statistics
Xdo not print statistics
X.TP
X.B \-\-do\-statistics
Xrint statistics
X.TP
X.B \-\-fifostats
Xprint fifo statistics
X.TP
X.B \-\-no\-fifo
Xdon't use a fifo to optimize data flow from/to tape
X.TP
X.B \-\-numeric
Xdon't use user/group name from tape
X.TP
X.B \-\-lzo
Xpipe input/output through lzop, does not work on tapes
X.TP
X.B \-z
Xpipe input/output through gzip, does not work on tapes
X.TP
X.B \-\-bz
Xpipe input/output through bzip2, does not work on tapes
X.PP
XThe options above are not defined by Sun tar.
X.PP
XFor a complete documentation of the
X.B star
Xbased optione check
X.BR star (1).
X
X.SH EXAMPLES
X.SH ENVIRONMENT
X.SH FILES
X.SH "SEE ALSO"
X.BR spax (1), 
X.BR suntar (1), 
X.BR scpio (1), 
X.BR tar (1), 
X.BR cpio (1), 
X.BR pax (1), 
X.BR rcp (1), 
X.BR mt (1),
X.BR rmt (1), 
X.BR match (1), 
X.BR dd (1), 
X.BR sdd (1), 
X.BR rsh (1),
X.BR ssh (1),
X.BR star (1),
X.BR star (4/5),
X.BR rcmd (3),
X.BR fssnap (1m)
X.SH DIAGNOSTICS
X.SH NOTES
X.PP
XThis
X.B suntar
Ximplementation is based on the
X.B star
Ximplementation and does not implement all features of the original Sun tar
Xprogram.
X.PP
X.B "Suntar \-x
Xis equivalent to
X.B "star \-xU \-force\-remove \-remove\-first \-keep\-nonempty\-dirs
X.SH BUGS
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xschilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu\-berlin.de
END-of-star-1.5.2/star/suntar.1
echo x - star-1.5.2/star/suntarman.mk
sed 's/^X//' >star-1.5.2/star/suntarman.mk << 'END-of-star-1.5.2/star/suntarman.mk'
X#ident @(#)suntarman.mk	1.1 04/09/26 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	suntar
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	suntar.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/star/suntarman.mk
echo x - star-1.5.2/star/star.mk
sed 's/^X//' >star-1.5.2/star/star.mk << 'END-of-star-1.5.2/star/star.mk'
X#ident @(#)star.mk	1.54 09/03/26 
X###########################################################################
X#include		$(MAKE_M_ARCH).def
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		star
XSYMLINKS=	ustar tar
XCPPOPTS +=	-D__STAR__
XCPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
X#CPPOPTS +=	-DSET_CTIME -DFIFO -DUSE_MMAP
X#CPPOPTS +=	-DSET_CTIME -DUSE_MMAP
X#CPPOPTS +=	-DFIFO -DUSE_MMAP
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_FIND
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_FFLAGS
XCPPOPTS +=	-DCOPY_LINKS_DELAYED
XCPPOPTS +=	-DSCHILY_PRINT
XCFILES=		star.c header.c cpiohdr.c xheader.c xattr.c \
X		list.c extract.c create.c append.c diff.c restore.c \
X		remove.c star_unix.c acl_unix.c acltext.c fflags.c \
X		buffer.c dirtime.c lhash.c \
X		hole.c longnames.c \
X		movearch.c table.c props.c \
X		unicode.c \
X		subst.c volhdr.c \
X		chdir.c match.c defaults.c dumpdate.c \
X		fifo.c device.c checkerr.c \
X		findinfo.c
XHFILES=		star.h starsubs.h dirtime.h xtab.h xutimes.h \
X		movearch.h table.h props.h fifo.h diff.h restore.h \
X		checkerr.h dumpdate.h bitstring.h
XLIBS=		-ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
XXMK_FILE=	Makefile.man starformatman.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/star/star.mk
echo x - star-1.5.2/star/starsubs.h
sed 's/^X//' >star-1.5.2/star/starsubs.h << 'END-of-star-1.5.2/star/starsubs.h'
X/* @(#)starsubs.h	1.114 12/01/01 Copyright 1996-2012 J. Schilling */
X/*
X *	Prototypes for star subroutines
X *
X *	Copyright (c) 1996-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/ccomdefs.h>
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * star.c
X */
Xextern	int	main		__PR((int ac, char **av));
Xextern	int	getnum		__PR((char *arg, long *valp));
Xextern	int	getbnum		__PR((char *arg, Llong *valp));
Xextern	int	getknum		__PR((char *arg, Llong *valp));
Xextern	void	copy_create	__PR((int ac, char *const *av));
Xextern	void	star_verifyopts	__PR((void));
X
X/*
X * chdir.c
X */
Xextern	char	*dogetwdir	__PR((void));
Xextern	BOOL	dochdir		__PR((const char *dir, BOOL doexit));
X
X/*
X * match.c
X */
Xextern	const char *filename	__PR((const char *name));
Xextern	BOOL	match		__PR((const char *name));
Xextern	int	addpattern	__PR((const char *pattern));
Xextern	int	addarg		__PR((const char *pattern));
Xextern	void	closepattern	__PR((void));
Xextern	void	prpatstats	__PR((void));
X
X/*
X * buffer.c
X */
Xextern	void	opt_remote	__PR((void));
Xextern	BOOL	openremote	__PR((void));
Xextern	void	opentape	__PR((void));
Xextern	void	closetape	__PR((void));
Xextern	void	changetape	__PR((BOOL donext));
Xextern	void	nextitape	__PR((void));
Xextern	void	nextotape	__PR((void));
Xextern	int	startvol	__PR((char *buf, int amount));
Xextern	void	newvolhdr	__PR((char *buf, int amount, BOOL do_fifo));
Xextern	void	initbuf		__PR((int nblocks));
Xextern	void	markeof		__PR((void));
Xextern	void	marktcb		__PR((char *addr));
Xextern	void	syncbuf		__PR((void));
Xextern	int	peekblock	__PR((char *buf, int amount));
Xextern	int	readblock	__PR((char *buf, int amount));
Xextern	int	readtape	__PR((char *buf, int amount));
X#ifdef _STAR_H
Xextern	void	filltcb		__PR((TCB *ptb));
Xextern	void	movetcb		__PR((TCB *from_ptb, TCB *to_ptb));
X#endif
Xextern	void	*get_block	__PR((int amount));
Xextern	void	put_block	__PR((int amount));
Xextern	char	*writeblock	__PR((char *buf));
Xextern	int	writetape	__PR((char *buf, int amount));
Xextern	void	writeempty	__PR((void));
Xextern	void	weof		__PR((void));
Xextern	void	buf_sync	__PR((int size));
Xextern	void	buf_drain	__PR((void));
Xextern	int	buf_wait	__PR((int amount));
Xextern	void	buf_wake	__PR((int amount));
Xextern	int	buf_rwait	__PR((int amount));
Xextern	void	buf_rwake	__PR((int amount));
Xextern	void	buf_resume	__PR((void));
Xextern	void	backtape	__PR((void));
Xextern	int	mtioctl		__PR((int cmd, int count));
Xextern	off_t	mtseek		__PR((off_t offset, int whence));
Xextern	Llong	tblocks		__PR((void));
Xextern	void	prstats		__PR((void));
Xextern	BOOL	checkerrs	__PR((void));
Xextern	void	exprstats	__PR((int ret));
Xextern	void	excomerrno	__PR((int err, char *fmt, ...))
X						__printflike__(2, 3);
Xextern	void	excomerr	__PR((char *fmt, ...)) __printflike__(1, 2);
Xextern	void	die		__PR((int err));
X
X/*
X * append.c
X */
X#ifdef _STAR_H
Xextern	void	skipall		__PR((void));
Xextern	BOOL	update_newer	__PR((FINFO *info));
X#endif
X
X/*
X * create.c
X */
Xextern	void	checklinks	__PR((void));
Xextern	int	_fileopen	__PR((char *name, char *smode));
Xextern	int	_fileread	__PR((int *fp, void *buf, int len));
Xextern	void	create		__PR((char *name, BOOL Hflag, BOOL forceadd));
Xextern	void	createlist	__PR((void));
X#ifdef _STAR_H
Xextern	BOOL	read_symlink	__PR((char *sname, char *name,
X					FINFO *info, TCB *ptb));
Xextern	BOOL	last_cpio_link	__PR((FINFO *info));
Xextern	BOOL	xcpio_link	__PR((FINFO *info));
Xextern	void	flushlinks	__PR((void));
Xextern	BOOL	read_link	__PR((char *name, int namlen, FINFO *info,
X								TCB *ptb));
X#ifdef	EOF
Xextern	void	put_file	__PR((int *fp, FINFO *info));
X#endif
Xextern	void	cr_file		__PR((FINFO *info,
X					int (*)(void *, char *, int),
X					void *arg, int amt, char *text));
X#endif
X#if defined(_SCHILY_STAT_H) && defined(_SCHILY_WALK_H)
Xextern	int	walkfunc	__PR((char *nm, struct stat *fs,
X					int type, struct WALK *state));
X#endif
X
X/*
X * diff.c
X */
Xextern	void	diff		__PR((void));
X#ifdef	EOF
Xextern	void	prdiffopts	__PR((FILE *f, char *label, int flags));
X#endif
X
X/*
X * restore.c
X */
X#ifdef _STAR_H
X#ifdef _RESTORE_H
Xextern	imap_t	*padd_node	__PR((char *name, ino_t oino, ino_t nino,
X					Int32_t flags));
Xextern	imap_t	*sym_addrec	__PR((FINFO *info));
Xextern	void	sym_addstat	__PR((FINFO *info, imap_t *imp));
Xextern	imap_t	*sym_dirprepare	__PR((FINFO *info, imap_t *idir));
Xextern	imap_t	*sym_typecheck	__PR((FINFO *info, FINFO *cinfo, imap_t *imp));
X#endif
X#endif
Xextern	void	sym_initmaps	__PR((void));
Xextern	void	sym_open	__PR((char *name));
X#ifdef _STAR_H
Xextern	void	sym_init	__PR((GINFO *gp));
X#endif
Xextern	void	sym_close	__PR((void));
X/*
X * ngetline XXX should be moved to libschily
X */
X#ifdef	EOF
Xextern	int	ngetline	__PR((FILE *f, char *buf, int len));
Xextern	void	printLsym	__PR((FILE *f));
X#endif
X
X/*
X * dirtime.c
X */
X/* The prototype definitions have been moved into dirtime.h */
X
X/*
X * extract.c
X */
X#ifdef _STAR_H
Xextern	void	extract		__PR((char *vhname));
X#ifdef	_RESTORE_H
Xextern	BOOL	extracti	__PR((FINFO *info, imap_t *imp));
X#endif
Xextern	BOOL	newer		__PR((FINFO *info, FINFO *cinfo));
Xextern	BOOL	same_symlink	__PR((FINFO *info));
Xextern	BOOL	same_special	__PR((FINFO *info));
Xextern	BOOL	create_dirs	__PR((char *name));
Xextern	BOOL	make_adir	__PR((FINFO *info));
Xextern	BOOL	void_file	__PR((FINFO *info));
Xextern	int	xt_file		__PR((FINFO *info,
X					int (*)(void *, char *, int),
X					void *arg, int amt, char *text));
Xextern	void	skip_slash	__PR((FINFO *info));
X#endif
X
X/*
X * fifo.c
X */
X#ifdef	FIFO
Xextern	void	initfifo	__PR((void));
Xextern	void	fifo_ibs_shrink	__PR((int newsize));
Xextern	void	runfifo		__PR((int ac, char *const *av));
Xextern	void	fifo_stats	__PR((void));
Xextern	int	fifo_amount	__PR((void));
Xextern	int	fifo_iwait	__PR((int amount));
Xextern	void	fifo_owake	__PR((int amount));
Xextern	void	fifo_oflush	__PR((void));
Xextern	int	fifo_owait	__PR((int amount));
Xextern	void	fifo_iwake	__PR((int amt));
Xextern	void	fifo_reelwake	__PR((void));
Xextern	void	fifo_resume	__PR((void));
Xextern	void	fifo_sync	__PR((int size));
Xextern	int	fifo_errno	__PR((void));
Xextern	void	fifo_onexit	__PR((int err, void *ignore));
Xextern	void	fifo_exit	__PR((int err));
Xextern	void	fifo_chitape	__PR((void));
Xextern	void	fifo_chotape	__PR((void));
X#endif
X
X/*
X * header.c
X */
X#ifdef _STAR_H
Xextern	BOOL	tarsum_ok	__PR((TCB *ptb));
X#ifdef	EOF
Xextern	void	print_hdrtype	__PR((FILE *f, int type));
X#endif
Xextern	char	*hdr_name	__PR((int type));
Xextern	char	*hdr_text	__PR((int type));
Xextern	int	hdr_type	__PR((char *name));
Xextern	void	hdr_usage	__PR((void));
Xextern	int	get_hdrtype	__PR((TCB *ptb, BOOL isrecurse));
Xextern	int	get_compression	__PR((TCB *ptb));
Xextern	char	*get_cmpname	__PR((int type));
Xextern	int	get_tcb		__PR((TCB *ptb));
Xextern	void	put_tcb		__PR((TCB *ptb, FINFO *info));
Xextern	void	write_tcb	__PR((TCB *ptb, FINFO *info));
Xextern	void	info_to_tcb	__PR((register FINFO *info, register TCB *ptb));
Xextern	int	tcb_to_info	__PR((register TCB *ptb, register FINFO *info));
Xextern	void	stolli		__PR((register char *s, Ullong *ull));
Xextern	void	llitos		__PR((char *s, Ullong ull, int fieldw));
Xextern	void	dump_info	__PR((FINFO *info));
X#endif
X
X/*
X * volhdr.c
X */
X#ifdef _STAR_H
Xextern	void	ginit		__PR((void));
Xextern	void	grinit		__PR((void));
Xextern	void	gipsetup	__PR((GINFO *gp));
Xextern	void	griprint	__PR((GINFO *gp));
Xextern	BOOL	verifyvol	__PR((char *buf, int amt, int volno,
X					int *skipp));
Xextern	char	*dt_name	__PR((int type));
Xextern	int	dt_type		__PR((char *name));
Xextern	void	put_release	__PR((void));
Xextern	void	put_archtype	__PR((void));
Xextern	void	put_volhdr	__PR((char *name, BOOL putv));
Xextern	void	put_svolhdr	__PR((char *name));
Xextern	void	put_multhdr	__PR((off_t size, off_t off));
Xextern	BOOL	get_volhdr	__PR((FINFO *info, char *vhname));
X#endif
X
X/*
X * cpiohdr.c
X */
X#ifdef _STAR_H
Xextern	void	put_cpioh	__PR((TCB *ptb, FINFO *info));
Xextern	void	cpioinfo_to_tcb	__PR((FINFO *info, TCB *ptb));
Xextern	int	cpiotcb_to_info	__PR((TCB *ptb, FINFO *info));
Xextern	int	cpio_checkswab	__PR((TCB *ptb));
X#endif
Xextern	void	cpio_weof	__PR((void));
Xextern	void	cpio_resync	__PR((void));
X
X/*
X * xheader.c
X */
X#ifdef _STAR_H
Xextern	void	xbinit		__PR((void));
Xextern	void	xbbackup	__PR((void));
Xextern	void	xbrestore	__PR((void));
Xextern	int	xhsize		__PR((void));
Xextern	void	info_to_xhdr	__PR((FINFO *info, TCB *ptb));
Xextern	BOOL	xhparse		__PR((FINFO *info, char	*p, char *ep));
Xextern	void	xh_rangeerr	__PR((char *keyword, char *arg, int len));
Xextern	void	gen_xtime	__PR((char *keyword, time_t sec, Ulong nsec));
Xextern	void	gen_unumber	__PR((char *keyword, Ullong arg));
Xextern	void	gen_number	__PR((char *keyword, Llong arg));
Xextern	void	gen_text	__PR((char *keyword, char *arg, int alen,
X								Uint flags));
X
Xextern	void	tcb_to_xhdr_reset __PR((void));
Xextern	int	tcb_to_xhdr	__PR((TCB *ptb, FINFO *info));
X
Xextern	BOOL	get_xtime	__PR((char *keyword, char *arg, int len,
X						time_t *secp, long *nsecp));
X#ifdef	__needed_
Xextern	BOOL	get_number	__PR((char *keyword, char *arg, Llong *llp));
X#endif
Xextern	BOOL	get_unumber	__PR((char *keyword, char *arg, Ullong *ullp,
X					Ullong maxval));
Xextern	BOOL	get_snumber	__PR((char *keyword, char *arg, Ullong *ullp,
X					BOOL *negp,
X					Ullong minval, Ullong maxval));
X#endif
X
X/*
X * xattr.c
X */
X#ifdef _STAR_H
Xextern	void	opt_xattr	__PR((void));
Xextern	BOOL	get_xattr	__PR((register FINFO *info));
Xextern	BOOL	set_xattr	__PR((register FINFO *info));
Xextern	void	free_xattr	__PR((star_xattr_t **xattr));
X#endif
X
X/*
X * hole.c
X */
X#ifdef _STAR_H
X#ifdef	EOF
Xextern	int	get_forced_hole	__PR((FILE *f, FINFO *info));
Xextern	int	get_sparse	__PR((FILE *f, FINFO *info));
Xextern	int	get_as_hole	__PR((FILE *f, FINFO *info));
Xextern	BOOL	cmp_sparse	__PR((FILE *f, FINFO *info));
Xextern	void	put_sparse	__PR((int *fp, FINFO *info));
Xextern	BOOL	sparse_file	__PR((int *fp, FINFO *info));
X#endif
Xextern	int	gnu_skip_extended	__PR((FINFO *info));
X#endif
X
X/*
X * lhash.c
X */
Xextern	size_t	hash_size	__PR((size_t size));
X#ifdef	EOF
Xextern	void	hash_build	__PR((FILE *fp));
Xextern	void	hash_xbuild	__PR((FILE *fp));
X#endif
Xextern	BOOL	hash_lookup	__PR((char *str));
Xextern	BOOL	hash_xlookup	__PR((char *str));
X
X/*
X * list.c
X */
X#ifdef _STAR_H
Xextern	void	list	__PR((void));
Xextern	void	list_file __PR((register FINFO *info));
Xextern	void	vprint	__PR((FINFO *info));
X#endif
X
X/*
X * longnames.c
X */
X#ifdef _STAR_H
Xextern	BOOL	name_to_tcb	__PR((FINFO *info, TCB *ptb));
Xextern	void	tcb_to_name	__PR((TCB *ptb, FINFO *info));
Xextern	void	tcb_undo_split	__PR((TCB *ptb, FINFO *info));
Xextern	int	tcb_to_longname	__PR((register TCB *ptb, register FINFO *info));
Xextern	void	write_longnames	__PR((register FINFO *info));
X#endif
X
X/*
X * props.c
X */
Xextern	void	setprops	__PR((long htype));
Xextern	void	printprops	__PR((void));
X
X/*
X * remove.c
X */
Xextern	BOOL	remove_file	__PR((char *name, BOOL isfirst));
X
X/*
X * star_unix.c
X */
X#ifdef _STAR_H
Xextern	BOOL	_getinfo	__PR((char *name, FINFO *info));
Xextern	BOOL	getinfo		__PR((char *name, FINFO *info));
X#ifdef	_SCHILY_STAT_H
Xextern	BOOL	stat_to_info	__PR((struct stat *sp, FINFO *info));
X#endif
X#ifdef	EOF
Xextern	void	checkarch	__PR((FILE *f));
Xextern	BOOL	samefile	__PR((FILE *fp1, FILE *fp2));
X#endif
Xextern	BOOL	archisnull	__PR((const char *name));
Xextern	void	setmodes	__PR((FINFO *info));
Xextern	int	snulltimes	__PR((char *name, FINFO *info));
Xextern	int	sxsymlink	__PR((char *name, FINFO *info));
Xextern	int	rs_acctime	__PR((int fd, FINFO *info));
Xextern	void	setdirmodes	__PR((char *name, mode_t mode));
Xextern	mode_t	osmode		__PR((mode_t tarmode));
X#endif
X
X/*
X * acl_unix.c
X */
Xextern	void	opt_acl		__PR((void));
X#ifdef _STAR_H
Xextern	BOOL	get_acls	__PR((FINFO *info));
Xextern	void	set_acls	__PR((FINFO *info));
X#endif
X
X/*
X * unicode.c
X */
Xextern	int	to_utf8		__PR((Uchar *to, Uchar *from));
Xextern	int	to_utf8l	__PR((Uchar *to, Uchar *from, int len));
Xextern	BOOL	from_utf8	__PR((Uchar *to, Uchar *from));
Xextern	BOOL	from_utf8l	__PR((Uchar *to, Uchar *from, int *len));
X
X/*
X * fflags.c
X */
Xextern	void	opt_fflags	__PR((void));
X#ifdef _STAR_H
Xextern	void	get_fflags	__PR((FINFO *info));
Xextern	void	set_fflags	__PR((FINFO *info));
Xextern	char	*textfromflags	__PR((FINFO *info, char *buf));
Xextern	int	texttoflags	__PR((FINFO *info, char *buf));
X#endif
X
X/*
X * defaults.c
X */
Xextern	char	*get_stardefaults __PR((char *name));
Xextern	void	star_defaults	__PR((long *fsp, char *dfltname));
Xextern	BOOL	star_darchive	__PR((char *arname, char *dfltname));
X
X/*
X * subst.c
X */
Xextern	int	parsesubst	__PR((char *cmd, BOOL *arg));
X#ifdef _STAR_H
Xextern	BOOL	subst		__PR((FINFO *info));
Xextern	BOOL	ia_change	__PR((TCB *ptb, FINFO *info));
X#endif
X
X/*
X * findinfo.c
X */
X#ifdef _STAR_H
XEXPORT	BOOL	findinfo	__PR((FINFO *info));
X#endif
END-of-star-1.5.2/star/starsubs.h
echo x - star-1.5.2/star/acltext.c
sed 's/^X//' >star-1.5.2/star/acltext.c << 'END-of-star-1.5.2/star/acltext.c'
X/* @(#)acltext.c	1.15 09/07/11 2005-2009 J. Schilling from SMI */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)acltext.c	1.15 09/07/11 2005-2009 J. Schilling from SMI";
X#endif
X/*
X * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
X *
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only.
X * See the file CDDL.Sun.txt in this distribution or
X * http://www.opensolaris.org/license/ for details.
X */
X
X#include <schily/mconfig.h>
X#if	defined(HAVE_SUN_ACL) && !defined(IS_CYGWIN)
X
X#pragma ident	"@(#)acltext.c	1.11	02/10/02 SMI"
X/*LINTLIBRARY*/
X
X#include <schily/grp.h>
X#include <schily/pwd.h>
X#include <schily/string.h>
X#include <limits.h>
X#include <schily/stdlib.h>
X#include <schily/ctype.h>
X#include <schily/errno.h>
X#include <schily/param.h>
X#include <schily/types.h>
X#include <sys/acl.h>
X#include <schily/schily.h>
X
X/*
X * acltotext() converts each ACL entry to look like this:
X *
X *    entry_type:uid^gid^name:perms
X *
X * The maximum length of entry_type is 14 ("defaultgroup::" and
X * "defaultother::") hence ENTRYTYPELEN is set to 14.
X *
X * The max length of a uid^gid^name entry (in theory) is 8, hence we use
X * LOGNAME_MAX.
X *
X * The length of a perms entry is 4 to allow for the comma appended to each
X * to each acl entry.  Hence PERMS is set to 4.
X */
X/*
X * Warning: LOGNAME_MAX is 8 but sizeof (struct utmpx.ut_user) is 32
X * 8 is also not sufficient to hold a int32_t uid_t and we may even need
X * it to be able to hold a int64_t uid_t which needs 20 chars.
X */
X#if	LOGNAME_MAX < 32
X#define	_LOGNAME_MAX_	32
X#else
X#define	_LOGNAME_MAX_	LOGNAME_MAX
X#endif
X
X#define	ENTRYTYPELEN	14
X#define	PERMS		4
X#define	ACL_ENTRY_SIZE	(ENTRYTYPELEN + _LOGNAME_MAX_ + PERMS)
X
Xstruct dynaclstr {
X	size_t bufsize;		/* current size of aclexport */
X	char *aclexport;
X};
X
Xstatic char *strappend(char *, char *);
Xstatic char *convert_perm(char *, o_mode_t);
Xstatic int increase_length(struct dynaclstr *, size_t);
Xstatic int isnumeric(char *);
X
X#define	FREE	free(aclp);\
X		free(allocp)
X
X/*
X * Convert internal acl representation to external representation.
X *
X * The length of a non-owning user name or non-owning group name ie entries
X * of type DEF_USER, USER, DEF_GROUP or GROUP, can exceed LOGNAME_MAX.  We
X * thus check the length of these entries, and if greater than LOGNAME_MAX,
X * we realloc() via increase_length().
X *
X * The LOGNAME_MAX, ENTRYTYPELEN and PERMS limits are otherwise always
X * adhered to.
X */
Xchar *
Xacltotext(aclent_t *aclp, int aclcnt)
X{
X	char		*aclexport;
X	char		*where;
X	struct group	*groupp;
X	struct passwd	*passwdp;
X	struct dynaclstr *dstr;
X	int		i, rtn;
X	size_t		excess = 0;
X
X	if (aclp == NULL)
X		return (NULL);
X	if ((dstr = malloc(sizeof (struct dynaclstr))) == NULL)
X		return (NULL);
X	dstr->bufsize = aclcnt * ACL_ENTRY_SIZE;
X	if ((dstr->aclexport = malloc(dstr->bufsize)) == NULL)
X		return (NULL);
X	*dstr->aclexport = '\0';
X	where = dstr->aclexport;
X
X	for (i = 0; i < aclcnt; i++, aclp++) {
X		switch (aclp->a_type) {
X		case DEF_USER_OBJ:
X		case USER_OBJ:
X			if (aclp->a_type == USER_OBJ)
X				where = strappend(where, "user::");
X			else
X				where = strappend(where, "defaultuser::");
X			where = convert_perm(where, aclp->a_perm);
X			break;
X		case DEF_USER:
X		case USER:
X			if (aclp->a_type == USER)
X				where = strappend(where, "user:");
X			else
X				where = strappend(where, "defaultuser:");
X			passwdp = getpwuid(aclp->a_id);
X			if (passwdp == (struct passwd *)NULL) {
X				/* put in uid instead */
X				/* XXX better use %j and intmax_t */
X				(void) sprintf(where, "%lld",
X							(long long)aclp->a_id);
X			} else {
X				excess = strlen(passwdp->pw_name) -
X								_LOGNAME_MAX_;
X				if (excess > 0) {
X					rtn = increase_length(dstr, excess);
X					if (rtn == 1)
X						/* reset where */
X						where = dstr->aclexport +
X							strlen(dstr->aclexport);
X					else
X						return (NULL);
X				}
X				where = strappend(where, passwdp->pw_name);
X			}
X			where = strappend(where, ":");
X			where = convert_perm(where, aclp->a_perm);
X			break;
X		case DEF_GROUP_OBJ:
X		case GROUP_OBJ:
X			if (aclp->a_type == GROUP_OBJ)
X				where = strappend(where, "group::");
X			else
X				where = strappend(where, "defaultgroup::");
X			where = convert_perm(where, aclp->a_perm);
X			break;
X		case DEF_GROUP:
X		case GROUP:
X			if (aclp->a_type == GROUP)
X				where = strappend(where, "group:");
X			else
X				where = strappend(where, "defaultgroup:");
X			groupp = getgrgid(aclp->a_id);
X			if (groupp == (struct group *)NULL) {
X				/* put in gid instead */
X				/* XXX better use %j and intmax_t */
X				(void) sprintf(where, "%lld",
X							(long long)aclp->a_id);
X			} else {
X				excess = strlen(groupp->gr_name) -
X								_LOGNAME_MAX_;
X				if (excess > 0) {
X					rtn = increase_length(dstr, excess);
X					if (rtn == 1)
X						/* reset where */
X						where = dstr->aclexport +
X							strlen(dstr->aclexport);
X					else
X						return (NULL);
X				}
X				where = strappend(where, groupp->gr_name);
X			}
X			where = strappend(where, ":");
X			where = convert_perm(where, aclp->a_perm);
X			break;
X		case DEF_CLASS_OBJ:
X		case CLASS_OBJ:
X			if (aclp->a_type == CLASS_OBJ)
X				where = strappend(where, "mask:");
X			else
X				where = strappend(where, "defaultmask:");
X			where = convert_perm(where, aclp->a_perm);
X			break;
X		case DEF_OTHER_OBJ:
X		case OTHER_OBJ:
X			if (aclp->a_type == OTHER_OBJ)
X				where = strappend(where, "other:");
X			else
X				where = strappend(where, "defaultother:");
X			where = convert_perm(where, aclp->a_perm);
X			break;
X		default:
X			free(dstr->aclexport);
X			free(dstr);
X			return (NULL);
X
X		}
X		if (i < aclcnt - 1)
X			where = strappend(where, ",");
X	}
X	aclexport = dstr->aclexport;
X	free(dstr);
X	return (aclexport);
X}
X
X/*
X * Convert external acl representation to internal representation.
X * The accepted syntax is: <acl_entry>[,<acl_entry>]*[,]
X * The comma at the end is not prescribed by the man pages.
X * But it is needed not to break the old programs.
X */
Xaclent_t *
Xaclfromtext(char *aclstr, int *aclcnt)
X{
X	char		*fieldp;
X	char		*tp;
X	char		*nextp;
X	char		*allocp;
X	char		*aclimport;
X	int		entry_type;
X	int		id;
X	int		len;
X	o_mode_t	perm;
X	aclent_t	*tmpaclp;
X	aclent_t	*aclp;
X	struct group	*groupp;
X	struct passwd	*passwdp;
X
X	*aclcnt = 0;
X	aclp = NULL;
X
X	if (! aclstr)
X		return (NULL);
X
X	len = strlen(aclstr);
X
X	if ((aclimport = allocp = strdup(aclstr)) == NULL) {
X		(void) fprintf(stderr, "malloc() failed\n");
X		return (NULL);
X	}
X
X	if (aclimport[len - 1] == ',')
X		aclimport[len - 1] = '\0';
X
X	for (; aclimport; ) {
X		/* make sure id is always set up */
X		id = -1;
X
X		/* look for an ACL entry */
X		tp = strchr(aclimport, ',');
X		if (tp == NULL) {
X			nextp = NULL;
X		} else {
X			*tp = '\0';
X			nextp = tp + 1;
X		}
X
X		*aclcnt += 1;
X
X		/*
X		 * get additional memory:
X		 * can be more efficient by allocating a bigger block
X		 * each time.
X		 */
X		if (*aclcnt > 1)
X			tmpaclp = (aclent_t *)realloc(aclp,
X			    sizeof (aclent_t) * (*aclcnt));
X		else
X			tmpaclp = (aclent_t *)malloc(sizeof (aclent_t));
X		if (tmpaclp == NULL) {
X			free(allocp);
X			if (aclp)
X				free(aclp);
X			return (NULL);
X		}
X		aclp = tmpaclp;
X		tmpaclp = aclp + (*aclcnt - 1);
X
X		/* look for entry type field */
X		tp = strchr(aclimport, ':');
X		if (tp == NULL) {
X			FREE;
X			return (NULL);
X		} else
X			*tp = '\0';
X		if (strcmp(aclimport, "user") == 0) {
X			if (*(tp+1) == ':')
X				entry_type = USER_OBJ;
X			else
X				entry_type = USER;
X		} else if (strcmp(aclimport, "group") == 0) {
X			if (*(tp+1) == ':')
X				entry_type = GROUP_OBJ;
X			else
X				entry_type = GROUP;
X		} else if (strcmp(aclimport, "other") == 0)
X			entry_type = OTHER_OBJ;
X		else if (strcmp(aclimport, "mask") == 0)
X			entry_type = CLASS_OBJ;
X		else if (strcmp(aclimport, "defaultuser") == 0) {
X			if (*(tp+1) == ':')
X				entry_type = DEF_USER_OBJ;
X			else
X				entry_type = DEF_USER;
X		} else if (strcmp(aclimport, "defaultgroup") == 0) {
X			if (*(tp+1) == ':')
X				entry_type = DEF_GROUP_OBJ;
X			else
X				entry_type = DEF_GROUP;
X		} else if (strcmp(aclimport, "defaultmask") == 0)
X			entry_type = DEF_CLASS_OBJ;
X		else if (strcmp(aclimport, "defaultother") == 0)
X			entry_type = DEF_OTHER_OBJ;
X		else {
X			FREE;
X			return (NULL);
X		}
X
X		/* look for user/group name */
X		if (entry_type != CLASS_OBJ && entry_type != OTHER_OBJ &&
X		    entry_type != DEF_CLASS_OBJ &&
X		    entry_type != DEF_OTHER_OBJ) {
X			fieldp = tp + 1;
X			tp = strchr(fieldp, ':');
X			if (tp == NULL) {
X				FREE;
X				return (NULL);
X			} else
X				*tp = '\0';
X			if (fieldp != tp) {
X				/*
X				 * The second field could be empty. We only care
X				 * when the field has user/group name.
X				 */
X				if (entry_type == USER ||
X				    entry_type == DEF_USER) {
X					struct passwd	pw;
X
X					/*
X					 * The reentrant interface getpwnam_r()
X					 * is uncommitted and subject to
X					 * change. Use the friendlier interface
X					 * getpwnam().
X					 */
X					if (isnumeric(fieldp)) {
X						uid_t	uid;
X
X
X						errno = 0;
X						uid = (uid_t)strtol(fieldp,
X								NULL, 10);
X						if (errno == 0) {
X							passwdp = &pw;
X							passwdp->pw_uid = uid;
X						} else {
X							passwdp = NULL;
X						}
X					} else {
X						passwdp = getpwnam(fieldp);
X					}
X					if (passwdp == NULL) {
X						(void) fprintf(stderr,
X						"user %s not found\n", fieldp);
X						id = UID_NOBODY; /* nobody */
X					} else {
X						id = passwdp->pw_uid;
X					}
X				} else if (entry_type == GROUP ||
X					    entry_type == DEF_GROUP) {
X					struct group	gr;
X
X					if (isnumeric(fieldp)) {
X						gid_t	gid;
X
X						errno = 0;
X						gid = (gid_t)strtol(fieldp,
X								NULL, 10);
X						if (errno == 0) {
X							groupp = &gr;
X							groupp->gr_gid = gid;
X						} else {
X							groupp = NULL;
X						}
X					} else {
X						groupp = getgrnam(fieldp);
X					}
X					if (groupp == NULL) {
X						(void) fprintf(stderr,
X						"group %s not found\n",
X						fieldp);
X						/* no group? */
X						id = GID_NOBODY;
X					} else {
X						id = groupp->gr_gid;
X					}
X				} else {
X					(void) fprintf(stderr,
X					"acl import errors\n");
X					FREE;
X					return (NULL);
X				}
X			} else {
X				/*
X				 * The second field is empty.
X				 * Treat it as undefined (-1)
X				 */
X				id = -1;
X			}
X		} else {
X			/*
X			 * Let's not break the old applications
X			 * that use mask::rwx, other::rwx format,
X			 * though they violate the man pages.
X			 */
X			if (*(tp + 1) == ':')
X				*++tp = 0;
X		}
X
X		/* next field: permission */
X		fieldp = tp + 1;
X		if (strlen(fieldp) != 3) {
X			/*  not "rwx" format */
X			FREE;
X			return (NULL);
X		} else {
X			char	s[] = "rwx";
X			int	mask = 0x04;
X			int	i;
X			perm = 0;
X
X			for (i = 0; i < 3; i++, mask /= 2) {
X				if (fieldp[i] == s[i])
X					perm |= mask;
X				else if (fieldp[i] != '-') {
X					FREE;
X					return (NULL);
X				}
X			}
X		}
X
X		tmpaclp->a_type = entry_type;
X		tmpaclp->a_id = id;
X		tmpaclp->a_perm = perm;
X		aclimport = nextp;
X	}
X	free(allocp);
X	return (aclp);
X}
X
Xstatic char *
Xstrappend(char *where, char *newstr)
X{
X	(void) strcat(where, newstr);
X	return (where + strlen(newstr));
X}
X
Xstatic char *
Xconvert_perm(char *where, o_mode_t perm)
X{
X	if (perm & 04)
X		where = strappend(where, "r");
X	else
X		where = strappend(where, "-");
X	if (perm & 02)
X		where = strappend(where, "w");
X	else
X		where = strappend(where, "-");
X	if (perm & 01)
X		where = strappend(where, "x");
X	else
X		where = strappend(where, "-");
X	/* perm is the last field */
X	return (where);
X}
X
X/*
X * Callers should check the return code as this routine may change the string
X * pointer in dynaclstr.
X */
Xstatic int
Xincrease_length(struct dynaclstr *dacl, size_t increase)
X{
X	char *tptr;
X	size_t newsize;
X
X	newsize = dacl->bufsize + increase;
X	tptr = realloc(dacl->aclexport, newsize);
X	if (tptr != NULL) {
X		dacl->aclexport = tptr;
X		dacl->bufsize = newsize;
X		return (1);
X	} else
X		return (0);
X}
X
Xstatic int
Xisnumeric(char *p)
X{
X	int	c;
X
X	while ((c = *p++) != '\0') {
X		if (!isdigit(c))
X			return (0);
X	}
X	return (1);
X}
X
X#endif	/* defined(HAVE_SUN_ACL) && !defined(IS_CYGWIN) */
END-of-star-1.5.2/star/acltext.c
echo x - star-1.5.2/star/xheader.c
sed 's/^X//' >star-1.5.2/star/xheader.c << 'END-of-star-1.5.2/star/xheader.c'
X/* @(#)xheader.c	1.85 11/08/03 Copyright 2001-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)xheader.c	1.85 11/08/03 Copyright 2001-2011 J. Schilling";
X#endif
X/*
X *	Handling routines to read/write, parse/create
X *	POSIX.1-2001 extended archive headers
X *
X *	Copyright (c) 2001-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>	/* getpagesize() */
X#include <schily/libport.h>	/* getpagesize() */
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/dirent.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#define	__XDEV__	/* Needed to activate _dev_major()/_dev_minor() */
X#include <schily/device.h>
X#include <schily/schily.h>
X#include <schily/idcache.h>
X#include "starsubs.h"
X#include "movearch.h"
X#include "xtab.h"
X
Xextern	BOOL	no_xheader;
Xextern	BOOL	nowarn;
X
Xextern	GINFO	*grip;				/* Global read info pointer	*/
X
X#define	MAX_UNAME	64	/* The maximum length of a user/group name */
X
X/*
X * Flags for gen_text()
X */
X#define	T_ADDSLASH	1	/* Add slash to the argument	*/
X#define	T_UTF8		2	/* Convert arg to UTF-8 coding	*/
X
Xtypedef struct _unknown unkn_t;
X
Xstruct _unknown {
X	unkn_t	*u_next;
X	char	u_name[1];
X};
X
XLOCAL	void	_xbinit		__PR((void));
XEXPORT	void	xbinit		__PR((void));
XLOCAL	void	xbgrow		__PR((int newsize));
XEXPORT	void	xbbackup	__PR((void));
XEXPORT	void	xbrestore	__PR((void));
XEXPORT	int	xhsize		__PR((void));
XLOCAL	void	write_xhdr	__PR((int type));
XEXPORT	void	info_to_xhdr	__PR((FINFO * info, TCB * ptb));
XLOCAL	void	check_xtime	__PR((char *keyword, FINFO *info));
XEXPORT	void	gen_xtime	__PR((char *keyword, time_t sec, Ulong nsec));
XEXPORT	void	gen_unumber	__PR((char *keyword, Ullong arg));
XEXPORT	void	gen_number	__PR((char *keyword, Llong arg));
XLOCAL	void	gen_iarray	__PR((char *keyword, ino_t *arg, int ents, int len));
XEXPORT	void	gen_text	__PR((char *keyword, char *arg, int alen,
X								Uint flags));
XLOCAL	int	len_len		__PR((int len));
XLOCAL	xtab_t	*lookup		__PR((char *cmd, int clen, xtab_t *cp));
XEXPORT	int	tcb_to_xhdr	__PR((TCB * ptb, FINFO * info));
XEXPORT	BOOL	xhparse		__PR((FINFO *info, char	*p, char *ep));
XLOCAL	void	print_unknown	__PR((char *keyword));
XEXPORT	void	xh_rangeerr	__PR((char *keyword, char *arg, int len));
XLOCAL	void	print_toolong	__PR((char *keyword, char *arg, int len));
XLOCAL	void	get_xvolhdr	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	info_xcopy	__PR((FINFO *ninfo, FINFO *oinfo));
XEXPORT	BOOL	get_xtime	__PR((char *keyword, char *arg, int len,
X						time_t *secp, long *nsecp));
XLOCAL	void	get_atime	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_ctime	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_mtime	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
X#ifdef	__needed_
XEXPORT	BOOL	get_number	__PR((char *keyword, char *arg, Llong *llp));
X#endif
XLOCAL	BOOL	get_xnumber	__PR((char *keyword, char *arg, Ullong *llp, char *type));
XEXPORT	BOOL	get_unumber	__PR((char *keyword, char *arg, Ullong *ullp, Ullong maxval));
XEXPORT	BOOL	get_snumber	__PR((char *keyword, char *arg, Ullong *ullp, BOOL *negp, Ullong minval, Ullong maxval));
XLOCAL	void	get_uid		__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_gid		__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_uname	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_gname	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_path	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_lpath	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_size	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_realsize	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_offset	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_major	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_minor	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_dev		__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_ino		__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_nlink	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_filetype	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
X#ifdef	USE_ACL
XLOCAL	void	get_acl_type	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_acl_access	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_acl_default	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
X#endif
X#ifdef  USE_XATTR
XLOCAL	void	get_attr	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
X#endif
X#ifdef	USE_FFLAGS
XLOCAL	void	get_xfflags	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
X#endif
XLOCAL	void	get_dir		__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_iarray	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_release	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_archtype	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_dummy	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	bad_utf8	__PR((char *keyword, char *arg));
X
X/*
X * Convert unsigned integer into a decimal string.
X * The parameter 'val' is of the needed size (basic type), so it is as fast
X * as possible.
X *
X * The string is written starting from the end backwards for best speed.
X */
XLOCAL	Uchar	dtab[] = "0123456789";
X
X#define	ui2decimal(val, np)	do {					      \
X					*--(np) = dtab[(val) % (unsigned)10]; \
X					(val) = (val) / (unsigned)10;	      \
X				} while ((val) > 0)
X
X#define	scopy(to, from)		while ((*(to)++ = *(from)++) != '\0');
X
X
XLOCAL	char	*xbuf;	/* Space used to prepare I/O from/to extended headers */
XLOCAL	int	xblen;	/* the length of the buffer for the extended headers */
XLOCAL	int	xbidx;	/* The index where we start to prepare next entry    */
X
XEXPORT	BOOL	ghdr;	/* We need wo write a 'g'lobal header		*/
XLOCAL	FINFO	ginfo;	/* The 'g'lobal FINFO data			*/
XLOCAL	char	*guname;
XLOCAL	char	*ggname;
X
XLOCAL	unkn_t	*unkn;	/* A list of unknown keywords to print warnings once */
XLOCAL	Ulong	badf;	/* A list of bad flags				*/
X
X/*
X * Important for the correctness of gen_number(): As long as we stay <= 55
X * chars for the keyword, a 128 bit number entry will fit into 100 chars.
X *
X *			x_name,		x_namelen, x_func,	x_flag
X */
XLOCAL xtab_t xtab[] = {
X			{ "atime",		5, get_atime,	0	},
X			{ "ctime",		5, get_ctime,	0	},
X			{ "mtime",		5, get_mtime,	0	},
X
X			{ "uid",		3, get_uid,	0	},
X			{ "uname",		5, get_uname,	0	},
X			{ "gid",		3, get_gid,	0	},
X			{ "gname",		5, get_gname,	0	},
X
X			{ "path",		4, get_path,	0	},
X			{ "linkpath",		8, get_lpath,	0	},
X
X			{ "size",		4, get_size,	0	},
X
X			{ "charset",		7, get_dummy,	0	},
X			{ "comment",		7, get_dummy,	0	},
X			{ "hdrcharset",		10, get_dummy,	0	},
X/* "BINARY" */
X
X			{ "SCHILY.devmajor",	15, get_major,	0	},
X			{ "SCHILY.devminor",	15, get_minor,	0	},
X
X#ifdef	USE_ACL
X			{ "SCHILY.acl.access",	17, get_acl_access, 0	},
X			{ "SCHILY.acl.default",	18, get_acl_default, 0	},
X			{ "SCHILY.acl.type",	15, get_acl_type, 0	},
X#else
X/*
X * We don't want star to complain about unknown extended headers when it
X * has been compiled without ACL support.
X */
X			{ "SCHILY.acl.access",	17, get_dummy,	0	},
X			{ "SCHILY.acl.default",	18, get_dummy,	0	},
X			{ "SCHILY.acl.type",	15, get_dummy,	0	},
X#endif
X#ifdef  USE_XATTR
X			{ "SCHILY.xattr.*",	14, get_attr,	0	},
X#else
X			{ "SCHILY.xattr.*",	14, get_dummy,	0	},
X#endif
X
X#ifdef	USE_FFLAGS
X			{ "SCHILY.fflags",	13, get_xfflags, 0	},
X#else
X/*
X * We don't want star to complain about unknown extended headers when it
X * has been compiled without extended file flag support.
X */
X			{ "SCHILY.fflags",	13, get_dummy,	0	},
X#endif
X			{ "SCHILY.dev",		10, get_dev,	0	},
X			{ "SCHILY.ino",		10, get_ino,	0	},
X			{ "SCHILY.nlink",	12, get_nlink,	0	},
X			{ "SCHILY.filetype",	15, get_filetype, 0	},
X			{ "SCHILY.tarfiletype",	18, get_filetype, 0	},
X			{ "SCHILY.realsize",	15, get_realsize, 0	},
X			{ "SCHILY.offset",	13, get_offset, 0	},
X
X			{ "SCHILY.dir",		10, get_dir,	0	},
X			{ "SCHILY.ddev",	11, get_dummy,	0	},
X			{ "SCHILY.dino",	11, get_iarray,	0	},
X
X			{ "SCHILY.release",	14, get_release, 0	},
X			{ "SCHILY.archtype",	15, get_archtype, 0	},
X			{ "SCHILY.volhdr.*",	15, get_xvolhdr, 0	},
X
X			{ "SUN.devmajor",	12, get_major,	0	},
X			{ "SUN.devminor",	12, get_minor,	0	},
X
X			{ NULL,			0, NULL,	0	}};
X
X/*
X * Initialize the growable buffer used for reading the extended headers
X */
XLOCAL void
X_xbinit()
X{
X	xbuf = ___malloc(1, "growable xheader");
X	xblen = 1;
X	xbidx = 0;
X}
X
XEXPORT void
Xxbinit()
X{
X	_xbinit();
X
X	ginfo.f_name = ___malloc(PATH_MAX+1, "global info name");
X	ginfo.f_lname = ___malloc(PATH_MAX+1, "global info lname");
X	ginfo.f_name[0] = '\0';
X	ginfo.f_lname[0] = '\0';
X	ginfo.f_uname = ___malloc(MAX_UNAME+1, "global user name");
X	ginfo.f_gname = ___malloc(MAX_UNAME+1, "global group name");
X	ginfo.f_uname[0] = '\0';
X	ginfo.f_gname[0] = '\0';
X	ggname = ginfo.f_gname;
X	ginfo.f_xflags = 0;
X	guname = ginfo.f_uname;
X	ggname = ginfo.f_gname;
X}
X
X/*
X * Grow the growable buffer used for reading the extended headers
X */
XLOCAL void
Xxbgrow(newsize)
X	int	newsize;
X{
X	char	*newbuf;
X	int	i;
X	int	ps = getpagesize();
X
X	/*
X	 * grow in pagesize units
X	 */
X	for (i = 0; i < newsize; i += ps)
X		/* LINTED */
X		;
X	newsize = i + xblen;
X	newbuf = ___realloc(xbuf, newsize, "growable xheader");
X	xbuf = newbuf;
X	xblen = newsize;
X}
X
X/*
X * Variables used to allow us to create an extended header while we write one
X */
XLOCAL	char	*oxbuf;	/* Space used to prepare I/O from/to extended headers */
XLOCAL	int	oxblen;	/* the length of the buffer for the extended headers */
XLOCAL	int	oxbidx;	/* The index where we start to prepare next entry    */
X
XEXPORT void
Xxbbackup()
X{
X	oxbuf  = xbuf;
X	oxblen = xblen;
X	oxbidx = xbidx;
X
X	_xbinit();
X}
X
XEXPORT void
Xxbrestore()
X{
X	free(xbuf);
X
X	xbuf  = oxbuf;
X	xblen = oxblen;
X	xbidx = oxbidx;
X}
X
XEXPORT int
Xxhsize()
X{
X	return (xbidx);
X}
X
XLOCAL void
Xwrite_xhdr(type)
X	int	type;
X{
X	FINFO	finfo;
X	TCB	tb;
X	TCB	*xptb;
X	move_t	move;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X
X	if ((xptb = (TCB *)get_block(TBLOCK)) == NULL)
X		xptb = &tb;
X	else
X		finfo.f_flags |= F_TCB_BUF;
X	filltcb(xptb);
X	strcpy(xptb->dbuf.t_name, "././@PaxHeader");
X	finfo.f_name = xptb->dbuf.t_name;
X	finfo.f_mode = TUREAD|TUWRITE;
X	finfo.f_rsize = finfo.f_size = xbidx;
X	finfo.f_xftype = XT_FILE;
X	info_to_tcb(&finfo, xptb);
X	xptb->dbuf.t_linkflag = (char)type;
X	write_tcb(xptb, &finfo);
X
X	move.m_data = xbuf;
X	move.m_size = finfo.f_size;
X	move.m_flags = 0;
X	cr_file(&finfo, vp_move_to_arch, &move, 0, "moving extended header");
X
X	xbidx = 0;	/* Reset xbuffer index to start of buffer. */
X}
X
X/*
X * Prepare and write out the extended header
X */
X/* ARGSUSED */
XEXPORT void
Xinfo_to_xhdr(info, ptb)
X	register FINFO	*info;
X	register TCB	*ptb;
X{
X		char	name[MAX_UNAME+1];
X	register Ulong	xflags;
Xextern	long	hdrtype;
Xextern	BOOL	dodump;
X
X	if (no_xheader)
X		return;
X
X	if (ghdr) {
X		/*
X		 * Delayed writing of a 'g' header is required.
X		 */
X		write_xhdr('g');
X		ghdr = FALSE;
X	}
X
X	xflags = info->f_xflags & (props.pr_xhmask | XF_NOTIME);
X	/*
X	 * Unless we really don't want extended sub-second resolution
X	 * timestamps or a specific selection of timestams has been set up,
X	 * include all times (atime/ctime/mtime) if we need to include extended
X	 * headers at all.
X	 */
X	if ((xflags & (XF_ATIME|XF_CTIME|XF_MTIME|XF_NOTIME)) == 0)
X		xflags |= (XF_ATIME|XF_CTIME|XF_MTIME);
X
X#ifdef	DEBUG_XHDR
X	xflags = 0xffffffff;
X#endif
X	if ((xflags & ~XF_NOTIME) == 0)
X		return;
X
X	if (xflags & XF_ATIME) {
X		check_xtime("atime", info);
X		gen_xtime("atime", info->f_atime, info->f_ansec);
X	}
X	if (xflags & XF_CTIME) {
X		check_xtime("ctime", info);
X		gen_xtime("ctime", info->f_ctime, info->f_cnsec);
X	}
X	if (xflags & XF_MTIME) {
X		check_xtime("mtime", info);
X		gen_xtime("mtime", info->f_mtime, info->f_mnsec);
X	}
X
X	if (xflags & XF_UID) {
X		/* LINTED */
X		if (info->f_uid >= 0)
X			gen_unumber("uid", (Ullong)info->f_uid);
X		else
X			gen_number("uid", (Llong)info->f_uid);
X	}
X	if (xflags & XF_GID) {
X		/* LINTED */
X		if (info->f_gid >= 0)
X			gen_unumber("gid", (Ullong)info->f_gid);
X		else
X			gen_number("gid", (Llong)info->f_gid);
X	}
X
X	if (xflags & XF_UNAME) {
X		ic_nameuid(name, sizeof (name)-1, info->f_uid);
X		gen_text("uname", name, -1, T_UTF8);
X	}
X	if (xflags & XF_GNAME) {
X		ic_namegid(name, sizeof (name)-1, info->f_gid);
X		gen_text("gname", name, -1, T_UTF8);
X	}
X
X	if (xflags & XF_PATH) {
X		gen_text("path", info->f_name, -1,
X			(info->f_flags & F_ADDSLASH) != 0 ?
X				(T_ADDSLASH|T_UTF8) : T_UTF8);
X	}
X
X	if (xflags & XF_LINKPATH && info->f_lnamelen)
X		gen_text("linkpath", info->f_lname, -1, T_UTF8);
X
X	if (xflags & XF_SIZE)
X		gen_unumber("size", (Ullong)info->f_rsize);
X
X	/*
X	 * If "SCHILY.realsize" is needed, it must be past any "size" keyword
X	 * in case a "size" keyword is also present.
X	 */
X	if (xflags & XF_REALSIZE)
X		gen_unumber("SCHILY.realsize", (Ullong)info->f_size);
X	if (xflags & XF_OFFSET)
X		gen_unumber("SCHILY.offset", (Ullong)info->f_contoffset);
X
X	if (H_TYPE(hdrtype) == H_SUNTAR) {
X		if (xflags & XF_DEVMAJOR) {
X			/* LINTED */
X			if (info->f_rdevmaj >= 0)
X				gen_unumber("SUN.devmajor", (Ullong)info->f_rdevmaj);
X			else
X				gen_number("SUN.devmajor", (Llong)info->f_rdevmaj);
X		}
X		if (xflags & XF_DEVMINOR) {
X			/* LINTED */
X			if (info->f_rdevmin >= 0)
X				gen_unumber("SUN.devminor", (Ullong)info->f_rdevmin);
X			else
X				gen_number("SUN.devminor", (Llong)info->f_rdevmin);
X		}
X	} else {
X		if (xflags & XF_DEVMAJOR) {
X			/* LINTED */
X			if (info->f_rdevmaj >= 0)
X				gen_unumber("SCHILY.devmajor", (Ullong)info->f_rdevmaj);
X			else
X				gen_number("SCHILY.devmajor", (Llong)info->f_rdevmaj);
X		}
X		if (xflags & XF_DEVMINOR) {
X			/* LINTED */
X			if (info->f_rdevmin >= 0)
X				gen_unumber("SCHILY.devminor", (Ullong)info->f_rdevmin);
X			else
X				gen_number("SCHILY.devminor", (Llong)info->f_rdevmin);
X		}
X	}
X
X#ifdef	USE_ACL
X	/*
X	 * POSIX draft Access Control Lists, currently supported e.g. by Linux.
X	 * Solaris ACLs have been converted to POSIX draft ACLs before.
X	 */
X#ifdef	__later__
X	if (xflags & (XF_ACL_ACCESS|XF_ACL_DEFAULT)) {
X		gen_text("SCHILY.acl.type", "POSIX draft", 11, 0);
X	}
X#endif
X	if (xflags & XF_ACL_ACCESS) {
X		gen_text("SCHILY.acl.access", info->f_acl_access, -1, T_UTF8);
X	}
X
X	if (xflags & XF_ACL_DEFAULT) {
X		gen_text("SCHILY.acl.default", info->f_acl_default, -1, T_UTF8);
X	}
X#endif  /* USE_ACL */
X
X#ifdef USE_XATTR
X	if ((xflags & XF_XATTR) && info->f_xattr) {
X		star_xattr_t	*x;
X
X		for (x = info->f_xattr; x->name; x++) {
X			char aname[PATH_MAX];
X			js_snprintf(aname, PATH_MAX, "SCHILY.xattr.%s", x->name);
X			gen_text(aname, x->value, x->value_len, 0);
X		}
X	}
X#endif  /* USE_XATTR */
X
X#ifdef	USE_FFLAGS
X	if (xflags & XF_FFLAGS) {
Xextern char	*textfromflags	__PR((FINFO *, char *));
X
X		char	fbuf[512];
X		gen_text("SCHILY.fflags", textfromflags(info, fbuf), -1, 0);
X	}
X#endif
X
X	if (dodump) {
X		/* LINTED */
X		if (info->f_dev >= 0)
X			gen_unumber("SCHILY.dev", (Ullong)info->f_dev);
X		else
X			gen_number("SCHILY.dev", (Llong)info->f_dev);
X		gen_unumber("SCHILY.ino", (Ullong)info->f_ino);
X		gen_unumber("SCHILY.nlink", (Ullong)info->f_nlink);
X		gen_text("SCHILY.filetype", XTTONAME(info->f_rxftype), -1, 0);
X#ifdef	__needed__
X		if (info->f_rxftype != info->f_xftype)
X			gen_text("SCHILY.tarfiletype", XTTONAME(info->f_xftype), -1, 0);
X#endif
X		if (is_dir(info)) {
X			int	oidx = xbidx;
X
X			if (info->f_dir)
X				gen_text("SCHILY.dir",
X					info->f_dir, info->f_dirlen, T_UTF8);
X			/*
X			 * Estimate same length for inode array and dir content
X			 * Add 1 to (xbidx - oidx) as "SCHILY.dino" is one
X			 * longer than "SCHILY.dir".
X			 */
X			if (info->f_dirinos)
X				gen_iarray("SCHILY.dino",
X					info->f_dirinos, info->f_dirents,
X					xbidx - oidx + 1);
X		}
X	} else if (is_multivol(info)) {
X		gen_text("SCHILY.filetype", XTTONAME(info->f_rxftype), -1, 0);
X	}
X
X	write_xhdr(props.pr_xc);
X}
X
XLOCAL void
Xcheck_xtime(keyword, info)
X	register char	*keyword;
X	register FINFO	*info;
X{
X	long	l = 0;	/* Make GCC happy */
X
X	if (*keyword == 'a')
X		l = info->f_ansec;
X	else if (*keyword == 'c')
X		l = info->f_cnsec;
X	else if (*keyword == 'm')
X		l = info->f_mnsec;
X
X	if (l >= 0 && l < 1000000000)
X		return;
X
X	/*
X	 * check_xtime() is used in write mode so info->f_name is valid.
X	 */
X	errmsgno(EX_BAD, "Bad '%s' nsec value %ld for '%s' at %lld.\n",
X		keyword, l, info->f_name, tblocks());
X	l = 0;
X
X	if (*keyword == 'a')
X		info->f_ansec = l;
X	else if (*keyword == 'c')
X		info->f_cnsec = l;
X	else if (*keyword == 'm')
X		info->f_mnsec = l;
X}
X
X/*
X * Create a time string with sub-second granularity.
X *
X * <length> <time-name-spec>=<seconds>.<nano-seconds>\n
X *
X *	00 atime=<seconds>.123456789\n
X *	00 ctime=<seconds>.123456789\n
X *	00 mtime=<seconds>.123456789\n
X *
X *	00 mtime=.123456789\n
X *	.123456789.123456789
X *
X * As we always emmit 9 digits for the sub-second part, the
X * length of this entry is always more than 20 and less than 100.
X * The size of an entry is 20 + the size of the "seconds" part of the entry.
X * With 64 bit unsigned numbers, the "seconds" part will be 20 char at max.
X * We may safely fill in the two digit <length> later, when we know the value.
X *
X * The code is highly optimised because in PAX (extended TAR) mode we are
X * spending a significant amount of user CPU time in it.
X */
XEXPORT void
Xgen_xtime(keyword, sec, nsec)
X		char	*keyword;
X	register time_t	sec;
X	register Ulong	nsec;
X{
X		char	nb[32];
X	register char	*p;
X	register char	*np;
X	register int	len;
X
X	if (nsec >= 1000000000)	/* We would create an unusable string */
X		nsec = 0;
X
X	if ((xbidx + 100) > xblen)
X		xbgrow(100);
X
X	/*
X	 * The following code is equivalent to:
X	 *
X	 * sprintf(p, "%d %s=%lld.%9.9ld\n", length, keyword, (Llong)sec, nsec)
X	 *
X	 * But is twice as fast.
X	 */
X	len = 20;		/* Base length, second field must be added  */
X	p = &xbuf[xbidx+2];	/* point past length field		    */
X	/*
X	 * Fill in " ?time="
X	 */
X	*p++ = ' ';
X	if (keyword[0] == 'a' || keyword[0] == 'c' || keyword[0] == 'm') {
X		*p++ = keyword[0];
X		*p++ = 't'; *p++ = 'i'; *p++ = 'm'; *p++ = 'e';
X	} else {
X		len = 15;	/* 2digitlen + ' ' + '=' + '.' + nsec + '\n' */
X		np = keyword;
X		while ((*p++ = *np++) != '\0')
X			len++;
X		--p;
X	}
X	*p++ = '=';
X	if (sec < 0) {		/* Time is before 01.01.1970 ...	    */
X		*p++ = '-';
X		sec = -sec;
X		len += 1;
X	}
X
X	np = &nb[sizeof (nb)-1]; /* Point to end of number string buffer    */
X	*np = '\0';		/* Null terminate			    */
X	ui2decimal(sec, np);	/* Convert to unsigned decimal string	    */
X	len += &nb[sizeof (nb)-1] - np;
X
X	scopy(p, np);		/* Copy number string buffer to xheader	    */
X	--p,			/* Overshoot compensation		    */
X	*p++ = '.';		/* Decimal point between secs and nsecs	    */
X
X	np = &p[10];		/* Point to end of <nsec> string part	    */
X	*np = '\0';		/* Null terminate			    */
X	*--np = '\n';		/* Newline at end of line		    */
X	ui2decimal(nsec, np);	/* Convert to unsigned decimal string	    */
X	while (np > p)
X		*--np = '0';	/* Left fill with '0' to 9 digits	    */
X
X	np = &xbuf[xbidx+2];	/* Point to end of length string part	    */
X	xbidx += len;		/* 'len' is trashed in ui2decimal()	    */
X	ui2decimal(len, np);	/* Convert to unsigned decimal string	    */
X}
X
X/*
X * Create a generic unsigned number string.
X *
X * <length> <name-spec>=<value>\n
X *
X * The length of this entry is always less than 100 chars if the length of the
X * 'name-spec' is less than 75 chars (the maximum length of a 64 bit number in
X * decimal is 20 digits). Even in case of a 128 bit number length will be less
X * than 100 chars if the length of 'name-spec' is less than 55 chars.
X *
X * The code is highly optimised because in dump mode when using extended TAR
X * headers with additional fields, we are spending a significant amount of
X * user CPU time in it.
X */
XEXPORT void
Xgen_unumber(keyword, arg)
X	register char	*keyword;
X	register Ullong	arg;
X{
X		char	nb[64];	/* 41 is enough for unsigned 128 bit ints    */
X	register char	*p;
X	register char	*np;
X	register int	len;
X	register int	i;
X
X	if ((xbidx + 100) > xblen)
X		xbgrow(100);
X
X	/*
X	 * The following code is equivalent to:
X	 *
X	 * sprintf(p, "%d %s=%llu\n", length, keyword, arg);
X	 *
X	 * But is twice as fast.
X	 */
X	np = &nb[sizeof (nb)-1]; /* Point to end of number string buffer    */
X	*np = '\0';		/* Null terminate			    */
X	ui2decimal(arg, np);	/* Convert to unsigned decimal string	    */
X
X	len = strlen(keyword);	/* Compute the length, start with strlen(kw) */
X
X	len += &nb[sizeof (nb)-1] - np;	/* Add strlen(number)		    */
X	len += 2 + 3;		/* Add 2 for strlen(len) and 3 for " =\n"   */
X
X	if (len < 10) {		/* If < 10, the len field is 1 digit only   */
X		len -= 1;	/* This happens when strlen(keyword) is < 4 */
X		i = 1;		/* and number is one digit only.	    */
X	} else {
X		i = 2;
X	}
X	p = &xbuf[xbidx+i];	/* Point past length field		    */
X	*p++ = ' ';		/* Fill in space after length field	    */
X	scopy(p, keyword);	/* Copy keyword into to xheader		    */
X	--p,			/* Overshoot compensation		    */
X	*p++ = '=';		/* Fill in '=' after keyword field	    */
X
X	scopy(p, np);		/* Copy number string buffer to xheader	    */
X	*--p = '\n';		/* Newline at end of line		    */
X
X	np = &xbuf[xbidx+i];	/* Point to end of length string part	    */
X	xbidx += len;		/* 'len' is trashed in ui2decimal()	    */
X	ui2decimal(len, np);	/* Convert to unsigned decimal string	    */
X}
X
X/*
X * Create a generic signed number string.
X *
X * <length> <name-spec>=<value>\n
X *
X * The length of this entry is always less than 100 chars if the length of the
X * 'name-spec' is less than 75 chars (the maximum length of a 64 bit number in
X * decimal is 20 digits). Even in case of a 128 bit number length will be less
X * than 100 chars if the length of 'name-spec' is less than 55 chars.
X *
X * The code is highly optimised because in dump mode when using extended TAR
X * headers with additional fields, we are spending a significant amount of
X * user CPU time in it.
X */
XEXPORT void
Xgen_number(keyword, arg)
X	register char	*keyword;
X	register Llong	arg;
X{
X		char	nb[64];	/* 41 is enough for unsigned 128 bit ints    */
X	register char	*p;
X	register char	*np;
X	register int	len;
X	register int	i;
X		BOOL	neg = FALSE;
X
X	if ((xbidx + 100) > xblen)
X		xbgrow(100);
X
X	/*
X	 * The following code is equivalent to:
X	 *
X	 * sprintf(p, "%d %s=%lld\n", length, keyword, arg);
X	 *
X	 * But is twice as fast.
X	 */
X	np = &nb[sizeof (nb)-1]; /* Point to end of number string buffer    */
X	*np = '\0';		/* Null terminate			    */
X	if (arg < 0) {
X		arg = -arg;
X		neg = TRUE;
X	}
X	ui2decimal(arg, np);	/* Convert to unsigned decimal string	    */
X	if (neg)
X		*--np = '-';
X
X	len = strlen(keyword);	/* Compute the length, start with strlen(kw) */
X
X	len += &nb[sizeof (nb)-1] - np;	/* Add strlen(number)		    */
X	len += 2 + 3;		/* Add 2 for strlen(len) and 3 for " =\n"   */
X
X	if (len < 10) {		/* If < 10, the len field is 1 digit only   */
X		len -= 1;	/* This happens when strlen(keyword) is < 4 */
X		i = 1;		/* and number is one digit only.	    */
X	} else {
X		i = 2;
X	}
X	p = &xbuf[xbidx+i];	/* Point past length field		    */
X	*p++ = ' ';		/* Fill in space after length field	    */
X	scopy(p, keyword);	/* Copy keyword into to xheader		    */
X	--p,			/* Overshoot compensation		    */
X	*p++ = '=';		/* Fill in '=' after keyword field	    */
X
X	scopy(p, np);		/* Copy number string buffer to xheader	    */
X	*--p = '\n';		/* Newline at end of line		    */
X
X	np = &xbuf[xbidx+i];	/* Point to end of length string part	    */
X	xbidx += len;		/* 'len' is trashed in ui2decimal()	    */
X	ui2decimal(len, np);	/* Convert to unsigned decimal string	    */
X}
X
X/*
X * Create a string from an array of unsigned inode numbers.
X *
X * <length> <keyword>=<values>\n
X *
X * <values> is a space separated list of unsigned integers in decimal ascii.
X *
X * The len parameter is the estimated length of the whole string. It is used
X * to pre-allocate a buffer that hopefully has the right size already in order
X * to avoid copying the content.
X *
X * The code is highly optimised because in dump mode when using extended TAR
X * headers with additional fields, we are spending a significant amount of
X * user CPU time in it.
X */
XLOCAL void
Xgen_iarray(keyword, arg, ents, len)
X	register char	*keyword;
X		ino_t	*arg;
X		int	ents;
X	register int	len;	/* Estimated length */
X{
X		char	nb[64];	/* 41 is enough for unsigned 128 bit ints    */
X	register Ullong	ll;
X	register char	*p;
X	register char	*np;
X	register int	i;
X	register int	llen;
X	register int	olen;
X
X	/*
X	 * The following code is equivalent to:
X	 *
X	 * sprintf(p, "%d %s=%llu %llu ...\n", length, keyword, arg[...]...);
X	 *
X	 * But avoids copying if possible.
X	 */
X	i = len;
X	if (len <= 0)			/* No estimated length already	    */
X		len = strlen(keyword) + 3; /* + ' ' + '=' + '\n'	    */
X	olen = len;
X	len += llen = len_len(len);	/* add length of length string	    */
X
X	if (i <= 0)
X		i = len + ents * 2;	/* Make a minimal guess on the len  */
X	else
X		i = len;		/* Use guessed value from parameter */
X
X	if ((xbidx + i) > xblen)
X		xbgrow(i);
X
X	p = &xbuf[xbidx+llen];	/* Point past length field		    */
X	*p++ = ' ';		/* Fill in space after length field	    */
X	scopy(p, keyword);	/* Copy keyword into to xheader		    */
X	--p,			/* Overshoot compensation		    */
X	*p++ = '=';		/* Fill in '=' after keyword field	    */
X
X	len = p - &xbuf[xbidx];	/* strlen(keyword) + ' ' + '='		    */
X	for (i = 0; i < ents; i++) {
X		if (((p - xbuf) + 100) > xblen) {
X			register int	xb_idx;
X			/*
X			 * The address for xbuf may change in case that
X			 * realloc() cannot grow the current memory chunk,
X			 * recalculate 'p' in this case.
X			 */
X			xb_idx = p - xbuf;
X			xbgrow(100);
X			p = xbuf + xb_idx;
X		}
X		ll = (Llong)arg[i];
X		np = &nb[sizeof (nb)-1]; /* Point to end of number str. buf */
X		*np = '\0';		/* Null terminate		    */
X		ui2decimal(ll, np);	/* Convert to unsigned decimal str. */
X		len += &nb[sizeof (nb)-1] - np;	/* strlen(number)	    */
X		len += 1;		/* Space (' ') or Newline ('\n')    */
X
X		scopy(p, np);		/* Copy number str. buf to xheader  */
X		p[-1] = ' ';		/* Space at end of number	    */
X	}
X	*--p = '\n';			/* Overwrite last space by newline  */
X	i = p - &xbuf[xbidx] + 1; /* Total string length		    */
X	i -= llen;		/* Subtract old length length value	    */
X
X	if (olen != i) {	/* Length without length string changed	    */
X		olen = llen;	/* Save old length string length	    */
X		llen = len_len(i);	/* New length of length string	    */
X		if (olen != llen) {	/* We need to move the whole text   */
X			p = &xbuf[xbidx+olen];
X			olen = llen - olen;
X			movebytes(p, p+olen, i);
X		}
X		len = i + llen;
X	}
X
X	np = &xbuf[xbidx+llen];	/* Point to end of length string part	    */
X	*np = ' ';		/* May have been overwritten by movebytes() */
X	xbidx += len;		/* 'len' is trashed in ui2decimal()	    */
X	ui2decimal(len, np);	/* Convert to unsigned decimal string	    */
X}
X
X/*
X * Create a generic text string in UTF-8 coding.
X *
X * <length> <name-spec>=<value>\n
X *
X * This function will have to carefully check for the resultant length
X * and thus compute the total length in advance. If the rare case that the
X * UTF-8 conversion changes the length so much that the length of the length
X * string will be different from the estimated value, we need to move whole
X * text by one.
X *
X * The code is highly optimised because in dump mode when using extended TAR
X * headers with additional fields, we may need to copy directory listings
X * that are longer then 100000 bytes.
X */
XEXPORT void
Xgen_text(keyword, arg, alen, flags)
X	register char	*keyword;
X		char	*arg;
X		int	alen;
X		Uint	flags;
X{
X	register char	*p;
X	register char	*np;
X	register int	len;
X	register int	i;
X	register int	llen;
X	register int	olen;
X
X	/*
X	 * The following code is equivalent to:
X	 *
X	 * sprintf(p, "%d %s=%s\n", length, keyword, arg);
X	 *
X	 * But avoids copying if possible.
X	 */
X	if ((len = alen) == -1)
X		len = strlen(arg);
X	alen = len;
X	if (flags & T_ADDSLASH)		/* only used if 'path' is a dir	    */
X		len++;
X
X	len += strlen(keyword) + 3;	/* + ' ' + '=' + '\n'		    */
X	olen = len;
X	len += llen = len_len(len);	/* add length of length string	    */
X
X	i = len;
X	if (flags & T_UTF8)
X		i *= 2;			/* UTF-8 Factor may be up to 6!	    */
X	if ((xbidx + i) > xblen)
X		xbgrow(i);
X
X
X	p = &xbuf[xbidx+llen];	/* Point past length field		    */
X	*p++ = ' ';		/* Fill in space after length field	    */
X	scopy(p, keyword);	/* Copy keyword into to xheader		    */
X	--p,			/* Overshoot compensation		    */
X	*p++ = '=';		/* Fill in '=' after keyword field	    */
X
X	if (flags & T_UTF8) {
X		i = to_utf8l((Uchar *)p, (Uchar *)arg, alen);
X		p += i + 1;
X	} else {
X		p = movebytes(arg, p, alen);
X		p++;
X	}
X
X	if (flags & T_ADDSLASH) { /* only used if 'path' is a dir	    */
X		i++;		/* String length increases by '/'	    */
X		*--p = '/';	/* Slash at end of string		    */
X		*++p = '\n';	/* Newline at end of line		    */
X	} else {
X		*--p = '\n';	/* Newline at end of line		    */
X	}
X	i = p - &xbuf[xbidx] + 1; /* Total string length		    */
X	i -= llen;		/* Subtract old length length value	    */
X
X	if (olen != i) {	/* Length without length string changed	    */
X		olen = llen;	/* Save old length string length	    */
X		llen = len_len(i);	/* New length of length string	    */
X		if (olen != llen) {	/* We need to move the whole text   */
X			p = &xbuf[xbidx+olen];
X			olen = llen - olen;
X			movebytes(p, p+olen, i);
X		}
X		len = i + llen;
X	}
X
X	np = &xbuf[xbidx+llen];	/* Point to end of length string part	    */
X	*np = ' ';		/* May have been overwritten by movebytes() */
X	xbidx += len;		/* 'len' is trashed in ui2decimal()	    */
X	ui2decimal(len, np);	/* Convert to unsigned decimal string	    */
X}
X
X/*
X * It bad to see new global variables while we are working on a star library.
X */
XLOCAL	star_xattr_t	*static_xattr;
X
X/*
X * The xattr list grows dynamically. Reset it before reading
X * the next Extended Header.
X */
XEXPORT void
Xtcb_to_xhdr_reset()
X{
X	/*
X	 * XXX Dies soll laut A Grünbacher in tcb_to_info() aufgerufen werden
X	 */
X	free_xattr(&static_xattr);
X}
X
XLOCAL int
Xlen_len(len)
X	register int	len;
X{
X	if (len <= 8)
X		return (1);
X	if (len <= 97)
X		return (2);
X	if (len <= 996)
X		return (3);
X	if (len <= 9995)
X		return (4);
X	if (len <= 99994)
X		return (5);
X	if (len <= 999993)
X		return (6);
X	if (len <= 9999992)
X		return (7);
X	if (len <= 99999991)
X		return (8);
X	if (len <= 999999990)
X		return (9);
X
X	return (10);
X}
X
X/*
X * Lookup command in command tab
X */
XLOCAL xtab_t *
Xlookup(cmd, clen, cp)
X	register char	*cmd;
X	register int	clen;
X	register xtab_t	*cp;
X{
X	for (; cp->x_name; cp++) {
X		register int	len = cp->x_namelen-1;
X
X		if (cp->x_name[len] == '*') {
X			if (strncmp(cmd, cp->x_name, len) == 0)
X				return (cp);
X		}
X		if (clen != cp->x_namelen)
X			continue;
X
X		if ((*cmd == *cp->x_name) &&
X		    strcmp(cmd, cp->x_name) == 0) {
X			return (cp);
X		}
X	}
X	return ((xtab_t *)NULL);
X}
X
X/*
X * Read extended POSIX.1-2001 header and parse the content.
X */
XEXPORT int
Xtcb_to_xhdr(ptb, info)
X	register TCB	*ptb;
X	register FINFO	*info;
X{
X	register char	*p;
X	register char 	*ep;
X		FINFO	*oinfo = info;
X		move_t	move;
X		Ullong	ull;
X
X#ifdef	XH_DEBUG
Xerror("Block: %lld\n", tblocks());
X#endif
X	if (ptb->dbuf.t_linkflag == LF_GHDR) {
X		grinit();
X		info = &ginfo;
X	}
X	/*
X	 * File size is strlen of extended header
X	 */
X	stolli(ptb->dbuf.t_size, &ull);
X	info->f_size = ull;
X	info->f_rsize = (off_t)info->f_size;
X	/*
X	 * Reset xbidx to make xbgrow() work correctly for our case.
X	 */
X	xbidx = 0;
X	if ((info->f_size+1) > xblen)
X		xbgrow(info->f_size+1);
X
X	/*
X	 * move_from_arch() always adds null byte to make decoding easier.
X	 */
X	move.m_data = xbuf;
X	move.m_flags = 0;
X	if (xt_file(info, vp_move_from_arch, &move, 0,
X						"moving extended header") < 0) {
X		die(EX_BAD);
X	}
X
X#ifdef	XH_DEBUG
Xerror("Block: %lld\n", tblocks());
Xerror("xbuf: '%s'\n", xbuf);
X#endif
X
X	p = xbuf;
X	ep = p + ull;
X	if (!no_xheader)
X		xhparse(info, p, ep);
X
X	if (ptb->dbuf.t_linkflag == LF_GHDR) {
X		griprint(grip);
X		gipsetup(grip);
X		info_xcopy(oinfo, info);
X	}
X	return (get_tcb(ptb));
X}
X
XEXPORT BOOL
Xxhparse(info, p, ep)
X	register FINFO	*info;
X	register char	*p;
X	register char	*ep;
X{
X	register xtab_t	*cp;
X	register char	*keyword;
X	register char 	*arg;
X		long	length;
X
X	while (p < ep) {
X		register int klen;
X
X		if (*p < '0' || *p > '9') {
X			errmsgno(EX_BAD,
X			"Syntax error in extended header: non digit in len at %lld.\n",
X			tblocks());
X			return (FALSE);
X		}
X		keyword = astolb(p, &length, 10);
X		if (*keyword != ' ') {
X			errmsgno(EX_BAD,
X			"Syntax error in extended header: missing ' ' at %lld.\n",
X			tblocks());
X			return (FALSE);
X		}
X		keyword++;
X		arg = strchr(keyword, '=');
X		klen = arg - keyword;
X		if ((arg == NULL) || (klen > length)) {
X			errmsgno(EX_BAD,
X			"Syntax error in extended header: missing '=' at %lld.\n",
X			tblocks());
X			return (FALSE);
X		}
X		*arg++ = '\0';			/* Kill equal sign */
X
X		if (*(p + length -1) != '\n') {
X			arg[-1] = '=';
X			errmsgno(EX_BAD,
X			"Syntax error in extended header: missing '\\n' at %lld.\n",
X			tblocks());
X			return (FALSE);
X		}
X		*(p + length -1) = '\0';	/* Kill new-line character */
X
X		if ((cp = lookup(keyword, klen, xtab)) != NULL) {
X			(*cp->x_func)(info, keyword, klen,
X						arg, length - (arg-p) - 1);
X		} else {
X			print_unknown(keyword);
X		}
X		arg[-1] = '=';
X		p += length;
X		p[-1] = '\n';
X	}
X	return (TRUE);
X}
X
XLOCAL void
Xprint_unknown(keyword)
X	register char	*keyword;
X{
X	register unkn_t	*up = unkn;
X
X	while (up) {
X		if (streql(keyword, up->u_name))
X			break;
X		up = up->u_next;
X	}
X	if (up == NULL) {
X		errmsgno(EX_BAD,
X			"Unknown extended header keyword '%s' ignored at %lld.\n",
X				keyword, tblocks());
X
X		up = ___malloc(sizeof (*up) + strlen(keyword), "unknown list");
X		strcpy(up->u_name, keyword);
X		up->u_next = unkn;
X		unkn = up;
X	}
X}
X
XEXPORT void
Xxh_rangeerr(keyword, arg, len)
X	char	*keyword;
X	char	*arg;
X	int	len;
X{
X	if (nowarn)
X		return;
X	errmsgno(EX_BAD,
X		"WARNING: %s '%.*s' in extended header at %lld exceeds local range.\n",
X		keyword, len, arg, tblocks());
X}
X
XLOCAL void
Xprint_toolong(keyword, arg, len)
X	char	*keyword;
X	char	*arg;
X	int	len;
X{
X	if (nowarn)
X		return;
X	errmsgno(EX_BAD,
X		"WARNING: %s '%.*s' in extended header at %lld too long, ignoring.\n",
X		keyword, len, arg, tblocks());
X}
X
XLOCAL void
Xget_xvolhdr(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	register xtab_t	*cp;
Xextern		xtab_t	volhtab[];
X
X	if ((cp = lookup(keyword, klen, volhtab)) != NULL) {
X		(*cp->x_func)(info, keyword, klen,
X					arg, len);
X	} else {
X		print_unknown(keyword);
X	}
X}
X
XLOCAL void
Xinfo_xcopy(ninfo, oinfo)
X	register FINFO	*ninfo;
X	register FINFO	*oinfo;
X{
X	if (oinfo->f_xflags & XF_ATIME) {
X		ninfo->f_atime = oinfo->f_atime;
X		ninfo->f_ansec = oinfo->f_ansec;
X		ninfo->f_xflags |= XF_ATIME;
X	}
X	if (oinfo->f_xflags & XF_CTIME) {
X		ninfo->f_ctime = oinfo->f_ctime;
X		ninfo->f_cnsec = oinfo->f_cnsec;
X		ninfo->f_xflags |= XF_CTIME;
X	}
X	if (oinfo->f_xflags & XF_MTIME) {
X		ninfo->f_mtime = oinfo->f_mtime;
X		ninfo->f_mnsec = oinfo->f_mnsec;
X		ninfo->f_xflags |= XF_MTIME;
X	}
X	/* We ignore XF_COMMENT */
X	if (oinfo->f_xflags & XF_UID) {
X		ninfo->f_uid = oinfo->f_uid;
X		ninfo->f_xflags |= XF_UID;
X	}
X	if (oinfo->f_xflags & XF_UNAME) {
X		strcpy(guname, oinfo->f_uname);
X		ninfo->f_uname = oinfo->f_uname;
X		ninfo->f_umaxlen = ninfo->f_umaxlen;
X		oinfo->f_uname = guname;
X		ninfo->f_xflags |= XF_UNAME;
X	}
X	if (oinfo->f_xflags & XF_GID) {
X		ninfo->f_gid = oinfo->f_gid;
X		ninfo->f_xflags |= XF_GID;
X	}
X	if (oinfo->f_xflags & XF_GNAME) {
X		strcpy(ggname, oinfo->f_gname);
X		ninfo->f_gname = oinfo->f_gname;
X		ninfo->f_gmaxlen = ninfo->f_gmaxlen;
X		oinfo->f_gname = ggname;
X		ninfo->f_xflags |= XF_GNAME;
X	}
X	if (oinfo->f_xflags & XF_PATH) {
X		strcpy(ninfo->f_name, oinfo->f_name);
X		ninfo->f_xflags |= XF_PATH;
X	}
X	if (oinfo->f_xflags & XF_LINKPATH) {
X		strcpy(ninfo->f_lname, oinfo->f_lname);
X		ninfo->f_xflags |= XF_LINKPATH;
X	}
X
X	if (oinfo->f_xflags & XF_SIZE) {
X		ninfo->f_rsize = oinfo->f_rsize;
X		ninfo->f_xflags |= XF_SIZE;
X	}
X	/* XF_CHARSET currently is a dummy */
X
X	if (oinfo->f_xflags & XF_DEVMAJOR) {
X		ninfo->f_rdevmaj = oinfo->f_rdevmaj;
X		ninfo->f_xflags |= XF_DEVMAJOR;
X	}
X	if (oinfo->f_xflags & XF_DEVMINOR) {
X		ninfo->f_rdevmin = oinfo->f_rdevmin;
X		ninfo->f_xflags |= XF_DEVMINOR;
X	}
X	if (oinfo->f_xflags & (XF_ACL_ACCESS|XF_ACL_DEFAULT)) {
X		errmsgno(EX_BAD, "WARNING: Found global ACL data at %lld.\n",
X			tblocks());
X	}
X	if (oinfo->f_xflags & XF_FFLAGS) {
X		ninfo->f_fflags = oinfo->f_fflags;
X		ninfo->f_xflags |= XF_FFLAGS;
X	}
X	if (oinfo->f_xflags & XF_REALSIZE) {
X		ninfo->f_size = oinfo->f_size;
X		ninfo->f_xflags |= XF_REALSIZE;
X	}
X	if (oinfo->f_xflags & XF_OFFSET) {
X		ninfo->f_contoffset = oinfo->f_contoffset;
X		ninfo->f_xflags |= XF_OFFSET;
X	}
X	if (oinfo->f_xflags & XF_XATTR) {
X		errmsgno(EX_BAD, "WARNING: Found global XATTR data at %lld.\n",
X			tblocks());
X	}
X}
X
X/*
X * generic function to read args that hold times
X *
X * The time may either be in second resolution or in sub-second resolution.
X * In the latter case the second fraction and the sub second fraction
X * is separated by a dot ('.').
X */
XEXPORT BOOL
Xget_xtime(keyword, arg, len, secp, nsecp)
X	char	*keyword;
X	char	*arg;
X	int	len;
X	time_t	*secp;
X	long	*nsecp;
X{
X#ifdef	__use_default_time__
Xextern struct	timeval	ddate;
X#endif
X	Llong	ll;
X	long	l;
X	int	flen;
X	char	*p;
X
X	p = astollb(arg, &ll, 10);
X	if (*p == '\0' || *p == '.') {
X		time_t	secs = ll;
X		if (secs != ll) {
X			xh_rangeerr(keyword, arg, len);
X#ifdef	__use_default_time__
X			*secp = ddate.tv_sec;
X#endif
X			goto bad;
X		}
X		*secp = ll;		/* XXX Check for NULL ptr? */
X	}
X	if (*p == '\0') {		/* time has second resolution only */
X		if (nsecp == NULL)
X			return (TRUE);
X		*nsecp = 0;
X		return (TRUE);
X	} else if (*p == '.') {		/* time has sub-second resolution */
X		flen = strlen(++p);	/* remember resolution		    */
X		if (flen > 9)		/* if resolution is better than	    */
X			p[9] = '\0';	/* nanoseconds kill rest of line as */
X		p = astolb(p, &l, 10);	/* we don't understand more.	    */
X		if (*p == '\0') {	/* number read correctly	    */
X			if (l >= 0) {
X				while (flen < 9) {	/* convert to nsecs */
X					l *= 10;
X					flen++;
X				}
X				if (nsecp == NULL)
X					return (TRUE);
X				*nsecp = l;
X				return (TRUE);
X			}
X		}
X	}
Xbad:
X	errmsgno(EX_BAD, "Bad timespec '%s' for '%s' in extended header at %lld.\n",
X		arg, keyword, tblocks());
X	return (FALSE);
X}
X
X/*
X * get read access time from extended header
X */
X/* ARGSUSED */
XLOCAL void
Xget_atime(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_ATIME;
X		return;
X	}
X	if (get_xtime(keyword, arg, len, &info->f_atime, &info->f_ansec))
X		info->f_xflags |= XF_ATIME;
X}
X
X/*
X * get inode status change time from extended header
X */
X/* ARGSUSED */
XLOCAL void
Xget_ctime(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_CTIME;
X		return;
X	}
X	if (get_xtime(keyword, arg, len, &info->f_ctime, &info->f_cnsec))
X		info->f_xflags |= XF_CTIME;
X}
X
X/*
X * get modification time from extended header
X */
X/* ARGSUSED */
XLOCAL void
Xget_mtime(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_MTIME;
X		return;
X	}
X	if (get_xtime(keyword, arg, len, &info->f_mtime, &info->f_mnsec))
X		info->f_xflags |= XF_MTIME;
X}
X
X/*
X * generic function to read args that hold decimal numbers
X */
X#ifdef	__needed_
XEXPORT BOOL
Xget_number(keyword, arg, llp)
X	char	*keyword;
X	char	*arg;
X	Llong	*llp;
X{
X	Llong	ll;
X	char	*p;
X
X	p = astollb(arg, &ll, 10);
X	if (*p == '\0') {		/* number read correctly */
X		*llp = ll;		/* XXX Check for NULL ptr? */
X		return (TRUE);
X	}
X	errmsgno(EX_BAD, "Bad number '%s' for '%s' in extended header at %lld.\n",
X		arg, keyword, tblocks());
X	return (FALSE);
X}
X#endif
X
X/*
X * generic function to read args that hold unsigned decimal numbers
X */
XLOCAL BOOL
Xget_xnumber(keyword, arg, ullp, type)
X	char	*keyword;
X	char	*arg;
X	Ullong	*ullp;
X	char	*type;
X{
X	Ullong	ull;
X	char	*p;
X
X	seterrno(0);
X	p = astoullb(arg, &ull, 10);
X	if (*p == '\0') {		/* number read correctly */
X		if (geterrno() != 0) {
X			errmsgno(EX_BAD,
X			"Number overflow with '%s' for '%s' in extended header at %lld.\n",
X			arg, keyword, tblocks());
X			return (FALSE);
X		}
X		*ullp = ull;		/* XXX Check for NULL ptr? */
X		return (TRUE);
X	}
X	errmsgno(EX_BAD, "Bad %s number '%s' for '%s' in extended header at %lld.\n",
X		type,
X		arg, keyword, tblocks());
X	return (FALSE);
X}
X
XEXPORT BOOL
Xget_unumber(keyword, arg, ullp, maxval)
X	char	*keyword;
X	char	*arg;
X	Ullong	*ullp;
X	Ullong	maxval;
X{
X	if (!get_xnumber(keyword, arg, ullp, "unsigned"))
X		return (FALSE);
X
X	if (*ullp > maxval) {
X		errmsgno(EX_BAD,
X		"Value '%s' is out of range 0..%llu for '%s' in extended header at %lld.\n",
X		arg, maxval, keyword, tblocks());
X		return (FALSE);
X	}
X	return (TRUE);
X}
X
X
X/*
X * generic function to read args that hold signed decimal numbers
X */
XEXPORT BOOL
Xget_snumber(keyword, arg, ullp, negp, minval, maxval)
X	char	*keyword;
X	char	*arg;
X	Ullong	*ullp;
X	BOOL	*negp;
X	Ullong	minval;
X	Ullong	maxval;
X{
X	char	*p = arg;
X#define	is_space(c)	 ((c) == ' ' || (c) == '\t')
X
X	while (is_space(*p))
X		p++;
X
X	*negp = FALSE;
X	if (*p == '-') {
X		p++;
X		*negp = TRUE;
X	}
X	return (get_xnumber(keyword, p, ullp, "signed"));
X}
X
X/*
X * get user id (if > 2097151)
X * POSIX requires uid_t to be a signed int but the values for uid_t to be
X * non-negative.
X * We allow signed ints and carefully check the values.
X */
X/* ARGSUSED */
XLOCAL void
Xget_uid(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X	BOOL	neg = FALSE;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_UID;
X		return;
X	}
X	if (get_snumber(keyword, arg, &ull, &neg,
X					-(Ullong)UID_T_MIN, UID_T_MAX)) {
X		info->f_xflags |= XF_UID;
X		if (neg)
X			info->f_uid = -ull;
X		else
X			info->f_uid = ull;
X
X		if ((neg && -info->f_uid != ull) ||
X			(!neg && info->f_uid != ull)) {
X
X			xh_rangeerr(keyword, arg, len);
X			info->f_flags |= F_BAD_UID;
X			info->f_uid = ic_uid_nobody();
X		}
X	}
X}
X
X/*
X * get group id (if > 2097151)
X * POSIX requires gid_t to be a signed int but the values for gid_t to be
X * non-negative.
X * We allow signed ints and carefully check the values.
X */
X/* ARGSUSED */
XLOCAL void
Xget_gid(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X	BOOL	neg = FALSE;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_GID;
X		return;
X	}
X	if (get_snumber(keyword, arg, &ull, &neg,
X					-(Ullong)GID_T_MIN, GID_T_MAX)) {
X		info->f_xflags |= XF_UID;
X		if (neg)
X			info->f_gid = -ull;
X		else
X			info->f_gid = ull;
X
X		if ((neg && -info->f_gid != ull) ||
X			(!neg && info->f_gid != ull)) {
X
X			xh_rangeerr(keyword, arg, len);
X			info->f_flags |= F_BAD_GID;
X			info->f_gid = ic_gid_nobody();
X		}
X	}
X}
X
X/*
X * Space for returning user/group names.
X * XXX If we ever change to use allocated space, we need to change info_xcopy()
X */
XLOCAL	Uchar	_uname[MAX_UNAME+1];
XLOCAL	Uchar	_gname[MAX_UNAME+1];
X
X/*
X * get user name (if name length is > 32 chars or if contains non ASCII chars)
X */
X/* ARGSUSED */
XLOCAL void
Xget_uname(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_UNAME;
X		return;
X	}
X	if (strlen(arg) > MAX_UNAME) {
X		print_toolong(keyword, arg, len);
X		return;
X	}
X	if (from_utf8(_uname, (Uchar *)arg)) {
X		info->f_xflags |= XF_UNAME;
X		info->f_uname = (char *)_uname;
X		info->f_umaxlen = strlen((char *)_uname);
X	} else {
X		bad_utf8(keyword, arg);
X	}
X}
X
X/*
X * get group name (if name length is > 32 chars or if contains non ASCII chars)
X */
X/* ARGSUSED */
XLOCAL void
Xget_gname(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_GNAME;
X		return;
X	}
X	if (strlen(arg) > MAX_UNAME) {
X		print_toolong(keyword, arg, len);
X		return;
X	}
X	if (from_utf8(_gname, (Uchar *)arg)) {
X		info->f_xflags |= XF_GNAME;
X		info->f_gname = (char *)_gname;
X		info->f_gmaxlen = strlen((char *)_gname);
X	} else {
X		bad_utf8(keyword, arg);
X	}
X}
X
X/*
X * get path (if name length is > 100-255 chars or if contains non ASCII chars)
X */
X/* ARGSUSED */
XLOCAL void
Xget_path(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_PATH;
X		return;
X	}
X	if (strlen(arg) > PATH_MAX) {
X		print_toolong(keyword, arg, len);
X		return;
X	}
X	/*
X	 * Check whether we are called via get_xhtype() -> xhparse()
X	 */
X	if (info->f_name == NULL)
X		return;
X	if (from_utf8((Uchar *)info->f_name, (Uchar *)arg)) {
X		info->f_xflags |= XF_PATH;
X	} else {
X		bad_utf8(keyword, arg);
X	}
X}
X
X/*
X * get link path (if name length is > 100 chars or if contains non ASCII chars)
X */
X/* ARGSUSED */
XLOCAL void
Xget_lpath(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_xflags &= ~XF_LINKPATH;
X		return;
X	}
X	if (strlen(arg) > PATH_MAX) {
X		print_toolong(keyword, arg, len);
X		return;
X	}
X	/*
X	 * Check whether we are called via get_xhtype() -> xhparse()
X	 */
X	if (info->f_lname == NULL)
X		return;
X	if (from_utf8((Uchar *)info->f_lname, (Uchar *)arg)) {
X		info->f_xflags |= XF_LINKPATH;
X	} else {
X		bad_utf8(keyword, arg);
X	}
X}
X
X/*
X * get size, either real size or size on tape (usually when size is > 8 GB)
X * The file size is doubtlessly an ungined integer
X */
X/* ARGSUSED */
XLOCAL void
Xget_size(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_SIZE;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, OFF_T_MAX)) {
X		info->f_xflags |= XF_SIZE;
X		info->f_llsize = ull;
X		info->f_rsize = (off_t)ull;
X		if (info->f_rsize != ull) {
X			xh_rangeerr(keyword, arg, len);
X			ull = 0;
X			info->f_flags |= (F_BAD_META | F_BAD_SIZE);
X			info->f_rsize = (off_t)ull;
X		}
X		/*
X		 * If real size is not yet known, copy over the tape size to
X		 * avoid problems. If real size is found later, it will
X		 * overwrite unconditional.
X		 */
X		if ((info->f_xflags & XF_REALSIZE) == 0) {
X			info->f_xflags |= XF_REALSIZE;
X			info->f_size = (off_t)ull;
X		}
X	}
X}
X
X/*
X * get real file size (usually when size is > 8 GB)
X * The real file size is doubtlessly an ungined integer
X */
X/* ARGSUSED */
XLOCAL void
Xget_realsize(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_REALSIZE;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, OFF_T_MAX)) {
X		info->f_xflags |= XF_REALSIZE;
X		info->f_size = (off_t)ull;
X		if (info->f_size != ull) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_size = (off_t)0;
X		}
X	}
X}
X
X/*
X * get multivolume file offset (usually when size is > 8 GB)
X * The multivolume file offset is doubtlessly an ungined integer
X */
X/* ARGSUSED */
XLOCAL void
Xget_offset(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_OFFSET;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, OFF_T_MAX)) {
X		info->f_xflags |= XF_OFFSET;
X		info->f_contoffset = (off_t)ull;
X		if (info->f_contoffset != ull) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_contoffset = (off_t)0;
X		}
X	}
X}
X
X/*
X * get major device number (always vendor unique)
X * The major device number should be unsigned but POSIX does not say anything
X * about the content and defined dev_t to be a signed int.
X */
X/* ARGSUSED */
XLOCAL void
Xget_major(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X	BOOL	neg = FALSE;
X	dev_t	d;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_DEVMAJOR;
X		return;
X	}
X	if (get_snumber(keyword, arg, &ull, &neg,
X					-(Ullong)MAJOR_T_MIN, MAJOR_T_MAX)) {
X		info->f_xflags |= XF_DEVMAJOR;
X		if (neg)
X			info->f_rdevmaj = -ull;
X		else
X			info->f_rdevmaj = ull;
X		d = makedev(info->f_rdevmaj, 0);
X		d = major(d);
X		if ((neg && -d != ull) || (!neg && d != ull)) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_flags |= F_BAD_META;
X		}
X	}
X}
X
X/*
X * get minor device number (always vendor unique)
X * The minor device number should be unsigned but POSIX does not say anything
X * about the content and defined dev_t to be a signed int.
X */
X/* ARGSUSED */
XLOCAL void
Xget_minor(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X	BOOL	neg = FALSE;
X	dev_t	d;
X
X	if (len == 0) {
X		info->f_xflags &= ~XF_DEVMINOR;
X		return;
X	}
X	if (get_snumber(keyword, arg, &ull, &neg,
X					-(Ullong)MINOR_T_MIN, MINOR_T_MAX)) {
X		info->f_xflags |= XF_DEVMINOR;
X		if (neg)
X			info->f_rdevmin = -ull;
X		else
X			info->f_rdevmin = ull;
X		d = makedev(0, info->f_rdevmin);
X		d = minor(d);
X		if ((neg && -d != ull) || (!neg && d != ull)) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_flags |= F_BAD_META;
X		}
X	}
X}
X
X/*
X * get device number of device containing FS (vendor unique)
X * The device number should be unsigned but POSIX does not say anything
X * about the content and defined dev_t to be a signed int.
X */
X/* ARGSUSED */
XLOCAL void
Xget_dev(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X	BOOL	neg = FALSE;
X
X	if (len == 0) {
X		info->f_dev = 0;
X		return;
X	}
X	if (get_snumber(keyword, arg, &ull, &neg,
X					-(Ullong)DEV_T_MIN, DEV_T_MAX)) {
X		if (neg)
X			info->f_dev = -ull;
X		else
X			info->f_dev = ull;
X
X		if ((neg && -info->f_dev != ull) ||
X			(!neg && info->f_dev != ull)) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_dev = 0;
X		}
X	}
X}
X
X/*
X * get inode number for this file (vendor unique)
X * POSIX defines ino_t to be unsigned.
X */
X/* ARGSUSED */
XLOCAL void
Xget_ino(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		info->f_ino = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, INO_T_MAX)) {
X		info->f_ino = ull;
X		if (info->f_ino != ull) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_ino = 0;
X		}
X	}
X}
X
X/*
X * get link count for this file (vendor unique)
X * POSIX defines nlink_t to ne signed but all real link counts in archives
X * need to be positive numbers.
X */
X/* ARGSUSED */
XLOCAL void
Xget_nlink(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		info->f_nlink = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, NLINK_T_MAX)) {
X		info->f_nlink = ull;
X		if (info->f_nlink != ull) {
X			xh_rangeerr(keyword, arg, len);
X			info->f_nlink = 0;
X		}
X	}
X}
X
X/*
X * get tar file type or real file type for this file (vendor unique)
X */
X/* ARGSUSED */
XLOCAL void
Xget_filetype(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	int	i;
X
X	if (len == 0) {
X		if (keyword[7] == 'f')		/* "SCHILY.filetype" */
X			info->f_rxftype = XT_BAD;
X		else
X			info->f_xftype = XT_BAD;
X		return;
X	}
X
X	for (i = 0; i < XT_BAD; i++) {
X		if (streql(xttoname_tab[i], arg))
X			break;
X	}
X	if (i >= XT_BAD)
X		return;
X
X	if (keyword[7] == 'f') {		/* "SCHILY.filetype" */
X		info->f_rxftype = i;
X		info->f_filetype = XTTOST(info->f_rxftype);
X		info->f_type = XTTOIF(info->f_rxftype);
X	} else {				/* "SCHILY.tarfiletype" */
X		info->f_xftype = i;
X	}
X}
X
X#ifdef	USE_ACL
X
X/*
X * XXX acl_access_text/acl_default_text are a bad idea. (see acl_unix.c)
X */
XLOCAL char acl_access_text[PATH_MAX+1];
XLOCAL char acl_default_text[PATH_MAX+1];
X
X/* ARGSUSED */
XLOCAL void
Xget_acl_type(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 11 && streql(arg, "POSIX draft"))
X		return;
X
X	info->f_flags |= F_BAD_ACL;
X
X	if (badf & F_BAD_ACL)
X		return;
X	errmsgno(EX_BAD,
X		"Unknown ACL type '%s' ignored at %lld.\n",
X				arg, tblocks());
X	badf |= F_BAD_ACL;
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_acl_access(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0 || (info->f_flags & F_BAD_ACL)) {
X		info->f_xflags &= ~XF_ACL_ACCESS;
X		info->f_acl_access = NULL;
X		return;
X	}
X	if (strlen(arg) > PATH_MAX)	/* XXX We should use dynamic strings */
X		return;
X	if (from_utf8((Uchar *)acl_access_text, (Uchar *)arg)) {
X		info->f_xflags |= XF_ACL_ACCESS;
X		info->f_acl_access = acl_access_text;
X	} else {
X		bad_utf8(keyword, arg);
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_acl_default(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0 || (info->f_flags & F_BAD_ACL)) {
X		info->f_xflags &= ~XF_ACL_DEFAULT;
X		info->f_acl_default = NULL;
X		return;
X	}
X	if (strlen(arg) > PATH_MAX)	/* XXX We should use dynamic strings */
X		return;
X	if (from_utf8((Uchar *)acl_default_text, (Uchar *)arg)) {
X		info->f_xflags |= XF_ACL_DEFAULT;
X		info->f_acl_default = acl_default_text;
X	} else {
X		bad_utf8(keyword, arg);
X	}
X}
X
X#endif  /* USE_ACL */
X
X#ifdef USE_XATTR
X
X/* ARGSUSED */
XLOCAL void
Xget_attr(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	register star_xattr_t	*x;
X	register int		num = 0;
X
X	if (len == 0) {
X		/*
X		 * This is not the right way as we clear all xattr info.
X		 */
X		if (static_xattr) {
X			free(static_xattr);
X			static_xattr = NULL;
X		}
X		info->f_fflags = 0;
X		info->f_xflags &= ~XF_FFLAGS;
X		return;
X	}
X	if (static_xattr) {
X		for (x = static_xattr; x->name; x++)
X			num++;
X		x = ___realloc(static_xattr,
X			(num+2) * sizeof (star_xattr_t), "extended attribute");
X	} else {
X		x = ___malloc(
X			(num+2) * sizeof (star_xattr_t), "extended attribute");
X	}
X	static_xattr = x;
X	x += num;
X
X	/*
X	 * should always succeed ...
X	 */
X	if (strncmp(keyword, "SCHILY.xattr.", 13) == 0)
X		keyword += 13;
X
X	x->name = ___malloc(strlen(keyword)+1, "extended attribute");
X	x->value = ___malloc(len+1, "extended attribute");
X	strcpy(x->name, keyword);
X	x->value_len = len;
X	movebytes(arg, x->value, len);
X	((char *)x->value)[len] = '\0';
X	fillbytes(x+1, sizeof (star_xattr_t), '\0');
X
X	info->f_xattr = static_xattr;
X	info->f_xflags |= XF_XATTR;
X}
X
X#endif  /* USE_XATTR */
X
X#ifdef	USE_FFLAGS
X
X/* ARGSUSED */
XLOCAL void
Xget_xfflags(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		info->f_fflags = 0;
X		info->f_xflags &= ~XF_FFLAGS;
X		return;
X	}
X	texttoflags(info, arg);
X	info->f_xflags |= XF_FFLAGS;
X}
X
X#endif	/* USE_FFLAGS */
X
X/* ARGSUSED */
XLOCAL void
Xget_dir(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	info->f_dir = 0;
X	info->f_dirlen = 0;
X
X	if (len == 0)
X		return;
X	/*
X	 * Old archives had only one nul at the end.
X	 * Note that we propagate the space from the xheader extract buffer
X	 * to the extraction process (e.g. diff.c or incremental restore.c)
X	 */
X	if (arg[len-2] != '\0')
X		arg[len++] = '\0';	/* Kill '\n' */
X
X	/*
X	 * The non UTF-8 string is shorter so we convert in place.
X	 */
X	from_utf8l((Uchar *)arg, (Uchar *)arg, &len);
X	info->f_dir = arg;
X	info->f_dirlen = len;
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_iarray(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	register int	dirents = 0;
X	register int	i;
X	register char	*p = arg;
X	register ino_t	*ino;
X		Ullong	ull;
X
X	if (info->f_dirinos)
X		free(info->f_dirinos);
X	info->f_dirinos = NULL;
X	info->f_dirents = 0;
X
X	if (len == 0)
X		return;
X
X	while (p) {
X		if (*p == ' ')
X			p++;
X		p = strchr(p, ' ');
X		dirents++;
X	}
X	ino = ___malloc(dirents * sizeof (ino_t), "inos");
X
X	for (p = arg, i = 0; i < dirents; i++) {
X		if (*p == ' ')
X			p++;
X		seterrno(0);
X		p = astoullb(p, &ull, 10);
X		if (*p != ' ' && *p != '\0') {
X			errmsgno(EX_BAD,
X			"Bad number '%s' for '%s' in extended header al %lld.\n",
X							arg, keyword, tblocks());
X			/* XXX ino -> 0 and continue instead? */
X			free(ino);
X			return;
X		} else {
X			if (geterrno() != 0) {
X				errmsgno(EX_BAD,
X				"Number overflow with '%s' for '%s' in extended header at %lld.\n",
X					arg, keyword, tblocks());
X				/* XXX ino -> 0 and continue instead? */
X				free(ino);
X				return;
X			}
X		}
X		if (ull > INO_T_MAX) {
X			xh_rangeerr(keyword, arg, len);
X			ino[i] = 0;
X		} else {
X			ino[i] = ull;
X		}
X	}
X	info->f_dirinos = ino;
X	info->f_dirents = dirents;
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_release(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		if (grip->release) {
X			if ((grip->gflags & GF_NOALLOC) == 0)
X				free(grip->release);
X			grip->release = NULL;
X		}
X		grip->gflags &= ~GF_RELEASE;
X		return;
X	}
X	/*
X	 * The non UTF-8 string is shorter so we convert in place.
X	 */
X	from_utf8l((Uchar *)arg, (Uchar *)arg, &len);
X	grip->gflags |= GF_RELEASE;
X	grip->release = ___savestr(arg);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_archtype(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		grip->gflags &= ~GF_ARCHTYPE;
X		grip->archtype = H_UNDEF;
X		return;
X	}
X	grip->gflags |= GF_ARCHTYPE;
X	grip->archtype = hdr_type(arg);
X}
X
X/*
X * Dummy 'get' function used for all fields that we don't yet understand or
X * fields that we indent to ignore.
X */
X/* ARGSUSED */
XLOCAL void
Xget_dummy(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X}
X
XLOCAL void
Xbad_utf8(keyword, arg)
X	char	*keyword;
X	char	*arg;
X{
X	errmsgno(EX_BAD, "Bad UTF-8 arg '%s' for '%s' in extended header at %lld.\n",
X		arg, keyword, tblocks());
X}
END-of-star-1.5.2/star/xheader.c
echo x - star-1.5.2/star/all.mk
sed 's/^X//' >star-1.5.2/star/all.mk << 'END-of-star-1.5.2/star/all.mk'
X#ident @(#)all.mk	1.1 05/02/16 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# This is all.mk, it creates sevral binaries, one for each function.
X#
X# If you like to create one single "fat" binary, remove Makefile
X# and copy star_fat.mk to Makefile.
X#
X
XMK_FILES= star.mk pax.mk suntar.mk gnutar.mk cpio.mk 
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/star/all.mk
echo x - star-1.5.2/star/Makefile.dfl
sed 's/^X//' >star-1.5.2/star/Makefile.dfl << 'END-of-star-1.5.2/star/Makefile.dfl'
X#ident @(#)Makefile.dfl	1.4 10/05/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSMODE=	0644
XINSDIR=		etc/default
XINSBASE=	$(INS_RBASE:%/=%)
XTARGET=		star
XAUXSRCEXT=	.dfl
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Makefile.dfl
echo x - star-1.5.2/star/star_unix.c
sed 's/^X//' >star-1.5.2/star/star_unix.c << 'END-of-star-1.5.2/star/star_unix.c'
X/* @(#)star_unix.c	1.100 11/04/09 Copyright 1985, 1995, 2001-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)star_unix.c	1.100 11/04/09 Copyright 1985, 1995, 2001-2011 J. Schilling";
X#endif
X/*
X *	Stat / mode / owner routines for unix like
X *	operating systems
X *
X *	Copyright (c) 1985, 1995, 2001-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#ifndef	HAVE_UTIMES
X#define	utimes	__nothing__	/* BeOS has no utimes() but wrong prototype */
X#endif
X#include <schily/stdio.h>
X#include <schily/errno.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/dirent.h>
X#include <schily/stat.h>
X#include <schily/device.h>
X#include <schily/schily.h>
X#include "dirtime.h"
X#include "xutimes.h"
X#ifndef	HAVE_UTIMES
X#undef	utimes
X#endif
X#include "starsubs.h"
X#include "checkerr.h"
X
X#ifndef	HAVE_LSTAT
X#define	lstat	stat
X#endif
X#ifndef	HAVE_LCHOWN
X#define	lchown	chown
X#endif
X
X#if	S_ISUID == TSUID && S_ISGID == TSGID && S_ISVTX == TSVTX && \
X	S_IRUSR == TUREAD && S_IWUSR == TUWRITE && S_IXUSR == TUEXEC && \
X	S_IRGRP == TGREAD && S_IWGRP == TGWRITE && S_IXGRP == TGEXEC && \
X	S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC
X
X#define	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X#endif
X
X#define	ROOT_UID	0
X
Xextern	uid_t	my_uid;
Xextern	dev_t	curfs;
Xextern	BOOL	noatime;
Xextern	BOOL	nomtime;
Xextern	BOOL	nochown;
Xextern	BOOL	pflag;
Xextern	BOOL	follow;
Xextern	BOOL	paxfollow;
Xextern	BOOL	nodump;
Xextern	BOOL	doacl;
Xextern	BOOL	doxattr;
Xextern	BOOL	dofflags;
X
XEXPORT	BOOL	_getinfo	__PR((char *name, FINFO *info));
XEXPORT	BOOL	getinfo		__PR((char *name, FINFO *info));
XEXPORT	BOOL	stat_to_info	__PR((struct stat *sp, FINFO *info));
XLOCAL	void	print_badnsec	__PR((FINFO *info, char *name, long val));
XEXPORT	void	checkarch	__PR((FILE *f));
XEXPORT	BOOL	archisnull	__PR((const char *name));
XEXPORT	BOOL	samefile	__PR((FILE *fp1, FILE *fp2));
XEXPORT	void	setmodes	__PR((FINFO *info));
XLOCAL	int	sutimes		__PR((char *name, FINFO *info));
XEXPORT	int	snulltimes	__PR((char *name, FINFO *info));
XEXPORT	int	sxsymlink	__PR((char *name, FINFO *info));
XEXPORT	int	rs_acctime	__PR((int fd, FINFO *info));
X#ifndef	HAVE_UTIMES
XEXPORT	int	utimes		__PR((char *name, struct timeval *tp));
X#endif
XEXPORT	void	setdirmodes	__PR((char *name, mode_t mode));
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X#else
XEXPORT	mode_t	osmode		__PR((mode_t tarmode));
XLOCAL	int	dochmod		__PR((const char *name, mode_t tarmode));
X#define	chmod	dochmod
X#endif
X
X#ifdef	USE_ACL
X
X#ifdef	OWN_ACLTEXT
X#if	defined(UNIXWARE) && defined(HAVE_ACL)
X#	define	HAVE_SUN_ACL
X#	define	HAVE_ANY_ACL
X#endif
X#endif
X/*
X * HAVE_ANY_ACL currently includes HAVE_POSIX_ACL and HAVE_SUN_ACL.
X * This definition must be in sync with the definition in acl_unix.c
X * As USE_ACL is used in star.h, we are not allowed to change the
X * value of USE_ACL before we did include star.h or we may not include
X * star.h at all.
X * HAVE_HP_ACL is currently not included in HAVE_ANY_ACL.
X */
X#	ifndef	HAVE_ANY_ACL
X#	undef	USE_ACL		/* Do not try to get or set ACLs */
X#	endif
X#endif
X
X/*
X * Simple getinfo() variant.
X */
XEXPORT BOOL
X_getinfo(name, info)
X	char	*name;
X	register FINFO	*info;
X{
X	BOOL	ret;
X	BOOL	odoacl = doacl;
X	BOOL	odoxattr = doxattr;
X
X	doacl	= FALSE;
X	doxattr	= FALSE;
X	ret = getinfo(name, info);
X	doacl	= odoacl;
X	doxattr	= odoxattr;
X
X	return (ret);
X}
X
XEXPORT BOOL
Xgetinfo(name, info)
X	char	*name;
X	register FINFO	*info;
X{
X	struct stat	stbuf;
X
X	info->f_filetype = -1;	/* Will be overwritten of stat() works */
Xnewstat:
X	if (paxfollow) {
X		if (stat(name, &stbuf) < 0) {
X			if (geterrno() == EINTR)
X				goto newstat;
X			if (geterrno() != ENOENT)
X				return (FALSE);
X
X			while (lstat(name, &stbuf) < 0) {
X				if (geterrno() != EINTR)
X					return (FALSE);
X			}
X		}
X	} else if (follow?stat(name, &stbuf):lstat(name, &stbuf) < 0) {
X		if (geterrno() == EINTR)
X			goto newstat;
X		return (FALSE);
X	}
X	info->f_sname = info->f_name = name;
X	return (stat_to_info(&stbuf, info));
X}
X
XEXPORT BOOL
Xstat_to_info(sp, info)
X	struct stat *sp;
X	FINFO	*info;
X{
X	BOOL		first = TRUE;
X
Xagain:
X	info->f_uname = info->f_gname = NULL;
X	info->f_umaxlen = info->f_gmaxlen = 0L;
X	info->f_dev	= sp->st_dev;
X	if (curfs == NODEV)
X		curfs = info->f_dev;
X	info->f_ino	= sp->st_ino;
X	info->f_nlink	= sp->st_nlink;
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X	info->f_mode	= sp->st_mode & 07777;
X#else
X	/*
X	 * The unexpected case when the S_I* OS mode bits do not match
X	 * the T* mode bits from tar.
X	 */
X	{ register mode_t m = sp->st_mode;
X
X	info->f_mode	=    ((m & S_ISUID ? TSUID   : 0)
X			    | (m & S_ISGID ? TSGID   : 0)
X			    | (m & S_ISVTX ? TSVTX   : 0)
X			    | (m & S_IRUSR ? TUREAD  : 0)
X			    | (m & S_IWUSR ? TUWRITE : 0)
X			    | (m & S_IXUSR ? TUEXEC  : 0)
X			    | (m & S_IRGRP ? TGREAD  : 0)
X			    | (m & S_IWGRP ? TGWRITE : 0)
X			    | (m & S_IXGRP ? TGEXEC  : 0)
X			    | (m & S_IROTH ? TOREAD  : 0)
X			    | (m & S_IWOTH ? TOWRITE : 0)
X			    | (m & S_IXOTH ? TOEXEC  : 0));
X	}
X#endif
X	info->f_uid	 = sp->st_uid;
X	info->f_gid	 = sp->st_gid;
X	info->f_size	 = (off_t)0;	/* Size of file */
X	info->f_rsize	 = (off_t)0;	/* Size on tape */
X	info->f_flags	 = 0L;
X	info->f_xflags	 = props.pr_xhdflags;
X	info->f_typeflag = 0;
X	info->f_type	 = sp->st_mode & ~07777;
X
X	if (sizeof (sp->st_rdev) == sizeof (short)) {
X		info->f_rdev = (Ushort) sp->st_rdev;
X	} else if ((sizeof (int) != sizeof (long)) &&
X			(sizeof (sp->st_rdev) == sizeof (int))) {
X		info->f_rdev = (Uint) sp->st_rdev;
X	} else {
X		info->f_rdev = (Ulong) sp->st_rdev;
X	}
X	info->f_rdevmaj	= major(info->f_rdev);
X	info->f_rdevmin	= minor(info->f_rdev);
X	info->f_atime	= sp->st_atime;
X	info->f_mtime	= sp->st_mtime;
X	info->f_ctime	= sp->st_ctime;
X
X	info->f_ansec	= stat_ansecs(sp);
X	info->f_mnsec	= stat_mnsecs(sp);
X	info->f_cnsec	= stat_cnsecs(sp);
X
X	if (info->f_ansec < 0 || info->f_ansec >= 1000000000L) {
X		print_badnsec(info, "atime", info->f_ansec);
X		info->f_ansec = 0;
X	}
X	if (info->f_mnsec < 0 || info->f_mnsec >= 1000000000L) {
X		print_badnsec(info, "mtime", info->f_mnsec);
X		info->f_mnsec = 0;
X	}
X	if (info->f_cnsec < 0 || info->f_cnsec >= 1000000000L) {
X		print_badnsec(info, "ctime", info->f_cnsec);
X		info->f_cnsec = 0;
X	}
X
X#ifdef	HAVE_ST_FLAGS
X	/*
X	 * The *BSD based method is easy to handle.
X	 */
X	if (dofflags)
X		info->f_fflags = sp->st_flags;
X	else
X		info->f_fflags = 0L;
X	if (info->f_fflags != 0)
X		info->f_xflags |= XF_FFLAGS;
X#ifdef	UF_NODUMP				/* The *BSD 'nodump' flag */
X	if ((sp->st_flags & UF_NODUMP) != 0)
X		info->f_flags |= F_NODUMP;	/* Convert it to star flag */
X#endif
X#else	/* !HAVE_ST_FLAGS */
X	/*
X	 * The non *BSD case...
X	 */
X#ifdef	USE_FFLAGS
X	if ((nodump || dofflags) && !S_ISLNK(sp->st_mode)) {
X		get_fflags(info);
X		if (!dofflags)
X			info->f_xflags &= ~XF_FFLAGS;
X	} else {
X		info->f_fflags = 0L;
X	}
X#else
X	info->f_fflags = 0L;
X#endif
X#endif
X
X#ifdef	HAVE_ST_ACLCNT
X	info->f_aclcnt = sp->st_aclcnt;
X#endif
X
X	switch ((int)(sp->st_mode & S_IFMT)) {
X
X	case S_IFREG:	/* regular file */
X			info->f_filetype = F_FILE;
X			info->f_xftype = XT_FILE;
X			info->f_rsize = info->f_size = sp->st_size;
X			info->f_rdev = 0;
X			info->f_rdevmaj	= 0;
X			info->f_rdevmin	= 0;
X			break;
X#ifdef	S_IFCNT
X	case S_IFCNT:	/* contiguous file */
X			info->f_filetype = F_FILE;
X			info->f_xftype = XT_CONT;
X			info->f_rsize = info->f_size = sp->st_size;
X			info->f_rdev = 0;
X			info->f_rdevmaj	= 0;
X			info->f_rdevmin	= 0;
X			break;
X#endif
X	case S_IFDIR:	/* directory */
X			info->f_filetype = F_DIR;
X			info->f_xftype = XT_DIR;
X			info->f_rdev = 0;
X			info->f_rdevmaj	= 0;
X			info->f_rdevmin	= 0;
X			info->f_dir = NULL;	/* No directory content known */
X			info->f_dirinos = NULL;	/* No inode list known */
X			info->f_dirlen = 0;
X			info->f_dirents = 0;
X			break;
X#ifdef	S_IFLNK
X	case S_IFLNK:	/* symbolic link */
X			info->f_filetype = F_SLINK;
X			info->f_xftype = XT_SLINK;
X			info->f_rdev = 0;
X			info->f_rdevmaj	= 0;
X			info->f_rdevmin	= 0;
X			break;
X#endif
X#ifdef	S_IFCHR
X	case S_IFCHR:	/* character special */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_CHR;
X			break;
X#endif
X#ifdef	S_IFBLK
X	case S_IFBLK:	/* block special */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_BLK;
X			break;
X#endif
X#ifdef	S_IFIFO
X	case S_IFIFO:	/* fifo */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_FIFO;
X			info->f_rdev = 0;
X			info->f_rdevmaj	= 0;
X			info->f_rdevmin	= 0;
X			break;
X#endif
X#ifdef	S_IFSOCK
X	case S_IFSOCK:	/* socket */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_SOCK;
X			break;
X#endif
X#ifdef	S_IFNAM
X	case S_IFNAM:	/* Xenix named file */
X			info->f_filetype = F_SPEC;
X
X			/*
X			 * 'st_rdev' field is really the subtype
X			 * As S_INSEM & S_INSHD we may safely cast
X			 * sp->st_rdev to int.
X			 */
X			switch ((int)sp->st_rdev) {
X			case S_INSEM:
X				info->f_xftype = XT_NSEM;
X				break;
X			case S_INSHD:
X				info->f_xftype = XT_NSHD;
X				break;
X			default:
X				info->f_xftype = XT_BAD;
X				break;
X			}
X			break;
X#endif
X#ifdef	S_IFMPC
X	case S_IFMPC:	/* multiplexed character special */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_MPC;
X			break;
X#endif
X#ifdef	S_IFMPB
X	case S_IFMPB:	/* multiplexed block special */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_MPB;
X			break;
X#endif
X#ifdef	S_IFDOOR
X	case S_IFDOOR:	/* door */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_DOOR;
X			break;
X#endif
X#ifdef	S_IFWHT
X	case S_IFWHT:	/* whiteout */
X			info->f_filetype = F_SPEC;
X			info->f_xftype = XT_WHT;
X			break;
X#endif
X
X	default:	/* any other unknown file type */
X			if ((sp->st_mode & S_IFMT) == 0) {
X				/*
X				 * If we come here, we either did not yet
X				 * realize that somebody created a new file
X				 * type with a value of 0 or the system did
X				 * return an "unallocated file" with lstat().
X				 * The latter happens if we are on old Solaris
X				 * systems that did not yet add SOCKETS again.
X				 * if somebody mounted a filesystem that
X				 * has been written with a *BSD system like
X				 * SunOS 4.x and this FS holds a socket we get
X				 * a pseudo unallocated file...
X				 */
X				info->f_filetype = F_SPEC;	/* ??? */
X				info->f_xftype = XT_NONE;
X			} else {
X				/*
X				 * We don't know this file type!
X				 */
X				info->f_filetype = F_SPEC;
X				info->f_xftype = XT_BAD;
X			}
X	}
X	info->f_rxftype = info->f_xftype;
X
X	if (first && pr_unsuptype(info)) {
X		first = FALSE;
X		if (lstat(info->f_name, sp) < 0)
X			return (FALSE);
X		goto again;
X	}
X
X#ifdef	HAVE_ST_BLOCKS
X#if	defined(hpux) || defined(__hpux)
X	if (info->f_size > (sp->st_blocks * 1024 + 1024)) {
X#else
X	if (info->f_size > (sp->st_blocks * 512 + 512)) {
X#endif
X		info->f_flags |= F_SPARSE;
X
X		/*
X		 * Some filesystems do not allocate disk space for files that
X		 * file consist of one hole and no written data.
X		 * If we are on a platform that does not support to read hole
X		 * lists for sparse files, this allows to avoid wasting time
X		 * reading through the whole file.
X		 */
X		if ((info->f_size > 0) && (sp->st_blocks == 0))
X			info->f_flags |= F_ALL_HOLE;
X	}
X#endif
X
X	/*
X	 * Only look for ACL's and other properties that go into the POSIX
X	 * extended heaer if extended headers are allowed with the current
X	 * archive format. Also don't include ACL's and other properties if
X	 * we are creating a Sun vendor unique variant of the extended headers.
X	 * Sun's tar will not grok access control lists and other extensions.
X	 */
X	if ((props.pr_flags & PR_XHDR) == 0 || (props.pr_xc != 'x'))
X		return (TRUE);
X#ifdef	USE_ACL
X	/*
X	 * If we return (FALSE) here, the file would not be archived at all.
X	 * This is not what we want, so ignore return code from get_acls().
X	 */
X
X	/*
X	 * Note: ACL check/fetch has been moved to create.c::take_file()
X	 * for performance reasons.
X	 */
X#endif  /* USE_ACL */
X
X#ifdef	USE_XATTR
X	if (doxattr)
X		(void) get_xattr(info);
X#endif
X
X	return (TRUE);
X}
X
XLOCAL void
Xprint_badnsec(info, name, val)
X	FINFO	*info;
X	char	*name;
X	long	val;
X{
X	errmsgno(EX_BAD, "Bad '%s' nanosecond value %ld for '%s'.\n",
X		name, val, info->f_name);
X}
X
X
XEXPORT void
Xcheckarch(f)
X	FILE	*f;
X{
X	struct stat	stbuf;
X	extern	dev_t	tape_dev;
X	extern	ino_t	tape_ino;
X	extern	BOOL	tape_isreg;
X
X	tape_isreg = FALSE;
X	tape_dev = (dev_t)0;
X	tape_ino = (ino_t)0;
X
X	if (fstat(fdown(f), &stbuf) < 0)
X		return;
X
X	if (S_ISREG(stbuf.st_mode)) {
X		tape_dev = stbuf.st_dev;
X		tape_ino = stbuf.st_ino;
X		tape_isreg = TRUE;
X	} else if (((stbuf.st_mode & S_IFMT) == 0) ||
X			S_ISFIFO(stbuf.st_mode) ||
X			S_ISSOCK(stbuf.st_mode)) {
X		/*
X		 * This is a pipe or similar on different UNIX implementations.
X		 * (stbuf.st_mode & S_IFMT) == 0 may happen in stange cases.
X		 */
X		tape_dev = NODEV;
X		tape_ino = (ino_t)-1;
X	}
X}
X
XEXPORT BOOL
Xarchisnull(name)
X	const char	*name;
X{
X	struct stat	stbuf;
X	struct stat	stnull;
X
X	if (name == NULL)
X		return (FALSE);
X
X	if (streql(name, "-")) {
X		if (fstat(fdown(stdout), &stbuf) < 0)
X			return (FALSE);
X	} else {
X		if (stat(name, &stbuf) < 0)
X			return (FALSE);
X	}
X	if (stat("/dev/null", &stnull) < 0)
X		return (FALSE);
X
X	if (stbuf.st_dev == stnull.st_dev &&
X	    stbuf.st_ino == stnull.st_ino)
X		return (TRUE);
X	return (FALSE);
X}
X
XEXPORT BOOL
Xsamefile(fp1, fp2)
X	FILE	*fp1;
X	FILE	*fp2;
X{
X	struct stat	stbuf1;
X	struct stat	stbuf2;
X
X	if (fp1 == NULL || fp2 == NULL)
X		return (FALSE);
X
X	if (fstat(fdown(fp1), &stbuf1) < 0)
X		return (FALSE);
X
X	if (fstat(fdown(fp2), &stbuf2) < 0)
X		return (FALSE);
X
X	if (stbuf1.st_dev == stbuf2.st_dev &&
X	    stbuf1.st_ino == stbuf2.st_ino)
X		return (TRUE);
X	return (FALSE);
X}
X
XEXPORT void
Xsetmodes(info)
X	register FINFO	*info;
X{
X	BOOL	didutimes = FALSE;
X	BOOL	asymlink = is_symlink(info);
X
X	/*
X	 * If it does not seem to be a symbolic link, we need to check whether
X	 * this is an archive format that does not store the real file type.
X	 * We need to avoid to set time stamps or modes for hard links on
X	 * symbolic links.
X	 */
X	if (!asymlink &&
X	    fis_link(info)) {		/* Real file type unknown */
X		FINFO	finfo;
X
X		if (_getinfo(info->f_name, &finfo) && is_symlink(&finfo))
X			asymlink = TRUE;
X	}
X
X	if (!nomtime && !asymlink) {
X		/*
X		 * With Cygwin32,
X		 * DOS will not allow us to set file times on read-only files.
X		 * We set the time before we change the access modes to
X		 * overcode this problem.
X		 * XXX This will no longer work with the new -p flag handling
X		 * XXX as the files may be read only from the creation.
X		 */
X		if (!is_dir(info)) {
X			didutimes = TRUE;
X			if (sutimes(info->f_name, info) < 0) {
X				if (!errhidden(E_SETTIME, info->f_name)) {
X					if (!errwarnonly(E_SETTIME, info->f_name))
X						xstats.s_settime++;
X					(void) errabort(E_SETTIME,
X							info->f_name, TRUE);
X				}
X			}
X		}
X	}
X
X	if (pflag && !asymlink) {
X		mode_t	mode = info->f_mode;
X
X		if (is_dir(info))
X			mode |= TUWRITE;
X		if (chmod(info->f_name, mode) < 0) {
X			if (!errhidden(E_SETMODE, info->f_name)) {
X				if (!errwarnonly(E_SETMODE, info->f_name))
X					xstats.s_setmodes++;
X				(void) errabort(E_SETMODE, info->f_name, TRUE);
X			}
X		}
X#ifdef	USE_ACL
X		/*
X		 * If there are no additional ACLs, set_acls() will
X		 * simply do a fast return.
X		 */
X		if (doacl)
X			set_acls(info);
X#endif
X	}
X#ifdef	USE_XATTR
X	if (doxattr)
X		set_xattr(info);
X#endif
X#ifdef	USE_FFLAGS
X	if (dofflags && !asymlink)
X		set_fflags(info);
X#endif
X
X	if (!nochown && my_uid == ROOT_UID) {
X
X#if	defined(HAVE_CHOWN) || defined(HAVE_LCHOWN)
X		/*
X		 * Star will not allow non root users to give away files.
X		 */
X		lchown(info->f_name, (int)info->f_uid, (int)info->f_gid);
X#endif
X
X		if (pflag && !asymlink &&
X			(info->f_mode & (TSUID | TSGID | TSVTX)) != 0) {
X			mode_t	mode = info->f_mode;
X
X			if (is_dir(info))
X				mode |= TUWRITE;
X			/*
X			 * On a few systems, seeting the owner of a file
X			 * destroys the suid and sgid bits.
X			 * We repeat the chmod() in this case.
X			 */
X			if (chmod(info->f_name, mode) < 0) {
X				/*
X				 * Do not increment chmod() errors here,
X				 * it did already fail above.
X				 */
X				/* EMPTY */
X				;
X			}
X		}
X	}
X	if (!nomtime && !is_dir(info) && !asymlink) {
X		if (sutimes(info->f_name, info) < 0 && !didutimes)
X			if (!errhidden(E_SETTIME, info->f_name)) {
X				if (!errwarnonly(E_SETTIME, info->f_name))
X					xstats.s_settime++;
X				(void) errabort(E_SETTIME, info->f_name, TRUE);
X			}
X	}
X	if (is_dir(info)) {
X		sdirtimes(info->f_name, info, !nomtime, pflag);
X	}
X}
X
XEXPORT	int	xutimes		__PR((char *name, struct timeval *tp));
X
XLOCAL int
Xsutimes(name, info)
X	char	*name;
X	FINFO	*info;
X{
X	struct  timeval curtime;
X	struct	timeval tp[3];
X
X	if (noatime) {
X		gettimeofday(&curtime, 0);
X		tp[0].tv_sec = curtime.tv_sec;
X		tp[0].tv_usec = curtime.tv_usec;
X	} else {
X		tp[0].tv_sec = info->f_atime;
X		tp[0].tv_usec = info->f_ansec/1000;
X	}
X
X	tp[1].tv_sec = info->f_mtime;
X	tp[1].tv_usec = info->f_mnsec/1000;
X#ifdef	SET_CTIME
X	tp[2].tv_sec = info->f_ctime;
X	tp[2].tv_usec = info->f_cnsec/1000;
X#else
X	tp[2].tv_sec = 0;
X	tp[2].tv_usec = 0;
X#endif
X	return (xutimes(name, tp));
X}
X
XEXPORT int
Xsnulltimes(name, info)
X	char	*name;
X	FINFO	*info;
X{
X	struct	timeval tp[3];
X
X	fillbytes((char *)tp, sizeof (tp), '\0');
X	return (xutimes(name, tp));
X}
X
XEXPORT int
Xxutimes(name, tp)
X	char	*name;
X	struct	timeval tp[3];
X{
X	struct  timeval curtime;
X	struct  timeval pasttime;
X	extern int Ctime;
X	int	ret;
X	int	errsav;
X
X#ifndef	HAVE_SETTIMEOFDAY
X#undef	SET_CTIME
X#endif
X
X#ifdef	SET_CTIME
X	if (Ctime) {
X		gettimeofday(&curtime, 0);
X		settimeofday(&tp[2], 0);
X	}
X#endif
X	ret = utimes(name, tp);
X	errsav = geterrno();
X
X#ifdef	SET_CTIME
X	if (Ctime) {
X		gettimeofday(&pasttime, 0);
X		timersub(&pasttime, &tp[2]);
X		timeradd(&curtime, &pasttime);
X		settimeofday(&curtime, 0);
X#ifdef	SET_CTIME_DEBUG
X		error("pasttime: %d.%6.6d\n", pasttime.tv_sec, pasttime.tv_usec);
X#endif
X	}
X#endif
X	seterrno(errsav);
X	return (ret);
X}
X
XEXPORT int
Xsxsymlink(name, info)
X	char	*name;
X	FINFO	*info;
X{
X#ifdef	HAVE_SYMLINK
X	struct	timeval tp[3];
X	struct  timeval curtime;
X	struct  timeval pasttime;
X	char	*linkname;
X	extern int Ctime;
X	int	ret;
X	int	errsav;
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X	mode_t	omask;
X#endif
X
X	tp[0].tv_sec = info->f_atime;
X	tp[0].tv_usec = info->f_ansec/1000;
X
X	tp[1].tv_sec = info->f_mtime;
X	tp[1].tv_usec = info->f_mnsec/1000;
X#ifdef	SET_CTIME
X	tp[2].tv_sec = info->f_ctime;
X	tp[2].tv_usec = info->f_cnsec/1000;
X#endif
X	linkname = info->f_lname;
X
X#ifdef	SET_CTIME
X	if (Ctime) {
X		gettimeofday(&curtime, 0);
X		settimeofday(&tp[2], 0);
X	}
X#endif
X
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X	/*
X	 * At least HP-UX-11.x seems to honour the mask when creating symlinks.
X	 * If we like to copy them correctly, we need to set the mask before.
X	 * As umask(2) is a cheap syscall and symlinks are not very frequent
X	 * this does not seem a real problem.
X	 */
X	omask = umask((mode_t)0);
X	umask(info->f_mode ^ 07777);
X#endif
X
X	ret = symlink(linkname, name);
X	errsav = geterrno();
X
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X	umask(omask);
X#endif
X
X#ifdef	SET_CTIME
X	if (Ctime) {
X		gettimeofday(&pasttime, 0);
X		/* XXX Hack: f_ctime.tv_usec ist immer 0! */
X		curtime.tv_usec += pasttime.tv_usec;
X		if (curtime.tv_usec > 1000000) {
X			curtime.tv_sec += 1;
X			curtime.tv_usec -= 1000000;
X		}
X		settimeofday(&curtime, 0);
X#ifdef	SET_CTIME_DEBUG
X		error("pasttime.usec: %d\n", pasttime.tv_usec);
X#endif
X	}
X#endif
X	seterrno(errsav);
X	return (ret);
X#else
X	seterrno(EINVAL);
X	return (-1);
X#endif
X}
X
X#ifdef	HAVE_SYS_FILIO_H
X#include <sys/filio.h>
X#endif
X
XEXPORT int
Xrs_acctime(fd, info)
X		int	fd;
X	register FINFO	*info;
X{
X#ifdef	_FIOSATIME
X	struct timeval	atv;
X#endif
X
X	if (is_symlink(info))
X		return (0);
X
X#ifdef	_FIOSATIME
X	/*
X	 * On Solaris 2.x root may reset accesstime without changing ctime.
X	 */
X	if (my_uid == ROOT_UID) {
X		atv.tv_sec = info->f_atime;
X		atv.tv_usec = info->f_ansec/1000;
X		return (ioctl(fd, _FIOSATIME, &atv));
X	}
X#endif
X	return (sutimes(info->f_name, info));
X}
X
X#ifndef	HAVE_UTIMES
X
X#define	utimes	__nothing__	/* BeOS has no utimes() but wrong prototype */
X#include <schily/utime.h>
X#undef	utimes
X
XEXPORT int
Xutimes(name, tp)
X	char		*name;
X	struct timeval	*tp;
X{
X	struct utimbuf	ut;
X
X	ut.actime = tp->tv_sec;
X	tp++;
X	ut.modtime = tp->tv_sec;
X
X	return (utime(name, &ut));
X}
X#endif
X
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X#define	OSMODE(tarmode)	    (tarmode)
X#else
X#define	OSMODE(tarmode)	    ((tarmode & TSUID   ? S_ISUID : 0)  \
X			    | (tarmode & TSGID   ? S_ISGID : 0) \
X			    | (tarmode & TSVTX   ? S_ISVTX : 0) \
X			    | (tarmode & TUREAD  ? S_IRUSR : 0) \
X			    | (tarmode & TUWRITE ? S_IWUSR : 0) \
X			    | (tarmode & TUEXEC  ? S_IXUSR : 0) \
X			    | (tarmode & TGREAD  ? S_IRGRP : 0) \
X			    | (tarmode & TGWRITE ? S_IWGRP : 0) \
X			    | (tarmode & TGEXEC  ? S_IXGRP : 0) \
X			    | (tarmode & TOREAD  ? S_IROTH : 0) \
X			    | (tarmode & TOWRITE ? S_IWOTH : 0) \
X			    | (tarmode & TOEXEC  ? S_IXOTH : 0))
X#endif
X
XEXPORT void
X#ifdef	PROTOTYPES
Xsetdirmodes(char *name, mode_t tarmode)
X#else
Xsetdirmodes(name, tarmode)
X	char	*name;
X	mode_t	tarmode;
X#endif
X{
X	register mode_t		_osmode;
X
X	_osmode = OSMODE(tarmode);
X	if (chmod(name, _osmode) < 0) {
X		if (!errhidden(E_SETMODE, name)) {
X			if (!errwarnonly(E_SETMODE, name))
X				xstats.s_setmodes++;
X			errmsg("Can't set permission for '%s'.\n", name);
X			(void) errabort(E_SETMODE, name, TRUE);
X		}
X	}
X}
X
X
XEXPORT mode_t
X#ifdef	PROTOTYPES
Xosmode(register mode_t tarmode)
X#else
Xosmode(tarmode)
X	register mode_t		tarmode;
X#endif
X{
X	register mode_t		_osmode;
X
X	_osmode = OSMODE(tarmode);
X	return (_osmode);
X}
X
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X#else
X#undef	chmod
XLOCAL int
X#ifdef	PROTOTYPES
Xdochmod(register const char *name, register mode_t tarmode)
X#else
Xdochmod(name, tarmode)
X	register const char	*name;
X	register mode_t		tarmode;
X#endif
X{
X	register mode_t		_osmode;
X
X	_osmode = OSMODE(tarmode);
X	return (chmod(name, _osmode));
X}
X#endif
END-of-star-1.5.2/star/star_unix.c
echo x - star-1.5.2/star/suntar.c
sed 's/^X//' >star-1.5.2/star/suntar.c << 'END-of-star-1.5.2/star/suntar.c'
X/* @(#)suntar.c	1.35 11/04/16 Copyright 1989, 2003-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	const char _s_sccsid[] =
X	"@(#)suntar.c	1.35 11/04/16 Copyright 1989, 2003-2011 J. Schilling";
X#endif
X/*
X *	Solaris TAR specific routines for star main program.
X *
X *	Copyright (c) 1989, 2003-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * The options -C & -I are not supported without '-' with suntar.
X */
Xstatic	char	*sun_copt = "crtuxbBDeEfFhiklmnopPqTvwX@01234567";
X
X#ifdef	STAR_MAIN
X/*
X * We have been included from star.c
X */
X#define	opts		suntar_opts
X#define	_opts		_suntar_opts
X#define	gargs		suntar_gargs
X#define	susage		suntar_susage
X#define	usage		suntar_usage
X#define	xusage		suntar_xusage
X#define	DFLT_FILE	"/etc/default/tar"
X#else
X#define	NO_STAR_MAIN
X#define	SUNTAR_MAIN
X#define	PTYPE_DEFAULT	P_SUNTAR
X#define	DFLT_FILE	"/etc/default/tar"
X
X#include "star.c"
X#endif
X
X#define	SUN_TAR
X
XLOCAL	void	gargs		__PR((int ac, char *const *av));
XLOCAL	void	susage		__PR((int ret));
XLOCAL	void	usage		__PR((int ret));
XLOCAL	void	xusage		__PR((int ret));
X#ifdef	STAR_MAIN
XLOCAL	void	suntar_setopts	__PR((char *o));
X#endif
X
X/*
X * tar {crtux}[bBDeEfFhiklmnopPqvwX@[0-7]] [-k size] [blocksize] [tapefile] [exclude-file] [-I include-file] files ...
X *
X *	-I fehlt noch
X */
X
X
X/*
X * Solaris TAR related options
X */
X/* BEGIN CSTYLED */
Xchar	_opts[] = "C*,help,xhelp,version,debug,xdebug#,xd#,time,no-statistics,do-statistics,fifostats,numeric,no-fifo,no-fsync,do-fsync%0,sattr,bs&,fs&,/,..,secure-links,acl,xfflags,copy,diff,artype&,O,z,bz,lzo,7z,xz,lzip,c,r,t,u,x,b&,B,D,e,E,f&,F,h,I*,i,k&,l,m,n,o,p,P,q,v+,w,X&,@,T,?";
X/* END CSTYLED */
Xchar	*opts = _opts;
X
XLOCAL	void	suntar_info	__PR((void));
X
XLOCAL void
Xgargs(ac, av)
X	int		ac;
X	char	*const *av;
X{
X	int	files	 = 0;
X	int	minfiles = 1;
X	BOOL	help	 = FALSE;
X	BOOL	xhelp	 = FALSE;
X	BOOL	prvers	 = FALSE;
X	BOOL	no_fifo	 = FALSE;
X	BOOL	oldtar   = FALSE;
X	BOOL	sunDflag = FALSE;
X	BOOL	sunEflag = FALSE;
X	BOOL	sunpflag = FALSE;
X	BOOL	sunqflag = FALSE;
X	char	*sunI    = NULL;
X	BOOL	sunxattr = FALSE;
X	BOOL	sunTflag = FALSE;
X	BOOL	do_stats = FALSE;
X	BOOL	do_sattr = FALSE;
Xsigned	char	archive	 = -1;		/* On IRIX, we have unsigned chars by default */
X
X	/*
X	 * Current default archive format in all other cases is USTAR.
X	 * We may change this to PAX in the future.
X	 */
X	hdrtype = H_USTAR;
X#ifdef	STAR_MAIN
X	suntar_setopts(opts);
X#endif
X
X	iftype		= I_TAR;		/* command line interface */
X	ptype		= P_SUNTAR;		/* program interface type */
X	bsdchdir	= TRUE;
X	uncond		= TRUE;			/* tar -x is star -xU ...  */
X	force_remove	= TRUE;			/* and -force-remove  ...  */
X	remove_first	= TRUE;			/* and -remove-first  ...  */
X	keep_nonempty_dirs = TRUE;		/* and -keep-nonempty-dirs */
X	no_fsync	= TRUE;			/* and -no-fsync	   */
X	no_stats	= TRUE;			/* and -no-statitstics	   */
X	/*
X	 * NOTE: star by default writes into existing files if possible.
X	 *	If we like to emulate the Sun tar behavior, we need to call
X	 *	star -xU -force-remove -remove-first -keep-nonempty-dirs
X	 *	The only remaining difference to Sun tar is that Sun tar does
X	 * 	not try to remove non-empty directories in case that a
X	 *	directory of the name name is to be made next.
X	 *	One problem with -remove-first is that it slows down extraction
X	 */
X
X	--ac, ++av;
X	files = getfilecount(ac, av, opts);
X	if (getallargs(&ac, &av, opts,
X				&dir_flags,
X				&help, &xhelp, &prvers, &debug, &xdebug, &xdebug,
X#ifndef	__old__lint
X				&showtime, &no_stats, &do_stats, &do_fifostats,
X				&numeric,  &no_fifo, &no_fsync, &no_fsync,
X				&do_sattr,		/* --sattr */
X				getnum, &bs,
X				getnum, &fs,
X				&abs_path, &allow_dotdot, &secure_links,
X				&doacl, &dofflags,
X				&copyflag, &diff_flag,
X				gethdr, &chdrtype,
X				&oldtar,
X				&zflag, &bzflag, &lzoflag,
X				&p7zflag, &xzflag, &lzipflag,
X
X				&cflag,
X				&rflag,
X				&tflag,
X				&uflag,
X				&xflag,
X
X				getnum, &bs,		/* -b blocks */
X				&multblk,		/* -B */
X				&sunDflag,		/* -D */
X				&errflag,		/* -e */
X				&sunEflag,		/* -E */
X				addtarfile, NULL,	/* -f archive */
X				&Fflag,			/* -F */
X				&paxfollow,		/* -h */
X				&sunI,			/* -I */
X				&ignoreerr,		/* -i */
X				getknum, &tsize,	/* -k size */
X				&nolinkerr,		/* -l */
X				&nomtime,		/* -m */
X				&not_tape,		/* -n */
X				&nochown,		/* -o */
X				&sunpflag,		/* -p */
X				&no_dirslash,		/* -P */
X				&sunqflag,		/* -q */
X				&verbose,		/* -v */
X				&interactive,		/* -w */
X				getexclude, NULL,	/* -X */
X				&sunxattr,		/* -@ */
X				&sunTflag,		/* -T */
X#endif /* __old__lint */
X				&archive) < 0) {
X		errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
X		susage(EX_BAD);
X	}
X	if (archive != -1 && !(archive >= '0' && archive <= '7')) {
X		errmsgno(EX_BAD, "Bad Option: -%c.\n", archive);
X		susage(EX_BAD);
X	}
X	star_helpvers("suntar", help, xhelp, prvers);
X
X	if (sunDflag)
X		errconfig("WARN|GROW|SHRINK *");
X
X	if (sunEflag) {
X		chdrtype = H_SUNTAR;
X		no_dirslash = TRUE;
X		if (cflag || rflag || uflag) {
X			errmsgno(EX_BAD, "The -E option creates a deprecated archive type.\n");
X			errmsgno(EX_BAD, "Use artype=exustar to create a POSIX extended archive.\n");
X			if (sunpflag) {
X				errmsgno(EX_BAD, "Switching to artype=exustar to support ACLs.\n");
X				chdrtype = H_EXUSTAR;
X			}
X		}
X	}
X	if (sunI) {
X		errmsgno(EX_BAD, "The -I option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (tsize) {
X#ifdef	NO_SPLIT
X		errmsgno(EX_BAD, "The -k option currently does not split files.\n");
X#else
X		multivol = TRUE;
X#endif
X	}
X	if (not_tape) {
X		errmsgno(EX_BAD, "The -n option is not yet implemented.\n");
X	}
X	if (sunpflag) {
X		pflag = TRUE;
X		doacl = TRUE;
X	}
X	if (sunqflag) {
X		errmsgno(EX_BAD, "The -q option is not yet implemented (as in Sun tar).\n");
X		susage(EX_BAD);
X	}
X	if (sunxattr) {
X		errmsgno(EX_BAD, "The -@ option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (do_sattr) {
X		errmsgno(EX_BAD, "The --sattr option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (sunTflag) {
X		errmsgno(EX_BAD, "The -T option is not yet implemented.\n");
X		susage(EX_BAD);
X	}
X	if (do_stats)
X		no_stats = FALSE;
X
X	star_checkopts(oldtar, /* dodesc */ FALSE, /* usetape */ TRUE,
X					archive, no_fifo, /* llbs */ 0);
X	star_nfiles(files, minfiles);
X
X	star_defaults(&fs, DFLT_FILE);	/* Also check for Sun defaults */
X}
X
XLOCAL void
Xsuntar_info()
X{
X	error("\nFor a more complete user interface use the tar type command interface.\n");
X	error("See 'man star'. The %s command is more or less limited to the\n", get_progname());
X	error("Solaris tar command line interface.\n");
X}
X
X/*
X * Short usage
X */
XLOCAL void
Xsusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("\nUse\t%s --help\n", get_progname());
X	error("and\t%s --xhelp\n", get_progname());
X	error("to get a list of valid cmds and options.\n");
X	suntar_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Cmd:\n");
X	error("\t-c/-u/-r\tcreate/update/replace archive with named files to tape\n");
X	error("\t-x/-t\t\textract/list named files from tape\n");
X	error("\t--copy\t\t(*) copy named files to destination directory\n");
X	error("\t--diff\t\t(*) diff archive against file system (see -xhelp)\n");
X	error("\tartype=header\t(*) generate 'header' type archive (see artype=help)\n");
X	error("Options:\n");
X	error("\t--help\t\t(*) print this help\n");
X	error("\t--xhelp\t\t(*) print extended help\n");
X	error("\t--version\t(*) print version information and exit\n");
X	error("\t-b #\t\tset blocking factor to #x512 Bytes (default 20)\n");
X	error("\t-B\t\tperform multiple reads (needed on pipes)\n");
X	error("\t-D\t\ttreat data change errors as warnings only\n");
X	error("\t-e\t\texit immediately if unexpeted errors ocur\n");
X	error("\t-E\t\tWrite a tarfile with extended headers\n");
X	error("\t-f nm\t\tuse 'nm' as tape instead of stdin/stdout\n");
X	error("\t-F,-FF,-FFF,...\tdo not store/create SCCS/RCS, core and object files\n");
X	error("\t-h\t\tfollow symbolic links as if they were files\n");
X	error("\t-I yy\t\tXXX Not implemented\n");
X	error("\t-i\t\tignore checksum errors\n");
X	error("\t-k yy\t\tset tape volume size to yy (default multiplier is 512)\n");
X	error("\t-l\t\tprint a message if not all links are dumped\n");
X	error("\t-m\t\tdo not restore access and modification time\n");
X	error("\t-n\t\tXXX Not implemented\n");
X	error("\t-o\t\tdo not restore owner and group\n");
X	error("\t-O\t\t(*)be compatible to old tar (except for checksum bug)\n");
X	error("\t-p\t\trestore filemodes of directories\n");
X	error("\t-P\t\tdo not add a trailing '/' on directory archive entries\n");
X	error("\t-q\t\tXXX Not implemented\n");
X	error("\t-v\t\tincrement verbose level\n");
X	error("\t-w\t\tdo interactive creation/extraction/renaming\n");
X	error("\t-X yy\t\tExclude files from file yy containing a list of path names\n");
X	error("\t-@\t\tXXX Not implemented\n");
X	error("\t--sattr\t\tXXX Not implemented\n");
X	error("\t-T\t\tXXX Not implemented\n");
X	error("\t-[0-7]\t\tSelect an alternative tape drive\n");
X	error("\t-z\t\t(*) pipe input/output through gzip, does not work on tapes\n");
X	error("\t--bz\t\t(*) pipe input/output through bzip2, does not work on tapes\n");
X	error("\t--lzo\t\t(*) pipe input/output through lzop, does not work on tapes\n");
X	error("\t--7z\t\t(*) pipe input/output through p7zip, does not work on tapes\n");
X	error("\t--xz\t\t(*) pipe input/output through xz, does not work on tapes\n");
X	error("\t--lzip\t\t(*) pipe input/output through lzip, does not work on tapes\n");
X#ifdef	FIFO
X	error("\t--no-fifo\t(*) don't use a fifo to optimize data flow from/to tape\n");
X#endif
X	error("\nAll options marked with (*) are not defined by Solaris tar.\n");
X	suntar_info();
X	exit(ret);
X	/* NOTREACHED */
X}
X
XLOCAL void
Xxusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s cmd [options] file1 ... filen\n", get_progname());
X	error("Extended options:\n");
X	error("\t--debug\t\tprint additional debug messages\n");
X	error("\txdebug=#,xd=#\tset extended debug level\n");
X	error("\t-/\t\tdon't strip leading '/'s from file names\n");
X	error("\t--..\t\tdon't skip filenames that contain '..' in non-interactive extract\n");
X	error("\t--secure-links\tdon't extract links that start with '/' or contain '..'\n");
X	error("\t--acl\t\thandle access control lists\n");
X	error("\t--xfflags\thandle extended file flags\n");
X	error("\tbs=#\t\tset (output) block size to #\n");
X#ifdef	FIFO
X	error("\tfs=#\t\tset fifo size to #\n");
X#endif
X	error("\t--no-fsync\tdo not call fsync() for each extracted file (may be dangerous)\n");
X	error("\t--do-fsync\tcall fsync() for each extracted file\n");
X	error("\t--time\t\tprint timing info\n");
X	error("\t--no-statistics\tdo not print statistics\n");
X	error("\t--do-statistics\tprint statistics\n");
X#ifdef	FIFO
X	error("\t--fifostats\tprint fifo statistics\n");
X#endif
X	error("\t--numeric\tdon't use user/group name from tape\n");
X	error("\nAll options above are not defined by Solaris tar.\n");
X	exit(ret);
X	/* NOTREACHED */
X}
X
X#ifdef	STAR_MAIN
X#undef	opts
X#undef	_opts
X#undef	gargs
X#undef	susage
X#undef	usage
X#undef	xusage
X
XLOCAL void
Xsuntar_setopts(o)
X	char	*o;
X{
Xextern	char	*opts;
X	opts = o;
X}
X#endif
END-of-star-1.5.2/star/suntar.c
echo x - star-1.5.2/star/subst.c
sed 's/^X//' >star-1.5.2/star/subst.c << 'END-of-star-1.5.2/star/subst.c'
X/* @(#)subst.c	1.13 09/07/11 Copyright 1986,2003-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)subst.c	1.13 09/07/11 Copyright 1986,2003-2009 J. Schilling";
X#endif
X/*
X *	Substitution commands
X *
X *	Copyright (c) 1986,2003-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/patmatch.h>
X#include <schily/string.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
X#include <schily/patmatch.h>
X
X#include "star.h"
X#include "starsubs.h"
X
XEXPORT	int	parsesubst	__PR((char *cmd, BOOL *arg));
XEXPORT	BOOL	subst		__PR((FINFO *info));
XLOCAL	char	*substitute	__PR((char *from, long fromlen, int idx, char *to, long tolen));
XLOCAL	BOOL	simpleto	__PR((char *s, long len));
XLOCAL	int	catsub		__PR((char *here, char *old, long oldlen, char *to, long tolen, char *limit));
XEXPORT	BOOL	ia_change	__PR((TCB *ptb, FINFO *info));
XLOCAL	BOOL	pax_change	__PR((TCB *ptb, FINFO *info));
X
X#define	NPAT	100
XLOCAL	int	npat;
XLOCAL	Uchar	*pat[NPAT];
XLOCAL	int	patlen[NPAT];
XLOCAL	int	maxplen;
XLOCAL	char	*substpat[NPAT];
XLOCAL	int	substlen[NPAT];
XLOCAL	int	*aux[NPAT];
XLOCAL	int	alt[NPAT];
XLOCAL	int	*state;
XLOCAL	Int32_t	substcnt[NPAT];
X
Xextern	FILE	*tty;
Xextern	FILE	*vpr;
Xextern	int	verbose;
Xextern	BOOL	xflag;
Xextern	BOOL	nflag;
Xextern	BOOL	debug;
Xextern	BOOL	paxinteract;
X
X/*
X * This is the command line parser for tar/pax substitution commands.
X * Syntax is: -s '/old/new/v'
X */
XEXPORT int
Xparsesubst(cmd, arg)
X	char	*cmd;
X	BOOL	*arg;
X{
X	register char	*from;
X	register char	*to;
X	register char	*cp;
X	register char	*endp;
X	register char	c = '/';
X	register char	dc;
X		long	fromlen;
X		long	tolen;
X		int	cmdlen;
X		char	*subopts = NULL;
X		BOOL	printsubst = FALSE;
X		Int32_t	count = 1;
X
X	if (debug) {
X		error("Add subst pattern: '%s'", cmd);
X	}
X
X	cmdlen = strlen(cmd);
X	from = cmd;
X	endp = &cmd[cmdlen];
X
X	dc = c = *from;
X	to = ++from;
X	while (to < endp) {
X		c = *to;
X		if (c != dc)
X			to++;
X		else
X			break;
X	}
X	if (to >= endp || c != dc)
X		comerrno(EX_BAD, "Missing '%c' delimiter after 'from' substitute string.\n", dc);
X
X	fromlen = to-from;
X	*to++ = '\0';
X	cp = to;
X	while (cp < endp) {
X		c = *cp;
X		if (c != dc)
X			cp++;
X		else
X			break;
X	}
X	if (to >= endp || c != dc)
X		comerrno(EX_BAD, "Missing '%c' delimiter after 'to' substitute string.\n", dc);
X
X	tolen = cp-to;
X	*cp = '\0';
X	if (++cp < endp)
X		subopts = cp;
X
X	while (cp < endp) {
X		c = *cp++;
X		if (c == 'p') {
X			printsubst = TRUE;
X		} else if (c == 'g') {
X			count = MAXINT32;
X		} else {
X			comerrno(EX_BAD, "Bad substitute option '%c'.\n", c);
X		}
X	}
X
X	if (debug) {
X		error("  '%s'%s'(%ld,%ld) opts '%s' simpleto: %d\n",
X			from, to, fromlen, tolen,
X			subopts, simpleto(to, tolen));
X	}
X
X	if (npat >= NPAT)
X		comerrno(EX_BAD, "Too many substitute patterns (max is %d).\n", NPAT);
X
X	pat[npat] = (Uchar *)___savestr(from);
X	patlen[npat] = fromlen;
X	substpat[npat] = ___savestr(to);
X	substlen[npat] = tolen;
X
X
X	if (fromlen > maxplen)
X		maxplen = fromlen;
X
X	aux[npat] = ___malloc(fromlen*sizeof (int), "compiled subst pattern");
X	if ((alt[npat] = patcompile(pat[npat], patlen[npat], aux[npat])) == 0) {
X		comerrno(EX_BAD, "Bad pattern: '%s'.\n", pat[npat]);
X		return (-2);
X	}
X
X	if (printsubst)
X		count *= -1;
X	substcnt[npat] = count;
X	*arg = TRUE;
X	npat++;
X	return (1);
X}
X
X
XEXPORT BOOL
Xsubst(info)
X	FINFO	*info;
X{
X	char	*to = NULL;
X	register int	i;
X
X	if (!state) {
X		state = ___malloc((maxplen+1)*sizeof (int), "pattern state");
X	}
X
X	info->f_namelen = strlen(info->f_name);
X	/*
X	 * Schleife über alle match & Subst Patterns
X	 */
X	for (i = 0; i < npat; i++) {
X		to = substitute(info->f_name, info->f_namelen, i, substpat[i], substlen[i]);
X		if (to)
X			break;
X	}
X	if (to) {
X		if (substcnt[i] < 0)
X			error("%s >> %s\n", info->f_name, to);
X		info->f_namelen = strlen(to);
X		info->f_name = to;
X		return (TRUE);
X	}
X
X	return (FALSE);
X}
X
X
XLOCAL	char	new[PATH_MAX+1];
X/*
X * This is the 'real' substitution routine.
X * It gets called with pre-parsed strings.
X */
XLOCAL char *
Xsubstitute(from, fromlen, idx, to, tolen)
X	char	*from;
X	long	fromlen;
X	int	idx;
X	char	*to;
X	long	tolen;
X{
X	char	old[PATH_MAX+1];
X	char	xold[PATH_MAX+1];
X	long	oldlen = 0;
X	BOOL	tosimple;
X	Int32_t n = substcnt[idx];
X	char	*end;
X	char	*string;
X	int	slen;
X	BOOL	didmatch = FALSE;
X	char	*limit = &new[PATH_MAX];
X
X	if (fromlen == 0)
X		return (NULL);
X	tosimple = simpleto(to, tolen);
X
X	string = from;
X	slen = strlen(string);
X	end = string;
X	if (n < 0)
X		n *= -1;
X	while (n--) {
X
X		/*
X		 * Search the next occurence of the pattern in the 'from' string.
X		 */
X		while (*string != '\0') {
X			if ((end = (char *)patmatch(pat[idx], aux[idx],
X			    (Uchar *)string, 0, slen, alt[idx],
X			    state)) == NULL) {
X
X				string++;
X				slen--;
X				continue;
X			}
X			if (!didmatch) {
X				didmatch = TRUE;
X				strncpy((char *)new, (char *)from, PATH_MAX);
X				new[PATH_MAX] = '\0';
X				string = new + (string - from);
X				end = new + (end - from);
X
X				if (!tosimple) {
X					/*
X					 * We need to remember the old 'from' string before.
X					 */
X					oldlen = end - string;
X					if (oldlen > PATH_MAX)
X						oldlen = PATH_MAX;
X					strncpy((char *)old, (char *)string, oldlen);
X					old[oldlen] = '\0';
X				}
X
X			}
X			break;
X		}
X		if (*string == '\0')
X			break;
X
X		/*
X		 * Now delete the old string in the buffer
X		 * and insert substitution
X		 */
X		if (tosimple) {
X			strncpy((char *)xold, (char *)end, PATH_MAX);
X			xold[PATH_MAX] = '\0';
X
X			if ((string+tolen) >= limit)
X				goto over;
X			strncpy((char *)string, (char *)to, tolen);	/* insert */
X			if ((&string[tolen] + strlen(xold)) >= limit)
X				goto over;
X			strcpy((char *)&string[tolen], (char *)xold);
X			return (new);
Xover:
X			errmsgno(EX_BAD, "Substitution path overflow.\n");
X			new[0] = '\0';
X			return (new);
X		} else {
X			tolen = catsub(string, old, oldlen, to, tolen, limit);
X			if (tolen < 0) {
X				new[0] = '\0';
X				return (new);
X			}
X		}
X		string = &string[tolen];
X		slen = strlen(string);
X	}
X	if (didmatch)
X		return (new);
X	return (NULL);
X}
X
X/*
X * Check is this is a 'simple' 'to'-substitution string
X * that does not require to be expanded via 'catsub()'.
X */
XLOCAL BOOL
Xsimpleto(s, len)
X	register char	*s;
X	register long	len;
X{
X	register char	c;
X
X	if (len <= 0)
X		return (TRUE);
X	while (--len >= 0) {
X		c = *s++;
X		if (c == '\\' || c == '&')
X			return (FALSE);
X	}
X	return (TRUE);
X}
X
X/*
X * Insert the substitution string.
X * The '&' character in the to string is substituted with the old from string.
X */
XLOCAL int
Xcatsub(here, old, oldlen, to, tolen, limit)
X	register char	*here;
X	register char	*old;
X	register long	oldlen;
X	register char	*to;
X	register long	tolen;
X	register char	*limit;
X{
X	char	xold[PATH_MAX+1];
X	char	*p = here;
X
X	if (tolen <= 0)
X		return (0);
X
X	strncpy(xold, &here[oldlen], PATH_MAX);
X	xold[PATH_MAX] = '\0';
X
X	while (--tolen >= 0) {
X		if (here >= limit)
X			goto over;
X		if (*to == '\\') {
X			if (--tolen >= 0)
X				*here++ = *++to;
X		} else if (*to == '&') {
X			if ((here+oldlen) >= limit)
X				goto over;
X			strncpy(here, old, oldlen);
X			here += oldlen;
X		} else {
X			*here++ = *to;
X		}
X		to++;
X	}
X	if ((here+strlen(xold)) >= limit)
X		goto over;
X	strcpy(here, xold);
X	return (here - p);
Xover:
X	errmsgno(EX_BAD, "& Substitution path overflow.\n");
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT BOOL
Xia_change(ptb, info)
X	TCB	*ptb;
X	FINFO	*info;
X{
X	FINFO	cinfo;
X	char	ans;
X	int	len;
X
X	if (paxinteract)
X		return (pax_change(ptb, info));
X
X	if (verbose)
X		list_file(info);
X	else
X		vprint(info);
X	if (nflag)
X		return (FALSE);
X	fprintf(vpr, "get/put ? Y(es)/N(o)/C(hange name) :"); fflush(vpr);
X	fgetline(tty, new, 2);
X	if ((ans = toupper(new[0])) == 'Y')
X		return (TRUE);
X	else if (ans == 'C') {
X		for (;;) {
X			fprintf(vpr, "Enter new name:");
X			fflush(vpr);
X			if ((len = fgetline(tty, new, sizeof (new))) == 0)
X				continue;
X			if (len > sizeof (new) - 1)
X				errmsgno(EX_BAD, "Name too long.\n");
X			else
X				break;
X		}
X		info->f_name = new;
X		if (xflag && newer(info, &cinfo))
X			return (FALSE);
X		return (TRUE);
X	}
X	return (FALSE);
X}
X
X/* ARGSUSED */
XLOCAL BOOL
Xpax_change(ptb, info)
X	TCB	*ptb;
X	FINFO	*info;
X{
X	FINFO	cinfo;
X	int	len;
X
X	if (verbose)
X		list_file(info);
X	else
X		vprint(info);
X	if (nflag)
X		return (FALSE);
X
X	for (;;) {
X		fprintf(vpr, "%s change?", info->f_name);
X		fflush(vpr);
X		if ((len = fgetline(tty, new, sizeof (new))) == 0)
X			break;
X		if (len > sizeof (new) - 1)
X			errmsgno(EX_BAD, "Name too long.\n");
X		else
X			break;
X	}
X	if (new[0] == '\0')			/* Skip file */
X		return (FALSE);
X	if (new[0] == '.' && new[1] == '\0')	/* Leave name as is */
X		return (TRUE);
X
X	info->f_name = new;
X	if (xflag && newer(info, &cinfo))
X		return (FALSE);
X	return (TRUE);
X}
END-of-star-1.5.2/star/subst.c
echo x - star-1.5.2/star/table.c
sed 's/^X//' >star-1.5.2/star/table.c << 'END-of-star-1.5.2/star/table.c'
X/* @(#)table.c	1.27 10/08/23 Copyright 1994-96 2000-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)table.c	1.27 10/08/23 Copyright 1994-96 2000-2010 J. Schilling";
X#endif
X/*
X *	Conversion tables for efficient conversion
X *	of different file type representations
X *
X *	Copyright (c) 1994-96 2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include "star.h"
X#include "table.h"
X#include <schily/stat.h>
X
X#ifndef	S_IFIFO			/* If system knows no fifo's		*/
X#define	S_IFIFO		S_IFREG	/* Map fifo's to regular files 		*/
X#endif
X#ifndef	S_IFCHR			/* If system knows no character special	*/
X#define	S_IFCHR		S_IFREG	/* Map character spec. to regular files	*/
X#endif
X#ifndef	S_IFMPC			/* If system knows no multiplexed c	*/
X#define	S_IFMPC		S_IFREG	/* Map multiplexed c to regular files	*/
X#endif
X#ifndef	S_IFNAM			/* If system knows no named files	*/
X#define	S_IFNAM		S_IFREG	/* Map named files to regular files 	*/
X#endif
X#ifndef	S_IFBLK			/* If system knows no block special	*/
X#define	S_IFBLK		S_IFREG	/* Map block spec. to regular files	*/
X#endif
X#ifndef	S_IFMPB			/* If system knows no multiplexed b	*/
X#define	S_IFMPB		S_IFREG	/* Map multiplexed b to regular files	*/
X#endif
X#ifndef	S_IFCNT			/* If system knows no contiguous files	*/
X#define	S_IFCNT		S_IFREG	/* Map contiguous file to regular files */
X#endif
X#ifndef	S_IFLNK			/* If system knows no symbolic links	*/
X#define	S_IFLNK		S_IFREG	/* Map symbolic links to regular files */
X#endif
X#ifndef	S_IFSOCK		/* If system knows no fifo's		*/
X#define	S_IFSOCK	S_IFREG	/* Map fifo's to regular files 		*/
X#endif
X#ifndef	S_IFDOOR		/* If system knows no door's		*/
X#define	S_IFDOOR	S_IFREG	/* Map door's to regular files		*/
X#endif
X#ifndef	S_IFWHT			/* If system knows no whiteout's	*/
X#define	S_IFWHT		S_IFREG	/* Map whiteout's to regular files	*/
X#endif
X#ifndef	S_IFEVC			/* If system knows no eventcount's	*/
X#define	S_IFEVC		S_IFREG	/* Map eventcount's to regular files	*/
X#endif
X#define	S_IFBAD	S_IFMT		/* XXX Have to use another val if someone */
X				/* XXX starts to use S_IFMT for a */
X				/* XXX useful file type */
X#define	XT_NAM	XT_BAD		/* XXX JS has not seen it yet */
X				/* XXX if we use it, we have to change */
X				/* XXX table.h and some of the tables below */
X
X/*
X * UNIX File type to XT_ table
X *
X * Maps the 16 UNIX (S_XXX >> 12) filetypes to star's internal XT_ types.
X * Note that this only works if all S_XXX defines are the same on all
X * UNIX versions. Fortunately, this is currently the case and there is no
X * big chance that somebody will do it differently.
X *
X * XXX If really somebody creates a different OS we will need to change this
X * XXX table and the associated macros or make this table dynamically
X * XXX created at startup of star.
X *
X * UNIX file types (see table.h):
X *	0 Unallocated	1 FIFO		2 Chr special	3 MPX chr
X *	4 Directory	5 NAM special	6 BLK special	7 MPX blk
X *	8 Regular File	9 Contig File	10 Symlink	11 Sol Shadow ino
X *	12 Socket	13 DOOR special	14 Whiteout	15 UNOS event count
X *
X * No bound checking in hope that S_IFMT will never hold more than 4 bits.
X */
X/* BEGIN CSTYLED */
Xchar	iftoxt_tab[] = {
X		/* 0 */	XT_NONE, XT_FIFO, XT_CHR,   XT_MPC,
X		/* 4 */	XT_DIR,  XT_NAM,  XT_BLK,   XT_MPB,
X		/* 8 */	XT_FILE, XT_CONT, XT_SLINK, XT_BAD,
X		/*12 */	XT_SOCK, XT_DOOR, XT_WHT,   XT_BAD,
X			};
X/* END CSTYLED */
X
X/*
X * Ustar File type to XT_ table
X *
X * Maps the ustar 0..7 filetypes to star's internal XT_ types.
X * Bound checking is done via ustoxt().
X */
Xchar	ustoxt_tab[] = {
X		/* 0 */	XT_FILE, XT_LINK, XT_SLINK, XT_CHR,
X		/* 4 */	XT_BLK,  XT_DIR,  XT_FIFO,  XT_CONT,
X		/* 8 */	XT_BAD,  XT_BAD,
X};
X
X/*
X * Vendor unique File type to XT_ table
X *
X * Maps the filetypes 'A'..'Z' to star's internal XT_ types.
X * Fortunately, the different vendor unique extensions are disjunct.
X * External code does bound checking.
X */
X/* BEGIN CSTYLED */
Xchar	vttoxt_tab[] = {
X		/* A */	XT_NONE,     XT_NONE,   XT_NONE,     XT_DUMPDIR,
X		/* E */	XT_NONE,     XT_NONE,   XT_NONE,     XT_NONE,
X		/* I */	XT_META,     XT_NONE,   XT_LONGLINK, XT_LONGNAME,
X		/* M */	XT_MULTIVOL, XT_NAMES,  XT_NONE,     XT_NONE,
X		/* Q */	XT_NONE,     XT_NONE,   XT_SPARSE,   XT_NONE,
X		/* U */	XT_NONE,     XT_VOLHDR, XT_NONE,     XT_NONE,
X		/* Y */	XT_NONE,     XT_NONE,
X};
X/* END CSTYLED */
X
X/*
X * XT_* codes used (see table.h):
X *				 0..16	Real file types and hard links
X *				20..26	Speudo file types (POSIX 'A' .. 'Z'
X *				31	XT_BAD (illegal file type)
X */
X
X/*
X * XT_ to UNIX File type table
X *
X * XT_SPARSE and XT_META are just other (tar specific) views of regular files.
X */
X/* BEGIN CSTYLED */
Xmode_t	xttoif_tab[] = {
X		/* 0 */	0,       S_IFREG,  S_IFCNT, S_IFREG,
X		/* 4 */	S_IFLNK, S_IFDIR,  S_IFCHR, S_IFBLK,
X		/* 8 */	S_IFIFO, S_IFSOCK, S_IFMPC, S_IFMPB,
X		/*12 */	S_IFNAM, S_IFNAM,  S_IFDOOR, S_IFEVC,
X		/*16 */	S_IFWHT, S_IFBAD,  S_IFBAD, S_IFBAD,
X		/*20 */	S_IFDIR, S_IFBAD,  S_IFBAD, S_IFBAD,
X		/*24 */	S_IFBAD, S_IFREG,  S_IFBAD, S_IFREG,
X		/*28 */	S_IFBAD, S_IFBAD,  S_IFBAD, S_IFBAD,
X};
X/* END CSTYLED */
X
X/*
X * XT_ to Star-1985 File type table
X */
X/* BEGIN CSTYLED */
Xchar	xttost_tab[] = {
X		/* 0 */	0,       F_FILE, F_FILE, F_FILE,
X		/* 4 */	F_SLINK, F_DIR,  F_SPEC, F_SPEC,
X		/* 8 */	F_SPEC,  F_SPEC, F_SPEC, F_SPEC,
X		/*12 */	F_SPEC,  F_SPEC, F_SPEC, F_SPEC,
X		/*16 */	F_SPEC,  F_SPEC, F_SPEC, F_SPEC,
X		/*20 */	F_DIR,   F_FILE, F_FILE, F_FILE,
X		/*24 */	F_FILE,  F_FILE, F_SPEC, F_FILE,
X		/*28 */	F_SPEC,  F_SPEC, F_SPEC, F_SPEC,
X};
X/* END CSTYLED */
X
X/*
X * XT_ Old UNIX V7 tar supported File type table
X */
X/* BEGIN CSTYLED */
Xchar	xtv7tar_tab[] = {
X		/* 0 */	0,	1,	1,	1,
X		/* 4 */	0,	0,	0,	0,
X		/* 8 */	0,	0,	0,	0,
X		/*12 */	0,	0,	0,	0,
X		/*16 */	0,	0,	0,	0,
X		/*20 */	0,	0,	0,	0,
X		/*24 */	0,	0,	0,	0,
X		/*28 */	0,	0,	0,	0,
X};
X/* END CSTYLED */
X
X/*
X * XT_ Old BSD tar supported File type table
X */
X/* BEGIN CSTYLED */
Xchar	xttar_tab[] = {
X		/* 0 */	0,	1,	1,	1,
X		/* 4 */	1,	1,	0,	0,
X		/* 8 */	0,	0,	0,	0,
X		/*12 */	0,	0,	0,	0,
X		/*16 */	0,	0,	0,	0,
X		/*20 */	0,	0,	0,	0,
X		/*24 */	0,	0,	0,	0,
X		/*28 */	0,	0,	0,	0,
X			};
X/* END CSTYLED */
X
X/*
X * XT_ Star-1985 supported File type table
X */
X/* BEGIN CSTYLED */
Xchar	xtstar_tab[] = {
X		/* 0 */	0,	1,	1,	1,
X		/* 4 */	1,	1,	1,	1,
X		/* 8 */	1,	1,	1,	1,
X		/*12 */	1,	1,	1,	0,
X		/*16 */	0,	0,	0,	0,
X		/*20 */	0,	0,	0,	0,
X		/*24 */	0,	1,	0,	1,
X		/*28 */	0,	0,	0,	0,
X};
X/* END CSTYLED */
X
X/*
X * XT_ Ustar-1988 supported File type table
X */
X/* BEGIN CSTYLED */
Xchar	xtustar_tab[] = {
X		/* 0 */	0,	1,	1,	1,
X		/* 4 */	1,	1,	1,	1,
X		/* 8 */	1,	0,	0,	0,
X		/*12 */	0,	0,	0,	0,
X		/*16 */	0,	0,	0,	0,
X		/*20 */	0,	0,	0,	0,
X		/*24 */	0,	0,	0,	0,
X		/*28 */	0,	0,	0,	0,
X			};
X/* END CSTYLED */
X
X/*
X * XT_ Extended PAX-2001 'exustar' supported File type table
X */
X/* BEGIN CSTYLED */
Xchar	xtexustar_tab[] = {
X		/* 0 */	0,	1,	1,	1,
X		/* 4 */	1,	1,	1,	1,
X		/* 8 */	1,	1,	0,	0,
X		/*12 */	0,	0,	1,	0,
X		/*16 */	0,	0,	0,	0,
X		/*20 */	0,	0,	0,	0,
X		/*24 */	0,	1,	0,	1,
X		/*28 */	0,	0,	0,	0,
X};
X/* END CSTYLED */
X
X/*
X * XT_ CPIO-1988 supported File type table
X */
X/* BEGIN CSTYLED */
Xchar	xtcpio_tab[] = {
X		/* 0 */	0,	1,	1,	1,
X		/* 4 */	1,	1,	1,	1,
X		/* 8 */	1,	1,	0,	0,
X		/*12 */	0,	0,	0,	0,
X		/*16 */	0,	0,	0,	0,
X		/*20 */	0,	0,	0,	0,
X		/*24 */	0,	0,	0,	0,
X		/*28 */	0,	0,	0,	0,
X};
X/* END CSTYLED */
X
X/*
X * XT_ to Ustar (including Vendor Unique extensions) File type table
X *
X * sockets cannot be handled in ansi tar, they are handled as regular files :-(
X */
X/* BEGIN CSTYLED */
Xchar	xttous_tab[] = {
X		/* 0 */	0,       REGTYPE, CONTTYPE, LNKTYPE,
X		/* 4 */	SYMTYPE, DIRTYPE, CHRTYPE,  BLKTYPE,
X		/* 8 */	FIFOTYPE,REGTYPE/* socket */, 0/* bad */, 0/* bad */,
X		/*12 */	0,       0,       0,        0,
X		/*16 */	0,       0,       0,        0,
X		/*20 */	LF_DUMPDIR, LF_LONGLINK, LF_LONGNAME, LF_MULTIVOL,
X		/*24 */	LF_NAMES,   LF_SPARSE,   LF_VOLHDR,   LF_META,
X		/*28 */	0,       0,       0,        0,
X};
X/* END CSTYLED */
X
X/*
X * XT_ to String table
X */
X/* BEGIN CSTYLED */
Xchar	*xttostr_tab[] = {
X#define	XT_DEBUG
X#ifdef	XT_DEBUG
X		/* 0 */	"U",	"-",	"C",	"H",
X#else
X		/* 0 */	"-",	"-",	"-",	"-",
X#endif
X		/* 4 */	"l",	"d",	"c",	"b",
X		/* 8 */	"p",	"s",	"~",	"~",
X		/*12 */	"~",	"~",	"D",	"~",
X		/*16 */	"%",	"~",	"~",	"~",
X
X		/*20 */	"D",	"K",	"L",	"M",
X#ifdef	XT_DEBUG
X		/*24 */	"N",	"S",	"V",	"m",
X#else
X		/*24 */	"N",	"-",	"V",	"-",
X#endif
X
X		/*28 */	"~",	"~",	"~",	"~",
X};
X/* END CSTYLED */
X
X/*
X * XT_ to named file type text
X */
X/* BEGIN CSTYLED */
Xchar	*xttoname_tab[] = {
X		/* 0 */	"unallocated",	"regular",	"contiguous",		"hardlink",
X		/* 4 */	"symlink",	"directory",	"character special",	"block special",
X		/* 8 */	"fifo",		"socket",	"mpx character special", "mpx block special",
X		/*12 */	"XENIX nsem",	"XENIX nshd",	"door",		        "eventcount",
X		/*16 */	"whiteout",	"reserved",	"reserved",		"reserved",
X		/*20 */	"dumpdir",	"longlink",	"longname",		"multivol continuation",
X		/*24 */	"names",	"sparse",	"volheader",		"meta",
X		/*28 */	"reserved",	"reserved",	"reserved",		"unknown/bad",
X};
X/* END CSTYLED */
END-of-star-1.5.2/star/table.c
echo x - star-1.5.2/star/table.h
sed 's/^X//' >star-1.5.2/star/table.h << 'END-of-star-1.5.2/star/table.h'
X/* @(#)table.h	1.13 05/07/27 Copyright 1994, 1996, 2000-2005 J. Schilling */
X/*
X *	Conversion table definitions for efficient conversion
X *	of different file type representations
X *
X *	Copyright (c) 1994, 1996, 2000-2005 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * Unix uses the following file types
X */
X#ifdef	comment
X		0000000		/* Unallocated			*/
XS_IFIFO		0010000	FIFO	/* Named pipe			*/
XS_IFCHR		0020000	CHR	/* Character special		*/
XS_IFMPC		0030000		/* UNUSED multiplexed c		*/
XS_IFDIR		0040000	DIR	/* Directory			*/
XS_IFNAM		0050000	NAM	/* Named file (XENIX)		*/
XS_IFBLK		0060000	BLK	/* Block special		*/
XS_IFMPB		0070000		/* UNUSED multiplexed b		*/
XS_IFREG		0100000	REG	/* Regular file 		*/
XS_IFCNT		0110000	CTG	/* Contiguous file		*/
XS_IFLNK		0120000	SLNK	/* Symbolic link		*/
XS_IFSHAD	0130000		/* Solaris shadow inode		*/
XS_IFSOCK	0140000	SOCK	/* UNIX domain socket		*/
XS_IFDOOR	0150000		/* Solaris DOOR			*/
XS_IFWHT		0160000		/* BSD whiteout			*/
X		0160200		/* Solaris cpio acl		*/
X		0170000		/* UNUSED on UNIX		*/
XS_IFEVC		0170000		/* UNOS event count		*/
X				/* UNOS/UNIX compat only	*/
X#endif
X
X/*
X * Internal table of file types.
X *
X * N.B. The order in this table is not important,
X * new real file types may be added before XT_DUMPDIR,
X * new symbolic file types may be added before XT_BAD.
X */
X#define	XT_NONE		0	/* unallocated file			    */
X#define	XT_FILE		1	/* regular file				    */
X#define	XT_CONT		2	/* contiguous file			    */
X#define	XT_LINK		3	/* hard link (needed for internal use)	    */
X#define	XT_SLINK	4	/* symbolic link			    */
X#define	XT_DIR		5	/* directory				    */
X#define	XT_CHR		6	/* character special			    */
X#define	XT_BLK		7	/* block special			    */
X#define	XT_FIFO		8	/* fifo (named pipe)			    */
X#define	XT_SOCK		9	/* unix domain socket			    */
X#define	XT_MPC		10	/* multiplexed character special	    */
X#define	XT_MPB		11	/* multiplexed block special		    */
X#define	XT_NSEM		12	/* XENIX named semaphore		    */
X#define	XT_NSHD		13	/* XENIX named shared data		    */
X#define	XT_DOOR		14	/* Solaris DOOR				    */
X#define	XT_EVENT	15	/* UNOS Event Count			    */
X#define	XT_WHT		16	/* BSD whiteout				    */
X				/* ... Reserved ...			    */
X#define	XT_DUMPDIR	20	/* Dir entry containing filenames	    */
X#define	XT_LONGLINK	21	/* Next file on tape has a long link	    */
X#define	XT_LONGNAME	22	/* Next file on tape has a long name	    */
X#define	XT_MULTIVOL	23	/* Continuation of a file from another tape */
X#define	XT_NAMES	24	/* OLD					    */
X#define	XT_SPARSE	25	/* for files with holes in it		    */
X#define	XT_VOLHDR	26	/* Tape Volume header			    */
X#define	XT_META		27	/* Inode meta data only			    */
X#define	XT_BAD		31	/* illegal file type			    */
X
Xextern char	iftoxt_tab[];
Xextern char	ustoxt_tab[];
Xextern char	vttoxt_tab[];
X
Xextern mode_t	xttoif_tab[];
Xextern char	xttost_tab[];
Xextern char	xttous_tab[];
X
Xextern char	xtv7tar_tab[];
Xextern char	xttar_tab[];
Xextern char	xtstar_tab[];
Xextern char	xtustar_tab[];
Xextern char	xtexustar_tab[];
X
Xextern char	xtcpio_tab[];
X
Xextern char	*xttostr_tab[];
Xextern char	*xttoname_tab[];
X
X#define	IFTOXT(t)	(iftoxt_tab[((t)&S_IFMT)>>12])	/* UNIX to XT	*/
X#define	USTOXT(t)	(ustoxt(t))			/* ustar to XT	*/
X#define	_USTOXT(t)	(ustoxt_tab[(t)-REGTYPE])	/* ustar to XT	*/
X#define	_VTTOXT(t)	(vttoxt_tab[(t)-'A'])		/* vendor to XT	*/
X
X#define	XTTOIF(t)	(xttoif_tab[(t)])		/* XT to UNIX	*/
X#define	XTTOST(t)	(xttost_tab[(t)])		/* XT to star	*/
X#define	XTTOUS(t)	(xttous_tab[(t)])		/* XT to ustar	*/
X#define	XTTOSTR(t)	(xttostr_tab[(t)])		/* XT to string	*/
X#define	XTTONAME(t)	(xttoname_tab[(t)])		/* XT to name	*/
END-of-star-1.5.2/star/table.h
echo x - star-1.5.2/star/unicode.c
sed 's/^X//' >star-1.5.2/star/unicode.c << 'END-of-star-1.5.2/star/unicode.c'
X/* @(#)unicode.c	1.11 10/08/23 Copyright 2001-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)unicode.c	1.11 10/08/23 Copyright 2001-2010 J. Schilling";
X#endif
X/*
X *	Routines to convert from/to UNICODE
X *
X *	This is currently a very simple implementation that only
X *	handles ISO-8859-1 coding. There should be a better solution
X *	in the future.
X *
X *	Copyright (c) 2001-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include "star.h"
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include "starsubs.h"
X
XEXPORT	int	to_utf8		__PR((Uchar *to, Uchar *from));
XEXPORT	int	to_utf8l	__PR((Uchar *to, Uchar *from, int len));
XEXPORT	BOOL	from_utf8	__PR((Uchar *to, Uchar *from));
XEXPORT	BOOL	from_utf8l	__PR((Uchar *to, Uchar *from, int *len));
X
XEXPORT int
Xto_utf8(to, from)
X	register Uchar	*to;
X	register Uchar	*from;
X{
X	register Uchar	*oto = to;
X	register Uchar	c;
X
X	while ((c = *from++) != '\0') {
X		if (c <= 0x7F) {
X			*to++ = c;
X		} else if (c <= 0xBF) {
X			*to++ = 0xC2;
X			*to++ = c;
X		} else { /* c <= 0xFF */
X			*to++ = 0xC3;
X			*to++ = c & 0xBF;
X		}
X	}
X	*to = '\0';
X	return (to - oto);
X}
X
XEXPORT int
Xto_utf8l(to, from, len)
X	register Uchar	*to;
X	register Uchar	*from;
X	register int	len;
X{
X	register Uchar	*oto = to;
X	register Uchar	c;
X
X	while (--len >= 0) {
X		c = *from++;
X		if (c <= 0x7F) {
X			*to++ = c;
X		} else if (c <= 0xBF) {
X			*to++ = 0xC2;
X			*to++ = c;
X		} else { /* c <= 0xFF */
X			*to++ = 0xC3;
X			*to++ = c & 0xBF;
X		}
X	}
X	*to = '\0';
X	return (to - oto);
X}
X
XEXPORT BOOL
Xfrom_utf8(to, from)
X	register Uchar	*to;
X	register Uchar	*from;
X{
X	register Uchar	c;
X	register BOOL	ret = TRUE;
X
X	while ((c = *from++) != '\0') {
X		if (c <= 0x7F) {
X			*to++ = c;
X		} else if (c == 0xC0) {
X			*to++ = *from++ & 0x7F;
X		} else if (c == 0xC1) {
X			*to++ = (*from++ | 0x40) & 0x7F;
X		} else if (c == 0xC2) {
X			*to++ = *from++;
X		} else if (c == 0xC3) {
X			*to++ = *from++ | 0x40;
X		} else {
X			ret = FALSE;		/* unknown/illegal UTF-8 char */
X			*to++ = '_';		/* use default character    */
X			if (c < 0xE0) {
X				from++;		/* 2 bytes in total */
X			} else if (c < 0xF0) {
X				from += 2;	/* 3 bytes in total */
X			} else if (c < 0xF8) {
X				from += 3;	/* 4 bytes in total */
X			} else if (c < 0xFC) {
X				from += 4;	/* 5 bytes in total */
X			} else if (c < 0xFE) {
X				from += 5;	/* 6 bytes in total */
X			} else {
X				while ((c = *from) != '\0') {
X					/*
X					 * Test for 7 bit ASCII + non prefix
X					 */
X					if (c <= 0xBF)
X						break;
X					from++;
X				}
X			}
X		}
X	}
X	*to = '\0';
X	return (ret);
X}
X
XEXPORT BOOL
Xfrom_utf8l(to, from, lenp)
X	register Uchar	*to;
X	register Uchar	*from;
X		int	*lenp;
X{
X	register Uchar	*oto = to;
X	register Uchar	c;
X	register BOOL	ret = TRUE;
X	register int	len = *lenp;
X
X	while (--len >= 0) {
X		c = *from++;
X		if (c <= 0x7F) {
X			*to++ = c;
X		} else if (c == 0xC0) {
X			*to++ = *from++ & 0x7F;
X			len--;
X		} else if (c == 0xC1) {
X			*to++ = (*from++ | 0x40) & 0x7F;
X			len--;
X		} else if (c == 0xC2) {
X			*to++ = *from++;
X			len--;
X		} else if (c == 0xC3) {
X			*to++ = *from++ | 0x40;
X			len--;
X		} else {
X			ret = FALSE;		/* unknown/illegal UTF-8 char */
X			*to++ = '_';		/* use default character    */
X			if (c < 0xE0) {
X				from++;		/* 2 bytes in total */
X				len--;
X			} else if (c < 0xF0) {
X				from += 2;	/* 3 bytes in total */
X				len -= 2;
X			} else if (c < 0xF8) {
X				from += 3;	/* 4 bytes in total */
X				len -= 3;
X			} else if (c < 0xFC) {
X				from += 4;	/* 5 bytes in total */
X				len -= 4;
X			} else if (c < 0xFE) {
X				from += 5;	/* 6 bytes in total */
X				len -= 5;
X			} else {
X				while (len > 0) {
X					c = *from;
X					/*
X					 * Test for 7 bit ASCII + non prefix
X					 */
X					if (c <= 0xBF)
X						break;
X					from++;
X					len--;
X				}
X			}
X		}
X	}
X	*to = '\0';
X	*lenp = (to - oto);
X	return (ret);
X}
END-of-star-1.5.2/star/unicode.c
echo x - star-1.5.2/star/volhdr.c
sed 's/^X//' >star-1.5.2/star/volhdr.c << 'END-of-star-1.5.2/star/volhdr.c'
X/* @(#)volhdr.c	1.34 09/07/11 Copyright 1994, 2003-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)volhdr.c	1.34 09/07/11 Copyright 1994, 2003-2009 J. Schilling";
X#endif
X/*
X *	Volume header related routines.
X *
X *	Copyright (c) 1994, 2003-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include "star.h"
X#include "props.h"
X#include "table.h"
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/libport.h>
X#include "starsubs.h"
X#include "dumpdate.h"
X#include "xtab.h"
X#include "fifo.h"
X
Xextern	FILE	*vpr;
Xextern	BOOL	multivol;
Xextern	long	chdrtype;
Xextern	char	*vers;
Xextern	int	verbose;
Xextern	Ullong	tsize;
Xextern	BOOL	ghdr;
X
Xextern struct timeval	ddate;			/* The current dump date	*/
X
Xextern	m_stats	*stats;
X
Xextern	GINFO	*gip;				/* Global information pointer	*/
Xextern	GINFO	*grip;				/* Global read info pointer	*/
X
XEXPORT	void	ginit		__PR((void));
XEXPORT	void	grinit		__PR((void));
XLOCAL	int	xstrcpy		__PR((char **newp, char *old, char *p, int len));
XEXPORT	void	gipsetup	__PR((GINFO *gp));
XEXPORT	void	griprint	__PR((GINFO *gp));
XEXPORT	BOOL	verifyvol	__PR((char *buf, int amt, int volno, int *skipp));
XLOCAL	BOOL	vrfy_gvolhdr	__PR((char *buf, int amt, int volno, int *skipp));
XEXPORT	char	*dt_name	__PR((int type));
XEXPORT	int	dt_type		__PR((char *name));
XEXPORT	void	put_release	__PR((void));
XEXPORT	void	put_archtype	__PR((void));
XEXPORT	void	put_gvolhdr	__PR((char *name));
XEXPORT	void	put_volhdr	__PR((char *name, BOOL putv));
XEXPORT	void	put_svolhdr	__PR((char *name));
XEXPORT	void	put_multhdr	__PR((off_t size, off_t off));
XEXPORT	BOOL	get_volhdr	__PR((FINFO *info, char *vhname));
XLOCAL	void	get_label	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_hostname	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_filesys	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_cwd		__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_device	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_dumptype	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_dumplevel	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_reflevel	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_dumpdate	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_refdate	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_volno	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_blockoff	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_blocksize	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
XLOCAL	void	get_tapesize	__PR((FINFO *info, char *keyword, int klen, char *arg, int len));
X
X/*
X * Important for the correctness of gen_number(): As long as we stay <= 55
X * chars for the keyword, a 128 bit number entry will fit into 100 chars.
X */
XEXPORT xtab_t volhtab[] = {
X			{ "SCHILY.volhdr.label",	19, get_label,	   0	},
X			{ "SCHILY.volhdr.hostname",	22, get_hostname,  0	},
X			{ "SCHILY.volhdr.filesys",	21, get_filesys,   0	},
X			{ "SCHILY.volhdr.cwd",		17, get_cwd,	   0	},
X			{ "SCHILY.volhdr.device",	20, get_device,	   0	},
X			{ "SCHILY.volhdr.dumptype",	22, get_dumptype,  0	},
X			{ "SCHILY.volhdr.dumplevel",	23, get_dumplevel, 0	},
X			{ "SCHILY.volhdr.reflevel",	22, get_reflevel,  0	},
X			{ "SCHILY.volhdr.dumpdate",	22, get_dumpdate,  0	},
X			{ "SCHILY.volhdr.refdate",	21, get_refdate,   0	},
X			{ "SCHILY.volhdr.volno",	19, get_volno,	   0	},
X			{ "SCHILY.volhdr.blockoff",	22, get_blockoff,  0	},
X			{ "SCHILY.volhdr.blocksize",	23, get_blocksize, 0	},
X			{ "SCHILY.volhdr.tapesize",	22, get_tapesize,  0	},
X
X			{ NULL,				0, NULL,	   0	}};
X
XEXPORT void
Xginit()
X{
Xextern	int	dumplevel;
Xextern	int	nblocks;
X
X	gip->label	= NULL;
X	gip->hostname	= NULL;
X	gip->filesys	= NULL;
X	gip->cwd	= NULL;
X	gip->device	= NULL;
X	gip->release	= vers;
X	gip->archtype	= chdrtype;
X	gip->dumptype	= 0;
X	gip->dumplevel	= dumplevel;
X	gip->reflevel	= -1;
X	gip->dumpdate	= ddate;
X	gip->refdate.tv_sec  = 0;
X	gip->refdate.tv_usec = 0;
X	gip->volno	= 1;
X	gip->tapesize	= tsize;
X	gip->blockoff	= 0;
X	gip->blocksize	= nblocks;
X	gip->gflags	=   GF_RELEASE|GF_DUMPLEVEL|GF_REFLEVEL|GF_DUMPDATE|
X			    GF_VOLNO|GF_TAPESIZE|GF_BLOCKOFF|GF_BLOCKSIZE;
X}
X
XEXPORT void
Xgrinit()
X{
X	if (grip->label) {
X		if ((grip->gflags & GF_NOALLOC) == 0)
X			free(grip->label);
X		grip->label	= NULL;
X	}
X	if (grip->hostname) {
X		if ((grip->gflags & GF_NOALLOC) == 0)
X			free(grip->hostname);
X		grip->hostname	= NULL;
X	}
X	if (grip->filesys) {
X		if ((grip->gflags & GF_NOALLOC) == 0)
X			free(grip->filesys);
X		grip->filesys	= NULL;
X	}
X	if (grip->cwd) {
X		if ((grip->gflags & GF_NOALLOC) == 0)
X			free(grip->cwd);
X		grip->cwd	= NULL;
X	}
X	if (grip->device) {
X		if ((grip->gflags & GF_NOALLOC) == 0)
X			free(grip->device);
X		grip->device	= NULL;
X	}
X	if (grip->release) {
X		if ((grip->gflags & GF_NOALLOC) == 0)
X			free(grip->release);
X		grip->release	= NULL;
X	}
X	grip->archtype	= H_UNDEF;
X	grip->dumptype	= 0;
X	grip->dumplevel	= 0;
X	grip->reflevel	= 0;
X	grip->dumpdate.tv_sec  = 0;
X	grip->dumpdate.tv_usec = 0;
X	grip->refdate.tv_sec   = 0;
X	grip->refdate.tv_usec  = 0;
X	grip->volno	= 0;
X	grip->tapesize	= 0;
X	grip->blockoff	= 0;
X	grip->blocksize	= 0;
X	grip->gflags	= 0;
X}
X
X/*
X * A special string copy that is used copy strings into the limited space
X * in the shared memory.
X */
XLOCAL int
Xxstrcpy(newp, old, p, len)
X	char	**newp;
X	char	*old;
X	char	*p;
X	int	len;
X{
X	int	slen;
X
X	if (old == NULL)
X		return (0);
X
X	slen = strlen(old) + 1;
X	if (slen > len)
X		return (0);
X	*newp = p;
X	strncpy(p, old, len);
X	p[len-1] = '\0';
X
X	return (slen);
X}
X
X/*
X * Set up the global GINFO *gip structure from a structure that just
X * has been read from the information on the current medium.
X * This structure is inside the shared memory if we are usinf the fifo.
X */
XEXPORT void
Xgipsetup(gp)
X	GINFO	*gp;
X{
X#ifdef	FIFO
Xextern	m_head	*mp;
Xextern	BOOL	use_fifo;
X#endif
X	if (gip->gflags & GF_MINIT) {
X		return;
X	}
X	*gip = *gp;
X	gip->label	= NULL;
X	gip->hostname	= NULL;
X	gip->filesys	= NULL;
X	gip->cwd	= NULL;
X	gip->device	= NULL;
X	gip->release	= NULL;
X
X#ifdef	FIFO
X	if (use_fifo) {
X		char	*p = (char *)&gip[1];
X		int	len = mp->rsize;
X		int	slen;
X
X		slen = xstrcpy(&gip->label, gp->label, p, len);
X		p += slen;
X		len -= slen;
X		slen = xstrcpy(&gip->filesys, gp->filesys, p, len);
X		p += slen;
X		len -= slen;
X		slen = xstrcpy(&gip->cwd, gp->cwd, p, len);
X		p += slen;
X		len -= slen;
X		slen = xstrcpy(&gip->hostname, gp->hostname, p, len);
X		p += slen;
X		len -= slen;
X		slen = xstrcpy(&gip->release, gp->release, p, len);
X		p += slen;
X		len -= slen;
X		slen = xstrcpy(&gip->device, gp->device, p, len);
X		p += slen;
X		len -= slen;
X		gip->gflags |= GF_NOALLOC;
X	} else
X#endif
X	{
X		if (gp->label)
X			gip->label = ___savestr(gp->label);
X		if (gp->filesys)
X			gip->filesys = ___savestr(gp->filesys);
X		if (gp->cwd)
X			gip->cwd = ___savestr(gp->cwd);
X		if (gp->hostname)
X			gip->hostname = ___savestr(gp->hostname);
X		if (gp->release)
X			gip->release = ___savestr(gp->release);
X		if (gp->device)
X			gip->device = ___savestr(gp->device);
X	}
X	if (gp->volno > 1)		/* Allow to start with vol # != 1 */
X		stats->volno = gp->volno;
X	gip->gflags |= GF_MINIT;
X}
X
XEXPORT void
Xgriprint(gp)
X	GINFO	*gp;
X{
X	register FILE	*f = vpr;
X
X	if (verbose <= 0)
X		return;
X
X	if (gp->label)
X		fprintf(f, "Label       %s\n", gp->label);
X
X	if (gp->hostname)
X		fprintf(f, "Host name   %s\n", gp->hostname);
X
X	if (gp->filesys)
X		fprintf(f, "File system %s\n", gp->filesys);
X
X	if (gp->cwd)
X		fprintf(f, "Working dir %s\n", gp->cwd);
X
X	if (gp->device)
X		fprintf(f, "Device      %s\n", gp->device);
X
X	if (gp->release)
X		fprintf(f, "Release     %s\n", gp->release);
X
X	if (gp->archtype != H_UNDEF)
X		fprintf(f, "Archtype    %s\n", hdr_name(gp->archtype));
X
X	if (gp->gflags & GF_DUMPTYPE)
X		fprintf(f, "Dumptype    %s\n", dt_name(gp->dumptype));
X
X	if (gp->gflags & GF_DUMPLEVEL)
X		fprintf(f, "Dumplevel   %d\n", gp->dumplevel);
X
X	if (gp->gflags & GF_REFLEVEL)
X		fprintf(f, "Reflevel    %d\n", gp->reflevel);
X
X	if (gp->gflags & GF_DUMPDATE) {
X		fprintf(f, "Dumpdate    %lld.%6.6lld (%s)\n",
X			(Llong)gp->dumpdate.tv_sec,
X			(Llong)gp->dumpdate.tv_usec,
X			dumpdate(&gp->dumpdate));
X	}
X	if (gp->gflags & GF_REFDATE) {
X		fprintf(f, "Refdate     %lld.%6.6lld (%s)\n",
X			(Llong)gp->refdate.tv_sec,
X			(Llong)gp->refdate.tv_usec,
X			dumpdate(&gp->refdate));
X	}
X	if (gp->gflags & GF_VOLNO)
X		fprintf(f, "Volno       %d\n", gp->volno);
X	if (gp->gflags & GF_BLOCKOFF)
X		fprintf(f, "Blockoff    %llu records\n", gp->blockoff);
X	if (gp->gflags & GF_BLOCKSIZE)
X		fprintf(f, "Blocksize   %d records\n", gp->blocksize);
X	if (gp->gflags & GF_TAPESIZE)
X		fprintf(f, "Tapesize    %llu records\n", gp->tapesize);
X}
X
XEXPORT BOOL
Xverifyvol(buf, amt, volno, skipp)
X	char	*buf;
X	int	amt;
X	int	volno;
X	int	*skipp;
X{
X	TCB	*ptb = (TCB *)buf;
X
X	*skipp = 0;
X
X	/*
X	 * Minimale Blockgroesse ist 2,5k
X	 * 'g' Header, 512 Byte Content and a 'V' header
X	 */
X	if (ptb->ustar_dbuf.t_typeflag == 'g') {
X		if (pr_validtype(ptb->ustar_dbuf.t_typeflag) &&
X		    tarsum_ok(ptb))
X			return (vrfy_gvolhdr(buf, amt, volno, skipp));
X	}
X	if (ptb->ustar_dbuf.t_typeflag == 'x') {
X		if (pr_validtype(ptb->ustar_dbuf.t_typeflag) &&
X		    tarsum_ok(ptb)) {
X			Ullong	ull;
X			int	xlen;
X
X			stolli(ptb->dbuf.t_size, &ull);
X			xlen = ull;
X			xlen = 1 + tarblocks(xlen);
X			*skipp += xlen;
X			ptb = (TCB *)&((char *)ptb)[*skipp * TBLOCK];
X		}
X	}
X
X	if (ptb->ustar_dbuf.t_typeflag == 'V' ||
X	    ptb->ustar_dbuf.t_typeflag == 'M') {
X		if (pr_validtype(ptb->ustar_dbuf.t_typeflag) &&
X		    tarsum_ok(ptb)) {
X			*skipp += 1;
X			ptb = (TCB *)&buf[*skipp * TBLOCK];
X		}
X	}
X	return (TRUE);
X}
X
XLOCAL BOOL
Xvrfy_gvolhdr(buf, amt, volno, skipp)
X	char	*buf;
X	int	amt;
X	int	volno;
X	int	*skipp;
X{
X	TCB	*ptb = (TCB *)buf;
X	FINFO	finfo;
X	char	name[PATH_MAX+1];
X	char	lname[PATH_MAX+1];
X	Ullong	ull;
X	int	xlen = amt - TBLOCK - 1;
X	char	*p = &buf[TBLOCK];
X	char	*ep;
X	char	ec;
X	Llong	bytes;
X	Llong	blockoff;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X	finfo.f_tcb = ptb;
X	finfo.f_name = name;
X	finfo.f_lname = lname;
X
X	/*
X	 * File size is strlen of extended header
X	 */
X	stolli(ptb->dbuf.t_size, &ull);
X	if (xlen > ull)
X		xlen = ull;
X
X	grinit();	/* Clear/initialize current GINFO read struct */
X	ep = p+xlen;
X	ec = *ep;
X	*ep = '\0';
X	xhparse(&finfo, p, p+xlen);
X	*ep = ec;
X	griprint(grip);
X
X	/*
X	 * Return TRUE (no skip) if this was not a volume continuation header.
X	 */
X	if ((grip->gflags & GF_VOLNO) == 0)
X		return (TRUE);
X
X	if ((gip->dumpdate.tv_sec != grip->dumpdate.tv_sec) ||
X	    (gip->dumpdate.tv_usec != grip->dumpdate.tv_usec)) {
X		errmsgno(EX_BAD,
X			"Dump date %s does not match expected",
X					dumpdate(&grip->dumpdate));
X		error(" %s\n", dumpdate(&gip->dumpdate));
X		return (FALSE);
X	}
X	if (volno != grip->volno) {
X		errmsgno(EX_BAD,
X			"Volume number %d does not match expected %d\n",
X					grip->volno, volno);
X		return (FALSE);
X	}
X	bytes = stats->Tblocks * (Llong)stats->blocksize + stats->Tparts;
X	blockoff = bytes / TBLOCK;
X	/*
X	 * In case we did start past Volume #1, we need to add
X	 * the offset of the first volume we did see.
X	 */
X	blockoff += gip->blockoff;
X
X	if (grip->blockoff != 0 &&
X	    blockoff != grip->blockoff) {
X		comerrno(EX_BAD,
X			"Volume offset %lld does not match expected %lld\n",
X				grip->blockoff, blockoff);
X			/* NOTREACHED */
X	}
X
X	*skipp += 1 + tarblocks(xlen);
X
X	/*
X	 * Hier muß noch ein 'V' Header hin, sonst ist das Archiv nicht
X	 * konform zum POSIX Standard.
X	 * Alternativ kann aber auch ein 'M'ultivol continuation Header stehen.
X	 */
X	ptb = (TCB *)&buf[(1 + tarblocks(xlen)) * TBLOCK];
X
X	if (ptb->ustar_dbuf.t_typeflag == 'x') {
X		if (pr_validtype(ptb->ustar_dbuf.t_typeflag) &&
X		    tarsum_ok(ptb)) {
X			stolli(ptb->dbuf.t_size, &ull);
X			xlen = ull;
X			xlen = 1 + tarblocks(xlen);
X			*skipp += xlen;
X			ptb = (TCB *)&((char *)ptb)[xlen * TBLOCK];
X		}
X	}
X
X	if (ptb->ustar_dbuf.t_typeflag == 'V' ||
X	    ptb->ustar_dbuf.t_typeflag == 'M') {
X		if (pr_validtype(ptb->ustar_dbuf.t_typeflag) &&
X		    tarsum_ok(ptb)) {
X			*skipp += 1;
X		}
X	}
X	return (TRUE);
X}
X
XEXPORT char *
Xdt_name(type)
X	int	type;
X{
X	switch (type) {
X
X	case DT_NONE:		return ("none");
X	case DT_FULL:		return ("full");
X	case DT_PARTIAL:	return ("partial");
X	default:		return ("unknown");
X	}
X}
X
XEXPORT int
Xdt_type(name)
X	char	*name;
X{
X	if (streql(name, "none")) {
X		return (DT_NONE);
X	} else if (streql(name, "full")) {
X		return (DT_FULL);
X	} else if (streql(name, "partial")) {
X		return (DT_PARTIAL);
X	} else {
X		return (DT_UNKN);
X	}
X}
X
X
XEXPORT void
Xput_release()
X{
X	if ((props.pr_flags & PR_VU_XHDR) == 0 || props.pr_xc != 'x')
X		return;
X
X	/*
X	 * We may change this in future when more tar implementations
X	 * implement POSIX.1-2001
X	 */
X	if (H_TYPE(chdrtype) == H_XUSTAR)
X		return;
X
X	gen_text("SCHILY.release", vers, -1, 0);
X
X	ghdr = TRUE;
X}
X
XEXPORT void
Xput_archtype()
X{
X	if ((props.pr_flags & PR_VU_XHDR) == 0 || props.pr_xc != 'x')
X		return;
X
X	/*
X	 * We may change this in future when more tar implementations
X	 * implement POSIX.1-2001
X	 */
X	if (H_TYPE(chdrtype) == H_XUSTAR)
X		return;
X
X	gen_text("SCHILY.archtype", hdr_name(chdrtype), -1, 0);
X
X	ghdr = TRUE;
X}
X
XEXPORT void
Xput_gvolhdr(name)
X	char	*name;
X{
X	char	nbuf[1024];
X
X	if ((props.pr_flags & PR_VU_XHDR) == 0 || props.pr_xc != 'x')
X		return;
X
X	/*
X	 * We may change this in future when more tar implementations
X	 * implement POSIX.1-2001
X	 */
X	if (H_TYPE(chdrtype) == H_XUSTAR)
X		return;
X
X	gip->label = name;
X	if (gip->dumplevel >= 0) {
X		nbuf[0] = '\0';
X		gethostname(nbuf, sizeof (nbuf));
X		gip->hostname = ___savestr(nbuf);
X	}
X
X	if (gip->label)
X		gen_text("SCHILY.volhdr.label", gip->label, -1, 0);
X	if (gip->hostname)
X		gen_text("SCHILY.volhdr.hostname", gip->hostname, -1, 0);
X	if (gip->filesys)
X		gen_text("SCHILY.volhdr.filesys", gip->filesys, -1, 0);
X	if (gip->cwd)
X		gen_text("SCHILY.volhdr.cwd", gip->cwd, -1, 0);
X	if (gip->device)
X		gen_text("SCHILY.volhdr.device", gip->device, -1, 0);
X
X	if (gip->dumptype > 0)
X		gen_text("SCHILY.volhdr.dumptype", dt_name(gip->dumptype), -1, 0);
X	if (gip->dumplevel >= 0)
X		gen_number("SCHILY.volhdr.dumplevel", gip->dumplevel);
X	if (gip->reflevel >= 0)
X		gen_number("SCHILY.volhdr.reflevel", gip->reflevel);
X
X	gen_xtime("SCHILY.volhdr.dumpdate", gip->dumpdate.tv_sec, gip->dumpdate.tv_usec * 1000);
X	if (gip->refdate.tv_sec)
X		gen_xtime("SCHILY.volhdr.refdate", gip->refdate.tv_sec, gip->refdate.tv_usec * 1000);
X
X	if (gip->volno > 0)
X		gen_number("SCHILY.volhdr.volno", gip->volno);
X	if (gip->blockoff > 0)
X		gen_number("SCHILY.volhdr.blockoff", gip->blockoff);
X	if (gip->blocksize > 0)
X		gen_number("SCHILY.volhdr.blocksize", gip->blocksize);
X	if (gip->tapesize > 0)
X		gen_number("SCHILY.volhdr.tapesize", gip->tapesize);
X
X	if ((xhsize() + 2 * TBLOCK) > (gip->blocksize * TBLOCK)) {
X		errmsgno(EX_BAD, "Panic: Tape record size too small.\n");
X		comerrno(EX_BAD, "Panic: Shorten label or increase tape block size.\n");
X	}
X	ghdr = TRUE;
X}
X
XEXPORT void
Xput_volhdr(name, putv)
X	char	*name;
X	BOOL	putv;
X{
Xextern	Ullong	tsize;
X
X	if ((multivol || tsize > 0) && name == 0)
X		name = "<none>";
X
X	put_gvolhdr(name);
X
X	if (name == 0)
X		return;
X
X	if (!putv)
X		return;	/* Only a 'g' header is needed */
X
X	put_svolhdr(name);
X}
X
XEXPORT void
Xput_svolhdr(name)
X	char	*name;
X{
X	FINFO	finfo;
X	TCB	tb;
X
X	if ((props.pr_flags & PR_VOLHDR) == 0)
X		return;
X
X	if (name == 0 || *name == '\0')
X		name = "<none>";
X
X	fillbytes((char *)&finfo, sizeof (FINFO), '\0');
X	filltcb(&tb);
X	finfo.f_name = name;
X	finfo.f_namelen = strlen(name);
X	finfo.f_xftype = XT_VOLHDR;
X	finfo.f_rxftype = XT_VOLHDR;
X	finfo.f_mtime = ddate.tv_sec;
X	finfo.f_mnsec = ddate.tv_usec*1000;
X	finfo.f_atime = gip->volno;
X	finfo.f_ansec = 0;
X	finfo.f_tcb = &tb;
X	finfo.f_xflags = XF_NOTIME;
X
X	if (!name_to_tcb(&finfo, &tb))	/* Name too long */
X		return;
X
X	info_to_tcb(&finfo, &tb);
X	put_tcb(&tb, &finfo);
X	vprint(&finfo);
X}
X
XEXPORT void
Xput_multhdr(size, off)
X	off_t	size;
X	off_t	off;
X{
Xextern	BOOL dodump;
X	FINFO	finfo;
X	TCB	tb;
X	TCB	*mptb;
X	BOOL	ododump = dodump;
X
X	fillbytes((char *)&finfo, sizeof (finfo), '\0');
X
X	if ((mptb = (TCB *)get_block(TBLOCK)) == NULL)
X		mptb = &tb;
X	else
X		finfo.f_flags |= F_TCB_BUF;
X	filltcb(mptb);
X	strcpy(mptb->dbuf.t_name, "././@MultHeader");
X	finfo.f_mode = TUREAD|TUWRITE;
X	finfo.f_size = size;
X	finfo.f_rsize = size - off;
X	finfo.f_contoffset = off;
X	finfo.f_xftype = XT_MULTIVOL;
X	finfo.f_rxftype = XT_MULTIVOL;
X	finfo.f_xflags = XF_NOTIME|XF_REALSIZE|XF_OFFSET;
X
X	info_to_tcb(&finfo, mptb);
X
X	dodump = FALSE;
X	put_tcb(mptb, &finfo);
X	dodump = ododump;
X}
X
XEXPORT BOOL
Xget_volhdr(info, vhname)
X	FINFO	*info;
X	char	*vhname;
X{
X	error("Volhdr: %s\n", info->f_name);
X
X	if (vhname) {
X		if (!streql(info->f_name, vhname))
X			return (FALSE);
X	}
X
X	return (TRUE);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_label(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	grip->gflags |= GF_LABEL;
X	grip->label = ___savestr(arg);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_hostname(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	grip->gflags |= GF_HOSTNAME;
X	grip->hostname = ___savestr(arg);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_filesys(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	grip->gflags |= GF_FILESYS;
X	grip->filesys = ___savestr(arg);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_cwd(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	grip->gflags |= GF_CWD;
X	grip->cwd    = ___savestr(arg);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_device(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	grip->gflags |= GF_DEVICE;
X	grip->device = ___savestr(arg);
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_dumptype(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	if (len == 0) {
X		grip->gflags &= ~GF_DUMPTYPE;
X		grip->dumptype = 0;
X		return;
X	}
X	grip->dumptype = dt_type(arg);
X	if (grip->dumptype == DT_UNKN)
X		errmsgno(EX_BAD, "Unknown dump type '%s'\n", arg);
X	else
X		grip->gflags |= GF_DUMPTYPE;
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_dumplevel(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		grip->gflags &= ~GF_DUMPLEVEL;
X		grip->dumplevel = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, 1000)) {
X		grip->gflags |= GF_DUMPLEVEL;
X		grip->dumplevel = ull;
X		if (grip->dumplevel != ull) {
X			xh_rangeerr(keyword, arg, len);
X			grip->dumplevel = 0;
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_reflevel(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		grip->gflags &= ~GF_REFLEVEL;
X		grip->reflevel = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, 1000)) {
X		grip->gflags |= GF_REFLEVEL;
X		grip->reflevel = ull;
X		if (grip->reflevel != ull) {
X			xh_rangeerr(keyword, arg, len);
X			grip->reflevel = 0;
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_dumpdate(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	long	nsec;
X	time_t	t;	/* FreeBSD/MacOS X have broken tv_sec/time_t */
X
X	if (len == 0) {
X		grip->gflags &= ~GF_DUMPDATE;
X		grip->dumpdate.tv_sec  = 0;
X		grip->dumpdate.tv_usec = 0;
X		return;
X	}
X	if (get_xtime(keyword, arg, len, &t, &nsec)) {
X		grip->gflags |= GF_DUMPDATE;
X		grip->dumpdate.tv_sec  = t;
X		grip->dumpdate.tv_usec = nsec/1000;
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_refdate(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	long	nsec;
X	time_t	t;	/* FreeBSD/MacOS X have broken tv_sec/time_t */
X
X	if (len == 0) {
X		grip->gflags &= ~GF_REFDATE;
X		grip->refdate.tv_sec  = 0;
X		grip->refdate.tv_usec = 0;
X		return;
X	}
X	if (get_xtime(keyword, arg, len, &t, &nsec)) {
X		grip->gflags |= GF_REFDATE;
X		grip->refdate.tv_sec  = t;
X		grip->refdate.tv_usec = nsec/1000;
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_volno(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		grip->gflags &= ~GF_VOLNO;
X		grip->volno = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, INT_MAX)) {
X		grip->gflags |= GF_VOLNO;
X		grip->volno = ull;
X		if (grip->volno != ull) {
X			xh_rangeerr(keyword, arg, len);
X			grip->volno = 0;
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_blockoff(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		grip->gflags &= ~GF_BLOCKOFF;
X		grip->blockoff = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, ULLONG_MAX)) {
X		grip->gflags |= GF_BLOCKOFF;
X		grip->blockoff = ull;
X		if (grip->blockoff != ull) {
X			xh_rangeerr(keyword, arg, len);
X			grip->blockoff = 0;
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_blocksize(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		grip->gflags &= ~GF_BLOCKSIZE;
X		grip->blocksize = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, INT_MAX)) {
X		grip->gflags |= GF_BLOCKSIZE;
X		grip->blocksize = ull;
X		if (grip->blocksize != ull) {
X			xh_rangeerr(keyword, arg, len);
X			grip->blocksize = 0;
X		}
X	}
X}
X
X/* ARGSUSED */
XLOCAL void
Xget_tapesize(info, keyword, klen, arg, len)
X	FINFO	*info;
X	char	*keyword;
X	int	klen;
X	char	*arg;
X	int	len;
X{
X	Ullong	ull;
X
X	if (len == 0) {
X		grip->gflags &= ~GF_TAPESIZE;
X		grip->tapesize = 0;
X		return;
X	}
X	if (get_unumber(keyword, arg, &ull, ULLONG_MAX)) {
X		grip->gflags |= GF_TAPESIZE;
X		grip->tapesize = ull;
X		if (grip->tapesize != ull) {
X			xh_rangeerr(keyword, arg, len);
X			grip->tapesize = 0;
X		}
X	}
X}
END-of-star-1.5.2/star/volhdr.c
echo x - star-1.5.2/star/README
sed 's/^X//' >star-1.5.2/star/README << 'END-of-star-1.5.2/star/README'
XStar is a tar like archiver - TAR stands for Tape ARchiver.
X
X
XStar saves many files together into a single tape or disk archive,
Xand can restore individual files from the archive. It includes a FIFO
Xfor speed, a pattern matcher, multivolume support, the ability to correctly 
Xarchive sparse files, automatic archive format detection, automatic byte order
Xrecognition, automatic archive compression/decompression, remote archives
Xand special features that allow star to be used for full backups. it includes
Xa built in find(1) command that allows to execute find(1) expressions.
XIt also includes `rmt', a truly portable version of the remote tape server
Xthat supports remote operation between different OS and machine architectures
X(hides even Linux oddities) and a portable `mt' tape drive control program
Xthat is able to use the remote tape interface.
X
XThe RMT program if 100% compatible with Sun's extensions for inter-platform
Xoperability support (MT status codes) and with GNU extensions for inter-platform
Xopen() interoperability. In addition, it includes my enhancements that
Xhide Linux MT-ioctl non compliances with other UNIX platforms.
X
XStar is the fastest known implementation of a tar archiver.
XStar is even at least 30% faster than ufsdump.
X
XStar development started 1982, the first complete implementation has 
Xbeen done in 1985. I never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	built-in find		- star is built on top of libfind and thus
X				  allows you to execute "find" like expressions
X				  in create, extract and list mode. This allows
X				  to do a lot of interesting things that could
X				  not be done if star and find would be called
X				  separatedly
X
X	fifo			- keeps the tape streaming.
X				  This gives you at least 30% faster backups
X				  than you can achieve with ufsdump.
X
X	remote tape support	- a fast RMT implementation that has no
X				  probems to saturate a 100 Mb/s network.
X
X	accurate sparse files	- star is able to reproduce holes in sparse
X				  files accurately if the OS includes 
X				  the needed support functions. This is
X				  currently true for Solaris-2.3 to
X				  Solaris-2.5.1 and for Solaris-10 or newer
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record
X				  long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  With POSIX.1-2001 the times are in nanosecond
X				  granularity.
X				  Star may reset access time after doing
X				  backup. On Solaris this can be done without
X				  changing the ctime.
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star,
X				  POSIX.1-2001 PAX, Sun's Solaris tar, cpio.
X
X
X	automatic compression detect - star automatically detects whether the
X				  archive is compressed. If it has been
X				  compressed with a compression program that
X				  is compatible to decompression with "gzip"
X				  "bzip2", "lzop" or "p7zip", star automatically
X				  activates decompression.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete
X				  description of bugs found in other tar
X				  implementations. Star is the first tar
X				  implementation that supports POSIX.1-2001.
X
X	support for ACLs and file flags - star supports Access Control Lists
X				  and extended file flags (as found on FreeBSD
X				  and Linux). Support to archive and restore
X				  other file properties may be easily added.
X
X	support for all inode metadata - star supports to put all inode
X				  metadata on the archive. This allows future
X				  versions of star to perform true
X				  incremental dumps.
X
X	sophisticated error control - allows to tell star which error types
X				  should be ignored for wich file name pattern.
X				  This allows to write backup scripts that give
X				  no error messages for all problems that are
X				  tolerable (e.g. growing log files). 
X
X	'ed' like pattern substitutuions - star supports automated pattern rule
X				  based file name substitution as documented
X				  for 'pax'. 
X
X	fast built in -copy mode  - allows to make fast and accurate copies and
X				  directory tree comparisons. 
X
X	True incremental dump/restore features - tar is the first TAR based
X				  backup system that has been verified to
X				  handle typical file system changes
X				  correctly.
X
X				  Star uses the same method as
X				  ufsdump/ufsrestore but acts OS and FS
X				  indeependent.
X
XHave a look at the manual page, it is included in the distribution.
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhofer.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/star/README
echo x - star-1.5.2/star/Makefile.doc
sed 's/^X//' >star-1.5.2/star/Makefile.doc << 'END-of-star-1.5.2/star/Makefile.doc'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Sample makefile for sub-makes in one directory
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES=	readme.mk Racl.mk Rcrash.mk Rlargefiles.mk Rmtio.mk \
X		Rotherbugs.mk Rpattern.mk Rposix.mk starvsgnutar.mk \
X		testscripts.mk
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/star/Makefile.doc
echo x - star-1.5.2/star/xattr.c
sed 's/^X//' >star-1.5.2/star/xattr.c << 'END-of-star-1.5.2/star/xattr.c'
X/* @(#)xattr.c	1.13 09/07/11 Copyright 2003-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)xattr.c	1.13 09/07/11 Copyright 2003-2009 J. Schilling";
X#endif
X/*
X *	Handle Extended File Attributes on Linux
X *
X *	Copyright (c) 2003-2009 J. Schilling
X *	Thanks to Anreas Grünbacher <agruen@suse.de> for the
X *	first implemenation.
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#if defined(HAVE_ATTR_XATTR_H)
X#include <attr/xattr.h>
X#endif
X#include "star.h"
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/schily.h>
X#include "starsubs.h"
X#include "checkerr.h"
X
X#if defined(USE_XATTR) && defined(HAVE_LISTXATTR) && defined(HAVE_GETXATTR)
X/*
X * Use a global list of extended attributes -- FINFO structs have no
X * constructors and destructors.
X */
X/*
X * It bad to see new global variables while we are working on a star library.
X */
XLOCAL star_xattr_t	*static_xattr;
X#endif
X
X#if defined(HAVE_GETXATTR) && !defined(HAVE_LGETXATTR)
X#define	lgetxattr	getxattr
X#endif
X#if defined(HAVE_SETXATTR) && !defined(HAVE_LSETXATTR)
X#define	lsetxattr	setxattr
X#endif
X#if defined(HAVE_LISTXATTR) && !defined(HAVE_LLISTXATTR)
X#define	llistxattr	listxattr
X#endif
X
XEXPORT void
Xopt_xattr()
X{
X#if defined(USE_XATTR) && \
X	(defined(HAVE_LISTXATTR) || defined(HAVE_LLISTXATTR)) && \
X	(defined(HAVE_GETXATTR) || defined(HAVE_LGETXATTR))
X#if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR)
X	printf(" Linux-xattr");
X#endif
X#endif
X}
X
X/* ARGSUSED */
XEXPORT BOOL
Xget_xattr(info)
X	register FINFO	*info;
X{
X#if defined(USE_XATTR) && \
X	(defined(HAVE_LISTXATTR) || defined(HAVE_LLISTXATTR)) && \
X	(defined(HAVE_GETXATTR) || defined(HAVE_LGETXATTR))
X	ssize_t	list_len;
X	size_t	size;
X	char	*alist;
X	char	*lp;
X	int	count;
X	int	i;
X
X	free_xattr(&static_xattr);
X	info->f_xflags &= ~XF_XATTR;
X	info->f_xattr = NULL;
X
X	list_len = llistxattr(info->f_name, NULL, 0);
X	if (list_len < 0) {
X		if (!errhidden(E_GETXATTR, info->f_name)) {
X			if (!errwarnonly(E_GETXATTR, info->f_name))
X				xstats.s_getxattr++;
X			errmsg("Cannot listxattr for '%s'.\n", info->f_name);
X			(void) errabort(E_GETXATTR, info->f_name, TRUE);
X		}
X		return (FALSE);
X	} else if (list_len == 0) {
X		return (FALSE);
X	}
X	alist = ___malloc(list_len+2, "extended attribute");
X	list_len = llistxattr(info->f_name, alist, list_len);
X	if (list_len < 0) {
X		if (!errhidden(E_GETXATTR, info->f_name)) {
X			if (!errwarnonly(E_GETXATTR, info->f_name))
X				xstats.s_getxattr++;
X			errmsg("Cannot listxattr for '%s'.\n", info->f_name);
X			(void) errabort(E_GETXATTR, info->f_name, TRUE);
X		}
X		goto fail;
X	}
X	alist[list_len] = alist[list_len+1] = '\0';
X
X	/*
X	 * Count the number of attributes
X	 */
X	for (lp = alist, count = 0; lp - alist < list_len;
X						lp = strchr(lp, '\0')+1) {
X		if (*lp == '\0' ||
X		    strncmp(lp, "system.", 7) == 0 ||
X		    strncmp(lp, "xfsroot.", 8) == 0)
X			continue;
X		count++;
X	}
X
X	if (count == 0)
X		goto fail;  /* not really a failure, but... */
X
X	size = (count+1) * sizeof (star_xattr_t);
X	static_xattr = ___malloc(size, "extended attribute");
X	fillbytes(static_xattr, size, '\0');
X
X	for (lp = alist, i = 0; lp - alist < list_len;
X						lp = strchr(lp, '\0')+1) {
X		ssize_t	len;
X
X		if (*lp == '\0' ||
X		    strncmp(lp, "system.", 7) == 0 ||
X		    strncmp(lp, "xfsroot.", 8) == 0)
X			continue;
X
X		static_xattr[i].name = ___malloc(strlen(lp)+1,
X						"extended attribute");
X		static_xattr[i].value = NULL;
X		strcpy(static_xattr[i].name, lp);
X
X		len = lgetxattr(info->f_name, lp, NULL, 0);
X		if (len < 0) {
X			if (!errhidden(E_GETXATTR, info->f_name)) {
X				if (!errwarnonly(E_GETXATTR, info->f_name))
X					xstats.s_getxattr++;
X				errmsg("Cannot getxattr for '%s'.\n",
X							info->f_name);
X				(void) errabort(E_GETXATTR, info->f_name,
X								TRUE);
X			}
X			goto fail2;
X		}
X		static_xattr[i].value_len = len;
X		static_xattr[i].value = ___malloc(len, "extended attribute");
X		len = lgetxattr(info->f_name, lp, static_xattr[i].value, len);
X		if (len < 0) {
X			if (!errhidden(E_GETXATTR, info->f_name)) {
X				if (!errwarnonly(E_GETXATTR, info->f_name))
X					xstats.s_getxattr++;
X				errmsg("Cannot getxattr for '%s'.\n",
X							info->f_name);
X				(void) errabort(E_GETXATTR, info->f_name,
X								TRUE);
X			}
X			goto fail2;
X		}
X		i++;
X	}
X
X	free(alist);
X	info->f_xflags |= XF_XATTR;
X	info->f_xattr = static_xattr;
X	return (TRUE);
X
Xfail2:
X	for (; i >= 0; i--) {
X		free(static_xattr[i].name);
X		if (static_xattr[i].value != NULL)
X			free(static_xattr[i].value);
X	}
X	free(static_xattr);
X	static_xattr = NULL;
Xfail:
X	free(alist);
X	return (FALSE);
X#else  /* USE_XATTR */
X	return (TRUE);
X#endif  /* USE_XATTR */
X}
X
X/* ARGSUSED */
XEXPORT BOOL
Xset_xattr(info)
X	register FINFO	*info;
X{
X#if defined(USE_XATTR) && \
X	(defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR))
X	star_xattr_t	*xap;
X
X	if (info->f_xattr == NULL || (info->f_xflags & XF_XATTR) == 0)
X		return (TRUE);
X
X	for (xap = info->f_xattr; xap->name != NULL; xap++) {
X		if (lsetxattr(info->f_name, xap->name, xap->value,
X		    xap->value_len, 0) != 0) {
X			if (!errhidden(E_SETXATTR, info->f_name)) {
X				if (!errwarnonly(E_SETXATTR, info->f_name))
X					xstats.s_setxattr++;
X				errmsg("Cannot setxattr for '%s'.\n",
X							info->f_name);
X				(void) errabort(E_SETXATTR, info->f_name,
X								TRUE);
X			}
X			return (FALSE);
X		}
X	}
X#endif  /* USE_XATTR */
X	return (TRUE);
X}
X
XEXPORT void
Xfree_xattr(xattr)
X	star_xattr_t	**xattr;
X{
X#ifdef USE_XATTR
X	star_xattr_t	*xap;
X
X	if (*xattr == NULL)
X		return;
X
X	for (xap = *xattr; xap->name != NULL; xap++) {
X		free(xap->name);
X		free(xap->value);
X	}
X	free(*xattr);
X	*xattr = NULL;
X
X#endif  /* USE_XATTR */
X}
END-of-star-1.5.2/star/xattr.c
echo x - star-1.5.2/star/README.ACL
sed 's/^X//' >star-1.5.2/star/README.ACL << 'END-of-star-1.5.2/star/README.ACL'
XFirst support for POSIX ACLs with help from Andreas Gruenbacher <ag@bestbits.at>
XFirst support for Solaris ACLs (converted into POSIX strings).
X
XACL status for several OS:
X
XSunOS-4.x	No ACL support in the kernel
X
XSunOS-5.x	ACL Support was officially added with Solaris-2.5
X		Solaris ACL's are smilar enough to POSIX ACL's so I convert
X		them to POSIX ACLs before archiving them.
X
X		Read the man pages: getfacl, setfacl, acl
X
X		Due to a bug in libsec in function aclfromtext(),
X		restoring ACLs correctly only works if the full passwd access
X		for all users is present during star -x
X		So due to this bug, it is impossible to do ACL backup/restores
X		on passwd-less file servers.
X
X		**** Solaris BUG ***
X
X		As the function aclfromtext() on Solaris is unable to
X		recognise a numerical (all digit) user id, it is not possible
X		to do ACL backup/restore on a Solaris fileserver that has no
X		access to the same passwd data as it's NFS clients.
X
X		Even worse, aclfromtext() changes the UID for each unknown
X		user to NOBODY and the function aclfromtext() returns as if
X		there was no error. This is a serious security problem as
X		because if this behavior the file becomes (in addition to the
X		other users in the ACL) accessible by "nobody" which
X		definitely is intended.
X
X		This is Sun bug 4426407 ;-)
X
X		If Sun would make libsec true Open Source, it would be easy
X		to fix this bug in less than 10 minutes.
X
X		**** Solaris BUG ***
X
XLinux		ACL support available as Patch for Linux-2.4 and
X		Linux-2.2.20.
X
X		You need to install the Linux ACL patch _before_
X		compiling star.
X
X		By default Linux does not yet support ACLs. To
X		install ACL support get the patch from: 
X
X			http://acl.bestbits.at/
X
X		This page also lists the man pages for the ACL support 
X		commands for Linux.
X
XFreeBSD		FreeBSD-5.0 supports ACLs, but they need to be activated.
X		You need to know that you need to activate ACLs in the
X		kernel _and_ in each filesystem that should carry ACLs.
X
XTrue64		If you are on True64, you first need to activate extended
X		security features in order to use ACLs.
X		The administratice command names to list or set ACLs are
X		'getacl' and 'setacl'.
X
X		**** First tests on True64 show that the POSIX.1e function
X		**** acl_from_text() does not work as expected. I have no
X		**** idea how to work around this problem.
X		**** It may be that True64 does not support the ACL 'masks'
X		**** *entry. This would force us to create syntetic 'mask'
X		**** entries when in star create mode and to compute the
X		**** effective mode when in extract mode. On True64 also the
X		**** function acl_get_file() does not work properly if a file
X		**** does not have ACLs. Note that the standard requests that
X		**** in this case acl_get_file() should return a 3 entry ACL,
X		**** but on True64 it returns NULL with 'errno' unchanged.
X		**** Archiving and restoring ACLs from/to True64 will most
X		**** likely work. If you like to transfer TAR archives from/to
X		**** other platforms you will not be able to restore any ACL.
X		****
X		**** As a TAR archive with ACLs made on True64 is not usable on
X		**** any other system, ACL support on True64 could be called
X		**** broken.
X
X
XHP-UX		HP-UX ACLs are so different from POSIX.1e that it would take a
X		significant amount of time to code a translation module for
X		star. For this reason, HP-UX is currently not yet not supported.
X
XAIX		AIX ACLs are so different from POSIX.1e that it would take a
X		significant amount of time to code a translation module for
X		star. For this reason, HP-UX is not supported at the moment.
X
XIRIX		Unknown state, please report
X
XSCO/Caldera	UnixWare/OpenUnix seem to be very similar to Solaris in low
X		level but there is no high level (ACL string) support, so
X		we cannot support SCO unless Sun makes the source of the
X		libsec open.
X
X
X/*--------------------------------------------------------------------------*/
XIf you list a TAR archive that contains ACLs for certain files,
Xthose files are marked with a '+' sign past the UNIX permissions
Xif you request a long listing:
X
X      0 -rw-r--r--  gruenbacher/assis Nov  4 04:43 2001 default/file
X      0 drwxrwxr-x+ gruenbacher/assis Nov  4 04:43 2001 default/dir2/
X      0 drwxr-xr-x+ gruenbacher/assis Nov  4 04:44 2001 default/dir3/
X      0 drwxrwxr-x+ gruenbacher/assis Nov  4 04:44 2001 default/
X
XIf you like ACL test tar archives, have a look at:
X
X	http://acl.bestbits.at/pre/
X
Xand fetch the files acl*.tar
X
XNote: The ACL support code in star is alpha! Do not expect it to be
Xstable in any part. I cannot even grant that the archive format
Xwill not change. However, if it turns out to be the right solution, I
Xwill mail the star ACL format to the POSIX.1e standard committee.
XAll changes have been made in a way that does not affec the behaviour
Xof star in case no ACLs are present.
X
XThe format for ACLs in the extended headers used by star looks like:
X
XSCHILY.acl.access = user::rwx,user:lisa:r-x:502,group::r-x, \
X			group:toolies:rwx:102,mask::rwx,other::r-x
X
XSCHILY.acl.default = user::rwx,user:lisa:r-x:502,group::r-x, \
X			mask::r-x,other::r-x
X
XThe text above has been broken into shorter lines for readability
X
XThis is a legal 'vendor unique' POSIX.1-2001 extension for extended
Xtar headers.
X
XIf the format gets accepted by the POSIX.1 and POSIX1e committee, it
Xwould look like:
X
Xsecurity.acl...=user::rwx,group::rwx,mask::rwx,other::rwx,....
X
XAs the text format specified by POSIX.1e is not sufficient for TAR, we
Xadded a numerical field for all names user and group fields.
X
XPOSIX.1e named user entry:	'user:joe:rwx,'
XSTAR named user entry:		'user:joe:rwx:1431,'
X
XWhen star extracts the ACL string, it first checks if user 'joe' is
Xknown if 'joe' is known, the numerical value is stripped off and a
Xstandard POSIX.1e ACL entry is created. If 'joe' is not known, the
Xtext 'joe' is replaced by the numerical value '1431' and a new
XPOSIX.1e entry that looks like 'user:1431:rwx,' is created.
X
X/*--------------------------------------------------------------------------*/
XHow to use ACLs with star:
X
XTo archive ACLs (star in create mode, you need to specify a TAR format
Xthat supports extended POSIX.1-2001 headers _and_ uses them by default.
XThis may currently be achieved by calling "star -Hexustar ...".
XIn addition, you need to specify the -acl option.
XSo you need to call "star -Hexustar -acl ...".
X
XTo extract ACLs you need to call "star -acl ..."
X
XThis option -acl has been introduced because it turns out that it is
Ximpossible to handle the extract case (when the filesystem does
Xnot support ACLs) in a decent way. Without -acl star would either
Xbe forced to suppress eror messages for ACL handling or people
Xwould see hundreds of ACL warnings.
X
XThe intention for the -acl option was to make ACL handling easy
Xto understand.
X
XHere is a description how -acl works:
X
X-	if -acl is not present in create mode, star does not
X	archive ACLs
X
X-	if -acl is present in create mode and the header type
X	is 'exustar' (selected by H=exustar), star will
X	add ACL information to the archive.
X
X-	if -acl is not present in extract mode, star does not
X	handle ACL information (i.e. if the FS does not handle
X	ACLs, no error messages will occur, if the FS handles
X	ACLs and there are default ACLs set up for the directory
X	where star puts the extracted files the extracted files
X	will have the inherited ACLs from the Default ACL od the
X	directory regardless of the ACL information in the archive).
X
X-	if -acl is present in extract mode, star handles ACLs.
X	If the tar archive does not include ACL information at all
X	or if the archiv does not include ACL information for a 
X	specific file, star will clear the ACL for this file.
X	If the tar archive includes ACL information for the file,
X	star will set up the ACL to be the same as the ACL information
X	in the archive (i.e. if -acl is present in extract mode,
X	no ACL information will be inherited from the ACL information
X	that was present in the filesystem tree before the exrtact
X	operation took place).
X
X	If -acl is present in extract mode and the filesystem where
X	the files are extracted to does not support ACLs, star will
X	display an error message fo each file that is extracted.
END-of-star-1.5.2/star/README.ACL
echo x - star-1.5.2/star/xtab.h
sed 's/^X//' >star-1.5.2/star/xtab.h << 'END-of-star-1.5.2/star/xtab.h'
X/* @(#)xtab.h	1.4 06/10/31 Copyright 2001-2006 J. Schilling */
X/*
X *	Copyright (c) 2001-2006 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_XTAB_H
X#define	_XTAB_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
Xtypedef	void (*xt_function)	__PR((FINFO *, char *, int, char *, int));
X
Xtypedef struct {
X	char		*x_name;
X	int		x_namelen;
X	xt_function	x_func;
X	int		x_flag;
X} xtab_t;
X
X#endif	/* _XTAB_H */
END-of-star-1.5.2/star/xtab.h
echo x - star-1.5.2/star/xutimes.h
sed 's/^X//' >star-1.5.2/star/xutimes.h << 'END-of-star-1.5.2/star/xutimes.h'
X/* @(#)xutimes.h	1.2 03/06/12 Copyright 1996, 2003 J. Schilling */
X/*
X *	Prototypes for xutimes users
X *
X *	Copyright (c) 1996, 2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * star_unix.c
X */
Xextern	int	xutimes		__PR((char *name, struct timeval *tp));
END-of-star-1.5.2/star/xutimes.h
echo x - star-1.5.2/star/README.crash
sed 's/^X//' >star-1.5.2/star/README.crash << 'END-of-star-1.5.2/star/README.crash'
XStar is the best program for automatically recovering
Xfrom system crashes.
X
XConsider the case where you have a corrupted filesystem and
Xno actual backup. It can be repaired with only few manual
Xactions by using star. Simply follow the following steps:
X
X
X1)	Do a fsck -y to repair the filesystem.
X	Many files will be lost but you may have luck
X	and some/all recent files remain intact.
X
X2)	Run star -xp  from the most recent backup you have.
X	This will only extract all files that have been
X	deleted on the fsck -y run.
X
X3)	Rewind the tape and run:
X	star -diff -c diffopts=!times
X	to check for file corruptions that have not been
X	detected by the fsck -y run.
X
X4)	Do a full backup of the new system to prevent further
X	data loss.
X
X
X
END-of-star-1.5.2/star/README.crash
echo x - star-1.5.2/star/README.largefiles
sed 's/^X//' >star-1.5.2/star/README.largefiles << 'END-of-star-1.5.2/star/README.largefiles'
XBig file strategy for star:
XAccording to Posix 1003.1-1988, a 12 byte numeric field contains
X11 octal digits and a space or a null.
X
X	1)	Use unsigned 33 bit values conforming to Posix
X		to allow 8 GB Filesize.
X
X	2)	Set the top bit of theleftmost byte in the field
X		and use base '256' digits to allow 95 bit values inside
X		12 byte fields and 63 bit values inside 8 byte fields.
X
X	3)	Use POSIX.1-2001 extended headers to have values
X		without any limit.
X
X	Files in type 2) and 3) will not be extractable with
X	other tar implementations. Any files 'behind' such a file
X	cannot be accessed.
X
X	Files of type 1) may be extractable with other implementations.
END-of-star-1.5.2/star/README.largefiles
echo x - star-1.5.2/star/README.mtio
sed 's/^X//' >star-1.5.2/star/README.mtio << 'END-of-star-1.5.2/star/README.mtio'
XMagnetic Tape ioctl's are just (again) a compatibility problem with Linux.
X
X
XThe /etc/rmt protocol allows to send ioctls to the remote system and relies on
Xthe fact that  MTIO opcodes 0..7 of all UNIX systems are mapped to the same function.
XLinux unfortunately does not follow these rules.
X
X/*--------------------------------------------------------------------------*/
XAll other UNIX
X/*--------------------------------------------------------------------------*/
X/*
X * values for mt_op
X */
X#define	MTWEOF		0	/* write an end-of-file record */
X#define	MTFSF		1	/* forward space over file mark */
X#define	MTBSF		2	/* backward space over file mark (1/2" only ) */
X#define	MTFSR		3	/* forward space to inter-record gap */
X#define	MTBSR		4	/* backward space to inter-record gap */
X#define	MTREW		5	/* rewind */
X#define	MTOFFL		6	/* rewind and put the drive offline */
X#define	MTNOP		7	/* no operation, sets status only */
X
X/*--------------------------------------------------------------------------*/
XLinux
X/*--------------------------------------------------------------------------*/
X/* Magnetic Tape operations [Not all operations supported by all drivers]: */
X#define MTRESET	0	/* +reset drive in case of problems */
X#define MTFSF	1	/* forward space over FileMark,
X			 * position at first record of next file
X			 */
X#define MTBSF	2	/* backward space FileMark (position before FM) */
X#define MTFSR	3	/* forward space record */
X#define MTBSR	4	/* backward space record */
X#define MTWEOF	5	/* write an end-of-file record (mark) */
X#define MTREW	6	/* rewind */
X#define MTOFFL	7	/* rewind and put the drive offline (eject?) */
X#define MTNOP	8	/* no op, set status only (read with MTIOCGET) */
X
XOperation	Description			UNIX -> Linux
X====================================================================
X0 weof		writes EOF (file mark)		resets drive!!!		
X1 fsf		forward skip file mark		OK
X2 bsf		backwd skip file mark		OK
X3 fsr		forward skip record		OK
X4 bsr		backwd skip record		OK
X5 rew		rewind				writes file mark!!!
X6 offl		unload media			partially OK
X7 nop		set status in driver		unloads media
X8						NOP is mapped to the vendor dependant 
X						range. On Sun this is a retension
X						which takes a long time...
X
X
XThe rmt server and client code used in the star distribution voids
Xthese problems with Linux.
X
END-of-star-1.5.2/star/README.mtio
echo x - star-1.5.2/star/README.otherbugs
sed 's/^X//' >star-1.5.2/star/README.otherbugs << 'END-of-star-1.5.2/star/README.otherbugs'
XI have compared several tar implementations with the standard.
X
X	(IEEE/Posix1003/IEC-9945-1 Standard Data Interchange format)
X
XAlthough the POSIX.1-1988 standard now also defines cpio as an exchange format,
XI cannot recommend the cpio archive format for data exchange. There are at
Xleast 6 totally incompatible archive formats - all covered by the name "cpio".
XIt is most likely, that you are using an archive format that other cpio
Ximplementations will not understand at all.
X
XNote that POSIX.1-2001 will drop the cpio format from the standard as it
Xis not extendible (e.g. for large files > 8 GB and UID's > 2097151).
X
XTar in general will at least extract most of the files if you are using a
Xdifferent implementation to extract the archive.
X
XI've had a look at the following implementations:
X
X	Index:	Program description:		Source of program:
X	=====	====================		==================
X	1)	bsd 4.3 tar			(Regents of UCB)
X	2)	pax / ustar on SunOS 4.1	(USENIX)
X	3)	tar on  Solaris 2.3/2.4/2.5	(Sun/AT&T ??)
X	4)	gnutar	1.11.8			(gnu)
X	5)	gnucpio 2.3			(gnu)
X
X
XSummary:
X	1)	bsd 4.3 tar
X		Pre Posix 1003.1
X	
X		- Miscomputes the checksum. Therefore it is not able to extract
X		  standard conforming tar archives if they contain 8bit chars
X		  in the filename. This is a common bug found in many other
X		  implementations too.
X
X		No additional problems on portability except with gnutar
X		archives. But this is not a problem of BSD tar.
X
X
X	2)	pax / ustar (found on SunOS-4.x)
X
X		- Dumps core on every even/odd use.
X		- Computes checksums only on the first 500 bytes of the 
X		  tar header: not conforming to Posix 1003.1 standard.
X
X		Note:	This claims to be a reference implementation for
X			the Posix 1003.1 standard!
X
X
X	3)	tar distributed with Solaris 2.3/2.4/2.5
X
X		- Transfers more than 12 Bit from stat.st_mode (violating Posix)
X		- Complains about "impossible file type" when reading 
X		  tar archives which do not contain these illegal upper bits.
X		  This problem is still present in Solaris 7 & Solaris 8
X
X		- Does not handle non null terminated filenames correctly.
X		  The standard allows filenames that are exactly 100 chars
X		  and therefore are not null terminated. (Fixed in Solaris 2.5)
X
X		For the above reasons, Sun's tar is not conforming to
X		Posix 1003.1.
X
X		- Loops infinitely when trying to dump /dev/fd.
X		  Caused by incorrect handling of nested directories (assumes 
X		  all directories seekable).
X		  This makes it impossible to use Solaris tar on the root file
X		  system.
X
X
X	4)	gnutar
X		Claims not to be conforming to Posix 1003.1. (gnu is not tar)
X
X		- Many bugs in implementation and design.
X		  (e.g. when handling/creating multi volume archives)
X
X		- The second logical EOF block in GNU-tar archives is missing
X		  with a 50% chance.
X		  This will cause correctly working tar implementations to
X		  complain about an illegal/missing EOF in the tar archive.
X		  This bug seems to be fixed with newer 1.13 releases
X
X		- Deeply nested directory trees will not be dumped:
X		  Error message is: Too many open files
X		  (This is a similar implementation bug as found in Solaris tar
X		  with the /dev/fd loop) caused by the fact that GNU-tar
X		  assumes infinite resources in file descriptors.
X
X		- Hard links with long names to files with long names do not
X		  work. This bug seems to be fixed with newer 1.13 releases.
X
X		- GNU-tar cannot read Posix compliant tar archives with 
X		  long file names if the filename prefix it at least
X		  138 characters. GNU-tar will think that it found an extended
X		  sparse GNU tar archive and gets out of sync for the rest of
X		  the archive.
X		  See --sparse design bug description below.
X		  This bug seems to be partially fixed with newer 1.13 releases
X		  Even GNU-tar-1.13.19 does not seem to evaluate USTAR magic
X		  and version to distinguish between a POSIX tar archive and a
X		  non-standard GNU-tar archive.
X
X		- GNU-tar even has a not yet identified bug which causes GNUtar
X		  not to be able to partially read star archives if these
X		  archives are not created with star -Hustar
X		  May be this is caused by aspects of the topic above.
X
X		- Option --sparse produces archives which cannot be read by any
X		  other tar implementation known to me (except star), because
X		  they will get "out of sync".
X		  Posix 1003.1 conforming tar archives let gnutar get
X		  "out of sync" even if the --portability option is used (see
X		  above). This is a severe design bug in GNU-tar.
X
X			Description:
X			The size field in a tar archive cannot reflect the
X			real size of a sparse file to have compatibility to 
X			other implementations (this is also true for "star" 
X			archives but star archives use a value in the size 
X			field that is understood by other tar implementations).
X
X			If the "sparse" file contains more than 4 holes,
X			the "size" field in the GNU-tar control block does not
X			reflect the total size of the (shrunk) sparse file in
X			the archive because it does not count the 'sparse'
X			extension headers. Posix compliant archives that use
X			the name prefix field with more than 137 characters
X			will have a value != 0 on a field that that makes
X			gnutar believe that such an extension header is
X			present - GNU-tar will get out of sync.
X
X			Note: The general rule for any tar is that it should
X			be able to read any "tar" compliant data stream with
X			the exception that enhancements to the standard
X			only will fail on the files that contain the extension.
X			Those files should be extracted as if they were 
X			regular files.
X
X		- When GNU-tar writes archives it is not able to write long
X		  filenames correctly according to POSIX.1-1988 or to 
X		  POSIX.1-2001. As GNU-tar uses a non-standard extension to 
X		  handle filenames > 100 chars, GNU-tar is a frequent problem 
X		  of the portability of archives. Is is not uncommon that the
X		  length of filenames exceeds 100 chars, while > 99% of the 
X		  long filenames do not exceed ~ 230 chars. So most of the 
X		  long filenames may be handled by the POSIX.1-1988 method 
X		  which has been first documented in the 1987 draft of the 
X		  POSIX.1 standard. I strongly recommend not to use GNU-tar 
X		  to create archives for source exchange for this reason.
X
X		It is bad to see that now (in 2001), 11 years after the 
X		POSIX.1-1988 standard has become accepted, GNU-tar still does
X		not conform to this POSIX standard. Even worse: the first 
X		draft of the POSIX.1-1988 standard that did not deviate from 
X		the final in important things, appeared in autumn 1987. This 
X		is about the first time when PD-tar which was the base for
X		GNU-tar appeared. PD-tar (in 1987) _did_ follow the POSIX.1 
X		standard with one single exception: it did not implement long 
X		filenames (filenames > 100 chars) at all. The non-standard GNU 
X		method of handling long filenames has been introduced in 1989 
X		by people from FSF. At this time, GNU-tar did not yet use the 
X		POSIX.1 filename prefix for other non-POSIX purposes, so there
X		is no excuse for the non-standard way that FSF went. Don't 
X		believe the false GNU-tar history from FSF. I send a correct 
X		GNU-tar history to FSF in 1994, FSF still has to correct their 
X		false claims about GNU-tar history.
X
X		See also http://www.geocrawler.com/archives/3/92/1997/2/0/2217471/
X		as a proof that a previous GNU tar maintainer did admit the
X		wrong design done by FSF members in the past.
X
X		Summary: The main problem with GNU-tar, when it is reading TAR
X		archives, is that assumes all tar archives to be non-standard
X		GNU-tar archives. It does not implement a TAR format detection
X		based on the actual header format (as found in star) in total. 
X		Instead, it seems to have peep-hole based decisions on how to
X		interpret parts of the TAR haeder. This can never work 
X		correctly.
X
X		Note: I do not recommend GNU tar as an exchange format.
X		      Use star -Hustar for maximum portability instead.
X		      If you like to write archives compliant to POSIX-1.2001
X		      use star -Hexustar to create archives with extended POSIX
X		      headers.
X
X	5)	gnucpio
X
X		- Splits long filenames at the leftmost '/' instead of the 
X		  rightmost position of '/' required by my copy of the 
X		  Posix standard.
X
X		- The docs claim compatibility with gnutar.
X		  But extraction of gnutar archives containing 'atime' gives 
X		  funny filenames! (try this ...)
X
X		- Octal numbers are left padded with ' ' instead of '0'.
X		  The mode field contains more than the lower 12 bits from 
X		  stat.st_mode.
X		
END-of-star-1.5.2/star/README.otherbugs
echo x - star-1.5.2/star/README.pattern
sed 's/^X//' >star-1.5.2/star/README.pattern << 'END-of-star-1.5.2/star/README.pattern'
XStar includes a pattern matcher based on the algorithm
Xpresented by Martin Richards in:
X
X"A Compact Function for Regular Expression Pattern Matching", 
XSoftware-Practice and Experience, Vol. 9, 527-534 (1979)
X
XSeveral changes have been made to the original source which has been
Xwritten in BCPL:
X
X'/'	is replaced by	'!'		(to allow UNIX filenames)
X'(',')' are replaced by	'{', '}'
X'\''	is replaced by	'\\'		(UNIX compatible quote)
X
XCharacter classes have been added to allow "[<character list>]"
Xto be used.
XStart of line '^' and end of line '$' have been added.
X
XA description is available in the man page for the match program.
XIt may be found in man/man1/match.1
END-of-star-1.5.2/star/README.pattern
echo x - star-1.5.2/star/README.posix-2001
sed 's/^X//' >star-1.5.2/star/README.posix-2001 << 'END-of-star-1.5.2/star/README.posix-2001'
XHints for using extended POSIX.1-2001 headers:
X
X	Star will understand extended headers if the archive format
X	is from 'star', 'ustar', 'pax', 'xustar', 'exustar'.
X	In addition, star will understand the POSIX-look-alike
X	extended headers from Sun's tar (Solaris) if 'suntar' is selected
X	or autodetected.
X
X	Star will create extended POSIX headers when the archive format
X	is 'pax', 'xustar' or 'exustar'. When the archive format is
X	'exustar', every file will get an extended header which holds
X	at least atime/ctime/mtime in sub-second resolution.
X	If the archive format is 'pax' or 'xustar', star will create
X	the extended header only if there is a need for the extended header
X	because one or more of the fields do not fit into the standard ustar
X	header.
X
X	Star supports the following fields in the extended header:
X
X	times: "atime"  "ctime"  "mtime"	(create/extract)
X
X	id's (numeric): "uid", "gid"		(create/extract)
X
X	id's (names): "uname", "gname"		(extract only)
X
X	pathnames: "path" "linkpath"		(create/extract)
X
X	filesize: "size"			(create/extract)
X 
X	Additional: "charset", "comment"	(extract only - ignored)
X
X	Vendor unique:
X	"SCHILY.devmajor" "SCHILY.devminor"	(create/extract)
X
X	In -dump mode (a preparation for incremental dumps) star archives:
X
X	"SCHILY.dev"		The field stat.st_dev	- the filesys indicator
X	"SCHILY.ino"		The field stat.st_ino	- the file ID #
X	"SCHILY.nlink"		The field stat.st_nlink	- the hard link count
X	"SCHILY.filetype"	The real file type 	- this allows e.g.
X							  socket/door
X
X	These fields will in future allow star to archive and extract all
X	information that is needed for incremental dumps.
X
X	Star now includes ALL file metadata that is available. This allows a
X	complete restauration of all file properties and a diff mode that
X	checks for diffs in all file properties.
X
X	Sun compatibility:
X	"SUN.devmajor"  "SUN.devminor"		(extract only)
X
X	With -Hsuntar:
X	"SUN.devmajor"  "SUN.devminor"		(create/extract)
X
X	TODO List for extended headers:
X
X	-	Add better UNICODE support
X
X	-	Add some way of handling UID/GID Overflow in the
X		traditional 7 char fields which limit to 2097151.
X
X	-	Add support for sparse files and continuation Files
X		into the extended header stuff (as Vendor UNIQUE extensions
X		with 'SCHILY.*' name).
X
X	How to use extended POSIX.1-2001 headers:
X
X	-	To emmit xhdr's only if really needed, use 'star -Hpax'
X		or 'star -Hxustar'. In this case extended headers will be
X		created if the path/linkname will not fit into the 'ustar'
X		header or if the filesize is > 8 GB or uid/gid will not fit
X		07777777.
X
X	-	To emmit xhdr's always, use 'star -Hexustar' and even when
X		no other extended attribute is needed atime/mtime/ctime are
X		written in sub-second resolution.
X
X	-	To write extended headers similar to POSIX.1-2001 as used by
X		the Solaris tar, use 'star -Hsuntar' and every file will at
X		least get a sub-second resolution mtime. Note that Sun's main
X		intention was to handle very long filenames and big uid/gid's.
END-of-star-1.5.2/star/README.posix-2001
echo x - star-1.5.2/star/README.dgux
sed 's/^X//' >star-1.5.2/star/README.dgux << 'END-of-star-1.5.2/star/README.dgux'
XIf you are running DG/UX, you may want to do some experiments
Xwith unbuffered filereads.
XThis will in general only work in single user mode because
Xfiles that are already open may not be opened unbuffered,
Xbut may give up to 50% more throughput.
X
XThe diffs are in the file:
X
Xstar/create.dgux.patch
X
Xand should be applied to the file star/create.c
END-of-star-1.5.2/star/README.dgux
echo x - star-1.5.2/star/README.pax
sed 's/^X//' >star-1.5.2/star/README.pax << 'END-of-star-1.5.2/star/README.pax'
XThe new command 'spax' implements a POSIX.1 pax style command line interface
Xon top of star. The command is basically SUSv2/UNIX-98 
X
XThe following extensions from SVSv3 / POSIX.1-2001 are implemented:
X
X-	The options -H and -L
X
X-	Support for the PSOX.1-2001 extended TAR header format
X	called 'pax'. This makes 'spax' the first pax like command that
X	supports this infinitely extensible and highly portable archive
X	format.
X
XThe following limitations currently apply:
X
X-	No support for the -l option (create hard links if possible
X	in copy mode).
X
X-	The privileges option -pa is ignored
X
X-	The privileges option -pm will not only not set the mtime
X	but also not set the atime in extract and copy mode.
X
X-	without  -po SUID/SGID permission bits are not masked off.
X
X-	Pattern matching for command line type args is not yet POSIX/PAX
X	compliant. It should emulate the shell's way of matching file names
X	where '/' is not part of the pattern and each path name component
X	needs to match separately, but it treats a filename like an unstructured
X	piece of text.
X
XAlthough there are several limitations, spax should be POSIX compliant enough
Xfor the everyday work.
X
XRationale: spax only implements a limited set of options to grant best POSIX
Xcompliance. Anything you can do with spax may also be done with star. To be able
Xto do this, a new set of options has been added to star for this reason.
X
X/*--------------------------------------------------------------------------*/
X
XThe following non POSIX related CPIO limitations currently apply:
X
X-	The checksum with the -Hcrc format is not evaluated in extract mode.
X
X-	Reading the binary cpio format is not yet fully supported.
X	This format suffers from design related byte order problems.
X	Star thus is unable to auto-detect the byte order status in
X	all cases. Auto-detection should work if the string lenght
X	if the first filename is odd.
X
X-	Append & Update (star -r & star -u) does not yet work for
X	CPIO archives.
X
X
XThese CPIO limitations would be of interest if we would create a 'cpio'
Xcommand line program from the star sources.
END-of-star-1.5.2/star/README.pax
echo x - star-1.5.2/star/STARvsGNUTAR
sed 's/^X//' >star-1.5.2/star/STARvsGNUTAR << 'END-of-star-1.5.2/star/STARvsGNUTAR'
XPeople often tell me that star is hard to use, because it is so different from 
XGnu tar. In order to allow an unbiased discussion, I prepared this comparison. 
XIt contains some hints for people (currently using Gnu tar) who like to like to 
Xswitch to 'star'. In addition, there is a list of features missing in Gnu tar
Xand a smaller list of features missing in star. A list of incompatible options
Xfound in Gnu tar helps to find out which options from Gnu tar should be avoided.
XAs I am not sure whether I will have the time to keep it in sync with future 
Xchanges, it is valid for May 2007.
X
XFirst some background notes. Star is several years older than Gnu tar and most
Xof the options that have different meanings in gnu tar have been in use with
Xstar since 1985. This is about two years before the first versions of Gnu tar
X(called PD tar or SUG tar in 1987) have been published. Do not expect that the
Xmeaning of those options will be changed in star in the future.
X
XStar tries to be as compatible as possible with the BSD tar implementation
Xfrom 1982 and with the POSIX standard. Of course, it implements a lot of
Xenhancements. Gnu tar in former times (in 1987 when being called
XPD tar / SUG tar) has been compatible to the BSD tar implementation but this
Xchanged in 1989 when FSF adopted the program as Gnu tar. Gnu tar is not
Xvery POSIX compliant. The command line options from Gnu tar do not follow
Xthe SUSv2 (UNIX-98) and the archive format does not follow POSIX.1-1988.
XAlthough these problems have been reported to the GNU tar maintainers 
Xin 1993 and 1994, nothing did happen for years. Since a few months, GNU tar
Xis able to create and read POSIX.1-1988 compliant tar archives if called
Xwith a special option. By default, it still does not create POSIX compliant
Xarchives by default.
X
XIf you know the standard and thus know where Gnu tar is not standard compliant,
Xit is easy to switch between Gnu tar and star. If you only use the basic
Xfunctionality, everything should be exactly the same. If you don't know the 
Xstandard and only know Gnu tar you may get into some problems but this is
Xreally a Gnu tar problem.
X
XNow let us compare functionality and options. Star has a lot of functions
Xthat are usually invisible to the user but make the daily use much easier:
X
X-	A built in find(1) allows star to execute "find" like expressions
X	in create, extract and list mode. This allows to do a lot of
X	interesting things that could not be done if star and find would
X	be called separatedly 
X
X-	A FIFO allows to keeps the tape streaming. This gives you aster backups
X	than you can achieve with other tar implementations. Star is even 
X	at least 30% faster than ufsdump.
X
X-	Fast remote tape support is built into star.
X
X-	A powerful pattern matcher for a convenient user interface (see manual
X	page for more details) to archive/extract a subset of files.
X
X-	A sophisticated diff with a user tailorable interface for comparing
X	tar archives against file trees. This is one of the most interesting parts
X	of the star implementation.
X
X-	No namelength limitation is built into star. Pathnames up to PATH_MAX
X	may be archived. (The same limitation applies to linknames). This limit
X	may be expanded in future without changing the method to record
X	long names.
X
X-	deals with all 3 times, it stores/restores all 3 times of a file
X	(even creation time)
X	On Solaris, it may reset access time after doing the backup without
X	clobbering the ctime.
X
X-	Star does not clobber files by default. More recent copies on disk will
X	not be clobbered from tape. This may be the main advantage over other
X	tar implementations; it allows automatically repairing of corruptions
X	after a crash & fsck (Check for differences after doing this with the
X	diff option).
X
X-	Star does automatic byte swapping if needed. Star automatically detects
X	swapped archives and transparently reads them the right way.
X
X-	Star has automatic compression detection. In the recent case when star
X	is used to unpack compressed files containing tar archives, star will
X	transparently detect and call the right decompression program.
X
X-	Star has automatic archive format detection. Star automatically detects
X	several common archive formats and adopts to them. Supported archive
X	types are:
X
X		v7tar		Old UNIX V7 tar format
X		tar		Old BSD tar format
X		star		Old star format from 1985
X		gnutar		GNU tar format 1989 (violates POSIX)
X		ustar		Standard POSIX.1-1988 tar format
X		xstar		Extended standard tar (star 1994)
X		xustar		'xstar' format without tar signature
X		exustar		'xustar' format - always x-header
X		pax		Extended POSIX.1-2001 standard tar
X		suntar		Sun's extended pre-POSIX.1-2001
X		bin		cpio UNIX V7 binary format
X		cpio		cpio POSIX.1-1988 format
X		odc		cpio POSIX.1-1988 with SYSv compat
X		asc		SYSvr4 cpio ascii expanded device #
X		crc		'asc' format + CRC
X
X
X-	Star is fully ANSI/Posix 1003.1 compatible. See README.otherbugs for a
X	complete description of bugs found in other tar implementations.
X
X-	Support for the new POSIX.1-2001 extended tar format. This new tar 
X	format allows to archive many new things in a standard compliant way.
X	These things are currently are implemented in Gnu tar in a proprietary 
X	way and have in former times been implemented in a proprietary way in 
X	star. To give an example, the most interesting features that are now 
X	handled in a standard compliant way are filenames without name len 
X	limitation and file size without the old 8 GB tar limitation.
X	An interesting aspect of the new extended header format is that the
X	extended header format itself is extensible without limitation. Star
X	uses this extension format to archive Access Control Lists and file
X	flags from BSD-4.4 and Linux.
X
X-	Star includes highly efficiend and 100% correct support for sparse
X	files on Solaris-2.3...Solaris-2.5.1 and for Solaris 10 and newer.
X	Star asks the OS for the locations of holes in files, this may be up
X	to 1000 times faster than with trying to find zeroed blocks.
X
X-	Star supports to put all inode metadata on the archive. This allows
X	star to perform true incremental dumps.
X
X-	Star includes support for multi level true incremental dump and 
X	restore. GNU tar claims to support incrementals but first tests with
X	the scenarios created for star did show that GNU tar does not handle
X	renamed directories correctly. Also note that incremental dumps
X	made with GNU tar need a lot more tape space than those made with
X	star.
X
X	The archive format used with incremental backups in star is more
X	compact and more effective than the archive format used by Gnu tar.
X	While Gnu tar needs to archive the complete directory tree, if 
X	directory has been renamed, star will only archive empty renamed
X	directories.
X
X-	Sophisticated error control allows to tell star which error types 
X	should be ignored for wich file name pattern. This allows to write
X	backup scripts that give no error messages for all problems that are
X	tolerable (e.g. growing log files).
X
X-	Star implements 'ed' like pattern substitutuions. Star supports
X	automated pattern rule based file name substitution as documented 
X	for 'pax'.
X
X-	Fast built in -copy mode allows to make fast and accurate copies and
X	directory tree comparisons.
X
X
XComparing command line options from star and gnutar is a more complex task:
X
X-	Star has 157 base Options
X
X-	Gnu tar has 70 base Options
X
X-	Star has    94 Options that are missing in Gnu tar
X
X-	Gnu tar has 13 Options that are missing in star
X
X	-	6 of the Gnu tar options are not needed or do not make sense to implement
X	-	2 of the Gnu tar options are considered to be of low importance
X	-	3 of the Gnu tar options are nice to have
X	-	2 of the missing options are needed and important
X
XOnly one of the Gnu tar options may be knock off criteria: the
X"ignore failed reads") but it may not work correctly in Gnu tar.
X
X/*--------------------------------------------------------------------------*/
XAs a hint for readers to the star manual page, star uses getargs() to parse
Xthe command line. Getargs() is much more flexible than getopt() and is even
Xolder than getopt(). Getargs() implements the following features:
X
X-	All single char boolean options and all single char increment type
X	options may be combined into a single string starting with a single
X	dash (-).
X
X-	getargs() has a compatibility mode for GNU programs and allows to
X	preceede long options with a double dash (--) instead of the usual
X	single dash (-).
X
X-	All options that take an argument are listed in the man page for
X	better readability of the manual as:
X	
X		option=arg
X
X	but the following variants may appear in the actual command line:
X
X		option=arg
X		option= arg
X		-option=arg
X		-option= arg
X		-optionarg
X		-option arg
X
X-	A separate double dash (--) may preceede any argument that looks like
X	an option and specifies that the immediately following argument is
X	a file type argument.
X
X/*--------------------------------------------------------------------------*/
X
XSTAR Option	Description							Gnu tar equiv.	Remarks
X===========	===========							=============	===================
X
XCmds:
X
X-c/-u/-r	create/update/replace named files to tape			-c/-u/-r	identical
X-x/-t		extract/list  named files from tape				-x/-t		identical
X-n		trace named files from tape					--missing--
X-copy		copy named files to destination directory			--missing--
X-diff		diff archive against file system (see -xhelp)			--diff		Gnu --diff is not as useful
X												as star's -diff
X
XOptions:
X
X-help		print this help							--help		close to identical
X-xhelp		print extended help						see above
X-version									--version	close to identical
X-debug										--missing--
X-silent		no not print informational messages				--missing--
Xblocks=#,b=#	set blocking factor to #x512 Bytes (default 20)			-b		close to identical
Xfile=nm,f=nm	use 'nm' as tape instead of stdin/stdout			-f		close to identical
X-T		use $TAPE as tape instead of stdin/stdout			--missing--
X-[0-7]		Select an alternative tape drive				-[0-7][lmh]	close to identical
X-fifo/-no-fifo	use/don't use a fifo to optimize data flow from/to tape		--missing--
X-shm		use SysV shared memory for fifo					--missing--
X-v		be verbose							-v		identical
X-block-number	print the block numbers where the TAR headers start		--block-number	Not working in Gnu tar!
X-tpath		use with -t to list path names only				--missing--
XH=header	generate 'header' type archive (see H=help)			--missing--
Xartype=header	generate 'header' type archive (see H=help)			    "
X-print-artype	check and print archive and compression type on one line and exit. --missing--
XC=dir		perform a chdir to 'dir' before storing next file		-C		identical
X-bsdchdir	do BSD style C= (only related to the next file type arg)	--missing--
X-find		Option separator: Use find command line to the right.		--missing--
X-Z		pipe input/output through compress, does not work on tapes	
X-z		pipe input/output through gzip, does not work on tapes		-z		identical
X-bz,-j		pipe input/output through bzip2, does not work on tapes		-j		identical
X-lzo		pipe input/output through lzop, does not work on tapes		--missing--
X-7z		pipe input/output through p7zip, does not work on tapes		--missing--
Xcompress-program=name pipe input/output through program 'name', does not work on tapes	--use-compress-program=PROG
X-B		perform multiple reads (needed on pipes)			-B		identical
X-i		ignore checksum errors						-i		similar
X-d		do not store/create directories					--missing--
X-m		do not restore access and modification time			-m		identical
X-o,-nochown	do not restore owner and group					--no-same-owner	similar
X-pax-p string	use PAX like privileges set up					--missing--
X-a,-atime	reset access time after storing file				--atime-preserve partial!!!
X-p		restore filemodes of directories				-p		similar ?
X-no-p		do not restore file permissions					--missing--
X-l		do not print a message if not all links are dumped		--missing--
X-link-dirs	look for hard linked directories in create mode			--missing--
X-dump		experimental option for incremental dumps (more ino metadata)	--missing--
X-meta		experimental option to use inode metadata only			--missing--
X-h,-L		follow symbolic links as if they were files			-h		identical
X-pax-L		follow symbolic links as if they were files (PAX style)		--missing--
X-pax-H		follow cmdline symbolic links as if they were files (PAX style)	--missing--
X-D		do not descend directories					--no-recursion	identical
X-M		do not descend mounting points					-l		GNU -l violates POSIX
X-w		do interactive creation/extraction/renaming			-w		partial
X-pax-i		do interactive creation/extraction/renaming (PAX style)		--missing--
X-O		be compatible to old tar (except for checksum bug)		-o		GNU -o violates POSIX
X-P		last record may be partial (useful on cartridge tapes)		--missing--
X-S		do not store/create special files				--missing--
X-F,-FF,-FFF,...	do not store/create SCCS/RCS, core and object files		--missing--
X-U		restore files unconditionally					--missing--
Xdiffopts=optlst	comma separated list of diffopts (see diffopts=help)		--missing--
Xxdebug=#,xd=#	set extended debug level					--missing--
X-pax-ls		print a PAX type file listing					--missing--
X-lowmem		try to use less memory for operation				--missing--
X-not,-V		use those files which do not match pattern			--missing--
X-pax-match	use PAX like pattern matching					--missing--
X-pax-n		only one match per pattern allowed				--missing--
X-notarg,-pax-c	use those files which do not match file type pattern		--missing--
XVOLHDR=name	use name to generate a volume header				-V name		similar
X-xdir		extract dir even if the current is never			--missing--
X-xdot		extract first '.' or './' dir even if the current is never	--missing--
X-dirmode	write directories after the files they contain			--missing--
X-restore	restore incremental dumps					--missing--
X-force-restore	force to restore partial incremental dumps			--missing--
X-no-xheader	do not read or write extended headers regardless of format	--missing--
X-dupmeta	use inode metadata in dump mode if only ctime is newer		--missing--
X-keep-old-files,-k	keep existing files					-k		similar
X-refresh-old-files	refresh existing files, don't create new files		--overwrite	????
X-refresh									--overwrite	????
X-/		don't strip leading '/'s from file names			-P		similar
X-..		don't skip filenames that contain '..' in non-interactive extract	--missing--
X-secure-links	don't extract links that start with '/' or contain '..'		--missing--
X-no-dirslash	don't append a slash to directory names				--missing--
Xlist=name	read filenames from named file					-I --files-from=NAME	similar
Xpkglist=name	read filenames from named file (unstable interface for sps)	--missing--
X-read0		read null terminated filenames with list=			-null
X-data-change-warn treat data/size changes in create more as warning only	--missing--
X-e		abort on all error conditions undefined by errctl=		--missing--
Xerrctl=name	read error contrl definitions from named file			--missing--
X-dodesc		do descend directories found in a list= file			--missing--
Xpattern=p,pat=p	set matching pattern						PATTERN		not as mighty as star
X-match-tree	do not scan the content of non matching dirs in create mode	--missing--
Xs=replstr	Apply ed like pattern substitution -s /old/new/gp on filenames	--missing--
Xlevel=dumplevel	set current incremental dump level				--missing--
X-cumulative	make a cumulative incremental dump (relative to same level)	--missing--
Xtardumps=name	set file name for tar dump dates, default is /etc/tardumps	--missing--
X-wtardumps	update file for tar dump dates if in dump mode			--missing--
Xdumpdate=name	use timestamp from name instead of current time for /etc/tardumps	--missing--
Xfs-name=name	use name instead of mount point for /etc/tardumps		--missing--
Xmaxsize=#	do not store file if it is bigger than # kBytes			--missing--
Xnewer=name	store only files which are newer than 'name'			--never=DATE	no find compat with GNUtar!
X-multivol	read/write/list a multi volume archive				--multi-volume
Xnew-volume-script=script	call 'scipt' at end of each volume		--new-volume-script=script identical
X-ctime		use ctime for newer= option					--newer-mtime	invers idea to star
X-nodump		do not dump files that have the nodump flag set			--missing--
X-acl		handle access control list					--missing--
X-xattr		handle extended file attributes					--missing--
X-xattr-linux	handle extended file attributes (Linux variant)			--missing--
X-xfflags	handle extended file flags					--missing--
X-prinodes	if archive contains inode number, print them in list mode	--missing--
Xbs=#		set (output) block size to #					-b		de-facto missing
Xfs=#		set fifo size to #						--missing--
Xtsize=#		set tape volume size to # 512 byte blocks			-L		x 1024 bytes
X-qic24		set tape volume size to 61440 kBytes				--missing--
X-qic120		set tape volume size to 128000 kBytes				--missing--
X-qic150		set tape volume size to 153600 kBytes				--missing--
X-qic250		set tape volume size to 256000 kBytes				--missing--
X-qic525		set tape volume size to 512500 kBytes				--missing--
X-no-fsync	do not call fsync() for each extracted file (may be dangerous)	--missing--
X-nowarn		do not print warning messages					--missing--
X-time		print timing info						--totals	only partially
X-no-statistics	do not print statistics						--missing--	always
X-fifostats	print fifo statistics						--missing--
X-numeric	don't use user/group name from tape				--numeric-owner	identical
X-newest		find newest file on tape					--missing--
X-newest-file	find newest regular file on tape				--missing--
X-hpdev		use HP's non POSIX compliant method to store dev numbers	--missing--
X-modebits	include all 16 bits from stat.st_mode (violates POSIX-1003.1)	--missing--
X-copylinks	Copy hard and symlinks rather than linking			--missing--
X-copyhardlinks	Copy hardlink source files rather than linking			--missing--
X-copysymlinks	Copy symlink source files rather than linking			--missing--
X-copydlinks	Copy the content of linked dirs					--missing--
X-hardlinks	Extract symlinks as hardlinks					--missing--
X-symlinks	Extract hardlinks as symlinks					--missing--
X-signed-checksum	use signed chars to calculate checksum			--missing--
X-sparse		handle file with holes effectively on store/create		-S --sparse	similar
X-force-hole	try to extract all files with holes				--missing--
X-to-stdout	extract files to stdout						-O --to-stdout
X-wready		wait for tape drive to become ready				--missing--
X-force-remove	force to remove non writable files on extraction		--missing--
X-ask-remove	ask to remove non writable files on extraction			--missing--
X-remove-first	remove files before extraction					--unlink-first
X-remove-recursive	remove files recursive					--recursive-unlink
Xdir-owner=user	Intermediate created directories will be owned by 'user'.	--missing--
Xdir-group=user	Intermediate created directories will be owned by 'group'.	--missing--
Xumask=mask	Set star's umask to 'mask'.					--missing--
X-onull,-nullout	simulate creating an achive to compute the size			-f/dev/null	in GNUtar worse than star (cannot do performance tests)
X
X/*--------------------------------------------------------------------------*/
XGnu tar options that (in the single char variant) are incompatible:
X
XBsS	-F, --info-script=FILE		run script at end of each tape (implies -M)
Xs	-L, --tape-length=NUM		change tape after writing NUM x 1024 bytes
Xs	-M, --multi-volume		create/list/extract multi-volume archive
Xs	-O, --to-stdout			extract files to standard output
XsS (+)	-P, --absolute-names		don't strip leading `/'s from file names
Xs	-S, --sparse			handle sparse files efficiently
Xs	-T, -I, --files-from=NAME	get names to extract or create from file NAME
Xs	-U, --unlink-first		remove each file prior to extracting over it
Xs	-V, --label=NAME		create archive with volume name NAME
Xs	-d, --diff, --compare		find differences between archive and file system
XsP	-l, --one-file-system		stay in local file system when creating archive
XsP	-o, --old-archive, --portability write a V7 format archive
X
XB	Incompatible with BSD tar
Xs	Incompatible with star
XS	Incompatible with Sun's/SVr4 tar
XP	Incompatible with POSIX
X
X+)	This option is the only option where star deviates from other tar 
X	implementations, but as there is no other nice way to have an option to 
X	specify that the last record should be partial and the star option -/ 
X	is easy to remember as well as -P for Partial record is I see no need 
X	to change star.
X
X/*--------------------------------------------------------------------------*/
XOptions only found in GNUtar:
X
XGNUtar option		GNUtar description					Star remarks
X====================	==================================================	=======================================
XMain operation mode:
X  -A, --catenate          append tar files to an archive			low importance
X      --delete            delete from the archive (not on mag tapes!)		low importance
X
XOperation modifiers:
X  -W, --verify               attempt to verify the archive after writing it	not needed (may be implemented via rewind
X										and -diff in star)
X
X      --remove-files         remove files after adding them to the archive	not needed
X
X      --ignore-failed-read   do not exit with nonzero on unreadable files	--needed-- and important
X
XHandling of file attributes:
X      --owner=NAME             force NAME as owner for added files		use star -find -chown name
X      --group=NAME             force NAME as group for added files		use star -find -chgrp name
X      --mode=CHANGES           force (symbolic) mode CHANGES for added files	use star -find -chmod mode
X      --no-same-owner          extract files as yourself			not needed
X  -s, --same-order             sort names to extract to match archive		????
X
X
XDevice selection and switching:
X      --volno-file=FILE          use/update the volume number in FILE		--needed-- and important
X
XLocal file selection:
X  -X, --exclude-from=FILE      exclude globbing patterns listed in FILE		--nice to have--
X  -K, --starting-file=NAME     begin at file NAME in the archive		--nice to have--
X      --backup[=CONTROL]       backup before removal, choose version control	not needed
X      --suffix=SUFFIX          backup before removal, override usual suffix	not needed
X
XInformative output:
X      --checkpoint      print directory names while reading the archive		--nice to have--
X
END-of-star-1.5.2/star/STARvsGNUTAR
echo x - star-1.5.2/star/Racl.mk
sed 's/^X//' >star-1.5.2/star/Racl.mk << 'END-of-star-1.5.2/star/Racl.mk'
X#ident @(#)Racl.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.ACL
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Racl.mk
echo x - star-1.5.2/star/Rcrash.mk
sed 's/^X//' >star-1.5.2/star/Rcrash.mk << 'END-of-star-1.5.2/star/Rcrash.mk'
X#ident @(#)Rcrash.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.crash
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Rcrash.mk
echo x - star-1.5.2/star/Rlargefiles.mk
sed 's/^X//' >star-1.5.2/star/Rlargefiles.mk << 'END-of-star-1.5.2/star/Rlargefiles.mk'
X#ident @(#)Rlargefiles.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.largefiles
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Rlargefiles.mk
echo x - star-1.5.2/star/Rmtio.mk
sed 's/^X//' >star-1.5.2/star/Rmtio.mk << 'END-of-star-1.5.2/star/Rmtio.mk'
X#ident @(#)Rmtio.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.mtio
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Rmtio.mk
echo x - star-1.5.2/star/Rotherbugs.mk
sed 's/^X//' >star-1.5.2/star/Rotherbugs.mk << 'END-of-star-1.5.2/star/Rotherbugs.mk'
X#ident @(#)Rotherbugs.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.otherbugs
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Rotherbugs.mk
echo x - star-1.5.2/star/Rpattern.mk
sed 's/^X//' >star-1.5.2/star/Rpattern.mk << 'END-of-star-1.5.2/star/Rpattern.mk'
X#ident @(#)Rpattern.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.pattern
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Rpattern.mk
echo x - star-1.5.2/star/Rposix.mk
sed 's/^X//' >star-1.5.2/star/Rposix.mk << 'END-of-star-1.5.2/star/Rposix.mk'
X#ident @(#)Rposix.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README.posix-2001
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/Rposix.mk
echo x - star-1.5.2/star/readme.mk
sed 's/^X//' >star-1.5.2/star/readme.mk << 'END-of-star-1.5.2/star/readme.mk'
X#ident @(#)readme.mk	1.1 07/06/15 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		README
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/readme.mk
echo x - star-1.5.2/star/starvsgnutar.mk
sed 's/^X//' >star-1.5.2/star/starvsgnutar.mk << 'END-of-star-1.5.2/star/starvsgnutar.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/star
XTARGET=		STARvsGNUTAR
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/starvsgnutar.mk
echo c - star-1.5.2/star/testscripts
mkdir -p star-1.5.2/star/testscripts > /dev/null 2>&1
echo x - star-1.5.2/star/testscripts/00INDEX
sed 's/^X//' >star-1.5.2/star/testscripts/00INDEX << 'END-of-star-1.5.2/star/testscripts/00INDEX'
XA recent version of the files is always on:
X
X	ftp://ftp.berlios.de/pub/star/testscripts/
X
X100char_longlink.tar		A tar archive containing a file with exactly 100 char and a link to it
XREADME.gtarfail			A description for the files 'gtarfail.tar' and 'gtarfail2.tar'
XREADME.longnames		A description for the files 'long.ustar.gz' 'mk' 'mk2'
XREADME.paxbug			A description for the file 'not_a_tar_file'
Xgtarfail.tar			A POSIX.1-1990 tar file that causes GNU tar to fail
Xgtarfail2.tar			A POSIX.1-1990 tar file that causes GNU tar to fail
Xlong.ustar.gz			A 100% POSIX.1-1990 compliant tar file with lone file names
Xmk				Shell script. Use as described in README.longnames
Xmk2				Shell script. Use as described in README.longnames
Xnot_a_tar_file			A funny text file that most PAX implementations treat as tar archive
Xtypescript			Typescript to demonstrate a GNU tar bug
Xustar-all-filetytes.tar		A 100% POSIX.1-1990 compliant tar file with all file types
Xustar-bad-filetypes.tar		A POSIX.1-1990 tar with one corect file followed by 4 bad files
Xustar-big-2g.tar.bz2		A 100% POSIX.1-1990 compliant tar file with a file 2GB-1 followed by a file
Xustar-big-8g.tar.bz2		A 100% POSIX.1-1990 compliant tar file with a file 8GB-1 followed by a file
Xzwicky/				Subdirectory containing the Backup testsuit from Elizabeth Zwicky
END-of-star-1.5.2/star/testscripts/00INDEX
echo x - star-1.5.2/star/testscripts/100char_longlink.tar
sed 's/^X//' >star-1.5.2/star/testscripts/100char_longlink.tar << 'END-of-star-1.5.2/star/testscripts/100char_longlink.tar'
END-of-star-1.5.2/star/testscripts/100char_longlink.tar
echo x - star-1.5.2/star/testscripts/100char_longlink.tar-non-compliant
sed 's/^X//' >star-1.5.2/star/testscripts/100char_longlink.tar-non-compliant << 'END-of-star-1.5.2/star/testscripts/100char_longlink.tar-non-compliant'
END-of-star-1.5.2/star/testscripts/100char_longlink.tar-non-compliant
echo x - star-1.5.2/star/testscripts/README.gtarfail
sed 's/^X//' >star-1.5.2/star/testscripts/README.gtarfail << 'END-of-star-1.5.2/star/testscripts/README.gtarfail'
XThe file gtarfail.tar is a POSIX compliant tar file that is
Xnot accepted by GNU tar.
X
XHere is a star listing of the tar archive:
X
X    518 -rw-r--r-- jes/glone May 25 16:41 2001 vedpowered.gif
X   6825 -rw-r--r-- jes/glone Apr 29 02:19 1997 cd.gif
X  33354 -rw-r--r-- jes/glone Jun 22 14:17 1999 DSCN0049c.JPG
X
X
XHere is how Sun's tar program lists the archive:
X
X-rw-r--r-- 486/1060    518 Mai 25 16:41 2001 vedpowered.gif
X-rw-r--r-- 486/1060   6825 Apr 29 02:19 1997 cd.gif
X-rw-r--r-- 486/1060  33354 Jun 22 14:17 1999 DSCN0049c.JPG
X
X
XAnd this is how GNU tar-1.13.25 lists is:
X
X-rw-r--r-- jes/glone       518 2001-05-25 16:41:06 vedpowered.gif
Xgtar: Skipping to next header
X-rw-r--r-- jes/glone     33354 1999-06-22 14:17:38 DSCN0049c.JPG
Xgtar: Error exit delayed from previous errors
X
X
X/*--------------------------------------------------------------------------*/
XNext try: gtar-1.13.25 and file gtarfail2.tar
X
X
XA star lising of the archive:
X
X    214 -rwxr-xr-x jes/glone Sep 21 16:08 2001 .clean
X      0 lrwxrwxrwx jes/cats May  7 14:39 1998 RULES -> makefiles/RULES
X      0 drwxr-sr-x jes/glone Dec 10 01:00 2001 build/
X      0 drwxr-sr-x jes/glone Nov  9 19:20 2001 build/psmake/
X    259 -rwxr-xr-x jes/glone Jan  9 17:36 2000 build/psmake/MAKE
X   4820 -rwxr-xr-x jes/glone Feb 25 23:45 2001 build/psmake/MAKE.sh
X    647 -rw-r--r-- jes/glone Feb 26 00:50 2001 build/psmake/Makefile
X      0 lrwxrwxrwx jes/glone Aug 29 12:53 2001 build/psmake/archconf.c -> ../archconf.c
X      0 lrwxrwxrwx jes/glone Aug 29 12:54 2001 build/psmake/astoi.c -> ../../lib/astoi.c
Xstar: 31 blocks + 8192 bytes (total of 325632 bytes = 318.00k).
X
XA Sun tar listing of the archive:
X
X-rwxr-xr-x 486/1060    214 Sep 21 16:08 2001 .clean
Xlrwxrwxrwx 486/2000     15 Mai  7 14:39 1998 RULES symbolic link zu makefiles/RULES
Xdrwxr-sr-x 486/1060      0 Dez 10 01:00 2001 build/
Xdrwxr-sr-x 486/1060      0 Nov  9 19:20 2001 build/psmake/
X-rwxr-xr-x 486/1060    259 Jan  9 17:36 2000 build/psmake/MAKE
X-rwxr-xr-x 486/1060   4820 Feb 25 23:45 2001 build/psmake/MAKE.sh
X-rw-r--r-- 486/1060    647 Feb 26 00:50 2001 build/psmake/Makefile
Xlrwxrwxrwx 486/1060     13 Aug 29 12:53 2001 build/psmake/archconf.c symbolic link zu ../archconf.c
Xlrwxrwxrwx 486/1060     17 Aug 29 12:54 2001 build/psmake/astoi.c symbolic link zu ../../lib/astoi.c
X
XA gtar-1.13.25 listing of the archive:
X
X-rwxr-xr-x jes/glone       214 2001-09-21 16:08:36 .clean
Xdrwxr-sr-x jes/glone         0 2001-12-10 01:00:58 build/
X-rwxr-xr-x jes/glone       259 2000-01-09 17:36:34 build/psmake/MAKE
Xgtar: Skipping to next header
Xgtar: Archive contains obsolescent base-64 headers
X-rw-r--r-- jes/glone       647 2001-02-26 00:50:06 build/psmake/Makefile
Xgtar: Error exit delayed from previous errors
X
END-of-star-1.5.2/star/testscripts/README.gtarfail
echo x - star-1.5.2/star/testscripts/README.largefiles
sed 's/^X//' >star-1.5.2/star/testscripts/README.largefiles << 'END-of-star-1.5.2/star/testscripts/README.largefiles'
XNote that the test tar archives used for this conformance test are bzip2
Xcompressed. This has been done because it is the only widely available
Xcompression format that allows to compress several gigabytes of nulls
Xinto a few bytes.
X
XA recent version of the files is always on:
X
X	ftp://ftp.berlios.de/pub/star/testscripts/
X
X
XThe file 'ustar-big-2g.tar.bz2' contains a file with the largest size that
Xa historic tar implementation is able to understand.
X
Xstar tvf ustar-big-2g.tar.bz2 
Xstar: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
X2147483647 -rw-------  jes/glone Jun 15 16:53 2002 big
X         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
Xstar: 209715 blocks + 4096 bytes (total of 2147485696 bytes = 2097154.00k).
Xstar: Total time 104.572sec (20054 kBytes/sec)
X
X
XThe file 'ustar-big-8g.tar.bz2' contains a file with the largest size that
Xmay be used with the ustar (POSIX.1-1990 tar) format.
X
Xstar tvf ustar-big-8g.tar.bz2 
Xstar: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
X8589934591 -rw-------  jes/glone Jun 15 17:08 2002 8gb-1
X         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
Xstar: 838861 blocks + 0 bytes (total of 8589936640 bytes = 8388610.00k).
Xstar: Total time 405.927sec (20665 kBytes/sec)
X
XThe file 'pax-big-10g.tar.bz2' contains a file with size 1 GB.
XThis file may only be represented using the new POSIX.1-2001 extended tar
Xformat using extended headers. This extended archive format has been called
XPAX.
X
Xstar tvf pax-big-10g.tar.bz2 
Xstar: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
X10737418240 -rw-------  jes/glone Jun 15 23:18 2002 10g
X          0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
Xstar: 1048576 blocks + 3072 bytes (total of 10737421312 bytes = 10485763.00k).
Xstar: Total time 563.352sec (18613 kBytes/sec)
X
XOnly a POSIX.1-2001 conforming program will be able to read the archive
Xcorrectly. For now, June 2002 star seems to be the only POSIX.1-2001 conforming
XTAR program.
X
END-of-star-1.5.2/star/testscripts/README.largefiles
echo x - star-1.5.2/star/testscripts/README.longnames
sed 's/^X//' >star-1.5.2/star/testscripts/README.longnames << 'END-of-star-1.5.2/star/testscripts/README.longnames'
XThis are shell scripts to create long filenames.
XIf you like more tests, write me.
X
XA recent version of the files is always on:
X
X	ftp://ftp.berlios.de/pub/star/testscripts/
X
X
XThe file 'mk' creates file names that check the behaviour of
Xtar close to or at the POSIX filename length limit
X
Xrun ./mk to create the files.
X
X
XThe file 'mk2' creates files that are bejond the scope of POSIX tar
X
Xrun ./mk2 to create the files
X
XIn all cases to test the behaviour of tar you need to run:
X
Xtar cf filename _*
X 
Xto check the POSIX scope and
X 
Xtar cf filename *
X
Xto check against all possibilities.
X
XThe length of the filenames is computed in a way that will be wrong
Xif the filename is prepended by './'
X
XIn order to help to test and debug tar implementations that have not
Xbeen tested to be corect yet, I added a file long.ustar.gz
XThis file is a 100% POSIX compiliant tar archive of all files created
Xby ./mk that can be archived by a POSIX compliant tar implementation.
X
XTo test your tar implementation against 'star' which could be called a
XPOSIX reference implementation run:
X
Xgzip -d < long.ustar.gz | tar tvf -
X
XReplace tar by the name of the tar implementation that needs to be tested.
X
XIf you like to check which files are not handled correctly, get the 
Xlatest star from ftp://ftp.berlios.de/pub/star/alpha/
Xand after compilation run:
X
Xstar -tz < long.ustar.gz >L1
X
XThen run:
X
Xgzip -d < long.ustar.gz | yourtar tf - > L2
X
Xand finally:
X
Xdiff L1 L2
X
END-of-star-1.5.2/star/testscripts/README.longnames
echo x - star-1.5.2/star/testscripts/README.paxbug
sed 's/^X//' >star-1.5.2/star/testscripts/README.paxbug << 'END-of-star-1.5.2/star/testscripts/README.paxbug'
XPAX is computing the TAR checksum wrong. The standard says that
Xthe checksum needs to be computed over the whole 512 bytes of the
Xheader. PAX only computes the checksum for 500 bytes which is 
Xincorrect.
X
XA recent version of the files is always on:
X
X	ftp://ftp.berlios.de/pub/star/testscripts/
X
X
XTo verify the problem try:
X
X	pax -itv < not_a_tar_file
X
XAnd see what's happening.
X
XAny correct TAR implementation will correctly state that the checksum is
Xwrong and not try to interpret the data as TAR archive.
X
XTo understand what's happening, have a look into the file 'not_a_tar_file',
Xit is a plain text file.....
X
END-of-star-1.5.2/star/testscripts/README.paxbug
echo x - star-1.5.2/star/testscripts/README.quicktest
sed 's/^X//' >star-1.5.2/star/testscripts/README.quicktest << 'END-of-star-1.5.2/star/testscripts/README.quicktest'
XFor compliance tests with POSIX.1-1990 you need to test the output of 
Xyour favorite TAR implementation and you need to test whether the TAR 
Ximplementation does work as expected if it encounters tar archives that 
Xapproach limits of the POAIS.1-1990 TAR specification.
X
XA recent version of the files is always on:
X
X	ftp://ftp.berlios.de/pub/star/testscripts/
X
XHere comes a quick test that checks most important issues for archive exchange:
X
X1) Test for compliance with files that are a bit bigger than usual:
X
X	Note that the test tar archives used for this conformance test are 
X	bzip2 compressed. This has been done because it is the only widely 
X	available compression format that allows to compress several gigabytes of 
X	nulls into a few bytes.
X
X	*** File Read tests 2 Gigabytes - 1 Byte
X
X	The file 'ustar-big-2g.tar.bz2' contains a file with the largest size 
X	that a historic tar implementation is able to understand.
X
X	star tvf ustar-big-2g.tar.bz2 
X	star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
X	2147483647 -rw-------  jes/glone Jun 15 16:53 2002 big
X	         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
X	star: 209715 blocks + 4096 bytes (total of 2147485696 bytes = 2097154.00k).
X
X	Any tar implementation should work correctly with this archive and 
X	needs to list _both_ files without any error message if you call:
X
X	bzip2 -d < ustar-big-2g.tar.bz2 | your_tar tvf -
X
X	If any error message is printed or the second file is missing on your 
X	list, then your TAR implementation under test is broken.
X
X	*** File Read tests 8 Gigabytes - 1 Byte
X
X	The file 'ustar-big-8g.tar.bz2' contains a file with the largest size 
X	that may be used with the ustar (POSIX.1-1990 tar) format.
X
X	star tvf ustar-big-8g.tar.bz2 
X	star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
X	8589934591 -rw-------  jes/glone Jun 15 17:08 2002 8gb-1
X	         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
X	star: 838861 blocks + 0 bytes (total of 8589936640 bytes = 8388610.00k).
X
X	On non-large file aware platforms (such as AIX) this may fail.
X	But Linux-2.4 is large file aware. On a large file aware platform,
X	any tar implementation should work correctly with this archive and 
X	needs to list _both_ files without any error message if you call:
X
X	bzip2 -d < ustar-big-8g.tar.bz2 | your_tar tvf -
X
X	If any error message is printed or the second file is missing on your 
X	list, then your TAR implementation under test is broken.
X
X
X2) Test if your TAR implementation did unpack the archive correctly by using
X   star to diff against the archive. Run:
X
X	star -diff -v diffopts=!atime,ctime < /tmp/ustar-all-quicktest.tar
X
X   Make sure you use star-1.5a04 or later to do the diff.
X
X
X3) Testing whether your TAR implementation supports all file types and long file 
X   names correctly.
X	
X	The archive "ustar-all-quicktest.tar" contains:
X
X	-	A first part that contains correct and simple versions of all
X		supported file types: plain file, hard link, sym link, cdev,
X		bdev. directory, contiguous file.
X
X	-	The second part contains a file with one character that has the 
X		8th bit set in the file name. If your TAR implementation does
X		not compute checksums correctly, it will fail here.
X
X	-	The third part contains a file and a hard link which use
X		exactly 100 characters in the filename/linkname.
X
X	-	A fourth part that contains a file name that is 256 characters 
X		long. 155 characters are in the POSIX filename prefix and 100 
X		characters are in the POSIX filename suffix.
X		This part also contains a file with a file name of 256 
X		characters and a link name of 100 characters.
X
X	-	The fifth part contains a file with 256 characters in the name
X		but the usually unused field directly after the filename prefix 
X		contains junk characters. If the TAR under test does not handle 
X		file name prefix lengths of 155 chars correctly, the file name
X		that is extracted will contain the sequence "/abcde.hihi/" 
X		instead of just "/abcde/"
X
X	-	The sixth part contains a character special, a block special, a 
X		directory and a named pipe that have the "size" field != 0.
X		A TAR implementation that does not handle the "size" field as 
X		indicated by the POSIX standard will fail here.
X
X	-	The last part contains a file called END to indicate that 
X		everything went OK and that the last file in the archive is 
X		handled correctly.
X
X	NOTE: as some tar implementions seem to have problems with extracting
X	contiguous files, I also made a tar archive called:
X
X		ustar-all-quicktest.tar-without-cont-file
X
X
X	Performing the test for the things described above:
X
X	1)	Create an empty directory and do a "chdir" into that directory.
X		Copy the test archive ustar-all-quicktest.tar into the directory 
X		/tmp, copy the file quicktest.filelist into the /tmp directory 
X		too. 
X
X	2)	Become root and call:
X
X			your_tar xf /tmp/ustar-all-quicktest.tar
X
X		If your TAR allows to handle different archive types do _not_
X		tell your tar that this is a "ustar" archive. Let it find this 
X		itself.
X
X	3)	Create a new archive using your TAR implementation:
X
X		your_tar cf /tmp/new.tar ` cat /tmp/quicktest.filelist `
X
X		If you TAR implementation allows to handle different archive 
X		types add an option to force "ustar" archive creation. For 
X		"star" this is -Hustar, for "GNU tar" this is --posix.
X
X		*** IMPORTANT:	a POSIX.1-1990 compliant Tar implementation 
X				needs to be able to archive all files without 
X				using any vendor specific extensions.
X
X	4)	Run tartest to check the archives for POSIX.1-1990 compliance.
X		The working version of the "tartest" program is part of 
X		star-1.5a04 or later.
X
X		tartest -v < /tmp/ustar-all-quicktest.tar	> /tmp/old.out
X		tartest -v < /tmp/new.tar			> /tmp/new.out
X
X	5)	Check the output file /tmp/new.out for POSIX.1-1990 
X		noncompliances. If you did not find any wrning, them run
X		"diff /tmp/old.out /tmp/new.out" to check if no file name has 
X		been changed due to a bug in your TAR program under test.
X
X	The output of the "tartest -v" run on the original test archive
X	may be found (for reference purposes)  in the file 
X	'tartest-quicktest.out'. 
END-of-star-1.5.2/star/testscripts/README.quicktest
echo x - star-1.5.2/star/testscripts/long.ustar.gz
sed 's/^X//' >star-1.5.2/star/testscripts/long.ustar.gz << 'END-of-star-1.5.2/star/testscripts/long.ustar.gz'
X‹šžý8long.ustaríÍnÛ0„}îSäÜ]2¾÷=Œ 
END-of-star-1.5.2/star/testscripts/long.ustar.gz
echo x - star-1.5.2/star/testscripts/mk
sed 's/^X//' >star-1.5.2/star/testscripts/mk << 'END-of-star-1.5.2/star/testscripts/mk'
X#!/bin/sh
X
Xcat <<!
XDie File- und Directorynamen sind alle so ausgerechnet, dass
XDu "_*" als Argument nehmen musst, und nicht "."
X
Xbmz
X!
X
Xmkdir -p ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/_______________+160/_______________+180/_______________+200/_______________+220/_______________+240/_______________+260
Xfor d in `find *+020 -type d -print` ; do
X	echo 015 >$d/___________014
Xdone
Xmkdir -p ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/________+153
Xmkdir -p ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/_________+154
Xmkdir -p ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/__________+155
Xmkdir -p ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/___________+156
X
Xecho 099 >________________________________________________________________________________________________099
Xecho 100 >_________________________________________________________________________________________________100
Xecho 101 >__________________________________________________________________________________________________101
Xmkdir ______________________________________________________________________________________________D_099
Xmkdir _______________________________________________________________________________________________D_100
Xmkdir ________________________________________________________________________________________________D_101
Xmkdir _______________________________________________________________________________________________________________________________________________________154
Xmkdir ________________________________________________________________________________________________________________________________________________________155
Xmkdir _________________________________________________________________________________________________________________________________________________________156
Xcp *__099 *__100 *__101 *D_099
Xcp *__099 *__100 *__101 *D_100
Xcp *__099 *__100 *__101 *D_101
Xcp *__099 *__100 *__101 *154
Xcp *__099 *__100 *__101 *155
Xcp *__099 *__100 *__101 *156
X
Xcp *__099 *__100 *__101  ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/________+153
Xcp *__099 *__100 *__101  ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/_________+154
Xcp *__099 *__100 *__101  ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/__________+155
Xcp *__099 *__100 *__101  ________________+020/_______________+040/_______________+060/_______________+080/_______________+100/_______________+120/_______________+140/___________+156
X
Xmkdir -p _004/____________________________________________________________________________________________________________________________________________________151
Xecho 004 >_004/____________________________________________________________________________________________________________________________________________________151/_004
Xmkdir -p ______________________________________________________________________________________+090/____________________________________________________________+155
Xmkdir -p ______________________________________________________________________________________+090/_____________________________________________________________+156
Xfor d in *090/* ; do
X	echo 040 >$d/_____________________________________040
Xdone
END-of-star-1.5.2/star/testscripts/mk
echo x - star-1.5.2/star/testscripts/mk2
sed 's/^X//' >star-1.5.2/star/testscripts/mk2 << 'END-of-star-1.5.2/star/testscripts/mk2'
X#!/bin/sh
X
Xecho -n > dies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_namen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden
X
Xln dies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_namen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden \
Xdies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_linknamen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden
X
Xln dies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_namen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden \
Xdies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_linknamen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden_2
X
Xln -s dies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_namen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden \
Xdies_ist_eine_datei_mit_einem_doch_wohl_ziemlich_langen_symbolischen_linknamen_wollen_wir_mal_sehen_was_damit_passiert_wenn_wir_diese_datei_mit_den_verschiedenen_tar_programmen_bearbeiten_werden
END-of-star-1.5.2/star/testscripts/mk2
echo x - star-1.5.2/star/testscripts/not_a_tar_file
sed 's/^X//' >star-1.5.2/star/testscripts/not_a_tar_file << 'END-of-star-1.5.2/star/testscripts/not_a_tar_file'
XThe nonstandard stuff could not be found in in the first pubslished versions
Xof the program. The first version I am aware of, is a program called   0126136 
XSUGtar published at the Sun User Group meeting in december 1987, a different
Xpublishing of the same program which has been originally written by
XJohn Gilmore was called PDtar. In 1987 PDtar/SUGtar was implementing a true
Xsubset of the 1987 POSIX-1003 draft (missing only the long name splitting).
X
XFSF people then later added t_atime... making GNU tar non POSIX compliant.
XWhen FSF added the sparse file handling stuff, this was done in a way that
Xeven violates any tar document available since the late 1970's.
X
XGNU tar is not tar...
X                                                                          
X                                                                          
X                                                                          
X                                                                          
X                               
END-of-star-1.5.2/star/testscripts/not_a_tar_file
echo x - star-1.5.2/star/testscripts/pax-big-10g.tar.bz2
sed 's/^X//' >star-1.5.2/star/testscripts/pax-big-10g.tar.bz2 << 'END-of-star-1.5.2/star/testscripts/pax-big-10g.tar.bz2'
END-of-star-1.5.2/star/testscripts/pax-big-10g.tar.bz2
echo x - star-1.5.2/star/testscripts/quicktest.filelist
sed 's/^X//' >star-1.5.2/star/testscripts/quicktest.filelist << 'END-of-star-1.5.2/star/testscripts/quicktest.filelist'
X!-type-old-file
X0-type-file
X1-type-hardlink
X2-type-symlink
X3-type-cdev
X4-type-bdev
X5-type-dir
X6-type-fifo
X7-type-contfile
X0-jörg-signed
X12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/1234567890
Xtar-longlink
Xabcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcde/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghij
X12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/123456789.
X1bcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcde/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghij
X2bcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcde/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi.
X3-type-cdev-s
X4-type-bdev-s
X5-type-dir-s
X6-type-fifo-s
XEND
END-of-star-1.5.2/star/testscripts/quicktest.filelist
echo x - star-1.5.2/star/testscripts/tartest-quicktest.out
sed 's/^X//' >star-1.5.2/star/testscripts/tartest-quicktest.out << 'END-of-star-1.5.2/star/testscripts/tartest-quicktest.out'
Xtartest 1.3 (sparc-sun-solaris2.9)
X
XCopyright (C) 2002 Jörg Schilling
XThis is free software; see the source for copying conditions.  There is NO
Xwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
X
XTesting for POSIX.1-1990 TAR compliance...
X*** Filename '!-type-old-file'
X*** Filename '0-type-file'
X*** Filename '1-type-hardlink'
X*** Linkname '0-type-file'
X*** Filename '2-type-symlink'
X*** Linkname 'file'
X*** Filename '3-type-cdev'
X*** Filename '4-type-bdev'
X*** Filename '5-type-dir/'
X*** Filename '6-type-fifo'
X*** Filename '7-type-contfile'
X*** Filename '0-jörg-signed'
X*** Filename '12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/1234567890'
X*** Filename 'tar-longlink'
X*** Linkname '12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/1234567890'
X*** Filename 'abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcde/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghij'
X*** Filename '12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/123456789.'
X*** Filename '1bcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcde/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghij'
X*** Linkname '12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/12345678901234/123456789.'
X*** Filename '2bcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcde/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi/abcdefghi.'
X*** Filename '3-type-cdev-s'
X*** Filename '4-type-bdev-s'
X*** Filename '5-type-dir-s/'
X*** Filename '6-type-fifo-s'
X*** Filename 'END'
XFound 1st EOF block at 45
XFound 2nd EOF block at 46
XNo deviations from POSIX.1-1990 TAR standard found.
END-of-star-1.5.2/star/testscripts/tartest-quicktest.out
echo x - star-1.5.2/star/testscripts/typescript
sed 's/^X//' >star-1.5.2/star/testscripts/typescript << 'END-of-star-1.5.2/star/testscripts/typescript'
XSkript gestartet für Don 07 Jun 2001 15:14:46 MEST
Xburner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> > > > > > > burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes> burner jes 3 > burner jes 3 > burner jes 3 > burner jes 3 > burner jes 3 > burner jes 3 > burner jes 3 > burner jes 3 > 

Xburner jes 3 > 

Xburner jes 3 > gtar -tvf gtarfail.tar 

X-rw-r--r-- jes/glone       518 2001-05-25 16:41 vedpowered.gif
Xgtar: Skipping to next file header
X-rw-r--r-- jes/glone     33354 1999-06-22 14:17 DSCN0049c.JPG
Xgtar: Skipping to next file header
X-rw-r--r-- jes/glone      1310 2001-05-25 15:05 vipower.gif
Xgtar: Skipping to next file header
X0.038r 0.000u 0.030s 30% 0M 0+0k 0st 0+0io 0pf+0w
Xburner jes 3 > 

X<EOF>

X
XSkript beendet für Don 07 Jun 2001 15:14:53 MEST
END-of-star-1.5.2/star/testscripts/typescript
echo x - star-1.5.2/star/testscripts/ustar-all-filetypes.tar
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-all-filetypes.tar << 'END-of-star-1.5.2/star/testscripts/ustar-all-filetypes.tar'
X!-type-old-file0001644 0000000 0000454 00000002000 05577662410 0013165 ustar00root0000000 0000000 0-type-file0001644 0000000 0000454 00000002000 05577662424 0012515 0ustar00root0000000 0000000 1-type-hardlink0001644 0000000 0000454 00000000000 05577662424 0015346 10-type-fileustar00root0000000 0000000 2-type-symlink0000777 0000000 0000454 00000000000 07502627530 0014121 2fileustar00root0000000 0000000 3-type-cdev0000644 0000000 0000454 00000000000 05577662522 0012560 3ustar00root0000177 0000376 4-type-bdev0000644 0000000 0000454 00000000000 05577662534 0012564 4ustar00root0000177 0000376 5-type-dir/0002755 0000000 0000454 00000000000 05577662540 0012446 5ustar00root0000000 0000000 6-type-fifo0000644 0000000 0000454 00000000000 05577662562 0012535 6ustar00root0000000 0000000 7-type-contfile0000644 0000002 0000003 00000024000 07502631625 0013723 7ustar00binsys0000000 0000000 #ident	"@(#)termcap	1.15	99/08/10 SMI"	/* SunOS 4.1.3 termcap */
X# ------------------------
X#
X#Termcap source file @(#)termcap.src 1.33 89/03/22 SMI; from UCB 5.28 6/7/86
X#	Kevin Layer, Berkeley
X#	Craig Leres, Berkeley
X#	Mark Horton, Berkeley
X#
X# Please mail changes to (arpanet): termcap@berkeley
X#
X# Copyright (c) 1980 Regents of the University of California.
X# All rights reserved.  The Berkeley software License Agreement
X# specifies the terms and conditions for redistribution.
X#
X# This file describes capabilities of various terminals, as needed by
X# software such as screen editors.  It does not attempt to describe
X# printing terminals very well, nor graphics terminals.  Someday.
X# See termcap(5) in the Unix Programmers Manual for documentation.
X#
X# Conventions: First entry is two chars, first char is manufacturer,
X# second char is canonical name for model or mode.
X# Third entry is the one the editor will print with "set" command.
X# Last entry is verbose description.
X# Others are mnemonic synonyms for the terminal.
X#
X# Terminal naming conventions:
X# Terminal names look like <manufacturer> <model> - <modes/options>
X# Certain abbreviations (e.g. c100 for concept100) are also allowed
X# for upward compatibility.  The part to the left of the dash, if a
X# dash is present, describes the particular hardware of the terminal.
X# The part to the right can be used for flags indicating special ROM's,
X# extra memory, particular terminal modes, or user preferences.
X# All names are always in lower case, for consistency in typing.
X#
X# The following are conventionally used flags:
X#	rv	Terminal in reverse video mode (black on white)
X#	2p	Has two pages of memory.  Likewise 4p, 8p, etc.
X#	w	Wide - in 132 column mode.
X#	pp	Has a printer port which is used.
X#	na	No arrow keys - termcap ignores arrow keys which are
X#		actually there on the terminal, so the user can use
X#		the arrow keys locally.
X#
X# There are some cases where the same name is used for two different
X# terminals, e.g. "teleray" or "2621" or "vt100".  In these cases,
X# if a site has one of these, they should choose a local default and
X# bring that terminal to the front in the reorder script.  This works
X# because tgetent picks the first match in /etc/termcap.
X# The list of names intentionally duplicated is:
X# 2621, c108, dtc, hp2621, teleray, tvi, vt100.
X#
X# If you absolutely MUST check for a specific terminal (this is discouraged)
X# check for the 2nd entry (the canonical form) since all other codes are
X# subject to change.  The two letter codes are there for version 6 and are
X# EXTREMELY subject to change, or even to go away if version 6 becomes for
X# all practical purposes obsolete.  We would much rather put in special
X# capabilities to describe your terminal rather than having you key on the
X# name.
X#
X#  Special manufacturer codes:
X#	A: hardcopy daisy wheel terminals
X#	M: Misc. (with only a few terminals)
X#	q: Homemade
X#	s: special (dialup, etc.)
X#
X# Comments in this file begin with # - they cannot appear in the middle
X# of a termcap entry.  Individual entries are commented out by
X# placing a period between the colon and the capability name.
X#
X#  This file is to be installed with an editor script (reorder)
X#  that moves the most common terminals to the front of the file.
X#  If the source is not available, it can be constructed by sorting
X#  the above entries by the 2 char initial code.
X# # --------------------------------
X#
X# A: DAISY WHEEL PRINTERS and APPLE
X#
X# The A manufacturer represents Diablo, DTC, Xerox, Qume, and other Daisy
X# wheel terminals until such time as termcap distinguishes between them
X# enough to justify separate codes.
X# This is an "experimental" entry for the SRI Agiles.
X# It has been tried in a minimal way -- the Agile did not blow up!
X# However, it has not been exhaustively tested.
X# Anyone who tries it and finds it wanting should get in touch with:
X#	Ralph Keirstead (ralph@sri-unix);
X#	EK352; SRI International; 333 Ravenswood Avenue; Menlo Park, CA 94025
XAa|agile|agiles|sri agiles:\
X	:bs:hc:os:pl:co#132:do=^J:kb=^H:up=\E\n:\
X	:hu=\E0:hd=\E9:if=/usr/share/lib/tabset/std:is=\EE\EF\EJ:
XA6|1620|1720|450|ipsi|diablo 1620:\
X	:do=^J:ct=\E2:st=\E1:ch=\E\t%i%.:\
X	:if=/usr/share/lib/tabset/xerox1720:\
X	:kb=^H:le=^H:bs:co#132:hc:hu=\EU:hd=\ED:os:pt:up=\E\n:
XA7|1620-m8|1640-m8|diablo 1620 w/8 column left margin:\
X	:do=^J:co#124:is=\r        \E9:tc=1620:
XA8|1640|1740|630|1730|x1730|diablo|xerox|diablo 1640:\
X	:if=/usr/share/lib/tabset/xerox1730:\
X	:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620:
XAm|1640-lm|1740-lm|630-lm|1730-lm|x1730-lm|diablo-lm|xerox-lm|\
X	diablo 1640 with idented left margin:\
X	:if=/usr/share/lib/tabset/xerox1730-lm:\
X	:co#124:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620:
X# DTC 382 with VDU.  Has no cd so we fake it with ce.  Standout works but
X# won't go away without dynamite.  The terminal has tabs, but I'm getting
X# tired of fighting the braindamage.  If no tab is set or the terminal's
X# in a bad mood, it glitches the screen around all of memory.  Note that
X# return puts a blank ("a return character") in the space the cursor was
X# at, so we use ^P return (and thus ^P newline for newline).  Note also
X# that if you turn off pt and let Unix expand tabs, curses won't work
X# (current version) because it doesn't turn off this bit, and cursor
X# addressing sends a tab for row/column 9.  What a losing terminal!  I
X# have been unable to get tabs set in all 96 lines - it always leaves at
X# least one line with no tabs in it, and once you tab through that line,
X# it completely weirds out.
XAc|dtc|ps|dtc382|382:\
X	:do=^J:al=^P^Z:am:le=^H:\
X	:bs:co#80:ce=^P^U:cl=20^P^]:cm=%r^P^Q%.%.:dc=^X:\
X	:dl=^P^S:ei=^Pi:ho=^P^R:im=^PI:ve=^Pb:vs=^PB:pc=\177:te=20^P^]:\
X	:li#24:nd=^PR:.se=^P \200:.so=^P \002^PF:us=^P \020:ue=^P \200:\
X	:up=^P^L:nc:xr:xs:da:db:.pt:cr=^P^M:cd=^P^U^P^S^P^S:\
X	:if=/usr/share/lib/tabset/dtc382:
XAd|dtc300s|300|300s|dtc 300s:\
X	:ct=\E3:st=\E1:do=^J:\
X	:kb=^h:le=^H:bs:co#132:hc:hu=\EH:hd=\Eh:os:pt:up=^Z:
XAg|gsi:\
X	:le=^H:bs:co#132:hc:hd=\Eh:hu=\EH:os:pt:up=^Z:do=^J:
X# This used to have :pl: - maybe they meant :pt:?
XAj|aj830|aj832|aj|anderson jacobson:\
X	:do=^J:le=^H:bs:hc:hd=\E9:hu=\E8:os:up=\E7:
X# From Chris Torek <chris@gyre.umd.edu> Thu, 7 Nov 85 18:21:58 EST
XAJ|aj510|AJ510|Anderson-Jacobson model 510:\
X	:ic=:ip=.1*:so=\E"I:us=\E"U:cd=\E'P:ce=\E'L:cl=^L:cm=\E#%+ %+ :\
X	:dl=2*\E&D:ue=\E"U:co#80:li#24:se=\E"I:al=2*\E&I:im=\E'I:ei=\E'J:\
X	:dc=.1*\E'D:up=\EY:nd=\EX:bs:am:mi:ti=\E"N:te=\E"N:\
X	:ku=\EY:kd=\EZ:kl=\EW:kr=\EX:pc=\177:
X#
X# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981
X# This is incomplete, but it's a start.
XAn|5520|nec|spinwriter|nec 5520:\
X	:ct=\E3:st=\E1:do=^J:kb=^h:le=^H:bs:co#132:hc:hu=\E]s\E9\E]W:\
X	:hd=\E]s\n\E]W:os:pt:up=\E9:
XAq|qume5|qume|Qume Sprint 5:\
X	:ct=\E3:st=\E1:do=^J:\
X	:kb=^h:le=^H:bs:co#80:hc:hu=\EH:hd=\Eh:os:pt:up=^Z:
XAr|q102|qume102|Qume 102:\
X	:al=\EE:am:bs:bt=\EI:\
X	:cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:ct=\E3:\
X	:dc=\EW:dl=\ER:do=^J:ei=:ho=^^:ic=\EQ:im=:\
X	:k0=^A@\r:k1=^AA\r:k2=^AB\r:k3=^AC\r:kd=^J:kl=^H:kr=^L:ku=^K:\
X	:le=^H:li#24:ma=^K^P^L :nd=^L:\
X	:se=\EG0:sg#1:so=\EG4:st=\E1:\
X	:ue=\EG0:ug#1:ul:up=^K:us=\EG8:
X# From ucbvax!mtxinu!sybase!tim (Tim Wood) Fri Sep 27 10:25:24 PDT 1985
X# This entry supports line and character insert and delete, scroll up and
X# down and the arrow keys.  To use it, perform the following on your qvt-101
X#	1) enter SET-UP mode, select the SET 3 line;
X#	2) move the cursor to the EMULATION item and hit SPACE
X#	   until QVT-101B appears
X#	3) enter SHIFT-S
X#	4) exit SET-UP - the terminal is now configured
XAs|q101|qvt101|qvt-101|Qume 101 $310 special:\
X	:al=\EE:am:bt=\EI:ce=\Et:cl=\E*:dc=\EW:\
X	:dl=\ER:do=^J:ic=\EQ:ei=:im=:md=\E(:me=\EG0:mh=\E):\
X	:le=^H:bs:cm=\E=%+ %+ :cl=1^Z:co#80:ho=^^:li#24:ma=^K^P:nd=^L:ku=^K:\
X	:vs=\EM4\040\200\200\200:mr=\EG4:ms:so=\EG4:se=\EG1:
XBh|AT386|at386|at/386 console:\
X	:am:bw:eo:xo:xt:bs:\
X	:co#80:li#25:kn#4:\
X	:ae=^P:al=\E[1L:cd=\E[0J:ce=\E[0K:cl=\E[2J\E[H:\
X	:cm=\E[%i%2;%2H:ct=\E[3g:dc=\E[1P:dl=\E[1M:ho=\E[H:\
X	:ic=\E[1@:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:\
X	:k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:kb=\b:kd=\E[B:\
X	:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:nd=\E[C:se=\E[m:\
X	:so=\E[7m:st=\EH:ue=\E[m:up=\E[A:us=\E[4m:nl=\E[B:\
X	:ko=do,nd,up,ho:
XBi|AT386-M|at386-m|386AT-M|386at-m|SCOCONSOLE|scoconsole|at/386 console:\
X	:am:bw:eo:xo:xt:pt:\
X	:co#80:li#25:kn#6:\
X	:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
X	:LE=\E[%dD:RI=\E[%dC:\
X	:.SF=!!! MUST CHANGE BY HAND !!!\E[%P1%dS:SR=\E[S:\
X	:UP=\E[%dA:ae=\E[10m:al=\E[1L:as=\E[12m:cd=\E[J:\
X	:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%2;%2H:dc=\E[P:dl=\E[1M:\
X	:ho=\E[H:ic=\E[1@:is=\E[0;10;38m:k1=\EOP:k2=\EOQ:\
X	:k3=\EOR:k4=\EOS:k5=\EOT:k6=\EOU:k7=\EOV:k8=\EOW:\
X	:k9=\EOX:kb=\b:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:\
X	:ku=\E[A:nd=\E[C:se=\E[m:so=\E[7m:ue=\E[m:up=\E[A:\
X	:us=\E[4m:vb=^G:bc=\E[D:nl=\E[B:ko=le,do,nd,up,dc,ho:
X# I suspect the xerox1720 is the same as the diablo 1620.
XAx|x1720|x1700|1700|x1750|xerox 1720:\
X	:co#132:le=^H:bs:hc:os:pt:do=^J:ct=\E2:st=\E1:
X# # --------------------------------
X#
X# C: CONTROL DATA
X#
XCa|cdc456|cdc:\
X	:do=^J:li#24:co#80:cl=^Y^X:nd=^L:up=^Z:le=^H:bs:\
X	:cm=\E1%+ %+ :ho=^Y:al=\E\114:dl=\E\112:ce=^V:cd=^X:am:
XCc|cdc456tst:\
X	:do=^J:li#24:co#80:cl=^y^x:le=^H:bs:cm=\E1%+ %+ :am:
X# # --------------------------------
X#
X# D: DATAMEDIA
X#
XD0|dm1520|dm1521|1521|1520|datamedia 1520:\
X	:do=^J:am:le=^H:bs:cd=^K:ce=^]:cl=^L:cm=^^%r%+ %+ :co#80:ho=^Y:\
X	:ku=^_:kd=^J:kl=^H:kr=^\:kh=^Y:\
X	:li#24:nd=^\:up=^_:xn:ma=^\ ^_^P^YH:pt:
XD2|dm2500|datamedia2500|2500|datamedia 2500:\
X	:do=^J:al=15^P\n^X^]^X^]:le=^H:bs:ce=^W:cl=^^^^\177:\
X	:cm=^L%r%n%.%.:co#80:dc=10*^P\b^X^]:dl=10*^P^Z^X^]:\
X	:dm=^P:ed=^X^]:ei=10\377\377^X^]:ho=^B:ic=10*^P^\^X^]:\
X	:im=^P:li#24:nc:nd=^\:pc=\377:so@=^N:se=^X^]:up=^Z:
XD3|dm3025|datamedia 3025a:\
X	:MT:is=\EQ\EU\EV:do=^J:\
X	:al=130\EP\n\EQ:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :\
X	:co#80:dc=6\b:dl=130\EP\EA\EQ:dm=\EP:ed=\EQ:ei=\EQ:ho=\EH:\
X	:im=\EP:ip=6:li#24:nd=\EC:pt:so=\EO1:se=\EO0:up=\EA:
XD4|3045|dm3045|datamedia 3045a:\
X	:is=\EU\EV:do=^J:\
X	:am:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :co#80:\
X	:dc=6\EB:dm=:ed=:ei=\EP:ho=\EH:ic=:im=\EP:ip=6:\
X	:k0=\Ey\r:k1=\Ep\r:k2=\Eq\r:k3=\Er\r:k4=\Es\r:\
END-of-star-1.5.2/star/testscripts/ustar-all-filetypes.tar
echo x - star-1.5.2/star/testscripts/ustar-all-quicktest.tar
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-all-quicktest.tar << 'END-of-star-1.5.2/star/testscripts/ustar-all-quicktest.tar'
X!-type-old-file0001644 0000000 0000454 00000002000 05577662410 0013165 ustar00root0000000 0000000 0-type-file0001644 0000000 0000454 00000002000 05577662424 0012515 0ustar00root0000000 0000000 1-type-hardlink0001644 0000000 0000454 00000000000 05577662424 0015346 10-type-fileustar00root0000000 0000000 2-type-symlink0000777 0000000 0000454 00000000000 07502627530 0014121 2fileustar00root0000000 0000000 3-type-cdev0000644 0000000 0000454 00000000000 05577662522 0012560 3ustar00root0000177 0000376 4-type-bdev0000644 0000000 0000454 00000000000 05577662534 0012564 4ustar00root0000177 0000376 5-type-dir/0002755 0000000 0000454 00000000000 05577662540 0012446 5ustar00root0000000 0000000 6-type-fifo0000644 0000000 0000454 00000000000 05577662562 0012535 6ustar00root0000000 0000000 7-type-contfile0000644 0000002 0000003 00000024000 07502631625 0013723 7ustar00binsys0000000 0000000 #ident	"@(#)termcap	1.15	99/08/10 SMI"	/* SunOS 4.1.3 termcap */
X# ------------------------
X#
X#Termcap source file @(#)termcap.src 1.33 89/03/22 SMI; from UCB 5.28 6/7/86
X#	Kevin Layer, Berkeley
X#	Craig Leres, Berkeley
X#	Mark Horton, Berkeley
X#
X# Please mail changes to (arpanet): termcap@berkeley
X#
X# Copyright (c) 1980 Regents of the University of California.
X# All rights reserved.  The Berkeley software License Agreement
X# specifies the terms and conditions for redistribution.
X#
X# This file describes capabilities of various terminals, as needed by
X# software such as screen editors.  It does not attempt to describe
X# printing terminals very well, nor graphics terminals.  Someday.
X# See termcap(5) in the Unix Programmers Manual for documentation.
X#
X# Conventions: First entry is two chars, first char is manufacturer,
X# second char is canonical name for model or mode.
X# Third entry is the one the editor will print with "set" command.
X# Last entry is verbose description.
X# Others are mnemonic synonyms for the terminal.
X#
X# Terminal naming conventions:
X# Terminal names look like <manufacturer> <model> - <modes/options>
X# Certain abbreviations (e.g. c100 for concept100) are also allowed
X# for upward compatibility.  The part to the left of the dash, if a
X# dash is present, describes the particular hardware of the terminal.
X# The part to the right can be used for flags indicating special ROM's,
X# extra memory, particular terminal modes, or user preferences.
X# All names are always in lower case, for consistency in typing.
X#
X# The following are conventionally used flags:
X#	rv	Terminal in reverse video mode (black on white)
X#	2p	Has two pages of memory.  Likewise 4p, 8p, etc.
X#	w	Wide - in 132 column mode.
X#	pp	Has a printer port which is used.
X#	na	No arrow keys - termcap ignores arrow keys which are
X#		actually there on the terminal, so the user can use
X#		the arrow keys locally.
X#
X# There are some cases where the same name is used for two different
X# terminals, e.g. "teleray" or "2621" or "vt100".  In these cases,
X# if a site has one of these, they should choose a local default and
X# bring that terminal to the front in the reorder script.  This works
X# because tgetent picks the first match in /etc/termcap.
X# The list of names intentionally duplicated is:
X# 2621, c108, dtc, hp2621, teleray, tvi, vt100.
X#
X# If you absolutely MUST check for a specific terminal (this is discouraged)
X# check for the 2nd entry (the canonical form) since all other codes are
X# subject to change.  The two letter codes are there for version 6 and are
X# EXTREMELY subject to change, or even to go away if version 6 becomes for
X# all practical purposes obsolete.  We would much rather put in special
X# capabilities to describe your terminal rather than having you key on the
X# name.
X#
X#  Special manufacturer codes:
X#	A: hardcopy daisy wheel terminals
X#	M: Misc. (with only a few terminals)
X#	q: Homemade
X#	s: special (dialup, etc.)
X#
X# Comments in this file begin with # - they cannot appear in the middle
X# of a termcap entry.  Individual entries are commented out by
X# placing a period between the colon and the capability name.
X#
X#  This file is to be installed with an editor script (reorder)
X#  that moves the most common terminals to the front of the file.
X#  If the source is not available, it can be constructed by sorting
X#  the above entries by the 2 char initial code.
X# # --------------------------------
X#
X# A: DAISY WHEEL PRINTERS and APPLE
X#
X# The A manufacturer represents Diablo, DTC, Xerox, Qume, and other Daisy
X# wheel terminals until such time as termcap distinguishes between them
X# enough to justify separate codes.
X# This is an "experimental" entry for the SRI Agiles.
X# It has been tried in a minimal way -- the Agile did not blow up!
X# However, it has not been exhaustively tested.
X# Anyone who tries it and finds it wanting should get in touch with:
X#	Ralph Keirstead (ralph@sri-unix);
X#	EK352; SRI International; 333 Ravenswood Avenue; Menlo Park, CA 94025
XAa|agile|agiles|sri agiles:\
X	:bs:hc:os:pl:co#132:do=^J:kb=^H:up=\E\n:\
X	:hu=\E0:hd=\E9:if=/usr/share/lib/tabset/std:is=\EE\EF\EJ:
XA6|1620|1720|450|ipsi|diablo 1620:\
X	:do=^J:ct=\E2:st=\E1:ch=\E\t%i%.:\
X	:if=/usr/share/lib/tabset/xerox1720:\
X	:kb=^H:le=^H:bs:co#132:hc:hu=\EU:hd=\ED:os:pt:up=\E\n:
XA7|1620-m8|1640-m8|diablo 1620 w/8 column left margin:\
X	:do=^J:co#124:is=\r        \E9:tc=1620:
XA8|1640|1740|630|1730|x1730|diablo|xerox|diablo 1640:\
X	:if=/usr/share/lib/tabset/xerox1730:\
X	:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620:
XAm|1640-lm|1740-lm|630-lm|1730-lm|x1730-lm|diablo-lm|xerox-lm|\
X	diablo 1640 with idented left margin:\
X	:if=/usr/share/lib/tabset/xerox1730-lm:\
X	:co#124:us=\EE:ue=\ER:so=\EW:se=\E&:tc=1620:
X# DTC 382 with VDU.  Has no cd so we fake it with ce.  Standout works but
X# won't go away without dynamite.  The terminal has tabs, but I'm getting
X# tired of fighting the braindamage.  If no tab is set or the terminal's
X# in a bad mood, it glitches the screen around all of memory.  Note that
X# return puts a blank ("a return character") in the space the cursor was
X# at, so we use ^P return (and thus ^P newline for newline).  Note also
X# that if you turn off pt and let Unix expand tabs, curses won't work
X# (current version) because it doesn't turn off this bit, and cursor
X# addressing sends a tab for row/column 9.  What a losing terminal!  I
X# have been unable to get tabs set in all 96 lines - it always leaves at
X# least one line with no tabs in it, and once you tab through that line,
X# it completely weirds out.
XAc|dtc|ps|dtc382|382:\
X	:do=^J:al=^P^Z:am:le=^H:\
X	:bs:co#80:ce=^P^U:cl=20^P^]:cm=%r^P^Q%.%.:dc=^X:\
X	:dl=^P^S:ei=^Pi:ho=^P^R:im=^PI:ve=^Pb:vs=^PB:pc=\177:te=20^P^]:\
X	:li#24:nd=^PR:.se=^P \200:.so=^P \002^PF:us=^P \020:ue=^P \200:\
X	:up=^P^L:nc:xr:xs:da:db:.pt:cr=^P^M:cd=^P^U^P^S^P^S:\
X	:if=/usr/share/lib/tabset/dtc382:
XAd|dtc300s|300|300s|dtc 300s:\
X	:ct=\E3:st=\E1:do=^J:\
X	:kb=^h:le=^H:bs:co#132:hc:hu=\EH:hd=\Eh:os:pt:up=^Z:
XAg|gsi:\
X	:le=^H:bs:co#132:hc:hd=\Eh:hu=\EH:os:pt:up=^Z:do=^J:
X# This used to have :pl: - maybe they meant :pt:?
XAj|aj830|aj832|aj|anderson jacobson:\
X	:do=^J:le=^H:bs:hc:hd=\E9:hu=\E8:os:up=\E7:
X# From Chris Torek <chris@gyre.umd.edu> Thu, 7 Nov 85 18:21:58 EST
XAJ|aj510|AJ510|Anderson-Jacobson model 510:\
X	:ic=:ip=.1*:so=\E"I:us=\E"U:cd=\E'P:ce=\E'L:cl=^L:cm=\E#%+ %+ :\
X	:dl=2*\E&D:ue=\E"U:co#80:li#24:se=\E"I:al=2*\E&I:im=\E'I:ei=\E'J:\
X	:dc=.1*\E'D:up=\EY:nd=\EX:bs:am:mi:ti=\E"N:te=\E"N:\
X	:ku=\EY:kd=\EZ:kl=\EW:kr=\EX:pc=\177:
X#
X# From cbosg!ucbvax!pur-ee!cincy!chris Thu Aug 20 09:09:18 1981
X# This is incomplete, but it's a start.
XAn|5520|nec|spinwriter|nec 5520:\
X	:ct=\E3:st=\E1:do=^J:kb=^h:le=^H:bs:co#132:hc:hu=\E]s\E9\E]W:\
X	:hd=\E]s\n\E]W:os:pt:up=\E9:
XAq|qume5|qume|Qume Sprint 5:\
X	:ct=\E3:st=\E1:do=^J:\
X	:kb=^h:le=^H:bs:co#80:hc:hu=\EH:hd=\Eh:os:pt:up=^Z:
XAr|q102|qume102|Qume 102:\
X	:al=\EE:am:bs:bt=\EI:\
X	:cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:ct=\E3:\
X	:dc=\EW:dl=\ER:do=^J:ei=:ho=^^:ic=\EQ:im=:\
X	:k0=^A@\r:k1=^AA\r:k2=^AB\r:k3=^AC\r:kd=^J:kl=^H:kr=^L:ku=^K:\
X	:le=^H:li#24:ma=^K^P^L :nd=^L:\
X	:se=\EG0:sg#1:so=\EG4:st=\E1:\
X	:ue=\EG0:ug#1:ul:up=^K:us=\EG8:
X# From ucbvax!mtxinu!sybase!tim (Tim Wood) Fri Sep 27 10:25:24 PDT 1985
X# This entry supports line and character insert and delete, scroll up and
X# down and the arrow keys.  To use it, perform the following on your qvt-101
X#	1) enter SET-UP mode, select the SET 3 line;
X#	2) move the cursor to the EMULATION item and hit SPACE
X#	   until QVT-101B appears
X#	3) enter SHIFT-S
X#	4) exit SET-UP - the terminal is now configured
XAs|q101|qvt101|qvt-101|Qume 101 $310 special:\
X	:al=\EE:am:bt=\EI:ce=\Et:cl=\E*:dc=\EW:\
X	:dl=\ER:do=^J:ic=\EQ:ei=:im=:md=\E(:me=\EG0:mh=\E):\
X	:le=^H:bs:cm=\E=%+ %+ :cl=1^Z:co#80:ho=^^:li#24:ma=^K^P:nd=^L:ku=^K:\
X	:vs=\EM4\040\200\200\200:mr=\EG4:ms:so=\EG4:se=\EG1:
XBh|AT386|at386|at/386 console:\
X	:am:bw:eo:xo:xt:bs:\
X	:co#80:li#25:kn#4:\
X	:ae=^P:al=\E[1L:cd=\E[0J:ce=\E[0K:cl=\E[2J\E[H:\
X	:cm=\E[%i%2;%2H:ct=\E[3g:dc=\E[1P:dl=\E[1M:ho=\E[H:\
X	:ic=\E[1@:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:\
X	:k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:kb=\b:kd=\E[B:\
X	:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:nd=\E[C:se=\E[m:\
X	:so=\E[7m:st=\EH:ue=\E[m:up=\E[A:us=\E[4m:nl=\E[B:\
X	:ko=do,nd,up,ho:
XBi|AT386-M|at386-m|386AT-M|386at-m|SCOCONSOLE|scoconsole|at/386 console:\
X	:am:bw:eo:xo:xt:pt:\
X	:co#80:li#25:kn#6:\
X	:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
X	:LE=\E[%dD:RI=\E[%dC:\
X	:.SF=!!! MUST CHANGE BY HAND !!!\E[%P1%dS:SR=\E[S:\
X	:UP=\E[%dA:ae=\E[10m:al=\E[1L:as=\E[12m:cd=\E[J:\
X	:ce=\E[K:cl=\E[2J\E[H:cm=\E[%i%2;%2H:dc=\E[P:dl=\E[1M:\
X	:ho=\E[H:ic=\E[1@:is=\E[0;10;38m:k1=\EOP:k2=\EOQ:\
X	:k3=\EOR:k4=\EOS:k5=\EOT:k6=\EOU:k7=\EOV:k8=\EOW:\
X	:k9=\EOX:kb=\b:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:\
X	:ku=\E[A:nd=\E[C:se=\E[m:so=\E[7m:ue=\E[m:up=\E[A:\
X	:us=\E[4m:vb=^G:bc=\E[D:nl=\E[B:ko=le,do,nd,up,dc,ho:
X# I suspect the xerox1720 is the same as the diablo 1620.
XAx|x1720|x1700|1700|x1750|xerox 1720:\
X	:co#132:le=^H:bs:hc:os:pt:do=^J:ct=\E2:st=\E1:
X# # --------------------------------
X#
X# C: CONTROL DATA
X#
XCa|cdc456|cdc:\
X	:do=^J:li#24:co#80:cl=^Y^X:nd=^L:up=^Z:le=^H:bs:\
X	:cm=\E1%+ %+ :ho=^Y:al=\E\114:dl=\E\112:ce=^V:cd=^X:am:
XCc|cdc456tst:\
X	:do=^J:li#24:co#80:cl=^y^x:le=^H:bs:cm=\E1%+ %+ :am:
X# # --------------------------------
X#
X# D: DATAMEDIA
X#
XD0|dm1520|dm1521|1521|1520|datamedia 1520:\
X	:do=^J:am:le=^H:bs:cd=^K:ce=^]:cl=^L:cm=^^%r%+ %+ :co#80:ho=^Y:\
X	:ku=^_:kd=^J:kl=^H:kr=^\:kh=^Y:\
X	:li#24:nd=^\:up=^_:xn:ma=^\ ^_^P^YH:pt:
XD2|dm2500|datamedia2500|2500|datamedia 2500:\
X	:do=^J:al=15^P\n^X^]^X^]:le=^H:bs:ce=^W:cl=^^^^\177:\
X	:cm=^L%r%n%.%.:co#80:dc=10*^P\b^X^]:dl=10*^P^Z^X^]:\
X	:dm=^P:ed=^X^]:ei=10\377\377^X^]:ho=^B:ic=10*^P^\^X^]:\
X	:im=^P:li#24:nc:nd=^\:pc=\377:so@=^N:se=^X^]:up=^Z:
XD3|dm3025|datamedia 3025a:\
X	:MT:is=\EQ\EU\EV:do=^J:\
X	:al=130\EP\n\EQ:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :\
X	:co#80:dc=6\b:dl=130\EP\EA\EQ:dm=\EP:ed=\EQ:ei=\EQ:ho=\EH:\
X	:im=\EP:ip=6:li#24:nd=\EC:pt:so=\EO1:se=\EO0:up=\EA:
XD4|3045|dm3045|datamedia 3045a:\
X	:is=\EU\EV:do=^J:\
X	:am:le=^H:bs:cd=2\EJ:ce=\EK:cl=2\EM:cm=\EY%r%+ %+ :co#80:\
X	:dc=6\EB:dm=:ed=:ei=\EP:ho=\EH:ic=:im=\EP:ip=6:\
X	:k0=\Ey\r:k1=\Ep\r:k2=\Eq\r:k3=\Er\r:k4=\Es\r:\
END-of-star-1.5.2/star/testscripts/ustar-all-quicktest.tar
echo x - star-1.5.2/star/testscripts/dirloop.tar
sed 's/^X//' >star-1.5.2/star/testscripts/dirloop.tar << 'END-of-star-1.5.2/star/testscripts/dirloop.tar'
END-of-star-1.5.2/star/testscripts/dirloop.tar
echo x - star-1.5.2/star/testscripts/ustar-all-quicktest.tar-without-cont-file
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-all-quicktest.tar-without-cont-file << 'END-of-star-1.5.2/star/testscripts/ustar-all-quicktest.tar-without-cont-file'
END-of-star-1.5.2/star/testscripts/ustar-all-quicktest.tar-without-cont-file
echo x - star-1.5.2/star/testscripts/ustar-bad-filetypes.tar
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-bad-filetypes.tar << 'END-of-star-1.5.2/star/testscripts/ustar-bad-filetypes.tar'
END-of-star-1.5.2/star/testscripts/ustar-bad-filetypes.tar
echo x - star-1.5.2/star/testscripts/ustar-bad-signedsum.tar
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-bad-signedsum.tar << 'END-of-star-1.5.2/star/testscripts/ustar-bad-signedsum.tar'
END-of-star-1.5.2/star/testscripts/ustar-bad-signedsum.tar
echo x - star-1.5.2/star/testscripts/ustar-big-2g.tar.bz2
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-big-2g.tar.bz2 << 'END-of-star-1.5.2/star/testscripts/ustar-big-2g.tar.bz2'
XBZh91AY&SYPA/Ô~={€É @€rµž ”„¡)£Ó(ORªÐÐ>õ„>TUQ)@TO'%DDDSSx¶7Ûš”3êBªW1€ÌÙ‹RKhKh­š"Óbpük_5_nïÇ/ÍÀ@Uó’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5àž-ðøä‚Ôd*Z¨	s’e5“Qvm€KO¹ˆ
END-of-star-1.5.2/star/testscripts/ustar-big-2g.tar.bz2
echo x - star-1.5.2/star/testscripts/ustar-big-8g.tar.bz2
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-big-8g.tar.bz2 << 'END-of-star-1.5.2/star/testscripts/ustar-big-8g.tar.bz2'
END-of-star-1.5.2/star/testscripts/ustar-big-8g.tar.bz2
echo x - star-1.5.2/star/testscripts/README.create-and-remove
sed 's/^X//' >star-1.5.2/star/testscripts/README.create-and-remove << 'END-of-star-1.5.2/star/testscripts/README.create-and-remove'
XWarning:
X
XMost tar programs allow you remove arbitrary files by using hand crafted
Xtar archibes that contain links to itself.
X
XA good implementation such as star/1.5a18 or newer as well as Solaris "pax"
Xand FreeBSD "pax" check for problems.
X
XGNU tar does not!
X
Xgtar xvf create-and-remove.tar 
Xgtar: Record size = 4 blocks
Xf1
Xf1
Xgtar: f1: Cannot link to f1: No such file or directory
Xgtar: Error exit delayed from previous errors
X
Xls -l f1
Xls: f1: No such file or directory
X
XHere is what the tar archives contain:
X
Xstar -tv < create-and-remove.tar 
Xstar: Blocksize = 4 records.
X      0 -rw-r--r--  root/berlios Jul 25 20:06 2003 f1
X      0 Hrw-r--r--  root/berlios Jul 25 20:06 2003 f1 link to f1
Xstar: 1 blocks + 0 bytes (total of 2048 bytes = 2.00k).
X
Xstar -tv < remove.tar            
Xstar: Blocksize = 3 records.
X      0 Hrw-r--r--  root/berlios Jul 25 20:06 2003 f1 link to f1
Xstar: 1 blocks + 0 bytes (total of 1536 bytes = 1.50k).
X
END-of-star-1.5.2/star/testscripts/README.create-and-remove
echo x - star-1.5.2/star/testscripts/create-and-remove.tar
sed 's/^X//' >star-1.5.2/star/testscripts/create-and-remove.tar << 'END-of-star-1.5.2/star/testscripts/create-and-remove.tar'
END-of-star-1.5.2/star/testscripts/create-and-remove.tar
echo x - star-1.5.2/star/testscripts/g-hdr.pax.gz
sed 's/^X//' >star-1.5.2/star/testscripts/g-hdr.pax.gz << 'END-of-star-1.5.2/star/testscripts/g-hdr.pax.gz'
X‹Ò"e?íÓ½
XÂ0ðÌ>ÅQ‹´Cõ.	
XB;‰à ÒH5¶CQiúøÖOœìTAȏƒIà¸áŸ¬u³¨Ž¹®ì„X?1–	Rü£ã!‚R‚8'ÁùힸB	û‹=ëºYØý×]ïUàÝÿD,!Ͳqm*£­™{I0ýån'Ý@f£V:·°1Öèz[†ÀE„Óˆ|oÀœ¿VêCï1ëÊ?¾ò/°­{þÛ³tùwÇéÍnå$±
END-of-star-1.5.2/star/testscripts/g-hdr.pax.gz
echo x - star-1.5.2/star/testscripts/gtarfail.tar
sed 's/^X//' >star-1.5.2/star/testscripts/gtarfail.tar << 'END-of-star-1.5.2/star/testscripts/gtarfail.tar'
Xvedpowered.gif0000644 0000746 0002044 00000001006 07303467402 0017225 0ustar00jesglone0000000 0000000 07307676247 07503574407 tarGIF89a€$ñšÌšÌý!þMade with GIMP,€$þŒ©Ë,£œ´Ú‹ól¼{£…âHZ߉‚ÀRmép|¥vÇæò;Ã|_¹	»à!“‘¡óðàµ^ºˆNV¹s+¶šåv«ÏX:ÅnÇßp;ª^át»l;«©û8Øíh¥eñ†—¢7'ÇȆ!ÖhW7¹%ƒˆ¢HLj¶9Á·¸YäI#z‰ùQ¥šV¤·4È÷ù÷IxˆêAË´Ë»’ƒ £àÅÂ0Ù‹Ì|°<\l\™<íóËlm ýJýÒ̽Ý
à¬
žN"ÎNîN|í­>ïŸýnŸo?.O°]?ûüÔ0!œøÎħ0"›‡µ9t(1Ý1ÎK;»¨/#¸ü®Û­¢4‘Ê&•W2DGiÉšuÌU½J«$¼DiP¦JX^&ºêÃÊV´…„8êúÙ/&Ž™ŽZ‚%ŠNN;_ZaÅéR_Êhù:»—4µªj‹	È“õ™}û6m׫I‹’2ª%nX©c½Ðv6/O¤W6}…N°O±
ê–mjÕêVÆb6&®çÆí\)vÞôë‰ëQ›ˆ™b&­çš}LwE
˜hãÑ°?|f™¬·o¼Àƒï@teñÇ‘]Þ«;cd.gif0000644 0000746 0002044 00000015251 06331237204 0015451 0ustar00jesglone0000000 0000000 07307676247 07503574407 tarGIF89aed÷ÿÿÿÿ½½½ÆÆÆÞÞÞ{))ÆBB­99½99”!!J{91ZµRBÆRB½B1J9¥1½R9s1!­R9ÆZ9„9!!ÆkJŒJ1œR1J„cRŒJ)µZ)¥B½JÎ{JÆk9„B”B)Z9!µk9½k1ÆZµR­Jÿ­kÆ„J½ZÿµsÞ”R÷¥ZÆ¥„ÖœcΔZÆŒRÎŒJµs1R1c9ŒJœR­Zµ”ksR)ÆŒBkJ!­s)sJJ)çµsÞ­kÿ½c½„9¥s1­ŒZçµk÷½c„c1ÿ½Z½sÆ­„ï½kÆŒ1ÆŒ)ç½sÿÆZÆ­{έk”{JŒsBZJ)„c!9)­sÖµkç½c½„ƵŒµ¥{„sJεs­Œ9”s!9)„cœŒZJB)„{ZcRRB”s”ŒkskJ½­kνsƵk½¥B{k)½¥9¥Œ)1)µ”¥„νcµ­{½­R„s­”½µ{¥œZ½µsŒ„1RJ½µJ­¥Bœ”9{s¥œ­¥½½µ¥¥œµµ„µµ{­­s¥¥kŒŒZ½½s„„J½½cµµZcc1cc!­­9RR­­1½½1µµ)99!!))¥­¥­9ksksµ½s„”œµ19œµŒ”cŒœ1Œ­s„19JŒµŒ”sJR1s„BŒ½{„cŒ­9RscŒ„Œss{cŒ­J„½Rk!„µ){½k­„½)9J!{½!s½!9”­s{”ZŒ¥ssŒZJZ9Œµcc„Bsµ1BkZkJ9k!{µJ)Z)R!J!1RŒ1Œ­{œ­”ZkRJZB9J11B))kJ„­sc¥JsŒkcµ½µ­µ­œ­œŒœŒ”¥”„”„s”sc„cZ{Zs­sRŒR)J)ÎÖÖççïïï÷Œ9R!„1k)œ!9c!{)½1B­)9”19„)1ÀÀÀ!ùÿ,edÿÿ	H° Áƒ	
X°P9rÊ•c$±\ˆHȱ£Ç .ÌxÑܹtébÅz³òK•(ÑY$) ¤Í›8f,g®Ü¹UW°Ø€£¨Ñ£6‚FÂÖSfÃœP£d( \¶Xi’À ÊÂÈ#]»~eÁÊ‹³/ŠÂ¨‘$Ö9‹O¥ÊýØÐœ®45f5·/•&Fܬ׳,bÀH²ÝÈšs#àVPˆ¼€²¤0ß°`÷’íZXìY(3’¼qJYrdÊέI2£‘"J¾,BöÅhäEþÝ×,‘Û4"©ËÙuNØÙr¥±B†Œ/¸Í".L¥{÷&Ý={ÿe˜,%SˆTO²
XUç7)›«•&™*Vöx9NŠnðÞyÞ€MX`ahAq^^Èa ÔâXkðyDÙ9cÄQEqPBEñÅ(^a( _/ðW^H" ‚2ÉrV(RUômÇ‚lã{Œø…‚^6Vhaí`Qq¤ÇUG¦8âH„æä¨ã@Ž1‡cV—‘ú1ZäõEZiLŠfÄ_HéÅùH¦<âÈ#Êy©#eé\!ƒUŒ¹ás éÅr¤Çi)Vj©›ä…uÞúí!‰Œ‚<òˆ)Y*Î{ƒ
X Nˆ&º(£”Ìÿ!‰¡1,a)»VÚi·Ý9%”j
X¢fÉ$º#èkÐwè†Ô2*kVz1bQ•øÝ_½Æ[fDÐ*I±Åö‰ì¨~B’L9ð4<åÔªbTè•ŒYEu؉ƒnqçíÁßø…JXY£±¨+ê¨|ˆ!á³P9ǽùN몐‰Z!²ÚÞ
Xʼn(A…Ê*+üÉ÷Õ8*%»®)X\ÆñE+Æ¡@·Jí}dX1Ç™úMa²Áà¦Ì—#+–}šIÄq<ˆ~æ,Ž³òâD™.MíÙF7:‡xÒ:’O†›bpO+Q‘Ú’µŸÆÿ[q#æünØ6Q&Ý¡?›½áûZ;³ÒŠÛq‡ƒ¥am¦DƒçšB,Ÿ kuºŽˆ!†–\‹Ã³Gðœ“F=ˆ!ЀTÁø´ü&¹~ÛæÊÂ`¾òÕÄïqÏy­²’ŠuÖ‚ðÑ·)O˜þ'¨¯ØŒLÒGÜ›^EÇ2„Ñê}@‚Z´3,¬à›NZñißX?Ò¼–¤:Ò¾}Ɓ6ðˆ&Q‰T¢sèAü´9°:‚0ÚÈBô‚)øÅ[*
XÏÓäFñÉj5Ó[¶8GŠ€èA%8	x…$ðÈE *ñˆöÀƒ³SÜâþA‘ÍmJX‚€ÿä¦"ãmsàÞ¨”g¬8âgh©¸‡B`š8Æõ>tì¢cú0
mÈcOHãŠFÒJ[$Zû–áÕ10#"Ù§Š•µçéÍb„gŠ0V›0Ä °A8‘`-XaûÆí™Q_iÄd%9H‚HØéÏ“T¢…FAœb”±DÕÇü9T¦%
X±‰BЁœ¸å œÅºs”}(%Ç8ÌÜPQjÜduþ%‰£Q;$Ê Â¼c„ó”‹X}ã÷²¤%GÐHCªÄ&0qK:\±±Ø"B2ˆ(ü œ…8 !g@Ʀ±U­j&£ª€ÿ¦Ió[4Â4&å…0²„þ¼É=J‚q-g’€&DUApçZÌBs{ÝÞì§/¬1‚‹¢ïR„ÁRF‰Nœjæ­f¬Í€p%‚yK[bbtHB
&Š],då0C¢`;hô–!
©¢0©IZA¥Ã"Òˆ„<:Îée{H$–h,oæKçše!šJþà5ˆ+0 ­]ª^›úNJÒ ª3“I7©/AXK¥iâMûÊb7O«f¢ª7qZ#0zÔ›°âJ‡Îõ¸A-Ô	¦Àá7Ð+S—j‡FuíÁ82ÿÔhXŒ²Nàv"Mm®s£#ÕóGÙ¿Ò’–thm\ã*‚¹á'À/'“
-	¨Â¢ )¸³ïfþêP'b²vü²)uÖd„ü€	>ˆ/N¯LR‚ Ÿç²$;S¤5˜šõ(l`ƒÌ
h.tO tp2ì0ƒîpì¡»ÞÕè;[àא"´
Xµ«‚$6dÓHÑ€	&ø„?VûÝ`B
ªÒÌ¿[‹Ã$“«Ùñ¶ÀÀÆ€žË€P@–ðRU2¡…&K8PöîvU»Ù„T¼#Ä)a74…$Ã+~Ç:Ô‘Žsœé`‡5VŒ‡H‚ÿ‰Ï“÷Ž»‰>tÖq
pà"S€Ð|à…ˆãB¨C)ü 	K	Gj7Ú+;ô£R#µÆÐbkhÃ=ðµ¨CMŽs<#ž°$þ”,cЖ˜&
jä¹V È5Žèa´
XyÆ%zq‰K”¢ˆ@„ôe{÷­4yÛŠ@1djðD4¾6€xxûÛ߀¸é¥
DÃÍ'Ô©8!j˶Î:
¨À\À	PÀÎ@â+6$2‘E/>ðRÉnt*|„Ly£–¶s!h0Â0ôþ°:ºýmyxüãçøà¡TO¢|ÿp„ Ö½‰\Òà­-˜ëžkÀàG| !”‚
lÈÄt€gÜOz)’Íè
XŸàÛÝ.Ä/À¬Yåàx<@Îõw[Üæ°Æ'ÞÐÓ¢ÊÕóãm›ë\ßñ:!æWP ðÐ52ágé}ïûÀoA
XR âÉ7xzÿ×`¢
Ÿè9:q‹»ò˜÷¶Ç1?€rXèƒ!4‹‰ÖþÁ
h@ô¡›¿ýfÃÜo
BPï`ǃ ºþ÷¿¿…ð
ßh§CÚ•¶²>ñŽrt\£†ÇÈGmyyT^ÜçðG'Ú=Ôì¹X½ÿëù¡€Llh!^±~j¸îçUÈ!Œä 
ø'4¼ÁaüÝÞàÐà„G|f€Š÷V6p¡à	é€yw}ã&}(Ýf}–WnuÐ-sñVÀzü s
X °—¯ð
Xî·‚ÔP
-ø
;Ct8°`8p¯
Ó@
ÞÀƒü€Ð
çl]
—ŸÀ
ðPy]àÆy[‡
[p`ágs0‚%x~B`mÐ	°‚ßà~ß0fø
Õð
é@(@ƒ4؆5xø§‚ãÀãp{ü„„·huppžpñ›×u#wˆMrâ¦þ@«ÿ§ûÀó 0&pÂÀ~ÔPiø
ž8hè‰Å0Š¡ ñ¢¡°ð¬Ø†­Hƒ8€;è~fx‡y(„¤P
X[àÊ }QÈuñ¡FЄ×ÑP÷°ŒýÐ@&	8†Å†Åà‰Ø8Š©
XÚxg
XF%Ú
X 
X¡P­¸Žm¸C0g ‚ÔP‹uÈÓà	(nM8}Í!¡VŒ¨ˆð°
ž`ö`ô€
XÙ	x°‰£X
Û8ŠÅ
X¡
X[À
Xx€ ðñ²
\ÀŸ’$	
X%p’阒ì88°ÕP‹ß`n䠏ց¤&Òÿ×u×LjÖ`Ù	9‘Y‘[°%@Ž °‘x
)’!	
XÊ@Ï°ÉxŸp•"y•Wé	#’€Ž%ðéø°¡P*öþø‹^÷`á‹y}èà	I‰ÜXŽåxŽåxM¹•Lù	  •X	
XÜ@Üp!ù	\É•[©˜øÈ•\°˜Ž©•\ð•\àJHˆ…ˆ$ y\'}å
ŸPM™˜]I™‘‰€©•Œ‰•\ ñÂ
Žù˜¶¹•·i›ºù˜+¶
¡ŒÖ×™ÿ`[Ç–âF¨†›¶™˜¬Y›\@š!¹˜y”Ñ
øøb×™×ébÜùbÝɝ۰–5ÿ¹yÁxQL#Gkf쉝#9™*™NÉš¬’ÝàÝP›»™Ø‰º)˜‘éá©™Àè–a©ˆ£éúù˜Ÿp€èš]Éœ’‰•÷)ܐ•	 
X¡'‰Ž)™Žª¸€™â9žg ±„:jæÀ £$yÉH’#	¡•
ê”!Y˜ Z™1ú• ¢°G:¢ïøŽm€qÖ/léuCÀ	}ð:”çø¡a	–šD
X_9¦Dz>
X’CJ¤`	¡ÞøŽ©À¤sGö7PøÀ•ŽQŒQ
X}a㏉8}ìàx€E‰ߘ‘¦‰ÿ
XEšŽ	`¤‘žÀå”gY
¯0
)Ø©ì'{lP§wZõ€¦Z¢FE ]/¨ª\7r`9 	[ðˆj–丑uiš«	ð·
XÚ/µpžX
šÊ©œš‚s×BÐ9`§ÐÀ`àÍÇ¢}
X°ú›‰8ˆðÀŸú ‰¤jø°ô@·z¯·ª”I‘©€¡°g°áÌ:
ë©sªÕ:#°­°­@+𠐛~p™ë¨›	ràq›ˆÃ¨žÐÀzûp’Øùø`öP¯2k¯·Z”ÓÿØ	„†¹°ِ	Ô ‚™@j	&`@ `LKN»+ .`±`Š 
X¨Ð	·3™ˆ^r¡–žP…Æ°h»Œó@ª¤š0+¯ø·ô³Y´Phåð Y ~[´•È´#0N«QËRë`ðŠ€
X¨À¨à® ˜ì°úµj‹`2V¶†k!‰);¤Ë¶¦kó`
X`ý`Ü`ÿÜ ² Y&0
X # N»P«<àŠŠ ª´¹£Ð¼_
éC]‹¢^ˏå¶}šÅQ
W‚€¶ÿ¨¶k»¶õ0Íx¾ý Û°Ã)~›>ç§ô«;ÀøÛÄ»¸W«
X´@ë£`»°«`
Ú––;½˜«âø	ÖzkÕT­u  zûð½h;ºó …“˜¾
Xк°{è @Àoõ»]ÐÂ.Æ{¼þû¿¼¶@À°`«ÐbÛF‹“_{®ðžÀð+DKœÀ	WTP§xõvß[Å‘8‚X\‚
XPhÃIð+hÆnàÂ]°¸pÆÇ+
XÿÀ5LÀ»°Ë`qŒ
³Ðbž 
å6Õçu,æ þÀk€rŽPEgT-`ŠÿÜO],ú@ÅT|sY¨…Ó5œÌ Æn .|ÆŒ›Ækü¿Ä`ÃǐÇÆ ÇØ°
XÝ°bÖÀ=A‹0Ë‹À‹€ éÂ	8…S…|HãDš 	†@Øȶ`öv”|s /ðh0ÆzPÍž,
Xج
Xþ«¼´0ÊÁpΩŒÊ©l `–qϐQ‘
µ ñ)Zc
X3b
X9E	Klœ0NŠl-P
WÉ|ìà± /`ˆPÍz¢ Í¡Ã¾°ÒÎË€p<Ω¼Ãþ•Yp™/
ÖÐ
ÜÀ
Ý@š+ö	jÿ’@*öcÏo6E•P†ðS˜pEŠ|eP†ðE}¨uàv¥–°É‰ 
X­¼ÉÊÄàÍàÆ "
ÖåÇV&–xÎÝé	x@+¡R#N„VÅ’cKlE¥'Ôÿ\Ôe€epØ…„Ct§V¼°°ØÿûÃÐÒ°ÇÒ"½àÖÈ Ç%m45^p+`ïŤí×3p÷µh%KóC*[£<úlkÔAýφÀ×e@awfÐ%¥­ÀÍ´¼0\
ÙÒː•ΙMÒæ1²['s"_±AGd4þ•Vöÿ*ùYÿŒ	Ã<
X¶}ÛE­Û³Ð™ðpÀ ÜÊK[­ÜÒ°Üàpß™ýÜ:<Ö5C	ŸÚìÓ[çq'À%\‚ðAøÃJàQ£0̘`Þ‡`p£À
X‡0;›ä€¿àØÉ]ß“}ß"~Ùb-ǦǨ<:Ÿ´[Ó>F´ÃÂG¡òA8;¢	•°…м£@ÛÍ;Ô‡à
XäÀÀÀðØõ½ÒÐËÐÈ0â˜m"-Ç#MSžƒ'¹a|0Åáwâßýó<É21V“ã;þÓ
Î
X£áWpªCäåp
ÍÝäíé€
Ø â”Ýã|ÊWã9ׁ1 à|ÿ5p=¤’.Úô\“,œ­Ï}`ÞX4̶áÌÀ!êáÐwžÊ—çOnÙ!]Îü1þÍ;AT9 q"
X2EãS$B{"éVóÓzÍ{šÀ
X¶À
Xç œSá¢ÞؐÙzŽ{ÎÜâ\μNS”V€Y.<¿Ùí&¨„7­ëdBc51ðE»À㬰é ÈÞd†
Æؐ`
íä\ÎMä!“Óàr)€1GðÃ6ŸBEcÎ'WY|ÀÆð§Ü»`AîÛí®ñžçÏNâ`
Ò;ÌëÉbÖÐÄ[. ÿþç)0NE{cP	ß'
ïðÿ¿°¬°†7â ò®ç{¾ñcÎ/ïD’píÓâ~!Mâ¡ vãiÞ¤2݁Îë‘nÎ%}5É`ìëtë€Ø@ï÷MÙåè:Ü?Eÿ(·2OB‚!]S$c44~5éÒ'3Ý
¿ÃÆÀ¯ç±ðäø½ß©<:ÄR	0
X¢X•CDÁtb7ùîžóòæ~5œ]Ò•Jïõ.Ò̝ÙÏÙtß!D’Gâ>d1<DdGŒuDr€MÄrcvã˜ïÓ½
Xê õ‘âøÙ(ÞñdÕ(E2"º’2‚Q)ì3ëGäX³Ó¡3*·ïñ_¿ûs‘ë°
X¹ÿpÙ§,Ç	?1?âÙÐô—ãR.^‹/"wVzcîRÏÙÖÿ;ËûtQìpÙ©ÞðÓ
*=TÅŠ—"J °XÒÄa*%N¤bÄâE‹K¾lÜÓq΂Dš‚ɘ#cƃ$.À?˜1eΤYS@¹u«¥„ôˆ$$Sqâ|´BF‰B<tHÑ)Eˆ¿x!C¦JSYK3…MäÊ7꼬YÖ¬LäØ3©²dV¡s&„²Å]K™>tº7ÆF%Eª’™#Ô% ¦¾¦D&NÀYȐPwL壞B‡î±R¤ÈÆKðŽÖ»×t#£‰x&ce¥ÃYM]V¹*ÝÿãȹÍ
Xȉù‘PAsüò9tË£ï¦6­œÅ(D”ñâeÏkØ_Eª<v[÷÷²Ð%ëù[.UÏu²01ujÒðßוÚqOAùã|mY7xÑ*‡Uâ®
X„貋¹Ó˜ªÈ½‹*jª8ÁZ«¤¬YE,²ô&H'’¬8È…ìŠÏAˆž¢¢ÅQûâ¨)ˆ ¢5áòƒdtÆúðǘÒq®cXN9ŒL{qI‡,zá9è«N«zà1€ÿ€ÔR¼Z’Hñ¹»š`Ï"Òž„ð½'_xò®ºŽº‘Œ ÉÅ?-ëDKFrÁ@	Œt®I÷ð‚o¹÷,Z¨®Õ¼H†:ít4&,Ï©(b3/L1-­AŒÀ¼K‰zˆ¥ÑGKñ¦lÞ a?óz/>2Étn‰PÅ0g²MÕõŸ`d+`ˆÁO	%4µ%`ˆdT\wu–&,(‡1zèaÕaYÕè¯f ÁZ1)'ÚgË5×ÉÊ1gZFÚmw\ts5÷Ÿ€;DSCN0049c.JPG0000644 0000746 0002044 00000101112 06733677342 0016160 0ustar00jesglone0000000 0000000 07307676465 07503574407 tarÿØÿàJFIFÿþJ
X
XCREATOR: XV Version 3.10  Rev: 12/16/94  Quality = 100, Smoothing = 0
XÿÛCÿÛCÿÀ÷s"ÿÄ	
Xÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚	
X%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ	
Xÿĵw!1AQaq"2B‘¡±Á	#3RðbrÑ
X$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ?þHn4;Yäó¢Òä¹·|3Ì^·ŒyJÆÜ%»ÈÚ‚Û=©+²ItñZ–¸ºkÅ{šô?ü0›Æ¾<ð‡€EäÑÛxƒ_Ñt¹.åwŽH–{Ñ­ui=Øx%xÝG§¡MJæh|¶í–+kO‡4OjšÊÝi jv0ÇfÆùš.=¨Iòm¼¹#‚I]ÄÑ£%°š+)üϧ¼ñJåâ°—Á^¿ŸP±Ô´ÿCªépÜIsa}£2N¥™¬¬¥»²µ†oífû-Ũig"†	¬>Ì2œÊÝ	óS+&¥i=o9©µ;rÙ(ÉÉÛTõ\ô£(Î
Xs*¨Ÿ/#¿*Š´t”e=tMZûî¾ãø»ûIá:ãÅßgÕõ‹=2ÖÞ+­#X´Æ°Œ,£»ÐäÑãˆßÙ¬Isu%¹ŠÖ{M.ÚkøÆ¥m¦‹È2¼O­Ýè^ šÖF2:ÈþmáYMÔ³ÜD$š·¸dFh¤œCºêÖUa'Ï.«"ÿ_žømcâj÷ÚbßZaì<A¥Í&erkVKªYÇ0µ‚1$VrI­ê	wIi§[´"ylÜþ1~Øÿ°Æ…ý©7Ä=5
Ù]…‡W²†ÃM´Ót-A.®
X_iºd,óÜx~ê/앹ÒôÛË»½^¾º¿«Øj
a¦|î4¯€—¶Í£ˆ­ƒ©F¥ZP•Z˜iJ|´ÕHEkMêԖɤ¢¶=´”åQo^Ô✡Rê.ôîù¹–œÑNWÖÖzŸ˜Ú&«g©I´3ÆÉ"„œÈƒ|Ó-ØRZS-°’8¥’Nb´ºšßå‘-×vÞ¦Qä›Øµ»B	[‹hÍĺp’¹3³×0\ZXî3jΊwi®-­¤½ŸÍz²~Ï>6Ò<C•¦jÐ\*Ü2ÜJ²E,iiswb‘È‹,©;Ùݬ¥oÕon­þÏg4›íå‡Ä†þ"ðªè¨K{­ÜkSëÁ
XÏw$FÖÒXÖÎHíîá‚ÐO%•ŒÅl'½¹¿[›H-Ô^is\û4á—ã«FTqö8Š|´â©Nr¢ã(¸9%ËÊîåK·WÅ8{åZ”œ¤ÒÓN.Q·4âäÚVºÚÚ%{h¬^x›AiíÛD°»ÖïgkHå].’Ù¤XȘÝ:ºB.'14Z][4 [ËæÈ~Ñ¥–p‡Å·‘‹h„~ÒÁÄMt/có–éÖIî§y,ã–÷ð½«6è óÜyeÃyö¡{=«µ¶ct–ÐÉkÜÁk5±†y Gh‚@»àA!žÞ5šK™]c”=ÜòÜÄ´Gw¨È˸ԒùǻDw²Ü4~EıˆÌxX|£›E„ Û¥œ¢?b
X”ãF4J½H¹Y©òµ(¶öŠRwÑîa$£ÎïvÔ^‰%¥’ånI%}Úòw:ÍÀéڽͬSÉ4͈äyÒiçŠV”@TxNûÈr¨!·bûẇûÀºµÖŸX^Ú[kÈmüß>ò(È2Ln#Höì–“,Å7ÞOœ†‘ïLzE¬…>7°Ð.´Ý.ïRº–âÒíµmÞåšÓì»î­®u;¤t•fÐOlÖ×ZÃ’ÎúÒâ;Ø¥¶ÓÒ|Yâ>òKT¸Ôæ¾Ô`±–ÚCe Hî
’Î'x„rL[^Zyj‚S-©ŠWSÉQòüQؼæ1ä«Ož”yk)Ó“Œ´½¸%«Z;Ë’Ú+³í8g‰°¹T§Nµ:•¥º”e*n6wÝ×5Ò”¯unë_©.WU¸ÔµT´šA5¼Fæ3¤–Ò4R;Cum¥ÜFVÛûA'{KHgŠõ‰ž4„Æ$O»ñgŽf¼‚ÒáåþÔ¹‡bY_!–ÞþÝãþÐY4ŠZQ%yQæC:[Ï%Ä‘¤É'£èv<G¦X]xkÂzÞ±iÓØêÉe¶ŸçXß­Àiõ¸,/î­æŽâKÈTÃyo”·k‘Êx?Áâ?
jW>"ÒÛE”3Íjš|š|p-³ˆ'Õ´³rβØ]Ú¬¡e^z²7¼†Éäøü¯/©…öØ\fŠª£óR«V)µçM^Q¤ÓSpœc.m¬’GÓc3>&µVŒ¦¦Ò©	ÎP§*r÷œ¹›q•jmÙ4ìôºa¦jÿk[£®Ø>—z'‰fŽÒÂ+[Y%†á-®¼±"Ü[«r`Xa[{{ƶY¼³Ä7wzö“¾ö²Ÿlt%[„°ŽY-¥‰d,…D¦ÞÙî£Ù!ˆJ]-a”VñPeWŠñ%–ÒYåNÒ"I	†3Ó´‘9!˜KÂ<¬÷oÏŽ«i·1É«ê~ÊóÏk§ZÂóC$‰$÷L··î…/mŹ¸ÞVD‚[È‹WÚ¿_“dõpXºØÉBTc(>JTÔ¹#.^TéÆpSŒuRW“K[]h|þw›Ò¯„Öö’ö–IÆš©(èïQÁAI+r¤ÒºóiTv2΋"[Ë"‘°;¬hÍåm²ÚNà„¨3L6ãl².×%C=´ÒJïm|–Ñ6Ò"Yj‰]
X„šPó"lj"¤9‰P’¾™b±‰%íj%¦žÇm´Ýyþ¾'ž‹w´]úÞ:ü:í×õ]ÝþYŒJ&ÜŒŒæ6u,¦5 Gó¥‘X’ÙPÄeÀXÙdæ»Ï
Xøã[ð«ö½-¡!ÕàÕ4Ëøe’Êî9ahä2ÚJëO³<IµµÌqÜÀhãŸsj“=”‹um ŒnM–’tÃLWS*H"}ÐÞÇ:­¼~KÖ²IpÖ×oz&”3ž8§Hö¿™ä\43=²¹pâ7Yâç{ÃæÕõu£
Xô§JqŒèÔ…¥Ö±’ÖÍÙhº^éíä{É©+¦•ï}tZY­íÙ>Ö¿_îoþ	áã¡ñ?àíBöêÊæðx4YµjþÔõ?µhú–¡¥IklþÖu}1¬5
:ÂÆå£Ômô#c:Þ´tè÷·>ŸñËᶃ«hךuÍͤZ¬ö÷e²Ô~ËwÜRÛ@Ÿye<óé—pΤ¥õ¥Óîb¹û%ÒÌ.fº¾üœÿ‚9xëUÒþ
êúm•´Ú‡†tëþÓÁ—s‰-tØ<Muq¬éz•ôú}ŠËsãÝÙZxfâån|VëíWw	x–_¯Ÿ¼E
XÙßÉâ
>sqq9‚ÏF»¿¾,ãžÐÏk
۝ZÇÃ÷{ã77ŠóI;”†¥E´V±Ÿâ',8¬%_i
X0u(ÖueiCত¤’”TlÓié²lp…x{¼ÓF”ù­&Ó\­´ä핯ª×f™üÚü^Ó¯<âÝ6ïN“UÓ4MkÄOáËM?Mñ)}[ÃúѺ€Ï¦K­ÜG;éº\–sÛøŠÃUûVµ?öv²–‹6¥«x[ÄÇåÿm­õ=sÁ鏢^YèÚö°ú‡ˆcn‡d¶>ñƧ¯x~ò9\Ç&µkká=
XK{{˜CÍ?‰,.¤k_xÁÖ׿m|lÖ4ÿëzå½Çƒµ3Rñ‡…µï	ZøU?·u}s]𮋩é–vÑ º†÷QÔ/´ÿi&ÎòÆÿN°6QE5½Ž£yg7ÀÐꚿĉWž71ëÚÁmâ/‰>$è÷ñI¨hƒBдöð§ƒ|Bt}FÆe“@yßÃúv©6¦öz^£6¥ðöÎæc}.aÉå
XŽ¦&	ÑT­:°œ\ç8¦Ü#Âq·$×»*v½FöµôÆÔ¯YÆ|ÜÓI)ÞK‘Ù6¤’|ÏÞµ“×fîxŽ“áMJkG^²yÖÒ$jº†Hì¡ÔüKicmóZ›k-*ïDÕ%½œÚꎙuvÚN¥¦Ão±’-:ªø/HWkéoSQ‚òËC[=.ÖÔ\^^ÝKáyïüC}‘á‚ÃΖûH¹Î¥õÿÙ渳·±¼ºŠÛïÏøÓãö§Â]wÄ—ú¬Úª?„nu»Éï^²ð^§â›ÉõK›=
XÂKëË“sâi¥¼Ô.4Ð.Ö;Éu½fKMnë^¹òÛëÚÕïŽþ)øçA¶ŸMøgâ»/Ky¤j–7:ni­ê×úͬF‘¾«â¹/´íAÖ-¯¬u=wÚgˆ\ŸNÕ/4‹·÷+ã)Zñ©QòÓƒP©u7kÚT¢Ÿ»³åIÊ+ÜÒ×ò}‹Œè§9J\Ò够$ ¥oÝi7ÕãvÝšnêïǼ)ð¾ûSÔâ›Ä:¦ý«*éþ ¹Ó“Z{mCÄ#ÃSër]¤5ô·ž¾ñ
å´ÚEõ†§¦\øÚZjÉâ=æø^}ðûá†5­6ãNmyW!Ö!Ñ¢ÕFõ»·°ÕgÓ­Ó0h–“\ÙXÛXhË{ªO}5•ì}嶒4ëç·ìü
à=3_øâK´Ÿ[jS[xkE6V6>(ñT_Úi£]XºkþðG‡5õÒcÔïï™.¯l-n´M:ªI«jº7Üß±çÃ]_ÄÚBø«\³Óå¿ÕÚÚæÚ)-­J°²†+ø`Òl¬ì![{}*ËO‡FµŠ2ƒI°²K(溴šÖ¸þK3̳Lʶ—וˆrö²©WØÖ£F“ÖÔZwŒn’»ço›tÛE–à–{Zôá*pµGNŒÓ”¬áÔRr×I8o¥%vŸÿféo<9i¨M¤[É%Æœ"KkpÖQÛ3L¶ö[ZÞÎî+hÚW&X,á›ìâ7‰eŽð»|ùûW~ÉVþ>ðÎ¥¡Ç§é6>%–Ýo|)rÑ\[6‹y
Η–Ýý…ä‡H¼ÛÛj†{d·h¢Sšâ%¶Sï_‡|1§x{@ÓæÐí­%¸¶°[²â8n<;q’Vû<äz•ÍÄš•Ã-Äh½‚hmçšD’w±gQñÿízñMIã†êòòH´øàŽ|¤f{¸tûu…íÚ8šD7j-§Šy^Xdšå-£–Ñ^ß¿áx.YŽ¥z˜èÊœç]Wä‹ö’‹œª7»vøån×Wl屢¯™ba…¨ãJ…¥ÁBOÞi(Æ**ú>½,î쮳‰-n_Êßlb-$Ͳæ6Œ¢yR°ÄÊå÷n8@B‘ϳxêkËY.¡†ÂæxnRáç¸wYK¨“çwFó–	3£’X‰‘˜Z<¿cº³ÇøÁ¢Úèß> Ù}”Û$1ñû1Vf·Iµ‹‹„†9$HeòàŽdX'žíA#,k+B=cö}‡E»‹Ä÷ð[X•‘ä·†yÂ[î6æÜÏ!]òI1Xã“ÛG`Ï(£ã±´ã”Óƺn¤eF”ÛP¼œj(­9dݵ[;èϵäé)Ê>%t×#é¥ú+鶽kXñ͆§yjÚj]:K½æ]vp^t[‡ŒÄc%Z”ÀÌI24fMÍ¿$¯|¼ð‚.nîg»ÒµÉg–âf2Aw:@ÑyŒ-ü…’	d0‹q‰¤–I$Œ+»³±$¯"žg…pƒu*¦áÒ–!¤ÚŽÏ²¾þLóÜ1)´ëIÙêù÷Ö7“ü{ŸÞH×W!ˆ4Ò\+ 
ìûdFmѨ$`¬¬ª¬6–ìô-'Ë/tð€ªæ&tK™ÕbÌhÍçFbU“Êy$ŒÛK¶…‚ÄB½?xræòúÞhš+s‰ï¯#˜YÅû¹o ¶3Énmf»¿u±[¤ªgò¤$ÃR>‡øwðÂxÓH𽦽ö÷ö³]\I^\yoÙ¯.É·y’÷M:¥Ìò*[ßK$S´Q%×Õcñ¸lT«R*1ƒ¼Rs—º“ZAKW¶©Eß®æ®Ss§J.îVMjÛZ]_–Éé¦Î×jçïŸìYàÏ|ø#ý™ ™5]WÅé:î¡o=¾±©YB±êšÅÍ®¯¦Ýië¦[\Ë¡iz­òÃo6±Ÿ§ÜÚèÑ][jÞɪüuñÄOJú#é±ß¬×q¯…d¹7º˜Z­éÑ‚[Aq§ßË<’iåµiô;‹ói¥êšˆ °»½ÐuÍR•üMÞð^‰£é©¡ê–÷±\­ö•gª]hÚƐ·M,š¾§§jïq$f÷^ºkõ¹{ý.ÛR}{©*µ­Ç®ü5ðׇü-¬é^ÓÄú÷õƒyq¯_\ZÜê^)ŽÞMX­…¶«/‡fÑôù¼5a«ê:ÖŸðk;=|C¤7÷ßkü–¤*âÝJó•XS¯)Õ¨“öñ‹•9¦Ú;ßXü7÷V»ô¹ªN	ÕäjÑ”¦œœ¬Ô ×våk+òõ>}ñï…îšè^’úïóøsLÕ¡Ôôý'Ä÷:¶áïh:Ž½eml|H<Im·‹îVÒëGkËÛ—Xôù/¼¡·Àß²wÃýsWø§ñcáw‰<$<We¯hÖÚ7ˆ|Uª]_E§iwPkZ~­¦ÙßÞß1¶±Ò|Wokqq}ƇªêÚf§Åw‡¤ñ&ÿ¯þ/jú?‡þ&XϧA}úø‹Â6iÿóÜ[èvW~%𿉼§j–LI¢É,7šž¨øÆÛPŠY-<7¤øšú‚
X,-í?häñ~¡âëx§áï†o<@–Wq	ô}Æ×V~𧂮´­;Ail<;ñM_xÀMh_Áþ“ÃiñŪÛØhúâ†;
ƒ¥Šƒ„é*´aJ3Pä«QRö)VSænM¾YÊÊö‹¼¬œrTçºQkVÛ‚ž–Œ—*m4®¹WàqÞ
XÓâøCðcQø÷¡/Š<Eàm[Ò~j~#½†æÛÆ^]]ŠÚé|Emr—-âOÛY¬~"m{?x›NmZûW•?¶xOٿᏊn¾ëÚoÄ+]/Nu=OTðD>%¹Ó,.mî4«ýíiã
.{¾ŸOºÖ<'Œš6í"ûHÒõ]Äð4&ãºo‰þ×ñ/…ll~xÂ6¶·zrEã_…¿<u&„úf—‡´¿è¿gÝCFðþ‹&™ý“yáox‹á‚5kÙ'Ó¿·ï.‡ˆo,¿´æÒš¼S£x†ÿÂÚç†'½µøn–Ü[Úi–7QjrµÎ£¤ën­cc¬iúý¾ÍTµð†¡â½*þÛ[‹WÑbð†®lïu)´¿ø™†wB†]V‚ÄF•zË
R¥z‘šÄ”eÌÚJœœi©µ--Ë{rû7:íÖ…>xs8®OvR‹WKšI´»½,Ö§gà«KVÿNžÖþ-+M¾Ó­LÕ³DàÛ^ÛK¢^j~:DÜ\ݝ_Y}>Æ×P·´¾±¶5‹é™ÿI¿gûÑ$)¦Å¨øs]¹ˆEYèZÝ•ãéztÚu¬¶—Ù°Jö’Æ×:­Ìñ®›us©FÉq9:ÛGnŸ#ÏáuÓîl®'±“LñŒ~$Ö‰5;_@ºV°t«Ña|um;÷—
¨Ø§iúM«jZƯjš~‘§êaoµ}rÐÇèZ_ÃöÐjrÞë:¸Òî§Ò'Ò¥›Jѯ­#ºÕã·ºMzÎÂK‹Spö–WRý¶=@iPYj_ÙÜj)¬ÙK©øØÇ„Äûl6"iA¥Î§
Xµ*)ÍóN¢«UÕ¥u¬R…¢Ý×+v=¼=ZÕ(Ê5¢¡NöQ²ŒÝ’K•Ù·ö¤Ý­©úã¤ë2jÞÕl¢¿m:ÞŽÿX’	®–#4sÜÝ	v´–-e«öµ–êDÖ/mdÒâµ¾‡ÉkÁ!ù+Æ8ÐOŒ<Ok¬
+WÑSH‡V¿Ô.,ï4ÿxQVƒRÓ¯,,õQahòÇ
嶝
ÅÍÉ‘/`Ô´è4û›ëvµåü=ûFé÷6:}½ÿ‰4¨+‰¦½Ùcž¡qmy©iÑè‘ÞÉgyu<×¿ð¿Šo.õ9µafº¸´	©ßÁ<±Ü|EñSÇSZx÷ÇÚ¸–Ú›ëžðDϨéÖÑê6§N[ÿøØYØ	'–Ú[mJïO¶‚…n¡Ó­­#ÓÖâÙ… ¸úùfq˜9QQ„Û©—ª¹Õ8E>].Ô›iAAÅɹ6¡ev©Ö§‡”¤ÛŒâ¹#+^Qnܳ‹Oݵ›zh•­«?¿j=FÒ<ifaÓµH|K©xwC¾ñtzŒ7–6·¦ZM©OiÕ¥”­m4Ñ4’ÏR[Ëre×
Ÿóß…ÝA}xmf»°
’ĺBÒL‹1ódSl%XÕ{s°J\I¯«¿m?$%³Ô£K¿²jPˆ,çk(ÿs-—öt-“Z´qMx¦ê?Üʲ]Z@Éhïi*¥¤%xG@×u}7Å“i7ðXØèZuž£âB¯%¾¨ú-Ö³‹³DWåio5+(Þ/)Þƒ¹¤	ql¿o”ÖÂLJèSÅÖ„!N4èTZ¼ê”ãÂêòRu`¢Õ£&£$ÓG$ùëÔ¨àœ›“—»{4ýöõZ¥·-³Û[z-ι-äòÜ6­d»Üª	ÙZQ_¹‡.—Ñ$ˆaR¢–"’!e`įª<'ûxãú\ÚŸ‹ü ð?ÚáÕ|IãXuæY¥V[”±ð5Ŧï—)$˱”HÅÉ¢»Y9põœtåq…½Û5û奵[hºY[Èxì©I§RÓ³ýÕõN7ÖÚëÃÈø"}Ë)y±a£iÏ–*»>!'xc]í$ÂhÖfÎé<lßmþÃm¦hÿæý¬ÏþÍnMBÛQÕ!³‚ïNX®íÙ¼ã%½Û^¦–`Ôcó‹iníîoô‹K†¹›ãe¶Ky-Œhëo1‰NÒ¡’$·hâicžX[thò¤’¤ÑFáCK›ê_ì…û/è>ü\ºÒn&¹ø‡àÛýÄZ{Dú¾¨E§Ii«Ù>&£m{©Ãªh:ô"÷NAwá{mWFñG‡õyôÝFK+f›TìÍbªP©II9JŸ$uæå\Î<±¶ékÔ—]N¨NJ´*4ù#k/æI%~kÇX½V¾òõgßÿþ,jº—ŠtéõßëמmSEm?]Ñ<#¨Ixþ×ô+[ßj^$ðÜMöÝ>Ó\šþb—š5Æ¡¢\Åuoe¦‘y§ß<_¦Ÿ³ì•ã¯Ú›âÿˆ4¿ƒŸ
Xõ­
Xïᧉ5KïøÏ\›ÂáXn4½ß\è”—·ÉyŽ5˜%ð	´›ìþ#Õu»¯Î÷n‡á_ø›Ãß4ü3øÇkàíKÃ3Ë‹#ÚÙh>½·Õíì48uØ´Ë¢^ˆŽ­b×öÖš_‰^êÖóJ“KžÊ+µxá-V³ÚþÐþÇß·¯ÀoÙÇãOů‡¿žÿžøåaâï…Ÿõ«ÍZ}+Å>ðÒkþ3Óìt‹4MBãQñ‡Ãˆ~/ñwƒ¼]¥›˜u]2Í>êZeˆ´‰µÛÏþ{Ã/Â<-|׿,ž'Ùcjʃq§F¯,ªÖ­6ðô*ÔöQ•hR¨é½e%*‘×0iPªð´ï](J““sNÒƒj*œg+ÙKšRR8ÉË’RŠ‹þ~hoØgâïÂ?ÚûÅÖŸ|5­x&ÛÃÇÃ~6°:¥õΦÆÏXIÕ´OÝÃq£jV7Z®‰>'ˆtÈïm%Ô¼sö9Sðí͉±à¿Ÿ>$ünñÍŽƒ§xŽËÂwVÿoµ­oÃat©õ?@ð?Æa©øzÙ5M9'Òí´ˆßbÕ5¸uw¥XØ%Ô—²Í­ë–i7ôÅûYÁAfÛ7^Ñg…"?éÒÞ];ⶡg6…w/ŠßÁZ43Â:v£mÿ	:f±máÍkBÕ—_Ò´{»[KOÚØ> èú§Š=;@ø+Ꮔ²¯‹ot¨ÖÿQÔ4;x5ˆ#M*äé«®^_Ã¥ÙImÑD¢iÚ6Žè_-ÛjzÛb¸{»«‰<Œ—-ŽkšæxœcC5áÊ8ª‹Ž¥J­'^§_	I{E*SnŸÖ¨/a]&©ëÒ«ˆ•
X0§RW¯5ÞÑu’jrJܯfã4ÒvŠz1ž:øM{ᯃ¿ïu2Ú¬òiþÐ|+8·÷è
îí|7¦^ÅxöÁ¥Ë6£ÿ	N¯¦Åi¨4ñ<Z- Òí®ÖãYä?e_€^1Õü‰.¼6þ-Ò.à}M±T´1ÚG$°Ã§jëa
µ½¡™ïm4k¸ÛOšÞæëFð·‡ô‹Ko`n-Ym¾|=‚Þ-ñ‡Åu:Ã?Ù^êÝóŒËÜV’ɬýŠ'†d»kz÷Z}±1µÔ$N.F¡·õ»þ	7ð£áO¾j_5ŸØhÚözþÒ>꺆Ÿ­i^ð¯üJu«MS]Ð~ÉnúÿŒ®üEeªhrø¿Æú´ún£á/Úø¼/e®øÒ×^ø|ó‡sLó‰(pÖEŒËòÚ˜ì»_
‰ÅÆU#JYF3«WE‰9Õ½*K–¥Gw+ENq1
X¤ãJqÖ´š¤ùÛJ~÷5ìýä¢Õ’rÛXØþouOÙƒãv‘ªø£ÃíhtÇó­¬ì4ícNˆi«&§%Æ‘á­E4ówÜÚ…Í¥¾§5Ò«ê6º]µ¾£y¤ÝÄ_
ücð•ï†/õ[k{;°—R[YëUôvQ\ÞßÚé+ ³´ÒîVÓO–ôÞj0èw3Ïs£[ÜÛMÌw1]^^ÿ¡‡í?ð÷Á—?	ü]â&Ѽ?§jú—k=–¦Ú&td×pÅe¦]Y:[Ç©Á#Èa²µšîÒn†æÍÊÜ/ñ%ût|<øŸ¢|dñ„^ð§‰ËS-u/´i—Ÿc2Ŧ[Ü_‹9Q5tÓu‹‚†D‚	&¸½-tëq§Çø~i€âï
ø֏ñ6kK>¯ÃPÍòüÛ„*3Á֝zu)Ö£':˜ZôªáªAQue
X”ýJu4á°µ±Tñ3ÃT§í £g8s6ã4âô¶8Jïß²´®®~nxIÕüyc47wú‘ÐmKJQ£&Ÿþϱ»ŠÒENÑkv‘Y\Yµ¶…g¤Xêþ#Šã6ú–¹«Û÷ž'ð܉e{eq%­¬Z]’ZÍ%…Þ‘m¦Øiº©c{§Iyu+Ø.t[KVÃN°H¡ŠÖêÞoNøñWÁ/õ/Ú]Ùx;Ǻœ«¥ø‚ÓZ³³ž¥Öæ¹knæÚ7K;©ÖYocKÛiÚÚÆ	õ‹-^âšÐ·ÔµM^ïÂÖ©/‡í’»Óç˜[XÃ{öö’ÜÙ[´36ª5›éMÒêIcd²h°Y.¥{Ü·2ÉûÖLD¥NšŸ³,_4”¢¹gÍ/jí¢M-䔢Û~Í%)IÒå«:Ž<Ñw\ê1KâÓHY;·¶šë§Ëÿ~i:ð”ž
X±ò.ïlo-$‚ôêövmip¶í®¤÷Ú´ÓÚCwq¥Mm§]\ܬ1êsÃ×7Éj±<_‹^-³Ö<-®ê·’ÄXjÛéZ¼VQ¬vS ×´{½:)"ºˆ-ïô³u¾W·†Dy¾Íp±¯ôgá›_|@}B….£¿Ö|9mkv2OÿÙ³¥ÅΟ¡®Æ¡«[¶Ž¶¤Á5-$J-Ý%ž+Ë›Eü`ýµ>ë_~8êþÕ¯šg¹ˆj–3Ë=ÌðÞÍ=ôÄdgywM(¶˜®"I£‚زäÙÛ¯êü/‡†#	KÎ¥)Öjp”£RqTçMÙ©rÕ§5~k^
®©%ÉZ½5*Ô"å)J7Š²Nœþ[™¸J÷Nܺµ.=3Ć¹co¨ÚøßÃÚU³«[Ac«
hßC#éÈζÚuô1A8´ûEº^Ýk)míÌò´EÉ_;xoÄðÇ¢Ù­æŠÚÃ©d½óõ¸âkˉ‘’+MjÎÝ"XäDˆ%º-P»K!y\¯©›¯Ï4ªÎ+™Ú*WQWVIµwkÚï}/ÖÞ?²¡uà“qÑ¿bõjÉ»¦–®ÏD—k%§Ag è—76vO­ÌÖ·R2[5¶žÒ_¦›"Hìõ(DLIdkX­çG’A´S¬pÿP¿ðH/ØxïÆ^
]{KÖt½V6Š+ŸêZ­¼RiÚ”Ñx†áî-®tÛˉ5sѵw±»T†ßHÓã6R¾©øOð³özÖo5GñeŽ›{'†´kq¨¿†®n,ôøuôïõfÒõ=GM'Mºº†YbÕ•-oPZZBÂEšæÏú	ÿ‚jx#ÄíâÝCUkÍ^Ú*ÖÊã[P¯aÕçy5{4ºŒÙÚÇs`mý—+ê·)÷Gm$²$¦s'R®kB¥)T«J›TÚqnüñ—µm«4âì¥í"ÒÑ$ž§Da…J¥O~W•Üå+Ç—KFé+Yë»’nÇÓÿe?xC]¿›Âi­jú|÷·Zô%Nh`ÞZì¼Óo žÆઢÞuÆêy¦Ií­eº¶o©þ~À÷7ø{sm¦øÂ"ðÞ­0ÕßÀ>2´Ñ<Oámx<s@дîž÷ÖZÊE5¼ÑøMÕ4IµkkÔKkkËÕûžû@Ò|c¡Y볋Ècû4ŸÙšN½¨Ø/É«Âo&Ò
ÃÈˬ–ú¥Ì°+LaXĦHîû€êh6z…$¼Y„ñ˜Õœ‘[_K<ÐÞµý¸šÆ9î1]yÖRïóeG“í—vÑu¼—.•\E9Ñ¥R5ã5*sJ¤/(¤Úm9j›N:%dìpÏZœ)û95(5Ëg6ÒÒÍrÉÇ^׍újÕÿ	¼Qûü/øWûoþÌz§Ã_†P|"¿ð~±ñ*÷Ç:NªÝêzF©i{ðÓR²ÒîíµyndÒït¯\Ý=´¶š‘%äþ6»·‰ý%Ä¿»^.³Öu_¾!ð6‘¤ÿÚðYØ<Öš_ö…¼ý¸ÝÈÍZ…ɈÅnf³òï
X™MÄö×?»²ž¯Çƒ¥Íâ/O*‹–Õ.-t˜‹Û­¬S_CÔ“ªÜ¸b¥m`{Ö‰Ë\NóK‰î€õK9tÝ2ÎÊÚöæÞ[mRyÌyrF¶Æym#†;MËM$“M+¯*ÝHó-±‚FŠ+Ü°¹U²3ÂaãЩ.eJšäPR„n”n’R]b“êïs¥Õ©ŠŒkJò”.×2»|­=/Û¾º«­¯Õÿ<ðQÏM£øß²ç†ïŽŠŸu¹¢»…ÞX!ž¸Ñuñ×V¡íîN¡xÀÖÿi•mí¤¿0=ÜV÷éØ_²—ˆ?lÙjÆÆ+_Š	¼[áé,ìâ¾¹Ö|]/„|FÒYA:+ϧëÚ ²[™§¹š}Ä1	d¼Ôl!±Öî'ÔÖþ:ÿÁ=4oÚâKüCÒõtvDÒl%ŒWa![]M5ŽŸklÂÙn#m"d¿µ¹{i.n¢†MJÁöÂoØSà߁ô?±xÙ-<y¬M*µæ­­½ñ…Ùa‘-í­¬Ä÷–ֶЉ-Åäܲi®c7:uŒ­ø¿øa˜q6iˆª±ùžNð®“ʳ<Ÿ0Ä`1¸%gÏ
Xôœ¯)N¤“²Z7^-'Ý<V
X•
XN­8Nª|ÒrRö²—¹+r]YE­Öòù«ãwü»ÆÒøV¬IámfY¦gðÿ…´GKðU¥þ‘qbë©ø‡Äþ/Ò¬ï<W¦Ü^Aye¦x[N=®¡govÚ·ÚR¶üM¾ø¬|JñpÕ|B——öÚ¶£¦.§%ºgOÔµ-J{#
­ÂCyỘç¹7‰¥F9l_i-k˜!žÒOÞ__±öãMBËMøy⋍Rx¤“û	욶‹öa$’ÜÚ­„òÛBªö³^\ÂC,—æ{Ý"H/¬džo†<]û)x³á•¦©/‰¼¿ϪJÑŪh^†òÂkæŽ7·Òì4­,â“Ëk)ZÚÞËË{I£Ô®
X6#ølù–IŸb3üË?Ï8‹V(¼Ç:ÆVͱµ;F1©‰ÄÖ«V4©Çš4èÁS£MJN¢ç.j†7”-Õ¥	(>Ef•¹SoWvå&ú÷_µ'Àf×¼!¡üEø}kß|wm­¥î¥ì%}öÝm©¤±½‚ÏR»µ»‡J¿»]CR¹ó…†¯
œ76’Ú|²¿´ŸÂ©ãðF™â´ñ—ü&F
COÖu[ý>ÿÃBúöÆÂX­îïVKR–m>ÄבA-þ§¦èæëO|
2Ñ®gý«±×´\ÛhÚ¦³¢ÉâSGþÉu]6=?WÓ´½:[Û½:ûPÕ/nl$ib´Ôn¤F…õK‹Å¾VÒZ9ìà½Ñÿ/~>Mà/Ž_´ÿxo@–Ê=îK}3Z°†+õ½žo:îãP¾ðãi©¨j·–Êú-íí·Š¼7Ÿ<†ibÅøÒ?DŽTeõjГ…oeFt¥N£³…¹eMEÅ{N‹Ú¤Òo—W§d¾®Ú©ïƪRŒeJkšqIY8¹%$¯vï{+;«ìQà]#â¯Æ«_øjåu]G—UºþÍóogÒ´ËÛ¸o4«K¸­m´‹»;Cmoký=•åÅ’Ü+½Þ¬5mFÞì¯çü@¿Óÿk;(à‘Ñ/t
ìïµÓLÿaŽ@iv:…•Œv†„He“C¹Ö¬¡žÞæ7º¶¾Šáçþ§ÿbOƒÚ€ü·Á=ž£¬lżñéïr,m^à+ÜE$úÄ“äܺ}åÃÂdkŸS¸Id—ùÿÿ‚þh——?~_Ânßð„Zè÷Ñø{D¯ï¬lDm 5é‚ãHÐVÍ¥c¦Û
XlŒK$ïÜþÇ’åË/ɨQ£ÚRiESr’”ÚRm9FZ+9&›V½·>së.xÖùùR¦äß4¹RM´•ìÖ›ov®ÏÀ½/BòôûD79
ÂÞ-:xÖBI‘’Àd3$…–åä1\	bóeÙæ9Yi«j1.ËÄz]½ª3ˆaXµ¨»Û$fß?3eÏ/ËÞIþ±Šètk6í94ޏØÐ×Uß]o×]|ôÕª-ÝÔÅ]»¿~¬uvoG7z=¶{3ú(ø/ðÏÃ:gÃKØ5-CLÔ/¼Qg¦Ú_ÞXxzÖ}rÛSÓ¥%ºø–ÆmVÓ	¨æ;Û½;X6–þ~›|——7–¶‡õ;þ	»£Xê°ø«R¹ñ‚u©uH¢Hfò&ÔlôýPjŸg—S´ºmJ+¨ïb·‚êÊP`KiB ‡Y}ZTø/ÂËw¦ü‹LÑ5/ÚKqwuilº®|ÒjFÛXÔ&Ôü3§ÝÚYÏp“3Û¬¾$¿¹Ñ­mÓNìî—S?RàœúCØøRæÊßÂ0ø~ÖI,[Pº¹´·Ó<Eâ[ˆµmCQy¦¿½·žK¨£“LÑ´K8/OšÔëéªK¯hßÙ¼XxTž>
I:tá)OYFu§'hóEJR÷u—¼¡ÞÜÒiŽ¼’Sqq”d­ªÚü­Z÷åÒöIj’vZ[õ“I–‡r­†±®kžŽ‘B·hšî³m>3ÇòÞÝèÖŽöQ<rC]³$‚[«c%»\Ku¡«]éW>.Ó5]*i®´UZµ¿dº¸¶›L&_2mOO»×Õm'ÓçŽ(§mNöD1Ï3´NÖ©M֏cæy[A+A,“Ëk“qmio$ªÇ1èñÂ-´è§Ïæ!¸¹¼•íc·Šêà%Ö‰â
0Í ßí<è²EW‰sý‰f	%2Çkr¶Ö÷Îfó4ø,îaÓ¡º"kï¶GpÇXôÞ!S¯(É{ß·º›JÒœ¢ÖªéèºÝØãån1Ši7¬¡š[YÞÉÞÛÙ;-,ÙGãŵìš>âýK›ÝGá¼^$ÖÃV6eÓøºÚM=dÔ-í®
ÖŸec¨éØOqamuÜ·^tút¶štòÇ,_žwō¶&»à½'ömñ½ç€õëÚ¿¢×­­5
Xx£EÔµˆtùtin Ò%½ÕZÂ=/[…¡°Ô|0t§½²ºuÍðýÁã?øÆãJº¾ÒµK7—MwÔìtûË)Þìˆ
XCR˳ÅBÉwÍ„D#ŒCopð–ù+á-׈¿fŸøÇUð—¿Á¢|UÕì¼E¯j^
µ±ÑïþÕ¤Ù_Z0œÞÄq¥]ê7_ÛXڍ6ÆÇ_—WÔ®#[Rîdð³Šukâðõ¡©ƒÂBJ¨ÅIʪnÊTå7NQšP›RTåNM´ÝÙôV*•.+
W^&QRÂMÉ(ÓoÚóN*¤\d¥¤ã4¬ÚÐýÚðÌ	áMÖ=R[ÔÞîî!»‡DIÆ–ñ½µ­Þèâ\L°NòÍq4bäÞÇ*9¹]oS²Öm|†¸·Kä‘Q§^I6ªíVòª›K{V‘J<	ud§ÎO(Åoå,¿è´¦±k™¤jZEÔ¯´Gqáq2ï(ßj¸ÒïìՍūÇ=•ÛFŠÓìŠo-¤¡â•Æ¼ÞNŸ£ßOc’PÓÜÁmmmáÀ†ÆA^i3$æK­aK1q6›
ÕáŠ×Rúx:”ªBQ²÷œÓRåKí/´õ|·Z=´¹óUéVö®mrTnòM]F&´¼UÓø®×–Œëîgñkz´vz»4Nö²G6¡£Ü5Ü	fÒÙ¤ZkhB_³ÚË$Ñý«R{&R’È–°e–m+ý
XÿUŒÉ}|%óclÚ¢––5Š'G–[‰íïµI;v{ĵû<Í›ƒ<Gàý+JÐCK%ijjr$s¼.¸¾ÍS"O
X\^êZœ-hc¸MLê÷QOW‚ìY5½¢jjß4?.â(M›=±IZ{s"¬©<l°\Au`¦ÌÙ›VC5Ÿ•&³YËÝNÍœäåjjÔäß»%vìÖ©]nÒÑ'§^¥B0ƒ"R”³‹•®Ú².—ZìÖºÛªüÛý¡¿b¯üP½¿º½¶ŽÊk”Ón-ÍäR\ÛKnMí¥µÕí²ØÏqöX¼Ø„ÖºšþÚþÞKK››8>qð7ìá†º¥æ‘k¢éZ¯ˆ5wI'»¹Šk­nÆhÝÔM­Þj7Wr^\Ã
X[ÜïíE·žTµÓç”Eè‰>'jÞ,´ÏÀñ]Ý͇{‹k[ȧ…FFÁ§(ºN’ÍFé4’Õ“æ>ð´’ßÜßÝÝ-“‹Ùomâjl€[ùR]}™›ÉŒyÖ’Èⷝ/bkµÌÍ6kƒ©5Z¥8N²j¤ÛIÆV÷žË™_Ým鮨Ö8ªê*šis7´”Ý’¼oÌ¢úµ¿ìtz7‚ôÔЛG›û[ÃñJ¿kK‹{‹}[ƒË0
"Þ­¤»³¾ÿìãP’f•[˜ínbK¿ä{þ×5tñoÁO
XÚ$²ÛCgâ{å×ÓRÒµM;VµŽ][8’×ûWA—M»KXuŸR¹²ÖƧc|“4ö–ÓEý…I&tŸÚ7W)naFšæk7[XÙ£ˆºÓÊéËcÍó£uÔb{kw7—K÷’ÿ#ð_Tø‡^ðŸ-ØÔ'Òôß]ÙêÞ±µkXÚëH±Ô­üK¥}†å °ºþÍ´Õ,nbÕ®¦’âÓYÔbÓmÙî½úsRÃÉBz8¤›‡5Ýãd£%£w¶’Vnöjè䃌q”àù½¤[VŸ»wvß*»³JÊܶ»nÈþdO¹™F´;Š€æ+™cŒÈ£dŒˆ·(VufbŒî €
XÓXf„‹ (0C4êsÔ’§O”®s­#²‚ÀÑ\m«¿z–ý_§÷}êÞÚ­
4¥ÓyKû»û¾·ùö?§
ë×þÛÝ®—«_êÃTówÝ$××?ˆ/ÇÚ"K¥Ò-áòÓK¼?Vµv­
¥Í”ö:>¸ÿi›ôËþ	ñËÅ^ñ¶…¥X闐ø¾kYt»='K–	®%½o²<ðkW7Ú^ŒšˆÕŒmx4{«ëùuÓt¸l¤¸¼ºü¹†ÇĺÖÄ—‘xfm-wR¹Ôµ[fëM–8 ·°ÑîVñ쥝¬ÖîÞÚÏ@¾¼šáDöWRj62[~•Á
Ž‹¬|n‚+»»AñW„ôKIVy—KÓIÑüOq¨o¶2Ê`þÐÕ­õu¡is©²²K«_]iÍm§i^[FÚjR”9%;Æíi¢µš´÷Rû*+Í<<Ô”ã'(k/u=So•Â7ZY%}7Õ£ú†ÓôˬCkóGTºkA*Cp‘ÜkYäŠÂi®ÇÚÒÙd†îg7Ës
›º6‘r·î¬<Ÿ:i]¼_g»Ç+GÌ‘"3ˆ¦-+ˆdQsÏJ4ùàXÇ7àË·ŽÖk«{r–ځ†t»¼[Ù⶷Í4·m%ÛÏrè¤é%´÷·0ÜDmrnåF’>úÎ+køEÕÌÚŒ“DÉoetÁàfŽMöÎ÷QÉ–‘\»I$ÂT–‡Ï’MDÈL~¦"œÜRi9]ëvšZ&ÚÒÎú.ýûpBqM¶Ücd—»+s-·æZÝ^Ú­ÚêkßxSN¼Ø-¦é¼ÈØ®™;\Ö&icE
"»\Ã!•¡·L°Ëo RÞ!âßÙÚÂòëQ¿Ó5i4x®VÙ®â}.+èÐ&ÈŸN€Kiu¦½ñ”ErðKr&–_6Kfi$š_¢´Õ{<\G,ÐË4[$Y”ILñDIÞåÃui$us—…Ru1›Ñ“M[Û'š1RِMy}+ù÷×WÙ·[DX
­´pªù²[E,WS 
›[[‰|ùÆJ.-hþÍÝåt¬Ú³}6³Õ»ùµZtæ”js§}S³ÒÊöO­­»zm¡ñÇ„¾^ÙÝ‹ßjö:…‘VLÓôyÒ{ÇhÌpYNZòv¸kr,wÞ2Ñù·vò ôsá™o‰Ò}:êYµÌ6°´OhæÚ3$PIÙà·òˆÕ–= G–$EEcoïÖ¶¶0[\J†k‹‰™-`A¦Ö8$ÚûÑ6K©®#··d™ZI®§º3m0Ý@ÍÔ4yÛÙI3Þ^Il²ÛˆZqWNK4×,Í“ÆЦüƹ¤ŽU•‰z)Éó=#Üšqµ®Ón*-+i˯M®L«ÎZ­Õíg}›m$î×›évχ5_x‘M尟ϊȐח2˜-í‹EæEjꊫ>'• ‚+:õ,õUÕ!]E”òòø7\Ô	uKÇ™çfº´–?:	Rå>P¸ŠòÎkß´@nURxçŠd.ó_‰"“K6_iëz-œú6©ìkoqÊ\ÚÜÙHФ"O&Ý–]–†¸y,Γ4–î!·ž[R»f·âu­
XkI£’E†Þi-â
ë,±Ax‘\#;ÃP5ÇîZVòÌs‹Å’IbÅ9rÞRiÞÉY4ã£wÝmÛ}n\jÆ.^äT½ÙFVIJé6›¾¿6úw>yÐ<1«"I_Qµ¹û9·6öðBˆ#t¶“Jšr÷r™#1]ÛÜÇ%ÍÄVËul%Žöw>•c¢_ÜI§ê
s‘,` Ô퍬»xE¼Ö[ T[˜Ùd2Ê%™HinehƒsÒÍtÛÂøgcA= ‚5–hB²¤vïmåF¤[bW¸†X§–µ=òƱyøÚ…Ñ÷Є–i-Ä/™‰•DPK Š=¦¸i¤–IeòeY£^tÒIæ\vSÝR’nÍ&ìâÚvÑÞúÛuÖÊö넪ÎmûÐŒ®×_.kY-R»[ß½ŽvòÞÇK:Ö‘=¥¼º}œqÜ}™þÄ_J/,ñ^Z\Âá5ùŒóÙÜÉzÓ\‹£wsv²JßÄüeá°øë¤jš,l«ªxwK·Ô¯t‹K[[?¶hmoÄ)¦ZXëºV¯d>ÂÚ¦™¨k¥Aÿ	"Mäèe°ÏŠ¾:hôù59žçF×<7ڝ–ºº®›g,1Y@ÑëYꯤÆ"HB›ÔÐ,,ÒÙÚj2‹h¿‡¿ø(ÏŽµmCÆ>Ôõ+ÿÙx‡[Ó/õMj[ey4íSX›û?PÔVÛFÕ/¡Ñ<Sa][A}¦Êmµí2{Ý6-zÉå²{Dõ(Kã(褬´¶’VµÜUÒ³½»jÌéÔä­¼[2|ÊöIݵ;]]è“oV®~IµÕۥǔ˜P©ÌÈ(òæåÀÞÃÌ`®Ì (®’{›‘+…¹Ñ
ªZ©Úª¥#K{1$dÕ"TDU
X±ÆÅ+‰ÓÝšµô÷]­xÛíù/Çåé{x½}£^Žém³r»K£ßOCúý”<%®Élún•(Óãñ]®—miê?oÕ´Û=#ûfÊòÃE[9Öën{95Ú]ÂÐË£}šÝc[[­IÿNÿ`†ößt߈>
²ÒÒÏo‹®üK¥˜mWXKè’+SQÖ'ÓüÝrŦ°,nfk#LDŽ
"×Q:¢ÜÙ~=þÊ:1ð¼×ðh	mjcLÓ­eÔîõ)Z¢ê#žëÄ2]Á¢Å§©ë0Z?K‚].
8Þêw0jöºÇìÇÂ/Žž,ÄžÑn$Ó?á¾µV>^¯cq©\ßÙÜ-½¬Ü‚Å ŠÞkí°=½ååÚ6©§Ç§® úÓϦ/••BíFµIòë~ua´Ô ¦’‹´Ÿ½ÝöZÜx‰%[ܺmJ2Y¦î¬•ùÛMïkY$ík+¿Ü‡zêIa2]¥Ä(‚L”AåÊèÞmÄöÍ{pöò³¬±Å%āJ,Ž 󤿴¯p±[hX¶›8{Ù'xmágy–!kŒÛf”šê9X®gº–ÙþÙ°iñCmökX>rð
¥²èzz]G$ò}’3$®±ª0b²’âO+Ì0«\©Þû|öÜònÿg}¥ëºf,¬ã{[=.™ÊWŠÉe¸…š5[„ù“KÄ.gµòímJÜ›8b‚OZjN2Z/vÊû·îÝZû5g¯7-•ö±É5$Ú»|ÉÇ¥´I;5µ¬ÙÛi±%ä…mm`7´šyf4r“Hù%®Ò®GýNËxý
XÃl-%Õà{†„vi3¼±´Ò:-²*)€ÜHÒª…Å»º¥B̾ZszJÃ,pA¨$—¨ºTQ‰®fyTÈ.b·ò¥Iå_³Ü™üË„”Oö©æÚ\uu™¬6Hí­ÕC³FÊd&ËLI3%œGsçæ(‚Ì-Äì<é©©'-Zn1ŠOEåkJÏt÷zíÓ+Þö|¶I'{ó5ÊŸKi¥Ü›k¥ö/3eͦ,ÖqG>þèO‘o,6 Hb¸	,·»µ•Ã¥™¶E%›^Dnæ©mV×Q]6FI-…½íýÔÑ,Ù[]ÍoÌÈöë’õáškvŸe”q<.5Å¥Ýu×öZeÄíwêecxŠ‹0K{™ÞY¤šÙ¦”ƈ¢|Be#ÊŽñœí1·–Ã⋯¤š=õ¼Kmqo¨Ïe8Ö;»T»ki.LLHÜ$ð$’I>!ßIçÈ'¥;%$ÜgͪqVëo~÷in䶾ö×;&ܯ-4´“o[]t¶Û­—ºÔÒ¹gÖôűßÜÅÃ}@î"I$š_.8Ø<F#>xiP)9Ê$IÌø¶ÊIÒÚâØElТ=”~s©&ŒÛÞé’"¼ð^fÕï#H¥‰>ш+eK¸yËýV×IÖÄÞtÿišÚ­:êÕ®à–$V¹„¤B9fÓf)nMÚ†¹¹œËßAsynüåî»töª÷·RÛ¼qHâdh•˜Ü»Èèî¬Ó­²«Mql^I¼rG,0NÆ&©ä3Qr²våVéi7x«-´NéíÖÆФÓ\ÛY8JIs&ÚåV½ì“~ó龺<w±ßýžq³¼XšÙe‚'–R È`XÐH
œÒ&Kh!eTòÚâÁ*‰6‹+­<͵`ÒæHnY`‰ìÞÚâ‚9XÄ-&!íÃAc.žõ¦é¢›LkIï'–Îò踙œKn·Rʼn"’x®2n.ËóÞîf¶·¤º’Cw¡ñψþ&…cº[¹¶MMĐbÚ©r¤rFÖWk<–ÓÏoö‹™íté¬nÝßÎk%òZ%õ¨BÊò?6©iv’‹¿º®­k6ÓM»o©Œá'¤}Åœœ¬×»mUôztצÈüùý°|wkƒ<KàóòòÞî+«æ²»¹¾“P¶µ¶Ñ"‰“M¸¸Pu¤ŽI’ê{/²H×sZJ¦Y®ÿ•/ÛûÄkâêZ|~'¿× ÒÒØ^hþ Óî`h¬4ë­<ê3Ie¨iÎgЧŽ[}{K¿Ó­uº[É%Õí­õG¯èWö¤ñ2ÜL
ŵæ¥ifË{®ið¬S–YtýBI.$¶x¯á¼‚í>›©L×3jj“¹y&¼U_ä3ã¥æ™}ñ?T½›X¶þÌÖ5ÝnîÒòÖÒþ]*ÏH»mm<4É
ö‰+?™uq«ÜÚê×.Š‘=Š¯ef§BT¹k+ÆÊp”MÅ;ÊëE{&Úõµîa(§ˆ¤ãZ	ӏ4b”ڨ촵œ]÷³nVMY#æ«Û)g¸ifµÒD­ÿÒnIX"Mѽ­×Ð°PÐ4dî„¡fg,Ä­½kYÔ¯µmBëÃR¾Ÿáùn¥5µÕ”wWÙѱŠÖâöá´‹¿:öò$[ËÉæhÚêyLOål¯=B)$éÙ«+:òºk—F”íÑ^Þvݯ²Ž—p¾—ýÔ–¾åôæVßm6饿MfÝröoÝ$!‡Ã¾ÒµmÉ<'♆¥g%õ_E¨\5­œvúüðÚ]\dùqµŽ¥­XÄÖ÷JÑõ…?´5
#FÔþjZÄú”GÄš¼zbG¬Ba¾½XZÊ{¹l4OW3h¶VÑê¢þùµh-µ3#Úé÷º^¥Égqòÿìsûi¾³°º³Ôl|Mm¥Å¼÷÷:]®‹¦YMw¡Þø~áRóPHbñHÔ#ŠeAnð}Šæêìˤëk’¾«ì_¶µ—ƒáW…翾ӵKV½óuûËø,nítØu,ê÷öÔÕ®¿¶µKÍ2âÆÚúíæ+¨½ŽŸwÉò°Ô18)Nq&.œc	Ô|Òçq²pPMk&­vÛ³M7§f"¤&£ûÅ7%xôäÅeÍ%h¥£¼¶Ñ§fé7ÁZ¥¢i´77WVᦞñüԐ#Hš„¨X]Ë–ûT²¼W1]L͆K©á¸÷
Xþff·ˆ\<â)Zd¸ˆ$ì¡f1\%‘Ó¤1,Æå•1‰îdY`Ž)åüÈý><[üCðšévwÓPðñÓà“IÒt9¬lm†¯¥¤~ †ÜÁ—bÖv/}pj×·–·’Ú鏪ùߣ†ø-öj~d¦`’Ço™v!s珰ÝD'Ó ’8‘£u’hþÉpñ,’OW{5Û’HûÎJêq³³VZÞÛm}åשåFQn2•§ì쟺î’m«]l’ï«m¶{…¿‰’HmQ/ಞÁšÜ¬ eYØÛ¥ÅÄ’\%Ð,©ŠºOi+p\YÅ5Ä«â¦ÑµDæúâÖY¡ÍÚý¶%HäóXó乺Zš•·]„dÞ}¼¶ûC[ðhVútÜÙ^¬†;x¬1™nEØ™Ëtþd»X¸$w6nѺG ò#^VçÄW±A#ÃÖÉcñɺVT¶yPÇ<…îŒ×Rüðù²BÐYµÊ_2êQ¥Ç'+¨ÜäÚŸºäݽåï(ò§m¯_ÈÒ§+¤Ü¢¥}¶nÚ-WËVôòÓèH¼T—·v–÷wB5Ô¯a´±µ·Y /sč`ä]Èòù’¤Ëæ	\§•,‰mk>1â?‹¾ñF½ð×_ðÝäZß…¼aŒì<%u§ÃüLCW™µ}>;RÉ&™ªÃ§êwvs’RîØéz…©3Ì’§æ/Åߌ¾"м_¨ZéÚÜz>Ÿeow§[Ïm2Ëw+êècscq4›ŒgmÅËÝ¥Ã;ÿìØ-¯ýn.Ó ð?ÄYmu.™§Ü[xwÁ6žÒ4»TG&›¦ø{Ë¿y¥hæ}zâ÷Z¾[3Û]"ÙJai´ø\yÒÌpñ«ìàª9ÆJÎ-»9%nF£x¸Ý9­ÕîÝ—tp³¨åÒm+«»%æí't“w»M¦­wú…ªÞÚ^ikåùRéÖvÖú{K¦Ô ŽH¤;n.o"˜Cp‘*:‰>Õ,’/Øöù¬úþžöÑ4Fí-îâ†âYDQBª‰$‰q1yf€ÊW6ÓË-ųI%­ÄW	¾âóÅô_꧗U[iDö–Mgt“1²q5¸y’Á^c¢êiVæÍË€\F%pÉÕx‡Äº~š—Ú–nìþ×qdäLðØÁ"ˆÊn.¡2å]dÛm¸xHfôiRN|ôî”ìîÕ’Wœc½í{§²Wlâw³‹r¼ydýæݺٹjÓm[m֝z‹ÛçK{±‘Åãƒk\³4ñÅ\Åg ©tdBÐ[3¬{¸ï ¥ùân«©èº#LR9ô¹Mì‰gÓm¢’ÞHH†]V9ï-4›ˆä¹t¸¹žÒ”í–ê3÷âé'žîVy`’ÕíâHmíá™.aºKŸÝ¢,Lò²YÜÇ(†'/&·[[k™%[Eø×â‰cÓÄú‹j77áôýZÛQ³»û9Ó'i¾Ãu*Ï«A,å,Þ¬ç¶)ÐÏco4’Z<þ¥%tÒZ&Òr{&¯¢·yhµÓfsÖš‹rR¼¤•à”¥Ë{]·®êû}Ö¹ùû^ê>&_…Þ=ñF‰–šæ©”–þ¸iƒ^ØÇ-óëz%¿—ykvð^%´ßfƒìÍ5Ä«©\ɦ-͝¿ò¥ãÍ~/Ù³I{w¨Éÿi­j³Ã?‰m¤¾–ÕcÓ<YuiRj¢À°)©Ë`>ÑdÚÞjv/
XYÿ^¶Æ•>‰áq¢CuªiŽžeÃi¯§ÞÝZÃ(I­4åÑ®ž¼¼r¦ûLŸNyî´ÿ:ð\è³Îí'ò9ñ¢]!~!jíbךl×Ï4úN«¤®ªØ\­Ê^ÝIt‚8$½¸¸’æ'‚áí­¦¶Pm­ìfkE•êºâœšKVâ×3ºVn1µÒ³×fívõ3ÃÁƬz$¤äÛæVw—/4ZQ’}_3zZÖ·¯xsᯆíô=2+ø<#wuöT’Iï´»;‹¦Y‹M
XI<7ë‚$Ž™_*8ÀwÆö+cû]¬#·³Ž;#µ”Q´Æ##F¶lrc`…]pé·pØËóÉ÷Ø®?©áž²Äbîõv¢­wfíîívíòò¿<ñ¼Ó“ÕóI½ž·iïÊ»ö[¯3úsý¥×<	ki Oiiq&Ÿf±âMbÚ]"'K7Ô~Í¢h:D3\
3GÑ퍕½ßŠüB
¢‹xþÐòM/žÿÁI¾ëþ<Ò</ñ?DÔü?¥Á¤ê¶e‚ßÅ-ùÕ®|I©A¤ý«í°"M¤Ù}’YLÉ·P»µ¹DÓîôØ&žëRý™±øO¦C=ÝÂ[‹£mr¶–¾VKþlº|ÓG8²ÌŒ<6úRD“Në=¬òßÝG|Õû\ü‡Rý˜|aá#C‹ÅZÊ6’¶–w±[¸½–-{OÔeYõ=R[衆Î?"áo¾Ýasßi·‰{i¨ßÁ©ÍU*˜w[šåÍdùœV·	Û_yhìíª[zÔ—-tÔb×/,’IõÒÉé$ìÞú=;Aû|²Ñü=£x´ø‡FÕì`Š	îcЯ«­NëNÔìõË{™›F¾Õ`»»¹ˆÉ ÖïöMÔé¶ÚDvÓ1ý ÒµKÍ:ì!lkj7×·˜{—–oy¨"ØÎÙy4‚—PζaPÁÆüðe¯†~hZ¬m<ñ™RmSQy±)Sq$RI×ú„v)-¼ÑIj<ÛûÇ-¦#ê·$óˆ¬üâ[‹+˜£o&ŽÆËì‚Í%䐗1FY³>Kùâi§¸†ÄÏK[I\9šíR§…^Ó’›rI4¯hE+»·¢}®Š“½kF*W³åŠm{Öz5œ®Õ¹¢õÕÚ÷>ÔÒ¼kÉ"êÆ1‚(­¬ÞÞ8‡š^êG†^îI@{y[©C4ïn‘Ù³<]¢_ÝZÁ¯éÒÁöSºá­ÚâT·¶„ˆá’Ieb°G˜”ÇmI2Ï•Ë·ÝŠ¾AÐþ'øzþ×N0Þ-Ó\Esqs, šâÞÞŠXÎËq5ý³ÚÚIo%ÌpÊn•å7²û–…â­\ØÂÖÓA=œF?)B4ÖÂ[¦–Gîá„1H—šâÑÝÑXž<ÔÓsj|²¼[œ!u«»Œ¹SNö\Î<ÛÙÛb%	FWŒ}Ö“JZk¥šM$Þú-ûô>IøÅá-ó퉪K²öökxïn-­cšV1¤W0-„¼w1Á3¸”àGa†`vQàŸè^M6[?µÛÅ3ZMyf±±šgK;۝—ž\7²¦¨ú 1\2[­Äk6ûeW‹Ýnô;YÕ´ñª[\ßFuG™^ÚH¶$¦á¼Ë¨¤L®fE–F[‡¸I–+XäF‚wà>;†þñ_î¦ŽîmGYÒÔ8ÿK¸Ž(
µ²½”²Ej¥þÈMÅ–¡þ“[sw$––³yu(ҍiÕöq¼šsœ›\®-Jü³{/îr½6»±×í%(Bœ§Étœšºm>]-&Û—Uïrú¥c¢Ö<y£®“gjA·šÛ̘"À
Àº³‘b³‘]¡ŠÚòeÞÑ••c2Ï W¼òYÿh?Ú^ê<‹<ë2Z]Ì`dK[û¹mn,–êòHšÞ‰TP‡lŸfµ™-Ùá’á<ß´Güw^ø}â[Á7ÞÔcÚ„Þ%š;¨£×uÙ/4ÛmFét½ ȳèÑiù\2ÊâK­÷j1hÖâÏÌù£Æ¶?Ž<e«ü5ðìVèþ-žŸsâ=jãPšÆ	¢¾×<Maw5ÙÓtÙNŸ§Z¿Ã= ka(´KÙ´}^Â	íniç©^Ëë‹örQåŠR\©rª®7Œ\”\®õïצ{©öšæºMÉ«r««¸ó_šÛi®‰îIj¿&µ¦ZÙ2ØÜx¢Ñ´÷Wiú¾£git÷Z[^YFmtù¥´Ž}gL»šú/Ä®tô½“Lx­|¶Ó_ÕüO>›©µ­Î%íÜ¥mWP°Õdµ·L.-¬d²Ô$’A Ï$ðÜM²[Om¨]<±Áù!ûø[Ç_~%ëÚOÅMNïÃz¿‚£Þ!ÒõkY|?ãÆÓÌ–wobº~­§=˜³¾Ó›U¶vZÆ‘ªAt–zµ£Ekê~ÒŦ6¹ªÿbèïÜéöÞLGM‚ñÛÌöoy:Y•iÔBVuÓI´E=•¾Ä¶ôòÜ[ÆBU=›„T쮝ã+ÇUi5®Òæø·^ê¹äcãO•7)¹ÉEËßNRi®^_u·e¯.‘V}.ø¡^/ÐõþÇOÕõ{;ëM<iÖ—¥®åË´¿Ónm5KVŽ[[©ndÑî,màYî–;mPµüŸÉí t‹O‹z…†›¢jn¡¤[D·Ö“Ë{$»›Hï¾Ó6ªOa¤jVÛ>ú
ò++‹˜%ÓÝtÝWL¾°³þ©¼uñ§á¿„|`~üP¸_jzî©u£i·zö©_h¢ÿÍ»ƒì^\¶6VÚd×)k²æÏPŠÚÚÍ„:¤wÖÖ¯k®Þ7ŸðR_øwÃß ñ—ƒ¤¶½Ð¶K[KÏí{‹§ZéòͧjÓÝ\\kPÁn¯|:5äXo4K]U´½Mô½*h¬ýyÓ¨¢¯5}eh6ãg£q“pOKÅÆíK]53·<e9òµ([’R•¾EÓûQv~ò‹izYá]KFÕ<9¢ßKc¬I,Ú}ºÈÖ’ßEl¯wŽÿ±ïBÇDbP·0Ÿ$VɶÚ"¾jþÆ¿°y¬´Ëûû›k›¨mn#¾Ðlüè’âP²Ëmsr—Ý9Ë^$Ê\]™·<„ïb±^ÑY/n’²IT²IrÙjÕ­n«Kj´wÆX[ɸץ¶ÜbéR¼SjËU}­®ºj¨î¡Gmfkyü˜Ø]L–—2ÊÎc25ªM$RD­¢Y®£¸–ßOgž8<ŒxNÞaw†áåšm,à·Y&`­»3yžÚ¢šiìšêåm–"ÑÉÜ4(࿤éwb¹%-þ̳Z­ÃZÛ@d‚X#.÷i§žA#¼Ó\7MëÃ$ÁÍ©,_VÓnn®#›Ê*\JðÃs)ß1Y„·z'[‚¹”Ks	w1]Ol¶/+Å–§?…ëïní§5Òi´õJ\©ô¿WÒçe£”%-ÓK®²Ñ»Ý+=“×SÃ<;k=…§eš;¨ÅÎùçdK©·72@JÉ…cr´Ñsjì²ïšcæ~~ѼNßüE§_kú}§†¡š[ˆ/g¸´·¶ÒtˆßRÕµ;{YXÚêÆòÇL0Ú$¶'í³kootÖÏ/ëÇx‡À^	ñ³hº\¾'ÖmìTéútfHïçŠæ(|ù šèÜ=°Ž7pòGiy0½¸ºÒÒ9æ_äããÏí#¡ø·Tñ‡|[dš%íÍлÐî­!Óµ;mB¸½¿ÔcÑí_ì"Ê_+j+p×e彎žMöŸ©Å®‹œqÒŒiF0›å”=÷w84º;>[4½ç-,“Ž§V¯k:qj¨ýÅ'½ßÄìÜnôJ<é6´VgèT¿õ­ZÚßÃþ$Õ/ÞÏ_¹H.õ„gZ»·…¯<G4Ž¬÷Qݦ¹á{è$“NY!Ó­ô[û<Z¼ë`S¿g?‹ð’è±xWÄ7!üC¢iIuÃÉ<kâ8Á¡p‹$@Å
´²Çok§]ý¢	/§»ÿI¼Khá°þT>
XøäÛÿÂK«ê„z–›£A¡J“ßjâ[}Ö×Æ%|?¢i—M|Å¯Ük¼Û$µœÈºæ¥¤ÞÛÀ‚«¿ÔßÙÿö›Ó›Äè¿ÚÈÖ$¹ñxV#u¦´×Ee®-½¹²ˆ®nô
CE±h—HÖ4Íi­KË‹ÈÅÏÌ`óMW³”êU¡?q¹%:IÍÝ(Ë–”ãx¶¯'ï+ÎíÅzը­9srN¦ª#gªJñåŠMhµVÑoucú(Ñ.¡Ôâ+©#º–x­â‹rÄ’H5[›Œ"ŽYK"ù	mo´ñ<B9%¼cãÇÄ=3MÓŒMyas{ y#{­^ãIŽßO±‘kwš½´WxÓ-b’Y”ÍùV¿a´ž8çÊüçà/Ú7BÕü+¬xŠM^‡o´Hoç–9­'Yom´BÌ\G¨ZGv²É¦ßC%ͤ°ZA¼7qyðÝXÜ[Eð
÷í3§üCñߎ¼k$–šg‡íƧ=œ·÷Òéšw‡-[
[º…#í(“û=õ„Ñ5-á}WXÔôûȵQ£\EaõˆÃ
‡–&RÖpµ(Úsö’Jí{4´JÚßk+·sƧi]áÕÔ`âäãg»«¶îù\ž‘MÛ¤WCóŸÅÿuï‹<Kñ7]–Úöû]ÓVÏIÑ®â´ðæ› xWLñ5ޝ¥èBËL·Ò ðÈÕ¼?œ“ì?²dÒõĸյwŽÎëPè¼3ð³ÂúU•Í–›yakq­éþ[û„°¹ÿÂCáSUŸÎ3¥…†wq¥iw+j°‹»kákö‹[}BmYúüdð³_øÎ{¯ZÛY¤Vײé·WV¶I-ªj¾Ӵ˽=nŠC«ÜÛøÄƒ‰>ËaÌÚÄv±éÒiÑXZüÕ§|AÐÓÁšÇ‰ôIq­ß4ºþ
X°¶¶Óî<I©ê¶ºÖ Ójw­eq£Ü]ØY]½ä¦˜–úÁt¡¡%ôÓ×ÃýRxœTg^µXÔoÚ'V
Ræi5	¨Uœv¥+Y­t>‚5!BŠ:©Æ1zs.fÓÖM6’Õ[âMÙ'Ñ¿Þ_Ø÷LðÅ®â–ÊCÃ+ØÜ4×—Ési5õüwVköècŒjÑ,PÆ÷Z¼ðÇ`ÚDO(‚ÓÐ͆‹ñE<IàY´ðOÄ/7þo
X\ÁçDm¯¥¼’æÊúÞå­Î¢tOÈeÑ.µ+‡ºK;½bå5As©éìõ泞wàُÀþñ,i¿¾$ÝÜÜj²Ý[<·¾}ûj×B[ÙìÚíì¬ìnê=9›K´ŠÀ´k$÷éî¿;üK×<e%¶Ÿâ=YŸHñ†4ä›Âž"²–ÆÖÿAñ^w…-ôh,/ìÛM×´ßË«Cá][JÔä.nÛP¹Ô./ô)<B·Ÿ¡`cO„§OÉÊ<Ñ”c$æ´zEµ(®]–’Ó}.|¾*>Þ½IAI+)8ÝóMÝ&ïu£w»æµ·¿O5ý¥µ-ö«ýžµoü_6žøÕà]Aü1mâÍFÖöÖ]ÄhÚŽ£g¡xÊ
&ÃX/¦ë–~û&“ãm0 Ëáko«[êÐZø"çùËÐ|âlYø–k¿ím"à,0ÝÅ5Ôç˹Ké4»½;K¹µºÔtý~­î´;½7PÔJ_igNí7­cû'ûmxá|I©KñKCKØí>,Ũiÿ>iÍ6ª±xƒÀ‘iº­Ô—³ÜiÉuׇ“BñÿÃKë“
ý¬~Ö´½JÇNñ–¸4Æø;Àžg³Óu/i1Étþm¼zÄ·6Ch³IÚµ’Xæê"x,cþògk¹¾´†âçQÔª©B«…KF2«M»Î1J׎¶ºvmMIÝ¥d¹Ž'z4yêâaMJ|ÜÐN…¤’³ªœfšºšJéÛ£8Åñ·Ãý=VÃSý’¼=­_Ykq©Ø|KÕìmnšå#Gi¬C&©	Ž5He[÷k“4r4§sQ_IZøUžÞ4¤šÛO¬6Ñ}¢öä•·giËXÜùíq$OpÓ$òÃ#J^0˜è£êXÆî±0³i®jæ³äÞònú»êÝú±(©%%5$ÒjVšº|­=%mm}4íçýëèzö$¸ayÈ¡‚#r¢–x@dòa#Ìó"·v‰£´)#D“4m4w(#ƒ§!KKxàdw†1ç4dKq*Ü„»t±ÃXÞ$…eWºu G ¯|1®Á}u6æEf@ F&X¥˜˜KÄÈò‡š"€˜!žÕ-Ûìí"J$o ´½"K»·ŽAåÅ[Ç´Î’;JbhÞ@’M+¤{^îP²îiÃnŠ2„g7É>{Z<ÒŠrŠVwZ&ÛŽš«ÊË]=ûñso²QI»·Õ'mmÖÖW¿¯Í_´kiºª_Ûi’[ëvRiº”7vM©Gz…•ÊZÂRBÖ³Ï7ÚL
XÖ“â’ßÅo3¿¶/ì—ã߆~ ñ-§Y6v5ôNå´ëA£XC¬XÛÍk—%Ôi¿¸¶¿šÊò®®¾Í$w·“Gýuo¨ÿv_´kkm"âû
X|–FB˜ùöÏna‚`ïvX…XgžÜ:™Ç—¿Ê–Y~øûû>Û|_ø}¨Ëc¦kW·—w÷K¥yV-Ñ~ÄL³ß4vìä{·Se
ÄŸcò~ΗÆxŠN­5Z*.TyªJ)EóBVr‹Ù'¥þ&Úø]ÛFØYS„ÚpK›H¹$ä›åÕ-ÕõVVM-^Öþ¼Kâ½_·þ%ðÔ-}…­i¶š©n×r¹Ó´ÝsHñE¼‹Nò$w£ªÚ´í,6v——É7H.¢ÊðÅÿxâÉ´™M‡ˆí<A¢ëZN¯­´–ڝ…˜ÑL­g%µÝ½Þ›5•Ý³
E£µ‚ñ炬¦ýýñWüwÁÞ"ñšêÙ>-°°Y5HÝuk¶ÓÍõÄ·MµµŽ{MR°¾¡nÉgqýŸök‹KszöÚ•Þ‘WÇ?ðL/‡wö×’èú]ƍw£øW\´‹S±½µûÛ-cÒä´¿H~ܐ۬ko{y½í£Z²µ[øbŠjùª¼Q‡ÀÖt!‚ÄÖ…åûêr¦©ÂwOÝR÷¦ù\[Šm(éi'o¦Â`#Z—4ªR¢ÝÚ„ïÏK_–*VNÉ-.õÒÍ3ÏþüuÖõ¯Ù/ãŽf¸µÓ—¾ D–Ý_Ç'Š®áÑ¿±!’Þå’úæM6çÄöÒ´s]Çw.–eºo$ÝJŸ—:ÇÄßèZº*éz£é:Ã,vwÖӁ¬5¥¶•5œz¬R%«^ØGuq¥‘·xmíþÛusm.«?a~~Îz—„´ká¾°`ºð/4[½TOk’xv÷H{ï´Á{sI
Xk“¦œÖrÈÊâî$–iÕõ)¢¶û7Âß¼âë­ï¼-§ßÜè·º”öksadì·ÓÚj`·,H¶ñÏehÓ\‹¹$3¼8$Ëʜ牥…ÂàkQ¥õ‰NOy.i¹E¥xꛍœ¹ROfÓÐÏ—ÒúÎ*»çTj1iE+r+EüV\Îí^öØþBõ•ñž˜¶Ún·µo¼ÿð‘L·‘±m^òÖû^´7Fêi¥ŽúâÊkíkM‰L‘Ë<Ê톚%Y?Zàÿ´ÿˆ¾1Ð|Câ8uiôíZÖi,-
î ÒÜ¥Œo©ÞÞG1º–ê[‘q´÷s$Ëg-å£\iÑ›ýGVýCø±û"|ñä:^‘¬¦—á;k[§ÓôÝWP“Q¾·¶»Öï¾ÈºS_>Ë¢Éy¨kM=­Æ£qi¦ZÜ,Ð#Io{Oõ_ìƒû:x3öy²ño‰ôIâi*ù•¿‡•7CNÔ/ïoÿ¶5ÔmõŸí;Êg}94ý7VkAr–q&¶÷6{ä¹¼óøÑXœ³”%Ë)ÁÞ‹Šr²œhÕåÕÅÞ-;^ö¹Í™Ð§…ƒ»RQÖ*qIÁ¶¬ù•ÓÝ´íf÷]¦£ÒSÆž/ŽÚ(mt?C&‹¢®i&Ÿg
ôzl0jW1Ys ¹ŠK;k —p­õ¤vdÿeŽ#/ÏtÇM›Fñ$–¶IâWÄ÷ÒÏ4o,º]õ»i—ñøNE¸–ÚÊ{=BæÛT”¨·^<ˆ-âžÖsuïž¹_è:~—"Êš•ì“j7ò6QvÚŠ6©y4±³Ësw=ëF 8ï[Í6¶ÉfþE¼/ü`Ô±â=k^º–á<1cý‹s©':eÜ:íÍٵՍ¼Ïa-ÉŽ›|©á•4ÛµÔd²ºÜÓZ\Gõ³§ix>h¥ÉÝÍA¨ÅEÆ:]«^Û.®Úž³” ãËó6êF[M'ï$ÕÛõiïËecógXð大I²K¿ÓŒ¼[yáëÞ\µÔ:Uōö¡‹k=Ýãyš~¹á;A•áãt¢ÇÄÑê7r]ÚÜø·X:mÿiðòãK±[;–¸Ö.C!–M<Yµ²¼Ò
KKÔíÞÎÕ¬z€†¦JÌÓÜO
Æ¡äéŠúšãÄÄÿ‹>
´ðÆŸú•aªMãn“Ûø†,´­;P{W·“RdÖw.µdÂ5‚;1ä³—ÈyaúRøM¤kÜÞè3ÛKws4L·«qæJÓBí
½´—o ËkÔo¼61£Í;ÃZžX½L,=*íתãVÑŠRœ §¨êåXhÖ‘’jšM&¯wââ9ªÆRT`•œcÉ%R6N*)ÆWµ­~Uºæm–W^ÑäžG¹´¹¶Ó °¼ÓþÊÅ »¹šäHáfuu¸óWÊ€e}­«üÕaÔnax-·BÑÅ»V“R›¬pƉ-é·ÔcI.%EYfógœ¿ssws$·Sèºtîí)¥}ÒW’}Vš?8ù[μºRq]½Åm´·*µ¯kiktÖ߬ÿþ ZÛÜi—wÖ«gi5ÅËÛH«z&¶¸}’u’æwg|iJ‰˜¿5ªÞH¿¡Ú¸ÇNŽmBI7¼‹ÅnS9p°ïŒF&K9cW0Ùì¡<ã
ÒB&+øsû-xÆÇ–Ò i¯ZBúƒÏöë²êò…[¯ΗEPÈ,|?r×ñ¬‹mûød¾ýNðÖ¥l‘ÙÞÜÎeªKˆ\¨s—¨ c<lUþHí®×ìþj$Ó,ij²Aàצ¹e&ÓøeËÚëFݝš¾¶ÒéÞJ×>­Fï–›œ\å‹Q¼¶»‹J1ï³wê{§‹u8/4é.•fD[iæD•T4^TÓeŒN¾lW1ƈ#:ÅvÉw´˜à~ø†Èx‡VðõÄ2Á-¬ñ–ËQkft“ÎxuË+Å(1*^Huk(`ó§y.fRVÞƹâ­>}0ÙªMs5ÂySHKkxÎÁæ4Š¢+Y¼·[ÊKfH’KØُÌÖÞ5O	|Zѯ#Iã›X³…å0ܲ	/b¸’fÔvîW>eÄ“Ç6éžâ¡ŠD½cm4ÚIku%µÊ—ºÒ÷\µWVZ·ÒíèÏ~›VƒNÍ7/y&ìßKÅôK]6êÉÿmk[]?Æ6v½‹P‚M;m¥¶¦²Ü0˾æ{[“öudºCc}?Ù,mäžîÄ4–QüâévO²»¹²ŠæmFM*Ôî†/µj—®žòAn·gVŽÛÎŽyfXâf{hn^8\ÅúûriþÖ<#¢ê÷7/mâ;é"KVе;©®b†k»+ff”ZZj?Ú֐‹bÆkTÔ/ÖÂSisw_“zׄtŸèÓxzÆÍôÈî­õ#ihöð››hb¸‹Q€¨FCÀ±½µ¶´¼[†Ž4w^f¥¹üÏŠ©<62œ¥N2§Ì§N*j1’M7¥’æI«ÞÉßÊëë²y:øyAsŨÚSJ>ì’Q»çmÙÛ–éY+ìÏø¿ûAÛü<Ó> G6¡u¨j¾Ð4Ï­£Ôõ襃RFÕïì¢ÿ‰<0Ï{%¾ª!¹–oø™ØÅWšZËãŸ<ñ×ÀÞoˆ¿ ¶>×5½GP†öPÑßÞZjšíÕ­ÕÝ…³êVñØ$w¤v/Ýxn&ÒlÞ×íƒÕÓÁÚ¦£áEð¿Œ4˜¯|QÄ;›Éí¥%¢—JÑlõ]6Ùdµ’ÖãMšÒKöÔ¿´Eäñýº[-–âX,ûæ±ðÇAð÷c𽥁¿ÑîlÒ9´íB1p÷35½Ü<—Q¥Æ­þœªÞLne¹‘å…ecy•ãñ6.¤e”ápôÖbp°›pŒ$£Ô“pšŒ©¹]ÆN’wÑ©YkÝ”ÑJº’µœ*Ê:(¿y$¢£$Ý•µ^êm«Y«Û¸ð7Ľ+XXžÃX’ñüCq{£iÍwe¤Âú­å¥ìIq¦Ù´Ú®ŸeBxŒ&¨ ÕEÔvÖÂÚîci©ýƒñS@Ѽ9á¯|;ðÔNž,û\úȹ»–KdÑ4Ë‹û`Úy–òÎ+†±òlÞÒÒxdÖ¡“ìùšxåüDøk©xÃÆÞ*ðö€É§ß\ø3Uy|QCitd»Ô¢ŠßMÖ]]àk=;ÄuÄÖ°}†æÖEðó^Úéép–vÑþºøUwx­,5ºkhz^ƒ£M~·{®]ôëyµµ@÷8ƒtwš¹WÕà–êK©Læ$ûþÁž5(Jò©C–”õpR›³Pm¹?fÛ^ó’m^/dþc6­þÑiÁ«UŒ§“²Š¼[´yZ“ßem5ºíük¥O7†bÔ¼Í>æ9­ï%h„L%º´‚{’“Û,rù«8†yżšÜ°·Žm‡ò_ö¿ø‡oðËÀúœ£WQý‰qc¤ëñ[Az5¼7´!ðû]éÐ}¥^ÃFƒY¹ÞOžúÚÛû&òátmêâßöÆ:¥„ÚÚ|7VÐˬX˧%Îöû¶¡v
Xiï:‹iãþ̺¸³²KÁqnê—1Fò9XcqüŒ~ÙßüOâŒ÷£ÂVZŽ¡§êÈšÖulН[GKmSAŽÂ÷{£Ø_OnšêjgšÉíâÖ;kìÙ£úÌPMUªÜ£ÝÇžnm;·JеïÖÊö»I?*­GV^ì ’÷Ÿ;TÓZ&•›½µµîôv±Á|&øññÃáŠu?øCÆGÃ÷PX[x|2i¶7ºuý¾Ÿ®“swu§ø‡M¿Ó"‹[6iª¢jVsáÍFòuHí/,ç’ßõGá—üB-u4tøõðb-Vú9ŠßøÇΈ‡oüû«—‚Þi|1|ÆËY1à ¶(Þ-Ó-nlî.Z¼¨¥ŽÀ?ü@º}A´¯_\Ùí’á¢ÔÜÚý¦UP°E¨É/îà]yÓ/“ʶöS
X	n.ßÜEı$w6¢	œC=°˜ÞÇy|D;ì卤7l–y<-:À&¹žh 6ºj,W†Á`ëᣉ¥JQU}¤$êÑ‚I)ºn\ÑzÞ•EÚÖV>c2–g‡«(*n‹¿´„¨¸}VT®šPrŒSm(§-‚wLþ“`ý«ÿcûøb½‡ö’Ö4î£I×GÖ<ñXjzq•Cµ­çö…›Hó£bÙ6%¹R¥eî‘Šþoažü¦,-…Í”m$6³Á}yiA#ÃX"q±…vD…epÒ­½°"2±þÆË׎oKÛ£~ííîm®ž¾nØ,Ûeþé²ÞtþÎéRµÕµKªó?¥¿þ"²g·ðF¥k~öÖWz¶£¯Ü]>² •¥¹µ^¡¥Ï£5´ÐY]ÛÍ%ÌÍy)µ3<2Z[OúKáZòK[hä¹7¼èîou­Jk»‹4Ž²És¬KzM”[$}*Åç7)'ò¡X^å¯ö
Xý /<ã©ô‰vizwˆbÑ´h/5»€ÝÀúäXÞ%¥ÜÏ“^jR½”·»á”]ùWz­ÈÒþ¬þ_cmnÏO!¤hí´ëk¢×ý¡ÊXÇmSK$Ac‘íÃÊc6Ç͸kAl„ƒä±t*`âïÍ\ó9MÍó»ÙJ1š¼âÕ¾Ô’Õ^Û}…6«Í¨W§UÚnHÉFM&á9Yëtµ·ÂÓVW·O}~óÙ¤È ¸P<鍴§tf+1I!’æ0’,ëpm®6<Kçc9~løÇus¤èRøÆÔE©^x7XÓõ+ËKíÒéR/ÛVæÕ¦òÙ4Ós<:e¼S걋?JƒíPîƒîÍJËÄ‘GâkÉå¿('ìà†Fùk·›!;%XÚvÃpò4îV‚gi->løËk¬Xiš¤—úNžî1¦Ý]C15Ô2ÙÅowk¹
X¯s=º\‰ä™Zî–Ö÷ðÝJÞÕÓMNNQ³JTä®ãgîû¼­o[»ÜëåJ.\©[K>Y%f“i¸·e¯Âœ´ÑDëo~¿í'ðNßOŠú=RÙ­uXìà–meIÍåŤ­Ê¶‰­ Ž$¸Ó"Žíæ6Q´˜%¥ßÆš§€Ã©§Ó5C$öþf™§î&–%…æÄ—2ߛƎøjV1ÈÓ+ý®X™-ëØ-ÛþšþȱËwáý>ñâ–[Cb·É:^Û%Áxå1=ÔáîWÌŒÛ?œ¶ñ§šÓyrBÞ}Vý¬?g§ñÝ¥—ˆ</:n¤²Ì÷6¿ehÅúO-¢¶q:ImvÇwd.âsk’)	®ìÒðâL©ãp¿Y§JœëQåœ`Ô}çœ}Û·gfœ­µ¶;2¼Éa1
X’›öS÷[q’ÞÑWrmZé­´zkwø3áŸ
5ïÇÄÑ-^g°Õõ+ÿYYCkut/5k](èw7É“Y\ÛIgú5µÜ¢k»Ë»û‹8m‚~¶X~ÅúŸ4Û+»Ë¡áåi,%×ö—SA=°™–æVexDW/hÓ¼½Bºy#Ší’Ök„øËÂß¼Kðûö„ø}5Æžšv³¬éšºž’³J·²YÏâ]r;ÛÕÑo"µIüë'‘±µŠÕonîLV6)uýXC,H·ð“,v±¬­˜‹ˆòšì‹‚­<p¤ÛšBÁ.JÅŠm¾k*Èif5ÕlÇë:¥J8vœ]wš*í.Kjí®šékzÙ†eS
ESèR…g&ÜS\íµÍvšŒµJÒß×Sò3ÅŸ³¯¾½î¯§iÖ7:ö§%µ•Þ¨–A¼ƒNG–;?.ešÖÚý Ô¦–;‡Õ­mÒ+ÙVæ{WüîðWÅÈí4Û{]JÞ(uR+í~Y58Rî{
_X‹Q´Ìא@6Wv•Ô³çÅ!»2³Ãú7ÿ%Ö5ÿ|ø¹ñÃwoâmÀ~#Ô|)w%‚Íåݍmü„¥ê4*½ÌR¼©¼PDֲΙþ]›öž²øðÿTÐþ$hzcÛEm¿‡5ý2öµ.æ¨Å}§´m>ÚámaÑlå]ÜejLÖv÷ZT(ߤࡄÂ*8xΕm¹Q„›ŠšŠ^ÑÅûÉÉ;^ÎúÙl‘ñõUzÎR^û¹¤Úrrm5{ê£ñ{ÞìcÕݤÿYµŽ_ümá}FÊËÆöZ¿£\ZÍc³&¡geur—Ö1Ø-åȶDÓå’î};L¸xc–Æt”¥Ì—ÖÑi·ÎOÇø³Á¾:ñmÄ7-ý–»­kÓÅwuæÚíž)e#D'Ê–ÁõIÒH#Õ´ë»9 Êe…m5$´Ñ_ê¾#ñF¯u6¹ª"þþõÅѽµ´‘íté……Å¾¡öKѨ§Ù®-d·€dš/³5¤²Ý1ó]/U›ZÖnµkøJjOm«q4’ÃI,VL°DömÑý°Ç
ŒR}¿K‡'Mµd‘¡¶ŒFiN¥IÓ£J4}›£&ëÎMA^<óO’RÕ^Ê)ÔÖÉ%©éá°¨r)N¹éûÎKE´šå³pærÑÉ$¬ÛZèy5öâOŒš†—{cá¹t;ëñ©HÚýíÓ'YÙnñÃ÷Ïo¥i7±Égqe¸¼ÓäG™Äö1GöxâÑð’øˆé§k>Õí_MÓ¯AmoêN$½¾“R¾¾º–9ÍÅ¥…ªZÚ¶‘öHî4ûD–e½¼mJêëè«?ZøB¾µÕo®µ¹–9![‡FÙ³GÜšu¬¶óÉiö˜š!kpL(i®åŽt±‹Æ5ŸˆÚ•º]ßx/MÔ|'kª™4»øìžèéÚ¤Î@}BäêMmÅÕŸÚ亳ÓâŠ8æŠkè,a˜«^gâMÊ­)ay}è]IÂcE%ìÛ»”£¯;»ºŠäO}±]Ft¨¹9g’|’z¾Wm-'ðÞ<»u±˜<cªOøZacŽ0&Ò¯¯¥QkI.—E“Ìt
Xƒ;I_*LHŒ\±Õ˜·üM¼E3+4rËa-ŠYÉ4DÇ;[,–×ry&d}Œ÷Î>r#-å¡_a.§ËѪ•Ôy¹S²ºï>ÖžI,øe6ßÖj+»ë=WßJýúè}¿âŸˆPx²M6ÞÃÂ^ð
¾„îtõð¾‘i£kWÞûN¾ñ°/å»Ôµ+}An]RÅáK¦Ô¢ŽKk‹};IÓôoê7öý¨Ä¿€+ã{›?ˆt]VËÂþ)†Ê{&óH»±Öµíbe|¶öÖú>¿c­Iö„‚Aö’B'6‘ÿu_ØÏÁúŸŸq¤ø«VÒð±+Gu¥YêÖŽ¾UŽ£<m-¦§¦O&.`…dŽIGœ¢ÉHl£÷_„¿üû;hzÏÁ›ê²Ì5óâ¶_|kh×n¶ºç…aÓ5­VÂk;ÍŽ=_Jñ,º…ÒLËwµé«ñ8ÿ¼=Í2Ì6
˜K^ü´©âp•iÆŒOo>fÕ=[|®néÉ&{ywqvWÄO—ƶIIÊ…JU\ä¥ÅÂQäqŠ·+Œl´Ù3úWø‡ñ÷IøwqàáªÚoÐüA=ñ»¾µ“ÉšÊÛO¶[¨æM:)ÚòöêmZ[+í–7•^þ"-ÚÚY%·ä¾3xÂÇUøx³i‘EªÙx¢Ø<âõ€ÓçÔ4ÛæÔ„JþfŸukk
íÜ·‹m-ÇØ•¥eÛqw~Oürý¹ü_?ÃÍ7HðŸÂkÞ=†F¸Ô§â-7TÑ4‹¨të»io´ë-FòÓP‚îæ9/u+]2öÎćUBŽ'÷?Ÿ´¶…ñïÃzüdÖ´…ú¦‹©ÛÀžþÞ´±XŽÒ;µ·»¸ŸR+g™1Àö¶BæÞ}FñçŠâháó,îüe—â15×(ÅZ)ž¸‰4’RŒe8¥›{9YkÑæ#*ÌéÒU+eXêT”¬ªJ…GN[ËY%$—»k·¾ºëûgû5øJêËÀ–R½²YÝ][Âðí±š+ϲMöƒLDRñ£Âð¬’]DÒ¢IM¯Ú_¬†o}§A'–ß¾AL¶q\Û³#£áaVvÈAq"ˆ’h¤‘8Ýç_‚~1ø~‚×¾/‚áäŠY÷KÖ,¯àftxBù‘_ÍnÞ[FŽFmá A:2W¸[üañ/…õxõë^ÓPˆ]ÚÙÞ,Hnby'S,:5´
X¬þt‘^ÞI[tXeo1äö剅“”eiÙ4’”/îÝ©EI_TþI#Ä©«îëmy¹qvÞܶjÉßM_SÐoþø?Rø«µ¡éڏ‰mm.,´½fé–{ËM9¥·—P·Ó„š„‘5ÃGd·KMI*-³ÛÌKÅÔê/u:<-$ì±dgŸrÅ1¤„u`É%Åß™sòŠÜ7Ÿ'ÄÛýmYÑôí?JÕ´õ0ÝMuºœ…®žT€Å‹›KO²‹!±“OžÜ™'³¢x<è^÷Æž*Õ.S
X#infÓ4Ø-’֐&éVä^Ã$!hQÙÀ¸‡rÈ-âXåÏ“£†¯*°ŒSœ æÔRrÑ%Ìâ¢ÛW{ÞêÊˮѣRµ(ÆU]é­"ÛjÚ^Éj•öÑÛk]ž	ûti6š‡ÂXx‰Ö/ô„˜MÚwú[$–6×mj²Ç-µÔñ[ïŠñ´w,qum7°ŸóÈñWŠíüâ?[¤–âêÓÅ7Ñ,íöËg¬éwWR>¥eÍ7—z°¸¼¸Š²F.’›cÚd™?Ð÷âÅÅǍ´;ïë¾#Õ/´‹Ã-½ÕœòAaŽvŽ;I¾ÎŽÖ‘\Gq{}An>×Ä.cºIYŠÿ?·ì&g/iš”FMÀ>8›PÔ|5©‹Ë[ME›Nû3x‡H×`ÒÖs¨Û\Ï‹MJ-?˽†ò{bº‘¸³E†¥„Ìá=XR«:µ)ÔýÜcUJ2´e)BWÑw²O{žUf°söÓMF-)¤©Ïš›wjJ¢O—£I©=,Ö—üÌø]ñÞÏXÖt%£Ò´Û‹"mJÖ'š
<_$¶2êêÓ$zÅš‹suérŸe±ŽýìCj—V²§ðÎóöš…¬zÅՁµÕmr]|›6f‚âÒ±¶¼òÚ]ñÃw~ÖV!Ì1-¥ÝÍËÙ—mÇêžÒnõ;³§ÆštjÑÜÁk#ÙË$ˆ&-$@¥‹Iu’ý£Pg¿´¶¸KTÔfX­xOো%×mtoø‡E´»×5-7MÒ®5
NÛ@ÓïŽËˆ-®õ
GSX´í#Eµ’êc¨K®ê°YYZùòß;\o	â!*¿¸¦ù¡%Bj£æ*Œ¹bý¤\’vjí]¦ÍðüM•·¹Ô¥-"âé;Ê:‹D´Z«-z¦èj‹©jšì&œ¨–RßëÖ–÷—1Ü¡º¯nŽ•ÒÁs<rIkS
8Ç2XÝÛ¬;6UÈñn­©EkxóÉ¥<ñÉm<Ooä}”ÁçEͶ2Ä·0Ç:Êè¶wv²}•âC4Û¾Ûk
è5oé^XõéLnnæ½Ô®t©nç}A4¹±–î&¿'šVºÒÚ/b½—³ÜÚ­ÕĶ©â+3^ðî“­Å4ºN±¨Iym6©Z—Ó¯n­'³Yµ¢.¦»
ygqötñAqÎ.ç±¹ŽuŽHþyåØŒ¡F®š“¥)N„¡î)©©s¨9+ÅEsrn¹¹µ=ºY†Ï
RJrÕºuUÔ¢ÒIÓÙ»·}ú«mÑhšÝ½î—iwuâu..VI¥H!ÐL*ÒM#mˆÝxŠÖãÊ€žu¼O´
È(¯-Òþ4êÞ°µÑ£{!Œ{cŽ—¦^^ys3\!–â{i'pR`aY¤’h¡1Å,Žñ³»½$ô•iÿ.±OwªV}vÑßMͽ¥ª»Úï÷+ùoö´Þ_Ò?¤X‡Ä=,þóLÓµHÚHYlõãUKI!‘/âŠù¬¤¶>]œ–Ïd——6ËÔžM®Å†(2uŸIÀÓuÍ&].ò)¾Ýq=µÎÃÄ·MÁwªÀdkҐÚ’½±yÑíçy”WùAÞ!ñ.2.•zøi'ÌÜþ®½¥ÔoÍ¿{i[¢V³ÔþüÏ8?‡ã‰Q†	SUiÊsöu'Uš²O–)i¢Kd¶0åÓ"¸I¯®I´×LÈL’€’Hcùr\BAdV‚`ŽD’B‹d̲.¦¯øZÉ೎I,¾Øc‘Q¡¼ÿ^·ÂÚH‘­ÅÄcλlRYã“ÉŽòáÁ0=̳Wéy^}˜J,Jœ!Y¹ËžjK’TÔRr”šKžZ_[êÙñ¼Ÿ(ÊU'{±„¤¹}Ô’m(«»núõ¹æ:ö³¨¾¢Ú¦•®jv£È/ÖØ4«rÆXÜ<1ÚÊ’ËJܶíwm
²CQ(Q4?~5xnê;;⇍¬#óc¥¯‹5Ã*IºxÔ„’s
¢,Æé±m<‚å$y-.e‘˜¢´Âñw®!ÒÎs
END-of-star-1.5.2/star/testscripts/gtarfail.tar
echo x - star-1.5.2/star/testscripts/gtarfail2.tar
sed 's/^X//' >star-1.5.2/star/testscripts/gtarfail2.tar << 'END-of-star-1.5.2/star/testscripts/gtarfail2.tar'
X.clean0000755 0000746 0002044 00000000326 07352644744 0015462 0ustar00jesglone0000000 0000000 07405725360 07354624225 tar#!/bin/sh
Xrm -rf */OBJ */*/OBJ libs/* incs/*
Xrm -f core */core */*/core
X#rm -f .EDT* */.EDT* */*/.EDT*
X#rm -f .vedt* */.vedt* */*/.vedt*
X#rm -f *.bak */*.bak */*/*.bak
X#rm -f */tags */*/tags
X#rm -f */TAGS */*/TAGS
XRULES0000777 0000746 0003720 00000000000 06524325544 0017601 2makefiles/RULESustar00jescats0000000 0000000 07406075403 06524325544 tarbuild/0002755 0000746 0002044 00000000000 07404775472 0015461 5ustar00jesglone0000000 0000000 07406075402 07405073051 tarbuild/psmake/0002755 0000746 0002044 00000000000 07373017161 0016753 5ustar00jesglone0000000 0000000 07406075373 07373507176 tarbuild/psmake/MAKE0000755 0000746 0002044 00000000403 07036134422 0017403 0ustar00jesglone0000000 0000000 07405725361 07343144677 tar#!/bin/sh
X
X#
X# Check if there already is a working 'smake' in the current directory
X#
Xecho "Checking for working bootstrap make..."
X./smake -version && exit
Xecho "Creating bootstrap make..."
X
Xsh .clean
X
X#
X# Now start the actual make precedure...
X#
Xsh MAKE.sh
Xbuild/psmake/MAKE.sh0000755 0000746 0002044 00000011324 07246305441 0020010 0ustar00jesglone0000000 0000000 07405725361 07343144701 tar#!/bin/sh
X###############################################################################
X#
X# The shell variables CFLAGS & LDFLAGS may be used to pass additional flags
X# to the compile and link process.
X#
X###############################################################################
X
X#
X# Check if the current system allows to create symlinks
X# If not, it seems that all symlinks appear to be plain files of size 0
X#
Xecho "Checking for rotten symlinks..."
Xif [ ! -s make.c ]; then
X	echo "Copying files because symlinks do not work..."
X	sh rmlinks
X	sh cpfiles
Xfi
X
XSYSTEM=unknown
Xecho 'testing for uname...'
Xuname > /dev/null 2> /dev/null
Xif [ $? = 0 ]; then
X	SYSTEM=`uname -s`
Xfi
X
XCC=cc
XCF=
XLF=
X
Xecho 'Trying to find GCC'
X
Xgcc -v 2> /dev/null && CC=gcc
X
Xif [ $CC = gcc ]; then
X	OPT=-O
Xelse
X	if [ $SYSTEM = HP-UX ]; then
X		CF=-Ae
X	fi
Xfi
X
X#
X# Set dynamic linking and auto .exe suffix for OS/2
X#
Xif [ $SYSTEM = OS/2 ]; then
X	LF="-Zexe -Zcrtdll"
Xfi
X#
X# Set stack size to 256k on QNX
X#
Xif [ $SYSTEM = QNX ]; then 
X	LF="-N 256k"
Xfi 
X
Xecho "SYSTEM:		$SYSTEM"
Xecho "CC:		$CC"
Xecho "OPT:		$OPT"
Xecho "CFLAGS:		$CF"
X
Xif [ .$CF != . ]; then
X	eval CC=$CC CFLAGS=$CF sh ./configure
Xelse
X	eval CC=$CC sh ./configure
Xfi
X
Xset -x
X
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   make.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   readfile.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   parse.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   update.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   rules.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   archconf.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   memory.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   astoi.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   astoll.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   comerr.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   error.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   format.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   jsprintf.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   jssnprintf.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   printf.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   sprintf.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   saveargs.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   strcatl.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   streql.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   getargs.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   geterrno.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   movebytes.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   fillbytes.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   raisecond.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   fileopen.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   fcons.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   cvmod.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   flag.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   dat.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   filewrite.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   fileread.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   fileseek.c
X$CC $OPT $CF $CFLAGS -c -Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO   niread.c
X$CC $LF $LDFLAGS -o smake make.o readfile.o parse.o update.o rules.o archconf.o memory.o  astoi.o astoll.o comerr.o error.o  format.o jsprintf.o jssnprintf.o printf.o sprintf.o saveargs.o strcatl.o streql.o getargs.o geterrno.o  movebytes.o fillbytes.o raisecond.o  fileopen.o fcons.o cvmod.o flag.o dat.o  filewrite.o fileread.o fileseek.o niread.o
Xbuild/psmake/Makefile0000644 0000746 0002044 00000001207 07246315056 0020376 0ustar00jesglone0000000 0000000 07405725361 07343144701 tar#CFLAGS=	-Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO -DNO_SYSINFO $(CDEFS)
X
XCFLAGS=	-Iinclude -I. -DNO_FLOATINGPOINT -DNO_SCANSTACK -DNO_USG_STDIO $(CDEFS)
X
XOFILES=make.o readfile.o parse.o update.o rules.o archconf.o memory.o \
X	astoi.o astoll.o comerr.o error.o \
X	format.o \
X	jsprintf.o jssnprintf.o \
X	printf.o sprintf.o \
X	saveargs.o strcatl.o \
X	streql.o getargs.o geterrno.o \
X	movebytes.o fillbytes.o raisecond.o \
X	fileopen.o fcons.o cvmod.o flag.o dat.o \
X	filewrite.o fileread.o fileseek.o niread.o
X
Xsmake: $(OFILES)
X	$(CC) -o $@ $(OFILES)
X
Xclean:
X	rm -f xconfig.h rules.cnf *.o config.cache config.log config.status
END-of-star-1.5.2/star/testscripts/gtarfail2.tar
echo x - star-1.5.2/star/testscripts/not_a_tar_file2
sed 's/^X//' >star-1.5.2/star/testscripts/not_a_tar_file2 << 'END-of-star-1.5.2/star/testscripts/not_a_tar_file2'
XThe nonstandard stuff could not be found in in the first pubslished versions
Xof the program. The first version I am aware of, is a program called   0125725 
XSUGtar published at the Sun User Group meeting in december 1987, a different
Xpublishing of the same ustar00which has been originally written by
XJohn Gilmore was called PDtar. In 1987 PDtar/SUGtar was implementing a true
Xsubset of the 1987 POSIX-1003 draft (missing only the long name splitting).
X
XFSF people then later added t_atime... making GNU tar non POSIX compliant.
XWhen FSF added the sparse file handling stuff, this was done in a way that
Xeven violates any tar document available since the late 1970's.
X
XGNU tar is not tar...
X                                                                          
X                                                                          
X                                                                          
X                                                                          
X                               
END-of-star-1.5.2/star/testscripts/not_a_tar_file2
echo x - star-1.5.2/star/testscripts/old-file.tar
sed 's/^X//' >star-1.5.2/star/testscripts/old-file.tar << 'END-of-star-1.5.2/star/testscripts/old-file.tar'
END-of-star-1.5.2/star/testscripts/old-file.tar
echo x - star-1.5.2/star/testscripts/remove.tar
sed 's/^X//' >star-1.5.2/star/testscripts/remove.tar << 'END-of-star-1.5.2/star/testscripts/remove.tar'
END-of-star-1.5.2/star/testscripts/remove.tar
echo x - star-1.5.2/star/testscripts/ustar-all-quicktest-past-contig.tar
sed 's/^X//' >star-1.5.2/star/testscripts/ustar-all-quicktest-past-contig.tar << 'END-of-star-1.5.2/star/testscripts/ustar-all-quicktest-past-contig.tar'
END-of-star-1.5.2/star/testscripts/ustar-all-quicktest-past-contig.tar
echo x - star-1.5.2/star/testscripts.mk
sed 's/^X//' >star-1.5.2/star/testscripts.mk << 'END-of-star-1.5.2/star/testscripts.mk'
X#ident @(#)testscripts.mk	1.2 09/04/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xinstall:
X	rm -rf  $(DEST_DIR)$(INSBASE)/share/doc/star/testscripts
X	mkdir -p $(DEST_DIR)$(INSBASE)/share/doc/star/testscripts
X	chmod 755 $(DEST_DIR)$(INSBASE)/share/doc/star/testscripts
X	cp -p testscripts/* $(DEST_DIR)$(INSBASE)/share/doc/star/testscripts || true
X
X#INSDIR=		share/doc/cdrecord
X#TARGET=		README.copy
X##XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.pkg
X#include		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/star/testscripts.mk
echo c - star-1.5.2/libs
mkdir -p star-1.5.2/libs > /dev/null 2>&1
echo x - star-1.5.2/Makefile
sed 's/^X//' >star-1.5.2/Makefile << 'END-of-star-1.5.2/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for the source root
X###########################################################################
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# include Targetdirs no longer needed, we use SSPM
X#include		Targetdirs
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-star-1.5.2/Makefile
echo c - star-1.5.2/lib
mkdir -p star-1.5.2/lib > /dev/null 2>&1
echo x - star-1.5.2/lib/astoi.c
sed 's/^X//' >star-1.5.2/lib/astoi.c << 'END-of-star-1.5.2/lib/astoi.c'
X/* @(#)astoi.c	1.10 10/08/21 Copyright 1985, 1995-2010 J. Schilling */
X/*
X *	astoi() converts a string to int
X *	astol() converts a string to long
X *
X *	Leading tabs and spaces are ignored.
X *	Both return pointer to the first char that has not been used.
X *	Caller must check if this means a bad conversion.
X *
X *	leading "+" is ignored
X *	leading "0"  makes conversion octal (base 8)
X *	leading "0x" makes conversion hex   (base 16)
X *
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#define	is_space(c)	 ((c) == ' ' || (c) == '\t')
X#define	is_digit(c)	 ((c) >= '0' && (c) <= '9')
X#define	is_hex(c)	(\
X			((c) >= 'a' && (c) <= 'f') || \
X			((c) >= 'A' && (c) <= 'F'))
X
X#define	to_lower(c)	(((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c))
X
X#ifdef	notdef
XEXPORT int
Xatoi(s)
X	char	*s;
X{
X	long	l;
X
X	(void) astol(s, &l);
X	return ((int)l);
X}
X
XEXPORT long
Xatol(s)
X	char	*s;
X{
X	long	l;
X
X	(void) astol(s, &l);
X	return (l);
X}
X#endif
X
XEXPORT char *
Xastoi(s, i)
X	const char *s;
X	int *i;
X{
X	long l;
X	char *ret;
X
X	ret = astol(s, &l);
X	*i = l;
X	return (ret);
X}
X
XEXPORT char *
Xastol(s, l)
X	register const char *s;
X	long *l;
X{
X	return (astolb(s, l, 0));
X}
X
XEXPORT char *
Xastolb(s, l, base)
X	register const char *s;
X	long *l;
X	register int base;
X{
X	int neg = 0;
X	register long ret = 0L;
X	register int digit;
X	register char c;
X
X	while (is_space(*s))
X		s++;
X
X	if (*s == '+') {
X		s++;
X	} else if (*s == '-') {
X		s++;
X		neg++;
X	}
X
X	if (base == 0) {
X		if (*s == '0') {
X			base = 8;
X			s++;
X			if (*s == 'x' || *s == 'X') {
X				s++;
X				base = 16;
X			}
X		} else {
X			base = 10;
X		}
X	}
X	for (; (c = *s) != 0; s++) {
X
X		if (is_digit(c)) {
X			digit = c - '0';
X		} else if (is_hex(c)) {
X			digit = to_lower(c) - 'a' + 10;
X		} else {
X			break;
X		}
X
X		if (digit < base) {
X			ret *= base;
X			ret += digit;
X		} else {
X			break;
X		}
X	}
X	if (neg)
X		ret = -ret;
X	*l = ret;
X	return ((char *)s);
X}
END-of-star-1.5.2/lib/astoi.c
echo x - star-1.5.2/lib/astoll.c
sed 's/^X//' >star-1.5.2/lib/astoll.c << 'END-of-star-1.5.2/lib/astoll.c'
X/* @(#)astoll.c	1.4 06/09/13 Copyright 1985, 2000-2003 J. Schilling */
X/*
X *	astoll() converts a string to long long
X *
X *	Leading tabs and spaces are ignored.
X *	Both return pointer to the first char that has not been used.
X *	Caller must check if this means a bad conversion.
X *
X *	leading "+" is ignored
X *	leading "0"  makes conversion octal (base 8)
X *	leading "0x" makes conversion hex   (base 16)
X *
X *	Llong is silently reverted to long if the compiler does not
X *	support long long.
X *
X *	Copyright (c) 1985, 2000-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
X#define	is_space(c)	 ((c) == ' ' || (c) == '\t')
X#define	is_digit(c)	 ((c) >= '0' && (c) <= '9')
X#define	is_hex(c)	(\
X			((c) >= 'a' && (c) <= 'f') || \
X			((c) >= 'A' && (c) <= 'F'))
X
X#define	to_lower(c)	(((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c))
X
Xchar *
Xastoll(s, l)
X	register const char *s;
X	Llong *l;
X{
X	return (astollb(s, l, 0));
X}
X
Xchar *
Xastollb(s, l, base)
X	register const char *s;
X	Llong *l;
X	register int base;
X{
X	int neg = 0;
X	register Llong ret = (Llong)0;
X	register int digit;
X	register char c;
X
X	while (is_space(*s))
X		s++;
X
X	if (*s == '+') {
X		s++;
X	} else if (*s == '-') {
X		s++;
X		neg++;
X	}
X
X	if (base == 0) {
X		if (*s == '0') {
X			base = 8;
X			s++;
X			if (*s == 'x' || *s == 'X') {
X				s++;
X				base = 16;
X			}
X		} else {
X			base = 10;
X		}
X	}
X	for (; (c = *s) != 0; s++) {
X
X		if (is_digit(c)) {
X			digit = c - '0';
X		} else if (is_hex(c)) {
X			digit = to_lower(c) - 'a' + 10;
X		} else {
X			break;
X		}
X
X		if (digit < base) {
X			ret *= base;
X			ret += digit;
X		} else {
X			break;
X		}
X	}
X	if (neg)
X		ret = -ret;
X	*l = ret;
X	return ((char *)s);
X}
END-of-star-1.5.2/lib/astoll.c
echo x - star-1.5.2/lib/astoull.c
sed 's/^X//' >star-1.5.2/lib/astoull.c << 'END-of-star-1.5.2/lib/astoull.c'
X/* @(#)astoull.c	1.2 09/07/26 Copyright 1985, 2000-2006 J. Schilling */
X/*
X *	astoll() converts a string to long long
X *
X *	Leading tabs and spaces are ignored.
X *	Both return pointer to the first char that has not been used.
X *	Caller must check if this means a bad conversion.
X *
X *	leading "+" is ignored
X *	leading "0"  makes conversion octal (base 8)
X *	leading "0x" makes conversion hex   (base 16)
X *
X *	Llong is silently reverted to long if the compiler does not
X *	support long long.
X *
X *	Copyright (c) 1985, 2000-2006 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X
X#define	is_space(c)	 ((c) == ' ' || (c) == '\t')
X#define	is_digit(c)	 ((c) >= '0' && (c) <= '9')
X#define	is_hex(c)	(\
X			((c) >= 'a' && (c) <= 'f') || \
X			((c) >= 'A' && (c) <= 'F'))
X
X#define	is_lower(c)	((c) >= 'a' && (c) <= 'z')
X#define	is_upper(c)	((c) >= 'A' && (c) <= 'Z')
X#define	to_lower(c)	(((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c))
X
X#if	('i' + 1) < 'j'
X#define	BASE_MAX	('i' - 'a' + 10 + 1)	/* This is EBCDIC */
X#else
X#define	BASE_MAX	('z' - 'a' + 10 + 1)	/* This is ASCII */
X#endif
X
X
X
XEXPORT	char *astoull	__PR((const char *s, Ullong *l));
XEXPORT	char *astoullb	__PR((const char *s, Ullong *l, int base));
X
XEXPORT char *
Xastoull(s, l)
X	register const char *s;
X	Ullong *l;
X{
X	return (astoullb(s, l, 0));
X}
X
XEXPORT char *
Xastoullb(s, l, base)
X	register const char *s;
X	Ullong *l;
X	register int base;
X{
X#ifdef	DO_SIGNED
X	int neg = 0;
X#endif
X	register Ullong ret = (Ullong)0;
X		Ullong maxmult;
X	register int digit;
X	register char c;
X
X	if (base > BASE_MAX || base == 1 || base < 0) {
X		seterrno(EINVAL);
X		return ((char *)s);
X	}
X
X	while (is_space(*s))
X		s++;
X
X	if (*s == '+') {
X		s++;
X	} else if (*s == '-') {
X#ifndef	DO_SIGNED
X		seterrno(EINVAL);
X		return ((char *)s);
X#else
X		s++;
X		neg++;
X#endif
X	}
X
X	if (base == 0) {
X		if (*s == '0') {
X			base = 8;
X			s++;
X			if (*s == 'x' || *s == 'X') {
X				s++;
X				base = 16;
X			}
X		} else {
X			base = 10;
X		}
X	}
X	maxmult = TYPE_MAXVAL(Ullong) / base;
X	for (; (c = *s) != 0; s++) {
X
X		if (is_digit(c)) {
X			digit = c - '0';
X#ifdef	OLD
X		} else if (is_hex(c)) {
X			digit = to_lower(c) - 'a' + 10;
X#else
X		} else if (is_lower(c)) {
X			digit = c - 'a' + 10;
X		} else if (is_upper(c)) {
X			digit = c - 'A' + 10;
X#endif
X		} else {
X			break;
X		}
X
X		if (digit < base) {
X			if (ret > maxmult)
X				goto overflow;
X			ret *= base;
X			if (TYPE_MAXVAL(Ullong) - ret < digit)
X				goto overflow;
X			ret += digit;
X		} else {
X			break;
X		}
X	}
X#ifdef	DO_SIGNED
X	if (neg)
X		ret = -ret;
X#endif
X	*l = ret;
X	return ((char *)s);
Xoverflow:
X	for (; (c = *s) != 0; s++) {
X
X		if (is_digit(c)) {
X			digit = c - '0';
X		} else if (is_lower(c)) {
X			digit = c - 'a' + 10;
X		} else if (is_upper(c)) {
X			digit = c - 'A' + 10;
X		} else {
X			break;
X		}
X		if (digit >= base)
X			break;
X	}
X	*l = TYPE_MAXVAL(Ullong);
X	seterrno(ERANGE);
X	return ((char *)s);
X}
END-of-star-1.5.2/lib/astoull.c
echo x - star-1.5.2/lib/cvt.c
sed 's/^X//' >star-1.5.2/lib/cvt.c << 'END-of-star-1.5.2/lib/cvt.c'
X/* @(#)cvt.c	1.8 06/09/13 Copyright 1998 J. Schilling */
X/*
X *	Compatibility routines for 4.4BSD based C-libraries ecvt()/fcvt()
X *	and a working gcvt() that is needed on 4.4BSD and GNU libc systems.
X *
X *	On 4.4BSD, gcvt() is missing, the gcvt() implementation from GNU libc
X *	is not working correctly.
X *
X *	Neither __dtoa() nor [efg]cvt() are MT safe.
X *
X *	Copyright (c) 1998 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdlib.h>
X#include <schily/utypes.h>
X#include <schily/standard.h>
X
X#ifdef	HAVE_DTOA	/* 4.4BSD floating point implementation */
X#ifdef	HAVE_DTOA_R
Xextern	char *__dtoa	__PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep, char **resultp));
X#else
Xextern	char *__dtoa	__PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep));
X#endif
X#else
X
X#if	!defined(HAVE_ECVT)
X/*
X * As a hint from Thomas Langer <Langer.Thomas@gmx.net>, we use strtod.c in
X * hope that we then will be able to print floating point numbers on all
X * platforms, even those without *cvt() and without __dtoa() in libc.
X *
X * ... of course, we need to decide when we need to include strtod.c ...
X *
X * We come into this file if autoconf found that gcvt(), fcvt() or ecvt() is
X * missing. If we are on a *BSD alike system, there is __dtoa() but neither
X * gcvt() nor fcvt() or ecvt(), so we emulate all three functions via __dtoa().
X * Glibc has a buggy gcvt() which causes an endless recursion,
X * fcvt() from Cygwin32 is buggy, so we emulate fcvt() via ecvt() on Cygwin.
X *
X * If at least ecvt() is present, we don't need __dtoa() from strtod.c
X */
X#include "strtod.c"
X#define	HAVE_DTOA
X#endif	/* !defined(HAVE_ECVT) */
X
X#endif	/* HAVE_DTOA */
X
X#ifndef	HAVE_ECVT
XEXPORT	char *ecvt	__PR((double value, int ndigit, int *decpt, int *sign));
X#endif
X#ifndef	HAVE_FCVT
XEXPORT	char *fcvt	__PR((double value, int ndigit, int *decpt, int *sign));
X#endif
X#ifndef	HAVE_GCVT
XEXPORT	char *gcvt	__PR((double value, int ndigit, char *buf));
X#endif
X
X#if	!defined(HAVE_ECVT) && defined(HAVE_DTOA)
X#define	HAVE_ECVT
Xchar *
Xecvt(value, ndigit, decpt, sign)
X	double	value;
X	int	ndigit;
X	int	*decpt;
X	int	*sign;
X{
Xstatic	Uint	bufsize;
Xstatic	char	*buf;
X	char	*bufend;
X	char	*ep;
X	char	*bp;
X#ifdef	HAVE_DTOA_R
Xstatic	char	*result;
X#endif
X
X#ifdef	HAVE_DTOA_R
X	if (result) {
X		free(result);
X		result = NULL;
X	}
X	bp = __dtoa(value, 2, ndigit, decpt, sign, &ep, &result);
X#else
X	bp = __dtoa(value, 2, ndigit, decpt, sign, &ep);
X#endif
X
X	if (value == 0.0) {
X		/*
X		 * Handle __dtoa()'s deviation from ecvt():
X		 * 0.0 is converted to "0" instead of 'ndigit' zeroes.
X		 * The string "0" is not allocated, so
X		 * we need to allocate buffer to hold 'ndigit' zeroes.
X		 */
X		if (bufsize < ndigit + 1) {
X			if (buf != (char *)0)
X				free(buf);
X			bufsize = ndigit + 1;
X			buf = malloc(bufsize);
X		}
X		ep = bp = buf;
X	}
X
X	/*
X	 * Fill up trailing zeroes suppressed by __dtoa()
X	 * From an internal __dtoa() comment:
X	 *	Sufficient space is allocated to the return value
X	 *	to hold the suppressed trailing zeros.
X	 */
X	for (bufend = &bp[ndigit]; ep < bufend; )
X		*ep++ = '0';
X	*ep = '\0';
X
X	return (bp);
X}
X#endif
X
X#if	!defined(HAVE_FCVT) && defined(HAVE_DTOA)
X#define	HAVE_FCVT
Xchar *
Xfcvt(value, ndigit, decpt, sign)
X	double	value;
X	int	ndigit;
X	int	*decpt;
X	int	*sign;
X{
Xstatic	Uint	bufsize;
Xstatic	char	*buf;
X	char	*bufend;
X	char	*ep;
X	char	*bp;
X#ifdef	HAVE_DTOA_R
Xstatic	char	*result;
X#endif
X
X#ifdef	HAVE_DTOA_R
X	if (result) {
X		free(result);
X		result = NULL;
X	}
X	bp = __dtoa(value, 3, ndigit, decpt, sign, &ep, &result);
X#else
X	bp = __dtoa(value, 3, ndigit, decpt, sign, &ep);
X#endif
X
X	if (value == 0.0) {
X		/*
X		 * Handle __dtoa()'s deviation from fcvt():
X		 * 0.0 is converted to "0" instead of 'ndigit' zeroes.
X		 * The string "0" is not allocated, so
X		 * we need to allocate buffer to hold 'ndigit' zeroes.
X		 */
X		if (bufsize < ndigit + 1) {
X			if (buf != (char *)0)
X				free(buf);
X			bufsize = ndigit + 1;
X			buf = malloc(bufsize);
X		}
X		ep = bp = buf;
X		*decpt = 0;
X	}
X
X	/*
X	 * Fill up trailing zeroes suppressed by __dtoa()
X	 * From an internal __dtoa() comment:
X	 *	Sufficient space is allocated to the return value
X	 *	to hold the suppressed trailing zeros.
X	 */
X	for (bufend = &bp[*decpt + ndigit]; ep < bufend; )
X		*ep++ = '0';
X	*ep = '\0';
X
X	return (bp);
X}
X#endif
X
X#ifndef	HAVE_GCVT
X#define	HAVE_GCVT
Xchar *
Xgcvt(number, ndigit, buf)
X	double	number;
X	int	ndigit;
X	char	*buf;
X{
X		int	sign;
X		int	decpt;
X	register char	*b;
X	register char	*rs;
X	register int	i;
X
X	b = ecvt(number, ndigit, &decpt, &sign);
X	rs = buf;
X	if (sign)
X		*rs++ = '-';
X	for (i = ndigit-1; i > 0 && b[i] == '0'; i--)
X		ndigit--;
X#ifdef	V7_FLOATSTYLE
X	if ((decpt >= 0 && decpt-ndigit > 4) ||
X#else
X	if ((decpt >= 0 && decpt-ndigit > 0) ||
X#endif
X	    (decpt < 0 && decpt < -3)) {	/* e-format */
X		decpt--;
X		*rs++ = *b++;
X		*rs++ = '.';
X		for (i = 1; i < ndigit; i++)
X			*rs++ = *b++;
X		*rs++ = 'e';
X		if (decpt < 0) {
X			decpt = -decpt;
X			*rs++ = '-';
X		} else {
X			*rs++ = '+';
X		}
X		if (decpt >= 100) {
X			*rs++ = decpt / 100 + '0';
X			decpt %= 100;
X		}
X		*rs++ = decpt / 10 + '0';
X		*rs++ = decpt % 10 + '0';
X	} else {				/* f-format */
X		if (decpt <= 0) {
X			if (*b != '0') {
X#ifndef	V7_FLOATSTYLE
X				*rs++ = '0';
X#endif
X				*rs++ = '.';
X			}
X			while (decpt < 0) {
X				decpt++;
X				*rs++ = '0';
X			}
X		}
X		for (i = 1; i <= ndigit; i++) {
X			*rs++ = *b++;
X			if (i == decpt)
X				*rs++ = '.';
X		}
X		if (ndigit < decpt) {
X			while (ndigit++ < decpt)
X				*rs++ = '0';
X			*rs++ = '.';
X		}
X	}
X	if (rs[-1] == '.')
X		rs--;
X	*rs = '\0';
X	return (buf);
X}
X#endif
END-of-star-1.5.2/lib/cvt.c
echo x - star-1.5.2/lib/getargs.c
sed 's/^X//' >star-1.5.2/lib/getargs.c << 'END-of-star-1.5.2/lib/getargs.c'
X/* @(#)getargs.c	2.65 10/11/06 Copyright 1985, 1988, 1994-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getargs.c	2.65 10/11/06 Copyright 1985, 1988, 1994-2010 J. Schilling";
X#endif
X#define	NEW
X/*
X *	Copyright (c) 1985, 1988, 1994-2010 J. Schilling
X *
X *	1.3.88	 Start implementation of release 2
X */
X/*
X *	Parse arguments on a command line.
X *	Format string type specifier (appearing directly after flag name):
X *		''	BOOL size int set to TRUE (1)
X *		'%'	Extended format, next char determines the type:
X *			'%0' BOOL with size modifier set to FALSE (0)
X *			'%1' BOOL with size modifier set to TRUE(1)
X *		'*'	string
X *		'?'	char
X *		'#'	number
X *		'&'	call function for any type flag
X *		'~'	call function for BOOLEAN flag
X *		'+'	inctype			+++ NEU +++
X *
X *	The format string 'f* ' may be used to disallow -ffoo for f*
X *	The same behavior is implemented for 'f# ', 'f? ' and 'f& '.
X *	The ' ' needs to immediately follow the format type specifier.
X *
X *	The format string 'f*_' may be used to disallow -f foo for f*
X *	The same behavior is implemented for 'f#_', 'f?_' and 'f&_'.
X *	The '_' needs to immediately follow the format type specifier.
X *	This also allows to implement optional arguments to options.
X *	Note: 'f#_' is only implemented for orthogonality, -f will
X *	be converted to an integer value of 0.
X *
X *	The '#', '+' and '%[01]' types may have size modifiers added:
X *		'c'/'C'	char
X *		's'/'S'	short
X *		'i'/'I'	int	(default == no size modifier)
X *		'l'/'L'	long
X *		'll'/'LL' long long
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/* LINTLIBRARY */
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/getargs.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/ctype.h>
X
X/*
X * Various return values
X */
X#define	RETMAX		  2	/* Max. value for getargerror()	*/
X#define	FLAGDELIM	  2	/* "--" stopped flag processing	*/
X#define	NOTAFLAG	  1	/* Not a flag type argument	*/
X#define	NOARGS		  0	/* No more args			*/
X#define	BADFLAG		(-1)	/* Not a valid flag argument	*/
X#define	BADFMT		(-2)	/* Error in format string	*/
X#define	NOTAFILE	(-3)	/* Seems to be a flag type arg	*/
X#define	RETMIN		(-3)	/* Min. value for getargerror()	*/
X
XLOCAL char	*retnames[] =  {
X	"NOTAFILE",
X	"BADFMT",
X	"BADFLAG",
X	"NOARGS",
X	"NOTAFLAG",
X	"FLAGDELIM",
X};
X#define	RNAME(a)	(retnames[(a)-RETMIN])
X
X#define	SCANONLY	0	/* Do not try to set argument values	*/
X#define	SETARGS		1	/* Set argument values from cmdline	*/
X#define	ARGVECTOR	2	/* Use vector instead of list interface	*/
X#define	NOEQUAL		4	/* -opt=val not allowed for -opt val	*/
X
X	int	_getargs __PR((int *, char *const **, void *,
X							int,
X							struct ga_props *,
X							va_list));
XLOCAL	int	dofile __PR((int *, char *const **, const char **,
X							struct ga_props *));
XLOCAL	int	doflag __PR((int *, char *const **, const char *,
X						void *, int, va_list));
XLOCAL	int	dosflags __PR((const char *, void *,
X						int *, char *const **,
X						int, va_list));
XLOCAL	int	checkfmt __PR((const char *));
XLOCAL	int	checkeql __PR((const char *));
X
XLOCAL	va_list	va_dummy;
X
XLOCAL	char	fmtspecs[] = "#?*&~+%";
X
X#define	isfmtspec(c)		(strchr(fmtspecs, c) != NULL)
X
XLOCAL	struct ga_props	props_default = { 0, 0, sizeof (struct ga_props) };
X
XEXPORT int
X_getarginit(props, size, flags)
X	struct ga_props	*props;
X	size_t		size;
X	UInt32_t	flags;
X{
X	if (size > sizeof (struct ga_props))
X		return (-1);
X
X	props->ga_flags = flags;
X	props->ga_oflags = 0;
X	props->ga_size = size;
X	return (0);
X}
X
X/*
X *	get flags until a non flag type argument is reached (old version)
X */
X/* VARARGS3 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetargs(int *pac, char *const **pav, const char *fmt, ...)
X#else
XEXPORT int
Xgetargs(pac, pav, fmt, va_alist)
X	int	*pac;
X	char	**pav[];
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	ret = _getargs(pac, pav, (void *)fmt, SETARGS, GA_NO_PROPS, args);
X	va_end(args);
X	return (ret);
X}
X
X
X/*
X *	get flags until a non flag type argument is reached (list version)
X */
X/* VARARGS4 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetlargs(int *pac, char *const **pav, struct ga_props *props, const char *fmt, ...)
X#else
XEXPORT int
Xgetlargs(pac, pav, props, fmt, va_alist)
X	int		*pac;
X	char		**pav[];
X	struct ga_props	*props;
X	char		*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	ret = _getargs(pac, pav, (void *)fmt, SETARGS, props, args);
X	va_end(args);
X	return (ret);
X}
X
X
X/*
X *	get flags until a non flag type argument is reached (vector version)
X */
XEXPORT int
Xgetvargs(pac, pav, vfmt, props)
X	int	*pac;
X	char	* const *pav[];
X	struct ga_flags *vfmt;
X	struct ga_props	*props;
X{
X	return (_getargs(pac, pav, vfmt, SETARGS | ARGVECTOR, props, va_dummy));
X}
X
X
X/*
X *	get all flags on the command line, do not stop on files (old version)
X */
X/* VARARGS3 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetallargs(int *pac, char *const **pav, const char *fmt, ...)
X#else
XEXPORT int
Xgetallargs(pac, pav, fmt, va_alist)
X	int	*pac;
X	char	**pav[];
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	for (; ; (*pac)--, (*pav)++) {
X		if ((ret = _getargs(pac, pav, (void *)fmt, SETARGS, GA_NO_PROPS, args)) < NOTAFLAG)
X			break;
X	}
X	va_end(args);
X	return (ret);
X}
X
X
X/*
X *	get all flags on the command line, do not stop on files (list version)
X */
X/* VARARGS4 */
X#ifdef	PROTOTYPES
XEXPORT int
Xgetlallargs(int *pac, char *const **pav, struct ga_props *props, const char *fmt, ...)
X#else
XEXPORT int
Xgetlallargs(pac, pav, props, fmt, va_alist)
X	int		*pac;
X	char		**pav[];
X	struct ga_props	*props;
X	char		*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	for (; ; (*pac)--, (*pav)++) {
X		if ((ret = _getargs(pac, pav, (void *)fmt, SETARGS, props, args)) < NOTAFLAG)
X			break;
X		if (ret == FLAGDELIM && props && (props->ga_flags & GAF_DELIM_DASHDASH))
X			break;
X	}
X	va_end(args);
X	return (ret);
X}
X
X
X/*
X *	get all flags on the command line, do not stop on files (vector version)
X */
XEXPORT int
Xgetvallargs(pac, pav, vfmt, props)
X	int	*pac;
X	char	* const *pav[];
X	struct ga_flags *vfmt;
X	struct ga_props	*props;
X{
X	int	ret;
X
X	for (; ; (*pac)--, (*pav)++) {
X		if ((ret = _getargs(pac, pav, vfmt, SETARGS | ARGVECTOR, props, va_dummy)) < NOTAFLAG)
X			break;
X		if (ret == FLAGDELIM && props && (props->ga_flags & GAF_DELIM_DASHDASH))
X			break;
X	}
X	return (ret);
X}
X
X
X/*
X *	get next non flag type argument (i.e. a file) (old version)
X *	getfiles() is a dry run getargs()
X */
XEXPORT int
Xgetfiles(pac, pav, fmt)
X	int		*pac;
X	char *const	*pav[];
X	const char	*fmt;
X{
X	return (_getargs(pac, pav, (void *)fmt, SCANONLY, GA_NO_PROPS, va_dummy));
X}
X
X
X/*
X *	get next non flag type argument (i.e. a file) (list version)
X *	getlfiles() is a dry run getlargs()
X */
XEXPORT int
Xgetlfiles(pac, pav, props, fmt)
X	int		*pac;
X	char *const	*pav[];
X	struct ga_props	*props;
X	const char	*fmt;
X{
X	return (_getargs(pac, pav, (void *)fmt, SCANONLY, props, va_dummy));
X}
X
X
X/*
X *	get next non flag type argument (i.e. a file) (vector version)
X *	getvfiles() is a dry run getvargs()
X */
XEXPORT int
Xgetvfiles(pac, pav, vfmt, props)
X	int		*pac;
X	char *const	*pav[];
X	struct ga_flags	*vfmt;
X	struct ga_props	*props;
X{
X	return (_getargs(pac, pav, vfmt, SCANONLY | ARGVECTOR, props, va_dummy));
X}
X
X
X/*
X *	check args until the next non flag type argmument is reached
X *	*pac is decremented, *pav is incremented so that the
X *	non flag type argument is at *pav[0]
X *
X *	return code:
X *		+2 FLAGDELIM	"--" stopped flag processing
X *		+1 NOTAFLAG	not a flag type argument (is a file)
X *		 0 NOARGS	no more args
X *		-1 BADFLAG	a non-matching flag type argument
X *		-2 BADFMT	bad syntax in format string
X */
X/* LOCAL int */
XEXPORT int
X_getargs(pac, pav, vfmt, flags, props, args)
X	register int		*pac;
X	register char	*const	**pav;
X		void		*vfmt;
X		int		flags;
X		struct ga_props	*props;
X		va_list		args;
X{
X	const	char	*argp;
X		int	ret;
X
X
X	if (props == GA_NO_PROPS)
X		props = &props_default;
X	props->ga_oflags = 0;
X	if (props->ga_flags & GAF_NO_EQUAL)
X		flags |= NOEQUAL;
X
X	for (; *pac > 0; (*pac)--, (*pav)++) {
X		argp = **pav;
X
X		ret = dofile(pac, pav, &argp, props);
X
X		if (ret != NOTAFILE)
X			return (ret);
X
X		ret = doflag(pac, pav, argp, vfmt, flags, args);
X
X		if (ret != NOTAFLAG)
X			return (ret);
X	}
X	return (NOARGS);
X}
X
X
X/*
X * check if *pargp is a file type argument
X */
XLOCAL int
Xdofile(pac, pav, pargp, props)
X	register int		*pac;
X	register char *const	**pav;
X		const char	**pargp;
X		struct ga_props	*props;
X{
X	register const char	*argp = *pargp;
X
X
X	if (argp[0] == '-') {
X		/*
X		 * "-"	is a special non flag type argument
X		 *	that usually means take stdin instead of a named file
X		 */
X		if (argp[1] == '\0')
X			return (NOTAFLAG);
X		/*
X		 * "--" is a prefix to take the next argument
X		 *	as non flag type argument
X		 * NOTE: POSIX requires "--" to indicate the end of the
X		 *	 flags on the command line. Programs that like to be
X		 *	 100% POSIX compliant call only get[lv]args() once
X		 *	 and then process the list of files from cav[0].
X		 */
X		if (argp[1] == '-' && argp[2] == '\0') {
X			if (--(*pac) > 0) {
X				(*pav)++;
X				return (FLAGDELIM);
X			} else {
X				return (NOARGS);
X			}
X		}
X	}
X
X	/*
X	 * Now check if it may be flag type argument at all.
X	 * Flag type arguments begin with a '-', a '+' or contain a '='
X	 * i.e. -flag +flag or flag=
X	 * The behavior here may be controlled by props->ga_flags to
X	 * allow getargs() to e.g. behave fully POSIX compliant.
X	 */
X	if (argp[0] != '-') {
X		if (argp[0] == '+' && (props->ga_flags & GAF_NO_PLUS) == 0)
X			return (NOTAFILE);	/* This is a flag type arg */
X
X		/*
X		 * If 'flag=value' is not allowed at all, speed things up
X		 * and do not call checkeql() to check for '='.
X		 */
X		if (props->ga_flags & GAF_NO_EQUAL)
X			return (NOTAFLAG);
X		if (checkeql(argp) && (props->ga_flags & GAF_NEED_DASH) == 0)
X			return (NOTAFILE);	/* This is a flag type arg */
X		return (NOTAFLAG);
X	}
X	return (NOTAFILE);			/* This is a flag type arg */
X}
X
X
X/*
X *	compare argp with the format string
X *	if a match is found store the result a la scanf in one of the
X *	arguments pointed to in the va_list
X *
X *	If (flags & SETARGS) == 0, only check arguments for getfiles()
X *	In case that (flags & SETARGS) == 0 or that (flags & ARGVECTOR) != 0,
X *	va_list may be a dummy argument.
X */
XLOCAL int
Xdoflag(pac, pav, argp, vfmt, flags, oargs)
X		int		*pac;
X		char	*const	**pav;
X	register const char	*argp;
X		void		*vfmt;
X		int		flags;
X		va_list		oargs;
X{
X	register const char	*fmt = (const char *)vfmt;
X	struct ga_flags		*flagp = vfmt;
X	const char	*fmtp;
X	long	val;
X	Llong	llval;
X	int	singlecharflag	= 0;
X	BOOL	isspec;
X	BOOL	hasdash		= FALSE;
X	BOOL	doubledash	= FALSE;
X	BOOL	haseql		= checkeql(argp);
X	const char	*sargp;
X	const char	*sfmt;
X	va_list	args;
X	char	*const	*spav	= *pav;
X	int		spac	= *pac;
X	void		*curarg	= (void *)0;
X
X	sfmt = fmt;
X	/*
X	 * flags beginning with '-' don't have to include the '-' in
X	 * the format string.
X	 * flags beginning with '+' have to include it in the format string.
X	 */
X	if (argp[0] == '-') {
X		argp++;
X		hasdash = TRUE;
X		/*
X		 * Implement legacy support for --longopt
X		 * If we find a double dash, we do not look for combinations
X		 * of boolean single char flags.
X		 */
X		if (argp[0] == '-') {
X			argp++;
X			doubledash = TRUE;
X			/*
X			 * Allow -- only for long options.
X			 */
X			if (argp[1] == '\0') {
X				return (BADFLAG);
X			}
X		}
X	}
X	sargp = argp;
X
X	/*
X	 * Initialize 'args' to the start of the argument list.
X	 * I don't know any portable way to copy an arbitrary
X	 * C object so I use a system-specific routine
X	 * (probably a macro) from stdarg.h.  (Remember that
X	 * if va_list is an array, 'args' will be a pointer
X	 * and '&args' won't be what I would need for memcpy.)
X	 * It is a system requirement for SVr4 compatibility
X	 * to be able to do this assgignement. If your system
X	 * defines va_list to be an array but does not define
X	 * va_copy() you are lost.
X	 * This is needed to make sure, that 'oargs' will not
X	 * be clobbered.
X	 */
X	va_copy(args, oargs);
X
X	if (flags & ARGVECTOR) {
X		sfmt = fmt = flagp->ga_format;
X		if (fmt == NULL)
X			sfmt = fmt = "";
X		if (flags & SETARGS)
X			curarg = flagp->ga_arg;
X	} else if (flags & SETARGS) {
X		curarg = va_arg(args, void *);
X	}
X	/*
X	 * check if the first flag in format string is a singlechar flag
X	 */
Xagain:
X	if (fmt[0] != '\0' &&
X	    (fmt[1] == ',' || fmt[1] == '+' ||
X	    fmt[1] == '~' || fmt[1] == '%' || fmt[1] == '\0'))
X		singlecharflag++;
X	/*
X	 * check the whole format string for a match
X	 */
X	for (;;) {
X		for (; *fmt; fmt++, argp++) {
X			if (*fmt == '\\') {
X				/*
X				 * Allow "#?*&+" to appear inside a flag.
X				 * NOTE: they must be escaped by '\\' only
X				 *	 inside the the format string.
X				 */
X				fmt++;
X				isspec = FALSE;
X			} else {
X				isspec = isfmtspec(*fmt);
X			}
X			/*
X			 * If isspec is TRUE, the arg beeing checked starts
X			 * like a valid flag. Argp now points to the rest.
X			 */
X			if (isspec) {
X				/*
X				 * If *argp is '+' and we are on the
X				 * beginning of the arg that is currently
X				 * checked, this cannot be an inc type flag.
X				 */
X				if (*argp == '+' && argp == sargp)
X					continue;
X				/*
X				 * skip over to arg of flag
X				 */
X				if (*argp == '=') {
X					if (flags & NOEQUAL)
X						return (BADFLAG);
X					argp++;
X				} else if (*argp != '\0' && haseql) {
X					/*
X					 * Flag and arg are not separated by a
X					 * space.
X					 * Check here for:
X					 * xxxxx=yyyyy	match on '&'
X					 * Checked before:
X					 * abc=yyyyy	match on 'abc&'
X					 * 		or	 'abc*'
X					 * 		or	 'abc#'
X					 * We come here if 'argp' starts with
X					 * the same sequence as a valid flag
X					 * and contains an equal sign.
X					 * We have tested before if the text
X					 * before 'argp' matches exactly.
X					 * At this point we have no exact match
X					 * and we only allow to match
X					 * the special pattern '&'.
X					 * We need this e.g. for 'make'.
X					 * We allow any flag type argument to
X					 * match the format string "&" to set
X					 * up a function that handles all odd
X					 * stuff that getargs will not grok.
X					 * In addition, to allow getargs to be
X					 * used for CPP type flags we allow to
X					 * match -Dabc=xyz on 'D&'. Note that
X					 * Dabc=xyz will not match 'D&'.
X					 */
X					if ((!hasdash && argp != sargp) || *fmt != '&')
X						goto nextarg;
X				}
X
X				/*
X				 * The format string 'f* ' may be used
X				 * to disallow -ffoo for f*
X				 *
X				 * The same behavior is implemented for
X				 * 'f# '. 'f? ' and 'f& '.
X				 */
X				if (!haseql && *argp != '\0' &&
X				    (fmt[0] == '*' || fmt[0] == '#' ||
X				    fmt[0] == '?' || fmt[0] == '&') &&
X							fmt[1] == ' ') {
X					goto nextarg;
X				}
X
X				/*
X				 * *arpp == '\0' || !haseql
X				 * We come here if 'argp' starts with
X				 * the same sequence as a valid flag.
X				 * This will match on the following args:
X				 * -farg	match on 'f*'
X				 * -f12		match on 'f#'
X				 * +12		match on '+#'
X				 * -12		match on '#'
X				 * and all args that are separated from
X				 * their flags.
X				 * In the switch statement below, we check
X				 * if the text after 'argp' (if *argp != 0) or
X				 * the next arg is a valid arg for this flag.
X				 */
X				break;
X			} else if (*fmt == *argp) {
X				if (argp[1] == '\0' &&
X				    (fmt[1] == '\0' || fmt[1] == ',')) {
X
X					if (flags & SETARGS)
X						*((int *)curarg) = TRUE;
X
X
X					return (checkfmt(fmt)); /* XXX */
X				}
X			} else {
X				/*
X				 * skip over to next format identifier
X				 * & reset arg pointer
X				 */
X			nextarg:
X				while (*fmt != ',' && *fmt != '\0') {
X					/* function has extra arg on stack */
X					if ((*fmt == '&' || *fmt == '~') &&
X					    (flags & (SETARGS|ARGVECTOR)) == SETARGS) {
X						curarg = va_arg(args, void *);
X					}
X					fmt++;
X				}
X				argp = sargp;
X				break;
X			}
X		}
X		switch (*fmt) {
X
X		case '\0':
X			/*
X			 * Boolean type has been tested before.
X			 */
X			if (flags & ARGVECTOR) {
X				if (flagp[1].ga_format != NULL) {
X					flagp++;
X					sfmt = fmt = flagp->ga_format;
X					if (flags & SETARGS)
X						curarg = flagp->ga_arg;
X					argp = sargp;
X					goto again;
X				}
X			}
X			if (singlecharflag && !doubledash &&
X			    (val = dosflags(sargp, vfmt, pac, pav,
X							flags & ~SETARGS,
X							va_dummy)) == BADFLAG) {
X				return (val);
X			}
X			if (singlecharflag && !doubledash &&
X			    (val = dosflags(sargp, vfmt, pac, pav,
X							flags,
X							oargs)) != BADFLAG) {
X				return (val);
X			}
X			return (BADFLAG);
X
X		case ',':
X			fmt++;
X			if (fmt[0] == '\0')	/* Should we allow "a,b,c,"? */
X				return (BADFMT);
X			if (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0')
X				singlecharflag++;
X			if ((flags & (SETARGS|ARGVECTOR)) == SETARGS)
X				curarg = va_arg(args, void *);
X			continue;
X
X		case '*':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X			if (fmt[1] == '_')	/* To disallow -f foo for f* */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -ffoo for f* */
X				fmt++;
X
X			if (flags & SETARGS)
X				*((const char **)curarg) = argp;
X
X
X			return (checkfmt(fmt));
X
X		case '?':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X			if (fmt[1] == '_')	/* To disallow -f c for f? */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -fc for f? */
X				fmt++;
X
X			/*
X			 * Allow -f '' to specify a nul character.
X			 * If more than one char arg, it
X			 * cannot be a character argument.
X			 */
X			if (argp[0] != '\0' && argp[1] != '\0')
X				goto nextchance;
X
X			if (flags & SETARGS)
X				*((char *)curarg) = *argp;
X
X
X			return (checkfmt(fmt));
X
X		case '+':
X			/*
X			 * inc type is similar to boolean,
X			 * there is no arg in argp to convert.
X			 */
X			if (*argp != '\0')
X				goto nextchance;
X			/*
X			 * If *fmt is '+' and we are on the beginning
X			 * of the format desciptor that is currently
X			 * checked, this cannot be an inc type flag.
X			 */
X			if (fmt == sfmt || fmt[-1] == ',')
X				goto nextchance;
X
X			fmtp = fmt;
X			if (fmt[1] == 'l' || fmt[1] == 'L') {
X				if (fmt[2] == 'l' || fmt[2] == 'L') {
X					if (flags & SETARGS)
X						*((Llong *)curarg) += 1;
X					fmt += 2;
X				} else {
X					if (flags & SETARGS)
X						*((long *)curarg) += 1;
X					fmt++;
X				}
X			} else if (fmt[1] == 's' || fmt[1] == 'S') {
X				if (flags & SETARGS)
X					*((short *)curarg) += 1;
X				fmt++;
X			} else if (fmt[1] == 'c' || fmt[1] == 'C') {
X				if (flags & SETARGS)
X					*((char *)curarg) += 1;
X				fmt++;
X			} else {
X				if (fmt[1] == 'i' || fmt[1] == 'I')
X					fmt++;
X				if (flags & SETARGS)
X					*((int *)curarg) += 1;
X			}
X
X
X			return (checkfmt(fmt));
X
X		case '%':
X			/*
X			 * inc type is similar to boolean,
X			 * there is no arg in argp to convert.
X			 */
X			if (*argp != '\0')
X				goto nextchance;
X
X			fmt++;
X			if (*fmt == '1')
X				val = TRUE;
X			else if (*fmt == '0')
X				val = FALSE;
X			else
X				goto nextchance;
X
X			fmtp = fmt;
X			llval = (Llong)val;
X			if (fmt[1] == 'l' || fmt[1] == 'L') {
X				if (fmt[2] == 'l' || fmt[2] == 'L') {
X					if (flags & SETARGS)
X						*((Llong *)curarg) = llval;
X					fmt += 2;
X				} else {
X					if (flags & SETARGS)
X						*((long *)curarg) = val;
X					fmt++;
X				}
X			} else if (fmt[1] == 's' || fmt[1] == 'S') {
X				if (flags & SETARGS)
X					*((short *)curarg) = val;
X				fmt++;
X			} else if (fmt[1] == 'c' || fmt[1] == 'C') {
X				if (flags & SETARGS)
X					*((char *)curarg) = val;
X				fmt++;
X			} else {
X				if (fmt[1] == 'i' || fmt[1] == 'I')
X					fmt++;
X				if (flags & SETARGS)
X					*((int *)curarg) = val;
X			}
X
X
X			return (checkfmt(fmt));
X
X		case '#':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X			if (fmt[1] == '_')	/* To disallow -f 123 for f# */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -f123 for f# */
X				fmt++;
X
X			if (*astoll(argp, &llval) != '\0') {
X				/*
X				 * arg is not a valid number!
X				 * go to next format in the format string
X				 * and check if arg matches any other type
X				 * in the format specs.
X				 */
X			nextchance:
X				while (*fmt != ',' && *fmt != '\0') {
X					if ((*fmt == '&' || *fmt == '~') &&
X					    (flags & (SETARGS|ARGVECTOR)) == SETARGS) {
X						curarg = va_arg(args, void *);
X					}
X					fmt++;
X				}
X				argp = sargp;
X				*pac = spac;
X				*pav = spav;
X				continue;
X			}
X			fmtp = fmt;
X			val = (long)llval;
X			if (fmt[1] == 'l' || fmt[1] == 'L') {
X				if (fmt[2] == 'l' || fmt[2] == 'L') {
X					if (flags & SETARGS)
X						*((Llong *)curarg) = llval;
X					fmt += 2;
X				} else {
X					if (flags & SETARGS)
X						*((long *)curarg) = val;
X					fmt++;
X				}
X			} else if (fmt[1] == 's' || fmt[1] == 'S') {
X				if (flags & SETARGS)
X					*((short *)curarg) = (short)val;
X				fmt++;
X			} else if (fmt[1] == 'c' || fmt[1] == 'C') {
X				if (flags & SETARGS)
X					*((char *)curarg) = (char)val;
X				fmt++;
X			} else {
X				if (fmt[1] == 'i' || fmt[1] == 'I')
X					fmt++;
X				if (flags & SETARGS)
X					*((int *)curarg) = (int)val;
X			}
X
X			return (checkfmt(fmt));
X
X		case '~':
X			if (*argp != '\0')
X				goto nextchance;
X			if (haseql) {
X				return (BADFLAG);
X			}
X			goto callfunc;
X
X		case '&':
X			if (*argp == '\0' && fmt[1] != '_') {
X				if (*pac > 1) {
X					(*pac)--;
X					(*pav)++;
X					argp = **pav;
X				} else {
X					return (BADFLAG);
X				}
X			}
X		callfunc:
X
X			if (*fmt == '&' && fmt[1] == '_') /* To disallow -f foo for f& */
X				fmt++;
X			else if (fmt[1] == ' ')	/* To disallow -ffoo for f& */
X				fmt++;
X			if ((val = checkfmt(fmt)) != NOTAFLAG)
X				return (val);
X
X			fmtp = sargp;
X			if (hasdash)
X				fmtp--;
X			if (doubledash)
X				fmtp--;
X			if ((flags & (SETARGS|ARGVECTOR)) == (SETARGS|ARGVECTOR)) {
X				int		ret;
X
X				if (flagp->ga_funcp == NULL)
X					return (BADFMT);
X
X				ret = ((*flagp->ga_funcp) (argp, flagp->ga_arg,
X								pac, pav, fmtp));
X				if (ret != NOTAFILE)
X					return (ret);
X				fmt++;
X			} else
X			if (flags & SETARGS) {
X				int	ret;
X				void	*funarg = va_arg(args, void *);
X
X				if (curarg == NULL)
X					return (BADFMT);
X				ret = ((*(getpargfun)curarg) (argp, funarg,
X								pac, pav, fmtp));
X				if (ret != NOTAFILE)
X					return (ret);
X				fmt++;
X			} else {
X				return (val);
X			}
X			/*
X			 * Called function returns NOTAFILE: try next format.
X			 */
X		}
X	}
X}
X
X
X/*
X *	parse args for combined single char flags
X */
Xtypedef struct {
X	void	*curarg;	/* The pointer to the arg to modify	   */
X	void	*curfun;	/* The pointer to the function to call	   */
X	char	c;		/* The single char flag character	   */
X	char	type;		/* The type of the single char flag	   */
X	char	fmt;		/* The format type of the single char flag */
X	char	val;		/* The value to assign for BOOL flags	   */
X} sflags;
X
XLOCAL int
Xdosflags(argp, vfmt, pac, pav, flags, oargs)
X	register const char	*argp;
X		void		*vfmt;
X		int		*pac;
X		char	*const	**pav;
X		int		flags;
X		va_list		oargs;
X{
X	register const char	*fmt = (const char *)vfmt;
X	struct ga_flags		*flagp = vfmt;
X#define	MAXSF	64
X		sflags	sf[MAXSF];
X		char	fl[256];
X		va_list args;
X	register sflags	*rsf	= sf;
X	register int	nsf	= 0;
X	register const char *p	= argp;
X	register int	i;
X	register void	*curarg = (void *)0;
X	getpargfun	curfun = 0;
X		char	type;
X
X	/*
X	 * Initialize 'args' to the start of the argument list.
X	 * I don't know any portable way to copy an arbitrary
X	 * C object so I use a system-specific routine
X	 * (probably a macro) from stdarg.h.  (Remember that
X	 * if va_list is an array, 'args' will be a pointer
X	 * and '&args' won't be what I would need for memcpy.)
X	 * It is a system requirement for SVr4 compatibility
X	 * to be able to do this assgignement. If your system
X	 * defines va_list to be an array but does not define
X	 * va_copy() you are lost.
X	 * This is needed to make sure, that 'oargs' will not
X	 * be clobbered.
X	 */
X	va_copy(args, oargs);
X
X	if (flags & ARGVECTOR) {
X		fmt = flagp->ga_format;
X		if (fmt == NULL)
X			fmt = "";
X		if (flags & SETARGS) {
X			curarg = flagp->ga_arg;
X			curfun = flagp->ga_funcp;
X		}
X	} else if (flags & SETARGS) {
X		curarg = va_arg(args, void *);
X	}
X
X	for (i = 0; i < sizeof (fl); i++) {
X		fl[i] = 0;
X	}
X	while (*p) {
X		for (i = 0; i < nsf; i++) {
X			if (rsf[i].c == *p)
X				break;
X		}
X		if (i >= MAXSF)
X			return (BADFLAG);
X		if (i == nsf) {
X			rsf[i].curarg = (void *)0;
X			rsf[i].curfun = (void *)0;
X			rsf[i].c = *p;
X			rsf[i].type = (char)-1;
X			rsf[i].fmt = '\0';
X			rsf[i].val = (char)TRUE;
X			nsf++;
X		}
X		fl[*p & 0xFF] = i;
X		p++;
X	}
X
Xagain:
X	while (*fmt) {
X		if (!isfmtspec(*fmt) &&
X		    (fmt[1] == ',' || fmt[1] == '+' ||
X		    fmt[1] == '~' || fmt[1] == '%' || fmt[1] == '\0') &&
X		    strchr(argp, *fmt)) {
X			for (i = 0; i < nsf; i++) {
X				if (rsf[i].c == *fmt) {
X					if (fmt[1] == '+') {
X						rsf[i].fmt = '+';
X						fmt++;
X						if (fmt[1] == ',' ||
X						    fmt[1] == '\0') {
X							rsf[i].type = 'i';
X						} else if ((fmt[1] == 'l' ||
X							    fmt[1] == 'L') &&
X							    (fmt[2] == 'l' ||
X							    fmt[2] == 'L')) {
X							/*
X							 * Type 'Q'uad (ll)
X							 */
X							rsf[i].type = 'Q';
X							fmt++;
X						} else {
X							/*
X							 * Type 'l','i','s','c'
X							 */
X							rsf[i].type = fmt[1];
X						}
X					} else if (fmt[1] == '%') {
X						fmt++;
X						rsf[i].fmt = '%';
X						if (fmt[1] == '0')
X							rsf[i].val = (char)FALSE;
X						else if (fmt[1] == '1')
X							rsf[i].val = (char)TRUE;
X						fmt++;
X						if (fmt[1] == ',' ||
X						    fmt[1] == '\0') {
X							rsf[i].type = 'i';
X						} else if ((fmt[1] == 'l' ||
X							    fmt[1] == 'L') &&
X							    (fmt[2] == 'l' ||
X							    fmt[2] == 'L')) {
X							/*
X							 * Type 'Q'uad (ll)
X							 */
X							rsf[i].type = 'Q';
X							fmt++;
X						} else {
X							/*
X							 * Type 'l','i','s','c'
X							 */
X							rsf[i].type = fmt[1];
X						}
X					} else if (fmt[1] == '~') {
X						/*
X						 * Let fmt point to ',' to
X						 * prevent to fetch the
X						 * func arg twice.
X						 */
X						fmt += 2;
X						rsf[i].fmt = '~';
X						rsf[i].type = '~';
X						rsf[i].curfun = curarg;
X						if ((flags & (SETARGS|ARGVECTOR)) == SETARGS)
X							curarg = va_arg(args, void *);
X					} else {
X						/*
X						 * ',' or '\0' for BOOL
X						 */
X						rsf[i].type = fmt[1];
X					}
X					rsf[i].curarg = curarg;
X					break;
X				}
X			}
X		}
X		while (*fmt != ',' && *fmt != '\0') {
X			/* function has extra arg on stack */
X			if ((*fmt == '&' || *fmt == '~') &&
X			    (flags & (SETARGS|ARGVECTOR)) == SETARGS) {
X				curarg = va_arg(args, void *);
X			}
X			fmt++;
X		}
X		if (*fmt != '\0')
X			fmt++;
X
X		if ((flags & (SETARGS|ARGVECTOR)) == SETARGS)
X			curarg = va_arg(args, void *);
X	}
X	if ((flags & ARGVECTOR) && flagp[1].ga_format != NULL) {
X		flagp++;
X		fmt = flagp->ga_format;
X		if (flags & SETARGS) {
X			curarg = flagp->ga_arg;
X			curfun = flagp->ga_funcp;
X		}
X		goto again;
X	}
X
X	for (p = argp; *p; p++) {
X		char tfmt;
X
X		i = fl[*p & 0xFF];
X		tfmt  = rsf[i].fmt;
X		type = rsf[i].type;
X		if (type == (char)-1) {
X			return (BADFLAG);
X		}
X
X		if ((flags & SETARGS) &&
X		    (rsf[i].curfun || rsf[i].curarg)) {
X			if (type == ',' || type == '\0') {
X				*((int *)rsf[i].curarg) = TRUE;
X			} else if (type == 'i' || type == 'I') {
X				if (tfmt == '+')
X					*((int *)rsf[i].curarg) += 1;
X				else
X					*((int *)rsf[i].curarg) = rsf[i].val;
X			} else if (type == 'l' || type == 'L') {
X				if (tfmt == '+')
X					*((long *)rsf[i].curarg) += 1;
X				else
X					*((long *)rsf[i].curarg) = rsf[i].val;
X			} else if (type == 'Q') {
X				if (tfmt == '+')
X					*((Llong *)rsf[i].curarg) += 1;
X				else
X					*((Llong *)rsf[i].curarg) = rsf[i].val;
X			} else if (type == 's' || type == 'S') {
X				if (tfmt == '+')
X					*((short *)rsf[i].curarg) += 1;
X				else
X					*((short *)rsf[i].curarg) = rsf[i].val;
X			} else if (type == 'c' || type == 'C') {
X				if (tfmt == '+')
X					*((char *)rsf[i].curarg) += 1;
X				else
X					*((char *)rsf[i].curarg) = rsf[i].val;
X			} else if (type == '~') {
X				int	ret;
X				char	cfmt[3];
X
X				cfmt[0] = '-';
X				cfmt[1] = rsf[i].c;
X				cfmt[2] = '\0';
X
X				if (rsf[i].curfun == NULL)
X					return (BADFMT);
X				ret = ((*(getpargfun)rsf[i].curfun) ("",
X								rsf[i].curarg,
X								pac, pav, cfmt));
X					return (ret);
X			} else {
X				return (BADFLAG);
X			}
X		}
X	}
X	return (NOTAFLAG);
X}
X
X/*
X *	If the next format character is a comma or the string delimiter,
X *	there are no invalid format specifiers. Return success.
X *	Otherwise raise the getarg_bad_format condition.
X */
XLOCAL int
Xcheckfmt(fmt)
X	const char	*fmt;
X{
X	char	c;
X
X	c = *(++fmt);	/* non constant expression */
X
X
X	if (c == ',' || c == '\0') {
X		return (NOTAFLAG);
X	} else {
X		raisecond("getarg_bad_format", (long)fmt);
X		return (BADFMT);
X	}
X}
X
X/*
X *	Parse the string as long as valid characters can be found.
X *	Valid flag identifiers are chosen from the set of
X *	alphanumeric characters, '-' and '_'.
X *	If the next character is an equal sign the string
X *	contains a valid flag identifier.
X */
XLOCAL int
Xcheckeql(str)
X	register const char *str;
X{
X	register unsigned char c;
X
X	for (c = (unsigned char)*str;
X			isalnum(c) || c == '_' || c == '-' || c == '+';
X								c = *++str)
X		/* LINTED */
X		;
X	return (c == '=');
X}
X
XEXPORT char *
Xgetargerror(err)
X	int	err;
X{
X	if (err < RETMIN || err > RETMAX)
X		return ("Illegal arg error");
X	return (RNAME(err));
X}
END-of-star-1.5.2/lib/getargs.c
echo x - star-1.5.2/lib/cmpbytes.c
sed 's/^X//' >star-1.5.2/lib/cmpbytes.c << 'END-of-star-1.5.2/lib/cmpbytes.c'
X/* @(#)cmpbytes.c	1.23 10/08/21 Copyright 1988, 1995-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)cmpbytes.c	1.23 10/08/21 Copyright 1988, 1995-2010 J. Schilling";
X#endif  /* lint */
X/*
X *	compare data
X *	Return the index of the first differing character
X *
X *	Copyright (c) 1988, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/align.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X/*
X * Return the index of the first differing character
X * This interface is not compatible to memcmp()
X */
XEXPORT ssize_t
Xcmpbytes(fromp, top, cnt)
X	const void	*fromp;
X	const void	*top;
X	ssize_t		cnt;
X{
X	register const char	*from	= (char *)fromp;
X	register const char	*to	= (char *)top;
X	register ssize_t	n;
X	register ssize_t	i;
X
X	/*
X	 * If we change cnt to be unsigned, check for == instead of <=
X	 */
X	if ((n = cnt) <= 0)
X		return (cnt);
X
X	/*
X	 * Compare byte-wise until properly aligned for a long pointer.
X	 */
X	i = sizeof (long) - 1;
X	while (--n >= 0 && --i >= 0 && !l2aligned(from, to)) {
X		if (*to++ != *from++)
X			goto cdiff;
X	}
X	n++;
X
X	if (n >= (ssize_t)(8 * sizeof (long))) {
X		if (l2aligned(from, to)) {
X			register const long *froml = (const long *)from;
X			register const long *tol   = (const long *)to;
X			register ssize_t rem = n % (8 * sizeof (long));
X
X			n /= (8 * sizeof (long));
X			do {
X				/* BEGIN CSTYLED */
X				DO8(
X					if (*tol++ != *froml++)
X						break;
X				);
X				/* END CSTYLED */
X			} while (--n > 0);
X
X			if (n > 0) {
X				--froml;
X				--tol;
X				to = (const char *)tol;
X				from = (const char *)froml;
X				goto ldiff;
X			}
X			to = (const char *)tol;
X			from = (const char *)froml;
X			n = rem;
X		}
X
X		if (n >= 8) {
X			n -= 8;
X			do {
X				/* BEGIN CSTYLED */
X				DO8(
X					if (*to++ != *from++)
X						goto cdiff;
X				);
X				/* END CSTYLED */
X			} while ((n -= 8) >= 0);
X			n += 8;
X		}
X		if (n > 0) do {
X			if (*to++ != *from++)
X				goto cdiff;
X		} while (--n > 0);
X		return (cnt);
X	}
X	if (n > 0) do {
X		if (*to++ != *from++)
X			goto cdiff;
X	} while (--n > 0);
X	return (cnt);
Xldiff:
X	n = sizeof (long);
X	do {
X		if (*to++ != *from++)
X			goto cdiff;
X	} while (--n > 0);
Xcdiff:
X	return ((ssize_t)(--from - (char *)fromp));
X}
END-of-star-1.5.2/lib/cmpbytes.c
echo x - star-1.5.2/lib/cmpnullbytes.c
sed 's/^X//' >star-1.5.2/lib/cmpnullbytes.c << 'END-of-star-1.5.2/lib/cmpnullbytes.c'
X/* @(#)cmpnullbytes.c	1.10 10/08/21 Copyright 1988,2002-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)cmpnullbytes.c	1.10 10/08/21 Copyright 1988,2002-2010 J. Schilling";
X#endif  /* lint */
X/*
X *	compare data against null
X *	Return the index of the first non-null character
X *
X *	Copyright (c) 1988,2002-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/align.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X/*
X * Return the index of the first non-null character
X */
XEXPORT ssize_t
Xcmpnullbytes(fromp, cnt)
X	const void	*fromp;
X	ssize_t		cnt;
X{
X	register const char	*from	= (char *)fromp;
X	register ssize_t	n;
X
X	/*
X	 * If we change cnt to be unsigned, check for == instead of <=
X	 */
X	if ((n = cnt) <= 0)
X		return (cnt);
X
X	/*
X	 * Compare byte-wise until properly aligned for a long pointer.
X	 */
X	while (--n >= 0 && !laligned(from)) {
X		if (*from++ != 0)
X			goto cdiff;
X	}
X	n++;
X
X	if (n >= (ssize_t)(8 * sizeof (long))) {
X		if (laligned(from)) {
X			register const long *froml = (const long *)from;
X			register ssize_t rem = n % (8 * sizeof (long));
X
X			n /= (8 * sizeof (long));
X			do {
X				/* BEGIN CSTYLED */
X				DO8(
X					if (*froml++ != 0)
X						break;
X				);
X				/* END CSTYLED */
X			} while (--n > 0);
X
X			if (n > 0) {
X				--froml;
X				from = (const char *)froml;
X				goto ldiff;
X			}
X			from = (const char *)froml;
X			n = rem;
X		}
X
X		if (n >= 8) {
X			n -= 8;
X			do {
X				/* BEGIN CSTYLED */
X				DO8(
X					if (*from++ != 0)
X						goto cdiff;
X				);
X				/* END CSTYLED */
X			} while ((n -= 8) >= 0);
X			n += 8;
X		}
X		if (n > 0) do {
X			if (*from++ != 0)
X				goto cdiff;
X		} while (--n > 0);
X		return (cnt);
X	}
X	if (n > 0) do {
X		if (*from++ != 0)
X			goto cdiff;
X	} while (--n > 0);
X	return (cnt);
Xldiff:
X	n = sizeof (long);
X	do {
X		if (*from++ != 0)
X			goto cdiff;
X	} while (--n > 0);
Xcdiff:
X	return ((ssize_t)(--from - (char *)fromp));
X}
END-of-star-1.5.2/lib/cmpnullbytes.c
echo x - star-1.5.2/lib/comerr.c
sed 's/^X//' >star-1.5.2/lib/comerr.c << 'END-of-star-1.5.2/lib/comerr.c'
X/* @(#)comerr.c	1.40 12/12/20 Copyright 1985-1989, 1995-2012 J. Schilling */
X/*
X *	Routines for printing command errors
X *
X *	Copyright (c) 1985-1989, 1995-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/unistd.h>	/* include <sys/types.h> try to get size_t */
X#include <schily/stdio.h>	/* Try again for size_t	*/
X#include <schily/stdlib.h>	/* Try again for size_t	*/
X#include <schily/standard.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X
XEXPORT	int	on_comerr	__PR((void (*fun)(int, void *), void *arg));
XEXPORT	void	comerr		__PR((const char *, ...));
XEXPORT	void	comerrno	__PR((int, const char *, ...));
XEXPORT	int	errmsg		__PR((const char *, ...));
XEXPORT	int	errmsgno	__PR((int, const char *, ...));
XEXPORT	int	_comerr		__PR((FILE *, int, int, const char *, va_list));
XEXPORT	void	comexit		__PR((int));
XEXPORT	char	*errmsgstr	__PR((int));
X
Xtypedef	struct ex {
X	struct ex *next;
X	void	(*func) __PR((int, void *));
X	void	*arg;
X} ex_t;
X
XLOCAL	ex_t	*exfuncs;
X
XEXPORT	int
Xon_comerr(func, arg)
X	void	(*func) __PR((int, void *));
X	void	*arg;
X{
X	ex_t	*fp;
X
X	fp = malloc(sizeof (*fp));
X	if (fp == NULL)
X		return (-1);
X
X	fp->func = func;
X	fp->arg  = arg;
X	fp->next = exfuncs;
X	exfuncs = fp;
X	return (0);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT void
Xcomerr(const char *msg, ...)
X#else
XEXPORT void
Xcomerr(msg, va_alist)
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	(void) _comerr(stderr, TRUE, geterrno(), msg, args);
X	/* NOTREACHED */
X	va_end(args);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT void
Xcomerrno(int err, const char *msg, ...)
X#else
XEXPORT void
Xcomerrno(err, msg, va_alist)
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	(void) _comerr(stderr, TRUE, err, msg, args);
X	/* NOTREACHED */
X	va_end(args);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xerrmsg(const char *msg, ...)
X#else
XEXPORT int
Xerrmsg(msg, va_alist)
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = _comerr(stderr, FALSE, geterrno(), msg, args);
X	va_end(args);
X	return (ret);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xerrmsgno(int err, const char *msg, ...)
X#else
XEXPORT int
Xerrmsgno(err, msg, va_alist)
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = _comerr(stderr, FALSE, err, msg, args);
X	va_end(args);
X	return (ret);
X}
X
X#if defined(__BEOS__) || defined(__HAIKU__)
X	/*
X	 * On BeOS errno is a big negative number (0x80000000 + small number).
X	 * We assume that small negative numbers are safe to be used as special
X	 * values that prevent printing the errno text.
X	 *
X	 * We tried to use #if EIO < 0 but this does not work because EIO is
X	 * defined to a enum. ENODEV may work as ENODEV is defined to a number
X	 * directly.
X	 */
X#define	silent_error(e)		((e) < 0 && (e) >= -1024)
X#else
X	/*
X	 * On UNIX errno is a small non-negative number, so we assume that
X	 * negative values cannot be a valid errno and don't print the error
X	 * string in this case. However the value may still be used as exit()
X	 * code if 'exflg' is set.
X	 */
X#define	silent_error(e)		((e) < 0)
X#endif
XEXPORT int
X_comerr(f, exflg, err, msg, args)
X	FILE		*f;
X	int		exflg;
X	int		err;
X	const char	*msg;
X	va_list		args;
X{
X	char	errbuf[20];
X	char	*errnam;
X	char	*prognam = get_progname();
X
X	if (silent_error(err)) {
X		js_fprintf(f, "%s: %r", prognam, msg, args);
X	} else {
X		errnam = errmsgstr(err);
X		if (errnam == NULL) {
X			(void) js_snprintf(errbuf, sizeof (errbuf),
X						"Error %d", err);
X			errnam = errbuf;
X		}
X		js_fprintf(f, "%s: %s. %r", prognam, errnam, msg, args);
X	}
X	if (exflg) {
X		comexit(err);
X		/* NOTREACHED */
X	}
X	return (err);
X}
X
XEXPORT void
Xcomexit(err)
X	int	err;
X{
X	int	exmod = err % 256;
X
X	while (exfuncs) {
X		(*exfuncs->func)(err, exfuncs->arg);
X		exfuncs = exfuncs->next;
X	}
X	/*
X	 * On a recent POSIX System that supports waitid(), siginfo.si_status
X	 * holds the exit(2) value as an int. So if waitid() is used to wait
X	 * for the process, we do not have problems from folded exit codes.
X	 * All other wait*() functions fold the exit code by masking it
X	 * with 0377.
X	 *
X	 * Exit codes used with comerr*()/comexit() are frequently errno values
X	 * that have been in the range 0..31 with UNIX.V5 in the mid 1970s and
X	 * that now are in the range 0..151 on Solaris. These values do not
X	 * cause problems from folding to 8 bits, but "sysexits.h" contains
X	 * definitions in the range 64..79 that cause (even unfolded) clashes
X	 * with errno values.
X	 *
X	 * To avoid clashes with errno values, "schily/standard.h" defines
X	 * EX_BAD (-1) as default error exit code and
X	 * EX_CLASH (-64) as marker for clashes.
X	 * Exit codes in the range -2..-63 (254..193 seen as unsigned two's
X	 * complement) are available as software specific exit codes.
X	 * We map all other negative exit codes to EX_CLASH if they would fold
X	 * to -2..-63.
X	 */
X	if (err != exmod && exmod <= 0 && exmod >= EX_CLASH)
X		err = EX_CLASH;
X	exit(err);
X	/* NOTREACHED */
X}
X
XEXPORT char *
Xerrmsgstr(err)
X	int	err;
X{
X#ifdef	HAVE_STRERROR
X	/*
X	 * POSIX compliance may look strange...
X	 */
X	int	errsav = geterrno();
X	char	*ret;
X
X	seterrno(0);
X	ret = strerror(err);
X	err = geterrno();
X	seterrno(errsav);
X
X	if (ret == NULL || err)
X		return (NULL);
X	return (ret);
X#else
X	if (err < 0 || err >= sys_nerr) {
X		return (NULL);
X	} else {
X		return (sys_errlist[err]);
X	}
X#endif
X}
END-of-star-1.5.2/lib/comerr.c
echo x - star-1.5.2/lib/error.c
sed 's/^X//' >star-1.5.2/lib/error.c << 'END-of-star-1.5.2/lib/error.c'
X/* @(#)error.c	1.15 09/07/10 Copyright 1985, 1989, 1995-2003 J. Schilling */
X/*
X *	fprintf() on standard error stdio stream
X *
X *	Copyright (c) 1985, 1989, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/varargs.h>
X#include <schily/schily.h>
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xerror(const char *fmt, ...)
X#else
XEXPORT int
Xerror(fmt, va_alist)
X	char	*fmt;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, fmt);
X#else
X	va_start(args);
X#endif
X	ret = js_fprintf(stderr, "%r", fmt, args);
X	va_end(args);
X	return (ret);
X}
END-of-star-1.5.2/lib/error.c
echo x - star-1.5.2/lib/fconv.c
sed 's/^X//' >star-1.5.2/lib/fconv.c << 'END-of-star-1.5.2/lib/fconv.c'
X/* @(#)fconv.c	1.45 10/11/06 Copyright 1985, 1995-2010 J. Schilling */
X/*
X *	Convert floating point numbers to strings for format.c
X *	Should rather use the MT-safe routines [efg]convert()
X *
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>	/* <- may define NO_FLOATINGPOINT */
X#ifndef	NO_FLOATINGPOINT
X
X#ifndef	__DO_LONG_DOUBLE__
X#include <schily/stdlib.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/math.h>	/* The default place for isinf()/isnan() */
X#include <schily/nlsdefs.h>
X
X#if	!defined(HAVE_STDLIB_H) || defined(HAVE_DTOA)
Xextern	char	*ecvt __PR((double, int, int *, int *));
Xextern	char	*fcvt __PR((double, int, int *, int *));
X#endif
X
X#if	defined(HAVE_ISNAN) && defined(HAVE_ISINF)
X/*
X * *BSD alike libc
X */
X#define	FOUND_ISNAN
X#define	FOUND_ISINF
X#define	FOUND_ISXX
X#endif
X
X#if	defined(HAVE_C99_ISNAN) && defined(HAVE_C99_ISINF)
X#ifndef	FOUND_ISXX
X#define	FOUND_ISXX
X#endif
X#define	FOUND_C99_ISNAN
X#define	FOUND_C99_ISINF
X#define	FOUND_C99_ISXX
X#endif
X
X#if	defined(HAVE_FP_H) && !defined(FOUND_ISXX)
X/*
X * WAS:
X * #if	defined(__osf__) || defined(_IBMR2) || defined(_AIX)
X */
X/*
X * Moved before HAVE_IEEEFP_H for True64 due to a hint
X * from Bert De Knuydt <Bert.Deknuydt@esat.kuleuven.ac.be>
X *
X * True64 has both fp.h & ieeefp.h but the functions
X * isnand() & finite() seem to be erreneously not implemented
X * as a macro and the function lives in libm.
X * Let's hope that we will not get problems with the new order.
X */
X#include <fp.h>
X#if	!defined(isnan) && defined(IS_NAN)
X#define	isnan	IS_NAN
X#define	FOUND_ISNAN
X#endif
X#if	!defined(isinf) && defined(FINITE)
X#define	isinf	!FINITE
X#define	FOUND_ISINF
X#endif
X#if	defined(FOUND_ISNAN) && defined(FOUND_ISINF)
X#define	FOUND_ISXX
X#endif
X#endif
X
X#if	defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) && \
X	!defined(FOUND_C99_ISXX)
X/*
X * SVR4
X */
X#include <ieeefp.h>
X#ifdef	HAVE_ISNAND
X#ifndef	isnan
X#define	isnan	isnand
X#define	FOUND_ISNAN
X#endif
X#endif
X#ifdef	HAVE_FINITE
X#ifndef	isinf
X#define	isinf	!finite
X#define	FOUND_ISINF
X#endif
X#endif
X#if	defined(FOUND_ISNAN) && defined(FOUND_ISINF)
X#define	FOUND_ISXX
X#endif
X#endif
X
X/*
X * WAS:
X * #if	defined(__hpux) || defined(VMS) || defined(_SCO_DS) || defined(__QNX__)
X */
X#ifdef	__nneded__
X#if	defined(__hpux) || defined(__QNX__) || defined(__DJGPP__)
X#ifndef	FOUND_C99_ISXX
X#undef	isnan
X#undef	isinf
X#endif
X#endif
X#endif	/* __needed__ */
X
X/*
X * As we no longer check for defined(isnan)/defined(isinf), the next block
X * should also handle the problems with DJGPP, HP-UX, QNX and VMS.
X */
X#if	!defined(FOUND_ISNAN) && !defined(HAVE_C99_ISNAN)
X#undef	isnan
X#define	isnan(val)	(0)
X#define	NO_ISNAN
X#endif
X#if	!defined(FOUND_ISINF) && !defined(HAVE_C99_ISINF)
X#undef	isinf
X#define	isinf(val)	(0)
X#define	NO_ISINF
X#endif
X
X#if	defined(NO_ISNAN) || defined(NO_ISINF)
X#include <schily/float.h>	/* For values.h */
X#if	(_IEEE - 0) > 0		/* We know that there is IEEE FP */
X/*
X * Note that older HP-UX versions have different #defines for MAXINT in
X * values.h and sys/param.h
X */
X#include <schily/utypes.h>
X#include <schily/btorder.h>
X
X#ifdef	WORDS_BIGENDIAN
X#define	fpw_high(x)	((UInt32_t *)&x)[0]
X#define	fpw_low(x)	((UInt32_t *)&x)[1]
X#else
X#define	fpw_high(x)	((UInt32_t *)&x)[1]
X#define	fpw_low(x)	((UInt32_t *)&x)[0]
X#endif
X#define	FP_EXP		0x7FF00000
X#define	fp_exp(x)	(fpw_high(x) & FP_EXP)
X#define	fp_exc(x)	(fp_exp(x) == FP_EXP)
X
X#ifdef	NO_ISNAN
X#undef	isnan
X#define	isnan(val)	(fp_exc(val) && \
X			(fpw_low(val) != 0 || (fpw_high(val) & 0xFFFFF) != 0))
X#endif
X#ifdef	NO_ISINF
X#undef	isinf
X#define	isinf(val)	(fp_exc(val) && \
X			fpw_low(val) == 0 && (fpw_high(val) & 0xFFFFF) == 0)
X#endif
X#endif	/* We know that there is IEEE FP */
X#endif	/* defined(NO_ISNAN) || defined(NO_ISINF) */
X
X
X#if !defined(HAVE_ECVT) || !defined(HAVE_FCVT) || !defined(HAVE_GCVT)
X
X#ifdef	NO_USER_XCVT
X	/*
X	 * We cannot define our own ecvt()/fcvt()/gcvt() so we need to use
X	 * local names instead.
X	 */
X#ifndef	HAVE_ECVT
X#define	ecvt	js_ecvt
X#endif
X#ifndef	HAVE_FCVT
X#define	fcvt	js_fcvt
X#endif
X#ifndef	HAVE_GCVT
X#define	gcvt	js_gcvt
X#endif
X#endif
X
X#include "cvt.c"
X#endif
X
Xstatic	char	_js_nan[] = "(NaN)";
Xstatic	char	_js_inf[] = "(Infinity)";
X
Xstatic	int	_ferr __PR((char *, double));
X#endif	/* __DO_LONG_DOUBLE__ */
X
X#ifdef	__DO_LONG_DOUBLE__
X#undef	MDOUBLE
X#define	MDOUBLE	long double
X#else
X#undef	MDOUBLE
X#define	MDOUBLE	double
X#endif
X
X#ifdef	abs
X#undef	abs
X#endif
X#define	abs(i)	((i) < 0 ? -(i) : (i))
X
XEXPORT int
Xftoes(s, val, fieldwidth, ndigits)
X	register	char 	*s;
X			MDOUBLE	val;
X	register	int	fieldwidth;
X	register	int	ndigits;
X{
X	register	char	*b;
X	register	char	*rs;
X	register	int	len;
X	register	int	rdecpt;
X			int 	decpt;
X			int	sign;
X
X#ifndef	__DO_LONG_DOUBLE__
X	if ((len = _ferr(s, val)) > 0)
X		return (len);
X#endif
X	rs = s;
X#ifdef	V7_FLOATSTYLE
X	b = ecvt(val, ndigits, &decpt, &sign);
X	rdecpt = decpt;
X#else
X	b = ecvt(val, ndigits+1, &decpt, &sign);
X	rdecpt = decpt-1;
X#endif
X#ifdef	__DO_LONG_DOUBLE__
X	len = *b;
X	if (len < '0' || len > '9') {		/* Inf/NaN */
X		strcpy(s, b);
X		return (strlen(b));
X	}
X#endif
X	len = ndigits + 6;			/* Punkt e +/- nnn */
X	if (sign)
X		len++;
X	if (fieldwidth > len)
X		while (fieldwidth-- > len)
X			*rs++ = ' ';
X	if (sign)
X		*rs++ = '-';
X#ifndef	V7_FLOATSTYLE
X	if (*b)
X		*rs++ = *b++;
X#endif
X#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE)
X	*rs++ = *(localeconv()->decimal_point);
X#else
X	*rs++ = '.';
X#endif
X	while (*b && ndigits-- > 0)
X		*rs++ = *b++;
X	*rs++ = 'e';
X	*rs++ = rdecpt >= 0 ? '+' : '-';
X	rdecpt = abs(rdecpt);
X#ifdef	__DO_LONG_DOUBLE__
X	if (rdecpt >= 1000) {			/* Max-Exp is > 4000 */
X		*rs++ = rdecpt / 1000 + '0';
X		rdecpt %= 1000;
X	}
X#endif
X#ifndef	V7_FLOATSTYLE
X	if (rdecpt >= 100)
X#endif
X	{
X		*rs++ = rdecpt / 100 + '0';
X		rdecpt %= 100;
X	}
X	*rs++ = rdecpt / 10 + '0';
X	*rs++ = rdecpt % 10 + '0';
X	*rs = '\0';
X	return (rs - s);
X}
X
X/*
X * fcvt() from Cygwin32 is buggy.
X */
X#if	!defined(HAVE_FCVT) && defined(HAVE_ECVT)
X#define	USE_ECVT
X#endif
X
XEXPORT int
Xftofs(s, val, fieldwidth, ndigits)
X	register	char 	*s;
X			MDOUBLE	val;
X	register	int	fieldwidth;
X	register	int	ndigits;
X{
X	register	char	*b;
X	register	char	*rs;
X	register	int	len;
X	register	int	rdecpt;
X			int 	decpt;
X			int	sign;
X
X#ifndef	__DO_LONG_DOUBLE__
X	if ((len = _ferr(s, val)) > 0)
X		return (len);
X#endif
X	rs = s;
X#ifdef	USE_ECVT
X	/*
X	 * Needed on systems with broken fcvt() implementation
X	 * (e.g. Cygwin32)
X	 */
X	b = ecvt(val, ndigits, &decpt, &sign);
X	/*
X	 * The next call is needed to force higher precision.
X	 */
X	if (decpt > 0)
X		b = ecvt(val, ndigits+decpt, &decpt, &sign);
X#else
X	b = fcvt(val, ndigits, &decpt, &sign);
X#endif
X#ifdef	__DO_LONG_DOUBLE__
X	len = *b;
X	if (len < '0' || len > '9') {		/* Inf/NaN */
X		strcpy(s, b);
X		return (strlen(b));
X	}
X#endif
X	rdecpt = decpt;
X	len = rdecpt + ndigits + 1;
X	if (rdecpt < 0)
X		len -= rdecpt;
X	if (sign)
X		len++;
X	if (fieldwidth > len)
X		while (fieldwidth-- > len)
X			*rs++ = ' ';
X	if (sign)
X		*rs++ = '-';
X	if (rdecpt > 0) {
X		len = rdecpt;
X		while (*b && len-- > 0)
X			*rs++ = *b++;
X#ifdef	USE_ECVT
X		while (len-- > 0)
X			*rs++ = '0';
X#endif
X	}
X#ifndef	V7_FLOATSTYLE
X	else {
X		*rs++ = '0';
X	}
X#endif
X#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE)
X	*rs++ = *(localeconv()->decimal_point);
X#else
X	*rs++ = '.';
X#endif
X	if (rdecpt < 0) {
X		len = rdecpt;
X		while (len++ < 0 && ndigits-- > 0)
X			*rs++ = '0';
X	}
X	while (*b && ndigits-- > 0)
X		*rs++ = *b++;
X#ifdef	USE_ECVT
X	while (ndigits-- > 0)
X		*rs++ = '0';
X#endif
X	*rs = '\0';
X	return (rs - s);
X}
X
X#ifndef	__DO_LONG_DOUBLE__
X
X#ifdef	HAVE_LONGDOUBLE
X#ifdef	HAVE__LDECVT
X#define	qecvt(ld, n, dp, sp)	_ldecvt(*(long_double *)&ld, n, dp, sp)
X#endif
X#ifdef	HAVE__LDFCVT
X#define	qfcvt(ld, n, dp, sp)	_ldfcvt(*(long_double *)&ld, n, dp, sp)
X#endif
X
X#if	(defined(HAVE_QECVT) || defined(HAVE__LDECVT)) && \
X	(defined(HAVE_QFCVT) || defined(HAVE__LDFCVT))
X#define	__DO_LONG_DOUBLE__
X#define	ftoes	qftoes
X#define	ftofs	qftofs
X#define	ecvt	qecvt
X#define	fcvt	qfcvt
X#include "fconv.c"
X#undef	__DO_LONG_DOUBLE__
X#endif
X#endif	/* HAVE_LONGDOUBLE */
X
XLOCAL int
X_ferr(s, val)
X	char	*s;
X	double	val;
X{
X	if (isnan(val)) {
X		strcpy(s, _js_nan);
X		return (sizeof (_js_nan) - 1);
X	}
X
X	/*
X	 * Check first for NaN because finite() will return 1 on Nan too.
X	 */
X	if (isinf(val)) {
X		strcpy(s, _js_inf);
X		return (sizeof (_js_inf) - 1);
X	}
X	return (0);
X}
X#endif	/* __DO_LONG_DOUBLE__ */
X#endif	/* NO_FLOATINGPOINT */
END-of-star-1.5.2/lib/fconv.c
echo x - star-1.5.2/lib/fexec.c
sed 's/^X//' >star-1.5.2/lib/fexec.c << 'END-of-star-1.5.2/lib/fexec.c'
X/* @(#)fexec.c	1.48 11/07/10 Copyright 1985, 1995-2010 J. Schilling */
X/*
X *	Execute a program with stdio redirection
X *
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X *
X *	This is an interface that exists in the public since 1982.
X *	The POSIX.1-2008 standard did ignore POSIX rules not to
X *	redefine existing public interfaces and redefined the interfaces
X *	forcing us to add a js_*() prefix to the original functions.
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	__DO__FEXEC__
X
X#define	fexecl	__no__fexecl__
X#define	fexecle	__no__fexecle__
X#define	fexecv	__no__fexecv__
X#define	fexecve	__no__fexecve__
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/unistd.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/varargs.h>
X#include <schily/errno.h>
X#include <schily/fcntl.h>
X#include <schily/dirent.h>
X#include <schily/maxpath.h>
X#include <schily/schily.h>
X#define	VMS_VFORK_OK
X#include <schily/vfork.h>
X#endif	/* __DO__FEXEC__ */
X
X#if	defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * We need to fetch the address of "environ" using a hack.
X */
X#include <crt_externs.h>
X#define	environ	*_NSGetEnviron()
X#else
Xextern	char **environ;
X#endif
X
X/*
X * Check whether fexec may be implemented...
X */
X#if	defined(HAVE_DUP) && (defined(HAVE_DUP2) || defined(F_DUPFD))
X
X#define	MAX_F_ARGS	16
X
X#ifndef	__DO__FEXEC__
X#ifndef	NO_FEXEC_COMPAT		/* Define to disable backward compatibility */
X#undef	fexecl
X#undef	fexecle
X#undef	fexecv
X#undef	fexecve
X#ifdef	HAVE_PRAGMA_WEAK
X#pragma	weak fexecl =	js_fexecl
X#pragma	weak fexecle =	js_fexecle
X#pragma	weak fexecv =	js_fexecv
X#pragma	weak fexecve =	js_fexecve
X#else
X
XEXPORT	int	fexecl __PR((const char *, FILE *, FILE *, FILE *,
X							const char *, ...));
XEXPORT	int	fexecle __PR((const char *, FILE *, FILE *, FILE *,
X							const char *, ...));
X		/* 6th arg not const, fexecv forces av[ac] = NULL */
XEXPORT	int	fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
X							char **));
XEXPORT	int	fexecve __PR((const char *, FILE *, FILE *, FILE *,
X					char * const *, char * const *));
X
X#define	__DO__FEXEC__
X#define	js_fexecl	fexecl
X#define	js_fexecle	fexecle
X#include "fexec.c"
X#undef	js_fexecl
X#undef	js_fexecle
X#undef	__DO__FEXEC__
X
XEXPORT int
Xfexecv(name, in, out, err, ac, av)
X	const char *name;
X	FILE *in, *out, *err;
X	int ac;
X	char *av[];
X{
X	av[ac] = NULL;			/*  force list to be null terminated */
X	return (js_fexecve(name, in, out, err, av, environ));
X}
X
XEXPORT int
Xfexecve(name, in, out, err, av, env)
X	const char *name;
X	FILE *in, *out, *err;
X	char * const av[], * const env[];
X{
X	return (js_fexecve(name, in, out, err, av, env));
X}
X#endif	/* HAVE_PRAGMA_WEAK */
X#endif	/* NO_FEXEC_COMPAT */
X
X
X#ifdef	JOS
X#define	enofile(t)			((t) == EMISSDIR || \
X					(t)  == ENOFILE || \
X					(t)  == EISADIR || \
X					(t)  == EIOERR)
X#else
X#define	enofile(t)			((t) == ENOENT || \
X					(t)  == ENOTDIR || \
X					(t)  == EISDIR || \
X					(t)  == EIO)
X#endif
X
X#ifndef	set_child_standard_fds
XLOCAL void	 fdcopy __PR((int, int));
XLOCAL void	 fdmove __PR((int, int));
X#endif
XLOCAL const char *chkname __PR((const char *, const char *));
XLOCAL const char *getpath __PR((char * const *));
X
X#ifdef	F_GETFD
X#define	fd_getfd(fd)		fcntl((fd), F_GETFD, 0)
X#else
X#define	fd_getfd(fd)		(0)
X#endif
X#ifdef	F_SETFD
X#define	fd_setfd(fd, val)	fcntl((fd), F_SETFD, (val));
X#else
X#define	fd_setfd(fd, val)	(0)
X#endif
X#endif	/* __DO__FEXEC__ */
X
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_fexecl(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0,
X	    ...)
X#else
XEXPORT int
Xjs_fexecl(name, in, out, err, arg0, va_alist)
X	char		*name;
X	FILE		*in;
X	FILE		*out;
X	FILE		*err;
X	const char	*arg0;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ac = 0;
X	char	*xav[MAX_F_ARGS+1];
X	char	**av;
Xconst	char	**pav;
X	char	*p;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, arg0);
X#else
X	va_start(args);
X#endif
X	if (arg0) {
X		ac++;
X		while (va_arg(args, char *) != NULL)
X			ac++;
X	}
X	va_end(args);
X
X	if (ac <= MAX_F_ARGS) {
X		av = xav;
X	} else {
X		av = (char **)malloc((ac+1)*sizeof (char *));
X		if (av == 0)
X			return (-1);
X	}
X	pav = (const char **)av;
X
X#ifdef	PROTOTYPES
X	va_start(args, arg0);
X#else
X	va_start(args);
X#endif
X	*pav++ = arg0;
X	if (arg0) do {
X		p = va_arg(args, char *);
X		*pav++ = p;
X	} while (p != NULL);
X	va_end(args);
X
X	ret = js_fexecv(name, in, out, err, ac, av);
X	if (av != xav)
X		free(av);
X	return (ret);
X}
X
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_fexecle(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0,
X	    ...)
X#else
XEXPORT int
Xjs_fexecle(name, in, out, err, arg0, va_alist)
X	char		*name;
X	FILE		*in;
X	FILE		*out;
X	FILE		*err;
X	const char	*arg0;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ac = 0;
X	char	*xav[MAX_F_ARGS+1];
X	char	**av;
Xconst	char	**pav;
X	char	*p;
X	char	**env;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, arg0);
X#else
X	va_start(args);
X#endif
X	if (arg0) {
X		ac++;
X		while (va_arg(args, char *) != NULL)
X			ac++;
X	}
X	env = va_arg(args, char **);
X	va_end(args);
X
X	if (ac <= MAX_F_ARGS) {
X		av = xav;
X	} else {
X		av = (char **)malloc((ac+1)*sizeof (char *));
X		if (av == 0)
X			return (-1);
X	}
X	pav = (const char **)av;
X
X#ifdef	PROTOTYPES
X	va_start(args, arg0);
X#else
X	va_start(args);
X#endif
X	*pav++ = arg0;
X	if (arg0) do {
X		p = va_arg(args, char *);
X		*pav++ = p;
X	} while (p != NULL);
X	va_end(args);
X
X	ret = js_fexecve(name, in, out, err, av, env);
X	if (av != xav)
X		free(av);
X	return (ret);
X}
X
X#ifndef	__DO__FEXEC__
XEXPORT int
Xjs_fexecv(name, in, out, err, ac, av)
X	const char *name;
X	FILE *in, *out, *err;
X	int ac;
X	char *av[];
X{
X	av[ac] = NULL;			/*  force list to be null terminated */
X	return (js_fexecve(name, in, out, err, av, environ));
X}
X
XEXPORT int
Xjs_fexecve(name, in, out, err, av, env)
X	const char *name;
X	FILE *in, *out, *err;
X	char * const av[], * const env[];
X{
X	char	nbuf[MAXPATHNAME+1];
X	char	*np;
X	const char *path;
X#if defined(__BEOS__) || defined(__HAIKU__)
X	char	*av0 = av[0];
X#endif
X	int	ret;
X	int	fin;
X	int	fout;
X	int	ferr;
X#ifndef	JOS
X	int	o[3];		/* Old fd's for stdin/stdout/stderr */
X	int	f[3];		/* Old close on exec flags for above  */
X	int	errsav = 0;
X
X	o[0] = o[1] = o[2] = -1;
X	f[0] = f[1] = f[2] = 0;
X#endif
X
X	fflush(out);
X	fflush(err);
X	fin  = fdown(in);
X	fout = fdown(out);
X	ferr = fdown(err);
X#ifdef JOS
X
X	/*
X	 * If name contains a pathdelimiter ('/' on unix)
X	 * or name is too long ...
X	 * try exec without path search.
X	 */
X	if (find('/', name) || strlen(name) > MAXFILENAME) {
X		ret = exec_env(name, fin, fout, ferr, av, env);
X
X	} else if ((path = getpath(env)) == NULL) {
X		ret = exec_env(name, fin, fout, ferr, av, env);
X		if ((ret == ENOFILE) && strlen(name) <= (sizeof (nbuf) - 6)) {
X			strcatl(nbuf, "/bin/", name, (char *)NULL);
X			ret = exec_env(nbuf, fin, fout, ferr, av, env);
X			if (ret == EMISSDIR)
X				ret = ENOFILE;
X		}
X	} else {
X		int	nlen = strlen(name);
X
X		for (;;) {
X			np = nbuf;
X			/*
X			 * JOS always uses ':' as PATH Environ separator
X			 */
X			while (*path != ':' && *path != '\0' &&
X				np < &nbuf[MAXPATHNAME-nlen-2]) {
X
X				*np++ = *path++;
X			}
X			*np = '\0';
X			if (*nbuf == '\0')
X				strcatl(nbuf, name, (char *)NULL);
X			else
X				strcatl(nbuf, nbuf, "/", name, (char *)NULL);
X			ret = exec_env(nbuf, fin, fout, ferr, av, env);
X			if (ret == EMISSDIR)
X				ret = ENOFILE;
X			if (ret != ENOFILE || *path == '\0')
X				break;
X			path++;
X		}
X	}
X	return (ret);
X
X#else	/* JOS */
X
X#ifdef	set_child_standard_fds
X	set_child_standard_fds(fin, fout, ferr);
X#else
X	if (fin != STDIN_FILENO) {
X		f[0] = fd_getfd(STDIN_FILENO);
X		o[0] = dup(STDIN_FILENO);
X		fd_setfd(o[0], FD_CLOEXEC);
X		fdmove(fin, STDIN_FILENO);
X	}
X	if (fout != STDOUT_FILENO) {
X		f[1] = fd_getfd(STDOUT_FILENO);
X		o[1] = dup(STDOUT_FILENO);
X		fd_setfd(o[1], FD_CLOEXEC);
X		fdmove(fout, STDOUT_FILENO);
X	}
X	if (ferr != STDERR_FILENO) {
X		f[2] = fd_getfd(STDERR_FILENO);
X		o[2] = dup(STDERR_FILENO);
X		fd_setfd(o[2], FD_CLOEXEC);
X		fdmove(ferr, STDERR_FILENO);
X	}
X#endif
X
X	/*
X	 * If name contains a pathdelimiter ('/' on unix)
X	 * or name is too long ...
X	 * try exec without path search.
X	 */
X#ifdef	FOUND_MAXFILENAME
X	if (strchr(name, '/') || strlen(name) > (unsigned)MAXFILENAME) {
X#else
X	if (strchr(name, '/')) {
X#endif
X		ret = execve(name, av, env);
X
X	} else if ((path = getpath(env)) == NULL) {
X		ret = execve(name, av, env);
X		if ((geterrno() == ENOENT) && strlen(name) <= (sizeof (nbuf) - 6)) {
X			strcatl(nbuf, "/bin/", name, (char *)NULL);
X			ret = execve(nbuf, av, env);
X#if defined(__BEOS__) || defined(__HAIKU__)
X			((char **)av)[0] = av0;	/* BeOS destroys things ... */
X#endif
X		}
X	} else {
X		int	nlen = strlen(name);
X
X		for (;;) {
X			int	xerr;
X
X			np = nbuf;
X			while (*path != PATH_ENV_DELIM && *path != '\0' &&
X				np < &nbuf[MAXPATHNAME-nlen-2]) {
X
X				*np++ = *path++;
X			}
X			*np = '\0';
X			if (*nbuf == '\0')
X				strcatl(nbuf, name, (char *)NULL);
X			else
X				strcatl(nbuf, nbuf, "/", name, (char *)NULL);
X			ret = execve(nbuf, av, env);
X#if defined(__BEOS__) || defined(__HAIKU__)
X			((char **)av)[0] = av0;	/* BeOS destroys things ... */
X#endif
X			xerr = geterrno();
X			if (errsav == 0 && !enofile(xerr))
X				errsav = xerr;
X			if ((!enofile(xerr) && !(xerr == EACCES)) || *path == '\0')
X				break;
X			path++;
X		}
X	}
X	if (errsav == 0)
X		errsav = geterrno();
X
X#ifndef	set_child_standard_fds
X			/* reestablish old files */
X	if (ferr != STDERR_FILENO) {
X		fdmove(STDERR_FILENO, ferr);
X		fdmove(o[2], STDERR_FILENO);
X		if (f[2] == 0)
X			fd_setfd(STDERR_FILENO, 0);
X	}
X	if (fout != STDOUT_FILENO) {
X		fdmove(STDOUT_FILENO, fout);
X		fdmove(o[1], STDOUT_FILENO);
X		if (f[1] == 0)
X			fd_setfd(STDOUT_FILENO, 0);
X	}
X	if (fin != STDIN_FILENO) {
X		fdmove(STDIN_FILENO, fin);
X		fdmove(o[0], STDIN_FILENO);
X		if (f[0] == 0)
X			fd_setfd(STDIN_FILENO, 0);
X	}
X#endif
X	seterrno(errsav);
X	return (ret);
X
X#endif	/* JOS */
X}
X
X#ifndef	JOS
X#ifndef	set_child_standard_fds
X
XLOCAL void
Xfdcopy(fd1, fd2)
X	int	fd1;
X	int	fd2;
X{
X	close(fd2);
X#ifdef	F_DUPFD
X	fcntl(fd1, F_DUPFD, fd2);
X#else
X#ifdef	HAVE_DUP2
X	dup2(fd1, fd2);
X#endif
X#endif
X}
X
XLOCAL void
Xfdmove(fd1, fd2)
X	int	fd1;
X	int	fd2;
X{
X	fdcopy(fd1, fd2);
X	close(fd1);
X}
X
X#endif
X#endif
X
X/*
X * get PATH from env
X */
XLOCAL const char *
Xgetpath(env)
X	char	* const *env;
X{
X	char * const *p = env;
X	const char *p2;
X
X	if (p != NULL) {
X		while (*p != NULL) {
X			if ((p2 = chkname("PATH", *p)) != NULL)
X				return (p2);
X			p++;
X		}
X	}
X	return (NULL);
X}
X
X
X/*
X * Check if name is in environment.
X * Return pointer to value name is found.
X */
XLOCAL const char *
Xchkname(name, ev)
X	const char	*name;
X	const char	*ev;
X{
X	for (;;) {
X		if (*name != *ev) {
X			if (*ev == '=' && *name == '\0')
X				return (++ev);
X			return (NULL);
X		}
X		name++;
X		ev++;
X	}
X}
X#endif	/* __DO__FEXEC__ */
X
X#endif	/* defined(HAVE_DUP) && (defined(HAVE_DUP2) || defined(F_DUPFD)) */
END-of-star-1.5.2/lib/fexec.c
echo x - star-1.5.2/lib/fillbytes.c
sed 's/^X//' >star-1.5.2/lib/fillbytes.c << 'END-of-star-1.5.2/lib/fillbytes.c'
X/* @(#)fillbytes.c	1.18 10/08/21 Copyright 1987, 1995-2010 J. Schilling */
X/*
X *	fill memory with data
X *
X *	Copyright (c) 1987, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/align.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X#define	cval	((char)lval)
X
X/*
X * fillbytes(to, cnt, val) is the same as memset(to, val, cnt)
X */
X#ifdef	PROTOTYPES
XEXPORT char *
Xfillbytes(void *tov, ssize_t cnt, char val)
X#else
XEXPORT char *
Xfillbytes(tov, cnt, val)
X	void	*tov;
X	ssize_t	cnt;
X	char	val;
X#endif
X{
X	register char	*to = (char *)tov;
X	register ssize_t n;
X	register long	lval;
X
X	/*
X	 * If we change cnt to be unsigned, check for == instead of <=
X	 */
X	if ((n = cnt) <= 0)
X		return (to);
X
X	lval = val & 0xFF;
X
X	/*
X	 * Assign byte-wise until properly aligned for a long pointer.
X	 */
X	while (--n >= 0 && !laligned(to)) {
X		*to++ = cval;
X	}
X	n++;
X
X	if (n >= (ssize_t)(8 * sizeof (long))) {
X		register ssize_t rem = n % (8 * sizeof (long));
X
X		lval |= (lval<<8);
X		lval |= (lval<<16);
X#if SIZE_LONG > SIZE_INT
X		lval |= (lval<<32);
X#endif
X
X		n /= (8 * sizeof (long));
X		{
X			register long *tol = (long *)to;
X
X			do {
X				DO8 (*tol++ = lval);
X			} while (--n > 0);
X
X			to = (char *)tol;
X		}
X		n = rem;
X
X		if (n >= 8) {
X			n -= 8;
X			do {
X				DO8 (*to++ = cval);
X			} while ((n -= 8) >= 0);
X			n += 8;
X		}
X		if (n > 0) do {
X			*to++ = cval;
X		} while (--n > 0);
X		return (to);
X	}
X	if (n > 0) do {
X		*to++ = cval;
X	} while (--n > 0);
X	return (to);
X}
END-of-star-1.5.2/lib/fillbytes.c
echo x - star-1.5.2/lib/format.c
sed 's/^X//' >star-1.5.2/lib/format.c << 'END-of-star-1.5.2/lib/format.c'
X/* @(#)format.c	1.51 10/10/23 Copyright 1985-2010 J. Schilling */
X/*
X *	format
X *	common code for printf fprintf & sprintf
X *
X *	allows recursive printf with "%r", used in:
X *	error, comerr, comerrno, errmsg, errmsgno and the like
X *
X *	Copyright (c) 1985-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/stdlib.h>
X#ifdef	DEBUG
X#include <schily/unistd.h>
X#endif
X#if	!defined(HAVE_STDLIB_H) || !defined(HAVE_GCVT)
Xextern	char	*gcvt __PR((double, int, char *));
X#endif
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
X/*
X * As Llong is currently a 'best effort' long long, we usually need to
X * include long long print formats.
X * This may go away, if we implement maxint_t formats.
X */
X#ifndef	USE_LONGLONG
X#define	USE_LONGLONG
X#endif
X
X#ifdef	NO_LONGLONG
X#undef	USE_LONGLONG
X#endif
X
X#ifdef	NO_USER_XCVT
X	/*
X	 * We cannot define our own gcvt() so we need to use a
X	 * local name instead.
X	 */
X#ifndef	HAVE_GCVT
X#	define	gcvt	js_gcvt
XEXPORT	char *gcvt	__PR((double value, int ndigit, char *buf));
X#endif
X#endif
X
X/*
X * Some CPU's (e.g. PDP-11) cannot do logical shifts.
X * They use rotate instead. Masking the low bits before,
X * makes rotate work too.
X */
X#define	allmask(t)	((unsigned t)~((unsigned t)0))
X#define	lowmask(t, x)	((unsigned t)~((unsigned t)((1 << (x))-1)))
X#define	rshiftmask(t, s)((allmask(t) & lowmask(t, s)) >> (s))
X
X#define	CHARMASK	makemask(char)
X#define	SHORTMASK	makemask(short)
X#define	INTMASK		makemask(int)
X#define	LONGMASK	makemask(long)
X
X#ifdef	DIVLBYS
Xextern	long	divlbys();
Xextern	long	modlbys();
X#else
X#define	divlbys(val, base)	((val)/(base))
X#define	modlbys(val, base)	((val)%(base))
X#endif
X
X/*
X *	We use macros here to avoid the need to link to the international
X *	character routines.
X *	We don't need internationalization for our purpose.
X */
X#define	is_dig(c)	(((c) >= '0') && ((c) <= '9'))
X#define	is_cap(c)	((c) >= 'A' && (c) <= 'Z')
X#define	to_cap(c)	(is_cap(c) ? c : c - 'a' + 'A')
X#define	cap_ty(c)	(is_cap(c) ? 'L' : 'I')
X
X#ifdef	HAVE_LONGLONG
Xtypedef union {
X	Ullong	ll;
X	Ulong	l[2];
X	char	c[8];
X} quad_u;
X#endif
X
Xtypedef struct f_args {
X	void  (*outf)__PR((char, long)); /* Func from format(fun, arg)	*/
X	long	farg;			/* Arg from format (fun, arg)	*/
X	int	minusflag;		/* Fieldwidth is negative	*/
X	int	flags;			/* General flags (+-#)		*/
X	int	fldwidth;		/* Field width as in %3d	*/
X	int	signific;		/* Significant chars as in %.4d	*/
X	int	lzero;			/* Left '0' pad flag		*/
X	char	*buf;			/* Out print buffer		*/
X	char	*bufp;			/* Write ptr into buffer	*/
X	char	fillc;			/* Left fill char (' ' or '0')	*/
X	char	*prefix;		/* Prefix to print before buf	*/
X	int	prefixlen;		/* Len of prefix ('+','-','0x')	*/
X} f_args;
X
X#define	MINUSFLG	1	/* '-' flag */
X#define	PLUSFLG		2	/* '+' flag */
X#define	SPACEFLG	4	/* ' ' flag */
X#define	HASHFLG		8	/* '#' flag */
X
XLOCAL	void	prnum  __PR((Ulong, unsigned, f_args *));
XLOCAL	void	prdnum __PR((Ulong, f_args *));
XLOCAL	void	pronum __PR((Ulong, f_args *));
XLOCAL	void	prxnum __PR((Ulong, f_args *));
XLOCAL	void	prXnum __PR((Ulong, f_args *));
X#ifdef	USE_LONGLONG
XLOCAL	void	prlnum  __PR((Ullong, unsigned, f_args *));
XLOCAL	void	prldnum __PR((Ullong, f_args *));
XLOCAL	void	prlonum __PR((Ullong, f_args *));
XLOCAL	void	prlxnum __PR((Ullong, f_args *));
XLOCAL	void	prlXnum __PR((Ullong, f_args *));
X#endif
XLOCAL	int	prbuf  __PR((const char *, f_args *));
XLOCAL	int	prc    __PR((char, f_args *));
XLOCAL	int	prstring __PR((const char *, f_args *));
X#ifdef	DEBUG
XLOCAL	void	dbg_print __PR((char *fmt, int a, int b, int c, int d, int e, int f, int g, int h, int i));
X#endif
X
X
X#ifdef	PROTOTYPES
XEXPORT int
Xformat(void (*fun)(char, long),
X			long farg,
X			const char *fmt,
X			va_list args)
X#else
XEXPORT int
Xformat(fun, farg, fmt, args)
X	register void	(*fun)();
X	register long	farg;
X	register char	*fmt;
X	va_list		args;
X#endif
X{
X#ifdef	FORMAT_LOW_MEM
X	char buf[512];
X#else
X	char buf[8192];
X#endif
X	const char *sfmt;
X	register int unsflag;
X	register long val;
X	register char type;
X	register char mode;
X	register char c;
X	int count;
X	int i;
X	short sh;
X	const char *str;
X	double dval;
X#ifdef	USE_LONGLONG
X	Llong llval = 0;
X#endif
X	Ulong res;
X	char *rfmt;
X	f_args	fa;
X
X	fa.outf = fun;
X	fa.farg = farg;
X	count = 0;
X	/*
X	 * Main loop over the format string.
X	 * Increment and check for end of string is made here.
X	 */
X	for (; *fmt != '\0'; fmt++) {
X		c = *fmt;
X		while (c != '%') {
X			if (c == '\0')
X				return (count);
X			(*fun)(c, farg);
X			c = *(++fmt);
X			count++;
X		}
X
X		/*
X		 * We reached a '%' sign.
X		 */
X		buf[0] = '\0';
X		fa.buf = fa.bufp = buf;
X		fa.minusflag = 0;
X		fa.flags = 0;
X		fa.fldwidth = 0;
X		fa.signific = -1;
X		fa.lzero = 0;
X		fa.fillc = ' ';
X		fa.prefixlen = 0;
X		sfmt = fmt;
X		unsflag = FALSE;
X		type = '\0';
X		mode = '\0';
X	newflag:
X		switch (*(++fmt)) {
X
X		case '+':
X			fa.flags |= PLUSFLG;
X			goto newflag;
X
X		case '-':
X			fa.minusflag++;
X			goto newflag;
X
X		case ' ':
X			/*
X			 * If the space and the + flag are present,
X			 * the space flag will be ignored.
X			 */
X			fa.flags |= SPACEFLG;
X			goto newflag;
X
X		case '#':
X			fa.flags |= HASHFLG;
X			goto newflag;
X
X		case '0':
X			/*
X			 * '0' is a flag.
X			 */
X			fa.fillc = '0';
X			goto newflag;
X		}
X		if (*fmt == '*') {
X			fmt++;
X			fa.fldwidth = va_arg(args, int);
X			/*
X			 * A negative fieldwith is a minus flag with a
X			 * positive fieldwidth.
X			 */
X			if (fa.fldwidth < 0) {
X				fa.fldwidth = -fa.fldwidth;
X				fa.minusflag = 1;
X			}
X		} else while (c = *fmt, is_dig(c)) {
X			fa.fldwidth *= 10;
X			fa.fldwidth += c - '0';
X			fmt++;
X		}
X		if (*fmt == '.') {
X			fmt++;
X			fa.signific = 0;
X			if (*fmt == '*') {
X				fmt++;
X				fa.signific = va_arg(args, int);
X				if (fa.signific < 0)
X					fa.signific = 0;
X			} else while (c = *fmt, is_dig(c)) {
X				fa.signific *= 10;
X				fa.signific += c - '0';
X				fmt++;
X			}
X		}
X		if (strchr("UCSIL", *fmt)) {
X			/*
X			 * Enhancements to K&R and ANSI:
X			 *
X			 * got a type specifyer
X			 *
X			 * XXX 'S' in C99 is %ls, 'S' should become 'H'
X			 */
X			if (*fmt == 'U') {
X				fmt++;
X				unsflag = TRUE;
X			}
X			if (!strchr("CSILZODX", *fmt)) {
X				/*
X				 * Got only 'U'nsigned specifyer,
X				 * use default type and mode.
X				 */
X				type = 'I';
X				mode = 'D';
X				fmt--;
X			} else if (!strchr("CSIL", *fmt)) {
X				/*
X				 * no type, use default
X				 */
X				type = 'I';
X				mode = *fmt;
X			} else {
X				/*
X				 * got CSIL
X				 */
X				type = *fmt++;
X				if (!strchr("ZODX", mode = *fmt)) {
X					/*
X					 * Check long double "Le", "Lf" or "Lg"
X					 */
X					if (type == 'L' &&
X					    (mode == 'e' ||
X					    mode == 'f' ||
X					    mode == 'g'))
X						goto checkfmt;
X					fmt--;
X					mode = 'D'; /* default mode */
X				}
X			}
X		} else {
X	checkfmt:
X		switch (*fmt) {
X
X		case 'h':
X			if (!type)
X				type = 'H';	/* convert to short type */
X			goto getmode;
X
X		case 'l':
X			if (!type)
X				type = 'L';	/* convert to long type */
X			goto getmode;
X
X		case 'j':
X			if (!type)
X				type = 'J';	/* convert to intmax_t type */
X			goto getmode;
X
X		case 'z':			/* size_t */
X#if	SIZEOF_SIZE_T == SIZEOF_INT
X			if (!type)
X				type = 'I';	/* convert to int type */
X#else
X#if	SIZEOF_SIZE_T == SIZEOF_LONG_INT
X			if (!type)
X				type = 'L';	/* convert to long type */
X#else
X#if	SIZEOF_SIZE_T == SIZEOF_LLONG
X			if (!type)
X				type = 'Q';	/* convert to long long type */
X#else
Xerror sizeof (size_t) is unknown
X#endif
X#endif
X#endif
X			goto getmode;
X
X		case 't':			/* ptrdiff_t */
X#if	SIZEOF_PTRDIFF_T == SIZEOF_INT
X			if (!type)
X				type = 'I';	/* convert to int type */
X#else
X#if	SIZEOF_PTRDIFF_T == SIZEOF_LONG_INT
X			if (!type)
X				type = 'L';	/* convert to long type */
X#else
X#if	SIZEOF_PTRDIFF_T == SIZEOF_LLONG
X			if (!type)
X				type = 'Q';	/* convert to long long type */
X#else
Xerror sizeof (ptrdiff_t) is unknown
X#endif
X#endif
X#endif
X		/*
X		 * XXX Future length modifiers:
X		 * XXX	'L' with double: long double
X		 */
X
X		getmode:
X			if (!strchr("udioxX", *(++fmt))) {
X				/*
X				 * %hhd -> char in decimal
X				 */
X				if (type == 'H' && *fmt == 'h') {
X					type = 'C';
X					goto getmode;
X				}
X#ifdef	USE_LONGLONG
X				if (type == 'L' && *fmt == 'l') {
X					type = 'Q';
X					goto getmode;
X				}
X#endif
X				fmt--;
X				mode = 'D';
X			} else {
X				mode = *fmt;
X				if (mode != 'x')
X					mode = to_cap(mode);
X				if (mode == 'U')
X					unsflag = TRUE;
X				else if (mode == 'I')	/* XXX */
X					mode = 'D';
X			}
X			break;
X		case 'x':
X			mode = 'x';
X			goto havemode;
X		case 'X':
X			mode = 'X';
X			type = 'I';
X			goto havemode;
X		case 'u':
X			unsflag = TRUE;
X		/*
X		 * XXX Need to remove uppercase letters for 'long'
X		 * XXX in future for POSIX/C99 compliance.
X		 */
X			/* FALLTHRU */
X		case 'o': case 'O':
X		case 'd': case 'D':
X		case 'i': case 'I':
X		case 'Z':
X			mode = to_cap(*fmt);
X		havemode:
X			if (!type)
X				type = cap_ty(*fmt);
X#ifdef	DEBUG
X			dbg_print("*fmt: '%c' mode: '%c' type: '%c'\n",
X							*fmt, mode, type);
X#endif
X			if (mode == 'I')	/* XXX kann entfallen */
X				mode = 'D';	/* wenn besseres uflg */
X			break;
X		case 'p':
X			mode = 'P';
X			type = 'L';
X			break;
X
X		case '%':
X			count += prc('%', &fa);
X			continue;
X		case ' ':
X			count += prbuf("", &fa);
X			continue;
X		case 'c':
X			c = va_arg(args, int);
X			count += prc(c, &fa);
X			continue;
X		case 's':
X			str = va_arg(args, char *);
X			count += prstring(str, &fa);
X			continue;
X		case 'b':
X			str = va_arg(args, char *);
X			fa.signific = va_arg(args, int);
X			count += prstring(str, &fa);
X			continue;
X
X#ifndef	NO_FLOATINGPOINT
X		case 'e':
X			if (fa.signific == -1)
X				fa.signific = 6;
X			if (type == 'L') {
X#ifdef	HAVE_LONGDOUBLE
X				long double ldval = va_arg(args, long double);
X
X#if	(defined(HAVE_QECVT) || defined(HAVE__LDECVT))
X				qftoes(buf, ldval, 0, fa.signific);
X				count += prbuf(buf, &fa);
X				continue;
X#else
X				dval = ldval;
X#endif
X#endif
X			}
X			dval = va_arg(args, double);
X			ftoes(buf, dval, 0, fa.signific);
X			count += prbuf(buf, &fa);
X			continue;
X		case 'f':
X			if (fa.signific == -1)
X				fa.signific = 6;
X			if (type == 'L') {
X#ifdef	HAVE_LONGDOUBLE
X				long double ldval = va_arg(args, long double);
X
X#if	(defined(HAVE_QFCVT) || defined(HAVE__LDFCVT))
X				qftofs(buf, ldval, 0, fa.signific);
X				count += prbuf(buf, &fa);
X				continue;
X#else
X				dval = ldval;
X#endif
X#endif
X			}
X			dval = va_arg(args, double);
X			ftofs(buf, dval, 0, fa.signific);
X			count += prbuf(buf, &fa);
X			continue;
X		case 'g':
X			if (fa.signific == -1)
X				fa.signific = 6;
X			if (fa.signific == 0)
X				fa.signific = 1;
X			if (type == 'L') {
X#ifdef	HAVE_LONGDOUBLE
X				long double ldval = va_arg(args, long double);
X
X#if	(defined(HAVE_QGCVT) || defined(HAVE__LDGCVT))
X
X#ifdef	HAVE__LDGCVT
X#define	qgcvt(ld, n, b)	_ldgcvt(*(long_double *)&ld, n, b)
X#endif
X				(void) qgcvt(ldval, fa.signific, buf);
X				count += prbuf(buf, &fa);
X				continue;
X#else
X				dval = ldval;
X#endif
X#endif
X			}
X			dval = va_arg(args, double);
X			(void) gcvt(dval, fa.signific, buf);
X			count += prbuf(buf, &fa);
X			continue;
X#else
X#	ifdef	USE_FLOATINGARGS
X		case 'e':
X		case 'f':
X		case 'g':
X			dval = va_arg(args, double);
X			continue;
X#	endif
X#endif
X
X		case 'r':			/* recursive printf */
X		case 'R':			/* recursive printf */
X			rfmt  = va_arg(args, char *);
X			/*
X			 * I don't know any portable way to get an arbitrary
X			 * C object from a var arg list so I use a
X			 * system-specific routine __va_arg_list() that knows
X			 * if 'va_list' is an array. You will not be able to
X			 * assign the value of __va_arg_list() but it works
X			 * to be used as an argument of a function.
X			 * It is a requirement for recursive printf to be able
X			 * to use this function argument. If your system
X			 * defines va_list to be an array you need to know this
X			 * via autoconf or another mechanism.
X			 * It would be nice to have something like
X			 * __va_arg_list() in stdarg.h
X			 */
X			count += format(fun, farg, rfmt, __va_arg_list(args));
X			continue;
X
X		case 'n':
X			{
X				int	*ip = va_arg(args, int *);
X
X				*ip = count;
X			}
X			continue;
X
X		default:			/* Unknown '%' format */
X			sfmt++;			/* Dont't print '%'   */
X			count += fmt - sfmt;
X			while (sfmt < fmt)
X				(*fun)(*(sfmt++), farg);
X			if (*fmt == '\0') {
X				fmt--;
X				continue;
X			} else {
X				(*fun)(*fmt, farg);
X				count++;
X				continue;
X			}
X		}
X		}
X		/*
X		 * print numbers:
X		 * first prepare type 'C'har, s'H'ort, 'I'nt, or 'L'ong
X		 * or 'Q'ad and 'J'==maxint_t
X		 */
X		switch (type) {
X
X		case 'C':
X			c = va_arg(args, int);
X			val = c;		/* extend sign here */
X			if (unsflag || mode != 'D')
X#ifdef	DO_MASK
X				val &= CHARMASK;
X#else
X				val = (unsigned char)val;
X#endif
X			break;
X		case 'H':
X		case 'S':			/* XXX remove 'S' in future */
X			sh = va_arg(args, int);
X			val = sh;		/* extend sign here */
X			if (unsflag || mode != 'D')
X#ifdef	DO_MASK
X				val &= SHORTMASK;
X#else
X				val = (unsigned short)val;
X#endif
X			break;
X		case 'I':
X		default:
X			i = va_arg(args, int);
X			val = i;		/* extend sign here */
X			if (unsflag || mode != 'D')
X#ifdef	DO_MASK
X				val &= INTMASK;
X#else
X				val = (unsigned int)val;
X#endif
X			break;
X		case 'P':
X		case 'L':
X			val = va_arg(args, long);
X			break;
X#ifdef	USE_LONGLONG
X		case 'J':			/* For now Intmax_t is Llong */
X			type = 'Q';		/* use 'Q' for processing    */
X		case 'Q':
X			llval = va_arg(args, Llong);
X			val = llval != 0;
X			break;
X#endif
X		}
X
X		/*
X		 * Final print out, take care of mode:
X		 * mode is one of: 'O'ctal, 'D'ecimal, or he'X'
X		 * oder 'Z'weierdarstellung.
X		 */
X		fa.bufp = &buf[sizeof (buf)-1];
X		*--fa.bufp = '\0';
X
X		if (val == 0 && mode != 'D') {
X		printzero:
X			/*
X			 * Printing '0' with fieldwidth 0 results in no chars.
X			 */
X			fa.lzero = -1;
X			if (fa.signific >= 0)
X				fa.fillc = ' ';
X			count += prstring("0", &fa);
X			continue;
X		} else switch (mode) {
X
X		case 'D':
X#ifdef	USE_LONGLONG
X			if (type == 'Q') {
X				if (!unsflag && llval < 0) {
X					fa.prefix = "-";
X					fa.prefixlen = 1;
X					llval = -llval;
X				} else if (fa.flags & PLUSFLG) {
X					fa.prefix = "+";
X					fa.prefixlen = 1;
X				} else if (fa.flags & SPACEFLG) {
X					fa.prefix = " ";
X					fa.prefixlen = 1;
X				}
X				if (llval == 0)
X					goto printzero;
X				goto prunsigned;
X			}
X#endif
X			if (!unsflag && val < 0) {
X				fa.prefix = "-";
X				fa.prefixlen = 1;
X				val = -val;
X			} else if (fa.flags & PLUSFLG) {
X				fa.prefix = "+";
X				fa.prefixlen = 1;
X			} else if (fa.flags & SPACEFLG) {
X				fa.prefix = " ";
X				fa.prefixlen = 1;
X			}
X			if (val == 0)
X				goto printzero;
X			/* FALLTHRU */
X		case 'U':
X			/* output a long unsigned decimal number */
X#ifdef	USE_LONGLONG
X		prunsigned:
X			if (type == 'Q')
X				prldnum(llval, &fa);
X			else
X#endif
X			prdnum(val, &fa);
X			break;
X		case 'O':
X			/* output a long octal number */
X			if (fa.flags & HASHFLG) {
X				fa.prefix = "0";
X				fa.prefixlen = 1;
X			}
X#ifdef	USE_LONGLONG
X			if (type == 'Q') {
X				prlonum(llval, &fa);
X			} else
X#endif
X			{
X				pronum(val & 07, &fa);
X				if ((res = (val>>3) & rshiftmask(long, 3)) != 0)
X					pronum(res, &fa);
X			}
X			break;
X		case 'p':
X		case 'x':
X			/* output a hex long */
X			if (fa.flags & HASHFLG) {
X				fa.prefix = "0x";
X				fa.prefixlen = 2;
X			}
X#ifdef	USE_LONGLONG
X			if (type == 'Q')
X				prlxnum(llval, &fa);
X			else
X#endif
X			{
X				prxnum(val & 0xF, &fa);
X				if ((res = (val>>4) & rshiftmask(long, 4)) != 0)
X					prxnum(res, &fa);
X			}
X			break;
X		case 'P':
X		case 'X':
X			/* output a hex long */
X			if (fa.flags & HASHFLG) {
X				fa.prefix = "0X";
X				fa.prefixlen = 2;
X			}
X#ifdef	USE_LONGLONG
X			if (type == 'Q')
X				prlXnum(llval, &fa);
X			else
X#endif
X			{
X				prXnum(val & 0xF, &fa);
X				if ((res = (val>>4) & rshiftmask(long, 4)) != 0)
X					prXnum(res, &fa);
X			}
X			break;
X		case 'Z':
X			/* output a binary long */
X#ifdef	USE_LONGLONG
X			if (type == 'Q')
X				prlnum(llval, 2, &fa);
X			else
X#endif
X			{
X				prnum(val & 0x1, 2, &fa);
X				if ((res = (val>>1) & rshiftmask(long, 1)) != 0)
X					prnum(res, 2, &fa);
X			}
X		}
X		fa.lzero = -1;
X		/*
X		 * If a precision (fielwidth) is specified
X		 * on diouXx conversions, the '0' flag is ignored.
X		 */
X		if (fa.signific >= 0)
X			fa.fillc = ' ';
X		count += prbuf(fa.bufp, &fa);
X	}
X	return (count);
X}
X
X/*
X * Routines to print (not negative) numbers in an arbitrary base
X */
XLOCAL	unsigned char	dtab[]  = "0123456789abcdef";
XLOCAL	unsigned char	udtab[] = "0123456789ABCDEF";
X
XLOCAL void
Xprnum(val, base, fa)
X	register Ulong val;
X	register unsigned base;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[modlbys(val, base)];
X		val = divlbys(val, base);
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprdnum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[modlbys(val, (unsigned)10)];
X		val = divlbys(val, (unsigned)10);
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
X/*
X * We may need to use division here too (PDP-11, non two's complement ...)
X */
XLOCAL void
Xpronum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 7];
X		val >>= 3;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprxnum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
XprXnum(val, fa)
X	register Ulong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = udtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
X#ifdef	USE_LONGLONG
XLOCAL void
Xprlnum(val, base, fa)
X	register Ullong val;
X	register unsigned base;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[modlbys(val, base)];
X		val = divlbys(val, base);
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprldnum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val % (unsigned)10];
X		val = val / (unsigned)10;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprlonum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 7];
X		val >>= 3;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
Xprlxnum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = dtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
XLOCAL void
XprlXnum(val, fa)
X	register Ullong val;
X	f_args *fa;
X{
X	register char *p = fa->bufp;
X
X	do {
X		*--p = udtab[val & 15];
X		val >>= 4;
X	} while (val > 0);
X
X	fa->bufp = p;
X}
X
X#endif
X
X/*
X * Final buffer print out routine.
X */
XLOCAL int
Xprbuf(s, fa)
X	register const char *s;
X	f_args *fa;
X{
X	register int diff;
X	register int rfillc;
X	register long arg			= fa->farg;
X	register void (*fun) __PR((char, long))	= fa->outf;
X	register int count;
X	register int lzero = 0;
X
X	count = strlen(s);
X
X	/*
X	 * lzero becomes the number of left fill chars needed to reach signific
X	 */
X	if (fa->lzero < 0 && count < fa->signific)
X		lzero = fa->signific - count;
X	count += lzero + fa->prefixlen;
X	diff = fa->fldwidth - count;
X	if (diff > 0)
X		count += diff;
X
X	if (fa->prefixlen && fa->fillc != ' ') {
X		while (*fa->prefix != '\0')
X			(*fun)(*fa->prefix++, arg);
X	}
X	if (!fa->minusflag) {
X		rfillc = fa->fillc;
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	if (fa->prefixlen && fa->fillc == ' ') {
X		while (*fa->prefix != '\0')
X			(*fun)(*fa->prefix++, arg);
X	}
X	if (lzero > 0) {
X		rfillc = '0';
X		while (--lzero >= 0)
X			(*fun)(rfillc, arg);
X	}
X	while (*s != '\0')
X		(*fun)(*s++, arg);
X	if (fa->minusflag) {
X		rfillc = ' ';
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	return (count);
X}
X
X/*
X * Print out one char, allowing prc('\0')
X * Similar to prbuf()
X */
X#ifdef	PROTOTYPES
X
XLOCAL int
Xprc(char c, f_args *fa)
X
X#else
X
XLOCAL int
Xprc(c, fa)
X	char	c;
X	f_args *fa;
X#endif
X{
X	register int diff;
X	register int rfillc;
X	register long arg			= fa->farg;
X	register void (*fun) __PR((char, long))	= fa->outf;
X	register int count;
X
X	count = 1;
X	diff = fa->fldwidth - 1;
X	if (diff > 0)
X		count += diff;
X
X	if (!fa->minusflag) {
X		rfillc = fa->fillc;
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	(*fun)(c, arg);
X	if (fa->minusflag) {
X		rfillc = ' ';
X		while (--diff >= 0)
X			(*fun)(rfillc, arg);
X	}
X	return (count);
X}
X
X/*
X * String output routine.
X * If fa->signific is >= 0, it uses only fa->signific chars.
X * If fa->signific is 0, print no characters.
X */
XLOCAL int
Xprstring(s, fa)
X	register const char	*s;
X	f_args *fa;
X{
X	register char	*bp;
X	register int	signific;
X
X	if (s == NULL)
X		return (prbuf("(NULL POINTER)", fa));
X
X	if (fa->signific < 0)
X		return (prbuf(s, fa));
X
X	bp = fa->buf;
X	signific = fa->signific;
X
X	while (--signific >= 0 && *s != '\0')
X		*bp++ = *s++;
X	*bp = '\0';
X
X	return (prbuf(fa->buf, fa));
X}
X
X#ifdef	DEBUG
XLOCAL void
Xdbg_print(fmt, a, b, c, d, e, f, g, h, i)
Xchar *fmt;
X{
X	char	ff[1024];
X
X	sprintf(ff, fmt, a, b, c, d, e, f, g, h, i);
X	write(STDERR_FILENO, ff, strlen(ff));
X}
X#endif
END-of-star-1.5.2/lib/format.c
echo x - star-1.5.2/lib/getav0.c
sed 's/^X//' >star-1.5.2/lib/getav0.c << 'END-of-star-1.5.2/lib/getav0.c'
X/* @(#)getav0.c	1.23 09/07/08 Copyright 1985, 1995-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getav0.c	1.23 09/07/08 Copyright 1985, 1995-2009 J. Schilling";
X#endif
X/*
X *	Get arg vector by scanning the stack
X *
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/sigblk.h>
X#include <schily/avoffset.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X#ifdef	HAVE_SCANSTACK
X
X#include <schily/stkframe.h>
X
X#define	is_even(p)	((((long)(p)) & 1) == 0)
X#define	even(p)		(((long)(p)) & ~1L)
X#ifdef	__future__
X#define	even(p)		(((long)(p)) - 1) /* will this work with 64 bit ?? */
X#endif
X
XEXPORT	char	**getmainfp	__PR((void));
XEXPORT	char	**getavp	__PR((void));
XEXPORT	char	*getav0		__PR((void));
X
X
XEXPORT char **
Xgetmainfp()
X{
X	register struct frame *fp;
X		char	**av;
X#if	FP_INDIR > 0
X	register int	i = 0;
X#endif
X
X	/*
X	 * As the SCO OpenServer C-Compiler has a bug that may cause
X	 * the first function call to getfp() been done before the
X	 * new stack frame is created, we call getfp() twice.
X	 */
X	(void) getfp();
X	fp = (struct frame *)getfp();
X	if (fp == NULL)
X		return (NULL);
X
X	while (fp->fr_savfp) {
X		if (fp->fr_savpc == 0)
X			break;
X
X		if (!is_even(fp->fr_savfp)) {
X			fp = (struct frame *)even(fp->fr_savfp);
X			if (fp == NULL)
X				break;
X			fp = (struct frame *)((SIGBLK *)fp)->sb_savfp;
X			continue;
X		}
X		fp = (struct frame *)fp->fr_savfp;
X
X#if	FP_INDIR > 0
X		i++;
X#endif
X	}
X
X#if	FP_INDIR > 0
X	i -= FP_INDIR;
X	fp = (struct frame *)getfp();
X	if (fp == NULL)
X		return (NULL);
X
X	while (fp->fr_savfp) {
X		if (fp->fr_savpc == 0)
X			break;
X
X		if (!is_even(fp->fr_savfp)) {
X			fp = (struct frame *)even(fp->fr_savfp);
X			if (fp == NULL)
X				break;
X			fp = (struct frame *)((SIGBLK *)fp)->sb_savfp;
X			continue;
X		}
X		fp = (struct frame *)fp->fr_savfp;
X
X		if (--i <= 0)
X			break;
X	}
X#endif
X
X	av = (char **)fp;
X	return (av);
X}
X
XEXPORT char **
Xgetavp()
X{
X	register struct frame *fp;
X		char	**av;
X
X	fp = (struct frame *)getmainfp();
X	if (fp == NULL)
X		return (NULL);
X
X	av = (char **)(((char *)fp) + AV_OFFSET);	/* aus avoffset.h */
X							/* -> avoffset.c  */
X	return (av);
X}
X
XEXPORT char *
Xgetav0()
X{
X	return (getavp()[0]);
X}
X
X#else
X
XEXPORT char **
Xgetmainfp()
X{
X	raisecond("getmainfp", 0);
X	return ((char **)0);
X}
X
XEXPORT char **
Xgetavp()
X{
X	raisecond("getavp", 0);
X	return ((char **)0);
X}
X
XEXPORT char *
Xgetav0()
X{
X	return ("???");
X}
X
X#endif	/* HAVE_SCANSTACK */
END-of-star-1.5.2/lib/getav0.c
echo x - star-1.5.2/lib/geterrno.c
sed 's/^X//' >star-1.5.2/lib/geterrno.c << 'END-of-star-1.5.2/lib/geterrno.c'
X/* @(#)geterrno.c	1.14 10/08/23 Copyright 1985, 1995-2010 J. Schilling */
X/*
X *	Get error number
X *
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_TS_ERRNO
X#define	_TS_ERRNO		/* Solaris: get thread safe errno value */
X#endif
X#ifndef	_LIBC_REENTRANT
X#define	_LIBC_REENTRANT		/* Linux: get thread safe errno value */
X#endif
X#include <schily/errno.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifdef	geterrno
X#undef	geterrno
X#endif
X
XEXPORT int
Xgeterrno()
X
X{
X	return (errno);
X}
END-of-star-1.5.2/lib/geterrno.c
echo x - star-1.5.2/lib/getfp.c
sed 's/^X//' >star-1.5.2/lib/getfp.c << 'END-of-star-1.5.2/lib/getfp.c'
X/* @(#)getfp.c	1.18 08/06/14 Copyright 1988-2008 J. Schilling */
X/*
X *	Get frame pointer
X *
X *	Copyright (c) 1988-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifndef	IS_AVOFFSET
X/*
X * We usually don't like to compile a getfp() that returns junk data in case
X * we cannot scan the stack.
X * The only way to find this out is by including avoffset.h. Unfortunately, we
X * need to be able to use getfp() from avoffset.c in order to check if the
X * return value is usable or junk. To be able to do this, we include getfp.c
X * from avoffset.c and define IS_AVOFFSET before.
X */
X#include <schily/avoffset.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X#endif
X
X#ifdef	HAVE_SCANSTACK
X#include <schily/stkframe.h>
X
X#define	MAXWINDOWS	32
X#define	NWINDOWS	7
X
X#if defined(sparc) && defined(__GNUC__)
X#	define	FP_OFF		0x10	/* some strange things on sparc gcc */
X#else
X#	define	FP_OFF		0
X#endif
X
XEXPORT	void	**___fpoff	__PR((char *cp));
X
XEXPORT void **
Xgetfp()
X{
X		long	**dummy[1];
X
X#ifdef	sparc
X	flush_reg_windows(MAXWINDOWS-2);
X#endif
X	return ((void **)((struct frame *)___fpoff((char *)&dummy[0]))->fr_savfp);
X}
X
X/*
X * Don't make it static to avoid inline optimization.
X *
X * We need this function to fool GCCs check for returning addresses
X * from outside the functions local address space.
X */
XEXPORT void **
X___fpoff(cp)
X	char	*cp;
X{
X	long ***lp;
X
X	lp = (long ***)(cp + FP_OFF);
X	lp++;
X	return ((void **)lp);
X}
X
X#ifdef	sparc
XEXPORT int
Xflush_reg_windows(n)
X	int	n;
X{
X	if (--n > 0)
X		flush_reg_windows(n);
X	return (0);
X}
X#endif
X
X#else	/* HAVE_SCANSTACK */
X
XEXPORT void **
Xgetfp()
X{
X	raisecond("getfp", 0);
X	return ((void **)0);
X}
X
X#endif	/* HAVE_SCANSTACK */
END-of-star-1.5.2/lib/getfp.c
echo x - star-1.5.2/lib/gethostname.c
sed 's/^X//' >star-1.5.2/lib/gethostname.c << 'END-of-star-1.5.2/lib/gethostname.c'
X/* @(#)gethostname.c	1.21 11/08/04 Copyright 1995-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)gethostname.c	1.21 11/08/04 Copyright 1995-2011 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1995-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/stdlib.h>
X#include <schily/systeminfo.h>
X#include <schily/hostname.h>
X
X#ifndef	HAVE_GETHOSTNAME
XEXPORT	int	gethostname	__PR((char *name, int namelen));
X
X
X#ifdef	SI_HOSTNAME
X
XEXPORT int
Xgethostname(name, namelen)
X	char	*name;
X	int	namelen;
X{
X	if (sysinfo(SI_HOSTNAME, name, namelen) < 0)
X		return (-1);
X	return (0);
X}
X#else	/* ! SI_HOSTNAME */
X
X#ifdef	HAVE_UNAME
X#include <schily/utsname.h>
X#include <schily/string.h>
X
XEXPORT int
Xgethostname(name, namelen)
X	char	*name;
X	int	namelen;
X{
X	struct utsname	uts;
X
X	if (uname(&uts) < 0)
X		return (-1);
X
X	strncpy(name, uts.nodename, namelen);
X	return (0);
X}
X#else	/* !HAVE_UNAME */
X
X#if	defined(__MINGW32__) || defined(_MSC_VER)
X#include <schily/utypes.h>
X#include <schily/errno.h>
X#define	gethostname	__winsock_gethostname
X#include <schily/windows.h>
X#undef	gethostname
X
XEXPORT int
Xgethostname(name, namelen)
X	char	*name;
X	int	namelen;
X{
X	uint32_t	len = namelen;
X	char		nbuf[MAX_COMPUTERNAME_LENGTH+1];
X
X	if (namelen < 0) {
X#ifdef	ENOSYS
X		seterrno(ENOSYS);
X#else
X		seterrno(EINVAL);
X#endif
X		return (-1);
X	}
X	if (namelen == 0)
X		return (0);
X
X	name[0] = '\0';
X	if (!GetComputerName(name, &len)) {
X		if (len > namelen) {
X			nbuf[0] = '\0';
X			len = sizeof (nbuf);
X			(void) GetComputerName(nbuf, &len);
X			strncpy(name, nbuf, namelen);
X			return (0);
X		}
X		seterrno(EIO);
X		return (-1);
X	}
X	return (0);
X}
X#else
X#include <schily/errno.h>
X
XEXPORT int
Xgethostname(name, namelen)
X	char	*name;
X	int	namelen;
X{
X	if (namelen < 0) {
X#ifdef	ENOSYS
X		seterrno(ENOSYS);
X#else
X		seterrno(EINVAL);
X#endif
X		return (-1);
X	}
X	if (namelen > 0)
X		name[0] = '\0';
X	return (0);
X}
X#endif
X#endif	/* !HAVE_UNAME */
X
X#endif	/* !SI_HOSTNAME */
X
X#endif	/* HAVE_GETHOSTNAME */
END-of-star-1.5.2/lib/gethostname.c
echo x - star-1.5.2/lib/getpagesize.c
sed 's/^X//' >star-1.5.2/lib/getpagesize.c << 'END-of-star-1.5.2/lib/getpagesize.c'
X/* @(#)getpagesize.c	1.5 09/07/10 Copyright 2001-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getpagesize.c	1.5 09/07/10 Copyright 2001-2009 J. Schilling";
X#endif
X/*
X *	Copyright (c) 2001-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	HAVE_GETPAGESIZE
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include <schily/param.h>
X#include <schily/libport.h>
X
X#ifdef	HAVE_OS_H
X#include <OS.h>		/* BeOS for B_PAGE_SIZE */
X#endif
X
XEXPORT	int	getpagesize	__PR((void));
X
XEXPORT int
Xgetpagesize()
X{
X	register int	pagesize;
X
X#ifdef	_SC_PAGESIZE
X	pagesize = sysconf(_SC_PAGESIZE);
X#else	/* ! _SC_PAGESIZE */
X
X
X#ifdef	PAGESIZE		/* Traditional UNIX page size from param.h */
X	pagesize = PAGESIZE;
X
X#else	/* ! PAGESIZE */
X
X#ifdef	B_PAGE_SIZE		/* BeOS page size from OS.h */
X	pagesize = B_PAGE_SIZE;
X
X#else	/* ! B_PAGE_SIZE */
X
X	pagesize = 512;
X#endif	/* ! B_PAGE_SIZE */
X#endif	/* ! PAGESIZE */
X#endif	/* ! _SC_PAGESIZE */
X
X	return (pagesize);
X}
X
X#endif	/* HAVE_GETPAGESIZE */
END-of-star-1.5.2/lib/getpagesize.c
echo x - star-1.5.2/lib/jsprintf.c
sed 's/^X//' >star-1.5.2/lib/jsprintf.c << 'END-of-star-1.5.2/lib/jsprintf.c'
X/* @(#)jsprintf.c	1.17 09/06/30 Copyright 1985, 1995-2009 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/types.h>
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#define	BFSIZ	256
X
Xtypedef struct {
X	short	cnt;
X	char	*ptr;
X	char	buf[BFSIZ];
X	int	count;
X	FILE	*f;
X} *BUF, _BUF;
X
XLOCAL	void	_bflush		__PR((BUF));
XLOCAL	void	_bput		__PR((char, long));
XEXPORT	int	js_fprintf	__PR((FILE *, const char *, ...));
XEXPORT	int	js_printf	__PR((const char *, ...));
X
XLOCAL void
X_bflush(bp)
X	register BUF	bp;
X{
X	bp->count += bp->ptr - bp->buf;
X	if (filewrite(bp->f, bp->buf, bp->ptr - bp->buf) < 0)
X		bp->count = EOF;
X	bp->ptr = bp->buf;
X	bp->cnt = BFSIZ;
X}
X
X#ifdef	PROTOTYPES
XLOCAL void
X_bput(char c, long l)
X#else
XLOCAL void
X_bput(c, l)
X		char	c;
X		long	l;
X#endif
X{
X	register BUF	bp = (BUF)l;
X
X	*bp->ptr++ = c;
X	if (--bp->cnt <= 0)
X		_bflush(bp);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_printf(const char *form, ...)
X#else
XEXPORT int
Xjs_printf(form, va_alist)
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	_BUF	bb;
X
X	bb.ptr = bb.buf;
X	bb.cnt = BFSIZ;
X	bb.count = 0;
X	bb.f = stdout;
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	format(_bput, (long)&bb, form, args);
X	va_end(args);
X	if (bb.cnt < BFSIZ)
X		_bflush(&bb);
X	return (bb.count);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_fprintf(FILE *file, const char *form, ...)
X#else
XEXPORT int
Xjs_fprintf(file, form, va_alist)
X	FILE	*file;
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	_BUF	bb;
X
X	bb.ptr = bb.buf;
X	bb.cnt = BFSIZ;
X	bb.count = 0;
X	bb.f = file;
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	format(_bput, (long)&bb, form, args);
X	va_end(args);
X	if (bb.cnt < BFSIZ)
X		_bflush(&bb);
X	return (bb.count);
X}
END-of-star-1.5.2/lib/jsprintf.c
echo x - star-1.5.2/lib/jssnprintf.c
sed 's/^X//' >star-1.5.2/lib/jssnprintf.c << 'END-of-star-1.5.2/lib/jssnprintf.c'
X/* @(#)jssnprintf.c	1.12 09/07/10 Copyright 1985, 1995-2004 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2004 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/unistd.h>	/* include <sys/types.h> try to get size_t */
X#include <schily/stdio.h>	/* Try again for size_t	*/
X#include <schily/stdlib.h>	/* Try again for size_t	*/
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
XEXPORT	int js_snprintf __PR((char *, size_t maxcnt, const char *, ...));
X
Xtypedef struct {
X	char	*ptr;
X	int	count;
X} *BUF, _BUF;
X
X#ifdef	PROTOTYPES
Xstatic void _cput(char c, long l)
X#else
Xstatic void _cput(c, l)
X	char	c;
X	long	l;
X#endif
X{
X	register BUF	bp = (BUF)l;
X
X	if (--bp->count > 0) {
X		*bp->ptr++ = c;
X	} else {
X		/*
X		 * Make sure that there will never be a negative overflow.
X		 */
X		bp->count++;
X	}
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_snprintf(char *buf, size_t maxcnt, const char *form, ...)
X#else
XEXPORT int
Xjs_snprintf(buf, maxcnt, form, va_alist)
X	char	*buf;
X	unsigned maxcnt;
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	cnt;
X	_BUF	bb;
X
X	bb.ptr = buf;
X	bb.count = maxcnt;
X
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	cnt = format(_cput, (long)&bb, form,  args);
X	va_end(args);
X	if (maxcnt > 0)
X		*(bb.ptr) = '\0';
X	if (bb.count < 0)
X		return (-1);
X
X	return (cnt);
X}
END-of-star-1.5.2/lib/jssnprintf.c
echo c - star-1.5.2/lib/stdio
mkdir -p star-1.5.2/lib/stdio > /dev/null 2>&1
echo x - star-1.5.2/lib/stdio/cvmod.c
sed 's/^X//' >star-1.5.2/lib/stdio/cvmod.c << 'END-of-star-1.5.2/lib/stdio/cvmod.c'
X/* @(#)cvmod.c	2.9 04/08/08 Copyright 1986, 1995-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X#ifndef	O_BINARY
X#define	O_BINARY	0
X#endif
X#ifndef	O_LARGEFILE
X#define	O_LARGEFILE	0
X#endif
X
XEXPORT int
X_cvmod(mode, omode, flag)
X	const char	*mode;
X	int		*omode;
X	int		*flag;
X{
X	while (*mode) {
X		switch (*mode) {
X
X		case 'r':   *omode |= O_RDONLY;	*flag |= FI_READ;	break;
X		case 'w':   *omode |= O_WRONLY;	*flag |= FI_WRITE;	break;
X		case 'e':   *omode |= O_EXCL;				break;
X		case 'c':   *omode |= O_CREAT;	*flag |= FI_CREATE;	break;
X		case 't':   *omode |= O_TRUNC;	*flag |= FI_TRUNC;	break;
X		case 'a':   *omode |= O_APPEND;	*flag |= FI_APPEND;	break;
X		case 'u':			*flag |= FI_UNBUF;	break;
X			/* dummy on UNIX */
X		case 'b':   *omode |= O_BINARY; *flag |= FI_BINARY;	break;
X			/*
X			 * XXX do we need this ?
X			 * XXX May this be a problem?
X			 */
X		case 'l':   *omode |= O_LARGEFILE;			break;
X		default:    raisecond(_badmode, 0L);
X			    return (0);
X		}
X		mode++;
X	}
X	if (*flag & FI_READ && *flag & FI_WRITE) {
X		*omode &= ~(O_RDONLY|O_WRONLY);
X		*omode |= O_RDWR;
X	}
X	return (1);
X}
END-of-star-1.5.2/lib/stdio/cvmod.c
echo x - star-1.5.2/lib/stdio/dat.c
sed 's/^X//' >star-1.5.2/lib/stdio/dat.c << 'END-of-star-1.5.2/lib/stdio/dat.c'
X/* @(#)dat.c	1.3 03/06/15 Copyright 1986, 1996-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
Xchar	_badfile[]	= "bad_file";
Xchar	_badmode[]	= "bad_file_mode";
Xchar	_badop[]	= "bad_file_op";
END-of-star-1.5.2/lib/stdio/dat.c
echo x - star-1.5.2/lib/stdio/fcons.c
sed 's/^X//' >star-1.5.2/lib/stdio/fcons.c << 'END-of-star-1.5.2/lib/stdio/fcons.c'
X/* @(#)fcons.c	2.20 10/11/06 Copyright 1986, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2010  J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X/*
X * Note that because of a definition in schilyio.h we are using
X * fseeko()/ftello() instead of fseek()/ftell() if available.
X */
X
XLOCAL	char	*fmtab[] = {
X			"",	/* 0	FI_NONE				*/
X			"r",	/* 1	FI_READ				*/
X			"w",	/* 2	FI_WRITE		**1)	*/
X			"r+",	/* 3	FI_READ  | FI_WRITE		*/
X			"b",	/* 4	FI_NONE  | FI_BINARY		*/
X			"rb",	/* 5	FI_READ  | FI_BINARY		*/
X			"wb",	/* 6	FI_WRITE | FI_BINARY	**1)	*/
X			"r+b",	/* 7	FI_READ  | FI_WRITE | FI_BINARY	*/
X
X/* + FI_APPEND	*/	"",	/* 0	FI_NONE				*/
X/* ...		*/	"r",	/* 1	FI_READ				*/
X			"a",	/* 2	FI_WRITE		**1)	*/
X			"a+",	/* 3	FI_READ  | FI_WRITE		*/
X			"b",	/* 4	FI_NONE  | FI_BINARY		*/
X			"rb",	/* 5	FI_READ  | FI_BINARY		*/
X			"ab",	/* 6	FI_WRITE | FI_BINARY	**1)	*/
X			"a+b",	/* 7	FI_READ  | FI_WRITE | FI_BINARY	*/
X		};
X/*
X * NOTES:
X *	1)	fdopen() guarantees not to create/trunc files in this case
X *
X *	"w"	will create/trunc files with fopen()
X *	"a"	will create files with fopen()
X */
X
X
XEXPORT FILE *
X_fcons(fd, f, flag)
X	register FILE	*fd;
X		int	f;
X		int	flag;
X{
X	int	my_gflag = _io_glflag;
X
X	if (fd == (FILE *)NULL)
X		fd = fdopen(f,
X			fmtab[flag&(FI_READ|FI_WRITE|FI_BINARY | FI_APPEND)]);
X
X	if (fd != (FILE *)NULL) {
X		if (flag & FI_APPEND) {
X			(void) fseek(fd, (off_t)0, SEEK_END);
X		}
X		if (flag & FI_UNBUF) {
X			setbuf(fd, NULL);
X			my_gflag |= _JS_IOUNBUF;
X		}
X		set_my_flag(fd, my_gflag); /* must clear it if fd is reused */
X		return (fd);
X	}
X	if (flag & FI_CLOSE)
X		close(f);
X
X	return ((FILE *)NULL);
X}
END-of-star-1.5.2/lib/stdio/fcons.c
echo x - star-1.5.2/lib/stdio/fcons64.c
sed 's/^X//' >star-1.5.2/lib/stdio/fcons64.c << 'END-of-star-1.5.2/lib/stdio/fcons64.c'
X/* @(#)fcons64.c	1.7 10/08/23 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X#ifdef	HAVE_LARGEFILES
X
X#include "fcons.c"
X
X#endif
END-of-star-1.5.2/lib/stdio/fcons64.c
echo x - star-1.5.2/lib/stdio/fdown.c
sed 's/^X//' >star-1.5.2/lib/stdio/fdown.c << 'END-of-star-1.5.2/lib/stdio/fdown.c'
X/* @(#)fdown.c	1.10 04/08/08 Copyright 1986, 1995-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT int
Xfdown(f)
X	register FILE *f;
X{
X	down(f);
X	return (fileno(f));
X}
END-of-star-1.5.2/lib/stdio/fdown.c
echo x - star-1.5.2/lib/stdio/ffileread.c
sed 's/^X//' >star-1.5.2/lib/stdio/ffileread.c << 'END-of-star-1.5.2/lib/stdio/ffileread.c'
X/* @(#)ffileread.c	1.13 09/06/30 Copyright 1986, 1996-2009 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
Xffileread(f, buf, len)
X	register FILE	*f;
X	void	*buf;
X	size_t	len;
X{
X	register int		fd;
X	register ssize_t	ret;
X		int		oerrno = geterrno();
X
X	down2(f, _IOREAD, _IORW);
X	fd = fileno(f);
X
X	while ((ret = read(fd, buf, len)) < 0 && geterrno() == EINTR) {
X		/*
X		 * Set back old 'errno' so we don't change the errno visible
X		 * to the outside if we did not fail.
X		 */
X		seterrno(oerrno);
X	}
X	return (ret);
X}
END-of-star-1.5.2/lib/stdio/ffileread.c
echo x - star-1.5.2/lib/stdio/ffilewrite.c
sed 's/^X//' >star-1.5.2/lib/stdio/ffilewrite.c << 'END-of-star-1.5.2/lib/stdio/ffilewrite.c'
X/* @(#)ffilewrite.c	1.8 09/06/30 Copyright 1986-2009 J. Schilling */
X/*
X *	Copyright (c) 1986-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
Xffilewrite(f, buf, len)
X	register FILE	*f;
X	void	*buf;
X	size_t	len;
X{
X	register int		fd;
X	register ssize_t	ret;
X		int		oerrno = geterrno();
X
X	down2(f, _IORWT, _IORW);
X	fd = fileno(f);
X
X	while ((ret = write(fd, buf, len)) < 0 && geterrno() == EINTR) {
X		/*
X		 * Set back old 'errno' so we don't change the errno visible
X		 * to the outside if we did not fail.
X		 */
X		seterrno(oerrno);
X	}
X	return (ret);
X}
END-of-star-1.5.2/lib/stdio/ffilewrite.c
echo x - star-1.5.2/lib/stdio/fgetline.c
sed 's/^X//' >star-1.5.2/lib/stdio/fgetline.c << 'END-of-star-1.5.2/lib/stdio/fgetline.c'
X/* @(#)fgetline.c	1.12 11/08/09 Copyright 1986, 1996-2011 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2011 J. Schilling
X *
X *	This is an interface that exists in the public since 1982.
X *	The POSIX.1-2008 standard did ignore POSIX rules not to
X *	redefine existing public interfaces and redefined the interfaces
X *	forcing us to add a js_*() prefix to the original functions.
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	fgetline	__no__fgetline__
X#define	getline		__no__getline__
X
X#include "schilyio.h"
X
X#ifndef	NO_GETLINE_COMPAT	/* Define to disable backward compatibility */
X#undef	fgetline
X#undef	getline
X#ifdef	HAVE_PRAGMA_WEAK
X#pragma	weak fgetline =	js_fgetline
X#pragma	weak getline =	js_getline
X#else
X
XEXPORT	int	fgetline	__PR((FILE *, char *, int));
XEXPORT 	int	getline		__PR((char *, int));
X
XEXPORT int
Xfgetline(f, buf, len)
X	FILE	*f;
X	char	*buf;
X	int	len;
X{
X	return (js_fgetline(f, buf, len));
X}
X
XEXPORT int
Xgetline(buf, len)
X	char	*buf;
X	int	len;
X{
X	return (js_fgetline(stdin, buf, len));
X}
X#endif
X#endif
X
X/*
X * XXX should we check if HAVE_USG_STDIO is defined and
X * XXX use something line memccpy to speed things up ???
X */
X#if !defined(getc)
X#include <schily/string.h>
X
XEXPORT int
Xjs_fgetline(f, buf, len)
X	register	FILE	*f;
X			char	*buf;
X	register	int	len;
X{
X	char	*bp = fgets(buf, len, f);
X
X	if (bp) {
X		len = strlen(bp);
X
X		if (len > 0) {
X			if (bp[len-1] == '\n')
X				bp[--len] = '\0';
X		}
X		return (len);
X	}
X	buf[0] = '\0';
X	return (-1);
X}
X
X#else
XEXPORT int
Xjs_fgetline(f, buf, len)
X	register	FILE	*f;
X			char	*buf;
X	register	int	len;
X{
X	register int	c	= '\0';
X	register char	*bp	= buf;
X	register int	nl	= '\n';
X
X	down2(f, _IOREAD, _IORW);
X
X	for (;;) {
X		if ((c = getc(f)) < 0)
X			break;
X		if (c == nl)
X			break;
X		if (--len > 0) {
X			*bp++ = (char)c;
X		} else {
X#ifdef	__never__
X			/*
X			 * Read up to end of line
X			 */
X			while ((c = getc(f)) >= 0 && c != nl)
X				/* LINTED */
X				;
X#endif
X			break;
X		}
X	}
X	*bp = '\0';
X	/*
X	 * If buffer is empty and we hit EOF, return EOF
X	 */
X	if (c < 0 && bp == buf)
X		return (c);
X
X	return (bp - buf);
X}
X#endif
X
XEXPORT int
Xjs_getline(buf, len)
X	char	*buf;
X	int	len;
X{
X	return (js_fgetline(stdin, buf, len));
X}
END-of-star-1.5.2/lib/stdio/fgetline.c
echo x - star-1.5.2/lib/stdio/file_raise.c
sed 's/^X//' >star-1.5.2/lib/stdio/file_raise.c << 'END-of-star-1.5.2/lib/stdio/file_raise.c'
X/* @(#)file_raise.c	1.9 07/04/03 Copyright 1986, 1995-2007 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT void
Xfile_raise(f, flg)
X	register FILE *f;
X	int flg;
X{
X	int	oflag;
Xextern	int	_io_glflag;
X
X	if (f == (FILE *)NULL) {
X		if (flg)
X			_io_glflag &= ~_JS_IONORAISE;
X		else
X			_io_glflag |= _JS_IONORAISE;
X		return;
X	}
X	down(f);
X
X	oflag = my_flag(f);
X
X	if (flg)
X		oflag &= ~_JS_IONORAISE;
X	else
X		oflag |= _JS_IONORAISE;
X
X	set_my_flag(f, oflag);
X}
END-of-star-1.5.2/lib/stdio/file_raise.c
echo x - star-1.5.2/lib/stdio/filemopen.c
sed 's/^X//' >star-1.5.2/lib/stdio/filemopen.c << 'END-of-star-1.5.2/lib/stdio/filemopen.c'
X/* @(#)filemopen.c	1.5 10/08/21 Copyright 1986, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT FILE *
X#ifdef	PROTOTYPES
Xfilemopen(const char *name, const char *mode, mode_t cmode)
X#else
Xfilemopen(name, mode, cmode)
X	const char	*name;
X	const char	*mode;
X	mode_t		cmode;
X#endif
X{
X	int	ret;
X	int	omode = 0;
X	int	flag = 0;
X
X	if (!_cvmod(mode, &omode, &flag))
X		return ((FILE *)NULL);
X
X	if ((ret = open(name, omode, cmode)) < 0)
X		return ((FILE *)NULL);
X
X	return (_fcons((FILE *)0, ret, flag | FI_CLOSE));
X}
END-of-star-1.5.2/lib/stdio/filemopen.c
echo x - star-1.5.2/lib/stdio/filemopen64.c
sed 's/^X//' >star-1.5.2/lib/stdio/filemopen64.c << 'END-of-star-1.5.2/lib/stdio/filemopen64.c'
X/* @(#)filemopen64.c	1.3 10/08/23 Copyright 2000-2004 J. Schilling */
X/*
X *	Copyright (c) 2000-2004 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X#ifdef	HAVE_LARGEFILES
X
X#include "filemopen.c"
X
X#endif
END-of-star-1.5.2/lib/stdio/filemopen64.c
echo x - star-1.5.2/lib/stdio/fileopen.c
sed 's/^X//' >star-1.5.2/lib/stdio/fileopen.c << 'END-of-star-1.5.2/lib/stdio/fileopen.c'
X/* @(#)fileopen.c	1.12 10/08/21 Copyright 1986, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT FILE *
Xfileopen(name, mode)
X	const char	*name;
X	const char	*mode;
X{
X	int	ret;
X	int	omode = 0;
X	int	flag = 0;
X
X	if (!_cvmod(mode, &omode, &flag))
X		return ((FILE *)NULL);
X
X	if ((ret = _openfd(name, omode)) < 0)
X		return ((FILE *)NULL);
X
X	return (_fcons((FILE *)0, ret, flag | FI_CLOSE));
X}
END-of-star-1.5.2/lib/stdio/fileopen.c
echo x - star-1.5.2/lib/stdio/fileopen64.c
sed 's/^X//' >star-1.5.2/lib/stdio/fileopen64.c << 'END-of-star-1.5.2/lib/stdio/fileopen64.c'
X/* @(#)fileopen64.c	1.7 10/08/23 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X#ifdef	HAVE_LARGEFILES
X
X#include "fileopen.c"
X
X#endif
END-of-star-1.5.2/lib/stdio/fileopen64.c
echo x - star-1.5.2/lib/stdio/filepos.c
sed 's/^X//' >star-1.5.2/lib/stdio/filepos.c << 'END-of-star-1.5.2/lib/stdio/filepos.c'
X/* @(#)filepos.c	1.11 10/11/06 Copyright 1986, 1996-2010 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X/*
X * Note that because of a definition in schilyio.h we are using
X * fseeko()/ftello() instead of fseek()/ftell() if available.
X */
X
XEXPORT off_t
Xfilepos(f)
X	register FILE	*f;
X{
X	down(f);
X	return (ftell(f));
X}
END-of-star-1.5.2/lib/stdio/filepos.c
echo x - star-1.5.2/lib/stdio/filepos64.c
sed 's/^X//' >star-1.5.2/lib/stdio/filepos64.c << 'END-of-star-1.5.2/lib/stdio/filepos64.c'
X/* @(#)filepos64.c	1.7 10/08/23 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X#ifdef	HAVE_LARGEFILES
X
X#include "filepos.c"
X
X#endif
END-of-star-1.5.2/lib/stdio/filepos64.c
echo x - star-1.5.2/lib/stdio/fileread.c
sed 's/^X//' >star-1.5.2/lib/stdio/fileread.c << 'END-of-star-1.5.2/lib/stdio/fileread.c'
X/* @(#)fileread.c	1.17 12/02/26 Copyright 1986, 1995-2012 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
Xstatic	char	_readerr[]	= "file_read_err";
X
X#ifdef	HAVE_USG_STDIO
X
XEXPORT ssize_t
Xfileread(f, buf, len)
X	register FILE	*f;
X	void	*buf;
X	size_t	len;
X{
X	ssize_t	cnt;
X	register int	n;
X
X	down2(f, _IOREAD, _IORW);
X
X	if (f->_flag & _IONBF) {
X		cnt = _niread(fileno(f), buf, len);
X		if (cnt < 0) {
X			f->_flag |= _IOERR;
X			if (!(my_flag(f) & _JS_IONORAISE))
X				raisecond(_readerr, 0L);
X		}
X		if (cnt == 0 && len)
X			f->_flag |= _IOEOF;
X		return (cnt);
X	}
X	cnt = 0;
X	while (len > 0) {
X		if (f->_cnt <= 0) {
X			if (usg_filbuf(f) == EOF)
X				break;
X			f->_cnt++;
X			f->_ptr--;
X		}
X		n = f->_cnt >= len ? len : f->_cnt;
X		buf = (void *)movebytes(f->_ptr, buf, n);
X		f->_ptr += n;
X		f->_cnt -= n;
X		cnt += n;
X		len -= n;
X	}
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE))
X		raisecond(_readerr, 0L);
X	return (-1);
X}
X
X#else
X
XEXPORT ssize_t
Xfileread(f, buf, len)
X	register FILE	*f;
X	void	*buf;
X	size_t	len;
X{
X	ssize_t	cnt;
X
X	down2(f, _IOREAD, _IORW);
X
X	if (my_flag(f) & _JS_IOUNBUF)
X		return (_niread(fileno(f), buf, len));
X	cnt = fread(buf, 1, len, f);
X
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE))
X		raisecond(_readerr, 0L);
X	return (-1);
X}
X
X#endif	/* HAVE_USG_STDIO */
END-of-star-1.5.2/lib/stdio/fileread.c
echo x - star-1.5.2/lib/stdio/fileseek.c
sed 's/^X//' >star-1.5.2/lib/stdio/fileseek.c << 'END-of-star-1.5.2/lib/stdio/fileseek.c'
X/* @(#)fileseek.c	1.15 12/02/26 Copyright 1986, 1996-2012 J. Schilling */
X/*
X *	Copyright (c) 1986, 1996-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X/*
X * Note that because of a definition in schilyio.h we are using
X * fseeko()/ftello() instead of fseek()/ftell() if available.
X */
X
Xstatic	char	_seekerr[]	= "file_seek_err";
X
XEXPORT int
Xfileseek(f, pos)
X	register FILE	*f;
X	off_t	pos;
X{
X	int	ret;
X
X	down(f);
X	ret = fseek(f, pos, SEEK_SET);
X	if (ret < 0 && !(my_flag(f) & _JS_IONORAISE) &&
X	    !(_io_glflag & _JS_IONORAISE))
X		raisecond(_seekerr, 0L);
X	return (ret);
X}
END-of-star-1.5.2/lib/stdio/fileseek.c
echo x - star-1.5.2/lib/stdio/filesize.c
sed 's/^X//' >star-1.5.2/lib/stdio/filesize.c << 'END-of-star-1.5.2/lib/stdio/filesize.c'
X/* @(#)filesize.c	1.14 06/09/13 Copyright 1986, 1995-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X#include <schily/stat.h>
X
XEXPORT off_t
Xfilesize(f)
X	register FILE	*f;
X{
X	struct stat buf;
X
X	down(f);
X	if (fstat(fileno(f), &buf) < 0) {
X		raisecond("filesize", 0L);
X		return (-1);
X	}
X	return (buf.st_size);
X}
END-of-star-1.5.2/lib/stdio/filesize.c
echo x - star-1.5.2/lib/stdio/filesize64.c
sed 's/^X//' >star-1.5.2/lib/stdio/filesize64.c << 'END-of-star-1.5.2/lib/stdio/filesize64.c'
X/* @(#)filesize64.c	1.7 10/08/23 Copyright 2000 J. Schilling */
X/*
X *	Copyright (c) 2000 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#include "schilyio.h"
X
X#ifdef	HAVE_LARGEFILES
X
X#include "filesize.c"
X
X#endif
END-of-star-1.5.2/lib/stdio/filesize64.c
echo x - star-1.5.2/lib/stdio/filewrite.c
sed 's/^X//' >star-1.5.2/lib/stdio/filewrite.c << 'END-of-star-1.5.2/lib/stdio/filewrite.c'
X/* @(#)filewrite.c	1.18 12/02/26 Copyright 1986, 1995-2012 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
Xstatic	char	_writeerr[]	= "file_write_err";
X
X#ifdef	HAVE_USG_STDIO
X
XEXPORT ssize_t
Xfilewrite(f, vbuf, len)
X	register FILE	*f;
X	void	*vbuf;
X	size_t	len;
X{
X	register int	n;
X	ssize_t	cnt;
X	char	*buf = vbuf;
X
X	down2(f, _IOWRT, _IORW);
X
X	if (f->_flag & _IONBF) {
X		cnt = _niwrite(fileno(f), buf, len);
X		if (cnt < 0) {
X			f->_flag |= _IOERR;
X			if (!(my_flag(f) & _JS_IONORAISE))
X				raisecond(_writeerr, 0L);
X		}
X		return (cnt);
X	}
X	cnt = 0;
X	while (len > 0) {
X		if (f->_cnt <= 0) {
X			if (usg_flsbuf((unsigned char) *buf++, f) == EOF)
X				break;
X			cnt++;
X			if (--len == 0)
X				break;
X		}
X		if ((n = f->_cnt >= len ? len : f->_cnt) > 0) {
X			f->_ptr = (unsigned char *)movebytes(buf, f->_ptr, n);
X			buf += n;
X			f->_cnt -= n;
X			cnt += n;
X			len -= n;
X		}
X	}
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE))
X		raisecond(_writeerr, 0L);
X	return (-1);
X}
X
X#else
X
XEXPORT ssize_t
Xfilewrite(f, vbuf, len)
X	register FILE	*f;
X	void	*vbuf;
X	size_t	len;
X{
X	ssize_t	cnt;
X	char	*buf = vbuf;
X
X	down2(f, _IOWRT, _IORW);
X
X	if (my_flag(f) & _JS_IOUNBUF)
X		return (_niwrite(fileno(f), buf, len));
X	cnt = fwrite(buf, 1, len, f);
X
X	if (!ferror(f))
X		return (cnt);
X	if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE))
X		raisecond(_writeerr, 0L);
X	return (-1);
X}
X
X#endif	/* HAVE_USG_STDIO */
END-of-star-1.5.2/lib/stdio/filewrite.c
echo x - star-1.5.2/lib/stdio/flag.c
sed 's/^X//' >star-1.5.2/lib/stdio/flag.c << 'END-of-star-1.5.2/lib/stdio/flag.c'
X/* @(#)flag.c	2.14 10/11/06 Copyright 1986-2010 J. Schilling */
X/*
X *	Copyright (c) 1986-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X#include <schily/stdlib.h>
X
X#ifdef	DO_MYFLAG
X
X#define	FL_INIT	10
X
X#if	defined(IS_MACOS_X)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * Make _io_glflag a "data" variable.
X */
XEXPORT	int	_io_glflag = 0;		/* global default flag */
X#else
XEXPORT	int	_io_glflag;		/* global default flag */
X#endif
XLOCAL	int	_fl_inc = 10;		/* increment to expand flag struct */
XEXPORT	int	_fl_max = FL_INIT;	/* max fd currently in _io_myfl */
XLOCAL	_io_fl	_io_smyfl[FL_INIT];	/* initial static space */
XEXPORT	_io_fl	*_io_myfl = _io_smyfl;	/* init to static space */
X
XLOCAL int _more_flags	__PR((FILE *));
X
XLOCAL int
X_more_flags(fp)
X	FILE	*fp;
X{
X	register int	f = fileno(fp);
X	register int	n = _fl_max;
X	register _io_fl	*np;
X
X	while (n <= f)
X		n += _fl_inc;
X
X	if (_io_myfl == _io_smyfl) {
X		np = (_io_fl *) malloc(n * sizeof (*np));
X		fillbytes(np, n * sizeof (*np), '\0');
X		movebytes(_io_smyfl, np, sizeof (_io_smyfl)/sizeof (*np));
X	} else {
X		np = (_io_fl *) realloc(_io_myfl, n * sizeof (*np));
X		if (np)
X			fillbytes(&np[_fl_max], (n-_fl_max)*sizeof (*np), '\0');
X	}
X	if (np) {
X		_io_myfl = np;
X		_fl_max = n;
X		return (_io_get_my_flag(fp));
X	} else {
X		return (_JS_IONORAISE);
X	}
X}
X
XEXPORT int
X_io_get_my_flag(fp)
X	register FILE	*fp;
X{
X	register int	f = fileno(fp);
X	register _io_fl	*fl;
X
X	if (f >= _fl_max)
X		return (_more_flags(fp));
X
X	fl = &_io_myfl[f];
X
X	if (fl->fl_io == 0 || fl->fl_io == fp)
X		return (fl->fl_flags);
X
X	while (fl && fl->fl_io != fp)
X		fl = fl->fl_next;
X
X	if (fl == 0)
X		return (0);
X
X	return (fl->fl_flags);
X}
X
XEXPORT void
X_io_set_my_flag(fp, flag)
X	FILE	*fp;
X	int	flag;
X{
X	register int	f = fileno(fp);
X	register _io_fl	*fl;
X	register _io_fl	*fl2;
X
X	if (f >= _fl_max)
X		(void) _more_flags(fp);
X
X	fl = &_io_myfl[f];
X
X	if (fl->fl_io != (FILE *)0) {
X		fl2 = fl;
X
X		while (fl && fl->fl_io != fp)
X			fl = fl->fl_next;
X		if (fl == 0) {
X			if ((fl = (_io_fl *) malloc(sizeof (*fl))) == 0)
X				return;
X			fl->fl_next = fl2->fl_next;
X			fl2->fl_next = fl;
X		}
X	}
X	fl->fl_io = fp;
X	fl->fl_flags = flag;
X}
X
XEXPORT void
X_io_add_my_flag(fp, flag)
X	FILE	*fp;
X	int	flag;
X{
X	int	oflag = _io_get_my_flag(fp);
X
X	oflag |= flag;
X
X	_io_set_my_flag(fp, oflag);
X}
X
X#endif	/* DO_MYFLAG */
END-of-star-1.5.2/lib/stdio/flag.c
echo x - star-1.5.2/lib/stdio/flush.c
sed 's/^X//' >star-1.5.2/lib/stdio/flush.c << 'END-of-star-1.5.2/lib/stdio/flush.c'
X/* @(#)flush.c	1.7 04/08/08 Copyright 1986 J. Schilling */
X/*
X *	Copyright (c) 1986 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT int
Xflush()
X{
X	return (fflush(stdout));
X}
END-of-star-1.5.2/lib/stdio/flush.c
echo x - star-1.5.2/lib/stdio/fpipe.c
sed 's/^X//' >star-1.5.2/lib/stdio/fpipe.c << 'END-of-star-1.5.2/lib/stdio/fpipe.c'
X/* @(#)fpipe.c	1.12 04/08/08 Copyright 1986, 1995-2003 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT int
Xfpipe(pipef)
X	FILE *pipef[];
X{
X	int filedes[2];
X
X	if (pipe(filedes) < 0)
X		return (0);
X
X	if ((pipef[0] = _fcons((FILE *)0,
X				filedes[0], FI_READ|FI_CLOSE)) != (FILE *)0) {
X		if ((pipef[1] = _fcons((FILE *)0,
X				filedes[1], FI_WRITE|FI_CLOSE)) != (FILE *)0) {
X			return (1);
X		}
X		fclose(pipef[0]);
X	}
X	close(filedes[1]);
X	return (0);
X}
END-of-star-1.5.2/lib/stdio/fpipe.c
echo x - star-1.5.2/lib/stdio/niread.c
sed 's/^X//' >star-1.5.2/lib/stdio/niread.c << 'END-of-star-1.5.2/lib/stdio/niread.c'
X/* @(#)niread.c	1.14 09/06/30 Copyright 1986, 1996-2009 J. Schilling */
X/*
X *	Non interruptable read
X *
X *	Copyright (c) 1986, 1996-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
X_niread(f, buf, count)
X	int	f;
X	void	*buf;
X	size_t	count;
X{
X	ssize_t	ret;
X	int	oerrno = geterrno();
X
X	if ((ret = (ssize_t)count) < 0) {
X		seterrno(EINVAL);
X		return ((ssize_t)-1);
X	}
X	while ((ret = read(f, buf, count)) < 0 && geterrno() == EINTR) {
X		/*
X		 * Set back old 'errno' so we don't change the errno visible
X		 * to the outside if we did not fail.
X		 */
X		seterrno(oerrno);
X	}
X	return (ret);
X}
END-of-star-1.5.2/lib/stdio/niread.c
echo x - star-1.5.2/lib/stdio/niwrite.c
sed 's/^X//' >star-1.5.2/lib/stdio/niwrite.c << 'END-of-star-1.5.2/lib/stdio/niwrite.c'
X/* @(#)niwrite.c	1.7 09/06/30 Copyright 1986, 2001-2009 J. Schilling */
X/*
X *	Non interruptable write
X *
X *	Copyright (c) 1986, 2001-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
X_niwrite(f, buf, count)
X	int	f;
X	void	*buf;
X	size_t	count;
X{
X	ssize_t	ret;
X	int	oerrno = geterrno();
X
X	if ((ret = (ssize_t)count) < 0) {
X		seterrno(EINVAL);
X		return ((ssize_t)-1);
X	}
X	while ((ret = write(f, buf, count)) < 0 && geterrno() == EINTR) {
X		/*
X		 * Set back old 'errno' so we don't change the errno visible
X		 * to the outside if we did not fail.
X		 */
X		seterrno(oerrno);
X	}
X	return (ret);
X}
END-of-star-1.5.2/lib/stdio/niwrite.c
echo x - star-1.5.2/lib/stdio/nixread.c
sed 's/^X//' >star-1.5.2/lib/stdio/nixread.c << 'END-of-star-1.5.2/lib/stdio/nixread.c'
X/* @(#)nixread.c	1.14 09/06/30 Copyright 1986, 1996-2009 J. Schilling */
X/*
X *	Non interruptable extended read
X *
X *	Copyright (c) 1986, 1996-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
X_nixread(f, buf, count)
X	int	f;
X	void	*buf;
X	size_t	count;
X{
X	register char	*p = (char *)buf;
X	register ssize_t ret;
X	register int	total = 0;
X		int	oerrno = geterrno();
X
X	if ((ret = (ssize_t)count) < 0) {
X		seterrno(EINVAL);
X		return ((ssize_t)-1);
X	}
X	while (count > 0) {
X		while ((ret = read(f, p, count)) < 0) {
X			if (geterrno() == EINTR) {
X				/*
X				 * Set back old 'errno' so we don't change the
X				 * errno visible to the outside if we did
X				 * not fail.
X				 */
X				seterrno(oerrno);
X				continue;
X			}
X			return (ret);	/* Any other error */
X		}
X		if (ret == 0)		/* Something went wrong */
X			break;
X
X		total += ret;
X		count -= ret;
X		p += ret;
X	}
X	return (total);
X}
END-of-star-1.5.2/lib/stdio/nixread.c
echo x - star-1.5.2/lib/stdio/nixwrite.c
sed 's/^X//' >star-1.5.2/lib/stdio/nixwrite.c << 'END-of-star-1.5.2/lib/stdio/nixwrite.c'
X/* @(#)nixwrite.c	1.7 09/06/30 Copyright 1986, 2001-2009 J. Schilling */
X/*
X *	Non interruptable extended write
X *
X *	Copyright (c) 1986, 2001-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT ssize_t
X_nixwrite(f, buf, count)
X	int	f;
X	void	*buf;
X	size_t	count;
X{
X	register char	*p = (char *)buf;
X	register ssize_t ret;
X	register int	total = 0;
X		int	oerrno = geterrno();
X
X	if ((ret = (ssize_t)count) < 0) {
X		seterrno(EINVAL);
X		return ((ssize_t)-1);
X	}
X	while (count > 0) {
X		while ((ret = write(f, p, count)) < 0) {
X			if (geterrno() == EINTR) {
X				/*
X				 * Set back old 'errno' so we don't change the
X				 * errno visible to the outside if we did
X				 * not fail.
X				 */
X				seterrno(oerrno);
X				continue;
X			}
X			return (ret);	/* Any other error */
X		}
X		if (ret == 0)		/* EOF */
X			break;
X
X		total += ret;
X		count -= ret;
X		p += ret;
X	}
X	return (total);
X}
END-of-star-1.5.2/lib/stdio/nixwrite.c
echo x - star-1.5.2/lib/stdio/openfd.c
sed 's/^X//' >star-1.5.2/lib/stdio/openfd.c << 'END-of-star-1.5.2/lib/stdio/openfd.c'
X/* @(#)openfd.c	1.11 10/11/06 Copyright 1986, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
X#if	defined(_openfd) && !defined(USE_LARGEFILES)
X#undef	_openfd
X#endif
X
XEXPORT int
X_openfd(name, omode)
X	const char	*name;
X	int		omode;
X{
X	return (open(name, omode, (mode_t)0666));
X}
END-of-star-1.5.2/lib/stdio/openfd.c
echo x - star-1.5.2/lib/stdio/openfd64.c
sed 's/^X//' >star-1.5.2/lib/stdio/openfd64.c << 'END-of-star-1.5.2/lib/stdio/openfd64.c'
X/* @(#)openfd64.c	1.7 04/08/08 Copyright 2000-2003 J. Schilling */
X/*
X *	Copyright (c) 2000-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	USE_LARGEFILES
X
X#define	_OPENFD_SRC
X#include "schilyio.h"
X
X#ifdef	HAVE_LARGEFILES
X
X#include "openfd.c"
X
X#endif
END-of-star-1.5.2/lib/stdio/openfd64.c
echo x - star-1.5.2/lib/stdio/schilyio.h
sed 's/^X//' >star-1.5.2/lib/stdio/schilyio.h << 'END-of-star-1.5.2/lib/stdio/schilyio.h'
X/* @(#)schilyio.h	2.28 10/08/23 Copyright 1986, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1986, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_STDIO_SCHILYIO_H
X#define	_STDIO_SCHILYIO_H
X
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/types.h>
X#include <schily/unistd.h>
X#include <schily/fcntl.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X
X#ifdef	NO_USG_STDIO
X#	ifdef	HAVE_USG_STDIO
X#		undef	HAVE_USG_STDIO
X#	endif
X#endif
X
X#ifdef	HAVE_LARGEFILES
X/*
X * XXX We may need to put this code to a more global place to allow all
X * XXX users of fseek()/ftell() to automaticaly use fseeko()/ftello()
X * XXX if the latter are available.
X *
X * If HAVE_LARGEFILES is defined, it is guaranteed that fseeko()/ftello()
X * both are available.
X */
X#	define	fseek	fseeko
X#	define	ftell	ftello
X
X#else	/* !HAVE_LARGEFILES */
X/*
X * If HAVE_LARGEFILES is not defined, we depend on specific tests for
X * fseeko()/ftello() which must have been done before the tests for
X * Large File support have been done.
X * Note that this only works if the tests used below are really done before
X * the Large File autoconf test is run. This is because autoconf does no
X * clean testing but instead cumulatively modifes the envivonment used for
X * testing.
X */
X#ifdef	HAVE_FSEEKO
X#	define	fseek	fseeko
X#endif
X#ifdef	HAVE_FTELLO
X#	define	ftell	ftello
X#endif
X
X#endif
X
X/*
X * speed things up...
X */
X#ifndef	_OPENFD_SRC
X#ifdef	_openfd
X#undef	_openfd
X#endif
X#define	_openfd(name, omode)	(open(name, omode, (mode_t)0666))
X#endif
X
X#define	DO_MYFLAG		/* use local flags */
X
X/*
X * Flags used during fileopen(), ... by _fcons()/ _cvmod()
X */
X#define	FI_NONE		0x0000	/* no flags defined */
X
X#define	FI_READ		0x0001	/* open for reading */
X#define	FI_WRITE	0x0002	/* open for writing */
X#define	FI_BINARY	0x0004	/* open in binary mode */
X#define	FI_APPEND	0x0008	/* append on each write */
X
X#define	FI_CREATE	0x0010	/* create if nessecary */
X#define	FI_TRUNC	0x0020	/* truncate file on open */
X#define	FI_UNBUF	0x0080	/* dont't buffer io */
X#define	FI_CLOSE	0x1000	/* close file on error */
X
X/*
X * Additional Schily FILE * flags that are not present with the
X * standard stdio implementation.
X */
X#define	_JS_IONORAISE	01	/* do no raisecond() on errors */
X#define	_JS_IOUNBUF	02	/* do unbuffered i/o */
X
X
X#ifdef	DO_MYFLAG
X
Xstruct _io_flags {
X	FILE	*fl_io;		/* file pointer */
X	struct _io_flags	/* pointer to next struct */
X		*fl_next;	/* if more file pointer to same fd */
X	int	fl_flags;	/* my flags */
X};
X
Xtypedef	struct _io_flags _io_fl;
X
Xextern	int	_io_glflag;	/* global default flag */
Xextern	_io_fl	*_io_myfl;	/* array of structs to hold my flags */
Xextern	int	_fl_max;	/* max fd currently in _io_myfl */
X
X/*
X *	if fileno > max
X *		expand
X *	else if map[fileno].pointer == 0
X *		return 0
X *	else if map[fileno].pointer == p
X *		return map[fileno].flags
X *	else
X *		search list
X */
X#define	flp(p)		(&_io_myfl[fileno(p)])
X
X#ifdef	MY_FLAG_IS_MACRO
X#define	my_flag(p)	((int)fileno(p) >= _fl_max ?			\
X				_io_get_my_flag(p) :			\
X			((flp(p)->fl_io == 0 || flp(p)->fl_io == p) ?	\
X				flp(p)->fl_flags :			\
X				_io_get_my_flag(p)))
X#else
X#define	my_flag(p)	_io_get_my_flag(p)
X#endif
X
X#define	set_my_flag(p, v) _io_set_my_flag(p, v)
X#define	add_my_flag(p, v) _io_add_my_flag(p, v)
X
Xextern	int	_io_get_my_flag __PR((FILE *));
Xextern	void	_io_set_my_flag __PR((FILE *, int));
Xextern	void	_io_add_my_flag __PR((FILE *, int));
X
X#else	/* DO_MYFLAG */
X
X#define	my_flag(p)		_JS_IONORAISE	/* Always noraise */
X#define	set_my_flag(p, v)			/* Ignore */
X#define	add_my_flag(p, v)			/* Ignore */
X
X#endif	/* DO_MYFLAG */
X
X#ifdef	HAVE_USG_STDIO
X
X/*
X * Use the right filbuf()/flsbuf() function.
X */
X#ifdef	HAVE___FILBUF
X#	define	usg_filbuf(fp)		__filbuf(fp)
X#	define	usg_flsbuf(c, fp)	__flsbuf(c, fp)
X/*
X * Define prototypes to verify if our interface is right
X */
Xextern	int	__filbuf		__PR((FILE *));
X#else
X#	ifdef	HAVE__FILBUF
X#	define	usg_filbuf(fp)		_filbuf(fp)
X#	define	usg_flsbuf(c, fp)	_flsbuf(c, fp)
X/*
X * Define prototypes to verify if our interface is right
X */
Xextern	int	_filbuf			__PR((FILE *));
X#	else
X/*
X * no filbuf() but this will not happen on USG_STDIO systems.
X */
X#	endif
X#endif
X/*
X * Do not check this because flsbuf()'s 1st parameter may be
X * int			SunOS
X * unsigned int		Apollo
X * unsigned char	HP-UX-11
X *
X * Note that the interface is now checked by autoconf.
X */
X#else
X/*
X * If we are on a non USG system we cannot down file pointers
X */
X#undef	DO_DOWN
X#endif
X
X#ifndef	DO_DOWN
X/*
X *	No stream checking
X */
X#define	down(f)
X#define	down1(f, fl1)
X#define	down2(f, fl1, fl2)
X#else
X/*
X *	Do stream checking (works only on USG stdio)
X *
X *	New version of USG stdio.
X *	_iob[] holds only a small amount of pointers.
X *	Aditional space is allocated.
X *	We may check only if the file pointer is != NULL
X *	and if iop->_flag refers to a stream with appropriate modes.
X *	If _iob[] gets expanded by malloc() we cannot check upper bound.
X */
X#define	down(f)		((f) == 0 || (f)->_flag == 0 ? \
X				(raisecond(_badfile, 0L), (FILE *)0) : (f))
X
X#define	down1(f, fl1)	((f) == 0 || (f)->_flag == 0 ? \
X					(raisecond(_badfile, 0L), (FILE *)0) : \
X				(((f)->_flag & fl1) != fl1 ? \
X					(raisecond(_badop, 0L), (FILE *)0) : \
X					(f)))
X
X#define	down2(f, fl1, fl2)	((f) == 0 || (f)->_flag == 0 ? \
X				(raisecond(_badfile, 0L), (FILE *)0) : \
X				    (((f)->_flag & fl1) != fl1 && \
X				    ((f)->_flag & fl2)  != fl2 ? \
X				(raisecond(_badop, 0L), (FILE *)0) : \
X				(f)))
X#endif	/* DO_DOWN */
X
Xextern	char	_badfile[];
Xextern	char	_badmode[];
Xextern	char	_badop[];
X
X#endif	/* _STDIO_SCHILYIO_H */
END-of-star-1.5.2/lib/stdio/schilyio.h
echo x - star-1.5.2/lib/stdio/file_getraise.c
sed 's/^X//' >star-1.5.2/lib/stdio/file_getraise.c << 'END-of-star-1.5.2/lib/stdio/file_getraise.c'
X/* @(#)file_getraise.c	1.1 07/04/03 Copyright 2007 J. Schilling */
X/*
X *	Copyright (c) 2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include "schilyio.h"
X
XEXPORT int
Xfile_getraise(f)
X	register FILE *f;
X{
X	int	oflag;
Xextern	int	_io_glflag;
X
X	if (f == (FILE *)NULL)
X		return ((_io_glflag & _JS_IONORAISE) != 0);
X
X	down(f);
X
X	oflag = my_flag(f);
X	return ((oflag & _JS_IONORAISE) != 0);
X}
END-of-star-1.5.2/lib/stdio/file_getraise.c
echo x - star-1.5.2/lib/Targets
sed 's/^X//' >star-1.5.2/lib/Targets << 'END-of-star-1.5.2/lib/Targets'
XCFILES_STDIO=	cvmod.c dat.c fcons.c fdown.c \
X		ffileread.c ffilewrite.c \
X		fgetline.c file_getraise.c file_raise.c \
X		fileopen.c filemopen.c \
X		filepos.c fileread.c fileseek.c  \
X		filesize.c \
X		filewrite.c flag.c flush.c  \
X		fpipe.c \
X		niread.c niwrite.c nixread.c nixwrite.c openfd.c \
X		fcons64.c fileopen64.c filemopen64.c \
X		filepos64.c filesize64.c \
X		openfd64.c
X
X#
X# Note: getfp.c must be before getav0.c
X# Otherwise getfp.o would be made as dependency of avoffset
X#
X
XCFILES_REST=	astoi.c astoll.c astoull.c \
X		comerr.c fcomerr.c cmpbytes.c cmpnullbytes.c \
X		eaccess.c error.c \
X		fconv.c fexec.c fillbytes.c \
X		findinpath.c \
X		fnmatch.c \
X		format.c \
X		getfp.c \
X		getargs.c getav0.c geterrno.c \
X		getpagesize.c \
X		gethostname.c \
X		getnum.c getxnum.c \
X		gettnum.c getxtnum.c \
X		getperm.c \
X		jsprintf.c jssnprintf.c jssprintf.c \
X		match.c movebytes.c \
X		mem.c jmem.c fjmem.c \
X		raisecond.c \
X		rename.c \
X		saveargs.c seterrno.c \
X		strcatl.c streql.c \
X		swabbytes.c \
X		usleep.c
X
XCFILES=		$(CFILES_STDIO) $(CFILES_REST)
END-of-star-1.5.2/lib/Targets
echo x - star-1.5.2/lib/jssprintf.c
sed 's/^X//' >star-1.5.2/lib/jssprintf.c << 'END-of-star-1.5.2/lib/jssprintf.c'
X/* @(#)jssprintf.c	1.17 10/08/21 Copyright 1985, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X/*
X * Do not include stdio.h, BSD systems define sprintf the wrong way!
X */
XEXPORT	int js_sprintf __PR((char *, const char *, ...));
X
X#ifdef	PROTOTYPES
Xstatic void _cput(char c, long ba)
X#else
Xstatic void _cput(c, ba)
X	char	c;
X	long	ba;
X#endif
X{
X	*(*(char **)ba)++ = c;
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xjs_sprintf(char *buf, const char *form, ...)
X#else
XEXPORT int
Xjs_sprintf(buf, form, va_alist)
X	char	*buf;
X	char	*form;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	cnt;
X	char	*bp = buf;
X
X#ifdef	PROTOTYPES
X	va_start(args, form);
X#else
X	va_start(args);
X#endif
X	cnt = format(_cput, (long)&bp, form,  args);
X	va_end(args);
X	*bp = '\0';
X
X	return (cnt);
X}
END-of-star-1.5.2/lib/jssprintf.c
echo x - star-1.5.2/lib/Makefile
sed 's/^X//' >star-1.5.2/lib/Makefile << 'END-of-star-1.5.2/lib/Makefile'
X#ident "@(#)Makefile	1.5 06/07/21 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= libschily.mk libschily_p.mk $(NO_SHL)shlschily.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/lib/Makefile
echo x - star-1.5.2/lib/libschily.mk
sed 's/^X//' >star-1.5.2/lib/libschily.mk << 'END-of-star-1.5.2/lib/libschily.mk'
X#ident @(#)libschily.mk	1.6 10/10/07 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
XVPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	schily
XCPPOPTS +=	-Istdio
XCPPOPTS +=	-DUSE_SCANSTACK	# Try to scan stack frames
XCPPOPTS +=	-DPORT_ONLY	# Add missing funcs line snprintf for porting
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-star-1.5.2/lib/libschily.mk
echo x - star-1.5.2/lib/libschily_p.mk
sed 's/^X//' >star-1.5.2/lib/libschily_p.mk << 'END-of-star-1.5.2/lib/libschily_p.mk'
X#ident @(#)libschily_p.mk	1.7 08/01/11 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/profiled
XSUBINSDIR=	/profiled
X.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
XVPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	schily
XCPPOPTS +=	-Istdio
XCPPOPTS +=	-DUSE_SCANSTACK	# Try to scan stack frames
XCPPOPTS +=	-DPORT_ONLY	# Add missing funcs line snprintf for porting
XCOPTS +=	$(COPTGPROF)
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-star-1.5.2/lib/libschily_p.mk
echo x - star-1.5.2/lib/match.c
sed 's/^X//' >star-1.5.2/lib/match.c << 'END-of-star-1.5.2/lib/match.c'
X/* @(#)match.c	1.24 10/08/21 Copyright 1985, 1995-2010 J. Schilling */
X#include <schily/standard.h>
X#include <schily/patmatch.h>
X/*
X *	Pattern matching functions
X *
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/*
X *	The pattern matching functions below are based on the algorithm
X *	presented by Martin Richards in:
X *
X *	"A Compact Function for Regular Expression Pattern Matching",
X *	Software-Practice and Experience, Vol. 9, 527-534 (1979)
X *
X *	Several changes have been made to the original source which has been
X *	written in BCPL:
X *
X *	'/'	is replaced by	'!'		(to allow UNIX filenames)
X *	'(',')' are replaced by	'{', '}'
X *	'\''	is replaced by	'\\'		(UNIX compatible quote)
X *
X *	Character classes have been added to allow "[<character list>]"
X *	to be used.
X *	Start of line '^' and end of line '$' have been added.
X */
X
X#undef	CHAR
X
X#ifdef	__LINE_MATCH
X#ifdef	__WIDE_CHAR
X#define	patmatch	patwlmatch
X#else
X#define	opatmatch	opatlmatch
X#define	patmatch	patlmatch
X#endif
X#endif
X
X#ifdef	__WIDE_CHAR
X#ifndef	__LINE_MATCH
X#define	patcompile	patwcompile
X#define	patmatch	patwmatch
X#endif
X#define	CHAR		wchar_t
X#endif
X
X#ifndef	CHAR
Xtypedef	unsigned char	Uchar;
X#define	CHAR		Uchar
X#endif
X
X#define	ENDSTATE	(-1)
X
X/*
X *	The Interpreter
X */
X
X
X/*
X *	put adds a new state to the active list
X */
X#define	 put(ret, state, sp, n)	{		\
X	register int *lstate	= state;	\
X	register int *lsp	= sp;		\
X	register int ln		= n;		\
X						\
X	while (lstate < lsp) {			\
X		if (*lstate++ == ln) {		\
X			ret = lsp;		\
X			lsp = 0;		\
X			break;			\
X		}				\
X	}					\
X	if (lsp) {				\
X		*lstate++ = ln;			\
X		ret = lstate;			\
X	}					\
X}
X
X
X/*
X *	match a character in class
X */
X#define	in_class(found, pat, c)	{			\
X	register const CHAR	*lpat	= pat;		\
X	register int		lc	= c;		\
X	int	lo_bound;				\
X	int	hi_bound;				\
X							\
X	found = FALSE;					\
X							\
X	if (*lpat == NOT) {				\
X		lpat++;					\
X		found = TRUE;				\
X	}						\
X	while (*lpat != RCLASS) {			\
X		if (*lpat == QUOTE)			\
X			lpat++;				\
X		lo_bound = *lpat++;			\
X		if (*lpat == RANGE) {			\
X			lpat++;				\
X			if (*lpat == QUOTE)		\
X				lpat++;			\
X			hi_bound = *lpat++;		\
X		} else {				\
X			hi_bound = lo_bound;		\
X		}					\
X		if (lo_bound <= lc && lc <= hi_bound) {	\
X			found = !found;			\
X			break;				\
X		}					\
X	}						\
X}
X
X/*
X *	opatmatch - the old external interpreter interface.
X *
X *	Trys to match a string beginning at offset
X *	against the compiled pattern.
X */
X#ifndef	__WIDE_CHAR
XEXPORT CHAR
X*opatmatch(pat, aux, str, soff, slen, alt)
X	const CHAR	*pat;
X	const int	*aux;
X	const CHAR	*str;
X	int		soff;
X	int		slen;
X	int		alt;
X{
X	int		state[MAXPAT];
X
X	return (patmatch(pat, aux, str, soff, slen, alt, state));
X}
X#endif
X
X/*
X *	patmatch - the external interpreter interface.
X *
X *	Trys to match a string beginning at offset
X *	against the compiled pattern.
X */
XEXPORT CHAR *
Xpatmatch(pat, aux, str, soff, slen, alt, state)
X	const CHAR	*pat;
X	const int	*aux;
X	const CHAR	*str;
X	int		soff;
X	int		slen;
X	int		alt;
X	int		state[];
X{
X	register int	*sp;
X	register int	*n;
X	register int	*i;
X	register int	p;
X	register int	q, s, k;
X	int		c;
X	const CHAR	*lastp = (CHAR *)NULL;
X
X#ifdef	__LINE_MATCH
Xfor (; soff <= slen; soff++) {
X#endif
X
X	sp = state;
X	put(sp, state, state, 0);
X	if (alt != ENDSTATE)
X		put(sp, state, sp, alt);
X
X	for (s = soff; ; s++) {
X		/*
X		 * next char from input string
X		 */
X		if (s >= slen)
X			c = 0;
X		else
X			c = str[s];
X		/*
X		 * first complete the closure
X		 */
X		for (n = state; n < sp; ) {
X			p = *n++;		/* next state number */
X			if (p == ENDSTATE)
X				continue;
X			q = aux[p];		/* get next state for pat */
X			k = pat[p];		/* get next char from pat */
X			switch (k) {
X
X			case REP:
X				put(sp, state, sp, p+1);
X				/* FALLTHRU */
X			case NIL:		/* NIL matches always */
X			case STAR:
X				put(sp, state, sp, q);
X				break;
X			case LBRACK:		/* alternations */
X			case ALT:
X				put(sp, state, sp, p+1);
X				if (q != ENDSTATE)
X					put(sp, state, sp, q);
X				break;
X			case START:
X				if (s == 0)
X					put(sp, state, sp, q);
X				break;
X			case END:
X				if (c == '\0')
X					put(sp, state, sp, q);
X				break;
X			}
X		}
X
X		for (i = state; i < sp; ) {
X			if (*i++ == ENDSTATE) {
X				lastp = &str[s];
X				break;
X			}
X		}
X		if (c == 0)
X			return ((CHAR *)lastp);
X
X		/*
X		 * now try to match next character
X		 */
X		n = sp;
X		sp = state;
X		for (i = sp; i < n; ) {
X			p = *i++;		/* next active state number */
X			if (p == ENDSTATE)
X				continue;
X			k = pat[p];
X			switch (k) {
X
X			case ALT:
X			case REP:
X			case NIL:
X			case LBRACK:
X			case START:
X			case END:
X				continue;
X			case LCLASS:
X				in_class(q, &pat[p+1], c);
X				if (!q)
X					continue;
X				break;
X			case STAR:
X				put(sp, state, sp, p);
X				continue;
X			case QUOTE:
X				k = pat[p+1];
X			default:
X				if (k != c)
X					continue;
X				/* FALLTHRU */
X			case ANY:
X				break;
X			}
X			put(sp, state, sp, aux[p]);
X		}
X		if (sp == state) {		/* if no new states return */
X#ifdef	__LINE_MATCH
X
X			if (lastp || (soff == slen - 1))
X				return ((CHAR *)lastp);
X			else
X				break;
X#else
X			return ((CHAR *)lastp);
X#endif
X		}
X	}
X#ifdef	__LINE_MATCH
X}
Xreturn ((CHAR *)lastp);
X#endif
X}
X
X
X#ifndef	__LINE_MATCH
X/*
X *	The Compiler
X */
X
Xtypedef	struct args {
X	const CHAR	*pattern;
X	int		*aux;
X	int		patp;
X	int		length;
X	CHAR		Ch;
X} arg_t;
X
XLOCAL	void	nextitem __PR((arg_t *));
XLOCAL	int	prim	 __PR((arg_t *));
XLOCAL	int	expr	 __PR((arg_t *, int *));
XLOCAL	void	setexits __PR((int *, int, int));
XLOCAL	int	join	 __PR((int *, int, int));
X
X/*
X *	'read' the next character from pattern
X */
X#define	rch(ap)						\
X{							\
X	if (++(ap)->patp >= (ap)->length)		\
X		(ap)->Ch = 0;				\
X	else						\
X		(ap)->Ch = (ap)->pattern[(ap)->patp];	\
X}
X
X/*
X *	get the next item from pattern
X */
XLOCAL void
Xnextitem(ap)
X	arg_t	*ap;
X{
X	if (ap->Ch == QUOTE)
X		rch(ap);
X	rch(ap);
X}
X
X/*
X *	parse a primary
X */
XLOCAL int
Xprim(ap)
X	arg_t	*ap;
X{
X	int	a  = ap->patp;
X	int	op = ap->Ch;
X	int	t;
X
X	nextitem(ap);
X	switch (op) {
X
X	case '\0':
X	case ALT:
X	case RBRACK:
X		return (ENDSTATE);
X	case LCLASS:
X		while (ap->Ch != RCLASS && ap->Ch != '\0')
X			nextitem(ap);
X		if (ap->Ch == '\0')
X			return (ENDSTATE);
X		nextitem(ap);
X		break;
X	case REP:
X		t = prim(ap);
X		if (t == ENDSTATE)
X			return (ENDSTATE);
X		setexits(ap->aux, t, a);
X		break;
X	case LBRACK:
X		a = expr(ap, &ap->aux[a]);
X		if (a == ENDSTATE || ap->Ch != RBRACK)
X			return (ENDSTATE);
X		nextitem(ap);
X		break;
X	}
X	return (a);
X}
X
X/*
X *	parse an expression (a sequence of primaries)
X */
XLOCAL int
Xexpr(ap, altp)
X	arg_t	*ap;
X	int	*altp;
X{
X	int	exits = ENDSTATE;
X	int	a;
X	int	*aux = ap->aux;
X	CHAR	Ch;
X
X	for (;;) {
X		a = prim(ap);
X		Ch = ap->Ch;
X		if (Ch == ALT || Ch == RBRACK || Ch == '\0') {
X			exits = join(aux, exits, a);
X			if (Ch != ALT)
X				return (exits);
X			*altp = ap->patp;
X			altp = &aux[ap->patp];
X			nextitem(ap);
X		} else
X			setexits(aux, a, ap->patp);
X	}
X}
X
X/*
X *	set all exits in a list to a specified value
X */
XLOCAL void
Xsetexits(aux, list, val)
X	int	*aux;
X	int	list;
X	int	val;
X{
X	int	a;
X
X	while (list != ENDSTATE) {
X		a = aux[list];
X		aux[list] = val;
X		list = a;
X	}
X}
X
X/*
X *	concatenate two lists
X */
XLOCAL int
Xjoin(aux, a, b)
X	int	*aux;
X	int	a;
X	int	b;
X{
X	int	t;
X
X	if (a == ENDSTATE)
X		return (b);
X	t = a;
X	while (aux[t] != ENDSTATE)
X		t = aux[t];
X	aux[t] = b;
X	return (a);
X}
X
X/*
X *	patcompile - the external compiler interface.
X *
X *	The pattern is compiled into the aux array.
X *	Return value on success, is the outermost alternate which is != 0.
X *	Error is indicated by return of 0.
X */
XEXPORT int
Xpatcompile(pat, len, aux)
X	const CHAR	*pat;
X	int		len;
X	int		*aux;
X{
X	arg_t	a;
X	int	alt = ENDSTATE;
X	int	i;
X
X	a.pattern = pat;
X	a.length  = len;
X	a.aux	  = aux;
X	a.patp    = -1;
X
X	for (i = 0; i < len; i++)
X		aux[i] = ENDSTATE;
X	rch(&a);
X	i = expr(&a, &alt);
X	if (i == ENDSTATE)
X		return (0);
X	setexits(aux, i, ENDSTATE);
X	return (alt);
X}
X#endif	/* LMATCH */
END-of-star-1.5.2/lib/match.c
echo x - star-1.5.2/lib/movebytes.c
sed 's/^X//' >star-1.5.2/lib/movebytes.c << 'END-of-star-1.5.2/lib/movebytes.c'
X/* @(#)movebytes.c	1.18 09/10/17 Copyright 1985, 1989, 1995-2009 J. Schilling */
X/*
X *	move data
X *
X *	Copyright (c) 1985, 1989, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/align.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
X/*
X * movebytes(from, to, cnt) is the same as memmove(to, from, cnt)
X */
XEXPORT char *
Xmovebytes(fromv, tov, cnt)
X	const void	*fromv;
X	void		*tov;
X	ssize_t		cnt;
X{
X	register const char	*from	= fromv;
X	register char		*to	= tov;
X	register ssize_t	n;
X
X	/*
X	 * If we change cnt to be unsigned, check for == instead of <=
X	 */
X	if ((n = cnt) <= 0)
X		return (to);
X
X	if (from >= to) {
X		/*
X		 * source is on higher addresses than destination:
X		 *	move bytes forwards
X		 */
X		if (n >= (ssize_t)(8 * sizeof (long))) {
X			if (l2aligned(from, to)) {
X				register const long *froml = (const long *)from;
X				register long *tol = (long *)to;
X				register ssize_t rem = n % (8 * sizeof (long));
X
X				n /= (8 * sizeof (long));
X				do {
X					DO8 (*tol++ = *froml++);
X				} while (--n > 0);
X
X				from = (const char *)froml;
X				to = (char *)tol;
X				n = rem;
X			}
X
X			if (n >= 8) {
X				n -= 8;
X				do {
X					DO8 (*to++ = *from++);
X				} while ((n -= 8) >= 0);
X				n += 8;
X			}
X
X			if (n > 0) do {
X				*to++ = *from++;
X			} while (--n > 0);
X			return (to);
X		}
X		if (n > 0) do {
X			*to++ = *from++;
X		} while (--n > 0);
X		return (to);
X	} else {
X		char *ep;
X
X		/*
X		 * source is on lower addresses than destination:
X		 *	move bytes backwards
X		 */
X		to += n;
X		from += n;
X		ep = to;
X		if (n >= (ssize_t)(8 * sizeof (long))) {
X			if (l2aligned(from, to)) {
X				register const long *froml = (const long *)from;
X				register long *tol = (long *)to;
X				register ssize_t rem = n % (8 * sizeof (long));
X
X				n /= (8 * sizeof (long));
X				do {
X					DO8 (*--tol = *--froml);
X				} while (--n > 0);
X
X				from = (const char *)froml;
X				to = (char *)tol;
X				n = rem;
X			}
X			if (n >= 8) {
X				n -= 8;
X				do {
X					DO8 (*--to = *--from);
X				} while ((n -= 8) >= 0);
X				n += 8;
X			}
X			if (n > 0) do {
X				*--to = *--from;
X			} while (--n > 0);
X			return (ep);
X		}
X		if (n > 0) do {
X			*--to = *--from;
X		} while (--n > 0);
X		return (ep);
X	}
X}
END-of-star-1.5.2/lib/movebytes.c
echo x - star-1.5.2/lib/getnum.c
sed 's/^X//' >star-1.5.2/lib/getnum.c << 'END-of-star-1.5.2/lib/getnum.c'
X/* @(#)getnum.c	1.6 09/07/08 Copyright 1984-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getnum.c	1.6 09/07/08 Copyright 1984-2009 J. Schilling";
X#endif
X/*
X *	Number conversion routines to implement 'dd' like number options.
X *
X *	Copyright (c) 1984-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
XEXPORT	int	getnum		__PR((char *arg, long *valp));
XEXPORT	int	getllnum	__PR((char *arg, Llong *lvalp));
X
XLOCAL gnmult_t	nums[] = {
X#ifdef	HAVE_LONGLONG
X	{ 'e', 1024*1024*1024*1024LL*1024*1024, },
X	{ 'E', 1024*1024*1024*1024LL*1024*1024, },
X	{ 'p', 1024*1024*1024*1024LL*1024, },
X	{ 'P', 1024*1024*1024*1024LL*1024, },
X	{ 't', 1024*1024*1024*1024LL, },
X	{ 'T', 1024*1024*1024*1024LL, },
X#endif
X	{ 'g', 1024*1024*1024, },
X	{ 'G', 1024*1024*1024, },
X	{ 'm', 1024*1024, },
X	{ 'M', 1024*1024, },
X
X	{ 'f', 2352, },
X	{ 'F', 2352, },
X	{ 's', 2048, },
X	{ 'S', 2048, },
X
X	{ 'k', 1024, },
X	{ 'K', 1024, },
X	{ 'b', 512, },
X	{ 'B', 512, },
X	{ 'w', 2, },
X	{ 'W', 2, },
X	{ '\0', 0, },
X};
X
XEXPORT int
Xgetnum(arg, valp)
X	char	*arg;
X	long	*valp;
X{
X	return (getxnum(arg, valp, nums));
X}
X
XEXPORT int
Xgetllnum(arg, lvalp)
X	char	*arg;
X	Llong	*lvalp;
X{
X	return (getllxnum(arg, lvalp, nums));
X}
END-of-star-1.5.2/lib/getnum.c
echo x - star-1.5.2/lib/shlschily.mk
sed 's/^X//' >star-1.5.2/lib/shlschily.mk << 'END-of-star-1.5.2/lib/shlschily.mk'
X#ident @(#)shlschily.mk	1.8 12/08/14 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/pic
X.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
XVPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	schily
XCPPOPTS +=	-Istdio
XCPPOPTS +=	-DUSE_SCANSTACK	# Try to scan stack frames
XCPPOPTS +=	-DPORT_ONLY	# Add missing funcs line snprintf for porting
Xinclude		Targets
XLIBS=		$(LIB_INTL) -lc	# Now needs gettext()
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
END-of-star-1.5.2/lib/shlschily.mk
echo x - star-1.5.2/lib/raisecond.c
sed 's/^X//' >star-1.5.2/lib/raisecond.c << 'END-of-star-1.5.2/lib/raisecond.c'
X/* @(#)raisecond.c	1.22 09/07/10 Copyright 1985, 1989, 1995-2004 J. Schilling */
X/*
X *	raise a condition (software signal)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/*
X *	Check for installed condition handlers.
X *	If a handler is found, the function is called with the appropriate args.
X *	If no handler is found or no handler signals success,
X *	the program will be aborted.
X *
X *	Copyright (c) 1985, 1989, 1995-2004 J. Schilling
X */
X#include <schily/mconfig.h>
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/sigblk.h>
X#include <schily/unistd.h>
X#include <schily/stdlib.h>
X#include <schily/string.h>
X#include <schily/avoffset.h>
X#include <schily/schily.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X/*
X * Macros to print to stderr without stdio, to avoid screwing up.
X */
X#ifndef	STDERR_FILENO
X#define	STDERR_FILENO	2
X#endif
X#define	eprints(a)	(void)write(STDERR_FILENO, (a), sizeof (a)-1)
X#define	eprintl(a)	(void)write(STDERR_FILENO, (a), strlen(a))
X
X#define	is_even(p)	((((long)(p)) & 1) == 0)
X#define	even(p)		(((long)(p)) & ~1L)
X#ifdef	__future__
X#define	even(p)		(((long)(p)) - 1) /* will this work with 64 bit ?? */
X#endif
X
X
XLOCAL	void raiseabort  __PR((const char *));
X
X#ifdef	HAVE_SCANSTACK
X#include <schily/stkframe.h>
X#define	next_frame(vp)	do {						    \
X				if (((struct frame *)(vp))->fr_savfp == 0) { \
X					vp = (void *)0;			    \
X					break;				    \
X				}					    \
X				if (((struct frame *)(vp))->fr_savpc == 0) { \
X					vp = (void *)0;			    \
X					break;				    \
X				}					    \
X				vp =					    \
X				    (void *)((struct frame *)(vp))->fr_savfp; \
X			} while (vp != NULL && is_even(vp));		    \
X			vp = (struct frame *)even(vp);
X#else
X#if	defined(IS_MACOS_X)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * Make __roothandle a "data" variable.
X */
XEXPORT	SIGBLK	*__roothandle = 0;
X#else
XEXPORT	SIGBLK	*__roothandle;
X#endif
X
X#define	next_frame(vp)	vp = (((SIGBLK *)(vp))->sb_savfp);
X#endif
X
XLOCAL	BOOL framehandle __PR((SIGBLK *, const char *, const char *, long));
X
X/*
X *	Loop through the chain of procedure frames on the stack.
X *
X *	Frame pointers normally have even values.
X *	Frame pointers of procedures with an installed handler are marked odd.
X *	The even base value, in this case actually points to a SIGBLK which
X *	holds the saved "real" frame pointer.
X *	The SIGBLK mentioned above may me the start of a chain of SIGBLK's,
X *	containing different handlers.
X */
XEXPORT void
Xraisecond(signame, arg2)
X	const char	*signame;
X	long		arg2;
X{
X	register void	*vp = NULL;
X
X#ifdef	HAVE_SCANSTACK
X	/*
X	 * As the SCO OpenServer C-Compiler has a bug that may cause
X	 * the first function call to getfp() been done before the
X	 * new stack frame is created, we call getfp() twice.
X	 */
X	(void) getfp();
X	vp = getfp();
X	next_frame(vp);
X#else
X	vp = __roothandle;
X#endif
X
X	while (vp) {
X		if (framehandle((SIGBLK *)vp, signame, signame, arg2))
X			return;
X		else if (framehandle((SIGBLK *)vp, "any_other", signame, arg2))
X			return;
X#ifdef	HAVE_SCANSTACK
X		vp = (struct frame *)((SIGBLK *)vp)->sb_savfp;
X#endif
X		next_frame(vp);
X	}
X	/*
X	 * No matching handler that signals success found.
X	 * Print error message and abort.
X	 */
X	raiseabort(signame);
X	/* NOTREACHED */
X}
X
X/*
X *	Loop through the handler chain for a procedure frame.
X *
X *	If no handler with matching name is found, return FALSE,
X *	otherwise the first handler with matching name is called.
X *	The return value in the latter case depends on the called function.
X */
XLOCAL BOOL
Xframehandle(sp, handlename, signame, arg2)
X	register SIGBLK *sp;
X	const char	*handlename;
X	const char	*signame;
X	long		arg2;
X{
X	for (; sp; sp = sp->sb_signext) {
X		if (sp->sb_signame != NULL &&
X		    streql(sp->sb_signame, handlename)) {
X			if (sp->sb_sigfun == NULL) {	/* deactivated */
X				return (FALSE);
X			} else {
X				return (*sp->sb_sigfun)(signame,
X							sp->sb_sigarg, arg2);
X			}
X		}
X	}
X	return (FALSE);
X}
X
XLOCAL void
Xraiseabort(signame)
X	const	char	*signame;
X{
X	eprints("Condition not caught: "); eprintl(signame); eprints(".\n");
X	abort();
X	/* NOTREACHED */
X}
END-of-star-1.5.2/lib/raisecond.c
echo x - star-1.5.2/lib/rename.c
sed 's/^X//' >star-1.5.2/lib/rename.c << 'END-of-star-1.5.2/lib/rename.c'
X/* @(#)rename.c	1.11 11/06/18 Copyright 1998-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)rename.c	1.11 11/06/18 Copyright 1998-2011 J. Schilling";
X#endif
X/*
X *	rename() for old systems that don't have it.
X *
X *	Copyright (c) 1998-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	rename	__nothing__
X#include <schily/mconfig.h>
X
X#ifndef	HAVE_RENAME
X
X#include <schily/stdio.h>	/* XXX not OK but needed for js_xx() in schily/schily.h */
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/stat.h>
X#include <schily/maxpath.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X#undef	rename
X#include <schily/libport.h>
X
X#ifndef	MAXPATHNAME
X#define	MAXPATHNAME	1024
X#endif
X
X#if	MAXPATHNAME < 1024
X#undef	MAXPATHNAME
X#define	MAXPATHNAME	1024
X#endif
X
X#define	MAXNAME	MAXPATHNAME
X
X#define	FILEDESC struct stat
X
X#ifndef	HAVE_LSTAT
X#define	lstat	stat
X#endif
X
XEXPORT int
Xrename(old, new)
X	const char	*old;
X	const char	*new;
X{
X	char	bakname[MAXNAME];
X	char	*p;
X	char	strpid[32];
X	int	strplen;
X	int	plen;
X	BOOL	savpresent = FALSE;
X	BOOL	newpresent = FALSE;
X	int	serrno;
X	FILEDESC ostat;
X	FILEDESC xstat;
X
X	serrno = geterrno();
X
X	if (lstat(old, &ostat) < 0)
X		return (-1);
X
X	if (lstat(new, &xstat) >= 0) {
X		newpresent = TRUE;
X		if (ostat.st_dev == xstat.st_dev &&
X		    ostat.st_ino == xstat.st_ino)
X			return (0);		/* old == new we are done */
X	}
X
X#ifndef	HAVE_MKTEMP
X	strplen = js_snprintf(strpid, sizeof (strpid), ".%llx",
X							(Llong)getpid());
X#else
X	strplen = 6;
X	strcpy(strpid, "XXXXXX");
X#endif
X
X	/*
X	 * Save old version of file 'new' to allow us to restore it.
X	 * Platforms without rename() usually only support short filenames
X	 * but limit pid to 32000.
X	 */
X	strlcpy(bakname, new, MAXNAME-strplen);
X	p = strrchr(bakname, '/');
X	if (p == NULL)
X		p = bakname;
X	else
X		p++;
X	plen = strlen(p);
X	if ((plen + strplen) > 14)
X		p[14-strplen] = '\0';
X	strcat(p, strpid);
X#ifdef	HAVE_MKTEMP
X	mktemp(bakname);
X#endif
X	if (bakname[0] != '\0' && link(new, bakname) >= 0)
X		savpresent = TRUE;
X
X	if (newpresent) {
X		if (rmdir(new) < 0) {
X			if (geterrno() == ENOTDIR) {
X				if (unlink(new) < 0)
X					return (-1);
X			} else {
X				return (-1);
X			}
X		}
X	}
X
X	/*
X	 * Now add 'new' name to 'old'.
X	 */
X	if (link(old, new) < 0) {
X		serrno = geterrno();
X		/*
X		 * Make sure not to loose old version of 'new'.
X		 */
X		if (savpresent) {
X			unlink(new);
X			link(bakname, new);
X			unlink(bakname);
X		}
X		seterrno(serrno);
X		return (-1);
X	}
X	if (unlink(old) < 0)
X		return (-1);
X	if (savpresent)
X		unlink(bakname);	/* Fails in most cases...	*/
X	seterrno(serrno);		/* ...so restore errno		*/
X	return (0);
X}
X#endif	/* HAVE_RENAME */
END-of-star-1.5.2/lib/rename.c
echo x - star-1.5.2/lib/saveargs.c
sed 's/^X//' >star-1.5.2/lib/saveargs.c << 'END-of-star-1.5.2/lib/saveargs.c'
X/* @(#)saveargs.c	1.16 10/11/18 Copyright 1995-2010 J. Schilling */
X/*
X *	save argc, argv for command error printing routines
X *
X *	Copyright (c) 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/stdlib.h>
X#include <schily/avoffset.h>
X#include <schily/schily.h>
X#include <schily/dlfcn.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X#ifdef	HAVE_VAR___PROGNAME
Xextern	char	*__progname;
X#ifdef	HAVE_VAR___PROGNAME_FULL
Xextern	char	*__progname_full;
X#else
X#define	__progname_full	__progname
X#endif
X#endif
X
Xstatic	int	ac_saved;
Xstatic	char	**av_saved;
Xstatic	char	*av0_saved;
Xstatic	char	*av0_name_saved;
Xstatic	char	*progpath_saved;
Xstatic	char	*progname_saved;
X
Xstatic	char	av0_sp[32];	/* av0 space, avoid malloc() in most cases */
Xstatic	char	prn_sp[32];	/* name space, avoid malloc() in most cases */
Xstatic	char	dfl_str[] = "?";
X
XLOCAL	void	save_av0	__PR((char *av0));
XLOCAL	void	init_progname	__PR((void));
XLOCAL	void	init_arginfo	__PR((void));
X
XEXPORT void
Xsave_args(ac, av)
X	int	ac;
X	char	*av[];
X{
X	ac_saved = ac;
X	av_saved = av;
X	save_av0(av[0]);
X}
X
XLOCAL void
Xsave_av0(av0)
X	char	*av0;
X{
X	int	slen;
X	char	*p;
X
X	if (av0_saved && av0_saved != av0_sp)
X		free(av0_saved);
X
X	slen = strlen(av0) + 1;
X
X	if (slen <= (int)sizeof (av0_sp))
X		av0_saved = av0_sp;
X	else
X		av0_saved = malloc(slen);
X
X	if (av0_saved) {
X		strcpy(av0_saved, av0);
X		av0 = av0_saved;
X	}
X
X	if ((p = strrchr(av0, '/')) == NULL)
X		av0_name_saved = av0;
X	else
X		av0_name_saved = ++p;
X}
X
XEXPORT int
Xsaved_ac()
X{
X	if (av_saved == NULL)
X		init_arginfo();
X
X	return (ac_saved);
X}
X
XEXPORT char **
Xsaved_av()
X{
X	if (av_saved == NULL)
X		init_arginfo();
X
X	return (av_saved);
X}
X
XEXPORT char *
Xsaved_av0()
X{
X	if (av0_saved == NULL)
X		init_arginfo();
X
X	return (av0_saved);
X}
X
XEXPORT void
Xset_progname(name)
X	const char	*name;
X{
X	int	slen;
X	char	*p;
X
X	if (progpath_saved && progpath_saved != prn_sp)
X		free(progpath_saved);
X
X	slen = strlen(name) + 1;
X
X	if (slen <= sizeof (prn_sp))
X		progpath_saved = prn_sp;
X	else
X		progpath_saved = malloc(slen);
X
X	if (progpath_saved) {
X		strcpy(progpath_saved, name);
X		name = progpath_saved;
X	}
X
X	if ((p = strrchr(name, '/')) == NULL)
X		progname_saved = (char *)name;
X	else
X		progname_saved = ++p;
X}
X
XEXPORT char *
Xget_progname()
X{
X	if (progname_saved)
X		return (progname_saved);
X	if (av0_name_saved == NULL)
X		init_progname();
X	if (av0_name_saved)
X		return (av0_name_saved);
X	return (dfl_str);
X}
X
XEXPORT char *
Xget_progpath()
X{
X	if (progpath_saved)
X		return (progpath_saved);
X	if (av0_saved == NULL)
X		init_progname();
X	if (av0_saved)
X		return (av0_saved);
X	return (dfl_str);
X}
X
XLOCAL void
Xinit_progname()
X{
X#if defined(HAVE_SCANSTACK) || defined(HAVE_GETPROGNAME)
X	char	*progname;
X#endif
X
X	if (av0_name_saved == NULL)
X		init_arginfo();
X	if (av0_name_saved)
X		return;
X#ifdef	HAVE_GETPROGNAME
X	progname = (char *)getprogname();
X	if (progname) {
X		save_av0(progname);
X		return;
X	}
X#endif
X#ifdef	HAVE_VAR___PROGNAME
X	if (__progname_full) {
X		save_av0(__progname_full);
X		return;
X	}
X#endif
X#ifdef	HAVE_SCANSTACK
X	progname = getav0();		/* scan stack to get argv[0] */
X	if (progname) {
X		save_av0(progname);
X		return;
X	}
X#endif
X}
X
XLOCAL void
Xinit_arginfo()
X{
X#if defined(HAVE_DLINFO) && defined(HAVE_DLOPEN_IN_LIBC) && defined(RTLD_DI_ARGSINFO)
X	Dl_argsinfo	args;
X
X	if (dlinfo(RTLD_SELF, RTLD_DI_ARGSINFO, &args) < 0 ||
X	    args.dla_argc <= 0 ||
X	    args.dla_argv[0] == NULL)
X		return;
X
X	if (av_saved == NULL)
X		save_args(args.dla_argc, args.dla_argv);
X#endif
X}
END-of-star-1.5.2/lib/saveargs.c
echo x - star-1.5.2/lib/seterrno.c
sed 's/^X//' >star-1.5.2/lib/seterrno.c << 'END-of-star-1.5.2/lib/seterrno.c'
X/* @(#)seterrno.c	1.13 10/08/23 Copyright 1985, 1995-2010 J. Schilling */
X/*
X *	Set error number
X *
X *	Copyright (c) 1985, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_TS_ERRNO
X#define	_TS_ERRNO		/* Solaris: get thread safe errno value */
X#endif
X#ifndef	_LIBC_REENTRANT
X#define	_LIBC_REENTRANT		/* Linux: get thread safe errno value */
X#endif
X#include <schily/standard.h>
X#include <schily/errno.h>
X#include <schily/schily.h>
X
X#ifdef	seterrno
X#undef	seterrno
X#endif
X
XEXPORT int
Xseterrno(err)
X	int	err;
X{
X	int	old = errno;
X
X	errno = err;
X	return (old);
X}
END-of-star-1.5.2/lib/seterrno.c
echo x - star-1.5.2/lib/gettnum.c
sed 's/^X//' >star-1.5.2/lib/gettnum.c << 'END-of-star-1.5.2/lib/gettnum.c'
X/* @(#)gettnum.c	1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)gettnum.c	1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling";
X#endif
X/*
X *	Generic time conversion routines rewritten from
X *	'dd' like number conversion in 'sdd'.
X *
X *	Copyright (c) 1984-2002, 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/time.h>
X#include <schily/schily.h>
X
X#define	MINSECS		(60)
X#define	HOURSECS	(60  * MINSECS)
X#define	DAYSECS		(24  * HOURSECS)
X#define	WEEKSECS	(7   * DAYSECS)
X#define	YEARSECS	(365 * DAYSECS)		/* A non leap year */
X
X
XEXPORT	int	gettnum		__PR((char *arg, time_t *valp));
XEXPORT	int	getlltnum	__PR((char *arg, Llong *lvalp));
X
XLOCAL gnmult_t	nums[] = {
X	{ 'y', YEARSECS, },
X	{ 'w', WEEKSECS, },
X	{ 'd', DAYSECS, },
X	{ 'h', HOURSECS, },
X	{ 'm', MINSECS, },
X	{ 's', 1, },
X	{ '\0', 0, },
X};
X
XEXPORT int
Xgettnum(arg, valp)
X	char	*arg;
X	time_t	*valp;
X{
X	return (getxtnum(arg, valp, nums));
X}
X
XEXPORT int
Xgetlltnum(arg, lvalp)
X	char	*arg;
X	Llong	*lvalp;
X{
X	return (getllxtnum(arg, lvalp, nums));
X}
END-of-star-1.5.2/lib/gettnum.c
echo x - star-1.5.2/lib/strcatl.c
sed 's/^X//' >star-1.5.2/lib/strcatl.c << 'END-of-star-1.5.2/lib/strcatl.c'
X/* @(#)strcatl.c	1.13 06/09/13 Copyright 1985, 1989, 1995-2003 J. Schilling */
X/*
X *	list version of strcat()
X *
X *	concatenates all past first parameter until a NULL pointer is reached
X *
X *	WARNING: a NULL constant is not a NULL pointer, so a caller must
X *		cast a NULL constant to a pointer: (char *)NULL
X *
X *	returns pointer past last character (to '\0' byte)
X *
X *	Copyright (c) 1985, 1989, 1995-2003 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/varargs.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X/* VARARGS3 */
X#ifdef	PROTOTYPES
XEXPORT char *
Xstrcatl(char *to, ...)
X#else
XEXPORT char *
Xstrcatl(to, va_alist)
X	char *to;
X	va_dcl
X#endif
X{
X		va_list	args;
X	register char	*p;
X	register char	*tor = to;
X
X#ifdef	PROTOTYPES
X	va_start(args, to);
X#else
X	va_start(args);
X#endif
X	while ((p = va_arg(args, char *)) != NULL) {
X		while ((*tor = *p++) != '\0') {
X			tor++;
X		}
X	}
X	*tor = '\0';
X	va_end(args);
X	return (tor);
X}
END-of-star-1.5.2/lib/strcatl.c
echo x - star-1.5.2/lib/streql.c
sed 's/^X//' >star-1.5.2/lib/streql.c << 'END-of-star-1.5.2/lib/streql.c'
X/* @(#)streql.c	1.10 09/06/07 Copyright 1985, 1995-2009 J. Schilling */
X/*
X *	Check if two strings are equal
X *
X *	Copyright (c) 1985, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/schily.h>
X
XEXPORT int
Xstreql(a, b)
X	const char	*a;
X	const char	*b;
X{
X	register const char	*s1 = a;
X	register const char	*s2 = b;
X
X	if (s1 == NULL || s2 ==  NULL)
X		return (FALSE);
X
X	if (s1 == s2)
X		return (TRUE);
X
X	while (*s1 == *s2++)
X		if (*s1++ == '\0')
X			return (TRUE);
X
X	return (FALSE);
X}
END-of-star-1.5.2/lib/streql.c
echo x - star-1.5.2/lib/strtod.c
sed 's/^X//' >star-1.5.2/lib/strtod.c << 'END-of-star-1.5.2/lib/strtod.c'
X/* @(#)strtod.c	1.5 10/08/21 joerg */
X
X/*	$NetBSD: strtod.c,v 1.23 1996/10/13 00:07:55 christos Exp $	*/
X/*
X *	The layout for this file was done by AT&T, we did not change it.
X *	Switch off cstyle(1) checks for now.
X */
X/* BEGIN CSTYLED */
X
X/****************************************************************
X *
X * The author of this software is David M. Gay.
X *
X * Copyright (c) 1991 by AT&T.
X *
X * Permission to use, copy, modify, and distribute this software for any
X * purpose without fee is hereby granted, provided that this entire notice
X * is included in all copies of any software which is or includes a copy
X * or modification of this software and in all copies of the supporting
X * documentation for such software.
X *
X * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
X * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
X * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
X * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
X *
X ***************************************************************/
X
X/* Please send bug reports to
X	David M. Gay
X	AT&T Bell Laboratories, Room 2C-463
X	600 Mountain Avenue
X	Murray Hill, NJ 07974-2070
X	U.S.A.
X	dmg@research.att.com or research!dmg
X */
X
X/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
X *
X * This strtod returns a nearest machine number to the input decimal
X * string (or sets errno to ERANGE).  With IEEE arithmetic, ties are
X * broken by the IEEE round-even rule.  Otherwise ties are broken by
X * biased rounding (add half and chop).
X *
X * Inspired loosely by William D. Clinger's paper "How to Read Floating
X * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101].
X *
X * Modifications:
X *
X *	1. We only require IEEE, IBM, or VAX double-precision
X *		arithmetic (not IEEE double-extended).
X *	2. We get by with floating-point arithmetic in a case that
X *		Clinger missed -- when we're computing d * 10^n
X *		for a small integer d and the integer n is not too
X *		much larger than 22 (the maximum integer k for which
X *		we can represent 10^k exactly), we may be able to
X *		compute (d*10^k) * 10^(e-k) with just one roundoff.
X *	3. Rather than a bit-at-a-time adjustment of the binary
X *		result in the hard case, we use floating-point
X *		arithmetic to determine the adjustment to within
X *		one bit; only in really hard cases do we need to
X *		compute a second residual.
X *	4. Because of 3., we don't need a large table of powers of 10
X *		for ten-to-e (just some small tables, e.g. of 10^k
X *		for 0 <= k <= 22).
X */
X
X/*
X * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least
X *	significant byte has the lowest address.
X * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most
X *	significant byte has the lowest address.
X * #define Long int on machines with 32-bit ints and 64-bit longs.
X * #define Sudden_Underflow for IEEE-format machines without gradual
X *	underflow (i.e., that flush to zero on underflow).
X * #define IBM for IBM mainframe-style floating-point arithmetic.
X * #define VAX for VAX-style floating-point arithmetic.
X * #define Unsigned_Shifts if >> does treats its left operand as unsigned.
X * #define No_leftright to omit left-right logic in fast floating-point
X *	computation of dtoa.
X * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3.
X * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
X *	that use extended-precision instructions to compute rounded
X *	products and quotients) with IBM.
X * #define ROUND_BIASED for IEEE-format with biased rounding.
X * #define Inaccurate_Divide for IEEE-format with correctly rounded
X *	products but inaccurate quotients, e.g., for Intel i860.
X * #define Just_16 to store 16 bits per 32-bit Long when doing high-precision
X *	integer arithmetic.  Whether this speeds things up or slows things
X *	down depends on the machine and the number being converted.
X * #define KR_headers for old-style C function headers.
X * #define Bad_float_h if your system lacks a float.h or if it does not
X *	define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
X *	FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
X * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
X *	if memory is available and otherwise does something you deem
X *	appropriate.  If MALLOC is undefined, malloc will be invoked
X *	directly -- and assumed always to succeed.
X */
X
X#if defined(LIBC_SCCS) && !defined(lint)
Xstatic char *rcsid = "$NetBSD: strtod.c,v 1.23 1996/10/13 00:07:55 christos Exp $";
X#endif /* LIBC_SCCS and not lint */
X
X#include <schily/mconfig.h>
X#include <schily/btorder.h>
X
X#ifdef	__OLD_NETBSD_DEFINES__
X
X#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
X    defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
X    defined(__powerpc__)
X#include <sys/types.h>
X#if BYTE_ORDER == BIG_ENDIAN
X#define IEEE_BIG_ENDIAN
X#else
X#define IEEE_LITTLE_ENDIAN
X#endif
X#endif
X
X#else	/* __OLD_NETBSD_DEFINES__ */
X
X#if !defined(__arm32__) && !defined(vax) && !defined(IBM)
X
X/*#ifdef	_BIG_ENDIAN*/
X#ifdef	WORDS_BIGENDIAN
X#define IEEE_BIG_ENDIAN
X#else
X#define IEEE_LITTLE_ENDIAN
X#endif
X
X#endif	/* !defined(__arm32__) && !defined(vax) && !defined(IBM) */
X
X#endif	/* __OLD_NETBSD_DEFINES__ */
X
X#ifdef __arm32__
X/*
X * Although the CPU is little endian the FP has different
X * byte and word endianness. The byte order is still little endian
X * but the word order is big endian.
X */
X#define IEEE_BIG_ENDIAN
X#endif
X
X#ifdef vax
X#define VAX
X#endif
X
X#include <schily/utypes.h>
X#define Long	Int32_t
X#define ULong	UInt32_t
X
X#ifdef DEBUG
X#include <schily/stdio.h>
X#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
X#endif
X
X#ifdef __cplusplus
X#include "malloc.h"
X#include "memory.h"
X#else
X#ifndef KR_headers
X#include "stdlib.h"
X#include "string.h"
X#include "locale.h"
X#else
X#include "malloc.h"
X#include "memory.h"
X#endif
X#endif
X
X#ifdef MALLOC
X#ifdef KR_headers
Xextern char *MALLOC();
X#else
Xextern void *MALLOC(size_t);
X#endif
X#else
X#define MALLOC malloc
X#endif
X
X#include <schily/ctype.h>
X#include <schily/errno.h>
X
X#ifdef Bad_float_h
X#undef __STDC__
X#ifdef IEEE_BIG_ENDIAN
X#define IEEE_ARITHMETIC
X#endif
X#ifdef IEEE_LITTLE_ENDIAN
X#define IEEE_ARITHMETIC
X#endif
X
X#ifdef IEEE_ARITHMETIC
X#define DBL_DIG 15
X#define DBL_MAX_10_EXP 308
X#define DBL_MAX_EXP 1024
X#define FLT_RADIX 2
X#define FLT_ROUNDS 1
X#define DBL_MAX 1.7976931348623157e+308
X#endif
X
X#ifdef IBM
X#define DBL_DIG 16
X#define DBL_MAX_10_EXP 75
X#define DBL_MAX_EXP 63
X#define FLT_RADIX 16
X#define FLT_ROUNDS 0
X#define DBL_MAX 7.2370055773322621e+75
X#endif
X
X#ifdef VAX
X#define DBL_DIG 16
X#define DBL_MAX_10_EXP 38
X#define DBL_MAX_EXP 127
X#define FLT_RADIX 2
X#define FLT_ROUNDS 1
X#define DBL_MAX 1.7014118346046923e+38
X#endif
X
X#ifndef LONG_MAX
X#define LONG_MAX 2147483647
X#endif
X
X#else	/* Bad_float_h */
X#include <schily/float.h>
X#endif	/* Bad_float_h */
X/*#ifndef __MATH_H__*/
X#include <schily/math.h>
X/*#endif*/
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
X#ifndef CONST
X#ifdef KR_headers
X#define CONST /* blank */
X#else
X#define CONST const
X#endif
X#endif
X
X#ifdef Unsigned_Shifts
X#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000;
X#else
X#define Sign_Extend(a,b) /*no-op*/
X#endif
X
X#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + \
X    defined(IBM) != 1
XExactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
XIBM should be defined.
X#endif
X
X#ifdef IEEE_LITTLE_ENDIAN
X#define word0(x) ((ULong *)&x)[1]
X#define word1(x) ((ULong *)&x)[0]
X#else
X#define word0(x) ((ULong *)&x)[0]
X#define word1(x) ((ULong *)&x)[1]
X#endif
X
X/* The following definition of Storeinc is appropriate for MIPS processors.
X * An alternative that might be better on some machines is
X * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
X */
X#if defined(IEEE_LITTLE_ENDIAN) + defined(VAX) + defined(__arm32__)
X#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
X((unsigned short *)a)[0] = (unsigned short)c, a++)
X#else
X#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
X((unsigned short *)a)[1] = (unsigned short)c, a++)
X#endif
X
X/* #define P DBL_MANT_DIG */
X/* Ten_pmax = floor(P*log(2)/log(5)) */
X/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */
X/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */
X/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */
X
X#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN)
X#define Exp_shift  20
X#define Exp_shift1 20
X#define Exp_msk1    0x100000
X#define Exp_msk11   0x100000
X#define Exp_mask  0x7ff00000
X#define P 53
X#define Bias 1023
X#define IEEE_Arith
X#define Emin (-1022)
X#define Exp_1  0x3ff00000
X#define Exp_11 0x3ff00000
X#define Ebits 11
X#define Frac_mask  0xfffff
X#define Frac_mask1 0xfffff
X#define Ten_pmax 22
X#define Bletch 0x10
X#define Bndry_mask  0xfffff
X#define Bndry_mask1 0xfffff
X#define LSB 1
X#define Sign_bit 0x80000000
X#define Log2P 1
X#define Tiny0 0
X#define Tiny1 1
X#define Quick_max 14
X#define Int_max 14
X#define Infinite(x) (word0(x) == 0x7ff00000) /* sufficient test for here */
X#else
X#undef  Sudden_Underflow
X#define Sudden_Underflow
X#ifdef IBM
X#define Exp_shift  24
X#define Exp_shift1 24
X#define Exp_msk1   0x1000000
X#define Exp_msk11  0x1000000
X#define Exp_mask  0x7f000000
X#define P 14
X#define Bias 65
X#define Exp_1  0x41000000
X#define Exp_11 0x41000000
X#define Ebits 8	/* exponent has 7 bits, but 8 is the right value in b2d */
X#define Frac_mask  0xffffff
X#define Frac_mask1 0xffffff
X#define Bletch 4
X#define Ten_pmax 22
X#define Bndry_mask  0xefffff
X#define Bndry_mask1 0xffffff
X#define LSB 1
X#define Sign_bit 0x80000000
X#define Log2P 4
X#define Tiny0 0x100000
X#define Tiny1 0
X#define Quick_max 14
X#define Int_max 15
X#else /* VAX */
X#define Exp_shift  23
X#define Exp_shift1 7
X#define Exp_msk1    0x80
X#define Exp_msk11   0x800000
X#define Exp_mask  0x7f80
X#define P 56
X#define Bias 129
X#define Exp_1  0x40800000
X#define Exp_11 0x4080
X#define Ebits 8
X#define Frac_mask  0x7fffff
X#define Frac_mask1 0xffff007f
X#define Ten_pmax 24
X#define Bletch 2
X#define Bndry_mask  0xffff007f
X#define Bndry_mask1 0xffff007f
X#define LSB 0x10000
X#define Sign_bit 0x8000
X#define Log2P 1
X#define Tiny0 0x80
X#define Tiny1 0
X#define Quick_max 15
X#define Int_max 15
X#endif
X#endif
X
X#ifndef IEEE_Arith
X#define ROUND_BIASED
X#endif
X
X#ifdef RND_PRODQUOT
X#define rounded_product(a,b) a = rnd_prod(a, b)
X#define rounded_quotient(a,b) a = rnd_quot(a, b)
X#ifdef KR_headers
Xextern double rnd_prod(), rnd_quot();
X#else
Xextern double rnd_prod(double, double), rnd_quot(double, double);
X#endif
X#else
X#define rounded_product(a,b) a *= b
X#define rounded_quotient(a,b) a /= b
X#endif
X
X#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))
X#define Big1 0xffffffff
X
X#ifndef Just_16
X/* When Pack_32 is not defined, we store 16 bits per 32-bit Long.
X * This makes some inner loops simpler and sometimes saves work
X * during multiplications, but it often seems to make things slightly
X * slower.  Hence the default is now to store 32 bits per Long.
X */
X#ifndef Pack_32
X#define Pack_32
X#endif
X#endif
X
X#define Kmax 15
X
X#ifdef __cplusplus
Xextern "C" double strtod(const char *s00, char **se);
Xextern "C" char *__dtoa(double d, int mode, int ndigits,
X			int *decpt, int *sign, char **rve);
X#endif
X
X struct
XBigint {
X	struct Bigint *next;
X	int k, maxwds, sign, wds;
X	ULong x[1];
X	};
X
X typedef struct Bigint Bigint;
X
X static Bigint *freelist[Kmax+1];
X
X static Bigint *
XBalloc
X#ifdef KR_headers
X	(k) int k;
X#else
X	(int k)
X#endif
X{
X	int x;
X	Bigint *rv;
X
X	if (rv = freelist[k]) {
X		freelist[k] = rv->next;
X		}
X	else {
X		x = 1 << k;
X		rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(Long));
X		rv->k = k;
X		rv->maxwds = x;
X		}
X	rv->sign = rv->wds = 0;
X	return rv;
X	}
X
X static void
XBfree
X#ifdef KR_headers
X	(v) Bigint *v;
X#else
X	(Bigint *v)
X#endif
X{
X	if (v) {
X		v->next = freelist[v->k];
X		freelist[v->k] = v;
X		}
X	}
X
X#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \
Xy->wds*sizeof(Long) + 2*sizeof(int))
X
X static Bigint *
Xmultadd
X#ifdef KR_headers
X	(b, m, a) Bigint *b; int m, a;
X#else
X	(Bigint *b, int m, int a)	/* multiply by m and add a */
X#endif
X{
X	int i, wds;
X	ULong *x, y;
X#ifdef Pack_32
X	ULong xi, z;
X#endif
X	Bigint *b1;
X
X	wds = b->wds;
X	x = b->x;
X	i = 0;
X	do {
X#ifdef Pack_32
X		xi = *x;
X		y = (xi & 0xffff) * m + a;
X		z = (xi >> 16) * m + (y >> 16);
X		a = (int)(z >> 16);
X		*x++ = (z << 16) + (y & 0xffff);
X#else
X		y = *x * m + a;
X		a = (int)(y >> 16);
X		*x++ = y & 0xffff;
X#endif
X		}
X		while(++i < wds);
X	if (a) {
X		if (wds >= b->maxwds) {
X			b1 = Balloc(b->k+1);
X			Bcopy(b1, b);
X			Bfree(b);
X			b = b1;
X			}
X		b->x[wds++] = a;
X		b->wds = wds;
X		}
X	return b;
X	}
X
X static Bigint *
Xs2b
X#ifdef KR_headers
X	(s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9;
X#else
X	(CONST char *s, int nd0, int nd, ULong y9)
X#endif
X{
X	Bigint *b;
X	int i, k;
X	Long x, y;
X
X	x = (nd + 8) / 9;
X	for(k = 0, y = 1; x > y; y <<= 1, k++) ;
X#ifdef Pack_32
X	b = Balloc(k);
X	b->x[0] = y9;
X	b->wds = 1;
X#else
X	b = Balloc(k+1);
X	b->x[0] = y9 & 0xffff;
X	b->wds = (b->x[1] = y9 >> 16) ? 2 : 1;
X#endif
X
X	i = 9;
X	if (9 < nd0) {
X		s += 9;
X		do b = multadd(b, 10, *s++ - '0');
X			while(++i < nd0);
X		s++;
X		}
X	else
X		s += 10;
X	for(; i < nd; i++)
X		b = multadd(b, 10, *s++ - '0');
X	return b;
X	}
X
X static int
Xhi0bits
X#ifdef KR_headers
X	(x) register ULong x;
X#else
X	(register ULong x)
X#endif
X{
X	register int k = 0;
X
X	if (!(x & 0xffff0000)) {
X		k = 16;
X		x <<= 16;
X		}
X	if (!(x & 0xff000000)) {
X		k += 8;
X		x <<= 8;
X		}
X	if (!(x & 0xf0000000)) {
X		k += 4;
X		x <<= 4;
X		}
X	if (!(x & 0xc0000000)) {
X		k += 2;
X		x <<= 2;
X		}
X	if (!(x & 0x80000000)) {
X		k++;
X		if (!(x & 0x40000000))
X			return 32;
X		}
X	return k;
X	}
X
X static int
Xlo0bits
X#ifdef KR_headers
X	(y) ULong *y;
X#else
X	(ULong *y)
X#endif
X{
X	register int k;
X	register ULong x = *y;
X
X	if (x & 7) {
X		if (x & 1)
X			return 0;
X		if (x & 2) {
X			*y = x >> 1;
X			return 1;
X			}
X		*y = x >> 2;
X		return 2;
X		}
X	k = 0;
X	if (!(x & 0xffff)) {
X		k = 16;
X		x >>= 16;
X		}
X	if (!(x & 0xff)) {
X		k += 8;
X		x >>= 8;
X		}
X	if (!(x & 0xf)) {
X		k += 4;
X		x >>= 4;
X		}
X	if (!(x & 0x3)) {
X		k += 2;
X		x >>= 2;
X		}
X	if (!(x & 1)) {
X		k++;
X		x >>= 1;
X		if (!x & 1)
X			return 32;
X		}
X	*y = x;
X	return k;
X	}
X
X static Bigint *
Xi2b
X#ifdef KR_headers
X	(i) int i;
X#else
X	(int i)
X#endif
X{
X	Bigint *b;
X
X	b = Balloc(1);
X	b->x[0] = i;
X	b->wds = 1;
X	return b;
X	}
X
X static Bigint *
Xmult
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	Bigint *c;
X	int k, wa, wb, wc;
X	ULong carry, y, z;
X	ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
X#ifdef Pack_32
X	ULong z2;
X#endif
X
X	if (a->wds < b->wds) {
X		c = a;
X		a = b;
X		b = c;
X		}
X	k = a->k;
X	wa = a->wds;
X	wb = b->wds;
X	wc = wa + wb;
X	if (wc > a->maxwds)
X		k++;
X	c = Balloc(k);
X	for(x = c->x, xa = x + wc; x < xa; x++)
X		*x = 0;
X	xa = a->x;
X	xae = xa + wa;
X	xb = b->x;
X	xbe = xb + wb;
X	xc0 = c->x;
X#ifdef Pack_32
X	for(; xb < xbe; xb++, xc0++) {
X		if (y = *xb & 0xffff) {
X			x = xa;
X			xc = xc0;
X			carry = 0;
X			do {
X				z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;
X				carry = z >> 16;
X				z2 = (*x++ >> 16) * y + (*xc >> 16) + carry;
X				carry = z2 >> 16;
X				Storeinc(xc, z2, z);
X				}
X				while(x < xae);
X			*xc = carry;
X			}
X		if (y = *xb >> 16) {
X			x = xa;
X			xc = xc0;
X			carry = 0;
X			z2 = *xc;
X			do {
X				z = (*x & 0xffff) * y + (*xc >> 16) + carry;
X				carry = z >> 16;
X				Storeinc(xc, z, z2);
X				z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;
X				carry = z2 >> 16;
X				}
X				while(x < xae);
X			*xc = z2;
X			}
X		}
X#else
X	for(; xb < xbe; xc0++) {
X		if (y = *xb++) {
X			x = xa;
X			xc = xc0;
X			carry = 0;
X			do {
X				z = *x++ * y + *xc + carry;
X				carry = z >> 16;
X				*xc++ = z & 0xffff;
X				}
X				while(x < xae);
X			*xc = carry;
X			}
X		}
X#endif
X	for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
X	c->wds = wc;
X	return c;
X	}
X
X static Bigint *p5s;
X
X static Bigint *
Xpow5mult
X#ifdef KR_headers
X	(b, k) Bigint *b; int k;
X#else
X	(Bigint *b, int k)
X#endif
X{
X	Bigint *b1, *p5, *p51;
X	int i;
X	static int p05[3] = { 5, 25, 125 };
X
X	if (i = k & 3)
X		b = multadd(b, p05[i-1], 0);
X
X	if (!(k >>= 2))
X		return b;
X	if (!(p5 = p5s)) {
X		/* first time */
X		p5 = p5s = i2b(625);
X		p5->next = 0;
X		}
X	for(;;) {
X		if (k & 1) {
X			b1 = mult(b, p5);
X			Bfree(b);
X			b = b1;
X			}
X		if (!(k >>= 1))
X			break;
X		if (!(p51 = p5->next)) {
X			p51 = p5->next = mult(p5,p5);
X			p51->next = 0;
X			}
X		p5 = p51;
X		}
X	return b;
X	}
X
X static Bigint *
Xlshift
X#ifdef KR_headers
X	(b, k) Bigint *b; int k;
X#else
X	(Bigint *b, int k)
X#endif
X{
X	int i, k1, n, n1;
X	Bigint *b1;
X	ULong *x, *x1, *xe, z;
X
X#ifdef Pack_32
X	n = k >> 5;
X#else
X	n = k >> 4;
X#endif
X	k1 = b->k;
X	n1 = n + b->wds + 1;
X	for(i = b->maxwds; n1 > i; i <<= 1)
X		k1++;
X	b1 = Balloc(k1);
X	x1 = b1->x;
X	for(i = 0; i < n; i++)
X		*x1++ = 0;
X	x = b->x;
X	xe = x + b->wds;
X#ifdef Pack_32
X	if (k &= 0x1f) {
X		k1 = 32 - k;
X		z = 0;
X		do {
X			*x1++ = *x << k | z;
X			z = *x++ >> k1;
X			}
X			while(x < xe);
X		if (*x1 = z)
X			++n1;
X		}
X#else
X	if (k &= 0xf) {
X		k1 = 16 - k;
X		z = 0;
X		do {
X			*x1++ = *x << k  & 0xffff | z;
X			z = *x++ >> k1;
X			}
X			while(x < xe);
X		if (*x1 = z)
X			++n1;
X		}
X#endif
X	else do
X		*x1++ = *x++;
X		while(x < xe);
X	b1->wds = n1 - 1;
X	Bfree(b);
X	return b1;
X	}
X
X static int
Xcmp
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	ULong *xa, *xa0, *xb, *xb0;
X	int i, j;
X
X	i = a->wds;
X	j = b->wds;
X#ifdef DEBUG
X	if (i > 1 && !a->x[i-1])
X		Bug("cmp called with a->x[a->wds-1] == 0");
X	if (j > 1 && !b->x[j-1])
X		Bug("cmp called with b->x[b->wds-1] == 0");
X#endif
X	if (i -= j)
X		return i;
X	xa0 = a->x;
X	xa = xa0 + j;
X	xb0 = b->x;
X	xb = xb0 + j;
X	for(;;) {
X		if (*--xa != *--xb)
X			return *xa < *xb ? -1 : 1;
X		if (xa <= xa0)
X			break;
X		}
X	return 0;
X	}
X
X static Bigint *
Xdiff
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	Bigint *c;
X	int i, wa, wb;
X	Long borrow, y;	/* We need signed shifts here. */
X	ULong *xa, *xae, *xb, *xbe, *xc;
X#ifdef Pack_32
X	Long z;
X#endif
X
X	i = cmp(a,b);
X	if (!i) {
X		c = Balloc(0);
X		c->wds = 1;
X		c->x[0] = 0;
X		return c;
X		}
X	if (i < 0) {
X		c = a;
X		a = b;
X		b = c;
X		i = 1;
X		}
X	else
X		i = 0;
X	c = Balloc(a->k);
X	c->sign = i;
X	wa = a->wds;
X	xa = a->x;
X	xae = xa + wa;
X	wb = b->wds;
X	xb = b->x;
X	xbe = xb + wb;
X	xc = c->x;
X	borrow = 0;
X#ifdef Pack_32
X	do {
X		y = (*xa & 0xffff) - (*xb & 0xffff) + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		z = (*xa++ >> 16) - (*xb++ >> 16) + borrow;
X		borrow = z >> 16;
X		Sign_Extend(borrow, z);
X		Storeinc(xc, z, y);
X		}
X		while(xb < xbe);
X	while(xa < xae) {
X		y = (*xa & 0xffff) + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		z = (*xa++ >> 16) + borrow;
X		borrow = z >> 16;
X		Sign_Extend(borrow, z);
X		Storeinc(xc, z, y);
X		}
X#else
X	do {
X		y = *xa++ - *xb++ + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		*xc++ = y & 0xffff;
X		}
X		while(xb < xbe);
X	while(xa < xae) {
X		y = *xa++ + borrow;
X		borrow = y >> 16;
X		Sign_Extend(borrow, y);
X		*xc++ = y & 0xffff;
X		}
X#endif
X	while(!*--xc)
X		wa--;
X	c->wds = wa;
X	return c;
X	}
X
X static double
Xulp
X#ifdef KR_headers
X	(x) double x;
X#else
X	(double x)
X#endif
X{
X	register Long L;
X	double a;
X
X	L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
X#ifndef Sudden_Underflow
X	if (L > 0) {
X#endif
X#ifdef IBM
X		L |= Exp_msk1 >> 4;
X#endif
X		word0(a) = L;
X		word1(a) = 0;
X#ifndef Sudden_Underflow
X		}
X	else {
X		L = -L >> Exp_shift;
X		if (L < Exp_shift) {
X			word0(a) = 0x80000 >> L;
X			word1(a) = 0;
X			}
X		else {
X			word0(a) = 0;
X			L -= Exp_shift;
X			word1(a) = L >= 31 ? 1 : 1 << 31 - L;
X			}
X		}
X#endif
X	return a;
X	}
X
X static double
Xb2d
X#ifdef KR_headers
X	(a, e) Bigint *a; int *e;
X#else
X	(Bigint *a, int *e)
X#endif
X{
X	ULong *xa, *xa0, w, y, z;
X	int k;
X	double d;
X#ifdef VAX
X	ULong d0, d1;
X#else
X#define d0 word0(d)
X#define d1 word1(d)
X#endif
X
X	xa0 = a->x;
X	xa = xa0 + a->wds;
X	y = *--xa;
X#ifdef DEBUG
X	if (!y) Bug("zero y in b2d");
X#endif
X	k = hi0bits(y);
X	*e = 32 - k;
X#ifdef Pack_32
X	if (k < Ebits) {
X		d0 = Exp_1 | y >> Ebits - k;
X		w = xa > xa0 ? *--xa : 0;
X		d1 = y << (32-Ebits) + k | w >> Ebits - k;
X		goto ret_d;
X		}
X	z = xa > xa0 ? *--xa : 0;
X	if (k -= Ebits) {
X		d0 = Exp_1 | y << k | z >> 32 - k;
X		y = xa > xa0 ? *--xa : 0;
X		d1 = z << k | y >> 32 - k;
X		}
X	else {
X		d0 = Exp_1 | y;
X		d1 = z;
X		}
X#else
X	if (k < Ebits + 16) {
X		z = xa > xa0 ? *--xa : 0;
X		d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
X		w = xa > xa0 ? *--xa : 0;
X		y = xa > xa0 ? *--xa : 0;
X		d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
X		goto ret_d;
X		}
X	z = xa > xa0 ? *--xa : 0;
X	w = xa > xa0 ? *--xa : 0;
X	k -= Ebits + 16;
X	d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
X	y = xa > xa0 ? *--xa : 0;
X	d1 = w << k + 16 | y << k;
X#endif
X ret_d:
X#ifdef VAX
X	word0(d) = d0 >> 16 | d0 << 16;
X	word1(d) = d1 >> 16 | d1 << 16;
X#else
X#undef d0
X#undef d1
X#endif
X	return d;
X	}
X
X static Bigint *
Xd2b
X#ifdef KR_headers
X	(d, e, bits) double d; int *e, *bits;
X#else
X	(double d, int *e, int *bits)
X#endif
X{
X	Bigint *b;
X	int de, i, k;
X	ULong *x, y, z;
X#ifdef VAX
X	ULong d0, d1;
X	d0 = word0(d) >> 16 | word0(d) << 16;
X	d1 = word1(d) >> 16 | word1(d) << 16;
X#else
X#define d0 word0(d)
X#define d1 word1(d)
X#endif
X
X#ifdef Pack_32
X	b = Balloc(1);
X#else
X	b = Balloc(2);
X#endif
X	x = b->x;
X
X	z = d0 & Frac_mask;
X	d0 &= 0x7fffffff;	/* clear sign bit, which we ignore */
X#ifdef Sudden_Underflow
X	de = (int)(d0 >> Exp_shift);
X#ifndef IBM
X	z |= Exp_msk11;
X#endif
X#else
X	if (de = (int)(d0 >> Exp_shift))
X		z |= Exp_msk1;
X#endif
X#ifdef Pack_32
X	if (y = d1) {
X		if (k = lo0bits(&y)) {
X			x[0] = y | z << 32 - k;
X			z >>= k;
X			}
X		else
X			x[0] = y;
X		i = b->wds = (x[1] = z) ? 2 : 1;
X		}
X	else {
X#ifdef DEBUG
X		if (!z)
X			Bug("Zero passed to d2b");
X#endif
X		k = lo0bits(&z);
X		x[0] = z;
X		i = b->wds = 1;
X		k += 32;
X		}
X#else
X	if (y = d1) {
X		if (k = lo0bits(&y))
X			if (k >= 16) {
X				x[0] = y | z << 32 - k & 0xffff;
X				x[1] = z >> k - 16 & 0xffff;
X				x[2] = z >> k;
X				i = 2;
X				}
X			else {
X				x[0] = y & 0xffff;
X				x[1] = y >> 16 | z << 16 - k & 0xffff;
X				x[2] = z >> k & 0xffff;
X				x[3] = z >> k+16;
X				i = 3;
X				}
X		else {
X			x[0] = y & 0xffff;
X			x[1] = y >> 16;
X			x[2] = z & 0xffff;
X			x[3] = z >> 16;
X			i = 3;
X			}
X		}
X	else {
X#ifdef DEBUG
X		if (!z)
X			Bug("Zero passed to d2b");
X#endif
X		k = lo0bits(&z);
X		if (k >= 16) {
X			x[0] = z;
X			i = 0;
X			}
X		else {
X			x[0] = z & 0xffff;
X			x[1] = z >> 16;
X			i = 1;
X			}
X		k += 32;
X		}
X	while(!x[i])
X		--i;
X	b->wds = i + 1;
X#endif
X#ifndef Sudden_Underflow
X	if (de) {
X#endif
X#ifdef IBM
X		*e = (de - Bias - (P-1) << 2) + k;
X		*bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
X#else
X		*e = de - Bias - (P-1) + k;
X		*bits = P - k;
X#endif
X#ifndef Sudden_Underflow
X		}
X	else {
X		*e = de - Bias - (P-1) + 1 + k;
X#ifdef Pack_32
X		*bits = 32*i - hi0bits(x[i-1]);
X#else
X		*bits = (i+2)*16 - hi0bits(x[i]);
X#endif
X		}
X#endif
X	return b;
X	}
X#undef d0
X#undef d1
X
X static double
Xratio
X#ifdef KR_headers
X	(a, b) Bigint *a, *b;
X#else
X	(Bigint *a, Bigint *b)
X#endif
X{
X	double da, db;
X	int k, ka, kb;
X
X	da = b2d(a, &ka);
X	db = b2d(b, &kb);
X#ifdef Pack_32
X	k = ka - kb + 32*(a->wds - b->wds);
X#else
X	k = ka - kb + 16*(a->wds - b->wds);
X#endif
X#ifdef IBM
X	if (k > 0) {
X		word0(da) += (k >> 2)*Exp_msk1;
X		if (k &= 3)
X			da *= 1 << k;
X		}
X	else {
X		k = -k;
X		word0(db) += (k >> 2)*Exp_msk1;
X		if (k &= 3)
X			db *= 1 << k;
X		}
X#else
X	if (k > 0)
X		word0(da) += k*Exp_msk1;
X	else {
X		k = -k;
X		word0(db) += k*Exp_msk1;
X		}
X#endif
X	return da / db;
X	}
X
Xstatic CONST double
Xtens[] = {
X		1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
X		1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
X		1e20, 1e21, 1e22
X#ifdef VAX
X		, 1e23, 1e24
X#endif
X		};
X
X#ifdef IEEE_Arith
Xstatic CONST double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
Xstatic CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 };
X#define n_bigtens 5
X#else
X#ifdef IBM
Xstatic CONST double bigtens[] = { 1e16, 1e32, 1e64 };
Xstatic CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 };
X#define n_bigtens 3
X#else
Xstatic CONST double bigtens[] = { 1e16, 1e32 };
Xstatic CONST double tinytens[] = { 1e-16, 1e-32 };
X#define n_bigtens 2
X#endif
X#endif
X
X double
Xstrtod
X#ifdef KR_headers
X	(s00, se) CONST char *s00; char **se;
X#else
X	(CONST char *s00, char **se)
X#endif
X{
X	int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
X		 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
X	CONST char *s, *s0, *s1;
X	double aadj, aadj1, adj, rv, rv0;
X	Long L;
X	ULong y, z;
X	Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
X
X#ifndef KR_headers
X	CONST char decimal_point = localeconv()->decimal_point[0];
X#else
X	CONST char decimal_point = '.';
X#endif
X
X	sign = nz0 = nz = 0;
X	rv = 0.;
X
X
X	for(s = s00; isspace((unsigned char) *s); s++)
X		;
X
X	if (*s == '-') {
X		sign = 1;
X		s++;
X	} else if (*s == '+') {
X		s++;
X	}
X
X	if (*s == '\0') {
X		s = s00;
X		goto ret;
X	}
X
X	if (*s == '0') {
X		nz0 = 1;
X		while(*++s == '0') ;
X		if (!*s)
X			goto ret;
X		}
X	s0 = s;
X	y = z = 0;
X	for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
X		if (nd < 9)
X			y = 10*y + c - '0';
X		else if (nd < 16)
X			z = 10*z + c - '0';
X	nd0 = nd;
X	if (c == decimal_point) {
X		c = *++s;
X		if (!nd) {
X			for(; c == '0'; c = *++s)
X				nz++;
X			if (c > '0' && c <= '9') {
X				s0 = s;
X				nf += nz;
X				nz = 0;
X				goto have_dig;
X				}
X			goto dig_done;
X			}
X		for(; c >= '0' && c <= '9'; c = *++s) {
X have_dig:
X			nz++;
X			if (c -= '0') {
X				nf += nz;
X				for(i = 1; i < nz; i++)
X					if (nd++ < 9)
X						y *= 10;
X					else if (nd <= DBL_DIG + 1)
X						z *= 10;
X				if (nd++ < 9)
X					y = 10*y + c;
X				else if (nd <= DBL_DIG + 1)
X					z = 10*z + c;
X				nz = 0;
X				}
X			}
X		}
X dig_done:
X	e = 0;
X	if (c == 'e' || c == 'E') {
X		if (!nd && !nz && !nz0) {
X			s = s00;
X			goto ret;
X			}
X		s00 = s;
X		esign = 0;
X		switch(c = *++s) {
X			case '-':
X				esign = 1;
X			case '+':
X				c = *++s;
X			}
X		if (c >= '0' && c <= '9') {
X			while(c == '0')
X				c = *++s;
X			if (c > '0' && c <= '9') {
X				L = c - '0';
X				s1 = s;
X				while((c = *++s) >= '0' && c <= '9')
X					L = 10*L + c - '0';
X				if (s - s1 > 8 || L > 19999)
X					/* Avoid confusion from exponents
X					 * so large that e might overflow.
X					 */
X					e = 19999; /* safe for 16 bit ints */
X				else
X					e = (int)L;
X				if (esign)
X					e = -e;
X				}
X			else
X				e = 0;
X			}
X		else
X			s = s00;
X		}
X	if (!nd) {
X		if (!nz && !nz0)
X			s = s00;
X		goto ret;
X		}
X	e1 = e -= nf;
X
X	/* Now we have nd0 digits, starting at s0, followed by a
X	 * decimal point, followed by nd-nd0 digits.  The number we're
X	 * after is the integer represented by those digits times
X	 * 10**e */
X
X	if (!nd0)
X		nd0 = nd;
X	k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1;
X	rv = y;
X	if (k > 9)
X		rv = tens[k - 9] * rv + z;
X	bd0 = 0;
X	if (nd <= DBL_DIG
X#ifndef RND_PRODQUOT
X		&& FLT_ROUNDS == 1
X#endif
X			) {
X		if (!e)
X			goto ret;
X		if (e > 0) {
X			if (e <= Ten_pmax) {
X#ifdef VAX
X				goto vax_ovfl_check;
X#else
X				/* rv = */ rounded_product(rv, tens[e]);
X				goto ret;
X#endif
X				}
X			i = DBL_DIG - nd;
X			if (e <= Ten_pmax + i) {
X				/* A fancier test would sometimes let us do
X				 * this for larger i values.
X				 */
X				e -= i;
X				rv *= tens[i];
X#ifdef VAX
X				/* VAX exponent range is so narrow we must
X				 * worry about overflow here...
X				 */
X vax_ovfl_check:
X				word0(rv) -= P*Exp_msk1;
X				/* rv = */ rounded_product(rv, tens[e]);
X				if ((word0(rv) & Exp_mask)
X				 > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
X					goto ovfl;
X				word0(rv) += P*Exp_msk1;
X#else
X				/* rv = */ rounded_product(rv, tens[e]);
X#endif
X				goto ret;
X				}
X			}
X#ifndef Inaccurate_Divide
X		else if (e >= -Ten_pmax) {
X			/* rv = */ rounded_quotient(rv, tens[-e]);
X			goto ret;
X			}
X#endif
X		}
X	e1 += nd - k;
X
X	/* Get starting approximation = rv * 10**e1 */
X
X	if (e1 > 0) {
X		if (i = e1 & 15)
X			rv *= tens[i];
X		if (e1 &= ~15) {
X			if (e1 > DBL_MAX_10_EXP) {
X ovfl:
X				errno = ERANGE;
X#ifdef __STDC__
X				rv = HUGE_VAL;
X#else
X				/* Can't trust HUGE_VAL */
X#ifdef IEEE_Arith
X				word0(rv) = Exp_mask;
X				word1(rv) = 0;
X#else
X				word0(rv) = Big0;
X				word1(rv) = Big1;
X#endif
X#endif
X				if (bd0)
X					goto retfree;
X				goto ret;
X				}
X			if (e1 >>= 4) {
X				for(j = 0; e1 > 1; j++, e1 >>= 1)
X					if (e1 & 1)
X						rv *= bigtens[j];
X			/* The last multiplication could overflow. */
X				word0(rv) -= P*Exp_msk1;
X				rv *= bigtens[j];
X				if ((z = word0(rv) & Exp_mask)
X				 > Exp_msk1*(DBL_MAX_EXP+Bias-P))
X					goto ovfl;
X				if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) {
X					/* set to largest number */
X					/* (Can't trust DBL_MAX) */
X					word0(rv) = Big0;
X					word1(rv) = Big1;
X					}
X				else
X					word0(rv) += P*Exp_msk1;
X				}
X
X			}
X		}
X	else if (e1 < 0) {
X		e1 = -e1;
X		if (i = e1 & 15)
X			rv /= tens[i];
X		if (e1 &= ~15) {
X			e1 >>= 4;
X			if (e1 >= 1 << n_bigtens)
X				goto undfl;
X			for(j = 0; e1 > 1; j++, e1 >>= 1)
X				if (e1 & 1)
X					rv *= tinytens[j];
X			/* The last multiplication could underflow. */
X			rv0 = rv;
X			rv *= tinytens[j];
X			if (!rv) {
X				rv = 2.*rv0;
X				rv *= tinytens[j];
X				if (!rv) {
X undfl:
X					rv = 0.;
X					errno = ERANGE;
X					if (bd0)
X						goto retfree;
X					goto ret;
X					}
X				word0(rv) = Tiny0;
X				word1(rv) = Tiny1;
X				/* The refinement below will clean
X				 * this approximation up.
X				 */
X				}
X			}
X		}
X
X	/* Now the hard part -- adjusting rv to the correct value.*/
X
X	/* Put digits into bd: true value = bd * 10^e */
X
X	bd0 = s2b(s0, nd0, nd, y);
X
X	for(;;) {
X		bd = Balloc(bd0->k);
X		Bcopy(bd, bd0);
X		bb = d2b(rv, &bbe, &bbbits);	/* rv = bb * 2^bbe */
X		bs = i2b(1);
X
X		if (e >= 0) {
X			bb2 = bb5 = 0;
X			bd2 = bd5 = e;
X			}
X		else {
X			bb2 = bb5 = -e;
X			bd2 = bd5 = 0;
X			}
X		if (bbe >= 0)
X			bb2 += bbe;
X		else
X			bd2 -= bbe;
X		bs2 = bb2;
X#ifdef Sudden_Underflow
X#ifdef IBM
X		j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3);
X#else
X		j = P + 1 - bbbits;
X#endif
X#else
X		i = bbe + bbbits - 1;	/* logb(rv) */
X		if (i < Emin)	/* denormal */
X			j = bbe + (P-Emin);
X		else
X			j = P + 1 - bbbits;
X#endif
X		bb2 += j;
X		bd2 += j;
X		i = bb2 < bd2 ? bb2 : bd2;
X		if (i > bs2)
X			i = bs2;
X		if (i > 0) {
X			bb2 -= i;
X			bd2 -= i;
X			bs2 -= i;
X			}
X		if (bb5 > 0) {
X			bs = pow5mult(bs, bb5);
X			bb1 = mult(bs, bb);
X			Bfree(bb);
X			bb = bb1;
X			}
X		if (bb2 > 0)
X			bb = lshift(bb, bb2);
X		if (bd5 > 0)
X			bd = pow5mult(bd, bd5);
X		if (bd2 > 0)
X			bd = lshift(bd, bd2);
X		if (bs2 > 0)
X			bs = lshift(bs, bs2);
X		delta = diff(bb, bd);
X		dsign = delta->sign;
X		delta->sign = 0;
X		i = cmp(delta, bs);
X		if (i < 0) {
X			/* Error is less than half an ulp -- check for
X			 * special case of mantissa a power of two.
X			 */
X			if (dsign || word1(rv) || word0(rv) & Bndry_mask)
X				break;
X			delta = lshift(delta,Log2P);
X			if (cmp(delta, bs) > 0)
X				goto drop_down;
X			break;
X			}
X		if (i == 0) {
X			/* exactly half-way between */
X			if (dsign) {
X				if ((word0(rv) & Bndry_mask1) == Bndry_mask1
X				 &&  word1(rv) == 0xffffffff) {
X					/*boundary case -- increment exponent*/
X					word0(rv) = (word0(rv) & Exp_mask)
X						+ Exp_msk1
X#ifdef IBM
X						| Exp_msk1 >> 4
X#endif
X						;
X					word1(rv) = 0;
X					break;
X					}
X				}
X			else if (!(word0(rv) & Bndry_mask) && !word1(rv)) {
X drop_down:
X				/* boundary case -- decrement exponent */
X#ifdef Sudden_Underflow
X				L = word0(rv) & Exp_mask;
X#ifdef IBM
X				if (L <  Exp_msk1)
X#else
X				if (L <= Exp_msk1)
X#endif
X					goto undfl;
X				L -= Exp_msk1;
X#else
X				L = (word0(rv) & Exp_mask) - Exp_msk1;
X#endif
X				word0(rv) = L | Bndry_mask1;
X				word1(rv) = 0xffffffff;
X#ifdef IBM
X				goto cont;
X#else
X				break;
X#endif
X				}
X#ifndef ROUND_BIASED
X			if (!(word1(rv) & LSB))
X				break;
X#endif
X			if (dsign)
X				rv += ulp(rv);
X#ifndef ROUND_BIASED
X			else {
X				rv -= ulp(rv);
X#ifndef Sudden_Underflow
X				if (!rv)
X					goto undfl;
X#endif
X				}
X#endif
X			break;
X			}
X		if ((aadj = ratio(delta, bs)) <= 2.) {
X			if (dsign)
X				aadj = aadj1 = 1.;
X			else if (word1(rv) || word0(rv) & Bndry_mask) {
X#ifndef Sudden_Underflow
X				if (word1(rv) == Tiny1 && !word0(rv))
X					goto undfl;
X#endif
X				aadj = 1.;
X				aadj1 = -1.;
X				}
X			else {
X				/* special case -- power of FLT_RADIX to be */
X				/* rounded down... */
X
X				if (aadj < 2./FLT_RADIX)
X					aadj = 1./FLT_RADIX;
X				else
X					aadj *= 0.5;
X				aadj1 = -aadj;
X				}
X			}
X		else {
X			aadj *= 0.5;
X			aadj1 = dsign ? aadj : -aadj;
X#ifdef Check_FLT_ROUNDS
X			switch(FLT_ROUNDS) {
X				case 2: /* towards +infinity */
X					aadj1 -= 0.5;
X					break;
X				case 0: /* towards 0 */
X				case 3: /* towards -infinity */
X					aadj1 += 0.5;
X				}
X#else
X			if (FLT_ROUNDS == 0)
X				aadj1 += 0.5;
X#endif
X			}
X		y = word0(rv) & Exp_mask;
X
X		/* Check for overflow */
X
X		if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) {
X			rv0 = rv;
X			word0(rv) -= P*Exp_msk1;
X			adj = aadj1 * ulp(rv);
X			rv += adj;
X			if ((word0(rv) & Exp_mask) >=
X					Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
X				if (word0(rv0) == Big0 && word1(rv0) == Big1)
X					goto ovfl;
X				word0(rv) = Big0;
X				word1(rv) = Big1;
X				goto cont;
X				}
X			else
X				word0(rv) += P*Exp_msk1;
X			}
X		else {
X#ifdef Sudden_Underflow
X			if ((word0(rv) & Exp_mask) <= P*Exp_msk1) {
X				rv0 = rv;
X				word0(rv) += P*Exp_msk1;
X				adj = aadj1 * ulp(rv);
X				rv += adj;
X#ifdef IBM
X				if ((word0(rv) & Exp_mask) <  P*Exp_msk1)
X#else
X				if ((word0(rv) & Exp_mask) <= P*Exp_msk1)
X#endif
X					{
X					if (word0(rv0) == Tiny0
X					 && word1(rv0) == Tiny1)
X						goto undfl;
X					word0(rv) = Tiny0;
X					word1(rv) = Tiny1;
X					goto cont;
X					}
X				else
X					word0(rv) -= P*Exp_msk1;
X				}
X			else {
X				adj = aadj1 * ulp(rv);
X				rv += adj;
X				}
X#else
X			/* Compute adj so that the IEEE rounding rules will
X			 * correctly round rv + adj in some half-way cases.
X			 * If rv * ulp(rv) is denormalized (i.e.,
X			 * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid
X			 * trouble from bits lost to denormalization;
X			 * example: 1.2e-307 .
X			 */
X			if (y <= (P-1)*Exp_msk1 && aadj >= 1.) {
X				aadj1 = (double)(int)(aadj + 0.5);
X				if (!dsign)
X					aadj1 = -aadj1;
X				}
X			adj = aadj1 * ulp(rv);
X			rv += adj;
X#endif
X			}
X		z = word0(rv) & Exp_mask;
X		if (y == z) {
X			/* Can we stop now? */
X			L = aadj;
X			aadj -= L;
X			/* The tolerances below are conservative. */
X			if (dsign || word1(rv) || word0(rv) & Bndry_mask) {
X				if (aadj < .4999999 || aadj > .5000001)
X					break;
X				}
X			else if (aadj < .4999999/FLT_RADIX)
X				break;
X			}
X cont:
X		Bfree(bb);
X		Bfree(bd);
X		Bfree(bs);
X		Bfree(delta);
X		}
X retfree:
X	Bfree(bb);
X	Bfree(bd);
X	Bfree(bs);
X	Bfree(bd0);
X	Bfree(delta);
X ret:
X	if (se)
X		*se = (char *)s;
X	return sign ? -rv : rv;
X	}
X
X static int
Xquorem
X#ifdef KR_headers
X	(b, S) Bigint *b, *S;
X#else
X	(Bigint *b, Bigint *S)
X#endif
X{
X	int n;
X	Long borrow, y;
X	ULong carry, q, ys;
X	ULong *bx, *bxe, *sx, *sxe;
X#ifdef Pack_32
X	Long z;
X	ULong si, zs;
X#endif
X
X	n = S->wds;
X#ifdef DEBUG
X	/*debug*/ if (b->wds > n)
X	/*debug*/	Bug("oversize b in quorem");
X#endif
X	if (b->wds < n)
X		return 0;
X	sx = S->x;
X	sxe = sx + --n;
X	bx = b->x;
X	bxe = bx + n;
X	q = *bxe / (*sxe + 1);	/* ensure q <= true quotient */
X#ifdef DEBUG
X	/*debug*/ if (q > 9)
X	/*debug*/	Bug("oversized quotient in quorem");
X#endif
X	if (q) {
X		borrow = 0;
X		carry = 0;
X		do {
X#ifdef Pack_32
X			si = *sx++;
X			ys = (si & 0xffff) * q + carry;
X			zs = (si >> 16) * q + (ys >> 16);
X			carry = zs >> 16;
X			y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			z = (*bx >> 16) - (zs & 0xffff) + borrow;
X			borrow = z >> 16;
X			Sign_Extend(borrow, z);
X			Storeinc(bx, z, y);
X#else
X			ys = *sx++ * q + carry;
X			carry = ys >> 16;
X			y = *bx - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			*bx++ = y & 0xffff;
X#endif
X			}
X			while(sx <= sxe);
X		if (!*bxe) {
X			bx = b->x;
X			while(--bxe > bx && !*bxe)
X				--n;
X			b->wds = n;
X			}
X		}
X	if (cmp(b, S) >= 0) {
X		q++;
X		borrow = 0;
X		carry = 0;
X		bx = b->x;
X		sx = S->x;
X		do {
X#ifdef Pack_32
X			si = *sx++;
X			ys = (si & 0xffff) + carry;
X			zs = (si >> 16) + (ys >> 16);
X			carry = zs >> 16;
X			y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			z = (*bx >> 16) - (zs & 0xffff) + borrow;
X			borrow = z >> 16;
X			Sign_Extend(borrow, z);
X			Storeinc(bx, z, y);
X#else
X			ys = *sx++ + carry;
X			carry = ys >> 16;
X			y = *bx - (ys & 0xffff) + borrow;
X			borrow = y >> 16;
X			Sign_Extend(borrow, y);
X			*bx++ = y & 0xffff;
X#endif
X			}
X			while(sx <= sxe);
X		bx = b->x;
X		bxe = bx + n;
X		if (!*bxe) {
X			while(--bxe > bx && !*bxe)
X				--n;
X			b->wds = n;
X			}
X		}
X	return q;
X	}
X
X/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
X *
X * Inspired by "How to Print Floating-Point Numbers Accurately" by
X * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101].
X *
X * Modifications:
X *	1. Rather than iterating, we use a simple numeric overestimate
X *	   to determine k = floor(log10(d)).  We scale relevant
X *	   quantities using O(log2(k)) rather than O(k) multiplications.
X *	2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
X *	   try to generate digits strictly left to right.  Instead, we
X *	   compute with fewer bits and propagate the carry if necessary
X *	   when rounding the final digit up.  This is often faster.
X *	3. Under the assumption that input will be rounded nearest,
X *	   mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
X *	   That is, we allow equality in stopping tests when the
X *	   round-nearest rule will give the same floating-point value
X *	   as would satisfaction of the stopping test with strict
X *	   inequality.
X *	4. We remove common factors of powers of 2 from relevant
X *	   quantities.
X *	5. When converting floating-point integers less than 1e16,
X *	   we use floating-point arithmetic rather than resorting
X *	   to multiple-precision integers.
X *	6. When asked to produce fewer than 15 digits, we first try
X *	   to get by with floating-point arithmetic; we resort to
X *	   multiple-precision integer arithmetic only if we cannot
X *	   guarantee that the floating-point calculation has given
X *	   the correctly rounded result.  For k requested digits and
X *	   "uniformly" distributed input, the probability is
X *	   something like 10^(k-15) that we must resort to the Long
X *	   calculation.
X */
X
X char *
X__dtoa
X#ifdef KR_headers
X	(d, mode, ndigits, decpt, sign, rve)
X	double d; int mode, ndigits, *decpt, *sign; char **rve;
X#else
X	(double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
X#endif
X{
X /*	Arguments ndigits, decpt, sign are similar to those
X	of ecvt and fcvt; trailing zeros are suppressed from
X	the returned string.  If not null, *rve is set to point
X	to the end of the return value.  If d is +-Infinity or NaN,
X	then *decpt is set to 9999.
X
X	mode:
X		0 ==> shortest string that yields d when read in
X			and rounded to nearest.
X		1 ==> like 0, but with Steele & White stopping rule;
X			e.g. with IEEE P754 arithmetic , mode 0 gives
X			1e23 whereas mode 1 gives 9.999999999999999e22.
X		2 ==> max(1,ndigits) significant digits.  This gives a
X			return value similar to that of ecvt, except
X			that trailing zeros are suppressed.
X		3 ==> through ndigits past the decimal point.  This
X			gives a return value similar to that from fcvt,
X			except that trailing zeros are suppressed, and
X			ndigits can be negative.
X		4-9 should give the same return values as 2-3, i.e.,
X			4 <= mode <= 9 ==> same return as mode
X			2 + (mode & 1).  These modes are mainly for
X			debugging; often they run slower but sometimes
X			faster than modes 2-3.
X		4,5,8,9 ==> left-to-right digit generation.
X		6-9 ==> don't try fast floating-point estimate
X			(if applicable).
X
X		Values of mode other than 0-9 are treated as mode 0.
X
X		Sufficient space is allocated to the return value
X		to hold the suppressed trailing zeros.
X	*/
X
X	int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
X		j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
X		spec_case, try_quick;
X	Long L;
X#ifndef Sudden_Underflow
X	int denorm;
X	ULong x;
X#endif
X	Bigint *b, *b1, *delta, *mlo, *mhi, *S;
X	double d2, ds, eps;
X	char *s, *s0;
X	static Bigint *result;
X	static int result_k;
X
X	if (result) {
X		result->k = result_k;
X		result->maxwds = 1 << result_k;
X		Bfree(result);
X		result = 0;
X		}
X
X	if (word0(d) & Sign_bit) {
X		/* set sign for everything, including 0's and NaNs */
X		*sign = 1;
X		word0(d) &= ~Sign_bit;	/* clear sign bit */
X		}
X	else
X		*sign = 0;
X
X#if defined(IEEE_Arith) + defined(VAX)
X#ifdef IEEE_Arith
X	if ((word0(d) & Exp_mask) == Exp_mask)
X#else
X	if (word0(d)  == 0x8000)
X#endif
X		{
X		/* Infinity or NaN */
X		*decpt = 9999;
X		s =
X#ifdef IEEE_Arith
X			!word1(d) && !(word0(d) & 0xfffff) ? "Infinity" :
X#endif
X				"NaN";
X		if (rve)
X			*rve =
X#ifdef IEEE_Arith
X				s[3] ? s + 8 :
X#endif
X						s + 3;
X		return s;
X		}
X#endif
X#ifdef IBM
X	d += 0; /* normalize */
X#endif
X	if (!d) {
X		*decpt = 1;
X		s = "0";
X		if (rve)
X			*rve = s + 1;
X		return s;
X		}
X
X	b = d2b(d, &be, &bbits);
X#ifdef Sudden_Underflow
X	i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
X#else
X	if (i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) {
X#endif
X		d2 = d;
X		word0(d2) &= Frac_mask1;
X		word0(d2) |= Exp_11;
X#ifdef IBM
X		if (j = 11 - hi0bits(word0(d2) & Frac_mask))
X			d2 /= 1 << j;
X#endif
X
X		/* log(x)	~=~ log(1.5) + (x-1.5)/1.5
X		 * log10(x)	 =  log(x) / log(10)
X		 *		~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
X		 * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
X		 *
X		 * This suggests computing an approximation k to log10(d) by
X		 *
X		 * k = (i - Bias)*0.301029995663981
X		 *	+ ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
X		 *
X		 * We want k to be too large rather than too small.
X		 * The error in the first-order Taylor series approximation
X		 * is in our favor, so we just round up the constant enough
X		 * to compensate for any error in the multiplication of
X		 * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
X		 * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
X		 * adding 1e-13 to the constant term more than suffices.
X		 * Hence we adjust the constant term to 0.1760912590558.
X		 * (We could get a more accurate k by invoking log10,
X		 *  but this is probably not worthwhile.)
X		 */
X
X		i -= Bias;
X#ifdef IBM
X		i <<= 2;
X		i += j;
X#endif
X#ifndef Sudden_Underflow
X		denorm = 0;
X		}
X	else {
X		/* d is denormalized */
X
X		i = bbits + be + (Bias + (P-1) - 1);
X		x = i > 32  ? word0(d) << 64 - i | word1(d) >> i - 32
X			    : word1(d) << 32 - i;
X		d2 = x;
X		word0(d2) -= 31*Exp_msk1; /* adjust exponent */
X		i -= (Bias + (P-1) - 1) + 1;
X		denorm = 1;
X		}
X#endif
X	ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
X	k = (int)ds;
X	if (ds < 0. && ds != k)
X		k--;	/* want k = floor(ds) */
X	k_check = 1;
X	if (k >= 0 && k <= Ten_pmax) {
X		if (d < tens[k])
X			k--;
X		k_check = 0;
X		}
X	j = bbits - i - 1;
X	if (j >= 0) {
X		b2 = 0;
X		s2 = j;
X		}
X	else {
X		b2 = -j;
X		s2 = 0;
X		}
X	if (k >= 0) {
X		b5 = 0;
X		s5 = k;
X		s2 += k;
X		}
X	else {
X		b2 -= k;
X		b5 = -k;
X		s5 = 0;
X		}
X	if (mode < 0 || mode > 9)
X		mode = 0;
X	try_quick = 1;
X	if (mode > 5) {
X		mode -= 4;
X		try_quick = 0;
X		}
X	leftright = 1;
X	switch(mode) {
X		case 0:
X		case 1:
X			ilim = ilim1 = -1;
X			i = 18;
X			ndigits = 0;
X			break;
X		case 2:
X			leftright = 0;
X			/* no break */
X		case 4:
X			if (ndigits <= 0)
X				ndigits = 1;
X			ilim = ilim1 = i = ndigits;
X			break;
X		case 3:
X			leftright = 0;
X			/* no break */
X		case 5:
X			i = ndigits + k + 1;
X			ilim = i;
X			ilim1 = i - 1;
X			if (i <= 0)
X				i = 1;
X		}
X	j = sizeof(ULong);
X	for(result_k = 0; sizeof(Bigint) - sizeof(ULong) + j <= i;
X		j <<= 1) result_k++;
X	result = Balloc(result_k);
X	s = s0 = (char *)result;
X
X	if (ilim >= 0 && ilim <= Quick_max && try_quick) {
X
X		/* Try to get by with floating-point arithmetic. */
X
X		i = 0;
X		d2 = d;
X		k0 = k;
X		ilim0 = ilim;
X		ieps = 2; /* conservative */
X		if (k > 0) {
X			ds = tens[k&0xf];
X			j = k >> 4;
X			if (j & Bletch) {
X				/* prevent overflows */
X				j &= Bletch - 1;
X				d /= bigtens[n_bigtens-1];
X				ieps++;
X				}
X			for(; j; j >>= 1, i++)
X				if (j & 1) {
X					ieps++;
X					ds *= bigtens[i];
X					}
X			d /= ds;
X			}
X		else if (j1 = -k) {
X			d *= tens[j1 & 0xf];
X			for(j = j1 >> 4; j; j >>= 1, i++)
X				if (j & 1) {
X					ieps++;
X					d *= bigtens[i];
X					}
X			}
X		if (k_check && d < 1. && ilim > 0) {
X			if (ilim1 <= 0)
X				goto fast_failed;
X			ilim = ilim1;
X			k--;
X			d *= 10.;
X			ieps++;
X			}
X		eps = ieps*d + 7.;
X		word0(eps) -= (P-1)*Exp_msk1;
X		if (ilim == 0) {
X			S = mhi = 0;
X			d -= 5.;
X			if (d > eps)
X				goto one_digit;
X			if (d < -eps)
X				goto no_digits;
X			goto fast_failed;
X			}
X#ifndef No_leftright
X		if (leftright) {
X			/* Use Steele & White method of only
X			 * generating digits needed.
X			 */
X			eps = 0.5/tens[ilim-1] - eps;
X			for(i = 0;;) {
X				L = d;
X				d -= L;
X				*s++ = '0' + (int)L;
X				if (d < eps)
X					goto ret1;
X				if (1. - d < eps)
X					goto bump_up;
X				if (++i >= ilim)
X					break;
X				eps *= 10.;
X				d *= 10.;
X				}
X			}
X		else {
X#endif
X			/* Generate ilim digits, then fix them up. */
X			eps *= tens[ilim-1];
X			for(i = 1;; i++, d *= 10.) {
X				L = d;
X				d -= L;
X				*s++ = '0' + (int)L;
X				if (i == ilim) {
X					if (d > 0.5 + eps)
X						goto bump_up;
X					else if (d < 0.5 - eps) {
X						while(*--s == '0');
X						s++;
X						goto ret1;
X						}
X					break;
X					}
X				}
X#ifndef No_leftright
X			}
X#endif
X fast_failed:
X		s = s0;
X		d = d2;
X		k = k0;
X		ilim = ilim0;
X		}
X
X	/* Do we have a "small" integer? */
X
X	if (be >= 0 && k <= Int_max) {
X		/* Yes. */
X		ds = tens[k];
X		if (ndigits < 0 && ilim <= 0) {
X			S = mhi = 0;
X			if (ilim < 0 || d <= 5*ds)
X				goto no_digits;
X			goto one_digit;
X			}
X		for(i = 1;; i++) {
X			L = d / ds;
X			d -= L*ds;
X#ifdef Check_FLT_ROUNDS
X			/* If FLT_ROUNDS == 2, L will usually be high by 1 */
X			if (d < 0) {
X				L--;
X				d += ds;
X				}
X#endif
X			*s++ = '0' + (int)L;
X			if (i == ilim) {
X				d += d;
X				if (d > ds || d == ds && L & 1) {
X bump_up:
X					while(*--s == '9')
X						if (s == s0) {
X							k++;
X							*s = '0';
X							break;
X							}
X					++*s++;
X					}
X				break;
X				}
X			if (!(d *= 10.))
X				break;
X			}
X		goto ret1;
X		}
X
X	m2 = b2;
X	m5 = b5;
X	mhi = mlo = 0;
X	if (leftright) {
X		if (mode < 2) {
X			i =
X#ifndef Sudden_Underflow
X				denorm ? be + (Bias + (P-1) - 1 + 1) :
X#endif
X#ifdef IBM
X				1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3);
X#else
X				1 + P - bbits;
X#endif
X			}
X		else {
X			j = ilim - 1;
X			if (m5 >= j)
X				m5 -= j;
X			else {
X				s5 += j -= m5;
X				b5 += j;
X				m5 = 0;
X				}
X			if ((i = ilim) < 0) {
X				m2 -= i;
X				i = 0;
X				}
X			}
X		b2 += i;
X		s2 += i;
X		mhi = i2b(1);
X		}
X	if (m2 > 0 && s2 > 0) {
X		i = m2 < s2 ? m2 : s2;
X		b2 -= i;
X		m2 -= i;
X		s2 -= i;
X		}
X	if (b5 > 0) {
X		if (leftright) {
X			if (m5 > 0) {
X				mhi = pow5mult(mhi, m5);
X				b1 = mult(mhi, b);
X				Bfree(b);
X				b = b1;
X				}
X			if (j = b5 - m5)
X				b = pow5mult(b, j);
X			}
X		else
X			b = pow5mult(b, b5);
X		}
X	S = i2b(1);
X	if (s5 > 0)
X		S = pow5mult(S, s5);
X
X	/* Check for special case that d is a normalized power of 2. */
X
X	if (mode < 2) {
X		if (!word1(d) && !(word0(d) & Bndry_mask)
X#ifndef Sudden_Underflow
X		 && word0(d) & Exp_mask
X#endif
X				) {
X			/* The special case */
X			b2 += Log2P;
X			s2 += Log2P;
X			spec_case = 1;
X			}
X		else
X			spec_case = 0;
X		}
X
X	/* Arrange for convenient computation of quotients:
X	 * shift left if necessary so divisor has 4 leading 0 bits.
X	 *
X	 * Perhaps we should just compute leading 28 bits of S once
X	 * and for all and pass them and a shift to quorem, so it
X	 * can do shifts and ors to compute the numerator for q.
X	 */
X#ifdef Pack_32
X	if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f)
X		i = 32 - i;
X#else
X	if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf)
X		i = 16 - i;
X#endif
X	if (i > 4) {
X		i -= 4;
X		b2 += i;
X		m2 += i;
X		s2 += i;
X		}
X	else if (i < 4) {
X		i += 28;
X		b2 += i;
X		m2 += i;
X		s2 += i;
X		}
X	if (b2 > 0)
X		b = lshift(b, b2);
X	if (s2 > 0)
X		S = lshift(S, s2);
X	if (k_check) {
X		if (cmp(b,S) < 0) {
X			k--;
X			b = multadd(b, 10, 0);	/* we botched the k estimate */
X			if (leftright)
X				mhi = multadd(mhi, 10, 0);
X			ilim = ilim1;
X			}
X		}
X	if (ilim <= 0 && mode > 2) {
X		if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
X			/* no digits, fcvt style */
X no_digits:
X			k = -1 - ndigits;
X			goto ret;
X			}
X one_digit:
X		*s++ = '1';
X		k++;
X		goto ret;
X		}
X	if (leftright) {
X		if (m2 > 0)
X			mhi = lshift(mhi, m2);
X
X		/* Compute mlo -- check for special case
X		 * that d is a normalized power of 2.
X		 */
X
X		mlo = mhi;
X		if (spec_case) {
X			mhi = Balloc(mhi->k);
X			Bcopy(mhi, mlo);
X			mhi = lshift(mhi, Log2P);
X			}
X
X		for(i = 1;;i++) {
X			dig = quorem(b,S) + '0';
X			/* Do we yet have the shortest decimal string
X			 * that will round to d?
X			 */
X			j = cmp(b, mlo);
X			delta = diff(S, mhi);
X			j1 = delta->sign ? 1 : cmp(b, delta);
X			Bfree(delta);
X#ifndef ROUND_BIASED
X			if (j1 == 0 && !mode && !(word1(d) & 1)) {
X				if (dig == '9')
X					goto round_9_up;
X				if (j > 0)
X					dig++;
X				*s++ = dig;
X				goto ret;
X				}
X#endif
X			if (j < 0 || j == 0 && !mode
X#ifndef ROUND_BIASED
X							&& !(word1(d) & 1)
X#endif
X					) {
X				if (j1 > 0) {
X					b = lshift(b, 1);
X					j1 = cmp(b, S);
X					if ((j1 > 0 || j1 == 0 && dig & 1)
X					&& dig++ == '9')
X						goto round_9_up;
X					}
X				*s++ = dig;
X				goto ret;
X				}
X			if (j1 > 0) {
X				if (dig == '9') { /* possible if i == 1 */
X round_9_up:
X					*s++ = '9';
X					goto roundoff;
X					}
X				*s++ = dig + 1;
X				goto ret;
X				}
X			*s++ = dig;
X			if (i == ilim)
X				break;
X			b = multadd(b, 10, 0);
X			if (mlo == mhi)
X				mlo = mhi = multadd(mhi, 10, 0);
X			else {
X				mlo = multadd(mlo, 10, 0);
X				mhi = multadd(mhi, 10, 0);
X				}
X			}
X		}
X	else
X		for(i = 1;; i++) {
X			*s++ = dig = quorem(b,S) + '0';
X			if (i >= ilim)
X				break;
X			b = multadd(b, 10, 0);
X			}
X
X	/* Round off last digit */
X
X	b = lshift(b, 1);
X	j = cmp(b, S);
X	if (j > 0 || j == 0 && dig & 1) {
X roundoff:
X		while(*--s == '9')
X			if (s == s0) {
X				k++;
X				*s++ = '1';
X				goto ret;
X				}
X		++*s++;
X		}
X	else {
X		while(*--s == '0');
X		s++;
X		}
X ret:
X	Bfree(S);
X	if (mhi) {
X		if (mlo && mlo != mhi)
X			Bfree(mlo);
X		Bfree(mhi);
X		}
X ret1:
X	Bfree(b);
X	if (s == s0) {				/* don't return empty string */
X		*s++ = '0';
X		k = 0;
X	}
X	*s = 0;
X	*decpt = k + 1;
X	if (rve)
X		*rve = s;
X	return s0;
X	}
X#ifdef __cplusplus
X}
X#endif
END-of-star-1.5.2/lib/strtod.c
echo x - star-1.5.2/lib/swabbytes.c
sed 's/^X//' >star-1.5.2/lib/swabbytes.c << 'END-of-star-1.5.2/lib/swabbytes.c'
X/* @(#)swabbytes.c	1.10 10/08/21 Copyright 1988, 1995-2010 J. Schilling */
X/*
X *	swab bytes in memory
X *
X *	Copyright (c) 1988, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/types.h>
X#include <schily/schily.h>
X
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
XEXPORT void
Xswabbytes(vp, cnt)
X		void	*vp;
X	register ssize_t cnt;
X{
X	register char	*bp = (char *)vp;
X	register char	c;
X
X	cnt /= 2;	/* even count only */
X	while ((cnt -= 8) >= 0) {
X		/* CSTYLED */
X		DO8(c = *bp++; bp[-1] = *bp; *bp++ = c;);
X	}
X	cnt += 8;
X	while (--cnt >= 0) {
X		c = *bp++; bp[-1] = *bp; *bp++ = c;
X	}
X}
END-of-star-1.5.2/lib/swabbytes.c
echo x - star-1.5.2/lib/usleep.c
sed 's/^X//' >star-1.5.2/lib/usleep.c << 'END-of-star-1.5.2/lib/usleep.c'
X/* @(#)usleep.c	1.23 11/08/02 Copyright 1995-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)usleep.c	1.23 11/08/02 Copyright 1995-20011 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1995-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#define	usleep	__nothing_    /* prototype in unistd.h may be different */
X#include <schily/standard.h>
X#include <schily/stdlib.h>
X#include <schily/time.h>
X#ifdef	HAVE_POLL_H
X#	include <poll.h>
X#else
X#	ifdef	HAVE_SYS_POLL_H
X#	include <sys/poll.h>
X#	endif
X#endif
X#include <schily/systeminfo.h>
X#include <schily/libport.h>
X#undef	usleep
X
X#ifndef	HAVE_USLEEP
XEXPORT	int	usleep		__PR((int usec));
X#endif
X
X#ifdef	OPENSERVER
X/*
X * Don't use the usleep() from libc on SCO's OPENSERVER.
X * It will kill our processes with SIGALRM.
X * SCO has a usleep() prototype in unistd.h, for this reason we
X * #define usleep to __nothing__ before including unistd.h
X */
X#undef	HAVE_USLEEP
X#endif
X
X#ifdef apollo
X/*
X * Apollo sys5.3 usleep is broken.  Define a version based on time_$wait.
X */
X#include <apollo/base.h>
X#include <apollo/time.h>
X#undef HAVE_USLEEP
X#endif
X
X#if	!defined(HAVE_USLEEP) && !defined(_MSC_VER)
X
XEXPORT int
Xusleep(usec)
X	int	usec;
X{
X#if defined(apollo)
X	/*
X	 * Need to check apollo before HAVE_SELECT, because Apollo has select,
X	 * but it's time wait feature is also broken :-(
X	 */
X#define	HAVE_USLEEP
X	/*
X	 * XXX Do these vars need to be static on Domain/OS ???
X	 */
X	static time_$clock_t	DomainDelay;
X	static status_$t	DomainStatus;
X
X	/*
X	 * DomainDelay is a 48 bit value that defines how many 4uS periods to
X	 * delay.  Since the input value range is 32 bits, the upper 16 bits of
X	 * DomainDelay must be zero.  So we just divide the input value by 4 to
X	 * determine how many "ticks" to wait
X	 */
X	DomainDelay.c2.high16 = 0;
X	DomainDelay.c2.low32 = usec / 4;
X	time_$wait(time_$relative, DomainDelay, &DomainStatus);
X#endif	/* Apollo */
X
X#if	defined(HAVE_SELECT) && !defined(HAVE_USLEEP)
X#define	HAVE_USLEEP
X
X	struct timeval tv;
X	tv.tv_sec = usec / 1000000;
X	tv.tv_usec = usec % 1000000;
X	select(0, 0, 0, 0, &tv);
X#endif
X
X#if	defined(HAVE_POLL) && !defined(HAVE_USLEEP)
X#define	HAVE_USLEEP
X
X	if (poll(0, 0, usec/1000) < 0)
X		comerr("poll delay failed.\n");
X
X#endif
X
X	/*
X	 * We cannot use nanosleep() until we found a way to check
X	 * separately for nanosleep() in libc and for nanosleep in librt.
X	 */
X#if	defined(xxxHAVE_NANOSLEEP) && !defined(HAVE_USLEEP)
X#define	HAVE_USLEEP
X
X	struct timespec ts;
X
X	ts.tv_sec = usec / 1000000;
X	ts.tv_nsec = (usec % 1000000) * 1000;
X
X	nanosleep(&ts, 0);
X#endif
X
X
X#if	!defined(HAVE_USLEEP)
X#define	HAVE_USLEEP
X
X	sleep((usec+500000)/1000000);
X#endif
X
X	return (0);
X}
X#endif
END-of-star-1.5.2/lib/usleep.c
echo x - star-1.5.2/lib/getxnum.c
sed 's/^X//' >star-1.5.2/lib/getxnum.c << 'END-of-star-1.5.2/lib/getxnum.c'
X/* @(#)getxnum.c	1.6 09/07/08 Copyright 1984-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getxnum.c	1.6 09/07/08 Copyright 1984-2009 J. Schilling";
X#endif
X/*
X *	Generic number conversion routines.
X *	Originally taken from sdd.c to implement 'dd' like number options.
X *
X *	Copyright (c) 1984-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/schily.h>
X
XLOCAL	Llong	number		__PR((char *arg, int *retp, gnmult_t *mult));
XEXPORT	int	getxnum		__PR((char *arg, long *valp, gnmult_t *mult));
XEXPORT	int	getllxnum	__PR((char *arg, Llong *lvalp, gnmult_t *mult));
X
XLOCAL Llong
Xnumber(arg, retp, mult)
X	register char	*arg;
X		int	*retp;
X		gnmult_t *mult;
X{
X	Llong	val	= 0;
X
X	if (*retp != 1)
X		return (val);
X	if (*arg == '\0') {
X		*retp = -1;
X	} else if (*(arg = astoll(arg, &val))) {
X		gnmult_t *n;
X
X		for (n = mult; n->key; n++) {
X			if (n->key == *arg) {
X				val *= n->mult;
X				arg++;
X				break;
X			}
X		}
X		if (*arg == '*' || *arg == 'x')
X			val *= number(++arg, retp, mult);
X		else if (*arg != '\0')
X			*retp = -1;
X	}
X	return (val);
X}
X
XEXPORT int
Xgetxnum(arg, valp, mult)
X	char	*arg;
X	long	*valp;
X	gnmult_t *mult;
X{
X	Llong	llval;
X	int	ret = 1;
X
X	llval = number(arg, &ret, mult);
X	*valp = llval;
X	if (*valp != llval) {
X		errmsgno(EX_BAD,
X			"Value %lld is too large for data type 'long'.\n",
X									llval);
X		ret = -1;
X	}
X	return (ret);
X}
X
XEXPORT int
Xgetllxnum(arg, lvalp, mult)
X	char	*arg;
X	Llong	*lvalp;
X	gnmult_t *mult;
X{
X	int	ret = 1;
X
X	*lvalp = number(arg, &ret, mult);
X	return (ret);
X}
END-of-star-1.5.2/lib/getxnum.c
echo x - star-1.5.2/lib/noshlschily.mk
sed 's/^X//' >star-1.5.2/lib/noshlschily.mk << 'END-of-star-1.5.2/lib/noshlschily.mk'
X#ident "@(#)noshlschily.mk	1.1 06/07/21 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-star-1.5.2/lib/noshlschily.mk
echo x - star-1.5.2/lib/libschily-mapvers
sed 's/^X//' >star-1.5.2/lib/libschily-mapvers << 'END-of-star-1.5.2/lib/libschily-mapvers'
X# @(#)libschily-mapvers	1.6 07/02/05 Copyright 2005-2006 J. Schilling
X
XSCHILY_1.2 {
Xglobal:
X	getnum;
X	getllnum;
X	getxnum;
X	getllxnum;
X	gettnum;
X	getlltnum;
X	getxtnum;
X	getllxtnum;
X	getvargs;
X	getvallargs;
X	getvfiles;
X	getargerror;
X
X#	fnmatch;
X#	strlcpy;
X#	strncpy;
X
X	js_malloc;
X	js_realloc;
X	js_savestr;
X	js_jmalloc;
X	js_jrealloc;
X	js_jsavestr;
X	js_fjmalloc;
X	js_fjrealloc;
X	js_fjsavestr;
X
X	fcomerr;
X	fcomerrno;
X	ferrmsg;
X	ferrmsgno;
X	_comerr;
X
X	file_getraise;
X} SCHILY_1.1;
X
XSCHILY_1.1 {
Xglobal:
X	astoull;
X	astoullb;
X} SCHILY_1.0;
X
XSCHILY_1.0 {
Xglobal:
X	_cvmod;
X	_fcons;
X	_fcons64;
X	_getargs;
X	_niread;
X	_niwrite;
X	_nixread;
X	_nixwrite;
X	_openfd;
X	_openfd64;
X	astoi;
X	astol;
X	astolb;
X	astoll;
X	astollb;
X	#breakline;
X	cmpbytes;
X	cmpnullbytes;
X	comerr;
X	comerrno;
X	comexit;
X	errmsg;
X	errmsgno;
X	errmsgstr;
X	error;
X	fdown;
X	#fdup;
X	#fdup64;
X	fexecl;
X	fexecle;
X	fexecv;
X	fexecve;
X	ffileread;
X	ffilewrite;
X	fgetline;
X	#fgetstr;
X	file_raise;
X	#fileclose;
X	#fileluopen;
X	#fileluopen64;
X	filemopen;
X	filemopen64;
X	fileopen;
X	fileopen64;
X	filepos;
X	filepos64;
X	fileread;
X	#filereopen;
X	#filereopen64;
X	fileseek;
X	#fileseek64;
X	filesize;
X	filesize64;
X	#filestat;
X	#filestat64;
X	filewrite;
X	fillbytes;
X	#findbytes;
X	#findline;
X	flush;
X	format;
X	fpipe;
X	#fspawnl;
X	#fspawnv;
X	#fspawnv_nowait;
X	ftoes;
X	ftofs;
X	get_progname;
X	getallargs;
X	getargs;
X	getav0;
X	getavp;
X	#getbroken;
X	#getdomainname;
X	geterrno;
X	getfiles;
X	getfp;
X	getline;
X	getmainfp;
X	#getstr;
X	#handlecond;
X	js_fprintf;
X	js_printf;
X	js_snprintf;
X	js_sprintf;
X	movebytes;
X	#ofindline;
X	on_comerr;
X	#opatlmatch;
X	opatmatch;
X	patcompile;
X	#patlmatch;
X	patmatch;
X	#peekc;
X	raisecond;
X	save_args;
X	saved_ac;
X	saved_av;
X	saved_av0;
X	#serrmsg;
X	#serrmsgno;
X	set_progname;
X	seterrno;
X	#setfp;
X	#starthandlecond;
X	strcatl;
X	streql;
X	swabbytes;
X	#unhandlecond;
X	#wait_chld;
X
X#	fprintf;
X#	printf;
X#	snprintf;
X#	sprintf;
X
Xlocal:
X	*;
X};
END-of-star-1.5.2/lib/libschily-mapvers
echo x - star-1.5.2/lib/getxtnum.c
sed 's/^X//' >star-1.5.2/lib/getxtnum.c << 'END-of-star-1.5.2/lib/getxtnum.c'
X/* @(#)getxtnum.c	1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getxtnum.c	1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling";
X#endif
X/*
X *	Generic time conversion routines rewritten from
X *	'dd' like number conversion in 'sdd'.
X *
X *	Copyright (c) 1984-2002, 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/time.h>
X#include <schily/schily.h>
X#include <schily/nlsdefs.h>
X
XLOCAL	Llong	tnumber		__PR((char *arg, int *retp, gnmult_t *mult, int level));
XEXPORT	int	getxtnum	__PR((char *arg, time_t *valp, gnmult_t *mult));
XEXPORT	int	getllxtnum	__PR((char *arg, Llong *lvalp, gnmult_t *mult));
X
XLOCAL Llong
Xtnumber(arg, retp, mult, level)
X	register char	*arg;
X		int	*retp;
X		gnmult_t *mult;
X		int	level;
X{
X	Llong	val	= 0;
X
X	if (*retp != 1)
X		return (val);
X	if (*arg == '\0') {
X		*retp = -1;
X	} else if (*(arg = astoll(arg, &val))) {
X		gnmult_t *n;
X
X		for (n = mult; n->key; n++) {
X			if (n->key == *arg) {
X				val *= n->mult;
X				arg++;
X				break;
X			}
X		}
X		if (*arg >= '0' && *arg <= '9')
X			val += tnumber(arg, retp, mult, level+1);
X		else if (*arg != '\0') {
X			errmsgno(EX_BAD,
X			gettext("Illegal character '%c' in timespec.\n"),
X				*arg);
X			*retp = -1;
X		} else if (*arg == '\0')
X			return (val);
X	}
X	if (level > 0 && *arg == '\0')
X		*retp = -1;
X	return (val);
X}
X
XEXPORT int
Xgetxtnum(arg, valp, mult)
X	char	*arg;
X	time_t	*valp;
X	gnmult_t *mult;
X{
X	Llong	llval;
X	int	ret = 1;
X
X	llval = tnumber(arg, &ret, mult, 0);
X	*valp = llval;
X	if (*valp != llval) {
X		errmsgno(EX_BAD,
X		gettext("Value %lld is too large for data type 'time_t'.\n"),
X									llval);
X		ret = -1;
X	}
X	return (ret);
X}
X
XEXPORT int
Xgetllxtnum(arg, lvalp, mult)
X	char	*arg;
X	Llong	*lvalp;
X	gnmult_t *mult;
X{
X	int	ret = 1;
X
X	*lvalp = tnumber(arg, &ret, mult, 0);
X	return (ret);
X}
END-of-star-1.5.2/lib/getxtnum.c
echo x - star-1.5.2/lib/libschily-mapvers.orig
sed 's/^X//' >star-1.5.2/lib/libschily-mapvers.orig << 'END-of-star-1.5.2/lib/libschily-mapvers.orig'
X# @(#)libschily-mapvers	1.4 06/09/26 Copyright 2005-2006 J. Schilling
X
XSCHILY_1.2 {
Xglobal:
X	getvargs;
X	getvallargs;
X	getvfiles;
X	getargerror;
X
X#	fnmatch;
X#	strlcpy;
X#	strcpy;
X} SCHILY_1.1;
X
XSCHILY_1.1 {
Xglobal:
X	astoull;
X	astoullb;
X} SCHILY_1.0;
X
XSCHILY_1.0 {
Xglobal:
X	_cvmod;
X	_fcons;
X	_fcons64;
X	_getargs;
X	_niread;
X	_niwrite;
X	_nixread;
X	_nixwrite;
X	_openfd;
X	_openfd64;
X	astoi;
X	astol;
X	astolb;
X	astoll;
X	astollb;
X	breakline;
X	cmpbytes;
X	cmpnullbytes;
X	comerr;
X	comerrno;
X	comexit;
X	errmsg;
X	errmsgno;
X	errmsgstr;
X	error;
X	fdown;
X	fdup;
X	fdup64;
X	fexecl;
X	fexecle;
X	fexecv;
X	fexecve;
X	ffileread;
X	ffilewrite;
X	fgetline;
X	fgetstr;
X	file_raise;
X	fileclose;
X	fileluopen;
X	fileluopen64;
X	filemopen;
X	filemopen64;
X	fileopen;
X	fileopen64;
X	filepos;
X	filepos64;
X	fileread;
X	filereopen;
X	filereopen64;
X	fileseek;
X	fileseek64;
X	filesize;
X	filesize64;
X	filestat;
X	filestat64;
X	filewrite;
X	fillbytes;
X	findbytes;
X	findline;
X	flush;
X	format;
X	fpipe;
X	fprintf;
X	fspawnl;
X	fspawnv;
X	fspawnv_nowait;
X	ftoes;
X	ftofs;
X	get_progname;
X	getallargs;
X	getargs;
X	getav0;
X	getavp;
X	getbroken;
X	getdomainname;
X	geterrno;
X	getfiles;
X	getfp;
X	getline;
X	getmainfp;
X	getstr;
X	handlecond;
X	js_fprintf;
X	js_printf;
X	js_snprintf;
X	js_sprintf;
X	movebytes;
X	ofindline;
X	on_comerr;
X	opatlmatch;
X	opatmatch;
X	patcompile;
X	patlmatch;
X	patmatch;
X	peekc;
X	printf;
X	raisecond;
X	save_args;
X	saved_ac;
X	saved_av;
X	saved_av0;
X	serrmsg;
X	serrmsgno;
X	set_progname;
X	seterrno;
X	setfp;
X	snprintf;
X	sprintf;
X	starthandlecond;
X	strcatl;
X	streql;
X	swabbytes;
X	unhandlecond;
X	wait_chld;
X
Xlocal:
X	*;
X};
END-of-star-1.5.2/lib/libschily-mapvers.orig
echo x - star-1.5.2/lib/mem.c
sed 's/^X//' >star-1.5.2/lib/mem.c << 'END-of-star-1.5.2/lib/mem.c'
X/* @(#)mem.c	1.10 09/07/08 Copyright 1998-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)mem.c	1.10 09/07/08 Copyright 1998-2009 J. Schilling";
X#endif
X/*
X *	Memory handling with error checking
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include <schily/nlsdefs.h>
X
XEXPORT	void	*___malloc	__PR((size_t size, char *msg));
XEXPORT	void	*___realloc	__PR((void *ptr, size_t size, char *msg));
XEXPORT	char	*___savestr	__PR((const char *s));
X
XEXPORT void *
X___malloc(size, msg)
X	size_t	size;
X	char	*msg;
X{
X	void	*ret;
X
X	ret = malloc(size);
X	if (ret == NULL) {
X		comerr(gettext("Cannot allocate memory for %s.\n"), msg);
X		/* NOTREACHED */
X	}
X	return (ret);
X}
X
XEXPORT void *
X___realloc(ptr, size, msg)
X	void	*ptr;
X	size_t	size;
X	char	*msg;
X{
X	void	*ret;
X
X	if (ptr == NULL)
X		ret = malloc(size);
X	else
X		ret = realloc(ptr, size);
X	if (ret == NULL) {
X		comerr(gettext("Cannot realloc memory for %s.\n"), msg);
X		/* NOTREACHED */
X	}
X	return (ret);
X}
X
XEXPORT char *
X___savestr(s)
X	const char	*s;
X{
X	char	*ret = ___malloc(strlen(s)+1, "saved string");
X
X	strcpy(ret, s);
X	return (ret);
X}
END-of-star-1.5.2/lib/mem.c
echo x - star-1.5.2/lib/fjmem.c
sed 's/^X//' >star-1.5.2/lib/fjmem.c << 'END-of-star-1.5.2/lib/fjmem.c'
X/* @(#)fjmem.c	1.13 09/07/08 Copyright 1998-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)fjmem.c	1.13 09/07/08 Copyright 1998-2009 J. Schilling";
X#endif
X/*
X *	Memory handling with error checking
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/jmpdefs.h>
X#include <schily/schily.h>
X#include <schily/nlsdefs.h>
X
XEXPORT	void	*__fjmalloc	__PR((FILE *f, size_t size, char *msg, sigjmps_t *jmp));
XEXPORT	void	*__fjrealloc	__PR((FILE *f, void *ptr, size_t size, char *msg, sigjmps_t *jmp));
XEXPORT	char	*__fjsavestr	__PR((FILE *f, const char *s, sigjmps_t *jmp));
X
XEXPORT void *
X__fjmalloc(f, size, msg, jmp)
X	FILE		*f;
X	size_t		size;
X	char		*msg;
X	sigjmps_t	*jmp;
X{
X	void	*ret;
X
X	ret = malloc(size);
X	if (ret == NULL) {
X		int	err = geterrno();
X
X		if (f != NULL) {
X			ferrmsg(f,
X				gettext("Cannot allocate memory for %s.\n"),
X									msg);
X		}
X		if (jmp == JM_EXIT)
X			comexit(err);
X		if (jmp != NULL)
X			siglongjmp(jmp->jb, 1);
X	}
X	return (ret);
X}
X
XEXPORT void *
X__fjrealloc(f, ptr, size, msg, jmp)
X	FILE		*f;
X	void		*ptr;
X	size_t		size;
X	char		*msg;
X	sigjmps_t	*jmp;
X{
X	void	*ret;
X
X	if (ptr == NULL)
X		ret = malloc(size);
X	else
X		ret = realloc(ptr, size);
X	if (ret == NULL) {
X		int	err = geterrno();
X
X		if (f != NULL) {
X			ferrmsg(f,
X				gettext("Cannot realloc memory for %s.\n"),
X									msg);
X		}
X		if (jmp == JM_EXIT)
X			comexit(err);
X		if (jmp != NULL)
X			siglongjmp(jmp->jb, 1);
X	}
X	return (ret);
X}
X
XEXPORT char *
X__fjsavestr(f, s, jmp)
X	FILE		*f;
X	const char	*s;
X	sigjmps_t		*jmp;
X{
X	char	*ret = __fjmalloc(f, strlen(s)+1, "saved string", jmp);
X
X	if (ret != NULL)
X		strcpy(ret, s);
X	return (ret);
X}
END-of-star-1.5.2/lib/fjmem.c
echo x - star-1.5.2/lib/jmem.c
sed 's/^X//' >star-1.5.2/lib/jmem.c << 'END-of-star-1.5.2/lib/jmem.c'
X/* @(#)jmem.c	1.12 09/07/08 Copyright 1998-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)jmem.c	1.12 09/07/08 Copyright 1998-2009 J. Schilling";
X#endif
X/*
X *	Memory handling with error checking
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/jmpdefs.h>
X#include <schily/schily.h>
X#include <schily/nlsdefs.h>
X
XEXPORT	void	*__jmalloc	__PR((size_t size, char *msg, sigjmps_t *jmp));
XEXPORT	void	*__jrealloc	__PR((void *ptr, size_t size, char *msg, sigjmps_t *jmp));
XEXPORT	char	*__jsavestr	__PR((const char *s, sigjmps_t *jmp));
X
XEXPORT void *
X__jmalloc(size, msg, jmp)
X	size_t		size;
X	char		*msg;
X	sigjmps_t	*jmp;
X{
X	void	*ret;
X
X	ret = malloc(size);
X	if (ret == NULL) {
X		int	err = geterrno();
X
X		errmsg(gettext("Cannot allocate memory for %s.\n"), msg);
X		if (jmp == JM_EXIT)
X			comexit(err);
X		if (jmp != NULL)
X			siglongjmp(jmp->jb, 1);
X	}
X	return (ret);
X}
X
XEXPORT void *
X__jrealloc(ptr, size, msg, jmp)
X	void		*ptr;
X	size_t		size;
X	char		*msg;
X	sigjmps_t	*jmp;
X{
X	void	*ret;
X
X	if (ptr == NULL)
X		ret = malloc(size);
X	else
X		ret = realloc(ptr, size);
X	if (ret == NULL) {
X		int	err = geterrno();
X
X		errmsg(gettext("Cannot realloc memory for %s.\n"), msg);
X		if (jmp == JM_EXIT)
X			comexit(err);
X		if (jmp != NULL)
X			siglongjmp(jmp->jb, 1);
X	}
X	return (ret);
X}
X
XEXPORT char *
X__jsavestr(s, jmp)
X	const char	*s;
X	sigjmps_t		*jmp;
X{
X	char	*ret = __jmalloc(strlen(s)+1, "saved string", jmp);
X
X	if (ret != NULL)
X		strcpy(ret, s);
X	return (ret);
X}
END-of-star-1.5.2/lib/jmem.c
echo x - star-1.5.2/lib/fcomerr.c
sed 's/^X//' >star-1.5.2/lib/fcomerr.c << 'END-of-star-1.5.2/lib/fcomerr.c'
X/* @(#)fcomerr.c	1.4 10/08/23 Copyright 1985-1989, 1995-2010 J. Schilling */
X/*
X *	Routines for printing command errors on a specified FILE *
X *
X *	Copyright (c) 1985-1989, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/unistd.h>	/* include <sys/types.h> try to get size_t */
X#include <schily/stdio.h>	/* Try again for size_t	*/
X#include <schily/stdlib.h>	/* Try again for size_t	*/
X#include <schily/standard.h>
X#include <schily/varargs.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/errno.h>
X
XEXPORT	void	fcomerr		__PR((FILE *, const char *, ...));
XEXPORT	void	fcomerrno	__PR((FILE *, int, const char *, ...));
XEXPORT	int	ferrmsg		__PR((FILE *, const char *, ...));
XEXPORT	int	ferrmsgno	__PR((FILE *, int, const char *, ...));
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT void
Xfcomerr(FILE *f, const char *msg, ...)
X#else
XEXPORT void
Xfcomerr(f, msg, va_alist)
X	FILE	*f;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	(void) _comerr(f, TRUE, geterrno(), msg, args);
X	/* NOTREACHED */
X	va_end(args);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT void
Xfcomerrno(FILE *f, int err, const char *msg, ...)
X#else
XEXPORT void
Xfcomerrno(f, err, msg, va_alist)
X	FILE	*f;
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	(void) _comerr(f, TRUE, err, msg, args);
X	/* NOTREACHED */
X	va_end(args);
X}
X
X/* VARARGS1 */
X#ifdef	PROTOTYPES
XEXPORT int
Xferrmsg(FILE *f, const char *msg, ...)
X#else
XEXPORT int
Xferrmsg(f, msg, va_alist)
X	FILE	*f;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = _comerr(f, FALSE, geterrno(), msg, args);
X	va_end(args);
X	return (ret);
X}
X
X/* VARARGS2 */
X#ifdef	PROTOTYPES
XEXPORT int
Xferrmsgno(FILE *f, int err, const char *msg, ...)
X#else
XEXPORT int
Xferrmsgno(f, err, msg, va_alist)
X	FILE	*f;
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = _comerr(f, FALSE, err, msg, args);
X	va_end(args);
X	return (ret);
X}
END-of-star-1.5.2/lib/fcomerr.c
echo x - star-1.5.2/lib/getperm.c
sed 's/^X//' >star-1.5.2/lib/getperm.c << 'END-of-star-1.5.2/lib/getperm.c'
X/* @(#)getperm.c	1.5 12/04/15 Copyright 2004-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)getperm.c	1.5 12/04/15 Copyright 2004-2009 J. Schilling";
X#endif
X/*
X *	Parser for chmod(1)/find(1)-perm, ....
X *
X *	Copyright (c) 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stat.h>
X#include <schily/utypes.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#include <schily/nlsdefs.h>
X
XEXPORT	int	getperm		__PR((FILE *f, char *perm, char *opname, mode_t *modep, int smode, int flag));
XLOCAL	char	*getsperm	__PR((FILE *f, char *p, mode_t *mp, int smode, int flag));
XLOCAL	mode_t	iswho		__PR((int c));
XLOCAL	int	isop		__PR((int c));
XLOCAL	mode_t	isperm		__PR((int c, int isX));
X
X/*
X * This is the mode bit translation code stolen from star...
X */
X#define	TSUID		04000	/* Set UID on execution */
X#define	TSGID		02000	/* Set GID on execution */
X#define	TSVTX		01000	/* On directories, restricted deletion flag */
X#define	TUREAD		00400	/* Read by owner */
X#define	TUWRITE		00200	/* Write by owner special */
X#define	TUEXEC		00100	/* Execute/search by owner */
X#define	TGREAD		00040	/* Read by group */
X#define	TGWRITE		00020	/* Write by group */
X#define	TGEXEC		00010	/* Execute/search by group */
X#define	TOREAD		00004	/* Read by other */
X#define	TOWRITE		00002	/* Write by other */
X#define	TOEXEC		00001	/* Execute/search by other */
X
X#define	TALLMODES	07777	/* The low 12 bits mentioned in the standard */
X
X#define	S_ALLPERM	(S_IRWXU|S_IRWXG|S_IRWXO)
X#define	S_ALLFLAGS	(S_ISUID|S_ISGID|S_ISVTX)
X#define	S_ALLMODES	(S_ALLFLAGS | S_ALLPERM)
X
X#if	S_ISUID == TSUID && S_ISGID == TSGID && S_ISVTX == TSVTX && \
X	S_IRUSR == TUREAD && S_IWUSR == TUWRITE && S_IXUSR == TUEXEC && \
X	S_IRGRP == TGREAD && S_IWGRP == TGWRITE && S_IXGRP == TGEXEC && \
X	S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC
X
X#define	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X#endif
X
X#ifdef	HAVE_POSIX_MODE_BITS	/* st_mode bits are equal to TAR mode bits */
X#define	OSMODE(xmode)	    (xmode)
X#else
X#define	OSMODE(xmode)	    ((xmode & TSUID   ? S_ISUID : 0)  \
X			    | (xmode & TSGID   ? S_ISGID : 0) \
X			    | (xmode & TSVTX   ? S_ISVTX : 0) \
X			    | (xmode & TUREAD  ? S_IRUSR : 0) \
X			    | (xmode & TUWRITE ? S_IWUSR : 0) \
X			    | (xmode & TUEXEC  ? S_IXUSR : 0) \
X			    | (xmode & TGREAD  ? S_IRGRP : 0) \
X			    | (xmode & TGWRITE ? S_IWGRP : 0) \
X			    | (xmode & TGEXEC  ? S_IXGRP : 0) \
X			    | (xmode & TOREAD  ? S_IROTH : 0) \
X			    | (xmode & TOWRITE ? S_IWOTH : 0) \
X			    | (xmode & TOEXEC  ? S_IXOTH : 0))
X#endif
X
XEXPORT int
Xgetperm(f, perm, opname, modep, smode, flag)
X	FILE	*f;			/* FILE * to print error messages to */
X	char	*perm;			/* Perm string to parse		    */
X	char	*opname;		/* find(1) operator name / NULL	    */
X	mode_t	*modep;			/* The mode result		    */
X	int	smode;			/* The start mode for the computation */
X	int	flag;			/* Flags, see getperm() flag defs */
X{
X	char	*p;
X	Llong	ll;
X	mode_t	mm;
X
X	p = perm;
X	if ((flag & GP_FPERM) && *p == '-')
X		p++;
X
X	if (*p >= '0' && *p <= '7') {
X		p = astollb(p, &ll, 8);
X		if (*p) {
X			if (f) {
X				if (opname) {
X					ferrmsgno(f, EX_BAD,
X					gettext("Non octal character '%c' in '-%s %s'.\n"),
X					*p, opname, perm);
X				} else {
X					ferrmsgno(f, EX_BAD,
X					gettext("Non octal character '%c' in '%s'.\n"),
X					*p, perm);
X				}
X			}
X			return (-1);
X		}
X		mm = ll & TALLMODES;
X		*modep = OSMODE(mm);
X		return (0);
X	}
X	p = getsperm(f, p, modep, smode, flag);
X	if (p && *p != '\0') {
X		if (f) {
X			if (opname) {
X				ferrmsgno(f, EX_BAD,
X				gettext("Bad perm character '%c' found in '-%s %s'.\n"),
X					*p, opname, perm);
X			} else {
X				ferrmsgno(f, EX_BAD,
X				gettext("Bad perm character '%c' found in '%s'.\n"),
X					*p, perm);
X			}
X		}
X		return (-1);
X	}
X#ifdef	PERM_DEBUG
X	error("GETPERM (%c) %4.4lo\n", perm, (long)*modep);
X#endif
X	return (0);
X}
X
XLOCAL char *
Xgetsperm(f, p, mp, smode, flag)
X	FILE	*f;
X	char	*p;		/* The perm input string		*/
X	mode_t	*mp;		/* To set the mode			*/
X	int	smode;		/* The start mode for the computation	*/
X	int	flag;		/* Flags, see getperm() flag defs	*/
X{
X#ifdef	OLD
X	mode_t	permval = 0;	/* POSIX start value for "find" */
X#else
X	mode_t	permval = smode;	/* POSIX start value for "find" */
X#endif
X	mode_t	who;
X	mode_t	m;
X	int	op;
X	mode_t	perms;
X	mode_t	pm;
X
Xnextclause:
X#ifdef	PERM_DEBUG
X	error("getsperm(%s)\n", p);
X#endif
X	who = 0;
X	while ((m = iswho(*p)) != 0) {
X		p++;
X		who |= m;
X	}
X	if (who == 0) {
X		mode_t	mask;
X
X		if (flag & GP_UMASK) {
X			who = (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);
X		} else {
X			umask(mask = umask(0));
X			who = ~mask;
X			who &= (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);
X		}
X	}
X#ifdef	PERM_DEBUG
X	error("WHO %4.4lo\n", (long)who);
X	error("getsperm(--->%s)\n", p);
X#endif
X
Xnextop:
X	if ((op = isop(*p)) != '\0')
X		p++;
X#ifdef	PERM_DEBUG
X	error("op '%c'\n", op);
X	error("getsperm(--->%s)\n", p);
X#endif
X	if (op == 0) {
X		if (f) {
X			ferrmsgno(f, EX_BAD, gettext("Missing -perm op.\n"));
X		}
X		return (p);
X	}
X
X	flag &= ~(GP_FPERM|GP_UMASK);
X	if (flag & GP_XERR)
X		flag = -1;
X	perms = 0;
X	while ((pm = isperm(*p, flag)) != (mode_t)-1) {
X		p++;
X		perms |= pm;
X	}
X#ifdef	PERM_DEBUG
X	error("PERM %4.4lo\n", (long)perms);
X	error("START PERMVAL %4.4lo\n", (long)permval);
X#endif
X	if ((perms == 0) && (*p == 'u' || *p == 'g' || *p == 'o')) {
X		mode_t	what = 0;
X
X		/*
X		 * First select the bit triple we like to copy.
X		 */
X		switch (*p) {
X
X		case 'u':
X			what = permval & S_IRWXU;
X			break;
X		case 'g':
X			what = permval & S_IRWXG;
X			break;
X		case 'o':
X			what = permval & S_IRWXO;
X			break;
X		}
X		/*
X		 * Now copy over bit by bit without relying on shifts
X		 * that would make implicit assumptions on values.
X		 */
X		if (what & (S_IRUSR|S_IRGRP|S_IROTH))
X			perms |= (who & (S_IRUSR|S_IRGRP|S_IROTH));
X		if (what & (S_IWUSR|S_IWGRP|S_IWOTH))
X			perms |= (who & (S_IWUSR|S_IWGRP|S_IWOTH));
X		if (what & (S_IXUSR|S_IXGRP|S_IXOTH))
X			perms |= (who & (S_IXUSR|S_IXGRP|S_IXOTH));
X		p++;
X	}
X#ifdef	PERM_DEBUG
X	error("getsperm(--->%s)\n", p);
X#endif
X	switch (op) {
X
X	case '=':
X		permval &= ~who;
X		/* FALLTHRU */
X	case '+':
X		permval |= (who & perms);
X		break;
X
X	case '-':
X		permval &= ~(who & perms);
X		break;
X	}
X#ifdef	PERM_DEBUG
X	error("END PERMVAL %4.4lo\n", (long)permval);
X#endif
X	if (isop(*p))
X		goto nextop;
X	if (*p == ',') {
X		p++;
X		goto nextclause;
X	}
X	*mp = permval;
X	return (p);
X}
X
XLOCAL mode_t
Xiswho(c)
X	int	c;
X{
X	switch (c) {
X
X	case 'u':					/* user */
X		return (S_ISUID|S_ISVTX|S_IRWXU);
X	case 'g':					/* group */
X		return (S_ISGID|S_ISVTX|S_IRWXG);
X	case 'o':					/* other */
X		return (S_ISVTX|S_IRWXO);
X	case 'a':					/* all */
X		return (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO);
X	default:
X		return (0);
X	}
X}
X
XLOCAL int
Xisop(c)
X	int	c;		/* The current perm character to parse	*/
X{
X	switch (c) {
X
X	case '+':
X	case '-':
X	case '=':
X		return (c);
X	default:
X		return (0);
X	}
X}
X
XLOCAL mode_t
Xisperm(c, isX)
X	int	c;		/* The current perm character to parse	*/
X	int	isX;		/* -1: Ignore X, 0: no dir/X 1: X OK	*/
X{
X	switch (c) {
X
X	case 'r':
X		return (S_IRUSR|S_IRGRP|S_IROTH);
X	case 'w':
X		return (S_IWUSR|S_IWGRP|S_IWOTH);
X	case 'X':
X		if (isX < 0)
X			return ((mode_t)-1);	/* Singnal parse error	*/
X		if (isX == 0)
X			return ((mode_t)0);	/* No 'X' handling here	*/
X		/* FALLTHRU */
X	case 'x':
X		return (S_IXUSR|S_IXGRP|S_IXOTH);
X	case 's':
X		return (S_ISUID|S_ISGID);
X	case 'l':
X		return (S_ISGID);
X	case 't':
X		return (S_ISVTX);
X	default:
X		return ((mode_t)-1);
X	}
X}
END-of-star-1.5.2/lib/getperm.c
echo x - star-1.5.2/lib/findinpath.c
sed 's/^X//' >star-1.5.2/lib/findinpath.c << 'END-of-star-1.5.2/lib/findinpath.c'
X/* @(#)findinpath.c	1.6 10/10/07 Copyright 2004-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)findinpath.c	1.6 10/10/07 Copyright 2004-2010 J. Schilling";
X#endif
X/*
X * Search a file name in the PATH and return the path name in allocated space.
X *
X * Copyright 2004-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdlib.h>
X#include <schily/stat.h>
X#include <schily/errno.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
XEXPORT	char	*findinpath	__PR((char *name, int mode, BOOL plain_file,
X								char *path));
X
X#ifdef	JOS
X#define	enofile(t)			((t) == EMISSDIR || \
X					(t)  == ENOFILE || \
X					(t)  == EISADIR || \
X					(t)  == EIOERR)
X#else
X#define	enofile(t)			((t) == ENOENT || \
X					(t)  == ENOTDIR || \
X					(t)  == EISDIR || \
X					(t)  == EIO)
X#endif
X
XEXPORT char *
Xfindinpath(name, mode, plain_file, path)
X	char	*name;			/* The name to execute			*/
X	int	mode;			/* Mode for access() e.g. X_OK		*/
X	BOOL	plain_file;		/* Whether to check only plain files	*/
X	char	*path;			/* PATH to use if not NULL		*/
X{
X	char	*pathlist;
X	char	*p1;
X	char	*p2;
X	char	*tmp;
X	int	err = 0;
X	int	exerr = 0;
X	struct stat sb;
X
X	if (name == NULL)
X		return (NULL);
X	if (strchr(name, '/'))
X		return (strdup(name));
X
X	if (path != NULL)
X		pathlist = path;
X	else if ((pathlist = getenv("PATH")) == NULL)
X		pathlist = "/bin";
X	p2 = pathlist = strdup(pathlist);
X	if (pathlist == NULL)
X		return (NULL);
X
X	for (;;) {
X		p1 = p2;
X		if ((p2 = strchr(p2, PATH_ENV_DELIM)) != NULL)
X			*p2++ = '\0';
X		if (*p1 == '\0') {
X			tmp = strdup(name);
X			if (tmp == NULL) {
X				free(pathlist);
X				return (NULL);
X			}
X		} else {
X			size_t	len = strlen(p1) + strlen(name) + 2;
X
X			tmp = malloc(len);
X			if (tmp == NULL) {
X				free(pathlist);
X				return (strdup(name));
X			}
X			strcatl(tmp, p1, PATH_DELIM_STR, name, (char *)NULL);
X		}
X
X		seterrno(0);
X		if (stat(tmp, &sb) >= 0) {
X			if ((!plain_file || S_ISREG(sb.st_mode)) &&
X				(eaccess(tmp, mode) >= 0)) {
X				free(pathlist);
X				return (tmp);
X			}
X			if ((err = geterrno()) == 0)
X				err = ENOEXEC;
X		} else {
X			err = geterrno();
X		}
X		free(tmp);
X		if (exerr == 0 && !enofile(err))
X			exerr = err;
X		if ((!enofile(err) && !(err == EACCES)) || p2 == NULL)
X			break;
X	}
X	free(pathlist);
X	seterrno(exerr);
X	return (NULL);
X}
END-of-star-1.5.2/lib/findinpath.c
echo x - star-1.5.2/lib/eaccess.c
sed 's/^X//' >star-1.5.2/lib/eaccess.c << 'END-of-star-1.5.2/lib/eaccess.c'
X/* @(#)eaccess.c	1.4 10/05/08 Copyright 2004-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)eaccess.c	1.4 10/05/08 Copyright 2004-2010 J. Schilling";
X#endif
X/*
X * Implement the best possible emulation for eaccess()
X *
X * Copyright 2004-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifndef	HAVE_EACCESS
XEXPORT	int	eaccess		__PR((const char *name, int mode));
X
XEXPORT int
Xeaccess(name, mode)
X	const	char	*name;
X		int	mode;
X{
X#ifdef	HAVE_EUIDACCESS
X	return (euidaccess(name, mode));
X#else
X#ifdef	HAVE_ACCESS_E_OK
X	return (access(name, E_OK|mode));
X#else
X	return (access(name, mode));
X#endif
X#endif
X}
X#endif
END-of-star-1.5.2/lib/eaccess.c
echo x - star-1.5.2/lib/fnmatch.c
sed 's/^X//' >star-1.5.2/lib/fnmatch.c << 'END-of-star-1.5.2/lib/fnmatch.c'
X/* @(#)fnmatch.c	8.17 10/10/10 2005-2010 J. Schilling from 8.2 (Berkeley) */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)fnmatch.c	8.17 10/10/10 2005-2010 J. Schilling from 8.2 (Berkeley)";
X#endif
X/*
X * Copyright (c) 1989, 1993, 1994
X *	The Regents of the University of California.  All rights reserved.
X *
X * This code is derived from software contributed to Berkeley by
X * Guido van Rossum.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X
X#if defined(LIBC_SCCS) && !defined(lint)
Xstatic UConst char sccsid[] = "@(#)fnmatch.c	8.17 (Berkeley) 10/10/10";
X#endif /* LIBC_SCCS and not lint */
X/* "FBSD src/lib/libc/gen/fnmatch.c,v 1.19 2010/04/16 22:29:24 jilles Exp $" */
X
X/*
X * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
X * Compares a filename or pathname to a pattern.
X */
X
X/*
X * Some notes on multibyte character support:
X * 1. Patterns with illegal byte sequences match nothing.
X * 2. Illegal byte sequences in the "string" argument are handled by treating
X *    them as single-byte characters with a value of the first byte of the
X *    sequence cast to wchar_t.
X * 3. Multibyte conversion state objects (mbstate_t) are passed around and
X *    used for most, but not all, conversions. Further work will be required
X *    to support state-dependent encodings.
X */
X
X#include <schily/mconfig.h>
X#include <schily/fnmatch.h>
X#include <schily/limits.h>
X#include <schily/string.h>
X#include <schily/wchar.h>
X#include <schily/wctype.h>
X
X#define	EOS	'\0'
X
X#define	RANGE_MATCH	1
X#define	RANGE_NOMATCH	0
X#define	RANGE_ERROR	(-1)
X
Xstatic int rangematch __PR((const char *, wchar_t, int, char **, mbstate_t *));
Xstatic int fnmatch1 __PR((const char *, const char *, const char *, int,
X				mbstate_t, mbstate_t));
X
X#ifndef	HAVE_FNMATCH
X#undef	fnmatch
X#ifdef	HAVE_PRAGMA_WEAK
X#pragma	weak fnmatch =	js_fnmatch
X#else
Xint
Xfnmatch(pattern, string, flags)
X	const char	*pattern;
X	const char	*string;
X	int		flags;
X{
X	return (js_fnmatch(pattern, string, flags));
X}
X#endif
X#endif
X
Xint
Xjs_fnmatch(pattern, string, flags)
X	const char	*pattern;
X	const char	*string;
X	int		flags;
X{
X	/*
X	 * SunPro C gives a warning if we do not initialize an object:
X	 * static const mbstate_t initial;
X	 * GCC gives a warning if we try to initialize it.
X	 * As the POSIX standard forbids mbstate_t from being an array,
X	 * we do not need "const", the var is always copied when used as
X	 * a parapemeter for fnmatch1();
X	 */
X	static mbstate_t initial;
X
X	return (fnmatch1(pattern, string, string, flags, initial, initial));
X}
X
Xstatic int
Xfnmatch1(pattern, string, stringstart, flags, patmbs, strmbs)
X	const char	*pattern;
X	const char	*string;
X	const char	*stringstart;
X	int		flags;
X	mbstate_t	patmbs;
X	mbstate_t	strmbs;
X{
X	char *newp;
X	char c;
X	wchar_t pc, sc;
X	size_t pclen, sclen;
X
X	for (;;) {
X		pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs);
X		if (pclen == (size_t)-1 || pclen == (size_t)-2)
X			return (FNM_NOMATCH);
X		pattern += pclen;
X		sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs);
X		if (sclen == (size_t)-1 || sclen == (size_t)-2) {
X			sc = (unsigned char)*string;
X			sclen = 1;
X			memset(&strmbs, 0, sizeof (strmbs));
X		}
X		switch (pc) {
X		case EOS:
X			if ((flags & FNM_LEADING_DIR) && sc == '/')
X				return (0);
X			return (sc == EOS ? 0 : FNM_NOMATCH);
X		case '?':
X			if (sc == EOS)
X				return (FNM_NOMATCH);
X			if (sc == '/' && (flags & FNM_PATHNAME))
X				return (FNM_NOMATCH);
X			if (sc == '.' && (flags & FNM_PERIOD) &&
X			    (string == stringstart ||
X			    ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
X				return (FNM_NOMATCH);
X			string += sclen;
X			break;
X		case '*':
X			c = *pattern;
X			/* Collapse multiple stars. */
X			while (c == '*')
X				c = *++pattern;
X
X			if (sc == '.' && (flags & FNM_PERIOD) &&
X			    (string == stringstart ||
X			    ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
X				return (FNM_NOMATCH);
X
X			/* Optimize for pattern with * at end or before /. */
X			if (c == EOS) {
X				if (flags & FNM_PATHNAME)
X					return ((flags & FNM_LEADING_DIR) ||
X					    strchr(string, '/') == NULL ?
X					    0 : FNM_NOMATCH);
X				else
X					return (0);
X			} else if (c == '/' && flags & FNM_PATHNAME) {
X				if ((string = strchr(string, '/')) == NULL)
X					return (FNM_NOMATCH);
X				break;
X			}
X
X			/* General case, use recursion. */
X			while (sc != EOS) {
X				if (!fnmatch1(pattern, string, stringstart,
X				    flags, patmbs, strmbs))
X					return (0);
X				sclen = mbrtowc(&sc, string, MB_LEN_MAX,
X				    &strmbs);
X				if (sclen == (size_t)-1 ||
X				    sclen == (size_t)-2) {
X					sc = (unsigned char)*string;
X					sclen = 1;
X					memset(&strmbs, 0, sizeof (strmbs));
X				}
X				if (sc == '/' && (flags & FNM_PATHNAME))
X					break;
X				string += sclen;
X			}
X			return (FNM_NOMATCH);
X		case '[':
X			if (sc == EOS)
X				return (FNM_NOMATCH);
X			if (sc == '/' && (flags & FNM_PATHNAME))
X				return (FNM_NOMATCH);
X			if (sc == '.' && (flags & FNM_PERIOD) &&
X			    (string == stringstart ||
X			    ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
X				return (FNM_NOMATCH);
X
X			switch (rangematch(pattern, sc, flags, &newp,
X						&patmbs)) {
X			case RANGE_ERROR:
X				goto norm;
X			case RANGE_MATCH:
X				pattern = newp;
X				break;
X			case RANGE_NOMATCH:
X				return (FNM_NOMATCH);
X			}
X			string += sclen;
X			break;
X		case '\\':
X			if (!(flags & FNM_NOESCAPE)) {
X				pclen = mbrtowc(&pc, pattern, MB_LEN_MAX,
X				    &patmbs);
X				if (pclen == (size_t)-1 || pclen == (size_t)-2)
X					return (FNM_NOMATCH);
X				if (pclen == 0)
X					pc = '\\';
X				pattern += pclen;
X			}
X			/* FALLTHROUGH */
X		default:
X		norm:
X			if (pc == sc)
X				;
X			else if ((flags & FNM_CASEFOLD) &&
X				    (towlower(pc) == towlower(sc)))
X				;
X			else
X				return (FNM_NOMATCH);
X			string += sclen;
X			break;
X		}
X	}
X	/* NOTREACHED */
X}
X
X#ifdef	PROTOTYPES
Xstatic int
Xrangematch(const char *pattern, wchar_t test, int flags, char **newp, mbstate_t *patmbs)
X#else
Xstatic int
Xrangematch(pattern, test, flags, newp, patmbs)
X	const char *pattern;
X	wchar_t test;
X	int flags;
X	char **newp;
X	mbstate_t *patmbs;
X#endif
X{
X	int negate, ok;
X	wchar_t c, c2;
X	size_t pclen;
X	const char *origpat;
X
X	/*
X	 * A bracket expression starting with an unquoted circumflex
X	 * character produces unspecified results (IEEE 1003.2-1992,
X	 * 3.13.2).  This implementation treats it like '!', for
X	 * consistency with the regular expression syntax.
X	 * J.T. Conklin (conklin@ngai.kaleida.com)
X	 */
X	if ((negate = (*pattern == '!' || *pattern == '^')))
X		++pattern;
X
X	if (flags & FNM_CASEFOLD)
X		test = towlower(test);
X
X	/*
X	 * A right bracket shall lose its special meaning and represent
X	 * itself in a bracket expression if it occurs first in the list.
X	 * -- POSIX.2 2.8.3.2
X	 */
X	ok = 0;
X	origpat = pattern;
X	for (;;) {
X		if (*pattern == ']' && pattern > origpat) {
X			pattern++;
X			break;
X		} else if (*pattern == '\0') {
X			return (RANGE_ERROR);
X		} else if (*pattern == '/' && (flags & FNM_PATHNAME)) {
X			return (RANGE_NOMATCH);
X		} else if (*pattern == '\\' && !(flags & FNM_NOESCAPE))
X			pattern++;
X		pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs);
X		if (pclen == (size_t)-1 || pclen == (size_t)-2)
X			return (RANGE_NOMATCH);
X		pattern += pclen;
X
X		if (flags & FNM_CASEFOLD)
X			c = towlower(c);
X
X		if (*pattern == '-' && *(pattern + 1) != EOS &&
X		    *(pattern + 1) != ']') {
X			if (*++pattern == '\\' && !(flags & FNM_NOESCAPE))
X				if (*pattern != EOS)
X					pattern++;
X			pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs);
X			if (pclen == (size_t)-1 || pclen == (size_t)-2)
X				return (RANGE_NOMATCH);
X			pattern += pclen;
X			if (c2 == EOS)
X				return (RANGE_ERROR);
X
X			if (flags & FNM_CASEFOLD)
X				c2 = towlower(c2);
X
X#ifdef	XXX_COLLATE
X			if (__collate_load_error ?
X			    c <= test && test <= c2 :
X			    __collate_range_cmp(c, test) <= 0 &&
X			    __collate_range_cmp(test, c2) <= 0)
X				ok = 1;
X#else
X			if (c <= test && test <= c2)
X				ok = 1;
X#endif
X		} else if (c == test)
X			ok = 1;
X	}
X
X	*newp = (char *)pattern;
X	return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH);
X}
END-of-star-1.5.2/lib/fnmatch.c
echo c - star-1.5.2/RULES
mkdir -p star-1.5.2/RULES > /dev/null 2>&1
echo x - star-1.5.2/RULES/9000-725-hp-ux-cc.rul
sed 's/^X//' >star-1.5.2/RULES/9000-725-hp-ux-cc.rul << 'END-of-star-1.5.2/RULES/9000-725-hp-ux-cc.rul'
X#ident "@(#)9000-725-hp-ux-cc.rul	1.13 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-hp.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/9000-725-hp-ux-cc.rul
echo x - star-1.5.2/RULES/9000-725-hp-ux-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/9000-725-hp-ux-gcc.rul << 'END-of-star-1.5.2/RULES/9000-725-hp-ux-gcc.rul'
X#ident "@(#)9000-725-hp-ux-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.sl
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLNDYNLIB=	@
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/9000-725-hp-ux-gcc.rul
echo x - star-1.5.2/RULES/alpha-osf1-cc.rul
sed 's/^X//' >star-1.5.2/RULES/alpha-osf1-cc.rul << 'END-of-star-1.5.2/RULES/alpha-osf1-cc.rul'
X#ident "@(#)alpha-osf1-cc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dec.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/alpha-osf1-cc.rul
echo x - star-1.5.2/RULES/alpha-osf1-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/alpha-osf1-gcc.rul << 'END-of-star-1.5.2/RULES/alpha-osf1-gcc.rul'
X#ident "@(#)alpha-osf1-gcc.rul	1.8 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLIBS_PATH=	-L$(OLIBSDIR) -L/usr/ccs/lib
X
XLDLIBS=		$(LIBS) $(LIBX) -lrt
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/alpha-osf1-gcc.rul
echo x - star-1.5.2/RULES/aviion-dgux3-cc.rul
sed 's/^X//' >star-1.5.2/RULES/aviion-dgux3-cc.rul << 'END-of-star-1.5.2/RULES/aviion-dgux3-cc.rul'
X#ident "@(#)aviion-dgux3-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 3.x on mc88100
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dg.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/aviion-dgux3-cc.rul
echo x - star-1.5.2/RULES/aviion-dgux3-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/aviion-dgux3-gcc.rul << 'END-of-star-1.5.2/RULES/aviion-dgux3-gcc.rul'
X#ident "@(#)aviion-dgux3-gcc.rul	1.9 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 3.x on mc88100
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLDOPTDYN=	-shared -ztext -h $(TARGET) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/aviion-dgux3-gcc.rul
echo x - star-1.5.2/RULES/aviion-dgux4-cc.rul
sed 's/^X//' >star-1.5.2/RULES/aviion-dgux4-cc.rul << 'END-of-star-1.5.2/RULES/aviion-dgux4-cc.rul'
X#ident "@(#)aviion-dgux4-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 4.x on mc88100/pentium
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dg.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/aviion-dgux4-cc.rul
echo x - star-1.5.2/RULES/aviion-dgux4-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/aviion-dgux4-gcc.rul << 'END-of-star-1.5.2/RULES/aviion-dgux4-gcc.rul'
X#ident "@(#)aviion-dgux4-gcc.rul	1.9 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX 4.x on mc88100/pentium
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
X
XLDOPTDYN=	-shared -ztext -h $(TARGET) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/aviion-dgux4-gcc.rul
echo x - star-1.5.2/RULES/bemac-beos-cc.rul
sed 's/^X//' >star-1.5.2/RULES/bemac-beos-cc.rul << 'END-of-star-1.5.2/RULES/bemac-beos-cc.rul'
X#ident @(#)bemac-beos-cc.rul	1.9 07/05/08 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
X#LIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/bemac-beos-cc.rul
echo x - star-1.5.2/RULES/bemac-beos-mwcc.rul
sed 's/^X//' >star-1.5.2/RULES/bemac-beos-mwcc.rul << 'END-of-star-1.5.2/RULES/bemac-beos-mwcc.rul'
X#ident @(#)bemac-beos-mwcc.rul	1.9 07/05/08 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
X#LIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/bemac-beos-mwcc.rul
echo x - star-1.5.2/RULES/bepc-beos-cc.rul
sed 's/^X//' >star-1.5.2/RULES/bepc-beos-cc.rul << 'END-of-star-1.5.2/RULES/bepc-beos-cc.rul'
X#ident @(#)bepc-beos-cc.rul	1.10 07/05/09 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	-lsocket -lbind
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/bepc-beos-cc.rul
echo x - star-1.5.2/RULES/bepc-beos-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/bepc-beos-gcc.rul << 'END-of-star-1.5.2/RULES/bepc-beos-gcc.rul'
X#ident @(#)bepc-beos-gcc.rul	1.12 07/05/09 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	-lsocket -lbind
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/bepc-beos-gcc.rul
echo x - star-1.5.2/RULES/dn5500-domainos-cc.rul
sed 's/^X//' >star-1.5.2/RULES/dn5500-domainos-cc.rul << 'END-of-star-1.5.2/RULES/dn5500-domainos-cc.rul'
X#ident "@(#)dn5500-domainos-cc.rul	1.6 07/05/08 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DomainOS (sys5.3, 10.4.1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-apollo.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
END-of-star-1.5.2/RULES/dn5500-domainos-cc.rul
echo x - star-1.5.2/RULES/dummy.dep
sed 's/^X//' >star-1.5.2/RULES/dummy.dep << 'END-of-star-1.5.2/RULES/dummy.dep'
X#ident @(#)dummy.dep	1.2 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building dummy rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xdepend rmdep:
X	@echo "$@: nothing to make"
END-of-star-1.5.2/RULES/dummy.dep
echo x - star-1.5.2/RULES/gmake.wrn
sed 's/^X//' >star-1.5.2/RULES/gmake.wrn << 'END-of-star-1.5.2/RULES/gmake.wrn'
X		W A R N I N G	Messages like:
X
Xgmake[2]: Entering directory `/tmp/cdrtools-2.01/libschily'
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/cvmod.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/dat.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fcons.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fdown.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fdup.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/ffileread.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/ffilewrite.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fgetline.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fgetstr.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/file_raise.d: No such file or directory
X../RULES/r-gmake.dep:76: OBJ/<arch-dir>/fileclose.d: No such file or directory
X....
X
Xare caused by a GNU make bug and not by the Schily makefile system.
X
XThe related bug has been reported to the GNU make maintainers in 1998 but
Xas the bug has not yet been fixed, it seems that GNU make is unmaintained :-(
XA working highly portable make program is at ftp://ftp.berlios.de/pub/smake
X
XYou may switch off this warning by calling "gmake GMAKE_NOWARN=true ..."
END-of-star-1.5.2/RULES/gmake.wrn
echo x - star-1.5.2/RULES/hppa-nextstep-cc.rul
sed 's/^X//' >star-1.5.2/RULES/hppa-nextstep-cc.rul << 'END-of-star-1.5.2/RULES/hppa-nextstep-cc.rul'
X#ident "@(#)hppa-nextstep-cc.rul	1.11 10/05/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step on hppa (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
END-of-star-1.5.2/RULES/hppa-nextstep-cc.rul
echo x - star-1.5.2/RULES/hppa-nextstep-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/hppa-nextstep-gcc.rul << 'END-of-star-1.5.2/RULES/hppa-nextstep-gcc.rul'
X#ident "@(#)hppa-nextstep-gcc.rul	1.11 10/05/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step on hppa (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/hppa-nextstep-gcc.rul
echo x - star-1.5.2/RULES/i386-at386-gnu-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-at386-gnu-cc.rul << 'END-of-star-1.5.2/RULES/i386-at386-gnu-cc.rul'
X#ident "@(#)i386-at386-gnu-cc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i386-at386-gnu-cc.rul
echo x - star-1.5.2/RULES/i386-at386-gnu-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-at386-gnu-gcc.rul << 'END-of-star-1.5.2/RULES/i386-at386-gnu-gcc.rul'
X#ident "@(#)i386-at386-gnu-gcc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i386-at386-gnu-gcc.rul
echo x - star-1.5.2/RULES/i386-bsd-os-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-bsd-os-cc.rul << 'END-of-star-1.5.2/RULES/i386-bsd-os-cc.rul'
X#ident "@(#)i386-bsd-os-cc.rul	1.14 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-bsd-os-cc.rul
echo x - star-1.5.2/RULES/i386-bsd-os-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-bsd-os-gcc.rul << 'END-of-star-1.5.2/RULES/i386-bsd-os-gcc.rul'
X#ident "@(#)i386-bsd-os-gcc.rul	1.14 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-bsd-os-gcc.rul
echo x - star-1.5.2/RULES/i386-bsd-os3-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-bsd-os3-cc.rul << 'END-of-star-1.5.2/RULES/i386-bsd-os3-cc.rul'
X#ident "@(#)i386-bsd-os3-cc.rul	1.12 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
X#		shlicc2 is not present oln older or newer systems
X#LDCC=		@echo "	==> LINKING \"$@\""; shlicc2
XLDCC=		@echo "	==> LINKING \"$@\""; shlicc
X#DYNLD=		@echo "	==> LINKING dynamic library \"$@\""; gcc
XDYNLD=
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-bsd-os3-cc.rul
echo x - star-1.5.2/RULES/i386-bsd-os3-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-bsd-os3-gcc.rul << 'END-of-star-1.5.2/RULES/i386-bsd-os3-gcc.rul'
X#ident "@(#)i386-bsd-os3-gcc.rul	1.12 07/05/09 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
X#		shlicc2 is not present oln older or newer systems
X#LDCC=		@echo "	==> LINKING \"$@\""; shlicc2
XLDCC=		@echo "	==> LINKING \"$@\""; shlicc
X#DYNLD=		@echo "	==> LINKING dynamic library \"$@\""; gcc
XDYNLD=
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-bsd-os3-gcc.rul
echo x - star-1.5.2/RULES/i386-freebsd-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-freebsd-cc.rul << 'END-of-star-1.5.2/RULES/i386-freebsd-cc.rul'
X#ident "@(#)i386-freebsd-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-freebsd-cc.rul
echo x - star-1.5.2/RULES/i386-freebsd-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-freebsd-gcc.rul << 'END-of-star-1.5.2/RULES/i386-freebsd-gcc.rul'
X#ident "@(#)i386-freebsd-gcc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-freebsd-gcc.rul
echo x - star-1.5.2/RULES/i386-mingw32_nt-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-mingw32_nt-gcc.rul << 'END-of-star-1.5.2/RULES/i386-mingw32_nt-gcc.rul'
X#ident "@(#)i386-mingw32_nt-gcc.rul	1.10 11/07/13 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmingw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/i386-mingw32_nt-gcc.rul
echo x - star-1.5.2/RULES/i386-ms-dos-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-ms-dos-gcc.rul << 'END-of-star-1.5.2/RULES/i386-ms-dos-gcc.rul'
X#ident "@(#)i386-ms-dos-gcc.rul	1.5 07/05/08 "
X###########################################################################
X#
X# Platform dependent MACROS for MSDOS/DJGPP v2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XCOPTDYN=
XCOPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=
X
X#LDCC=		@echo "	==> LINKING \"$@\""; gcc -Wl,--strip-all
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i386-ms-dos-gcc.rul
echo x - star-1.5.2/RULES/i386-netbsd-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-netbsd-cc.rul << 'END-of-star-1.5.2/RULES/i386-netbsd-cc.rul'
X#ident "@(#)i386-netbsd-cc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X#OSDEFS +=	-DIS_UNIX
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-netbsd-cc.rul
echo x - star-1.5.2/RULES/i386-netbsd-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-netbsd-gcc.rul << 'END-of-star-1.5.2/RULES/i386-netbsd-gcc.rul'
X#ident "@(#)i386-netbsd-gcc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X#OSDEFS +=	-DIS_UNIX
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-netbsd-gcc.rul
echo x - star-1.5.2/RULES/i386-openbsd-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-openbsd-cc.rul << 'END-of-star-1.5.2/RULES/i386-openbsd-cc.rul'
X#ident "@(#)i386-openbsd-cc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-openbsd-cc.rul
echo x - star-1.5.2/RULES/i386-openbsd-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-openbsd-gcc.rul << 'END-of-star-1.5.2/RULES/i386-openbsd-gcc.rul'
X#ident "@(#)i386-openbsd-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/i386-openbsd-gcc.rul
echo x - star-1.5.2/RULES/i386-openserver-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-openserver-cc.rul << 'END-of-star-1.5.2/RULES/i386-openserver-cc.rul'
X#ident "@(#)i386-openserver-cc.rul	1.4 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO OpenServer 5 using cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sco_os.rul
X
XOSDEFS +=	-DSCO -DOPENSERVER
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	
X
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; cc
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XLORDER=		echo
XTSORT=		cat
X
END-of-star-1.5.2/RULES/i386-openserver-cc.rul
echo x - star-1.5.2/RULES/i386-openserver-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-openserver-gcc.rul << 'END-of-star-1.5.2/RULES/i386-openserver-gcc.rul'
X#ident "@(#)i386-openserver-gcc.rul	1.8 10/05/15 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO OpenServer 5 using gcc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DSCO -DOPENSERVER
XCOPTS=		-melf
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/i386-openserver-gcc.rul
echo x - star-1.5.2/RULES/i386-os2-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-os2-gcc.rul << 'END-of-star-1.5.2/RULES/i386-os2-gcc.rul'
X#ident "@(#)i386-os2-gcc.rul	1.13 07/05/09 "
X###########################################################################
X# First version written 1999 by C. Wohlgemuth 
X###########################################################################
X#
X# Platform dependent MACROS for OS/2 using gcc (EMX)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X# XXX strtod.c now does floating point conversion on OS without ?cvt().
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work on any OS.
X#
XOSDEFS +=	-D__OS2
X
X#
X#		Using -Zcrtdll is a hack to allow this flag to be seen
X#		from configure too.
XCOPTS=		-Zcrtdll
X
XKDEFINES=
X
XCOPTDYN=
XCOPTGPROF=
XLIB_PREFIX=
XLIB_SUFFIX=	.a
XSHL_SUFFIX=
X
XLIB_SOCKET=	-lsocket
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLDOPTDYN=
X
XLDCC=		@echo "	==> LINKING \"$@\""; gcc -Zcrtdll
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i386-os2-gcc.rul
echo x - star-1.5.2/RULES/i386-unixware-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-unixware-cc.rul << 'END-of-star-1.5.2/RULES/i386-unixware-cc.rul'
X#ident "@(#)i386-unixware-cc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul
X
XOSDEFS +=	-DUNIXWARE -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XARFLAGS=	cr
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i386-unixware-cc.rul
echo x - star-1.5.2/RULES/i386-unixware-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i386-unixware-gcc.rul << 'END-of-star-1.5.2/RULES/i386-unixware-gcc.rul'
X#ident "@(#)i386-unixware-gcc.rul	1.6 07/05/08 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DUNIXWARE -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL 
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i386-unixware-gcc.rul
echo x - star-1.5.2/RULES/i486-cygwin32_nt-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i486-cygwin32_nt-cc.rul << 'END-of-star-1.5.2/RULES/i486-cygwin32_nt-cc.rul'
X#ident "@(#)i486-cygwin32_nt-cc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1998 by B. Bochow
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i486-cygwin32_nt-cc.rul
echo x - star-1.5.2/RULES/i486-cygwin32_nt-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i486-cygwin32_nt-gcc.rul << 'END-of-star-1.5.2/RULES/i486-cygwin32_nt-gcc.rul'
X#ident "@(#)i486-cygwin32_nt-gcc.rul	1.10 07/05/09 "
X###########################################################################
X# Written 1998 by B. Bochow
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i486-cygwin32_nt-gcc.rul
echo x - star-1.5.2/RULES/i486-mingw32_nt-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i486-mingw32_nt-gcc.rul << 'END-of-star-1.5.2/RULES/i486-mingw32_nt-gcc.rul'
X#ident "@(#)i486-mingw32_nt-gcc.rul	1.9 11/07/13 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmingw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/i486-mingw32_nt-gcc.rul
echo x - star-1.5.2/RULES/i586-linux-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-linux-cc.rul << 'END-of-star-1.5.2/RULES/i586-linux-cc.rul'
X#ident "@(#)i586-linux-cc.rul	1.13 08/11/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i586-linux-cc.rul
echo x - star-1.5.2/RULES/i586-linux-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-linux-gcc.rul << 'END-of-star-1.5.2/RULES/i586-linux-gcc.rul'
X#ident "@(#)i586-linux-gcc.rul	1.13 08/11/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i586-linux-gcc.rul
echo x - star-1.5.2/RULES/i586-mingw32_nt-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-mingw32_nt-gcc.rul << 'END-of-star-1.5.2/RULES/i586-mingw32_nt-gcc.rul'
X#ident "@(#)i586-mingw32_nt-gcc.rul	1.9 11/07/13 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmingw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/i586-mingw32_nt-gcc.rul
echo x - star-1.5.2/RULES/i686-mingw32_nt-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i686-mingw32_nt-gcc.rul << 'END-of-star-1.5.2/RULES/i686-mingw32_nt-gcc.rul'
X#ident "@(#)i686-mingw32_nt-gcc.rul	1.9 11/07/13 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmingw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/i686-mingw32_nt-gcc.rul
echo x - star-1.5.2/RULES/i786-mingw32_nt-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i786-mingw32_nt-gcc.rul << 'END-of-star-1.5.2/RULES/i786-mingw32_nt-gcc.rul'
X#ident "@(#)i786-mingw32_nt-gcc.rul	1.9 11/07/13 "
X###########################################################################
X#
X# Platform dependent MACROS for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
XCPPOPTS=	-I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLDLIBS=		$(LIBS) $(LIBX) -lmingw32
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
END-of-star-1.5.2/RULES/i786-mingw32_nt-gcc.rul
echo x - star-1.5.2/RULES/i86pc-sunos5-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i86pc-sunos5-cc.rul << 'END-of-star-1.5.2/RULES/i86pc-sunos5-cc.rul'
X#ident "@(#)i86pc-sunos5-cc.rul	1.12 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/i86pc-sunos5-cc.rul
echo x - star-1.5.2/RULES/i86pc-sunos5-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i86pc-sunos5-gcc.rul << 'END-of-star-1.5.2/RULES/i86pc-sunos5-gcc.rul'
X#ident "@(#)i86pc-sunos5-gcc.rul	1.14 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x for PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# Solaris comes with a linker that supports mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/i86pc-sunos5-gcc.rul
echo x - star-1.5.2/RULES/ip22-irix-cc.rul
sed 's/^X//' >star-1.5.2/RULES/ip22-irix-cc.rul << 'END-of-star-1.5.2/RULES/ip22-irix-cc.rul'
X#ident "@(#)ip22-irix-cc.rul	1.9 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sgi.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4 $(LARGEFILE_OPT)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/ip22-irix-cc.rul
echo x - star-1.5.2/RULES/ip22-irix-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/ip22-irix-gcc.rul << 'END-of-star-1.5.2/RULES/ip22-irix-gcc.rul'
X#ident "@(#)ip22-irix-gcc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/ip22-irix-gcc.rul
echo x - star-1.5.2/RULES/ldummy.cnf
sed 's/^X//' >star-1.5.2/RULES/ldummy.cnf << 'END-of-star-1.5.2/RULES/ldummy.cnf'
X#ident @(#)ldummy.cnf	1.2 06/05/14 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Dummy Make Rules for local dynamic configuration
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
END-of-star-1.5.2/RULES/ldummy.cnf
echo x - star-1.5.2/RULES/local.cnf
sed 's/^X//' >star-1.5.2/RULES/local.cnf << 'END-of-star-1.5.2/RULES/local.cnf'
X#ident @(#)local.cnf	1.9 08/08/01 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Make Rules for local dynamic configuration
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xconfigure: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 aclocal.m4 \
X						local.cnf.in lconfig.h.in
X	@echo "	==> AUTOCONFIGURING LOCAL \"$@\""; sh ./autoconf
X
X#config: $(ARCHDIR)/local.cnf
X
X$(ARCHDIR)/Inull:
X	$(MKDIR) -p $(ARCHDIR)
X	@echo > $@
X
X$(ARCHDIR)/local.cnf $(ARCHDIR)/lconfig.h: $(LCONFIG_DEP) $(ARCHDIR)/Inull \
X						configure local.cnf.in lconfig.h.in
X	$(RUL_LCONF)
X
X###########################################################################
XRUL_LCONF=	@echo "	==> CONFIGURING LOCAL RULES \"$@\""; $(RM_F) $@; \
X		cd $(ARCHDIR); \
X		CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \
X		CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \
X		LDFLAGS="$(LDOPTS)" sh ../../configure $(CONFFLAGS)
X###########################################################################
Xinclude $(ARCHDIR)/Inull
Xinclude $(ARCHDIR)/local.cnf
X###########################################################################
END-of-star-1.5.2/RULES/local.cnf
echo x - star-1.5.2/RULES/m68k-amigaos-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/m68k-amigaos-gcc.rul << 'END-of-star-1.5.2/RULES/m68k-amigaos-gcc.rul'
X#ident "@(#)m68k-amigaos-gcc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 1997,2001 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for AmigaOS GCC systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/m68k-amigaos-gcc.rul
echo x - star-1.5.2/RULES/man-bsd.def
sed 's/^X//' >star-1.5.2/RULES/man-bsd.def << 'END-of-star-1.5.2/RULES/man-bsd.def'
X#ident @(#)man-bsd.def	1.2 06/05/14 
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Definition for manual sections on BSD based systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMANSECT_CMD=		man1
XMANSECT_SYSCALL=	man2
XMANSECT_LIB=		man3
XMANSECT_FILEFORM=	man5
XMANSECT_HDR=		man7
XMANSECT_TABLES=		man7
XMANSECT_MACROS=		man7
XMANSECT_GAMES=		man6
XMANSECT_DEMOS=		man6
XMANSECT_DEVICE=		man4
XMANSECT_NETWORK=	man4
XMANSECT_ADMIN=		man8
XMANSECT_DRIVER=		man4
X
XMANSUFF_CMD=		1
XMANSUFF_SYSCALL=	2
XMANSUFF_LIB=		3
XMANSUFF_FILEFORM=	5
XMANSUFF_HDR=		7
XMANSUFF_TABLES=		7
XMANSUFF_MACROS=		7
XMANSUFF_GAMES=		6
XMANSUFF_DEMOS=		6
XMANSUFF_DEVICE=		4
XMANSUFF_NETWORK=	4
XMANSUFF_ADMIN=		8
XMANSUFF_DRIVER=		4
END-of-star-1.5.2/RULES/man-bsd.def
echo x - star-1.5.2/RULES/man-sysv.def
sed 's/^X//' >star-1.5.2/RULES/man-sysv.def << 'END-of-star-1.5.2/RULES/man-sysv.def'
X#ident @(#)man-sysv.def	1.2 06/05/14 
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Definition for manual sections on SYSV based systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMANSECT_CMD=		man1
XMANSECT_SYSCALL=	man2
XMANSECT_LIB=		man3
XMANSECT_FILEFORM=	man4
XMANSECT_HDR=		man5
XMANSECT_TABLES=		man5
XMANSECT_MACROS=		man5
XMANSECT_GAMES=		man6
XMANSECT_DEMOS=		man6
XMANSECT_DEVICE=		man7
XMANSECT_NETWORK=	man7
XMANSECT_ADMIN=		man8
XMANSECT_DRIVER=		man9
X
XMANSUFF_CMD=		1
XMANSUFF_SYSCALL=	2
XMANSUFF_LIB=		3
XMANSUFF_FILEFORM=	4
XMANSUFF_HDR=		5
XMANSUFF_TABLES=		5
XMANSUFF_MACROS=		5
XMANSUFF_GAMES=		6
XMANSUFF_DEMOS=		6
XMANSUFF_DEVICE=		7
XMANSUFF_NETWORK=	7
XMANSUFF_ADMIN=		8
XMANSUFF_DRIVER=		9
END-of-star-1.5.2/RULES/man-sysv.def
echo x - star-1.5.2/RULES/mk-.id
sed 's/^X//' >star-1.5.2/RULES/mk-.id << 'END-of-star-1.5.2/RULES/mk-.id'
X#ident "@(#)mk-.id	1.18 12/12/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Name of make program (make/gmake/smake)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMAKEPROG=	make		# Sun make
XWAIT=		.WAIT		# Sun make notation to wait for parallel targets
X
XSPACE=		$(_UNIQ:$(_UNIQ)%= )
XPRE_NUMBER=	pre\#
XNUMBER_SIGN=	$(PRE_NUMBER:pre\%=%)
X
X###########################################################################
X#
X# standard (automatic) machine identification
X#
X###########################################################################
X#
X# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
X# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
X# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
X#
X###########################################################################
X#
X# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit
X# many different chars to '-' using e.g. tr ', /\\()"' ',------'
X#
X# This is why we use sed 'y%ABC\\%abc-%'. Note that this will not work on *BSD
X#
X###########################################################################
X
XXP_ARCH:sh=	(mach || uname -p || true)2>/dev/null      | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XXK_ARCH:sh=	uname -m                                   | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XXM_ARCH:sh=	(arch || /usr/ucb/arch || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
X
XP_ARCH=		$(XP_ARCH)
XK_ARCH=		$(XK_ARCH)
XM_ARCH=		$(XM_ARCH)
X
X_XP_ARCH=	$(XP_ARCH:unknown=$(K_ARCH))
X
X_P_ARCH=	$(_UNIQ)$(_XP_ARCH)
X__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(K_ARCH))
XP_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
X
X_M_ARCH=	$(_UNIQ)$(XM_ARCH)
X__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(K_ARCH))
XM_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
X
XOSNAME:sh=	uname -s | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XOSREL:sh=	uname -r | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
XOSVERSION:sh=	uname -v | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
END-of-star-1.5.2/RULES/mk-.id
echo x - star-1.5.2/RULES/MKLINKS
sed 's/^X//' >star-1.5.2/RULES/MKLINKS << 'END-of-star-1.5.2/RULES/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.95 12/08/14 "
X###########################################################################
X# Written 1996-2011 by J. Schilling
X###########################################################################
X# Copyright (c) 1996-2011 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xif [ -r ldummy.lnk ]; then
X	if [ $# -le 0 ]; then
X		exit 0
X	fi
Xfi
X###########################################################################
Xsymlink="ln -s"
XMKLINKS_TEST=${MKLINKS_TEST-:}
Xif [ ".$MKLINKS_COPY" = '.' ]; then
X	rm -f xxzzy.123 xxzzy.345
X	echo test > xxzzy.123
X	$symlink xxzzy.123 xxzzy.345
X	test $? = 0 || symlink=cp
X	test -r xxzzy.345 || symlink=cp
X	${MKLINKS_TEST} -h xxzzy.345 || symlink=cp
X	rm -f xxzzy.123 xxzzy.345
Xelse
X	symlink=cp
Xfi
X###########################################################################
X
X$symlink	ldummy.cnf		ldummy.lnk
X$symlink	mk-.id			mk-make.id
X$symlink	9000-725-hp-ux-cc.rul	9000-710-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-712-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-715-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-735-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-743-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-755-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-777-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-778-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-780-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-782-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-785-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-800-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-820-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-831-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	9000-899-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc.rul	ia64-hp-ux-cc.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-710-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-712-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-715-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-735-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-743-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-755-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-777-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-778-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-780-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-782-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-785-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-800-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-820-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-831-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	9000-899-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-cc64.rul	ia64-hp-ux-cc64.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-710-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-712-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-715-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-735-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-743-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-755-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-777-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-778-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-780-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-782-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-785-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-800-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-820-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-831-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	9000-899-hp-ux-gcc.rul
X$symlink	9000-725-hp-ux-gcc.rul	ia64-hp-ux-gcc.rul
X$symlink	hppa-nextstep-cc.rul	i386-nextstep-cc.rul
X$symlink	hppa-nextstep-cc.rul	m68k-nextstep-cc.rul
X$symlink	hppa-nextstep-cc.rul	sparc-nextstep-cc.rul
X$symlink	hppa-nextstep-cc.rul	i386-nextstep-gcc.rul
X$symlink	hppa-nextstep-cc.rul	m68k-nextstep-gcc.rul
X$symlink	hppa-nextstep-cc.rul	sparc-nextstep-gcc.rul
X$symlink	os-irix.id		os-irix64.id
X$symlink	ip22-irix-cc.rul	ip17-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip20-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip27-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip28-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip30-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip32-irix-cc.rul
X$symlink	ip22-irix-cc.rul	ip35-irix-cc.rul
X$symlink	ip22-irix-gcc.rul	ip17-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip20-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip27-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip28-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip30-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip32-irix-gcc.rul
X$symlink	ip22-irix-gcc.rul	ip35-irix-gcc.rul
X$symlink	ip22-irix-cc64.rul	ip17-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip20-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip27-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip28-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip30-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip32-irix-cc64.rul
X$symlink	ip22-irix-cc64.rul	ip35-irix-cc64.rul
X$symlink	ip22-irix-gcc64.rul	ip17-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip20-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip27-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip28-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip30-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip32-irix-gcc64.rul
X$symlink	ip22-irix-gcc64.rul	ip35-irix-gcc64.rul
X$symlink	i386-at386-gnu-cc.rul	i686-at386-gnu-cc.rul
X$symlink	i386-at386-gnu-gcc.rul	i686-at386-gnu-gcc.rul
X$symlink	i386-freebsd-cc.rul	sparc64-freebsd-cc.rul
X$symlink	i386-freebsd-gcc.rul	sparc64-freebsd-gcc.rul
X$symlink	i386-freebsd-cc.rul	amd64-freebsd-cc.rul
X$symlink	i386-freebsd-gcc.rul	amd64-freebsd-gcc.rul
X$symlink	i386-freebsd-cc.rul	i386-dragonfly-cc.rul
X$symlink	i386-freebsd-gcc.rul	i386-dragonfly-gcc.rul
X$symlink	i386-freebsd-cc.rul	x86_64-dragonfly-cc.rul
X$symlink	i386-freebsd-gcc.rul	x86_64-dragonfly-gcc.rul
X$symlink	i386-netbsd-cc.rul	amd64-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	amd64-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	alpha-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	alpha-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	sparc-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	sparc-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	mac68k-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	mac68k-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	amiga-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	amiga-netbsd-gcc.rul
X$symlink	i386-netbsd-cc.rul	macppc-netbsd-cc.rul
X$symlink	i386-netbsd-gcc.rul	macppc-netbsd-gcc.rul
X$symlink	i386-openbsd-cc.rul	amd64-openbsd-cc.rul
X$symlink	i386-openbsd-gcc.rul	amd64-openbsd-gcc.rul
X$symlink	i386-bsd-os-cc.rul	sparc-bsd-os-cc.rul
X$symlink	i386-bsd-os-gcc.rul	sparc-bsd-os-gcc.rul
X$symlink	i386-bsd-os3-cc.rul	sparc-bsd-os3-cc.rul
X$symlink	i386-bsd-os3-gcc.rul	sparc-bsd-os3-gcc.rul
X$symlink	i586-linux-cc.rul	i386-linux-cc.rul
X$symlink	i586-linux-cc.rul	i486-linux-cc.rul
X$symlink	i586-linux-cc.rul	i686-linux-cc.rul
X$symlink	i586-linux-gcc.rul	i386-linux-gcc.rul
X$symlink	i586-linux-gcc.rul	i486-linux-gcc.rul
X$symlink	i586-linux-gcc.rul	i686-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sparc-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sparc-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sparc64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sparc64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	alpha-linux-cc.rul
X$symlink	i586-linux-gcc.rul	alpha-linux-gcc.rul
X$symlink	i586-linux-cc.rul	ppc-linux-cc.rul
X$symlink	i586-linux-gcc.rul	ppc-linux-gcc.rul
X$symlink	i586-linux-cc.rul	m68k-linux-cc.rul
X$symlink	i586-linux-gcc.rul	m68k-linux-gcc.rul
X$symlink	i586-linux-cc.rul	armv4l-linux-cc.rul
X$symlink	i586-linux-gcc.rul	armv4l-linux-gcc.rul
X$symlink	i586-linux-cc.rul	mips-linux-cc.rul
X$symlink	i586-linux-gcc.rul	mips-linux-gcc.rul
X$symlink	i586-linux-cc.rul	mipsel-linux-cc.rul
X$symlink	i586-linux-gcc.rul	mipsel-linux-gcc.rul
X$symlink	i586-linux-cc.rul	mips64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	mips64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	s390-linux-cc.rul
X$symlink	i586-linux-gcc.rul	s390-linux-gcc.rul
X$symlink	i586-linux-cc.rul	parisc-linux-cc.rul
X$symlink	i586-linux-gcc.rul	parisc-linux-gcc.rul
X$symlink	i586-linux-cc.rul	parisc64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	parisc64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	ia64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	ia64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	x86_64-linux-cc.rul
X$symlink	i586-linux-gcc.rul	x86_64-linux-gcc.rul
X$symlink	i586-linux-cc.rul	armv5teb-linux-cc.rul
X$symlink	i586-linux-gcc.rul	armv5teb-linux-gcc.rul
X$symlink	i586-linux-cc.rul	armv5tejl-linux-cc.rul
X$symlink	i586-linux-gcc.rul	armv5tejl-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sh3-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sh3-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sh4-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sh4-linux-gcc.rul
X$symlink	i586-linux-cc.rul	sh4a-linux-cc.rul
X$symlink	i586-linux-gcc.rul	sh4a-linux-gcc.rul
X$symlink	i586-linux-gcc32.rul	x86_64-linux-gcc32.rul
X$symlink	i586-linux-gcc32.rul	sparc64-linux-gcc32.rul
X$symlink	i586-linux-gcc32.rul	mips64-linux-gcc32.rul
X$symlink	i586-linux-gcc32.rul	parisc64-linux-gcc32.rul
X$symlink	i586-linux-suncc.rul	i686-linux-suncc.rul
X$symlink	i586-linux-suncc.rul	i486-linux-suncc.rul
X$symlink	i586-linux-suncc.rul	i386-linux-suncc.rul
X$symlink	i586-linux-suncc.rul	x86_64-linux-suncc.rul
X$symlink	i586-linux-suncc64.rul	i686-linux-suncc64.rul
X$symlink	i586-linux-suncc64.rul	x86_64-linux-suncc64.rul
X$symlink	i586-linux-cc.rul	i386-gnu-kfreebsd-cc.rul
X$symlink	i586-linux-gcc.rul	i386-gnu-kfreebsd-gcc.rul
X$symlink	i586-linux-cc.rul	i486-gnu-kfreebsd-cc.rul
X$symlink	i586-linux-gcc.rul	i486-gnu-kfreebsd-gcc.rul
X$symlink	i586-linux-cc.rul	i586-gnu-kfreebsd-cc.rul
X$symlink	i586-linux-gcc.rul	i586-gnu-kfreebsd-gcc.rul
X$symlink	i586-linux-cc.rul	i686-gnu-kfreebsd-cc.rul
X$symlink	i586-linux-gcc.rul	i686-gnu-kfreebsd-gcc.rul
X$symlink	i586-linux-cc.rul	amd64-gnu-kfreebsd-cc.rul
X$symlink	i586-linux-gcc.rul	amd64-gnu-kfreebsd-gcc.rul
X$symlink	i586-linux-gcc32.rul	amd64-gnu-kfreebsd-gcc32.rul
X$symlink	i586-linux-cc.rul	x86_64-gnu-kfreebsd-cc.rul
X$symlink	i586-linux-gcc.rul	x86_64-gnu-kfreebsd-gcc.rul
X$symlink	i586-linux-gcc32.rul	x86_64-gnu-kfreebsd-gcc32.rul
X#$symlink	os-cygwin32_nt.id	os-cygwin_95-4.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_98-4.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_98-4.10.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_me-4.90.id 
X#$symlink	os-cygwin32_nt.id	os-cygwin_nt-4.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_nt-5.0.id
X#$symlink	os-cygwin32_nt.id	os-cygwin_nt-5.1.id
X$symlink	os-cygwin_95-4.0.id	os-cygwin_98-4.0.id
X$symlink	os-unixware.id		os-openunix.id
X$symlink	i486-cygwin32_nt-cc.rul	i386-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i586-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i686-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i786-cygwin32_nt-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i686-cygwin32_wow64-cc.rul
X$symlink	i486-cygwin32_nt-cc.rul	i786-cygwin32_wow64-cc.rul
X$symlink	i486-cygwin32_nt-cc64.rul	i686-cygwin32_wow64-cc64.rul
X$symlink	i486-cygwin32_nt-cc64.rul	i786-cygwin32_wow64-cc64.rul
X$symlink	i486-cygwin32_nt-cl.rul	i386-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i586-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i686-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i786-cygwin32_nt-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i686-cygwin32_wow64-cl.rul
X$symlink	i486-cygwin32_nt-cl.rul	i786-cygwin32_wow64-cl.rul
X$symlink	i686-cygwin32_wow64-cl64.rul	i686-cygwin32_nt-cl64.rul
X$symlink	i686-cygwin32_wow64-cl64.rul	i786-cygwin32_nt-cl64.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i386-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i586-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i686-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i786-cygwin32_nt-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i686-cygwin32_wow64-gcc.rul
X$symlink	i486-cygwin32_nt-gcc.rul	i786-cygwin32_wow64-gcc.rul
X$symlink	i486-cygwin32_nt-gcc64.rul	i686-cygwin32_wow64-gcc64.rul
X$symlink	i486-cygwin32_nt-gcc64.rul	i786-cygwin32_wow64-gcc64.rul
X$symlink	power-macintosh-rhapsody-cc.rul	power-macintosh-mac-os10-cc.rul
X$symlink	power-macintosh-rhapsody-gcc.rul	power-macintosh-mac-os10-gcc.rul
X$symlink	power-macintosh-darwin-cc.rul	i386-darwin-cc.rul
X$symlink	power-macintosh-darwin-gcc.rul	i386-darwin-gcc.rul
X$symlink	power-macintosh-darwin-cc64.rul	i386-darwin-cc64.rul
X$symlink	power-macintosh-darwin-gcc64.rul	i386-darwin-gcc64.rul
X$symlink	power-macintosh-darwin-cc32.rul	i386-darwin-cc32.rul
X$symlink	power-macintosh-darwin-gcc32.rul	i386-darwin-gcc32.rul
X$symlink	power-macintosh-darwin-cc.rul	x86_64-darwin-cc.rul
X$symlink	power-macintosh-darwin-gcc.rul	x86_64-darwin-gcc.rul
X$symlink	power-macintosh-darwin-cc64.rul	x86_64-darwin-cc64.rul
X$symlink	power-macintosh-darwin-gcc64.rul	x86_64-darwin-gcc64.rul
X$symlink	power-macintosh-darwin-cc32.rul	x86_64-darwin-cc32.rul
X$symlink	power-macintosh-darwin-gcc32.rul	x86_64-darwin-gcc32.rul
X$symlink	sun4-sunos4-cc.rul	sun4c-sunos4-cc.rul
X$symlink	sun4-sunos4-gcc.rul	sun4c-sunos4-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4c-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4c-sunos5-gcc.rul
X$symlink	sun4-sunos4-cc.rul	sun4m-sunos4-cc.rul
X$symlink	sun4-sunos4-gcc.rul	sun4m-sunos4-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4m-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4m-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4d-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4d-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4e-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4e-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4L-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4L-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc.rul	sun4u-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4u-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc64.rul	sun4u-sunos5-cc64.rul
X$symlink	sun4-sunos5-gcc64.rul	sun4u-sunos5-gcc64.rul
X$symlink	sun4-sunos5-cc.rul	sun4us-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4us-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc64.rul	sun4us-sunos5-cc64.rul
X$symlink	sun4-sunos5-gcc64.rul	sun4us-sunos5-gcc64.rul
X$symlink	sun4-sunos5-cc.rul	sun4v-sunos5-cc.rul
X$symlink	sun4-sunos5-gcc.rul	sun4v-sunos5-gcc.rul
X$symlink	sun4-sunos5-cc64.rul	sun4v-sunos5-cc64.rul
X$symlink	sun4-sunos5-gcc64.rul	sun4v-sunos5-gcc64.rul
X$symlink	i386-unixware-cc.rul	i486-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	i486-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	i586-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	i586-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	pentium-iii-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	pentium-iii-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	pentium-pro-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	pentium-pro-unixware-gcc.rul
X$symlink	i386-unixware-cc.rul	pentium-4-unixware-cc.rul
X$symlink	i386-unixware-gcc.rul	pentium-4-unixware-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i486-ms-dos-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i586-ms-dos-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i686-ms-dos-gcc.rul
X$symlink	i386-ms-dos-gcc.rul	i786-ms-dos-gcc.rul
X$symlink	atarist-freemint-gcc.rul	atariclone-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	atariste-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	ataritt-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	falcon-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	milan-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	hades-freemint-gcc.rul
X$symlink	atarist-freemint-gcc.rul	aranym-freemint-gcc.rul
X$symlink	bepc-beos-gcc.rul	bemac-beos-gcc.rul
X$symlink	bepc-haiku-cc.rul	bemac-haiku-cc.rul
X$symlink	bepc-haiku-gcc.rul	bemac-haiku-gcc.rul
X$symlink	alpha-openvms-cc.rul	alphaserver_ds20_500_mhz-openvms-cc.rul
X#
X$symlink	mk-smake.id		mk-build.id
X$symlink	r-smake.dep		r-build.dep
X$symlink	r-smake.obj		r-build.obj
X$symlink	r-smake.tag		r-build.tag
X$symlink	r-make.obj		r-gmake.obj
X
Xif [ -r r-make.c4x ]; then
X	$symlink	r-make.c4x		r-gmake.c4x
X	$symlink	r-make.c4x-dep		r-gmake.c4x-dep
X	$symlink	r-smake.c4x		r-build.c4x
X	$symlink	r-smake.c4x-dep		r-build.c4x-dep
Xfi
END-of-star-1.5.2/RULES/MKLINKS
echo x - star-1.5.2/RULES/mk-gmake.id
sed 's/^X//' >star-1.5.2/RULES/mk-gmake.id << 'END-of-star-1.5.2/RULES/mk-gmake.id'
X#ident "@(#)mk-gmake.id	1.24 12/12/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Name of make program (make/gmake/smake)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X_SETENV=	$(_UNIQ)$(SETENV)
X__SETENV=	$(_SETENV:$(_UNIQ)=rules.env)
X___SETENV=	$(__SETENV:$(_UNIQ)none=rules.nul)
XSET_ENV=	$(___SETENV:$(_UNIQ)%=%)
X
Xinclude		$(SRCROOT)/$(RULESDIR)/$(SET_ENV)
X
XMAKEPROG=	gmake
X.SHELLFLAGS=	-ce	# switch gmake-3.82 ff. to POSIX behavior
XWAIT=			# gmake is unable to wait for parallel targets
X
XSPACE=		$(_UNIQ:$(_UNIQ)%= )
XPRE_NUMBER=	pre\#
XNUMBER_SIGN=	$(PRE_NUMBER:pre%=%)
X
X###########################################################################
X#
X# standard (automatic) machine identification
X#
X###########################################################################
X#
X# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
X# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
X# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
X#
X###########################################################################
X#
X# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit
X# many different chars to '-' using e.g. tr ', /\\()"' ',------'
X# This is why we first tranliterate everything to '/ and later to '-'
X#
X# Due to a bug in *BSDs sed, we cannot use sed 'y%ABC\\%abc-%'
X#
X###########################################################################
X
Xifndef		ARCH_DONE
X
Xifndef		GMAKE_NOWARN
X__gmake_warn:=	$(shell cat $(SRCROOT)/$(RULESDIR)/gmake.wrn 1>&2; sleep 2)
Xendif
X
X_MACHCMD=	(mach || uname -p || true)	2> /dev/null
X_ARCHCMD=	(arch || /usr/ucb/arch || true)	2> /dev/null
X
XXP_ARCH:=	$(shell $(_MACHCMD) | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XXK_ARCH:=	$(shell uname -m    | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XXM_ARCH:=	$(shell $(_ARCHCMD) | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
X
XP_ARCH=		$(XP_ARCH)
XK_ARCH=		$(XK_ARCH)
XM_ARCH=		$(XM_ARCH)
X
X_XP_ARCH=	$(XP_ARCH:unknown=$(K_ARCH))
X
X_P_ARCH=	$(_UNIQ)$(_XP_ARCH)
X__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(K_ARCH))
XP_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
X
X_M_ARCH=	$(_UNIQ)$(XM_ARCH)
X__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(K_ARCH))
XM_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
X
XOSNAME:=	$(shell uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XOSREL:=		$(shell uname -r | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
XOSVERSION:=	$(shell uname -v | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-')
X
XARCH_DONE=	TRUE
X
Xexport		XP_ARCH
Xexport		K_ARCH
Xexport		XM_ARCH
Xexport		P_ARCH
Xexport		M_ARCH
Xexport		OSNAME
Xexport		OSREL
Xexport		OSVERSION
Xexport		ARCH_DONE
X
Xendif
END-of-star-1.5.2/RULES/mk-gmake.id
echo x - star-1.5.2/RULES/r-smake.dep
sed 's/^X//' >star-1.5.2/RULES/r-smake.dep << 'END-of-star-1.5.2/RULES/r-smake.dep'
X#ident "@(#)r-smake.dep	1.13 09/11/23 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules for smake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XDEP_SUFFIX=	.d
XRMDEP=		$(RM) $(RM_FORCE) $(ARCHDIR)/$@
X___C++DEP_FILES= $(C++FILES:%.C=%.d)
X__C++DEP_FILES=	$(___C++DEP_FILES:%.cc=%.d)
X_C++DEP_FILES=	$(__C++DEP_FILES:%.cpp=%.d)
XC++DEP_FILES=	$(_C++DEP_FILES:%.cxx=%.d)
XC++PDEP_FILES=	$(C++DEP_FILES:%=$(ARCHDIR)/%)
XDEP_FILE=	$(CFILES:%.c=%.d)		$(C++DEP_FILES)
XPDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)
XPALLDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)	$(ARCHDIR)/$(TARGET).dep
X###########################################################################
Xdepend: rmdep $(DEP_FILE)
X
Xrmdep:
X	$(RM) $(RM_FORCE) $(PALLDEP_FILE)
X
X###########################################################################
X#
X# Make the complete path to the architecture subdirectory.
X#
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
X#
X# Generate dependency file(s).
X# This rules is checked when the dependency file(s) are included.
X#
X# Modify the the path for .o files to reflect that they are placed in
X# $(ARCHDIR). Add the dependency file itself to each line so that
X# the dependencies will be rebuilt if a source is newer that the
X# appropriate dependency file.
X#
X###########################################################################
X
X# Do not define Simple Suffix Rules anymore
X#.d:	.c
X#	$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X#		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X
X%.d: %.c
X	$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X
X%.d: %.C
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X%.d: %.cc
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X%.d: %.cpp
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X%.d: %.cxx
X	$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X		| sed -e 's;^\(.*\)\.$o[ 	]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@
X
XDnull: $(ARCHDIR)
X	@echo > $O/$@
X
X#$(DEP_FILE):
X#		$(MKDEP) $(CPPFLAGS) -f - $(CFILES) \
X#			| sed -e 's;^\(.*\.$o[ 	]*:\);$(ARCHDIR)/\1;' > $@
X
X###########################################################################
X#
X# Include the dependency file(s) generated from the rules above.
X#
X###########################################################################
X-include	Dnull $(DEP_FILE)
END-of-star-1.5.2/RULES/r-smake.dep
echo x - star-1.5.2/RULES/mk-smake.id
sed 's/^X//' >star-1.5.2/RULES/mk-smake.id << 'END-of-star-1.5.2/RULES/mk-smake.id'
X#ident "@(#)mk-smake.id	1.10 12/12/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Name of make program (make/gmake/smake)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X_SETENV=	$(_UNIQ)$(SETENV)
X__SETENV=	$(_SETENV:$(_UNIQ)=rules.env)
X___SETENV=	$(__SETENV:$(_UNIQ)none=rules.nul)
XSET_ENV=	$(___SETENV:$(_UNIQ)%=%)
X
Xinclude		$(SRCROOT)/$(RULESDIR)/$(SET_ENV)
X
XMAKEPROG=	$(MAKE_NAME)
XWAIT=			# smake-1.2.1 does not yet wait for parallel targets
X
XSPACE=		$(_UNIQ:$(_UNIQ)%= )
X#NUMBER_SIGN=	NUMBER_SIGN is defined internally by smake
X
X###########################################################################
X#
X# standard (automatic) machine identification
X#
X###########################################################################
X#
X# XP_ARCH = MAKE_ARCH   = uname -p	= mach	  # Processor (sparc/mc68020)
X# XK_ARCH = MAKE_MACH   = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
X# XM_ARCH = MAKE_M_ARCH = arch		~ arch -k # Machine (sun3/sun4)
X#
X###########################################################################
X
XXP_ARCH=	$(MAKE_ARCH)
XXK_ARCH=	$(MAKE_MACH)
XXM_ARCH=	$(MAKE_M_ARCH)
X
XP_ARCH=		$(XP_ARCH)
XK_ARCH=		$(XK_ARCH)
XM_ARCH=		$(XM_ARCH)
X
X_P_ARCH=	$(_UNIQ)$(XP_ARCH)
X__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(MAKE_MACH))
XP_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
X
X_M_ARCH=	$(_UNIQ)$(MAKE_M_ARCH)
X__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(MAKE_MACH))
XM_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
X
XHOSTNAME=	$(MAKE_HOST)
XOSNAME=		$(MAKE_OS)
XOSDEFS=		$(MAKE_OSDEFS)
XOSREL=		$(MAKE_OSREL)
XOSVERSION=	$(MAKE_OSVERSION)
X
X#
X# Disable Simple Suffix Rules
X#
X.SSUFFIX_RULES:
X#
X# Disable Suffix Rules
X#
X.SUFFIXES:
END-of-star-1.5.2/RULES/mk-smake.id
echo x - star-1.5.2/RULES/news4000-newsos6-cc.rul
sed 's/^X//' >star-1.5.2/RULES/news4000-newsos6-cc.rul << 'END-of-star-1.5.2/RULES/news4000-newsos6-cc.rul'
X#ident @(#)news4000-newsos6-cc.rul	1.6 07/05/08 
X###########################################################################
X#
X# Platform dependent MACROS for Sony NEWS-OS 6.x
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sony.rul
X
X#
X#		From objectx@polyphony.scei.co.jp XXX is -D__STDC__=0 correct ???
X#
XOSDEFS +=	-D__SVR4 -DSVR4 -D__STDC__=0
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket
XLIB_MATH=	-lm
XLIB_KVM=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/news4000-newsos6-cc.rul
echo x - star-1.5.2/RULES/os-aix.def
sed 's/^X//' >star-1.5.2/RULES/os-aix.def << 'END-of-star-1.5.2/RULES/os-aix.def'
X#ident "@(#)os-aix.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for AIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-aix.def
echo x - star-1.5.2/RULES/os-aix.id
sed 's/^X//' >star-1.5.2/RULES/os-aix.id << 'END-of-star-1.5.2/RULES/os-aix.id'
X#ident "@(#)os-aix.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for AIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		aix
X-O_ARCH=	-$(O_ARCH)
XK_ARCH=		rs6000
XP_ARCH=		rs6000
END-of-star-1.5.2/RULES/os-aix.id
echo x - star-1.5.2/RULES/os-amigaos.def
sed 's/^X//' >star-1.5.2/RULES/os-amigaos.def << 'END-of-star-1.5.2/RULES/os-amigaos.def'
X#ident "@(#)os-amigaos.def	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Global os definitions for AmigaOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-amigaos.def
echo x - star-1.5.2/RULES/os-amigaos.id
sed 's/^X//' >star-1.5.2/RULES/os-amigaos.id << 'END-of-star-1.5.2/RULES/os-amigaos.id'
X#ident "@(#)os-amigaos.id	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for AmigaOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		amigaos
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-amigaos.id
echo x - star-1.5.2/RULES/os-beos.def
sed 's/^X//' >star-1.5.2/RULES/os-beos.def << 'END-of-star-1.5.2/RULES/os-beos.def'
X#ident @(#)os-beos.def	1.2 06/05/14 
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-beos.def
echo x - star-1.5.2/RULES/os-beos.id
sed 's/^X//' >star-1.5.2/RULES/os-beos.id << 'END-of-star-1.5.2/RULES/os-beos.id'
X#ident @(#)os-beos.id	1.2 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		beos
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-beos.id
echo x - star-1.5.2/RULES/README
sed 's/^X//' >star-1.5.2/RULES/README << 'END-of-star-1.5.2/RULES/README'
XPATH setzen
XLD_RUN_PATH loeschen
XLD_LIBRARY_PATH Loeschen
Xumask setzen
X
Xsymlink libxxx.so -> libxxx.so.x.y
Xbei install setzen
X
Xhighlevel rules:
X
Xrules.aux
Xrules.cmd
Xrules.dir
Xrules.drv
Xrules.lib
Xrules.loc
Xrules.mks
Xrules.mod
Xrules.rdi
Xrules.shl
X
Xsollten umbenannt werden z.B. in xrules.*
X
XSunPRo	 -mt		GCC	-D_REENTRANT -lthread
X
XDESTDIR fuer GNU autoconf Kompatibilitaet?
X
END-of-star-1.5.2/RULES/README
echo x - star-1.5.2/RULES/os-bsd-os.def
sed 's/^X//' >star-1.5.2/RULES/os-bsd-os.def << 'END-of-star-1.5.2/RULES/os-bsd-os.def'
X#ident "@(#)os-bsd-os.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Global os definitions for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-bsd-os.def
echo x - star-1.5.2/RULES/os-bsd-os.id
sed 's/^X//' >star-1.5.2/RULES/os-bsd-os.id << 'END-of-star-1.5.2/RULES/os-bsd-os.id'
X#ident "@(#)os-bsd-os.id	1.3 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:3.%=bsd-os3)
XO_ARCH=		$(_O_ARCH:4.%=bsd-os)
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-bsd-os.id
echo x - star-1.5.2/RULES/os-bsd-os3.def
sed 's/^X//' >star-1.5.2/RULES/os-bsd-os3.def << 'END-of-star-1.5.2/RULES/os-bsd-os3.def'
X#ident "@(#)os-bsd-os3.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Global os definitions for BSD/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-bsd-os3.def
echo x - star-1.5.2/RULES/os-cygwin32_nt.def
sed 's/^X//' >star-1.5.2/RULES/os-cygwin32_nt.def << 'END-of-star-1.5.2/RULES/os-cygwin32_nt.def'
X#ident "@(#)os-cygwin32_nt.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
X
END-of-star-1.5.2/RULES/os-cygwin32_nt.def
echo x - star-1.5.2/RULES/os-cygwin32_nt.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin32_nt.id << 'END-of-star-1.5.2/RULES/os-cygwin32_nt.id'
X#ident "@(#)os-cygwin32_nt.id	1.5 07/05/29 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		cygwin32_nt
X-O_ARCH=	-$(O_ARCH)
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-star-1.5.2/RULES/os-cygwin32_nt.id
echo x - star-1.5.2/RULES/os-cygwin_95-4.0.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_95-4.0.id << 'END-of-star-1.5.2/RULES/os-cygwin_95-4.0.id'
X#ident "@(#)os-cygwin_95-4.0.id	1.2 07/05/08 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.0 (WIN-95)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XOSDEFS +=	-D_WIN32_WINDOWS=0x0400
END-of-star-1.5.2/RULES/os-cygwin_95-4.0.id
echo x - star-1.5.2/RULES/os-cygwin_98-4.10.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_98-4.10.id << 'END-of-star-1.5.2/RULES/os-cygwin_98-4.10.id'
X#ident "@(#)os-cygwin_98-4.10.id	1.2 07/05/08 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.10 (WIN-98)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XOSDEFS +=	-D_WIN32_WINDOWS=0x0410
END-of-star-1.5.2/RULES/os-cygwin_98-4.10.id
echo x - star-1.5.2/RULES/os-cygwin_me-4.90.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_me-4.90.id << 'END-of-star-1.5.2/RULES/os-cygwin_me-4.90.id'
X#ident "@(#)os-cygwin_me-4.90.id	1.2 07/05/08 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.90 (ME)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XOSDEFS +=	-D_WIN32_WINDOWS=0x0490
END-of-star-1.5.2/RULES/os-cygwin_me-4.90.id
echo x - star-1.5.2/RULES/os-cygwin_nt-4.0.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-4.0.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-4.0.id'
X#ident "@(#)os-cygwin_nt-4.0.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-4.0 (NT-4.0)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-star-1.5.2/RULES/os-cygwin_nt-4.0.id
echo x - star-1.5.2/RULES/os-cygwin_nt-5.0.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-5.0.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-5.0.id'
X#ident "@(#)os-cygwin_nt-5.0.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.0 (WIN2000)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0500
END-of-star-1.5.2/RULES/os-cygwin_nt-5.0.id
echo x - star-1.5.2/RULES/os-cygwin_nt-5.1.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-5.1.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-5.1.id'
X#ident "@(#)os-cygwin_nt-5.1.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.1 (XP)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0501
END-of-star-1.5.2/RULES/os-cygwin_nt-5.1.id
echo x - star-1.5.2/RULES/os-darwin.def
sed 's/^X//' >star-1.5.2/RULES/os-darwin.def << 'END-of-star-1.5.2/RULES/os-darwin.def'
X#ident "@(#)os-darwin.def	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Global definitions for Mac OS X (Darwin)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-darwin.def
echo x - star-1.5.2/RULES/os-darwin.id
sed 's/^X//' >star-1.5.2/RULES/os-darwin.id << 'END-of-star-1.5.2/RULES/os-darwin.id'
X#ident "@(#)os-darwin.id	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Mac OS X (Darwin)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		darwin
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-darwin.id
echo x - star-1.5.2/RULES/os-dgux.id
sed 's/^X//' >star-1.5.2/RULES/os-dgux.id << 'END-of-star-1.5.2/RULES/os-dgux.id'
X#ident "@(#)os-dgux.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for DGUX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:r4.%=dgux4)
XO_ARCH=		$(_O_ARCH:5.4r3%=dgux3)
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-dgux.id
echo x - star-1.5.2/RULES/os-dgux3.def
sed 's/^X//' >star-1.5.2/RULES/os-dgux3.def << 'END-of-star-1.5.2/RULES/os-dgux3.def'
X#ident "@(#)os-dgux3.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for DGUX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-dgux3.def
echo x - star-1.5.2/RULES/os-dgux4.def
sed 's/^X//' >star-1.5.2/RULES/os-dgux4.def << 'END-of-star-1.5.2/RULES/os-dgux4.def'
X#ident "@(#)os-dgux4.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for DGUX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-dgux4.def
echo x - star-1.5.2/RULES/os-domainos.def
sed 's/^X//' >star-1.5.2/RULES/os-domainos.def << 'END-of-star-1.5.2/RULES/os-domainos.def'
X#ident "@(#)os-domainos.def	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Apollo Domain/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# Domain/OS uses it's own style, so let's use SVSv.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-domainos.def
echo x - star-1.5.2/RULES/os-domainos.id
sed 's/^X//' >star-1.5.2/RULES/os-domainos.id << 'END-of-star-1.5.2/RULES/os-domainos.id'
X#ident "@(#)os-domainos.id	1.2 06/05/14 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Apollo Domain/OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		domainos
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-domainos.id
echo x - star-1.5.2/RULES/version
sed 's/^X//' >star-1.5.2/RULES/version << 'END-of-star-1.5.2/RULES/version'
X#ident "@(#)version	1.4 07/11/02 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X
XMAKEFILES_VERSION=1.5a05
END-of-star-1.5.2/RULES/version
echo x - star-1.5.2/RULES/os-freebsd.def
sed 's/^X//' >star-1.5.2/RULES/os-freebsd.def << 'END-of-star-1.5.2/RULES/os-freebsd.def'
X#ident "@(#)os-freebsd.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-freebsd.def
echo x - star-1.5.2/RULES/os-freebsd.id
sed 's/^X//' >star-1.5.2/RULES/os-freebsd.id << 'END-of-star-1.5.2/RULES/os-freebsd.id'
X#ident "@(#)os-freebsd.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for FreeBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		freebsd
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-freebsd.id
echo x - star-1.5.2/RULES/os-gnu.def
sed 's/^X//' >star-1.5.2/RULES/os-gnu.def << 'END-of-star-1.5.2/RULES/os-gnu.def'
X#ident "@(#)os-gnu.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-gnu.def
echo x - star-1.5.2/RULES/os-gnu.id
sed 's/^X//' >star-1.5.2/RULES/os-gnu.id << 'END-of-star-1.5.2/RULES/os-gnu.id'
X#ident "@(#)os-gnu.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for GNU (hurd)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		gnu
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-gnu.id
echo x - star-1.5.2/RULES/os-hp-ux.def
sed 's/^X//' >star-1.5.2/RULES/os-hp-ux.def << 'END-of-star-1.5.2/RULES/os-hp-ux.def'
X#ident "@(#)os-hp-ux.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for HP-UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-hp-ux.def
echo x - star-1.5.2/RULES/os-hp-ux.id
sed 's/^X//' >star-1.5.2/RULES/os-hp-ux.id << 'END-of-star-1.5.2/RULES/os-hp-ux.id'
X#ident "@(#)os-hp-ux.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		hp-ux
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-hp-ux.id
echo x - star-1.5.2/RULES/os-irix.def
sed 's/^X//' >star-1.5.2/RULES/os-irix.def << 'END-of-star-1.5.2/RULES/os-irix.def'
X#ident "@(#)os-irix.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-irix.def
echo x - star-1.5.2/RULES/os-irix.id
sed 's/^X//' >star-1.5.2/RULES/os-irix.id << 'END-of-star-1.5.2/RULES/os-irix.id'
X#ident "@(#)os-irix.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		irix
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-irix.id
echo x - star-1.5.2/RULES/rules.top
sed 's/^X//' >star-1.5.2/RULES/rules.top << 'END-of-star-1.5.2/RULES/rules.top'
X#ident "@(#)rules.top	1.20 09/07/26 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules that should be included at top of every Makefile
X# This is the general purpose C-language version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# Make sure this becomes the default target
X#
X###########################################################################
Xall:
X
X###########################################################################
X#
X# First make sure that all symlinks in $(SRCROOT)/$(RULESDIR)/ are present
X#
X# $(DUMMY_LNK) is needed to work around a Sun make bug that has been
X# fixed with Solaris 11 but that is present for all old Solaris versions.
X#
X###########################################################################
X_DUMMY_LNK=	$(SRCROOT)/$(RULESDIR)/ldummy.lnk
XDUMMY_LNK=	$(_DUMMY_LNK:./%=%)
X
X$(DUMMY_LNK):
X	@echo "	==> MAKING SYMLINKS in $(SRCROOT)/$(RULESDIR)/" && \
X			cd $(SRCROOT)/$(RULESDIR) && sh ./MKLINKS
X
Xinclude 	$(DUMMY_LNK)
X
X###########################################################################
X#
X# Include global language independent macros
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules1.top
X
X###########################################################################
X#
X# Workaround for GNU make design bug (include does not trigger rule evaluation)
X# A correctly working "make" did create the symlinks already while
X# including "ldummy.lnk" above.
X#
X###########################################################################
X$(SRCROOT)/$(RULESDIR)/$(XARCH).rul: $(SRCROOT)/$(RULESDIR)/ldummy.lnk
X
X###########################################################################
X#
X# Include platform dependent macros for C-language here.
X#
X# If a project needs other languages too, additional rules may be defined.
X# These additional rules should be placed in a file that uses a hierarchy
X# similar to rules.top and mey be called e.g. yacc.top.
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/$(XARCH).rul
X
X###########################################################################
X#
X# Include global autofonfiguration rules
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cnf
END-of-star-1.5.2/RULES/rules.top
echo x - star-1.5.2/RULES/os-linux.def
sed 's/^X//' >star-1.5.2/RULES/os-linux.def << 'END-of-star-1.5.2/RULES/os-linux.def'
X#ident "@(#)os-linux.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-linux.def
echo x - star-1.5.2/RULES/os-linux.id
sed 's/^X//' >star-1.5.2/RULES/os-linux.id << 'END-of-star-1.5.2/RULES/os-linux.id'
X#ident "@(#)os-linux.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		linux
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-linux.id
echo x - star-1.5.2/RULES/os-mac-os.id
sed 's/^X//' >star-1.5.2/RULES/os-mac-os.id << 'END-of-star-1.5.2/RULES/os-mac-os.id'
X#ident "@(#)os-mac-os.id	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Mac OS X
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:9.%=mac-os9)
XO_ARCH=		$(_O_ARCH:10.%=mac-os10)
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mac-os.id
echo x - star-1.5.2/RULES/os-mac-os10.def
sed 's/^X//' >star-1.5.2/RULES/os-mac-os10.def << 'END-of-star-1.5.2/RULES/os-mac-os10.def'
X#ident "@(#)os-mac-os10.def	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Mac OS X
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-mac-os10.def
echo x - star-1.5.2/RULES/os-mingw32_95-4.0.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_95-4.0.id << 'END-of-star-1.5.2/RULES/os-mingw32_95-4.0.id'
X#ident "@(#)os-mingw32_95-4.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_95-4.0.id
echo x - star-1.5.2/RULES/os-mingw32_98-4.0.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_98-4.0.id << 'END-of-star-1.5.2/RULES/os-mingw32_98-4.0.id'
X#ident "@(#)os-mingw32_98-4.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_98-4.0.id
echo x - star-1.5.2/RULES/os-mingw32_98-4.10.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_98-4.10.id << 'END-of-star-1.5.2/RULES/os-mingw32_98-4.10.id'
X#ident "@(#)os-mingw32_98-4.10.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_98-4.10.id
echo x - star-1.5.2/RULES/os-mingw32_me-4.90.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_me-4.90.id << 'END-of-star-1.5.2/RULES/os-mingw32_me-4.90.id'
X#ident "@(#)os-mingw32_me-4.90.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_me-4.90.id
echo x - star-1.5.2/RULES/os-mingw32_nt-4.0.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_nt-4.0.id << 'END-of-star-1.5.2/RULES/os-mingw32_nt-4.0.id'
X#ident "@(#)os-mingw32_nt-4.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_nt-4.0.id
echo x - star-1.5.2/RULES/os-mingw32_nt-5.0.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_nt-5.0.id << 'END-of-star-1.5.2/RULES/os-mingw32_nt-5.0.id'
X#ident "@(#)os-mingw32_nt-5.0.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_nt-5.0.id
echo x - star-1.5.2/RULES/os-mingw32_nt-5.1.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_nt-5.1.id << 'END-of-star-1.5.2/RULES/os-mingw32_nt-5.1.id'
X#ident "@(#)os-mingw32_nt-5.1.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_nt-5.1.id
echo x - star-1.5.2/RULES/os-mingw32_nt-5.2.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_nt-5.2.id << 'END-of-star-1.5.2/RULES/os-mingw32_nt-5.2.id'
X#ident "@(#)os-mingw32_nt-5.2.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_nt-5.2.id
echo x - star-1.5.2/RULES/os-mingw32_nt.def
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_nt.def << 'END-of-star-1.5.2/RULES/os-mingw32_nt.def'
X#ident "@(#)os-mingw32_nt.def	1.3 11/08/04 "
X###########################################################################
X#
X# Global os definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
X
X#
X# Tell MKLINKS to run "test -h xxzzy.345 || symlink=cp
X#
XMKLINKS_TEST=	test
Xexport		MKLINKS_TEST
END-of-star-1.5.2/RULES/os-mingw32_nt.def
echo x - star-1.5.2/RULES/os-mingw32_nt.id
sed 's/^X//' >star-1.5.2/RULES/os-mingw32_nt.id << 'END-of-star-1.5.2/RULES/os-mingw32_nt.id'
X#ident "@(#)os-mingw32_nt.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for Win32/Mingw32
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		mingw32_nt
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-mingw32_nt.id
echo x - star-1.5.2/RULES/os-ms-dos.def
sed 's/^X//' >star-1.5.2/RULES/os-ms-dos.def << 'END-of-star-1.5.2/RULES/os-ms-dos.def'
X#ident "@(#)os-ms-dos.def	1.2 06/05/14 "
X###########################################################################
X#
X# Global os definitions for MS-DOS/DJGPP v2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-ms-dos.def
echo x - star-1.5.2/RULES/os-ms-dos.id
sed 's/^X//' >star-1.5.2/RULES/os-ms-dos.id << 'END-of-star-1.5.2/RULES/os-ms-dos.id'
X#ident "@(#)os-ms-dos.id	1.2 06/05/14 "
X###########################################################################
X#
X# OS specific MACRO definitions for MS-DOS/DJGPP v2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		ms-dos
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-ms-dos.id
echo x - star-1.5.2/RULES/os-netbsd.def
sed 's/^X//' >star-1.5.2/RULES/os-netbsd.def << 'END-of-star-1.5.2/RULES/os-netbsd.def'
X#ident "@(#)os-netbsd.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-netbsd.def
echo x - star-1.5.2/RULES/os-netbsd.id
sed 's/^X//' >star-1.5.2/RULES/os-netbsd.id << 'END-of-star-1.5.2/RULES/os-netbsd.id'
X#ident "@(#)os-netbsd.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for NetBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		netbsd
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-netbsd.id
echo x - star-1.5.2/RULES/os-news-os.id
sed 's/^X//' >star-1.5.2/RULES/os-news-os.id << 'END-of-star-1.5.2/RULES/os-news-os.id'
X#ident @(#)os-news-os.id	1.2 06/05/14 
X###########################################################################
X#
X# OS specific MACRO definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:5.%=newsos5)
XO_ARCH=		$(_O_ARCH:6.%=newsos6)
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-news-os.id
echo x - star-1.5.2/RULES/os-newsos6.def
sed 's/^X//' >star-1.5.2/RULES/os-newsos6.def << 'END-of-star-1.5.2/RULES/os-newsos6.def'
X#ident @(#)os-newsos6.def	1.2 06/05/14 
X###########################################################################
X#
X# Global os definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-newsos6.def
echo x - star-1.5.2/RULES/os-nextstep.def
sed 's/^X//' >star-1.5.2/RULES/os-nextstep.def << 'END-of-star-1.5.2/RULES/os-nextstep.def'
X#ident "@(#)os-nextstep.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for NeXT Step
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-nextstep.def
echo x - star-1.5.2/RULES/os-nextstep.id
sed 's/^X//' >star-1.5.2/RULES/os-nextstep.id << 'END-of-star-1.5.2/RULES/os-nextstep.id'
X#ident "@(#)os-nextstep.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for NeXT Step
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		nextstep
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-nextstep.id
echo x - star-1.5.2/RULES/os-openbsd.def
sed 's/^X//' >star-1.5.2/RULES/os-openbsd.def << 'END-of-star-1.5.2/RULES/os-openbsd.def'
X#ident "@(#)os-openbsd.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-openbsd.def
echo x - star-1.5.2/RULES/os-openbsd.id
sed 's/^X//' >star-1.5.2/RULES/os-openbsd.id << 'END-of-star-1.5.2/RULES/os-openbsd.id'
X#ident "@(#)os-openbsd.id	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for OpenBSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		openbsd
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-openbsd.id
echo x - star-1.5.2/RULES/os-openserver.def
sed 's/^X//' >star-1.5.2/RULES/os-openserver.def << 'END-of-star-1.5.2/RULES/os-openserver.def'
X#ident "@(#)os-openserver.def	1.2 06/05/14 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Global os definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-openserver.def
echo x - star-1.5.2/RULES/cc-hp64.rul
sed 's/^X//' >star-1.5.2/RULES/cc-hp64.rul << 'END-of-star-1.5.2/RULES/cc-hp64.rul'
X#ident "@(#)cc-hp64.rul	1.11 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UC cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(HPCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(HPC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# -Ae	      -> ANSI C (non-bundled C only - bundled C ignores -Ae)
X# +DAportable -> Create Parisc-1.1 code
X#
XHP_CC_ANSI_OPT=	-Ae	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_OPT_OPT=	-O	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_GPROF_OPT= -G	# May be overwritten later from $(OINCSDIR)/rules.cnf
X
XCOPTS=		$(HP_CC_ANSI_OPT) +DD64
X#COPTS=		$(HP_CC_ANSI_OPT) +DAportable +DD64
XCWOPTS=		
XCOPTOPT=	$(HP_CC_OPT_OPT)
XCOPTDYN=	+z
XCOPTGPROF=	$(HP_CC_GPROF_OPT)
XC++OPTS=	+DD64
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.sl
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-Wl,-soname,$(TARGET)
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) +DD64
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) +DD64
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) +DD64
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-hpux.sh
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; :
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-hp64.rul
echo x - star-1.5.2/RULES/os-os-2.id
sed 's/^X//' >star-1.5.2/RULES/os-os-2.id << 'END-of-star-1.5.2/RULES/os-os-2.id'
X#ident "@(#)os-os-2.id	1.2 06/05/14 "
X###########################################################################
X# Written 1999 by C. Wohlgemuth
X###########################################################################
X#
X# OS specific MACRO definitions for OS/2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		os2
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-os-2.id
echo x - star-1.5.2/RULES/os-os2.def
sed 's/^X//' >star-1.5.2/RULES/os-os2.def << 'END-of-star-1.5.2/RULES/os-os2.def'
X#ident "@(#)os-os2.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by C. Wohlgemuth
X###########################################################################
X#
X# Global os definitions for OS/2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-os2.def
echo x - star-1.5.2/RULES/os-osf1.def
sed 's/^X//' >star-1.5.2/RULES/os-osf1.def << 'END-of-star-1.5.2/RULES/os-osf1.def'
X#ident "@(#)os-osf1.def	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-osf1.def
echo x - star-1.5.2/RULES/os-osf1.id
sed 's/^X//' >star-1.5.2/RULES/os-osf1.id << 'END-of-star-1.5.2/RULES/os-osf1.id'
X#ident "@(#)os-osf1.id	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Digital UNIX (OSF1)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		osf1
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-osf1.id
echo x - star-1.5.2/RULES/os-qnx.def
sed 's/^X//' >star-1.5.2/RULES/os-qnx.def << 'END-of-star-1.5.2/RULES/os-qnx.def'
X#ident "@(#)os-qnx.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for QNX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-qnx.def
echo x - star-1.5.2/RULES/os-qnx.id
sed 's/^X//' >star-1.5.2/RULES/os-qnx.id << 'END-of-star-1.5.2/RULES/os-qnx.id'
X#ident "@(#)os-qnx.id	1.2 06/05/14 "
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for QNX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		qnx
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-qnx.id
echo x - star-1.5.2/RULES/os-rhapsody.def
sed 's/^X//' >star-1.5.2/RULES/os-rhapsody.def << 'END-of-star-1.5.2/RULES/os-rhapsody.def'
X#ident "@(#)os-rhapsody.def	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global definitions for NeXT Step (Apple Rhapsody)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-rhapsody.def
echo x - star-1.5.2/RULES/os-rhapsody.id
sed 's/^X//' >star-1.5.2/RULES/os-rhapsody.id << 'END-of-star-1.5.2/RULES/os-rhapsody.id'
X#ident "@(#)os-rhapsody.id	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for NeXT Step (Apple Rhapsody)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		rhapsody
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-rhapsody.id
echo x - star-1.5.2/RULES/os-sco_sv.id
sed 's/^X//' >star-1.5.2/RULES/os-sco_sv.id << 'END-of-star-1.5.2/RULES/os-sco_sv.id'
X#ident "@(#)os-sco_sv.id	1.3 07/05/03 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# OS specific MACRO definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		openserver
X
X_O_ARCH=	$(OSVERSION:5.%=openserver)
XO_ARCH=		$(_O_ARCH:6.%=unixware)
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-sco_sv.id
echo x - star-1.5.2/RULES/os-sunos.id
sed 's/^X//' >star-1.5.2/RULES/os-sunos.id << 'END-of-star-1.5.2/RULES/os-sunos.id'
X#ident "@(#)os-sunos.id	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for SunOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_O_ARCH=	$(OSREL:4.%=sunos4)
XO_ARCH=		$(_O_ARCH:5.%=sunos5)
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-sunos.id
echo x - star-1.5.2/RULES/os-sunos4.def
sed 's/^X//' >star-1.5.2/RULES/os-sunos4.def << 'END-of-star-1.5.2/RULES/os-sunos4.def'
X#ident "@(#)os-sunos4.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for SunOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-sunos4.def
echo x - star-1.5.2/RULES/os-sunos5.def
sed 's/^X//' >star-1.5.2/RULES/os-sunos5.def << 'END-of-star-1.5.2/RULES/os-sunos5.def'
X#ident "@(#)os-sunos5.def	1.3 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Solaris
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-sunos5.def
echo x - star-1.5.2/RULES/os-unix_sv.id
sed 's/^X//' >star-1.5.2/RULES/os-unix_sv.id << 'END-of-star-1.5.2/RULES/os-unix_sv.id'
X#ident "@(#)os-unix_sv.id	1.2 06/05/14 "
X###########################################################################
X# Written 1999 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# OS specific MACRO definitions for UnixWare 2
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		unixware
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-unix_sv.id
echo x - star-1.5.2/RULES/os-unixware.def
sed 's/^X//' >star-1.5.2/RULES/os-unixware.def << 'END-of-star-1.5.2/RULES/os-unixware.def'
X#ident "@(#)os-unixware.def	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Global os definitions for UnixWare 7
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-unixware.def
echo x - star-1.5.2/RULES/os-unixware.id
sed 's/^X//' >star-1.5.2/RULES/os-unixware.id << 'END-of-star-1.5.2/RULES/os-unixware.id'
X#ident "@(#)os-unixware.id	1.2 06/05/14 "
X###########################################################################
X# Written 2000 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# OS specific MACRO definitions for UnixWare 7
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		unixware
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-unixware.id
echo x - star-1.5.2/RULES/pci-qnx-cc.rul
sed 's/^X//' >star-1.5.2/RULES/pci-qnx-cc.rul << 'END-of-star-1.5.2/RULES/pci-qnx-cc.rul'
X#ident "@(#)pci-qnx-cc.rul	1.7 07/05/08 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown systems systems with dumb cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dumb.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
X#					Set Stack size to 256k
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -N 256k
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/pci-qnx-cc.rul
echo x - star-1.5.2/RULES/power-macintosh-darwin-cc.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-darwin-cc.rul << 'END-of-star-1.5.2/RULES/power-macintosh-darwin-cc.rul'
X#ident "@(#)power-macintosh-darwin-cc.rul	1.17 11/06/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc_s.1
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
END-of-star-1.5.2/RULES/power-macintosh-darwin-cc.rul
echo x - star-1.5.2/RULES/power-macintosh-darwin-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-darwin-gcc.rul << 'END-of-star-1.5.2/RULES/power-macintosh-darwin-gcc.rul'
X#ident "@(#)power-macintosh-darwin-gcc.rul	1.17 11/06/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc_s.1
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/power-macintosh-darwin-gcc.rul
echo x - star-1.5.2/RULES/os-openvms.def
sed 's/^X//' >star-1.5.2/RULES/os-openvms.def << 'END-of-star-1.5.2/RULES/os-openvms.def'
X#ident "@(#)os-openvms.def	1.1 09/10/29 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Global definitions for OpenVMS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-openvms.def
echo x - star-1.5.2/RULES/power-macintosh-rhapsody-cc.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-rhapsody-cc.rul << 'END-of-star-1.5.2/RULES/power-macintosh-rhapsody-cc.rul'
X#ident "@(#)power-macintosh-rhapsody-cc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc
XLDCC=		@echo "	==> LINKING \"$@\""; cc
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
END-of-star-1.5.2/RULES/power-macintosh-rhapsody-cc.rul
echo x - star-1.5.2/RULES/power-macintosh-rhapsody-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-rhapsody-gcc.rul << 'END-of-star-1.5.2/RULES/power-macintosh-rhapsody-gcc.rul'
X#ident "@(#)power-macintosh-rhapsody-gcc.rul	1.11 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/power-macintosh-rhapsody-gcc.rul
echo x - star-1.5.2/RULES/powerpc-beos-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/powerpc-beos-gcc.rul << 'END-of-star-1.5.2/RULES/powerpc-beos-gcc.rul'
X#ident "@(#)powerpc-beos-gcc.rul	1.8 07/05/09 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIB_SOCKET=	
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/powerpc-beos-gcc.rul
echo x - star-1.5.2/RULES/powerpc-beos-mwcc.rul
sed 's/^X//' >star-1.5.2/RULES/powerpc-beos-mwcc.rul << 'END-of-star-1.5.2/RULES/powerpc-beos-mwcc.rul'
X#ident "@(#)powerpc-beos-mwcc.rul	1.10 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul
X
XOSDEFS +=
X
XCPPOPTS=	-relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
X#LIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLDOPTS=		-multidefs -sym on -g $(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/powerpc-beos-mwcc.rul
echo x - star-1.5.2/RULES/r-gmake.dep
sed 's/^X//' >star-1.5.2/RULES/r-gmake.dep << 'END-of-star-1.5.2/RULES/r-gmake.dep'
X#ident "@(#)r-gmake.dep	1.13 06/07/21 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules for gmake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XDEP_SUFFIX=	.d
XRMDEP=		$(RM) $(RM_FORCE) $@
X___C++DEP_FILES= $(C++FILES:%.C=%.d)
X__C++DEP_FILES=	$(___C++DEP_FILES:%.cc=%.d)
X_C++DEP_FILES=	$(__C++DEP_FILES:%.cpp=%.d)
XC++DEP_FILES=	$(_C++DEP_FILES:%.cxx=%.d)
XC++PDEP_FILES=	$(C++DEP_FILES:%=$(ARCHDIR)/%)
XDEP_FILE=	$(CFILES:%.c=%.d)		$(C++DEP_FILES)
XPDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)
XPALLDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES)	$(ARCHDIR)/$(TARGET).dep
XDEP_DEP=	$(ARCHDIR)/Dnull
X###########################################################################
Xdepend: rmdep $(DEP_FILE)
X
Xrmdep:
X	$(RM) $(RM_FORCE) $(PALLDEP_FILE)
X
X###########################################################################
X#
X# Make the complete path to the architecture subdirectory.
X#
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
X#
X# Generate dependency file(s).
X# This rules is checked when the dependency file(s) are included.
X#
X# Modify the the path for .o files to reflect that they are placed in
X# $(ARCHDIR). Add the dependency file itself to each line so that
X# the dependencies will be rebuilt if a source is newer that the
X# appropriate dependency file.
X#
X###########################################################################
X$(ARCHDIR)/%.d: %.c
X		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X
X$(ARCHDIR)/%.d: %.C
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X$(ARCHDIR)/%.d: %.cc
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X$(ARCHDIR)/%.d: %.cpp
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X$(ARCHDIR)/%.d: %.cxx
X		$(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@
X
X#$(DEP_FILE):	$(DEP_DEP) $(CFILES)
X#		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $(^:%$(DEP_DEP)=%) \
X#			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@
X
X$(PDEP_FILE): $(DEP_DEP)
X
X$(PDEP_FILE): $(DEP_DEP)
X
X$(DEP_DEP):	$(ARCHDIR)
X	@if [ ! -f $@ ]; then	\
X		echo > $@;	\
X	fi
X
X###########################################################################
X#
X# Include the dependency file(s) generated from the rules above.
X#
X###########################################################################
X-include	$(PDEP_FILE)
END-of-star-1.5.2/RULES/r-gmake.dep
echo x - star-1.5.2/RULES/cc-sgi.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sgi.rul << 'END-of-star-1.5.2/RULES/cc-sgi.rul'
X#ident "@(#)cc-sgi.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SGICOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SGIC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-fullwarn
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-p1
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(LARGEFILE_OPT)
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	CC
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sgi.rul
echo x - star-1.5.2/RULES/r-gmake.tag
sed 's/^X//' >star-1.5.2/RULES/r-gmake.tag << 'END-of-star-1.5.2/RULES/r-gmake.tag'
X#ident "@(#)r-gmake.tag	1.3 07/12/01 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules for gmake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XTAGS:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(ETAGS) $+
X
Xtags:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(CTAGS) -t $+
END-of-star-1.5.2/RULES/r-gmake.tag
echo x - star-1.5.2/RULES/r-make.dep
sed 's/^X//' >star-1.5.2/RULES/r-make.dep << 'END-of-star-1.5.2/RULES/r-make.dep'
X#ident "@(#)r-make.dep	1.8 06/07/21 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules for make
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#	Note that we currently do not support C++ with Sun make as Sun make
X#	only allows one file to folllow a include directive
X#
XDEP_SUFFIX=	.dep
XRMDEP=		$(RM) $(RM_FORCE) $@
X___C++DEP_FILES= $(C++FILES:%.C=$(ARCHDIR)/%.d)
X__C++DEP_FILES=	$(___C++DEP_FILES:%.cc=$(ARCHDIR)/%.d)
X_C++DEP_FILES=	$(__C++DEP_FILES:%.cpp=$(ARCHDIR)/%.d)
XC++DEP_FILES=	$(_C++DEP_FILES:%.cxx=$(ARCHDIR)/%.d)
XC++PDEP_FILES=	$(C++DEP_FILES)
XDEP_FILE=	$(ARCHDIR)/$(TARGET).dep
XPDEP_FILE=	$(ARCHDIR)/$(TARGET).dep
XPALLDEP_FILE=	$(CFILES:%.c=$(ARCHDIR)/%.d)	$(C++PDEP_FILES) $(ARCHDIR)/$(TARGET).dep
XDEP_DEP=	$(ARCHDIR)/Dnull
X###########################################################################
Xdepend: rmdep $(DEP_FILE)
X
Xrmdep:
X	$(RM) $(RM_FORCE) $(PALLDEP_FILE)
X
X###########################################################################
X#
X# Make the complete path to the architecture subdirectory.
X#
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
X#
X# Generate dependency file(s).
X# This rules is checked when the dependency file(s) are included.
X#
X# Modify the the path for .o files to reflect that they are placed in
X# $(ARCHDIR). Add the dependency file itself to each line so that
X# the dependencies will be rebuilt if a source is newer that the
X# appropriate dependency file.
X#
X###########################################################################
X$(ARCHDIR)/%.dep: %.c
X		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@
X
X$(DEP_FILE):	$(DEP_DEP) $(CFILES)
X		$(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $(CFILES) \
X			| sed -e 's;^\(.*\)\.$o[ 	]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@
X
X$(DEP_DEP):	$(ARCHDIR)
X	@if [ ! -f $@ ]; then	\
X		echo > $@;	\
X	fi
X
X###########################################################################
X#
X# Include the dependency file(s) generated from the rules above.
X#
X###########################################################################
Xinclude		$(DEP_FILE)
END-of-star-1.5.2/RULES/r-make.dep
echo x - star-1.5.2/RULES/r-make.obj
sed 's/^X//' >star-1.5.2/RULES/r-make.obj << 'END-of-star-1.5.2/RULES/r-make.obj'
X#ident @(#)r-make.obj	1.7 07/04/27 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Object building rules for gmake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# This defines a rule that compiles source files from current directory and
X# puts the resultant objects directly into $(ARCHDIR),
X# to allow concurrent compilation on different platforms.
X# Object file names are constructed from $(CFILES) and $(C++FILES).
X###########################################################################
XARCHDIRX=		$(ARCHDIR)/
X___C++OFILES=		$(C++FILES:%.C=$(ARCHDIR)/%.$o)
X__C++OFILES=		$(___C++OFILES:%.cc=$(ARCHDIR)/%.$o)
X_C++OFILES=		$(__C++OFILES:%.cpp=$(ARCHDIR)/%.$o)
XC++OFILES=		$(_C++OFILES:%.cxx=$(ARCHDIR)/%.$o)
XC++POFILES=		$(C++OFILES)
XOFILES=			$(CFILES:%.c=$(ARCHDIR)/%.$o)	$(C++OFILES)
XPOFILES=		$(CFILES:%.c=$(ARCHDIR)/%.$o)	$(C++POFILES)
X###########################################################################
X__COMPILE.c=		$(_UNIQ)$(COMPILE.c)
X___COMPILE.c=		$(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c)
X_COMPILE.c=		$(___COMPILE.c:$(_UNIQ)%=%)
X
X__COMPILE.cc=		$(_UNIQ)$(COMPILE.cc)
X___COMPILE.cc=		$(__COMPILE.cc:$(_UNIQ)=$(CC++) $(C++FLAGS) $(CPPFLAGS) -c)
X_COMPILE.cc=		$(___COMPILE.cc:$(_UNIQ)%=%)
X
X__OUTPUT_OPTION=	$(_UNIQ)$(OUTPUT_OPTION)
X___OUTPUT_OPTION=	$(__OUTPUT_OPTION:$(_UNIQ)=-o $@)
X_OUTPUT_OPTION=		$(___OUTPUT_OPTION:$(_UNIQ)%=%)
X###########################################################################
X
X$(ARCHDIR)/%.$o:	%.c
X			$(_COMPILE.c) $(_OUTPUT_OPTION) $<  $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.C
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.cc
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.cpp
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X$(ARCHDIR)/%.$o:	%.cxx
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X###########################################################################
END-of-star-1.5.2/RULES/r-make.obj
echo x - star-1.5.2/RULES/r-make.tag
sed 's/^X//' >star-1.5.2/RULES/r-make.tag << 'END-of-star-1.5.2/RULES/r-make.tag'
X#ident "@(#)r-make.tag	1.3 07/12/01 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules for make
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XTAGS:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(ETAGS) $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X
Xtags:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(CTAGS) -t $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
END-of-star-1.5.2/RULES/r-make.tag
echo x - star-1.5.2/RULES/r-smake.obj
sed 's/^X//' >star-1.5.2/RULES/r-smake.obj << 'END-of-star-1.5.2/RULES/r-smake.obj'
X#ident @(#)r-smake.obj	1.9 07/04/27 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Object building rules for smake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# This defines a rule that compiles source files from current directory and
X# puts the resultant objects directly into $(ARCHDIR),
X# to allow concurrent compilation on different platforms.
X# Object file names are constructed from $(CFILES) and $(C++FILES).
X###########################################################################
XARCHDIRX=
X___C++OFILES=		$(C++FILES:%.C=%.$o)
X__C++OFILES=		$(___C++OFILES:%.cc=%.$o)
X_C++OFILES=		$(__C++OFILES:%.cpp=%.$o)
XC++OFILES=		$(_C++OFILES:%.cxx=%.$o)
XC++POFILES=		$(C++OFILES:%=$(ARCHDIR)/%)
XOFILES=			$(CFILES:%.c=%.$o)		$(C++OFILES)
XPOFILES=		$(CFILES:%.c=$(ARCHDIR)/%.$o)	$(C++POFILES)
X.OBJDIR:		$(ARCHDIR)
X###########################################################################
X__COMPILE.c=		$(_UNIQ)$(COMPILE.c)
X___COMPILE.c=		$(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c)
X_COMPILE.c=		$(___COMPILE.c:$(_UNIQ)%=%)
X
X__COMPILE.cc=		$(_UNIQ)$(COMPILE.cc)
X___COMPILE.cc=		$(__COMPILE.cc:$(_UNIQ)=$(CC++) $(C++FLAGS) $(CPPFLAGS) -c)
X_COMPILE.cc=		$(___COMPILE.cc:$(_UNIQ)%=%)
X
X__OUTPUT_OPTION=	$(_UNIQ)$(OUTPUT_OPTION)
X___OUTPUT_OPTION=	$(__OUTPUT_OPTION:$(_UNIQ)=-o $O/$@)
X_OUTPUT_OPTION=		$(___OUTPUT_OPTION:$(_UNIQ)%=%)
X###########################################################################
X%.$o: %.c
X			$(_COMPILE.c) $(_OUTPUT_OPTION) $<  $(CC_OUTPUT_FILTER)
X%.$o: %.C
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X%.$o: %.cc
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X%.$o: %.cpp
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X%.$o: %.cxx
X			$(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER)
X
X#$(ARCHDIR)/%.$o: %.c
X#			$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $(*F).c
X
X###########################################################################
END-of-star-1.5.2/RULES/r-smake.obj
echo x - star-1.5.2/RULES/r-smake.tag
sed 's/^X//' >star-1.5.2/RULES/r-smake.tag << 'END-of-star-1.5.2/RULES/r-smake.tag'
X#ident "@(#)r-smake.tag	1.4 07/12/01 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules for smake
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XTAGS:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(ETAGS) $r1
X
Xtags:		$(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG)
X		$(CTAGS) -t $r1
END-of-star-1.5.2/RULES/r-smake.tag
echo x - star-1.5.2/RULES/rs6000-aix-cc.rul
sed 's/^X//' >star-1.5.2/RULES/rs6000-aix-cc.rul << 'END-of-star-1.5.2/RULES/rs6000-aix-cc.rul'
X#ident "@(#)rs6000-aix-cc.rul	1.10 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for AIX on RS6000
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-ibm.rul
X
XOSDEFS +=	-DPROTOTYTPES
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/rs6000-aix-cc.rul
echo x - star-1.5.2/RULES/rs6000-aix-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/rs6000-aix-gcc.rul << 'END-of-star-1.5.2/RULES/rs6000-aix-gcc.rul'
X#ident "@(#)rs6000-aix-gcc.rul	1.9 07/05/09 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for AIX on RS6000
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DPROTOTYTPES
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-pic
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/rs6000-aix-gcc.rul
echo x - star-1.5.2/RULES/rules.aux
sed 's/^X//' >star-1.5.2/RULES/rules.aux << 'END-of-star-1.5.2/RULES/rules.aux'
X#ident "@(#)rules.aux	1.9 10/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Rules for installing auxiliary files
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(TARGET)$(AUXSRCEXT)
XSRCFILE=	$(TARGET)$(AUXSRCEXT)
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(SRCFILE)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.aux
echo x - star-1.5.2/RULES/rules.clr
sed 's/^X//' >star-1.5.2/RULES/rules.clr << 'END-of-star-1.5.2/RULES/rules.clr'
X#ident @(#)rules.clr	1.7 10/10/02 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules to make source tree clean
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# Do not remove target if it is in the current directory
X###########################################################################
XRMTARGET=	$(PTARGET:$(TARGET)%=%)
X###########################################################################
Xclean:
X			$(RM) $(RM_FORCE)	$(CLEAN_FILES) $(POFILES) \
X						$(PTARGETC)	\
X						$(PMAPVERS)	\
X						$(CLEAN_FILEX) \
X						$(PYOFILES) $(PLOFILES)
X
Xclobber:		clean
X			$(RM) $(RM_FORCE)	$(RMTARGET) $(PALLDEP_FILE) \
X						$(PTARGETC)	\
X						$(CLOBBER_FILEX)
X			$(RM) $(RM_FORCE)	$(ARCHDIR)/Dnull
X
Xdistclean:
X			$(RM) $(RM_RF)		$(CLEAN_FILES) \
X						.EDTMP *.bak OBJ/* \
X						$(SRCROOT)/libs/* $(SRCROOT)/incs/*
X
Xrmtarget:
X			$(RM) $(RM_FORCE)	$(RMTARGET)
X
Xrelink:	rmtarget all
END-of-star-1.5.2/RULES/rules.clr
echo x - star-1.5.2/RULES/rules.cmd
sed 's/^X//' >star-1.5.2/RULES/rules.cmd << 'END-of-star-1.5.2/RULES/rules.cmd'
X#ident @(#)rules.cmd	1.13 10/05/13 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for user level commands (usually found in .../bin)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_EXEEXT=	$(EXEEXT)
X_XEXEEXT=	$(XEXEEXT)
X###########################################################################
XINSFLAGS +=	$(STRIPFLAGS)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dyn
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEX))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__LD_OUTPUT_OPTION=	$(_UNIQ)$(LD_OUTPUT_OPTION)
X___LD_OUTPUT_OPTION=	$(__LD_OUTPUT_OPTION:$(_UNIQ)=-o $@)
X_LD_OUTPUT_OPTION=	$(___LD_OUTPUT_OPTION:$(_UNIQ)%=%)
X
XLIBS_PATH += $(LIBS_PATH_STATIC)
X
Xall:		$(PTARGET)
X
X$(PTARGET):	$(OFILES) $(SRCLIBS)
X		$(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS)
X#		$(CC) -o $@ $(OFILES) $(LDPATH) $(RUNPATH) $(SRCLIBS) $(LIBS)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lnt
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.cmd
echo x - star-1.5.2/RULES/rules.cnf
sed 's/^X//' >star-1.5.2/RULES/rules.cnf << 'END-of-star-1.5.2/RULES/rules.cnf'
X#ident @(#)rules.cnf	1.13 08/08/01 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X#
X# Make Rules for global dynamic configuration
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X$(SRCROOT)/autoconf/configure: $(SRCROOT)/autoconf/autoconf.m4 \
X				$(SRCROOT)/autoconf/acgeneral.m4 \
X				$(SRCROOT)/autoconf/acspecific.m4 \
X				$(SRCROOT)/autoconf/acoldnames.m4 \
X				$(SRCROOT)/autoconf/aclocal.m4 \
X				$(SRCROOT)/autoconf/rules.cnf.in \
X				$(SRCROOT)/autoconf/xconfig.h.in
X	@echo "	==> AUTOCONFIGURING GLOBAL \"$@\""; \
X	cd $(SRCROOT)/autoconf && sh ./autoconf
X
Xconfig: $(OINCSDIR)/rules.cnf
X
X$(OINCSDIR)/Inull:
X	$(MKDIR) -p $(OINCSDIR)
X	@echo > $@
X
X$(OINCSDIR):
X	$(MKDIR) -p $@
X
X#
X# Hack until the <mach>-<os>-*cc.rul files are updated
X#
X_HCC_COM=	$(OARCH:%-gcc=gcc)
XHCC_COM=	$(_HCC_COM:%-cc=cc)
X
X_CC_COM=	$(_UNIQ)$(CC_COM)
X__CC_COM=	$(_CC_COM:$(_UNIQ)=$(HCC_COM))
XXCC_COM=	$(__CC_COM:$(_UNIQ)%=%)
X
X#CONFFLAGS +=	-cc=$(XCC_COM)
X
X$(OINCSDIR)/rules.cnf $(OINCSDIR)/xconfig.h: $(OINCSDIR)/Inull \
X					$(SRCROOT)/autoconf/configure \
X					$(SRCROOT)/autoconf/rules.cnf.in \
X					$(SRCROOT)/autoconf/xconfig.h.in
X	$(RUL_CONF)
X
X###########################################################################
XRUL_CONF=	@echo "	==> CONFIGURING RULES \"$@\""; $(RM_F) $@; \
X		cd $(OINCSDIR); \
X		CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \
X		CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \
X		LDFLAGS="$(LDOPTS)" sh ../../autoconf/configure $(CONFFLAGS)
X###########################################################################
Xinclude $(OINCSDIR)/Inull
Xinclude $(OINCSDIR)/rules.cnf
X###########################################################################
Xinclude	$(SRCROOT)/$(RULESDIR)/$(LOCAL_CNF)
END-of-star-1.5.2/RULES/rules.cnf
echo x - star-1.5.2/RULES/rules.dep
sed 's/^X//' >star-1.5.2/RULES/rules.dep << 'END-of-star-1.5.2/RULES/rules.dep'
X#ident "@(#)rules.dep	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Dependency building rules ... use MAKEPROG specific version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/r-$(MAKEPROG).dep
END-of-star-1.5.2/RULES/rules.dep
echo x - star-1.5.2/RULES/rules.dir
sed 's/^X//' >star-1.5.2/RULES/rules.dir << 'END-of-star-1.5.2/RULES/rules.dir'
X#ident @(#)rules.dir	1.8 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# DIRS contains the names of all directories where sub make should take place
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xinclude		$(SRCROOT)/$(RULESDIR)/rules1.dir
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
X###########################################################################
END-of-star-1.5.2/RULES/rules.dir
echo x - star-1.5.2/RULES/rules.drv
sed 's/^X//' >star-1.5.2/RULES/rules.drv << 'END-of-star-1.5.2/RULES/rules.drv'
X#ident @(#)rules.drv	1.8 08/12/27 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for loadable drivers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEX))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(PTARGET)
X
X$(PTARGET):	$(OFILES) $(SRCLIBS)
X		$(LD) -r -o $@ $(POFILES) $(SRCLIBS) $(LIBS)
X
XINSBASE=	$(INS_KBASE:%/=%)
XCPPOPTS +=	$(KDEFINES)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.drv
echo x - star-1.5.2/RULES/rules.hlp
sed 's/^X//' >star-1.5.2/RULES/rules.hlp << 'END-of-star-1.5.2/RULES/rules.hlp'
X#ident "@(#)rules.hlp	1.16 11/09/18 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Help rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X# Location for targets:
X#
X# - all						: see appropriate rules
X# - lint					: rules.lnt
X# - clean, clobber, distclean, relink, rmtarget	: rules.clr
X# - rel						: rules.rel
X# - install, ibins				: rules.ins
X# - html, htmlx, htmlxn				: rules.htm & sub.htm
X# - tarpkg, tarpkg1 tarpkg2			: rules.sps
X# - depend, rmdep				: rules.dep
X# - config					: rules.cnf
X# - tags, TAGS					: rules.tag
X# - .help					: rules.hlp
X# - .version					: rules.hlp
X# - tinfo					: rules.dir/rules.rdi
X#
X###########################################################################
X.help:
X	@echo "Usage: make [target]"
X	@echo "Available targets are:" $(ALLTARGETS)
X	@echo "	all		make the default target"
X	@echo "	lint		lint all sources for the default target"
X	@echo "	clean		remove all made objects and the default target"
X	@echo "	clobber		remove all from 'clean' and all dependency files"
X	@echo "	distclean	remove all from 'clobber' and all made files"
X	@echo "			for all architectures"
X	@echo "	relink		remove and relink the default target"
X	@echo "	rmtarget	remove the default target"
X	@echo "	install		install the default target to final destination"
X	@echo "	ibins		install the default target to local dir 'bins'"
X	@echo "	html		create html vesions from the manual pages"
X	@echo "	htmlx		create enhanced html vesions from the manual pages"
X	@echo "	htmlxn		create enhanced html vesions from the manual pages if needed"
X	@echo "	tarpkg		create an installable tar packet -> tarpkg1 + parpkg2"
X	@echo "	tarpkg1		helps to create an installable tar packet - install stage"
X	@echo "	tarpkg2		installable tar packet - tar -c stage"
X	@echo "	depend		remove dependency file to prepare a remake"
X	@echo "	config		remake the dynamic configuration files"
X	@echo "	tags		make vi/ved compatible tag file"
X	@echo "	TAGS		make emacs compatible tag file"
X	@echo "	.help		display this help"
X	@echo "	.version	display version information for the makefile system"
X	@echo "	tinfo		display target info for slottable target components"
X	@echo "	shell		start $(SHELL) with the environment used for compilation"
X
X.version:
X	@echo "Makefiles (The Schily Makefile System) Version: $(MAKEFILES_VERSION)"
END-of-star-1.5.2/RULES/rules.hlp
echo x - star-1.5.2/RULES/rules.inc
sed 's/^X//' >star-1.5.2/RULES/rules.inc << 'END-of-star-1.5.2/RULES/rules.inc'
X#ident @(#)rules.inc	1.10 11/07/16 
X###########################################################################
X# Written 1999 by J. Schilling
X###########################################################################
X#
X# Rules for creating include files (usually found in .../incs/machdir)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#_EXEEXT=	$(EXEEXT)	# Do not install as xxx.h.exe
X_XEXEEXT=	$(XEXEEXT)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
X
XPTARGET=	$(OINCSDIR)/$(TARGET)
XPTARGETC=	$(ARCHDIR)/$(TARGETC)
XPTARGETCX=	$(ARCHDIR)/$(TARGETC)$(_EXEEXT)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__LD_OUTPUT_OPTION=	$(_UNIQ)$(LD_OUTPUT_OPTION)
X___LD_OUTPUT_OPTION=	$(__LD_OUTPUT_OPTION:$(_UNIQ)=-o $@)
X_LD_OUTPUT_OPTION=	$(___LD_OUTPUT_OPTION:$(_UNIQ)%=%)
X
XLIBS_PATH += $(LIBS_PATH_STATIC)
X
Xall:		$(PTARGETCX) $(PTARGET)
X
X$(PTARGETCX):	$(OFILES) $(SRCLIBS)
X		$(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS)
X#
X# If calling "$(PTARGETC)$(_XEXEEXT)" fails, this may be a cross compilation,
X# so retry to run the command under control of "$(CONFIG_RMTCALL)".
X#
X$(PTARGET):	$(OINCSDIR) $(PTARGETCX)
X		@echo "	==> GENERATING include file \"$@\""; \
X		$(PTARGETC)$(_XEXEEXT) > $@ || \
X		$(CONFIG_RMTCALL) $(PTARGETC)$(_XEXEEXT) > $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.inc
echo x - star-1.5.2/RULES/rules.ins
sed 's/^X//' >star-1.5.2/RULES/rules.ins << 'END-of-star-1.5.2/RULES/rules.ins'
X#ident @(#)rules.ins	1.22 10/05/15 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for target installation
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS):
X			$(INSMKDIR) -p $@
X$(SRCROOT)/bins/$(OARCH):
X			$(MKDIR) -p $@
X
X$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT):	$(PTARGET)
X			$(INSTALL) $(INSFLAGS) $(INSOPTX) $(PTARGET) $@
X
X$(SRCROOT)/bins/$(OARCH)/$(TARGET)$(_EXEEXT):	$(PTARGET)
X			$(INSTALL) $(INSFLAGS) $(INSOPTX) $(PTARGET) $@
X
XPHARDLINKS=	$(HARDLINKS:%=$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/%$(_EXEEXT))
Xhardlinks:	$(PHARDLINKS)
X
XPSYMLINKS=	$(SYMLINKS:%=$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/%$(_EXEEXT))
Xsymlinks:	$(PSYMLINKS)
X
X_INSMODEINS=	$(_UNIQ)$(INSMODEI)
X__INSMODEINS=	$(_INSMODEINS:$(_UNIQ)=$(INSMODEX))
XINSMODEINS=	$(__INSMODEINS:$(_UNIQ)%=%)
X
Xdummy $(PHARDLINKS):	$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT)
X	@echo "	==> INSTALLING link \"$@\""; $(RM) $(RM_FORCE) $@; $(LN) $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) $@
X
Xsymdummy $(PSYMLINKS):	$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT)
X	@echo "	==> INSTALLING symlink \"$@\""; $(RM) $(RM_FORCE) $@; $(SYMLINK) $(TARGET)$(_EXEEXT) $@
X
Xxinstall:
X	@if [ ".$(XMK_FILE)" != . ] ; then				\
X		for XMK_F in $(XMK_FILE) XxZzY-- ; do			\
X			(						\
X			if [ -r ./$$XMK_F ] ; then				\
X				echo "	==> MAKING \"install\" ON SUBCOMPONENT \"$(CURDIR)/$$XMK_F\""; \
X				"$(MAKE)" -f $$XMK_F $(MAKEMACS) XARCH=$(XARCH) install;	\
X			else							\
X				if [ $$XMK_F != XxZzY-- ]; then		\
X					echo "NOTICE: Partial source ($(DIRNAME)/$$XMK_F) missing";\
X				fi					\
X			fi						\
X			);						\
X		done							\
X	fi
X
Xinstall:	all	$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS) \
X			$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) \
X			hardlinks symlinks \
X			xinstall
X
Xibins:		all	$(SRCROOT)/bins/$(OARCH) \
X			$(SRCROOT)/bins/$(OARCH)/$(TARGET)$(_EXEEXT)
END-of-star-1.5.2/RULES/rules.ins
echo x - star-1.5.2/RULES/rules.lib
sed 's/^X//' >star-1.5.2/RULES/rules.lib << 'END-of-star-1.5.2/RULES/rules.lib'
X#ident "@(#)rules.lib	1.10 07/05/06 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for traditional libraries (libxxx.a)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
XTARGET=		$(LIB_PREFIX)$(TARGETLIB)$(LIB_SUFFIX)
XTARGET_PATH=	$(OLIBSDIR)
XPTARGET=	$(OLIBSDIR)/$(TARGET)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__AR.o=		$(_UNIQ)$(AR.o)
X___AR.o=	$(__AR.o:$(_UNIQ)=$(AR) $(ARFLAGS) $@)
X_AR.o=		$(___AR.o:$(_UNIQ)%=%)
X
Xall:		$(TARGET_PATH) $(PTARGET)
X
X$(TARGET_PATH):
X		$(MKDIR) -p $@
X
X$(PTARGET):	$(OFILES)
X		$(_AR.o) `$(LORDER) $(POFILES) | $(TSORT)`
X		$(RANLIB) $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lnt
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.lib
echo x - star-1.5.2/RULES/rules.lnt
sed 's/^X//' >star-1.5.2/RULES/rules.lnt << 'END-of-star-1.5.2/RULES/rules.lnt'
X#ident @(#)rules.lnt	1.3 06/05/14 
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Rules for lint
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xlint:		$(CFILES)
X		lint $(LINTFLAGS) $(CPPFLAGS) $^
X
X###########################################################################
END-of-star-1.5.2/RULES/rules.lnt
echo x - star-1.5.2/RULES/rules.loc
sed 's/^X//' >star-1.5.2/RULES/rules.loc << 'END-of-star-1.5.2/RULES/rules.loc'
X#ident "@(#)rules.loc	1.8 12/01/22 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Rules to localize files
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(ARCHDIR)/$(TARGET)
X###########################################################################
X#
X# We are doing a copy to $(ARCHDIR) to be able to have platform dependent
X# shell files in future.
X#
X###########################################################################
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(ARCHDIR) $(PTARGET)
X
X$(PTARGET):	$(ARCHDIR) $(SRCFILE)
X		$(LOCALIZE) $(SRCFILE) $@
X
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.loc
echo x - star-1.5.2/RULES/rules.man
sed 's/^X//' >star-1.5.2/RULES/rules.man << 'END-of-star-1.5.2/RULES/rules.man'
X#ident "@(#)rules.man	1.6 12/01/23 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Manual page building rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/man-$(MANSTYLE).def
X###########################################################################
X
XINSDIR=		$(MANBASE:%=%/)$(MANDIR)/$(MANSECT)
XSUBARCHDIR=	/$(MANDIR)
XTARGET=		$(TARGETMAN).$(MANSUFFIX)
XSRCFILE=	$(MANFILE)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.htm
X
X
X###########################################################################
X# The rest is copied from rules.loc
X###########################################################################
XPTARGET=	$(ARCHDIR)/$(TARGET)
X###########################################################################
X#
X# We are doing a copy to $(ARCHDIR) to be able to have platform dependent
X# shell files in future.
X#
X###########################################################################
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(ARCHDIR) $(PTARGET)
X
X$(PTARGET):	$(ARCHDIR) $(SRCFILE)
X		$(LOCALIZE) $(SRCFILE) $@
X
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.man
echo x - star-1.5.2/RULES/rules.mkd
sed 's/^X//' >star-1.5.2/RULES/rules.mkd << 'END-of-star-1.5.2/RULES/rules.mkd'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# make complete path to the architecture subdirectory.
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X$(ARCHDIR):
X		$(MKDIR) -p $@
X
END-of-star-1.5.2/RULES/rules.mkd
echo x - star-1.5.2/RULES/rules.mks
sed 's/^X//' >star-1.5.2/RULES/rules.mks << 'END-of-star-1.5.2/RULES/rules.mks'
X#ident "@(#)rules.mks	1.13 08/04/19 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for multiple Makefiles (*.mk) in one subdirectory
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X$(ALLTARGETS):
X	@ for MK in $(MK_FILES) ;					\
X	do								\
X		(							\
X		if [ -r ./$$MK ] ; then					\
X			echo "	==> MAKING \"$@\" ON SUBCOMPONENT \"$(CURDIR)/$$MK\""; "$(MAKE)" -f $$MK $(MAKEMACS) XARCH=$(XARCH) $@;\
X		else							\
X			echo "NOTICE: Partial source ($(CURDIR)/$$MK) missing";\
X		fi							\
X		);							\
X	done
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dyn
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
X###########################################################################
END-of-star-1.5.2/RULES/rules.mks
echo x - star-1.5.2/RULES/rules.mod
sed 's/^X//' >star-1.5.2/RULES/rules.mod << 'END-of-star-1.5.2/RULES/rules.mod'
X#ident @(#)rules.mod	1.7 07/05/06 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for loadable streams modules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEX))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
Xall:		$(PTARGET)
X
X$(PTARGET):	$(OFILES) $(SRCLIBS)
X		$(LD) -r -o $@ $(OFILES) $(SRCLIBS) $(LIBS)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.mod
echo x - star-1.5.2/RULES/sub.htm
sed 's/^X//' >star-1.5.2/RULES/sub.htm << 'END-of-star-1.5.2/RULES/sub.htm'
X#ident "@(#)sub.htm	1.5 11/09/18 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Manual page to html converting rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xhtml htmlx htmlxn:
X	@if [ ".$(XMK_FILE)" != . ] ; then				\
X		for XMK_F in $(XMK_FILE) XxZzY-- ; do			\
X			(						\
X			if [ -r ./$$XMK_F ] ; then				\
X				echo "	==> MAKING \"install\" ON SUBCOMPONENT \"$(CURDIR)/$$XMK_F\""; \
X				"$(MAKE)" -f $$XMK_F $(MAKEMACS) XARCH=$(XARCH) $@; \
X			else							\
X				if [ $$XMK_F != XxZzY-- ]; then		\
X					echo "NOTICE: Partial source ($(DIRNAME)/$$XMK_F) missing";\
X				fi					\
X			fi						\
X			);						\
X		done							\
X	fi
END-of-star-1.5.2/RULES/sub.htm
echo x - star-1.5.2/RULES/rules.obj
sed 's/^X//' >star-1.5.2/RULES/rules.obj << 'END-of-star-1.5.2/RULES/rules.obj'
X#ident @(#)rules.obj	1.4 06/05/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Object building rules ... use MAKEPROG specific version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(ARCHDIR)/$(TARGET)$(_EXEEXT)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/r-$(MAKEPROG).obj
END-of-star-1.5.2/RULES/rules.obj
echo x - star-1.5.2/RULES/rules.prg
sed 's/^X//' >star-1.5.2/RULES/rules.prg << 'END-of-star-1.5.2/RULES/rules.prg'
X#ident "@(#)rules.prg	1.20 10/05/15 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Generic rules for program names
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# This file holds definitions that are common to all architectures.
X# It should be included first and then partially overwritten,
X# if the current architecture requires some changes.
X#
X###########################################################################
X#
X# Use the object file extension from the autoconf run for '$o' (.o).
X# It may be overwritten my the compiler configuration rules cc-*.rul
X#
X###########################################################################
Xo=		$(OBJEXT)
X
XCLEAN_FILES=	core err
X
X#
X# Setting $(SHELL) inside a makefile is a really bad idea.
X# Since we allow "smake" to default SHELL to /bin/bosh in
X# case that /bin/sh is broken but /bin/bosh exists, this
X# must not be defined anymore.
X#
X#SHELL=		/bin/sh
X
XLN=		/bin/ln
XSYMLINK=	/bin/ln -s
XRM=		/bin/rm
XMV=		/bin/mv
XLORDER=		lorder
XTSORT=		tsort
XCTAGS=		vctags
XETAGS=		etags
XUMASK=		umask $(UMASK_VAL)
XUMASK_DEF=	002
XINSUMASK=	umask $(INSUMASK_VAL)
XINSUMASK_DEF=	022
X
XRM_FORCE=	-f
XRM_RECURS=	-r
XRM_RF=		$(RM_RECURS) $(RM_FORCE)
X
XRM_F=		$(RM) $(RM_FORCE)
X
XINSMODEF_DEF=	444
XINSMODEX_DEF=	755
XINSUSR_DEF=	root
XINSGRP_DEF=	bin
X
X_DEFINSUMASK=	$(_UNIQ)$(DEFINSUMASK)
X__DEFINSUMASK=	$(_DEFINSUMASK:$(_UNIQ)=$(INSUMASK_DEF))
XINSUMASK_VAL=	$(__DEFINSUMASK:$(_UNIQ)%=%)
X
X_DEFUMASK=	$(_UNIQ)$(DEFUMASK)
X__DEFUMASK=	$(_DEFUMASK:$(_UNIQ)=$(UMASK_DEF))
XUMASK_VAL=	$(__DEFUMASK:$(_UNIQ)%=%)
X
X_DEFINSMODEF=	$(_UNIQ)$(DEFINSMODEF)
X__DEFINSMODEF=	$(_DEFINSMODEF:$(_UNIQ)=$(INSMODEF_DEF))
XINSMODEF=	$(__DEFINSMODEF:$(_UNIQ)%=%)
X
X_DEFINSMODEX=	$(_UNIQ)$(DEFINSMODEX)
X__DEFINSMODEX=	$(_DEFINSMODEX:$(_UNIQ)=$(INSMODEX_DEF))
XINSMODEX=	$(__DEFINSMODEX:$(_UNIQ)%=%)
X
X_DEFINSUSR=	$(_UNIQ)$(DEFINSUSR)
X__DEFINSUSR=	$(_DEFINSUSR:$(_UNIQ)=$(INSUSR_DEF))
XINSUSR=		$(__DEFINSUSR:$(_UNIQ)%=%)
X
X_DEFINSGRP=	$(_UNIQ)$(DEFINSGRP)
X__DEFINSGRP=	$(_DEFINSGRP:$(_UNIQ)=$(INSGRP_DEF))
XINSGRP=		$(__DEFINSGRP:$(_UNIQ)%=%)
X
X
XLD=		@echo "	==> LINKING   \"$@\""; ld
XLOCALIZE=	@echo "	==> LOCALIZING \"$@\""; $(RM_F) $@; cp
XINSTALL=	@echo "	==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP)
XCHMOD=		@echo "	==> SETTING PERMISSIONS ON \"$@\""; chmod
XCHOWN=		@echo "	==> SETTING OWNER ON \"$@\""; chown
XCHGRP=		@echo "	==> SETTING GROUP ON \"$@\""; chgrp
XAR=		@echo "	==> ARCHIVING  \"$@\""; ar
XARFLAGS=	cr
X#YACC=		@echo "	==> YACCING \"$@\""; yacc
X#LEX=		@echo "	==> LEXING \"$@\""; lex
X#AWK=		@echo "	==> AWKING \"$@\""; awk
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; makedepend
XMKDEP_OUT=	-f -
XMKDIR=		@echo "	==> MAKING DIRECTORY \"$@\""; $(UMASK); mkdir
XMKDIR_SH=	@echo "	==> MAKING DIRECTORY \"$@\""; $(UMASK); sh $(SRCROOT)/conf/mkdir-sh
XINSMKDIR=	@echo "	==> MAKING DIRECTORY \"$@\""; $(INSUMASK); mkdir
XINSMKDIR_SH=	@echo "	==> MAKING DIRECTORY \"$@\""; $(INSUMASK); sh $(SRCROOT)/conf/mkdir-sh
END-of-star-1.5.2/RULES/rules.prg
echo x - star-1.5.2/RULES/rules.rdi
sed 's/^X//' >star-1.5.2/RULES/rules.rdi << 'END-of-star-1.5.2/RULES/rules.rdi'
X#ident @(#)rules.rdi	1.10 11/04/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# DIRS contains the names of all directories where sub make should take place
X# This is a modified version for the project's root directory
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xinclude		$(SRCROOT)/$(RULESDIR)/rules1.dir
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
X###########################################################################
X
X# The need for this special variant of rules has been removed by introducing
X# the SRCROOTSL macro in RULES/rules1.top
X###########################################################################
X# Due to a serious bug in SunPRO make we cannot include the configuration
X# rules. SunPRO make inconsistsently shortens rules that start with "./"
X# and thus wil not find existing rules for a file to be included.
X# Due to a bug in GNU make dynamic configuration must have been run before
X# C-compiler generated dependency rules are loaded. This is done by running
X# make in the 'conf' directory before any other target is made.
X#
X# include		$(SRCROOT)/$(RULESDIR)/rules.cnf
X###########################################################################
X#config: conf_warn
X
X#conf_warn:
X#	@echo "$@: cannot make due to a SunPRO make bug"
END-of-star-1.5.2/RULES/rules.rdi
echo x - star-1.5.2/RULES/rules.rel
sed 's/^X//' >star-1.5.2/RULES/rules.rel << 'END-of-star-1.5.2/RULES/rules.rel'
X#ident @(#)rules.rel	1.9 11/04/14 
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Release building rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XMAKE_LICENSE=MKGNU2
XREL_SRC_MATCH=cat
XREL_MAKEFILE_MATCH=cat
X
XDRELFILES=	$(CFILES:%=release/%) $(HFILES:%=release/%) $(XRELFILES:%=release/%)
X
X_RELFILES=	$(_UNIQ)$(RELFILES)
X__RELFILES=	$(_RELFILES:$(_UNIQ)=$(DRELFILES))
XRELFILES_=      $(__RELFILES:$(_UNIQ)%=%)
X
Xrel: release/ $(RELFILES_)
X
Xrelease/:
X	$(MKDIR) -p $@
X
Xrelease/%.c: %.c
X	rm -f $@
X	-unifdef $(IFDEF) $< | $(REL_SRC_MATCH) >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/%.h: %.h
X	rm -f $@
X	-unifdef $(IFDEF) $< | $(REL_SRC_MATCH) >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/Makefile%: Makefile%
X	rm -f $@
X	-sed -e '/IFDEF=/,$$d' $< | $(REL_MAKEFILE_MATCH) >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/%.mk: %.mk
X	rm -f $@
X	-sed -e '/IFDEF=/,$$d' $< >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
X
Xrelease/%: %
X	rm -f $@
X#	-unifdef $(IFDEF) $< >$@
X	-cat $< >$@
X	-chmod 444 $@
X	-cpmodes $< $@
X	cptime $< $@
X	$(MAKE_LICENSE) $@
X	rm -f $@.bak
END-of-star-1.5.2/RULES/rules.rel
echo x - star-1.5.2/RULES/rules.scr
sed 's/^X//' >star-1.5.2/RULES/rules.scr << 'END-of-star-1.5.2/RULES/rules.scr'
X#ident "@(#)rules.scr	1.2 06/05/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Shell script building rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSRCFILE=	$(SCRFILE)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.loc
X###########################################################################
END-of-star-1.5.2/RULES/rules.scr
echo x - star-1.5.2/RULES/rules.shl
sed 's/^X//' >star-1.5.2/RULES/rules.shl << 'END-of-star-1.5.2/RULES/rules.shl'
X#ident "@(#)rules.shl	1.15 10/10/03 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules for shared (dynamic) libraries
X#
X# SUBARCHDIR must be before any other definitions
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XSUBARCHDIR=		/pic
XCOPTS +=		$(COPTDYN)
XC++OPTS +=		$(C++OPTDYN)
XLDOPTS +=		$(LDOPTDYN)
XLDLIBS +=		$(LDLIBDYN)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.obj
X###########################################################################
XTARGET=		$(LIB_PREFIX)$(TARGETLIB)$(SHL_SUFFIX)
XTARGET_BASE=	$(LIB_PREFIX)$(TARGETLIB)
XTARGET_PATH=	$(OLIBSDIR)
XPTARGET=	$(OLIBSDIR)/$(TARGET)
XPTARGET_BASE=	$(OLIBSDIR)/$(TARGET_BASE)
X
X_MAPVERS=	lib$(TARGETLIB)-mapvers
X#MAPVERS=	$(_MAPVERS)	# Use this in *-os-*cc*.rul to enable mapfiles
XPMAPVERS=	$(MAPVERS:%=$(ARCHDIR)/$(MAPVERS))
X
X$(PTARGET):	$(PMAPVERS)
X
X#
X# $(PMAPVERS) may be empty and POSIX does not permit empty target lists.
X# We add an impossible target to make sure there is no empty target.
X#
X$(PMAPVERS) No/TaR/GeT:	$(MAPVERS)
X			@echo "	==> LOCALIZING mapfile \"$@\""; \
X			$(CPPX) $(CPPFLAGS) $^ > $@ || $(RM) $(RM_FORCE) $@
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X__DYNLD.o=	$(_UNIQ)$(DYNLD.o)
X___DYNLD.o=	$(__DYNLD.o:$(_UNIQ)=$(DYNLD) -o $@ $(LDFLAGS) `$(LORDER) $(POFILES) | $(TSORT)` $(LDLIBS))
X_DYNLD.o=	$(___DYNLD.o:$(_UNIQ)%=%)
X
Xall:		$(TARGET_PATH) $(PTARGET)
X
X$(TARGET_PATH):
X		$(MKDIR) -p $@
X
X$(PTARGET):	$(OFILES)
X			$(_DYNLD.o)
X			-$(LNDYNLIB)
X
XSYMLINKS +=	$(TARGET_BASE).so
X
X#			@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dep
X###########################################################################
END-of-star-1.5.2/RULES/rules.shl
echo x - star-1.5.2/RULES/rules.tag
sed 's/^X//' >star-1.5.2/RULES/rules.tag << 'END-of-star-1.5.2/RULES/rules.tag'
X#ident "@(#)rules.tag	1.2 06/05/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Tag building rules ... use MAKEPROG specific version
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/r-$(MAKEPROG).tag
END-of-star-1.5.2/RULES/rules.tag
echo x - star-1.5.2/RULES/rules1.dir
sed 's/^X//' >star-1.5.2/RULES/rules1.dir << 'END-of-star-1.5.2/RULES/rules1.dir'
X#ident @(#)rules1.dir	1.16 11/04/14 
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# DIRS contains the names of all directories where sub make should take place
X#
X# The code that is shared between rules.dir and rules.rdi
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X$(ALLTARGETS):
X	@list="$(DIRS)";							\
X	if [ -d TARGETS -a -f TARGETS/__slot ]; then				\
X		list=`echo TARGETS/[0123456789][0123456789]* |			\
X			sed -e 's;TARGETS/[0123456789][0123456789];;g' | sed -e 's;!@!;/;g'`;\
X	fi;									\
X	for DIR in $${list} ;							\
X	do									\
X		(								\
X		echo "	==> MAKING \"$@\" ON SUBDIRECTORY \"$(CURDIR)/$$DIR\"";\
X		if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then			\
X			cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR $@;		\
X		else								\
X			echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\
X		fi								\
X		);								\
X	done
X
Xtinfo:
X	@[ -d TARGETS -a -f TARGETS/__slot ] && list=`echo TARGETS/[0123456789][0123456789]*`;\
X	for i in $${list};							\
X	do									\
X		(read line < $$i;						\
X		name=`echo $$i | sed -e 's;TARGETS/[0123456789][0123456789];;' | sed -e 's;!@!;/;g'`; \
X		echo "$$name	- $${line}";					\
X		);								\
X	done
X
X###########################################################################
END-of-star-1.5.2/RULES/rules1.dir
echo x - star-1.5.2/RULES/rules1.top
sed 's/^X//' >star-1.5.2/RULES/rules1.top << 'END-of-star-1.5.2/RULES/rules1.top'
X#ident "@(#)rules1.top	1.45 11/09/18 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Rules that should be included at top of every Makefile
X# Do not include this file directly; this is the language independent
X# version that may be included in special purpose versions.
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# Global definitions:
X#
X# Define magic unique cookie
X#
X###########################################################################
X_UNIQ= .XxZzy-
X
X###########################################################################
X#
X# Make sure this becomes the default target
X#
X###########################################################################
Xall:
X
X###########################################################################
X#
X# Build a macro $(SRCROOTSL) that allows to use file name
X# $(SRCROOTSL)incs/Dcc.$(PARCH)$(-O_ARCH) instead of using
X# the file name $(SRCROOT)/incs/Dcc.$(PARCH)$(-O_ARCH) 
X#
X# This is needed because of a serious bug in SunPRO make. We need to do some
X# tricks in order to make code working that depends on including files where
X# the file name is a macro and the file may be built as a result of a make
X# rule.
X#
X# SunPRO make inconsistsently shortens rules that start with "./"
X# and thus will not find existing rules for a file to be included.
X# We use pattern matching macro expansions to consistently shorten the
X# name if it starts with "./".  This allows to use the same textual
X# string for both the rule and the include statement.
X#
X# Note that Thus bug has been reported to Sun in 1998 but Sun seems not
X# interested to fix the bug.
X#
X###########################################################################
X_SRCROOTSL=	$(SRCROOT)/
XSRCROOTSL= 	$(_SRCROOTSL:./%=%)
X
X###########################################################################
X#
X# Global handler for failed inludes
X#
X###########################################################################
X.INCLUDE_FAILED:
X	@echo " ==> AUTOMAKING \"$^\""; sh $(SRCROOTSL)conf/makeinc $^
X
X###########################################################################
X#
X# Legacy support for old smake programs ...
X#
X###########################################################################
X.INCLUDEFAILED:
X	@echo " ==> AUTOMAKING \"$^\""; sh $(SRCROOTSL)conf/makeinc $^
X
X###########################################################################
X#
X# Some global constants or pre-definitions
X#
X###########################################################################
X_LCONFIG=	$(_UNIQ)$(LCONFIG)
X__LCONFIG=	$(_LCONFIG:$(_UNIQ)=ldummy.cnf)
XLOCAL_CNF=	$(__LCONFIG:$(_UNIQ)%=%)
X###########################################################################
X
X###########################################################################
X#
X# Standard (automatic) makeprog identification
X#
X# Each make program should define a macro: MAKE_NAME for identification.
X# MAKE_NAME in this case is a built in macro like MAKE or MAKEFLAGS.
X# Currently only 'smake' implements this feature.
X#
X###########################################################################
X_MAKEPROG=	$(_UNIQ)$(MAKE_NAME)
X__MAKEPROG=	$(_MAKEPROG:$(_UNIQ)=$(MAKEPROG))
X_XMAKEPROG=	$(__MAKEPROG:$(_UNIQ)%=%)
X
X# gmake defines a macro MAKE_COMMAND. If neither MAKE_NAME is defined by 
X# the make program, nor MAKEPROG is set, try this to recognize gmake.
X#
X_MAKE_COMMAND=	$(MAKE_COMMAND:%make=gmake)
X
X__XMAKEPROG=	$(_UNIQ)$(_XMAKEPROG)
X___XMAKEPROG=	$(__XMAKEPROG:$(_UNIQ)=$(_MAKE_COMMAND))
XXMAKEPROG=	$(___XMAKEPROG:$(_UNIQ)%=%)
X
Xinclude		$(SRCROOT)/$(RULESDIR)/mk-$(XMAKEPROG).id
X
X###########################################################################
X#
X# Standard (automatic) os identification
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/os-$(OSNAME).id
X
X###########################################################################
X#
X# Global os definitions
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/os-$(O_ARCH).def
X
X###########################################################################
X#
X# Some global project definitions that may be overwritten in 'Defaults'
X#
X###########################################################################
XCWARNOPTS=	$(CWOPTS)
X
X###########################################################################
X#
X# Global project definitions
X#
X###########################################################################
XDEF_ROOT=	$(SRCROOT)
XDEF_DIR=	DEFAULTS
X
X_DEFAULTSROOT=	$(_UNIQ)$(DEFAULTSROOT)
X__DEFAULTSROOT=	$(_DEFAULTSROOT:$(_UNIQ)=$(DEF_ROOT))
XDEFLTSROOT=	$(__DEFAULTSROOT:$(_UNIQ)%=%)
X
X_DEFAULTSDIR=	$(_UNIQ)$(DEFAULTSDIR)
X__DEFAULTSDIR=	$(_DEFAULTSDIR:$(_UNIQ)=$(DEF_DIR))
XDEFLTSDIR=	$(__DEFAULTSDIR:$(_UNIQ)%=%)
X
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
X
X###########################################################################
X#
X# Set DEST_DIR
X# We use "DESTDIR" as external visible name to be compatible to other sw.
X#
X###########################################################################
XDEST_DIR=	$(DESTDIR:%/=%)
X
X###########################################################################
X#
X# Set INSBASE
X#
X###########################################################################
XINSBASE=	$(INS_BASE:%/=%)
X
X###########################################################################
X#
X# Standard default man install base
X#
X###########################################################################
XDEFMANBASE_DEF=	share
X
X_MANBASE=	$(_UNIQ)$(DEFMANBASE)
X__MANBASE=	$(_MANBASE:$(_UNIQ)=$(DEFMANBASE_DEF))
XMANBASE=	$(__MANBASE:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Get curent directory name
X#
X###########################################################################
X_DIRNAME=	$(_UNIQ)$(DIRNAME)
X__DIRNAME=	$(_DIRNAME:$(_UNIQ)=...)
XCURDIR=		$(__DIRNAME:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Standard UNIX compiler name for use as architecture name.
X#
X# (this is not necessarily the name the compiler is called by)
X# This is now defined in $(DEFAULTSROOT)/Defaults
X# If not ... use 'cc'
X#
X###########################################################################
XDEFCCOM_DEF=	cc
X
X_DEFCCOM=	$(_UNIQ)$(DEFCCOM)
X__DEFCCOM=	$(_DEFCCOM:$(_UNIQ)=$(DEFCCOM_DEF))
XCCOM_DEF=	$(__DEFCCOM:$(_UNIQ)%=%)
X
X_CCOM=		$(_UNIQ)$(CCOM)
X__CCOM=		$(_CCOM:$(_UNIQ)=$(CCOM_DEF))
XC_ARCH=		$(__CCOM:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Standard default include directories
X#
X###########################################################################
XDEFINCDIRS_DEF=	$(SRCROOT)/include
X
X_INCDIRS=	$(_UNIQ)$(DEFINCDIRS)
X__INCDIRS=	$(_INCDIRS:$(_UNIQ)=$(DEFINCDIRS_DEF))
XINCDIRS=	$(__INCDIRS:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Prepare come macros needed to build $(ARCHDIR)
X#
X# Build macros for:
X#	- processor type
X#	- operating system
X#	- compiler identification
X#
X###########################################################################
XKARCH_DEF=	$(K_ARCH)
XMARCH_DEF=	$(M_ARCH)
XPARCH_DEF=	$(P_ARCH)
X
XKARCH=		K_ARCH
X
X_MARCH=		$(_UNIQ)$(ARCH)
X__MARCH=	$(_MARCH:$(_UNIQ)=$(MARCH_DEF))
XMARCH=		$(__MARCH:$(_UNIQ)%=%)
X
X_PARCH=		$(_UNIQ)$(ARCH)
X__PARCH=	$(_PARCH:$(_UNIQ)=$(PARCH_DEF))
XPARCH=		$(__PARCH:$(_UNIQ)%=%)
X
X###########################################################################
X#
X# Now include the file $(SRCROOT)/incs/Dcc.$(PARCH)$(-O_ARCH) 
X# which is needed if the C-complier from the manual default configutration 
X# is not present on the current system. We try to use GCC as fallback
X# in this case.
X#
X# Due to a serious bug in SunPRO make we need to do some tricks to make
X# the following code working.
X#
X# See notes about $(SRCROOT)/ vs. $(SRCROOTSL) above.
X#
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.prg
X
X$(SRCROOTSL)incs:
X	$(MKDIR_SH) -p $@
X
X$(SRCROOTSL)incs/Dnull: $(SRCROOTSL)incs
X		@echo > $@
X
Xinclude		$(SRCROOTSL)incs/Dnull
X
X_DCC=	$(SRCROOTSL)incs/Dcc.$(PARCH)$(-O_ARCH)
X
X$(_DCC):
X	sh $(SRCROOTSL)conf/cc-config.sh $(C_ARCH:%64=%) $(CCOM_DEF) $@
X
Xinclude		$(_DCC)
X
X###########################################################################
X#
X# Build $(ARCHDIR) which occupies a central role in the whole
X# make file system. ARCHDIR is used as a sub directory name to keep
X# platform dependent files on different places.
X#
X# It is built from:
X#	- processor type
X#	- operating system
X#	- compiler identification
X#
X# A possible name could be:
X#	mc68020-sunos4-cc
X#
X###########################################################################
X#OARCH=		$(MARCH)$(-O_ARCH)-$(C_ARCH)
XOARCH=		$(PARCH)$(-O_ARCH)-$(C_ARCH)
XXARCH=		$(K_ARCH)$(-O_ARCH)-$(C_ARCH)
X.print:
X	echo $(XP_ARCH) $(P_ARCH) $(OARCH) $(XARCH)
X
X###########################################################################
X#
X# All generated files are placed directly into this subdirectory.
X# This includes e.g. yacc output (.c & .h files).
X# SUBARCH is used if a object is conditional compiled in multiple ways.
X#
X###########################################################################
XOARCHDIR=	OBJ/$(OARCH)
XARCHDIR=	OBJ/$(OARCH)$(SUBARCHDIR)$(SUBARCH)
X
X###########################################################################
X#
X# See notes about $(SRCROOT)/ vs. $(SRCROOTSL) above.
X#
X###########################################################################
XOLIBSDIR=	$(SRCROOTSL)libs/$(OARCH)$(SUBARCHDIR)$(SUBARCH)$(SHLDIR)
XOLIBSDIR_STATIC=$(SRCROOTSL)libs/$(OARCH)$(SUBARCHDIR)$(SUBARCH)
XOINCSDIR=	$(SRCROOTSL)incs/$(OARCH)
X
X###########################################################################
X# Location for targets:
X#
X# - all						: see appropriate rules
X# - lint					: rules.lnt
X# - clean, clobber, distclean, relink, rmtarget	: rules.clr
X# - rel						: rules.rel
X# - install, ibins				: rules.ins
X# - html, htmlx, htmlxn				: rules.htm & sub.htm
X# - tarpkg tarpkg1 tarpkg2			: rules.sps
X# - depend, rmdep				: rules.dep
X# - config					: rules.cnf
X# - tags, TAGS					: rules.tag
X# - .help					: rules.hlp
X# - .version					: rules.hlp
X# - tinfo					: rules.dir/rules.rdi
X#
X# We do not put '.help', '.version' and 'tinfo' into 'ALLTARGETS' because:
X#
X#	.help	is not recursive
X#	.version is not recursive
X#	tinfo	is handeled separately in rules1.dir
X#
X# If we would add .help and tinfo, we would get multiple defined target
X# messages.
X###########################################################################
XALLTARGETS=	all lint clean clobber distclean ibins depend rmdep \
X		config TAGS tags rmtarget relink rel \
X		$(INSTALLTARGETS) $(MANTARGETS) $(PKGTARGETS)
X
XINSTALLTARGETS=	install
XMANTARGETS=	html htmlx htmlxn
XPKGTARGETS=	tarpkg tarpkg1 tarpkg2
X
X.PHONY:	$(ALLTARGETS) .help tinfo shell
X
X###########################################################################
X# Allow to start a shell in order to check the environment
X###########################################################################
Xshell:
X	$(SHELL)
X
X###########################################################################
X# Include a target definition for all official targets so calling
X# 'make' with a target that is not defined in the current makefiles
X# will cause the target to be ignored.
X###########################################################################
X$(ALLTARGETS):
X
Xinclude		$(SRCROOT)/$(RULESDIR)/version
END-of-star-1.5.2/RULES/rules1.top
echo x - star-1.5.2/RULES/sun3-sunos4-cc.rul
sed 's/^X//' >star-1.5.2/RULES/sun3-sunos4-cc.rul << 'END-of-star-1.5.2/RULES/sun3-sunos4-cc.rul'
X#ident "@(#)sun3-sunos4-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on Motorola mc 680x0
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sun.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
END-of-star-1.5.2/RULES/sun3-sunos4-cc.rul
echo x - star-1.5.2/RULES/sun3-sunos4-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/sun3-sunos4-gcc.rul << 'END-of-star-1.5.2/RULES/sun3-sunos4-gcc.rul'
X#ident "@(#)sun3-sunos4-gcc.rul	1.11 09/06/06 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on Motorola mc 680x0 (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
XCWOPTS=		-Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes
X
XOSDEFS +=
X
XCOPTOPT=	-O2
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
END-of-star-1.5.2/RULES/sun3-sunos4-gcc.rul
echo x - star-1.5.2/RULES/sun4-sunos4-cc.rul
sed 's/^X//' >star-1.5.2/RULES/sun4-sunos4-cc.rul << 'END-of-star-1.5.2/RULES/sun4-sunos4-cc.rul'
X#ident "@(#)sun4-sunos4-cc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sun.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
END-of-star-1.5.2/RULES/sun4-sunos4-cc.rul
echo x - star-1.5.2/RULES/sun4-sunos4-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/sun4-sunos4-gcc.rul << 'END-of-star-1.5.2/RULES/sun4-sunos4-gcc.rul'
X#ident "@(#)sun4-sunos4-gcc.rul	1.8 07/05/08 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 4.x on sparc (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm
X
XLDOPTDYN=
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
END-of-star-1.5.2/RULES/sun4-sunos4-gcc.rul
echo x - star-1.5.2/RULES/sun4-sunos5-cc.rul
sed 's/^X//' >star-1.5.2/RULES/sun4-sunos5-cc.rul << 'END-of-star-1.5.2/RULES/sun4-sunos5-cc.rul'
X#ident "@(#)sun4-sunos5-cc.rul	1.12 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/sun4-sunos5-cc.rul
echo x - star-1.5.2/RULES/sun4-sunos5-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/sun4-sunos5-gcc.rul << 'END-of-star-1.5.2/RULES/sun4-sunos5-gcc.rul'
X#ident "@(#)sun4-sunos5-gcc.rul	1.14 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# Solaris comes with a linker that supports mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/sun4-sunos5-gcc.rul
echo x - star-1.5.2/RULES/os-openvms.id
sed 's/^X//' >star-1.5.2/RULES/os-openvms.id << 'END-of-star-1.5.2/RULES/os-openvms.id'
X#ident "@(#)os-openvms.id	1.1 09/10/29 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for OpenVMS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		openvms
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-openvms.id
echo x - star-1.5.2/RULES/x86pc-qnx-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/x86pc-qnx-gcc.rul << 'END-of-star-1.5.2/RULES/x86pc-qnx-gcc.rul'
X###########################################################################
X#ident "@(#)x86pc-qnx-gcc.rul	1.7 07/05/09 "
X###########################################################################
X# Written 2001 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for QNX Neutrino
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	-lsocks -lrpc
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/x86pc-qnx-gcc.rul
echo x - star-1.5.2/RULES/rules.sps
sed 's/^X//' >star-1.5.2/RULES/rules.sps << 'END-of-star-1.5.2/RULES/rules.sps'
X#ident "@(#)rules.sps	1.13 07/05/06 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for wrapping around other make systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XPTARGET=	$(TARGET)
XSRCFILE=	$(TARGET)
X###########################################################################
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
X#all:		$(SRCFILE)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/sub.htm
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.clr
X#include		$(SRCROOT)/$(RULESDIR)/rules.ins
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tag
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.hlp
Xinclude		$(SRCROOT)/$(RULESDIR)/dummy.dep
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.tpk
X###########################################################################
X
Xall: $(ARCHDIR)/config.status $(POSTCONFIG)
X	cd $(ARCHDIR)/; $(MAKE) $(MAKEMACS) $(MAKEOPTS) $@
X
Xinstall: all
X	cd $(ARCHDIR)/; DESTDIR=$(DEST_DIR) $(MAKE) $(MAKEMACS) $(MAKEOPTS) DESTDIR=$(DEST_DIR) $@
X
X#
X# Hack until the <mach>-<os>-*cc.rul files are updated
X#
X_HCC_COM=	$(OARCH:%-gcc=gcc)
XHCC_COM=	$(_HCC_COM:%-cc=cc)
X
X_CC_COM=	$(_UNIQ)$(CC_COM)
X__CC_COM=	$(_CC_COM:$(_UNIQ)=$(HCC_COM))
XXCC_COM=	$(__CC_COM:$(_UNIQ)%=%)
X
X_CONF_SCRIPT=	$(_UNIQ)$(CONF_SCRIPT)
X__CONF_SCRIPT=	$(_CONF_SCRIPT:$(_UNIQ)=configure)
XCONFSCRIPT=	$(__CONF_SCRIPT:$(_UNIQ)%=%)
X
X#
X# Note: $(___CONF_SCR:$(_UNIQ)=:) is not accepted by Sun make
X# because of a parser bug. We thus use "true".
X#
XCOLON=:
X_CONF_SCR=	$(CONFSCRIPT:none=)
X__CONF_SCR=	$(_CONF_SCR:%=../../$(SRC_DIR)/%)
X___CONF_SCR=	$(_UNIQ)$(__CONF_SCR)
X____CONF_SCR=	$(___CONF_SCR:$(_UNIQ)=true)
XPCONFSCRIPT=	$(____CONF_SCR:$(_UNIQ)%=%)
X
X_LNDIR_PRG=	$(_UNIQ)$(LNDIR_PRG)
X__LNDIR_PRG=	$(_LNDIR_PRG:$(_UNIQ)=:)
XLNDIRPRG=	$(__LNDIR_PRG:$(_UNIQ)%=%)
X
X#$(ARCHDIR)/config.status: $(SRC_DIR)/$(CONFSCRIPT)
X
X			# Expands to: $(SRC_DIR)/$(CONFSCRIPT) is non-empty
X$(ARCHDIR)/config.status: $(_CONF_SCR:%=$(SRC_DIR)/%)
X	mkdir -p $(ARCHDIR)/; cd $(ARCHDIR)/; \
X	$(LNDIRPRG) ../../$(SRC_DIR)/; \
X	CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" MAKE="$(MAKE)" $(MAKEMACS) $(PCONFSCRIPT) $(CONF_OPTS) && \
X	( [ ! -f config.status ] && touch config.status || : )
END-of-star-1.5.2/RULES/rules.sps
echo x - star-1.5.2/RULES/rules.tpk
sed 's/^X//' >star-1.5.2/RULES/rules.tpk << 'END-of-star-1.5.2/RULES/rules.tpk'
X#ident "@(#)rules.tpk	1.7 08/12/27 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for creating binary tar packages
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X###########################################################################
X# If we are included before rules.dir, this will stop to propagate
X# the targets tarpkg1 & tarpkg to sub makes but handle packaging at this
X# directory bundling level.
X###########################################################################
XPKGTARGETS=
X
XOTARSDIR=	$(SRCROOTSL)tars/$(OARCH)
X$(OTARSDIR):
X		$(MKDIR) -p $@
X
X
X_TARGETAR=	$(TARGET_AR:%=$(OTARSDIR)/%)
X__TARGETAR=	$(_UNIQ)$(_TARGETAR)
X___TARGETAR=	$(__TARGETAR:$(_UNIQ)=tarpkg)
XTARGETAR=	$(___TARGETAR:$(_UNIQ)%=%)
X
X_MCS_PROJECT=	$(_UNIQ)$(PROJECTNAME)
X__MCS_PROJECT=	$(_MCS_PROJECT:$(_UNIQ)=SPS-Generic)
XMCS_PROJECTNAME= $(__MCS_PROJECT:$(_UNIQ)%=%)
X
Xta:
X	echo "'$(TARGETAR)'"
X	echo "'$(TARGETAR).tar'"
X
Xtarpkg: $(OTARSDIR) tarpkg0 tarpkg1 tarpkg2
X
Xtarpkg0:
X	rm -rf tarpkg
X
Xtarpkg1:
X	mkdir -p tarpkg tarpkg/$(INSBASE)/bin tarpkg/$(INSBASE)/sbin tarpkg/$(INSBASE)/etc \
X		tarpkg/$(INSBASE)/lib tarpkg/$(INSBASE)/share/man
X	ln -s share/man tarpkg/$(INSBASE)/man
X	if [ ."$(PRE_INST_CMDS)" != . ]; then cd tarpkg && eval "$(PRE_INST_CMDS)" ; fi
X	$(MAKE) $(MAKE_FILE) $(MAKEMACS) DESTDIR=`pwd`/tarpkg install
X	if [ ."$(POST_INST_CMDS)" != . ]; then cd tarpkg && eval "$(POST_INST_CMDS)" ; fi
X	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=tarpkg/%); strip $(STRIPLIST:%=tarpkg/%); fi
X	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=tarpkg/%); strip -x $(STRIPXLIST:%=tarpkg/%); fi
X	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=tarpkg/%); mcs -d -a "$(MCS_PROJECTNAME)" $(MCSLIST:%=tarpkg/%); fi
X	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd tarpkg && eval "$(POST_STRIP_CMDS)" ; fi
X	find tarpkg -print | sort > /tmp/so.$$$$; diff filelist /tmp/so.$$$$; rm -f /tmp/so.$$$$
X
Xtarpkg2:
X	star -C tarpkg/ pkglist=pkglist -cP > $(TARGETAR).tar
X	bzip2 -9f $(TARGETAR).tar
X	rm -rf tarpkg
END-of-star-1.5.2/RULES/rules.tpk
echo x - star-1.5.2/RULES/i86pc-sunos5-cc64.rul
sed 's/^X//' >star-1.5.2/RULES/i86pc-sunos5-cc64.rul << 'END-of-star-1.5.2/RULES/i86pc-sunos5-cc64.rul'
X#ident "@(#)i86pc-sunos5-cc64.rul	1.6 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/i86pc-sunos5-cc64.rul
echo x - star-1.5.2/RULES/cc-dec.rul
sed 's/^X//' >star-1.5.2/RULES/cc-dec.rul << 'END-of-star-1.5.2/RULES/cc-dec.rul'
X#ident "@(#)cc-dec.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1998-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Digital UNIX cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DECCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DECC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR) -L/usr/ccs/lib
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX) -lrt
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-dec.rul
echo x - star-1.5.2/RULES/sun4-sunos5-cc64.rul
sed 's/^X//' >star-1.5.2/RULES/sun4-sunos5-cc64.rul << 'END-of-star-1.5.2/RULES/sun4-sunos5-cc64.rul'
X#ident "@(#)sun4-sunos5-cc64.rul	1.7 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/sun4-sunos5-cc64.rul
echo x - star-1.5.2/RULES/i86pc-sunos5-gcc64.rul
sed 's/^X//' >star-1.5.2/RULES/i86pc-sunos5-gcc64.rul << 'END-of-star-1.5.2/RULES/i86pc-sunos5-gcc64.rul'
X#ident "@(#)i86pc-sunos5-gcc64.rul	1.8 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x for PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# Solaris comes with a linker that supports mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/i86pc-sunos5-gcc64.rul
echo x - star-1.5.2/RULES/os-dragonfly.def
sed 's/^X//' >star-1.5.2/RULES/os-dragonfly.def << 'END-of-star-1.5.2/RULES/os-dragonfly.def'
X#ident "@(#)os-dragonfly.def	1.2 06/05/14 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Global os definitions for DragonFly BSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-dragonfly.def
echo x - star-1.5.2/RULES/os-dragonfly.id
sed 's/^X//' >star-1.5.2/RULES/os-dragonfly.id << 'END-of-star-1.5.2/RULES/os-dragonfly.id'
X#ident "@(#)os-dragonfly.id	1.2 06/05/14 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for DragonFly BSD
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		dragonfly
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-dragonfly.id
echo x - star-1.5.2/RULES/sun4-sunos5-gcc64.rul
sed 's/^X//' >star-1.5.2/RULES/sun4-sunos5-gcc64.rul << 'END-of-star-1.5.2/RULES/sun4-sunos5-gcc64.rul'
X#ident "@(#)sun4-sunos5-gcc64.rul	1.8 10/10/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x on sparc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# Solaris comes with a linker that supports mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
X#
X# We should use -Wl,-ztext here, but gcc does not create fully compliant
X# object files.
X#
XLDOPTDYN=	-dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/sun4-sunos5-gcc64.rul
echo x - star-1.5.2/RULES/cc-dg.rul
sed 's/^X//' >star-1.5.2/RULES/cc-dg.rul << 'END-of-star-1.5.2/RULES/cc-dg.rul'
X#ident "@(#)cc-dg.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DGUX cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DGCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DGC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-Xa
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-xpg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -xM
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-dg.rul
echo x - star-1.5.2/RULES/i486-cygwin32_nt-cl.rul
sed 's/^X//' >star-1.5.2/RULES/i486-cygwin32_nt-cl.rul << 'END-of-star-1.5.2/RULES/i486-cygwin32_nt-cl.rul'
X#ident "@(#)i486-cygwin32_nt-cl.rul	1.8 09/05/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	cygwin
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
XOSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'fdopen' wurde als veraltet deklariert
X#		The POSIX name for this item is deprecated. Instead, use
X#		the ISO C++ conformant name: _fdopen.
X#
XOSDEFS +=	-D_CRT_NONSTDC_NO_DEPRECATE
X
XKDEFINES=
X
XLIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i486-cygwin32_nt-cl.rul
echo x - star-1.5.2/RULES/os-interix.def
sed 's/^X//' >star-1.5.2/RULES/os-interix.def << 'END-of-star-1.5.2/RULES/os-interix.def'
X#ident "@(#)os-interix.def	1.1 06/06/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (WIN-NT with SFU)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	sysv
END-of-star-1.5.2/RULES/os-interix.def
echo x - star-1.5.2/RULES/os-interix.id
sed 's/^X//' >star-1.5.2/RULES/os-interix.id << 'END-of-star-1.5.2/RULES/os-interix.id'
X#ident "@(#)os-interix.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (WIN-NT with SFU)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		interix
X-O_ARCH=	-$(O_ARCH)
X
X###########################################################################
X#
X# In case we are unable to get the MS-WIN version that
X# runs under Interix, we define NT-4.0 Service Pack 3
X# and use it as a fall-back definition.
X#
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0403
X
X###########################################################################
X#
X# $(MAKE_HOST_OSREL) is only defined in smake. If the macro in undefined
X# -include allows to fail the "include" and use the fall-back above.
X#
X###########################################################################
X-include	$(SRCROOT)/$(RULESDIR)/os-interix-nt-$(MAKE_HOST_OSREL).id
X
END-of-star-1.5.2/RULES/os-interix.id
echo x - star-1.5.2/RULES/x86-interix-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/x86-interix-gcc.rul << 'END-of-star-1.5.2/RULES/x86-interix-gcc.rul'
X#ident "@(#)x86-interix-gcc.rul	1.5 07/05/09 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Interix Systems (WIN-NT with SFU)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-D_ALL_SOURCE
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/x86-interix-gcc.rul
echo x - star-1.5.2/RULES/cc-apollo.rul
sed 's/^X//' >star-1.5.2/RULES/cc-apollo.rul << 'END-of-star-1.5.2/RULES/cc-apollo.rul'
X#ident "@(#)cc-apollo.rul	1.10 13/01/09 "
X###########################################################################
X# Written 2001-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for DomainOS (sys5.3, 10.4.1) cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(APOLLOCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(APOLLOC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-W0,-info,4
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
X#CC_COM=	cc -A systype,bsd4.3
XCC_COM=		/bsd4.3/bin/cc
XCC++_COM=	echo "C++ not yet supported"; exit -1
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
X#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); /user/local/com/makedepend
XMKDEP_OUT=
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # makedepend?
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-apollo.rul
echo x - star-1.5.2/RULES/cc-bemwcc.rul
sed 's/^X//' >star-1.5.2/RULES/cc-bemwcc.rul << 'END-of-star-1.5.2/RULES/cc-bemwcc.rul'
X#ident @(#)cc-bemwcc.rul	1.10 13/01/09 
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for BeOS mwcc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(BEMWCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(BEMWC++OPTOPT) $(C++OPTX)
X
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
X
X#
X# XXX This is used by bemac-beos-cc.rul
X#
XCPPOPTS=	-O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# XXX This is used by bemac-beos-mwcc.rul
X#
XCPPOPTS=	-relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# XXX This is used by powerpc-beos-mwcc.rul
X#
XCPPOPTS=	-relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=	        -w8
XCOPTOPT=	-opt off
XCOPTDYN=	#-fpic
XCOPTGPROF=	#-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
X#
X# XXX This is used by powerpc-beos-mwcc.rul
X#
XLDOPTS=		-multidefs -sym on -g $(LIBS_PATH) $(LDPATH)
X
XLDOPTS=		-multidefs -msg nodup -sym on -g $(LIBS_PATH) $(LDPATH)
XLDOPTDYN=#	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		mwccppc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -make
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # -make?
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-bemwcc.rul
echo x - star-1.5.2/RULES/cc-dumb.rul
sed 's/^X//' >star-1.5.2/RULES/cc-dumb.rul << 'END-of-star-1.5.2/RULES/cc-dumb.rul'
X#ident "@(#)cc-dumb.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1997-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown systems systems with dumb cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DUMBCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DUMBC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
X#
X# Switch optimizing on if your compiler supports it
X#COPTOPT=	-O
XCOPTOPT=	
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
X
XRMDEP=		:
X#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot do -M with unknown cc"; :
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; :
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-dumb.rul
echo x - star-1.5.2/RULES/cc-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/cc-gcc.rul << 'END-of-star-1.5.2/RULES/cc-gcc.rul'
X#ident "@(#)cc-gcc.rul	1.11 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for GCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
X#		-Wtraditional now causes more pain than it helps 
XCWOPTS=		-Wall -Wtraditional
XCWOPTS=		-Wall -Wno-unknown-pragmas \
X		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		gcc
XCC++_COM=	g++
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-gcc.rul
echo x - star-1.5.2/RULES/cc-gcc64.rul
sed 's/^X//' >star-1.5.2/RULES/cc-gcc64.rul << 'END-of-star-1.5.2/RULES/cc-gcc64.rul'
X#ident "@(#)cc-gcc64.rul	1.13 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for GCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XGCC_OPT64=	-m64
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		$(GCC_OPT64)
X#		-Wtraditional now causes more pain than it helps 
XCWOPTS=		-Wall -Wtraditional
XCWOPTS=		-Wall -Wno-unknown-pragmas \
X		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=	$(GCC_OPT64)
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		gcc
XCC++_COM=	g++
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) $(GCC_OPT64)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM) $(GCC_OPT64)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) $(GCC_OPT64)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM) $(GCC_OPT64)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) $(GCC_OPT64)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM) $(GCC_OPT64)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) $(GCC_OPT64) -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) $(GCC_OPT64) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-gcc64.rul
echo x - star-1.5.2/RULES/cc-hp.rul
sed 's/^X//' >star-1.5.2/RULES/cc-hp.rul << 'END-of-star-1.5.2/RULES/cc-hp.rul'
X#ident "@(#)cc-hp.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UC cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(HPCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(HPC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
X#
X# -Ae	      -> ANSI C (non-bundled C only - bundled C ignores -Ae)
X# +DAportable -> Create Parisc-1.1 code
X#
XHP_CC_ANSI_OPT=	-Ae	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_OPT_OPT=	-O	# May be overwritten later from $(OINCSDIR)/rules.cnf
XHP_CC_GPROF_OPT= -G	# May be overwritten later from $(OINCSDIR)/rules.cnf
X
XCOPTS=		$(HP_CC_ANSI_OPT) +DAportable
XCWOPTS=		
XCOPTOPT=	$(HP_CC_OPT_OPT)
XCOPTDYN=	+z
XCOPTGPROF=	$(HP_CC_GPROF_OPT)
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.sl
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-Wl,-soname,$(TARGET)
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-hpux.sh
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; :
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-hp.rul
echo x - star-1.5.2/RULES/cc-ibm.rul
sed 's/^X//' >star-1.5.2/RULES/cc-ibm.rul << 'END-of-star-1.5.2/RULES/cc-ibm.rul'
X#ident "@(#)cc-ibm.rul	1.8 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for IBM AIX cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(IBMCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(IBMC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O
XCOPTDYN=	-pic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-aix.sh
XMKDEP_OUT=
X
X#$RMDEP=		:
X#$#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
X#$MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot do -M with IBM'cc"; :
X#$MKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); # mkdep-aix.sh?
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-ibm.rul
echo x - star-1.5.2/RULES/cc-msc.rul
sed 's/^X//' >star-1.5.2/RULES/cc-msc.rul << 'END-of-star-1.5.2/RULES/cc-msc.rul'
X#ident "@(#)cc-msc.rul	1.21 13/01/09 "
X###########################################################################
X# Written 2006-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(MSCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(MSC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-W3
XCOPTOPT=	-O2
XCOPTDYN=
X#COPTGPROF=	-pg
X#
X# /EHs C++-EH aktivieren (ohne SEH-Ausnahmen)
X# /EHa C++-EH aktivieren (mit SEH-Ausnahmen)
X# /EHc nothrow als Standard fr externes "C"
X# MS seems to need -EHsc in order to create useful code with exceptions
X#
XC++OPTS=	-EHsc
XC++WOPTS=	-W3
XC++OPTOPT=	-O2
XC++OPTDYN=
X#C++OPTGPROF=	-pg
X
X
XLIB_PREFIX=
XLIB_SUFFIX=	.lib
XSHL_SUFFIX=	.dll
X
X#LIBS_PATH=	-libpath:$(OLIBSDIR)
X#LIBS_PATH_STATIC= -libpath:$(OLIBSDIR_STATIC) 
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS:-l%=%.lib) $(LIBX:-l%=%.lib)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
X#LDOPTS=		-link $(LIBS_PATH) $(LDPATH)
XLDOPTS=		-link $(LIBS_PATH:-L%=-libpath:%) $(LDPATH:-L%=-libpath:%)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=	-dll -def:$(TARGETLIB).def
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cl.exe
XCC++_COM=	$(CC_COM)
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) -nologo
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM) -nologo
XOUTPUT_OPTION=	-Fo$(O:%=%/)$@
XCC_OUTPUT_FILTER= | tail -n +2	# Filter cl.exe filename echo
XLD_OUTPUT_OPTION= -Fe$@
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) -nologo
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM) -nologo
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM) -nologo
XDYNLD.o=	$(DYNLD) `$(LORDER) $(POFILES) | $(TSORT)` $(LDFLAGS) -out:$@ $(LDLIBS)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XAR=		@echo "	==> ARCHIVING  \"$@\""; lib.exe -nologo
XARFLAGS=
XAR.o=		$(AR) $(ARFLAGS) -out:$@
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKC++DEP_OUT=
X
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from Defaults.*
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
X
XOSDEFS	+=	$(WINNTDEFS)
X
X#
X# Tell MKLINKS to copy files instead of linking them
X#
XMKLINKS_COPY=	true
Xexport		MKLINKS_COPY
END-of-star-1.5.2/RULES/cc-msc.rul
echo x - star-1.5.2/RULES/cc-sco_os.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sco_os.rul << 'END-of-star-1.5.2/RULES/cc-sco_os.rul'
X#ident "@(#)cc-sco_os.rul	1.11 13/01/09 "
X###########################################################################
X# Written 1999-2013 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO OpenServer 5 cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SCO_OSCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SCO_OSC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-belf
XCWOPTS=		-w3
XCOPTOPT=	-O
XCOPTDYN=	-KPIC
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-sco.sh
XMKDEP_OUT=
XMKDIR=		$(MKDIR_SH)
XINSMKDIR=	$(INSMKDIR_SH)
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # mkdep-sco.sh?
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sco_os.rul
echo x - star-1.5.2/RULES/cc-sco_uw.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sco_uw.rul << 'END-of-star-1.5.2/RULES/cc-sco_uw.rul'
X#ident "@(#)cc-sco_uw.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1999-2013 by J. Schilling/Santa Cruz Operation
X###########################################################################
X#
X# Platform dependent MACROS for SCO UnixWare 2.x / 7.x cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SCO_UWCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SCO_UWC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-KPIC
X#COPTGPROF=	-pg
XCOPTGPROF=	-p
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-dy -G $(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-sco.sh
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # mkdep-sco.sh?
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sco_uw.rul
echo x - star-1.5.2/RULES/cc-sony.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sony.rul << 'END-of-star-1.5.2/RULES/cc-sony.rul'
X#ident @(#)cc-sony.rul	1.8 13/01/09 
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Sony cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SONYCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SONYC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-fullwarn
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-p1
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sony.rul
echo x - star-1.5.2/RULES/cc-sun.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sun.rul << 'END-of-star-1.5.2/RULES/cc-sun.rul'
X#ident "@(#)cc-sun.rul	1.8 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Sun cc (SunOS 4.x)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O
XCOPTDYN=	-pic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sun.rul
echo x - star-1.5.2/RULES/cc-sunpro.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sunpro.rul << 'END-of-star-1.5.2/RULES/cc-sunpro.rul'
X#ident "@(#)cc-sunpro.rul	1.11 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunPro (Studio) cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNPROCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNPROC++OPTOPT) $(C++OPTX)
X
X
XLINTFLAGS=	-Nlevel=4 
X
XXARCH_GEN__=	$(_UNIQ)$(XARCH_GEN_)
XXARCH_GEN___=	$(XARCH_GEN__:$(_UNIQ)=-xarch=generic)
XXARCH_GEN=	$(XARCH_GEN___:$(_UNIQ)%=%)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-Xa
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-xpg
XC++OPTS=
XC++WOPTS=	
XC++OPTOPT=	-O
XC++OPTDYN=	-Kpic
XC++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#
X# Sunpro C/C++ run on Solaris and Linux and both have linkers
X# that support mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) $(PMAPVERS:%=-M%) -ldl
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	CC
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -xM
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sunpro.rul
echo x - star-1.5.2/RULES/cc-sunpro64.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sunpro64.rul << 'END-of-star-1.5.2/RULES/cc-sunpro64.rul'
X#ident "@(#)cc-sunpro64.rul	1.14 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunPro (Studio) cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNPROCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNPROC++OPTOPT) $(C++OPTX)
X
XLINTFLAGS=	-Nlevel=4 
X
X_SUNPROCOPT64=	$(_UNIQ)$(SUN_CC64_OPT)
X__SUNPROCOPT64=	$(_SUNPROCOPT64:$(_UNIQ)=-xarch=generic64)
XSUNPROCOPT64=	$(__SUNPROCOPT64:$(_UNIQ)%=%)
X
XXARCH_GEN=	$(SUNPROCOPT64)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-Xa $(SUNPROCOPT64)
XCWOPTS=		-v
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-xpg
XC++OPTS=	$(SUNPROCOPT64)
XC++WOPTS=	
XC++OPTOPT=	-O
XC++OPTDYN=	-Kpic
XC++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#
X# Sunpro C/C++ run on Solaris and Linux and both have linkers
X# that support mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTDYN=	-dy -G -ztext -h $(TARGET) $(PMAPVERS:%=-M%) -ldl
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	CC
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) $(SUNPROCOPT64)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM) $(SUNPROCOPT64)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) $(SUNPROCOPT64)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM) $(SUNPROCOPT64)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) $(SUNPROCOPT64)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM) $(SUNPROCOPT64)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM $(SUNPROCOPT64)
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -xM $(SUNPROCOPT64)
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sunpro64.rul
echo x - star-1.5.2/RULES/dynamic.lnk
sed 's/^X//' >star-1.5.2/RULES/dynamic.lnk << 'END-of-star-1.5.2/RULES/dynamic.lnk'
X#ident @(#)dynamic.lnk	1.1 06/07/20 
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for commands that are links dynamically against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSHLDIR=		/pic
XNO_SHL=
END-of-star-1.5.2/RULES/dynamic.lnk
echo x - star-1.5.2/RULES/static.lnk
sed 's/^X//' >star-1.5.2/RULES/static.lnk << 'END-of-star-1.5.2/RULES/static.lnk'
X#ident @(#)static.lnk	1.1 06/07/20 
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for commands that are links statically against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSHLDIR=
XNO_SHL=		no
END-of-star-1.5.2/RULES/static.lnk
echo x - star-1.5.2/RULES/rules.dyn
sed 's/^X//' >star-1.5.2/RULES/rules.dyn << 'END-of-star-1.5.2/RULES/rules.dyn'
X#ident @(#)rules.dyn	1.1 06/07/20 
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for dynamic vs. static linking against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X_DEFLNKMODE=	$(_UNIQ)$(DEFLINKMODE)
X__DEFLNKMODE=	$(_DEFLNKMODE:$(_UNIQ)=static)
XDEFLNKMODE=	$(__DEFLNKMODE:$(_UNIQ)%=%)
X_LNKMODE=	$(_UNIQ)$(LINKMODE)
X__LNKMODE=	$(_LNKMODE:$(_UNIQ)=$(DEFLNKMODE))
XLNKMODE=	$(__LNKMODE:$(_UNIQ)%=%)
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/$(LNKMODE).lnk
END-of-star-1.5.2/RULES/rules.dyn
echo x - star-1.5.2/RULES/rules.cpl
sed 's/^X//' >star-1.5.2/RULES/rules.cpl << 'END-of-star-1.5.2/RULES/rules.cpl'
X#ident "@(#)rules.cpl	1.1 06/07/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for C++ projects
X#
X# Cannot use the file name rules.c++ on some OS.
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XLDCC=	$(LDCC++)
XDYNLD=  $(DYNLDC++)
END-of-star-1.5.2/RULES/rules.cpl
echo x - star-1.5.2/RULES/os-cygwin_nt-5.2.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-5.2.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-5.2.id'
X#ident "@(#)os-cygwin_nt-5.2.id	1.4 07/05/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.2 (Server 2003)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0502
END-of-star-1.5.2/RULES/os-cygwin_nt-5.2.id
echo x - star-1.5.2/RULES/rules.htm
sed 's/^X//' >star-1.5.2/RULES/rules.htm << 'END-of-star-1.5.2/RULES/rules.htm'
X#ident "@(#)rules.htm	1.4 11/09/18 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Manual page to html converting rules
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xhtml:	$(MANFILE)
X	soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \
X		man2html  -cgiurl '$$title.$$section.html' -compress -nodepage \
X		> $(MANFILE).html
X
Xhtmlxn:	$(MANFILE).html
X
X$(MANFILE).html: $(MANFILE)
X	soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \
X			(sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \
X			man2html  -cgiurl '$$title.$$section.html' -compress -nodepage; \
X			cat $(SRCROOT)/conf/post.html) | \
X			egrep -v 'HTML|BODY'> $(MANFILE).html
X
Xhtmlx:	$(MANFILE)
X	soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \
X			(sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \
X			man2html  -cgiurl '$$title.$$section.html' -compress -nodepage; \
X			cat $(SRCROOT)/conf/post.html) | \
X			egrep -v 'HTML|BODY'> $(MANFILE).html
END-of-star-1.5.2/RULES/rules.htm
echo x - star-1.5.2/RULES/x86-interix-cl.rul
sed 's/^X//' >star-1.5.2/RULES/x86-interix-cl.rul << 'END-of-star-1.5.2/RULES/x86-interix-cl.rul'
X#ident "@(#)x86-interix-cl.rul	1.5 09/05/21 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	interix
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
XOSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'fdopen' wurde als veraltet deklariert
X#		The POSIX name for this item is deprecated. Instead, use
X#		the ISO C++ conformant name: _fdopen.
X#
XOSDEFS +=	-D_CRT_NONSTDC_NO_DEPRECATE
X
XKDEFINES=
X
XLIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKC++DEP_OUT=
X
END-of-star-1.5.2/RULES/x86-interix-cl.rul
echo x - star-1.5.2/RULES/cc-msposix.rul
sed 's/^X//' >star-1.5.2/RULES/cc-msposix.rul << 'END-of-star-1.5.2/RULES/cc-msposix.rul'
X#ident "@(#)cc-msposix.rul	1.19 13/01/09 "
X###########################################################################
X# Written 2006-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for INTERIX using MSVC in POSIX c89 mode
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(MSCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(MSC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		
XCOPTOPT=	-O2
XCOPTDYN=
X#COPTGPROF=	-pg
X#
X# /EHs C++-EH aktivieren (ohne SEH-Ausnahmen)
X# /EHa C++-EH aktivieren (mit SEH-Ausnahmen)
X# /EHc nothrow als Standard fr externes "C"
X# MS seems to need -EHsc in order to create useful code with exceptions
X#
XC++OPTS=	-EHsc
XC++WOPTS=	-W3
XC++OPTOPT=	-O2
XC++OPTDYN=
X#C++OPTGPROF=	-pg
X
X
XLIB_PREFIX=
XLIB_SUFFIX=	.lib
XSHL_SUFFIX=	.dll
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS:-l%=%.lib) $(LIBX:-l%=%.lib)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=	-dll -def:$(TARGETLIB).def
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	$(CC_COM)
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC_COM)
X#OUTPUT_OPTION=	-Fo$(O:%=%/)$@
X#LD_OUTPUT_OPTION= -Fe$@
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo
XDYNLD.o=	$(DYNLD) `$(LORDER) $(POFILES) | $(TSORT)` $(LDFLAGS) -out:$@ $(LDLIBS)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XAR=		@echo "	==> ARCHIVING  \"$@\""; lib.exe -nologo
XARFLAGS=
XAR.o=		$(AR) $(ARFLAGS) -out:$@
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc.sh
XMKC++DEP_OUT=
X
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from Defaults.*
X# in order to be able to test for the existence of "/bin/cc" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/RULES/cc-msposix.rul
echo x - star-1.5.2/RULES/x86-interix-cc.rul
sed 's/^X//' >star-1.5.2/RULES/x86-interix-cc.rul << 'END-of-star-1.5.2/RULES/x86-interix-cc.rul'
X#ident @(#)x86-interix-cc.rul	1.1 07/05/08 
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	interix
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msposix.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
X#OSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
XKDEFINES=
X
X#LIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
X
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-msc-interix.sh
XMKC++DEP_OUT=
X
END-of-star-1.5.2/RULES/x86-interix-cc.rul
echo x - star-1.5.2/RULES/rules.csw
sed 's/^X//' >star-1.5.2/RULES/rules.csw << 'END-of-star-1.5.2/RULES/rules.csw'
X#ident "@(#)rules.csw	1.6 11/09/28 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for creating Blastwave SVr4 packages
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XPKG	:sh=	sed -n 's/^PKG=//p' pkginfo
X#VERSION	:sh=	sed -n 's/^VERSION=//p' pkginfo
XVERSION	:sh=	sed -n 's/^VERSION=\([^,]*\).*/\1/p' pkginfo
XNAME	:sh=	sed -n 's/^NAME=//p' pkginfo|awk '{print $1}'
XOS_NAME :sh=	uname -s
XDATE	:sh=	date '+REV=%Y.%m.%d'
X
XVENDOR=		-CSW
XPROTOTYPE=	prototype
X
X$(SRCROOT)/packages/$(OARCH):
X		$(MKDIR) -p $@
X
Xall: $(SRCROOT)/packages/$(OARCH)
X	if [ .$(PKG_RELOC) = .no ]; then		\
X		pkgmk -o -r `pwd`/$(SRCROOT)/$(PROTODIR)$(PKGROOTX) -d $(SRCROOT)/packages/$(OARCH) \
X						-a $(P_ARCH) \
X						-v $(VERSION),$(DATE) -f $(PROTOTYPE)_r		\
X						$(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \
X						pkgbase=`pwd` \
X						$(PKGOPTX);	\
X	else					\
X		pkgmk -o -b `pwd`/$(SRCROOT)/$(PROTODIR)/$(INSBASE) -d $(SRCROOT)/packages/$(OARCH) \
X						-a $(P_ARCH) \
X						-v $(VERSION),$(DATE) -f $(PROTOTYPE) BASEDIR=$(INSBASE)	\
X						$(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \
X						pkgbase=`pwd` \
X						$(PKGOPTX);	\
X	fi
X	pkgtrans -s $(SRCROOT)/packages/$(OARCH) $(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg $(PKG)
X	gzip -9f $(SRCROOT)/packages/$(OARCH)/$(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg
END-of-star-1.5.2/RULES/rules.csw
echo x - star-1.5.2/RULES/os-interix-nt-4.0.id
sed 's/^X//' >star-1.5.2/RULES/os-interix-nt-4.0.id << 'END-of-star-1.5.2/RULES/os-interix-nt-4.0.id'
X#ident "@(#)os-interix-nt-4.0.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-4.0 (NT-4.0)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-star-1.5.2/RULES/os-interix-nt-4.0.id
echo x - star-1.5.2/RULES/os-interix-nt-5.0.id
sed 's/^X//' >star-1.5.2/RULES/os-interix-nt-5.0.id << 'END-of-star-1.5.2/RULES/os-interix-nt-5.0.id'
X#ident "@(#)os-interix-nt-5.0.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-5.0 (WIN2000)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0500
END-of-star-1.5.2/RULES/os-interix-nt-5.0.id
echo x - star-1.5.2/RULES/os-interix-nt-5.1.id
sed 's/^X//' >star-1.5.2/RULES/os-interix-nt-5.1.id << 'END-of-star-1.5.2/RULES/os-interix-nt-5.1.id'
X#ident "@(#)os-interix-nt-5.1.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-5.1 (XP)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0501
END-of-star-1.5.2/RULES/os-interix-nt-5.1.id
echo x - star-1.5.2/RULES/os-interix-nt-5.2.id
sed 's/^X//' >star-1.5.2/RULES/os-interix-nt-5.2.id << 'END-of-star-1.5.2/RULES/os-interix-nt-5.2.id'
X#ident "@(#)os-interix-nt-5.2.id	1.3 07/05/29 "
X###########################################################################
X# Written 2007 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Interix Systems (SFU) MS Windows NT-5.2 (Server 2003)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XWINNTDEFS +=	-D_WIN32_WINNT=0x0502
END-of-star-1.5.2/RULES/os-interix-nt-5.2.id
echo x - star-1.5.2/RULES/i586-linux-suncc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-linux-suncc.rul << 'END-of-star-1.5.2/RULES/i586-linux-suncc.rul'
X#ident "@(#)i586-linux-suncc.rul	1.4 13/01/09 "
X###########################################################################
X# Written 2007-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux using Sun Studio
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul
XCC_COM=		suncc
XCC++_COM=	sunCC
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLDOPTDYN=	-dy -G -Wl,-shared -Wl,-soname,$(TARGET)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i586-linux-suncc.rul
echo x - star-1.5.2/RULES/rules.pkg
sed 's/^X//' >star-1.5.2/RULES/rules.pkg << 'END-of-star-1.5.2/RULES/rules.pkg'
X#ident "@(#)rules.pkg	1.5 08/12/27 "
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X#
X# Rules for creating binary tar packages
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X###########################################################################
X# If we are included before rules.dir, this will stop to propagate
X# the targets "pkg1" & "pkg" to sub makes but handle packaging at this
X# directory bundling level.
X###########################################################################
XPKGTARGETS=
X
XPROTODIR=	proto/$(OARCH)
X$(PROTODIR):
X		$(MKDIR) -p $@
X
X_TARGETAR=	$(TARGET_AR:%=$(OTARSDIR)/%)
X__TARGETAR=	$(_UNIQ)$(_TARGETAR)
X___TARGETAR=	$(__TARGETAR:$(_UNIQ)=$(PROTODIR))
XTARGETAR=	$(___TARGETAR:$(_UNIQ)%=%)
X
X_MCS_PROJECT=	$(_UNIQ)$(PROJECTNAME)
X__MCS_PROJECT=	$(_MCS_PROJECT:$(_UNIQ)=SPS-Generic)
XMCS_PROJECTNAME= $(__MCS_PROJECT:$(_UNIQ)%=%)
X
Xta:
X	echo "'$(TARGETAR)'"
X	echo "'$(TARGETAR).tar'"
X
Xpkg: $(PROTODIR) pkg1 package
X
Xpkg1:
X	rm -rf $(PROTODIR)
X	mkdir -p $(PROTODIR) $(PROTODIR)/$(INSBASE)/bin $(PROTODIR)/$(INSBASE)/sbin $(PROTODIR)/$(INSBASE)/etc \
X		$(PROTODIR)/$(INSBASE)/lib $(PROTODIR)/$(INSBASE)/share/man
X	ln -s share/man $(PROTODIR)/$(INSBASE)/man
X	if [ ."$(PRE_INST_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(PRE_INST_CMDS)" ; fi
X	$(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/$(PROTODIR) install
X	if [ ."$(POST_INST_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(POST_INST_CMDS)" ; fi
X	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=$(PROTODIR)/%); strip $(STRIPLIST:%=$(PROTODIR)/%); fi
X	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=$(PROTODIR)/%); strip -x $(STRIPXLIST:%=$(PROTODIR)/%); fi
X	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=$(PROTODIR)/%); mcs -d -a "$(MCS_PROJECTNAME)" $(MCSLIST:%=$(PROTODIR)/%); fi
X	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(POST_STRIP_CMDS)" ; fi
X	##find $(PROTODIR) -print | sort > /tmp/so.$$; diff filelist /tmp/so.$$; rm -f /tmp/so.$$
X	#echo 'i pkginfo'	>  SV-pkglist
X	#echo 'i depend'		>> SV-pkglist
X	#echo 'i copyright'	>> SV-pkglist
X
X	#cd $(PROTODIR); find . -print | sort | pkgproto | sed 's/joerg bs/root bin/' >> ../../SV-pkglist
X
X_PKGDEF_DIR=	$(_UNIQ)$(PKGTYPE)
X__PKGDEF_DIR=	$(_PKGDEF_DIR:$(_UNIQ)=default)
XPKGDEF_DIR=	$(__PKGDEF_DIR:$(_UNIQ)%=%)
X
Xpackage:
X	echo PKGDEF_DIR $(PKGDEF_DIR)
X	echo DIRNAME: $(DIRNAME) CURDIR: $(CURDIR)
X	#pkgmk -o -b `pwd`/$(PROTODIR)/ -d `pwd`/PKGS -f SV-pkglist
X	#star -C $(PROTODIR)/ pkglist=pkglist -cP > $(TARGETAR).tar
X	#bzip2 -9f $(TARGETAR).tar
X	#rm -rf $(PROTODIR)
X
X	@list="";								\
X	if [ -d $(SRCROOT)/pkgdefs/$(PKGDEF_DIR) ]; then			\
X		list=`echo $(SRCROOT)/pkgdefs/$(PKGDEF_DIR)/*` ;		\
X	fi;									\
X	for DIR in $${list} ;							\
X	do									\
X		(								\
X		echo "	==> MAKING \"$@\" ON SUBDIRECTORY \"$(CURDIR)/$$DIR\"";\
X		if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then			\
X			cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR all;		\
X		else								\
X			echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\
X		fi								\
X		);								\
X	done
END-of-star-1.5.2/RULES/rules.pkg
echo x - star-1.5.2/RULES/i586-linux-suncc64.rul
sed 's/^X//' >star-1.5.2/RULES/i586-linux-suncc64.rul << 'END-of-star-1.5.2/RULES/i586-linux-suncc64.rul'
X#ident "@(#)i586-linux-suncc64.rul	1.5 13/01/09 "
X###########################################################################
X# Written 2007-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux using Sun Studio
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X#@@C@@
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul
XCC_COM=		suncc
XCC++_COM=	sunCC
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLDOPTDYN=	-dy -G -Wl,-shared -Wl,-soname,$(TARGET)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i586-linux-suncc64.rul
echo x - star-1.5.2/RULES/atarist-freemint-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/atarist-freemint-gcc.rul << 'END-of-star-1.5.2/RULES/atarist-freemint-gcc.rul'
X#ident @(#)atarist-freemint-gcc.rul	1.4 08/11/14 
X###########################################################################
X# Written 2008 by Y. Doyeux
X###########################################################################
X#
X# Platform dependent MACROS for FreeMiNT on ATARI computers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=	-DNO_USER_XCVT
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
X#SHL_SUFFIX=	.so.1.0
XSHL_SUFFIX=
X
XLIB_SOCKET=	-lsocket
XLIB_MATH=	-lm
XLIB_KVM=	
X
X_STACKSIZE=	$(_UNIQ)$(STACKSIZE)
X__STACKSIZE=	$(_STACKSIZE:$(_UNIQ)=0x10000)			# Default stack size 64kB
XSTACK_SIZE=	$(__STACKSIZE:$(_UNIQ)%=%)
X
XLDLIBS=		$(LIBS) $(LIBX) && stack -S $(STACK_SIZE) $@	# Hack to set stack size
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLDOPTDYN=
XLNDYNLIB=
X
X#
X# ranlib does not work and is not needed
X#
X#RANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
XLORDER=		echo
END-of-star-1.5.2/RULES/atarist-freemint-gcc.rul
echo x - star-1.5.2/RULES/os-freemint.def
sed 's/^X//' >star-1.5.2/RULES/os-freemint.def << 'END-of-star-1.5.2/RULES/os-freemint.def'
X#ident @(#)os-freemint.def	1.1 08/11/08 
X###########################################################################
X# Written 2008 by Y. Doyeux
X###########################################################################
X#
X# Global os definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-freemint.def
echo x - star-1.5.2/RULES/os-freemint.id
sed 's/^X//' >star-1.5.2/RULES/os-freemint.id << 'END-of-star-1.5.2/RULES/os-freemint.id'
X#ident @(#)os-freemint.id	1.1 08/11/08 
X###########################################################################
X# Written 2008 by Y. Doyeux
X###########################################################################
X#
X# OS specific MACRO definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=	freemint
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-freemint.id
echo x - star-1.5.2/RULES/i586-syllable-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-syllable-cc.rul << 'END-of-star-1.5.2/RULES/i586-syllable-cc.rul'
X#ident "@(#)i586-syllable-cc.rul	1.3 09/02/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linker version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
X#
X# The current developement system has these files in /bin
X#
X#LN=		/usr/indexes/bin/ln
X#SYMLINK=	/usr/indexes/bin/ln -s
X#RM=		/usr/indexes/bin/rm
X#MV=		/usr/indexes/bin/mv
END-of-star-1.5.2/RULES/i586-syllable-cc.rul
echo x - star-1.5.2/RULES/i586-syllable-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-syllable-gcc.rul << 'END-of-star-1.5.2/RULES/i586-syllable-gcc.rul'
X#ident "@(#)i586-syllable-gcc.rul	1.3 09/02/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linker version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
X#
X# The current developement system has these files in /bin
X#
X#LN=		/usr/indexes/bin/ln
X#SYMLINK=	/usr/indexes/bin/ln -s
X#RM=		/usr/indexes/bin/rm
X#MV=		/usr/indexes/bin/mv
END-of-star-1.5.2/RULES/i586-syllable-gcc.rul
echo x - star-1.5.2/RULES/os-haiku.id
sed 's/^X//' >star-1.5.2/RULES/os-haiku.id << 'END-of-star-1.5.2/RULES/os-haiku.id'
X#ident "@(#)os-haiku.id	1.1 09/02/03 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		haiku
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-haiku.id
echo x - star-1.5.2/RULES/os-syllable.def
sed 's/^X//' >star-1.5.2/RULES/os-syllable.def << 'END-of-star-1.5.2/RULES/os-syllable.def'
X#ident "@(#)os-syllable.def	1.1 09/02/01 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-syllable.def
echo x - star-1.5.2/RULES/os-syllable.id
sed 's/^X//' >star-1.5.2/RULES/os-syllable.id << 'END-of-star-1.5.2/RULES/os-syllable.id'
X#ident "@(#)os-syllable.id	1.1 09/02/01 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Syllable
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		syllable
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-syllable.id
echo x - star-1.5.2/RULES/bepc-haiku-cc.rul
sed 's/^X//' >star-1.5.2/RULES/bepc-haiku-cc.rul << 'END-of-star-1.5.2/RULES/bepc-haiku-cc.rul'
X#ident "@(#)bepc-haiku-cc.rul	1.3 09/02/05 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
X#LIB_SOCKET=	-lsocket -lbind
XLIB_SOCKET=	-lnetwork
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/bepc-haiku-cc.rul
echo x - star-1.5.2/RULES/bepc-haiku-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/bepc-haiku-gcc.rul << 'END-of-star-1.5.2/RULES/bepc-haiku-gcc.rul'
X#ident "@(#)bepc-haiku-gcc.rul	1.3 09/02/05 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
X#
X# XXX Old BeOS needs libroot.so to get [efg]cvt()
X# XXX New BeOS seems to have this in libc and in addition we include
X# XXX strtod.c for floating point conversion on OS without such code.
X# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been
X# XXX removed and printing floating numbers will work with old/new BeOS
X#
X#OSDEFS +=	-DNO_FLOATINGPOINT -DUSE_FLOATINGARGS
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#CONFFLAGS=	i586
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so
X
X#LIB_SOCKET=	-lsocket -lbind
XLIB_SOCKET=	-lnetwork
XLIB_MATH=
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
XLN=             /bin/ln -s
END-of-star-1.5.2/RULES/bepc-haiku-gcc.rul
echo x - star-1.5.2/RULES/os-haiku.def
sed 's/^X//' >star-1.5.2/RULES/os-haiku.def << 'END-of-star-1.5.2/RULES/os-haiku.def'
X#ident "@(#)os-haiku.def	1.1 09/02/03 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Haiku, a BeOS like OS
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-haiku.def
echo x - star-1.5.2/RULES/cc-msc64.rul
sed 's/^X//' >star-1.5.2/RULES/cc-msc64.rul << 'END-of-star-1.5.2/RULES/cc-msc64.rul'
X#ident "@(#)cc-msc64.rul	1.18 09/05/17 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc.rul
X
XMSCOPT64=	-machine:X64
X
XVC=7_64
END-of-star-1.5.2/RULES/cc-msc64.rul
echo x - star-1.5.2/RULES/os-cygwin_nt-6.0.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-6.0.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-6.0.id'
X#ident "@(#)os-cygwin_nt-6.0.id	1.5 09/04/08 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Win Vista)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0600
END-of-star-1.5.2/RULES/os-cygwin_nt-6.0.id
echo x - star-1.5.2/RULES/os-cygwin_nt-6.1.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-6.1.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-6.1.id'
X#ident "@(#)os-cygwin_nt-6.1.id	1.5 09/04/08 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0601
END-of-star-1.5.2/RULES/os-cygwin_nt-6.1.id
echo x - star-1.5.2/RULES/os-cygwin32_wow64.def
sed 's/^X//' >star-1.5.2/RULES/os-cygwin32_wow64.def << 'END-of-star-1.5.2/RULES/os-cygwin32_wow64.def'
X#ident "@(#)os-cygwin32_wow64.def	1.3 09/04/11 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for CYGWIN32_WOW64
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
X
END-of-star-1.5.2/RULES/os-cygwin32_wow64.def
echo x - star-1.5.2/RULES/os-cygwin32_wow64.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin32_wow64.id << 'END-of-star-1.5.2/RULES/os-cygwin32_wow64.id'
X#ident "@(#)os-cygwin32_wow64.id	1.6 09/04/11 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		cygwin32_wow64
X-O_ARCH=	-$(O_ARCH)
X
X#WINNTDEFS +=	-D_WIN32_WINNT=0x0400
END-of-star-1.5.2/RULES/os-cygwin32_wow64.id
echo x - star-1.5.2/RULES/os-cygwin_nt-5.2-wow64.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-5.2-wow64.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-5.2-wow64.id'
X#ident "@(#)os-cygwin_nt-5.2-wow64.id	1.5 09/04/11 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.2 (Server 2003)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0502
END-of-star-1.5.2/RULES/os-cygwin_nt-5.2-wow64.id
echo x - star-1.5.2/RULES/i686-cygwin32_wow64-cl64.rul
sed 's/^X//' >star-1.5.2/RULES/i686-cygwin32_wow64-cl64.rul << 'END-of-star-1.5.2/RULES/i686-cygwin32_wow64-cl64.rul'
X#ident "@(#)i686-cygwin32_wow64-cl64.rul	1.8 09/05/17 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_WOW64 using MSVC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
X_PLATFORM=	cygwin
Xinclude $(SRCROOT)/$(RULESDIR)/cc-msc64.rul
X
X#
X#		Supress useless cl warnings like:
X#		warning C4996: 'strerror' wurde als veraltet deklariert
X#		Consider using strerror_s instead.
X#
XOSDEFS +=	-D_CRT_SECURE_NO_DEPRECATE
X
XKDEFINES=
X
XLIB_SOCKET=	Ws2_32.lib
XLIB_MATH=	
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i686-cygwin32_wow64-cl64.rul
echo x - star-1.5.2/RULES/power-macintosh-darwin-cc64.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-darwin-cc64.rul << 'END-of-star-1.5.2/RULES/power-macintosh-darwin-cc64.rul'
X#ident "@(#)power-macintosh-darwin-cc64.rul	1.5 11/06/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc_s.1
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc $(GCC_OPT64)
XLDCC=		@echo "	==> LINKING \"$@\""; cc $(GCC_OPT64)
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc $(GCC_OPT64) -M
END-of-star-1.5.2/RULES/power-macintosh-darwin-cc64.rul
echo x - star-1.5.2/RULES/power-macintosh-darwin-gcc64.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-darwin-gcc64.rul << 'END-of-star-1.5.2/RULES/power-macintosh-darwin-gcc64.rul'
X#ident "@(#)power-macintosh-darwin-gcc64.rul	1.4 11/06/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc_s.1
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/power-macintosh-darwin-gcc64.rul
echo x - star-1.5.2/RULES/os-cygwin_nt-6.0-wow64.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-6.0-wow64.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-6.0-wow64.id'
X#ident "@(#)os-cygwin_nt-6.0-wow64.id	1.1 09/07/26 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Vista)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0600
END-of-star-1.5.2/RULES/os-cygwin_nt-6.0-wow64.id
echo x - star-1.5.2/RULES/rules.nul
sed 's/^X//' >star-1.5.2/RULES/rules.nul << 'END-of-star-1.5.2/RULES/rules.nul'
X#ident "@(#)rules.nul	1.1 09/08/12 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# NUL dummy rule
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
END-of-star-1.5.2/RULES/rules.nul
echo x - star-1.5.2/RULES/os-cygwin_nt-6.1-wow64.id
sed 's/^X//' >star-1.5.2/RULES/os-cygwin_nt-6.1-wow64.id << 'END-of-star-1.5.2/RULES/os-cygwin_nt-6.1-wow64.id'
X#ident "@(#)os-cygwin_nt-6.1-wow64.id	1.1 09/07/26 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id
X
XWINNTDEFS +=	-D_WIN32_WINNT=0x0601
END-of-star-1.5.2/RULES/os-cygwin_nt-6.1-wow64.id
echo x - star-1.5.2/RULES/i486-cygwin32_nt-cc64.rul
sed 's/^X//' >star-1.5.2/RULES/i486-cygwin32_nt-cc64.rul << 'END-of-star-1.5.2/RULES/i486-cygwin32_nt-cc64.rul'
X#ident "@(#)i486-cygwin32_nt-cc64.rul	1.1 09/07/27 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i486-cygwin32_nt-cc64.rul
echo x - star-1.5.2/RULES/i486-cygwin32_nt-gcc64.rul
sed 's/^X//' >star-1.5.2/RULES/i486-cygwin32_nt-gcc64.rul << 'END-of-star-1.5.2/RULES/i486-cygwin32_nt-gcc64.rul'
X#ident "@(#)i486-cygwin32_nt-gcc64.rul	1.1 09/07/27 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for CYGWIN32_NT
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
X
XOSDEFS +=	-mwin32
X
XKDEFINES=
X#COPTDYN=	-fpic
XCOPTDYN=
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dll
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X#LDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLDOPTDYN=
X#LNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
XLNDYNLIB=
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; ld
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i486-cygwin32_nt-gcc64.rul
echo x - star-1.5.2/RULES/rules.env
sed 's/^X//' >star-1.5.2/RULES/rules.env << 'END-of-star-1.5.2/RULES/rules.env'
X#ident "@(#)rules.env	1.2 09/08/15 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Rules for setting the locale environment to the default "C"
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# acgeneral.m4 claims that SCO Unix may have problems with setting LANG=C
X# so we are careful not to set LANG unless it was already set by someone else
X#
X###########################################################################
X
X_LANG=		$(_UNIQ)$(LANG)
X__LANG=		$(_LANG:$(_UNIQ)=NO_LANG)
X___LANG=	$(__LANG:$(_UNIQ)%=LANG)
X
X$(___LANG)=C
XLC_ALL=C
XLC_COLLATE=C
XLC_CTYPE=C
XLC_MESSAGES=C
XLC_MONETARY=C
XLC_NUMERIC=C
XLC_TIME=C
X
Xexport $(___LANG)
Xexport LC_ALL
Xexport LC_COLLATE
Xexport LC_CTYPE
Xexport LC_MESSAGES
Xexport LC_MONETARY
Xexport LC_NUMERIC
Xexport LC_TIME
END-of-star-1.5.2/RULES/rules.env
echo x - star-1.5.2/RULES/cc-openvms.rul
sed 's/^X//' >star-1.5.2/RULES/cc-openvms.rul << 'END-of-star-1.5.2/RULES/cc-openvms.rul'
X#ident "@(#)cc-openvms.rul	1.5 13/01/09 "
X###########################################################################
X# Written 1998-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for GNV OpenVMS cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(DECCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DECC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
XCWOPTS=		-verbose
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	
XLIB_SUFFIX=	.olb
XSHL_SUFFIX=	.so.1.0
X
XLIBS_PATH=	-L$(OLIBSDIR) -L/usr/ccs/lib
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	echo "C++ not yet supported"; exit -1; :
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
X
XRMDEP=		:
X# cc -M t.c creates a file t.mms wich t.obj : /EISNER$DRA3/decuserve_user/schilling/t.c lines
X#MKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot yet do -M with OpenVMS cc"; :
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
X#MKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot yet do -M with OpenVMS CC"; :
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-openvms.rul
echo x - star-1.5.2/RULES/9000-725-hp-ux-cc64.rul
sed 's/^X//' >star-1.5.2/RULES/9000-725-hp-ux-cc64.rul << 'END-of-star-1.5.2/RULES/9000-725-hp-ux-cc64.rul'
X#ident "@(#)9000-725-hp-ux-cc64.rul	1.14 09/10/10 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for HP/UX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-hp64.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/9000-725-hp-ux-cc64.rul
echo x - star-1.5.2/RULES/alpha-openvms-cc.rul
sed 's/^X//' >star-1.5.2/RULES/alpha-openvms-cc.rul << 'END-of-star-1.5.2/RULES/alpha-openvms-cc.rul'
X#ident "@(#)alpha-openvms-cc.rul	1.1 09/10/31 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for OpenVMS using GNV
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-openvms.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/alpha-openvms-cc.rul
echo x - star-1.5.2/RULES/ip22-irix-cc64.rul
sed 's/^X//' >star-1.5.2/RULES/ip22-irix-cc64.rul << 'END-of-star-1.5.2/RULES/ip22-irix-cc64.rul'
X#ident "@(#)ip22-irix-cc64.rul	1.10 09/11/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-sgi64.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4 $(LARGEFILE_OPT)
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/ip22-irix-cc64.rul
echo x - star-1.5.2/RULES/ip22-irix-gcc64.rul
sed 's/^X//' >star-1.5.2/RULES/ip22-irix-gcc64.rul << 'END-of-star-1.5.2/RULES/ip22-irix-gcc64.rul'
X#ident "@(#)ip22-irix-gcc64.rul	1.13 09/11/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics IRIX
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul
XGCC_OPT64=	-mabi=64
X
XOSDEFS +=	-D__SVR4 -DSVR4
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
XLDOPTDYN=
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XARFLAGS=	crs
X#
X# lorder seems not to work on some machines, disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/ip22-irix-gcc64.rul
echo x - star-1.5.2/RULES/cc-sgi64.rul
sed 's/^X//' >star-1.5.2/RULES/cc-sgi64.rul << 'END-of-star-1.5.2/RULES/cc-sgi64.rul'
X#ident "@(#)cc-sgi64.rul	1.9 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Silicon Graphics cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(SGICOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SGIC++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		-64
XCWOPTS=		-fullwarn
XCOPTOPT=	-O
XCOPTDYN=	-Kpic
XCOPTGPROF=	-p1
XC++OPTS=	-64
XC++WOPTS=	
X#C++OPTOPT=	-O
X#C++OPTDYN=	-Kpic
X#C++OPTGPROF=	-xpg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(LARGEFILE_OPT)
X#LDOPTDYN=	-dy -G -ztext -h $(TARGET) -ldl
XLNDYNLIB=	@
X
XFLOAT_OPTIONS=	
X
XCC_COM=		cc
XCC++_COM=	CC
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) -64
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) -64
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) -64
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -64 -M
XMKDEP_OUT=
X
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM) -64
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM) -64
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM) -64
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -64 -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-sgi64.rul
echo x - star-1.5.2/RULES/cc-pcc.rul
sed 's/^X//' >star-1.5.2/RULES/cc-pcc.rul << 'END-of-star-1.5.2/RULES/cc-pcc.rul'
X#ident "@(#)cc-pcc.rul	1.3 13/01/09 "
X###########################################################################
X# Written 2010-2013 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for PCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=
X#		-Wtraditional now causes more pain than it helps 
X#*CWOPTS=		-Wall -Wtraditional
X#*CWOPTS=		-Wall -Wno-unknown-pragmas \
X#*		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		pcc
XCC++_COM=	p++
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-pcc.rul
echo x - star-1.5.2/RULES/i86pc-sunos5-pcc.rul
sed 's/^X//' >star-1.5.2/RULES/i86pc-sunos5-pcc.rul << 'END-of-star-1.5.2/RULES/i86pc-sunos5-pcc.rul'
X#ident "@(#)i86pc-sunos5-pcc.rul	1.3 13/01/09 "
X###########################################################################
X# Written 2010-2013 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for SunOS 5.x for PC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-pcc.rul
X
XOSDEFS +=	-D__SVR4 -DSVR4
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_MATH=	-lm
XLIB_KVM=	-lkvm -lelf
XLIB_VOLMGT=	-lvolmgt
X
X#
X# Solaris comes with a linker that supports mapfiles
X#
XMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
X
XLDOPTDYN=	-dy -G -Wl,-ztext -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl
X
XARFLAGS=	crs
END-of-star-1.5.2/RULES/i86pc-sunos5-pcc.rul
echo x - star-1.5.2/RULES/cc-gcc32.rul
sed 's/^X//' >star-1.5.2/RULES/cc-gcc32.rul << 'END-of-star-1.5.2/RULES/cc-gcc32.rul'
X#ident "@(#)cc-gcc32.rul	1.14 13/01/09 "
X###########################################################################
X# Written 1996-2013 by J. Schilling
X###########################################################################
X#
X# Platform independent MACROS for GCC
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XGCC_OPT32=	-m32
X
XCPPFLAGS=	-DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX)
XCFLAGS=		$(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX)
XC++FLAGS=	$(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX)
X
XCPPOPTS=	-I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS)
XCOPTS=		$(GCC_OPT32)
X#		-Wtraditional now causes more pain than it helps 
XCWOPTS=		-Wall -Wtraditional
XCWOPTS=		-Wall -Wno-unknown-pragmas \
X		-Wshadow -Wmissing-prototypes -Wstrict-prototypes
XCOPTOPT=	-O
XCOPTDYN=	-fpic
XCOPTGPROF=	-pg
XC++OPTS=	$(GCC_OPT32)
XC++WOPTS=	$(CWOPTS)
XC++OPTOPT=	$(COPTOPT)
XC++OPTDYN=	-fpic
XC++OPTGPROF=	-pg
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1
X
XLIBS_PATH=	-L$(OLIBSDIR)
XLIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) 
X
XLDFLAGS=	$(LDOPTS) $(LDOPTX)
XLDLIBS=		$(LIBS) $(LIBX)
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTDYN=	-shared -Wl,-soname,$(TARGET)
XLNDYNLIB=	@$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so
X
XFLOAT_OPTIONS=	
X
XCC_COM=		gcc
XCC++_COM=	g++
X
XCC=		@echo "	==> COMPILING \"$@\""; $(CC_COM) $(GCC_OPT32)
XCC++ =		@echo "	==> COMPILING \"$@\""; $(CC++_COM) $(GCC_OPT32)
XLDCC=		@echo "	==> LINKING \"$@\""; $(CC_COM) $(GCC_OPT32)
XLDCC++ =	@echo "	==> LINKING \"$@\""; $(CC++_COM) $(GCC_OPT32)
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; $(CC_COM) $(GCC_OPT32)
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; $(CC++_COM) $(GCC_OPT32)
X
XRMDEP=		:
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) $(GCC_OPT32) -M
XMKDEP_OUT=
XMKC++DEP=	@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) $(GCC_OPT32) -M
XMKC++DEP_OUT=
END-of-star-1.5.2/RULES/cc-gcc32.rul
echo x - star-1.5.2/RULES/power-macintosh-darwin-cc32.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-darwin-cc32.rul << 'END-of-star-1.5.2/RULES/power-macintosh-darwin-cc32.rul'
X#ident "@(#)power-macintosh-darwin-cc32.rul	1.5 11/06/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc32.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc_s.1
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
X
X####
X# XXX Better use something like CC=cc
X####
XCC=		@echo "	==> COMPILING \"$@\""; cc $(GCC_OPT32)
XLDCC=		@echo "	==> LINKING \"$@\""; cc $(GCC_OPT32)
XMKDEP=		@echo "	==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc $(GCC_OPT32) -M
END-of-star-1.5.2/RULES/power-macintosh-darwin-cc32.rul
echo x - star-1.5.2/RULES/power-macintosh-darwin-gcc32.rul
sed 's/^X//' >star-1.5.2/RULES/power-macintosh-darwin-gcc32.rul << 'END-of-star-1.5.2/RULES/power-macintosh-darwin-gcc32.rul'
X#ident "@(#)power-macintosh-darwin-gcc32.rul	1.5 11/06/29 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC)
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc32.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XCOPTDYN=	-fPIC
XC++OPTDYN=	-fPIC
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.dylib
X
XLIB_SOCKET=
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
XLDOPTS=		$(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation
XLDOPTDYN=	-install_name $(INSBASE)/lib/$(TARGET)
XLDLIBDYN=	-lgcc_s.1
XLNDYNLIB=	@
X
XDYNLD=		@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XDYNLDC++ =	@echo "	==> LINKING dynamic library \"$@\""; libtool -dynamic
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; ranlib
X
X#
X# lorder seems not to work on some versions because Apple installed
X# a broken /bin/sh that is not POSIX cimpliant an will not
X# be able to run the /usr/bin/lorder script. The error messages are:
X#	type: not found
X#	type: not found
X#	lorder: nm: not found
X# ... disable it
X#
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/power-macintosh-darwin-gcc32.rul
echo x - star-1.5.2/RULES/i586-linux-gcc32.rul
sed 's/^X//' >star-1.5.2/RULES/i586-linux-gcc32.rul << 'END-of-star-1.5.2/RULES/i586-linux-gcc32.rul'
X#ident "@(#)i586-linux-gcc32.rul	1.14 10/05/11 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Linux
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc32.rul
X
X#
X# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
X#
XINCDIRSX +=	$(LINUX_SRC_INCLUDE)
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linux version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/RULES/i586-linux-gcc32.rul
echo x - star-1.5.2/RULES/profiled.lnk
sed 's/^X//' >star-1.5.2/RULES/profiled.lnk << 'END-of-star-1.5.2/RULES/profiled.lnk'
X#ident "@(#)profiled.lnk	1.1 07/06/29 "
X###########################################################################
X# Written 2006 by J. Schilling
X###########################################################################
X#
X# Rules for commands that are links statically against internal libs
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSHLDIR=		/profiled
XNO_SHL=		no
END-of-star-1.5.2/RULES/profiled.lnk
echo x - star-1.5.2/RULES/os-gnu-kfreebsd.def
sed 's/^X//' >star-1.5.2/RULES/os-gnu-kfreebsd.def << 'END-of-star-1.5.2/RULES/os-gnu-kfreebsd.def'
X#ident "@(#)os-gnu-kfreebsd.def	1.1 12/08/14 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Debian with FreeBSD kernel
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-gnu-kfreebsd.def
echo x - star-1.5.2/RULES/os-gnu-kfreebsd.id
sed 's/^X//' >star-1.5.2/RULES/os-gnu-kfreebsd.id << 'END-of-star-1.5.2/RULES/os-gnu-kfreebsd.id'
X#ident "@(#)os-gnu-kfreebsd.id	1.1 12/08/14 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Debian with FreeBSD kernel
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		gnu-kfreebsd
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-gnu-kfreebsd.id
echo x - star-1.5.2/RULES/i586-pyro-cc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-pyro-cc.rul << 'END-of-star-1.5.2/RULES/i586-pyro-cc.rul'
X#ident "@(#)i586-pyro-cc.rul	1.1 12/12/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Pyro
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linker version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
X#
X# The current developement system has these files in /boot/NIX/coreutils/bin
X#
XLN=			/boot/NIX/coreutils/bin/ln
XSYMLINK=	/boot/NIX/coreutils/bin/ln -s
XRM=			/boot/NIX/coreutils/bin/rm
XMV=			/boot/NIX/coreutils/bin/mv
END-of-star-1.5.2/RULES/i586-pyro-cc.rul
echo x - star-1.5.2/RULES/i586-pyro-gcc.rul
sed 's/^X//' >star-1.5.2/RULES/i586-pyro-gcc.rul << 'END-of-star-1.5.2/RULES/i586-pyro-gcc.rul'
X#ident "@(#)i586-pyro-gcc.rul	1.1 12/12/02 "
X###########################################################################
X# Written 1996 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for Pyro
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS +=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XLIB_PREFIX=	lib
XLIB_SUFFIX=	.a
XSHL_SUFFIX=	.so.1.0
X
XLIB_SOCKET=	
XLIB_MATH=	-lm
XLIB_KVM=	
X
X#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
X#
X# Uncomment the next line in case you are on an old Linker version that
X# does not support the -R linker flag.
X#
X#LDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XLORDER=		echo
XTSORT=		cat
X
X#
X# The current developement system has these files in /boot/NIX/coreutils/bin
X#
XLN=			/boot/NIX/coreutils/bin/ln
XSYMLINK=	/boot/NIX/coreutils/bin/ln -s
XRM=			/boot/NIX/coreutils/bin/rm
XMV=			/boot/NIX/coreutils/bin/mv
END-of-star-1.5.2/RULES/i586-pyro-gcc.rul
echo x - star-1.5.2/RULES/os-pyro.def
sed 's/^X//' >star-1.5.2/RULES/os-pyro.def << 'END-of-star-1.5.2/RULES/os-pyro.def'
X#ident "@(#)os-pyro.def	1.1 12/12/02 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# Global os definitions for Pyro
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMANSTYLE=	bsd
END-of-star-1.5.2/RULES/os-pyro.def
echo x - star-1.5.2/RULES/os-pyro.id
sed 's/^X//' >star-1.5.2/RULES/os-pyro.id << 'END-of-star-1.5.2/RULES/os-pyro.id'
X#ident "@(#)os-pyro.id	1.1 12/12/02 "
X###########################################################################
X# Written 2009 by J. Schilling
X###########################################################################
X#
X# OS specific MACRO definitions for Pyro
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XO_ARCH=		pyro
X-O_ARCH=	-$(O_ARCH)
END-of-star-1.5.2/RULES/os-pyro.id
echo c - star-1.5.2/DEFAULTS
mkdir -p star-1.5.2/DEFAULTS > /dev/null 2>&1
echo x - star-1.5.2/DEFAULTS/Defaults
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults << 'END-of-star-1.5.2/DEFAULTS/Defaults'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions: include system specific file
X#
X###########################################################################
X
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH)
END-of-star-1.5.2/DEFAULTS/Defaults
echo x - star-1.5.2/DEFAULTS/Defaults.aix
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.aix << 'END-of-star-1.5.2/DEFAULTS/Defaults.aix'
X#ident "@(#)Defaults.aix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for IBM AIX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.aix
echo x - star-1.5.2/DEFAULTS/Defaults.dgux
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.dgux << 'END-of-star-1.5.2/DEFAULTS/Defaults.dgux'
X#ident "@(#)Defaults.dgux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.dgux
echo x - star-1.5.2/DEFAULTS/Defaults.dgux3
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.dgux3 << 'END-of-star-1.5.2/DEFAULTS/Defaults.dgux3'
X#ident "@(#)Defaults.dgux3	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.dgux3
echo x - star-1.5.2/DEFAULTS/Defaults.dgux4
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.dgux4 << 'END-of-star-1.5.2/DEFAULTS/Defaults.dgux4'
X#ident "@(#)Defaults.dgux4	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.dgux4
echo x - star-1.5.2/DEFAULTS/Defaults.freebsd
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.freebsd << 'END-of-star-1.5.2/DEFAULTS/Defaults.freebsd'
X#ident "@(#)Defaults.freebsd	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.freebsd
echo x - star-1.5.2/DEFAULTS/Defaults.hp-ux
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.hp-ux << 'END-of-star-1.5.2/DEFAULTS/Defaults.hp-ux'
X#ident "@(#)Defaults.hp-ux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for HP/UX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.hp-ux
echo x - star-1.5.2/DEFAULTS/Defaults.irix
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.irix << 'END-of-star-1.5.2/DEFAULTS/Defaults.irix'
X#ident "@(#)Defaults.irix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Silicon Graphics Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.irix
echo x - star-1.5.2/DEFAULTS/Defaults.linux
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.linux << 'END-of-star-1.5.2/DEFAULTS/Defaults.linux'
X#ident "@(#)Defaults.linux	1.7 09/06/04 "
X###########################################################################
X#
X# global definitions for Linux Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
X###########################################################################
X#
X# Unhide POSIX extensions from /usr/include/
X#
X###########################################################################
XOSDEFS +=	-D_GNU_SOURCE
X
X###########################################################################
X#
X# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul
X#
X###########################################################################
XLINUX_INCL_PATH=	/usr/src/linux/include
X
X_LINUX_SRC_INCLUDE=	$(_UNIQ)$(MAY_LINUX_SRC_INCLUDE)
X__LINUX_SRC_INCLUDE=	$(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH))
XLINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.linux
echo x - star-1.5.2/DEFAULTS/Defaults.sunos4
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.sunos4 << 'END-of-star-1.5.2/DEFAULTS/Defaults.sunos4'
X#ident "@(#)Defaults.sunos4	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for SunOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will not work on SunOS
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.sunos4
echo x - star-1.5.2/DEFAULTS/Defaults.sunos5
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.sunos5 << 'END-of-star-1.5.2/DEFAULTS/Defaults.sunos5'
X#ident "@(#)Defaults.sunos5	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Solaris Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.sunos5
echo x - star-1.5.2/DEFAULTS/Defaults.netbsd
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.netbsd << 'END-of-star-1.5.2/DEFAULTS/Defaults.netbsd'
X#ident "@(#)Defaults.netbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NetBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.netbsd
echo x - star-1.5.2/DEFAULTS/Defaults.openbsd
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.openbsd << 'END-of-star-1.5.2/DEFAULTS/Defaults.openbsd'
X#ident "@(#)Defaults.openbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for OpenBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.openbsd
echo x - star-1.5.2/DEFAULTS/Defaults.cygwin32_nt
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.cygwin32_nt << 'END-of-star-1.5.2/DEFAULTS/Defaults.cygwin32_nt'
X#ident "@(#)Defaults.cygwin32_nt	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/DEFAULTS/Defaults.cygwin32_nt
echo x - star-1.5.2/DEFAULTS/MKLINKS
sed 's/^X//' >star-1.5.2/DEFAULTS/MKLINKS << 'END-of-star-1.5.2/DEFAULTS/MKLINKS'
X#!/bin/sh
X#
Xln -s	Defaults.dgux	Defaults.dgux3
Xln -s	Defaults.dgux	Defaults.dgux4
END-of-star-1.5.2/DEFAULTS/MKLINKS
echo x - star-1.5.2/DEFAULTS/Defaults.bsd-os
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.bsd-os << 'END-of-star-1.5.2/DEFAULTS/Defaults.bsd-os'
X#ident "@(#)Defaults.bsd-os	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.bsd-os
echo x - star-1.5.2/DEFAULTS/Defaults.osf1
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.osf1 << 'END-of-star-1.5.2/DEFAULTS/Defaults.osf1'
X#ident "@(#)Defaults.osf1	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Digital UNIX (OSF1) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.osf1
echo x - star-1.5.2/DEFAULTS/Defaults.nextstep
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.nextstep << 'END-of-star-1.5.2/DEFAULTS/Defaults.nextstep'
X#ident "@(#)Defaults.nextstep	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.nextstep
echo x - star-1.5.2/DEFAULTS/Defaults.rhapsody
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.rhapsody << 'END-of-star-1.5.2/DEFAULTS/Defaults.rhapsody'
X#ident "@(#)Defaults.rhapsody	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step (Apple Rhapsody) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-star-1.5.2/DEFAULTS/Defaults.rhapsody
echo x - star-1.5.2/DEFAULTS/vc7-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc7-setup << 'END-of-star-1.5.2/DEFAULTS/vc7-setup'
X# @(#)vc7-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc7-setup
echo x - star-1.5.2/DEFAULTS/Defaults.newsos6
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.newsos6 << 'END-of-star-1.5.2/DEFAULTS/Defaults.newsos6'
X#ident "@(#)Defaults.newsos6	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.newsos6
echo x - star-1.5.2/DEFAULTS/Defaults.beos
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.beos << 'END-of-star-1.5.2/DEFAULTS/Defaults.beos'
X#ident "@(#)Defaults.beos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for BeOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.beos
echo x - star-1.5.2/DEFAULTS/Defaults.os2
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.os2 << 'END-of-star-1.5.2/DEFAULTS/Defaults.os2'
X#ident "@(#)Defaults.os2	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for OS/2 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.os2
echo x - star-1.5.2/DEFAULTS/Defaults.qnx
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.qnx << 'END-of-star-1.5.2/DEFAULTS/Defaults.qnx'
X#ident "@(#)Defaults.qnx	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for QNX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X# When QNX support started in december 1999, there was only the watcom
X# C-compler (cc). Now, in novemver 2001 we switch to gcc.
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.qnx
echo x - star-1.5.2/DEFAULTS/Defaults.openserver
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.openserver << 'END-of-star-1.5.2/DEFAULTS/Defaults.openserver'
X#ident "@(#)Defaults.openserver	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/usr/local
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.openserver
echo x - star-1.5.2/DEFAULTS/Defaults.unixware
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.unixware << 'END-of-star-1.5.2/DEFAULTS/Defaults.unixware'
X#ident "@(#)Defaults.unixware	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO UnixWare Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/usr/local
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.unixware
echo x - star-1.5.2/DEFAULTS/Defaults.mac-os10
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.mac-os10 << 'END-of-star-1.5.2/DEFAULTS/Defaults.mac-os10'
X#ident "@(#)Defaults.mac-os10	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-star-1.5.2/DEFAULTS/Defaults.mac-os10
echo x - star-1.5.2/DEFAULTS/Defaults.darwin
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.darwin << 'END-of-star-1.5.2/DEFAULTS/Defaults.darwin'
X#ident "@(#)Defaults.darwin	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Darwin Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-star-1.5.2/DEFAULTS/Defaults.darwin
echo x - star-1.5.2/DEFAULTS/Defaults.domainos
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.domainos << 'END-of-star-1.5.2/DEFAULTS/Defaults.domainos'
X#ident "@(#)Defaults.domainos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Apollo Domain/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=	-W0,-info,0
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.domainos
echo x - star-1.5.2/DEFAULTS/Defaults.amigaos
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.amigaos << 'END-of-star-1.5.2/DEFAULTS/Defaults.amigaos'
X#ident "@(#)Defaults.amigaos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for AmigaOS Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.amigaos
echo x - star-1.5.2/DEFAULTS/Defaults.gnu
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.gnu << 'END-of-star-1.5.2/DEFAULTS/Defaults.gnu'
X#ident "@(#)Defaults.gnu	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for GNU (hurd) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/src/linux/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.gnu
echo x - star-1.5.2/DEFAULTS/Defaults.bsd-os3
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.bsd-os3 << 'END-of-star-1.5.2/DEFAULTS/Defaults.bsd-os3'
X#ident "@(#)Defaults.bsd-os3	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.bsd-os3
echo x - star-1.5.2/DEFAULTS/Defaults.ms-dos
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.ms-dos << 'END-of-star-1.5.2/DEFAULTS/Defaults.ms-dos'
X#ident "@(#)Defaults.ms-dos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for  MSDOS/DJGPP v2 Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.ms-dos
echo x - star-1.5.2/DEFAULTS/Defaults.mingw32_nt
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.mingw32_nt << 'END-of-star-1.5.2/DEFAULTS/Defaults.mingw32_nt'
X#ident "@(#)Defaults.mingw32_nt	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for Win32/Mingw32 systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.mingw32_nt
echo x - star-1.5.2/DEFAULTS/Defaults.interix
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.interix << 'END-of-star-1.5.2/DEFAULTS/Defaults.interix'
X#ident "@(#)Defaults.interix	1.6 09/06/04 "
X###########################################################################
X#
X# global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Avoid to have something like "Intel_x86_Family15_Model4_Stepping1"
X# in $(OARCH), we rather use $(K_ARCH) which is e.g. "x86".
X# XXX If this is changed, both files in DEFAULTS/ and DEFAULTS_ENG as
X# XXX well as the file conf/oarch.sh need to be changed.
X#
X###########################################################################
XP_ARCH=		$(K_ARCH)
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR)
XRUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-ms*.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	interix
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-ms*.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/DEFAULTS/Defaults.interix
echo x - star-1.5.2/DEFAULTS/dummy-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/dummy-setup << 'END-of-star-1.5.2/DEFAULTS/dummy-setup'
END-of-star-1.5.2/DEFAULTS/dummy-setup
echo x - star-1.5.2/DEFAULTS/vc6-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc6-setup << 'END-of-star-1.5.2/DEFAULTS/vc6-setup'
X# @(#)vc6-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc6-setup
echo x - star-1.5.2/DEFAULTS/vc6-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc6-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS/vc6-cygwin-setup'
X# @(#)vc6-cygwin-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc6-cygwin-setup
echo x - star-1.5.2/DEFAULTS/vc6-interix-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc6-interix-setup << 'END-of-star-1.5.2/DEFAULTS/vc6-interix-setup'
X# @(#)vc6-interix-setup	1.4 07/04/20 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/dev/fs/C/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc6-interix-setup
echo x - star-1.5.2/DEFAULTS/vc9-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc9-setup << 'END-of-star-1.5.2/DEFAULTS/vc9-setup'
X# @(#)vc9-setup	1.3 11/08/01 Copyright 2006-2011 J. Schilling
X
X#
X# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
XVSBASEDIR=C:\Program Files (x86)
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
X#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
XINCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE}
Xexport	INCLUDE
X
X#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
XLIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc9-setup
echo x - star-1.5.2/DEFAULTS/vc7-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc7-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS/vc7-cygwin-setup'
X# @(#)vc7-cygwin-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc7-cygwin-setup
echo x - star-1.5.2/DEFAULTS/vc7-interix-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc7-interix-setup << 'END-of-star-1.5.2/DEFAULTS/vc7-interix-setup'
X# @(#)vc7-interix-setup	1.7 07/04/24 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\Include;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc7-interix-setup
echo x - star-1.5.2/DEFAULTS/Defaults.dragonfly
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.dragonfly << 'END-of-star-1.5.2/DEFAULTS/Defaults.dragonfly'
X#ident "@(#)Defaults.dragonfly	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.dragonfly
echo x - star-1.5.2/DEFAULTS/Defaults.freemint
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.freemint << 'END-of-star-1.5.2/DEFAULTS/Defaults.freemint'
X#ident @(#)Defaults.freemint	1.3 08/12/26 
X###########################################################################
X#
X# global definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.freemint
echo x - star-1.5.2/DEFAULTS/Defaults.syllable
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.syllable << 'END-of-star-1.5.2/DEFAULTS/Defaults.syllable'
X#ident "@(#)Defaults.syllable	1.2 09/06/04 "
X###########################################################################
X#
X# global definitions for Syllable Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /ainc
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.syllable
echo x - star-1.5.2/DEFAULTS/Defaults.haiku
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.haiku << 'END-of-star-1.5.2/DEFAULTS/Defaults.haiku'
X#ident "@(#)Defaults.haiku	1.3 09/07/25 "
X###########################################################################
X#
X# global definitions for Haiku Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/boot/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.haiku
echo x - star-1.5.2/DEFAULTS/vc7_64-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc7_64-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS/vc7_64-cygwin-setup'
X# @(#)vc7_64-cygwin-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc7_64-cygwin-setup
echo x - star-1.5.2/DEFAULTS/vc7_64-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc7_64-setup << 'END-of-star-1.5.2/DEFAULTS/vc7_64-setup'
X# @(#)vc7_64-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation on a German Windows (32Bit) host, to be used
X# for cross compiling stuff (no autoconf run)
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc7_64-setup
echo x - star-1.5.2/DEFAULTS/Defaults.cygwin32_wow64
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.cygwin32_wow64 << 'END-of-star-1.5.2/DEFAULTS/Defaults.cygwin32_wow64'
X#ident "@(#)Defaults.cygwin32_wow64	1.6 11/07/30 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
XVC=9
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/DEFAULTS/Defaults.cygwin32_wow64
echo x - star-1.5.2/DEFAULTS/vc9-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS/vc9-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS/vc9-cygwin-setup'
X# @(#)vc9-cygwin-setup	1.4 11/08/01 Copyright 2006-2011 J. Schilling
X
X#
X# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
XVSBASEDIR=C:\Program Files (x86)
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
X#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
XINCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE}
Xexport	INCLUDE
X
X#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
XLIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS/vc9-cygwin-setup
echo x - star-1.5.2/DEFAULTS/Defaults.openvms
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.openvms << 'END-of-star-1.5.2/DEFAULTS/Defaults.openvms'
X#ident "@(#)Defaults.openvms	1.1 09/10/31 "
X###########################################################################
X#
X# global definitions for OpenVMS
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.openvms
echo x - star-1.5.2/DEFAULTS/Defaults.gnu-kfreebsd
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.gnu-kfreebsd << 'END-of-star-1.5.2/DEFAULTS/Defaults.gnu-kfreebsd'
X#ident "@(#)Defaults.linux	1.7 09/06/04 "
X###########################################################################
X#
X# global definitions for Linux Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
X###########################################################################
X#
X# Unhide POSIX extensions from /usr/include/
X#
X###########################################################################
XOSDEFS +=	-D_GNU_SOURCE
X
X###########################################################################
X#
X# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul
X#
X###########################################################################
XLINUX_INCL_PATH=	/usr/src/linux/include
X
X_LINUX_SRC_INCLUDE=	$(_UNIQ)$(MAY_LINUX_SRC_INCLUDE)
X__LINUX_SRC_INCLUDE=	$(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH))
XLINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.gnu-kfreebsd
echo x - star-1.5.2/DEFAULTS/Defaults.pyro
sed 's/^X//' >star-1.5.2/DEFAULTS/Defaults.pyro << 'END-of-star-1.5.2/DEFAULTS/Defaults.pyro'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for Pyro Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
XCWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /boot/Include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/admin
XINS_RBASE=	/tmp/schily/admin
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	admin
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS/Defaults.pyro
echo c - star-1.5.2/DEFAULTS_ENG
mkdir -p star-1.5.2/DEFAULTS_ENG > /dev/null 2>&1
echo x - star-1.5.2/DEFAULTS_ENG/Defaults
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions: include system specific file
X#
X###########################################################################
X
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH)
END-of-star-1.5.2/DEFAULTS_ENG/Defaults
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.aix
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.aix << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.aix'
X#ident "@(#)Defaults.aix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for IBM AIX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.aix
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.dgux
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.dgux << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dgux'
X#ident "@(#)Defaults.dgux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dgux
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.dgux3
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.dgux3 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dgux3'
X#ident "@(#)Defaults.dgux3	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dgux3
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.dgux4
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.dgux4 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dgux4'
X#ident "@(#)Defaults.dgux4	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Data General DGUX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dgux4
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.freebsd
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.freebsd << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.freebsd'
X#ident "@(#)Defaults.freebsd	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.freebsd
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.hp-ux
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.hp-ux << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.hp-ux'
X#ident "@(#)Defaults.hp-ux	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for HP/UX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.hp-ux
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.irix
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.irix << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.irix'
X#ident "@(#)Defaults.irix	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Silicon Graphics Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.irix
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.linux
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.linux << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.linux'
X#ident "@(#)Defaults.linux	1.7 09/06/04 "
X###########################################################################
X#
X# global definitions for Linux Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
X###########################################################################
X#
X# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul
X#
X###########################################################################
XLINUX_INCL_PATH=	/usr/src/linux/include
X
X_LINUX_SRC_INCLUDE=	$(_UNIQ)$(MAY_LINUX_SRC_INCLUDE)
X__LINUX_SRC_INCLUDE=	$(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH))
XLINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Unhide POSIX extensions from /usr/include/
X#
X###########################################################################
XOSDEFS +=	-D_GNU_SOURCE
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.linux
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.sunos4
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.sunos4 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.sunos4'
X#ident "@(#)Defaults.sunos4	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for SunOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will not work on SunOS
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.sunos4
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.sunos5
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.sunos5 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.sunos5'
X#ident "@(#)Defaults.sunos5	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Solaris Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.sunos5
echo x - star-1.5.2/DEFAULTS_ENG/README
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/README << 'END-of-star-1.5.2/DEFAULTS_ENG/README'
XThis directory contains engineering defaults
END-of-star-1.5.2/DEFAULTS_ENG/README
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.netbsd
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.netbsd << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.netbsd'
X#ident "@(#)Defaults.netbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NetBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.netbsd
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.openbsd
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.openbsd << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.openbsd'
X#ident "@(#)Defaults.openbsd	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for OpenBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.openbsd
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os'
X#ident "@(#)Defaults.bsd-os	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_nt
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_nt << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_nt'
X#ident "@(#)Defaults.cygwin32_nt	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_nt
echo x - star-1.5.2/DEFAULTS_ENG/MKLINKS
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/MKLINKS << 'END-of-star-1.5.2/DEFAULTS_ENG/MKLINKS'
X#!/bin/sh
X#
Xln -s	Defaults.dgux	Defaults.dgux3
Xln -s	Defaults.dgux	Defaults.dgux4
END-of-star-1.5.2/DEFAULTS_ENG/MKLINKS
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.osf1
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.osf1 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.osf1'
X#ident "@(#)Defaults.osf1	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Digital UNIX (OSF1) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.osf1
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.nextstep
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.nextstep << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.nextstep'
X#ident "@(#)Defaults.nextstep	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.nextstep
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.rhapsody
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.rhapsody << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.rhapsody'
X#ident "@(#)Defaults.rhapsody	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for NeXT Step (Apple Rhapsody) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.rhapsody
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.newsos6
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.newsos6 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.newsos6'
X#ident "@(#)Defaults.newsos6	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Sony NEWS-OS 6.x
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.newsos6
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.beos
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.beos << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.beos'
X#ident "@(#)Defaults.beos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for BeOS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.beos
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.os2
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.os2 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.os2'
X#ident "@(#)Defaults.os2	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for OS/2 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.os2
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.qnx
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.qnx << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.qnx'
X#ident "@(#)Defaults.qnx	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for QNX Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X# When QNX support started in december 1999, there was only the watcom
X# C-compler (cc). Now, in novemver 2001 we switch to gcc.
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.qnx
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.openserver
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.openserver << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.openserver'
X#ident "@(#)Defaults.openserver	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO OpenServer 5 Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/usr/local
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.openserver
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.unixware
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.unixware << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.unixware'
X#ident "@(#)Defaults.unixware	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for SCO UnixWare Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		
XRUNPATH=	
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/usr/local
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.unixware
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.mac-os10
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.mac-os10 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.mac-os10'
X#ident "@(#)Defaults.mac-os10	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.mac-os10
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.darwin
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.darwin << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.darwin'
X#ident "@(#)Defaults.darwin	1.3 08/12/26 "
X###########################################################################
X#
X# global definitions for Mac OS X Darwin Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		#-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	wheel
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.darwin
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.domainos
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.domainos << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.domainos'
X#ident "@(#)Defaults.domainos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for Apollo Domain/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.domainos
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.amigaos
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.amigaos << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.amigaos'
X#ident "@(#)Defaults.amigaos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for AmigaOS Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.amigaos
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.gnu
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.gnu << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.gnu'
X#ident "@(#)Defaults.gnu	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for GNU (hurd) Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/src/linux/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.gnu
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os3
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os3 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os3'
X#ident "@(#)Defaults.bsd-os3	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for BSD/OS Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.bsd-os3
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.ms-dos
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.ms-dos << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.ms-dos'
X#ident "@(#)Defaults.ms-dos	1.5 09/06/04 "
X###########################################################################
X#
X# global definitions for  MSDOS/DJGPP v2 Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.ms-dos
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.mingw32_nt
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.mingw32_nt << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.mingw32_nt'
X#ident "@(#)Defaults.mingw32_nt	1.4 08/12/26 "
X###########################################################################
X#
X# global definitions for Win32/Mingw32 systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.mingw32_nt
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.interix
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.interix << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.interix'
X#ident "@(#)Defaults.interix	1.6 09/06/04 "
X###########################################################################
X#
X# global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Avoid to have something like "Intel_x86_Family15_Model4_Stepping1"
X# in $(OARCH), we rather use $(K_ARCH) which is e.g. "x86".
X# XXX If this is changed, both files in DEFAULTS/ and DEFAULTS_ENG as
X# XXX well as the file conf/oarch.sh need to be changed.
X#
X###########################################################################
XP_ARCH=		$(K_ARCH)
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR)
XRUNPATH=	--rpath $(INS_BASE)/lib --rpath /opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-ms*.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	interix
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-ms*.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.interix
echo x - star-1.5.2/DEFAULTS_ENG/vc7-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc7-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc7-setup'
X# @(#)vc7-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc7-setup
echo x - star-1.5.2/DEFAULTS_ENG/dummy-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/dummy-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/dummy-setup'
END-of-star-1.5.2/DEFAULTS_ENG/dummy-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc6-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc6-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc6-setup'
X# @(#)vc6-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc6-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc6-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc6-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc6-cygwin-setup'
X# @(#)vc6-cygwin-setup	1.4 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc6-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/cygdrive/c/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/cygdrive/c/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc6-cygwin-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc6-interix-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc6-interix-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc6-interix-setup'
X# @(#)vc6-interix-setup	1.4 07/04/20 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
XVSCommonDir=C:\Programme\Microsoft Visual Studio\Common
XVSCommonPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common
Xexport	VSCommonDir
X
XMSDevDir=C:\Programme\Microsoft Visual Studio\Common\msdev98
XMSDevPath=/dev/fs/C/Programme/Microsoft Visual Studio/Common/msdev98
Xexport	MSDevDir
X
XMSVCDir=C:\Programme\Microsoft Visual Studio\VC98
XMSVCPath=/dev/fs/C/Programme/Microsoft Visual Studio/VC98
Xexport	MSVCDir
X
XVcOsDir=WIN95
XVcOsDir=WINNT
Xexport	VcOsDir
X
XPATH	:=${MSDevPath}\BIN:${MSVCPath}\BIN:${VSCommonPath}\TOOLS\${VcOsDir}:${VSCommonPath}\TOOLS:${PATH}
Xexport	PATH
X
XINCLUDE	:=${MSVCDir}\ATL\INCLUDE;${MSVCDir}\INCLUDE;${MSVCDir}\\MFC\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB	:=${MSVCDir}\LIB;${MSVCDir}\MFC\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc6-interix-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc7-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc7-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc7-cygwin-setup'
X# @(#)vc7-cygwin-setup	1.5 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc7-cygwin-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc7-interix-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc7-interix-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc7-interix-setup'
X# @(#)vc7-interix-setup	1.7 07/04/24 Copyright 2006 J. Schilling
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
XVSINS=/dev/fs/C/Program Files/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\Include;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc7-interix-setup
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.dragonfly
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.dragonfly << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dragonfly'
X#ident "@(#)Defaults.dragonfly	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for FreeBSD Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /usr/local/include
XLDPATH=		-L/opt/schily/lib -L/usr/local/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.dragonfly
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.freemint
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.freemint << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.freemint'
X#ident @(#)Defaults.freemint	1.3 08/12/26 
X###########################################################################
X#
X# global definitions for FreeMiNT on ATARI computers
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.freemint
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.syllable
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.syllable << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.syllable'
X#ident "@(#)Defaults.syllable	1.2 09/06/04 "
X###########################################################################
X#
X# global definitions for Syllable Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /ainc
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.syllable
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.haiku
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.haiku << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.haiku'
X#ident "@(#)Defaults.haiku	1.2 09/06/04 "
X###########################################################################
X#
X# global definitions for Haiku Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.haiku
echo x - star-1.5.2/DEFAULTS_ENG/vc7_64-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc7_64-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc7_64-cygwin-setup'
X# @(#)vc7_64-cygwin-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc7_64-cygwin-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc7_64-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc7_64-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc7_64-setup'
X# @(#)vc7_64-setup	1.1 09/05/16 Copyright 2006 J. Schilling
X
X#
X# Keep in sync with vc7_64-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation on a German Windows (32Bit) host, to be used
X# for cross compiling stuff (no autoconf run)
X#
X#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
X#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8
X
X#
X# An English installation on an English Windows XP 64 Bit host
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
XINCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
Xexport	INCLUDE
X
XLIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc7_64-setup
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_wow64
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_wow64 << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_wow64'
X#ident "@(#)Defaults.cygwin32_wow64	1.5 08/12/26 "
X###########################################################################
X#
X# global definitions for Cygnus GCC for WINNT Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
X#LDPATH=		-L/opt/schily/lib
XLDPATH=
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	root
X
X#
X# This is not the correct place for doing this, 
X# the correct place is RULES/cc-msc.rul.
X# We do it here because otherwise cc-config would not work.
X# This kind of hack may not work for other platforms.
X#
X_PLATFORM=	cygwin
XVC=7
X
X_VC_SETUP=	$(_UNIQ)$(VC_SETUP)
X__VC_SETUP=	$(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup)
XVCSETUP=	$(__VC_SETUP:$(_UNIQ)%=%)
X
X###########################################################################
X# IMPORTANT Note:
X# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul
X# in order to be able to test for the existence of "cl.exe" early.
X###########################################################################
Xinclude		$(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP)
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.cygwin32_wow64
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.openvms
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.openvms << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.openvms'
X#ident "@(#)Defaults.openvms	1.1 09/10/31 "
X###########################################################################
X#
X# global definitions for OpenVMS
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
XINS_RBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.openvms
echo x - star-1.5.2/DEFAULTS_ENG/vc9-cygwin-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc9-cygwin-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc9-cygwin-setup'
X# @(#)vc9-cygwin-setup	1.4 11/08/01 Copyright 2006-2011 J. Schilling
X
X#
X# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
XVSBASEDIR=C:\Program Files (x86)
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
X#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
XINCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE}
Xexport	INCLUDE
X
X#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
XLIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc9-cygwin-setup
echo x - star-1.5.2/DEFAULTS_ENG/vc9-setup
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/vc9-setup << 'END-of-star-1.5.2/DEFAULTS_ENG/vc9-setup'
X# @(#)vc9-setup	1.3 11/08/01 Copyright 2006-2011 J. Schilling
X
X#
X# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links
X#
X
X#
X# Disable warnings for nonportable variable assignements.
X# We only use smake MS-WIN, so this is not a problem.
X#
X.NO_WARN: :=
X
X#
X# A German installation
X#
XVSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
XVSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0
X
X#
X# An English installation
X#
XVSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
XVSBASEDIR=C:\Program Files (x86)
XVSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0
X
Xexport	VSINSTALLDIR
X
XVCINSTALLDIR :=${VSINSTALLDIR}\VC
Xexport	VCINSTALLDIR
X
XPATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH}
Xexport	PATH
X
X#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE}
XINCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE}
Xexport	INCLUDE
X
X#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB}
XLIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB}
Xexport	LIB
X
XVC_SETUP=dummy-setup
Xexport	VC_SETUP
X
X#
X# Re-enable all warnings.
X#
X.NO_WARN:
END-of-star-1.5.2/DEFAULTS_ENG/vc9-setup
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.gnu-kfreebsd
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.gnu-kfreebsd << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.gnu-kfreebsd'
X#ident "@(#)Defaults.linux	1.7 09/06/04 "
X###########################################################################
X#
X# global definitions for Linux Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
X###########################################################################
X#
X# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul
X#
X###########################################################################
XLINUX_INCL_PATH=	/usr/src/linux/include
X
X_LINUX_SRC_INCLUDE=	$(_UNIQ)$(MAY_LINUX_SRC_INCLUDE)
X__LINUX_SRC_INCLUDE=	$(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH))
XLINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Unhide POSIX extensions from /usr/include/
X#
X###########################################################################
XOSDEFS +=	-D_GNU_SOURCE
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/root
XINS_RBASE=	/tmp/schily/root
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	root
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.gnu-kfreebsd
echo x - star-1.5.2/DEFAULTS_ENG/Defaults.pyro
sed 's/^X//' >star-1.5.2/DEFAULTS_ENG/Defaults.pyro << 'END-of-star-1.5.2/DEFAULTS_ENG/Defaults.pyro'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for Pyro Systems
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X
X###########################################################################
X#
X# Link mode for libraries that are part of the makefile system:
X# If DEFLINKMODE is set to "static", no dynamic linking will be used
X# If DEFLINKMODE is set to "dynamic", dynamic linking will be used
X#
X###########################################################################
XDEFLINKMODE=	static
X
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include /boot/Include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
XRUNPATH=	-R$(INS_BASE)/lib -R/opt/schily/lib
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
X#INS_BASE=	/opt/schily
X#INS_KBASE=	/
X#INS_RBASE=	/
XINS_BASE=	/tmp/schily
XINS_KBASE=	/tmp/schily/admin
XINS_RBASE=	/tmp/schily/admin
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	admin
XDEFINSGRP=	bin
END-of-star-1.5.2/DEFAULTS_ENG/Defaults.pyro
echo c - star-1.5.2/include
mkdir -p star-1.5.2/include > /dev/null 2>&1
echo c - star-1.5.2/include/schily
mkdir -p star-1.5.2/include/schily > /dev/null 2>&1
echo x - star-1.5.2/include/schily/fnmatch.h
sed 's/^X//' >star-1.5.2/include/schily/fnmatch.h << 'END-of-star-1.5.2/include/schily/fnmatch.h'
X/* @(#)fnmatch.h	8.13 10/10/09 Copyright 2006-2010 J. Schilling from 8.1 (Berkeley) */
X
X#ifndef	_SCHILY_FNMATCH_H
X#define	_SCHILY_FNMATCH_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_FNMATCH_H
X#include <fnmatch.h>
X#else	/* !HAVE_FNMATCH_H */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern int	 fnmatch __PR((const char *, const char *, int));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* !HAVE_FNMATCH */
X
X/*
X * Copyright (c) 1992, 1993
X *	The Regents of the University of California.  All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X *	@(#)fnmatch.h	8.13 (Berkeley) 10/09/10
X */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	FNM_NOMATCH
X#define	FNM_NOMATCH	1	/* Match failed. */
X#endif
X#ifndef	FNM_ERROR
X#define	FNM_ERROR	2	/* An error occured */
X#endif
X#ifndef	FNM_NOSYS
X#define	FNM_NOSYS	3	/* Function (XPG4) not supported */
X#endif
X
X#ifndef	FNM_NOESCAPE
X#define	FNM_NOESCAPE	0x01	/* Disable backslash escaping. */
X#endif
X#ifndef	FNM_PATHNAME
X#define	FNM_PATHNAME	0x02	/* Slash must be matched by slash. */
X#endif
X#ifndef	FNM_PERIOD
X#define	FNM_PERIOD	0x04	/* Period must be matched by period. */
X#endif
X#if	!defined(FNM_IGNORECASE) && !defined(FNM_CASEFOLD)
X#define	FNM_IGNORECASE	0x10	/* Ignore case when making comparisons */
X#endif
X#if	!defined(FNM_IGNORECASE) && defined(FNM_CASEFOLD)
X#define	FNM_IGNORECASE	FNM_CASEFOLD
X#endif
X#ifndef	FNM_CASEFOLD
X#define	FNM_CASEFOLD	FNM_IGNORECASE
X#endif
X#ifndef	FNM_LEADING_DIR
X#define	FNM_LEADING_DIR	0x20	/* Ignore /<tail> after Imatch. */
X#endif
X
Xextern int	 js_fnmatch __PR((const char *, const char *, int));
X
X#if	!defined(HAVE_FNMATCH_IGNORECASE)
X#define	fnmatch	js_fnmatch
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* !_SCHILY_FNMATCH_H */
END-of-star-1.5.2/include/schily/fnmatch.h
echo x - star-1.5.2/include/schily/dirent.h
sed 's/^X//' >star-1.5.2/include/schily/dirent.h << 'END-of-star-1.5.2/include/schily/dirent.h'
X/* @(#)dirent.h	1.29 11/08/04 Copyright 1987, 1998, 2000-2011 J. Schilling */
X/*
X *	Copyright (c) 1987, 1998, 2000-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DIRENT_H
X#define	_SCHILY_DIRENT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifdef JOS
X#	ifdef	HAVE_SYS_STYPES_H
X#		ifndef	_INCL_SYS_STYPES_H
X#		include <sys/stypes.h>
X#		define	_INCL_SYS_STYPES_H
X#		endif
X#	endif
X#	ifdef	HAVE_SYS_FILEDESC_H
X#		ifndef	_INCL_SYS_FILEDESC_H
X#		include <sys/filedesc.h>
X#		define	_INCL_SYS_FILEDESC_H
X#		endif
X#	endif
X#	define	NEED_READDIR
X#	define 	dirent			_direct
X#	define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X#	define	DIRSIZE	30
X#	define	FOUND_DIRSIZE
X	typedef struct _dirent {
X		char	name[DIRSIZE];
X		short	ino;
X	} dirent;
X
X#else	/* !JOS */
X
X#	ifndef	_SCHILY_TYPES_H
X#		include <schily/types.h>
X#	endif
X#	ifndef	_SCHILY_STAT_H
X#		include <schily/stat.h>
X#	endif
X#	ifndef	_SCHILY_LIMITS_H
X#		include	<schily/limits.h>
X#	endif
X#	ifndef	_SCHILY_PARAM_H
X#		include <schily/param.h>
X#	endif
X#	ifndef	_SCHILY_STDLIB_H
X#	include <schily/stdlib.h>	/* MSVC: get _MAX_DIR */
X#	endif
X
X#	ifdef	HAVE_DIRENT_H		/* This a POSIX compliant system */
X#		ifndef	_INCL_DIRENT_H
X#		include <dirent.h>
X#		define	_INCL_DIRENT_H
X#		endif
X#		define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X#		define	_FOUND_DIR_
X#	else				/* This is a Pre POSIX system	 */
X
X#	define 	dirent	direct
X#	define	DIR_NAMELEN(dirent)	(dirent)->d_namlen
X
X#	if	defined(HAVE_SYS_DIR_H)
X#		ifndef	_INCL_SYS_DIR_H
X#		include <sys/dir.h>
X#		define	_INCL_SYS_DIR_H
X#		endif
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_)
X#		ifndef	_INCL_NDIR_H
X#		include <ndir.h>
X#		define	_INCL_NDIR_H
X#		endif
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_)
X#		ifndef	_INCL_SYS_NDIR_H
X#		include <sys/ndir.h>
X#		define	_INCL_SYS_NDIR_H
X#		endif
X#		define	_FOUND_DIR_
X#	endif
X#	endif	/* HAVE_DIRENT_H */
X
X#	if	defined(_FOUND_DIR_)
X/*
X * Don't use defaults here to allow recognition of problems.
X */
X#	if !defined(FOUND_DIRSIZE) && defined(MAXNAMELEN)
X#		define	DIRSIZE		MAXNAMELEN	/* From sys/param.h */
X#		define	FOUND_DIRSIZE
X#	endif
X
X#	if !defined(FOUND_DIRSIZE) && defined(MAXNAMLEN)
X#		define	DIRSIZE		MAXNAMLEN	/* From dirent.h    */
X#		define	FOUND_DIRSIZE
X#	endif
X
X#	ifdef	__never__
X	/*
X	 * DIRSIZ(dp) is a parameterized macro, we cannot use it here.
X	 */
X#	if !defined(FOUND_DIRSIZE) && defined(DIRSIZ)
X#		define	DIRSIZE		DIRSIZ		/* From sys/dir.h   */
X#		define	FOUND_DIRSIZE
X#	endif
X#	endif	/* __never__ */
X
X#	if !defined(FOUND_DIRSIZE) && defined(NAME_MAX)
X#		define	DIRSIZE		NAME_MAX	/* From limits.h    */
X#		define	FOUND_DIRSIZE
X#	endif
X
X#	else	/* !_FOUND_DIR_ */
X
X#	if !defined(FOUND_DIRSIZE) && defined(_MAX_DIR)
X#	if	defined(__MINGW32__) || defined(_MSC_VER)
X#		define	DIRSIZE		_MAX_DIR	/* From stdlib.h    */
X#		define	FOUND_DIRSIZE
X#		define	NEED_READDIR
X#		undef	dirent
X#		define 	dirent			_direct
X#		undef	DIR_NAMELEN
X#		define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X#	endif
X#	endif
X
X#		ifndef	NEED_READDIR
X#		define	NEED_DIRENT
X#		define	NEED_READDIR
X#		undef	dirent
X#		define 	dirent			_direct
X#		undef	DIR_NAMELEN
X#		define	DIR_NAMELEN(dirent)	strlen((dirent)->d_name)
X#		endif	/* !NEED_READDIR */
X
X#	endif	/* _FOUND_DIR_ */
X
X
X#ifdef	NEED_DIRENT
X
X#ifndef	FOUND_DIRSIZE
X#define	DIRSIZE		14	/* The old UNIX standard value */
X#define	FOUND_DIRSIZE
X#endif
X
Xtypedef struct _dirent {
X	short	ino;
X	char	name[DIRSIZE];
X} dirent;
X
X#endif	/* NEED_DIRENT */
X
X#endif	/* !JOS */
X
X#ifdef	NEED_READDIR
X
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X#if	defined(__MINGW32__) || defined(_MSC_VER)
X#ifndef	_SCHILY_IO_H
X#include <schily/io.h>		/* for _findfirst() */
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X#endif
X
X	struct _direct {
X		unsigned long	d_ino;
X		unsigned short	d_reclen;
X		unsigned short	d_namlen;
X		char		d_name[DIRSIZE +1];
X	};
X#define	HAVE_DIRENT_D_INO
X
X	typedef struct __dirdesc {
X		FILE		*dd_fd;
X
X#if	defined(__MINGW32__) || defined(_MSC_VER)
X		struct _direct	dd_dir;		/* dirent for this dir	*/
X		struct _finddata_t dd_data;	/* _findnext() results	*/
X		intptr_t	dd_handle;	/* _findnext() handle	*/
X		int		dd_state;	/* Current Dir state	*/
X		char		dd_dirname[1];	/* Dir to open		*/
X#endif
X	} DIR;
X
Xextern	DIR		*opendir __PR((const char *));
Xextern	int		closedir __PR((DIR *));
Xextern	struct dirent	*readdir __PR((DIR *));
X
X#endif	/* NEED_READDIR */
X
X#if	!defined(HAVE_DIRFD) && defined(HAVE_DIR_DD_FD)
X#	define	dirfd(dirp)	((dirp)->dd_fd)
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DIRENT_H */
END-of-star-1.5.2/include/schily/dirent.h
echo x - star-1.5.2/include/schily/btorder.h
sed 's/^X//' >star-1.5.2/include/schily/btorder.h << 'END-of-star-1.5.2/include/schily/btorder.h'
X/* @(#)btorder.h	1.22 12/12/03 Copyright 1996-2012 J. Schilling */
X/*
X *	Definitions for Bit and Byte ordering
X *
X *	Copyright (c) 1996-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef	_SCHILY_BTORDER_H
X#define	_SCHILY_BTORDER_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>		/* load bit/byte-oder from xmconfig.h */
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>		/* try to load isa_defs.h on Solaris */
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Convert bit-order definitions from xconfig.h into our values
X * and verify them.
X */
X#if defined(HAVE_C_BITFIELDS)	&& \
X    defined(BITFIELDS_LTOH)
X#define	_BIT_FIELDS_LTOH
X#endif
X
X#if defined(HAVE_C_BITFIELDS)	&& \
X    defined(BITFIELDS_HTOL)
X#define	_BIT_FIELDS_HTOL
X#endif
X
X#if defined(HAVE_C_BITFIELDS) && \
X	!defined(BITFIELDS_HTOL)
X#define	BITFIELDS_LTOH
X#define	_BIT_FIELDS_LTOH
X#endif
X
X#if	defined(_BIT_FIELDS_LTOH) && defined(_BIT_FIELDS_HTOL)
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if none of the above is defined. And that's  what we want.
X */
Xerror  Only one of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL may be defined
X
X#include <schily/err_bit.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X
X/*
X * Convert byte-order definitions from xconfig.h into our values
X * and verify them.
X * Note that we cannot use the definitions _LITTLE_ENDIAN and _BIG_ENDIAN
X * because they are used on IRIX-6.5 with different meaning.
X */
X#if defined(HAVE_C_BIGENDIAN) && \
X	!defined(WORDS_BIGENDIAN)
X#define	WORDS_LITTLEENDIAN
X/* #define	_LITTLE_ENDIAN */
X#endif
X
X#if defined(HAVE_C_BIGENDIAN)	&& \
X    defined(WORDS_BIGENDIAN)
X#undef	WORDS_LITTLEENDIAN
X/* #define	_BIG_ENDIAN */
X#endif
X
X#if	defined(_BIT_FIELDS_LTOH) || defined(_BIT_FIELDS_HTOL)
X/*
X * Bitorder is already known.
X */
X#else
X/*
X * Bitorder not yet known.
X */
X#	if defined(sun3) || defined(mc68000) || \
X	    defined(sun4) || defined(__sparc) || defined(sparc) || \
X	    defined(__hppa) || defined(_ARCH_PPC) || defined(_IBMR2)
X#		define _BIT_FIELDS_HTOL
X#	endif
X
X#	if defined(__sgi) && defined(__mips)
X#		define _BIT_FIELDS_HTOL
X#	endif
X
X#	if defined(__i386__) || defined(__i386) || defined(i386) || \
X	    defined(__alpha__) || defined(__alpha) || defined(alpha) || \
X	    defined(__arm__) || defined(__arm) || defined(arm)
X#		define _BIT_FIELDS_LTOH
X#	endif
X
X#	if defined(__ppc__) || defined(ppc) || defined(__ppc) || \
X	    defined(__PPC) || defined(powerpc) || defined(__powerpc__)
X
X#		if	defined(__BIG_ENDIAN__)
X#			define _BIT_FIELDS_HTOL
X#		else
X#			define _BIT_FIELDS_LTOH
X#		endif
X#	endif
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_BTORDER_H */
END-of-star-1.5.2/include/schily/btorder.h
echo x - star-1.5.2/include/schily/ccomdefs.h
sed 's/^X//' >star-1.5.2/include/schily/ccomdefs.h << 'END-of-star-1.5.2/include/schily/ccomdefs.h'
X/* @(#)ccomdefs.h	1.12 11/07/21 Copyright 2000-2011 J. Schilling */
X/*
X *	Various compiler dependant macros.
X *
X *	Copyright (c) 2000-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_CCOMDEFS_H
X#define	_SCHILY_CCOMDEFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Compiler-dependent macros to declare that functions take printf-like
X * or scanf-like arguments. They are defined to nothing for versions of gcc
X * that are not known to support the features properly (old versions of gcc-2
X * didn't permit keeping the keywords out of the application namespace).
X */
X#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || \
X	defined(NO_PRINTFLIKE)
X
X#define	__printflike__(fmtarg, firstvararg)
X#define	__printf0like__(fmtarg, firstvararg)
X#define	__scanflike__(fmtarg, firstvararg)
X
X#else /* We found GCC that supports __attribute__ */
X
X#define	__printflike__(fmtarg, firstvararg) \
X		__attribute__((__format__(__printf__, fmtarg, firstvararg)))
X#define	__printf0like__(fmtarg, firstvararg) \
X		__attribute__((__format__(__printf0__, fmtarg, firstvararg)))
X
X/*
X * FreeBSD GCC implements printf0 that allows the format string to
X * be a NULL pointer.
X */
X#if	__FreeBSD_cc_version < 300001
X#undef	__printf0like__
X#define	__printf0like__	__printflike__
X#endif
X
X#define	__scanflike__(fmtarg, firstvararg) \
X		__attribute__((__format__(__scanf__, fmtarg, firstvararg)))
X
X#endif /* GNUC */
X
X#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 2
X/* GCC-3.3 or more */
X
X/* CSTYLED */
X#define	UConst	__attribute__ ((__used__)) const
X
X#else	/* less than GNUC 3.3 */
X
X#define	UConst	const
X
X#endif /* less than GNUC 3.3 */
X
X#ifdef	__PCC__
X/*
X * Hack until pcc supports __attribute__ ((__used__))
X */
X#ifdef	UConst
X#undef	UConst
X#define	UConst	const
X#endif
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_CCOMDEFS_H */
END-of-star-1.5.2/include/schily/ccomdefs.h
echo x - star-1.5.2/include/schily/deflts.h
sed 's/^X//' >star-1.5.2/include/schily/deflts.h << 'END-of-star-1.5.2/include/schily/deflts.h'
X/* @(#)deflts.h	1.9 11/11/24 Copyright 1997-2011 J. Schilling */
X/*
X *	Definitions for reading program defaults.
X *
X *	Copyright (c) 1997-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DEFLTS_H
X#define	_SCHILY_DEFLTS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	DEFLT	"/etc/default"
X
X/*
X * cmd's to defltcntl()
X */
X#define	DC_GETFLAGS	0	/* Get actual flags	*/
X#define	DC_SETFLAGS	1	/* Set new flags	*/
X
X/*
X * flags to defltcntl()
X *
X * Make sure that when adding features, the default behaviour
X * is the same as old behaviour.
X */
X#define	DC_CASE		0x0001	/* Don't ignore case	*/
X
X#define	DC_STD		DC_CASE	/* Default flags	*/
X
X/*
X * Macros to handle flags
X */
X#ifndef	TURNON
X#define	TURNON(flags, mask)	flags |= mask
X#define	TURNOFF(flags, mask)	flags &= ~(mask)
X#define	ISON(flags, mask)	(((flags) & (mask)) == (mask))
X#define	ISOFF(flags, mask)	(((flags) & (mask)) != (mask))
X#endif
X
Xextern	int	defltopen	__PR((const char *name));
Xextern	int	defltclose	__PR((void));
Xextern	int	defltsect	__PR((const char *name));
Xextern	int	defltfirst	__PR((void));
Xextern	char	*defltread	__PR((const char *name));
Xextern	char	*defltnext	__PR((const char *name));
Xextern	int	defltcntl	__PR((int cmd, int flags));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DEFLTS_H */
END-of-star-1.5.2/include/schily/deflts.h
echo x - star-1.5.2/include/schily/device.h
sed 's/^X//' >star-1.5.2/include/schily/device.h << 'END-of-star-1.5.2/include/schily/device.h'
X/* @(#)device.h	1.19 09/11/16 Copyright 1995-2007 J. Schilling */
X/*
X *	Generic header for users of major(), minor() and makedev()
X *
X *	Copyright (c) 1995-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DEVICE_H
X#define	_SCHILY_DEVICE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * On generic SVR4, major is a function (defined in sys/mkdev.h).
X * On Solaris it is defined ...
X * As we cannot just test if major is #define'd, we have to
X * define _FOUND_MAJOR_ instead.
X *
X * WARNING: Do never include <sys/sysmacros.h> in SVR4, it contains
X * an old definition for major()/minor() defining 8 minorbits.
X * Use <sys/mkdev.h> instead.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * Some systems define major in <sys/types.h>.
X * We are ready...
X */
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	ifndef	_INCL_SYS_MKDEV_H
X#	include <sys/mkdev.h>
X#	define	_INCL_SYS_MKDEV_H
X#	endif
X	/*
X	 * Interix doesn't use makedev(); it uses mkdev()
X	 */
X#	if !defined(makedev) && defined(mkdev)
X#		define makedev(a, b)	mkdev((a), (b))
X#	endif
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		ifndef	_INCL_SYS_SYSMACROS_H
X#		include <sys/sysmacros.h>
X#		define	_INCL_SYS_SYSMACROS_H
X#		endif
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X/*
X * If we are on HP/UX before HP/UX 8,
X * major/minor are not in <sys/sysmacros.h>.
X */
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		ifndef	_INCL_SYS_MKOD_H
X#		include <sys/mknod.h>
X#		define	_INCL_SYS_MKOD_H
X#		endif
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef	_FOUND_MAJOR_
X#	ifdef VMS
X#		define major(dev)		(((((long)dev) >> 8) & 0xFF))
X#		define minor(dev)		((((long)dev) & 0xFF))
X#		define makedev(majo, mino)	(((majo) << 8) | (mino))
X#		define _FOUND_MAJOR_
X#	endif /* VMS */
X#endif /* _FOUND_MAJOR_ */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * For all other systems define major()/minor() here.
X * XXX Check if this definition will be usefull for ms dos too.
X */
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
X
X/*
X * Don't pollute namespace...
X */
X#undef _FOUND_MAJOR_
X
X#ifdef	__XDEV__
X/*
X * The following defines are currently only needed for 'star'.
X * We make it conditional code to avoid to pollute the namespace.
X */
X#define	XDEV_T	unsigned long
X
Xextern	int	minorbits;
Xextern	XDEV_T	minormask;
Xextern	XDEV_T	_dev_mask[];
X
X#define	dev_major(dev)			(((XDEV_T)(dev)) >> minorbits)
X#define	_dev_major(mbits, dev)		(((XDEV_T)(dev)) >> (mbits))
X
X#define	dev_minor(dev)			(((XDEV_T)(dev)) & minormask)
X#define	_dev_minor(mbits, dev)		(((XDEV_T)(dev)) & _dev_mask[(mbits)])
X
X
X#define	dev_make(majo, mino)		((((XDEV_T)(majo)) << minorbits) | \
X							((XDEV_T)(mino)))
X#define	_dev_make(mbits, majo, mino)	((((XDEV_T)(majo)) << (mbits) | \
X							((XDEV_T)(mino)))
X
Xextern	void	dev_init	__PR((BOOL debug));
X#ifndef	dev_major
Xextern	XDEV_T	dev_major	__PR((XDEV_T dev));
Xextern	XDEV_T	_dev_major	__PR((int mbits, XDEV_T dev));
Xextern	XDEV_T	dev_minor	__PR((XDEV_T dev));
Xextern	XDEV_T	_dev_minor	__PR((int mbits, XDEV_T dev));
Xextern	XDEV_T	dev_make	__PR((XDEV_T majo, XDEV_T mino));
Xextern	XDEV_T	_dev_make	__PR((int mbits, XDEV_T majo, XDEV_T mino));
X#endif
X
X#endif	/* __XDEV__ */
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DEVICE_H */
END-of-star-1.5.2/include/schily/device.h
echo x - star-1.5.2/include/schily/fcntl.h
sed 's/^X//' >star-1.5.2/include/schily/fcntl.h << 'END-of-star-1.5.2/include/schily/fcntl.h'
X/* @(#)fcntl.h	1.19 11/10/19 Copyright 1996-2011 J. Schilling */
X/*
X *	Generic header for users of open(), creat() and chmod()
X *
X *	Copyright (c) 1996-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_FCNTL_H
X#define	_SCHILY_FCNTL_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>	/* Needed for fcntl.h			*/
X#endif
X
X#ifndef	_SCHILY_STAT_H
X#include <schily/stat.h>	/* For 3rd arg of open() and chmod()	*/
X#endif
X
X#ifdef	HAVE_SYS_FILE_H
X/*
X * Historical systems with flock() only need sys/file.h
X */
X#	ifndef	_INCL_SYS_FILE_H
X#	include <sys/file.h>
X#	define	_INCL_SYS_FILE_H
X#	endif
X#endif
X#ifdef	HAVE_FCNTL_H
X#	ifndef	_INCL_FCNTL_H
X#	include <fcntl.h>
X#	define	_INCL_FCNTL_H
X#endif
X#endif
X
X/*
X * Do not define more than O_RDONLY / O_WRONLY / O_RDWR / O_BINARY
X * The values may differ.
X *
X * O_BINARY is defined here to allow all applications to compile on a non DOS
X * environment without repeating this definition.
X * O_SEARCH, O_DIRECTORY and NOFOLLOW are defined here to allow to compile on
X * older platforms.
X * open(name, O_SEARCH) is like UNOS open(name, "") (open neither for read nor
X * for write). This allows to call fstat() and to get an fd for openat(fd, ...)
X */
X#ifndef	O_RDONLY
X#	define	O_RDONLY	0
X#endif
X#ifndef	O_WRONLY
X#	define	O_WRONLY	1
X#endif
X#ifndef	O_RDWR
X#	define	O_RDWR		2
X#endif
X#ifndef	O_BINARY			/* Only present on DOS or similar */
X#	define	O_BINARY	0
X#endif
X#ifndef	O_NDELAY			/* This is undefined on BeOS :-( */
X#	define	O_NDELAY	0
X#endif
X#ifndef	O_EXEC				/* Open for exec only (non-directory) */
X#	define	O_EXEC		O_RDONLY
X#endif
X#ifndef	O_SEARCH			/* Open for search only. */
X#	define	O_SEARCH	O_RDONLY
X#endif
X#ifndef	O_DIRECTORY			/* Fail if not a directory */
X#	define	O_DIRECTORY	0
X#endif
X#ifndef	O_NOFOLLOW			/* Fail if a symlink */
X#	define	O_NOFOLLOW	0
X#endif
X
X#ifndef	O_ACCMODE
X#define	O_ACCMODE		(O_RDONLY|O_WRONLY|O_RDWR|O_EXEC|O_SEARCH)
X#endif
X
X#ifdef	O_NOATIME			/* Allow #ifdef O_NOATIME */
X#define	_O_NOATIME		O_NOATIME
X#else
X#define	_O_NOATIME		0
X#endif
X
X#ifndef	FD_CLOEXEC
X#define	FD_CLOEXEC		1	/* close on exec flag */
X#endif
X
X/*
X * The following definitions are used for emulating the *at() functions.
X * We use higher numbers for our definitions, to allow to add emulations
X * for missing functions without causing a clash with system definitions.
X */
X#ifndef	HAVE_OPENAT
X#ifndef	AT_FDCWD
X#define	AT_FDCWD		0xffd19553 /* *at() to working dir */
X#endif
X#endif
X#ifndef	HAVE_FSTATAT
X#ifndef	AT_SYMLINK_NOFOLLOW
X#define	AT_SYMLINK_NOFOLLOW	0x10000	/* emulate lstat() */
X#endif
X#endif
X#ifndef	HAVE_UNLINKAT
X#ifndef	AT_REMOVEDIR
X#define	AT_REMOVEDIR		0x20000	/* emulate rmdir() */
X#endif
X#endif
X#ifndef	HAVE_FACCESSAT
X#ifndef	AT_EACCESS
X#define	AT_EACCESS		0x40000	/* EUID access() */
X#endif
X#endif
X#ifndef	HAVE_LINKAT
X#ifndef	AT_SYMLINK_FOLLOW
X#define	AT_SYMLINK_FOLLOW	0x80000	/* follow symlinks before link() */
X#endif
X#endif
X
X#endif	/* _SCHILY_FCNTL_H */
END-of-star-1.5.2/include/schily/fcntl.h
echo x - star-1.5.2/include/schily/mman.h
sed 's/^X//' >star-1.5.2/include/schily/mman.h << 'END-of-star-1.5.2/include/schily/mman.h'
X/* @(#)mman.h	1.4 07/01/16 Copyright 2001-2007 J. Schilling */
X/*
X *	Definitions to be used for mmap()
X *
X *	Copyright (c) 2001-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MMAN_H
X#define	_SCHILY_MMAN_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#if defined(HAVE_SMMAP)
X
X#ifndef	_INCL_SYS_MMAN_H
X#include <sys/mman.h>
X#define	_INCL_SYS_MMAN_H
X#endif
X
X#ifndef	MAP_ANONYMOUS
X#	ifdef	MAP_ANON
X#	define	MAP_ANONYMOUS	MAP_ANON
X#	endif
X#endif
X
X#ifndef MAP_FILE
X#	define MAP_FILE		0	/* Needed on Apollo Domain/OS */
X#endif
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
X#endif	/* defined(HAVE_SMMAP) */
X
X#endif	/* _SCHILY_MMAN_H */
END-of-star-1.5.2/include/schily/mman.h
echo x - star-1.5.2/include/schily/getargs.h
sed 's/^X//' >star-1.5.2/include/schily/getargs.h << 'END-of-star-1.5.2/include/schily/getargs.h'
X/* @(#)getargs.h	1.19 10/08/27 Copyright 1985-2010 J. Schilling */
X/*
X *	Definitions for getargs()/getallargs()/getfiles()
X *
X *	Copyright (c) 1985-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_GETARGS_H
X#define	_SCHILY_GETARGS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Return values for get*args()/get*files()
X *
X * This package calls options "flags", they are returned from get*args().
X *
X * Note that NOTAFILE is not returned by the interface functions.
X * NOTAFILE is however used as return code from the user's callback functions
X * to signal that the current arg may be an option the callback function does
X * not know and definitely is no file type argument.
X *
X * General rules for the return code of the interface functions
X * get*args()/get*files():
X *
X *	> 0		A file type argument was found
X *	  0		All arguments have been parsed
X *	< 0		An error occured
X *
X * Flag and file arg processing should be terminated after getting a return
X * code <= 0.
X */
X#define	FLAGDELIM	  2	/* "--" stopped flag processing	*/
X#define	NOTAFLAG	  1	/* Not a flag type argument	*/
X#define	NOARGS		  0	/* No more args			*/
X#define	BADFLAG		(-1)	/* Not a valid flag argument	*/
X#define	BADFMT		(-2)	/* Error in format string	*/
X#define	NOTAFILE	(-3)	/* Seems to be a flag type	*/
X
Xtypedef	int	(*getargfun)	__PR((const char *__arg, void *__valp));
Xtypedef	int	(*getpargfun)	__PR((const char *__arg, void *__valp,
X						int *__pac, char *const **__pav,
X						const char *__opt));
X
X#define	NO_ARGFUN	(getargpfun)0
X
Xstruct ga_flags {
X	const char	*ga_format;
X	void		*ga_arg;
X	getpargfun	ga_funcp;
X};
X
Xstruct ga_props {
X	UInt32_t	ga_flags;
X	UInt32_t	ga_oflags;
X	size_t		ga_size;
X};
X
X#define	GA_NO_PROPS	(struct ga_props *)0
X
X/*
X * Definitions for ga_flags
X */
X#define	GAF_DEFAULT		0x00	/* The default behavior		    */
X#define	GAF_NO_PLUS		0x01	/* Options may not start with '+'   */
X#define	GAF_NO_EQUAL		0x02	/* Disallow '=' between opt and val */
X#define	GAF_NEED_DASH		0x04	/* Need dash before (-name=val),    */
X					/*  name=val is not allowed	    */
X#define	GAF_DELIM_DASHDASH	0x08	/* "--" stops even get?allargs()    */
X
X/*
X * POSIX does not allow options in the form "+option", "-option=value" or
X * "option=value".
X *
X * GAF_NO_PLUS		do not allow options to start with a '+'
X * GAF_NO_EQUAL		do not allow options to contain '=' between name & val
X */
X#define	GAF_POSIX_DEFAULT	(GAF_NO_PLUS | GAF_NO_EQUAL)
X
X/*
X * Keep in sync with schily.h
X */
Xextern	int	getallargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getfiles __PR((int *, char * const**, const char *));
Xextern	char	*getargerror __PR((int));
X
X/*
X * The new list versions of the functions need struct ga_props and thus need
X * getargs.h
X */
Xextern	int	getlallargs __PR((int *, char * const**, struct ga_props *,
X						const char *, ...));
Xextern	int	getlargs __PR((int *, char * const**, struct ga_props *,
X						const char *, ...));
Xextern	int	getlfiles __PR((int *, char * const**, struct ga_props *,
X						const char *));
Xextern	int	_getarginit __PR((struct ga_props *, size_t, UInt32_t));
X
X#define	getarginit(p, f)	_getarginit(p, sizeof (struct ga_props), f)
X
X/*
X * The vector versions of the functions need struct ga_flags and thus need
X * getargs.h
X */
Xextern	int	getvallargs __PR((int *, char * const**, struct ga_flags *,
X						struct ga_props *));
Xextern	int	getvargs __PR((int *, char * const**, struct ga_flags *,
X						struct ga_props *));
Xextern	int	getvfiles __PR((int *, char * const**, struct ga_flags *,
X						struct ga_props *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_GETARGS_H */
END-of-star-1.5.2/include/schily/getargs.h
echo x - star-1.5.2/include/schily/getcwd.h
sed 's/^X//' >star-1.5.2/include/schily/getcwd.h << 'END-of-star-1.5.2/include/schily/getcwd.h'
X/* @(#)getcwd.h	1.6 10/08/24 Copyright 1998-2010 J. Schilling */
X/*
X *	Definitions for getcwd()
X *
X *	Copyright (c) 1998-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_GETCWD_H
X#define	_SCHILY_GETCWD_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X
X#ifdef JOS
X#	ifndef	_INCL_SYS_STYPES_H
X#	include <sys/stypes.h>
X#	define	_INCL_SYS_STYPES_H
X#	endif
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifdef JOS
X	extern char	*gwd();
X#	define		getcwd(b, len)	gwd(b)
X#else
X#	ifndef	HAVE_GETCWD
X#		define	getcwd(b, len)	getwd(b)
X#	endif
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_GETCWD_H */
END-of-star-1.5.2/include/schily/getcwd.h
echo x - star-1.5.2/include/schily/intcvt.h
sed 's/^X//' >star-1.5.2/include/schily/intcvt.h << 'END-of-star-1.5.2/include/schily/intcvt.h'
X/* @(#)intcvt.h	1.7 10/08/27 Copyright 1986-2010 J. Schilling */
X/*
X *	Definitions for conversion to/from integer data types of various size.
X *
X *	Copyright (c) 1986-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_INTCVT_H
X#define	_SCHILY_INTCVT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#define	i_to_2_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[1] = (i) & 0xFF)
X
X#define	i_to_3_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[2] = (i) & 0xFF)
X
X#define	i_to_4_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 24)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[2] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[3] = (i) & 0xFF)
X
X
X
X#define	a_to_byte(a)		(((Int8_t *)a)[0])
X
X#define	a_to_u_byte(a)		((UInt8_t) \
X				(((Uchar *)a)[0]		& 0xFF))
X
X#define	a_to_u_2_byte(a)	((UInt16_t) \
X				((((Uchar *)a)[1]		& 0xFF) | \
X				    (((Uchar *)a)[0] << 8	& 0xFF00)))
X
X#define	a_to_2_byte(a)		(int)(Int16_t)a_to_u_2_byte(a)
X
X#define	a_to_u_3_byte(a)	((Ulong) \
X				((((Uchar *)a)[2]		& 0xFF) | \
X				    (((Uchar *)a)[1] << 8	& 0xFF00) | \
X				    (((Uchar *)a)[0] << 16	& 0xFF0000)))
X
X#define	a_to_3_byte(a)		a_to_u_3_byte(a) /* XXX signed version? */
X
X#ifdef	__STDC__
X#	define	__TOP_4BYTE	0xFF000000UL
X#else
X#	define	__TOP_4BYTE	0xFF000000
X#endif
X
X#define	a_to_u_4_byte(a)	((Ulong) \
X				((((Uchar*)a)[3]		& 0xFF) | \
X				    (((Uchar*)a)[2] << 8	& 0xFF00) | \
X				    (((Uchar*)a)[1] << 16	& 0xFF0000) | \
X				    (((Uchar*)a)[0] << 24	& __TOP_4BYTE)))
X
X#define	a_to_4_byte(a)		(long)(Int32_t)a_to_u_4_byte(a)
X
X/*
X * Little Endian versions of above macros
X */
X#define	li_to_2_byte(a, i)	(((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[0] = (i) & 0xFF)
X
X#define	li_to_3_byte(a, i)	(((Uchar *)(a))[2] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[0] = (i) & 0xFF)
X
X#define	li_to_4_byte(a, i)	(((Uchar *)(a))[3] = ((i) >> 24)& 0xFF,\
X				    ((Uchar *)(a))[2] = ((i) >> 16)& 0xFF,\
X				    ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\
X				    ((Uchar *)(a))[0] = (i) & 0xFF)
X
X
X#define	la_to_u_2_byte(a)	((UInt16_t) \
X				((((Uchar*)a)[0]		& 0xFF) | \
X				    (((Uchar*)a)[1] << 8	& 0xFF00)))
X
X#define	la_to_2_byte(a)		(int)(Int16_t)la_to_u_2_byte(a)
X
X#define	la_to_u_3_byte(a)	((Ulong) \
X				((((Uchar*)a)[0]		& 0xFF) | \
X				    (((Uchar*)a)[1] << 8	& 0xFF00) | \
X				    (((Uchar*)a)[2] << 16	& 0xFF0000)))
X
X#define	la_to_3_byte(a)		la_to_u_3_byte(a) /* XXX signed version? */
X
X#define	la_to_u_4_byte(a)	((Ulong) \
X				((((Uchar*)a)[0]		& 0xFF) | \
X				    (((Uchar*)a)[1] << 8	& 0xFF00) | \
X				    (((Uchar*)a)[2] << 16	& 0xFF0000) | \
X				    (((Uchar*)a)[3] << 24	& __TOP_4BYTE)))
X
X#define	la_to_4_byte(a)		(long)(Int32_t)la_to_u_4_byte(a)
X
X#endif	/* _SCHILY_INTCVT_H */
END-of-star-1.5.2/include/schily/intcvt.h
echo x - star-1.5.2/include/schily/jmpdefs.h
sed 's/^X//' >star-1.5.2/include/schily/jmpdefs.h << 'END-of-star-1.5.2/include/schily/jmpdefs.h'
X/* @(#)jmpdefs.h	1.9 09/07/13 Copyright 1998-2009 J. Schilling */
X/*
X *	Definitions that help to handle a jmp_buf
X *
X *	Copyright (c) 1998-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_JMPDEFS_H
X#define	_SCHILY_JMPDEFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_SETJMP_H
X#include <schily/setjmp.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef struct {
X	jmp_buf	jb;
X} jmps_t;
X
X#if defined(HAVE_SIGSETJMP) && defined(HAVE_SIGLONGJMP)
X#define	HAVE_SIGJMPS_T
X
Xtypedef struct {
X	sigjmp_buf jb;
X} sigjmps_t;
X
X#else
X
X/*
X * Make sure to use the best available
X */
X#define	sigjmps_t		jmps_t
X#define	sigsetjmp(je, sm)	setjmp(je)
X#define	siglongjmp		longjmp
X
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_JMPDEFS_H */
END-of-star-1.5.2/include/schily/jmpdefs.h
echo x - star-1.5.2/include/schily/libport.h
sed 's/^X//' >star-1.5.2/include/schily/libport.h << 'END-of-star-1.5.2/include/schily/libport.h'
X/* @(#)libport.h	1.33 11/11/24 Copyright 1995-2011 J. Schilling */
X/*
X *	Copyright (c) 1995-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef _SCHILY_LIBPORT_H
X#define	_SCHILY_LIBPORT_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifndef _SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(size_t)
X#	ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T
X#	endif
X#endif
X#if	defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
X#	undef	FOUND_SIZE_T
X#endif
X
X#ifdef	OPENSERVER
X/*
X * Don't use the usleep() from libc on SCO's OPENSERVER.
X * It will kill our processes with SIGALRM.
X */
X/*
X * Don't #undef HAVE_USLEEP in this file, SCO has a
X * usleep() prototype in unistd.h
X */
X/* #undef	HAVE_USLEEP */
X#endif
X
X#ifndef	HAVE_GETHOSTID
Xextern	long		gethostid	__PR((void));
X#endif
X#ifndef	HAVE_GETPAGESIZE
Xextern	int		getpagesize	__PR((void));
X#endif
X#ifndef	HAVE_USLEEP
Xextern	int		usleep		__PR((int usec));
X#endif
X
X#ifndef	HAVE_STRCASECMP
Xextern	int		strcasecmp	__PR((const char *, const char *));
X#endif
X#ifdef	FOUND_SIZE_T
X#ifndef	HAVE_STRCASECMP
Xextern 	int		strncasecmp	__PR((const char *, const char *, size_t));
X#endif
X#endif
X
X#ifndef	HAVE_STRCAT
Xextern	char		*strcat		__PR((char *s1, const char *s2));
X#endif
X#ifndef	HAVE_STRCHR
Xextern	char		*strchr		__PR((const char *s1, int c));
X#endif
X#ifndef	HAVE_STRCMP
Xextern	int		strcmp		__PR((const char *s1, const char *s2));
X#endif
X#ifndef	HAVE_STRCPY
Xextern	char		*strcpy		__PR((char *s1, const char *s2));
X#endif
X#if	!defined(HAVE_STRDUP) || defined(__SVR4)
Xextern	char		*strdup		__PR((const char *s));
X#endif
X#ifdef	FOUND_SIZE_T
X#ifndef	HAVE_STRNDUP
Xextern	char		*strndup	__PR((const char *s, size_t len));
X#endif
X#ifndef	HAVE_STRLEN
Xextern	size_t		strlen		__PR((const char *s));
X#endif
X#ifndef	HAVE_STRNLEN
Xextern	size_t		strnlen		__PR((const char *s, size_t len));
X#endif
X#ifndef	HAVE_STRLCAT
Xextern	size_t		strlcat		__PR((char *s1, const char *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_STRLCPY
Xextern	size_t		strlcpy		__PR((char *s1, const char *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_STRNCAT
Xextern	char		*strncat	__PR((char *s1, const char *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_STRNCMP
Xextern	int		strncmp		__PR((const char *s1, const char *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_STRNCPY
Xextern	char		*strncpy	__PR((char *s1, const char *s2,
X							size_t len));
X#endif
X#endif	/* FOUND_SIZE_T */
X#ifndef	HAVE_STRRCHR
Xextern	char		*strrchr	__PR((const char *s1, int c));
X#endif
X
X#ifndef	HAVE_STRSTR
Xextern	char		*strstr		__PR((const char *s1, const char *s2));
X#endif
X
X#ifdef	_SCHILY_WCHAR_H
X#ifndef	HAVE_WCSCAT
Xextern	wchar_t		*wcscat		__PR((wchar_t *s1, const wchar_t *s2));
X#endif
X#ifndef	HAVE_WCSCHR
Xextern	wchar_t		*wcschr		__PR((const wchar_t *s1, wchar_t c));
X#endif
X#ifndef	HAVE_WCSCMP
Xextern	int		wcscmp		__PR((const wchar_t *s1,
X							const wchar_t *s2));
X#endif
X#ifndef	HAVE_WCSCPY
Xextern	wchar_t		*wcscpy		__PR((wchar_t *s1, const wchar_t *s2));
X#endif
X#ifndef	HAVE_WCSDUP
Xextern	wchar_t		*wcsdup		__PR((const wchar_t *s));
X#endif
X#ifdef	FOUND_SIZE_T
X#ifndef	HAVE_WCSNDUP
Xextern	wchar_t		*wcsndup	__PR((const wchar_t *s, size_t len));
X#endif
X#ifndef	HAVE_WCSLEN
Xextern	size_t		wcslen		__PR((const wchar_t *s));
X#endif
X#ifndef	HAVE_WCSNLEN
Xextern	size_t		wcsnlen		__PR((const wchar_t *s, size_t len));
X#endif
X#ifndef	HAVE_WCSLCAT
Xextern	size_t		wcslcat		__PR((wchar_t *s1, const wchar_t *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_WCSLCPY
Xextern	size_t		wcslcpy		__PR((wchar_t *s1, const wchar_t *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_WCSNCAT
Xextern	wchar_t		*wcsncat	__PR((wchar_t *s1, const wchar_t *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_WCSNCMP
Xextern	int		wcsncmp		__PR((const wchar_t *s1,
X							const wchar_t *s2,
X							size_t len));
X#endif
X#ifndef	HAVE_WCSNCPY
Xextern	wchar_t		*wcsncpy	__PR((wchar_t *s1, const wchar_t *s2,
X							size_t len));
X#endif
X#endif	/* FOUND_SIZE_T */
X#ifndef	HAVE_WCSRCHR
Xextern	wchar_t		*wcsrchr	__PR((const wchar_t *s1, wchar_t c));
X#endif
X
X#ifndef	HAVE_WCSSTR
Xextern	wchar_t		*wcsstr		__PR((const wchar_t *s1, const wchar_t *s2));
X#endif
X#endif	/* _SCHILY_WCHAR_H */
X
X#ifndef	HAVE_RENAME
Xextern	int		rename		__PR((const char *old,
X							const char *new));
X#endif
X
X/*
X * XXX Note: libgen.h / -lgen on Solaris contain eaccess()
X */
X#ifndef	HAVE_EACCESS
Xextern	int		eaccess		__PR((const char *name, int mode));
X#endif
X
X/*
X * See also libgen.h
X */
X#ifndef	HAVE_BASENAME
Xextern	char		*basename	__PR((char *name));
X#endif
X#ifndef	HAVE_DIRNAME
Xextern	char		*dirname	__PR((char *name));
X#endif
X
X#ifndef	HAVE_TIMEGM
X#if	defined(_SCHILY_TIME_H)
Xextern	time_t		timegm		__PR((struct tm *));
X#endif
X#endif
X
X#ifndef	HAVE_GETUID
Xextern	uid_t	getuid	__PR((void));
X#endif
X#ifndef	HAVE_GETEUID
Xextern	uid_t	geteuid	__PR((void));
X#endif
X#ifndef	HAVE_SETUID
Xextern	int	setuid	__PR((uid_t uid));
X#endif
X#ifndef	HAVE_SETEUID
Xextern	int	seteuid	__PR((uid_t uid));
X#endif
X
X#ifndef	HAVE_GETGID
Xextern	gid_t	getgid	__PR((void));
X#endif
X#ifndef	HAVE_GETEGID
Xextern	gid_t	getegid	__PR((void));
X#endif
X#ifndef	HAVE_SETGID
Xextern	int	setgid	__PR((gid_t gid));
X#endif
X#ifndef	HAVE_SETEGID
Xextern	int	setegid	__PR((gid_t gid));
X#endif
X
X#ifndef	HAVE_GETPWNAM
Xextern	struct passwd *getpwnam __PR((const char *name));
X#endif
X#ifndef	HAVE_GETPWENT
Xextern	struct passwd *getpwent __PR((void));
X#endif
X#ifndef	HAVE_GETPWUID
Xextern	struct passwd *getpwuid __PR((uid_t uid));
X#endif
X#ifndef	HAVE_SETPWENT
Xextern	void		setpwent __PR((void));
X#endif
X#ifndef	HAVE_ENDPWENT
Xextern	void		endpwent __PR((void));
X#endif
X
X
X#ifndef	HAVE_GETGRNAM
Xextern	struct group	*getgrnam __PR((const char *name));
X#endif
X#ifndef	HAVE_GETGRENT
Xextern	struct group	*getgrent __PR((void));
X#endif
X#ifndef	HAVE_GETGRGID
Xextern	struct group	*getgrgid __PR((gid_t gid));
X#endif
X#ifndef	HAVE_SETGRENT
Xextern	void		setgrent __PR((void));
X#endif
X#ifndef	HAVE_ENDGRENT
Xextern	void		endgrent __PR((void));
X#endif
X
X#ifndef	HAVE_FCHDIR
Xextern	int		fchdir __PR((int fd));
X#endif
X#ifndef	HAVE_OPENAT
Xextern	int		openat __PR((int fd, const char *name, int oflag, ...));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_LIBPORT_H */
END-of-star-1.5.2/include/schily/libport.h
echo x - star-1.5.2/include/schily/librmt.h
sed 's/^X//' >star-1.5.2/include/schily/librmt.h << 'END-of-star-1.5.2/include/schily/librmt.h'
X/* @(#)librmt.h	1.22 10/08/27 Copyright 1995,1996,2000-2010 J. Schilling */
X/*
X *	Prototypes for rmt client subroutines
X *
X *	Copyright (c) 1995,1996,2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LIBRMT_H
X#define	_SCHILY_LIBRMT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#include <schily/rmtio.h>
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * remote.c
X */
Xextern	void		rmtinit		__PR((int (*errmsgn)
X						(int, const char *, ...),
X						void (*eexit)(int)));
Xextern	int		rmtdebug	__PR((int dlevel));
Xextern	char		*rmtfilename	__PR((char *name));
Xextern	char		*rmthostname	__PR((char *hostname, int hnsize,
X						char *rmtspec));
Xextern	int		rmtgetconn	__PR((char *host, int trsize,
X						int excode));
Xextern	int		rmtopen		__PR((int fd, char *fname, int fmode));
Xextern	int		rmtclose	__PR((int fd));
Xextern	int		rmtread		__PR((int fd, char *buf, int count));
Xextern	int		rmtwrite	__PR((int fd, char *buf, int count));
Xextern	off_t		rmtseek		__PR((int fd, off_t offset,
X						int whence));
Xextern	int		rmtioctl	__PR((int fd, int cmd, int count));
X#ifdef	MTWEOF
Xextern	int		rmtstatus	__PR((int fd, struct mtget *mtp));
X#endif
Xextern	int		rmtxstatus	__PR((int fd, struct rmtget *mtp));
X#ifdef	MTWEOF
Xextern	void		_rmtg2mtg	__PR((struct mtget *mtp,
X						struct rmtget *rmtp));
Xextern	int		_mtg2rmtg	__PR((struct rmtget *rmtp,
X						struct mtget *mtp));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_LIBRMT_H */
END-of-star-1.5.2/include/schily/librmt.h
echo x - star-1.5.2/include/schily/maxpath.h
sed 's/^X//' >star-1.5.2/include/schily/maxpath.h << 'END-of-star-1.5.2/include/schily/maxpath.h'
X/* @(#)maxpath.h	1.12 10/08/27 Copyright 1985, 1995, 1998, 2001-2010 J. Schilling */
X/*
X *	Definitions for dealing with statically limitations on pathnames
X *
X *	Copyright (c) 1985, 1995, 1998, 2001-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MAXPATH_H
X#define	_SCHILY_MAXPATH_H
X
X#ifndef	_SCHILY_DIRENT_H
X#include <schily/dirent.h>		/* Includes mconfig.h if needed	*/
X#endif
X
X#ifdef	JOS
X#ifndef	_SCHILY_JOS_MAXP_H
X#	include <schily/jos_maxp.h>
X#endif
X#	ifndef	FOUND_MAXPATHNAME
X#	define	FOUND_MAXPATHNAME
X#	endif
X#	ifndef	FOUND_MAXFILENAME
X#	define	FOUND_MAXFILENAME
X#	endif
X#endif	/* JOS */
X
X#if !defined(FOUND_MAXPATHNAME) && defined(MAXPATHLEN)
X#	define	MAXPATHNAME	MAXPATHLEN	/* From sys/param.h */
X#	define	FOUND_MAXPATHNAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME) && defined(PATH_MAX)
X#	define	MAXPATHNAME	PATH_MAX	/* From limits.h    */
X#	define	FOUND_MAXPATHNAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME)
X#include <schily/stdlib.h>
X#endif
X#if !defined(FOUND_MAXPATHNAME) && defined(_MAX_PATH)
X#	define	MAXPATHNAME	_MAX_PATH	/* From MS stdlib.h */
X#	define	FOUND_MAXPATHNAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME)
X#	define	MAXPATHNAME	256		/* Is there a limit? */
X#endif
X
X#ifndef	PATH_MAX
X#define	PATH_MAX	MAXPATHNAME
X#endif
X
X
X/*
X * Don't use defaults here to allow recognition of problems.
X */
X#if !defined(FOUND_MAXFILENAME) && defined(MAXNAMELEN)
X#	define	MAXFILENAME	MAXNAMELEN	/* From sys/param.h */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#if !defined(FOUND_MAXFILENAME) && defined(MAXNAMLEN)
X#	define	MAXFILENAME	MAXNAMLEN	/* From dirent.h    */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#ifdef	__never__
X/*
X * DIRSIZ(dp) is a parameterized macro, we cannot use it here.
X */
X#if !defined(FOUND_MAXFILENAME) && defined(DIRSIZ)
X#	define	MAXFILENAME	DIRSIZ		/* From sys/dir.h   */
X#	define	FOUND_MAXFILENAME
X#endif
X#endif	/* __never__ */
X
X#if !defined(FOUND_MAXFILENAME) && defined(NAME_MAX)
X#	define	MAXFILENAME	NAME_MAX	/* From limits.h    */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#if !defined(FOUND_MAXFILENAME) && defined(FOUND_DIRSIZE)
X#	define	MAXFILENAME	DIRSIZE		/* From schily/dirent.h    */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#if !defined(FOUND_MAXPATHNAME)
X#include <schily/stdlib.h>
X#endif
X#if !defined(FOUND_MAXFILENAME) && defined(_MAX_FNAME)
X#	define	MAXFILENAME	_MAX_FNAME	/* From MS stdlib.h */
X#	define	FOUND_MAXFILENAME
X#endif
X
X#ifndef	NAME_MAX
X#define	NAME_MAX	MAXFILENAME
X#endif
X#ifndef	MAXNAMLEN
X#define	MAXNAMLEN	MAXFILENAME
X#endif
X
X#endif	/* _SCHILY_MAXPATH_H */
END-of-star-1.5.2/include/schily/maxpath.h
echo x - star-1.5.2/include/schily/mconfig.h
sed 's/^X//' >star-1.5.2/include/schily/mconfig.h << 'END-of-star-1.5.2/include/schily/mconfig.h'
X/* @(#)mconfig.h	1.68 10/08/27 Copyright 1995-2010 J. Schilling */
X/*
X *	definitions for machine configuration
X *
X *	Copyright (c) 1995-2010 J. Schilling
X *
X *	This file must be included before any other file.
X *	If this file is not included before stdio.h you will not be
X *	able to get LARGEFILE support
X *
X *	Use only cpp instructions.
X *
X *	NOTE: SING: (Schily Is Not Gnu)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_MCONFIG_H
X#define	_SCHILY_MCONFIG_H
X
X/*
X * Tell our users that this is a Schily SING compile environment.
X */
X#define	IS_SCHILY
X
X/*
X * We need to do this before we include xconfig.h
X */
X#ifdef	NO_LARGEFILES
X#undef	USE_LARGEFILES
X#endif
X#ifdef	NO_ACL
X#undef	USE_ACL
X#endif
X
X/*
X * Inside <schily/archdefs.h> we get architecture specific Processor defines
X * fetched from compiler predefinitions only.
X */
X#include <schily/archdefs.h>
X
X/*
X * Inside <schily/xconfig.h> we decide whether to use static or dynamic
X * autoconf stuff.
X */
X#include <schily/xconfig.h>
X
X/*
X * Make sure that neither HAVE_LARGEFILES nor USE_LARGEFILES is defined
X * if the platform does not support large files.
X */
X#ifndef	HAVE_LARGEFILES
X#undef	USE_LARGEFILES
X#endif
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
X/*
X * The NetBSD people want to bother us.
X * They removed the definition for 'unix' and are bleating for every test
X * for #if defined(unix). So we need to check for NetBSD early.
X */
X#ifndef	IS_UNIX
X#	if defined(__NetBSD__)
X#		define	IS_UNIX
X#	endif
X#endif
X
X#ifndef	IS_UNIX
X#	if (defined(unix) || defined(__unix) || defined(__unix__)) && \
X	!defined(__DJGPP__)
X#		define	IS_UNIX
X#	endif
X#endif
X
X#ifdef	__MSDOS__
X#	define	IS_MSDOS
X#endif
X
X#if defined(tos) || defined(__tos)
X#	define	IS_TOS
X#endif
X
X#ifdef	THINK_C
X#	define	IS_MAC
X#endif
X
X#if defined(sun) || defined(__sun) || defined(__sun__)
X#	define	IS_SUN
X#endif
X
X#if defined(__CYGWIN32__) || defined(__CYGWIN__)
X#	define	IS_GCC_WIN32
X#	define	IS_CYGWIN
X
X#if	defined(unix) || defined(_X86)
X#	define	IS_CYGWIN_1
X#endif
X#endif
X
X/* ------------------------------------------------------------------------- */
X/*
X * Some magic that cannot (yet) be figured out with autoconf.
X */
X
X#if defined(sun3) || defined(mc68000) || defined(mc68020)
X#	ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#	endif
X#endif
X#ifdef sparc
X#	ifndef	HAVE_LDSTUB
X#	define	HAVE_LDSTUB
X#	endif
X#	ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#	endif
X#endif
X#if	defined(__i386_) || defined(i386)
X#	ifndef	HAVE_XCHG
X#	define	HAVE_XCHG
X#	endif
X#	ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#	endif
X#endif
X
X/*
X * Use of SCANSTACK is disabled by default
X */
X#ifndef	USE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#else
X/*
X * But ....
X * The tests are much better now, so always give it a chance.
X */
X#ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#endif
X#endif
X
X/*
X * Allow to overwrite the defines in the makefiles by calling
X *
X *	make COPTX=-DFORCE_SCANSTACK
X */
X#ifdef	FORCE_SCANSTACK
X#	undef	NO_SCANSTACK
X#ifndef	HAVE_SCANSTACK
X#	define	HAVE_SCANSTACK
X#endif
X#ifndef	USE_SCANSTACK
X#	define	USE_SCANSTACK
X#endif
X#endif
X
X/*
X * This is the global switch to deactivate stack scanning
X */
X#ifdef	NO_SCANSTACK
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X
X#ifdef	NO_FORK
X#	ifdef	HAVE_FORK
X#	undef	HAVE_FORK
X#	endif
X#	ifdef	HAVE_VFORK
X#	undef	HAVE_VFORK
X#	endif
X#endif
X#ifdef	NO_VFORK
X#	ifdef	HAVE_VFORK
X#	undef	HAVE_VFORK
X#	endif
X#endif
X
X#if	defined(SOL2) || defined(SOL2) || \
X	defined(S5R4) || defined(__S5R4) || defined(SVR4)
X#	ifndef	__SVR4
X#		define	__SVR4
X#	endif
X#endif
X
X#ifdef	__SVR4
X#	ifndef	SVR4
X#		define	SVR4
X#	endif
X#endif
X
X/*
X * SunOS 4.x / SunOS 5.x
X */
X#if defined(IS_SUN)
X#	define	HAVE_GETAV0
X#endif
X
X/*
X * AIX
X */
X#if	defined(_IBMR2) || defined(_AIX)
X#	ifndef	IS_UNIX
X#	define	IS_UNIX		/* ??? really ??? */
X#	endif
X#endif
X
X/*
X * QNX
X */
X#if defined(__QNX__)
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#endif
X
X/*
X * Silicon Graphics	(must be before SVR4)
X */
X#if defined(sgi) || defined(__sgi)
X#	define	__NOT_SVR4__	/* Not a real SVR4 implementation */
X#endif
X
X/*
X * Data General
X */
X#if defined(__DGUX__)
X#ifdef	XXXXXXX
X#	undef	HAVE_MTGET_DSREG
X#	undef	HAVE_MTGET_RESID
X#	undef	HAVE_MTGET_FILENO
X#	undef	HAVE_MTGET_BLKNO
X#endif
X#	define	mt_type		mt_model
X#	define	mt_dsreg	mt_status1
X#	define	mt_erreg	mt_status2
X	/*
X	 * DGUX hides its flock as dg_flock.
X	 */
X#	define	HAVE_FLOCK
X#	define	flock	dg_flock
X	/*
X	 * Use the BSD style wait on DGUX to get the resource usages of child
X	 * processes.
X	 */
X#	define	_BSD_WAIT_FLAVOR
X#endif
X
X/*
X * Apple Rhapsody (This is the name for Mac OS X beta)
X */
X#if defined(__NeXT__) && defined(__TARGET_OSNAME) && __TARGET_OSNAME == rhapsody
X#	define	HAVE_OSDEF /* prevent later definitions to overwrite current */
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#endif
X
X/*
X * NextStep
X */
X#if defined(__NeXT__) && !defined(HAVE_OSDEF)
X#define	NO_PRINT_OVR
X#undef	HAVE_USG_STDIO
X				/*
X				 * NeXT Step 3.x uses
X				 * __flsbuf(unsigned char, FILE *)
X				 * instead of __flsbuf(int, FILE *)
X				 */
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#endif
X
X/*
X * Mac OS X
X */
X#if defined(__APPLE__) && defined(__MACH__)
X#	ifndef	IS_UNIX
X#	define	IS_UNIX
X#	endif
X#	define	IS_MACOS_X
X#endif
X
X/*
X * NextStep 3.x has a broken linker that does not allow us to override
X * these functions.
X */
X#ifndef	__OPRINTF__
X
X#ifdef	NO_PRINT_OVR
X#	define	printf	Xprintf
X#	define	fprintf	Xfprintf
X#	define	sprintf	Xsprintf
X#endif
X
X#endif	/* __OPRINTF__ */
X
X/* ------------------------------------------------------------------------- */
X
X#ifndef	_SCHILY_PROTOTYP_H
X#include <schily/prototyp.h>
X#endif
X
X/*
X * We use HAVE_LONGLONG as generalized test on whether "long long", "__in64" or
X * something similar exist.
X *
X * In case that HAVE_LONGLONG is defined here, this is an indication that
X * "long long" works. We define HAVE_LONG_LONG to keep this knowledge.
X */
X#ifdef	HAVE_LONGLONG
X#	define	HAVE_LONG_LONG
X#endif
X
X/*
X * Microsoft C defines _MSC_VER
X * use __int64 instead of long long and use 0i64 for a signed long long const
X * and 0ui64 for an unsigned long long const.
X *
X * #if defined(HAVE___INT64)
X *	use __int64
X * #elif defined(HAVE_LONGLONG)
X *	use long long
X * #endif
X *
X * Be very careful here as older MSVC versions do not implement long long but
X * rather __int64 and once someone makes 'long long' 128 bits on a 64 bit
X * machine, we may need to check for a MSVC __int128 type.
X */
X#ifndef	HAVE_LONGLONG
X#	if	defined(HAVE___INT64)
X#		define	HAVE_LONGLONG
X#	endif
X#endif
X
X/*
X * gcc 2.x generally implements the "long long" type.
X */
X#ifdef	__GNUC__
X#	if	__GNUC__ > 1
X#		ifndef	HAVE_LONGLONG
X#			define	HAVE_LONGLONG
X#		endif
X#		ifndef	HAVE_LONG_LONG
X#			define	HAVE_LONG_LONG
X#		endif
X#	endif
X#endif
X
X#ifdef	__CHAR_UNSIGNED__	/* GNU GCC define (dynamic)	*/
X#ifndef CHAR_IS_UNSIGNED
X#define	CHAR_IS_UNSIGNED	/* Sing Schily define (static)	*/
X#endif
X#endif
X
X/*
X * Convert to GNU name
X */
X#ifdef	HAVE_STDC_HEADERS
X#	ifndef	STDC_HEADERS
X#		define	STDC_HEADERS
X#	endif
X#endif
X/*
X * Convert to SCHILY name
X */
X#ifdef	STDC_HEADERS
X#	ifndef	HAVE_STDC_HEADERS
X#		define	HAVE_STDC_HEADERS
X#	endif
X#endif
X
X#ifdef	IS_UNIX
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	far
X#	define	near
X#endif
X
X/*
X * Win32 with Gygwin
X */
X#ifdef	IS_GCC_WIN32
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * Win32 with Mingw32
X */
X#ifdef	__MINGW32__
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * OS/2 EMX
X */
X#ifdef	__EMX__				/* We don't want to call it UNIX */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#	define	NEED_O_BINARY
X#endif
X
X#ifdef	__BEOS__			/* We don't want to call it UNIX */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	far
X#	define	near
X#endif
X
X/*
X * DOS with DJGPP
X */
X#ifdef	__DJGPP__			/* We don't want to call it UNIX */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * Vanilla DOS
X */
X#if	defined(IS_MSDOS) && !defined(__DJGPP__)
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'\\'
X#	define	PATH_DELIM_STR		"\\"
X#	define	PATH_ENV_DELIM		';'
X#	define	PATH_ENV_DELIM_STR	";"
X#	define	HAVE_DOS_DRIVELETTER
X
X#	define	NEED_O_BINARY
X#endif
X
X/*
X * ATARI TOS
X */
X#ifdef	IS_TOS
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'\\'
X#	define	PATH_DELIM_STR		"\\"
X#	define	PATH_ENV_DELIM		','
X#	define	PATH_ENV_DELIM_STR	","
X#	define	HAVE_DOS_DRIVELETTER
X#	define	far
X#	define	near
X#endif
X
X/*
X * Mac OS 9
X */
X#ifdef	IS_MAC
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		':'
X#	define	PATH_DELIM_STR		":"
X#	define	PATH_ENV_DELIM		';'	/* ??? */
X#	define	PATH_ENV_DELIM_STR	";"	/* ??? */
X#	define	far
X#	define	near
X#endif
X
X/*
X * I hope this will make compilation on unknown OS easier.
X */
X#ifndef	HAVE_PATH_DELIM			/* Default to POSIX rules */
X#	define	HAVE_PATH_DELIM
X#	define	PATH_DELIM		'/'
X#	define	PATH_DELIM_STR		"/"
X#	define	PATH_ENV_DELIM		':'
X#	define	PATH_ENV_DELIM_STR	":"
X#	define	far
X#	define	near
X#endif
X
X#ifdef	DBG_MALLOC
X/*
X * We need to include this here already in order to make sure that
X * every program that is based on mconfig.h will include schily/dbgmalloc.h
X * in case that we specify -DDBD_MALLOC
X */
X#include <schily/dbgmalloc.h>
X#endif
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif /* _SCHILY_MCONFIG_H */
END-of-star-1.5.2/include/schily/mconfig.h
echo x - star-1.5.2/include/schily/mtio.h
sed 's/^X//' >star-1.5.2/include/schily/mtio.h << 'END-of-star-1.5.2/include/schily/mtio.h'
X/* @(#)mtio.h	1.6 10/08/23 Copyright 1995,2000-2010 J. Schilling */
X/*
X *	Generic header for users of magnetic tape ioctl interface.
X *
X *	If there is no local mtio.h or equivalent, define
X *	simplified mtio definitions here in order
X *	to be able to do at least remote mtio on systems
X *	that have no local mtio
X *
X *	Copyright (c) 1995,2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MTIO_H
X#define	_SCHILY_MTIO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_MTIO_H
X
X#include <sys/mtio.h>
X
X#else	/* ! HAVE_SYS_MTIO_H */
X
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Definitions for magnetic tape io control commands
X */
X
X/*
X * structure for MTIOCTOP - magnetic tape operation command
X */
Xstruct	mtop {
X	short	mt_op;		/* op code (see below)			*/
X	daddr_t	mt_count;	/* repeat count or param		*/
X};
X
X/*
X * op code values for mt_op
X */
X#define	MTWEOF		0	/* write EOF record(s)			*/
X#define	MTFSF		1	/* fwd space over file mark(s)		*/
X#define	MTBSF		2	/* back space over file mark(s) (1/2" only ) */
X#define	MTFSR		3	/* fwd space record(s) (to inter-record gap) */
X#define	MTBSR		4	/* back space record(s) (to inter-record gap) */
X#define	MTREW		5	/* rewind tape				*/
X#define	MTOFFL		6	/* rewind and put the drive offline	*/
X#define	MTNOP		7	/* no operation (sets status ?)		*/
X
X/*
X * structure for MTIOCGET - magnetic tape get status command
X */
Xstruct	mtget {
X	short	mt_type;	/* type of magnetic tape device		*/
X				/* the next two regs are device dependent */
X	short	mt_dsreg;	/* drive status 'register'		*/
X	short	mt_erreg;	/* error 'register'			*/
X	daddr_t	mt_resid;	/* transfer residual count		*/
X	daddr_t	mt_fileno;	/* file # for current position		*/
X	daddr_t	mt_blkno;	/* block # for current position		*/
X};
X
X#define	HAVE_MTGET_TYPE
X#define	HAVE_MTGET_DSREG
X#define	HAVE_MTGET_ERREG
X#define	HAVE_MTGET_RESID
X#define	HAVE_MTGET_FILENO
X#define	HAVE_MTGET_BLKNO
X
X/*
X * Define some junk here as software may assume that these two definitions
X * are always present.
X */
X#define	MTIOCGET	0x12340001
X#define	MTIOCTOP	0x12340002
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* HAVE_SYS_MTIO_H */
X
X#endif /* _SCHILY_MTIO_H */
END-of-star-1.5.2/include/schily/mtio.h
echo x - star-1.5.2/include/schily/signal.h
sed 's/^X//' >star-1.5.2/include/schily/signal.h << 'END-of-star-1.5.2/include/schily/signal.h'
X/* @(#)signal.h	1.8 09/06/30 Copyright 1997-2009 J. Schilling */
X/*
X *	Signal abstraction for signals
X *
X *	Copyright (c) 1997-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SIGNAL_H
X#define	_SCHILY_SIGNAL_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SIGNAL_H
X#ifndef	_INCL_SIGNAL_H
X#include <signal.h>
X#define	_INCL_SIGNAL_H
X#endif
X#endif
X
X#endif	/* _SCHILY_SIGNAL_H */
END-of-star-1.5.2/include/schily/signal.h
echo x - star-1.5.2/include/schily/patmatch.h
sed 's/^X//' >star-1.5.2/include/schily/patmatch.h << 'END-of-star-1.5.2/include/schily/patmatch.h'
X/* @(#)patmatch.h	1.15 10/08/27 Copyright 1985,1993-2010 J. Schilling */
X
X#ifndef	_SCHILY_PATMATCH_H
X#define	_SCHILY_PATMATCH_H
X/*
X *	Definitions for the pattern matching functions.
X *
X *	Copyright (c) 1985,1993-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X/*
X *	The pattern matching functions are based on the algorithm
X *	presented by Martin Richards in:
X *
X *	"A Compact Function for Regular Expression Pattern Matching",
X *	Software-Practice and Experience, Vol. 9, 527-534 (1979)
X *
X *	Several changes have been made to the original source which has been
X *	written in BCPL:
X *
X *	'/'	is replaced by	'!'		(to allow UNIX filenames)
X *	'(',')' are replaced by	'{', '}'
X *	'\''	is replaced by	'\\'		(UNIX compatible quote)
X *
X *	Character classes have been added to allow "[<character list>]"
X *	to be used.
X *	Start of line '^' and end of line '$' have been added.
X *
X *	Any number in the following comment is zero or more occurrencies
X */
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	ALT	'!'	/* Alternation in match i.e. this!that!the_other */
X#define	REP	'#'	/* Any number of occurrences of the following expr */
X#define	NIL	'%'	/* Empty string (exactly nothing) */
X#define	STAR	'*'	/* Any number of any character (equivalent of #?) */
X#define	ANY	'?'	/* Any one character */
X#define	QUOTE	'\\'	/* Quotes the next character */
X#define	LBRACK	'{'	/* Begin of precedence grouping */
X#define	RBRACK	'}'	/* End of precedence grouping */
X#define	LCLASS	'['	/* Begin of character set */
X#define	RCLASS	']'	/* End of character set */
X#define	NOT	'^'	/* If first in set: invert set content */
X#define	RANGE	'-'	/* Range notation in sets */
X#define	START	'^'	/* Begin of a line */
X#define	END	'$'	/* End of a line */
X
X/*
X * A list of case statements that may be used for a issimple() or ispattern()
X * funtion that checks whether a string conrtains characters that need the
X * pattern matcher.
X *
X * Note that this list does not contain NOT or RANGE because you need
X * LCLASS and RCLASS in addition.
X */
X#define	casePAT	case ALT: case REP: case NIL: case STAR: case ANY:	\
X		case QUOTE: case LBRACK: case RBRACK:			\
X		case LCLASS: case RCLASS: case START: case END:
X
X
X#define	MAXPAT	128	/* Max length of pattern for opatmatch()/opatlmatch() */
X
Xextern	int	    patcompile	__PR((const unsigned char *__pat, int __patlen,
X						int *__aux));
X
Xextern	unsigned char *opatmatch	__PR((const unsigned char *__pat,
X						const int *__aux,
X						const  unsigned char *__str,
X						int __soff, int __slen,
X						int __alt));
Xextern	unsigned char *opatlmatch __PR((const unsigned char *__pat,
X						const int *__aux,
X						const  unsigned char *__str,
X						int __soff, int __slen,
X						int __alt));
Xextern	unsigned char *patmatch	__PR((const unsigned char *__pat,
X						const int *__aux,
X						const  unsigned char *__str,
X						int __soff, int __slen,
X						int __alt, int __state[]));
Xextern	unsigned char *patlmatch __PR((const unsigned char *__pat,
X						const int *__aux,
X						const  unsigned char *__str,
X						int __soff, int __slen,
X						int __alt, int __state[]));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#ifdef	_SCHILY_WCHAR_H
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	int	patwcompile	__PR((const wchar_t *__pat, int __patlen,
X						int *__aux));
Xextern	wchar_t	*patwmatch	__PR((const wchar_t *__pat, const int *__aux,
X						const  wchar_t *__str,
X						int __soff, int __slen,
X						int __alt, int __state[]));
Xextern	wchar_t	*patwlmatch	__PR((const wchar_t *__pat, const int *__aux,
X						const  wchar_t *__str,
X						int __soff, int __slen,
X						int __alt, int __state[]));
X
X
X#ifdef	__cplusplus
X}
X#endif
X#endif	/* _SCHILY_WCHAR_H */
X
X#endif	/* _SCHILY_PATMATCH_H */
END-of-star-1.5.2/include/schily/patmatch.h
echo x - star-1.5.2/include/schily/prototyp.h
sed 's/^X//' >star-1.5.2/include/schily/prototyp.h << 'END-of-star-1.5.2/include/schily/prototyp.h'
X/* @(#)prototyp.h	1.15 10/08/24 Copyright 1995-2010 J. Schilling */
X/*
X *	Definitions for dealing with ANSI / KR C-Compilers
X *
X *	Copyright (c) 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X * <schily/mconfig.h> includes <schily/prototype.h>
X * To be correct, we need to include <schily/mconfig.h> before we test
X * for _SCHILY_PROTOTYP_H
X *
X * In order to keep the silly Solaris hdrchk(1) quiet, we are forced to
X * have the _SCHILY_PROTOTYP_H first in <schily/prototype.h>.
X * To keep hdrchk(1) quiet and be correct, we need to introduce a second
X * guard _SCHILY_PROTOTYP_X_H.
X */
X#ifndef	_SCHILY_PROTOTYP_H
X#define	_SCHILY_PROTOTYP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#undef	_SCHILY_PROTOTYP_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_PROTOTYP_X_H
X#define	_SCHILY_PROTOTYP_X_H
X
X#include <schily/ccomdefs.h>
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	PROTOTYPES
X	/*
X	 * If this has already been defined,
X	 * someone else knows better than us...
X	 */
X#	ifdef	__STDC__
X#		if	__STDC__				/* ANSI C */
X#			define	PROTOTYPES
X#		endif
X#		if	defined(sun) && __STDC__ - 0 == 0	/* Sun C */
X#			define	PROTOTYPES
X#		endif
X#	endif
X#endif	/* PROTOTYPES */
X
X#if	!defined(PROTOTYPES) && (defined(__cplusplus) || defined(_MSC_VER))
X	/*
X	 * C++ always supports prototypes.
X	 * Define PROTOTYPES so we are not forced to make
X	 * a separtate autoconf run for C++
X	 *
X	 * Microsoft C has prototypes but does not define __STDC__
X	 */
X#	define	PROTOTYPES
X#endif
X
X/*
X * If we have prototypes, we should have stdlib.h string.h stdarg.h
X */
X#ifdef	PROTOTYPES
X#if	!(defined(SABER) && defined(sun))
X#	ifndef	HAVE_STDARG_H
X#		define	HAVE_STDARG_H
X#	endif
X#endif
X#ifndef	JOS
X#	ifndef	HAVE_STDLIB_H
X#		define	HAVE_STDLIB_H
X#	endif
X#	ifndef	HAVE_STRING_H
X#		define	HAVE_STRING_H
X#	endif
X#	ifndef	HAVE_STDC_HEADERS
X#		define	HAVE_STDC_HEADERS
X#	endif
X#	ifndef	STDC_HEADERS
X#		define	STDC_HEADERS	/* GNU name */
X#	endif
X#endif
X#endif
X
X#ifdef	NO_PROTOTYPES		/* Force not to use prototypes */
X#	undef	PROTOTYPES
X#endif
X
X#ifdef	PROTOTYPES
X#	define	__PR(a)	a
X#else
X#	define	__PR(a)	()
X#endif
X
X#if !defined(PROTOTYPES) && !defined(NO_CONST_DEFINE)
X#	ifndef	const
X#		define	const
X#	endif
X#	ifndef	signed
X#		define	signed
X#	endif
X#	ifndef	volatile
X#		define	volatile
X#	endif
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_PROTOTYP_X_H */
X#endif	/* _SCHILY_PROTOTYP_H */
END-of-star-1.5.2/include/schily/prototyp.h
echo x - star-1.5.2/include/schily/rmtio.h
sed 's/^X//' >star-1.5.2/include/schily/rmtio.h << 'END-of-star-1.5.2/include/schily/rmtio.h'
X/* @(#)rmtio.h	1.7 10/08/24 Copyright 1995,2000-2010 J. Schilling */
X/*
X *	Definition for enhanced remote tape IO
X *
X *	Copyright (c) 1995,2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_RMTIO_H
X#define	_SCHILY_RMTIO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * values for mt_op
X */
X#define	RMTWEOF		0	/* write an end-of-file record */
X#define	RMTFSF		1	/* forward space over file mark */
X#define	RMTBSF		2	/* backward space over file mark (1/2" only ) */
X#define	RMTFSR		3	/* forward space to inter-record gap */
X#define	RMTBSR		4	/* backward space to inter-record gap */
X#define	RMTREW		5	/* rewind */
X#define	RMTOFFL		6	/* rewind and put the drive offline */
X#define	RMTNOP		7	/* no operation, sets status only */
X
X#ifdef	__needed__
X#define	MTRETEN		8	/* retension the tape (cartridge tape only) */
X#define	MTERASE		9	/* erase the entire tape */
X#define	MTEOM		10	/* position to end of media */
X#define	MTNBSF		11	/* backward space file to BOF */
X
X#define	MTSRSZ		12	/* set record size */
X#define	MTGRSZ		13	/* get record size */
X#define	MTLOAD		14	/* for loading a tape (use o_delay to open */
X				/* the tape device) */
X#endif
X
X/*
X * Definitions for the new RMT Protocol version 1
X *
X * The new Protocol version tries to make the use
X * of rmtioctl() more portable between different platforms.
X */
X#define	RMTIVERSION	-1	/* Opcode to request version */
X#define	RMT_NOVERSION	-1	/* Old version code */
X#define	RMT_VERSION	1	/* New (current) version code */
X
X/*
X * Support for commands bejond MTWEOF..MTNOP (0..7)
X */
X#define	RMTICACHE	0	/* enable controller cache */
X#define	RMTINOCACHE	1	/* disable controller cache */
X#define	RMTIRETEN	2	/* retension the tape (cartridge tape only) */
X#define	RMTIERASE	3	/* erase the entire tape */
X#define	RMTIEOM		4	/* position to end of media */
X#define	RMTINBSF	5	/* backward space file to BOF */
X
X/*
X * Old MTIOCGET copies a binary version of struct mtget back
X * over the wire. This is highly non portable.
X * MTS_* retrieves ascii versions (%d format) of a single
X * field in the struct mtget.
X * NOTE: MTS_ERREG may only be valid on the first call and
X *	 must be retrived first.
X */
X#define	MTS_TYPE	'T'		/* mtget.mt_type */
X#define	MTS_DSREG	'D'		/* mtget.mt_dsreg */
X#define	MTS_ERREG	'E'		/* mtget.mt_erreg */
X#define	MTS_RESID	'R'		/* mtget.mt_resid */
X#define	MTS_FILENO	'F'		/* mtget.mt_fileno */
X#define	MTS_BLKNO	'B'		/* mtget.mt_blkno */
X#define	MTS_FLAGS	'f'		/* mtget.mt_flags */
X#define	MTS_BF		'b'		/* mtget.mt_bf */
X
X/*
X * structure for remote MTIOCGET - mag tape get status command
X */
Xstruct rmtget	{
X	Llong		mt_type;	/* type of magtape device	    */
X	/* the following two registers are grossly device dependent	    */
X	Llong		mt_dsreg;	/* ``drive status'' register	    */
X	Int32_t		mt_dsreg1;	/* ``drive status'' register	    */
X	Int32_t		mt_dsreg2;	/* ``drive status'' register	    */
X	Llong		mt_gstat;	/* ``generic status'' register	    */
X	Llong		mt_erreg;	/* ``error'' register		    */
X	/* optional error info.						    */
X	Llong		mt_resid;	/* residual count		    */
X	Llong		mt_fileno;	/* file number of current position  */
X	Llong		mt_blkno;	/* block number of current position */
X	Llong		mt_flags;
X	Llong		mt_gflags;	/* generic flags		    */
X	long		mt_bf;		/* optimum blocking factor	    */
X	int		mt_xflags;	/* eXistence flags for struct members */
X};
X
X/*
X * Values for mt_xflags
X */
X#define	RMT_TYPE		0x0001	/* mt_type/mt_model present	*/
X#define	RMT_DSREG		0x0002	/* mt_dsreg present		*/
X#define	RMT_DSREG1		0x0004	/* mt_dsreg1 present		*/
X#define	RMT_DSREG2		0x0008	/* mt_dsreg2 present		*/
X#define	RMT_GSTAT		0x0010	/* mt_gstat present		*/
X#define	RMT_ERREG		0x0020	/* mt_erreg present		*/
X#define	RMT_RESID		0x0040	/* mt_resid present		*/
X#define	RMT_FILENO		0x0080	/* mt_fileno present		*/
X#define	RMT_BLKNO		0x0100	/* mt_blkno present		*/
X#define	RMT_FLAGS		0x0200	/* mt_flags present		*/
X#define	RMT_BF			0x0400	/* mt_bf present		*/
X#define	RMT_COMPAT		0x0800	/* Created from old compat data	*/
X
X/*
X * values for mt_flags
X */
X#define	RMTF_SCSI		0x01
X#define	RMTF_REEL		0x02
X#define	RMTF_ASF		0x04
X#define	RMTF_TAPE_HEAD_DIRTY	0x08
X#define	RMTF_TAPE_CLN_SUPPORTED	0x10
X
X/*
X * these are recommended
X */
X#ifdef	__needed__
X#define	MT_ISQIC	0x32		/* generic QIC tape drive */
X#define	MT_ISREEL	0x33		/* generic reel tape drive */
X#define	MT_ISDAT	0x34		/* generic DAT tape drive */
X#define	MT_IS8MM	0x35		/* generic 8mm tape drive */
X#define	MT_ISOTHER	0x36		/* generic other type of tape drive */
X
X/* more Sun devices */
X#define	MT_ISTAND25G	0x37		/* sun: SCSI Tandberg 2.5 Gig QIC */
X#define	MT_ISDLT	0x38		/* sun: SCSI DLT tape drive */
X#define	MT_ISSTK9840	0x39		/* sun: STK 9840 (Ironsides) */
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_RMTIO_H */
END-of-star-1.5.2/include/schily/rmtio.h
echo x - star-1.5.2/include/schily/schily.h
sed 's/^X//' >star-1.5.2/include/schily/schily.h << 'END-of-star-1.5.2/include/schily/schily.h'
X/* @(#)schily.h	1.106 12/04/15 Copyright 1985-2012 J. Schilling */
X/*
X *	Definitions for libschily
X *
X *	This file should be included past:
X *
X *	schily/mconfig.h / config.h
X *	schily/standard.h
X *	stdio.h
X *	stdlib.h	(better use schily/stdlib.h)
X *	unistd.h	(better use schily/unistd.h) needed f. LARGEFILE support
X *	schily/string.h
X *	sys/types.h
X *
X *	If you need stdio.h, you must include it before schily/schily.h
X *
X *	NOTE: If you need ctype.h and did not include stdio.h you need to
X *	include ctype.h past schily/schily.h as OpenBSD does not follow POSIX
X *	and defines EOF in ctype.h
X *
X *	Copyright (c) 1985-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SCHILY_H
X#define	_SCHILY_SCHILY_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef _SCHILY_CCOMDEFS_H
X#include <schily/ccomdefs.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(off_t)
X#	ifndef	FOUND_OFF_T
X#	define	FOUND_OFF_T
X#	endif
X#endif
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(size_t)
X#	ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T
X#	endif
X#endif
X#if	defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
X#	undef	FOUND_SIZE_T
X#endif
X
X#ifdef	__never_def__
X/*
X * It turns out that we cannot use the folloginw definition because there are
X * some platforms that do not behave application friendly. These are mainly
X * BSD-4.4 based systems (which #undef a definition when size_t is available.
X * We actually removed this code because of a problem with QNX Neutrino.
X * For this reason, it is important not to include <sys/types.h> directly but
X * via the Schily SING include files so we know whether it has been included
X * before we come here.
X */
X#if	defined(_SIZE_T)	|| defined(_T_SIZE_)	|| defined(_T_SIZE) || \
X	defined(__SIZE_T)	|| defined(_SIZE_T_)	|| \
X	defined(_GCC_SIZE_T)	|| defined(_SIZET_)	|| \
X	defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
X
X#ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T	/* We already included a size_t definition */
X#endif
X#endif
X#endif	/* __never_def__ */
X
X#if	defined(HAVE_LARGEFILES)
X#	define	_fcons		_fcons64
X#	define	fdup		fdup64
X#	define	fileluopen	fileluopen64
X#	define	fileopen	fileopen64
X#	define	filemopen	filemopen64
X#	define	filepos		filepos64
X#	define	filereopen	filereopen64
X#	define	fileseek	fileseek64
X#	define	filesize	filesize64
X#	define	filestat	filestat64
X#	define	_openfd		_openfd64
X#endif
X
X/*
X * The official POSIX rule is not to define "new" interfaces that
X * are in conflict with older interfaces of the same name.
X * Our interfaces fexec*() have been defined and published in 1982.
X * The new POSIX interfaces define a different interface and the
X * new POSIX interfaces even use names that are not compatible with
X * POSIX rules. The new POSIX interfaces in question should be called
X * fdexec*() to follow the rules of other similar POSIX functions.
X * Simiar problems exist with getline()/fgetline().
X */
X#if	defined(HAVE_RAW_FEXECL) || defined(HAVE_RAW_FEXECLE) || \
X	defined(HAVE_RAW_FEXECV) || defined(HAVE_RAW_FEXECVE)
X#define	RENAME_FEXEC
X#endif
X#if	defined(HAVE_RAW_FSPAWNV) || defined(HAVE_RAW_FSPAWNL) || \
X	defined(HAVE_RAW_FSPAWNV_NOWAIT)
X#define	RENAME_FSPAWN
X#endif
X#if	defined(HAVE_RAW_GETLINE) || defined(HAVE_RAW_FGETLINE)
X#define	RENAME_GETLINE
X#endif
X
X#ifdef	__needed__
X#define	RENAME_FEXEC
X#define	RENAME_FSPAWN
X#define	RENAME_GETLINE
X#endif
X
X#if	defined(RENAME_FEXEC) || defined(RENAME_FSPAWN)
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* Need to incl. before fexec*() protoypes */
X#endif
X#endif
X
X#if	defined(RENAME_GETLINE)
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>	/* Need to incl. before *getline() protoypes */
X#endif
X
X#endif
X
X#ifdef	EOF	/* stdio.h has been included */
X
Xextern	int	_cvmod __PR((const char *, int *, int *));
Xextern	FILE	*_fcons __PR((FILE *, int, int));
Xextern	FILE	*fdup __PR((FILE *));
X#if	!defined(fdown) || defined(PROTOTYPES)
X/*
X * We cannot declare fdown() with K&R in case that fdown() has been #define'd
X */
Xextern	int	fdown __PR((FILE *));
X#endif
Xextern	int	js_fexecl __PR((const char *, FILE *, FILE *, FILE *,
X							const char *, ...));
Xextern	int	js_fexecle __PR((const char *, FILE *, FILE *, FILE *,
X							const char *, ...));
X		/* 6th arg not const, fexecv forces av[ac] = NULL */
Xextern	int	js_fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
X							char **));
Xextern	int	js_fexecve __PR((const char *, FILE *, FILE *, FILE *,
X					char * const *, char * const *));
Xextern	int	js_fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
Xextern	int	js_fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
Xextern	int	js_fspawnv_nowait __PR((FILE *, FILE *, FILE *,
X					const char *, int, char *const*));
Xextern	int	js_fgetline __PR((FILE *, char *, int));
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	fgetaline __PR((FILE *, char **, size_t *));
Xextern	ssize_t	getaline __PR((char **, size_t *));
X#endif
Xextern	int	fgetstr __PR((FILE *, char *, int));
Xextern	int	file_getraise __PR((FILE *));
Xextern	void	file_raise __PR((FILE *, int));
Xextern	int	fileclose __PR((FILE *));
Xextern	FILE	*fileluopen __PR((int, const char *));
Xextern	FILE	*fileopen __PR((const char *, const char *));
X#ifdef	_SCHILY_TYPES_H
Xextern	FILE	*filemopen __PR((const char *, const char *, mode_t));
X#endif
X#ifdef	FOUND_OFF_T
Xextern	off_t	filepos __PR((FILE *));
X#endif
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	fileread __PR((FILE *, void *, size_t));
Xextern	ssize_t	ffileread __PR((FILE *, void *, size_t));
X#endif
Xextern	FILE	*filereopen __PR((const char *, const char *, FILE *));
X#ifdef	FOUND_OFF_T
Xextern	int	fileseek __PR((FILE *, off_t));
Xextern	off_t	filesize __PR((FILE *));
X#endif
X#ifdef	S_IFMT
Xextern	int	filestat __PR((FILE *, struct stat *));
X#endif
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	filewrite __PR((FILE *, void *, size_t));
Xextern	ssize_t	ffilewrite __PR((FILE *, void *, size_t));
X#endif
Xextern	int	flush __PR((void));
Xextern	int	fpipe __PR((FILE **));
X#ifdef	__never__
Xextern	int	fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3);
X#endif
Xextern	int	getbroken __PR((FILE *, char *, char, char **, int));
Xextern	int	ofindline __PR((FILE *, char, const char *, int,
X							char **, int));
Xextern	int	peekc __PR((FILE *));
X
X#ifdef	__never_def__
X/*
X * We cannot define this or we may get into problems with DOS based systems.
X */
Xextern	int	spawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
Xextern	int	spawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
Xextern	int	spawnv_nowait __PR((FILE *, FILE *, FILE *,
X					const char *, int, char *const*));
X#endif	/* __never_def__ */
X#endif	/* EOF */
X
X#ifdef	FOUND_SIZE_T
Xextern	char	*abspath __PR((const char *relp, char *absp, size_t asize));
Xextern	char	*absnpath __PR((const char *relp, char *absp, size_t asize));
X#ifndef	HAVE_RESOLVEPATH
Xextern	int	resolvepath __PR((const char *__path, char *__buf, size_t __bufsiz));
X#endif
Xextern	int	resolvenpath __PR((const char *__path, char *__buf, size_t __bufsiz));
X#endif
X
X#ifdef	_SCHILY_TYPES_H
Xextern	int	mkdirs __PR((char *, mode_t));
Xextern	int	makedirs __PR((char *, mode_t, int __striplast));
X#endif
X
Xextern	int	lxchdir	__PR((char *));
X#ifdef	HAVE_FCHDIR
X#define	fdsetname(fd, name)	(0)
X#define	fdclosename(fd)		(0)
X#else
Xextern	int	fdsetname __PR((int fd, const char *name));
Xextern	int	fdclosename __PR((int fd));
X#endif
Xextern	int	diropen __PR((const char *));
Xextern	int	dirrdopen __PR((const char *));
Xextern	int	dirclose __PR((int));
X
Xstruct save_wd {
X	int	fd;
X	char	*name;
X};
X
Xextern int	savewd	__PR((struct save_wd *sp));
Xextern void	closewd	__PR((struct save_wd *sp));
Xextern int	restorewd __PR((struct save_wd *sp));
X
X
X#ifdef	_SCHILY_UTYPES_H
Xtypedef struct gnmult {
X	char	key;
X	Llong	mult;
X} gnmult_t;
X
Xextern	int	getllnum __PR((char *arg, Llong *lvalp));
Xextern	int	getxnum	 __PR((char *arg, long *valp, gnmult_t *mult));
Xextern	int	getllxnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
X
Xextern	int	getlltnum  __PR((char *arg, Llong *lvalp));
Xextern	int	getxtnum  __PR((char *arg, time_t *valp, gnmult_t *mult));
Xextern	int	getllxtnum __PR((char *arg, Llong *lvalp, gnmult_t *mult));
X#endif
Xextern	int	getnum	__PR((char *arg, long *valp));
X#ifdef	_SCHILY_TIME_H
Xextern	int	gettnum	__PR((char *arg, time_t *valp));
X#endif
X
X#ifdef	_SCHILY_TIME_H
X#ifdef	_SCHILY_UTYPES_H
Xextern	Llong		mklgmtime	__PR((struct tm *));
X#endif
Xextern	time_t		mkgmtime	__PR((struct tm *));
X#endif
X
X
X#ifdef	EOF			/* stdio.h has been included */
X#ifdef	_SCHILY_TYPES_H
X/*
X * getperm() flags:
X */
X#define	GP_NOX		0	/* This is not a dir and 'X' is not valid */
X#define	GP_DOX		1	/* 'X' perm character is valid		  */
X#define	GP_XERR		2	/* 'X' perm characters are invalid	  */
X#define	GP_FPERM	4	/* TRUE if we implement find -perm	  */
X#define	GP_UMASK	8	/* TRUE if we implement umask		  */
X
Xextern	int	getperm	__PR((FILE *f, char *perm, char *opname, \
X				mode_t *modep, int smode, int flag));
Xextern	void	permtostr	__PR((mode_t mode, char *));
X#endif
X#endif
X
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	_niread __PR((int, void *, size_t));
Xextern	ssize_t	_niwrite __PR((int, void *, size_t));
Xextern	ssize_t	_nixread __PR((int, void *, size_t));
Xextern	ssize_t	_nixwrite __PR((int, void *, size_t));
X#endif
Xextern	int	_openfd __PR((const char *, int));
Xextern	int	on_comerr __PR((void (*fun)(int, void *), void *arg));
X/*PRINTFLIKE1*/
Xextern	void	comerr __PR((const char *, ...)) __printflike__(1, 2);
X/*PRINTFLIKE2*/
Xextern	void	comerrno __PR((int, const char *, ...)) __printflike__(2, 3);
X/*PRINTFLIKE1*/
Xextern	int	errmsg __PR((const char *, ...)) __printflike__(1, 2);
X/*PRINTFLIKE2*/
Xextern	int	errmsgno __PR((int, const char *, ...)) __printflike__(2, 3);
X#ifdef	FOUND_SIZE_T
X/*PRINTFLIKE3*/
Xextern	int	serrmsg __PR((char *, size_t, const char *, ...))
X					__printflike__(3, 4);
X/*PRINTFLIKE4*/
Xextern	int	serrmsgno __PR((int, char *, size_t, const char *, ...))
X					__printflike__(4, 5);
X#endif
Xextern	void	comexit	__PR((int));
Xextern	char	*errmsgstr __PR((int));
X
X#ifdef	EOF	/* stdio.h has been included */
X/*PRINTFLIKE2*/
Xextern	void	fcomerr		__PR((FILE *, const char *, ...))
X					__printflike__(2, 3);
X/*PRINTFLIKE3*/
Xextern	void	fcomerrno	__PR((FILE *, int, const char *, ...))
X					__printflike__(3, 4);
X/*PRINTFLIKE2*/
Xextern	int	ferrmsg		__PR((FILE *, const char *, ...))
X					__printflike__(2, 3);
X/*PRINTFLIKE3*/
Xextern	int	ferrmsgno	__PR((FILE *, int, const char *, ...))
X					__printflike__(3, 4);
X#ifdef	_SCHILY_VARARGS_H
X/*PRINTFLIKE4*/
Xextern	int	_comerr		__PR((FILE *, int, int, const char *, va_list));
X#endif
X#endif
X
X/*PRINTFLIKE1*/
Xextern	int	error __PR((const char *, ...)) __printflike__(1, 2);
X#ifdef	FOUND_SIZE_T
Xextern	char	*fillbytes __PR((void *, ssize_t, char));
Xextern	char	*zerobytes __PR((void *, ssize_t));
Xextern	char	*findbytes __PR((const void *, ssize_t, char));
X#endif
Xextern	char	*findinpath __PR((char *__name, int __mode,
X					BOOL __plain_file, char *__path));
Xextern	int	findline __PR((const char *, char, const char *,
X							int, char **, int));
Xextern	int	js_getline __PR((char *, int));
Xextern	int	getstr __PR((char *, int));
Xextern	int	breakline __PR((char *, char, char **, int));
Xextern	int	getallargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getargs __PR((int *, char * const**, const char *, ...));
Xextern	int	getfiles __PR((int *, char * const**, const char *));
Xextern	char	*astoi __PR((const char *, int *));
Xextern	char	*astol __PR((const char *, long *));
Xextern	char	*astolb __PR((const char *, long *, int base));
X#ifdef	_SCHILY_UTYPES_H
Xextern	char	*astoll __PR((const char *, Llong *));
Xextern	char	*astollb __PR((const char *, Llong *, int));
Xextern	char	*astoull __PR((const char *, Ullong *));
Xextern	char	*astoullb __PR((const char *, Ullong *, int));
X#endif
X
Xextern	int		patcompile __PR((const unsigned char *, int, int *));
Xextern	unsigned char	*patmatch __PR((const unsigned char *, const int *,
X					const unsigned char *,
X					int, int, int, int[]));
Xextern	unsigned char	*patlmatch __PR((const unsigned char *, const int *,
X					const unsigned char *,
X					int, int, int, int[]));
X
X#ifdef	__never__
Xextern	int	printf __PR((const char *, ...)) __printflike__(1, 2);
X#endif
X#ifdef	FOUND_SIZE_T
Xextern	char	*movebytes __PR((const void *, void *, ssize_t));
X#endif
X
Xextern	void	save_args __PR((int, char **));
Xextern	int	saved_ac __PR((void));
Xextern	char	**saved_av __PR((void));
Xextern	char	*saved_av0 __PR((void));
Xextern	char	*searchfileinpath __PR((char *__name, int __mode,
X					int __file_mode, char *__path));
X#define	SIP_ANY_FILE	0x00
X#define	SIP_PLAIN_FILE	0x01
X#define	SIP_NO_PATH	0x10
X#define	SIP_TYPE_MASK	0x0F
X
X#ifndef	seterrno
Xextern	int	seterrno __PR((int));
X#endif
Xextern	void	set_progname __PR((const char *));
Xextern	char	*get_progname __PR((void));
Xextern	char	*get_progpath __PR((void));
Xextern	char	*getexecpath __PR((void));
X
Xextern	void	setfp __PR((void * const *));
Xextern	int	wait_chld __PR((int));		/* for fspawnv_nowait() */
Xextern	int	geterrno __PR((void));
Xextern	void	raisecond __PR((const char *, long));
X#ifdef	FOUND_SIZE_T
X/*
X * We currently cannot define this here because there IXIX has a definition
X * than violates the standard.
X */
X#ifndef	HAVE_SNPRINTF
X/*PRINTFLIKE3*/
Xextern	int	snprintf __PR((char *, size_t, const char *, ...))
X					__printflike__(3, 4);
X#endif
X#endif
X#ifdef	__never__
X/*
X * sprintf() may be declared incorrectly somewhere else
X * e.g. in old BSD include files
X */
Xextern	int	sprintf __PR((char *, const char *, ...));
X#endif
Xextern	char	*strcatl __PR((char *, ...));
Xextern	int	streql __PR((const char *, const char *));
X#ifdef	_SCHILY_WCHAR_H
Xextern	wchar_t	*wcscatl __PR((wchar_t *, ...));
Xextern	int	wcseql __PR((const wchar_t *, const wchar_t *));
X#endif
X#ifdef	va_arg
Xextern	int	format __PR((void (*)(char, long), long, const char *,
X							va_list));
X#else
Xextern	int	format __PR((void (*)(char, long), long, const char *, void *));
X#endif
X
Xextern	int	ftoes __PR((char *, double, int, int));
Xextern	int	ftofs __PR((char *, double, int, int));
X#ifdef	HAVE_LONGDOUBLE
Xextern	int	qftoes __PR((char *, long double, int, int));
Xextern	int	qftofs __PR((char *, long double, int, int));
X#endif
X
X#ifdef	EOF	/* stdio.h has been included */
X/*PRINTFLIKE2*/
Xextern	int	js_fprintf	__PR((FILE *, const char *, ...))
X							__printflike__(2, 3);
X#endif	/* EOF */
X/*PRINTFLIKE1*/
Xextern	int	js_printf	__PR((const char *, ...)) __printflike__(1, 2);
X#ifdef	FOUND_SIZE_T
X/*PRINTFLIKE3*/
Xextern	int	js_snprintf	__PR((char *, size_t, const char *, ...))
X							__printflike__(3, 4);
X#endif
X/*PRINTFLIKE2*/
Xextern	int	js_sprintf	__PR((char *, const char *, ...))
X							__printflike__(2, 3);
X
X#ifdef	FOUND_SIZE_T
Xextern	void	swabbytes	__PR((void *, ssize_t));
X#endif
Xextern	char	**getmainfp	__PR((void));
Xextern	char	**getavp	__PR((void));
Xextern	char	*getav0		__PR((void));
Xextern	void	**getfp		__PR((void));
Xextern	int	flush_reg_windows __PR((int));
X#ifdef	FOUND_SIZE_T
Xextern	ssize_t	cmpbytes	__PR((const void *, const void *, ssize_t));
Xextern	int	cmpmbytes	__PR((const void *, const void *, ssize_t));
Xextern	ssize_t	cmpnullbytes	__PR((const void *, ssize_t));
X#endif
X
X#ifdef	nonono
X#if	defined(HAVE_LARGEFILES)
X/*
X * To allow this, we need to figure out how to do autoconfiguration for off64_t
X */
Xextern	FILE	*_fcons64	__PR((FILE *, int, int));
Xextern	FILE	*fdup64		__PR((FILE *));
Xextern	FILE	*fileluopen64	__PR((int, const char *));
Xextern	FILE	*fileopen64	__PR((const char *, const char *));
X#ifdef	FOUND_OFF_T
Xextern	off64_t	filepos64	__PR((FILE *));
X#endif
Xextern	FILE	*filereopen64	__PR((const char *, const char *, FILE *));
X#ifdef	FOUND_OFF_T
Xextern	int	fileseek64	__PR((FILE *, off64_t));
Xextern	off64_t	filesize64	__PR((FILE *));
X#endif
X#ifdef	S_IFMT
Xextern	int	filestat64	__PR((FILE *, struct stat *));
X#endif
Xextern	int	_openfd64	__PR((const char *, int));
X#endif
X#endif
X
X#ifndef	NO_SCHILY_PRINT		/* Define to disable *printf() redirects */
X#ifdef	SCHILY_PRINT
X#undef	fprintf
X#define	fprintf		js_fprintf
X#undef	printf
X#define	printf		js_printf
X#undef	snprintf
X#define	snprintf	js_snprintf
X#undef	sprintf
X#define	sprintf		js_sprintf
X#else
X#ifndef	HAVE_SNPRINTF
X#undef	snprintf
X#define	snprintf	js_snprintf
X#endif
X#endif
X#endif
X
X#ifndef	NO_SCHILY_GETLINE	/* Define to disable *getline() redirect */
X#undef	getline
X#define	getline		js_getline
X#undef	fgetline
X#define	fgetline	js_fgetline
X#endif
X
X#ifndef	NO_SCHILY_FEXEC		/* Define to disable fexec*() redirect */
X#undef	fexecl
X#define	fexecl		js_fexecl
X#undef	fexecle
X#define	fexecle		js_fexecle
X#undef	fexecv
X#define	fexecv		js_fexecv
X#undef	fexecve
X#define	fexecve		js_fexecve
X#endif
X
X#ifndef	NO_SCHILY_FSPAWN	/* Define to disable fspawn*() redirect */
X#undef	fspawnv
X#define	fspawnv		js_fspawnv
X#undef	fspawnv_nowait
X#define	fspawnv_nowait	js_fspawnv_nowait
X#undef	fspawnl
X#define	fspawnl		js_fspawnl
X#endif
X
X#ifdef	FOUND_SIZE_T
Xextern	void	*js_malloc	__PR((size_t size, char *msg));
Xextern	void	*js_realloc	__PR((void *ptr, size_t size, char *msg));
X#endif
Xextern	char	*js_savestr	__PR((const char *s));
X
X#ifdef	_SCHILY_JMPDEFS_H
X
X/*
X * Special values for the "jmp" parameter.
X *
X * Control how the siglongjmp() should be handled:
X */
X#define	JM_EXIT		((sigjmps_t *)-1) /* Call comexit(errno) instead */
X#define	JM_RETURN	((sigjmps_t *)0)  /* Return instead		 */
X
X#ifdef	FOUND_SIZE_T
Xextern	void	*js_jmalloc	__PR((size_t size, char *msg, sigjmps_t *jmp));
Xextern	void	*js_jrealloc	__PR((void *ptr, size_t size, char *msg,
X							sigjmps_t *jmp));
X#endif
Xextern	char	*js_jsavestr	__PR((const char *s, sigjmps_t *jmp));
X
X#ifdef	EOF	/* stdio.h has been included */
X#ifdef	FOUND_SIZE_T
Xextern	void	*js_fjmalloc	__PR((FILE *f, size_t size, char *msg,
X						sigjmps_t *jmp));
Xextern	void	*js_fjrealloc	__PR((FILE *f, void *ptr, size_t size,
X						char *msg, sigjmps_t *jmp));
X#endif
Xextern	char	*js_fjsavestr	__PR((FILE *f, const char *s, sigjmps_t *jmp));
X#endif	/* EOF */
X#endif	/* _SCHILY_JMPDEFS_H */
X
X#define	___malloc	js_malloc
X#define	___realloc	js_realloc
X#define	___savestr	js_savestr
X#define	__jmalloc	js_jmalloc
X#define	__jrealloc	js_jrealloc
X#define	__jsavestr	js_jsavestr
X#define	__fjmalloc	js_fjmalloc
X#define	__fjrealloc	js_fjrealloc
X#define	__fjsavestr	js_fjsavestr
X
X#ifdef	__cplusplus
X}
X#endif
X
X#if defined(_JOS) || defined(JOS)
X#	ifndef	_SCHILY_JOS_IO_H
X#	include <schily/jos_io.h>
X#	endif
X#endif
X
X#if !defined(_SCHILY_LIBPORT_H) && !defined(NO_LIBPORT_H)
X#include <schily/libport.h>
X#endif
X#if !defined(_SCHILY_HOSTNAME_H) && defined(USE_HOSTNAME_H)
X#include <schily/hostname.h>
X#endif
X
X#endif	/* _SCHILY_SCHILY_H */
END-of-star-1.5.2/include/schily/schily.h
echo x - star-1.5.2/include/schily/sigblk.h
sed 's/^X//' >star-1.5.2/include/schily/sigblk.h << 'END-of-star-1.5.2/include/schily/sigblk.h'
X/* @(#)sigblk.h	1.12 08/12/24 Copyright 1985, 1995-2008 J. Schilling */
X/*
X *	software signal block definition
X *
X *	Copyright (c) 1985, 1995-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SIGBLK_H
X#define	_SCHILY_SIGBLK_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef struct sigblk {
X	long		**sb_savfp;	/* Real saved framepointer	*/
X	struct sigblk	*sb_signext;	/* Next sw signal blk for this func */
X	short		sb_siglen;	/* Strlen for sb_signame	*/
X	const char	*sb_signame;	/* Name of software signal	*/
X
X					/* sb_sigfun: function to call	*/
X	int		(*sb_sigfun)	__PR((const char *, long, long));
X
X	long		sb_sigarg;	/* Second arg for sb_sigfun	*/
X} SIGBLK;
X
X/*
X * The handler function is called with three arguments:
X *
X *	1)	The name of the software signal
X *	2)	The argument from the handlecond() call
X *	3)	The argument from the raisecond() call
X */
Xtypedef	int	(*handlefunc_t)		__PR((const char *, long, long));
X
Xextern	void	handlecond		__PR((const char *, SIGBLK *,
X					    int(*)(const char *, long, long),
X									long));
Xextern	void	raisecond		__PR((const char *, long));
Xextern	void	starthandlecond		__PR((SIGBLK *));
Xextern	void	unhandlecond		__PR((SIGBLK *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_SIGBLK_H */
END-of-star-1.5.2/include/schily/sigblk.h
echo x - star-1.5.2/include/schily/stat.h
sed 's/^X//' >star-1.5.2/include/schily/stat.h << 'END-of-star-1.5.2/include/schily/stat.h'
X/* @(#)stat.h	1.16 11/07/18 Copyright 1998-2011 J. Schilling */
X/*
X *	Definitions for stat() file mode
X *
X *	Copyright (c) 1998-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_STAT_H
X#define	_SCHILY_STAT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>	/* Needed for sys/stat.h		*/
X#endif
X#ifndef	_INCL_SYS_STAT_H
X#include <sys/stat.h>		/* For S_IS* and S_IF*			*/
X#define	_INCL_SYS_STAT_H
X#endif
X
X/*
X * Apollo Domain/OS has a broken sys/stat.h that defines
X * S_IFIFO == S_IFSOCK and creates trouble if the constants
X * are used as case labels.
X */
X#if S_IFIFO == S_IFSOCK
X#	undef	S_IFSOCK
X#endif
X
X#ifdef	STAT_MACROS_BROKEN
X#undef	S_ISFIFO			/* Named pipe		*/
X#undef	S_ISCHR				/* Character special	*/
X#undef	S_ISMPC				/* UNUSED multiplexed c	*/
X#undef	S_ISDIR				/* Directory		*/
X#undef	S_ISNAM				/* Named file (XENIX)	*/
X#undef	S_ISBLK				/* Block special	*/
X#undef	S_ISMPB				/* UNUSED multiplexed b	*/
X#undef	S_ISREG				/* Regular file		*/
X#undef	S_ISCNT				/* Contiguous file	*/
X#undef	S_ISLNK				/* Symbolic link	*/
X#undef	S_ISSHAD			/* Solaris shadow inode	*/
X#undef	S_ISSOCK			/* UNIX domain socket	*/
X#undef	S_ISDOOR			/* Solaris DOOR		*/
X#undef	S_ISPORT			/* Solaris event port	*/
X#undef	S_ISWHT				/* BSD whiteout		*/
X#undef	S_ISEVC				/* UNOS eventcount	*/
X#endif
X
X#ifndef	S_ISFIFO			/* 1 Named pipe		*/
X#	ifdef	S_IFIFO
X#		define	S_ISFIFO(m)	(((m) & S_IFMT) == S_IFIFO)
X#	else
X#		define	S_ISFIFO(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISCHR				/* 2 Character special	*/
X#	ifdef	S_IFCHR
X#		define	S_ISCHR(m)	(((m) & S_IFMT) == S_IFCHR)
X#	else
X#		define	S_ISCHR(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISMPC				/* 3 UNUSED multiplexed char	*/
X#	ifdef	S_IFMPC
X#		define	S_ISMPC(m)	(((m) & S_IFMT) == S_IFMPC)
X#	else
X#		define	S_ISMPC(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISDIR				/* 4 Directory			*/
X#	ifdef	S_IFDIR
X#		define	S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
X#	else
X#		define	S_ISDIR(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISNAM				/* 5 Named file (XENIX)		*/
X#	ifdef	S_IFNAM
X#		define	S_ISNAM(m)	(((m) & S_IFMT) == S_IFNAM)
X#	else
X#		define	S_ISNAM(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISBLK				/* 6 Block special		*/
X#	ifdef	S_IFBLK
X#		define	S_ISBLK(m)	(((m) & S_IFMT) == S_IFBLK)
X#	else
X#		define	S_ISBLK(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISMPB				/* 7 UNUSED multiplexed block	*/
X#	ifdef	S_IFMPB
X#		define	S_ISMPB(m)	(((m) & S_IFMT) == S_IFMPB)
X#	else
X#		define	S_ISMPB(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISREG				/* 8 Regular file		*/
X#	ifdef	S_IFREG
X#		define	S_ISREG(m)	(((m) & S_IFMT) == S_IFREG)
X#	else
X#		define	S_ISREG(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISCNT				/* 9 Contiguous file		*/
X#	ifdef	S_IFCNT
X#		define	S_ISCNT(m)	(((m) & S_IFMT) == S_IFCNT)
X#	else
X#		define	S_ISCNT(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISLNK				/* 10 Symbolic link		*/
X#	ifdef	S_IFLNK
X#		define	S_ISLNK(m)	(((m) & S_IFMT) == S_IFLNK)
X#	else
X#		define	S_ISLNK(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISSHAD			/* 11 Solaris shadow inode	*/
X#	ifdef	S_IFSHAD
X#		define	S_ISSHAD(m)	(((m) & S_IFMT) == S_IFSHAD)
X#	else
X#		define	S_ISSHAD(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISSOCK			/* 12 UNIX domain socket	*/
X#	ifdef	S_IFSOCK
X#		define	S_ISSOCK(m)	(((m) & S_IFMT) == S_IFSOCK)
X#	else
X#		define	S_ISSOCK(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISDOOR			/* 13 Solaris DOOR		*/
X#	ifdef	S_IFDOOR
X#		define	S_ISDOOR(m)	(((m) & S_IFMT) == S_IFDOOR)
X#	else
X#		define	S_ISDOOR(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISPORT			/* 14 Solaris event port	*/
X#	ifdef	S_IFPORT
X#		define	S_ISPORT(m)	(((m) & S_IFMT) == S_IFPORT)
X#	else
X#		define	S_ISPORT(m)	(0)
X#	endif
X#endif
X#ifndef	S_ISWHT				/* 14 BSD whiteout		*/
X#	ifdef	S_IFWHT
X#		define	S_ISWHT(m)	(((m) & S_IFMT) == S_ISWHT)
X#	else
X#		define	S_ISWHT(m)	(0)
X#	endif
X#endif
X#ifndef	S_IFEVC				/* 15 UNOS eventcount		*/
X#	ifdef	S_IFEVC
X#		define	S_ISEVC(m)	(((m) & S_IFMT) == S_IFEVC)
X#	else
X#		define	S_ISEVC(m)	(0)
X#	endif
X#endif
X
X#ifndef	S_TYPEISMQ
X/*
X * XXX ??? where is a definition of a message queue ???
X */
X#		define	S_TYPEISMQ(_stbuf)	(0)
X#endif
X#ifndef	S_TYPEISSEM
X#	ifdef	S_INSEM
X#		define	S_TYPEISSEM(_stbuf)	(S_ISNAM((_stbuf)->st_mode) && \
X						(_stbuf)->st_rdev == S_INSEM)
X#	else
X#		define	S_TYPEISSEM(_stbuf)	(0)
X#	endif
X#endif
X#ifndef	S_TYPEISSHM
X#	ifdef	S_INSHD
X#		define	S_TYPEISSHM(_stbuf)	(S_ISNAM((_stbuf)->st_mode) && \
X						(_stbuf)->st_rdev == S_INSHD)
X#	else
X#		define	S_TYPEISSHM(_stbuf)	(0)
X#	endif
X#endif
X
X/*
X * Mode permission bits.
X * UNIX V.7 has only	S_ISUID/S_ISGID/S_ISVTX and S_IREAD/S_IWRITE/S_IEXEC
X *
X * S_ISUID/S_ISGID/S_ISVTX is available on UNIX V.7 and POSIX
X */
X#ifndef	S_ISUID			/* Set-user-ID on execution */
X#define	S_ISUID	0		/* If it is not defined, it is not supported */
X#endif
X#ifndef	S_ISGID			/* Set-group-ID on execution */
X#define	S_ISGID	0		/* If it is not defined, it is not supported */
X#endif
X#ifndef	S_ISVTX			/* On directories, restricted deletion flag */
X#define	S_ISVTX	0		/* If it is not defined, it is not supported */
X#endif
X
X/*
X * S_IREAD/S_IWRITE/S_IEXEC is only available on UNIX V.7 but not on POSIX
X * Emulate these definitions to support compilation of programs like
X * SCCS and the Bourne Shell and to make the other definitions simpler.
X */
X#ifndef	S_IREAD
X#ifdef	S_IRUSR
X#define	S_IREAD		S_IRUSR	/* Use POSIX name */
X#else
X#define	S_IREAD		0400	/* Very old UNIX, use own definition */
X#endif
X#endif
X#ifndef	S_IWRITE
X#ifdef	S_IWUSR
X#define	S_IWRITE	S_IWUSR	/* Use POSIX name */
X#else
X#define	S_IWRITE	0200	/* Very old UNIX, use own definition */
X#endif
X#endif
X#ifndef	S_IEXEC
X#ifdef	S_IXUSR
X#define	S_IEXEC		S_IXUSR	/* Use POSIX name */
X#else
X#define	S_IEXEC		0100	/* Very old UNIX, use own definition */
X#endif
X#endif
X
X#ifndef	S_IRUSR			/* Read permission, owner */
X#define	S_IRUSR	S_IREAD		/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IWUSR			/* Write permission, owner */
X#define	S_IWUSR	S_IWRITE	/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IXUSR			/* Execute/search permission, owner */
X#define	S_IXUSR	S_IEXEC		/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IRGRP			/* Read permission, group */
X#define	S_IRGRP	(S_IREAD >> 3)	/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IWGRP			/* Write permission, group */
X#define	S_IWGRP	(S_IWRITE >> 3)	/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IXGRP			/* Execute/search permission, group */
X#define	S_IXGRP	(S_IEXEC >> 3)	/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IROTH			/* Read permission, others */
X#define	S_IROTH	(S_IREAD >> 6)	/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IWOTH			/* Write permission, others */
X#define	S_IWOTH	(S_IWRITE >> 6)	/* Needed on old UNIX systems */
X#endif
X#ifndef	S_IXOTH			/* Execute/search permission, others */
X#define	S_IXOTH	(S_IEXEC >> 6)	/* Needed on old UNIX systems */
X#endif
X
X#ifndef	S_IRWXU			/* Read, write, execute/search by owner */
X#define	S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR)
X#endif
X#ifndef	S_IRWXG			/* Read, write, execute/search by group */
X#define	S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP)
X#endif
X#ifndef	S_IRWXO			/* Read, write, execute/search by others */
X#define	S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
X#endif
X
X/*
X * SCO UnixWare has st_atim.st__tim.tv_nsec but the st_atim.tv_nsec tests also
X * succeeds. If we use st_atim.tv_nsec on UnixWare, we get a warning about
X * illegal structure usage. For this reason, our code needs to have
X * #ifdef HAVE_ST__TIM before #ifdef HAVE_ST_NSEC.
X */
X#if	defined(HAVE_ST_ATIMENSEC)
X
X#define	stat_ansecs(s)		((s)->st_atimensec)
X#define	stat_mnsecs(s)		((s)->st_mtimensec)
X#define	stat_cnsecs(s)		((s)->st_ctimensec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST_ATIME_N)
X
X#define	stat_ansecs(s)		((s)->st_atime_n)
X#define	stat_mnsecs(s)		((s)->st_mtime_n)
X#define	stat_cnsecs(s)		((s)->st_ctime_n)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST__TIM) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_atim.st__tim.tv_nsec)
X#define	stat_mnsecs(s)		((s)->st_mtim.st__tim.tv_nsec)
X#define	stat_cnsecs(s)		((s)->st_ctim.st__tim.tv_nsec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST_NSEC) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_atim.tv_nsec)
X#define	stat_mnsecs(s)		((s)->st_mtim.tv_nsec)
X#define	stat_cnsecs(s)		((s)->st_ctim.tv_nsec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	defined(HAVE_ST_ATIMESPEC) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_atimespec.tv_nsec)
X#define	stat_mnsecs(s)		((s)->st_mtimespec.tv_nsec)
X#define	stat_cnsecs(s)		((s)->st_ctimespec.tv_nsec)
X
X#define	_FOUND_STAT_NSECS_
X#endif
X
X/*
X * st_spare1 is last as some implementations keep backwards
X * compatibility although there is one of the nsec implementations.
X */
X#if	defined(HAVE_ST_SPARE1) && !defined(_FOUND_STAT_NSECS_)
X
X#define	stat_ansecs(s)		((s)->st_spare1 * 1000)
X#define	stat_mnsecs(s)		((s)->st_spare2 * 1000)
X#define	stat_cnsecs(s)		((s)->st_spare3 * 1000)
X
X#define	_FOUND_STAT_USECS_
X#define	_FOUND_STAT_NSECS_
X#endif
X
X#if	!defined(_FOUND_STAT_NSECS_)
X#define	stat_ansecs(s)		(0)
X#define	stat_mnsecs(s)		(0)
X#define	stat_cnsecs(s)		(0)
X#endif
X
X#endif	/* _SCHILY_STAT_H */
END-of-star-1.5.2/include/schily/stat.h
echo x - star-1.5.2/include/schily/time.h
sed 's/^X//' >star-1.5.2/include/schily/time.h << 'END-of-star-1.5.2/include/schily/time.h'
X/* @(#)time.h	1.18 07/04/25 Copyright 1996-2007 J. Schilling */
X/*
X *	Generic header for users of time(), gettimeofday() ...
X *
X *	It includes definitions for time_t, struct timeval, ...
X *
X *	Copyright (c) 1996-2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_TIME_H
X#define	_SCHILY_TIME_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>	/* Needed for time_t		*/
X#endif
X
X#ifdef	TIME_WITH_SYS_TIME
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#else
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#endif
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifdef	timerclear
X/*
X * With MSVC timerclear / struct timeval present in case that
X * winsock2.h has been included before.
X */
X#undef	HAVE_STRUCT_TIMEVAL
X#define	HAVE_STRUCT_TIMEVAL	1
X#endif
X
X#ifndef	HAVE_STRUCT_TIMEVAL
X
Xstruct timeval {
X	long	tv_sec;
X	long	tv_usec;
X};
X#endif
X
X#ifndef	HAVE_STRUCT_TIMEZONE
X
Xstruct timezone {
X	int	tz_minuteswest;
X	int	tz_dsttime;
X};
X#endif
X
X#undef	timerclear
X#define	timerclear(tvp)		(tvp)->tv_sec = (tvp)->tv_usec = 0
X
X#undef	timerfix
X#define	timerfix1(tvp)		while ((tvp)->tv_usec < 0) {		\
X					(tvp)->tv_sec--;		\
X					(tvp)->tv_usec += 1000000;	\
X				}
X
X#define	timerfix2(tvp)		while ((tvp)->tv_usec > 1000000) {	\
X					(tvp)->tv_sec++;		\
X					(tvp)->tv_usec -= 1000000;	\
X				}
X
X#define	timerfix(tvp)		do { timerfix1(tvp); timerfix2(tvp); } while (0)
X
X/*
X * timersub() and timeradd() are defined on FreeBSD with a different
X * interface (3 parameters).
X */
X#undef	timersub
X#define	timersub(tvp1, tvp2)	do {					\
X					(tvp1)->tv_sec -= (tvp2)->tv_sec; \
X					(tvp1)->tv_usec -= (tvp2)->tv_usec; \
X					timerfix1(tvp1); timerfix2(tvp1); \
X				} while (0)
X
X#undef	timeradd
X#define	timeradd(tvp1, tvp2)	do {					\
X					(tvp1)->tv_sec += (tvp2)->tv_sec; \
X					(tvp1)->tv_usec += (tvp2)->tv_usec; \
X					timerfix1(tvp1); timerfix2(tvp1); \
X				} while (0)
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_TIME_H */
END-of-star-1.5.2/include/schily/time.h
echo x - star-1.5.2/include/schily/standard.h
sed 's/^X//' >star-1.5.2/include/schily/standard.h << 'END-of-star-1.5.2/include/schily/standard.h'
X/* @(#)standard.h	1.39 11/09/05 Copyright 1985-2010 J. Schilling */
X/*
X *	standard definitions
X *
X *	This file should be included past:
X *
X *	mconfig.h / config.h
X *	stdio.h
X *	stdlib.h	(better use schily/stdlib.h)
X *	unistd.h	(better use schily/unistd.h) needed f. LARGEFILE support
X *
X *	If you need stdio.h, you must include it before standard.h
X *
X *	Copyright (c) 1985-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STANDARD_H
X#define	_SCHILY_STANDARD_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifdef	M68000
X#	ifndef	tos
X#		define	JOS	1
X#	endif
X#endif
X
X/*
X *	fundamental constants
X */
X#ifndef	NULL
X#	define	NULL		0
X#endif
X#ifndef	TRUE
X#	define	TRUE		1
X#	define	FALSE		0
X#endif
X
X/*
X *	Program exit codes used with comerr(), comexit() and similar.
X *
X *	Exit codes between -2 and -63 are currently available to flag
X *	program specific error conditions.
X */
X#define	EX_BAD			(-1)	/* Default error exit code	    */
X#define	EX_CLASH		(-64)	/* Exit code used with exit clashes */
X
X/*
X *	standard storage class definitions
X */
X#define	GLOBAL	extern
X#define	IMPORT	extern
X#define	EXPORT
X#define	INTERN	static
X#define	LOCAL	static
X#define	FAST	register
X
X#ifndef	PROTOTYPES
X#	ifndef	const
X#		define	const
X#	endif
X#	ifndef	signed
X#		define	signed
X#	endif
X#	ifndef	volatile
X#		define	volatile
X#	endif
X#endif	/* PROTOTYPES */
X
X/*
X *	standard type definitions
X *
X *	The hidden Schily BOOL definition is used in case we need to deal
X *	with other BOOL defines on systems we like to port to.
X */
Xtypedef int __SBOOL;
Xtypedef int BOOL;
X#ifdef	JOS
X#	ifndef	__GNUC__
X#	define	NO_VOID
X#	endif
X#endif
X#ifdef	NO_VOID
X#	ifndef	lint
X		typedef int void;
X#	endif
X#endif
X
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(off_t)
X#	ifndef	FOUND_OFF_T
X#	define	FOUND_OFF_T
X#	endif
X#endif
X#if	defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || defined(size_t)
X#	ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T
X#	endif
X#endif
X#if	defined(_MSC_VER) && !defined(_SIZE_T_DEFINED)
X#	undef	FOUND_SIZE_T
X#endif
X
X#ifdef	__never_def__
X/*
X * It turns out that we cannot use the folloginw definition because there are
X * some platforms that do not behave application friendly. These are mainly
X * BSD-4.4 based systems (which #undef a definition when size_t is available.
X * We actually removed this code because of a problem with QNX Neutrino.
X * For this reason, it is important not to include <sys/types.h> directly but
X * via the Schily SING include files so we know whether it has been included
X * before we come here.
X */
X#if	defined(_SIZE_T)	|| defined(_T_SIZE_)	|| defined(_T_SIZE) || \
X	defined(__SIZE_T)	|| defined(_SIZE_T_)	|| \
X	defined(_GCC_SIZE_T)	|| defined(_SIZET_)	|| \
X	defined(__sys_stdtypes_h) || defined(___int_size_t_h) || defined(size_t)
X
X#ifndef	FOUND_SIZE_T
X#	define	FOUND_SIZE_T	/* We already included a size_t definition */
X#endif
X#endif
X#endif	/* __never_def__ */
X
X#ifdef	__cplusplus
X}
X#endif
X
X#if defined(_JOS) || defined(JOS)
X#	ifndef	_SCHILY_SCHILY_H
X#	include <schily/schily.h>
X#	endif
X
X#	ifndef	_SCHILY_JOS_DEFS_H
X#	include <schily/jos_defs.h>
X#	endif
X
X#	ifndef	_SCHILY_JOS_IO_H
X#	include <schily/jos_io.h>
X#	endif
X#endif
X
X#endif	/* _SCHILY_STANDARD_H */
END-of-star-1.5.2/include/schily/standard.h
echo x - star-1.5.2/include/schily/stdlib.h
sed 's/^X//' >star-1.5.2/include/schily/stdlib.h << 'END-of-star-1.5.2/include/schily/stdlib.h'
X/* @(#)stdlib.h	1.9 11/07/27 Copyright 1996-2011 J. Schilling */
X/*
X *	Definitions for stdlib
X *
X *	Copyright (c) 1996-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STDLIB_H
X#define	_SCHILY_STDLIB_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_STDLIB_H
X#ifndef	_INCL_STDLIB_H
X#include <stdlib.h>
X#define	_INCL_STDLIB_H
X#endif
X
X#else	/* !HAVE_STDLIB_H */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	char	*malloc();
Xextern	char	*realloc();
X
Xextern	double	atof();
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* HAVE_STDLIB_H */
X
X#ifndef	EXIT_FAILURE
X#define	EXIT_FAILURE	1
X#endif
X#ifndef	EXIT_SUCCESS
X#define	EXIT_SUCCESS	0
X#endif
X#ifndef	RAND_MAX
X#define	RAND_MAX	32767
X#endif
X
X#endif	/* _SCHILY_STDLIB_H */
END-of-star-1.5.2/include/schily/stdlib.h
echo x - star-1.5.2/include/schily/string.h
sed 's/^X//' >star-1.5.2/include/schily/string.h << 'END-of-star-1.5.2/include/schily/string.h'
X/* @(#)string.h	1.12 11/11/24 Copyright 1996-2011 J. Schilling */
X/*
X *	Definitions for strings
X *
X *	Copyright (c) 1996-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STRING_H
X#define	_SCHILY_STRING_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>		/* Try to get size_t */
X#endif
X
X/*
X * It may be that IBM's AIX has problems when doing
X * #include <string.h>
X * #include <strings.h>
X * So I moved the #include <strings.h> to the top. As the file strings.h
X * defines strcasecmp() we may need it...
X *
X * Note that the only real problem appears if we use rubbish FSF based code that
X * #defines _NO_PROTO
X */
X#ifdef	HAVE_STRINGS_H
X#ifndef	_INCL_STRINGS_H
X#include <strings.h>
X#define	_INCL_STRINGS_H
X#endif
X#endif	/* HAVE_STRINGS_H */
X
X
X#ifdef	HAVE_STRING_H
X#ifndef	_INCL_STRING_H
X#include <string.h>
X#define	_INCL_STRING_H
X#endif
X#else	/* HAVE_STRING_H */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef NULL
X#define	NULL	0
X#endif
X
Xextern void *memcpy	__PR((void *, const void *, int));
Xextern void *memmove	__PR((void *, const void *, int));
Xextern char *strcpy	__PR((char *, const char *));
Xextern char *strncpy	__PR((char *, const char *, int));
X
Xextern char *strcat	__PR((char *, const char *));
Xextern char *strncat	__PR((char *, const char *, int));
X
Xextern int memcmp	__PR((const void *, const void *, int));
Xextern int strcmp	__PR((const char *, const char *));
Xextern int strcoll	__PR((const char *, const char *));
Xextern int strncmp	__PR((const char *, const char *, int));
Xextern int strxfrm	__PR((char *, const char *, int));
X
Xextern void *memchr	__PR((const void *, int, int));
Xextern char *strchr	__PR((const char *, int));
X
Xextern int strcspn	__PR((const char *, const char *));
X/* #pragma int_to_unsigned strcspn */
X
Xextern char *strpbrk	__PR((const char *, const char *));
Xextern char *strrchr	__PR((const char *, int));
X
Xextern int strspn	__PR((const char *, const char *));
X/* #pragma int_to_unsigned strspn */
X
Xextern char *strstr	__PR((const char *, const char *));
Xextern char *strtok	__PR((char *, const char *));
Xextern void *memset	__PR((void *, int, int));
Xextern char *strerror	__PR((int));
X
Xextern int strlen	__PR((const char *));
X/* #pragma int_to_unsigned strlen */
X
Xextern void *memccpy	__PR((void *, const void *, int, int));
X
Xextern int strcasecmp	__PR((const char *, const char *));
Xextern int strncasecmp	__PR((const char *, const char *, size_t));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* HAVE_STRING_H */
X
X#endif	/* _SCHILY_STRING_H */
END-of-star-1.5.2/include/schily/string.h
echo x - star-1.5.2/include/schily/stkframe.h
sed 's/^X//' >star-1.5.2/include/schily/stkframe.h << 'END-of-star-1.5.2/include/schily/stkframe.h'
X/* @(#)stkframe.h	1.13 10/08/27 Copyright 1995-2010 J. Schilling */
X/*
X * Common definitions for routines that parse the stack frame.
X *
X * This file has to be fixed if you want to port routines which use getfp().
X * Have a look at struct frame below and use it as a sample,
X * the new struct frame must at least contain a member 'fr_savfp'.
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STKFRAME_H
X#define	_SCHILY_STKFRAME_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#if defined(sun) && (defined(SVR4) || defined(__SVR4) || defined(__SVR4__))
X	/*
X	 * Solaris 2.x aka SunOS 5.x
X	 */
X#	ifdef	i386
X		/*
X		 * On Solaris 2.1 x86 sys/frame.h is not useful at all
X		 * On Solaris 2.4 x86 sys/frame.h is buggy (fr_savfp is int!!)
X		 */
X#		ifndef	_INCL_SYS_REG_H
X#		include <sys/reg.h>
X#		define	_INCL_SYS_REG_H
X#		endif
X#	endif
X#	ifndef	_INCL_SYS_FRAME_H
X#	include <sys/frame.h>
X#	define	_INCL_SYS_FRAME_H
X#	endif
X
X#else
X# if	defined(sun)
X	/*
X	 * SunOS 4.x
X	 */
X#	ifndef	_INCL_MACHINE_FRAME_H
X#	include <machine/frame.h>
X#	define	_INCL_MACHINE_FRAME_H
X#	endif
X# else
X	/*
X	 * Anything that is not SunOS
X	 */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X/*
X * XXX: I hope this will be useful on other machines (no guarantee)
X * XXX: It is taken from a sun Motorola system, but should also be useful
X * XXX: on a i386.
X * XXX: In general you have to write a sample program, set a breakpoint
X * XXX: on a small function and inspect the stackframe with adb.
X */
X
Xstruct frame {
X	struct frame	*fr_savfp;	/* saved frame pointer */
X	Intptr_t	fr_savpc;	/* saved program counter */
X	int		fr_arg[1];	/* array of arguments */
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X# endif	/* ! defined (sun) */
X#endif	/* ! defined (sun) && (defined(SVR4) || defined(__SVR4) || ... */
X
X#endif	/* _SCHILY_STKFRAME_H */
END-of-star-1.5.2/include/schily/stkframe.h
echo x - star-1.5.2/include/schily/termios.h
sed 's/^X//' >star-1.5.2/include/schily/termios.h << 'END-of-star-1.5.2/include/schily/termios.h'
X/* @(#)termios.h	1.34 11/08/13 Copyright 1984-2011 J. Schilling */
X/*
X *	Terminal driver tty mode handling
X *
X *	Copyright (c) 1984-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef	_SCHILY_TERMIOS_H
X#define	_SCHILY_TERMIOS_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* Haiku needs this for _POSIX_VDISABLE */
X#endif
X
X#ifdef	JOS
X#	include <ttymodes.h>
X#	include <spfcode.h>
X#else
X#ifdef	HAVE_TERMIOS_H
X#	ifndef	_INCL_TERMIOS_H
X#	include <termios.h>
X#	define	_INCL_TERMIOS_H
X#	endif	/* _INCL_TERMIOS_H */
X#	ifdef TIOCGETA				/* FreeBSD */
X#		define	TCGETS	TIOCGETA
X#		define	TCSETSW	TIOCSETAW
X#	endif
X#	ifdef TCGETATTR
X#		define	TCGETS	TCGETATTR
X#		define	TCSETSW	TCSETATTRD
X#	endif
X#else
X#	ifdef	HAVE_TERMIO_H
X#		ifndef	_INCL_TERMIO_H
X#		include	<termio.h>
X#		define	_INCL_TERMIO_H
X#		endif	/* _INCL_TERMIO_H */
X#		ifndef	TCGETS
X#		define	termios	termio
X#		define	TCGETS	TCGETA
X#		define	TCSETSW	TCSETAW
X#		endif
X#	else
X#		define	USE_V7_TTY
X#	endif
X#endif
X#endif
X
X#if !defined(HAVE_TCGETATTR) || !defined(HAVE_TCSETATTR)
X#	undef	TCSANOW
X#else
X#	define	USE_TCSETATTR	/* Use tcsetattr() instead of ioctl()	*/
X#	define	USE_TERMIOS	/* Termio as classification		*/
X#endif
X
X#ifndef	TCSANOW
X#	if	!defined(TCGETS) || !defined(TCSETSW)
X#		define	USE_V7_TTY
X#	else
X#		define	USE_TCSETSW	/* Use ioctl()s			*/
X#		ifndef	USE_TERMIOS
X#		define	USE_TERMIOS	/* Termio as classification	*/
X#		endif
X#	endif
X#endif
X
X#if	defined(USE_V7_TTY) && defined(HAVE_SGTTY_H)
X#	ifndef	_INCL_SGTTY_H
X#	include	<sgtty.h>
X#	define	_INCL_SGTTY_H
X#	endif
X#endif
X
X#if	defined(USE_V7_TTY)
X#	ifndef	TIOCGETP
X#		undef	USE_V7_TTY
X#		define	USE_NO_TTY_IOCTL	/* A DOS system?	*/
X#	endif
X#endif
X
X#if	defined(USE_NO_TTY_IOCTL) && defined(HAVE_CONIO_H)
X#	ifndef	_INCL_CONIO_H
X#	include <conio.h>
X#	define	_INCL_CONIO_H
X#	endif	/* _INCL_CONIO_H */
X#	define	USE_GETCH			/* A DOS system!	*/
X#endif
X
X
X#if !defined(_INCL_TERMIOS_H) && !defined(_INCL_TERMIO_H)
X#	include	<schily/ioctl.h>
X#endif
X
X#ifdef	HAVE_SYS_BSDTTY_H
X#ifndef	_INCL_SYS_BSDTTY_H
X#include <sys/bsdtty.h>
X#define	_INCL_SYS_BSDTTY_H
X#endif
X#endif
X
X#if	!defined(TIOCGWINSZ) && ! defined(TIOCGSIZE)
X#	include	<schily/ioctl.h>
X#endif
X
X#ifndef	OXTABS					/* OS/2 EMX */
X#define	OXTABS	0
X#endif
X#ifndef	XTABS
X#	ifndef	TAB3				/* FreeBSD */
X#	define	TABDLY	OXTABS
X#	define	XTABS	OXTABS
X#	else
X#	define	XTABS	TAB3
X#	endif
X#endif
X#ifndef	ONLCR					/* OS/2 EMX */
X#define	ONLCR	0
X#endif
X#ifndef	OCRNL					/* FreeBSD */
X#	define	OCRNL	0
X#endif
X#ifndef	ONLRET					/* FreeBSD */
X#	define	ONLRET	0
X#endif
X#ifndef	_POSIX_VDISABLE
X#	define	_POSIX_VDISABLE	0
X#endif
X
X#endif	/* _SCHILY_TERMIOS_H */
END-of-star-1.5.2/include/schily/termios.h
echo x - star-1.5.2/include/schily/termcap.h
sed 's/^X//' >star-1.5.2/include/schily/termcap.h << 'END-of-star-1.5.2/include/schily/termcap.h'
X/* @(#)termcap.h	1.10 10/08/27 Copyright 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_TERMCAP_H
X#define	_SCHILY_TERMCAP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Flags for tcsetflags()
X */
X#define	TCF_NO_TC		0x0001	/* Don't follow tc= entries */
X#define	TCF_NO_SIZE		0x0002	/* Don't get actual ttysize (li#/co#) */
X#define	TCF_NO_STRIP		0x0004	/* Don't strip down termcap buffer */
X
Xextern	char	PC;		/* Pad character */
Xextern	char	*BC;		/* Backspace if not "\b" from "bc" capability */
Xextern	char	*UP;		/* Cursor up string from "up" capability */
Xextern	short	ospeed;		/* output speed coded as in ioctl */
X
Xextern	int	tgetent		__PR((char *bp, char *name));
Xextern	int	tcsetflags	__PR((int flags));
Xextern	char	*tcgetbuf	__PR((void));
Xextern	int	tgetnum		__PR((char *ent));
Xextern	BOOL	tgetflag	__PR((char *ent));
Xextern	char	*tgetstr	__PR((char *ent, char **array));
Xextern	char	*tdecode	__PR((char *ep, char **array));
X
Xextern	int	tputs		__PR((char *cp, int affcnt,
X					int (*outc)(int c)));
Xextern	char	*tgoto		__PR((char *cm, int destcol, int destline));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_TERMCAP_H */
END-of-star-1.5.2/include/schily/termcap.h
echo x - star-1.5.2/include/schily/unistd.h
sed 's/^X//' >star-1.5.2/include/schily/unistd.h << 'END-of-star-1.5.2/include/schily/unistd.h'
X/* @(#)unistd.h	1.25 12/11/13 Copyright 1996-2012 J. Schilling */
X/*
X *	Definitions for unix system interface
X *
X *	Copyright (c) 1996-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_UNISTD_H
X#define	_SCHILY_UNISTD_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * unistd.h grants things like off_t to be typedef'd.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_UNISTD_H
X
X#ifndef	_INCL_UNISTD_H
X#include <unistd.h>
X#define	_INCL_UNISTD_H
X#endif
X
X#ifndef	_SC_PAGESIZE
X#ifdef	_SC_PAGE_SIZE	/* HP/UX & OSF */
X#define	_SC_PAGESIZE	_SC_PAGE_SIZE
X#endif
X#endif
X
X#else	/* !HAVE_UNISTD_H */
X#ifndef	_SCHILY_STDLIB_H
X#include <schily/stdlib.h>	/* MSVC: no unistd.h environ is in stdlib.h */
X#endif
X#endif	/* !HAVE_UNISTD_H */
X
X/*
X * MSVC has getcwd()/chdir()/mkdir()/rmdir() in direct.h
X */
X#if defined(_MSC_VER) && defined(HAVE_DIRECT_H)
X#ifndef	_INCL_DIRECT_H
X#include <direct.h>
X#define	_INCL_DIRECT_H
X#endif
X#endif
X
X/*
X * MSVC has size_t in stddef.h
X */
X#ifdef HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>
X#define	_INCL_STDDEF_H
X#endif
X#endif
X
X#ifndef	STDIN_FILENO
X#	ifdef	JOS
X#		ifndef	_SCHILY_JOS_IO_H
X#		include <schily/jos_io.h>
X#		endif
X#	else
X#		define	STDIN_FILENO	0
X#		define	STDOUT_FILENO	1
X#		define	STDERR_FILENO	2
X#	endif
X#endif
X
X#ifndef	R_OK
X/* Symbolic constants for the "access" routine: */
X#define	R_OK	4	/* Test for Read permission */
X#define	W_OK	2	/* Test for Write permission */
X#define	X_OK	1	/* Test for eXecute permission */
X#define	F_OK	0	/* Test for existence of File */
X#endif
X#ifndef	E_OK
X#ifdef	HAVE_ACCESS_E_OK
X#ifdef	EFF_ONLY_OK
X#define	E_OK	EFF_ONLY_OK /* Irix */
X#else
X#ifdef	EUID_OK
X#define	E_OK	EUID_OK	/* UNICOS (0400) */
X#else
X#define	E_OK	010	/* Test effective uids */
X#endif	/* EUID_OK */
X#endif	/* EFF_ONLY_OK */
X#else
X#define	E_OK	0
X#endif	/* HAVE_ACCESS_E_OK */
X#endif	/* !E_OK */
X
X/* Symbolic constants for the "lseek" routine: */
X#ifndef	SEEK_SET
X#define	SEEK_SET	0	/* Set file pointer to "offset" */
X#endif
X#ifndef	SEEK_CUR
X#define	SEEK_CUR	1	/* Set file pointer to current plus "offset" */
X#endif
X#ifndef	SEEK_END
X#define	SEEK_END	2	/* Set file pointer to EOF plus "offset" */
X#endif
X
X#ifndef	HAVE_ENVIRON_DEF
Xextern	char	**environ;
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if	!defined(HAVE_UNISTD_H) || !defined(_POSIX_VERSION)
X/*
X * Maybe we need a lot more definitions here...
X * It is not clear whether we should have prototyped definitions.
X */
X#ifndef	_MSC_VER
X/*
X * MS C comes with broken prototypes in wrong header files (in our case, the
X * wrong prototype is in io.h). Avoid to redefine the broken MS stuff with
X * correct prototypes.
X */
Xextern	int	access	__PR((const char *, int));
Xextern	int	close	__PR((int));
Xextern	int	dup	__PR((int));
Xextern	int	dup2	__PR((int, int));
Xextern	int	link	__PR((const char *, const char *));
Xextern	int	read	__PR((int, void *, size_t));
Xextern	int	unlink	__PR((const char *));
Xextern	int	write	__PR((int, const void *, size_t));
X#endif
X#ifndef	_MSC_VER
X/*
X * MS C comes with broken prototypes in wrong header files (in our case, the
X * wrong prototype is in stdlib.h). Avoid to redefine the broken MS stuff with
X * correct prototypes.
X */
Xextern	void	_exit	__PR((int));
X#endif
X#endif
X
X#if !defined(HAVE_PIPE) && defined(HAVE__PIPE) && defined(HAVE_IO_H)
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>	/* for PIPE_BUF */
X#endif
X#ifndef	_SCHILY_FCNTL_H
X#include <schily/fcntl.h>	/* for O_BINARY */
X#endif
X#ifndef	_SCHILY_IO_H
X#include <schily/io.h>		/* for _pipe() */
X#endif
X
X#define	pipe(pp)	_pipe(pp, PIPE_BUF, O_BINARY)
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_UNISTD_H */
END-of-star-1.5.2/include/schily/unistd.h
echo x - star-1.5.2/include/schily/utime.h
sed 's/^X//' >star-1.5.2/include/schily/utime.h << 'END-of-star-1.5.2/include/schily/utime.h'
X/* @(#)utime.h	1.9 10/08/24 Copyright 2001-2010 J. Schilling */
X/*
X *	Defines for utimes() / utime()
X *
X *	Copyright (c) 2001-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTIME_H
X#define	_SCHILY_UTIME_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_UTIMES
X#ifndef _SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X#endif
X
X#ifdef	HAVE_UTIME_H
X#ifndef	_INCL_UTIME_H
X#include <utime.h>
X#define	_INCL_UTIME_H
X#endif
X#else
X#ifdef	HAVE_SYS_UTIME_H
X#ifndef	_INCL_SYS_UTIME_H
X#include <sys/utime.h>
X#define	_INCL_SYS_UTIME_H
X#endif
X#else
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xstruct utimbuf {
X	time_t	actime;
X	time_t	modtime;
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif
X#endif
X
X#ifdef	__comment__
X/*
X * file.c contains this
X * I am not sure if it is really needed.
X * It may be a good idea to add a test for HAVE_STRUCT_UTIMBUF
X * as in gnutar.
X */
X#if (__COHERENT__ >= 0x420)
X# include <sys/utime.h>
X#else
X#  include <utime.h>
X#endif
X
X#endif	/* __comment__ */
X
X#endif	/* _SCHILY_UTIME_H */
END-of-star-1.5.2/include/schily/utime.h
echo x - star-1.5.2/include/schily/varargs.h
sed 's/^X//' >star-1.5.2/include/schily/varargs.h << 'END-of-star-1.5.2/include/schily/varargs.h'
X/* @(#)varargs.h	1.7 10/08/27 Copyright 1998-2010 J. Schilling */
X/*
X *	Generic header for users of var args ...
X *
X *	Includes a default definition for va_copy()
X *	and some magic know how about the SVr4 Power PC var args ABI
X *	to create a __va_arg_list() macro.
X *
X *	The __va_arg_list() macro is needed to fetch a va_list type argument
X *	from a va_list. This is needed to implement a recursive "%r" printf.
X *
X *	Copyright (c) 1998-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_VARARGS_H
X#define	_SCHILY_VARARGS_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	PROTOTYPES
X/*
X * For ANSI C-compilers prefer stdarg.h
X */
X#	ifdef	HAVE_STDARG_H
X#		ifndef	_INCL_STDARG_H
X#		include <stdarg.h>
X#		define	_INCL_STDARG_H
X#		endif
X#	else
X#		ifndef	_INCL_VARARGS_H
X#		include <varargs.h>
X#		define	_INCL_VARARGS_H
X#		endif
X#	endif
X#else
X/*
X * For K&R C-compilers prefer varargs.h
X */
X#	ifdef	HAVE_VARARGS_H
X#		ifndef	_INCL_VARARGS_H
X#		include <varargs.h>
X#		define	_INCL_VARARGS_H
X#		endif
X#	else
X#		ifndef	_INCL_STDARG_H
X#		include <stdarg.h>
X#		define	_INCL_STDARG_H
X#		endif
X#	endif
X#endif
X
X#if (defined(__linux__) || defined(__linux) || defined(sun)) && \
X		(defined(__ppc) || defined(__PPC) || \
X		defined(powerpc) || defined(__powerpc__))
X
X#	ifndef	VA_LIST_IS_ARRAY
X#	define	VA_LIST_IS_ARRAY
X#	endif
X#endif
X
X
X/*
X * __va_copy() is used by GCC 2.8 or newer until va_copy() becomes
X * a final ISO standard.
X */
X#if !defined(va_copy) && !defined(HAVE_VA_COPY)
X#	if	defined(__va_copy)
X#		define	va_copy(to, from)	__va_copy(to, from)
X#	endif
X#endif
X
X/*
X * va_copy() is a Solaris extension to provide a portable way to perform a
X * variable argument list "bookmarking" function.
X * If it is not available via stdarg.h, use a simple assignement for backward
X * compatibility.
X */
X#if !defined(va_copy) && !defined(HAVE_VA_COPY)
X#ifdef	VA_LIST_IS_ARRAY
X#	define	va_copy(to, from)	((to)[0] = (from)[0])
X#else
X#	define	va_copy(to, from)	((to) = (from))
X#endif
X#endif
X
X/*
X * I don't know any portable way to get an arbitrary
X * C object from a var arg list so I use a
X * system-specific routine __va_arg_list() that knows
X * if 'va_list' is an array. You will not be able to
X * assign the value of __va_arg_list() but it works
X * to be used as an argument of a function.
X * It is a requirement for recursive printf to be able
X * to use this function argument. If your system
X * defines va_list to be an array you need to know this
X * via autoconf or another mechanism.
X * It would be nice to have something like
X * __va_arg_list() in stdarg.h
X */
X
X#ifdef	VA_LIST_IS_ARRAY
X#	define	__va_arg_list(list)	va_arg(list, void *)
X#else
X#	define	__va_arg_list(list)	va_arg(list, va_list)
X#endif
X
X#endif	/* _SCHILY_VARARGS_H */
END-of-star-1.5.2/include/schily/varargs.h
echo x - star-1.5.2/include/schily/ioctl.h
sed 's/^X//' >star-1.5.2/include/schily/ioctl.h << 'END-of-star-1.5.2/include/schily/ioctl.h'
X/* @(#)ioctl.h	1.1 07/05/24 Copyright 2007 J. Schilling */
X/*
X *	Abstraction from sys/ioctl.h
X *
X *	Copyright (c) 2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_IOCTL_H
X#define	_SCHILY_IOCTL_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_IOCTL_H
X#ifndef	_INCL_SYS_IOCTL_H
X#include <sys/ioctl.h>
X#define	_INCL_SYS_IOCTL_H
X#endif
X#endif
X
X#endif	/* _SCHILY_IOCTL_H */
END-of-star-1.5.2/include/schily/ioctl.h
echo x - star-1.5.2/include/schily/wait.h
sed 's/^X//' >star-1.5.2/include/schily/wait.h << 'END-of-star-1.5.2/include/schily/wait.h'
X/* @(#)wait.h	1.19 11/07/19 Copyright 1995-2011 J. Schilling */
X/*
X *	Definitions to deal with various kinds of wait flavour
X *
X *	Copyright (c) 1995-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_WAIT_H
X#define	_SCHILY_WAIT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * Needed for SysVr4
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#if	defined(HAVE_WAIT_H)
X#	ifndef	_INCL_WAIT_H
X#	include <wait.h>
X#	define	_INCL_WAIT_H
X#	endif
X#else
X/*
X * K&R Compiler doesn't like #elif
X */
X#	if	defined(HAVE_SYS_WAIT_H)	/* POSIX.1 compl. sys/wait.h */
X#	undef	HAVE_UNION_WAIT			/* POSIX.1 doesn't use U_W   */
X#		ifndef	_INCL_SYS_WAIT_H
X#		include <sys/wait.h>
X#		define	_INCL_SYS_WAIT_H
X#		endif
X#	else
X#	if	defined(HAVE_UNION_WAIT)	/* Pure BSD U_W / sys/wait.h */
X#		ifndef	_INCL_SYS_WAIT_H
X#		include <sys/wait.h>
X#		define	_INCL_SYS_WAIT_H
X#		endif
X#	endif
X#	endif
X#endif
X#ifdef	JOS
X#	ifndef	_INCL_SYS_EXIT_H
X#	include <sys/exit.h>
X#	define	_INCL_SYS_EXIT_H
X#	endif
X#endif
X#if defined(__EMX__) || defined(__DJGPP__)
X#	ifndef	_INCL_PROCESS_H
X#	include <process.h>
X#	define	_INCL_PROCESS_H
X#	endif
X#endif
X
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	WCOREFLG
X#define	WCOREFLG	0x80
X#define	NO_WCOREFLG
X#endif
X
X#ifndef	WSTOPFLG
X#define	WSTOPFLG	0x7F
X#define	NO_WSTOPFLG
X#endif
X
X#ifndef	WCONTFLG
X#define	WCONTFLG	0xFFFF
X#define	NO_WCONTFLG
X#endif
X
X/*
X * waitid() option flags:
X */
X#ifndef	WCONTINUED
X#define	WCONTINUED	0
X#define	NO_WCONTINUED
X#endif
X#ifndef	WEXITED
X#define	WEXITED		0
X#define	NO_WEXITED
X#endif
X#ifndef	WNOHANG
X#define	WNOHANG		0
X#define	NO_WNOHANG
X#endif
X#ifndef	WNOWAIT
X#define	WNOWAIT		0
X#define	NO_WNOWAIT
X#endif
X#ifndef	WSTOPPED
X#define	WSTOPPED	0
X#define	NO_WSTOPPED
X#endif
X#ifndef	WTRAPPED
X#define	WTRAPPED	0
X#define	NO_WTRAPPED
X#endif
X
X#if defined(HAVE_UNION_WAIT) && defined(USE_UNION_WAIT)
X#	define WAIT_T union wait
X#	define	_W_U(w)	((union wait *)&(w))
X#	ifndef WSTOPPED
X#		define	WSTOPPED	0x7F
X#	endif
X#	ifndef WTERMSIG
X#		define WTERMSIG(status)		(_W_U(status)->w_termsig)
X#	endif
X#	ifndef WCOREDUMP
X#		define WCOREDUMP(status)	(_W_U(status)->w_coredump)
X#	endif
X#	ifndef WEXITSTATUS
X#		define WEXITSTATUS(status)	(_W_U(status)->w_retcode)
X#	endif
X#	ifndef WSTOPSIG
X#		define WSTOPSIG(status)		(_W_U(status)->w_stopsig)
X#	endif
X#	ifndef WIFCONTINUED
X#		define	WIFCONTINUED(status)	(0)
X#	endif
X#	ifndef WIFSTOPPED
X#		define WIFSTOPPED(status)	(_W_U(status)->w_stopval == \
X								WSTOPPED)
X#	endif
X#	ifndef WIFSIGNALED
X#		define WIFSIGNALED(status) 	(_W_U(status)->w_stopval != \
X						WSTOPPED && \
X						_W_U(status)->w_termsig != 0)
X#	endif
X#	ifndef WIFEXITED
X#		define WIFEXITED(status)	(_W_U(status)->w_stopval != \
X						WSTOPPED && \
X						_W_U(status)->w_termsig == 0)
X#	endif
X#else
X#	define WAIT_T int
X#	define	_W_I(w)	(*(int *)&(w))
X#	ifndef WTERMSIG
X#		define WTERMSIG(status)		(_W_I(status) & 0x7F)
X#	endif
X#	ifndef WCOREDUMP
X#		define WCOREDUMP(status)	(_W_I(status) & 0x80)
X#	endif
X#	ifndef WEXITSTATUS
X#		define WEXITSTATUS(status)	((_W_I(status) >> 8) & 0xFF)
X#	endif
X#	ifndef WSTOPSIG
X#		define WSTOPSIG(status)		((_W_I(status) >> 8) & 0xFF)
X#	endif
X/*
X * WIFSTOPPED and WIFSIGNALED match the definitions on older UNIX versions
X * e.g. SunOS-4.x or HP-UX
X */
X#	ifndef WIFCONTINUED
X#	ifdef	NO_WCONTINUED
X#		define	WIFCONTINUED(status)	(0)
X#	else
X#		define	WIFCONTINUED(status)	((_W_I(status) & 0xFFFF) == \
X								WCONTFLG)
X#	endif
X#	endif
X#	ifndef WIFSTOPPED
X#		define	WIFSTOPPED(status)	((_W_I(status) & 0xFF) == 0x7F)
X#	endif
X#	ifndef WIFSIGNALED
X#		define	WIFSIGNALED(status)	((_W_I(status) & 0xFF) != 0x7F && \
X						WTERMSIG(status) != 0)
X#	endif
X#	ifndef WIFEXITED
X#		define	WIFEXITED(status)	((_W_I(status) & 0xFF) == 0)
X#	endif
X#endif
X
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_WAIT_H */
END-of-star-1.5.2/include/schily/wait.h
echo x - star-1.5.2/include/schily/utypes.h
sed 's/^X//' >star-1.5.2/include/schily/utypes.h << 'END-of-star-1.5.2/include/schily/utypes.h'
X/* @(#)utypes.h	1.35 12/01/22 Copyright 1997-2012 J. Schilling */
X/*
X *	Definitions for some user defined types
X *
X *	Copyright (c) 1997-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTYPES_H
X#define	_SCHILY_UTYPES_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * uypes.h is based on inttypes.h
X */
X#ifndef	_SCHILY_INTTYPES_H
X#include <schily/inttypes.h>
X#endif
X
X/*
X * Several unsigned cardinal types
X */
Xtypedef	unsigned long	Ulong;
Xtypedef	unsigned int	Uint;
Xtypedef	unsigned short	Ushort;
Xtypedef	unsigned char	Uchar;
X
X/*
X * The IBM AIX C-compiler seems to be the only compiler on the world
X * which does not allow to use unsigned char bit fields as a hint
X * for packed bit fields. Define a pesical type to avoid warnings.
X * The packed attribute is honored wit unsigned int in this case too.
X */
X#if	defined(_AIX) && !defined(__GNUC__)
X
Xtypedef unsigned int	Ucbit;
X
X#else
X
Xtypedef unsigned char	Ucbit;
X
X#endif
X
X#ifndef	CHAR_MIN
X#define	CHAR_MIN	TYPE_MINVAL(char)
X#endif
X#ifndef	CHAR_MAX
X#define	CHAR_MAX	TYPE_MAXVAL(char)
X#endif
X#ifndef	UCHAR_MAX
X#define	UCHAR_MAX	TYPE_MAXVAL(unsigned char)
X#endif
X
X#ifndef	SHRT_MIN
X#define	SHRT_MIN	TYPE_MINVAL(short)
X#endif
X#ifndef	SHRT_MAX
X#define	SHRT_MAX	TYPE_MAXVAL(short)
X#endif
X#ifndef	USHRT_MAX
X#define	USHRT_MAX	TYPE_MAXVAL(unsigned short)
X#endif
X
X#ifndef	INT_MIN
X#define	INT_MIN		TYPE_MINVAL(int)
X#endif
X#ifndef	INT_MAX
X#define	INT_MAX		TYPE_MAXVAL(int)
X#endif
X#ifndef	UINT_MAX
X#define	UINT_MAX	TYPE_MAXVAL(unsigned int)
X#endif
X
X#ifndef	LONG_MIN
X#define	LONG_MIN	TYPE_MINVAL(long)
X#endif
X#ifndef	LONG_MAX
X#define	LONG_MAX	TYPE_MAXVAL(long)
X#endif
X#ifndef	ULONG_MAX
X#define	ULONG_MAX	TYPE_MAXVAL(unsigned long)
X#endif
X
X#define	OFF_T_MIN	TYPE_MINVAL(off_t)
X#define	OFF_T_MAX	TYPE_MAXVAL(off_t)
X
X#define	UID_T_MIN	TYPE_MINVAL(uid_t)
X#define	UID_T_MAX	TYPE_MAXVAL(uid_t)
X
X#define	GID_T_MIN	TYPE_MINVAL(gid_t)
X#define	GID_T_MAX	TYPE_MAXVAL(gid_t)
X
X#define	PID_T_MIN	TYPE_MINVAL(pid_t)
X#define	PID_T_MAX	TYPE_MAXVAL(pid_t)
X
X#define	MODE_T_MIN	TYPE_MINVAL(mode_t)
X#define	MODE_T_MAX	TYPE_MAXVAL(mode_t)
X
X#define	TIME_T_MIN	TYPE_MINVAL(time_t)
X#define	TIME_T_MAX	TYPE_MAXVAL(time_t)
X
X#define	CADDR_T_MIN	TYPE_MINVAL(caddr_t)
X#define	CADDR_T_MAX	TYPE_MAXVAL(caddr_t)
X
X#define	DADDR_T_MIN	TYPE_MINVAL(daddr_t)
X#define	DADDR_T_MAX	TYPE_MAXVAL(daddr_t)
X
X#define	DEV_T_MIN	TYPE_MINVAL(dev_t)
X#define	DEV_T_MAX	TYPE_MAXVAL(dev_t)
X
X#define	MAJOR_T_MIN	TYPE_MINVAL(major_t)
X#define	MAJOR_T_MAX	TYPE_MAXVAL(major_t)
X
X#define	MINOR_T_MIN	TYPE_MINVAL(minor_t)
X#define	MINOR_T_MAX	TYPE_MAXVAL(minor_t)
X
X#define	INO_T_MIN	TYPE_MINVAL(ino_t)
X#define	INO_T_MAX	TYPE_MAXVAL(ino_t)
X
X#define	NLINK_T_MIN	TYPE_MINVAL(nlink_t)
X#define	NLINK_T_MAX	TYPE_MAXVAL(nlink_t)
X
X#define	BLKSIZE_T_MIN	TYPE_MINVAL(blksize_t)
X#define	BLKSIZE_T_MAX	TYPE_MAXVAL(blksize_t)
X
X#define	BLKCNT_T_MIN	TYPE_MINVAL(blkcnt_t)
X#define	BLKCNT_T_MAX	TYPE_MAXVAL(blkcnt_t)
X
X#define	CLOCK_T_MIN	TYPE_MINVAL(clock_t)
X#define	CLOCK_T_MAX	TYPE_MAXVAL(clock_t)
X
X#define	SOCKLEN_T_MIN	TYPE_MINVAL(socklen_t)
X#define	SOCKLEN_T_MAX	TYPE_MAXVAL(socklen_t)
X
X#endif	/* _SCHILY_UTYPES_H */
END-of-star-1.5.2/include/schily/utypes.h
echo x - star-1.5.2/include/schily/alloca.h
sed 's/^X//' >star-1.5.2/include/schily/alloca.h << 'END-of-star-1.5.2/include/schily/alloca.h'
X/* @(#)alloca.h	1.7 10/08/24 Copyright 2002-2010 J. Schilling */
X/*
X *	Definitions for users of alloca()
X *
X *	Important: #include this directly after <schily/mconfig.h>
X *	and before any other include file.
X *	See comment in _AIX part below.
X *
X *	Copyright (c) 2002-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef	_SCHILY_ALLOCA_H
X#define	_SCHILY_ALLOCA_H
X
X#ifdef __GNUC__
X#	ifndef	alloca
X#		define	alloca(s)	__builtin_alloca(s)
X#	endif
X#else
X#	ifdef _MSC_VER
X#		include <malloc.h>
X#		define alloca _alloca
X#	else
X#		if HAVE_ALLOCA_H
X#			include <alloca.h>
X#		else
X#			ifdef _AIX
X				/*
X				 * Indent so pre-ANSI compilers will ignore it
X				 *
X				 * Some versions of AIX may require this to be
X				 * first in the file and only preceded by
X				 * comments and preprocessor directives/
X				 */
X				/* CSTYLED */
X				#pragma alloca
X#			else
X#				ifndef alloca
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X					/*
X					 * predefined by HP cc +Olibcalls
X					 */
X#					ifdef	PROTOTYPES
X						extern void *alloca();
X#					else
X						extern char *alloca();
X#					endif
X#ifdef	__cplusplus
X}
X#endif
X#				endif
X#			endif
X#		endif
X#	endif
X#endif
X
X#endif	/* _SCHILY_ALLOCA_H */
END-of-star-1.5.2/include/schily/alloca.h
echo x - star-1.5.2/include/schily/nlsdefs.h
sed 's/^X//' >star-1.5.2/include/schily/nlsdefs.h << 'END-of-star-1.5.2/include/schily/nlsdefs.h'
X/* @(#)nlsdefs.h	1.5 10/12/19 Copyright 2004-2010 J. Schilling */
X/*
X *	Native language support
X *
X *	Copyright (c) 2004-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_NLSDEFS_H
X#define	_SCHILY_NLSDEFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	NO_NLS
X#ifndef	USE_NLS
X#define	USE_NLS			/* Make nls the default */
X#endif
X#endif
X
X#ifdef	HAVE_LIBINTL_H
X#ifndef	_INCL_LIBINTL_H
X#include <libintl.h>		/* gettext() */
X#define	_INCL_LIBINTL_H
X#endif
X#else
X#undef	USE_NLS
X#endif
X
X#ifndef	_SCHILY_LOCALE_H
X#include <schily/locale.h>	/* LC_* definitions */
X#endif
X#ifndef	_INCL_LOCALE_H
X#undef	USE_NLS
X#endif
X
X#ifdef	HAVE_LANGINFO_H
X#ifndef	_INCL_LAGINFO_H
X#include <langinfo.h>		/* YESSTR amnd similar */
X#define	_INCL_LANGINFO_H
X#endif
X#else
X#undef	USE_NLS
X#endif
X
X#ifndef	HAVE_GETTEXT
X#undef	USE_NLS
X#endif
X
X#ifdef	NO_NLS
X#undef	USE_NLS
X#endif
X
X#ifdef	NO_TEXT_DOMAIN
X#undef	TEXT_DOMAIN
X#endif
X
X#ifndef	USE_NLS
X#undef	gettext
X#define	gettext(s)			s
X#undef	dgettext
X#define	dgettext(d, s)			s
X#undef	dcgettext
X#define	dcgettext(d, s, c)		s
X
X#undef	textdomain
X#define	textdomain(a)			((char *)0)
X#undef	bindtextdomain
X#define	bindtextdomain(d, dir)		((char *)0)
X#undef	bind_textdomain_codeset
X#define	bind_textdomain_codeset(d, c)	((char *)0)
X#endif
X
X#ifdef	lint
X/*
X * Allow lint to check printf() format strings.
X */
X#define	_(s)				s
X#else	/* lint */
X
X#ifdef	USE_DGETTEXT			/* e.g. in a library */
X#define	_(s)				dgettext(TEXT_DOMAIN, s)
X#else
X#define	_(s)				gettext(s)
X#endif
X#endif	/* lint */
X/*
X * Allow to mark strings for xgettext(1)
X */
X#define	__(s)				s
X
X#endif	/* _SCHILY_NLSDEFS_H */
END-of-star-1.5.2/include/schily/nlsdefs.h
echo x - star-1.5.2/include/schily/align.h
sed 's/^X//' >star-1.5.2/include/schily/align.h << 'END-of-star-1.5.2/include/schily/align.h'
X/* @(#)align.h	1.9 12/12/03 Copyright 1995-2012 J. Schilling */
X/*
X *	Platform dependent definitions for aligning data.
X *
X *	Copyright (c) 1995-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X *	The automatically created included file defines the following macros:
X *
X *	saligned(a)	One parameter aligned for a "short int"
X *	s2aligned(a, b)	Both parameters aligned for a "short int"
X *	ialigned(a)	One parameter aligned for a "int"
X *	i2aligned(a, b)	Both parameters aligned for a "int"
X *	laligned(a)	One parameter aligned for a "long"
X *	l2aligned(a, b)	Both parameters aligned for a "long"
X *	llaligned(a)	One parameter aligned for a "long long"
X *	ll2aligned(a, b) Both parameters aligned for a "long long"
X *	faligned(a)	One parameter aligned for a "float"
X *	f2aligned(a, b)	Both parameters aligned for a "float"
X *	daligned(a)	One parameter aligned for a "double"
X *	d2aligned(a, b)	Both parameters aligned for a "double"
X *	paligned(a)	One parameter aligned for a "pointer"
X *	p2aligned(a, b)	Both parameters aligned for a "pointe"
X *
X *	salign(x)	Align for a "short int"
X *	ialign(x)	Align for a "int"
X *	lalign(x)	Align for a "long"
X *	llalign(x)	Align for a "long long"
X *	falign(x)	Align for a "float"
X *	dalign(x)	Align for a "double"
X *	palign(x)	Align for a "pointer"
X */
X#ifndef _SCHILY_ALIGN_H
X#define	_SCHILY_ALIGN_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifdef	SCHILY_BUILD	/* #defined by Schily makefile system */
X	/*
X	 * Include $(SRCROOT)/incs/$(OARCH)/align.h via
X	 * -I$(SRCROOT)/incs/$(OARCH)/
X	 */
X#	include <align.h>
X#else	/* !SCHILY_BUILD */
X/*
X * The stuff for static compilation. Include files from a previous
X * dynamic autoconfiguration.
X */
X#ifdef	__SUNOS5_SPARC_CC32
X#include <schily/sparc-sunos5-cc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_CC64
X#include <schily/sparc-sunos5-cc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC32
X#include <schily/sparc-sunos5-gcc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC64
X#include <schily/sparc-sunos5-gcc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC32
X#include <schily/i386-sunos5-cc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC64
X#include <schily/i386-sunos5-cc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC32
X#include <schily/i386-sunos5-gcc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC64
X#include <schily/i386-sunos5-gcc64/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X
X#ifdef	__HPUX_HPPA_CC32
X#include <schily/hppa-hp-ux-cc/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_CC64
X#include <schily/hppa-hp-ux-cc64/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC32
X#include <schily/hppa-hp-ux-gcc/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC64
X#include <schily/hppa-hp-ux-gcc64/align.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__MSWIN_X86_CL32
X#include <schily/i686-cygwin32_nt-cl/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X
X#ifdef	__CYGWIN_X86_GCC
X#include <schily/i686-cygwin32_nt-gcc/align.h>
X#define	__JS_ARCH_ALIGN_INCL
X#endif
X
X#ifndef	__JS_ARCH_ALIGN_INCL
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if none of the above is defined. And that's  what we want.
X */
XError unconfigured architecture
X
X#include <schily/err_arch.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#endif	/* SCHILY_BUILD */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X/*
X * Fake in order to keep the silly hdrchk(1) quiet.
X */
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_ALIGN_H */
END-of-star-1.5.2/include/schily/align.h
echo x - star-1.5.2/include/schily/avoffset.h
sed 's/^X//' >star-1.5.2/include/schily/avoffset.h << 'END-of-star-1.5.2/include/schily/avoffset.h'
X/* @(#)avoffset.h	1.10 12/12/03 Copyright 1995-2012 J. Schilling */
X/*
X *	Platform dependent definitions for stack scanning.
X *
X *	Copyright (c) 1995-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*
X *	This file includes definitions for STACK_DIRECTION,
X *	AV_OFFSET and FP_INDIR.
X *
X *	STACK_DIRECTION:
X *			+1 -> stack grows to larger addresses
X *			-1 -> stack "groes" to lower addresses
X *
X *	FP_INDIR:	the number of fp chain elements above 'main'.
X *
X *	AV_OFFSET:	the offset of &av[0] relative to the frame pointer
X *			in 'main'.
X *
X *	If getav0() does not work on a specific architecture
X *	the program which generated this automaticly generated include file
X *	may dump core. In this case, the generated include file does not include
X *	definitions for AV_OFFSET and FP_INDIR but ends after the
X *	STACK_DIRECTION definition.
X *	If AV_OFFSET or FP_INDIR are missing in the file, all code
X *	that use the definitions are automatically disabled.
X */
X#ifndef _SCHILY_AVOFFSET_H
X#define	_SCHILY_AVOFFSET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	SCHILY_BUILD	/* #defined by Schily makefile system */
X	/*
X	 * Include $(SRCROOT)/incs/$(OARCH)/avoffset.h via
X	 * -I$(SRCROOT)/incs/$(OARCH)/
X	 */
X#	include <avoffset.h>
X#else	/* !SCHILY_BUILD */
X/*
X * The stuff for static compilation. Include files from a previous
X * dynamic autoconfiguration.
X */
X#ifdef	__SUNOS5_SPARC_CC32
X#include <schily/sparc-sunos5-cc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_CC64
X#include <schily/sparc-sunos5-cc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC32
X#include <schily/sparc-sunos5-gcc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC64
X#include <schily/sparc-sunos5-gcc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC32
X#include <schily/i386-sunos5-cc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC64
X#include <schily/i386-sunos5-cc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC32
X#include <schily/i386-sunos5-gcc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC64
X#include <schily/i386-sunos5-gcc64/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X
X#ifdef	__HPUX_HPPA_CC32
X#include <schily/hppa-hp-ux-cc/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_CC64
X#include <schily/hppa-hp-ux-cc64/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC32
X#include <schily/hppa-hp-ux-gcc/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC64
X#include <schily/hppa-hp-ux-gcc64/avoffset.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__MSWIN_X86_CL32
X#include <schily/i686-cygwin32_nt-cl/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X
X#ifdef	__CYGWIN_X86_GCC
X#include <schily/i686-cygwin32_nt-gcc/avoffset.h>
X#define	__JS_ARCH_AVOFFSET_INCL
X#endif
X
X#ifndef	__JS_ARCH_AVOFFSET_INCL
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if none of the above is defined. And that's  what we want.
X */
XError unconfigured architecture
X
X#include <schily/err_arch.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#endif	/* SCHILY_BUILD */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X/*
X * Fake in order to keep the silly hdrchk(1) quiet.
X */
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_AVOFFSET_H */
END-of-star-1.5.2/include/schily/avoffset.h
echo x - star-1.5.2/include/schily/xmconfig.h
sed 's/^X//' >star-1.5.2/include/schily/xmconfig.h << 'END-of-star-1.5.2/include/schily/xmconfig.h'
X/* @(#)xmconfig.h	1.45 10/08/27 Copyright 1995-2010 J. Schilling */
X/*
X *	This file either includes the manual generated
X *	static definitions for a machine configuration.
X *
X *	Copyright (c) 1995-2010 J. Schilling
X *
X *	Use only cpp instructions.
X *
X *	NOTE: SING: (Schily Is Not Gnu)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_XMCONFIG_H
X#define	_SCHILY_XMCONFIG_H
X
X/*
X * This is the only static (hand crafted) set of machine configuration
X * left over. We are trying to avoid even this in future.
X */
X
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
X#if defined(VMS)
X#	define	PROTOTYPES
X#	define	HAVE_OSDEF	/* prevent later defines to overwrite current */
X#	define	__NOT_SVR4__	/* Not a real SVR4 implementation */
X
X#	define	HAVE_UNISTD_H
X#	define	HAVE_SYS_TYPES_H
X#	define	HAVE_CTYPE_H
X/*  #	define	HAVE_SYS_TIME_H	*/
X#	define	HAVE_FCNTL_H
X#	define	HAVE_USLEEP
X#	if __DECC_VER >= 60000000
X#		define HAVE_INTTYPES_H
X#	endif /* __DECC_VER >= 60000000 */
X#	define SIZEOF_CHAR 1
X#	define SIZEOF_UNSIGNED_CHAR SIZEOF_CHAR
X#	define SIZEOF_SHORT_INT 2
X#	define SIZEOF_UNSIGNED_SHORT_INT SIZEOF_SHORT_INT
X#	define SIZEOF_INT 4
X#	define SIZEOF_UNSIGNED_INT SIZEOF_INT
X#	define SIZEOF_LONG_INT 4
X#	define SIZEOF_UNSIGNED_LONG_INT SIZEOF_LONG_INT
X#	ifdef __VAX
X#		define SIZEOF_LONG_LONG 4
X#	else /* def __VAX */
X#	endif /* def __VAX [else] */
X#	define SIZEOF_UNSIGNED_LONG_LONG SIZEOF_LONG_LONG
X#	define SIZEOF_CHAR_P 4
X
X#	include <types.h>
X#	ifndef __OFF_T
X		typedef int off_t;
X#	endif /* ndef __OFF_T */
X
X#	if defined(__alpha)
X#		define HOST_CPU	"Alpha"
X#	elif defined(__ia64)
X#		define HOST_CPU	"IA64"
X#	elif defined(__vax)
X#		define HOST_CPU	"VAX"
X#	else
X#		define HOST_CPU	"VAX(?)"
X#	endif
X#	define HOST_VENDOR "HP"
X#	define HOST_OS "VMS/OpenVMS"
X#	define RETSIGTYPE   void
X#	define	HAVE_STDARG_H
X#	define	HAVE_STDLIB_H
X#	define	HAVE_STRING_H
X#	define	HAVE_STDC_HEADERS
X#	define	STDC_HEADERS
X#	define	HAVE_UNISTD_H
X#	define	HAVE_FCNTL_H
X#	define	HAVE_DIRENT_H
X#	define	HAVE_WAIT_H
X#	define	HAVE_SYS_UTSNAME_H
X#	define	HAVE_GETCWD
X#	define	HAVE_STRERROR
X#	define	HAVE_MEMMOVE
X#	define	HAVE_MMAP
X#	define	HAVE_FLOCK
X#	define	HAVE_GETHOSTNAME
X#	define	HAVE_SELECT
X#	define	USLEEPRETURN_T	unsigned int
X
X#	define	HAVE_STRUCT_TIMEVAL
X#	define	HAVE_UTSNAME_ARCH	/* uname -p */
X
X#	define HAVE_MALLOC
X#	define HAVE_CALLOC
X#	define HAVE_REALLOC
X
X#	define	HAVE_UNAME
X#	define	HAVE_RENAME
X#	define	HAVE_PUTENV
X#	define	HAVE_STRNCPY
X
X/* 2005-11-22 SMS.  Enabled some above.  Added some below. */
X#	define	HAVE_ECVT
X#	define	HAVE_FCVT
X#	define	HAVE_GCVT
X#	define	HAVE_NICE 1
X#	define	HAVE_SELECT
X#	define	HAVE_STRCASECMP
X#	if __CRTL_VER >= 70312000
X#		define HAVE_SNPRINTF
X#	endif /* __CRTL_VER >= 70312000 */
X#	define	NICE_DECR -8
X
X/* 2005-03-14 SMS.  Need VMS-specific open() parameters. */
X#ifndef	NO_OPENFD_SRC
X#	define _OPENFD_SRC	/* Use VMS-specific _openfd() function. */
X#	define _openfd openfd_vms	/* This one. */
X#	define O_BINARY 0x0004	/* DOS-like value.  Implies "ctx=bin". */
X#endif
X
X#	define HAVE_C_BIGENDIAN
X#	define HAVE_C_BITFIELDS
X#	define BITFIELDS_LTOH
X
X/* 2006-09-14 SMS.  Various things for libfind. */
X#	define fork fork_dummy
X#	ifndef _POSIX_ARG_MAX
X#		define _POSIX_ARG_MAX 4096	/* Probably needed. */
X#	endif /* ndef _POSIX_ARG_MAX */
X#	define HAVE_DECL_STAT
X#	define HAVE_DECL_LSTAT
X
X/* 2006-09-17 SMS. */
X#	if __CRTL_VER >= 70000000
X#		define HAVE_GETPAGESIZE
X#	endif /* __CRTL_VER >= 70000000 */
X
X	extern pid_t fork_dummy(void);
X
X#endif /* defined(VMS) */
X
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif /* _SCHILY_XMCONFIG_H */
END-of-star-1.5.2/include/schily/xmconfig.h
echo x - star-1.5.2/include/schily/errno.h
sed 's/^X//' >star-1.5.2/include/schily/errno.h << 'END-of-star-1.5.2/include/schily/errno.h'
X/* @(#)errno.h	1.7 10/08/24 Copyright 2006-2010 J. Schilling */
X/*
X *	Error number related definitions
X *
X *	Copyright (c) 2006-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ERRNO_H
X#define	_SCHILY_ERRNO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	JOS
X#include <error.h>
X
X#define	ENOEXEC		EBADHEADER
X#define	EACCES		EACCESS
X#define	ENOENT		ENOFILE
X#define	EEXIST		EEXISTS
X#else
X#include <errno.h>
X
X#define	EMISSDIR	ENOENT
X#define	ENDOFFILE	EFBIG
X#endif
X
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
X#ifndef	HAVE_STRERROR
Xextern	char	*sys_errlist[];
Xextern	int	sys_nerr;
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	seterrno
Xextern	int	seterrno __PR((int));
X#endif
Xextern	int	geterrno __PR((void));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_ERRNO_H */
END-of-star-1.5.2/include/schily/errno.h
echo x - star-1.5.2/include/schily/archdefs.h
sed 's/^X//' >star-1.5.2/include/schily/archdefs.h << 'END-of-star-1.5.2/include/schily/archdefs.h'
X/* @(#)archdefs.h	1.10 12/12/03 Copyright 2006-2012 J. Schilling */
X/*
X *	Processor, instruction set and OS architecture specific defines.
X *	The information is fetched from compiler predefinitions only.
X *
X *	Copyright (c) 2006-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ARCHDEFS_H
X#define	_SCHILY_ARCHDEFS_H
X
X/*
X * The code in this file only depends on compiler predefined macros.
X * For this reason, it does not need to include schily/mconfig.h
X */
X
X#if	defined(sun) || defined(__sun) || defined(__sun__)
X#ifndef	__sun
X#define	__sun
X#endif
X#endif
X
X#if	defined(sun2)
X#ifndef	__mc68010
X#define	__mc68010
X#endif
X#endif
X
X#if	defined(mc68020) || defined(__mc68020) || defined(sun3)
X#ifndef	__mc68020
X#define	__mc68020
X#endif
X#endif
X
X#if	defined(__mc68010) || defined(__mc68020)
X#ifndef	__mc68000
X#define	__mc68000
X#endif
X#endif
X
X#if	defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86)
X#ifndef	__i386
X#define	__i386
X#endif
X#endif
X
X#if	defined(__amd64) || defined(__amd64__) || \
X	defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64)
X#ifndef	__amd64
X#define	__amd64
X#endif
X#endif
X
X#if	defined(__i386) || defined(__amd64)
X#ifndef	__x86
X#define	__x86
X#endif
X#endif
X
X#if	defined(sparc) || defined(__sparc) || defined(__sparc__)
X#ifndef	__sparc
X#define	__sparc
X#endif
X#endif
X
X#if	defined(__sparcv9) || defined(__sparcv9__)
X#ifndef	__sparc
X#define	__sparc
X#endif
X#ifndef	__sparcv9
X#define	__sparcv9
X#endif
X#endif
X
X#if	defined(__sparc) && defined(__arch64__)
X#ifndef	__sparcv9
X#define	__sparcv9
X#endif
X#endif
X
X#if	defined(SOL2) || defined(SOL2) || \
X	defined(S5R4) || defined(__S5R4) || defined(SVR4)
X#	ifndef	__SVR4
X#		define	__SVR4
X#	endif
X#endif
X
X#if	defined(sun2) || defined(sun3) || defined(__sun)
X#ifndef	__sun
X#define	__sun
X#endif
X#ifndef	__GNUC__
X#ifndef	__SUNPRO_C
X#ifdef	__SVR4
X#define	__SUNPRO_C
X#else
X#define	__SUN_C
X#endif	/* __SVR4	*/
X#endif	/* !__SUNPRO_C	*/
X#endif	/* !__GNUC__	*/
X#endif	/* __sun	*/
X
X
X/*
X * SunOS 4 specific defines
X */
X#if	defined(__sun) && !defined(__SVR4)
X
X#if	defined(__mc68000)
X#ifdef	__GNUC__
X#define	__SUNOS4_MC68000_GCC32
X#define	__JS_ARCH_DEFINED
X#endif
X#ifdef	__SUN_C
X#define	__SUNOS4_MC68000_CC32
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __mc68000	*/
X
X#if	defined(__sparc)
X#ifdef	__GNUC__
X#define	__SUNOS4_SPARC_GCC32
X#define	__JS_ARCH_DEFINED
X#endif
X#if	defined(__SUN_C) || defined(__SUNPRO_C)
X#define	__SUNOS4_SPARC_CC32
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __sparc	*/
X
X#endif	/* SunOS 4 */
X
X
X/*
X * SunOS 5 specific defines
X */
X#if	defined(__sun) && defined(__SVR4)
X
X#if	defined(__sparc)
X#ifdef	__GNUC__
X#ifdef	__sparcv9
X#define	__SUNOS5_SPARC_GCC64
X#else
X#define	__SUNOS5_SPARC_GCC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#if	defined(__SUNPRO_C)
X#ifdef	__sparcv9
X#define	__SUNOS5_SPARC_CC64
X#else
X#define	__SUNOS5_SPARC_CC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __sparc	*/
X
X#if	defined(__x86)
X#ifdef	__GNUC__
X#ifdef	__amd64
X#define	__SUNOS5_X86_GCC64
X#else
X#define	__SUNOS5_X86_GCC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#if	defined(__SUNPRO_C)
X#ifdef	__amd64
X#define	__SUNOS5_X86_CC64
X#else
X#define	__SUNOS5_X86_CC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __x86	*/
X
X#endif	/* SunOS 5 */
X
X/*
X * HP-UX specific defines
X */
X#if	defined(__hpux)
X
X#if	defined(__hppa)
X#ifdef	__GNUC__
X#ifdef	__LP64__		/* This may be wrong! */
X#define	__HPUX_HPPA_GCC64
X#else
X#define	__HPUX_HPPA_GCC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#if	!defined(__GNUC__)
X#ifdef	__LP64__
X#define	__HPUX_HPPA_CC64
X#else
X#define	__HPUX_HPPA_CC32
X#endif
X#define	__JS_ARCH_DEFINED
X#endif
X#endif	/* __hppa	*/
X
X#endif	/* HP-UX */
X
X/*
X * Linux specific defines
X */
X#if	defined(__linux)
X
X#if	defined(__arm__)
X#ifdef	__GNUC__
X#ifdef	__ARM_ARCH_5TE__
X#define	__LINUX_ARMV5TEJL_GCC32
X#define	__JS_ARCH_DEFINED
X#endif
X#endif
X#endif	/* __arm__	*/
X
X#endif	/* Linux */
X
X/*
X * MS-WIN specific defines
X *
X * cl defines one of:
X *	_M_ALPHA
X *	_M_IX86
X *	_M_AMD64
X *	_M_M68K
X *	_M_PPC		PPC in general
X *	_M_MPPC		Power Macintosh
X *	_M_MRX000	Mips
X *	_M_IA64		Itanium
X */
X#if	defined(_MSC_VER) && (defined(_X86_) || defined(_M_IX86))
X#define	__MSWIN_X86_CL32
X#define	__JS_ARCH_DEFINED
X#endif
X
X#if defined(__CYGWIN32__) || defined(__CYGWIN__)
X#define	__CYGWIN_X86_GCC
X#define	__JS_ARCH_DEFINED
X#endif
X
X#endif	/* _SCHILY_ARCHDEFS_H */
END-of-star-1.5.2/include/schily/archdefs.h
echo x - star-1.5.2/include/schily/xconfig.h
sed 's/^X//' >star-1.5.2/include/schily/xconfig.h << 'END-of-star-1.5.2/include/schily/xconfig.h'
X/* @(#)xconfig.h	1.11 12/12/03 Copyright 1995-2012 J. Schilling */
X/*
X *	This file either includes the dynamic or manual autoconf stuff.
X *
X *	Copyright (c) 1995-2012 J. Schilling
X *
X *	This file is included from <schily/mconfig.h> and usually
X *	includes $(SRCROOT)/incs/$(OARCH)/xconfig.h via
X *	-I$(SRCROOT)/incs/$(OARCH)/
X *
X *	Use only cpp instructions.
X *
X *	NOTE: SING: (Schily Is Not Gnu)
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_XCONFIG_H
X#define	_SCHILY_XCONFIG_H
X
X/*
X * This hack that is needed as long as VMS has no POSIX shell.
X * It will go away soon. VMS users: in future you need to specify:
X * cc -DUSE_STATIC_CONF
X */
X#ifdef	VMS
X#	define	USE_STATIC_CONF
X#endif
X
X#ifdef	NO_STATIC_CONF
X#undef	USE_STATIC_CONF
X#endif
X
X#ifdef	USE_STATIC_CONF
X#	include <schily/xmconfig.h>	/* The static autoconf stuff */
X#else	/* USE_STATIC_CONF */
X
X
X#ifdef	SCHILY_BUILD	/* #defined by Schily makefile system */
X	/*
X	 * Include $(SRCROOT)/incs/$(OARCH)/xconfig.h via
X	 * -I$(SRCROOT)/incs/$(OARCH)/
X	 */
X#	include <xconfig.h>	/* The current dynamic autoconf stuff */
X#else	/* !SCHILY_BUILD */
X/*
X * The stuff for static compilation. Include files from a previous
X * dynamic autoconfiguration.
X */
X#ifdef	__SUNOS5_SPARC_CC32
X#include <schily/sparc-sunos5-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_CC64
X#include <schily/sparc-sunos5-cc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC32
X#include <schily/sparc-sunos5-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_SPARC_GCC64
X#include <schily/sparc-sunos5-gcc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC32
X#include <schily/i386-sunos5-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_CC64
X#include <schily/i386-sunos5-cc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC32
X#include <schily/i386-sunos5-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__SUNOS5_X86_GCC64
X#include <schily/i386-sunos5-gcc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__SUNOS4_MC68000_CC32
X#ifdef	__mc68020
X#include <schily/mc68020-sunos4-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#endif
X#ifdef	__SUNOS4_MC68000_GCC32
X#ifdef	__mc68020
X#include <schily/mc68020-sunos4-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#endif
X
X#ifdef	__HPUX_HPPA_CC32
X#include <schily/hppa-hp-ux-cc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_CC64
X#include <schily/hppa-hp-ux-cc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC32
X#include <schily/hppa-hp-ux-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X#ifdef	__HPUX_HPPA_GCC64
X#include <schily/hppa-hp-ux-gcc64/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__LINUX_ARMV5TEJL_GCC32
X#include <schily/armv5tejl-linux-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__MSWIN_X86_CL32
X#include <schily/i686-cygwin32_nt-cl/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifdef	__CYGWIN_X86_GCC
X#include <schily/i686-cygwin32_nt-gcc/xconfig.h>
X#define	__JS_ARCH_CONF_INCL
X#endif
X
X#ifndef	__JS_ARCH_CONF_INCL
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if none of the above is defined. And that's  what we want.
X */
XError unconfigured architecture
X
X#include <schily/err_arch.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#endif	/* SCHILY_BUILD */
X
X#endif	/* USE_STATIC_CONF */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X/*
X * Fake in order to keep the silly hdrchk(1) quiet.
X */
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_XCONFIG_H */
END-of-star-1.5.2/include/schily/xconfig.h
echo x - star-1.5.2/include/schily/Makefile
sed 's/^X//' >star-1.5.2/include/schily/Makefile << 'END-of-star-1.5.2/include/schily/Makefile'
X#ident @(#)Makefile	1.21 09/07/10 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		align.h
X
Xinclude Targets
XXMK_FILE=	$(X_MK_LIST)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/include/schily/Makefile
echo x - star-1.5.2/include/schily/align.mk
sed 's/^X//' >star-1.5.2/include/schily/align.mk << 'END-of-star-1.5.2/include/schily/align.mk'
X#ident @(#)align.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		align.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/align.mk
echo x - star-1.5.2/include/schily/alloca.mk
sed 's/^X//' >star-1.5.2/include/schily/alloca.mk << 'END-of-star-1.5.2/include/schily/alloca.mk'
X#ident @(#)alloca.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		alloca.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/alloca.mk
echo x - star-1.5.2/include/schily/archdefs.mk
sed 's/^X//' >star-1.5.2/include/schily/archdefs.mk << 'END-of-star-1.5.2/include/schily/archdefs.mk'
X#ident @(#)archdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		archdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/archdefs.mk
echo x - star-1.5.2/include/schily/avoffset.mk
sed 's/^X//' >star-1.5.2/include/schily/avoffset.mk << 'END-of-star-1.5.2/include/schily/avoffset.mk'
X#ident @(#)avoffset.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		avoffset.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/avoffset.mk
echo x - star-1.5.2/include/schily/btorder.mk
sed 's/^X//' >star-1.5.2/include/schily/btorder.mk << 'END-of-star-1.5.2/include/schily/btorder.mk'
X#ident @(#)btorder.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		btorder.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/btorder.mk
echo x - star-1.5.2/include/schily/ccomdefs.mk
sed 's/^X//' >star-1.5.2/include/schily/ccomdefs.mk << 'END-of-star-1.5.2/include/schily/ccomdefs.mk'
X#ident @(#)ccomdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ccomdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/ccomdefs.mk
echo x - star-1.5.2/include/schily/deflts.mk
sed 's/^X//' >star-1.5.2/include/schily/deflts.mk << 'END-of-star-1.5.2/include/schily/deflts.mk'
X#ident @(#)deflts.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		deflts.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/deflts.mk
echo x - star-1.5.2/include/schily/device.mk
sed 's/^X//' >star-1.5.2/include/schily/device.mk << 'END-of-star-1.5.2/include/schily/device.mk'
X#ident @(#)device.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		device.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/device.mk
echo x - star-1.5.2/include/schily/dirent.mk
sed 's/^X//' >star-1.5.2/include/schily/dirent.mk << 'END-of-star-1.5.2/include/schily/dirent.mk'
X#ident @(#)dirent.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		dirent.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/dirent.mk
echo x - star-1.5.2/include/schily/errno.mk
sed 's/^X//' >star-1.5.2/include/schily/errno.mk << 'END-of-star-1.5.2/include/schily/errno.mk'
X#ident @(#)errno.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		errno.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/errno.mk
echo x - star-1.5.2/include/schily/fcntl.mk
sed 's/^X//' >star-1.5.2/include/schily/fcntl.mk << 'END-of-star-1.5.2/include/schily/fcntl.mk'
X#ident @(#)fcntl.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fcntl.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/fcntl.mk
echo x - star-1.5.2/include/schily/fnmatch.mk
sed 's/^X//' >star-1.5.2/include/schily/fnmatch.mk << 'END-of-star-1.5.2/include/schily/fnmatch.mk'
X#ident @(#)fnmatch.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fnmatch.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/fnmatch.mk
echo x - star-1.5.2/include/schily/getargs.mk
sed 's/^X//' >star-1.5.2/include/schily/getargs.mk << 'END-of-star-1.5.2/include/schily/getargs.mk'
X#ident @(#)getargs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		getargs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/getargs.mk
echo x - star-1.5.2/include/schily/getcwd.mk
sed 's/^X//' >star-1.5.2/include/schily/getcwd.mk << 'END-of-star-1.5.2/include/schily/getcwd.mk'
X#ident @(#)getcwd.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		getcwd.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/getcwd.mk
echo x - star-1.5.2/include/schily/intcvt.mk
sed 's/^X//' >star-1.5.2/include/schily/intcvt.mk << 'END-of-star-1.5.2/include/schily/intcvt.mk'
X#ident @(#)intcvt.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		intcvt.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/intcvt.mk
echo x - star-1.5.2/include/schily/jmpdefs.mk
sed 's/^X//' >star-1.5.2/include/schily/jmpdefs.mk << 'END-of-star-1.5.2/include/schily/jmpdefs.mk'
X#ident @(#)jmpdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		jmpdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/jmpdefs.mk
echo x - star-1.5.2/include/schily/types.mk
sed 's/^X//' >star-1.5.2/include/schily/types.mk << 'END-of-star-1.5.2/include/schily/types.mk'
X#ident @(#)types.mk	1.1 07/01/03 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		types.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/types.mk
echo x - star-1.5.2/include/schily/libport.mk
sed 's/^X//' >star-1.5.2/include/schily/libport.mk << 'END-of-star-1.5.2/include/schily/libport.mk'
X#ident @(#)libport.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		libport.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/libport.mk
echo x - star-1.5.2/include/schily/librmt.mk
sed 's/^X//' >star-1.5.2/include/schily/librmt.mk << 'END-of-star-1.5.2/include/schily/librmt.mk'
X#ident @(#)librmt.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		librmt.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/librmt.mk
echo x - star-1.5.2/include/schily/maxpath.mk
sed 's/^X//' >star-1.5.2/include/schily/maxpath.mk << 'END-of-star-1.5.2/include/schily/maxpath.mk'
X#ident @(#)maxpath.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		maxpath.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/maxpath.mk
echo x - star-1.5.2/include/schily/mconfig.mk
sed 's/^X//' >star-1.5.2/include/schily/mconfig.mk << 'END-of-star-1.5.2/include/schily/mconfig.mk'
X#ident @(#)mconfig.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		mconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/mconfig.mk
echo x - star-1.5.2/include/schily/mman.mk
sed 's/^X//' >star-1.5.2/include/schily/mman.mk << 'END-of-star-1.5.2/include/schily/mman.mk'
X#ident @(#)mman.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		mman.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/mman.mk
echo x - star-1.5.2/include/schily/mtio.mk
sed 's/^X//' >star-1.5.2/include/schily/mtio.mk << 'END-of-star-1.5.2/include/schily/mtio.mk'
X#ident @(#)mtio.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		mtio.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/mtio.mk
echo x - star-1.5.2/include/schily/nlsdefs.mk
sed 's/^X//' >star-1.5.2/include/schily/nlsdefs.mk << 'END-of-star-1.5.2/include/schily/nlsdefs.mk'
X#ident @(#)nlsdefs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		nlsdefs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/nlsdefs.mk
echo x - star-1.5.2/include/schily/patmatch.mk
sed 's/^X//' >star-1.5.2/include/schily/patmatch.mk << 'END-of-star-1.5.2/include/schily/patmatch.mk'
X#ident @(#)patmatch.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		patmatch.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/patmatch.mk
echo x - star-1.5.2/include/schily/prototyp.mk
sed 's/^X//' >star-1.5.2/include/schily/prototyp.mk << 'END-of-star-1.5.2/include/schily/prototyp.mk'
X#ident @(#)prototyp.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		prototyp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/prototyp.mk
echo x - star-1.5.2/include/schily/rmtio.mk
sed 's/^X//' >star-1.5.2/include/schily/rmtio.mk << 'END-of-star-1.5.2/include/schily/rmtio.mk'
X#ident @(#)rmtio.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		rmtio.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/rmtio.mk
echo x - star-1.5.2/include/schily/schily.mk
sed 's/^X//' >star-1.5.2/include/schily/schily.mk << 'END-of-star-1.5.2/include/schily/schily.mk'
X#ident @(#)schily.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		schily.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/schily.mk
echo x - star-1.5.2/include/schily/sigblk.mk
sed 's/^X//' >star-1.5.2/include/schily/sigblk.mk << 'END-of-star-1.5.2/include/schily/sigblk.mk'
X#ident @(#)sigblk.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sigblk.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/sigblk.mk
echo x - star-1.5.2/include/schily/signal.mk
sed 's/^X//' >star-1.5.2/include/schily/signal.mk << 'END-of-star-1.5.2/include/schily/signal.mk'
X#ident @(#)signal.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		signal.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/signal.mk
echo x - star-1.5.2/include/schily/standard.mk
sed 's/^X//' >star-1.5.2/include/schily/standard.mk << 'END-of-star-1.5.2/include/schily/standard.mk'
X#ident @(#)standard.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		standard.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/standard.mk
echo x - star-1.5.2/include/schily/stat.mk
sed 's/^X//' >star-1.5.2/include/schily/stat.mk << 'END-of-star-1.5.2/include/schily/stat.mk'
X#ident @(#)stat.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stat.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/stat.mk
echo x - star-1.5.2/include/schily/stdlib.mk
sed 's/^X//' >star-1.5.2/include/schily/stdlib.mk << 'END-of-star-1.5.2/include/schily/stdlib.mk'
X#ident @(#)stdlib.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stdlib.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/stdlib.mk
echo x - star-1.5.2/include/schily/stkframe.mk
sed 's/^X//' >star-1.5.2/include/schily/stkframe.mk << 'END-of-star-1.5.2/include/schily/stkframe.mk'
X#ident @(#)stkframe.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stkframe.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/stkframe.mk
echo x - star-1.5.2/include/schily/string.mk
sed 's/^X//' >star-1.5.2/include/schily/string.mk << 'END-of-star-1.5.2/include/schily/string.mk'
X#ident @(#)string.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		string.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/string.mk
echo x - star-1.5.2/include/schily/termcap.mk
sed 's/^X//' >star-1.5.2/include/schily/termcap.mk << 'END-of-star-1.5.2/include/schily/termcap.mk'
X#ident @(#)termcap.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		termcap.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/termcap.mk
echo x - star-1.5.2/include/schily/termios.mk
sed 's/^X//' >star-1.5.2/include/schily/termios.mk << 'END-of-star-1.5.2/include/schily/termios.mk'
X#ident @(#)termios.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		termios.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/termios.mk
echo x - star-1.5.2/include/schily/time.mk
sed 's/^X//' >star-1.5.2/include/schily/time.mk << 'END-of-star-1.5.2/include/schily/time.mk'
X#ident @(#)time.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		time.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/time.mk
echo x - star-1.5.2/include/schily/param.h
sed 's/^X//' >star-1.5.2/include/schily/param.h << 'END-of-star-1.5.2/include/schily/param.h'
X/* @(#)param.h	1.7 12/01/22 Copyright 2006-2011 J. Schilling */
X/*
X *	Abstraction from sys/param.h
X *
X *	Copyright (c) 2006-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_PARAM_H
X#define	_SCHILY_PARAM_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * Let us include system defined types first.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifdef	HAVE_SYS_PARAM_H
X#ifndef	_INCL_SYS_PARAM_H
X#include <sys/param.h>		/* Must be before limits.h */
X#define	_INCL_SYS_PARAM_H
X#endif
X#endif
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>	/* For _SC_CLK_TCK */
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* For _SC_CLK_TCK */
X#endif
X
X#ifndef	NBBY
X#define	NBBY		8	/* Number of bits per byte */
X#endif
X
X#ifndef	DEV_BSIZE
X#define	DEV_BSIZE	512	/* UNIX Device Block size */
X#endif
X
X/*
X * NODEV may be in sys/param.h keep this definition past the include.
X */
X#ifndef	NODEV
X#define	NODEV	((dev_t)-1L)
X#endif
X
X#ifndef	HZ
X#if	defined(_SC_CLK_TCK)
X#define	HZ	((clock_t)sysconf(_SC_CLK_TCK))
X#else
X#define	HZ	100
X#endif
X#endif
X
X/*
X * Do we need to define _XOPEN_SOURCE to get NZERO?
X * On Linux, it is needed but on Linux NZERO is 20.
X */
X#ifndef	NZERO		/* for nice(2) */
X#define	NZERO	20
X#endif
X
X#endif	/* _SCHILY_PARAM_H */
END-of-star-1.5.2/include/schily/param.h
echo x - star-1.5.2/include/schily/unistd.mk
sed 's/^X//' >star-1.5.2/include/schily/unistd.mk << 'END-of-star-1.5.2/include/schily/unistd.mk'
X#ident @(#)unistd.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		unistd.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/unistd.mk
echo x - star-1.5.2/include/schily/utime.mk
sed 's/^X//' >star-1.5.2/include/schily/utime.mk << 'END-of-star-1.5.2/include/schily/utime.mk'
X#ident @(#)utime.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		utime.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/utime.mk
echo x - star-1.5.2/include/schily/utypes.mk
sed 's/^X//' >star-1.5.2/include/schily/utypes.mk << 'END-of-star-1.5.2/include/schily/utypes.mk'
X#ident @(#)utypes.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		utypes.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/utypes.mk
echo x - star-1.5.2/include/schily/varargs.mk
sed 's/^X//' >star-1.5.2/include/schily/varargs.mk << 'END-of-star-1.5.2/include/schily/varargs.mk'
X#ident @(#)varargs.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		varargs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/varargs.mk
echo x - star-1.5.2/include/schily/wait.mk
sed 's/^X//' >star-1.5.2/include/schily/wait.mk << 'END-of-star-1.5.2/include/schily/wait.mk'
X#ident @(#)wait.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		wait.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/wait.mk
echo x - star-1.5.2/include/schily/xconfig.mk
sed 's/^X//' >star-1.5.2/include/schily/xconfig.mk << 'END-of-star-1.5.2/include/schily/xconfig.mk'
X#ident @(#)xconfig.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		xconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/xconfig.mk
echo x - star-1.5.2/include/schily/types.h
sed 's/^X//' >star-1.5.2/include/schily/types.h << 'END-of-star-1.5.2/include/schily/types.h'
X/* @(#)types.h	1.5 09/10/22 Copyright 2006-2009 J. Schilling */
X/*
X *	Abstraction from sys/types.h
X *
X *	Copyright (c) 2006-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_TYPES_H
X#define	_SCHILY_TYPES_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_TYPES_H
X#ifndef	_INCL_SYS_TYPES_H
X#include <sys/types.h>
X#define	_INCL_SYS_TYPES_H
X#endif
X#else
X#ifdef	HAVE_TYPES_H
X#ifndef	_INCL_TYPES_H
X#include <types.h>
X#define	_INCL_TYPES_H
X#endif
X#endif
X#endif
X
X#ifdef	HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>		/* For offsetof(), ptrdiff_t, wchar_t, size_t */
X#define	_INCL_STDDEF_H
X#endif
X#endif
X
X#endif	/* _SCHILY_TYPES_H */
END-of-star-1.5.2/include/schily/types.h
echo x - star-1.5.2/include/schily/xmconfig.mk
sed 's/^X//' >star-1.5.2/include/schily/xmconfig.mk << 'END-of-star-1.5.2/include/schily/xmconfig.mk'
X#ident @(#)xmconfig.mk	1.1 06/12/17 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		xmconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/xmconfig.mk
echo x - star-1.5.2/include/schily/iconv.h
sed 's/^X//' >star-1.5.2/include/schily/iconv.h << 'END-of-star-1.5.2/include/schily/iconv.h'
X/* @(#)iconv.h	1.4 08/01/02 Copyright 2007 J. Schilling */
X/*
X *	Abstraction from iconv.h
X *
X *	Copyright (c) 2007 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ICONV_H
X#define	_SCHILY_ICONV_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_ICONV_H
X#ifndef	_INCL_ICONV_H
X#include <iconv.h>
X#define	_INCL_ICONV_H
X#endif
X#else
X#undef	USE_ICONV
X#endif
X
X/*
X * Libiconv on Cygwin is not autoconf-friendly.
X * iconv.h #defined iconv to libiconv
X * We would need a AC_CHECK_FUNC() macro that allows to specify includefiles.
X */
X#if	defined(HAVE_LIBICONV) && defined(HAVE_LIBICONV_OPEN) && \
X	defined(HAVE_LIBICONV_CLOSE) && \
X	defined(iconv) && defined(iconv_open) && defined(iconv_close)
X#	ifndef	HAVE_ICONV
X#	define	HAVE_ICONV
X#	endif
X#	ifndef	HAVE_ICONV_OPEN
X#	define	HAVE_ICONV_OPEN
X#	endif
X#	ifndef	HAVE_ICONV_CLOSE
X#	define	HAVE_ICONV_CLOSE
X#	endif
X#endif
X
X#if	!defined(HAVE_ICONV_OPEN) || !defined(HAVE_ICONV_CLOSE)
X#	undef	HAVE_ICONV
X#endif
X
X#ifndef	HAVE_ICONV
X#undef	USE_ICONV
X#endif
X
X#ifdef	NO_ICONV
X#undef	USE_ICONV
X#endif
X
X#ifndef	USE_ICONV
X#undef	iconv_t
X#define	iconv_t		char *
X#endif
X
X
X#endif	/* _SCHILY_ICONV_H */
END-of-star-1.5.2/include/schily/iconv.h
echo x - star-1.5.2/include/schily/param.mk
sed 's/^X//' >star-1.5.2/include/schily/param.mk << 'END-of-star-1.5.2/include/schily/param.mk'
X#ident @(#)param.mk	1.1 07/01/03 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		param.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/param.mk
echo x - star-1.5.2/include/schily/wchar.h
sed 's/^X//' >star-1.5.2/include/schily/wchar.h << 'END-of-star-1.5.2/include/schily/wchar.h'
X/* @(#)wchar.h	1.21 11/07/19 Copyright 2007-2011 J. Schilling */
X/*
X *	Abstraction from wchar.h
X *
X *	Copyright (c) 2007-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_WCHAR_H
X#define	_SCHILY_WCHAR_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_STDLIB_H
X#include <schily/stdlib.h>	/* for MB_CUR_MAX, mbtowc()/wctomb() */
X#endif
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifdef	HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>		/* Needed for e.g. size_t (POSIX)  */
X#define	_INCL_STDDEF_H
X#endif
X#endif
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>	/* Needed for e.g. FILE (POSIX)	   */
X#endif
X#ifndef	_SCHILY_VARARGS_H
X#include <schily/varargs.h>	/* Needed for e.g. va_list (POSIX) */
X#endif
X
X
X#if	!defined(HAVE_MBTOWC) || !defined(HAVE_WCTOMB)
X#if	defined(HAVE_MBRTOWC) && defined(HAVE_WCRTOMB)
X#	define	mbtowc(wp, cp, len)	mbrtowc(wp, cp, len, (mbstate_t *)0)
X#	define	wctomb(cp, wc)		wcrtomb(cp, wc, (mbstate_t *)0)
X#else
X#	define	NO_WCHAR
X#endif
X#endif
X
X#ifdef	HAVE_WCHAR_H
X
X#ifndef	_INCL_WCHAR_H
X#include <wchar.h>
X#define	_INCL_WCHAR_H
X#endif
X
X#ifndef	HAVE_MBSINIT
X#define	mbsinit(sp)			((int)((sp) == 0))
X#endif
X#ifndef	HAVE_MBRTOWC
X#define	mbrtowc(wp, cp, len, sp)	mbtowc(wp, cp, len)
X#endif
X#ifndef	HAVE_WCRTOMB
X#define	wcrtomb(cp, wc, sp)		wctomb(cp, wc)
X#endif
X
X#ifndef	USE_WCHAR
X#define	USE_WCHAR
X#endif
X
X#else	/* HAVE_WCHAR_H */
X
X#undef	USE_WCHAR
X#endif	/* !HAVE_WCHAR_H */
X
X#if	!defined(HAVE_WCTYPE_H) && !defined(HAVE_ISWPRINT)
X#undef	USE_WCHAR
X#undef	USE_WCTYPE
X#endif
X
X#ifdef	NO_WCTYPE
X#undef	USE_WCHAR
X#undef	USE_WCTYPE
X#endif
X
X#ifdef	NO_WCHAR
X#undef	USE_WCHAR
X#undef	USE_WCTYPE
X#endif
X
X#ifndef	USE_WCHAR
X
X/*
X * We either don't have wide chars or we don't use them...
X */
X#undef	wchar_t
X#define	wchar_t	char
X#undef	wint_t
X#define	wint_t	int
X/*
X * We cannot define wctype_t here because of a bug in Linux (missing xctype_t
X * definition in wchar.h
X */
X#ifdef	__never__
X#undef	wctype_t
X#define	wctype_t	int
X#endif
X
X#undef	WEOF
X#define	WEOF	((wint_t)-1)
X
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>	/* For TYPE_MAXVAL() */
X#endif
X
X#undef	WCHAR_MAX
X#define	WCHAR_MAX	TYPE_MAXVAL(wchar_t)
X#undef	WCHAR_MIN
X#define	WCHAR_MIN	TYPE_MINVAL(wchar_t)
X
X#undef	WINT_MAX
X#define	WINT_MAX	TYPE_MAXVAL(wint_t)
X#undef	WINT_MIN
X#define	WINT_MIN	TYPE_MINVAL(wint_t)
X
X#undef	WCTYPE_MAX
X#define	WCTYPE_MAX	TYPE_MAXVAL(wctype_t)
X#undef	WCTYPE_MIN
X#define	WCTYPE_MIN	TYPE_MINVAL(wctype_t)
X
X#undef	SIZEOF_WCHAR_T
X#define	SIZEOF_WCHAR_T	SIZEOF_CHAR
X
X#undef	MB_CUR_MAX
X#define	MB_CUR_MAX	1
X#undef	MB_LEN_MAX
X#define	MB_LEN_MAX	1
X
X/*
X * The mbtowc() for the non-multibyte case could be as simple as
X *
X * #define	mbtowc(wp, cp, len)	(*(wp) = *(cp), 1)
X *
X * but Mac OS X forces us to do many mbtowc(NULL, NULL, 0) calls in order
X * to reset the internal state. On other platforms that do not support
X * wide chars, NULL may be defined as (void *)0, so we need to check
X * for "wp" != NULL and to cast "wp" and "cp" to their expected types.
X */
X#undef	mbtowc
X#define	mbtowc(wp, cp, len)	((void)((wp) ? \
X				*(wchar_t *)(wp) = *(char *)(cp) : 1), 1)
X#undef	mbrtowc
X#define	mbrtowc(wp, cp, len, sp) ((void)((wp) ? \
X				*(wchar_t *)(wp) = *(char *)(cp) : 1), 1)
X#undef	wctomb
X#define	wctomb(cp, wc)		(*(cp) = wc, 1)
X#undef	wcrtomb
X#define	wcrtomb(cp, wc, sp)	(*(cp) = wc, 1)
X
X#undef	mbsinit
X#define	mbsinit(sp)		((int)((sp) == 0))
X
X#undef	wcwidth
X#define	wcwidth(wc)		(1)
X
X#else	/* USE_WCHAR */
X
X#ifndef	HAVE_WCWIDTH
X#undef	wcwidth
X#define	wcwidth(wc)		(1)
X#endif
X
X#endif	/* USE_WCHAR */
X
X#endif	/* _SCHILY_WCHAR_H */
END-of-star-1.5.2/include/schily/wchar.h
echo x - star-1.5.2/include/schily/wchar.mk
sed 's/^X//' >star-1.5.2/include/schily/wchar.mk << 'END-of-star-1.5.2/include/schily/wchar.mk'
X#ident @(#)wchar.mk	1.1 07/01/24 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		wchar.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/wchar.mk
echo x - star-1.5.2/include/schily/schilyp.h
sed 's/^X//' >star-1.5.2/include/schily/schilyp.h << 'END-of-star-1.5.2/include/schily/schilyp.h'
X/* @(#)schilyp.h	1.2 09/06/06 Copyright 2007-2009 J. Schilling */
X/*
X *	Include definitions for libschily and define *printf() -> js_*printf()
X *
X *	Copyright (c) 2007-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SCHILYP_H
X#define	_SCHILY_SCHILYP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_SCHILY_H
X#include <schily/schily.h>
X#endif
X
X/*
X * Always use js_*printf()
X */
X#undef	fprintf
X#define	fprintf		js_fprintf
X#undef	printf
X#define	printf		js_printf
X#undef	snprintf
X#define	snprintf	js_snprintf
X#undef	sprintf
X#define	sprintf		js_sprintf
X
X#endif	/* _SCHILY_SCHILYP_H */
END-of-star-1.5.2/include/schily/schilyp.h
echo x - star-1.5.2/include/schily/schilyp.mk
sed 's/^X//' >star-1.5.2/include/schily/schilyp.mk << 'END-of-star-1.5.2/include/schily/schilyp.mk'
X#ident @(#)schilyp.mk	1.1 07/02/13 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		schilyp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/schilyp.mk
echo x - star-1.5.2/include/schily/find.h
sed 's/^X//' >star-1.5.2/include/schily/find.h << 'END-of-star-1.5.2/include/schily/find.h'
X/* @(#)find.h	1.23 11/08/05 Copyright 2005-2011 J. Schilling */
X/*
X *	Definitions for libfind users.
X *
X *	Copyright (c) 2004-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_FIND_H
X#define	_SCHILY_FIND_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef _SCHILY_STAT_H
X#include <schily/stat.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xtypedef struct find_args {
X	int	Argc;		/* A copy of argc		*/
X	char	**Argv;		/* A copy of argv		*/
X	FILE	*std[3];	/* To redirect stdin/stdout/err	*/
X	int	primtype;	/* The type of the last primary	*/
X	BOOL	found_action;	/* -print/-ls/-exec found	*/
X	int	patlen;		/* strlen() for longest pattern	*/
X	int	walkflags;	/* Walkflags modifed by parser	*/
X	int	maxdepth;	/* -mindepth arg		*/
X	int	mindepth;	/* -maxdepth arg		*/
X	struct plusargs *plusp;	/* List of -exec {} + commands	*/
X	void	*jmp;		/* Used internally by parser	*/
X	int	error;		/* Error code from find_parse()	*/
X} finda_t;
X
X/*
X * finda_t->primtype is set to ENDARGS by find_parse() if a complete expression
X * could be parsed.
X */
X#define	FIND_ENDARGS	1000	/* Found End of Arg Vector		*/
X#define	FIND_ERRARG	1001	/* Parser abort by -help or error	*/
X
X/*
X * Flags used for struct WALK->pflags:
X */
X#define	PF_ACL		0x00001	/* Check ACL from struct WALK->pflags	*/
X#define	PF_HAS_ACL	0x10000	/* This file has ACL			*/
X#define	PF_XATTR	0x00002	/* Check XATTR from struct WALK->pflags	*/
X#define	PF_HAS_XATTR	0x20000	/* This file has XATTR			*/
X
X#ifndef	FIND_NODE
X#define	findn_t	void
X#endif
X
X#ifndef	__sqfun_t_defined
Xtypedef	int	(*sqfun_t)	__PR((void *arg));
X#define	__sqfun_t_defined
X#endif
X
X#ifndef	__squit_t_defined
X
Xtypedef struct {
X	sqfun_t	quitfun;	/* Function to query for shell signal quit   */
X	void	*qfarg;		/* Generic arg for shell builtin quit fun    */
X} squit_t;
X
X#define	__squit_t_defined
X#endif
X
X
Xextern	void	find_argsinit	__PR((finda_t *fap));
Xextern	void	find_timeinit	__PR((time_t __now));
Xextern	findn_t	*find_printnode	__PR((void));
Xextern	findn_t	*find_addprint	__PR((findn_t *np, finda_t *fap));
Xextern	void	find_free	__PR((findn_t *t, finda_t *fap));
Xextern	int	find_token	__PR((char *word));
Xextern	char	*find_tname	__PR((int op));
Xextern	findn_t	*find_parse	__PR((finda_t *fap));
Xextern	void	find_firstprim	__PR((int *pac, char *const **pav));
X
Xextern	BOOL	find_primary	__PR((findn_t *t, int op));
Xextern	BOOL	find_pname	__PR((findn_t *t, char *word));
Xextern	BOOL	find_hasprint	__PR((findn_t *t));
Xextern	BOOL	find_hasexec	__PR((findn_t *t));
Xextern	BOOL	find_expr	__PR((char *f, char *ff, struct stat *fs,
X					struct WALK *state, findn_t *t));
X
Xextern	int	find_plusflush	__PR((void *p, struct WALK *state));
Xextern	void	find_usage	__PR((FILE *f));
Xextern	int	find_main	__PR((int ac, char **av, char **ev,
X					FILE *std[3], squit_t *__quit));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_FIND_H */
END-of-star-1.5.2/include/schily/find.h
echo x - star-1.5.2/include/schily/iconv.mk
sed 's/^X//' >star-1.5.2/include/schily/iconv.mk << 'END-of-star-1.5.2/include/schily/iconv.mk'
X#ident @(#)iconv.mk	1.1 07/05/04 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		iconv.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/iconv.mk
echo x - star-1.5.2/include/schily/siconv.h
sed 's/^X//' >star-1.5.2/include/schily/siconv.h << 'END-of-star-1.5.2/include/schily/siconv.h'
X/* @(#)siconv.h	1.5 10/12/20 Copyright 2007-2010 J. Schilling */
X/*
X *	Definitions fur users of libsiconv
X *
X *	Copyright (c) 2007-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SICONV_H
X#define	_SCHILY_SICONV_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X#ifndef _SCHILY_ICONV_H
X#include <schily/iconv.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X
Xtypedef struct siconv_table	siconvt_t;
Xstruct siconv_table {
X	char		*sic_name;		/* SICONV charset name	*/
X	UInt16_t	*sic_cs2uni;		/* Charset -> Unicode	*/
X	UInt8_t		**sic_uni2cs;		/* Unicode -> Charset	*/
X	iconv_t		sic_cd2uni;		/* iconv Charset -> Unicode */
X	iconv_t		sic_uni2cd;		/* iconv Unicode -> Charset */
X	siconvt_t	*sic_alt;		/* alternate iconv tab	*/
X	siconvt_t	*sic_next;		/* Next table		*/
X	int		sic_refcnt;		/* Reference count	*/
X};
X
X#define	use_iconv(t)	((t)->sic_cd2uni != NULL)
X
X#define	sic_c2uni(t, c)	((t)->sic_cs2uni[c])
X#define	sic_uni2c(t, c)	((t)->sic_uni2cs[((c) >> 8) & 0xFF][(c) & 0xFF])
X
Xextern int		sic_list		__PR((FILE *));
Xextern siconvt_t	*sic_open		__PR((char *));
Xextern const char	*sic_base		__PR((void));
Xextern int 		sic_close		__PR((siconvt_t *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_SICONV_H */
END-of-star-1.5.2/include/schily/siconv.h
echo x - star-1.5.2/include/schily/siconv.mk
sed 's/^X//' >star-1.5.2/include/schily/siconv.mk << 'END-of-star-1.5.2/include/schily/siconv.mk'
X#ident @(#)siconv.mk	1.1 07/05/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		siconv.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/siconv.mk
echo x - star-1.5.2/include/schily/ioctl.mk
sed 's/^X//' >star-1.5.2/include/schily/ioctl.mk << 'END-of-star-1.5.2/include/schily/ioctl.mk'
X#ident @(#)ioctl.mk	1.1 07/05/24 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ioctl.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/ioctl.mk
echo x - star-1.5.2/include/schily/checkerr.h
sed 's/^X//' >star-1.5.2/include/schily/checkerr.h << 'END-of-star-1.5.2/include/schily/checkerr.h'
X/* @(#)checkerr.h	1.14 12/11/13 Copyright 2003-2012 J. Schilling */
X/*
X *	Generic error control for programs that do file i/o.
X *	The error control is usually used by archiving programs.
X *
X *	The current version does not provide a stable interface.
X *	It does not support multi-threaded programs and it may call
X *	comerr() from the parser. If you use the code before there is
X *	an official stable and "library-compliant" interface, be careful
X *	and watch for changes.
X *
X *	Copyright (c) 2003-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_CHECKERR_H
X#define	_SCHILY_CHECKERR_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_STANDARD_H
X#include <schily/standard.h>
X#endif
X#ifndef	_SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Error conditions handled by error control.
X */
X#define	E_STAT		0x0001		/* Could not stat(2) file	   */
X#define	E_GETACL	0x0002		/* Could not retrieve ACL info	   */
X#define	E_OPEN		0x0004		/* Could not open file		   */
X#define	E_READ		0x0008		/* Could not read file		   */
X#define	E_WRITE		0x0010		/* Could not write file		   */
X#define	E_GROW		0x0020		/* File did grow during backup	   */
X#define	E_SHRINK	0x0040		/* File did shrink during backup   */
X#define	E_MISSLINK	0x0080		/* Missing hard link(s) for file   */
X#define	E_NAMETOOLONG	0x0100		/* File name too long for archive  */
X#define	E_FILETOOBIG	0x0200		/* File too big for archive	   */
X#define	E_SPECIALFILE	0x0400		/* Improper file type for archive  */
X#define	E_READLINK	0x0800		/* Could not read symbolic link	   */
X#define	E_GETXATTR	0x1000		/* Could not get xattr		   */
X#define	E_CHDIR		0x2000		/* Could not chdir()		   */
X
X/*
X * Currently unused: 0x4000 .. 0x8000
X */
X
X#define	E_SETTIME	0x10000		/* Could not set file times	   */
X#define	E_SETMODE	0x20000		/* Could not set access modes	   */
X#define	E_SECURITY	0x40000		/* Skipped for security reasons	   */
X#define	E_LSECURITY	0x80000		/* Link skipped for security	   */
X#define	E_SAMEFILE	0x100000	/* Skipped from/to identical	   */
X#define	E_BADACL	0x200000	/* ACL string conversion error	   */
X#define	E_SETACL	0x400000	/* Could not set ACL for file	   */
X#define	E_SETXATTR	0x800000	/* Could not set xattr		   */
X
X/*
X * Currently unused: 0x1000000 .. 0x8000000
X */
X
X#define	E_DIFF		0x10000000	/* Diffs encountered		   */
X#define	E_WARN		0x20000000	/* Print this error but do exit(0) */
X#define	E_ABORT		0x40000000	/* Abort on this error		   */
X#define	E_EXT		0x80000000	/* Extended (TBD later)		   */
X
X#define	E_ALL		(~(UInt32_t)(E_DIFF|E_ABORT))
X
Xextern	int	errconfig	__PR((char *name));
Xextern	BOOL	errhidden	__PR((int etype, const char *fname));
Xextern	BOOL	errwarnonly	__PR((int etype, const char *fname));
Xextern	BOOL	errabort	__PR((int etype, const char *fname,
X					BOOL doexit));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_CHECKERR_H */
END-of-star-1.5.2/include/schily/checkerr.h
echo x - star-1.5.2/include/schily/checkerr.mk
sed 's/^X//' >star-1.5.2/include/schily/checkerr.mk << 'END-of-star-1.5.2/include/schily/checkerr.mk'
X#ident @(#)checkerr.mk	1.1 07/07/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		checkerr.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/checkerr.mk
echo x - star-1.5.2/include/schily/find.mk
sed 's/^X//' >star-1.5.2/include/schily/find.mk << 'END-of-star-1.5.2/include/schily/find.mk'
X#ident @(#)find.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		find.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/find.mk
echo x - star-1.5.2/include/schily/walk.h
sed 's/^X//' >star-1.5.2/include/schily/walk.h << 'END-of-star-1.5.2/include/schily/walk.h'
X/* @(#)walk.h	1.30 11/08/03 Copyright 2004-2011 J. Schilling */
X/*
X *	Definitions for directory tree walking
X *
X *	Copyright (c) 2004-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_WALK_H
X#define	_SCHILY_WALK_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _SCHILY_STAT_H
X#include <schily/stat.h>
X#endif
X
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Flags to control treewalk() via 'walkflags'.
X *
X *	WALK_CHDIR	is not implemented, treewalk() always does chdir()
X *
X *	WALK_PHYS	Clearing WALK_PHYS has highest precedence and equals
X *			'find -follow'. If WALK_PHYS is clear, always use stat.
X *			By default, WALK_PHYS should be set.
X *
X *	WALK_ARGFOLLOW	If WALK_ARGFOLLOW is set, symlinks that are used as
X *			the first argument for trewalk() are followed even
X *			if WALK_PHYS is set. Setting WALK_ARGFOLLOW equals
X *			'find -H'.
X *
X *	WALK_ALLFOLLOW	If WALK_ALLFOLLOW is set, all symlinks are followed
X *			even if WALK_PHYS is set. Setting WALK_ALLFOLLOW
X *			equals 'find -L'.
X */
X#define	WALK_PHYS	1	/* Use lstat() instead of stat()	*/
X#define	WALK_MOUNT	2	/* Do not cross mount points		*/
X#define	WALK_DEPTH	4	/* Call content before calling the dir	*/
X#define	WALK_CHDIR	8	/* Use chdir() to each directory	*/
X#define	WALK_ARGFOLLOW	0x10	/* Use stat() for top level args only	*/
X#define	WALK_ALLFOLLOW	0x20	/* Use stat() for all files		*/
X#define	WALK_NOSTAT	0x40	/* Avoid to call stat() if st_nlink =>2 */
X#define	WALK_NOEXIT	0x100	/* Do not exit() in case of hard errors	*/
X#define	WALK_NOMSG	0x200	/* Do not write messages to stderr	*/
X#define	WALK_LS_ATIME	0x1000	/* -ls lists atime instead of mtime	*/
X#define	WALK_LS_CTIME	0x2000	/* -ls lists ctime instead of mtime	*/
X#define	WALK_STRIPLDOT	0x4000	/* Strip leading "./" from path		*/
X
X/*
X * The 'type' argument to walkfun.
X */
X#define	WALK_F		1	/* File	*/
X#define	WALK_SL		2	/* Symbolic Link */
X#define	WALK_D		3	/* Directory */
X#define	WALK_DP		4	/* Directory previously visited */
X#define	WALK_DNR	5	/* Directory with no read permission */
X#define	WALK_NS		6	/* Unknown file type stat failed */
X#define	WALK_SLN	7	/* Symbolic Link points to nonexistent file */
X
X#ifndef	__sqfun_t_defined
Xtypedef	int	(*sqfun_t)	__PR((void *arg));
X#define	__sqfun_t_defined
X#endif
X
Xstruct WALK {
X	int	flags;		/* Flags for communication with (*walkfun)() */
X	int	base;		/* Filename offset in path for  (*walkfun)() */
X	int	level;		/* The nesting level set up for (*walkfun)() */
X	int	walkflags;	/* treewalk() control flags		    */
X	void	*twprivate;	/* treewalk() private do not touch	    */
X	FILE	*std[3];	/* To redirect stdin/stdout/err in treewalk  */
X	char	**env;		/* To allow different env in treewalk/exec   */
X	sqfun_t	quitfun;	/* Function to query for shell signal quit   */
X	void	*qfarg;		/* Generic arg for shell builtin quit fun    */
X	int	maxdepth;	/* (*walkfun)() private, unused by treewalk  */
X	int	mindepth;	/* (*walkfun)() private, unused by treewalk  */
X	char	*lname;		/* (*walkfun)() private, unused by treewalk  */
X	void	*tree;		/* (*walkfun)() private, unused by treewalk  */
X	void	*patstate;	/* (*walkfun)() private, unused by treewalk  */
X	int	err;		/* (*walkfun)() private, unused by treewalk  */
X	int	pflags;		/* (*walkfun)() private, unused by treewalk  */
X	int	auxi;		/* (*walkfun)() private, unused by treewalk  */
X	void	*auxp;		/* (*walkfun)() private, unused by treewalk  */
X};
X
X/*
X * Flags in struct WALK used to communicate with (*walkfun)()
X */
X#define	WALK_WF_PRUNE	1	/* (*walkfun)() -> walk(): abort waking tree */
X#define	WALK_WF_QUIT	2	/* (*walkfun)() -> walk(): quit completely   */
X#define	WALK_WF_NOCHDIR	4	/* walk() -> (*walkfun)(): WALK_DNR w chdir() */
X#define	WALK_WF_NOCWD	8	/* walk() -> caller: cannot get working dir  */
X#define	WALK_WF_NOHOME	16	/* walk() -> caller: cannot chdir("..")	    */
X
Xtypedef	int	(*walkfun)	__PR((char *_nm, struct stat *_fs, int _type,
X						struct WALK *_state));
X
Xextern	int	treewalk	__PR((char *_nm, walkfun _fn,
X						struct WALK *_state));
Xextern	void	walkinitstate	__PR((struct WALK *_state));
Xextern	void	*walkopen	__PR((struct WALK *_state));
Xextern	int	walkgethome	__PR((struct WALK *_state));
Xextern	int	walkhome	__PR((struct WALK *_state));
Xextern	int	walkclose	__PR((struct WALK *_state));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_WALK_H */
END-of-star-1.5.2/include/schily/walk.h
echo x - star-1.5.2/include/schily/walk.mk
sed 's/^X//' >star-1.5.2/include/schily/walk.mk << 'END-of-star-1.5.2/include/schily/walk.mk'
X#ident @(#)walk.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		walk.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/walk.mk
echo x - star-1.5.2/include/schily/fetchdir.h
sed 's/^X//' >star-1.5.2/include/schily/fetchdir.h << 'END-of-star-1.5.2/include/schily/fetchdir.h'
X/* @(#)fetchdir.h	1.6 10/08/27 Copyright 2002-2010 J. Schilling */
X/*
X *	Copyright (c) 2002-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_FETCHDIR_H
X#define	_SCHILY_FETCHDIR_H
X
X#ifndef	_SCHILY_DIRENT_H
X#include <schily/dirent.h>		/* Includes mconfig.h if needed */
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	char	*fetchdir	__PR((char *dir, int *entp, int *lenp,
X					ino_t **inop));
Xextern	char	*dfetchdir	__PR((DIR *dir, char *dirname, int *entp,
X					int *lenp, ino_t **inop));
Xextern	int	fdircomp	__PR((const void *p1, const void *p2));
Xextern	char	**sortdir	__PR((char *dir, int *entp));
Xextern	int	cmpdir		__PR((int ents1, int ents2,
X					char **ep1, char **ep2,
X					char **oa, char **od,
X					int *alenp, int *dlenp));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_FETCHDIR_H */
END-of-star-1.5.2/include/schily/fetchdir.h
echo x - star-1.5.2/include/schily/fetchdir.mk
sed 's/^X//' >star-1.5.2/include/schily/fetchdir.mk << 'END-of-star-1.5.2/include/schily/fetchdir.mk'
X#ident @(#)fetchdir.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fetchdir.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/fetchdir.mk
echo x - star-1.5.2/include/schily/idcache.h
sed 's/^X//' >star-1.5.2/include/schily/idcache.h << 'END-of-star-1.5.2/include/schily/idcache.h'
X/* @(#)idcache.h	1.3 10/08/24 Copyright 1993, 1995-2010 J. Schilling */
X/*
X *	Copyright (c) 1993, 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IDCACHE_H
X#define	_SCHILY_IDCACHE_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	BOOL	ic_nameuid	__PR((char *name, int namelen, uid_t uid));
Xextern	BOOL	ic_uidname	__PR((char *name, int namelen, uid_t *uidp));
Xextern	BOOL	ic_namegid	__PR((char *name, int namelen, gid_t gid));
Xextern	BOOL 	ic_gidname	__PR((char *name, int namelen, gid_t *gidp));
Xextern	uid_t	ic_uid_nobody	__PR((void));
Xextern	gid_t	ic_gid_nobody	__PR((void));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_IDCACHE_H */
END-of-star-1.5.2/include/schily/idcache.h
echo x - star-1.5.2/include/schily/idcache.mk
sed 's/^X//' >star-1.5.2/include/schily/idcache.mk << 'END-of-star-1.5.2/include/schily/idcache.mk'
X#ident @(#)idcache.mk	1.1 08/04/06 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		idcache.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/idcache.mk
echo x - star-1.5.2/include/schily/fstream.mk
sed 's/^X//' >star-1.5.2/include/schily/fstream.mk << 'END-of-star-1.5.2/include/schily/fstream.mk'
X#ident @(#)fstream.mk	1.1 08/01/02 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		fstream.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/fstream.mk
echo x - star-1.5.2/include/schily/fstream.h
sed 's/^X//' >star-1.5.2/include/schily/fstream.h << 'END-of-star-1.5.2/include/schily/fstream.h'
X/* @(#)fstream.h	1.14 08/01/02 Copyright 1985-2008 J. Schilling */
X/*
X *	Definitions for the file stream package
X *
X *	Copyright (c) 1985-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_FSTREAM_H
X#define	_SCHILY_FSTREAM_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	STR_SBUF_SIZE	127	/* Size of "static" stream buffer	*/
X
X#ifdef	WSTRINGS
Xtypedef	short	CHAR;
X#else
Xtypedef	char	CHAR;
X#endif
X
X
Xtypedef struct fstream {
X	FILE	*fstr_file;
X	CHAR	*fstr_bp;
X	CHAR	*fstr_buf;
X	int 	(*fstr_func) __PR((struct fstream *, FILE *));
X	int	(*fstr_rfunc) __PR((struct fstream *));
X	CHAR	fstr_sbuf[STR_SBUF_SIZE + 1];
X} fstream;
X
Xtypedef	int	(*fstr_fun) __PR((struct fstream *, FILE *));
Xtypedef	int	(*fstr_efun) __PR((char *));
Xtypedef	int	(*fstr_rfun) __PR((struct fstream *));
X
Xextern	fstream	*mkfstream	__PR((FILE *f, fstr_fun, fstr_rfun, fstr_efun));
Xextern	void	fsclose		__PR((fstream *fsp));
Xextern	FILE	*fssetfile	__PR((fstream *fsp, FILE *f));
Xextern	int	fsgetc		__PR((fstream *fsp));
Xextern	void	fspushstr	__PR((fstream *fsp, char *ss));
Xextern	void	fspushcha	__PR((fstream *fsp, int c));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_FSTREAM_H */
END-of-star-1.5.2/include/schily/fstream.h
echo x - star-1.5.2/include/schily/hostname.h
sed 's/^X//' >star-1.5.2/include/schily/hostname.h << 'END-of-star-1.5.2/include/schily/hostname.h'
X/* @(#)hostname.h	1.18 09/07/28 Copyright 1995-2008 J. Schilling */
X/*
X *	This file has been separated from libport.h in order to avoid
X *	to include netdb.h in case gethostname() is not needed.
X *
X *	Copyright (c) 1995-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X
X#ifndef _SCHILY_HOSTNAME_H
X#define	_SCHILY_HOSTNAME_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * Try to get HOST_NAME_MAX for gethostname() from unistd.h or limits.h
X */
X#ifndef _SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X#ifndef _SCHILY_LIMITS_H
X#include <schily/limits.h>
X#endif
X
X#ifndef HOST_NAME_MAX
X#if	defined(HAVE_NETDB_H) && !defined(HOST_NOT_FOUND) && \
X				!defined(_INCL_NETDB_H)
X#include <netdb.h>		/* #defines MAXHOSTNAMELEN */
X#define	_INCL_NETDB_H
X#endif
X#ifdef	MAXHOSTNAMELEN
X#define	HOST_NAME_MAX	MAXHOSTNAMELEN
X#endif
X#endif
X
X#ifndef HOST_NAME_MAX
X#ifndef	_SCHILY_PARAM_H
X#include <schily/param.h>	/* Include various defs needed with some OS */
X#endif				/* Linux MAXHOSTNAMELEN */
X#ifdef	MAXHOSTNAMELEN
X#define	HOST_NAME_MAX	MAXHOSTNAMELEN
X#endif
X#endif
X
X#ifndef HOST_NAME_MAX
X#define	HOST_NAME_MAX	255
X#endif
X#ifndef	MAXHOSTNAMELEN
X#define	MAXHOSTNAMELEN	HOST_NAME_MAX
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	HAVE_GETHOSTNAME
Xextern	int		gethostname	__PR((char *name, int namelen));
X#endif
X#ifndef	HAVE_GETDOMAINNAME
Xextern	int		getdomainname	__PR((char *name, int namelen));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_HOSTNAME_H */
END-of-star-1.5.2/include/schily/hostname.h
echo x - star-1.5.2/include/schily/hostname.mk
sed 's/^X//' >star-1.5.2/include/schily/hostname.mk << 'END-of-star-1.5.2/include/schily/hostname.mk'
X#ident @(#)hostname.mk	1.1 08/12/20 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		hostname.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/hostname.mk
echo x - star-1.5.2/include/schily/stdio.h
sed 's/^X//' >star-1.5.2/include/schily/stdio.h << 'END-of-star-1.5.2/include/schily/stdio.h'
X/* @(#)stdio.h	1.3 11/08/03 Copyright 2009-2011 J. Schilling */
X/*
X *	Abstraction from stdio.h
X *
X *	Copyright (c) 2009-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_STDIO_H
X#define	_SCHILY_STDIO_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef _INCL_STDIO_H
X#include <stdio.h>
X#define	_INCL_STDIO_H
X#endif
X
X#ifdef	HAVE_LARGEFILES
X/*
X * If HAVE_LARGEFILES is defined, it is guaranteed that fseeko()/ftello()
X * both are available.
X */
X#define	fseek	fseeko
X#define	ftell	ftello
X#else	/* !HAVE_LARGEFILES */
X
X/*
X * If HAVE_LARGEFILES is not defined, we depend on specific tests for
X * fseeko()/ftello() which must have been done before the tests for
X * Large File support have been done.
X * Note that this only works if the tests used below are really done before
X * the Large File autoconf test is run. This is because autoconf does no
X * clean testing but instead cumulatively modifes the envivonment used for
X * testing.
X */
X#ifdef	HAVE_FSEEKO
X#	define	fseek	fseeko
X#endif
X#ifdef	HAVE_FTELLO
X#	define	ftell	ftello
X#endif
X#endif
X
X#if	!defined(HAVE_POPEN) && defined(HAVE__POPEN)
X#define	popen(c, m)	_popen((c), (m))
X#endif
X
X#if	!defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
X#define	pclose(fp)	_pclose(fp)
X#endif
X
X#endif	/* _SCHILY_STDIO_H */
END-of-star-1.5.2/include/schily/stdio.h
echo x - star-1.5.2/include/schily/stdio.mk
sed 's/^X//' >star-1.5.2/include/schily/stdio.mk << 'END-of-star-1.5.2/include/schily/stdio.mk'
X#ident "@(#)stdio.mk	1.1 09/01/05 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stdio.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/stdio.mk
echo x - star-1.5.2/include/schily/sysexits.h
sed 's/^X//' >star-1.5.2/include/schily/sysexits.h << 'END-of-star-1.5.2/include/schily/sysexits.h'
X/* @(#)sysexits.h	1.5 09/06/14 J. Schilling */
X/*
X *
X * Copyright (c) 2009 J. Schilling
X *
X * Copyright (c) 1987, 1993
X *	The Regents of the University of California.  All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X *	@(#)sysexits.h	8.1 (Berkeley) 6/2/93
X */
X
X#ifndef	_SCHILY_SYSEXITS_H
X#define	_SCHILY_SYSEXITS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYSEXITS_H
X#include <sysexits.h>
X#else
X
X/*
X *  SYSEXITS.H -- Exit status codes for system programs.
X *
X *	This include file attempts to categorize possible error
X *	exit statuses for system programs, notably delivermail
X *	and the Berkeley network.
X *
X *	Error numbers begin at EX__BASE to reduce the possibility of
X *	clashing with other exit statuses that random programs may
X *	already return.  The meaning of the codes is approximately
X *	as follows:
X *
X *	EX_USAGE -- The command was used incorrectly, e.g., with
X *		the wrong number of arguments, a bad flag, a bad
X *		syntax in a parameter, or whatever.
X *	EX_DATAERR -- The input data was incorrect in some way.
X *		This should only be used for user's data & not
X *		system files.
X *	EX_NOINPUT -- An input file (not a system file) did not
X *		exist or was not readable.  This could also include
X *		errors like "No message" to a mailer (if it cared
X *		to catch it).
X *	EX_NOUSER -- The user specified did not exist.  This might
X *		be used for mail addresses or remote logins.
X *	EX_NOHOST -- The host specified did not exist.  This is used
X *		in mail addresses or network requests.
X *	EX_UNAVAILABLE -- A service is unavailable.  This can occur
X *		if a support program or file does not exist.  This
X *		can also be used as a catchall message when something
X *		you wanted to do doesn't work, but you don't know
X *		why.
X *	EX_SOFTWARE -- An internal software error has been detected.
X *		This should be limited to non-operating system related
X *		errors as possible.
X *	EX_OSERR -- An operating system error has been detected.
X *		This is intended to be used for such things as "cannot
X *		fork", "cannot create pipe", or the like.  It includes
X *		things like getuid returning a user that does not
X *		exist in the passwd file.
X *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
X *		etc.) does not exist, cannot be opened, or has some
X *		sort of error (e.g., syntax error).
X *	EX_CANTCREAT -- A (user specified) output file cannot be
X *		created.
X *	EX_IOERR -- An error occurred while doing I/O on some file.
X *	EX_TEMPFAIL -- temporary failure, indicating something that
X *		is not really an error.  In sendmail, this means
X *		that a mailer (e.g.) could not create a connection,
X *		and the request should be reattempted later.
X *	EX_PROTOCOL -- the remote system returned something that
X *		was "not possible" during a protocol exchange.
X *	EX_NOPERM -- You did not have sufficient permission to
X *		perform the operation.  This is not intended for
X *		file system problems, which should use NOINPUT or
X *		CANTCREAT, but rather for higher level permissions.
X */
X
X#define	EX_OK		0	/* successful termination */
X
X#define	EX__BASE	64	/* base value for error messages */
X
X#define	EX_USAGE	64	/* command line usage error */
X#define	EX_DATAERR	65	/* data format error */
X#define	EX_NOINPUT	66	/* cannot open input */
X#define	EX_NOUSER	67	/* addressee unknown */
X#define	EX_NOHOST	68	/* host name unknown */
X#define	EX_UNAVAILABLE	69	/* service unavailable */
X#define	EX_SOFTWARE	70	/* internal software error */
X#define	EX_OSERR	71	/* system error (e.g., can't fork) */
X#define	EX_OSFILE	72	/* critical OS file missing */
X#define	EX_CANTCREAT	73	/* can't create (user) output file */
X#define	EX_IOERR	74	/* input/output error */
X#define	EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
X#define	EX_PROTOCOL	76	/* remote error in protocol */
X#define	EX_NOPERM	77	/* permission denied */
X#define	EX_CONFIG	78	/* configuration error */
X
X#define	EX_NOTFOUND	79	/* entry not found */
X#define	EX__MAX		79	/* maximum listed value */
X
X#endif	/* HAVE_SYSEXITS_H */
X#endif	/* !_SCHILY_SYSEXITS_H */
END-of-star-1.5.2/include/schily/sysexits.h
echo x - star-1.5.2/include/schily/sysexits.mk
sed 's/^X//' >star-1.5.2/include/schily/sysexits.mk << 'END-of-star-1.5.2/include/schily/sysexits.mk'
X#ident "@(#)sysexits.mk	1.1 09/02/04 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sysexits.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/sysexits.mk
echo x - star-1.5.2/include/schily/wctype.h
sed 's/^X//' >star-1.5.2/include/schily/wctype.h << 'END-of-star-1.5.2/include/schily/wctype.h'
X/* @(#)wctype.h	1.7 09/06/29 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from wctype.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_WCTYPE_H
X#define	_SCHILY_WCTYPE_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_WCHAR_H
X#include <schily/wchar.h>
X#endif
X
X#ifdef	HAVE_WCTYPE_H
X/*
X * Include wctype.h if wchars have been enabled in schily/wchar.h
X */
X#ifdef	USE_WCHAR
X#ifndef	_INCL_WCTYPE_H
X#include <wctype.h>
X#define	_INCL_WCTYPE_H
X#endif
X#ifndef	USE_WCTYPE
X#define	USE_WCTYPE
X#endif
X#endif	/* USE_WCHAR */
X#endif	/* HAVE_WCTYPE_H */
X
X#if	defined(HAVE_ISWPRINT) && defined(USE_WCHAR)
X#ifndef	USE_WCTYPE
X#undef	USE_WCTYPE
X#endif
X#endif
X
X#if	!defined(HAVE_WCTYPE_H) && !defined(HAVE_ISWPRINT)
X#undef	USE_WCTYPE
X#endif
X
X#ifdef	NO_WCTYPE
X#undef	USE_WCTYPE
X#endif
X
X#ifndef	USE_WCTYPE
X
X#include <ctype.h>
X
X#undef	iswalnum
X#define	iswalnum(c)	isalnum(c)
X#undef	iswalpha
X#define	iswalpha(c)	isalpha(c)
X#undef	iswcntrl
X#define	iswcntrl(c)	iscntrl(c)
X#undef	iswcntrl
X#define	iswcntrl(c)	iscntrl(c)
X#undef	iswdigit
X#define	iswdigit(c)	isdigit(c)
X#undef	iswgraph
X#define	iswgraph(c)	isgraph(c)
X#undef	iswlower
X#define	iswlower(c)	islower(c)
X#undef	iswprint
X#define	iswprint(c)	isprint(c)
X#undef	iswpunct
X#define	iswpunct(c)	ispunct(c)
X#undef	iswspace
X#define	iswspace(c)	isspace(c)
X#undef	iswupper
X#define	iswupper(c)	isupper(c)
X#undef	iswxdigit
X#define	iswxdigit(c)	isxdigit(c)
X
X#undef	towlower
X#define	towlower(c)	tolower(c)
X#undef	towupper
X#define	towupper(c)	toupper(c)
X
X#endif	/* !USE_WCTYPE */
X
X#endif	/* _SCHILY_WCTYPE_H */
END-of-star-1.5.2/include/schily/wctype.h
echo x - star-1.5.2/include/schily/wctype.mk
sed 's/^X//' >star-1.5.2/include/schily/wctype.mk << 'END-of-star-1.5.2/include/schily/wctype.mk'
X#ident "@(#)wctype.mk	1.1 09/04/12 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		wctype.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/wctype.mk
echo x - star-1.5.2/include/schily/dlfcn.h
sed 's/^X//' >star-1.5.2/include/schily/dlfcn.h << 'END-of-star-1.5.2/include/schily/dlfcn.h'
X/* @(#)dlfcn.h	1.2 09/06/14 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from dlfcn.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_DLFCN_H
X#define	_SCHILY_DLFCN_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_DLFCN_H
X#ifndef _INCL_DLFCN_H
X#include <dlfcn.h>			/* POSIX */
X#define	_INCL_DLFCN_H
X#define	FOUND_DLFCN_H
X#endif
X#endif
X
X#ifdef	HAVE_DL_H
X#ifndef	FOUND_DLFCN_H
X#ifndef _INCL_DL_H
X#include <dl.h>				/* HP-UX */
X#define	_INCL_DL_H
X#define	FOUND_DLFCN_H
X#endif
X#endif
X#endif
X
X/*
X * dlopen() modes
X */
X#ifndef	RTLD_LAZY			/* The only mode in SunOS-4.0 */
X#define	RTLD_LAZY	0x00001
X#define	RTLD_NOW	0x00002
X#define	RTLD_GLOBAL	0x00100
X#define	RTLD_LOCAL	0x00000
X#endif
X
X#ifdef	__never_
X/*
X * dlsym() speudo handles
X * These handles are not valid on SunOS-4.0
X */
X#ifndef	RTLD_NEXT
X#define	RTLD_NEXT		(void *)-1
X#define	RTLD_DEFAULT		(void *)-2
X#define	RTLD_SELF		(void *)-3
X#endif
X#endif
X
X/*
X * dlsym() speudo handle for SunOS-4.0
X */
X#if	defined(HAVE_DLSYM) && !defined(RTLD_SELF)
X#define	RTLD_SELF		(void *)0
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	HAVE_DLOPEN
Xextern	void	*dlopen	__PR((const char *pathname, int mode));
X#endif
X#ifndef	HAVE_DLCLOSE
Xextern	int	dlclose	__PR((void *handle));
X#endif
X#ifndef	HAVE_DLSYM
Xextern	void	*dlsym	__PR((void  *handle, const char *name));
X#endif
X#ifndef	HAVE_DLERROR
Xextern	const char *dlerror __PR((void));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X
X
X#endif	/* _SCHILY_DLFCN_H */
END-of-star-1.5.2/include/schily/dlfcn.h
echo x - star-1.5.2/include/schily/dlfcn.mk
sed 's/^X//' >star-1.5.2/include/schily/dlfcn.mk << 'END-of-star-1.5.2/include/schily/dlfcn.mk'
X#ident "@(#)dlfcn.mk	1.1 09/05/01 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		dlfcn.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/dlfcn.mk
echo x - star-1.5.2/include/schily/shcall.h
sed 's/^X//' >star-1.5.2/include/schily/shcall.h << 'END-of-star-1.5.2/include/schily/shcall.h'
X/* @(#)shcall.h	1.3 10/08/27 Copyright 2009-2010 J. Schilling */
X/*
X *	Abstraction from shcall.h
X *
X *	Copyright (c) 2009-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_SHCALL_H
X#define	_SCHILY_SHCALL_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	__sqfun_t_defined
Xtypedef	int	(*sqfun_t)	__PR((void *arg));
X#define	__sqfun_t_defined
X#endif
X
X#ifndef	__squit_t_defined
X
Xtypedef struct {
X	sqfun_t	quitfun;	/* Function to query for shell signal quit   */
X	void	*qfarg;		/* Generic arg for shell builtin quit fun    */
X} squit_t;
X
X#define	__squit_t_defined
X#endif
X
Xtypedef	int	(*shcall)	__PR((int ac, char **av, char **ev,
X					FILE *std[3], squit_t *__quit));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_SHCALL_H */
END-of-star-1.5.2/include/schily/shcall.h
echo x - star-1.5.2/include/schily/shcall.mk
sed 's/^X//' >star-1.5.2/include/schily/shcall.mk << 'END-of-star-1.5.2/include/schily/shcall.mk'
X#ident "@(#)shcall.mk	1.1 09/05/01 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		shcall.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/shcall.mk
echo x - star-1.5.2/include/schily/limits.h
sed 's/^X//' >star-1.5.2/include/schily/limits.h << 'END-of-star-1.5.2/include/schily/limits.h'
X/* @(#)limits.h	1.7 11/08/13 Copyright 2011 J. Schilling */
X/*
X *	Copyright (c) 2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LIMITS_H
X#define	_SCHILY_LIMITS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_LIMITS_H
X#ifndef	_INCL_LIMITS_H
X#include <limits.h>
X#define	_INCL_LIMITS_H
X#endif
X#endif
X
X#ifndef	COLL_WEIGHTS_MAX
X#define	COLL_WEIGHTS_MAX	2
X#endif
X
X#ifndef	_POSIX2_LINE_MAX
X#define	_POSIX2_LINE_MAX	2048
X#endif
X
X/*
X * Include sys/param.h for PIPE_BUF
X */
X#ifndef	_SCHILY_PARAM_H
X#include <schily/param.h>
X#endif
X
X#ifndef	PIPE_BUF
X#if	defined(__MINGW32__) || defined(_MSC_VER)
X#define	PIPE_BUF		5120
X#else
X#define	PIPE_BUF		512
X#endif
X#endif	/* PIPE_BUF */
X
X#endif	/* _SCHILY_LIMITS_H */
END-of-star-1.5.2/include/schily/limits.h
echo x - star-1.5.2/include/schily/limits.mk
sed 's/^X//' >star-1.5.2/include/schily/limits.mk << 'END-of-star-1.5.2/include/schily/limits.mk'
X#ident "@(#)limits.mk	1.1 09/05/24 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		limits.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/limits.mk
echo x - star-1.5.2/include/schily/locale.h
sed 's/^X//' >star-1.5.2/include/schily/locale.h << 'END-of-star-1.5.2/include/schily/locale.h'
X/* @(#)locale.h	1.2 09/05/24 Copyright 2009 J. Schilling */
X/*
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LOCALE_H
X#define	_SCHILY_LOCALE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_LOCALE_H
X#ifndef	_INCL_LOCALE_H
X#include <locale.h>		/* LC_* definitions */
X#define	_INCL_LOCALE_H
X#endif
X#ifndef	USE_LOCALE
X#define	USE_LOCALE
X#endif
X#else
X#undef	USE_LOCALE
X#endif
X
X#ifndef	HAVE_SETLOCALE
X#undef	USE_LOCALE
X#endif
X
X#ifdef	NO_LOCALE
X#undef	USE_LOCALE
X#endif
X
X#ifndef	USE_LOCALE
X#undef	setlocale
X#define	setlocale(n, s)		((void *)0)
X#endif
X
X
X#endif	/* _SCHILY_LOCALE_H */
END-of-star-1.5.2/include/schily/locale.h
echo x - star-1.5.2/include/schily/locale.mk
sed 's/^X//' >star-1.5.2/include/schily/locale.mk << 'END-of-star-1.5.2/include/schily/locale.mk'
X#ident "@(#)locale.mk	1.1 09/05/23 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		locale.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/locale.mk
echo x - star-1.5.2/include/schily/md4.h
sed 's/^X//' >star-1.5.2/include/schily/md4.h << 'END-of-star-1.5.2/include/schily/md4.h'
X/* @(#)md4.h	1.4 10/08/27 2009-2010 J. Schilling */
X/*
X * MD4 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009-2010 J. Schilling
X */
X/*	$OpenBSD: md4.h,v 1.15 2004/06/22 01:57:30 jfb Exp $	*/
X
X/*
X * This code implements the MD4 message-digest algorithm.
X * The algorithm is due to Ron Rivest.  This code was
X * written by Colin Plumb in 1993, no copyright is claimed.
X * This code is in the public domain; do with it what you wish.
X * Todd C. Miller modified the MD5 code to do MD4 based on RFC 1186.
X *
X * Equivalent code is available from RSA Data Security, Inc.
X * This code has been tested against that, and is equivalent,
X * except that you don't need to include two pages of legalese
X * with every copy.
X */
X
X#ifndef	_SCHILY_MD4_H
X#define	_SCHILY_MD4_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X#define	MD4_BLOCK_LENGTH		64
X#define	MD4_DIGEST_LENGTH		16
X#define	MD4_DIGEST_STRING_LENGTH	(MD4_DIGEST_LENGTH * 2 + 1)
X
Xtypedef struct MD4Context {
X	UInt32_t state[4];			/* state */
X	UInt32_t count[2];			/* number of bits, mod 2^64 */
X	UInt8_t	 buffer[MD4_BLOCK_LENGTH];	/* input buffer */
X} MD4_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void	 MD4Init	__PR((MD4_CTX *));
Xextern void	 MD4Update	__PR((MD4_CTX *, const void *, size_t));
Xextern void	 MD4Pad		__PR((MD4_CTX *));
Xextern void	 MD4Final	__PR((UInt8_t [MD4_DIGEST_LENGTH], MD4_CTX *));
Xextern void	 MD4Transform	__PR((UInt32_t [4],
X					const UInt8_t [MD4_BLOCK_LENGTH]));
Xextern char	*MD4End		__PR((MD4_CTX *, char *));
Xextern char	*MD4File	__PR((const char *, char *));
Xextern char	*MD4FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char	*MD4Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_MD4_H */
END-of-star-1.5.2/include/schily/md4.h
echo x - star-1.5.2/include/schily/md4.mk
sed 's/^X//' >star-1.5.2/include/schily/md4.mk << 'END-of-star-1.5.2/include/schily/md4.mk'
X#ident "@(#)md4.mk	1.1 09/06/20 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		md4.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/md4.mk
echo x - star-1.5.2/include/schily/md5.h
sed 's/^X//' >star-1.5.2/include/schily/md5.h << 'END-of-star-1.5.2/include/schily/md5.h'
X/* @(#)md5.h	1.11 10/08/27 2008-2010 J. Schilling */
X/*
X * MD5 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2008-2010 J. Schilling
X */
X
X/*	$OpenBSD: md5.h,v 1.16 2004/06/22 01:57:30 jfb Exp $	*/
X
X/*
X * This code implements the MD5 message-digest algorithm.
X * The algorithm is due to Ron Rivest.  This code was
X * written by Colin Plumb in 1993, no copyright is claimed.
X * This code is in the public domain; do with it what you wish.
X *
X * Equivalent code is available from RSA Data Security, Inc.
X * This code has been tested against that, and is equivalent,
X * except that you don't need to include two pages of legalese
X * with every copy.
X */
X
X#ifndef	_SCHILY_MD5_H
X#define	_SCHILY_MD5_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X#define	MD5_BLOCK_LENGTH		64
X#define	MD5_DIGEST_LENGTH		16
X#define	MD5_DIGEST_STRING_LENGTH	(MD5_DIGEST_LENGTH * 2 + 1)
X
Xtypedef struct MD5Context {
X	UInt32_t state[4];			/* state */
X	UInt32_t count[2];			/* number of bits, mod 2^64 */
X	UInt8_t	 buffer[MD5_BLOCK_LENGTH];	/* input buffer */
X} MD5_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void	 MD5Init	__PR((MD5_CTX *));
Xextern void	 MD5Update	__PR((MD5_CTX *, const void *, size_t));
Xextern void	 MD5Pad		__PR((MD5_CTX *));
Xextern void	 MD5Final	__PR((UInt8_t [MD5_DIGEST_LENGTH], MD5_CTX *));
Xextern void	 MD5Transform	__PR((UInt32_t [4],
X					const UInt8_t [MD5_BLOCK_LENGTH]));
Xextern char	*MD5End		__PR((MD5_CTX *, char *));
Xextern char	*MD5File	__PR((const char *, char *));
Xextern char	*MD5FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char	*MD5Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_MD5_H */
END-of-star-1.5.2/include/schily/md5.h
echo x - star-1.5.2/include/schily/md5.mk
sed 's/^X//' >star-1.5.2/include/schily/md5.mk << 'END-of-star-1.5.2/include/schily/md5.mk'
X#ident "@(#)md5.mk	1.1 09/06/20 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		md5.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/md5.mk
echo x - star-1.5.2/include/schily/sigset.h
sed 's/^X//' >star-1.5.2/include/schily/sigset.h << 'END-of-star-1.5.2/include/schily/sigset.h'
X/* @(#)sigset.h	1.11 11/09/16 Copyright 1997-2011 J. Schilling */
X/*
X *	Signal set abstraction for BSD/SVR4 signals
X *
X *	Copyright (c) 1997-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SIGSET_H
X#define	_SCHILY_SIGSET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SIGSET
X/*
X * Try to by default use the function that sets up signal handlers in a way
X * that does not reset the handler after it has been called.
X */
X#define	signal		sigset
X#endif
X
X#ifdef	HAVE_SIGPROCMASK
X#define	blocked_sigs(a)	{ \
X				sigset_t	__new;	\
X							\
X				sigemptyset(&__new);	\
X				sigprocmask(SIG_BLOCK, &__new, &a);\
X			}
X#define	block_sigs(a)	{ \
X				sigset_t	__new;	\
X							\
X				sigfillset(&__new);	\
X				sigprocmask(SIG_BLOCK, &__new, &a);\
X			}
X#define	block_sig(s)	{ \
X				sigset_t	__new;	\
X							\
X				sigemptyset(&__new);	\
X				sigaddset(&__new, (s));	\
X				sigprocmask(SIG_BLOCK, &__new, NULL);\
X			}
X#define	unblock_sig(s)	{ \
X				sigset_t	__new;	\
X							\
X				sigemptyset(&__new);	\
X				sigaddset(&__new, (s));	\
X				sigprocmask(SIG_UNBLOCK, &__new, NULL);\
X			}
X#define	restore_sigs(a)	sigprocmask(SIG_SETMASK, &a, 0);
X
X#else	/* !HAVE_SIGPROCMASK */
X#if	defined(HAVE_SIGBLOCK) && defined(HAVE_SIGSETMASK)
X
X#define	sigset_t	int
X#define	block_sigs(a)	a = sigblock(0xFFFFFFFF)
X#define	restore_sigs(a)	sigsetmask(a);
X#define	blocked_sigs(a)	{ \
X				int	__old;		\
X							\
X				block_sigs(__old);	\
X				a = __old;		\
X				sigsetmask(__old);	\
X			}
X#define	block_sig(s)	{ \
X				int	__old, __new;	\
X							\
X				block_sigs(__old);	\
X				__new = sigmask(s);	\
X				__new = __old | __new;	\
X				sigsetmask(__new);	\
X			}
X#define	unblock_sig(s)	{ \
X				int	__old, __new;	\
X							\
X				block_sigs(__old);	\
X				__new = sigmask(s);	\
X				__new = __old & ~__new;	\
X				sigsetmask(__new);	\
X			}
X#else	/* ! defined(HAVE_SIGBLOCK) && defined(HAVE_SIGSETMASK) */
X
X#define	sigset_t	int
X#define	blocked_sigs(a)
X#define	block_sigs(a)
X#define	block_sig(a)
X#define	restore_sigs(a)
X#define	unblock_sig(s)
X#endif	/* ! defined(HAVE_SIGBLOCK) && defined(HAVE_SIGSETMASK) */
X#endif	/* HAVE_SIGPROCMASK */
X
X#endif	/* _SCHILY_SIGSET_H */
END-of-star-1.5.2/include/schily/sigset.h
echo x - star-1.5.2/include/schily/sigset.mk
sed 's/^X//' >star-1.5.2/include/schily/sigset.mk << 'END-of-star-1.5.2/include/schily/sigset.mk'
X#ident @(#)sigset.mk	1.2 09/06/30 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sigset.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/sigset.mk
echo x - star-1.5.2/include/schily/pwd.h
sed 's/^X//' >star-1.5.2/include/schily/pwd.h << 'END-of-star-1.5.2/include/schily/pwd.h'
X/* @(#)pwd.h	1.1 09/07/10 Copyright 2009 J. Schilling */
X/*
X *	Passwd abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_PWD_H
X#define	_SCHILY_PWD_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_PWD_H
X#ifndef	_INCL_PWD_H
X#include <pwd.h>
X#define	_INCL_PWD_H
X#endif
X#else
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xstruct passwd {
X	char	*pw_name;
X	char	*pw_passwd;
X	uid_t	pw_uid;
X	gid_t	pw_gid;
X	char	*pw_gecos;
X	char	*pw_dir;
X	char	*pw_shell;
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* ! HAVE_PWD_H */
X
X#endif	/* _SCHILY_PWD_H */
END-of-star-1.5.2/include/schily/pwd.h
echo x - star-1.5.2/include/schily/pwd.mk
sed 's/^X//' >star-1.5.2/include/schily/pwd.mk << 'END-of-star-1.5.2/include/schily/pwd.mk'
X#ident "@(#)pwd.mk	1.1 09/07/10 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		pwd.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/pwd.mk
echo x - star-1.5.2/include/schily/grp.h
sed 's/^X//' >star-1.5.2/include/schily/grp.h << 'END-of-star-1.5.2/include/schily/grp.h'
X/* @(#)grp.h	1.1 09/07/10 Copyright 2009 J. Schilling */
X/*
X *	Group abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_GRP_H
X#define	_SCHILY_GRP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_GRP_H
X#ifndef	_INCL_GRP_H
X#include <grp.h>
X#define	_INCL_GRP_H
X#endif
X#else
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xstruct	group {
X	char	*gr_name;
X	char	*gr_passwd;
X	gid_t	gr_gid;
X	char	**gr_mem;
X};
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* ! HAVE_GRP_H */
X
X#endif	/* _SCHILY_GRP_H */
END-of-star-1.5.2/include/schily/grp.h
echo x - star-1.5.2/include/schily/grp.mk
sed 's/^X//' >star-1.5.2/include/schily/grp.mk << 'END-of-star-1.5.2/include/schily/grp.mk'
X#ident "@(#)grp.mk	1.1 09/07/10 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		grp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/grp.mk
echo x - star-1.5.2/include/schily/ctype.h
sed 's/^X//' >star-1.5.2/include/schily/ctype.h << 'END-of-star-1.5.2/include/schily/ctype.h'
X/* @(#)ctype.h	1.1 09/07/10 Copyright 2009 J. Schilling */
X/*
X *	Ctape abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_CTYPE_H
X#define	_SCHILY_CTYPE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	HAVE_CTYPE_H
X#ifndef	_INCL_CTYPE_H
X#include <ctype.h>
X#define	_INCL_CTYPE_H
X#endif
X#else
X
X#endif	/* ! HAVE_CTYPE_H */
X
X#endif	/* _SCHILY_CTYPE_H */
END-of-star-1.5.2/include/schily/ctype.h
echo x - star-1.5.2/include/schily/ctype.mk
sed 's/^X//' >star-1.5.2/include/schily/ctype.mk << 'END-of-star-1.5.2/include/schily/ctype.mk'
X#ident "@(#)ctype.mk	1.1 09/07/10 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ctype.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/ctype.mk
echo x - star-1.5.2/include/schily/Targets
sed 's/^X//' >star-1.5.2/include/schily/Targets << 'END-of-star-1.5.2/include/schily/Targets'
X#ident @(#)Targets	1.17 12/12/03 
X
XX_MK_LIST=	\
X		align.mk alloca.mk archdefs.mk assert.mk avoffset.mk \
X		btorder.mk \
X		ccomdefs.mk checkerr.mk ctype.mk \
X		dbgmalloc.mk deflts.mk device.mk dirent.mk dlfcn.mk \
X		err_arch.mk err_bit.mk err_char.mk err_type.mk \
X		errno.mk fcntl.mk \
X		fetchdir.mk find.mk float.mk fnmatch.mk fstream.mk \
X		getargs.mk getcwd.mk grp.mk \
X		hostname.mk \
X		iconv.mk idcache.mk in.mk inet.mk io.mk ioctl.mk ipc.mk \
X		intcvt.mk inttypes.mk \
X		jmpdefs.mk \
X		libgen.mk libport.mk librmt.mk limits.mk locale.mk \
X		math.mk maxpath.mk mconfig.mk \
X		md4.mk md5.mk \
X		mman.mk mtio.mk \
X		netdb.mk nlsdefs.mk \
X		param.mk patmatch.mk priv.mk procfs.mk prototyp.mk pwd.mk \
X		regex.mk _regex.mk resource.mk rmd160.mk rmtio.mk \
X		schily.mk schilyp.mk select.mk sem.mk shm.mk \
X		setjmp.mk sha1.mk sha2.mk shcall.mk \
X		siconv.mk shadow.mk \
X		sigblk.mk signal.mk sigset.mk socket.mk standard.mk stat.mk \
X		stdint.mk stdio.mk \
X		stdlib.mk stkframe.mk string.mk \
X		sysexits.mk syslog.mk systeminfo.mk \
X		termcap.mk termios.mk time.mk times.mk \
X		types.mk unistd.mk utime.mk utsname.mk utypes.mk \
X		varargs.mk vfork.mk \
X		walk.mk wchar.mk wctype.mk wait.mk \
X		windows.mk \
X		xconfig.mk xmconfig.mk
END-of-star-1.5.2/include/schily/Targets
echo x - star-1.5.2/include/schily/sha1.h
sed 's/^X//' >star-1.5.2/include/schily/sha1.h << 'END-of-star-1.5.2/include/schily/sha1.h'
X/* @(#)sha1.h	1.4 10/08/27 2010 J. Schilling */
X/*
X * SHA1 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2010 J. Schilling
X */
X
X/*	$OpenBSD: sha1.h,v 1.23 2004/06/22 01:57:30 jfb Exp $	*/
X
X/*
X * SHA-1 in C
X * By Steve Reid <steve@edmweb.com>
X * 100% Public Domain
X */
X
X#ifndef	_SCHILY_SHA1_H
X#define	_SCHILY_SHA1_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UTYPES_H
X#include <schily/utypes.h>
X#endif
X
X#define	SHA1_BLOCK_LENGTH		64
X#define	SHA1_DIGEST_LENGTH		20
X#define	SHA1_DIGEST_STRING_LENGTH	(SHA1_DIGEST_LENGTH * 2 + 1)
X
Xtypedef struct {
X	UInt32_t state[5];
X	UInt32_t count[2];
X	UInt8_t	 buffer[SHA1_BLOCK_LENGTH];
X} SHA1_CTX;
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern	void	SHA1Init	__PR((SHA1_CTX *));
Xextern	void	SHA1Pad		__PR((SHA1_CTX *));
Xextern	void	SHA1Transform	__PR((UInt32_t [5],
X					const UInt8_t [SHA1_BLOCK_LENGTH]));
Xextern	void	SHA1Update	__PR((SHA1_CTX *, const UInt8_t *, size_t));
Xextern	void	SHA1Final	__PR((UInt8_t [SHA1_DIGEST_LENGTH],
X					SHA1_CTX *));
Xextern	char	*SHA1End	__PR((SHA1_CTX *, char *));
Xextern	char	*SHA1File	__PR((const char *, char *));
Xextern	char	*SHA1FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern	char	*SHA1Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#define	HTONDIGEST(x) do {                                              \
X	x[0] = htonl(x[0]);                                             \
X	x[1] = htonl(x[1]);                                             \
X	x[2] = htonl(x[2]);                                             \
X	x[3] = htonl(x[3]);                                             \
X	x[4] = htonl(x[4]); } while (0)
X
X#define	NTOHDIGEST(x) do {                                              \
X	x[0] = ntohl(x[0]);                                             \
X	x[1] = ntohl(x[1]);                                             \
X	x[2] = ntohl(x[2]);                                             \
X	x[3] = ntohl(x[3]);                                             \
X	x[4] = ntohl(x[4]); } while (0)
X
X#endif /* _SCHILY_SHA1_H */
END-of-star-1.5.2/include/schily/sha1.h
echo x - star-1.5.2/include/schily/in.h
sed 's/^X//' >star-1.5.2/include/schily/in.h << 'END-of-star-1.5.2/include/schily/in.h'
X/* @(#)in.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	In abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IN_H
X#define	_SCHILY_IN_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_NETINET_IN_H
X#ifndef	_INCL_NETINET_IN_H
X#include <netinet/in.h>
X#define	_INCL_NETINET_IN_H
X#endif
X#endif
X
X#endif	/* _SCHILY_IN_H */
END-of-star-1.5.2/include/schily/in.h
echo x - star-1.5.2/include/schily/in.mk
sed 's/^X//' >star-1.5.2/include/schily/in.mk << 'END-of-star-1.5.2/include/schily/in.mk'
X#ident "@(#)in.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		in.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/in.mk
echo x - star-1.5.2/include/schily/inet.h
sed 's/^X//' >star-1.5.2/include/schily/inet.h << 'END-of-star-1.5.2/include/schily/inet.h'
X/* @(#)inet.h	1.2 09/08/04 Copyright 2009 J. Schilling */
X/*
X *	Inet abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_INET_H
X#define	_SCHILY_INET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_ARPA_INET_H
X#ifndef	_INCL_ARPA_INET_H
X#include <arpa/inet.h>
X#define	_INCL_ARPA_INET_H
X#endif
X#else	/* !HAVE_ARPA_INET_H */
X
X/*
X * BeOS does not have <arpa/inet.h>
X * but inet_ntaoa() is in <netdb.h>
X */
X#ifdef	HAVE_NETDB_H
X#ifndef	_INCL_NETDB_H
X#include <netdb.h>
X#define	_INCL_NETDB_H
X#endif
X#endif	/* HAVE_NETDB_H */
X
X#endif	/* !HAVE_ARPA_INET_H */
X
X#endif	/* _SCHILY_INET_H */
END-of-star-1.5.2/include/schily/inet.h
echo x - star-1.5.2/include/schily/inet.mk
sed 's/^X//' >star-1.5.2/include/schily/inet.mk << 'END-of-star-1.5.2/include/schily/inet.mk'
X#ident "@(#)inet.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		inet.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/inet.mk
echo x - star-1.5.2/include/schily/io.h
sed 's/^X//' >star-1.5.2/include/schily/io.h << 'END-of-star-1.5.2/include/schily/io.h'
X/* @(#)io.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	DOS io.h abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IO_H
X#define	_SCHILY_IO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_FCNTL_H
X#include <schily/fcntl.h>
X#endif
X
X#ifndef	NEED_O_BINARY
X#if	O_BINARY != 0
X#define	NEED_O_BINARY
X#endif
X#endif
X
X#if	defined(HAVE_IO_H) && defined(NEED_O_BINARY)
X#ifndef	_INCL_IO_H
X#include <io.h>
X#define	_INCL_IO_H
X#endif
X#else	/* ! defined(HAVE_IO_H) && defined(NEED_O_BINARY) */
X
X#define	setmode(f, m)
X
X#endif
X
X#endif	/* _SCHILY_IO_H */
END-of-star-1.5.2/include/schily/io.h
echo x - star-1.5.2/include/schily/io.mk
sed 's/^X//' >star-1.5.2/include/schily/io.mk << 'END-of-star-1.5.2/include/schily/io.mk'
X#ident "@(#)io.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		io.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/io.mk
echo x - star-1.5.2/include/schily/systeminfo.h
sed 's/^X//' >star-1.5.2/include/schily/systeminfo.h << 'END-of-star-1.5.2/include/schily/systeminfo.h'
X/* @(#)systeminfo.h	1.1 09/07/14 Copyright 2009 J. Schilling */
X/*
X *	Systeminfo abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SYSTEMINFO_H
X#define	_SCHILY_SYSTEMINFO_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SYSTEMINFO_H
X#ifndef	_INCL_SYS_SYSTEMINFO_H
X#define	_INCL_SYS_SYSTEMINFO_H
X#include <sys/systeminfo.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SYSTEMINFO_H */
END-of-star-1.5.2/include/schily/systeminfo.h
echo x - star-1.5.2/include/schily/systeminfo.mk
sed 's/^X//' >star-1.5.2/include/schily/systeminfo.mk << 'END-of-star-1.5.2/include/schily/systeminfo.mk'
X#ident "@(#)systeminfo.mk	1.1 09/07/14 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		systeminfo.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/systeminfo.mk
echo x - star-1.5.2/include/schily/sha1.mk
sed 's/^X//' >star-1.5.2/include/schily/sha1.mk << 'END-of-star-1.5.2/include/schily/sha1.mk'
X#ident "@(#)sha1.mk	1.1 09/08/01 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sha1.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/sha1.mk
echo x - star-1.5.2/include/schily/resource.h
sed 's/^X//' >star-1.5.2/include/schily/resource.h << 'END-of-star-1.5.2/include/schily/resource.h'
X/* @(#)resource.h	1.8 10/08/24 Copyright 1995-2010 J. Schilling */
X/*
X *	Abstraction from resource limits
X *
X *	Missing parts for wait3() taken from SunOS
X *
X *	Copyright (c) 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_RESOURCE_H
X#define	_SCHILY_RESOURCE_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X
X/*
X * Get definitions from system include files
X */
X#ifdef	HAVE_SYS_RESOURCE_H
X#include <sys/resource.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * Now check which definitions are missing and define them localy.
X */
X
X#ifndef	RUSAGE_SELF
X/*
X * Resource utilization information.
X */
X
X#define	RUSAGE_SELF	0
X#define	RUSAGE_CHILDREN	-1
X
X#endif	/* RUSAGE_SELF */
X
X#ifndef	HAVE_STRUCT_RUSAGE
X
Xstruct	rusage {
X	struct timeval ru_utime;	/* user time used */
X	struct timeval ru_stime;	/* system time used */
X	long	ru_maxrss;
X#define	ru_first	ru_ixrss
X	long	ru_ixrss;		/* XXX: 0 */
X	long	ru_idrss;		/* XXX: sum of rm_asrss */
X	long	ru_isrss;		/* XXX: 0 */
X	long	ru_minflt;		/* any page faults not requiring I/O */
X	long	ru_majflt;		/* any page faults requiring I/O */
X	long	ru_nswap;		/* swaps */
X	long	ru_inblock;		/* block input operations */
X	long	ru_oublock;		/* block output operations */
X	long	ru_msgsnd;		/* messages sent */
X	long	ru_msgrcv;		/* messages received */
X	long	ru_nsignals;		/* signals received */
X	long	ru_nvcsw;		/* voluntary context switches */
X	long	ru_nivcsw;		/* involuntary " */
X#define	ru_last		ru_nivcsw
X};
X#endif	/* HAVE_STRUCT_RUSAGE */
X
X#ifndef	RLIMIT_CPU
X/*
X * Resource limits
X */
X#define	RLIMIT_CPU	0		/* cpu time in milliseconds */
X#define	RLIMIT_FSIZE	1		/* maximum file size */
X#define	RLIMIT_DATA	2		/* data size */
X#define	RLIMIT_STACK	3		/* stack size */
X#define	RLIMIT_CORE	4		/* core file size */
X#define	RLIMIT_RSS	5		/* resident set size */
X
X#define	RLIM_NLIMITS	6		/* number of resource limits */
X
X#ifndef	RLIM_INFINITY
X#define	RLIM_INFINITY	0x7fffffff
X#endif
X
Xstruct rlimit {
X	int	rlim_cur;		/* current (soft) limit */
X	int	rlim_max;		/* maximum value for rlim_cur */
X};
X
X#endif	/* RLIMIT_CPU */
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_RESOURCE_H */
END-of-star-1.5.2/include/schily/resource.h
echo x - star-1.5.2/include/schily/resource.mk
sed 's/^X//' >star-1.5.2/include/schily/resource.mk << 'END-of-star-1.5.2/include/schily/resource.mk'
X#ident "@(#)resource.mk	1.1 09/08/03 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		resource.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/resource.mk
echo x - star-1.5.2/include/schily/priv.h
sed 's/^X//' >star-1.5.2/include/schily/priv.h << 'END-of-star-1.5.2/include/schily/priv.h'
X/* @(#)priv.h	1.2 09/08/24 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for fine grained process privileges
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_PRIV_H
X#define	_SCHILY_PRIV_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * The Solaris process privileges interface.
X */
X#if	defined(HAVE_PRIV_H) && \
X	defined(HAVE_GETPPRIV) && defined(HAVE_SETPPRIV) && \
X	defined(HAVE_PRIV_SET)
X
X#define	HAVE_SOLARIS_PPRIV
X
X#ifndef	_INCL_PRIV_H
X#define	_INCL_PRIV_H
X#include <priv.h>
X#endif
X#endif
X
X/*
X * AIX implements an incompatible process privileges interface.
X * On AIX, we have sys/priv.h, getppriv(), setppriv() but no priv_set().
X */
X#if	defined(HAVE_SYS_PRIV_H) && \
X	defined(HAVE_GETPPRIV) && defined(HAVE_SETPPRIV) && \
X	defined(HAVE_PRIVBIT_SET)
X
X#define	HAVE_AIX_PPRIV
X
X#ifndef	_INCL_SYS_PRIV_H
X#define	_INCL_SYS_PRIV_H
X#include <sys/priv.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_PRIV_H */
END-of-star-1.5.2/include/schily/priv.h
echo x - star-1.5.2/include/schily/netdb.h
sed 's/^X//' >star-1.5.2/include/schily/netdb.h << 'END-of-star-1.5.2/include/schily/netdb.h'
X/* @(#)netdb.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Netdb abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_NETDB_H
X#define	_SCHILY_NETDB_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_NETDB_H
X#ifndef	_INCL_NETDB_H
X#include <netdb.h>
X#define	_INCL_NETDB_H
X#endif
X#endif
X
X#endif	/* _SCHILY_NETDB_H */
END-of-star-1.5.2/include/schily/netdb.h
echo x - star-1.5.2/include/schily/netdb.mk
sed 's/^X//' >star-1.5.2/include/schily/netdb.mk << 'END-of-star-1.5.2/include/schily/netdb.mk'
X#ident "@(#)netdb.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		netdb.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/netdb.mk
echo x - star-1.5.2/include/schily/setjmp.h
sed 's/^X//' >star-1.5.2/include/schily/setjmp.h << 'END-of-star-1.5.2/include/schily/setjmp.h'
X/* @(#)setjmp.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Setjmp abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SETJMP_H
X#define	_SCHILY_SETJMP_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_INCL_SETJMP_H
X#define	_INCL_SETJMP_H
X#include <setjmp.h>
X#endif
X
X#endif	/* _SCHILY_SETJMP_H */
END-of-star-1.5.2/include/schily/setjmp.h
echo x - star-1.5.2/include/schily/setjmp.mk
sed 's/^X//' >star-1.5.2/include/schily/setjmp.mk << 'END-of-star-1.5.2/include/schily/setjmp.mk'
X#ident "@(#)setjmp.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		setjmp.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/setjmp.mk
echo x - star-1.5.2/include/schily/shadow.h
sed 's/^X//' >star-1.5.2/include/schily/shadow.h << 'END-of-star-1.5.2/include/schily/shadow.h'
X/* @(#)shadow.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Shadow abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SHADOW_H
X#define	_SCHILY_SHADOW_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SHADOW_H
X#ifndef	_INCL_SHADOW_H
X#include <shadow.h>
X#define	_INCL_SHADOW_H
X#endif
X#endif
X
X#endif	/* _SCHILY_SHADOW_H */
END-of-star-1.5.2/include/schily/shadow.h
echo x - star-1.5.2/include/schily/shadow.mk
sed 's/^X//' >star-1.5.2/include/schily/shadow.mk << 'END-of-star-1.5.2/include/schily/shadow.mk'
X#ident "@(#)shadow.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		shadow.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/shadow.mk
echo x - star-1.5.2/include/schily/socket.h
sed 's/^X//' >star-1.5.2/include/schily/socket.h << 'END-of-star-1.5.2/include/schily/socket.h'
X/* @(#)socket.h	1.3 12/11/14 Copyright 2009-2012 J. Schilling */
X/*
X *	Socket abstraction
X *
X *	Copyright (c) 2009-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SOCKET_H
X#define	_SCHILY_SOCKET_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SOCKET_H
X
X#ifndef	_INCL_SYS_SOCKET_H
X#include <sys/socket.h>
X#define	_INCL_SYS_SOCKET_H
X#endif
X
X/*
X * Compatibility defines for UNIX/POSIX:
X *
X * Win32 defines a socket layer in winsock.h that is not POSIX compliant.
X * The functions socket() and accept() return an "unsigned int" instead of just
X * an "int". As a result, an error return from socket() and accept() cannot be
X * -1 but is INVALID_SOCKET. All functions from the Win32 socket layer except
X * socket() and accept() return -1 on error.
X * Since a socket is not a file descriptor on Win32, we cannot call close()
X * but need to call closesocket().
X * If we like to write software that compiles on a Win32 system without a
X * POSIX layer, we need use the following definitions as a workaround even
X * for UNIX/POSIX systems.
X */
X
X#define	SOCKET		int	/* The socket type on UNIX/POSIX */
X#define	INVALID_SOCKET	(-1)	/* Error return code for socket()/accept() */
X#define	closesocket	close	/* Use instead of close(s) for Win32 compat */
X
X#else	/* On a non-POSIX system: */
X/*
X * If we are on a Win32 system without a POSIX layer, we would need to include
X * winsock.h but this includes definitions that cause compatibility problems.
X * For this reason, we instead include our windows.h that contains the needed
X * workaround.
X */
X#ifdef	HAVE_WINDOWS_H
X#include <schily/windows.h>
X#endif	/* HAVE_WINDOWS_H */
X#endif
X
X#endif	/* _SCHILY_SOCKET_H */
END-of-star-1.5.2/include/schily/socket.h
echo x - star-1.5.2/include/schily/socket.mk
sed 's/^X//' >star-1.5.2/include/schily/socket.mk << 'END-of-star-1.5.2/include/schily/socket.mk'
X#ident "@(#)socket.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		socket.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/socket.mk
echo x - star-1.5.2/include/schily/times.h
sed 's/^X//' >star-1.5.2/include/schily/times.h << 'END-of-star-1.5.2/include/schily/times.h'
X/* @(#)times.h	1.1 09/07/13 Copyright 2009 J. Schilling */
X/*
X *	Times abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_TIMES_H
X#define	_SCHILY_TIMES_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>
X#endif
X
X/*
X * Make sure to include schily/time.h before, because of a Next Step bug.
X */
X#ifdef	HAVE_SYS_TIMES_H
X#ifndef	_INCL_SYS_TIMES_H
X#define	_INCL_SYS_TIMES_H
X#include <sys/times.h>
X#endif
X#endif
X
X#ifndef	CLK_TCK
X#if	defined(_SC_CLK_TCK)
X#define	CLK_TCK	((clock_t)sysconf(_SC_CLK_TCK))
X#else
X#define	CLK_TCK	60
X#endif
X#endif
X
X#endif	/* _SCHILY_TIMES_H */
END-of-star-1.5.2/include/schily/times.h
echo x - star-1.5.2/include/schily/times.mk
sed 's/^X//' >star-1.5.2/include/schily/times.mk << 'END-of-star-1.5.2/include/schily/times.mk'
X#ident "@(#)times.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		times.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/times.mk
echo x - star-1.5.2/include/schily/utsname.h
sed 's/^X//' >star-1.5.2/include/schily/utsname.h << 'END-of-star-1.5.2/include/schily/utsname.h'
X/* @(#)utsname.h	1.3 11/08/05 Copyright 2009-2011 J. Schilling */
X/*
X *	Utsname abstraction
X *
X *	Copyright (c) 2009-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_UTSNAME_H
X#define	_SCHILY_UTSNAME_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * NeXT Step has sys/utsname but not uname()
X */
X#ifdef	HAVE_SYS_UTSNAME_H
X#ifndef	_INCL_SYS_UTSNAME_H
X#define	_INCL_SYS_UTSNAME_H
X#include <sys/utsname.h>
X#endif
X#else	/* !HAVE_SYS_UTSNAME_H */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#ifndef	SYS_NMLN
X#define	SYS_NMLN	257
X#endif
X
Xstruct utsname {
X	char	sysname[SYS_NMLN];	/* Name of this OS		*/
X	char	nodename[SYS_NMLN];	/* Name of this network node	*/
X	char	release[SYS_NMLN];	/* Release level		*/
X	char	version[SYS_NMLN];	/* Version level		*/
X	char	machine[SYS_NMLN];	/* hardware type		*/
X};
X
X#ifndef	HAVE_UNAME
Xextern	int	uname	__PR((struct utsname *));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* !HAVE_SYS_UTSNAME_H */
X
X#endif	/* _SCHILY_UTSNAME_H */
END-of-star-1.5.2/include/schily/utsname.h
echo x - star-1.5.2/include/schily/utsname.mk
sed 's/^X//' >star-1.5.2/include/schily/utsname.mk << 'END-of-star-1.5.2/include/schily/utsname.mk'
X#ident "@(#)utsname.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		utsname.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/utsname.mk
echo x - star-1.5.2/include/schily/vfork.h
sed 's/^X//' >star-1.5.2/include/schily/vfork.h << 'END-of-star-1.5.2/include/schily/vfork.h'
X/* @(#)vfork.h	1.4 09/11/15 Copyright 2009 J. Schilling */
X/*
X *	Vfork abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_VFORK_H
X#define	_SCHILY_VFORK_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef	_SCHILY_UNISTD_H
X#include <schily/unistd.h>	/* vfork() definitions are here on Solaris */
X#endif
X
X#ifdef	HAVE_VFORK_H
X#ifndef	_INCL_VFORK_H
X#define	_INCL_VFORK_H
X#include <vfork.h>
X#endif
X#endif
X#ifdef	HAVE_SYS_FORK_H
X#ifndef	_INCL_SYS_FORK_H
X#define	_INCL_SYS_FORK_H
X#include <sys/fork.h>
X#endif
X#endif
X
X#ifdef	VMS
X#ifndef	VMS_VFORK_OK
X/*
X * vfork() on VMS implements strange deviations from the expected behavior.
X * The child does not run correctly unless it calls exec*().
X * The file descriptors are not separated from the parent.
X *
X * decc$set_child_standard_streams() allows to work around the most important
X * problem of having no separate space for file descriptors if the code is
X * prepared for the deviations.
X *
X * As VMS silently overwrites the "vfork" #definition from mconfig.h in
X * unistd.h, we need to reset to the definition in mconfig.h for all programs
X * that are not prepared for the deviations.
X */
X#ifndef	HAVE_VFORK	/* Paranoia in case VMS implements a working vfork() */
X#undef	vfork
X#define	vfork	fork
X#endif	/* HAVE_VFORK */
X
X#else	/* VMS_VFORK_OK */
X
X#define	set_child_standard_fds(in, out, err)		\
X			decc$set_child_standard_streams((in), (out), (err))
X#endif	/* VMS_VFORK_OK */
X#endif	/* VMS */
X
X#endif	/* _SCHILY_VFORK_H */
END-of-star-1.5.2/include/schily/vfork.h
echo x - star-1.5.2/include/schily/vfork.mk
sed 's/^X//' >star-1.5.2/include/schily/vfork.mk << 'END-of-star-1.5.2/include/schily/vfork.mk'
X#ident "@(#)vfork.mk	1.1 09/07/13 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		vfork.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/vfork.mk
echo x - star-1.5.2/include/schily/select.h
sed 's/^X//' >star-1.5.2/include/schily/select.h << 'END-of-star-1.5.2/include/schily/select.h'
X/* @(#)select.h	1.1 09/08/04 Copyright 2009 J. Schilling */
X/*
X *	Select abstraction
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SELECT_H
X#define	_SCHILY_SELECT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X#ifndef _SCHILY_TIME_H
X#include <schily/time.h>
X#endif
X
X#ifdef	HAVE_SYS_SELECT_H
X#ifndef	_INCL_SYS_SELECT_H
X#include <sys/select.h>
X#define	_INCL_SYS_SELECT_H
X#endif
X#endif
X
X/*
X * Some systems need sys/socket.h instead or in addition to sys/select.h
X */
X#ifdef	NEED_SYS_SOCKET_H
X#ifndef _SCHILY_SOCKET_H
X#include <schily/socket.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SELECT_H */
END-of-star-1.5.2/include/schily/select.h
echo x - star-1.5.2/include/schily/select.mk
sed 's/^X//' >star-1.5.2/include/schily/select.mk << 'END-of-star-1.5.2/include/schily/select.mk'
X#ident "@(#)select.mk	1.1 09/08/04 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		select.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/select.mk
echo x - star-1.5.2/include/schily/priv.mk
sed 's/^X//' >star-1.5.2/include/schily/priv.mk << 'END-of-star-1.5.2/include/schily/priv.mk'
X#ident "@(#)priv.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		priv.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/priv.mk
echo x - star-1.5.2/include/schily/assert.h
sed 's/^X//' >star-1.5.2/include/schily/assert.h << 'END-of-star-1.5.2/include/schily/assert.h'
X/* @(#)assert.h	1.1 09/08/07 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for assert.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_ASSERT_H
X#define	_SCHILY_ASSERT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_ASSERT_H
X#ifndef	_INCL_ASSERT_H
X#define	_INCL_ASSERT_H
X#include <assert.h>
X#endif
X#else	/* !HAVE_ASSERT_H */
X
X#undef	assert
X
X#ifdef	NDEBUG
X#define	assert(ignore)	((void) 0)
X#else
X#if	defined(__STDC__)
X#define	assert(exp) (void)((exp) || (__assert(#exp, __FILE__, __LINE__), 0))
X#else
X#define	assert(exp) (void)((exp) || (__assert("exp", __FILE__, __LINE__), 0))
X#endif
X#endif
X
X#endif	/* !HAVE_ASSERT_H */
X
X#endif	/* _SCHILY_ASSERT_H */
END-of-star-1.5.2/include/schily/assert.h
echo x - star-1.5.2/include/schily/assert.mk
sed 's/^X//' >star-1.5.2/include/schily/assert.mk << 'END-of-star-1.5.2/include/schily/assert.mk'
X#ident "@(#)assert.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		assert.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/assert.mk
echo x - star-1.5.2/include/schily/syslog.h
sed 's/^X//' >star-1.5.2/include/schily/syslog.h << 'END-of-star-1.5.2/include/schily/syslog.h'
X/* @(#)syslog.h	1.1 09/08/07 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for syslog
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SYSLOG_H
X#define	_SCHILY_SYSLOG_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYSLOG_H
X#ifndef	_INCL_SYSLOG_H
X#define	_INCL_SYSLOG_H
X#include <syslog.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SYSLOG_H */
END-of-star-1.5.2/include/schily/syslog.h
echo x - star-1.5.2/include/schily/syslog.mk
sed 's/^X//' >star-1.5.2/include/schily/syslog.mk << 'END-of-star-1.5.2/include/schily/syslog.mk'
X#ident "@(#)syslog.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		syslog.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/syslog.mk
echo x - star-1.5.2/include/schily/procfs.h
sed 's/^X//' >star-1.5.2/include/schily/procfs.h << 'END-of-star-1.5.2/include/schily/procfs.h'
X/* @(#)procfs.h	1.1 09/08/07 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for the process filesystem
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_PROCFS_H
X#define	_SCHILY_PROCFS_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_PROCFS_H
X#ifndef	_INCL_PROCFS_H
X#define	_INCL_PROCFS_H
X#include <procfs.h>
X#endif
X#else
X#ifdef	HAVE_SYS_PROCFS_H
X#ifndef	_INCL_SYS_PROCFS_H
X#define	_INCL_SYS_PROCFS_H
X#include <sys/procfs.h>
X#endif
X#endif
X#endif
X
X#endif	/* _SCHILY_PROCFS_H */
END-of-star-1.5.2/include/schily/procfs.h
echo x - star-1.5.2/include/schily/procfs.mk
sed 's/^X//' >star-1.5.2/include/schily/procfs.mk << 'END-of-star-1.5.2/include/schily/procfs.mk'
X#ident "@(#)procfs.mk	1.1 09/08/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		procfs.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/procfs.mk
echo x - star-1.5.2/include/schily/float.h
sed 's/^X//' >star-1.5.2/include/schily/float.h << 'END-of-star-1.5.2/include/schily/float.h'
X/* @(#)float.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for float.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_FLOAT_H
X#define	_SCHILY_FLOAT_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_FLOAT_H
X#ifndef	_INCL_FLOAT_H
X#define	_INCL_FLOAT_H
X#include <float.h>
X#endif
X#endif
X
X#ifdef	HAVE_VALUES_H
X#ifndef	_INCL_VALUES_H
X#define	_INCL_VALUES_H
X#include <values.h>
X#endif
X
X#ifndef	FLT_MAX
X#define	FLT_MAX	MAXFLOAT
X#endif
X#ifndef	FLT_MIN
X#define	FLT_MIN	MINFLOAT
X#endif
X#ifndef	DBL_MAX
X#define	DBL_MAX	MAXDOUBLE
X#endif
X#ifndef	DBL_MIN
X#define	DBL_MIN	MINDOUBLE
X#endif
X
X#endif
X
X
X
X#endif	/* _SCHILY_FLOAT_H */
END-of-star-1.5.2/include/schily/float.h
echo x - star-1.5.2/include/schily/float.mk
sed 's/^X//' >star-1.5.2/include/schily/float.mk << 'END-of-star-1.5.2/include/schily/float.mk'
X#ident "@(#)float.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		float.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/float.mk
echo x - star-1.5.2/include/schily/ipc.h
sed 's/^X//' >star-1.5.2/include/schily/ipc.h << 'END-of-star-1.5.2/include/schily/ipc.h'
X/* @(#)ipc.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for ipc.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_IPC_H
X#define	_SCHILY_IPC_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_IPC_H
X#ifndef	_INCL_SYS_IPC_H
X#define	_INCL_SYS_IPC_H
X#include <sys/ipc.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_IPC_H */
END-of-star-1.5.2/include/schily/ipc.h
echo x - star-1.5.2/include/schily/ipc.mk
sed 's/^X//' >star-1.5.2/include/schily/ipc.mk << 'END-of-star-1.5.2/include/schily/ipc.mk'
X#ident "@(#)ipc.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		ipc.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/ipc.mk
echo x - star-1.5.2/include/schily/sem.h
sed 's/^X//' >star-1.5.2/include/schily/sem.h << 'END-of-star-1.5.2/include/schily/sem.h'
X/* @(#)sem.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for sem.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SEM_H
X#define	_SCHILY_SEM_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SEM_H
X#ifndef	_INCL_SYS_SEM_H
X#define	_INCL_SYS_SEM_H
X#include <sys/sem.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SEM_H */
END-of-star-1.5.2/include/schily/sem.h
echo x - star-1.5.2/include/schily/sem.mk
sed 's/^X//' >star-1.5.2/include/schily/sem.mk << 'END-of-star-1.5.2/include/schily/sem.mk'
X#ident "@(#)sem.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sem.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/sem.mk
echo x - star-1.5.2/include/schily/shm.h
sed 's/^X//' >star-1.5.2/include/schily/shm.h << 'END-of-star-1.5.2/include/schily/shm.h'
X/* @(#)shm.h	1.1 09/08/08 Copyright 2009 J. Schilling */
X/*
X *	Abstraction code for shm.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_SHM_H
X#define	_SCHILY_SHM_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_SYS_SHM_H
X#ifndef	_INCL_SYS_SHM_H
X#define	_INCL_SYS_SHM_H
X#include <sys/shm.h>
X#endif
X#endif
X
X#endif	/* _SCHILY_SHM_H */
END-of-star-1.5.2/include/schily/shm.h
echo x - star-1.5.2/include/schily/shm.mk
sed 's/^X//' >star-1.5.2/include/schily/shm.mk << 'END-of-star-1.5.2/include/schily/shm.mk'
X#ident "@(#)shm.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		shm.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/shm.mk
echo x - star-1.5.2/include/schily/rmd160.h
sed 's/^X//' >star-1.5.2/include/schily/rmd160.h << 'END-of-star-1.5.2/include/schily/rmd160.h'
X/* @(#)rmd160.h	1.5 10/08/27 2009-2010 J. Schilling */
X/*
X * RMD160 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009-2010 J. Schilling
X */
X/*	$OpenBSD: rmd160.h,v 1.16 2004/06/22 01:57:30 jfb Exp $	*/
X/*
X * Copyright (c) 2001 Markus Friedl.  All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X */
X#ifndef	_SCHILY_RMD160_H
X#define	_SCHILY_RMD160_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	RMD160_BLOCK_LENGTH		64
X#define	RMD160_DIGEST_LENGTH		20
X#define	RMD160_DIGEST_STRING_LENGTH	(RMD160_DIGEST_LENGTH * 2 + 1)
X
X/* RMD160 context. */
Xtypedef struct RMD160Context {
X	UInt32_t state[5];			/* state */
X	UInt32_t count[2];			/* number of bits, mod 2^64 */
X	UInt8_t  buffer[RMD160_BLOCK_LENGTH];	/* input buffer */
X} RMD160_CTX;
X
Xextern void	 RMD160Init	__PR((RMD160_CTX *));
Xextern void	 RMD160Transform __PR((UInt32_t [5],
X					const UInt8_t [RMD160_BLOCK_LENGTH]));
Xextern void	 RMD160Update	__PR((RMD160_CTX *, const UInt8_t *, size_t));
Xextern void	 RMD160Pad	__PR((RMD160_CTX *));
Xextern void	 RMD160Final	__PR((UInt8_t [RMD160_DIGEST_LENGTH],
X					RMD160_CTX *));
Xextern char	*RMD160End	__PR((RMD160_CTX *, char *));
Xextern char	*RMD160File	__PR((const char *, char *));
Xextern char	*RMD160FileChunk __PR((const char *, char *, off_t, off_t));
Xextern char	*RMD160Data	__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_RMD160_H */
END-of-star-1.5.2/include/schily/rmd160.h
echo x - star-1.5.2/include/schily/rmd160.mk
sed 's/^X//' >star-1.5.2/include/schily/rmd160.mk << 'END-of-star-1.5.2/include/schily/rmd160.mk'
X#ident "@(#)rmd160.mk	1.1 09/08/08 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		rmd160.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/rmd160.mk
echo x - star-1.5.2/include/schily/sha2.h
sed 's/^X//' >star-1.5.2/include/schily/sha2.h << 'END-of-star-1.5.2/include/schily/sha2.h'
X/* @(#)sha2.h	1.5 10/08/27 2009-2010 J. Schilling */
X/*
X * SHA2 hash code taken from OpenBSD
X *
X * Portions Copyright (c) 2009-2010 J. Schilling
X */
X
X/*	$OpenBSD: sha2.h,v 1.7 2008/09/06 12:00:19 djm Exp $	*/
X
X/*
X * FILE:	sha2.h
X * AUTHOR:	Aaron D. Gifford <me@aarongifford.com>
X *
X * Copyright (c) 2000-2001, Aaron D. Gifford
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the copyright holder nor the names of contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X * $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
X */
X
X#ifndef	_SCHILY_SHA2_H
X#define	_SCHILY_SHA2_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#include <schily/utypes.h>
X
X
X/* ** SHA-256/384/512 Various Length Definitions ********************** */
X#define	SHA256_BLOCK_LENGTH		64
X#define	SHA256_DIGEST_LENGTH		32
X#define	SHA256_DIGEST_STRING_LENGTH	(SHA256_DIGEST_LENGTH * 2 + 1)
X#ifdef	HAVE_LONGLONG
X#define	SHA384_BLOCK_LENGTH		128
X#define	SHA384_DIGEST_LENGTH		48
X#define	SHA384_DIGEST_STRING_LENGTH	(SHA384_DIGEST_LENGTH * 2 + 1)
X#define	SHA512_BLOCK_LENGTH		128
X#define	_SHA512_BLOCK_LENGTH		128
X#define	SHA512_DIGEST_LENGTH		64
X#define	SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
X#else
X#define	_SHA512_BLOCK_LENGTH		128
X#endif
X
X
X/* ** SHA-256/384/512 Context Structure ****************************** */
Xtypedef struct _SHA2_CTX {
X	union {
X		UInt32_t	st32[8];
X#ifdef	HAVE_LONGLONG
X		UInt64_t	st64[8];
X#else
X		UInt32_t	st64[16];	/* Keep original size */
X#endif
X	} state;
X#ifdef	HAVE_LONGLONG
X	UInt64_t	bitcount[2];
X#else
X	UInt32_t	bitcount[4];
X#endif
X	UInt8_t	buffer[_SHA512_BLOCK_LENGTH];
X} SHA2_CTX;
X
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
Xextern void SHA256Init		__PR((SHA2_CTX *));
Xextern void SHA256Transform	__PR((UInt32_t state[8],
X					const UInt8_t [SHA256_BLOCK_LENGTH]));
Xextern void SHA256Update	__PR((SHA2_CTX *, const UInt8_t *, size_t));
Xextern void SHA256Pad		__PR((SHA2_CTX *));
Xextern void SHA256Final		__PR((UInt8_t [SHA256_DIGEST_LENGTH],
X					SHA2_CTX *));
Xextern char *SHA256End		__PR((SHA2_CTX *, char *));
Xextern char *SHA256File		__PR((const char *, char *));
Xextern char *SHA256FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char *SHA256Data		__PR((const UInt8_t *, size_t, char *));
X
X#ifdef	HAVE_LONGLONG
Xextern void SHA384Init		__PR((SHA2_CTX *));
Xextern void SHA384Transform	__PR((UInt64_t state[8],
X					const UInt8_t [SHA384_BLOCK_LENGTH]));
Xextern void SHA384Update	__PR((SHA2_CTX *, const UInt8_t *, size_t));
Xextern void SHA384Pad		__PR((SHA2_CTX *));
Xextern void SHA384Final		__PR((UInt8_t [SHA384_DIGEST_LENGTH],
X					SHA2_CTX *));
Xextern char *SHA384End		__PR((SHA2_CTX *, char *));
Xextern char *SHA384File		__PR((const char *, char *));
Xextern char *SHA384FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char *SHA384Data		__PR((const UInt8_t *, size_t, char *));
X
Xextern void SHA512Init		__PR((SHA2_CTX *));
Xextern void SHA512Transform	__PR((UInt64_t state[8],
X					const UInt8_t [SHA512_BLOCK_LENGTH]));
Xextern void SHA512Update	__PR((SHA2_CTX *, const UInt8_t *, size_t));
Xextern void SHA512Pad		__PR((SHA2_CTX *));
Xextern void SHA512Final		__PR((UInt8_t [SHA512_DIGEST_LENGTH],
X					SHA2_CTX *));
Xextern char *SHA512End		__PR((SHA2_CTX *, char *));
Xextern char *SHA512File		__PR((const char *, char *));
Xextern char *SHA512FileChunk	__PR((const char *, char *, off_t, off_t));
Xextern char *SHA512Data		__PR((const UInt8_t *, size_t, char *));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif /* _SCHILY_SHA2_H */
END-of-star-1.5.2/include/schily/sha2.h
echo x - star-1.5.2/include/schily/sha2.mk
sed 's/^X//' >star-1.5.2/include/schily/sha2.mk << 'END-of-star-1.5.2/include/schily/sha2.mk'
X#ident "@(#)sha2.mk	1.1 09/08/09 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		sha2.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/sha2.mk
echo x - star-1.5.2/include/schily/math.h
sed 's/^X//' >star-1.5.2/include/schily/math.h << 'END-of-star-1.5.2/include/schily/math.h'
X/* @(#)math.h	1.1 09/08/26 Copyright 2009 J. Schilling */
X/*
X *	Abstraction from math.h
X *
X *	Copyright (c) 2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_MATH_H
X#define	_SCHILY_MATH_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_MATH_H
X#ifndef	_INCL_MATH_H
X#define	_INCL_MATH_H
X#include <math.h>
X#endif
X#endif
X
X
X#endif	/* _SCHILY_MATH_H */
END-of-star-1.5.2/include/schily/math.h
echo x - star-1.5.2/include/schily/math.mk
sed 's/^X//' >star-1.5.2/include/schily/math.mk << 'END-of-star-1.5.2/include/schily/math.mk'
X#ident "@(#)math.mk	1.1 09/08/26 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		math.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/math.mk
echo x - star-1.5.2/include/schily/dbgmalloc.h
sed 's/^X//' >star-1.5.2/include/schily/dbgmalloc.h << 'END-of-star-1.5.2/include/schily/dbgmalloc.h'
X/* @(#)dbgmalloc.h	1.5 10/09/19 Copyright 2010 J. Schilling */
X/*
X *	Definitions for libdmalloc
X *
X *	Copyright (c) 2009-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_DBGMALLOC_H
X#define	_SCHILY_DBGMALLOC_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	DBG_MALLOC
X#include <schily/types.h>
X#include <schily/stdlib.h>
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
Xextern	void	*dbg_malloc		__PR((size_t size, char *file,
X							int line));
Xextern	void	*dbg_calloc		__PR((size_t nelem, size_t elsize,
X							char *file, int line));
Xextern	void	*dbg_realloc		__PR((void *t, size_t size, char *file,
X							int line));
X#define	malloc(s)			dbg_malloc(s, __FILE__, __LINE__)
X#define	calloc(n, s)			dbg_calloc(n, s, __FILE__, __LINE__)
X#define	realloc(t, s)			dbg_realloc(t, s, __FILE__, __LINE__)
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif	/* DBG_MALLOC */
X
X#include <schily/standard.h>
X
X#ifdef __cplusplus
Xextern "C" {
X#endif
X
Xextern	BOOL	acheckdamage		__PR((void));
Xextern	void	freechecking		__PR((BOOL val));
Xextern	void	nomemraising		__PR((BOOL val));
X
X#ifdef __cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_DBGMALLOC_H */
END-of-star-1.5.2/include/schily/dbgmalloc.h
echo x - star-1.5.2/include/schily/dbgmalloc.mk
sed 's/^X//' >star-1.5.2/include/schily/dbgmalloc.mk << 'END-of-star-1.5.2/include/schily/dbgmalloc.mk'
X#ident "@(#)dbgmalloc.mk	1.1 09/10/16 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		dbgmalloc.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/dbgmalloc.mk
echo x - star-1.5.2/include/schily/libgen.h
sed 's/^X//' >star-1.5.2/include/schily/libgen.h << 'END-of-star-1.5.2/include/schily/libgen.h'
X/* @(#)libgen.h	1.2 10/05/07 Copyright 2010 J. Schilling */
X/*
X *	Abstraction from libgen.h
X *
X *	Copyright (c) 2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_LIBGEN_H
X#define	_SCHILY_LIBGEN_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_LIBGEN_H
X#ifndef	_INCL_LIBGEN_H
X#define	_INCL_LIBGEN_H
X#include <libgen.h>
X#endif
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * See also libport.h
X */
X#ifndef	HAVE_BASENAME
Xextern	char		*basename	__PR((char *name));
X#endif
X#ifndef	HAVE_DIRNAME
Xextern	char		*dirname	__PR((char *name));
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY_LIBGEN_H */
END-of-star-1.5.2/include/schily/libgen.h
echo x - star-1.5.2/include/schily/libgen.mk
sed 's/^X//' >star-1.5.2/include/schily/libgen.mk << 'END-of-star-1.5.2/include/schily/libgen.mk'
X#ident "@(#)libgen.mk	1.1 10/04/28 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		libgen.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/libgen.mk
echo x - star-1.5.2/include/schily/_regex.h
sed 's/^X//' >star-1.5.2/include/schily/_regex.h << 'END-of-star-1.5.2/include/schily/_regex.h'
X/* @(#)_regex.h	1.6 10/08/27 2010 J. Schilling */
X/*
X * regex.h code taken from FreeBSD
X *
X * Portions Copyright (c) 2010 J. Schilling
X */
X/*
X * Copyright (c) 1992 Henry Spencer.
X * Copyright (c) 1992, 1993
X *	The Regents of the University of California.  All rights reserved.
X *
X * This code is derived from software contributed to Berkeley by
X * Henry Spencer of the University of Toronto.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X *    notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X *    notice, this list of conditions and the following disclaimer in the
X *    documentation and/or other materials provided with the distribution.
X * 3. Neither the name of the University nor the names of its contributors
X *    may be used to endorse or promote products derived from this software
X *    without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X *
X *	@(#)regex.h	8.2 (Berkeley) 1/3/94
X * $FreeBSD: src/include/regex.h,v 1.12 2010/02/16 19:39:50 imp Exp $
X */
X
X#ifndef	_SCHILY__REGEX_H
X#define	_SCHILY__REGEX_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#define	__restrict
X
X/* types */
Xtypedef	ssize_t		regoff_t;
X
Xtypedef struct {
X	int re_magic;
X	size_t re_nsub;		/* number of parenthesized subexpressions */
X	const char *re_endp;	/* end pointer for REG_PEND */
X	struct re_guts *re_g;	/* none of your business :-) */
X} regex_t;
X
Xtypedef struct {
X	regoff_t rm_so;		/* start of match */
X	regoff_t rm_eo;		/* end of match */
X} regmatch_t;
X
X/* regcomp() flags */
X#define	REG_BASIC	0000
X#define	REG_EXTENDED	0001
X#define	REG_ICASE	0002
X#define	REG_NOSUB	0004
X#define	REG_NEWLINE	0010
X#define	REG_NOSPEC	0020
X#define	REG_PEND	0040
X#define	REG_DUMP	0200
X
X/* regerror() flags */
X#define	REG_ENOSYS	(-1)
X#define	REG_NOMATCH	 1
X#define	REG_BADPAT	 2
X#define	REG_ECOLLATE	 3
X#define	REG_ECTYPE	 4
X#define	REG_EESCAPE	 5
X#define	REG_ESUBREG	 6
X#define	REG_EBRACK	 7
X#define	REG_EPAREN	 8
X#define	REG_EBRACE	 9
X#define	REG_BADBR	10
X#define	REG_ERANGE	11
X#define	REG_ESPACE	12
X#define	REG_BADRPT	13
X#define	REG_EMPTY	14
X#define	REG_ASSERT	15
X#define	REG_INVARG	16
X#define	REG_ILLSEQ	17
X#define	REG_ATOI	255	/* convert name to number (!) */
X#define	REG_ITOA	0400	/* convert number to name (!) */
X
X/* regexec() flags */
X#define	REG_NOTBOL	00001
X#define	REG_NOTEOL	00002
X#define	REG_STARTEND	00004
X#define	REG_TRACE	00400	/* tracing of execution */
X#define	REG_LARGE	01000	/* force large representation */
X#define	REG_BACKR	02000	/* force use of backref code */
X
Xextern int	regcomp __PR((regex_t *__restrict, const char *__restrict,
X				    int));
Xextern size_t	regerror __PR((int, const regex_t *__restrict, char *__restrict,
X				    size_t));
X/*
X * XXX forth parameter should be `regmatch_t [__restrict]', but isn't because
X * of a bug in GCC 3.2 (when -std=c99 is specified) which perceives this as a
X * syntax error.
X */
Xextern int	regexec __PR((const regex_t *__restrict, const char *__restrict,
X				    size_t,
X				    regmatch_t *__restrict, int));
Xextern void	regfree __PR((regex_t *));
X
X#undef	__restrict
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* _SCHILY__REGEX_H */
END-of-star-1.5.2/include/schily/_regex.h
echo x - star-1.5.2/include/schily/_regex.mk
sed 's/^X//' >star-1.5.2/include/schily/_regex.mk << 'END-of-star-1.5.2/include/schily/_regex.mk'
X#ident "@(#)_regex.mk	1.1 10/05/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		_regex.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/_regex.mk
echo x - star-1.5.2/include/schily/regex.h
sed 's/^X//' >star-1.5.2/include/schily/regex.h << 'END-of-star-1.5.2/include/schily/regex.h'
X/* @(#)regex.h	1.1 10/05/07 Copyright 2010 J. Schilling */
X/*
X *	Abstraction from regex.h
X *
X *	Copyright (c) 2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_REGEX_H
X#define	_SCHILY_REGEX_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_REGEX_Ha
X#ifndef	_INCL_REGEX_H
X#define	_INCL_REGEX_H
X#include <regex.h>
X#endif
X#else
X#include <schily/_regex.h>
X#endif
X
X
X#endif	/* _SCHILY_REGEX_H */
END-of-star-1.5.2/include/schily/regex.h
echo x - star-1.5.2/include/schily/regex.mk
sed 's/^X//' >star-1.5.2/include/schily/regex.mk << 'END-of-star-1.5.2/include/schily/regex.mk'
X#ident "@(#)regex.mk	1.1 10/05/07 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		regex.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/regex.mk
echo x - star-1.5.2/include/schily/windows.h
sed 's/^X//' >star-1.5.2/include/schily/windows.h << 'END-of-star-1.5.2/include/schily/windows.h'
X/* @(#)windows.h	1.2 13/01/07 Copyright 2011-2013 J. Schilling */
X/*
X *	Definitions for windows.h
X *
X *	Copyright (c) 2011-2013 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_WINDOWS_H
X#define	_SCHILY_WINDOWS_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X#ifdef	HAVE_WINDOWS_H
X#ifndef	_INCL_WINDOWS_H
X
X#ifdef	_MSC_VER	/* configure believes they are missing */
X#undef	u_char
X#undef	u_short
X#undef	u_int
X#undef	u_long
X#endif
X
X#if defined(__CYGWIN32__) || defined(__CYGWIN__)
X
X/*
X * Cygwin-1.7.17 (Autumn 2012) makes life hard as it prevents to rename
X * the Cygwin BOOL definition. Note that we have our own BOOL definition
X * in schily/standard.h that exists since 1982 which happened before Microsoft
X * introduced their BOOL.
X *
X * Previous Cygwin versions have been compatible to the original MS include
X * files and allowed to rename the BOOL from windows.h (windef.h) by just using
X * #define BOOL WBOOL before #include <windows.h>.
X *
X * Recent Cygwin version are unfriendly to us and prevent this.
X * We now need a two level #define to redirect the BOOL from windows.h to the
X * Cygwin specific WINBOOL typedef.
X *
X * If we do not include schily/standard.h with newer Cygwin, we cannot get
X * working typedefs for "PBOOL" and "LPBOOL".
X */
X#include <schily/standard.h>	/* Get our BOOL typedef */
X
X#define	_NO_BOOL_TYPEDEF	/* Avoid 2nd BOOL typedef on Cygwin-1.7.17 */
X	
X#define	WBOOL	WINBOOL		/* Cygwin-1.7.17 prevents to avoid BOOL */
X#endif	/* defined(__CYGWIN32__) || defined(__CYGWIN__) */
X
X#define	BOOL	WBOOL		/* This is the Win BOOL		*/
X#define	format	__ms_format	/* Avoid format parameter hides global ... */
X
X#ifdef	timerclear		/* struct timeval has already been declared */
X#define	timeval	__ms_timeval
X#endif
X
X#include <windows.h>
X
X#undef	BOOL			/* MS Code uses WBOOL or #define BOOL WBOOL */
X#undef	format			/* Return to previous definition */
X#undef	timeval
X
X#define	_INCL_WINDOWS_H
X#endif
X
X#endif	/* HAVE_WINDOWS_H */
X
X#endif	/* _SCHILY_WINDOWS_H */
END-of-star-1.5.2/include/schily/windows.h
echo x - star-1.5.2/include/schily/windows.mk
sed 's/^X//' >star-1.5.2/include/schily/windows.mk << 'END-of-star-1.5.2/include/schily/windows.mk'
X#ident "@(#)windows.mk	1.1 11/08/02 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		windows.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/windows.mk
echo x - star-1.5.2/include/schily/stdint.h
sed 's/^X//' >star-1.5.2/include/schily/stdint.h << 'END-of-star-1.5.2/include/schily/stdint.h'
X/* @(#)stdint.h	1.36 12/12/03 Copyright 1997-2012 J. Schilling */
X/*
X *	Abstraction from stdint.h
X *
X *	Copyright (c) 1997-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_STDINT_H
X#define	_SCHILY_STDINT_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * Let us include system defined types too.
X */
X#ifndef	_SCHILY_TYPES_H
X#include <schily/types.h>
X#endif
X
X/*
X * Include sys/param.h for NBBY - needed in case that CHAR_BIT is missing
X */
X#ifndef	_SCHILY_PARAM_H
X#include <schily/param.h>	/* Must be before limits.h */
X#endif
X
X/*
X * Include limits.h for CHAR_BIT - needed by TYPE_MINVAL(t) and  TYPE_MAXVAL(t)
X */
X#ifndef	_SCHILY_LIMITS_H
X#include <schily/limits.h>
X#endif
X
X#ifndef	CHAR_BIT
X#ifdef	NBBY
X#define	CHAR_BIT	NBBY
X#endif
X#endif
X
X/*
X * Last resort: define CHAR_BIT by hand
X */
X#ifndef	CHAR_BIT
X#define	CHAR_BIT	8
X#endif
X
X/*
X * These macros may not work on all platforms but as we depend
X * on two's complement in many places, they do not reduce portability.
X * The macros below work with 2s complement and ones complement machines.
X * Verify with this table...
X *
X *	Bits	1's c.	2's complement.
X * 	100	-3	-4
X * 	101	-2	-3
X * 	110	-1	-2
X * 	111	-0	-1
X * 	000	+0	 0
X * 	001	+1	+1
X * 	010	+2	+2
X * 	011	+3	+3
X *
X * Computing -TYPE_MINVAL(type) will not work on 2's complement machines
X * if 'type' is int or more. Use -(UIntmax_t)TYPE_MINVAL(type), it works
X * for both 1's complement and 2's complement machines.
X */
X#define	TYPE_ISSIGNED(t)	(((t)-1) < ((t)0))
X#define	TYPE_ISUNSIGNED(t)	(!TYPE_ISSIGNED(t))
X#define	TYPE_MSBVAL(t)		((t)(~((t)0) << (sizeof (t)*CHAR_BIT - 1)))
X#define	TYPE_MINVAL(t)		(TYPE_ISSIGNED(t)			\
X				    ? TYPE_MSBVAL(t)			\
X				    : ((t)0))
X#define	TYPE_MAXVAL(t)		((t)(~((t)0) - TYPE_MINVAL(t)))
X
X/*
X * MSVC has size_t in stddef.h
X */
X#ifdef HAVE_STDDEF_H
X#ifndef	_INCL_STDDEF_H
X#include <stddef.h>
X#define	_INCL_STDDEF_H
X#endif
X#endif
X
X/*
X * CHAR_IS_UNSIGNED is needed to define int8_t
X */
X#ifdef	__CHAR_UNSIGNED__	/* GNU GCC define (dynamic)	*/
X#ifndef CHAR_IS_UNSIGNED
X#define	CHAR_IS_UNSIGNED	/* Sing Schily define (static)	*/
X#endif
X#endif
X
X/*
X * This is a definition for a compiler dependant 64 bit type.
X * There is currently a silently fallback to a long if the compiler does not
X * support it. Check if this is the right way.
X *
X * Be very careful here as MSVC does not implement long long but rather __int64
X * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to
X * check for a MSVC __int128 type.
X */
X#ifndef	NO_LONGLONG
X#	if	!defined(USE_LONGLONG) && defined(HAVE_LONGLONG)
X#		define	USE_LONGLONG
X#	endif
X#	if	!defined(USE_LONGLONG) && defined(HAVE___INT64)
X#		define	USE_LONGLONG
X#	endif
X#endif
X
X#ifdef	USE_LONGLONG
X
X#	if	defined(HAVE___INT64)
X
Xtypedef	__int64			Llong;
Xtypedef	unsigned __int64	Ullong;	/* We should avoid this */
Xtypedef	unsigned __int64	ULlong;
X
X#define	SIZEOF_LLONG		SIZEOF___INT64
X#define	SIZEOF_ULLONG		SIZEOF_UNSIGNED___INT64
X
X#	else	/* We must have HAVE_LONG_LONG */
X
Xtypedef	long long		Llong;
Xtypedef	unsigned long long	Ullong;	/* We should avoid this */
Xtypedef	unsigned long long	ULlong;
X
X#define	SIZEOF_LLONG		SIZEOF_LONG_LONG
X#define	SIZEOF_ULLONG		SIZEOF_UNSIGNED_LONG_LONG
X
X#	endif	/* HAVE___INT64 / HAVE_LONG_LONG */
X
X#else	/* !USE_LONGLONG */
X
Xtypedef	long			Llong;
Xtypedef	unsigned long		Ullong;	/* We should avoid this */
Xtypedef	unsigned long		ULlong;
X
X#define	SIZEOF_LLONG		SIZEOF_LONG
X#define	SIZEOF_ULLONG		SIZEOF_UNSIGNED_LONG
X
X#endif	/* USE_LONGLONG */
X
X#ifndef	LLONG_MIN
X#define	LLONG_MIN	TYPE_MINVAL(Llong)
X#endif
X#ifndef	LLONG_MAX
X#define	LLONG_MAX	TYPE_MAXVAL(Llong)
X#endif
X#ifndef	ULLONG_MAX
X#define	ULLONG_MAX	TYPE_MAXVAL(Ullong)
X#endif
X
X/*
X * Start inttypes.h emulation.
X *
X * Thanks to Solaris 2.4 and even recent 1999 Linux versions, we
X * cannot use the official UNIX-98 names here. Old Solaris versions
X * define parts of the types in some exotic include files.
X * Linux even defines incompatible types in <sys/types.h>.
X */
X
X#if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
X#if defined(HAVE_INTTYPES_H)
X#	ifndef	_INCL_INTTYPES_H
X#	include <inttypes.h>
X#	define	_INCL_INTTYPES_H
X#	endif
X#else
X#if defined(HAVE_STDINT_H)
X#	ifndef	_INCL_STDINT_H
X#	include <stdint.h>
X#	define	_INCL_STDINT_H
X#	endif
X#endif
X#endif
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X/*
X * On VMS on VAX, these types are present but non-scalar.
X * Thus we may not be able to use them
X */
X#ifdef	HAVE_LONGLONG
X#	define	HAVE_INT64_T
X#	define	HAVE_UINT64_T
X#endif
X
X#define	Int8_t			int8_t
X#define	Int16_t			int16_t
X#define	Int32_t			int32_t
X#ifdef	HAVE_LONGLONG
X#define	Int64_t			int64_t
X#endif
X#define	Intmax_t		intmax_t
X#define	UInt8_t			uint8_t
X#define	UInt16_t		uint16_t
X#define	UInt32_t		uint32_t
X#ifdef	HAVE_LONGLONG
X#define	UInt64_t		uint64_t
X#endif
X#define	UIntmax_t		uintmax_t
X
X#define	Intptr_t		intptr_t
X#define	UIntptr_t		uintptr_t
X
X/*
X * If we only have a UNIX-98 inttypes.h but no SUSv3
X *
X * Beware not to use int64_t / uint64_t as VMS on a VAX defines
X * them as non-scalar (structure) based types.
X */
X#ifndef	HAVE_TYPE_INTMAX_T
X#define	intmax_t	Llong
X#endif
X#ifndef	HAVE_TYPE_UINTMAX_T
X#define	uintmax_t	ULlong
X#endif
X
X#ifdef	__cplusplus
X}
X#endif
X
X#else	/* !HAVE_INTTYPES_H */
X
X#ifdef	__cplusplus
Xextern "C" {
X#endif
X
X#if SIZEOF_CHAR != 1 || SIZEOF_UNSIGNED_CHAR != 1
X/*
X * #error will not work for all compilers (e.g. sunos4)
X * The following line will abort compilation on all compilers
X * if the above is true. And that's what we want.
X */
Xerror  Sizeof char is not equal 1
X
X#include <schily/err_char.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#if	defined(__STDC__) || defined(CHAR_IS_UNSIGNED)
X	typedef	signed char		Int8_t;
X#else
X	typedef	char			Int8_t;
X#endif
X
X#if SIZEOF_SHORT_INT == 2
X	typedef	short			Int16_t;
X#else
X	error		No int16_t found
X
X#include <schily/err_type.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#if SIZEOF_INT == 4
X#if defined(_MSC_VER) && SIZEOF_LONG_INT == 4
X	typedef	long			Int32_t;
X#else
X	typedef	int			Int32_t;
X#endif
X#else
X	error		No int32_t found
X
X#include <schily/err_type.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#if SIZEOF_LONG_INT == 8
X	typedef		long		Int64_t;
X#	define	HAVE_INT64_T
X#else
X#if SIZEOF_LONG_LONG == 8
X	typedef		long long	Int64_t;
X#	define	HAVE_INT64_T
X#else
X#if SIZEOF___INT64 == 8
X	typedef		__int64		Int64_t;
X#	define	HAVE_INT64_T
X#else
X/*
X * Tolerate platforms without 64-Bit support.
X */
X/*	error		No int64_t found */
X#endif
X#endif
X#endif
X
X#if SIZEOF_CHAR_P == SIZEOF_INT
X	typedef		int		Intptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_LONG_INT
X	typedef		long		Intptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_LLONG
X	typedef		Llong		Intptr_t;
X#else
X	error		No intptr_t found
X
X#include <schily/err_type.h>	/* Avoid "unknown directive" with K&R */
X#endif
X#endif
X#endif
X
Xtypedef	unsigned char		UInt8_t;
X
X#if SIZEOF_UNSIGNED_SHORT_INT == 2
X	typedef	unsigned short		UInt16_t;
X#else
X	error		No uint16_t found
X
X#include <schily/err_type.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#if SIZEOF_UNSIGNED_INT == 4
X#if defined(_MSC_VER) && SIZEOF_UNSIGNED_LONG_INT == 4
X	typedef	unsigned long		UInt32_t;
X#else
X	typedef	unsigned int		UInt32_t;
X#endif
X#else
X	error		No int32_t found
X
X#include <schily/err_type.h>	/* Avoid "unknown directive" with K&R */
X#endif
X
X#if SIZEOF_UNSIGNED_LONG_INT == 8
X	typedef	unsigned long		UInt64_t;
X#	define	HAVE_UINT64_T
X#else
X#if SIZEOF_UNSIGNED_LONG_LONG == 8
X	typedef	unsigned long long	UInt64_t;
X#	define	HAVE_UINT64_T
X#else
X#if SIZEOF_UNSIGNED___INT64 == 8
X	typedef	unsigned __int64	UInt64_t;
X#	define	HAVE_UINT64_T
X#else
X/*
X * Tolerate platforms without 64-Bit support.
X */
X/*	error		No uint64_t found */
X#endif
X#endif
X#endif
X
X#define	Intmax_t	Llong
X#define	UIntmax_t	Ullong
X
X#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_INT
X	typedef		unsigned int	UIntptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_LONG_INT
X	typedef		unsigned long	UIntptr_t;
X#else
X#if SIZEOF_CHAR_P == SIZEOF_ULLONG
X	typedef		ULlong		UIntptr_t;
X#else
X	error		No uintptr_t found
X
X#include <schily/err_type.h>	/* Avoid "unknown directive" with K&R */
X#endif
X#endif
X#endif
X
X#ifdef	_MSC_VER
X/*
X * All recent platforms define the POSIX/C-99 compliant types from inttypes.h
X * except Microsoft. With these #defines, we may also use official types on a
X * Microsoft environment.
X *
X * Warning: Linux-2.2 and before do not have inttypes.h and define some of the
X * types in an incmpatible way.
X */
X#undef	int8_t
X#define	int8_t			Int8_t
X#undef	int16_t
X#define	int16_t			Int16_t
X#undef	int32_t
X#define	int32_t			Int32_t
X#undef	int64_t
X#define	int64_t			Int64_t
X#undef	intmax_t
X#define	intmax_t		Intmax_t
X#undef	uint8_t
X#define	uint8_t			UInt8_t
X#undef	uint16_t
X#define	uint16_t		UInt16_t
X#undef	uint32_t
X#define	uint32_t		UInt32_t
X#undef	uint64_t
X#define	uint64_t		UInt64_t
X#undef	uintmax_t
X#define	uintmax_t		UIntmax_t
X
X#undef	intptr_t
X#define	intptr_t		Intptr_t
X#undef	uintptr_t
X#define	uintptr_t		UIntptr_t
X#endif	/* _MSC_VER */
X
X#ifdef	__cplusplus
X}
X#endif
X
X#endif	/* HAVE_INTTYPES_H */
X
X#ifndef	INT8_MIN
X#define	INT8_MIN	TYPE_MINVAL(Int8_t)
X#endif
X#ifndef	INT8_MAX
X#define	INT8_MAX	TYPE_MAXVAL(Int8_t)
X#endif
X#ifndef	UINT8_MAX
X#define	UINT8_MAX	TYPE_MAXVAL(UInt8_t)
X#endif
X
X#ifndef	INT16_MIN
X#define	INT16_MIN	TYPE_MINVAL(Int16_t)
X#endif
X#ifndef	INT16_MAX
X#define	INT16_MAX	TYPE_MAXVAL(Int16_t)
X#endif
X#ifndef	UINT16_MAX
X#define	UINT16_MAX	TYPE_MAXVAL(UInt16_t)
X#endif
X
X#ifndef	INT32_MIN
X#define	INT32_MIN	TYPE_MINVAL(Int32_t)
X#endif
X#ifndef	INT32_MAX
X#define	INT32_MAX	TYPE_MAXVAL(Int32_t)
X#endif
X#ifndef	UINT32_MAX
X#define	UINT32_MAX	TYPE_MAXVAL(UInt32_t)
X#endif
X
X#ifdef	HAVE_INT64_T
X#ifndef	INT64_MIN
X#define	INT64_MIN	TYPE_MINVAL(Int64_t)
X#endif
X#ifndef	INT64_MAX
X#define	INT64_MAX	TYPE_MAXVAL(Int64_t)
X#endif
X#endif
X#ifdef	HAVE_UINT64_T
X#ifndef	UINT64_MAX
X#define	UINT64_MAX	TYPE_MAXVAL(UInt64_t)
X#endif
X#endif
X
X#ifndef	INTMAX_MIN
X#define	INTMAX_MIN	TYPE_MINVAL(Intmax_t)
X#endif
X#ifndef	INTMAX_MAX
X#define	INTMAX_MAX	TYPE_MAXVAL(Intmax_t)
X#endif
X#ifndef	UINTMAX_MAX
X#define	UINTMAX_MAX	TYPE_MAXVAL(UIntmax_t)
X#endif
X
X#define	SIZE_T_MIN	TYPE_MINVAL(size_t)
X#ifdef	SIZE_T_MAX
X#undef	SIZE_T_MAX			/* FreeBSD has a similar #define */
X#endif
X#define	SIZE_T_MAX	TYPE_MAXVAL(size_t)
X
X#define	SSIZE_T_MIN	TYPE_MINVAL(ssize_t)
X#define	SSIZE_T_MAX	TYPE_MAXVAL(ssize_t)
X
X#endif	/* _SCHILY_STDINT_H */
END-of-star-1.5.2/include/schily/stdint.h
echo x - star-1.5.2/include/schily/stdint.mk
sed 's/^X//' >star-1.5.2/include/schily/stdint.mk << 'END-of-star-1.5.2/include/schily/stdint.mk'
X#ident "@(#)stdint.mk	1.1 12/01/22 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		stdint.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
XIFDEF=	-UJOSxx
X
XXRELFILES=	stdint.h stdint.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rel
X###########################################################################
XMAKE_LICENSE=MKCDDL
END-of-star-1.5.2/include/schily/stdint.mk
echo x - star-1.5.2/include/schily/inttypes.h
sed 's/^X//' >star-1.5.2/include/schily/inttypes.h << 'END-of-star-1.5.2/include/schily/inttypes.h'
X/* @(#)inttypes.h	1.35 12/01/22 Copyright 1997-2012 J. Schilling */
X/*
X *	Abstraction from inttypes.h
X *
X *	Copyright (c) 1997-2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_SCHILY_INTTYPES_H
X#define	_SCHILY_INTTYPES_H
X
X#ifndef	_SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X
X/*
X * inttypes.h is based on stdint.h
X */
X#ifndef	_SCHILY_STDINT_H
X#include <schily/stdint.h>
X#endif
X
X/*
X * inttypes.h inaddition to stdint.h defines printf() format strings.
X * As we have a portable printf() in libschily, we do not need these #defines.
X */
X
X#endif	/* _SCHILY_INTTYPES_H */
END-of-star-1.5.2/include/schily/inttypes.h
echo x - star-1.5.2/include/schily/inttypes.mk
sed 's/^X//' >star-1.5.2/include/schily/inttypes.mk << 'END-of-star-1.5.2/include/schily/inttypes.mk'
X#ident "@(#)inttypes.mk	1.1 12/01/22 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		inttypes.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
XIFDEF=	-UJOSxx
X
XXRELFILES=	inttypes.h inttypes.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rel
X###########################################################################
XMAKE_LICENSE=MKCDDL
END-of-star-1.5.2/include/schily/inttypes.mk
echo x - star-1.5.2/include/schily/err_arch.h
sed 's/^X//' >star-1.5.2/include/schily/err_arch.h << 'END-of-star-1.5.2/include/schily/err_arch.h'
X/* @(#)err_arch.h	1.1 12/12/03 Copyright 2012 J. Schilling */
X/*
X *	#error include for unconfigured architecture
X *
X *	Copyright (c) 2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ERR_ARCH_H
X#define	_SCHILY_ERR_ARCH_H
X
X#error unconfigured architecture
X
X#endif /* _SCHILY_ERR_ARCH_H */
END-of-star-1.5.2/include/schily/err_arch.h
echo x - star-1.5.2/include/schily/err_arch.mk
sed 's/^X//' >star-1.5.2/include/schily/err_arch.mk << 'END-of-star-1.5.2/include/schily/err_arch.mk'
X#ident "@(#)err_arch.mk	1.1 12/12/03 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		err_arch.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/err_arch.mk
echo x - star-1.5.2/include/schily/err_bit.h
sed 's/^X//' >star-1.5.2/include/schily/err_bit.h << 'END-of-star-1.5.2/include/schily/err_bit.h'
X/* @(#)err_bit.h	1.1 12/12/03 Copyright 2012 J. Schilling */
X/*
X *	#error include for _BIT_FIELDS_LTOH / _BIT_FIELDS_HTOL
X *
X *	Copyright (c) 2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ERR_BIT_H
X#define	_SCHILY_ERR_BIT_H
X
X#error Only one of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL may be defined
X
X#endif /* _SCHILY_ERR_BIT_H */
END-of-star-1.5.2/include/schily/err_bit.h
echo x - star-1.5.2/include/schily/err_bit.mk
sed 's/^X//' >star-1.5.2/include/schily/err_bit.mk << 'END-of-star-1.5.2/include/schily/err_bit.mk'
X#ident "@(#)err_bit.mk	1.1 12/12/03 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		err_bit.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/err_bit.mk
echo x - star-1.5.2/include/schily/err_char.h
sed 's/^X//' >star-1.5.2/include/schily/err_char.h << 'END-of-star-1.5.2/include/schily/err_char.h'
X/* @(#)err_char.h	1.1 12/12/03 Copyright 2012 J. Schilling */
X/*
X *	#error include for sizeof (char) error
X *
X *	Copyright (c) 2012 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef _SCHILY_ERR_CHAR_H
X#define	_SCHILY_ERR_CHAR_H
X
X#error Sizeof char is not equal 1
X
X#endif /* _SCHILY_ERR_CHAR_H */
END-of-star-1.5.2/include/schily/err_char.h
echo x - star-1.5.2/include/schily/err_char.mk
sed 's/^X//' >star-1.5.2/include/schily/err_char.mk << 'END-of-star-1.5.2/include/schily/err_char.mk'
X#ident "@(#)err_char.mk	1.1 12/12/03 "
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily
XTARGET=		err_char.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
END-of-star-1.5.2/include/schily/err_char.mk
echo x - star-1.5.2/include/Makefile
sed 's/^X//' >star-1.5.2/include/Makefile << 'END-of-star-1.5.2/include/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for sub directory makes
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XDIRS=		schily
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dir
X###########################################################################
END-of-star-1.5.2/include/Makefile
echo x - star-1.5.2/README
sed 's/^X//' >star-1.5.2/README << 'END-of-star-1.5.2/README'
XFor more information, see the README file in the directory "star" and in the
Xdirectory "READMEs".
END-of-star-1.5.2/README
echo c - star-1.5.2/man
mkdir -p star-1.5.2/man > /dev/null 2>&1
echo c - star-1.5.2/man/man1
mkdir -p star-1.5.2/man/man1 > /dev/null 2>&1
echo x - star-1.5.2/man/man1/match.1
sed 's/^X//' >star-1.5.2/man/man1/match.1 << 'END-of-star-1.5.2/man/man1/match.1'
X. \" @(#)match.1	1.1 97/02/19 Copyright 1985-1997 J. Schilling
X. \"  Manual page for match
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \\(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH MATCH 1L "15. Juli 1988" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xmatch \- searches for patterns in files
X.SH SYNOPSIS
X.B
Xmatch
X[
X.I \-option
X] 
X.I pattern
X[
X.I file \.\|.\|.
X]
X.SH DESCRIPTION
X. \" .SH BESCHREIBUNG
X.I Match
Xsearches the named files or standard input (if no filenames are given)
Xfor the occurrences of the given pattern on each line.
XThe program accepts literal characters or special pattern matching characters.
XAll lines that match the pattern are output on standard output.
XYou can only specify one pattern string for each match, however, you can
Xconstruct an arbitrarily complex string.
XWhen you do not specify a file, match can be used as a filter to display
Xdesired lines.
XStandard in is used if no files are specified.
X.SH OPTIONS
X. \" .SH OPTIONEN
X.TP
X.BI \-not ", " \-v
XPrints all lines that do not match.
X.TP
X.B \-i
XIgnore the case of letters
X.TP
X.B \-m
XForce not to use the magic mode
X.TP
X.B \-w
XSearch for
X.I pattern
Xas a word
X.TP
X.B \-x
XDisplay only those lines which match exactly
X.TP
X.B \-c
XDisplay matching count for each file
X.TP
X.B \-l
XDisplay name of each file which matches
X.TP
X.B \-s
XBe silent indicate match in exit code
X.TP
X.B \-h
XDo not display filenames
X.TP
X.B \-n
XPrecede matching lines with line number (with respect to the input file)
X.TP
X.B \-b
XPrecede matching lines with block number
X.SH "REGULAR EXPRESSIONS"
XThe following is a table of all the pattern matching characters:
X.TP
X.I c
XAn ordinary character
X.I (not
Xone of the special characters discussed below) is a one character regular
Xexpression that matches that character.
X.TP
X.BI \e\| c
XA backslash (\|\e\|) followed by any special character is a one character 
Xregular expression that matches the special character itself. The special 
Xcharacters are:
X.RS
X.TP
X! # % * { } [ ] \|\e\| ? ^ $
X.RE
X.TP
X.B !
XLogical
X.B OR
Xas in match
X.I "this!that!the_other."
XYou may have to use `{}' for precedence
Xgrouping.
X.TP
X.B #
XA hash mark followed by any regular expression matches any number
X(including zero) occurrences of the regular expression.
X.TP
X.B ?
XMatches exactly any one character.
X.B W?
Xmatches
X.I "Wa, Wb, Wc, W1, W2, W3 .\|.\|."
X.TP
X.B *
XMatches any number of any character.
X.TP
X.B %
XMatches exactly nothing. It can be used in groups of ored patterns to specify
Xthat an empty alternative is possible.
X.TP
X.B {}
XCurly brackets may be used to enclose patterns to specify a precedence
Xgrouping, and may be nested.
X.B {%!{test}}version
Xmatches the strings
X.I "testversion"
Xand
X.I version.
X.TP
X.BI [ string ]
XA non empty string of characters enclosed in square brackets
Xis a one character regular expression that matches
X.I any one
Xcharacter in that string.
XIf however the first character of the string is a circumflex (\|^\|),
Xthe one character expression matches any character which is
X.I not
Xin the string. The ^ has this special meaning
X.I only
Xif it occurs first in the string. The minus (\|\-\|) may be used to
Xindicate a range of consecutive ASCII characters; for example, [0-9] is
Xequivalent to
X.I any one of the digits.
XThe \- loses it's special meaning if it occurs
Xfirst (after an initial ^, if any) or last in the string.
XThe right square bracket (]) and the backslash (\|\e\|)
Xmust be quoted with a backslash if you want to use it within the
X.I string.
X.TP
X.B ^
XMatches the beginning of a line.
X.TP
X.B $
XMatches the end of a line. (\|^*$ matches any entire line)
X. \" .SH EXAMPLES
X.SH EXAMPLES
X. \" .SH BEISPIELE
X.SH FILES
XNone.
X. \" Keine.
X.SH "SEE ALSO"
Xgrep(1), fgrep(1), egrep(1)
X.SH DIAGNOSTICS
X. \" .SH NOTES
X.SH NOTES
X. \" .SH BEMERKUNGEN
XEven if a match occurs more than once per line, the line is output only once.
X.PP
XQuote special pattern matching characters to prevent them from
Xbeing expanded by the Command Interpreter.
X.SH BUGS
XThe length of the pattern is currently limited to 100 characters.
X.PP
XThis limit is reduced by 38 if the
X.B \-w
Xoption is used.
END-of-star-1.5.2/man/man1/match.1
echo x - star-1.5.2/man/man1/Makefile
sed 's/^X//' >star-1.5.2/man/man1/Makefile << 'END-of-star-1.5.2/man/man1/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	match
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	match.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/man/man1/Makefile
echo c - star-1.5.2/man/man4
mkdir -p star-1.5.2/man/man4 > /dev/null 2>&1
echo x - star-1.5.2/man/man4/makefiles.4
sed 's/^X//' >star-1.5.2/man/man4/makefiles.4 << 'END-of-star-1.5.2/man/man4/makefiles.4'
X. \" @(#)makefiles.4	1.7 09/04/11 Copyr 1996 J. Schilling
X. \" User Manual page for makefile system
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.\".TH makefiles 4L "14. February 1997" "J\*org Schilling" "Schily\'s FILE FORMATS"
X.TH makefiles 4L "14. February 1997" "J\*org Schilling" "GMD FOKUS FILE FORMATS"
X.SH NAME
Xmakefiles \- users guide for compiling projects on different platforms
X.SH SYNOPSIS
X.B "make [target]
X.br
X.B "gmake [target]
X.br
X.B "smake [target]
X.br
X.PP
XTarget may be one of:
X.TP 10
X\&.help
Xto get a list of possible targets and a short description.
X.TP
Xall
Xto make the default targets
X.TP
Xinstall
Xto make and install the default targets
X(see 
X.IR INS_BASE " and " INS_KBASE
Xto learn how to modify the installation path).
X.TP
Xibins
Xto make and install a target in 
X.I SRCROOT/bins
X.TP
Xdepend
Xto re-make dependency rules for all default targets.
XNote: All dependency files will automatically remade 
Xon the next run of make before they are included.
X.TP
Xclean
Xto remove 
X.I core 
Xfiles and all intermediate object files.
X.TP
Xclobber
Xto remove the targets from
X.IR clean ,
Xall dependency files and all final targets
X.TP
Xdistclean
Xto remove the targets from
X.IR clean " and " clobber 
Xand all made files for all architectures.
X.TP
Xtags
Xto make 
X.IR vi (1)
Xcompatible tags
X.TP
XTAGS
Xto make 
X.IR emacs (1)
Xcompatible tags
X.TP
Xconfig
Xreserved for future use.
X.TP
Xrmtarget
Xto remove the default target
X.TP
Xrelink
Xto remove the default target and remake it immediately. This can be
Xused to change .e.g LD_RUN_PATH in the executable.
X
X.SH DESCRIPTION
XMakefiles is a set of rules that allows compiling of structured
Xprojects with small and uniformly structured makefiles.
XAll rules are located in a central directory.
XCompiling the projects on different platforms can be done
Xsimultaneously without
Xthe need to modify any of the makefiles that are located
Xin the projects directories.
X.PP
XMakefiles is a set of high level portability tools superior to
X.B autoconf
Xand easier to use.
X.PP
XThree make programs are supported:
X.IR "Sunpro make" , 
X.I "GNU make"
Xand
X.IR smake .
X.PP
X.I BSDmake
Xcould be supported if it supports pattern matching rules correctly.
X.PP
XThe main design goal was to have a set of small and easy to read
Xmakefiles, each located in the project's leaf directory and therefore 
Xcalled
X.IR leaf -makefile.
X.PP
XEach of these 
X.IR leaf -makefiles,
Xin fact contains no rule at all. It simply defines some macros
Xfor the 
X.IR make -program
Xand includes two files from a central make rule depository.
XThe included files and the files that are recursively included 
Xdefine the rules that are needed to compile the project.
X.PP
XEach 
X.IR leaf -makefile
Xis formed in a really simple way:
X.TP
X\(bu
XIt first defines two macros that define the relative location
Xof the project's root directory and the name of the directory
Xthat contains the complete set of of rules and then includes
Xthe rule file 
X.I rules.top
Xfrom the directory that forms the central rule depository.
XYou only have to edit the macro
X.I SRCROOT
Xto reflect the relative location of the project's root directory.
X.TP
X\(bu
XThe next part of a 
X.IR leaf -makefile
Xdefines macros that describe the target and the source.
XYou can only have one target per 
X.IR leaf -makefile.
XOf course, there may be many source files, that are needed to create
Xthat target.
XIf you want to make more than one target in a specific directory,
Xyou have to put more than one makefile into that directory.
XThis is the part of a makefile that describes a unique target.
XEdit this part to contain all source files, all local include files
Xand all non global compile time flags that are needed for your target.
XFor a typical target this is as simple as filling in a form.
X.TP
X\(bu
XEach
X.IR leaf -makefile
Xfinally includes a file from the rules directory that contains
Xrules for the appropriate type of target that is to be made
Xfrom this 
X.IR leaf -makefile.
X.PP
XThe makefile in each directory has to be called
X.IR Makefile .
XIf you want to have more than one makefile in a specific directory,
Xyou have to choose different names for the other makefiles.
X.PP
XThere are rules for the following type of targets:
X.TP 20
Xcommands
XThe make rules for user level commands like
X.IR cat ", " ls 
Xetc. are located in the file 
X.I rules.cmd
X.TP
Xdrivers
XThe make rules for device drivers
Xare located in the file 
X.I rules.drv
X.TP
Xlibraries
XThe make rules for non shared libraries
Xare located in the file 
X.I rules.lib
X.TP
Xshared libraries
XThe make rules for shared libraries
Xare located in the file 
X.I rules.shl
X.TP
Xlocalized files
XThe make rules for localized files
Xare located in the file 
X.I rules.loc
X.TP
Xnonlocalized files
XThe make rules for non localized files
Xare located in the file 
X.I rules.aux
X.TP
Xshell scripts
XThe make rules for shell scripts (a variant of localized files)
Xare located in the file 
X.I rules.scr
X.TP
Xmanual pages
XThe make rules for manual pages (a variant of localized files)
Xare located in the file 
X.I rules.man
X.TP
Xdiverted makefiles
XThe make rules for projects that need to have more than
Xone makefile in a specific directory
Xare located in the file 
X.I rules.mks
XIt contains a rule that diverts to the listed sub makefiles.
XEach sub makefile may be of any type.
X.TP
Xdirectories
XThe make rules for sub directories
Xare located in the file 
X.I rules.dir
X
X.SH "Macros/Variables Used In Rules
X.PP
XThe following is a description of the most important macros
Xused within the make rules.
X.I NOTE: 
Xnot all of them might be changed in a specific makefile.
XCarefully read the description and change only those macros
Xthat are intended to be used to change the behavior of
Xthe compilation.
X
X.TP 13
XARCHDIR
Xcontains the location where object files and make targets will be placed.
XA typical name would be:
X.I "OBJ/sparc\-sunos5\-cc
X.br
XDo not change this macro.
X.
X.TP
XASFLAGS
XThe flags that are used with the assembler.
X.br
XDo not change this macro.
X.
X.TP
XASMFILES
Xa list of assembler source files, to be specified in a
Xleaf makefile.
X.
X.TP
XASOPTS
XThe internal macro that contains the flags for the assembler.
XChange this macro if you want to change the behavior.
XUse: 
X.B "ASOPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default assembler flags from the command line
Xcall:
X.B "make 'ASOPTS=value'"
XUse: 
X.B "ASOPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XASOPTX
Xmay be used if you want to add flags to the assembler flags from the
Xcommand line. Use:
X.B "make 'ASOPTX=value'
X.
X.TP
XC_ARCH
Xthis macro contains the c-compiler architecture name.
X.br
XDo not change this macro.
X.
X.TP
XCCOM
XThis macro may be used from the command line to use a different
Xc-compiler than the default.
XUse:
X.B "make 'CCOM=gcc'
Xto use 
X.I gcc
Xfor the next run.
XNote: The value of 
X.I CCOM
Xmust not necessarily be identical to the real name of the c-compiler.
XIt refers to a filename which contains the definition for that
Xc-compiler. This hint applies as well to all other macros that deal with
Xthe name of the c-compiler.
XThe only macro, that contains the real invocation name of the c-compiler,
Xis 
X.IR CC .
X.I CC
Xis set inside the machine dependent configuration file in the central
Xrules depository and must not be changed elsewhere.
X.
X.TP
XCFILES
Xa list of C source files, to be specified in a
Xleaf makefile.
X.
X.TP
XCFLAGS
XThe flags that are used with the c-compiler.
XDo not use flags that belong to the c-preprocessor in the 
X.IR COPTOPT ", " COPTS " and " COPTX
Xmacros.
X.br
XDo not change this macro.
X.
X.TP
XCLEAN_FILES
XA list of files ( besides the object files ) that will be
Xremoved with
X.IR "make clean" .
X.br
XDo not change this macro.
X.
X.TP
XCLEAN_FILEX
Xthis macro may be used to define additional files that should
Xbe removed with
X.IR "make clean" .
X.
X.TP
XCLOBBER_FILEX
Xthis macro may be used to define additional files that should
Xbe removed with
X.IR "make clobber" .
X.
X.TP
XCOPTOPT
XThe c-compiler optimization flag. This flag is intended to 
Xbe overridden either from a makefile or from command line.
X.
X.TP
XCOPTS
XThe internal macro that contains the flags for the c-compiler.
XChange this macro if you want to change the behavior.
XUse: 
X.B "COPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default c-compiler flags from the command line
Xcall:
X.B "make 'COPTS=value'"
XUse: 
X.B "COPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XCOPTX
Xmay be used if you want to add flags to the c-compiler flags from the
Xcommand line. Use:
X.B "make 'COPTX=value'
X.
X.TP
XCPPFLAGS
XThe flags that are used with the c-preprocessor.
XThis macro as well as:
X.IR CPPOPTS " and " CPPOPTX
Xare also used when compiling c-programs.
XThey should contain only the following flags:
X.IR "\-Dname=value ", " \-Uname " , " 
X.IR \-Idirectory " and " \-Ydirectory .
X.br
XDo not change this macro.
X.
X.TP
XCPPOPTS
XThe internal macro that contains the flags for the c-preprocessor.
XChange this macro if you want to change the behavior.
XUse: 
X.B "CPPOPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default c-preprocessor flags from the command line
Xcall:
X.B "make 'CPPOPTS=value'"
XUse: 
X.B "CPPOPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XCPPOPTX
Xmay be used if you want to add flags to the c-preprocessor flags from the
Xcommand line. Use:
X.B "make 'CPPOPTX=value'
X.
X.TP
XCURDIR
XThis macro contains the name of the sub directory that is currently processed.
X.br
XDo not change this macro.
X.
X.TP
XCWARNOPTS
XThis macro may be set in
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH)
Xto overwrite the default c-compiler warn options.
X.
X.TP
XCWOPTS
XThis macro is set inside the machine dependent configuration file in the central
Xrules depository and must not be changed elsewhere.
XIt contains the flags that set the default warning level for the c-compiler.
X.
X.TP
XDEFINSGRP
Xthis macro may be set in the projects defaults file to set up the
Xdefault group id for installation 
X.TP
XDEFINSMODE
Xthis macro may be set in the projects defaults file to set up the
Xdefault file permission for installation 
X.TP
XDEFINSUSR
Xthis macro may be set in the projects defaults file to set up the
Xdefault user id for installation 
X.TP
XDEFUMASK
Xthis macro may be set in the projects defaults file to set up the
Xdefault 
X.I umask
Xvalue for creating sub directories
X.
X.TP
XDEFAULTSDIR
Xthis macro may be set from command line or from the shell environment
Xif the user wants to use a different set of 
X.I Defaults
Xfiles that is not located in the directory
X.B DEFAULTS
Xin the source root directory.
XThis may be used to hold two or more set of defaults that differ e.g. in the
Xinstallation path or the C-compiler.
X.
X.TP
XDEFAULTSROOT
Xthis macro may be set in a leaf makefile, if that makefile wants to use
Xa 
X.I Defaults
Xfile that is not located in 
X.I $(DEFAULTSDIR)
Xin the source root.
XThis may be used, if a sub tree in a big project needs a different setup.
X.
X.TP
XDEFLTSDIR
XThis is an internally used macro that is set from 
X.I $(DEFAULTSDIR) 
Xor from the internal defaults.
X.br
XDo not change this macro.
X.
X.TP
XDEFLTSROOT
XThis is an internally used macro that is set from 
X.I $(DEFAULTSROOT) 
Xor from the internal defaults.
X.br
XDo not change this macro.
X.
X.TP
XDEFCCOM
Xthe default name of the c-compiler. This is usually set in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
X.
X.TP
XDEFINCDIRS
Xa list of directories that are searched by default in addition to 
Xthe system include directories. If this macro is not set, 
X.I $(SRCROOT)/include
Xis used.
X.
X.TP
XDIRNAME
Xthis macro needs to be set in the makefile that is located in
Xthe 
X.I "$(SRCROOT)
Xdirectory.
XThe value should be either set to the name of the directory
Xwhere the makefile is located or to 
X.BR SRCROOT .
XThe value of this macro is updated automatically 
Xto follow the directory hierarchy.
XDo not change this macro in a make file other than the make file
Xin the source root.
X.
X.TP
XDIRS
Xthis macro needs to be set in a makefile that is located in
Xa directory that contains diversion directories.
XIt must contain a list of directory names where the diversions
Xgo to e.g.
X.BR "DIRS= libfoo libbar libgarbage" .
X.
X.TP
XHFILES
Xfor normal operation, 
X.I makefiles 
Xwill automatically find which include files are needed
Xfor compilation.
XHowever, if you want to create a tag file that includes
Xtags for definitions that occur within include files, 
Xyou should set 
X.I HFILES
Xto be a list of include files containing such definitions.
X.
X.TP
XINCDIRS
Xthis macro will normally be a copy from 
X.IR DEFINCDIRS .
XYou may however specify a different value in a leaf makefile
Xor from command line. This will overwrite the defaults value.
X.
X.TP
XINS_BASE
Xthis macro has to be specified in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
XIt must contain the path name of the root for installing 
Xgeneral targets of the project.
XSee
X.IR INSDIR . 
X.
X.TP
XINS_KBASE
Xthis macro has to be specified in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
XIt must contain the path name of the root for installing 
Xkernel modules from the project.
XSee
X.IR INSDIR .
X.
X.TP
XINSDIR
Xthis macro has to be specified in the leaf makefile.
XIt must contain the path name of a directory relative to
X.IR INS_BASE " or " INS_KBASE .
XThe target will be installed into
X.I "$(INS_BASE)/$(INSDIR)" .
X.
X.TP
XINSGRP
Xthis macro may be set in a leaf makefile to set up the
Xgroup id for installation 
X.TP
XINSMODE
Xthis macro may be set in a leaf makefile to set up the
Xfile permission for installation 
X.TP
XINSUSR
Xthis macro may be set in a leaf makefile to set up the
Xuser id for installation 
X.
X.TP
XK_ARCH
Xthis macro contains the kernel/machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4c sun4m sun4u 9000\-725 aviion" ).
XIt is set to the output of
X.I "uname \-m
Xconverted to lower case.
X.br
XDo not change this macro.
X.
X.TP
XKARCH
Xthis macro contains the kernel/machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4c sun4m sun4u 9000\-725 aviion" ).
XIt is set to the output of
X.I "uname \-m
Xconverted to lower case.
X.br
XDo not change this macro unless you want to do a cross compilation.
X.
X.TP
XLDFLAGS
XThe flags that are used with the linker.
X.br
XDo not change this macro.
X.
X.TP
XLDLIBS
XThe internal macro that holds the 
Xlibraries that are used while linking the target.
X.br
XDo not change this macro.
X.
X.TP
XLDOPTS
XThe internal macro that contains the flags for the linker.
XChange this macro if you want to change the behavior.
XUse: 
X.B "LDOPTS= value"
XIf you want to override the default value. If you want to
Xoverride the default linker flags from the command line
Xcall:
X.B "make 'LDOPTS=value'"
XUse: 
X.B "LDOPTS += value"
XIf you want to add flags to the default value from within a makefile.
X.
X.TP
XLDOPTX
Xmay be used if you want to add flags to the linker flags from the
Xcommand line. Use:
X.B "make 'LDOPTX=value'
X.
X.TP
XLDPATH
Xthe default library search path for the linker. 
XThis is usually set in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
X.
X.TP
XLIB_KVM
Xa predefined macro that contains the operating system dependent
Xname of a library
Xthat is needed by programs that read/write kernel virtual memory.
XAdd 
X.I "$(LIB_KVM)
Xto your list of libraries (e.g.
X.BR "LIBS= \-lintl $(LIB_KVM)" ),
Xif your target uses kvm.
X.
X.TP
XLIB_MATH
Xa predefined macro that contains the operating system dependent
Xname of a library
Xthat is needed by programs that use routines of the math library.
XAdd 
X.I "$(LIB_MATH)
Xto your list of libraries (e.g.
X.BR "LIBS= \-lintl $(LIB_MATH)" ),
Xif your target uses math subroutines.
X.
X.TP
XLIB_SOCKET
Xa predefined macro that contains the operating system dependent
Xname of a library
Xthat is needed by programs that use socket calls.
XAdd 
X.I "$(LIB_SOCKET)
Xto your list of libraries (e.g.
X.BR "LIBS= \-lintl $(LIB_SOCKET)" ),
Xif your target uses sockets. Note: this should (for portability reasons)
Xeven be done on systems that don't require a socket library because 
Xthey have the socket interface inside libc.
X.
X.TP
XLIBS_PATH
Xthis macro contains the path to a directory where those
Xlibraries are located, that have been build during
Xa make run inside the current project.
X.br
XDo not change this macro.
X.
X.TP
XM_ARCH
Xthis macro contains the machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4 ip22 i86pc i586 9000\-725 aviion" ).
XIt is set to the output of
X.I "arch
Xconverted to lower case.
XOn systems, where 
X.I M_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro.
X.
X.TP
XMK_FILES
Xmakefiles that divert into sub makes within the same directory
Xmust set 
X.I MK_FILES
Xto be a list of makefile names for the sub makes.
XMakefile names for sub makes should have a name that is build
Xby adding 
X.I .mk
Xto the base name of the target that is defined inside the
Xspecific makefile.
X.
X.TP
XMAKEPROG
XSet this macro to the name of your make program if it does
Xnot support the macro
X.IR MAKE_NAME .
XThe make program 
X.I smake
Xis able to identify itself.
XIf you want to use a make program that is not able
Xto identify itself
Xand it's name is not
X.IR make ,
Xset 
X.I MAKEPROG
Xto the name of the make program.
XCurrently only 
X.I gmake
Xis supported as alternate value for 
X.IR MAKEPROG .
XIf you want to use an unsupported make program
Xyou have to check if it supports the needed features
Xfor
X.IR makefiles .
XYou must write your own rule files for that make program.
XIf you want to use 
X.IR gmake ,
Xyou should do
X.B "setenv MAKEPROG gmake
Xbefore you start
X.I gmake
Xor use a shell script that does this job for you.
X.
X.TP
XMAKE
XThis macro is set up by the 
X.I make 
Xprogram.
XIt contains a path name that is sufficient to recursively
Xcall the same 
X.I make
Xprogram again (either that last path component or the full path
Xname of the make program).
X.br
XDo not change this macro.
X.
X.TP
XMAKEFLAGS
XThis macro is set up by the 
X.I make 
Xprogram.
XIt contains the command line flags,
X.I make
Xis called with.
X.br
XDo not change this macro.
X.
X.TP
XMAKE_ARCH
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the processor architecture of the target machine
X(e.g. mc68020, sparc, pentium).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_BRAND
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the brand of the target machine
X(e.g. Sun_Microsystems(e.g. ).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_HOST
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the host name of the target machine
X(e.g. duffy, sherwood, ghost).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_MACH
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the kernel architecture of the target machine
X(e.g. sun3, sun4c, sun4m, sun4u).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_MODEL
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the model name of the target machine
X(e.g. SUNW,SPARCstation-20).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_M_ARCH
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the machine architecture of the target machine
X(e.g. sun3, sun4).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_NAME
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the official name of the
Xmake program
X(e.g. make, smake, gmake).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OS
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the operating system name of the target machine
X(e.g. sunos, linux, dgux).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OSDEFS
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains operating system specific defines for the compiler
X(e.g. \-D__SVR4).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OSREL
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the operating system release name of the target machine
X(e.g. 5.5, 4.1.1).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_OSVERSION
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the operating system version of the target machine
X(e.g. generic).
X.br
XDo not change this macro.
X.
X.TP
XMAKE_SERIAL
XThis macro is currently set up by 
X.B smake 
Xonly.
XIt contains the serial number of the target machine
X(e.g. 1920098175).
X.br
XDo not change this macro.
X.
X.TP
XMANDIR
Xall makefiles for manual pages must set this macro to the
Xpath name relative to 
X.I INS_BASE
Xwhere the manual page root dir for the project should be.
XPossible values for english manual pages are
X.IR man " or " share/man ,
Xpossible values for german manual pages are
X.IR man/de " or " share/man/de .
X.
X.TP
XMANFILE
Xmakefiles for manual pages set this macro to the name of the 
Xtroff source file for the manual page
X.
X.TP
XMANSECT
Xmakefiles for manual pages set this macro to the macro name that
Xcontains the real section name for this manual page. This is 
Xnecessary because bsd based system have different naming conventions than
Xsystem V based systems. See below for a valid list of manual section
Xmacros.
X.TP
XMANSECT_ADMIN
XThis macro contains the name of the sub directory for administrative
Xcommands and maintenance procedures.
X.br
XDo not change this macro.
X.TP
XMANSECT_CMD
XThis macro contains the name of the sub directory for general 
Xuser commands.
X.br
XDo not change this macro.
X.TP
XMANSECT_DEMOS
XThis macro contains the name of the sub directory for demo
Xcommands.
X.br
XDo not change this macro.
X.TP
XMANSECT_DEVICE
XThis macro contains the name of the sub directory for 
Xuser level device interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_DRIVER
XThis macro contains the name of the sub directory for 
Xkernel level device driver interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_FILEFORM
XThis macro contains the name of the sub directory for 
Xfile formats.
X.br
XDo not change this macro.
X.TP
XMANSECT_GAMES
XThis macro contains the name of the sub directory for 
Xgames.
X.br
XDo not change this macro.
X.TP
XMANSECT_HDR
XThis macro contains the name of the sub directory for 
Xheader files.
X.br
XDo not change this macro.
X.TP
XMANSECT_LIB
XThis macro contains the name of the sub directory for 
Xlibrary function interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_MACROS
XThis macro contains the name of the sub directory for 
Xtroff macros.
X.br
XDo not change this macro.
X.TP
XMANSECT_NETWORK
XThis macro contains the name of the sub directory for 
Xuser level network interfaces.
X.br
XDo not change this macro.
X.TP
XMANSECT_SYSCALL
XThis macro contains the name of the sub directory for 
Xsystem call interfaces.
XDo not change this macro.
X.TP
XMANSECT_TABLES
XThis macro contains the name of the sub directory for 
Xtables.
XDo not change this macro.
X.TP
XMANSTYLE
XThis macro contains the name that is used to find the right
Xordering conventions for manual pages.
XDo not change this macro.
X.TP
XMANSUFFIX
Xmakefiles for manual pages set this macro to the macro name that
Xcontains the real suffix for this manual page. This is 
Xnecessary because bsd based system have different naming conventions than
Xsystem V based systems. See below for a valid list of manual suffix
Xmacros.
X.TP
XMANSUFF_ADMIN
XThis macro contains the name of the file suffix for administrative
Xcommands and maintenance procedures.
X.br
XDo not change this macro.
X.TP
XMANSUFF_CMD
XThis macro contains the name of the file suffix for general 
Xuser commands.
X.br
XDo not change this macro.
X.TP
XMANSUFF_DEMOS
XThis macro contains the name of the file suffix for demo
Xcommands.
X.br
XDo not change this macro.
X.TP
XMANSUFF_DEVICE
XThis macro contains the name of the file suffix for 
Xuser level device interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_DRIVER
XThis macro contains the name of the file suffix for 
Xkernel level device driver interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_FILEFORM
XThis macro contains the name of the file suffix for 
Xfile formats.
X.br
XDo not change this macro.
X.TP
XMANSUFF_GAMES
XThis macro contains the name of the file suffix for 
Xgames.
X.br
XDo not change this macro.
X.TP
XMANSUFF_HDR
XThis macro contains the name of the file suffix for 
Xheader files.
X.br
XDo not change this macro.
X.TP
XMANSUFF_LIB
XThis macro contains the name of the file suffix for 
Xlibrary function interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_MACROS
XThis macro contains the name of the file suffix for 
Xtroff macros.
X.br
XDo not change this macro.
X.TP
XMANSUFF_NETWORK
XThis macro contains the name of the file suffix for 
Xuser level network interfaces.
X.br
XDo not change this macro.
X.TP
XMANSUFF_SYSCALL
XThis macro contains the name of the file suffix for 
Xsystem call interfaces.
XDo not change this macro.
X.TP
XMANSUFF_TABLES
XThis macro contains the name of the file suffix for 
Xtables.
XDo not change this macro.
X.TP
XMARCH
Xthis macro contains the machine architecture for the
Xtarget machine (e.g.
X.IR "sun3 sun4 ip22 i86pc i586 9000\-725 aviion" ).
XIt is set to the output of
X.I "arch
Xconverted to lower case.
XOn systems, where 
X.I M_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro unless you want to do a cross compilation.
X.
X.TP
XO_ARCH
Xthis macro contains the name of the operating system
Xconverted to lower case.
XIt is usually the output of:
X.IR "uname \-s" .
XIt may contain a modified name if the compilation rules
Xfor different version of the operating system differ (e.g.
Xon
X.IR SunOS " and " Solaris ,
Xthe official operation system name in both cases is
X.IR SunOS ).
X.br
XDo not change this macro.
X.
X.TP
XOARCH
Xthis macro contains the object architecture that is used
Xfor architecture dependent sub directories.
XIt is set to:
X.IR "$(PARCH)\-$(O_ARCH)\-$(C_ARCH)" .
X.br
XDo not change this macro.
X.
X.TP
XOARCHDIR
Xthis macro contains the concatenation of 
X.I OBJ/
Xand 
X.IR "$(OARCH)" .
X.br
XDo not change this macro.
X.
X.TP
XOFILES
Xthis macro contains the list of objects that are the
Xthe dependency list for the target.
XIt is constructed from the list of
Xassembler source files,
Xc source files,
Xlex source files and
Xyacc source files.
X.br
XDo not change this macro.
X.
X.TP
XOINCSDIR
Xthis macro contains the concatenation of 
X.I $(SRCROOT)/incs/
Xand 
X.IR "$(OARCH)" .
XIt is the location where include files that are made within a make run
Xand subject to global use will be placed.
X.br
XDo not change this macro.
X.TP
XOLIBSDIR
Xthis macro contains the concatenation of 
X.I $(SRCROOT)/libs/
Xand 
X.IR "$(OARCH)" .
XIt is the location where libraries that are made within a make run
Xwill be placed.
X.br
XDo not change this macro.
X.
X.TP
XOSDEFS
Xthis macro contains operating system specific c-preprocessor
Xdefinitions.
X.br
XDo not change this macro.
X.
X.TP
XOSNAME
Xthe unmodified name of the operating system converted to lower case.
XSee
X.IR O_ARCH .
X.br
XDo not change this macro.
X.
X.TP
XOSREL
Xthe release of the operating system.
X.br
XDo not change this macro.
X.
X.TP
XP_ARCH
Xthis macro contains the processor architecture for the
Xtarget machine (e.g.
X.IR "mc68020 mc88200 sparc pentium" ).
XIt is set to the output of
X.I "uname \-p
Xconverted to lower case.
XOn systems, where 
X.I P_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro.
X.
X.TP
XPARCH
Xthis macro contains the processor architecture for the
Xtarget machine (e.g.
X.IR "mc68020 mc88200 sparc pentium" ).
XIt is set to the output of
X.I "uname \-p
Xconverted to lower case.
XOn systems, where 
X.I P_ARCH
Xis not available, it is set to the content of 
X.IR K_ARCH .
X.br
XDo not change this macro unless you want to do a cross compilation.
X.
X.TP
XRULESDIR
Xthe value of this macro must be set before
Xthe rules file
X.I "$(SRCROOT)/$(RULESDIR/rules.top
Xis included.
XIf you want to test the behavior of a modified version
Xof the
X.I makefiles
Xin 
X.IR RULESDIR ,
Xput a copy into an alternate directory, modify one or more
Xfiles in it and then use make with a different value of
X.IR RULESDIR ,
Xthat points to the alternate directory.
X.
X.TP
XRUNPATH
Xis evaluated on systems, where 
X.I LD_RUN_PATH
Xis supported.
XIt contains the default library search path for dynamic linked targets
Xon runtime. 
XThis search path will be stored inside the target.
XThis is usually set in the file
X.I $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults
Xor 
X.IR $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) .
XNote that older systems will use 
X.I LD_LIBRARY_PATH
Xfor this purpose too.
X.
X.TP
XSCRFILE
Xthis macro must be set in a leaf makefile for shell scripts to define
Xthe source for that script file.
X.
X.TP
XSRCFILE
Xthis macro must be set in a leaf makefile for localized files to define
Xthe source for that file.
X.
X.TP
XSRCROOT
Xthis macro contains the relative position to the project's
Xsource root directory.
XThe value of this macro must be set before
Xthe rules file
X.I "$(SRCROOT)/$(RULESDIR/rules.top
Xis included.
X.I SRCROOT
Xshould be set to
X.I ../..
Xif the appropriate leaf makefile is located two directory
Xlevels below the source route.
X.
X.TP
XSUBARCHDIR
Xmay be set to put the object files and the target into
Xa different directory than usual.
X.I SUBARCHDIR
Xwill modify the value of 
X.IR ARCHDIR .
XIf you want to make a target that is compiled for 
X.I dbx
Xyou may use:
X.IR "make COPTX=\-g SUBARCHDIR=\-dbx" .
X.
X.TP
XTARGET
Xall makefiles, that are not referring to library targets or
Xsub makes / sub dir makes,
Xmust define
X.I TARGET
Xto be the output file name of the final link operation.
X.
X.TP
XTARGETLIB
Xall makefiles that are used to make libraries
Xmust define
X.I TARGETLIB
Xto be the central part of the target library.
XIf you want to make e.g.
X.I libfoo
Xdefine
X.IR "TARGETLIB= foo" .
XThis is needed to allow operating systems to have different naming 
Xconventions for libraries.
XIf you are making a non shared library, the example above
Xwould result in a filename:
X.I libfoo.a
Xfor the real target.
X.
X.TP
XTARGETMAN
Xthis macro must be set in a leaf makefile for manual pages to define
Xthe base name for that manual page (not including the suffix).
X.
X.TP
XXMK_FILE
Xmakefiles that want to install manual pages should set 
X.I XMK_FILE
Xto 
X.B Makefile.man
Xto avoid having to install a diversion make file. 
XThe make file found in
X.I XMK_FILE
Xwill be processed only if 
X.I make
Xis called with the target 
X.IR install .
X
X.SH "GETTING STARTED
X.PP
XTo set up a new project, first copy the 
X.IR RULES " and " TEMPLATES
Xdirectories and all its content into the project's root directory.
X.PP
XThen copy a top level makefile, a 
X.I Defaults
Xfile and a 
X.I Targetdirs.archname
Xfile into the project's root directory.
X.PP
XThen create the following directories:
X.IR cmd ", " lib ", " include .
X.PP
XNow start creating target directories e.g below
X.IR cmd " and " lib .
XDon't forget to create a makefile and an appropriate
X.I Targetdirs.archname 
Xfile on each node directory.
X
X.SH EXAMPLES
X.PP
XIf you want to set up a private copy of parts of a project,
Xyou should choose a directory inside your directory tree that will become
Xthe shadow projects source root directory.
XThen create symbolic links named 
X.IR RULES " and " TEMPLATES
Xto the real source root.
XIf you don't want to modify the global include files,
Xcreate a symbolic link to the
X.I include
Xdirectory too, else copy the include directory and its content.
Xcopy the top level makefile, the 
X.I Defaults
Xfile and the
X.I Targetdirs.archname 
Xfile.
X.PP
XFinally copy the desired sub tree together with all
Xmakefiles and the 
X.I Targetdirs.archname 
Xfiles that are located in the directories above
Xyour part of the project that you want to have separately.
X
X.SH FILES
X\&.\|.\|./RULES/*
X.br
X\&.\|.\|./DEFAULTS/*
X.br
X\&.\|.\|./TARGETS/*
X.br
X\&.\|.\|./TEMPLATES/*
X
X.SH "SEE ALSO"
X.BR makerules (4),
X.BR make (1),
X.BR gmake (1),
X.BR smake (1).
X.PP
XIf you want to know, how to add new rules or how to add support
Xfor new operating systems or compilers look into 
X.BR makerules (4).
X
X.SH DIAGNOSTICS
XDiagnostic messages depend on the make program.
XHave a look at the appropriate man page.
X
X.SH NOTES
XThe scope of this manual is only the usage of 
X.BR "leaf makefiles" .
XIf you want to make changes to the 
X.B make rules
Xhave a look at
X.BR makerules (4).
X.PP
X.I makefiles
Xcan be used with 
X.IR "Sunpro make" ", " "Gnu make"
Xand 
X.IR smake .
XAlthough Gnu make runs on many platforms, it has no useful debug
Xoutput.
X.PP
XUse
X.IR "Sunpro make" " or " "smake"
Xif you have problems with a makefile.
X.IR "Sunpro make" " and " "smake" ,
Xboth have a \-D flag, that allows you to watch the makefiles
Xafter the first expansion. Use this option, if you are in doubt
Xif your makefile gets expanded the right way and if the right
Xrules are included.
XThere is also a \-d option that gives debugging output while 
Xmake is running. If you want more output, use \-dd, \-ddd and so on.
X.PP
X.I Smake
Xhas an option \-xM that shows you the include dependency for
Xmake rules.
X
X.PP
X.ne 20
XThe following is a list of all macros that are used in 
X.IR makefiles .
XDo not use them unless their meaning has been explained
Xbefore.
X.PP
X
X.BR \-O_ARCH ,
X.BR .OBJDIR ,
X.BR .SEARCHLIST ,
X.BR ALLTARGETS ,
X.BR AR ,
X.BR ARCH ,
X.BR ARCHDIR ,
X.BR ARCHDIRX ,
X.BR ARCH_DONE ,
X.BR ARFLAGS ,
X.BR AS ,
X.BR ASFLAGS ,
X.BR ASMFILES ,
X.BR ASOPTS ,
X.BR ASOPTX ,
X.BR CC ,
X.BR CCOM ,
X.BR CCOM_DEF ,
X.BR CFILES ,
X.BR CFLAGS ,
X.BR CHGRP ,
X.BR CHMOD ,
X.BR CHOWN ,
X.BR CLEAN_FILES ,
X.BR CLEAN_FILEX ,
X.BR CLOBBER_FILEX ,
X.BR COPTDYN ,
X.BR COPTGPROF ,
X.BR COPTOPT ,
X.BR COPTS ,
X.BR COPTX ,
X.BR CPP ,
X.BR CPPFLAGS ,
X.BR CPPOPTS ,
X.BR CPPOPTX ,
X.BR CTAGS ,
X.BR CURDIR ,
X.BR CWARNOPTS ,
X.BR CWOPTS ,
X.BR C_ARCH ,
X.BR DEFAULTSDIR ,
X.BR DEFAULTSROOT ,
X.BR DEFCCOM ,
X.BR DEFCCOM_DEF ,
X.BR DEFINCDIRS ,
X.BR DEFINCDIRS_DEF ,
X.BR DEFINSGRP ,
X.BR DEFINSMODE ,
X.BR DEFINSUSR ,
X.BR DEFUMASK ,
X.BR DEF_ROOT ,
X.BR DEP_DEP ,
X.BR DEP_FILE ,
X.BR DEP_SUFFIX ,
X.BR DIRNAME ,
X.BR DIRS ,
X.BR DYNLD ,
X.BR ETAGS ,
X.BR FLOAT_OPTIONS ,
X.BR HFILES ,
X.BR HOSTNAME ,
X.BR INCDIRS ,
X.BR INSDIR ,
X.BR INSGRP ,
X.BR INSGRP_DEF ,
X.BR INSMODE ,
X.BR INSMODE_DEF ,
X.BR INSTALL ,
X.BR INSUSR ,
X.BR INSUSR_DEF ,
X.BR INS_BASE ,
X.BR INS_KBASE ,
X.BR KARCH ,
X.BR KARCH_DEF ,
X.BR KDEFINES ,
X.BR K_ARCH ,
X.BR LD ,
X.BR LDCC ,
X.BR LDFLAGS ,
X.BR LDLIBS ,
X.BR LDOPTDYN ,
X.BR LDOPTS ,
X.BR LDOPTX ,
X.BR LDPATH ,
X.BR LIBS ,
X.BR LIBS_PATH ,
X.BR LIBX ,
X.BR LIB_KVM ,
X.BR LIB_MATH ,
X.BR LIB_PREFIX ,
X.BR LIB_SOCKET ,
X.BR LIB_SUFFIX ,
X.BR LN ,
X.BR LNDYNLIB ,
X.BR LOCALIZE ,
X.BR LORDER ,
X.BR MAKE ,
X.BR MK_FILES ,
X.BR MAKEPROG ,
X.BR MAKE_ARCH ,
X.BR MAKE_HOST ,
X.BR MAKE_MACH ,
X.BR MAKE_M_ARCH ,
X.BR MAKE_NAME ,
X.BR MAKE_OS ,
X.BR MAKE_OSDEFS ,
X.BR MAKE_OSREL ,
X.BR MANDIR ,
X.BR MANFILE ,
X.BR MANSECT ,
X.BR MANSECT_ADMIN ,
X.BR MANSECT_CMD ,
X.BR MANSECT_DEMOS ,
X.BR MANSECT_DEVICE ,
X.BR MANSECT_DRIVER ,
X.BR MANSECT_FILEFORM ,
X.BR MANSECT_GAMES ,
X.BR MANSECT_HDR ,
X.BR MANSECT_LIB ,
X.BR MANSECT_MACROS ,
X.BR MANSECT_NETWORK ,
X.BR MANSECT_SYSCALL ,
X.BR MANSECT_TABLES ,
X.BR MANSTYLE ,
X.BR MANSUFFIX ,
X.BR MANSUFF_ADMIN ,
X.BR MANSUFF_CMD ,
X.BR MANSUFF_DEMOS ,
X.BR MANSUFF_DEVICE ,
X.BR MANSUFF_DRIVER ,
X.BR MANSUFF_FILEFORM ,
X.BR MANSUFF_GAMES ,
X.BR MANSUFF_HDR ,
X.BR MANSUFF_LIB ,
X.BR MANSUFF_MACROS ,
X.BR MANSUFF_NETWORK ,
X.BR MANSUFF_SYSCALL ,
X.BR MANSUFF_TABLES ,
X.BR MARCH ,
X.BR MARCH_DEF ,
X.BR MKDEP ,
X.BR MKDEP_OUT ,
X.BR MKDIR ,
X.BR MV ,
X.BR M_ARCH ,
X.BR OARCH ,
X.BR OARCHDIR ,
X.BR OFILES ,
X.BR OINCSDIR ,
X.BR OLIBSDIR ,
X.BR OSDEFS ,
X.BR OSNAME ,
X.BR OSREL ,
X.BR O_ARCH ,
X.BR PALLDEP_FILE ,
X.BR PARCH ,
X.BR PARCH_DEF ,
X.BR PASMFILES ,
X.BR PDEP_FILE ,
X.BR PLOFILES ,
X.BR POFILES ,
X.BR PTARGET ,
X.BR PTARGET_BASE ,
X.BR PYOFILES ,
X.BR P_ARCH ,
X.BR RANLIB ,
X.BR RM ,
X.BR RMDEP ,
X.BR RMTARGET ,
X.BR RM_FORCE ,
X.BR RM_RECURS ,
X.BR RM_RF ,
X.BR RULESDIR ,
X.BR RUNPATH ,
X.BR SCRFILE ,
X.BR SHELL ,
X.BR SHL_SUFFIX ,
X.BR SRCFILE ,
X.BR SRCLIBS ,
X.BR SRCROOT ,
X.BR SUBARCH ,
X.BR SUBARCHDIR ,
X.BR SYMLINK ,
X.BR TAGS ,
X.BR TARGET ,
X.BR TARGETLIB ,
X.BR TARGETMAN ,
X.BR TARGET_BASE ,
X.BR TARGET_PATH ,
X.BR TSORT ,
X.BR UMASK ,
X.BR UMASK_DEF ,
X.BR UMASK_VAL ,
X.BR XARCH ,
X.BR XK_ARCH ,
X.BR XMK_FILE ,
X.BR XMAKEPROG ,
X.BR XM_ARCH ,
X.BR XP_ARCH ,
X.BR _CCOM ,
X.BR _DEFAULTSDIR ,
X.BR _DEFCCOM ,
X.BR _DEFINSGRP ,
X.BR _DEFINSMODE ,
X.BR _DEFINSUSR ,
X.BR _DEFUMASK ,
X.BR _DIRNAME ,
X.BR _INCDIRS ,
X.BR _MAKEPROG ,
X.BR _MARCH ,
X.BR _M_ARCH ,
X.BR _O_ARCH ,
X.BR _PARCH ,
X.BR _P_ARCH ,
X.BR _UNIQ ,
X.BR __CCOM ,
X.BR __DEFAULTSDIR ,
X.BR __DEFCCOM ,
X.BR __DEFINSGRP ,
X.BR __DEFINSMODE ,
X.BR __DEFINSUSR ,
X.BR __DEFUMASK ,
X.BR __DIRNAME ,
X.BR __INCDIRS ,
X.BR __MAKEPROG ,
X.BR __MARCH ,
X.BR __M_ARCH ,
X.BR __PARCH ,
X.BR __P_ARCH ,
X
X.SH BUGS
X
X.SH "Source Tree Hierarchy
X.LP
XThe following outline gives a quick tour through a typical
Xsource hierarchy:
X.LP
X.na
X.nh
X.PD 0
X.TP
X.B .../
Xroot directory of the source tree
X.
X.RS
X.TP
X.B Makefile
Xthe top Makefile
X.TP
X.B Targetdirs
Xa file containing a list of directories that are needed
Xfor that project.
XIf the system needs different target lists depending
Xon the target system architecture , use target specific files in
X.B .../TARGETS/
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../RULES/
Xthe location of makefiles (included rules)
X.
X.RS
X.TP
X.B rules.top
Xthe mandatory include rules (needed to setup basic rules)
X.TP
X.B rules.aux
Xrules needed to install a non localized auxiliary file
X.TP
X.B rules.cmd
Xrules needed to make an ordinary command (like /bin/sh)
X.TP
X.B rules.drv
Xrules needed to make a device driver
X.TP
X.B rules.lib
Xrules needed to make a standard (nonshared) library
X.TP
X.B rules.loc
Xrules needed to install a localized auxiliary file
X.TP
X.B rules.man
Xrules needed to install a localized manual page
X.TP
X.B rules.scr
Xrules needed to install a localized shell script
X.TP
X.B rules.shl
Xrules needed to make a shared library
X.TP
X.B rules.mks
Xrules needed to make more than one target in a specific directory
X.TP
X.B rules.dir
Xrules needed to make targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../DEFAULTS/
Xdefault definitions for various target architectures are
Xlocated in this directory. Templates for some architectures can
Xbe found in the
X.I .../TEMPLATES/
Xdirectory.
X.RS
X.TP
X.B Defaults
Xdefault definitions for that source tree. System dependent
Xdefinitions are in 
X.B .../DEFAULTS/Defaults.*
X.RE
X.TP
X.B .../TARGETS/
Xtarget list definitions for various target architectures are
Xlocated in this directory.
X.TP
X.B .../TEMPLATES/
Xtemplates that should be used inside the project
X(rename to Makefile, if it is the only makefile in that directory, 
Xrename to
X.I target.mk,
Xif there is more than one target in that directory)
X.
X.RS
X.TP
X.B Defaults
XDefaults file for the source root directory
X.TP
X.B Defaults.linux
XDefaults file for 
X.IR linux .
XThis should be installed in the 
X.B .../DEFAULTS/
Xdirectory.
X.TP
X.B Makefile.root
XMakefile for the source root directory
X.TP
X.B Makefile.aux
XMakefile for a non localized auxiliary file
X.TP
X.B Makefile.cmd
XMakefile for an ordinary command (like /bin/sh)
X.TP
X.B Makefile.lib
XMakefile for a standard (nonshared) library
X.TP
X.B Makefile.loc
XMakefile for a localized auxiliary file
X.TP
X.B Makefile.man
XMakefile for a localized manual page
X.TP
X.B Makefile_de.man
XMakefile for a localized manual page in the german locale
X.TP
X.B Makefile.scr
XMakefile for a localized shell script
X.TP
X.B Makefile.shl
XMakefile for a shared library
X.TP
X.B Makefile.drv
XMakefile for a device driver
X.TP
X.B Makefile.mks
XMakefile for more than one target in a specific directory
X.TP
X.B Makefile.dir
XMakefile for targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../cmd/
Xsource tree for normal commands
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I cmd 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I myprog 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B myprog/
Xdirectory where the sources for a specific command are located
X.
X.RS
X.TP
XMakefile
Xmakefile for
X.I myprog
X.TP
XMakefile.man
Xmakefile for the manual page of
X.I myprog
X.TP
Xmprog.c
Xsource for myprog
X.TP
Xmprog.tr
Xtroff source for the manual page of myprog
X.TP
X.B OBJ/
Xdirectory where system specific sub directories are located
X.
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.br
X.TP
X\&.\|.\|.
X.RE
X.br
X.ne 5
X.TP
X.B .../lib/
Xdirectory where the sources for a libraries are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I lib 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I libfoo
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B libfoo/
Xdirectory where all source files for libfoo are located
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../kernel
Xdirectory for kernel modules
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I kernel
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I drv 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B drv/
Xdirectory where drivers are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I drv
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I mydrv
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B mydrv/
Xsource for a specific driver
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../include
Xdirectory for global include files that are used in that project
X.
X.TP
X.B .../bins
Xdirectory for binary programs that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../libs
Xdirectory for libraries that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for libraries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../incs
Xdirectory for include files that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for include files that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.
X.ad
X.PD
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg@schily.isdn.cs.tu-berlin.de
Xor
X.B
Xjs@cs.tu-berlin.de
Xor
X.B
Xjes@fokus.gmd.de
END-of-star-1.5.2/man/man4/makefiles.4
echo x - star-1.5.2/man/man4/makerules.4
sed 's/^X//' >star-1.5.2/man/man4/makerules.4 << 'END-of-star-1.5.2/man/man4/makerules.4'
X. \" @(#)makerules.4	1.3 01/04/29 Copyr 1996 J. Schilling
X. \" System Manual page for makefile system
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.\".TH makefiles 4L "14. February 1997" "J\*org Schilling" "Schily\'s FILE FORMATS"
X.TH makerules 4L "14. February 1997" "J\*org Schilling" "GMD FOKUS FILE FORMATS"
X.SH NAME
Xmakerules \- system programmers guide for compiling projects on different platforms
X.SH SYNOPSIS
X.B "SRCROOT=	.\|.
X.br
X.B "RULESDIR=	RULES
X.br
X.B "include		$(SRCROOT)/$(RULESDIR)/rules.top
X.br
X.I "local defines are here
X.br
X.B "include		$(SRCROOT)/$(RULESDIR)/rules.*
X.PP
XSee chapter CURRENTLY SUPPORTED TARGET TYPES for possible values of
X.BR "rules.*" .
X
X.SH DESCRIPTION
XMakerules is a set of rules that allows compiling of structured
Xprojects with small and uniformly structured makefiles.
XAll rules are located in a central directory.
XCompiling the projects on different platforms can be done
Xsimultaneously without
Xthe need to modify any of the makefiles that are located
Xin the projects directories.
X.PP
XMakerules is a set of high level portability tools superior to
X.B autoconf
Xand easier to use.
X.PP
XThree make programs are currently supported:
X.IR "Sunpro make" , 
X.I "GNU make"
Xand
X.IR smake .
XIf you want to add support for other make programs, read the 
Xsections about the minimum requirements for a make program
Xand about the structure of the 
X.B "make rule 
Xsystem.
X.PP
XThis manual will help programmers who need to make modifications
Xon the make rule system itself. If you want to know something 
Xon how to use the 
X.B "makefile system
Xhave a look at 
X.BR makefiles (4).
X.PP
XThe main design goal was to have no definition on more than place
Xin the make rules. This implies that system programmers who
Xwant to add or modify rules must follow this goal in order not to
Xdestroy functionality in other places.
X.PP
XThe visible result for the user is a set of small and easy to read
Xmakefiles, each located in the project's leaf directory and therefore 
Xcalled
X.IR leaf -makefile.
X.PP
XEach of these 
X.IR leaf -makefiles,
Xin fact contains no rule at all. It simply defines some macros
Xfor the 
X.IR make -program
Xand includes two files from a central make rule depository.
XThese included files define the rules that are needed to compile
Xthe project.
X.PP
XEach 
X.IR leaf -makefile
Xis formed in a really simple way:
X.TP
X\(bu
XIt first defines two macros that define the relative location
Xof the project's root directory and the name of the directory
Xthat contains the complete set of of rules and then includes
Xthe rule file 
X.I rules.top
Xfrom the directory that forms the central rule depository.
XYou only have to edit the macro
X.I SRCROOT
Xto reflect the relative location of the project's root directory.
X.TP
X\(bu
XThe next part of a 
X.IR leaf -makefile
Xdefines macros that describe the target and the source.
XYou can only have one target per 
X.IR leaf -makefile.
XOf course, there may be many source files, that are needed to create
Xthat target.
XIf you want to make more than one target in a specific directory,
Xyou have to put more than one makefile into that directory.
XThis is the part of a makefile that describes a unique target.
XEdit this part to contain all source files, all local include files
Xand all non global compile time flags that are needed for your target.
XFor a typical target this is as simple as filling in a form.
X.TP
X\(bu
XEach
X.IR leaf -makefile
Xfinally includes a file from the rules directory that contains
Xrules for the appropriate type of target that is to be made
Xfrom this 
X.IR leaf -makefile.
X.PP
XThe makefile in each directory has to be called
X.IR Makefile .
XIf you want to have more than one makefile in a specific directory,
Xyou have to choose different names for the other makefiles.
X
X.SH "Currently Supported Target Types
X.PP
XThere are rules for the following type of targets:
X.TP 20
Xcommands
XThe make rules for user level commands like
X.IR cat ", " ls 
Xetc. are located in the file 
X.I rules.cmd
X.TP
Xdrivers
XThe make rules for device drivers
Xare located in the file 
X.I rules.drv
X.TP
Xlibraries
XThe make rules for non shared libraries
Xare located in the file 
X.I rules.lib
X.TP
Xshared libraries
XThe make rules for shared libraries
Xare located in the file 
X.I rules.shl
X.TP
Xlocalized files
XThe make rules for localized files
Xare located in the file 
X.I rules.loc
X.TP
Xnonlocalized files
XThe make rules for non localized files
Xare located in the file 
X.I rules.aux
X.TP
Xshell scripts
XThe make rules for shell scripts (a variant of localized files)
Xare located in the file 
X.I rules.scr
X.TP
Xmanual pages
XThe make rules for manual pages (a variant of localized files)
Xare located in the file 
X.I rules.man
X.TP
Xdiverted makefiles
XThe make rules for projects that need to have more than
Xone makefile in a specific directory
Xare located in the file 
X.I rules.mks
XIt contains a rule that diverts to the listed sub makefiles.
XEach sub makefile may be of any type.
X.TP
Xdirectories
XThe make rules for sub directories
Xare located in the file 
X.I rules.dir
X
X.SH "Minimum Requirements For A Make Program
XThe make rules currently have support for
X.IR "Sunpro make" , 
X.I "GNU make"
Xand
X.IR smake .
XIf you like to add support for other make programs, 
Xthey need to have some minimal features that go
Xbeyond the capabilities of the standard 
X.SM "UNIX
X.B make
Xprogram.
X.I BSDmake
Xcould be supported if it supports pattern matching rules correctly.
X.TP 20
Xinclude
XThe make program must be able to recursively include other files
Xfrom within a 
X.I makefile.
XThe name if the file to include must be allowed to be a macro.
XThe make program must be able to do this in a way that
Xif the file that should be included may be a result of make rule.
Xe.g if the file to be included does not exist or is outdated,
Xit should be built before an attempt is made to actually include it.
X.TP
Xappending to a macro
XA macro reference of the form:
X.sp
X.B "macro += addval
X.sp
Xshould append
X.B addval
Xto the string that is currently in
X.BR macro .
X.TP
Xsuffix macro replacement
XA macro reference of the form:
X.sp
X.B "out= $(macro\|:\|string1\|=\|string2)
X.sp
Xshould replace a suffix
X.I string1
Xto
X.I string2
Xin all words that are in
X.BR macro ,
Xwhere string1 is either a suffix, or a word to be replaced
Xin the macro definition, and string2 is the replacement 
Xsuffix or word.
X.I String1
Xand
X.I string2
Xmust be replaced correctly even if they are macros themselves.
XWords in a macro value are separated by SPACE, 
XTAB, and escaped NEWLINE characters.
X.TP
Xpattern macro replacement
XA macro reference of the form:
X.sp
X.B "out= $(macro\|:\|op%os\|=\|np%ns)
X.sp
Xshould replace a central pattern in 
X.BR macro ,
Xwhere 
X.B op 
Xis the existing (old) prefix and 
X.B os
Xis the existing
X(old) suffix,
X.B np 
Xand 
X.B ns 
Xare the new prefix and new suffix,
Xrespectively, and the pattern matched by % (a string of zero
Xor more characters), is carried forward from the value being
Xreplaced.
XFor example:
X.sp
X.B "PROGRAM=fabricate
X.br
X.B "DEBUG= $(PROGRAM:%=tmp/%\-g)
X.sp
Xsets the value of DEBUG to tmp/fabricate\-g.
X.IR Op ", " os ", " 
X.IR np " and " ns
Xmust be replaced correctly even if they are macros themselves.
X
X.SH "Understanding Basic Algorithms
XOne of the basic algorithms used in the make rule system
Xis needed to set an undefined macro to a guaranteed default value.
XBecause not all make programs have support for
X.I "if then else
Xstructures, a different method has to be used.
X.PP
XThe method used in
X.B "make rules
Xis implemented by using
X.B "suffix macro replacement
Xand
X.BR "pattern macro replacement" .
X.PP
X.ne 5
XFirst, a macro that contains a unique suffix is defined:
X.sp
X.B " # Define magic unique cookie
X.br
X.B " _UNIQ= 		.XxZzy\-
X.sp
XThis macro is used for all places where it is necessary to have
Xa macro with a guaranteed default value.
XThe following example shows the basic algorithm that is used to
Ximplement the phrase:
X.B If 
X.I $(MAKE_NAME)
Xcontains a value, 
X.B then
X.I $(XMAKEPROG)
Xwill be set to
X.I $(MAKE_NAME)
X.B else
X.I $(XMAKEPROG)
Xwill be set to
X.IR $(MAKEPROG) .
X.sp
X.B " _MAKEPROG=	$(_UNIQ)$(MAKE_NAME)
X.br
X.B " __MAKEPROG=	$(_MAKEPROG:$(_UNIQ)=$(MAKEPROG))
X.br
X.B " XMAKEPROG=	$(__MAKEPROG:$(_UNIQ)%=%)
X.sp
XThe first line in this example, sets the macro
X.I _MAKEPROG
Xto the concatenation of the value of
X.I MAKE_NAME
Xand
X.BR .XxZzy\- .
XIf the macro
X.I MAKE_NAME
Xis empty at this time, 
X.I _MAKEPROG
Xwill contain only 
X.BR .XxZzy\- .
X.PP
XIn the second line, 
X.I __MAKEPROG
Xis set to the value of
X.IR _MAKEPROG .
XIf 
X.I _MAKEPROG
Xcontains only 
X.B .XxZzy\-
Xthis implies, that
X.B .XxZzy\-
Xis the suffix. This suffix is then replaced
Xby the value of
X.IR MAKEPROG ,
Xin this case
X.I __MAKEPROG
Xwill contain the unmodified value of
X.IR MAKEPROG .
XIf 
X.I _MAKEPROG
Xcontains a concatenation of
X.B .XxZzy\-
Xand something else, 
X.B .XxZzy\-
Xwill not be a suffix, but a prefix of 
X.I _MAKEPROG
Xand for this reason
X.I __MAKEPROG
Xwill contain the unmodified value of
X.IR _MAKEPROG ,
Xwhich is a concatenation of
X.B .XxZzy\-
Xand the value of
X.IR MAKE_NAME .
X.PP
XIn the third line, 
X.I XMAKEPROG
Xis set to the value of
X.IR __MAKEPROG .
XIf 
X.I __MAKEPROG
Xhas the prefix
X.B .XxZzy\- 
Xat this time, 
X.B .XxZzy\-
Xis stripped of.
X
X.SH "The Structure in Make Macro names
X.PP
XThe names used for 
X.B "make macros
Xare structured in a way that allows to use 
X.BR grep (1)
Xto look for the names in the 
X.B make rules.
XTo allow this, no name must be a substring of another name.
X.PP
XIf a command needs options that have to be specified
Xin macros, there is a 
X.B "make macro
Xthat is named
X.I XXXFLAGS.
XThis is compliant to usual make file rules.
XThe are internal 
X.B "make macros
Xcalled
X.I XXXOPTS
Xand
X.I XXXOPTX
Xthat will be combined for 
X.IR XXXFLAGS :
X.sp
X.B "LDFLAGS= $(LDOPTS) $(LDOPTX)
X.sp
XWhere 
X.I XXXOPTS
Xis the name of the macro that is used internally
Xand 
X.I XXXOPTX
Xis the name of the macro that may be used from the
Xcommand line of the make program.
X.I XXXOPTX
Xtherefore is used to append to the content of 
X.I XXXFLAGS
XIf the value of
X.I XXXFLAGS
Xneed to be overwritten, 
X.I XXXOPTS
Xmay be used within the command line flags of the make program.
X
X.SH "The Structure Of The Make Rule System
X.SH "The Structure Of The Basic Rules in rules.top
XThe file 
X.B RULES/rules.top
Xfirst includes a rule file that depends on the 
Xmake program that is used.
XThe name of this file is
X.BI RULES/mk\- makeprog .id
Xwhere
X.I makeprog
Xhas to be replaced by the real name of
Xthe makeprogram e.g.
X.BR make ", " gmake ", " smake .
XThe purpose of this file is to set up a list of macros
Xthat identify the system where the project is currently built.
XThese macros have values that contain only lower case letters and define:
X.TP 28
Xthe processor architecture
XIf two systems run the same operating system, this
Xis a unique value if a simple user level program will
Xnot need to be recompiled in order to run on the other system.
XPossible values are 
X.BR sparc ", " mc68020 ", " pentium .
XThis is the output of
X.BR "uname \-p" .
XThe value is stored in
X.BR P_ARCH .
X.TP
Xthe kernel architecture
XIf two systems may use the same value for 
X.B P_ARCH
Xbut a heavily system dependent user level program
Xneed to be recompiled in order to run on the other
Xsystem, These two systems have different 
Xkernel architectures.
XThis is the output of
X.BR "uname \-m" .
XPossible values are 
X.BR sun3 ", " sun4c ", " sun4m .
XThe value is stored in
X.BR K_ARCH .
X.TP
Xthe machine architecture
XAn outdated macro that is useful only on sun systems.
XDo not use this, use 
X.B P_ARCH 
Xinstead.
XThis is the output of
X.BR arch .
XPossible values are 
X.BR sun3 ", " sun4 .
XThe value is stored in
X.BR M_ARCH .
X.TP
Xthe hostname
XThe name of the machine where the compilation takes place.
XThis is the output of
X.BR "uname \-n" .
XThe value is stored in
X.BR HOSTNAME .
X.TP
Xthe name of the operating system
XThis is the output of
X.BR "uname \-s" .
XPossible values are 
X.BR sunos ", " dgux ", " hp\-ux ", " irix .
XThe value is stored in
X.BR OSNAME .
X.TP
Xthe release of the operating system
XThis is the output of
X.BR "uname \-r" .
XPossible values are 
X.BR 5.5 ", " 4.1.4 .
XThe value is stored in
X.BR OSREL .
X.PP
XThe next file to be included from
X.B RULES/rules.top
Xis
X.BI RULES/os\- "operating system" .id .
XIt defines the macros
X.B O_ARCH
Xand
X.B \-O_ARCH 
Xand may modify one of the macros that are defined
Xin
X.BI RULES/mk\- makeprog .id .
XThe macros
X.B O_ARCH
Xand
X.B \-O_ARCH 
Xare used to distinguish between different operating systems.
XThe names of the compiler configuration files have
X.B \-O_ARCH 
Xas a central part.
XOn some operating systems e.g. 
X.B SunOS
Xand
X.B DG\-UX
Xit is necessary to distinguish between 
X.B "SunOS 4.x
Xand
X.B "SunOS 5.x
Xor
X.B "DG\-UX 3.x
Xand 
X.B "DG\-UX 4.x.
X.PP
XThe next file to be included from
X.B RULES/rules.top
Xis
X.BR Defaults .
XIt defines the macros
X.B DEFCCOM
X,
X.B DEFINCDIRS
X,
X.B LDPATH
X,
X.B RUNPATH
X,
X.B INS_BASE
Xand 
X.BR INS_KBASE .
XIf the definitions have to be different on
Xdifferent systems, this file may contain a line int the form:
X.sp
X.BI include  " $(SRCROOT)" /Defaults. $(O_ARCH)
X.sp
XThe actual definitions then have to be moved into
Xthese files.
X.PP
XNext, after setting up some internal defaults,
X.B RULES/rules.top
Xincludes the compiler configuration file with
Xthe name:
X.sp
X.I $(SRCROOT)/$(RULESDIR)/$(XARCH).rul
X.sp
XThis file contains all necessary 
X.B system dependent 
Xstuff that is needed to configure the C-compiler 
Xon the appropriate system.
XIt is a bad idea to create a new one from scratch.
XHave a look at the other compiler configuration
Xfiles and modify a similar file for your needs.
XNote that there are basically two criterias to
Xthat are important in a compiler configuration file.
XOne is whether the system uses the
X.I ELF
Xheader format or not. 
XThe other is whether the system uses
X.I shared libraries
Xor not.
X
X.SH "The Structure Of The Application Specific Rules
X.PP
XThe application specific rule files are designed in
Xsuch a way that they include all necessary stuff that
Xis needed for that specific task. The application specific
Xrule files are:
X.TP 25
X$(RULES)/rules.aux
XRules for installing non localized auxiliary files.
X.TP
X$(RULES)/rules.cmd
XRules for commands like 
X.I sh.
X.TP
X$(RULES)/rules.dir
XRules for sub directories.
X.TP
X$(RULES)/rules.drv
XRules for lodable drivers.
X.TP
X$(RULES)/rules.lib
XRules for static libraries.
X.TP
X$(RULES)/rules.loc
XRules for installing localized auxiliary files.
X.TP
X$(RULES)/rules.man
XRules for installing localized manual pages.
X.TP
X$(RULES)/rules.mks
XRules for sub makefiles.
X.TP
X$(RULES)/rules.mod
XRules for lodable stream modules.
X.TP
X$(RULES)/rules.scr
XRules for installing localized shell scripts.
X.TP
X$(RULES)/rules.shl
XRules for shared libraries.
X
X.SH "Understanding The Structure Of The Make Rule System
X.PP
XTo understand the structure of the 
X.B "make rule
Xsystem while doing changes, try to use the 
X.B \-xM
Xflag
Xin the
X.B smake
Xprogram.
XThis flag will print out the include dependency list
X(i.e. a list that tell you which make rules is included
Xfrom which other rule).
X.PP
XNote that some of the rules are make program dependent.
XIf you want to make changes to these rules you may need to
Xplace the definitions into separate rule files
Xeach for the appropriate make program.
XHave a look into the
X.B RULES
Xdirectory
Xfor some examples.
X
X.SH FILES
X\&.\|.\|./RULES/*
X.br
X\&.\|.\|./DEFAULTS/*
X.br
X\&.\|.\|./TARGETS/*
X.br
X\&.\|.\|./TEMPLATES/*
X
X.SH "SEE ALSO"
X.BR makefiles (4),
X.BR make (1),
X.BR gmake (1),
X.BR smake (1).
X
X.SH DIAGNOSTICS
XDiagnostic messages depend on the make program.
XHave a look at the appropriate man page.
X
X.SH NOTES
X.PP
XThe make rules
Xcan be used with 
X.IR "Sunpro make" ", " "Gnu make"
Xand 
X.IR smake .
XAlthough Gnu make runs on many platforms, it has no useful debug
Xoutput.
X.PP
XUse
X.IR "Sunpro make" " or " "smake"
Xif you have problems with a makefile.
X.IR "Sunpro make" " and " "smake" ,
Xboth have a \-D flag, that allows you to watch the makefiles
Xafter the first expansion. Use this option, if you are in doubt
Xif your makefile gets expanded the right way and if the right
Xrules are included.
XThere is also a \-d option that gives debugging output while 
Xmake is running. If you want more output, use \-dd, \-ddd and so on.
X.PP
X.I Smake
Xhas an option \-xM that shows you the include dependency for
Xmake rules.
X
X.SH BUGS
X
X.SH "Source Tree Hierarchy
X.LP
XThe following outline gives a quick tour through a typical
Xsource hierarchy:
X.LP
X.na
X.nh
X.PD 0
X.TP
X.B .../
Xroot directory of the source tree
X.
X.RS
X.TP
X.B Makefile
Xthe top Makefile
X.TP
X.B Defaults
Xdefault definitions for that source tree. System dependent
Xdefinitions are in 
X.B .../DEFAULTS/
X.TP
X.B Targetdirs
Xa file containing a list of directories that are needed
Xfor that project.
XIf the system needs different target lists depending
Xon the target system architecture , use target specific files in
X.B .../TARGETS/
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../RULES/
Xthe location of makefiles (included rules)
X.
X.RS
X.TP
X.B rules.top
Xthe mandatory include rules (needed to setup basic rules)
X.TP
X.B rules.aux
Xrules needed to install a non localized auxiliary file
X.TP
X.B rules.cmd
Xrules needed to make an ordinary command (like /bin/sh)
X.TP
X.B rules.drv
Xrules needed to make a device driver
X.TP
X.B rules.lib
Xrules needed to make a standard (nonshared) library
X.TP
X.B rules.loc
Xrules needed to install a localized auxiliary file
X.TP
X.B rules.man
Xrules needed to install a localized manual page
X.TP
X.B rules.scr
Xrules needed to install a localized shell script
X.TP
X.B rules.shl
Xrules needed to make a shared library
X.TP
X.B rules.mks
Xrules needed to make more than one target in a specific directory
X.TP
X.B rules.dir
Xrules needed to make targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../DEFAULTS/
Xdefault definitions for various target architectures are
Xlocated in this directory. Templates for some architectures can
Xbe found in the
X.I .../TEMPLATES/
Xdirectory.
X.TP
X.B .../TARGETS/
Xtarget list definitions for various target architectures are
Xlocated in this directory.
X.TP
X.B .../TEMPLATES/
Xtemplates that should be used inside the project
X(rename to Makefile, if it is the only makefile on that directory, 
Xrename to
X.I target.mk,
Xif there is more than one target in that directory)
X.
X.RS
X.TP
X.B Defaults
XDefaults file for the source root directory
X.TP
X.B Defaults.linux
XDefaults file for 
X.IR linux .
XThis sould be installed in the 
X.B .../DEFAULTS/
Xdirectory.
X.TP
X.B Makefile.root
XMakefile for the source root directory
X.TP
X.B Makefile.aux
XMakefile for a non localized auxiliary file
X.TP
X.B Makefile.cmd
XMakefile for an ordinary command (like /bin/sh)
X.TP
X.B Makefile.lib
XMakefile for a standard (nonshared) library
X.TP
X.B Makefile.loc
XMakefile for a localized auxiliary file
X.TP
X.B Makefile.man
XMakefile for a localized manual page
X.TP
X.B Makefile_de.man
XMakefile for a localized manual page in the german locale
X.TP
X.B Makefile.scr
XMakefile for a localized shell script
X.TP
X.B Makefile.shl
XMakefile for a shared library
X.TP
X.B Makefile.drv
XMakefile for a device driver
X.TP
X.B Makefile.mks
XMakefile for more than one target in a specific directory
X.TP
X.B Makefile.dir
XMakefile for targets that are located in sub directories
Xto the current directory
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../cmd/
Xsource tree for normal commands
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I cmd 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I myprog 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B myprog/
Xdirectory where the sources for a specific command are located
X.
X.RS
X.TP
XMakefile
Xmakefile for
X.I myprog
X.TP
XMakefile.man
Xmakefile for the manual page of
X.I myprog
X.TP
Xmprog.c
Xsource for myprog
X.TP
Xmprog.tr
Xtroff source for the manual page of myprog
X.TP
X.B OBJ/
Xdirectory where system specific sub directories are located
X.
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.br
X.TP
X\&.\|.\|.
X.RE
X.br
X.ne 5
X.TP
X.B .../lib/
Xdirectory where the sources for a libraries are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I lib 
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I libfoo
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B libfoo/
Xdirectory where all source files for libfoo are located
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../kernel
Xdirectory for kernel modules
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I kernel
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I drv 
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B drv/
Xdirectory where drivers are located
X.
X.RS
X.TP
X.B Makefile
Xthe makefile for the 
X.I drv
Xsub directory
X.TP
X.B Targetdirs.sun4m
Xa file containing a list of directories like 
X.I mydrv
X(see below) that are needed
Xfor that specific architecture.
X.TP
X.B mydrv/
Xsource for a specific driver
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../include
Xdirectory for global include files that are used in that project
X.
X.TP
X.B .../bins
Xdirectory for binary programs that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for binaries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../libs
Xdirectory for libraries that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for libraries that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.
X.TP
X.B .../incs
Xdirectory for include files that are created/needed while compiling
Xthe project
X.RS
X.TP
X.B sparc\-sunos5\-cc/
Xdirectory for include files that belong to a specific system
X.TP
X\&.\|.\|.
X.RE
X.TP
X\&.\|.\|.
X.RE
X.
X.ad
X.PD
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg@schily.isdn.cs.tu-berlin.de
Xor
X.B
Xjs@cs.tu-berlin.de
Xor
X.B
Xjes@fokus.gmd.de
END-of-star-1.5.2/man/man4/makerules.4
echo x - star-1.5.2/man/man4/Makefile
sed 's/^X//' >star-1.5.2/man/man4/Makefile << 'END-of-star-1.5.2/man/man4/Makefile'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Sample makefile for sub-makes in one directory
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES=	makefiles.mk makerules.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/man/man4/Makefile
echo x - star-1.5.2/man/man4/makefiles.mk
sed 's/^X//' >star-1.5.2/man/man4/makefiles.mk << 'END-of-star-1.5.2/man/man4/makefiles.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	makefiles
XMANSECT=	$(MANSECT_FILEFORM)
XMANSUFFIX=	$(MANSUFF_FILEFORM)
XMANFILE=	makefiles.4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/man/man4/makefiles.mk
echo x - star-1.5.2/man/man4/makerules.mk
sed 's/^X//' >star-1.5.2/man/man4/makerules.mk << 'END-of-star-1.5.2/man/man4/makerules.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	makerules
XMANSECT=	$(MANSECT_FILEFORM)
XMANSUFFIX=	$(MANSUFF_FILEFORM)
XMANFILE=	makerules.4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/man/man4/makerules.mk
echo x - star-1.5.2/man/Makefile
sed 's/^X//' >star-1.5.2/man/Makefile << 'END-of-star-1.5.2/man/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for sub directory makes
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XDIRS=	man1 man4
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dir
X###########################################################################
END-of-star-1.5.2/man/Makefile
echo c - star-1.5.2/READMEs
mkdir -p star-1.5.2/READMEs > /dev/null 2>&1
echo x - star-1.5.2/READMEs/README.aix
sed 's/^X//' >star-1.5.2/READMEs/README.aix << 'END-of-star-1.5.2/READMEs/README.aix'
XYou need to use GNUmake or my smake to compile on AIX
X
XRead the file README.compile before compiling.
X
XNOTE:	AIX seems to have a kernel bug in the mmap() part
X	that may cause kernel panics.
X
XIf you observe this kernel panic, try to add a line:
X
XCOPTS += -DUSE_USGSHM
X
Xto the file cdrecord/Makefile
X
Xor compile the package using:
X
Xmake COPTX=-DUSE_USGSHM
X
XIt seems that SVrx style shared memory does not have this kernel bug
XIn newer AIX releases, the mmap() kernel problem seems to be fixed.
X
XIf you like to create bootable CD's for AIX on the CHRP architecture:
X
X	The /usr/sbin/mkcd command starting shipping with
X	AIX 4.3.3 back in Oct 99'. It's installed by default with the system.
X	There's more info about it in /usr/lpp/bos.sysmgt/mkcd.README.html.
X
X
XNOTE:	there is currently no real SCSI generic support for AIX, so 
X	cdrecord -scanbus will not work.
X
X	/dev/rcd0 is mapped to dev=0,0,0
X	/dev/rcd1 is mapped to dev=0,1,0
END-of-star-1.5.2/READMEs/README.aix
echo x - star-1.5.2/READMEs/README.gmake
sed 's/^X//' >star-1.5.2/READMEs/README.gmake << 'END-of-star-1.5.2/READMEs/README.gmake'
XGmake compliance is included for convenience because it may
Xbe found on many systems and most make programs are worse
Xthan gmake.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
XThe major problem with gmake is that it does not handle the
Xinclude directive correctly. The general rule for a make program is
Xto first try to "make" any object it should look on. Gmake
Xdoes not try to "make" any makefile it should include. One result
Xis many warnings about non-existent files (which you could ignore).
XThe other problem with gmake and include files is hat gmake
Xincludes the files in the opposite order than expected. The result is 
Xthat dependencies may not handled correctly.
X
XIf you have problems with the make file system and gmake,
Xyou are out of luck. Gmake has a debug option, but it gives
Xtons of debug messages. Less than 1% of these debug messages are
Xuseful. Important things are missing in these debug messages.
X
XGmake has bug with the VPATH= option. Some of the macros are
Xnot expanded correctly. I had to remove all occurrences of
X$@ $* and $^ on some places for this reason.
X
XOn some platforms (e.g. OSF1), gmake is not able to correctly recognize
Xthe default target. If gmake complains about this, call ./Gmake all
X
XTo use GNU make create a file called 'Gmake' in you search path
Xthat contains:
X
X#!/bin/sh
XMAKEPROG=gmake
Xexport MAKEPROG
Xexec gmake "$@"
X
Xand call 'Gmake' instead of gmake. On Linux and on Cygwin there is
Xno gmake, 'make' on Linux and on Cygwin is really a gmake.
X
X'Gmake' and 'Gmake.linux' are part of this distribution.
X
XNote that makefile versions past 98/10/13 are trying to recognize
Xgmake by assuming that $(MAKE_COMMAND) is only present if you
Xare running gmake. So it may be worth to try to just call 'gmake'
Xor even 'make' if your system uses gmake as the default make program.
X
END-of-star-1.5.2/READMEs/README.gmake
echo x - star-1.5.2/READMEs/README.hpux
sed 's/^X//' >star-1.5.2/READMEs/README.hpux << 'END-of-star-1.5.2/READMEs/README.hpux'
X		I M P O R T A N T
X
XOn HP-UX-11.x the maximal data size (allocated data) of a 32 bit program is
X64 MB.
X
XOne solution is to build a 64 bit binary, for those the default process memory
Xlimit is 1 GB.
X
X64bit binaries can be created with
X
X	cc +DA2.0w
X	cc +DD64
X
Xif you have the HP C-ANSI-C compiler.
X
XTo compile in 64 bit mode, first call ./.clean then call
X
X	make COPTX=+DD64 LDOPTX=+DD64 
X	make COPTX=+DD64 LDOPTX=+DD64  install
X
X
XIf you have an older GNU gcc, you need a 64bit compiled gcc. Older GNU gcc versions
Xare not capable of switching, so you need a separate compiler installation for either:
X
Xl1:/u/usr/merijn 102 > file /usr/local/pa*/bin/gcc
X/usr/local/pa20_32/bin/gcc:     PA-RISC2.0 shared executable dynamically linked -not stripped
X/usr/local/pa20_64/bin/gcc:     ELF-64 executable object file - PA-RISC 2.0 (LP64)
Xl1:/u/usr/merijn 103 >
X
XWith a newer GCC, you may call ./.clean then call:
X
X	make COPTX=-mlp64 LDOPTX=-mlp64
X	make COPTX=-mlp64 LDOPTX=-mlp64  install
X
X
XThe other way is to alter some kernel parameters which require a reboot.
XThe default kernel parameter seem to look like:
X
XKernel param.               Value
Xmaxdsiz                  67108864
Xmaxdsiz_64bit          1073741824
Xmaxfiles                      200
Xmaxfiles_lim                 2048
Xmaxssiz                   8388608
Xmaxssiz_64bit             8388608
Xmaxswapchunks                3250
Xmaxtsiz                  67108864
Xmaxtsiz_64bit          1073741824
X
XThe important one is maxdsiz, 64 MB is the default and it is rather low.
XThere is some information page at http://www.uwsg.iu.edu/hp/hpux-tune.html#maxdsiz 
Xand they recommend to increase it to 1.9 GB. Sounds extreme.
X
XAt http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x08afe7613948d5118fef0090279cd0f9,00.html 
Xthey recommend 500 MB.
X
Xmaxssiz shouldn't be a problem either since it has to do with swap and such as 
Xstoring arrays and recursion etc.
X
XIf you like to know how to create 64 bit binaries on Solaris, please
Xread README.compile. I hope this helps. If you found the right way for HP-UX,
Xplease send me a mail.
X
X
X
XThe Schily makefile system usually should be able to find the best C-compiler
Xon HP-UX automatically. If it does not work, here is a way force to use a different
Xcompiler.
X
X
XYou may compile with the HP ANSI C-Compiler using:
X
X	make CCOM=cc
X
XTo compile with the free K&R C-compiler call:
X
X	gmake CCOM=cc 'COPTS= ' 
Xor
X	smake CCOM=cc 'COPTS= ' 
X/*--------------------------------------------------------------------------*/
X
XHP-UX SCSI hints:
X
XNote that there are no device nodes for userland SCSI on HP-UX,
Xyou have to call the included shell script MKNOD.hpux first.
X
XIf you own a HP-9000-800 series machine, you need to install
Xthe file MKNOD.hpux-800 in the /etc init shell script directory 
Xin order to call it after each boot.
X
XThis script will create the files in /dev/scsi/... and /dev/rscsi/...
XThe permissions will be set to read/write for root only.
X
X
XHP does not handle CD-ROMs as well as it should. On the HP have a look at
Xthe man pages for
X    pfs
X    pfsd
X    pfs_mount
Xand anymore that they refer too.
X
X/*--------------------------------------------------------------------------*/
X
XFrom:
XH.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
X
XAs of Jun 2002, there are some patches available to HP-UX 11.00 and 11i that
Xprevent the need for pfs, and these are highly recommended, since Rock-Ridge
Xextensions are now supported from the kernel level.
X
XFor 11.00:
X
Xa5:/ 103 # swlist | grep -i rock
X  PHCO_26449   1.0  Add Rock Ridge extension to mount_cdfs(1M)
X  PHKL_26448   1.0  Y2k; Rock Ridge extension for ISO-9660
X  PHKL_26450   1.0  Rock Ridge extension for ISO-9660
Xa5:/ 104 #
X
XPHKL_26448 is not recommended, but I never had any trouble with it. I still
Xhave to install PHKL_28060 over PHKL_26448
X
X  PHKL_28060   1.0  Y2k; Rock Ridge extension for ISO-9660
X
XFor 11i:
X
X  PHKL_28025   1.0  Rock Ridge extension for ISO-9660 
X  PHKL_26269   1.0  Rock Ridge extension for ISO-9660 
X  PHCO_25841   1.0  Add Rock Ridge extension to mount_cdfs(1M) 
X
XI don't have 11i (yet), so I got this from HP-UX' patch database.
X
XThe problem is that they did /not/ enable RR by default, but made it a mount
Xoption. D'uh! But you can add it in /etc/fstab, and never worry again :)
X
Xa5:/ 104 # grep cd /etc/fstab
X/dev/cd0        /cdrom          cdfs    ro,rr,noauto    0 0
Xa5:/ 105 #
X
X
END-of-star-1.5.2/READMEs/README.hpux
echo x - star-1.5.2/READMEs/README.linux
sed 's/^X//' >star-1.5.2/READMEs/README.linux << 'END-of-star-1.5.2/READMEs/README.linux'
XWARNING: Do not use 'mc' to extract the tar file!
XAll mc versions before 4.0.14 cannot extract symbolic links correctly.
X
XLinux is the most self incompatible OS I know. If you have any problem,
Xfirst carefully read this file.
X
XLinux includes the gnu make program by default but it is called 'make' on linux.
XYou will definitely need the shell script Gmake.linux to use gmake
Xon a linux system.
X
XInstall it as /usr/bin/Gmake with:
X
Xcp Gmake.linux /usr/bin/Gmake
X
XThen compile the system by calling:
X
X/usr/bin/Gmake
Xor ./Gmake.linux
X
XNOTE for all Linux 2.5.x versions and all Linux versions before 2.6.8:
X
X	Linux did ship with defective kernel include files starting
X	with 2.5.x. These defective kernel include files did prevent
X	compilation. If you have problems compiling software and see
X	error messages related to include/scsi/scsi.h & include/scsi/sg.h
X	either upgrade to Linux-2.6.8 or newer or remove /usr/src/linux
X
XNOTE for all Linux versions using libc.so.6:
X
X	Libc.so.6 is definitely a big problem in binary compatibility.
X	First you should note that Linux is not a OS but only a kernel.
X
X	Creating a OS from kernel, libraries and applications is done
X	by various companies that create "Linux distributions". It seems
X	that these companies (e.g. SuSE and Red Hat) are fighting wars
X	against each other.
X
X	There is no guarantee that a binary that has been compiled
X	on one Linux distribution will run correctly on a different
X	release of the same vendor or on a distribution from a different 
X	vendor. You cannot copy binaries between different Linux
X	versions, always compile the sources by yourself.
X
X	We should consider that the name libc.so.6 is burned out for
X	these incompatibility reasons. But stop: Don't be too fast.
X	The dynamic linker on Linux does not work correctly. It has
X	been derived from the SunOS 4.x linker (which worked correctly)
X	but  the Linux version does not even warn if it could not
X	find a library with the right major version number. Until
X	this is fixed it makes no sense to switch to libc.so.7
X
X	See below for more information.
X
X
XNOTES for S.u.S.E distributions: If the "make" run aborts with strange messages,
Xthen you need to unset an environment variable called PROMPT_COMMAND
XIt contains illegal values for a make file system.
X
X		I M P O R T A N T
X
X	please carefully read all notes:
X
XNewer Linux kernels (from 2.3.51) moved SVSv shared memory into a filesystem.
XIf you get messages with error code EINVAL related to shared memory, you 
Xmost likely installed a newer kernel on an old system that does not mount
Xthe new shared memory filesystem.
XFor information on this filesystem please read README.linux-shm
X
XIf you have any problems to access a device on the SCSI bus, check your
X/dev/sg devices first. Your system should either only have /dev/sga...
Xor /dev/sg0... The newer Linux kernel use /dev/sg0... so the actual
XSCSI transport code checks for /dev/sg0... first. Many Linux installations
Xhave too few /dev/sg* device nodes. This is because of the funny device 
Xmapping. It may be possible that one SCSI device eats up 8 /dev/sg* entries.
XI recommend to have at least 20 /dev/sg* device nodes.
X
XIn any case: first read the man page for hints how to specify the device.
XIf nothing helps, first run e.g. cdrecord -scanbus. If this does not find
Xyour device, the problem is in your kernel or system installation.
XIf scanning the bus finds the device, you are using the wrong device name.
XIf nothing help try to call e.g. strace cdrecord 
X
XLinux ATAPI hints:
X
XRead README.ATAPI to learn how to use ATAPI drives with the SCSI transport
Xlibrary.
X
XLinux SCSI hints:
X
XIf you want to use the user SCSI library on a target that is connected
Xto a SCSI hostadapter which is not the first, you need to apply a patch
Xto your Linux kernel code. This patch is located in the file 
X
XLinux.scsi-patch
X
XPlease chdir to /usr/src, call
Xpatch  < Linux.scsi-patch
Xand re-compile and re-install your kernel.
X
XLinux kernels past 2.0.30 will probably already have this patch included.
X
XI recommend to use Linux 2.0.35 or later or Linux 2.1.115 or later.
XThese versions of Linux will include ATAPI support in a way needed by cdrecord.
XLinux 2.1.115 or newer will in addition support the Parallel Port / ATAPI
Xadapters found in some CD-R or CD-RW drives.
X
XIMPORTANT:
X
X-	Linux driver design oddities ******************************************
X	Although cdrecord supports to use dev=/dev/sgc, it is not recommended
X	and it is unsupported.
X
X	The /dev/sg* device mapping in Linux is not stable! Using dev=/dev/sgc
X	in a shell script may fail after a reboot because the device you want
X	to talk to has moved to /dev/sgd. For the proper and OS independent
X	dev=<bus>,<tgt>,<lun> syntax read the man page of cdrecord.
X
X-	Linux Kernel bug ******************************************************
X	In some architectures (at least on sparc / alpha / ppc) kernels prior
X	to 2.0.32 are not usable because the call to mlockall() kills cdrecord.
X
X-	You configured you kernel the wrong way *******************************
X	If you get a message like:
X
X		cdrecord: Function not implemented. shmget failed
X
X	You need to look for three possible reasons:
X
X	-	You are using a Linux Kernel 2.3.51 or newer.
X		Read README.linux-shm
X
X	-	You removed SVSv IPC from your kernel. You need to enable it again.
X		Run a Linux kernel config and recompile with SYSv IPC.
X
X	-	The allowed amount of shared memory in the kernel is
X		not sufficient. See next main point for a solution:
X
X-	Linux kernel oddities *************************************************
X	You may need to edit /usr/src/linux/include/asm*/shmparam.h to allow at least 
X	4 MB of shared memory for your architecture by modifying SHMMAX
X	and re-compile/re-install Linux !
X	(note that Linux for Intel by default allows 16 MB) 
X
X	Do this by e.g. changing the #define for SHMMAX to:
X
X	#define SHMMAX 0x1000000                /* max shared seg size (bytes) */
X
X	This will allow 16 MB for shared memory.
X
X-	Linux kernel memory management ****************************************
X	If you get the message: "Cannot allocate memory. Cannot send SCSI cmd via ioctl"
X	Your kernel/include files are inconsistent.
X
X		This seems to be the case with most actual Linux kernels!!!!!!
X
X	Make sure, that the include file /usr/src/linux/include/scsi/sg.h
X	reflects the actual kernel. Usually, the files /usr/include/scsi/sg.h
X	and /usr/src/linux/include/scsi/sg.h should be identical.
X
X	**** Never change the content of /usr/src/linux/include/scsi/sg.h without
X	properly recompiling the kernel. Cdrecord depends on the fact that
X	the value of the define SG_BIG_BUFF uses the same value as the actual
X	kernel. Use cdrecord -scanbus -debug to get the value of SG_BIG_BUFF
X	with cdrecord has been compiled. An output of:
X
X		scsi_getbuf: 32768 bytes
X
X	indicates that cdrecord has been compiled with 32k SG_BIG_BUF
X
X	The Linux 'sg' driver is the worst driver design, I've ever seen.
X
X-	Linux Binary incompatibility *****************************************
X	If any of the options that take a equal sign ('=') in the middle does
X	not work correctly (e.g. dev= or if=) you are using a binary that
X	does not work correctly on your current OS distribution.
X
X	If dev=0,0,0 does not work but -dev=0,0,0 works you found this
X	incompatibility. This problem is caused by an incompatibility
X	in ctype.h and it seems that there are other compatibility problems
X	e.g. with reading /etc/default/cdrecord.
X
X	You cannot copy binaries between different Linux versions,
X	always compile the sources by yourself. 
X
X	If a hint from a user is correct then even a RPM binary built for
X	RH-6.2 did not work on RH-6.2 because of these binary incompatibilities.
X
X
XJoerg
END-of-star-1.5.2/READMEs/README.linux
echo x - star-1.5.2/READMEs/README.macosX
sed 's/^X//' >star-1.5.2/READMEs/README.macosX << 'END-of-star-1.5.2/READMEs/README.macosX'
XFebruary 25, 2002
X
XMacOS 10.1 driver now in the tree in libscg/scsi-mac-iokit.c.
X
XIt supports:
X	* Firewire, USB, and ATAPI MMC-3 compliant burners
X	* SCSI parallel bus attached burners (requires MacOS X.1.3)
X
XIt does not support:
X	* Older non MMC-3 burners
X	* CD-ROM drives/DVD-ROM drives (i.e. non-burners)
X
XNote that this is a limitation of MacOS X and not of the driver.
XSee the end of the document if you're curious why.
X
XIf you just want to burn ISO images, you may want to consider using Apple's
Xhdiutil program, but it is not clear how standard compliant this method is.
X
XBuilding
X--------
X
XNote if you installed MacOS X on a HFS+ volume, make install will fail if
Xthere is a file called INSTALL in the directory tree because this Filesystem
Xis not POSIX compliant. POSIX requires to honor character case but HFS+
Xignores the character case. If you like to use "make install" rename 
XINSTALL to something else. (e.g. INSTALL.txt)
X
X
XDevice Naming
X-------------
X
XYou need to pass a device name on the command line to the cdrecord utility
X
XCD burners: (probably) IOCompactDiscServices
XDVD burners: (probably) IODVDServices
X
X# ./cdrecord dev=IOCompactDiscServices -toc
X
Xor if you have multiple drives, you can append a number to differentiate
X
X# ./cdrecord dev=IOCompactDiscServices/2 -toc
X
XThat should talk to the second CD-R on the system (NOT TESTED).
X
XSharing nicely with the Finder
X------------------------------
X
XThe MacOS 10.1 Finder will offer to burn any blank media you put into
Xthe burner.  However, you don't want to use the Finder, you want to
Xuse cdrecord! So, how do you get around this problem?
X
XWhen you insert the media, the Finder asks "Do you want to prepare this
Xdisc?". Click on the "Ignore" button.
X
XThe Finder will then say "No volumes found. Click Continue to continue
Xwithout ejecting".  Click on the "Continue" button.
X
X
XCommon Errors
X-------------
X
XNo matching device ... found:
XMake sure you typed the device names correctly. See above. Use ioreg
X-l to find if there is an IOCompactDiscServices or IODVDServices in
Xthe device tree.
X
XUnable to get exclusive access: 
XAnother programs (usually the Finder) has exclusive access to the drive.
XSee "Sharing Nicely with the Finder"
X
XUnable to get plugin interface: 
XThe SCSI Architecture Family of drivers (supports Firewire, ATAPI, and
XUSB) has a special module that allows user code like libscg to send
XSCSI commands to a device. This module is only attached, though, if
Xthe kernel device driver thinks the device is sufficiently interesting
X(e.g. the kernel thinks it's a burner).
X
XYou can see if the module is loaded by looking for
XSCSITaskUserClientIniter in the output of ioreg -l.
X
XWhy doesn't it support my SCSI device?
X--------------------------------------
X
XApple's kernel drivers enforces the rule that application cannot send
XSCSI commands to devices for which they feel they have enough kernel
Xsupport. This includes hard disks and CD/DVD ROMs. They make an exception
Xfor burners, though.
X
XThere are two possible work-arounds, neither of which has been
Ximplemented.  One is to write a kernel driver that wraps the Apple
Xkernel drivers and exposes a raw SCSI interface, overriding the Apple
Xkernel drivers. The other is to write a SCSI device emulator at user
Xmode that translates SCSI commands into the appropriate interface
Xcalls to IOKit.
X
XBugs
X----
XSend bugs to: csapuntz@stanford.edu
END-of-star-1.5.2/READMEs/README.macosX
echo x - star-1.5.2/READMEs/README.macosX-old-versions
sed 's/^X//' >star-1.5.2/READMEs/README.macosX-old-versions << 'END-of-star-1.5.2/READMEs/README.macosX-old-versions'
X*********************************************************************************
X*										*
X*			WARNING							*
X*										*
X*	This is only valid for OLD MacOS X versions				*
X*	This are versions _before_ MacOS X-10.1	(Darwin-1.4)			*
X*										*
X*										*
X*********************************************************************************
X
XIf uname -a does print something like:
X
XDarwin HOST 1.4 Darwin Kernel Version 1.4: Sun Sep  9 15:39:59 PDT 2001; root:xnu/xnu-201.obj~1/RELEASE_PPC  Power Macintosh powerpc
X
Xor a version > 1.4 then you should rather read  README.macosX
X
X/*--------------------------------------------------------------------------*/
X
XUnfortunately, Apple does not deliver a consistent Mac OS-X system
XThe longer they work on it, the more bugs they introduce...
X
XIn addition, there is no visible 'clean' road of development.
XRelease names (from 'uname') are confusing and don't help to find out what
Xrelease they refer to.
X
X/*--------------------------------------------------------------------------*/
X	The next hint is for Mac OS X versions up to January 2000 only:
X
XThe file <bsd/dev/scsireg.h> tries to include <kern/queue.h> which cannot
Xbe found.
X
XTo be able to compile, I suggest to create a symlink:
X
XSystem/Library/Frameworks/System.framework/Versions/B/Headers/kern -> kernserv
X
XTo do this, chdir to:
X
XSystem/Library/Frameworks/System.framework/Versions/B/Headers/
X
Xand call 
X
Xln -s kernserv kern
X
Xas root.
X/*--------------------------------------------------------------------------*/
X
X
X/*--------------------------------------------------------------------------*/
X	This hint is for Mac OS X version starting ~ April 2000:
X
XApple did remove the generic SCSI transport driver for unknown reasons!
XCdrtools compile, but as there is no SCSI transport, you may only write
XCD's connected to other systems using the REMOTE SCSI protocol.
X/*--------------------------------------------------------------------------*/
X
X/*--------------------------------------------------------------------------*/
X	This hint is for Mac OS X versions starting around March 2001:
X
XIf your compile log looks like this:
X
X         ==> MAKING "all" ON SUBCOMPONENT ".../libschily.mk"
X         ==> COMPILING "OBJ/powerpc-darwin-cc/cmpbytes.o"
Xcmpbytes.c: In function `cmpbytes':
Xcmpbytes.c:49: invalid operands to binary |
Xmake[1]: *** [OBJ/powerpc-darwin-cc/cmpbytes.o] Error 1
Xmake: *** [all] Error 2
X
XYou are hit by the Apple developers. Some time ago they started to introduce
Xa file <inttypes.h> which uses types defines in <sys/types.h>
XWhile the buggy types are ignored in <sys/types.h> they are used if found
Xin <inttypes.h>.
X
XAs a workaround, you may edit  
X
X	incs/power-macintosh-darwin-cc/xconfig.h
X
Xafter it has been created by autoconf and make the lint containing
XHAME_INTTYPES_H this way:
X
X/* #undef HAVE_INTTYPES_H */    /* to use UNIX-98 inttypes.h */ 
X
XThis will tell the autoconf using code to ignore the system supplied
X<inttypes.h> and use the internal version.
X
XIMPORTANT: Don't forget to tell the Apple support that MacOSX sucks until they
Xfix such fundamental bugs in the system include files!
X
XIn case you are interested in the full details: the reason why cdrecord
Xdoes not compile is that MacOS X defines a type
X
Xtypedef	int *		intptr_t;
Xtypedef	unsigned int *	uintptr_t;
X
Xinstead of the correct:
X
Xtypedef	long		intptr_t;
Xtypedef	unsigned long	intptr_t;
X
X... a result of either Apple developers being unwilling to read or unable to 
Xunderstand simple standards written in English :-(
X
XSee: http://www.opengroup.org/onlinepubs/7908799/xsh/inttypes.h.html
X
X/*--------------------------------------------------------------------------*/
END-of-star-1.5.2/READMEs/README.macosX-old-versions
echo x - star-1.5.2/READMEs/README.mingw32
sed 's/^X//' >star-1.5.2/READMEs/README.mingw32 << 'END-of-star-1.5.2/READMEs/README.mingw32'
X
XHow to compile:
X
X-	Download (http://www.mingw.org) and install the following Mingw32 packages:
X
X		MinGW-3.1.0-1.exe
X		MSYS-1.0.10.exe
X
X-	Set PATH environment variable using command:
X
X		set path=c:\msys\1.0\bin;c:\mingw\bin;%path%
X
X-	enter 'make' command in top level directory of the unpacked project
END-of-star-1.5.2/READMEs/README.mingw32
echo x - star-1.5.2/READMEs/README.msdos
sed 's/^X//' >star-1.5.2/READMEs/README.msdos << 'END-of-star-1.5.2/READMEs/README.msdos'
X# @(#)README.msdos	1.2 04/06/07 J. Schilling
X
XYou cannot compile this program on DOS directly, you need a win32 environment.
XSee below for more information. You need DJGPP for a compilation.
X
XThe DOS/DJGPP have been made with help from 
X		Alex Kopylov <reanimatolog@yandex.ru>
X
XYou may like to check his Web Page: http://bootcd.narod.ru/index_e.htm too.
X
XCompilation under DJGPP is fully integrated into the Schily Makefile System,
Xhowever you need to use 'smake' (version 1.2a20 or newer). It seems that
XGNU make and other make programs don't work.
X
XAs the file names of a typical UNIX project don't fit into the DOS 8.3 naming
Xscheme, you must have long names support, i.e. you must use a Windows DOS-box
Xinstead pure DOS
X
XTo compile under DJGPP:
X
X-	Unpack the following DJGPP packages into c:\djgpp directory:
X
X	ftp://ftp.delorie.com/pub/djgpp/current/v2/beta/djdev204.zip
X	ftp://ftp.delorie.com/pub/djgpp/alpha/v2gnu/bsh205bb.zip
X	ftp://ftp.delorie.com/pub/djgpp/alpha/v2gnu/gcc340b.zip
X	ftp://ftp.delorie.com/pub/djgpp/alpha/v2gnu/gpp340b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/bnu214b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/dif28b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/fil41b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/grep251b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/gwk311b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/gzip135b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/mak380b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/pat253b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/sed407b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/shl2011b.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/tar112ab.zip
X	ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/txt20b.zip
X
XNote that these are the best files on 21.05.2004, things may change in future.
X
X-	Set environment variables using commands:
X
X		set path=c:\djgpp\bin;%path%
X		set djgpp=c:\djgpp\djgpp.env
X
X	If you are using an smake version before 1.2a23, you also need:
X
X		set djgpp_sh=c:\djgpp\bin\sh.exe
X
X
X-	Unpack the source archive using command:
X
X		tar -xpz < package-name.tar.gz
X
X	If you like to use star, you need star-1.5a36 or newer.
X	Use a command line like:
X
X		star -xpz < package-name.tar.gz
X
X-	Enter 'smake' command in top level directory of the unpacked project
X	(to make 'smake' itself, use a command 'dos_make' instead).
X
X	Note that in case you don't have a 'smake' binary for DOS, you need to
X	compile one before or fetch a binary from:
X
X		 http://bootcd.narod.ru/index_e.htm
X
XIn order to run commands on MS-DOS that use SCSI commands, you must have an
XASPI manager installed in your config.sys. For example:
X
X	SCSI devices: 
X
X		device = aspi2dos.sys (not tested!)
X		device = aspi4dos.sys (not tested!)
X		device = aspi8dos.sys
X		device = aspi8u2.sys (not tested!)
X
X	ATAPI devices:
X
X		device = oakaspi.sys
X
X	USB devices:
X
X		device = usbaspi.sys (not tested!)
X
XThe ASPI managers may be fetched from:
X
X		http://bootcd.narod.ru/index_e.htm
END-of-star-1.5.2/READMEs/README.msdos
echo x - star-1.5.2/READMEs/README.ppc
sed 's/^X//' >star-1.5.2/READMEs/README.ppc << 'END-of-star-1.5.2/READMEs/README.ppc'
XIf your system uses the SVr4 ABI (designed by Motorola), you will only
Xbe able to compile my library files lib/format.c and lib/getargs.c if your
XC-compiler supports the macro va_copy() or __va_copy() from stdarg.h.
X
XMach/Next STep/Apple Rhapsody on ppc use a 'void *' for the type va_list
Xso you don't need to make changes on these systems.
X
XSolaris/ppc (made in 1992) is the first UNIX implementation for the PPC.
XIt includes the va_copy() macro that allows you to assign a C object of the
Xtype va_list in a system independent way.
X
XLinux/ppc uses exactly the same construct as Solaris for the type va_list.
XYou will only be able to compile lib/format.c and lib/getargs.c if your 
XC-compiler includes the macro va_copy() or __va_copy(). If this is not the
Xcase, you will need to upgrade your C-compiler first. GCC 2.8.0 and later
Xincludes this macro.
X
XHere is what Solaris /usr/include/sys/varargs.h looks like:
X
X/*
X * va_copy is a Solaris extension to provide a portable way to perform
X * a variable argument list ``bookmarking'' function.
X */
X#if defined(__ppc)
X#define	va_copy(to, from)	((to)[0] = (from)[0])
X#else
X#define	va_copy(to, from)	((to) = (from))
X#endif
X
XTo be able to compile my lib/format.c and lib/getargs.c on a OS
Ximplementation that uses an array for va_list, you will need
Xthis va_copy() enhancement too.
X
XThe files mentioned above already compile on a PPC Apple Rhapsody system.
XBut as mentioned before, Rhapsody uses a void * for va_list (maybe because
XApple includes badly designed international printf code from BSD 4.4
Xthat requires va_list to be void * to work).
X
XNotice:	lib/format.c allows a %r format that needs additional features
X	in stdarg.h. You need to know whether va_list is an array.
X	I hope that GCC will include some definitions in future versions
X	that allow to propagate va_list type objects from var args
X	in function calls.
X
XGCC
X===
X
XIf you are not using GCC 2.8.0, you can add the following definition 
Xto va-ppc.h :
X
X/usr/lib/gcc-lib/*-linux-gnulibc1/2.*/include/va-ppc.h
X
X#define	va_copy(to, from)	((to)[0] = (from)[0])
X
Xand to all other va-*.h files:
X
X#define	va_copy(to, from)	((to) = (from))
X
XImportant: Check before if you don't have a GCC that is already patched.
X
XJoerg
X
END-of-star-1.5.2/READMEs/README.ppc
echo x - star-1.5.2/READMEs/README.solaris
sed 's/^X//' >star-1.5.2/READMEs/README.solaris << 'END-of-star-1.5.2/READMEs/README.solaris'
XNever compile anything in a locale other than "C" unless you are sure
Xthat your C-compiler and the program 'nm' has been patched.
XThis is not needed with Solaris 2.6 or later and with the Workshop 5.0
Xcompiler or later.
X
XEven if you are a recent Solaris version, use locale "C" in case of problems.
X
XTo ensure that locale "C"' is set, do
X
Xsetenv LC_ALL C
X
Xin csh
Xor
X
XLC_ALL=C
Xexport LC_ALL
Xin sh
X
Xbefore running make. Or simply call
X
Xenv LC_ALL=C make
X
XThe reason:
X
X1)	On Solaris before 2.5.1 'nm' dumps core in any other locale.
X	For that reason lorder will not work.
X	*** no patch available **** but fixed on Solaris 2.5.1
X	according to Sun
X
X2)	The SunPro C-compiler will not convert floating
X	point numbers correctly if e.g. in "de" locale (Germany)
X	1.3 will be interpreted as 1.0!!!!
X	*** patch available ***
X
X3)	/usr/xpg4/bin/tr does not work correctly if locale is not "C"
X	Try:
X		echo ABC | env LC_ALL=de /usr/xpg4/bin/tr 'A-Z' 'a-z'
X
X	it prints:
X
X	BCD
X
X
X
XIf you want to do compilations on Solaris, it is best not have /usr/ucb
Xin your PATH. If you want to have /usr/ucb in the PATH it must be the last
Xentry. You also should put /usr/ccs/bin/ before /usr/xpg4/bin/ in the PATH
Xto make sure that /usr/ccs/bin/make is used and not /usr/xpg4/bin/make.
X
XTo be able to use 'make' 'as' and 'ld' you need to make sure that 
X/usr/ccs/bin is in your path.
X
XAvoid /usr/ucb and /usr/xpg4/bin in your PATH if you have problems.
X
XMake sure - even if you use GCC - you don't use GNU as, GNU ld 
Xand GNU tsort/lorder.
X
XFor CD-Recording please read the README.volmgt too.
X
XOn Solaris you need to stop the volume management if you like to use the USCSI
Xfallback SCSI transport code. Even things like cdrecord -scanbus
Xwill not work if the volume management is running.
X
XIf you run Solaris 7 FCS, install patch 107465-02 to fix a read ahead bug in the
Xhsfs code.
X
XIf you have problems with 12 byte SCSI commands on Solaris (mainly x86) get
XPatch 108779-01
X
XIf you have problems with ISO-9660 partitions > 4 GB  where Solaris wraps to
Xoffset mod 4 GB when reading from the FS install patch 113277-04.
X
X
X		IMPORTANT information for Solaris x86
X
XIf have no DMA, you will get problems with buffer underruns and may never use
Xthe maximum write speed of current CD/DVD drives.
X
XFor more information, read README.solaris-x86-ata-DMA and README.solaris-x86-ATAPI-DMA
Xand take care that the locations for patching may change in future versions.
X
X
END-of-star-1.5.2/READMEs/README.solaris
echo x - star-1.5.2/READMEs/README.win32
sed 's/^X//' >star-1.5.2/READMEs/README.win32 << 'END-of-star-1.5.2/READMEs/README.win32'
X# @(#)README.win32	1.7 02/12/16 Copyright 2000 J. Schilling
X
Xcdrecord-1.8a22 or later can be compiled on Win9X/NT4 using Cygnus' cygwin
Xwhich is freely available from:
X
X	http://sourceware.cygnus.com/cygwin/
Xor
X	http://sources.redhat.com/cygwin/
X
XTo compile on Cygwin, get Cygwin by executing setup.exe
X
XYou will need approx. 120 MB to install a full cygwin developer release.
X
XGet the tar'ed cdrtools source and unpack it with 'gnutar' or 'star',
X
Xe.g. Start a bash command line window and type:
X
X	star -xpz < cdrtools-1.10.tar.gz
X
X	don't use winzip to unpack the tar archive, it will not
X	unpack symlinks correctly.
X
XThen (from the bash command line window) run 'make' ... 
X
XIf you have problems with GNU make, get 'smake' from:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X/*--------------------------------------------------------------------------*/
XA bash window is available from the START -> Programs -> Cygnus Solutions
Xmenu or by clicking at the Cygwin Logo on the desktop.
X/*--------------------------------------------------------------------------*/
XPre-compiled current 'cdrtools' Win32 binaries which should run on
XW95, W98 and WNT are available from:
X
X	ftp://ftp.berlios.de/pub/cdrecord/alpha/win32
X
XTo use the pre-compiled binary, put the files cygwin1.dll, mount.exe as well
Xas the files:
X
Xcdrecord.exe		- The CD recording program
Xcdda2wav.exe		- The DAE (Digital Audio Extraction) program
Xmkisofs.exe		- The ISO-9660/Rock Ridge/Joliet Filesystem formatter
Xreadcd.exe		- A simple program to extract CD-ROM raw data to a file
X
Xin your WINDOWS binary directory and from a Command/MS-DOS (or bash) window
Xtype:
X	cdrecord -help
X
Xfor usage, see also:
X
Xhttp://www.fokus.fhg.de/research/cc/glone/employees/joerg.schilling/private/man/cdrecord.html
X
XAll programs in this directory are Unix command line utilities and know
Xnothing about DOS/WIN. They run in a POSIX subsystem that is supplied by
Xcygwin1.dll. Therefore all directory names are given in Unix (POSIX) format 
X(i.e. use '/' for a directory separator, not '\'). To access files on another 
Xdisks (i.e. floppy, CDROM and network disk), you need to use the supplied "mount"
Xcommand e.g.
X
X	mount a: /a
X	mount d: /cdrom
X
Xi.e. files on the floppy disk are accessed as being in directory /a and
Xfiles on the CDROM are accessed as /cdrom (assuming your CDROM is drive d:)
X
XYu may also use the new /cygpath notation by typing /cygpath/a for
Xyour local floppy.
X
XThe notation //a/dir as a replacement for the DOS directory name a:\dir
Xmay not work in future releases of Cygwin.
X
XThe following command creates a CD image in the current directory
Xusing a source directories on the CDROM drive, a sub-directory and the
Xfloppy drive:
X
X	mkisofs -o hsfs.iso -J -R /cdrom/subdir dir1 /a 
X
XIf you use the options noted above, the hsfs.iso image is ISO-9660 
Xcompliant and includes both Rock Ridge (IEEE P1282) and 
XJoliet (Microsoft proprietary) extensions.
X
XIf your CD writer is on target 6, type 
X
X	cdrecord dev=6,0 -v speed=4 hsfs.iso
X
Xto write the image at speed 4 in TAO mode, or
X
X	cdrecord dev=6,0 -v speed=4 -dao hsfs.iso
X
Xto write the image in DAO mode.
X
XIf you don't like to create the image file 'hsfs.iso' you may use a PIPE
Xto connect mkisofs's output to cdrecord's input by calling:
X
X	mkisofs -J -R /cdrom/subdir dir1 /a | cdrecord dev=6,0 -v speed=4 -
X
XIMPORTANT NOTE:	If you use PIPE's on Win32, you definitely need a POSIX
X		compliant shell to start the programs. Native Win32 PIPE's
X		are not POSIX compliant and will not work with POSIX compliant
X		programs.
X
X/*--------------------------------------------------------------------------*/
XIf you don't know which target your CD-writer is, call
X
X	cdrecord -scanbus
X
XThis gives output similar to:
X
XCdrecord-ProDVD sparc-sun-solaris2.4 release 1.8a39 Copyright (C) 1995-2000 Jörg Schilling
XUsing libscg version 'schily-0.1'
Xscsibus0:
X	0,0,0	  0) 'Quantum ' 'XP34300         ' 'F76D' Disk
X	0,1,0	  1) 'SEAGATE ' 'ST11200N        ' '8334' Disk
X	0,2,0	  2) *
X	0,3,0	  3) 'TOSHIBA ' 'MK537FB/        ' '6258' Disk
X	0,4,0	  4) 'WANGTEK ' '5150ES SCSI-36  ' 'ESB6' Removable Tape
X	0,5,0	  5) 'EXABYTE ' 'EXB-8500-85QUE  ' '0428' Removable Tape
X	0,6,0	  6) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
X	0,7,0	  7) HOST ADAPTOR
Xscsibus1:
X	1,0,0	100) 'IBM     ' 'DCAS-34330      ' 'S65A' Disk
X	1,1,0	101) *
X	1,2,0	102) *
X	1,3,0	103) *
X	1,4,0	104) 'PLEXTOR ' 'CD-R   PX-W8220T' '1.00' Removable CD-ROM
X	1,5,0	105) 'YAMAHA  ' 'CRW4416S        ' '1.0f' Removable CD-ROM
X	1,6,0	106) *
X	1,7,0	107) HOST ADAPTOR
X
XThe numbers on the labels are SCSIbus# * 100 + target#
X
XYou then call cdrecord dev=bus#,target#,0
X
XIf you e.g. like to talk to the Yamaha drive from the list above, you need to
Xcall:
X
X	cdrecord dev=1,5,0 ......
X
X/*--------------------------------------------------------------------------*/
X
X			NOTE
X
XIf "cdrecord -scanbus" dumps core (dies from program fault), you have 
Xa broken ASPI driver on your PC. 
X
XIf you cannot see your drive(s), the following registry changes should make
Xthem visible:
X
X  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Aspi32]
X  "ErrorControl"=dword:00000001
X  "Start"=dword:00000001
X  "Type"=dword:00000001
X
X  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Aspi32\Parameters]
X  "ExcludeMiniports"=""
X
X
XIf you like to use the tools with SCSI or ATAPI, you need a working 
XASPI32 driver and dll on your system. If you don't have it already, 
Xlook for 'aspi_me'. You need to set you clock back to a time before 
XJan 1st 1999 to be able to install it. Note that 'aspi_me' contains 
Xoriginal Adaptec drivers and is banned from most ftp servers for this 
Xreason. 
X
XYou need a special ASPI driver version on NT-5.0 (Win2000)
X
X************************************ Seems to be dead
XYou may get one by downloading
X
X	http://www.poikosoft.com/writer/download.html
X
Xand unpacking the file mightywriter121.exe using unzip.
Xafter you renamed ntaspi32.dll to wnaspi32.dll, cdrecord should work.
X************************************ Seems to be dead
X
XBut here is a new source for ASPI drivers:
X
Xhttp://www.fortunecity.com/skyscraper/solo/719/aspi_drivers.htm
X
X
X			IMPORTANT
X
XIn order to avoid damaging CD blanks because Win is trying to access
Xthe drive while cdrecord writes to it, you definitely should edit
Xyour registry and set the value of
X
XHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom\Autorun
X
Xto '0'.
X
XThe Registry entry noted above is valid for WNT, I don't know
Xif you need to do this for W95 or W98, nor do I know the
Xcorrect Registry entry for these systems.
X
X/*--------------------------------------------------------------------------*/
X
X		For binary only users:
X
XError messages and help output is directed to stderr. Win32 command
Xinterpreters don't know about stderr. I recommend to install bash.exe
Xbecause it is a POSIX compliant shell and allow working PIPE's and
Xit also gives you a command line history that may be edited using
Xcursor commands.
X
XOtherwise you may want to install the Cygwin light version which
Xonly includes the user commands.
END-of-star-1.5.2/READMEs/README.win32
echo x - star-1.5.2/READMEs/README.sunos
sed 's/^X//' >star-1.5.2/READMEs/README.sunos << 'END-of-star-1.5.2/READMEs/README.sunos'
XIt seems that at there is a structure alignment problem
Xwith the structure scsi_cmd at least with gcc.
X
XIf you get a message: 'XXX
X
XIf you want to run cdrecord on SunOS 4.x on a sparc system
Xplease make sure that you are using the old Sun cc
Xby typing:
X
X	make CCOM=cc
X
END-of-star-1.5.2/READMEs/README.sunos
echo x - star-1.5.2/READMEs/README.install
sed 's/^X//' >star-1.5.2/READMEs/README.install << 'END-of-star-1.5.2/READMEs/README.install'
XTo install makefiles, just take the tar archive makefiles.tar
Xand untar it on the source root of your new project.
X
XThe tar file contains:
X
X-	the RULES directory with the main make rules
X-	two different DEFAULT directories with predefined project settings
X-	a directory containing templates for all purpose
X-	a skeleton directory structure for the new project
X-	some README files that will be useful for developers and users
X
XIf you want to see a better example, please have a look at the "star"
Xsource. It may be found on:
X
Xftp://ftp.berlios.de/pub/star
X
XHave a look at the manual page, it is included in the distribution.
XInstall the manual page with 
X
Xmake install first and include /opt/schily/man in your MANPATH
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhofer.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/READMEs/README.install
echo x - star-1.5.2/TODO
sed 's/^X//' >star-1.5.2/TODO << 'END-of-star-1.5.2/TODO'
XNOTE: Before blaming star for something found in this list, look at your favorite
X	tar implementation for the presence of similar bugs/missing features.
X
X
X-	Need a way to handle backups that include /export/home & /home: Missing links
X	message because loopback filesystem gives more hardlinks than really present.
X
X-	Linkcount below zero with the command: star -c /usr/bin /usr/bin
X
X-	Add Option to both (verbose print & errors) appear on stderr.
X
X-	malloc path buffers and 'chdir' to be able to deal with pathnames > 1024 bytes.
X
X-	add an option to reduce primary file name length to 99 chars
X	for all formats to enhance the portability of the archives.
X
X-	union member .dbuf is still star_header!!!
X
X-	If -p flag is ommited, files are handled different from old tar. 
X	Star always does does a chmod on non directories.
X	Tar uses creat(file, st_mode & 0x07777)
X
X-	AIX uses tape.h ??? for mt ioctl's
X
END-of-star-1.5.2/TODO
echo x - star-1.5.2/Gmake
sed 's/^X//' >star-1.5.2/Gmake << 'END-of-star-1.5.2/Gmake'
X#!/bin/sh
XMAKEPROG=gmake
Xexport MAKEPROG
Xexec gmake "$@"
END-of-star-1.5.2/Gmake
echo x - star-1.5.2/Gmake.linux
sed 's/^X//' >star-1.5.2/Gmake.linux << 'END-of-star-1.5.2/Gmake.linux'
X#!/bin/sh
X
XMAKEPROG=gmake
Xexport MAKEPROG
X
X# gmake is called 'make' on Linux
X
Xexec make "$@"
END-of-star-1.5.2/Gmake.linux
echo x - star-1.5.2/COPYING
sed 's/^X//' >star-1.5.2/COPYING << 'END-of-star-1.5.2/COPYING'
XThe software in this directory tree is free software and uses
Xlicenses that are aproved be the OpenSource Initative
X
X	http://www.opensource.org/
X
XNot all sub-projects use the same license. Here is a list of
Xsub-directories and it's related licenses:
X
Xconf/
X	Files from the Schily Autoconf system (GPL)
X	Support shell scripts for the Schily Makefile system (CDDL)
XDEFAULTS/
X	Default files for the Schily Makefile system (CDDL)
XDEFAULTS_ENG/
X	Default files for the Schily Makefile system (CDDL)
Xinc/
X	Support C-Files for the Schily Makefile system (CDDL)
Xinclude/
X	Support H-Files for the Schily Makefile system (CDDL)
XRULES/
X	The main part of the Schily Makefilesystem (CDDL)
XTARGETS/
X	Slot support for the Schily Makefile system (CDDL)
XTEMPLATES/
X	Template support for the Schily Makefile system (CDDL)
X
X
XFor more information on the CDDL read the file	CDDL.Schily.txt
XFor more information on the GPL read the file	GPL-2.0.txt
XFor more information on the LGPL read the file	LGPL-2.1.txt
END-of-star-1.5.2/COPYING
echo x - star-1.5.2/README.compile
sed 's/^X//' >star-1.5.2/README.compile << 'END-of-star-1.5.2/README.compile'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X	The location for the root specific configuratin files is controlled
X	via the INS_RBASE= make macro. The default vaulue for this macro is "/".
X	If you like to install global default configuration files into 
X	/usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local
X
X	Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into.
X	If you like to like to modify the compiled-in path values, call:
X
X		smake clean
X		smake INS_BASE=/usr/local INS_RBASE=/usr/local
X
XCompiling in a different ELF RUNPATH:
X
X	In order to allow binaries to work correctly even if the shared
X	libraries are not in the default search path of the runtime linker,
X	a RUINPATH needs to be set.
X
X	The ELF RUNPATH is by default derived from $(INS_BASE). If you like to
X	set INS_BASE=/usr and create binaries that do not include a RUNPATH at all,
X	call:
X
X		smake relink RUNPATH=
X
X
XUsing a different man path prefix:
X
X	Man Pages are by default installed under:
X
X	$(INS_BASE)/$(MANBASE)/man
X	and MANBASE=share
X
X	If you like a different prefix for man pages, call:
X
X		smake DEFMANBASE=soething install
X
X	to install man pages into $(INS_BASE)/something/man/*
X
X	If you like to install man pages under $(INS_BASE)/man/*, call
X
X		smake DEFMANBASE=. install
X
XInstalling stripped binaries:
X
X	If you like to install stripped binaries via "smake install", call:
X
X		smake STRIPFLAGS=-s install
X
X	This calls "strip" on every final install path for all executable
X	binaries.
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will compile in "/usr/local" as prefix into all related binaries
X	and then create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
X	Note that you need to call "smake clean" before in case that the code
X	was previously compiled with different defaults.
X
XSetting different default directory permissions for install directories:
X
X	All directories that are created by the Schily makefile system in the
X	target directory path when
X
X		smake install
X
X	is called system use a special default 022 that is in DEFINSUMASK=
X	This causes all directories in the target install path to be created
X	with 0755 permissions.
X
X	All other directories that are created by the Schily makefile system 
X	use a single global default 002 that is in DEFUMASK=
X
X	If you like to create install directories with e.g. 0775 permissions,
X	call:
X
X		smake DEFINSUMASK=002 install
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X	If your debugger does not like optimized binaries, call something
X	like:
X
X		 make "COPTX=-g -xO0" LDOPTX=-g
X	or
X		 make "COPTX=-g -O0" LDOPTX=-g
X
X	depending on the option system of your C-compiler
X
X
XCompiling the project to allow performance monitoring with gprof from BSD:
X
X	If you like to compile for performance monitoriing with gprof,
X	call:
X
X		make clean
X		make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled
X
X	or
X		make COPTX=-pg LDOPTX=-pg LINKMODE=profiled
X
X	depending on the option system of your C-compiler
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XCompiling in a cross compilation environment:
X
X	The Schily autoconf system has been enhanced to support cross
X	compilation. Schily autoconf is based on GNU autoconf-2.13 and
X	GNU autoconf does not support cross compilation because it needs
X	to run scripts on the target system for some of the tests.
X
X	The "configure" script that is delivered with the Schily makefile
X	system runs more than 770 tests and aprox 70 of them need to be 
X	run on the target system.
X
X	The Schily autoconf system now supports a method to run these ~70
X	tests natively on a target system. You either need a machine with
X	remote login features or you need an emulator with a method to
X	copy files into the emulated system and to run binaries on the
X	emulated system as e.g. the Android emulator.
X
X	We currently deliver three scripts for "remote" execution of
X	programs on the target system:
X
X	runrmt_ssh		runs the commands remove via ssh
X	runrmt_rsh		runs the commands remove via rsh
X	runrmt_android		runs the commands remove via the debug bridge
X
X	If you need to remotely run programs on a system that is not
X	supported by one of there three scripts, you need to modify one
X	of them to match your needs.
X
X	To enable Cross Compilation use the following environment variables:
X
X	CONFIG_RMTCALL=		Set up to point to a script that does
X				the remote execution, e.g.:
X
X				CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh
X
X	CONFIG_RMTHOST=		Set up to point to your remote host, e.g.:
X
X				CONFIG_RMTHOST=hostname 
X				or
X				CONFIG_RMTHOST=user@hostname
X
X				use a dummy if you like to use something
X				like to the Android emulator.
X
X	CONFIG_RMTDEBUG=	Set to something non-null in order to 
X				let the remote execution script mark
X				remote comands. This will result in
X				configure messages like:
X
X				checking bits in minor device number... REMOTE 8
X
X				If you cannot run commands on the target
X				platform, you may set:
X
X				CONFIG_RMTDEBUG=true
X				CONFIG_RMTCALL=:
X
X				carefully watch for the "REMOTE" flagged test
X				output and later manually edit the file:
X
X				incs/<arch-dir>/xconfig.h
X
X				Do not forget to manually edit the files:
X
X				incs/<arch-dir>/align.h
X				and
X				incs/<arch-dir>/avoffset.h
X
X	Note that smake includes automake features that automatically
X	retrieve system ID information. For this reason, you need to overwrite 
X	related macros from the command line if you like to do a
X	cross compilation.
X
X	Related make macros:
X
X	K_ARCH=			# (sun4v) Kernel ARCH filled from uname -m / arch -k
X	M_ARCH=			# (sun4)  Machine filled from arch
X	P_ARCH=			# (sparc) CPU ARCH filled from uname -p / mach
X	OSNAME=			# sunos, linux, ....
X	OSREL=			# 5.11
X	OSVERSION=		# snv_130
X	CCOM=			# generic compiler name (e.g. "gcc")
X	CC_COM=			# compiler to call (name + basic args)
X
X	ARCH=			overwrites M_ARCH and P_ARCH
X
X	It is usually suffucient to set ARCH and OSNAME.
X
X	In order to use a cross compiler environment instead of a native compiler,
X	set the make macro CC_COM to something different than "cc".
X
X	If you are on Linux and like to compile for Android, do the following:
X
X	1) 	set up CC acording to the instructions from the cross compiler
X		tool chain
X
X	2)	set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.:
X		setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android
X		setenv CONFIG_RMTHOST NONE
X
X	3)	call smake:
X
X		smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC"
X	
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/README.compile
echo x - star-1.5.2/Changelog
sed 's/^X//' >star-1.5.2/Changelog << 'END-of-star-1.5.2/Changelog'
X*************** Release 1.5 *******************
X
XSun Apr 13 16:01:29 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.316
X	  Version -> 1.5
X
XSun Apr  6 20:28:14 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.76
X	* header.c 1.135
X	  uid_nobody() -> ic_uid_nobody()
X
XSun Apr  6 18:32:15 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.8
X	* star_sym.c 1.6
X	* restore.c 1.59
X	* list.c 1.70
X	* star.c 1.315
X	* starsubs.h 1.108
X	* xheader.c 1.75
X	* header.c 1.134
X	* extract.c 1.131
X	* create.c 1.125
X	* acl_unix.c 1.37
X	* diff.c 1.82
X	  Vollstaendige Trennung star/libfind
X
XWed Mar 19 20:09:22 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.36
X	  opt_acl() auch ohne USE_ACL sicherstellen
X
XWed Mar 19 20:00:22 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.31
X	* create.c 1.124
X	  Copyright -> 2008
X
XWed Mar 19 19:58:22 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.123
X	  Fuer inkrementelle Dumps nun info->f_mtime >= Newer.tv_sec statt info->f_mtime > Newer.tv_sec
X
XWed Mar 19 19:57:22 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.314
X	  Version -> 1.5a89
X
XTue Mar 18 20:36:34 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.58
X	  Coredump im Debugmodus vermeiden wenn Level 0 Dump eingespielt wird und ogp == NULL
X
XSun Mar 16 22:37:49 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.30
X	  --sattr neu
X	  suntar -E -p -> star H=exustar -acl
X
XSun Mar 16 16:45:02 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.130
X	  Copyright -> 2008
X
XSun Mar 16 16:40:40 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.107
X	* star.c 1.313
X	* buffer.c 1.146
X	* fflags.c 1.21
X	* acl_unix.c 1.35
X	* xattr.c 1.10
X	  Kompilationsoptionen bet star -version mit ausgeben mit neuen opt_*() Funktionen
X
XFri Mar 14 00:35:55 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.74
X	* star.h 1.117
X	  Copyright -> 2008
X
XFri Mar 14 00:33:43 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.116
X	* xheader.c 1.73
X	  SCHILY.acl.type neu als Vorsorge fuer VFSv4 ACLs
X
XTue Mar  4 00:03:12 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.312
X	  Version -> 1.5a88
X
XSun Feb 17 14:32:17 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.14
X	* diff.c 1.81
X	* star.c 1.311
X	  diffopts=symperm neu
X
XSat Feb 16 16:50:17 2008 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.129
X	  K&R mag nicht ein Label _und_ eine Funktion setmodes
X
XThu Dec 27 17:39:41 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.92
X	  samefile() nun sicher gegen NULL Pointer
X
XTue Dec 11 18:11:17 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.91
X	* starsubs.h 1.106
X	* buffer.c 1.145
X	  samefile() und Verhindern dass star -cv f=/dev/stdout > file ein defektes Archiv liefert
X
XMon Nov 26 23:22:16 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.144
X	  gettimeofday(&starttime) nur einmal und nicht bei jedem Oeffnen eines neuen Archivs
X
XSun Nov 11 22:56:12 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.143
X	  besserer Kommentar fuer startvol()
X
XThu Nov  8 18:01:12 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.31
X	  "Blocksize   %d\n" -> "Blocksize   %d records\n"
X
XSun Oct 28 22:17:46 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.18
X	  Cstyle
X
XSun Oct 28 22:16:34 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.310
X	  Version -> 1.5a87
X
XSun Oct 28 22:16:04 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.h 1.13
X	  Copyright -> 2007
X
XSun Oct 28 22:15:31 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.h 1.12
X	* star.c 1.309
X	* dumpdate.c 1.17
X	  Umbau damit /etc/dumpdates gelockt wird und kurz vor dem Schreiben am Ende noch mal neu gelesen wird
X
XFri Oct 26 01:27:20 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.308
X	  dumplevel= wird mit list= oder -find verboten
X
XFri Oct 26 01:12:20 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.133
X	  Neue Option -link-data
X	  F_DATA_SKIPPED neu
X	  info->f_llsize immer setzen
X
XFri Oct 26 01:10:55 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.128
X	  Neue Option -link-data
X	  F_DATA_SKIPPED neu
X
XFri Oct 26 01:07:58 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.23
X	  info->f_llsize immer setzen
X	  F_DATA_SKIPPED neu
X
XFri Oct 26 01:04:22 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.122
X	* star.c 1.307
X	  Neue Option -link-data
X
XThu Oct 25 23:43:03 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.115
X	  F_DATA_SKIPPED neu
X
XThu Oct 25 23:41:47 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.72
X	  info->f_llsize immer setzen
X
XThu Oct 25 23:32:53 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.23
X	* props.c 1.52
X	  PR_LINK_DATA neu
X
XSat Oct 20 20:38:06 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.142
X	  zbuf beseitigt, zur Kompressionsfeststellung wird nun bigbuf verwendet
X
XSat Oct 20 17:13:18 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.21
X	* fifo.c 1.67
X	  Copyright -> 2007
X
XSat Oct 20 17:12:52 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.30
X	  Copyroght -> 2007
X
XSat Oct 20 16:44:21 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.29
X	  --do-statistics neu in -help
X
XSat Oct 20 16:43:59 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.20
X	* pax.c 1.24
X	* suntar.c 1.28
X	  -no-statitstics wird Default, neue Option -do-statistics
X
XSat Oct 20 16:38:10 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.141
X	* fifo.h 1.29
X	* cpiohdr.c 1.22
X	* header.c 1.132
X	* cpio.c 1.22
X	  Neue Option -cpio-statistics, cpio gibt per Default eine Statistik aus die identisch zu cpio ist
X
XSat Oct 20 01:40:33 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.306
X	  Neue Optionen -xmeta und -cpio-statistics
X
XSat Oct 20 01:34:59 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.127
X	  Neue Option -xmeta
X
XFri Oct 19 01:16:56 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.140
X	  bigbuf ist nun Pagealigned
X
XFri Oct 19 01:16:27 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.66
X	  Umstellung auf getpagesize() aus libschily
X
XTue Oct  9 11:26:02 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.305
X	  Versin -> 1.5a86
X
XTue Oct  9 11:25:40 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.80
X	  "sparse" Vergleich nicht machen bei Hardlinks ohne Inhalt
X
XSat Oct  6 16:05:52 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_sym.c 1.5
X	  Versuch mit star_sym <restore-dir "."> <backup-dir> die Datenbank neu aufzubauen
X
XSat Oct  6 15:37:05 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.57
X	  #ifdef STAR_SYM beseitigt, stattdessen neue Variable is_star
X	  immer #define PRINT_L_SYM damit star_sym.c kein spezielles restore.o braucht
X	  Neue Funktion printLsym() fuer star_sym.c
X	  sym_dump() nun mit writeheader() Aufruf, damit star-symdump komplett ist
X
XSat Oct  6 15:23:12 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.105
X	  Mehr oeffentliche Symbole fuer restore.c wegen star_sym.c
X
XTue Sep 25 15:12:04 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.56
X	  Umstellung einiger Symbole auf EXPORT fuer star_sym.c
X
XSat Sep 22 17:03:47 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.18
X	* volhdr.c 1.30
X	* acl_unix.c 1.34
X	  Copyright -> 2007
X
XSat Sep 22 17:03:15 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.17
X	* extract.c 1.126
X	* fflags.c 1.20
X	* diff.c 1.79
X	* list.c 1.69
X	* acl_unix.c 1.33
X	  Cstyle
X
XSat Sep 22 16:45:08 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.55
X	  Unbenutzte printf() Parameter beseitigt
X
XSat Sep 22 16:44:32 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.125
X	* volhdr.c 1.29
X	  Unbenutzte Variablen beseitigt
X
XSat Sep 22 15:14:27 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.54
X	  sym_initmaps() neu, Codeumstellungen fuer star_sym
X
XThu Sep 13 01:12:29 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_sym.c 1.4
X	  Erweiterte Dummys fuer aktuelles star
X
XThu Sep 13 00:44:24 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.304
X	  Version -> 1.5a85
X
XThu Sep 13 00:43:39 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.124
X	* restore.c 1.53
X	  symlinks und special Files nicht loeschen und neu anlegen bei -restore damit das Datum der Directory darueber erhalten bleibt
X
XWed Sep 12 21:47:22 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.104
X	  same_symlink()/same_special() neu
X
XWed Sep 12 21:46:17 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.114
X	  Neues Flag F_SAME
X
XWed Sep 12 15:58:45 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.52
X	* star.h 1.113
X	* buffer.c 1.139
X	  star_symtable wird nun nicht mehr einfach ueberschrieben und evt. unvollständig bei Systemabsturz waehrend des Schreibens von star_symtable
X
XMon Sep  3 01:25:01 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.16
X	  errflags() versucht nicht mehr den String Paramerer zu modifizieren (GCC Core dump)
X
XWed Aug 22 14:52:41 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.303
X	  Version -> 1.5a84
X
XTue Aug 21 14:45:30 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.123
X	  has_dotdot() findet nun auch ".." bei OBJ//..//../star/
X
XMon Jul 16 10:43:14 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.302
X	  Verion -> 1.5a83
X
XSun Jul 15 20:38:52 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.301
X	* star.h 1.112
X	* create.c 1.121
X	* starsubs.h 1.103
X	  Neuer Parameter "forceadd" bei create()
X	  star ruft cdreate() im Dump-Modus nun so auf, dass die Directory von der Kommandozeile immer archiviert wird
X
XSun Jul 15 20:29:04 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.51
X	  unlink(sym_lock); bei mehr Fehlern
X
XSun Jul 15 17:49:23 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.120
X	  Auch Hardgelinkte Directories vor den Archivieren mit take_file() pruefen
X
XTue Jul 10 01:04:34 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.300
X	  Bei leeren inkrementellen Dumps wird nun zumindest "." geschrieben damit restore funktioniert
X
XTue Jul 10 01:03:52 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.50
X	  Ein fehlender Dumplevel kann nun mir -force-restore uebersprungen werden
X	  unlink(sym_lock) bei diversen Abbruechen um ein spaeteres Blockieren zu vermeiden
X
XSat Jul  7 13:18:00 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.102
X	  put_svolhdr() neu
X
XSat Jun 30 01:01:10 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.28
X	  mot dumplevel >= 0 immer einen Volheader schreiben auch bei leerem inkrementellem Dump
X
XSat Jun 30 01:01:10 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.299
X	  mit dumplevel >= 0 immer einen Volheader schreiben auch bei leerem inkrementellem Dump
X
XWed Jun 27 01:55:20 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.21
X	  Copyright -> 2007
X
XWed Jun 27 01:54:47 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.298
X	  Version -> 1.5a82
X
XWed Jun 27 01:54:13 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.20
X	  astoh_cpio() akzeptiert nun auch Hex Grossbuchstaben wegen GNU cpio
X
XSat Jun 16 17:55:58 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.90
X	* fflags.c 1.19
X	  Copyright -> 2007
X
XSat Jun 16 17:54:39 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.297
X	  Version -> 1.5a81
X
XFri Jun 15 18:49:43 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.18
X	  Umstellung auf HAVE_USABLE_LINUX_EXT2_FS_H & TRY_EXT2_FS
X
XFri Jun 15 18:44:54 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.89
X	  #include <ext2fs/ext2_fs.h> / #include <linux/ext2_fs.h> beseitigt
X
XTue Jun 12 02:50:21 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.138
X	  Wenn write() -1 liefert, nicht mehr -1 auf die Statistik addieren
X
XSun Jun  3 22:46:23 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.296
X	  Version -> 1.5a80
X
XSun Jun  3 18:06:51 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.122
X	* star.c 1.295
X	  -install neu
X
XSun Jun  3 17:57:09 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.21
X	  cpio nimmt nun star -install -force-remove -remove-recursive -no-fsync beim Extrahieren
X	  Neue Option -do-fsync
X
XTue May 29 23:13:08 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.111
X	  Umbau auf schily/param.h
X
XTue May 29 23:09:53 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.88
X	* starsubs.h 1.101
X	  sxsymlink() nun mit name Parameter damit star -install funktioniert
X
XMon May 28 23:45:50 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.121
X	  is_eexist() neu
X
XMon May 28 15:37:43 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.27
X	* star.c 1.294
X	* remove.c 1.52
X	  -keep-nonempty-dirs neu
X
XSun May 27 01:44:03 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.120
X	  Bei -force-remove link_file: from/to identical, skipping ... unterdruecken
X
XSun May 27 01:42:23 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.26
X	  Neue Option --do-fsync
X	  tar -x ist nicht star -xU sondern star -xU -force-remove -no-fsync
X
XSat May 26 16:08:21 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.19
X	  gnutar -X funktioniert nun
X
XSat May 26 16:04:04 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.293
X	* list.c 1.68
X	* create.c 1.119
X	* extract.c 1.119
X	* diff.c 1.78
X	  -X Option neu
X
XSat May 26 15:51:30 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.25
X	  tar -X funktioniert nun
X
XFri May 25 19:13:55 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.24
X	  -T Option (Trusted Solaris) neu in char *sun_copt
X
XFri May 25 18:59:32 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.100
X	* lhash.c 1.16
X	  hash_xbuild()/hash_xlookup() neu fuer eXclude Option
X
XFri May 25 18:47:39 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.17
X	* star_unix.c 1.87
X	  Include linux/types.h & linux/gfp.h nach Hinwweis von Michael Teichgräber <mt@wmipf.in-berlin.de>
X
XFri May 25 14:37:48 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.118
X	  Fehler beim Einschalten von O_DSYNC korrigiert, bislang wurde F_GETFD statt F_GETFL verwendet
X
XFri May 25 14:22:55 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.137
X	  Umbau auf schily/ioctl.h
X	  tarf = (FILE *)NULL auch mit "copyflag"
X	  file_raise(tarf, FALSE) nur wenn tarf != (FILE *)NULL
X
XThu May 24 14:38:06 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.86
X	* fflags.c 1.16
X	  Umstellung auf schily/ioctl.h
X
XThu May 10 23:34:40 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.23
X	* gnutar.c 1.18
X	* cpio.c 1.20
X	* pax.c 1.23
X	  xxx_setopts() neu um char *opts auf den wirklichen Opt String zu setzen damit getfiles() funktioniert
X
XWed May  9 02:13:31 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.22
X	  -T option neu
X	  artype=header Option neu
X	  -E aktiviert
X	  -n gibtnur noch eine Warnung
X
XSun May  6 23:38:10 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.21
X	  -P ist doch implementiert
X	  Warnung dass bei -k Dateien nicht geteilt werden
X
XWed Apr 25 12:43:11 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.292
X	  Version -> 1.5a79
X
XSun Apr 22 01:54:39 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.32
X	  Linux hat ab 3 ACL Entries default ACLs
X
XFri Apr 20 18:05:36 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.23
X	  Endlosrekursion in nameinit() verhundern in dem name_init = TRUE gesetzt wird
X
XSat Apr  7 01:15:32 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.291
X	  Version -> 1.5a78
X
XSat Apr  7 00:50:21 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.110
X	* starsubs.h 1.99
X	* xheader.c 1.71
X	* suntar.c 1.20
X	* pax.c 1.22
X	* findinfo.c 1.7
X	* header.c 1.131
X	* hole.c 1.53
X	* list.c 1.67
X	* dumpdate.c 1.16
X	* extract.c 1.117
X	* cpio.c 1.19
X	* diff.c 1.77
X	  Copyright -> 2007
X
XSat Apr  7 00:43:54 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.18
X	* pax.c 1.21
X	* star.h 1.109
X	* suntar.c 1.19
X	* header.c 1.130
X	* star.c 1.290
X	* buffer.c 1.136
X	  -7z (p7zip) Support neu
X
XWed Apr  4 02:53:58 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.17
X	* pax.c 1.20
X	* star.h 1.108
X	* suntar.c 1.18
X	* star.c 1.289
X	* header.c 1.129
X	* buffer.c 1.135
X	  Support fuer lzop Kompression neu
X
XWed Mar 28 16:53:37 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.6
X	* star.c 1.288
X	  find_node -> findn_t *
X
XSun Mar 11 13:51:13 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* bitstring.h 1.6
X	  Copyright -> 2007
X	  _SCHILY_H -> _SCHILY_SCHILY_H
X	  bit_ffcs()/bit_ffss() nun ohne sinnloses for (_byte;
X
XSun Mar 11 13:23:31 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.287
X	  Copyright -> 2007
X	  Version -> 1.5a77
X	  Unbenoetigter number() Prototyp beseitigt
X
XMon Feb 26 16:03:18 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.66
X	* diff.c 1.76
X	* extract.c 1.116
X	  #include <walk.h> -> #include "walk.h"
X
XMon Feb 26 16:02:50 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.286
X	  walkinitstate() neu
X	  walkflags |= WALK_NOEXIT neu
X
XThu Feb 22 21:23:27 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.285
X	  Umbau auf neue libfind
X
XSun Feb 18 15:09:42 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.52
X	  get_end_hole() muss TRUE liefern wenn wir genau am Ende der Sparseliste sind weil es dann ken Loch am Ende gibt
X
XSun Feb 18 15:08:39 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.115
X	  Kommentar fuer xt_file()
X
XSun Feb 18 14:26:56 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.98
X	* star.c 1.284
X	* xheader.c 1.70
X	* header.c 1.128
X	* names.c 1.22
X	  uid_nobody()/gid_nobody() sind nun nicht mehr Variablen sondern Funktionen
X	  nameinit() -> LOCAL und automatisch
X
XWed Feb 14 18:22:40 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.21
X	  Copyright -> 2007
X
XThu Feb  8 10:53:35 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.20
X	  "common" varaible -> "data" wegen Mac OS X Linker Problemen
X
XMon Feb  5 00:04:36 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.283
X	  getnum()/getllnum -> libschily
X
XTue Jan 16 23:23:53 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.15
X	  Bessere Fehlermeldungen
X
XTue Jan 16 23:21:02 2007 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.134
X	  comerrno(EX_BAD, "Cannot update compressed archives.\n"); beim Versuch star -u/-r auf komprimiertes Archiv
X
XSun Dec 17 20:55:27 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.19
X	  nameuid()/namegid() muessen #ifdef PROTOTYPES haben da uid_t/gid_t evt short sind
X
XSun Dec  3 22:17:25 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.127
X	  Wenn die Checksumme im Header 0 zu sein scheint, dann ist das kein gueltiger Headerblock
X	  Sing Checksummenberechnung erfolgt nun in signed long statt unsigned long
X
XMon Nov 20 14:31:29 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.282
X	  Version -> 1.5a76
X
XSun Nov 12 20:09:40 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.51
X	  Im Falle von bad_sparse_index() seterrno(EX_BAD), damit die "Error writing..." Meldung nicht einen alten errno zeigt
X
XSun Nov 12 01:07:28 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.31
X	  Wenn acl(info->f_name, GETACLCNT, 0, NULL) ENOSYS returniert, dann keine Fehlermeldung
X
XSun Nov 12 01:05:57 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.50
X	  Loecher am Ende eines Files die kleiner als 512 Bytes waren wurden nicht korrekt erkannt
X
XSat Nov 11 23:06:48 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.49
X	  get_sparse_func() prueft nun bei jedem Schleifendurchlauf ob fh->fh_spindex >= fh->fh_nsparse um ein defektes star Archiv zu erkennen
X
XSat Nov 11 21:45:47 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.133
X	  wenn readtape() eine geringere Blocksize als erwartet findet wird nun auch stats->nblocks korrigiert
X
XSun Nov  5 02:48:13 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.97
X	  mem.c beseitigt
X
XSat Nov  4 00:56:49 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* append.c 1.24
X	  Directories immer ohne Slash am Ende vergleichen.
X
XFri Nov  3 18:35:03 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.126
X	  info->f_namelen = info->f_lnamelen = 0; neu in tcb_to_info()
X
XWed Nov  1 01:15:09 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.10
X	  star x dir/ liefert nun nicht mehr pattern did not match
X
XTue Oct 31 18:34:50 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.12
X	  #include schily/schily.h neu
X
XTue Oct 31 18:06:24 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.14
X	* star_unix.c 1.85
X	* list.c 1.65
X	* acl_unix.c 1.30
X	* props.c 1.51
X	* remove.c 1.51
X	* buffer.c 1.132
X	* acltext.c 1.11
X	* names.c 1.18
X	* cpiohdr.c 1.19
X	* fflags.c 1.15
X	* xheader.c 1.69
X	* chdir.c 1.3
X	* longnames.c 1.48
X	* checkerr.c 1.15
X	* append.c 1.23
X	* lhash.c 1.15
X	* tartest.c 1.12
X	* defaults.c 1.10
X	* dirtime.c 1.24
X	* device.c 1.13
X	* volhdr.c 1.27
X	* unicode.c 1.8
X	* movearch.c 1.31
X	* subst.c 1.9
X	* match.c 1.9
X	* table.c 1.24
X	* xtab.h 1.4
X	* star.h 1.107
X	* dumpdate.h 1.11
X	* props.h 1.22
X	* starsubs.h 1.96
X	  Copyright -> 2006
X
XMon Oct 30 20:08:41 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_sym.c 1.3
X	  Includefiles -> include/schily/*
X	  Copyright -> 2006
X
XSun Oct 15 16:59:19 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.50
X	  CPIO ASC & CRC Format koennen bis zu 4 GB - 1 Byte
X
XSun Oct 15 16:51:44 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.114
X	  EOF Erkennung in xt_file() funktioniert nun auch mit dem CPIO Format
X
XSat Oct  7 23:55:05 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.48
X	  newpos in get_sparse_func() war nicht initialisiert
X
XSat Oct  7 22:42:32 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.47
X	  get_end_hole(): uninitialisiete Variable "add" repariert
X	  get_end_hole(): Return TRUE wenn das letzte ftruncate() klapt
X
XWed Sep 27 02:49:44 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.5
X	  Umstellung auf globales walkstate zur Uebermittling diverser Parameter
X
XWed Sep 27 02:38:32 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.64
X	* diff.c 1.75
X	* extract.c 1.113
X	  walkopen()/walkgethome() sowie walkhome()/walkclose()/free(walkstate.twprivate) fuer aktuelle libfind/find_expr()
X
XTue Sep 26 21:59:01 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.281
X	  init_findargs() -> find_argsinit(), init_findtime() -> find_timeinit()
X
XTue Sep 26 17:14:37 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.280
X	  include -> include/schily/*
X	  Anpassungen fuer neue libfind
X
XTue Sep 26 15:57:11 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.46
X	* extract.c 1.112
X	* restore.c 1.49
X	* remove.c 1.50
X	* fifo.c 1.65
X	* dumpdate.c 1.13
X	* star_unix.c 1.84
X	* create.c 1.118
X	* buffer.c 1.131
X	* acltext.c 1.10
X	* acl_unix.c 1.29
X	* fflags.c 1.14
X	  errno.h -> schily/errno.h
X
XWed Sep 13 20:32:50 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.11
X	* names.c 1.17
X	* props.c 1.49
X	* remove.c 1.49
X	* volhdr.c 1.26
X	* unicode.c 1.7
X	* subst.c 1.8
X	* restore.c 1.48
X	* table.c 1.23
X	* star_unix.c 1.83
X	* xheader.c 1.68
X	* xattr.c 1.9
X	* longnames.c 1.47
X	* fifo.c 1.64
X	* fflags.c 1.13
X	* match.c 1.8
X	* movearch.c 1.30
X	* hole.c 1.45
X	* list.c 1.63
X	* lhash.c 1.14
X	* header.c 1.125
X	* dumpdate.c 1.12
X	* chdir.c 1.2
X	* buffer.c 1.130
X	* cpiohdr.c 1.18
X	* extract.c 1.111
X	* dirtime.c 1.23
X	* defaults.c 1.9
X	* device.c 1.12
X	* diff.c 1.74
X	* append.c 1.22
X	* checkerr.c 1.14
X	* create.c 1.117
X	* acl_unix.c 1.28
X	* acltext.c 1.9
X	* props.h 1.21
X	* dumpdate.h 1.9
X	* star.h 1.106
X	* xtab.h 1.2
X	* fifo.h 1.27
X	* starsubs.h 1.94
X	  Umstellung auf include schily/*
X
XWed Sep 13 19:36:10 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.95
X	* dumpdate.h 1.10
X	* fifo.h 1.28
X	* xtab.h 1.3
X	  _*_H Defines an include schily/* angepasst
X
XWed Sep 13 19:22:27 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.116
X	  Schreibfehler
X
XFri Jul  7 23:01:33 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.279
X	  Version -> 1.5a75
X
XSun Jul  2 19:37:15 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.44
X	  -force-hole schaltet nun von SEEK_HOLE auf cmpbytes() um
X	  bad_sparse_index() neu
X	  get_sparse_func() neu zur Performancesteigerung beim Extrakt
X	  Alte get_sparse_func() -> get_ssparse_func() 
X	  get_ssparse_func() verhindert, daß eine defekte Lochliste zum Absturz fuehrt
X	  get_sp_list() hat nun einen zusaetzlichen int *nsparsep Parameter
X	  get_sp_list() erlaubt nun das Extrahieren von "Loch am Ende" mit sparse[i].sp_offset == filesize und sparse[i].sp_numbytes == 0
X	  get_sp_list() erkennt nun defekte GNU sparse Archive bei denen sparse[i].sp_offset nach ueber 4 GB wieder unter 4 GB springt
X	  smk_sp_list() erkennt nun "Loecher am Ende" und behandelt die SEEK_HOLE/SEEK_DATA Ausnahmen dazu
X	  smk_sp_list()/mk_sp_list() versuchen nicht mehr das "Loch am Ende" mit sparse[i].sp_numbytes = 1 zu verstecken
X	  gnu_skip_extended() mit FINFO Parameter statt TCB
X	  get_end_hole() / write_end_hole() neu um File mit Ende auf ein Loch zu erstellen
X
XSun Jul  2 17:03:23 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.4
X	  DEV_BSIZE definieren falls nicht vorhanden
X
XSun Jul  2 14:18:23 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.63
X	  comerrno() -> errmsgno() damit die zweite Meldung nach "implementation botch" lesbar wird
X
XMon Jun 26 21:53:54 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.110
X	  gnu_skip_extended() nun mit FINFO *info Parameter statt TCB *ptb
X	  In xt_file() func -> void_func() nach Extraktionsfehlern damit der Rest uebersprungen wird
X
XMon Jun 26 21:48:06 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.93
X	  gnu_skip_extended() nun mit FINFO *info Parameter statt TCB *ptb
X
XMon Jun 26 21:44:56 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.105
X	  F_SP_EXTENDED/F_SP_SKIPPED neu
X
XSun May 28 14:55:19 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.278
X	  Version -> 1.5a74
X
XSun May 28 14:43:53 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.27
X	  Versuch die Fehlermeldung: Operation not applicable. Cannot set ACL 'user::rwx,group::r-x,other::r-x' for 'socket'
X	  auf Solaris zu verhindern
X
XSun May 28 14:41:32 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.73
X	  Verhindern, dasz beim Sparse Vergleich das open() bei named Pipes haengt
X
XSun May 28 14:40:29 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.104
X	  is_cont() & is_a_file() neu fuer besseren -sparse test mit -diff
X
XSat Mar 25 12:40:43 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.109
X	  Fehlendes void_file() bei is_dir() und aehnlichem gab Probleme beim Auspacken von GNU Dumpdirs
X	  Copyright -> 2006
X
XThu Mar  2 11:57:52 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.277
X	  Version -> 1.5a73
X	  maxdepth/mindepth walkstate initialisieren, so dasz star -find wieder geht und walkfun() nicht alles abblockt
X
XSun Feb 26 18:53:33 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.276
X	  Version -> 1.5a72
X
XSat Feb 25 23:51:10 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.62
X	* fifo.h 1.26
X	  Umstellung FIFO_IBLOCKED/FIFO_OBLOCKED -> iblocked/oblocked (separate Variablen) um einen FIFO Deadlock zu vermeiden
X
XSun Feb 19 22:00:07 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.43
X	  fpathconf(f, _PC_MIN_HOLE_SIZE) neu
X
XSat Feb 18 23:20:51 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.3
X	* header.c 1.124
X	  Copyright -> 2006
X
XSat Feb 18 22:29:10 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.72
X	  Bei D_SPARS sparse_file() rufen um Solaris 11 Sparse Check korrekt zu machen
X
XSat Feb 18 20:09:38 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.275
X	  Copyright -> 2006
X	  Verson -> 1.5a71
X
XSat Feb 18 18:26:10 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.123
X	  rdevmajor/rdevminor nur auf Wertebereich pruefen wenn das dazugehoerige file ein Devicenode ist
X
XSat Feb 18 16:33:56 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.115
X	  Support fuer -mindepth/-maxdepth
X
XTue Feb 14 02:00:40 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.8
X	* fifo.c 1.61
X	* restore.c 1.47
X	* diff.h 1.13
X	* fifo.h 1.25
X	  Copyright -> 2006
X
XSun Feb 12 20:59:19 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.46
X	  Panic: Meldung fuer lock_ino ("star-lock") unterdruecken
X
XSun Feb 12 20:52:48 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.12
X	* diff.c 1.71
X	* star.c 1.274
X	  Neue diffopt "sympath"
X
XWed Feb  8 01:03:43 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.24
X	* fifo.c 1.60
X	  Support fuer BeOS shard memory areas neu
X
XTue Feb  7 23:42:51 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.23
X	  #include <mconfig.h>
X
XTue Feb  7 23:39:10 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.22
X	* fifo.c 1.59
X	  #undef FIFO ist jetzt nur noch in fifo.h
X
XSun Feb  5 17:01:57 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.2
X	  HAVE_ST_BLOCKS neu
X
XSun Feb  5 14:06:23 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.273
X	  #include "fifo.h" wieder aktiviert wegen #undef FIFO
X	  HAVE_DEV_TTY Test neu
X
XThu Feb  2 17:38:10 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.7
X	  Umstellung auf lgetxattr()/lsetxattr()/llistxattr()
X
XThu Feb  2 15:47:46 2006 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.272
X	  Kompilation ohne -DUSE_FIND wieder ermoeglichen
X
XWed Nov 16 01:25:10 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.271
X	  Version -> 1.5a70
X
XWed Nov 16 01:24:41 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.270
X	  getpaxH()/getpaxL()/getpaxP() neu
X	  "Badly placed Option ... vermeiden bei mehreren -C Optionen in Folge
X
XWed Nov 16 01:21:23 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.7
X	  -C pat=xxx funktioniert nun auch korrekt bei -x und -diff
X
XSun Nov 13 15:00:10 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.82
X	  info->f_rdev / info->f_rdevmaj / info->f_rdevmin auch bei FIFO's auf 0 setzen
X
XSun Nov 13 14:57:21 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.108
X	  F_BAD_META Behandlung ist nun nach -fund Behandlung
X
XSun Nov 13 14:55:16 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.70
X	  Bei star -diff -find ... wurde kein neuer TCB gelesen
X
XTue Nov  8 01:17:34 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.67
X	  get_snumber() ruft get_xnumber() nun richtig mit inkrementiertem string Pointer wenn die Zahl mit '-' anfaengt
X
XSun Nov  6 16:48:35 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.62
X	  info->f_uid/info->f_gid Ausgabe format String korrigiert und Cast auf Llong
X
XTue Nov  1 23:19:23 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.114
X	  put_dir() ruft fetchdir nicht mehr bei if (!nomount || !newfs(info)) sondern nur noch bei if ((!nodesc || dodump > 0) && (!nomount || !newfs(info)))
X	  damit wird fetchdir() nicht gerufen bei star -cD wenn nicht gleichzeitig auch -dump aktiv ist
X
XTue Nov  1 23:15:04 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.269
X	  Verion -> 1.5a69
X	  star -find Support neu
X
XTue Nov  1 23:13:03 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.113
X	  Viele Funktionen nun neu mit "sname" Parameter damit -find geht
X	  walkfunc() fuer star -find neu
X
XTue Nov  1 23:05:03 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.122
X	  ustar devminor nun auch extrahieren wenn devmajor[0] & 0x80 (Zuweisung info->f_rdevmin = ul fehlte)
X	  ustar devmajor nun auch extrahieren wenn devminor[0] = 0x80
X
XTue Nov  1 22:32:18 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.107
X	* diff.c 1.69
X	* starsubs.h 1.92
X	  read_symlink() nun mit zusaetzlichem "sname" Parameter fuer -find
X
XTue Nov  1 22:10:34 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.81
X	  stat_to_info() fuer -find neu
X
XTue Nov  1 22:00:29 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.103
X	  INFO->f_sname neu fuer -find
X
XTue Nov  1 21:42:30 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.91
X	  findinfo() walkfunc() stat_to_info() neu
X
XTue Nov  1 21:39:33 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.68
X	* list.c 1.61
X	* extract.c 1.106
X	  Support fuer -find neu
X
XTue Nov  1 21:32:41 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* findinfo.c 1.1
X	  date and time created 05/11/01 21:32:41 by joerg
X
XThu Oct 20 01:17:06 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_sym.c 1.2
X	  star_mkvers() mit strvers[] neu
X	  save_args(ac, av) aus main() rufen
X
XThu Oct 20 00:32:03 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.121
X	  Wenn uidname()/gidname() einen sinnvollen Wert liefern, dann werden F_BAD_UID/F_BAD_GID wieder geloescht
X
XThu Oct 13 12:30:11 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.16
X	  nameuid()/namegid() liefern nun immer nobody wenn der Return Wert FALSE ist
X
XThu Oct 13 12:11:21 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.102
X	* extract.c 1.105
X	* header.c 1.120
X	* xheader.c 1.66
X	  XF_BAD_SIZE -> F_BAD_SIZE, XF_BAD_META -> F_BAD_META
X	  F_BAD_UID/F_BAD_GID neu
X	  Bei F_BAD_UID/F_BAD_GID wird TSUID bzw. TSGID nicht gesetzt um nicht Files suid nobody zu machen
X
XThu Oct 13 11:47:11 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.90
X	* volhdr.c 1.25
X	* xheader.c 1.65
X	  get_unumber()/get_snumber() nun mit zusaetzlichem Rangecheck
X
XThu Oct 13 01:00:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.119
X	  Alle wichtigen Fehlermeldungen enthalten nun die Blocknummer
X
XThu Oct 13 00:17:24 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.64
X	  Alle Fehlermeldungen und Warnungen enthalten nun eine tblocks() Ausgabe
X
XWed Oct 12 23:57:01 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.63
X	  get_iaray(): Test auf inode number > INO_T_MAX neu
X
XTue Oct 11 01:22:43 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.118
X	  Max old tar (' ' left fill statt '0') fuer info->f_gid ist MAXOCTAL6 und nicht MAXOCTAL7
X
XSun Oct  9 17:28:25 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.62
X	  Signed/unsigned Unterscheidung fuer "SUN.devmajor"/"SUN.devminor"/"SCHILY.devmajor"/"SCHILY.devminor"/"SCHILY.dev"
X	  Kommentar fuer gen_iarray()
X	  get_iarray() umgestellt auf unsigned inode Nummern mit astoull() und zusaetzlicher Uverflowcheck
X
XWed Oct  5 12:44:46 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.268
X	  Version -> 1.5a68
X
XWed Oct  5 11:10:23 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.61
X	  print_range(keyword, arg, len) -> xh_rangeerr(keyword, arg, len) und GLOBAL
X	  get_number() auskommentiert und durch get_unumber() & get_snumber() ersetzt
X	  get_xnumber() als Basisroutine fuer get_unumber() & get_snumber() mit stark erweitertem Bereichcheck
X	  get_uid() nimmt nun get_snumber() obwohl uid nach POSIX unsigned ist
X	  get_gid() nimmt nun get_snumber() obwohl uid nach POSIX unsigned ist
X	  get_size() nimmt nun get_unumber()
X	  get_realsize() nimmt nun get_unumber()
X	  get_offset() nimmt nun get_unumber()
X	  get_major() nimmt nun get_snumber() weil POSIX nichts ueber dev_t aussagt
X	  get_minor() nimmt nun get_snumber() weil POSIX nichts ueber dev_t aussagt
X	  get_dev() nimmt nun get_snumber() weil POSIX nichts ueber dev_t aussagt
X	  get_ino() nimmt nun get_unumber() weil POSIX ino_t als unigned definiert
X	  get_nlink() nimmt nun get_unumber weil alle realen link counts positiv sind()
X
XWed Oct  5 00:42:13 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.24
X	  get_number() -> get_unumber() & zuzaetzliche Tests auf korrekte Darstellbarkeit der Werte
X
XThu Sep 15 19:41:23 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.89
X	  get_number() Auskommentiert -> wird vorerst nicht mehr benoetigt
X	  print_range() -> xh_rageerr() und EXPORT
X	  get_unumber()/getsnumber() neu
X
XSat Sep 10 15:53:59 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.101
X	  suntar_header neu
X
XTue Sep  6 13:57:54 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.267
X	  Version -> 1.5a67
X
XTue Sep  6 13:57:26 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.112
X	  Bessere Name too long Meldungen bei star list=
X
XSat Sep  3 01:29:34 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.6
X	* star_unix.c 1.80
X	* star.c 1.266
X	* hole.c 1.42
X	* extract.c 1.104
X	* diff.c 1.67
X	* longnames.c 1.46
X	* acl_unix.c 1.26
X	* create.c 1.111
X	* checkerr.h 1.8
X	* dirtime.c 1.22
X	* checkerr.c 1.13
X	  checkerr=WARN|... neu
X	  errwarnonly() fuer checkerr=WARN neu
X	  BOOL dchangeflag -> errconfig("WARN|GROW|SHRINK *");
X
XSat Sep  3 01:25:37 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.17
X	  -I neu, -D ist nun mot errconfig("WARN|GROW|SHRINK *") implementiert
X
XSat Sep  3 01:10:25 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.60
X	* header.c 1.117
X	  get_xhtype() hat xhparse() mit finfo-> mit uninitialisiertem f_name & f_lname gerufen und wenn der erste Tar Header path= oder lpath= enthielt gab es einen Coredump
X
XSun Aug 28 21:47:13 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.12
X	  ec_state = __malloc() -> ec_state = __realloc(ec_state, ...)
X
XSun Aug 28 19:30:31 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.265
X	  Version -> 1.5a66
X
XSun Aug 28 18:37:31 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.11
X	* star.c 1.264
X	  errctl= kann nun auch direkt errror control Spezifikationen als errctl= Parameter
X	  Es koennen nun mehrere errctl= Optionen verwendet werden.
X
XSun Aug 28 15:55:34 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.263
X	* create.c 1.110
X	* suntar.c 1.16
X	* hole.c 1.41
X	  Suntar -D (Data change is warning only) / star -data-change-warn neu
X
XSun Aug 28 14:29:35 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.15
X	  Neue Option -e (Sun star error abort exit())
X
XSun Aug 28 14:17:07 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.48
X	  H_BAR neu Definitionen fuer bar(1)
X
XSun Aug 28 14:15:17 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.100
X	  #define BAR_HDRSZ TBLOCK neu
X
XSun Aug 28 14:14:35 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.262
X	  -e Option in -xhelp xusage() neu
X
XSun Aug 28 14:10:38 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.40
X	* longnames.c 1.45
X	* star_unix.c 1.79
X	* star.c 1.261
X	* checkerr.h 1.7
X	* xattr.c 1.5
X	* dirtime.c 1.21
X	* diff.c 1.66
X	* acl_unix.c 1.25
X	* checkerr.c 1.10
X	* create.c 1.109
X	* extract.c 1.103
X	  errabort() neu
X	  Neue errctl= identifier: ABORT, ALL, DIFF
X	  Neue Option -e (Sun star error abort exit())
X
XSun Aug 28 01:22:53 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.116
X	* xheader.c 1.59
X	  Cstyle
X
XSun Aug 21 16:08:02 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.115
X	* append.c 1.21
X	* xheader.c 1.58
X	* starsubs.h 1.88
X	* star.h 1.99
X	* volhdr.c 1.23
X	  FINFO f_ansec/f_cnsec/f_mnsec -> long damit negative Werte bemerkt werden koennen
X	  Neue Funktion check_xtime() in xheader.c
X	  print_unknown()/print_range()/print_toolong() geben nun auch die Blocknummer aus
X
XSun Aug 21 14:50:00 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.78
X	  print_badnsec() und Ueberpeuefung der nanosekunden Werte neu
X
XSat Aug 20 17:22:42 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.129
X	  Das Lesen von weniger als TBLOCK size ist nicht mehr ein sofortiger Abbruchgrund
X
XSat Aug 20 13:41:31 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.77
X	  setdirmodes() konvertiert nun auch von tarmode -> osmode
X	  setmodes() addiert nun OWNER_WRITE Rechte bei Directories damit das Extrahieren von read-only dirs klappt
X
XFri Aug 19 11:48:28 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.87
X	* volhdr.c 1.22
X	* xheader.c 1.57
X	  get_xtime() nun auch mit len Parameter (arglen) damit print_range() korrekt funktioniert
X
XThu Aug 18 13:38:31 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.260
X	  Version -> 1.5a65
X
XThu Aug 18 13:37:34 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.45
X	  ./star-lock neu
X
XSun Aug 14 18:47:37 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.76
X	  star -x -ctime Verhalten verbessert (geht nun auch mit used in File Times)
X
XWed Aug 10 18:58:01 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.114
X	  Schreibfehler beseitigt der beim Auspacken von ustar Archiven minor == major machte
X
XTue Aug  2 01:48:08 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.259
X	  Version -> 1.5a64
X
XTue Aug  2 01:36:47 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.113
X	  Diverse Rangechecks
X	  Korrekte Konversion von info->f_rdevmin/info->f_rdevmin/info->f_rdev nun ueber Pointer zu echtem Ulong
X
XMon Aug  1 13:12:51 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.11
X	* star.c 1.258
X	  xtimes diffopt neu = atime,ctime,mtime,lmtime
X	  Wenn D_MTIME nicht gesetzt ist, dann loescht der diffopts= Parser nun auch D_LMTIME
X
XSat Jul 30 13:38:14 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.56
X	  wenn info->f_uid >= 0 -> gen_unumber()
X	  wenn info->f_gid >= 0 -> gen_unumber()
X	  bei size/offsetwerten Check Rangecheck auf < 0
X
XFri Jul 29 03:18:43 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.55
X	* extract.c 1.102
X	* star.h 1.98
X	  XF_BAD_SIZE / XF_BAD_META / Ullong f_llsize neu
X	  Behandlung von Ueberlaeufen aus POSIX.1-2001 Headern nach lokalen Daten
X	  Versuch void_file() auch bei off_t < long long korrekt zu machen
X
XFri Jul 29 03:10:02 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.15
X	  uid_nobody / gid_nobody -> EXPORT
X
XWed Jul 27 02:10:54 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.13
X	* list.c 1.60
X	* names.c 1.14
X	* table.c 1.22
X	* acl_unix.c 1.24
X	* diff.c 1.65
X	  Copyright -> 2005
X
XWed Jul 27 02:05:52 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.12
X	* table.c 1.21
X	* acl_unix.c 1.23
X	* list.c 1.59
X	* star.h 1.97
X	* header.c 1.112
X	* extract.c 1.101
X	* diff.c 1.64
X	* star_unix.c 1.75
X	  FINFO f_mode / f_type -> mode_t
X
XWed Jul 27 01:28:06 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.58
X	* header.c 1.111
X	* star.h 1.96
X	  f_nlink -> nlink_t
X
XWed Jul 27 00:51:00 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.100
X	* star.c 1.257
X	  -dir-owner/-dir-group arbeiten nun vorsichtiger und beachten die sgid Semantik
X
XWed Jul 27 00:37:30 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.95
X	* dirtime.c 1.20
X	* create.c 1.108
X	  _BAD_MODE/_BAD_UID/_BAD_GID -> star.h
X
XWed Jul 27 00:15:30 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.99
X	* star.c 1.256
X	  -xdot repariert
X
XTue Jul 26 15:40:51 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.98
X	* star.c 1.255
X	  Neue Optionen umask= dir-owner= und dir-group=
X	  Globale Variable uid -> my_uid
X
XTue Jul 26 15:16:08 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.22
X	* header.c 1.110
X	* names.c 1.13
X	* starsubs.h 1.86
X	* star.h 1.94
X	* star_unix.c 1.74
X	* create.c 1.107
X	  nameuid()/namegid()uidname()/gidname() verwenden nun uid_t/gid_t Parameter
X	  info->f_uid/info->f_gid nun auch uid_t/gid_t
X	  Globale Variable uid -> my_uid
X
XSun Jul 24 23:32:13 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.106
X	  Cstyle
X
XSun Jul 24 18:56:41 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.105
X	  flushlinks() Prototyp neu
X
XSun Jul 24 18:45:15 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.109
X	  Schreibfehler: %lls ->  %lld korrigiert
X
XSun Jul 24 18:44:25 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.104
X	  Support fuer hard links bei star -c -Hcrc
X
XSun Jul 24 18:38:54 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.8
X	  Diverse Lint Probleme beseitigt:
X	  id in aclfromtext() initialisieren
X	  struct passwd ps & struct group gr in aclfromtext() bei isnumeric() so plazieren, dasz die Gueltigkeit der Daten (pointer) bis zur Nutzung reicht
X	  LOGNAME_MAX is nur 8 und reicht nicht. Neuer #define _LOGNAME_MAX_ is 32
X	  sprintf() nimmt nun %lld fuer uid_t und gid_t, LOGNAME_MAX (8) reichte auch nicht aus fuer int32_t
X
XSun Jul 24 00:05:04 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.19
X	* lhash.c 1.13
X	* checkerr.c 1.9
X	* fifo.c 1.58
X	* props.c 1.47
X	* gnutar.c 1.17
X	* suntar.c 1.14
X	* volhdr.c 1.21
X	* star_unix.c 1.73
X	* xheader.c 1.54
X	* cpio.c 1.16
X	* buffer.c 1.128
X	* star.h 1.93
X	* fifo.h 1.21
X	* props.h 1.20
X	  Copyright -> 2005
X
XSat Jul 23 23:50:07 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.17
X	  Copyright -> 2005
X	  Schreibfehler beseitigt
X
XSat Jul 23 23:21:55 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.85
X	* star.c 1.254
X	  flushlinks() fuer hardlinks bei cpio -Hcrc Format neu
X
XFri Jul 22 11:38:35 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.15
X	  cpio -i ist star -xdir
X
XFri Jul 22 11:34:25 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.18
X	  Der Dirstack funktioniert nun auch richtig wenn die Direktorynamen nicht mit '/' enden - es wird nun korrekt immer ein '/' angehaengt
X
XFri Jul 22 00:44:13 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.253
X	  Version -> 1.5a62
X
XTue Jul 19 17:51:11 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.20
X	  Semaphore zum Absichern nur aktivieren wenn usr_fifo == TRUE
X
XMon Jul 18 18:59:11 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.84
X	* restore.c 1.44
X	* extract.c 1.97
X	* create.c 1.103
X	  Der Einbau des Supports fuer SVR4 CPIO harlink Extrakt hatte einen imp NULL pointer fuer sym_typecheck() zur Folge, nun wird der Parameter korrekt uebergeben.
X
XMon Jul 18 13:50:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.252
X	  Version -> 1.5a62
X
XMon Jul 18 13:49:37 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.127
X	  Im "tar" Modus werden nun auch nicht leere Plain Files ueberschrieben
X
XMon Jul 18 13:23:49 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.126
X	  fifo_hpos() kommt nun damit klar wenn stopb < startb ist und teilt die Suche in zwei Bloecke wenn der Fifo gewickelt hat
X	  Semaphore zum Absichern von stat->cur_size & stat->cur_off
X	  Neyes Keywort "SCHILY.volhdr.tapesize", Archive Size Test beim Restore
X
XMon Jul 18 13:16:07 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.108
X	  EOF Warnung und Debug Meldungen enthalten nun die Blocknummer
X
XMon Jul 18 13:11:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.102
X	* fifo.h 1.19
X	  Cstyle
X
XMon Jul 18 13:08:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.18
X	* create.c 1.101
X	  Semaphore zum Absichern von stat->cur_size & stat->cur_off
X
XMon Jul 18 13:04:38 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.92
X	  Neyes Keywort "SCHILY.volhdr.tapesize"
X	  t_typeflag & t_linkflag -> Uchar weil Arrayindex
X
XMon Jul 18 13:03:42 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.20
X	  Neyes Keywort "SCHILY.volhdr.tapesize"
X	  Support zum Zuruecklesen von Multivolume Archiven im H_XSTAR & H_XUSTAR Format
X
XMon Jul 18 02:06:43 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.13
X	  tar -x ist star -xU
X
XFri Jul 15 02:50:11 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.43
X	  Verhinern, dasy Null Pointer in der Inode Datenbank einen Core Dump ausloesen
X
XSun Jul 10 18:28:37 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.100
X	* star.c 1.251
X	  Version -> 1.5a61
X	  Neue Option pkglist= fuer SPS
X
XSun Jul 10 17:57:37 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.83
X	  ngetline() neu
X
XSun Jul 10 17:16:02 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.16
X	* create.c 1.99
X	* star.c 1.250
X	* lhash.c 1.12
X	* restore.c 1.42
X	  Neue Option -read0
X
XSun Jul 10 15:36:46 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.98
X	* extract.c 1.96
X	* starsubs.h 1.82
X	  last_cpio_link() & xcpio_link() neu
X	  extracti() neu
X	  Unterstuetzung fuer das Entpacken von cpio CRC Archiven mit Hard Links neu
X
XSun Jul 10 14:52:02 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.16
X	  Hardlinks im CRC Format werden nun erlaubt
X
XSat Jun 11 15:14:48 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.53
X	* fifo.c 1.57
X	* hole.c 1.39
X	  Cstyle
X
XSat Jun 11 15:14:12 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.95
X	  extracti() neu
X
XWed Jun  8 01:45:58 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.52
X	  gen_iarray() korrigiert nun p relativ zu xbuf nach realloc() (war das das Problem beim inkrementellen Restore?)
X
XSun May 29 15:26:32 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.97
X	  find_link neu
X
XSat May 28 22:25:29 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.46
X	* props.h 1.19
X	  Neues Flag PR_SV_CPIO_LINKS fuer SVr4 asc & crc cpio Format
X
XSat May 28 15:42:33 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.38
X	  lseek() beim "archivieren" mit -nullout vermeiden
X
XTue May 24 00:50:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.37
X	  put_sparse_func() optimiert nun die I/O Groesse und liest mehr als 512 Byte auf einmal
X
XSun May 22 23:04:22 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.249
X	  Version -> 1.5a60
X
XSun May 22 23:03:56 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.36
X	  Coredump beim Auspacken von mehr als 10016 Loechern verhindern
X
XSun May 22 17:49:36 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.107
X	  XF_SIZE / XF_REALSIZE Behandlung korrigiert damit sparse Files > 8 GB bei POSIX.1-2001 funktionieren
X
XSun May 22 17:45:36 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.51
X	  SCHILY.realsize Beschreibung konkretisiert
X
XSun May 22 15:21:50 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.35
X	* create.c 1.96
X	* starsubs.h 1.81
X	  Umbau fuer SEEK_HOLE
X
XTue May 10 00:56:17 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.248
X	  Version -> 1.5a59
X
XTue May 10 00:52:43 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.72
X	* create.c 1.95
X	  get_acls(info) Aufruf von star_unix.c -> create.c fuer bessere Performance
X
XTue May 10 00:42:09 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.50
X	  Zusaetzlicher Test auf ein Newline am Ende einer Xheader Zeile und Syntaxfehlermeldung
X
XTue May 10 00:38:10 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.41
X	  Neuer Debug Code
X
XTue May 10 00:31:54 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.12
X	* star_unix.c 1.71
X	  Workaround gehen defektes Linux <linux/ext2_fs.h> durch Test auf defined(HAVE_BROKEN_EXT2_FS_H) && defined(HAVE_BROKEN_LINUX_EXT2_FS_H)
X
XFri Mar 25 14:27:38 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.247
X	  Bessere Onlinehilfe fuer -copyhardlinks & -copysymlinks
X
XFri Mar 25 14:26:11 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.49
X	  write_xhdr() setzt nun finfo.f_name damit errhidden() einen fname Parameter bekommt
X
XFri Mar 25 14:22:43 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.8
X	  errhidden() ist nun immun gegen fname == NULL
X
XThu Feb 17 00:18:35 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.246
X	  Version -> 1.5a58
X
XWed Feb 16 23:23:08 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.106
X	  Cstyle
X	  Copyright -> 2005
X
XWed Feb 16 15:33:30 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.11
X	  Gruenbacher war falsch: EXT3_JOURNAL_DATA_FL ist richtig und nicht EXT2_JOURNAL_DATA_FL
X
XWed Feb 16 14:46:35 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.7
X	  Nicht fuer IS_CYGWIN kompilieren
X
XWed Feb 16 14:31:08 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.10
X	  Copyright -> 2005
X
XWed Feb 16 13:57:45 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.9
X	  Support fuer Linux EXT2_JOURNAL_DATA_FL neu
X
XSat Feb 12 12:56:25 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.6
X	  Kein getpwuid(uid)/getgrgid(gid) mehr bei numerischen IDs in aclfromtext()
X
XFri Feb 11 10:44:57 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.5
X	  User/Group 123 wird nun auch dann korrekt behandelt wenn getpwuid()/getgrgid() nichts finden
X
XThu Feb 10 00:46:15 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.245
X	  Version -> 1.5a57
X
XThu Feb 10 00:36:00 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.4
X	  LICENSING.NOTICE -> CDDL.Sun.txt
X
XWed Feb  9 07:05:29 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.3
X	  Numerische uid/gid Felder werden bei aclfromtext() akzeptiert
X
XWed Feb  9 06:58:51 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.2
X	  #include <mconfig.h> / #ifdef HAVE_SUN_ACL neu
X
XWed Feb  9 06:51:06 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acltext.c 1.1
X	  date and time created 05/02/09 06:51:06 by joerg
X
XTue Feb  8 00:42:30 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.94
X	  Verhalten von -match-tree repariert (wirkte auch ohne pattern match)
X
XMon Feb  7 23:53:01 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_sym.c 1.1
X	  date and time created 05/02/07 23:53:01 by joerg
X
XMon Feb  7 22:57:37 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.244
X	  Copyright -> 2005
X	  Check auf Archiv Format bei star -c -acl und Abbruch wenn XF_ACL_ACCESS nicht gesetzt
X
XMon Feb  7 22:53:46 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.11
X	* dumpdate.h 1.8
X	* restore.c 1.40
X	* extract.c 1.94
X	* starsubs.h 1.80
X	  -> 2005
X
XMon Feb  7 22:36:21 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.93
X	* starsubs.h 1.79
X	* restore.c 1.39
X	  sym_open() mit neuem char *name Parameter fuer neues star_sym Programm
X
XSun Jan 30 16:40:24 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.38
X	  Text bei restore_valid == FALSE verbessert
X
XSun Jan 30 16:28:01 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.243
X	  Version -> 1.5a56
X
XSun Jan 30 16:25:07 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.37
X	  LOCAL BOOL restore_valid neu damit ein absolut leerer Dump beim Restore nicht das File star-symtable ueberschreibt
X
XSun Jan 30 15:40:41 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.10
X	  Fix fuer ein Problem mit level 0, 1, 2, 0, 2 wobei der 2. level 2 Backup gegen level 1 statt level 0 ist
X
XSun Jan 16 22:41:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.36
X	  sym_dump() neu und mehr Stellen geben die Datenbank nach "star-symdump" aus
X	  Support fuer -dump-cumulative / -cumulative neu
X	  Debugging Funktionen printoneLsym()/printLsyms() neu
X
XSun Jan 16 15:24:46 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.242
X	  Version -> 1.5a55
X	  Neue Option -dump-cumulative / -cumulative
X
XSun Jan 16 14:35:20 2005 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.9
X	* dumpdate.h 1.7
X	  Erweiterung um DD_CUMULATIVE damit star -cumulative moeglich wird
X
XMon Nov 29 12:40:43 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.35
X	  bessere EOF Behandlung fuer ngetline() in xgetline()
X
XFri Nov  5 10:59:45 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.34
X	  Bessere Meldung wenn gleicher Dump Level wieder zurueckgespielt werden soll
X
XMon Nov  1 14:46:51 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.241
X	  Version -> 1.5a54
X	  GCC warnung wegen nicht initialisierter Variable beseitigt
X
XMon Nov  1 14:46:09 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.33
X	  Alle Files in star-tmpdir loeschen wenn env STAR_DEBUG nicht vorhanden
X
XMon Nov  1 12:59:12 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.48
X	  Copyright -> 2004
X	  Besserer Kommentar
X
XMon Nov  1 12:19:10 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.32
X	  slashp in sym_dirprepare() war nicht initialisiert
X
XSun Oct 31 22:00:41 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.10
X	* star.c 1.240
X	* diff.c 1.63
X	  diffopts=lmtime neu
X
XFri Oct 29 22:01:15 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.239
X	  Version -> 1.5a53
X
XFri Oct 29 21:58:09 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.31
X	  sym_dirpremare() muss den '/' am Ende des Pfades beseitigen bevor _getinfo() gerufen wird, damit bei nicht Dirs nicht ENOTDIR kommt
X
XFri Oct 29 13:26:38 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.92
X	  MKD_DEBUG neu
X	  same_file() mit neuem what Paramether (IS_COPY/IS_LINK) damit bei IS_LINK kein Fehler mehr generiert wird wenn ein Hardlink bereits existiert
X
XFri Oct 29 13:23:51 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.47
X	  RM_DEBUG neu
X
XWed Oct 27 18:32:24 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.10
X	* header.c 1.105
X	  /* LINTED */ wegen name[100] Zugriffen
X
XWed Oct 27 17:33:14 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.238
X	  Neue Optionen dumpdate=name & fs-name=name fuer Filesystem Snapshots
X
XWed Oct 27 17:02:35 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.19
X	* star.h 1.91
X	  GF_CWD neu fuer "SCHILY.volhdr.cwd"
X
XTue Oct 19 10:12:57 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.237
X	  Version -> 1.5a52
X
XTue Oct 19 01:28:17 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.30
X	  Besserer Kommentar fuer das stat("/etc/passwd/", ) / ENOTDIR Problem mit POSIX.1-1988/POSIX.1-2001
X
XTue Oct 19 01:22:05 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.29
X	  make_adir() neu
X	  sym_dirprepare()/sym_typecheck() koennen nun imp * veraendern
X	  Bessere Debug Meldungen
X	  padd_node() setzt nun die flags (z.B. I_DIR) wenn es ein alter tmp node war
X	  sym_addrec() fuegt nun nicht mehr den dir Inhalt dazu wenn ein alter nich t DIR node existitert
X	  sym_dirprepare() kann nun ein Disk File loeschen und eine Dir erzeugen und imp * veraendern
X	  "star-symdump" Wird bei Panic: amnesia geschrieben
X	  sym_typecheck() beachted nun I_DELETE in der move2tmp() Schleife
X	  sym_typecheck() ruft nun purgeent() bei geloeschten nodes
X
XTue Oct 19 00:17:26 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.91
X	* starsubs.h 1.78
X	  make_adir() neu
X	  sym_dirprepare()/sym_typecheck() koennen nun imp * veraendern
X
XMon Oct 18 23:40:16 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.62
X	  do_void mit FALSE initialisieren damit GCC nicht warnt
X
XMon Oct 18 23:37:34 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.104
X	  xhsize -> xhsiz wegen globaler Funktioon xhsize()
X
XSun Oct 17 18:55:19 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.236
X	* list.c 1.57
X	  Neue Option -prinodes
X
XThu Oct 14 01:51:08 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.28
X	  Unter Linux bringt stat("/etc/passwd/", ) ENOTDIR
X
XThu Oct 14 00:25:51 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.61
X	  ERweiterung der diff Tests fuer DATA wenn ein Hardlink vorliegt wird damit nicht faelschlich Datenunterschied gemeldet wird
X
XThu Oct 14 00:23:14 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.27
X	  Erweiterte Debugs fuer sym_typecheck()
X
XThu Oct 14 00:20:26 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.103
X	  get_xhtype() darf nicht aus get_hdrtype() gerufen werden damit der Kompressionstest nicht einen Aufruf von get_xhtype() bewirkt
X
XWed Oct 13 16:00:10 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.90
X	  H_TARMIN/H_TARMAX neu
X
XSun Oct 10 18:04:26 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.26
X	  Bessere restore dump level/date Tests
X	  Es ist nun erlaubt nacheinander alle dumps des selben levels einzuspielen
X
XSun Oct 10 17:36:37 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.235
X	  Version -> 1.5a51
X
XSun Oct 10 16:36:04 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.25
X	  Erweiterungen um Dumps gegen den aktuellen Restore Status zu vergleichen
X
XSun Oct 10 14:46:29 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.234
X	* extract.c 1.90
X	* fifo.c 1.56
X	* hole.c 1.34
X	  Cstyle
X
XSun Oct 10 02:56:17 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.89
X	  DT_FULL ist nun die hoechste Nummer und kleinere Zahlen bedeuten weniger Wert
X
XSun Oct 10 01:15:43 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.h 1.6
X	* dumpdate.c 1.8
X	  getdumptime() neu
X
XSun Oct 10 01:04:35 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.18
X	  grip->dumpdate.tv_usec / grip->refdate.tv_usec nun korrekt auf usec statt auf nsec initialisieren
X
XSun Oct 10 00:27:03 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.77
X	* volhdr.c 1.17
X	  dt_type() neu
X
XSat Oct  9 15:06:00 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.233
X	  -force-restore vor f= in opts
X
XSat Oct  9 15:05:11 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.21
X	* star_unix.c 1.70
X	  HAVE_ST_ACLCNT neu
X	  Support Code fuer die Verwendung von axltext.c unter UnixWare
X
XSat Oct  9 14:42:57 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.12
X	  #ifdef STAR -> #ifdef __STAR__ wegen patmatch.h
X
XThu Oct  7 16:54:25 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.11
X	  Copyright -> 2004
X	  #ifdef STAR neu
X
XWed Oct  6 17:22:41 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.88
X	  HAVE_ST_ACLCNT / f_aclcnt neu
X
XWed Oct  6 16:50:56 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.8
X	* star_unix.c 1.69
X	  Test auf HAVE_EXT2FS_EXT2_FS_H neu
X
XTue Oct  5 15:03:05 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.232
X	  Version -> 1.5a50
X	  /etc/tardumps nicht mehr schreiben wenn ein ^C kam
X	  Bessere Erkenning von partiellen Dumps
X	  Neue Option -force-restore
X	  /etc/tardumps auch schreiben wenn der Dump nur partial ist aber mit 'P' Flag
X
XTue Oct  5 14:59:05 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.102
X	  get_xhtype() neu fuer Archiv Typ Erkennung aus "SCHILY.archtype="
X
XTue Oct  5 14:57:03 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.16
X	  Bei H_XUSTAR wird nun (vorlaeufig) kein 'x'/'g' Header mehr per default erzeugt fuer bessere TAR Kompatibilitaet
X
XTue Oct  5 03:50:56 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.7
X	* dumpdate.h 1.5
X	  Support fuer Partielle Dumps neu
X	  Korrektes Einruecken in /etc/tardumps auch wenn der Filename auf einem Tabstop Endet
X
XTue Oct  5 03:42:47 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.24
X	  Test auf (gp->dumptype != DT_FULL) neu und Abort wenn -force-restore nicht verwendet wurde
X
XMon Oct  4 22:22:52 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.231
X	  'scipt' -> 'script'
X
XMon Oct  4 18:32:13 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.14
X	  -M usage() korrekt (nun -M mesage)
X
XMon Oct  4 16:11:09 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.230
X	  Umbau fuer star_fat
X
XMon Oct  4 16:05:34 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.12
X	* cpio.c 1.13
X	* pax.c 1.19
X	* gnutar.c 1.15
X	  #define PTYPE_DEFAULT neu
X	  Bessere Behandlung von DFLT_FILE fuer star vs. suntar
X
XMon Oct  4 15:06:11 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.87
X	  Neue Programm Typen: P_STAR P_SUNTAR P_GNUTA P_PAX P_CPIO
X
XMon Oct  4 15:05:01 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.14
X	* cpio.c 1.12
X	* pax.c 1.18
X	* suntar.c 1.11
X	  star_fat wird nun unterstuetzt
X
XThu Sep 30 23:29:39 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.229
X	  Version -> 1.5a49
X	  Warnung fuer star -c list=ccc files
X
XWed Sep 29 23:42:07 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.23
X	  Test auf (itmp != NULL) in sym_close() gegen core dump bei leerem Tar Archiv level 1
X
XTue Sep 28 01:51:19 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.9
X	  Prototyp fuer usage()
X
XMon Sep 27 20:42:19 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.228
X	  ptrdiff_t -> Intptr_t wegen besserer Portabilitaet
X
XSun Sep 26 16:48:11 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.11
X	  Default Archiv Format von H_CPIO_BIN -> H_CPIO_ODC
X
XSun Sep 26 15:10:20 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.227
X	  Optionsbehandlung fuer -C korrigiert (getdir() returniert bei (iftype == I_CPIO || iftype == I_PAX))
X
XSun Sep 26 15:09:10 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.17
X	  Optionsbehandlung fuer -C korrigiert ("C*,... beseitigt)
X	  artype= Option neu
X
XSun Sep 26 15:05:55 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.10
X	  Optionsbehandlung fuer -C korrigiert ("C*,... beseitigt)
X	  nblocks = 1 als korrekter Default fuer cpio
X	  Blocksize optionen besser pruefen
X	  bei -p wird nblocks dennoch 20
X	  artype= Option neu
X
XSun Sep 26 14:47:54 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.45
X	  Ausgabe des Headertype Namens neu
X
XSun Sep 26 13:55:40 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.125
X	* fifo.c 1.55
X	  Umbau von buf_sync()/fifo_sync() so dass keine Daten angefuegt werden wenn der Puffer bereits ein vielfaches der gewuenschten Groesse ist
X
XSat Sep 25 19:06:02 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.89
X	  goto modes korrigiert
X
XSat Sep 25 17:01:51 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.60
X	  mit diffopts=!size wird nun auch "data" Diff Berichtet wenn info->f_size != finfo.f_size
X
XSat Sep 25 16:24:44 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.48
X	* restore.c 1.22
X	* star.c 1.226
X	* gnutar.c 1.13
X	* cpio.c 1.9
X	* pax.c 1.16
X	* suntar.c 1.10
X	* create.c 1.93
X	* checkerr.c 1.7
X	* device.c 1.11
X	  lint
X
XSat Sep 25 15:14:49 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.4
X	  set_xattr() nur dann durchfuehren wenn (info->f_xflags & XF_XATTR) != 0
X
XSat Sep 25 13:53:31 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.101
X	  btos() nur kompilieren wenn DEV_MINOR_BITS > 21 (wegen lint)
X
XTue Sep  7 16:49:17 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.225
X	  Version -> 1.5a47
X	  -restore verlangt nun -U
X
XTue Sep  7 16:44:35 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.88
X	  XXX Kommentar als Hinweis fuer Probleme mit make_symlink(info)
X
XTue Sep  7 16:36:24 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.21
X	  Auskommentierter Kode geloescht
X
XTue Sep  7 16:35:21 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.20
X	  sym_typecheck() ueberarbeitet, so dasz Symlinks und Specials geloescht werden
X	  removefile() neu
X
XTue Sep  7 15:31:32 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.19
X	  padd_node() fuegt nun evt. oino und nino hash auch fuer alte nodes hinzu
X	  oifind_node() liefert nur noch nodes bei denen i_nino != 0 ist
X	  sym_addstat() aendert nun korrekt die Eintragung in dir Hashliste fuer i_nino
X	  move2dir() kann nun auch Files aus dem gesamten Filesystem finden und nicht nur aus star-tmpdir
X	  sym_open() testet nun ob star-symtable ein File ist
X	  sym_close() loescht nun files mit Linkcount 1 sowie leere Directories aus star-tmpdir
X	  Neue funktion fullname()
X
XMon Sep  6 22:27:33 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.18
X	* table.c 1.20
X	  Cstyle
X
XMon Sep  6 22:25:30 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.17
X	  purgeent() neu
X	  printsyms() umgestellt
X
XMon Sep  6 22:20:11 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.16
X	  Test ob star-tmpdir leer ist
X
XMon Sep  6 21:38:00 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.15
X	  Strings "star-tmpdir" & "star-symtable" nun in modul globalen Variablen
X
XMon Sep  6 20:13:36 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.14
X	  Umstellung von star-tmpdir/<oino> auf star-tmpdir/#<nino>
X	  oifind_node() neu
X	  Alte Inode Nummer in der Datenbank auch fuer die Root Directory
X	  "Panic: No old inode for inode %lld (%s).\n" fuer star-tmpdir und star-symtable unterdruecken
X	  move2tmp() loescht nun Files wenn der Node schon eine Kopie in star-tmpdir hat
X	  "Cannot open 'star-symtable'.\n" Meldung nicht mehr bringen weil das spaeter auch kommt
X	  imap_t  *isym neu
X	  sym_inittmpdir() -> sym_initsym()
X	  "star-symtable" escheint nun auch in der "star-symtable"
X	  "WARNING: No old inode number for " Warnung neu
X
XMon Sep  6 20:01:17 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.h 1.3
X	  imap_t  *i_honext neu
X
XMon Sep  6 20:00:48 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.87
X	  Modes & Zeiten auch setzen wenn Extraktion wegen -xdir oder -xdot erfolgt
X
XMon Sep  6 14:21:25 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.13
X	  Umbau auf xdebug
X
XMon Sep  6 13:49:40 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.12
X	  Vermeidung von goto
X
XMon Sep  6 13:17:29 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.100
X	  Fehlermeldungen gekuerzt so dass sie auf 80 Zeichen passen
X
XMon Sep  6 13:06:49 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.11
X	  sym_preremove() -> sym_dirprepare()
X	  Erste halbwegs nutzbare inkrementelle Restore Implementierung
X
XSun Sep  5 23:27:44 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.6
X	  Cstyle
X
XSun Sep  5 23:26:38 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.9
X	* pax.c 1.15
X	* cpio.c 1.8
X	* gnutar.c 1.12
X	  /* BEGIN CSTYLED */ neu
X
XSun Sep  5 23:19:19 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.h 1.2
X	  #define I_DID_RENAME neu
X
XSun Sep  5 23:12:49 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.76
X	  sym_typecheck() neu
X
XSun Sep  5 23:12:07 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.86
X	  sym_*() Funktionen aus restore.c nun mit imap_t *imp Parameter
X	  sym_typecheck(&finfo, &cinfo) neu falls ein neues File mit identischer inode # und Namen einen inkompatiblen Typ hat
X
XSun Sep  5 14:15:18 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.92
X	  } while ((blocks -= n) >= 0 && i == amount && size >= 0); ---> } while ((blocks -= n) >= 0 && i > 0 && size >= 0); damit nicht Lesefehler zu "file changed size (shriked)" werden
X
XSun Sep  5 13:45:53 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.75
X	  Funktionen von restore.c nun mit imap_t * Parameter
X	  sym_preremove() -> sym_dirprepare()
X
XWed Sep  1 18:02:57 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.10
X	  oifind_node() & find_node() beseitigt
X
XWed Sep  1 18:01:08 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.9
X	  Umbau auf restore.h
X	  Umbau auf neue baunfoermige Variante der Datei star-symtable
X	  if (imp->i_hash & I_DELETE) -> if (imp->i_flags & I_DELETE) (Bug beseitigt)
X	  nfind_node() & add_node() arbeiten nun relativ zu dir Pointer
X	  pfind_node(name) & padd_node(name, oino, nino, flags) neu
X
XWed Sep  1 17:49:54 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.h 1.1
X	  date and time created 04/09/01 16:49:54 by joerg
X
XSun Aug 29 19:45:55 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.8
X	  "star-tmpdir/." -> modifizierbaren Speicher
X	  diverse andere Aenderungen....
X
XWed Aug 18 04:33:21 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.7
X	  /star-tmpdir erzeugen
X	  Hash Liste mit 1024 Eintraegen gibt 1000x Geschwindigkeit
X	  sym_init() neu
X	  /star-symtable mit 0600 erzeugen
X
XWed Aug 18 04:02:55 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.224
X	  Version -> 1.5a45
X	  -xdev als Alias fuer -M neu
X	  bei -restore wird -xdot impliziert
X	  checkdumptype() neu
X
XWed Aug 18 03:59:30 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.15
X	  dt_name() nun GLOBAL
X
XWed Aug 18 03:58:41 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.74
X	  sym_init() neu, create_dirs() & dt_name() nun GLOBAL
X
XWed Aug 18 03:57:55 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.85
X	  umask() frueher initialisieren damit restore spezial Files mit behandelt werden
X	  curfs initialisieren
X	  sym_init(grip); neu
X
XWed Aug 18 03:56:34 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.6
X	* dumpdate.h 1.4
X	  writedumpdates() hat nun mehr Parameter und schreibt eine Meldung ob /etc/tardumps gechrieben wurde
X
XMon Aug 16 11:51:50 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.6
X	  dirdiskonly() aktiviert
X
XSun Aug 15 01:42:26 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.5
X	  Allozieren der Hash map -> sym_open()
X
XSat Aug 14 22:09:33 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.4
X	  Hash Tabelle fuer Filenamen mach Suchen 1000x schneller
X
XSat Aug 14 18:41:02 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.3
X	  vashval() neu
X
XTue Aug 10 02:13:28 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.5
X	  Umbau auf astollb() damit die Zeit 12345.0189 korrekt gepars werden kann
X
XTue Jul 27 22:47:57 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.5
X	  in closepattern() Platz fuer das State Array immer dann schaffen wenn (maxplen > 0) und nicht nur wenn (npat > 0)
X
XWed Jul 21 00:49:57 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.223
X	  Copyright -> 2004
X
XTue Jul 20 23:07:39 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.84
X	  Das Extrahieren von Hardlinks auf Directories geht nun
X
XTue Jul 20 22:31:26 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.222
X	* create.c 1.91
X	  Version -> 1.5a43
X	  Neue Option -dumpmeta, ohne -dumpmeta werden nun bei incrementellen Dumps Fileinhalte auch dann archiviert wenn nur st_ctime neu ist
X
XTue Jul 20 21:30:48 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.90
X	  Struct pdirs neu damit (hardlink) Directory Loops erkannt werden
X
XTue Jul 20 21:04:05 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.89
X	  put_dir() umgebaut damit unlesbare Directories mit archiviert werden koennen
X
XSun Jul 11 02:05:19 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.8
X	* buffer.c 1.124
X	  -> NEED_O_BINARY
X
XSat Jul 10 15:39:52 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.83
X	  Mehrfache Schleifen damit symlinks auf symlinks mit -copy-links funktionieren
X
XSat Jul 10 15:36:21 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.221
X	  Version -> 1.5a42
X
XSat Jul 10 13:37:15 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.54
X	  closetape() Aufruf neu
X
XThu Jul  8 10:50:54 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.220
X	* create.c 1.88
X	  Neue Option -match-tree
X
XThu Jun 17 21:14:14 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.11
X	* suntar.c 1.8
X	* star.c 1.219
X	  char archive = -1 -> signed char weil 'char' unter IRIX per Default unsigned ist
X
XFri Jun 11 18:58:50 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.123
X	  Schreibfehler close(tcompress_arf_save) -> fclose(compress_tarf_save
X
XFri Jun 11 11:50:41 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.218
X	  Version -> 1.5a41
X
XFri Jun 11 11:46:47 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.217
X	* extract.c 1.82
X	  -DCOPY_LINKS_DELAYED neu
X	  -copyhardlinks/-copysymlinks/-copydlinks neu
X
XSat Jun  5 18:19:18 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.122
X	  star -z funktioniert nun auch mit -c & DOS
X
XSat Jun  5 02:02:20 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.44
X	  v7tar neu
X
XSat Jun  5 01:36:54 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.19
X	* table.h 1.11
X	  xtv7tar_tab[] neu
X
XSat Jun  5 01:33:47 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.7
X	  setmode(fileno(stdin), O_BINARY);
X
XSat Jun  5 01:33:05 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.86
X	  "v7tar" neu
X
XSat Jun  5 01:32:46 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.99
X	  hdr_text() neu
X	  "v7tar" neu
X
XSat Jun  5 01:32:17 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.73
X	  hdr_text() neu
X
XMon Apr 26 02:15:52 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.216
X	  Version -> 1.5a40
X
XMon Apr 26 02:14:05 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.68
X	  setmodes() vermeidet nun times/modes bei Hard Links zu setzen wenn sie auf Symlinks zeigen
X
XThu Apr 22 13:56:23 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.67
X	  #ifndef NEW_P_FLAG  Code beseitigt
X	  Copyright -> 2004
X
XWed Mar 10 23:52:02 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.215
X	  set_signal() nun mit __PR() Makro beim handler Parameter
X
XWed Mar 10 23:36:58 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.214
X	  Neue Funktion set_signal() damit statt signal() auch sigsction()/sigvec() gerufen werden koennen
X	  um Signale nicht read()/write() unterbrechen zu lassen.
X
XWed Mar 10 22:43:55 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.53
X	  FIFO move Text in FIFO Statisktik verbessert
X	  Neue Fifo Statistik fuer FIFO Fuellstand
X
XMon Mar  8 12:29:53 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.81
X	  Fehlerhafte Reihenfolge bein Verodern der Zugriffsrechte und der File Type Bits korrigiert
X
XSun Mar  7 14:04:29 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.17
X	  sdirmode mit #ifdef PROTOTYPES wegen short mode_t
X
XSun Mar  7 00:33:48 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.10
X	* suntar.c 1.7
X	* star.c 1.213
X	* cpio.c 1.7
X	* pax.c 1.14
X	  Version -> 1.5a39
X	  Neue Option -no-p (nopflag)
X	  cpio/gnutar/pax/suntar angepasst
X
XSat Mar  6 22:48:45 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.66
X	  (info->f_mode & 07000) -> (info->f_mode & (TSUID | TSGID | TSVTX))
X
XSat Mar  6 22:44:47 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.80
X	  init_umask() neu fuer neues -p Handling
X	  Viele Aenderungen fuer neues -p Handling
X
XSat Mar  6 22:42:24 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.16
X	  #define DEBUG wieder beseitigt
X
XSat Mar  6 22:41:47 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.65
X	  Umbau fuer #define NEW_P_FLAG
X	  Neue Funktion setdirmodes(name, mode)
X	  Neues Makro OSMODE(tarmode)
X	  Neue Funktion osmode(tarmode)
X
XSat Mar  6 22:36:13 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.15
X	  Stack fuer file permissions neu
X	  sdirtimes() mit zusaetzlichem Parametern do_times und do_mode
X	  Bessere Erkennung und Markierung ungenuzter Eintraege mit tv_usec = -1
X	  sdirmode(name, mode) neu
X	  dirtimes() mit zusaetzlichem Parameter mode
X	  Fehlerkorrektur bei Namensvergleich: auch aufhoeren wenn *np == 0
X
XSat Mar  6 17:11:26 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.72
X	* dirtime.h 1.3
X	  dirtime Prototypen sind nun nur noch in dirtime.h
X	  dirtime Prototypen erweitert um dir mode stack Features
X
XFri Mar  5 23:58:52 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.20
X	* star.c 1.212
X	  uid -> uid_t
X
XTue Mar  2 18:49:16 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.121
X	  nicht nur star uf sondern auch star rf erlaubt nun nicht leere Files als Archiv
X
XTue Mar  2 16:21:47 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.14
X	  Copyright -> 2004
X	  struct timeval badtime neu, ungueltige Zeit ist nun tv_usec == -1
X	  verbesserter Kommentar
X
XMon Mar  1 23:23:55 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.6
X	* unicode.c 1.6
X	* restore.c 1.2
X	* header.c 1.98
X	* diff.c 1.59
X	* star.h 1.85
X	* fifo.h 1.17
X	  Cstyle
X
XMon Mar  1 23:16:07 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.14
X	* star.c 1.211
X	* extract.c 1.79
X	  Cstyle
X	  Copyright -> 2004
X
XMon Mar  1 23:14:44 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.47
X	* subst.c 1.7
X	  Copyright -> 2004
X
XMon Mar  1 14:53:06 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.210
X	  Version -> 1.5a38
X
XSun Feb 29 01:27:52 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.120
X	  eofptr bei star -u nur verwenden wenn != NULL sonst core dump bei leerem Archiv File
X	  "Will not overwrite... Meldung nur noch bei star cf file und nicht mehr bei star uf file
X
XFri Feb 27 21:04:50 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.58
X	  Schreibfehler beseitigt der trotz -acl _getinfo() rief
X
XFri Feb 27 11:38:18 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.209
X	* diff.c 1.57
X	* diff.h 1.9
X	  Version -> 1.5a37
X	  -diff Support fuer ACLs, Extended File Attributes & Extended File Flags neu
X
XFri Feb 27 11:36:45 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.3
X	  Verbesserter Code damit nicht '@' fuer jedes File angezeigt wird
X
XTue Feb 10 01:31:18 2004 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.208
X	  Version -> 1.5a36
X
XMon Dec 15 08:32:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.119
X	  star -cz ... geht definitiv nicht auf DOS weil popen() Programm zuerst laeuft
X
XSun Nov 30 13:11:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.118
X	  Erster Versuch Compress Pipes auch auf DOS/DJGPP zu implementieren
X
XSun Nov 30 00:01:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.117
X	  #include <io.h> auch fuer DJGPP
X
XSat Nov 29 23:33:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.116
X	  #include <io.h> fuer setmode(fileno, O_BIMNARY)
X	  setmode(fileno, O_BINARY) auch fuer JDGPP
X
XThu Nov 20 18:25:54 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.207
X	  Version -> 1.5a35
X
XThu Nov 20 18:25:23 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.46
X	  Durch Einfuehrung des "len" Parameters in gen_iarray() fing die Berechnung des "len" Wertes nicht mehr
X	  bei 0 an sondern bei dem einkommenden Wert. Dadurch wurde (fuer den Fall dasz die Gesamtlaenge korrekt
X	  geschaetzt wurde) der zu hohe Wert in den POSIX.1-2001 Header eingetragen.
X
XMon Nov 17 14:44:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.44
X	  split_posix_name() prueft nun (props.pr_nflags & PR_LONG_NAMES)
X	  name_to_tcb() prueft nun zuesaetzlich (namelen+add > props.pr_maxnamelen)
X	  name_to_tcb() erzeugt nur noch sehr lange Namen wenn (props.pr_nflags & PR_LONG_NAMES) war ist
X
XMon Nov 17 12:59:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.15
X	  Hinweis auf MF_ADDSLASH in name_to_tcb() in longname.c
X
XWed Nov 12 17:33:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.115
X	  cur_size/cur_off/old_size/old_off -> m_stats damit sie im shared memory stehen
X	  fifo_hpos() -> BOOL damit sie melden kann ob kein gesetztes Bit gefunden wurde
X	  Bei Files > FIFO size wird nun auch im -fifo Modus ein korrekter multivol cont Header geschrieben
X
XWed Nov 12 17:31:04 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.87
X	  cur_size/cur_off -> m_stats damit sie im shared memory stehen
X	  bei tsize > 0 duerfen Files > tsize nur dann nicht archiviert werden wenn -multivol nicht verwendet wurde
X
XWed Nov 12 17:28:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.16
X	  cur_size/cur_off/old_size/old_off -> m_stats damit sie im shared memory stehen
X
XWed Nov 12 09:13:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.114
X	* fifo.c 1.52
X	  Bistring name ist nicht char * sondern bitstr_t * (unsigned char *)
X
XWed Nov 12 00:11:18 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.206
X	  Version -> 1.5a34
X	  Setzen von dir_flags erst nach dem fifo-fork, damit echo README | star -copy list=- /tmp nicht 2x chdir("/tmp") macht
X
XTue Nov 11 23:39:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.51
X	  mp->bmlast neu
X	  fbit_nclear() neu
X	  do_out() mit korrigiertem Bithandling
X
XTue Nov 11 23:33:04 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.113
X	  Erster Versuch Multivol Continuation Header fuer den -fifo Fall zu schreiben
X
XTue Nov 11 21:45:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.71
X	* header.c 1.97
X	  newvolhdr() hat nun 3 Parameter: buf, amount, do_fifo
X
XTue Nov 11 20:27:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.15
X	  mp->bmlast neu
X
XTue Nov 11 01:44:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.50
X	  Anlegen einer Bitmap und loeschen der Bits aus den bereits geschriebenen Bereichen
X
XMon Nov 10 22:09:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.205
X	  -no-fifo aktivieren bei -print-artype
X
XMon Nov 10 22:06:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.112
X	* cpiohdr.c 1.14
X	* header.c 1.96
X	  Umbauten fuer neue Option -print-artype
X
XMon Nov 10 22:01:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.84
X	  Erweiterte C_* Kompressionsdefinitionen
X
XMon Nov 10 22:00:17 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.70
X	  print_hdrtype() nun mit FILE * Parameter
X	  get_cmpname() neu
X
XMon Nov 10 21:59:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.204
X	  Neue Option -print-artype und artype=
X
XMon Nov 10 15:03:07 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.14
X	  Bitstrings neu
X
XMon Nov 10 15:02:42 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* bitstring.h 1.5
X	  bit_init()/bit_fill()/bit_ffcs()/bit_ffss() neu
X
XMon Nov 10 15:01:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.111
X	  marktcb() nun mit Bitmap Markierung im Falle von -multivol && -fifo
X
XSat Nov  8 14:16:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.203
X	  Bessere Online Hilfe fuer -tpath
X	  Abbruch bei level= ohne -M
X
XSun Nov  2 00:52:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.5
X	  2. Versuch nun mit char * statt char [] wegen K&R
X
XSun Nov  2 00:43:03 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.4
X	  Initialisierungen sind nun K&R Kompatibel
X
XSun Nov  2 00:40:57 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.13
X	  & vor Funktion beseitigt
X
XSun Nov  2 00:39:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.43
X	  Backslash beseitigt den K&R C nicht will
X
XSat Nov  1 23:20:07 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.110
X	  Neue Funktion marktcb()
X	  newvolhdr() ruft nun xbbackup()/xbrestore()
X	  newvolhdr() hat nun Code fuer das Schreiben von multivol Headern
X	  writeblock() returniert nun die Adresse des gechriebenen Blocks
X	  old_size/old_off neu
X
XSat Nov  1 23:16:25 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.13
X	  put_volhdr() hat nun 2. Parameter der festlegt ob ein 'V' Header geschrieben wird
X	  Neue Funktion put_multhdr()
X
XSat Nov  1 23:14:03 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.95
X	  isxmagic() kommt nun auch mit 'M' headers klar denn dort ist der continuation offset auch prefix[130]
X	  write_tcb() ruft nun marktcb() und berechnet vorher den TCB Pointer
X	  realsize nun auch bei 'M'ultivol headern fuellen
X	  'M'ultivol bei 'xstar' und 'star' fuellt/liest nun auch contoffset
X
XSat Nov  1 22:52:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.45
X	  Neue Funtionen _xbinit()/xbbackup()/xbrestore()/get_offset()
X	  Neuer POSIX.1-2001 Tags "SCHILY.offset"
X
XSat Nov  1 22:49:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.69
X	  Neue Funktionen marktcb()/put_multhdr()/xbbackup()/xbrestore()
X	  writeblock() liefert nun eine Pointeradresse zurueck
X	  put_volhdr() nun mit BOOL putv ('V')
X
XSat Nov  1 22:41:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.202
X	  Version -> 1.5a33
X	  put_volhdr() hat nun 2. Parameter der festlegt ob ein 'V' Header geschrieben wird
X
XSat Nov  1 18:31:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.86
X	  cur_size/cur_off neu fuer 'M' multivol 
X
XSat Nov  1 14:41:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.83
X	  XF_OFFSET neu
X
XSat Nov  1 14:37:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.42
X	  props.pr_maxnamelen fuer "ustar" nun korrekt auf 256 wegen veraenderter Abfragen in longnames.c
X
XWed Oct 29 15:32:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.56
X	  Directory Diff Code ist nun wieder erst bei -diff -vv aktiv
X
XWed Oct 29 15:31:52 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.43
X	* gnutar.c 1.9
X	* buffer.c 1.109
X	  strcatl()/concat()/*execl() casten nun NULL im letzten Arg nach (char *)NULL
X
XTue Oct 21 23:48:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.12
X	* xheader.c 1.44
X	  Extended header mit value len == 0 loescht nun den bisherigen Wert
X
XTue Oct 21 20:31:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.18
X	* props.c 1.41
X	  PR_MULTIVOL neu nund nur bei star Archive Formaten aktivieren
X
XTue Oct 21 20:31:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.201
X	  Version -> 1.5a32
X	  -multivol geht im Create Mode nun nur noch mit star Archive Formaten
X	  multivol stillschweigend abgeschaltet wenn -copy Modus
X
XMon Oct 20 14:06:00 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* bitstring.h 1.4
X	  cstyle
X
XMon Oct 20 13:38:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* bitstring.h 1.3
X	  _SYS_BITSTRING_H_ -> _BITSTRING_H
X
XMon Oct 20 13:36:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* bitstring.h 1.2
X	  Umbau auf BSD-2 Lizens vom. 22.Juli 1999 William Hoskins Director, Office of Technology Licensing University of California, Berkeley
X	  Siehe: ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
X
XMon Oct 20 13:33:21 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* bitstring.h 1.1
X	  date and time created 03/10/20 12:33:21 by joerg
X
XMon Oct 20 01:50:05 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.200
X	* buffer.c 1.108
X	* create.c 1.85
X	* diff.c 1.55
X	  Umstellung auf _getinfo()
X
XMon Oct 20 01:47:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* restore.c 1.1
X	  date and time created 03/10/20 00:47:46 by joerg
X
XMon Oct 20 01:43:51 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.78
X	  restore.c neu
X	  Umstellung auf _getinfo()
X
XMon Oct 20 01:41:25 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.68
X	  _getinfo() neu
X	  restore.c neu
X
XMon Oct 20 01:22:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.64
X	  _getinfo() neu
X
XSun Oct 19 13:58:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.19
X	  Kuerzere Zeilen fuer cstyle
X
XSun Oct 19 13:54:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.18
X	  Hoffentlich letzter Versuch von A. Gruenbacher die Defekten ACL Strings von Linux zu umgehen
X
XThu Oct 16 15:28:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.43
X	  Fehler beim Verschieben von text oder iarray nach falsch geratener Laenge beseitigt: Start nun bei xbidx+olen statt bei xbidx+llen
X
XThu Oct 16 00:48:59 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.107
X	* xheader.c 1.42
X	  Cstyle aenderungen
X
XThu Oct 16 00:16:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.199
X	  -j auch im Compat Mode erlauben
X
XThu Oct 16 00:08:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.198
X	  Version -> 1.5a31
X	  Neue Optionen -j, -xdot, -restore
X	  Experimental Hinweise beseitigt
X	  dogetwdir() Aufruf nun auch korrekterweise bei star -ctv
X
XThu Oct 16 00:02:42 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.77
X	  Neue Option -xdot
X
XWed Oct 15 01:45:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.41
X	  Ullong -> Llong wegen astollb()
X
XWed Oct 15 01:12:14 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.82
X	  info->f_dirinos/info->f_dirents neu
X
XWed Oct 15 01:11:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.40
X	* create.c 1.84
X	* header.c 1.94
X	* star_unix.c 1.63
X	* starsubs.h 1.67
X	* diff.c 1.54
X	  SCHILY.dino implementiert, gen_iarray()/get_iarray() neu, info->f_dirinos/info->f_dirents neu
X
XTue Oct 14 19:20:27 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.53
X	  Umbau auf neue Funktion dirdiffs() und Benutzung von cmpdir()
X
XTue Oct 14 19:18:22 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.11
X	* dumpdate.c 1.4
X	  Workaround fuer FreeBSD/MacOS X broken tv_sec/time_t
X
XTue Oct 14 19:14:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.66
X	  Neue Funktion cmpdir()
X
XSat Oct 11 17:32:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.106
X	  changetape() setzt nun pid != 0 damit auch von FIFO Prozess prstat() etwas ausgibt
X	  changetape() setzt nun auch gip->volno (im shared Memory)
X	  nextitape() ruft nun verifyvol() nach Bandwechsel ohne FIFO
X	  nextotape() ruft nun wieder unbedingt weof() denn nextotape() wird nur im non-split multivol Mode gerufen
X	  startvol()/newvolhdr() neu
X	  initbuf() alloziert nun auch mit FIFO im multivol Schreibmodus 2xbufsize damit der Volheader geschrieben werden kann
X	  writetape() hat nun einen Aufruf von changetape() der durch Erreichen von tsize= ausgeloest wird
X	  flushbuf() hat nun Schleife ueber writebuf() falls Bandwechsel direkt am Ende kommt.
X
XSat Oct 11 17:22:37 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.49
X	  pit != 0 Zuweisung zum Erzwingen einer Ausgabe in prstats() -> changetape()
X	  startvol() Aufruf neu in do_out() zum Schreiben von Volheadern
X	  do_in(): verifyvol() Aufruf ueberarbeitet
X
XSat Oct 11 14:53:20 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.10
X	  Ein Volheader wird nun auch geschrieben wenn tsize= ohne -multivol verwendet wird
X	  Neuer Check auf zu grossen Volume header
X
XSat Oct 11 13:49:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.93
X	  newvolhdr() Aufruf nach nextotape()
X	  tsize= bedingter Bandwechsel ohne split File von write_tcb() -> put_tcb() damit alles fuer ein File zusammensteht
X
XFri Oct 10 21:06:57 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.65
X	  newvolhdr() neu
X
XFri Oct 10 18:07:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.39
X	  Vorkehrungen gegen alte archive bei denen SCHILY.dir nur mit einem null Byte endet
X	  xhsize() neu
X
XFri Oct 10 18:06:22 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.52
X	  Vorkehrungen gegen alte archive bei denen SCHILY.dir nur mit einem null Byte endet
X
XFri Oct 10 18:05:00 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.64
X	  startvol() & xhsize() neu
X
XFri Oct 10 17:59:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.83
X	  fetchdir() len enthaelt nun auch das zweite null Byte (Listen Terminator)
X
XThu Oct  9 21:34:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.9
X	  verifyvol() Sucht nun auch nach 'V'olheadern zum Skippen
X
XThu Oct  9 00:30:03 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.92
X	  Non-file-Split Multi Volume Aktionen unterbinden wenn -multivol aktiv ist
X
XThu Oct  9 00:27:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.8
X	  'g' Header am Anfang eines Weiterfuehrungs Mediums bei multivol ignorieren wenn dort keine VOLHDR Info drin ist
X	  Nach dem 'g' Header musz entweder ein 'V' oder ein 'M' Header kommen
X
XWed Oct  8 22:41:54 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.8
X	  Fehlerkorrekturen: star_darchive(arname, NULL) funktioniert nun
X	  nblocks und tsize werden korrekt in ihrer Zahlenbasis aufgesetzt
X
XWed Oct  8 21:59:25 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.197
X	  tsize auf Tape Blockgroesse abrunden
X	  tsize minimum check hinter das Lesen von /etc/default/*tar verschoben
X
XWed Oct  8 02:15:11 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.7
X	  grinit() beachtet nun GF_NOALLOC
X	  Neue Funktion gipsetup() 
X	  Neue Funktion verifyvol() allerdings erst halb fertig
X
XWed Oct  8 01:58:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.48
X	  GINFO *gip nun im shared Memory
X	  setprops() damit es gespiegelte Properties auch im FIFO Prozess gibt
X	  Erster Versuch nach einem Bandwechsel im Read-Modus den HEader zu verifizieren
X
XWed Oct  8 01:44:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.13
X	  ginfo neu in m_head
X
XTue Oct  7 22:32:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.38
X	  gipsetup() Aufruf neu
X
XTue Oct  7 22:31:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.105
X	  buf_resume() setzt nun neuen Strukt Member stats->hdrtype (bei FIFO im shared mem) damit der fifi Prozess auch bescheid weis
X
XTue Oct  7 22:25:24 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.91
X	  tarsum_ok() neu
X	  buf_resume() nach hinten verschoben damit beim wiederaufwecken des FIFO Prozesses der Archivtyp bekannt ist
X
XTue Oct  7 22:12:21 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.196
X	  Version -> 1.5a30
X
XTue Oct  7 20:58:25 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.12
X	  m_stats->hdrtype & m_head->rsize neu
X
XTue Oct  7 20:56:14 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.63
X	  changetape() nun mit donext Parameter
X	  tarsum_ok()/gipsetup()/verifyvol()/xhparse() neu
X
XTue Oct  7 20:53:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.81
X	  Neues Flag GF_NOALLOC
X
XTue Oct  7 01:39:08 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.37
X	  xhparse() neu
X
XMon Oct  6 23:08:52 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.104
X	  changetape() nun mit 'donext' Parameter
X
XMon Oct  6 21:00:48 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.80
X	  GF_MINIT neu
X
XMon Oct  6 01:05:37 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.36
X	  Neue Funktion gen_unumber()
X	  gen_number() kann nun korrekt negative Zahlen ausgeben
X	  Umstellung der meisten numerischen Ausgaben auf gen_unumber()
X
XSun Oct  5 03:06:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.62
X	  gen_unumber() neu
X
XSun Oct  5 02:12:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.6
X	  gip->volno/gip->blockoff/gip->blocksize Check auf > 0 statt != 0
X
XSun Oct  5 01:41:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.35
X	  Check auf non-digit im len Feld neu
X	  Check ob '=' vor der Laenge des aktuellen Feldes kommt neu
X
XSun Oct  5 01:06:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.34
X	  Check auf Syntax error: missing '='
X
XSun Oct  5 00:01:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.5
X	  Schreibfehler korrigiert in ginit() grip->archtype -> gip->archtype
X
XSat Oct  4 23:07:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.79
X	* volhdr.c 1.4
X	  DT_UNKNOWN -> DT_UNKN wegen DT_UNKNOWN used in BSD <dirent.h>
X
XFri Oct  3 23:20:14 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.3
X	  finfo.f_atime = gip->volno; bei altem star zur Uebertragung der Volume Nummer
X
XFri Oct  3 19:38:23 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.33
X	  Neues include file xtab.h
X	  get_xvolhdr()/get_release()/get_archtype() neu
X	  get_xtime()/get_number() nun global
X
XFri Oct  3 19:31:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.2
X	  Volheader Management mit 'g'lobalen POSIX.1-2001 headern
X
XFri Oct  3 19:27:08 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.195
X	  Version -> 1.5a29
X	  GINFO neu
X	  Volheader Management bei dumplevel >= 0
X
XFri Oct  3 18:10:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.61
X	  get_xtime()/get_number() nun global
X	  ginit()/grinit()/priprint() neu
X
XFri Oct  3 18:03:09 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.78
X	  GINFO neu
X
XFri Oct  3 16:54:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xtab.h 1.1
X	  date and time created 03/10/03 15:54:36 by joerg
X
XFri Oct  3 13:07:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.60
X	  hdr_name() & put_archtype() neu
X	  put_release() -> volhdr.c
X
XFri Oct  3 12:54:35 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.32
X	  put_release() -> volhdr.c
X	  "SCHILY.archtype" neu
X	  XF_NOTIME funktioniert nun
X	  gen_xtime() kann nun auch andere Strings als "atime", "ctime", "mtime"
X	  get_xtime() kann nun auch weniger als 9 Nachkommastellen (groeber als Nanosekunden)
X
XFri Oct  3 01:27:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.90
X	  hdr_name() neu
X
XFri Oct  3 01:23:11 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.3
X	  Microsekunden in /etc/tardumps aktiviert
X
XThu Oct  2 02:41:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.89
X	* starsubs.h 1.59
X	* star.c 1.194
X	  Umstellung auf hdr_usage()/hdr_type() und htab_t
X
XWed Oct  1 19:34:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.31
X	  gen_xtime()/gen_number()/gen_text() sind nun EXTERN; get_*() Funktionen mit klen Parameter; SCHILY.volhdr.* neu
X
XWed Oct  1 19:33:24 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.58
X	  volhdr Funktionen -> volhdr.c
X	  gen_xtime()/gen_number()/gen_text() sind nun EXTERN
X
XWed Oct  1 19:32:25 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.88
X	  volhdr Funktionen -> volhdr.c
X
XWed Oct  1 17:37:09 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* volhdr.c 1.1
X	  date and time created 03/10/01 16:37:09 by joerg
X
XMon Sep 29 13:34:00 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.193
X	  -no-dirslash kann nicht mit -Htar verwendet werden da der Slash die Methode zum Erkennen von dirs ist
X
XMon Sep 29 02:01:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.192
X	  Besserer Kommentat in getdir()
X
XMon Sep 29 01:57:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.191
X	  opts wird schreibbarer String damit man '....,?' wegpatchen kann
X	  getdir() patcht nun '...,?' weg damit das fuer tar c4 eingefuehrte nicht mit -C (freistehend) konkurriert
X	  2. gettimeofday(&ddate, 0) beseitigt, damit im Volhdr die selbe Zeit steht wie in /etc/tardumps
X
XMon Sep 29 01:54:00 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.8
X	* suntar.c 1.6
X	* cpio.c 1.6
X	* pax.c 1.12
X	  opts wird schreibbarer String damit man '....,?' wegpatchen kann
X
XSun Sep 28 23:25:19 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.5
X	* star.c 1.190
X	* longnames.c 1.42
X	  Neue Option -no-dirslash
X
XSun Sep 28 23:17:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.7
X	  Sicherstellen, dasz immer "/" an Directories angehaengt werden
X
XSun Sep 28 23:15:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.56
X	  Hinzufuegen eines "/" am Ende einer dir nur im -c Mode
X
XSun Sep 28 23:10:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.55
X	  no_dirslash neu und Ausgabe der Directorynamen wie sie im Archiv stehen
X
XSun Sep 28 22:51:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.189
X	  Version -> 1.5a28
X	  Neue Funktion put_release()
X
XSun Sep 28 22:50:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.87
X	  Wegen der Erzeugung von 'g'lobalen P-2001 Headern wird nun 'ghdr' getestet
X
XSun Sep 28 22:49:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.57
X	* xheader.c 1.30
X	  Neue Funktion put_release()
X
XSun Sep 28 22:48:10 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.40
X	* props.h 1.17
X	  Neues Flag PR_VU_XHDR
X
XSun Sep 28 17:56:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.77
X	  init_finfo() neu
X	  XF_POSIX neu
X
XSun Sep 28 17:55:10 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.188
X	  star_mkvers() neu
X
XSun Sep 28 17:51:04 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.39
X	  props.pr_xhmask Headerspezifisch initialisiert
X
XSun Sep 28 17:42:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.29
X	  Auswertung der Maske props.pr_xhmask
X
XSun Sep 28 17:28:54 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.28
X	  write_xhdr() neu
X	  get_xtime() erlaubt nun einen Null Pointer fuer die Nanosekunden
X
XSun Sep 28 16:06:04 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.16
X	* props.c 1.38
X	* star_unix.c 1.62
X	  props.pr_xdflags -> props.pr_xhdflags, props.pr_xhmask neu
X
XSat Sep 27 15:33:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.187
X	  SChreibfehler vesions -> versions
X
XSat Sep 27 15:32:57 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.82
X	  Kommentar verbessert bei telldir()/seekdir() Fehlern
X
XSat Sep 27 15:31:42 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.6
X	  -tpath Flag bei -x  & -c setzen weil GNU tar eine unuebliche verbose Ausgabe macht
X
XSat Sep 27 15:29:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.54
X	  star cv -tpath gibt nun nur noch den Filenamen aus
X
XFri Sep 26 13:43:18 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.186
X	  Create Code aus main() und copy_create() zusammengefasst zu star_create()
X
XFri Sep 26 13:32:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.185
X	  Fehler bei -c -t beseitigt: &oav[oac+1] -> &oav[oac]
X
XFri Sep 26 02:07:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.184
X	* create.c 1.81
X	  Umbau auf struct timeval bei Newer & ddate
X
XFri Sep 26 02:06:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.2
X	* dumpdate.h 1.3
X	  Umbau auf struct timeval
X
XFri Sep 26 01:49:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.53
X	  ddate wird nicht gebraucht
X
XFri Sep 26 01:01:17 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.183
X	* cpio.c 1.5
X	* gnutar.c 1.5
X	  cstyle
X
XThu Sep 25 15:26:08 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.47
X	  DEBUG wieder deaktiviert
X
XThu Sep 25 15:19:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.103
X	  writebuf() nun mit amount Parameter
X	  flushbuf() ruft nun writebuf(bigcnt) auf
X
XThu Sep 25 15:14:14 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.102
X	  Total Ausgabe in prstats() bei multivol sollte nun korrekt sein
X	  EOT Erkennung in writetape() bei -multivol
X	  changetape() Aufruf in writebuf()/flushbuf()
X
XThu Sep 25 15:12:27 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.11
X	  Neue fifo_stats() Ausgabe fuer Block Residual moves
X
XThu Sep 25 15:12:10 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.46
X	  movebytes() fuer Block Residual kann nun bis zu 'obs' gross werden
X	  Neue fifo_stats() Ausgabe fuer Block Residual moves
X	  changetape() bei EOT Erkennung und -multivol
X
XWed Sep 24 17:10:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.101
X	  writebuf() kommt nun damit klar wenn writetape() einen unvollstaendigen Block schreibt (QIC EOT)
X
XWed Sep 24 16:42:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.182
X	  Version -> 1.5a27
X	  Neue Option -qic525
X
XWed Sep 24 16:41:14 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.100
X	  Vorbereitungen fuer auto multivol bei Bandende
X
XMon Sep 22 15:32:00 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.27
X	  info_xcopy() neu damit 'g' header funktionieren
X
XMon Sep 22 01:03:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.45
X	  fifo_chtape() -> fifo_chotape()
X	  fifo_chitape() neu
X	  -multivol neu
X
XMon Sep 22 00:05:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.99
X	  nexttape() -> nextotape(), fifo_chtape() -> fifo_chotape()
X	  nextitape()/fifo_chitape() neu
X	  -multivol neu
X	  Check auf compression nur bei stats->volno == 1
X
XSun Sep 21 23:55:35 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.86
X	  nexttape() -> nextotape()
X
XSun Sep 21 23:50:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.56
X	  nexttape() -> nextotape(), fifo_chtape() -> fifo_chotape()
X	  nextitape()/fifo_chitape() neu
X
XSun Sep 21 23:47:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.181
X	  Bei -multivol braucht man auch /dev/tty
X
XSun Sep 21 23:47:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.4
X	  star kann jetzt -multivol
X
XSun Sep 21 13:58:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.180
X	  -multivol neu
X
XSun Sep 21 13:34:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.98
X	  multivol verhindert das Schreiben von logischen EOF Record beim Bandwechsel
X	  "Cannot backspace .." Meldung nun "tape"/"medium"
X	  Kommentar stark erweitert
X
XSun Sep 21 03:29:22 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.44
X	  fifo_resume() ist nun OK
X
XSat Sep 20 14:58:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.26
X	  snprintf() -> js_snprintf()
X
XSat Sep 20 14:26:09 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.179
X	  star_checkopts() mit int archive (statt char) und bessere Wertebereichsueberpruefung
X
XSat Sep 20 14:24:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.3
X	  AUf neuer Zeile fortgesetzte Strings (ehemals von GNU tar.c) repariert
X
XSat Sep 20 13:51:07 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.2
X	  --totals -> -time, Bessere Warnungen bei nicht unterstuetzten Optionen
X
XSat Sep 20 13:50:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.178
X	  comments? -bsdchdir -Z compress-program= neu
X	  "gnutar" kann nun integriert werden
X
XSat Sep 20 13:15:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.97
X	  -Z compress-program= -force-local neu
X
XSat Sep 20 04:02:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.4
X	* pax.c 1.11
X	* cpio.c 1.4
X	  star_info() -> xxx_info()
X
XSat Sep 20 04:00:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* gnutar.c 1.1
X	  date and time created 03/09/20 03:00:49 by joerg
X
XSat Sep 20 03:51:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.55
X	* star_unix.c 1.61
X	  archisnull() neu
X
XFri Sep 19 16:17:53 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.10
X	* cpio.c 1.3
X	  Umstellung auf star_helpvers()/star_checkopts()
X
XFri Sep 19 15:50:56 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.3
X	  Umstellung auf get_helpvers()/star_checkopts()/star_nfiles()
X
XFri Sep 19 15:48:48 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.177
X	  star_nfiles() neu
X
XFri Sep 19 15:44:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.176
X	  star_checkopts() ist nun auch fuer suntar zu gebrauchen
X
XFri Sep 19 15:22:22 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.175
X	  star_helpvers()/star_checkopts() neu
X
XFri Sep 19 14:31:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.174
X	  Aufrufbedingungen von star_darchive() korrigiert
X
XFri Sep 19 14:18:35 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.173
X	  -0..7 Option neu
X	  Star erzeugt keine Archive mehr wenn nicht genug file Parameter verwendet wurden
X
XFri Sep 19 14:02:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.7
X	* starsubs.h 1.54
X	  get_stardefaults() ist nun extern
X
XThu Sep 18 18:13:56 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.2
X	  SVr4 Optionen hinzugefuegt
X
XThu Sep 18 18:10:22 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.172
X	  Verision -> 1.5a26
X	  getllnum aktiviert
X
XThu Sep 18 16:58:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.171
X	  nodir -> noxdir (extract only)
X	  Neues -H Format "bin" (UNIX V7 CPIO Binary) kann nun erzeugt werden
X
XThu Sep 18 16:57:56 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.2
X	* extract.c 1.76
X	  nodir -> noxdir (extract only)
X
XThu Sep 18 16:50:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.13
X	* header.c 1.85
X	  Das Erzeugen von CPIO_BIN (UNIX V7) Archiven wird nun unterstuetzt
X
XThu Sep 18 16:48:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpio.c 1.1
X	  date and time created 03/09/18 15:48:44 by joerg
X
XWed Sep 17 17:38:05 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.41
X	  Aehnlich  PAX Rationale bekommen ./@Long* nun TUREAD|TUWRITE Permissions
X
XWed Sep 17 15:56:37 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.84
X	  ptb->dbuf.t_linkflag == LF_GHDR ('g') muss auch als extended Header akzeptiert werden sonst gibt es eine Endlosschleife
X
XWed Sep 17 15:53:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.25
X	  Nach PAX Rationale bekommt der ././@PaxHeader nun TUREAD|TUWRITE Permissions
X
XWed Sep 17 02:40:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.37
X	  Linkflag 'M' ist kein Xtension Header
X
XWed Sep 17 01:09:20 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.75
X	  get_file() arbeitet nun nach der selben Methode wie die anderen Extraktionsroutinen wenn create_dirs() oder remove_file() gerufen wurde
X
XWed Sep 17 00:30:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.74
X	  Kein unlink() mehr bei 'uncond' (-U), wenn man remove will, dann jetzt -U -remove-first
X
XTue Sep 16 22:16:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.73
X	* starsubs.h 1.53
X	* subst.c 1.6
X	  newer() mit 2. Parameter FINFO *cinfo
X
XTue Sep 16 22:08:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.60
X	  info->f_filetype = -1 zur Initialisierung damit man erkennen kann ob getingo geklappt hat
X
XTue Sep 16 19:27:37 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.6
X	  getknum() erwartet Lling aber tsize ist Ullong
X
XTue Sep 16 16:05:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.72
X	  get_file() ruft nun void_file(info); bei dometa
X	  Neue Funktion get_ofile()
X
XMon Sep 15 17:06:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.9
X	  star_defaults() hat neuen Parameter
X
XMon Sep 15 16:52:17 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* suntar.c 1.1
X	  date and time created 03/09/15 15:52:17 by joerg
X
XMon Sep 15 16:51:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.170
X	  Erweiterungen fuer suntar.c
X
XMon Sep 15 16:50:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.5
X	* starsubs.h 1.52
X	  getbnum()/getknum() nun Global
X	  star_defaults() mit dfltname Parameter
X	  star_darchive() neu
X
XMon Sep 15 14:18:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.4
X	  open_cdrdefaults() -> open_stardefaults()
X
XMon Sep 15 12:33:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.169
X	  bsdchdir Umschaltung neu
X
XSun Sep 14 23:48:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.8
X	  Umstellung auf #define STAR_MAIN & #ifndef NO_STAR_MAIN
X	  star_info() neu
X
XSun Sep 14 23:48:10 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.168
X	  Umstellung auf #define STAR_MAIN & #ifndef NO_STAR_MAIN
X
XSun Sep 14 20:59:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.24
X	  Warnung wegen unbekannter Keywoerter kommen nur noch einmal
X
XSun Sep 14 15:34:31 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.59
X	  Behandlung von EINTR bei stat()/lstat()
X
XSun Sep 14 15:16:18 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.43
X	  errno in swait() auf 0 setzen
X
XSun Sep 14 13:38:48 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.80
X	* create.c 1.79
X	* cpiohdr.c 1.12
X	* xheader.c 1.23
X	  cstyle Anpassungen
X
XSun Sep 14 13:34:53 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.96
X	  cstyle
X
XSat Sep 13 19:48:23 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.2
X	  #include <sys/xattr.h> -> #include <attr/xattr.h>
X	  list -> alist wegen GCC
X	  fillbytes() Schreibfehler beseitigt
X
XSat Sep 13 15:04:24 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.52
X	  Support fuer Extended File Attributes
X
XSat Sep 13 14:30:20 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xattr.c 1.1
X	  date and time created 03/09/13 13:30:20 by joerg
X
XSat Sep 13 13:45:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.95
X	* star.h 1.76
X	* checkerr.c 1.6
X	* checkerr.h 1.6
X	  GETXATTR/SETXATTR neu
X
XFri Sep 12 16:52:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.22
X	* header.c 1.83
X	  SCHILY.xattr.* Behandlung neu
X
XWed Sep 10 18:24:04 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.51
X	  Anpassungen fuer cstyle
X
XWed Sep 10 17:37:01 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.58
X	  #ifdef USE_XATTR neu
X
XWed Sep 10 17:35:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.50
X	  xattr.c neu
X
XWed Sep 10 17:26:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.167
X	  Version -> 1.5a25
X	  Optionen -xattr & -xattr-linux neu
X
XWed Sep 10 16:35:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.75
X	  typedef struct star_xattr & #define XF_XATTR fuer Linux Extended File Attributes
X
XMon Sep  8 22:46:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.166
X	  Version -> 1.5a24
X
XMon Sep  8 22:09:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.11
X	  Erster extrakt Support fuer H_CPIO_BIN
X
XMon Sep  8 22:07:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.36
X	  H_CPIO_BIN Support neu
X
XMon Sep  8 22:07:08 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.82
X	* starsubs.h 1.49
X	  cpio_checkswab() neu
X
XMon Sep  8 17:29:53 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.35
X	  Vergessenes 'break' nach TAR und vor CPIO eingefuegt
X
XMon Sep  8 17:22:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.10
X	* star.c 1.165
X	* create.c 1.78
X	  Erster Support fuer H_CPIO_ASC/H_CPIO_ACRC, vorerst werden separate Files statt Hardlinks geschrieben
X
XMon Sep  8 17:17:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.34
X	  Sysvr4 Hex CPIO format num korrekt mit MAXNONLARGEFILE und mit gesetzter props.pr_xftypetab
X
XMon Sep  8 16:04:53 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.74
X	  Neues Flag F_CRC um CPIO crc Checksummen verzoegert zu berechnen
X
XMon Sep  8 13:43:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.77
X	  Erweiterungen fuer das Schreiben von POSIX.1-1988 CPIO
X
XMon Sep  8 13:09:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.73
X	* cpiohdr.c 1.9
X	  read_link() Aufruf nun mit info->f_flags |= F_EXTRACT um Ueberschreiben des TCB beim Auspacken zu verhindern
X
XMon Sep  8 02:58:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.8
X	  Schreib Support fuer POSIX cpio Format
X
XMon Sep  8 02:57:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.33
X	  ustar & tar koennen kein sparse, daher D_SPARS in props.pr_diffmask
X
XMon Sep  8 02:20:54 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.48
X	  Erweiterungen fuer CPIO Schreib Support
X
XMon Sep  8 01:37:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.32
X	* header.c 1.81
X	* star.h 1.72
X	* star.c 1.164
X	  Neuer Header Type "odc"
X
XMon Sep  8 01:00:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.40
X	  Check auf namelen > props.pr_maxnamelen auch fuer CPIO
X
XMon Sep  8 00:58:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.42
X	* buffer.c 1.94
X	  FIFO und bigbuf etwas groesser machen weil llitos() bei CPIO den Puffer um ein Space ueberschreibt
X
XSat Sep  6 15:47:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.93
X	* header.c 1.80
X	* hole.c 1.33
X	  peekblock()/readblock() nun mit amount Parameter um mit dem CPIO buffer wrap Problem klarzukommen
X
XSat Sep  6 15:26:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.39
X	* xheader.c 1.21
X	* buffer.c 1.92
X	  get_block()/put_block() nun mit amount Parameter
X
XSat Sep  6 13:48:17 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.79
X	  Aufruf von cpioinfo_to_tcb()/put_cpioh() neu
X	  put_block() nun mit amount Parameter
X	  Kommentar umgestellt
X
XFri Sep  5 21:41:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.163
X	  Neuer Heaer Parameter -Hcpio
X
XFri Sep  5 21:38:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.38
X	  name_to_tcb() tut nun nichts bei CPIO
X
XFri Sep  5 21:23:51 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.91
X	* fifo.c 1.41
X	  buf_sync()/fifo_sync() nun mit Parameter damit CPIO EOF Bloecke geschrieben werden koennen
X
XFri Sep  5 19:03:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.31
X	  Cpio props.pr_fillc -> '0', props.pr_xftypetab wird bei H_CPIO_CHR initialisiert
X
XFri Sep  5 19:02:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.10
X	* table.c 1.18
X	  xtcpio_tab[] neu
X
XThu Sep  4 22:47:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.7
X	  Abort bei -c/-Hcrc Hardlinks nur noch wenn nicht im List Modus
X
XThu Sep  4 22:42:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.6
X	  Abort bei -c & -Hcrc Format wenn Link count > 1
X
XThu Sep  4 22:28:27 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.162
X	  Version -> 1.5a23
X
XThu Sep  4 22:27:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.78
X	  Erweiterungen fuer cpio
X
XThu Sep  4 22:26:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.5
X	* starsubs.h 1.47
X	  cpio_resync() neu
X
XThu Sep  4 22:02:08 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.4
X	  ignoreerr fuer EOF Erkennung
X
XThu Sep  4 18:57:09 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.37
X	  info->f_lname zeigt nun immer auf Speicher (von aussen sichergestellt)
X	  ptb->dbuf.t_linkname immer kopieren
X
XThu Sep  4 18:56:19 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.20
X	  info->f_lname zeigt nun immer auf Speicher (von aussen sichergestellt)
X
XThu Sep  4 18:55:42 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.3
X	  info->f_lname[0] = '\0'
X
XThu Sep  4 18:54:57 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.71
X	* diff.c 1.51
X	* list.c 1.51
X	* append.c 1.20
X	  lname[PATH_MAX+1] fuer finfo.f_lname neu
X
XThu Sep  4 15:26:11 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.2
X	  Erste vollstaendige POSIX cpio extrakt Version, ASC/ACRC neu
X
XThu Sep  4 15:19:24 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.46
X	  print_hdrtype() -> EXPORT
X	  cpiotcb_to_info() -> int
X
XThu Sep  4 15:05:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.45
X	* header.c 1.77
X	  cpio header Funktionen nach cpiohdr.c ausgegliedert
X
XThu Sep  4 15:04:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* cpiohdr.c 1.1
X	  date and time created 03/09/04 14:04:46 by joerg
X
XWed Sep  3 02:01:39 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.50
X	  EOF bei tcb_to_info() genauso behandeln wie bei get_tcb()
X	  tcb_to_info() Aufruf for finaler listnew AUsgabe nur wenn es kein CPIO Format ist
X
XWed Sep  3 02:00:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* append.c 1.19
X	* extract.c 1.70
X	* diff.c 1.50
X	  EOF bei tcb_to_info() genauso behandeln wie bei get_tcb()
X
XWed Sep  3 01:17:54 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.69
X	  make_link() nun mit void_file() wegen CPIO Daten bei Hard links
X
XWed Sep  3 00:39:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.90
X	* starsubs.h 1.44
X	  peekblock() fuer CPIO neu
X
XTue Sep  2 21:17:07 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.30
X	  Support fuer H_CPIO_CHR/H_CPIO_ASC/H_CPIO_ACRC
X	  default: durch case H_UNDEF: ersetzt und neues default: mit Warnung
X
XTue Sep  2 21:12:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.68
X	  xt_file(): Erweiterung fuer nichtgeblockte CPIO Archive und fuer CPIO Padding
X
XTue Sep  2 21:00:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.15
X	  Erweiterungen fuer CPIO: pr_hdrsize/pr_pad & PR_CPIO
X
XTue Sep  2 20:52:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.49
X	  Link count bei CPIO und nlink < 2 nicht mehr vergleichen
X
XTue Sep  2 16:04:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.71
X	  Header Groessen fuer TAR & CPIO
X
XTue Sep  2 16:03:47 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.43
X	* create.c 1.76
X	  read_link() -> EXPORT
X
XFri Aug 29 03:48:17 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.161
X	  sparse diff in online help und man page
X
XThu Aug 28 22:07:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.7
X	  -p nutzt nun getpriv() von star -pax-p
X
XThu Aug 28 22:06:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.160
X	  Neue Option -pax-p
X
XThu Aug 28 20:36:05 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.159
X	* list.c 1.49
X	* match.c 1.4
X	  cstyle Ueberarbeitung
X
XThu Aug 28 20:18:23 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.3
X	  -pax-c/-pax-n/-pax-d & prpatstats() neu
X
XThu Aug 28 20:17:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.6
X	  -c/-n freigeschaltet
X
XThu Aug 28 20:16:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.158
X	  prpatstats() neu
X	  -pax-n neu
X
XThu Aug 28 20:15:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.42
X	  prpatstats() neu
X
XThu Aug 28 16:44:10 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.5
X	  paxmatch neu
X	  -d -> star -D
X	  -o nun mit non-UNIX-98 Fehlermeldung
X
XThu Aug 28 16:42:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.157
X	  paxmatch (-pax-match) neu
X
XThu Aug 28 16:40:44 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.2
X	  patprefix()/issimple() & paxmatch neu
X
XThu Aug 28 12:51:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.41
X	* pax.c 1.4
X	* create.c 1.75
X	* star.c 1.156
X	  pax -L && pax -H implementiert
X
XThu Aug 28 12:24:21 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.74
X	  create() macht nun return; direkt nach gescheitertem getinfo()
X
XThu Aug 28 12:00:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.3
X	* star.c 1.155
X	  getfilecount() nun mit 3. Parameter char *fmt
X
XThu Aug 28 02:04:20 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.2
X	  getfilecount fuer find ...| pax -w
X
XThu Aug 28 02:02:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.154
X	  getfilecount() neu
X	  swapflg = 0 bei -copy read Seite
X	  copy_create() kann auch openlist()
X	  docompat() checkt nun auf *tar* und verhindert so 'compat' fuer pax
X
XWed Aug 27 01:30:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* pax.c 1.1
X	  date and time created 03/08/27 00:30:49 by joerg
X
XWed Aug 27 01:23:32 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.153
X	  Neue Optionen -pax-ls -pax-i -pax-c -pax-L -pax-H
X	  #if PAX .... fuer pax.c
X
XTue Aug 26 23:02:07 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.48
X	  Umbau auf paxls und POSIX ls konforma Ausgabe
X
XTue Aug 26 21:41:51 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.57
X	  Neue Variable paxfollow (-pax-L)
X
XTue Aug 26 01:59:56 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.47
X	  Umschaltung auf PAX Format
X
XTue Aug 26 00:54:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.67
X	  cstyle boolean continuation
X
XTue Aug 26 00:28:42 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* subst.c 1.5
X	  pax_change() neu
X
XTue Aug 26 00:20:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.70
X	  Interface type Definitionen neu
X
XSat Aug 23 21:32:05 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.152
X	  YEAR, .... Definitionen -> star_unos.c
X
XFri Aug 22 11:29:20 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.40
X	  Vorbereiting fuer CPIO (Reste am Ende des FIFOs < 512 Bytes werden vor den Anfang des FIFOs kopiert)
X
XFri Aug 22 02:03:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.89
X	  new-volume-script wird nun mit naechster Volume Nummer und naechstem Archive Filenamen gerufen
X
XFri Aug 22 00:03:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.151
X	  Version -> 1.5a21
X	  getwdir() nicht mehr machen mit -t
X	  on_comerr(fifo_onexit()) wenn FIFO aktiv
X	  Pattern im -copy Mode auf der Extrakt Seite deaktivieren
X	  Abkuerzungen -ct und -c -diff
X
XThu Aug 21 23:53:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.39
X	  Mindestens TBLOCK vor dem FIFO Platz schaffen
X
XThu Aug 21 19:39:56 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.40
X	  fifo_onexit() neu
X
XThu Aug 21 19:39:14 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.38
X	  fifo_onexit() neu
X	  fcntl(mp->gp[0], F_SETFD, 1) auf alle Pipe Fd's damit gzip nicht pipes offenhalten kann und  EOF verhindert
X
XSat Aug 16 21:43:59 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.150
X	  Version -> 1.5a20
X
XSat Aug 16 21:14:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.149
X	  -copy Option neu
X	  -dirmode wird nicht mehr bei star -x -p impliziert
X
XSat Aug 16 21:05:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.39
X	  copy_create() neu
X	  runfifo() nun mit ac, av Parametern
X
XSat Aug 16 21:04:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.37
X	  -copy Option neu
X	  Besserer Kommentar
X	  prmp() printf() Formate korrigiert
X	  Ausgabe der Flags be Sync Pipe Read Error
X	  fifo_resume() ruft sputwakeup(mp, 'S') nur noch wenn nicht FIFO_MEOF gesetzt ist
X
XWed Aug 13 02:10:47 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.88
X	  stats->parts += amount im -copy Modus
X
XTue Aug 12 10:58:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* chdir.c 1.1
X	  date and time created 03/08/12 09:58:36 by joerg
X
XTue Aug 12 10:54:09 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.148
X	* starsubs.h 1.38
X	  chdir.c aus star.c ausgegliedert
X
XTue Aug 12 10:45:00 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* match.c 1.1
X	  date and time created 03/08/12 09:45:00 by joerg
X
XTue Aug 12 10:44:56 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.147
X	* starsubs.h 1.37
X	  Pattern matching Code -> match.c
X
XTue Aug 12 01:22:50 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.36
X	* star.c 1.146
X	  __malloc()/__realloc()/__savestr() -> mem.c
X
XWed Aug  6 23:40:35 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.66
X	* create.c 1.73
X	* list.c 1.46
X	  Substitute neu
X
XTue Aug  5 10:55:37 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.145
X	  s=replstr Option neu
X
XTue Aug  5 10:50:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* subst.c 1.4
X	  ia_change() kann nun mehr als 100 Zeichen fuer den neuen Filenamen
X
XTue Aug  5 10:47:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* subst.c 1.3
X	* header.c 1.76
X	* starsubs.h 1.35
X	  ia_change() von header.c -> subst.c
X
XTue Aug  5 10:13:34 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* subst.c 1.2
X	* starsubs.h 1.34
X	  parsesubst() nun mit BOOL * als 2. Parameter
X
XTue Aug  5 02:18:54 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.33
X	  parsesubst()/subst() neu
X
XTue Aug  5 02:11:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* subst.c 1.1
X	  date and time created 03/08/05 01:11:26 by joerg
X
XMon Jul 28 01:13:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.65
X	  same_file() neu und Test auf Gleichheit von Source/Destination bei hard links und Kopien
X
XSun Jul 27 21:02:37 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.75
X	  CPIO Header Typen korrigiert
X
XSun Jul 27 21:01:09 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.69
X	* checkerr.h 1.5
X	* buffer.c 1.87
X	* checkerr.c 1.5
X	  E_SAMEFILE neu
X
XSun Jul 27 19:33:51 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.19
X	  tcb_to_xhdr() ruft (*cp->x_func)() nun mit korrektem len Parameter
X
XSun Jul 27 14:50:24 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.144
X	  Version -> 1.5a18
X	  Besserer Kommentar
X	  -lowmem in die Online Help
X
XMon Jul 21 15:20:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.64
X	* checkerr.h 1.4
X	* checkerr.c 1.4
X	* star.c 1.143
X	* star.h 1.68
X	* buffer.c 1.86
X	  Neue Option -secure-links
X
XFri Jul 18 16:33:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.10
X	* starsubs.h 1.32
X	* star.c 1.142
X	  Version -> 1.5a17, nameinit() neu und damit UID_NOBODY/GID_NOBODY fuer unbekannte namen
X
XFri Jul 18 16:00:41 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.85
X	* checkerr.c 1.3
X	* extract.c 1.63
X	* star.h 1.67
X	* star.c 1.141
X	* checkerr.h 1.3
X	  Neue Option -.. und Files mit /../ werden normalerweise nicht mehr ausgepackt
X
XSun Jul 13 15:33:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.3
X	  strsv() beseitigt
X
XSun Jun 22 01:46:46 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.62
X	  fflags zuruecksetzen und wieder setzen wenn hard link (wegen SF_IMMUTABLE) nicht angelegt werden kann
X
XSun Jun 22 01:16:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.61
X	* acl_unix.c 1.17
X	  cstyle
X
XSun Jun 22 01:05:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.7
X	  Korrekte Auswertung der Fehler fuer FreeBSD in set_fflags()
X
XSat Jun 21 15:40:12 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.140
X	  Version -> 1.5a16
X
XThu Jun 19 18:48:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.139
X	* create.c 1.72
X	  cstyle
X
XThu Jun 19 13:20:30 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.71
X	  Keine Directory Namensliste mehr bei Mount Punkten und -M mit -dump
X
XWed Jun 18 01:14:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.138
X	  Option -I beseitigt
X
XTue Jun 17 16:30:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.70
X	  Neue Option level=
X
XTue Jun 17 16:16:21 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.137
X	  Neue Optionen tardumps=name/-wtardumps 
X	  Bessere Behandlung des Exitcodes bei Fehlern 
X	  getenv() STAR_FIFO_SIZE -> STAR_FIFOSIZE
X
XTue Jun 17 16:11:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.c 1.1
X	  date and time created 03/06/17 15:11:33 by joerg
X
XTue Jun 17 16:10:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.h 1.2
X	  dumpdate()/checkdumpdates() neu
X
XMon Jun 16 18:36:57 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dumpdate.h 1.1
X	  date and time created 03/06/16 17:36:57 by joerg
X
XMon Jun 16 18:36:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.31
X	  __savestr() mit const char *
X
XSun Jun 15 16:49:45 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.66
X	  Makros fuer cstyle angepasst
X
XSat Jun 14 22:03:43 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.60
X	  Setzen von O_DSYNC bei zu extrahierenden Files damit die Daten gleichmaesziger auf die Platte kommen
X
XSat Jun 14 15:48:36 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.16
X	  Patch von A.Gruenbacher gegen mehrere #effective Kommentare
X
XThu Jun 12 14:59:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.45
X	* hole.c 1.32
X	* star_unix.c 1.56
X	* dirtime.h 1.2
X	* xutimes.h 1.2
X	* table.h 1.9
X	* starsubs.h 1.30
X	* diff.h 1.8
X	* checkerr.h 1.2
X	* fifo.h 1.10
X	* star.h 1.65
X	* props.h 1.14
X	* movearch.h 1.2
X	* header.c 1.74
X	  Umbau wegen cstyle
X
XThu Jun 12 14:58:22 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* device.c 1.10
X	* remove.c 1.46
X	* props.c 1.29
X	* names.c 1.9
X	* fifo.c 1.36
X	* movearch.c 1.29
X	* lhash.c 1.11
X	* fflags.c 1.6
X	  Copyright -> 2003
X
XThu Jun 12 02:49:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.36
X	* fifo.c 1.35
X	* props.c 1.28
X	* lhash.c 1.10
X	* table.c 1.17
X	* remove.c 1.45
X	* fflags.c 1.5
X	* movearch.c 1.28
X	* names.c 1.8
X	* diff.c 1.48
X	* defaults.c 1.2
X	* dirtime.c 1.13
X	* extract.c 1.59
X	* checkerr.c 1.2
X	* unicode.c 1.5
X	* device.c 1.9
X	* append.c 1.18
X	* buffer.c 1.84
X	  Umbau wegen cstyle
X
XTue Jun  3 20:01:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.136
X	  Optionen -no-fsync/level= neu
X
XTue Jun  3 19:59:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.58
X	  Option -no-fsync neu
X
XThu Apr 10 18:53:26 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.135
X	* starsubs.h 1.29
X	  defaults.c neu, -ldeflt neu, getnum EXPORT
X
XThu Apr 10 18:52:06 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* defaults.c 1.1
X	  date and time created 03/04/10 17:52:06 by joerg
X
XThu Apr 10 15:19:57 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.134
X	  Version -> 1.5a15
X	  Versuch, den Linux SSH/TCP-IP Bug zu umgehen bei dem die stderr verbose Ausgabe bei ssh host 'star -c ...' unterdrueckt wird
X
XSun Mar  9 13:47:33 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.15
X	  Definitionen fuer SCO UnixWare neu
X
XSat Mar  8 18:09:58 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.55
X	  Umbau auf stat_ansecs(sp) Makro
X
XThu Mar  6 16:27:07 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.14
X	  Bei Linux war beim errhidden() Aufruf eine schlieszenden Klammer zuviel
X
XSun Feb 23 23:42:21 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.35
X	* create.c 1.69
X	* extract.c 1.57
X	* hole.c 1.31
X	* diff.c 1.47
X	* dirtime.c 1.12
X	* acl_unix.c 1.13
X	* star_unix.c 1.54
X	  Umbau auf "checkerr.h" & errhidden()
X
XSun Feb 23 22:52:42 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.133
X	  Version -> 1.5a13, Neue Option errctl=
X
XWed Feb 19 00:28:35 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.c 1.1
X	  date and time created 03/02/19 00:28:35 by joerg
X
XWed Feb 19 00:13:13 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* checkerr.h 1.1
X	  date and time created 03/02/19 00:13:13 by joerg
X
XFri Feb  7 11:26:49 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.132
X	  star -n -tpath ist nicht mehr automatisch Verbose
X
XSun Feb  2 16:17:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.83
X	  USE_REMOTE Test Code an librmt angepasst
X
XSat Feb  1 20:50:15 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.131
X	  Version -> 1.5a12, docompat() ueberprueft nun ob die notwendigen Argumente fuer Optionen auch vorhanden sind
X
XSat Feb  1 20:46:29 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.18
X	  gen_text() verschiebt nun den Unicode text (der laenger ist) mit neuer und nicht mit alter Laenge
X	  in get_size() reale Filesize setzen wenn noch nicht aus extended header bekannt ist damit auch non sparse files > 8 GB gehen
X
XSat Feb  1 20:32:40 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.73
X	  Alte info->f_rsize Behandlung (bevor switch kam) geloescht
X
XSat Feb  1 19:50:02 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.46
X	  Bei directory diff (ext. POSIX.1-2002) eins auf Filenamen bei der Ausgabe addieren damit nich ^Aname kommt
X
XSun Jan 26 19:17:16 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.130
X	  Version -> 1.5a11, Neue Optionen: xdebug= & -no-xheader
X
XSun Jan 26 19:05:31 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.56
X	* list.c 1.44
X	  Neue Option xdebug=# fuer dump_info()
X
XSun Jan 26 19:04:51 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.17
X	  Neue Option -no-xheader um evt. defekte Header zu ignorieren
X
XSun Jan 26 17:51:35 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.72
X	  Mehr kommentar fuer tar formatspezifische Wandlerfunktionen
X
XSun Jan 26 17:44:55 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.71
X	  Bugfix fuer -dump EXUSTAR sparse files > 8 GB mit neuem Flag XF_REALSIZE und SCHILY.realsize, dump_info() neu
X
XSun Jan 26 17:37:28 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.16
X	  Neue Funktion get_realsize() fuer info->f_size, "size" setzt nun korrekt info->f_rsize, get_size() setzt info->f_rsize
X
XSun Jan 26 17:19:47 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.64
X	  Neues Flag XF_REALSIZE
X
XSun Jan 26 17:15:38 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.28
X	  Neue Funktion dump_info()
X
XSun Jan 26 17:15:04 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.30
X	  info->f_xflags &= ~XF_SIZE zuruecksetzen bei Sparse Files - spaeteres info_to_tcb() setzt es evt. wieder
X
XTue Jan 21 19:01:27 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.12
X	  Reparatur von defelten ACL Eintraegen im Archiv die vor der Erweiterung fuer Leerzeichen erzeugt wurden
X
XTue Jan 21 19:00:20 2003 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.11
X	  Support fuer Usernamen die Leerzeichen enthalten
X
XTue Dec 17 01:05:10 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.129
X	  Version -> 1.5a10
X
XTue Dec 17 00:52:23 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.45
X	  Fix fuer Coredump bei star -diff -vv -dump und unlesbarer lokaler directory
X
XThu Nov 14 15:47:09 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.55
X	  create_dirs() repariert: return(FALSE) bei vorhandener Direktory war falsch
X	  make_dir() returniert fruehzeitig wenn Dir bereits existiert
X
XThu Nov 14 15:23:34 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.10
X	  Patch von Andreas Gruenbacher wegen #effective: Kommentar Problemen bei Linux
X
XMon Nov 11 19:39:58 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.82
X	  rmthostname(host, rmtspec, sizeof(host)) -> rmthostname(host, sizeof(host), rmtspec)
X
XSun Nov 10 20:56:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.128
X	  Version -> 1.5a09a, signal(SIGINFO neu fuer *BSD
X
XSat Nov  9 05:32:55 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.81
X	  rmtgetconn() nun mit 3. Parameter (default exit code)
X
XMon Nov  4 18:12:01 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.34
X	  close(f) fuer /dev/zero nur dann wenn /dev/zero auch geoeffnet nurde
X
XMon Oct 21 19:06:15 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.127
X	  Schreibfehler efective -> effective uid
X
XMon Sep 16 17:59:37 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.54
X	  Ueberarbeitung von create_dirs() mit neuer Funktion _create_dirs() damit alle Faelle behandelt werden
X	  war noetig weil  extract von /opt/schily/include/*.h zu Endlosschleife fuehrte weil /opt/schily/ root (d.h. readonly) war
X
XMon Sep  2 15:58:44 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.68
X	  Fehlerhafte Ueberpruefung eines lseek() Return Wertes in _fileread() korrigiert.
X
XMon Sep  2 15:57:35 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.53
X	  create_dirs() Problem mit getinfo(name, &dinfo) && !is_dir(&dinfo) beseitigt
X
XMon Aug 26 15:38:38 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.80
X	  Umbau auf librmt
X
XFri Aug 16 02:22:30 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.53
X	  symlink() Permission fuer HP-UX mit umask() realisieren
X
XFri Aug 16 02:21:56 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.44
X	  Ausgabe der dir inhalt Anzahl mit debug oder -vvv
X
XFri Aug  9 21:06:45 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.33
X	  fifo_errno() ist nun sicher gegen mp == NULL
X
XFri Aug  9 12:43:33 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.126
X	  Version -> 1.5a06, exit(fifo_errno()); neu, commaands Schreibfehler beseitigt
X
XFri Aug  9 01:31:06 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.79
X	  -wready wartet nun 120 Sekunden
X
XThu Aug  8 20:18:04 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.78
X	* starsubs.h 1.27
X	* fifo.h 1.9
X	* fifo.c 1.32
X	  fifo_errno() neu damit Bandschreibfehler mit FIFO auch den Exit Code von Star im Vordergrund veraendern
X
XTue Aug  6 00:45:53 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.77
X	  Bei -wready auch auch EBUSY testen
X
XWed Jul 10 23:54:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.43
X	  Directory diff namesliste nun korrekt wenn eine der Directory Listen laenger ist
X
XWed Jul 10 22:28:48 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.76
X	  Vor Aufruf des -newvol-script's fflush(vpr) rufen damit Synchronitaet der Ausgaben existiert
X
XWed Jul 10 22:24:50 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.125
X	  Version -> 1.5a05, /dev/tty nicht oeffnen wenn -newvol-script verwendet wurde
X
XWed Jun 19 20:34:50 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.70
X	  Fix fuer t_prefix mit genau 155 Zeichen
X
XWed Jun 19 20:29:02 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.3
X	  name/prefix -> prefix/name Bugfix
X
XTue Jun 18 11:42:55 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.2
X	  Option -v neu, Signed Checksum Test, Gesamtbewertung (gut/schlecht) nun OK
X
XMon Jun 17 19:40:41 2002 jes
X	* header.c 1.69
X	  t_size Feld auf null setzen, wenn size > MAXOCTAL11 und Archive Format kein Base 256 kann
X	  info_to_ustar() setzt nicht mehr info->f_rdevminor auf 0 fuer non devices weil das bereits in getinfo() passiert
X
XMon Jun 17 19:32:18 2002 jes
X	* props.c 1.27
X	* props.h 1.13
X	  PR_BASE256 neu
X
XMon Jun 17 19:31:16 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.124
X	  Version -> 1.5a03, Usage() mit get_progname() statt "star", addtarfile() kann nun star -cf - verstehen, diffopts=nlink ist nun erlaubt
X
XMon Jun 17 19:21:38 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* tartest.c 1.1
X	  date and time created 02/06/17 18:21:38 by joerg
X
XFri Jun 14 21:01:52 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.9
X	  Fix fuer fehlendes Komma nact Patch vom 8.3.2002 von Andreas Gruenbacher <ag@bestbits.at>
X
XMon Jun 10 19:06:45 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.42
X	  diffopts=nlink aktiviert, diffopts=dir neu
X
XMon Jun 10 19:04:11 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.67
X	  Test auf HAVE_READLINK in read_symlink() wegen OS/2 EMX
X	  Neue Option -lowmem
X	  put_dir() verwendet nun fetchdir() als Default anstelle von readdir()
X	  Abbruch der Directory Schleife in put_dir() wenn telldir()/seekdir() nicht funktionieren
X
XMon Jun 10 18:59:27 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.15
X	  Callback Funktion fuer tcb_to_xhdr() nun mit len Parameter
X	  SCHILY.dir, SCHILY.ddev, SCHILY.dino neu, SCHILY.ddev/SCHILY.dino als Dummy fuer spaeter
X	  gen_text() nun mit alen Parameter damit im Argument null Bytes sein koennen
X	  gen_text() nun mit movebytes() damit im Argument null Bytes sin koennen
X	  Neue Funktion get_dir()
X
XMon Jun 10 17:58:50 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.43
X	  Long Listing gibt nun auch Linkcount aus falls bekannt
X
XMon Jun 10 17:57:55 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.75
X	  setmode(fileno(tarf), O_BINARY); auch fuer die TAR Seite der compress PIPE.
X
XMon Jun 10 17:55:31 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* unicode.c 1.4
X	  to_utf8l()/from_utf8l() neu
X
XMon Jun 10 17:54:28 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.123
X	  Version -> 1.5a02, -lowmem neu, diffopts=dir neu
X
XMon Jun 10 17:52:12 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.68
X	  tcb_to_info() initialisiert nun auch info->f_nlink und info->f_dir
X
XMon Jun 10 17:48:39 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.7
X	  D_DIR neu D_DEFLT nun inclusive D_NLINK
X
XMon Jun 10 17:47:49 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.26
X	  #include <utypes.h>, Benutzung nun auch ohne star.h moeglich, unicode.c:to_utf8l()/from_utf8l() neu, fetchdir.c neu
X
XSun Jun  9 01:54:29 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.63
X	  f_dir/f_dirlen neu
X
XSun Jun  9 01:51:23 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.52
X	  info->f_dir = NULL bei Directories, HAVE_CHOWN/HAVE_SYMLINK testen (OS/2)
X
XSun Jun  9 00:27:42 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.74
X	  setmode() auch fuer OS/2 EMX
X
XSun Jun  9 00:26:40 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.31
X	  DosGetSharedMem(buf,3); bei OS/2 vor erstem Zugriff auf shared memory sleep() fuer OS/2 beseititg
X
XSat Jun  8 14:00:54 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.30
X	  -lowmem neu -> FIFO Size default 1 MB
X
XSun Jun  2 16:23:34 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.66
X	  put_dir() neu eingerueckt (return wenn opendir() scheitert)
X
XSun Jun  2 15:42:07 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.14
X	  xtab_t mit x_namelen fuer schnelleres lookup()
X	  len_len() neu fuer beliebig lange strings im xheader
X	  gen_text() vermeidet Kopieren und kann beliebig lange Strings
X
XSun Jun  2 15:28:48 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* unicode.c 1.3
X	* starsubs.h 1.25
X	  to_utf8() Returniert nun UTF-8 strlen()
X
XSat Jun  1 14:46:26 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.42
X	  modstr() besser kommentiert
X
XTue May 28 19:37:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.13
X	  xbgrow(): realloc() waechst nun mit pagesize()
X	  gen_xtime()/gen_number() nun ohne sprintf() und daher 2x so schnell
X
X*************** Release 1.4 *******************
X
XMon May 20 15:59:34 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.73
X	  Cast pointerdiffs to Llong for 64 bit
X
XMon May 20 15:58:54 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.11
X	  Cast pointerdiff to int and warn for 64 bit
X
XMon May 20 15:58:05 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.39
X	  Avoid Integeroverflow with %.* for Pointerdiffs
X
XMon May 20 12:48:32 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.24
X	  hash_build() with size_t size Parameter
X
XFri May 17 13:26:28 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.12
X	* starsubs.h 1.23
X	* star.c 1.122
X	* lhash.c 1.9
X	* diff.c 1.41
X	* create.c 1.65
X	* buffer.c 1.72
X	* append.c 1.17
X	  __malloc() with msg Parameter
X	  __realloc() new
X	   malloc()/realloc() -> __malloc()/__realloc() if using commerr()
X
XTue May 14 21:37:38 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.121
X	  Version -> 1.4
X
XMon May 13 20:50:25 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.71
X	  -silent allows to switch off compress warning, Cast pointerdiff -> int for printf
X
XMon May 13 20:49:22 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.38
X	  Cast pointerdiff -> int for sprintf
X
XSat May 11 19:24:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.29
X	  With Solaris ioctl _FIOAI now avoid Problemems if off+amt < 0 or off+amt > size
X
XSat May 11 19:19:09 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.64
X	  _fileread() now avoids Problemes if off+amt < 0 or off+amt > size
X
XSat May 11 19:12:48 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.62
X	  tarblocks() Macro now without off_t Overflow
X
XFri May 10 12:46:15 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.63
X	  -silent/-meta new, better Check for is_tape() for Mac OS X
X
XFri May 10 12:27:59 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.67
X	  Support for XT_META, _GTTOXT() -> _VTTOXT()
X
XFri May 10 00:44:12 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.34
X	  Use Vendor Unique Longnames if F_LONGNAME/F_LONGLINK is set, to make META Files work
X
XThu May  9 17:40:52 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.26
X	  Meta Files new, better comment
X
XThu May  9 17:35:17 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.47
X	  Warning for meta files
X
XThu May  9 17:34:21 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.120
X	  New Options -silent/-meta, Version -> 1.4a25
X
XThu May  9 17:33:19 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.16
X	  Integrate Sparse/Meta Filetypes like regular Files 
X
XThu May  9 17:25:25 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.8
X	* table.c 1.15
X	  gttoxt_tab -> vttoxt_tab
X
XThu May  9 17:15:41 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.14
X	  META Filetyp new
X
XSun May  5 17:09:09 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.46
X	  New Option -silent
X
XSun May  5 17:06:53 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.40
X	  Also compare Filetyp if it is in POSIX.1-2001 header, Do not compare file content with XT_META
X
XSun May  5 17:00:17 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.41
X	  It seems to be better to hava a special treatment for XT_META to make the listing print 'm' as Filetype to know that file content is not in the archive.
X
XSun May  5 16:54:51 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.7
X	  XT_META new
X
XSun May  5 16:51:03 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.61
X	  LF_EXTATT/LF_META new, fis_link()/fis_meta() is_whiteout()/is_meta() new
X
XThu May  2 23:23:21 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.40
X	  XT_META getst same treatment as XT_LINK: if we knoe the real file type use it
X
XThu May  2 23:04:01 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.45
X	  -dump / -meta documented
X
XThu May  2 23:02:40 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.52
X	  Meta File Type implemented
X
XThu May  2 22:24:21 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.66
X	  New Warnung for GNUtar bug (Volheader) mode field is complertely nulled
X
XMon Apr 29 22:12:32 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.11
X	  "SCHILY.tarfiletype" will not be used for now
X
XMon Apr 29 22:10:54 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.65
X	  Use f_xftype from xheader except when it is XT_LINK
X
XMon Apr 29 22:06:28 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.51
X	  DOOR Files will be recognised and unpacked as Plain Files
X
XMon Apr 29 22:02:55 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.28
X	  info->f_xftype = XT_SPARSE; -> info->f_rxftype = info->f_xftype = XT_SPARSE; because XT_PARSE is own Filetyp
X
XMon Apr 29 22:01:21 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.13
X	  exustar List (-dump) now with XT_DOOR
X
XMon Apr 29 21:59:44 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.25
X	  Extended list of valid filetypes only with -dump
X
XMon Apr 29 21:54:34 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.60
X	  is_door() new
X
XSun Apr 28 17:57:26 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.39
X	  Only suppress File Type Hard Link with verbose printing, other Types are from f_xftype
X
XSun Apr 28 15:36:48 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.118
X	  Version -> 1.4a24, -link-dirs/-dump new in usage()
X
XSun Apr 28 15:15:00 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.27
X	* extract.c 1.50
X	* header.c 1.64
X	* star.c 1.117
X	  Warning: -> WARNING:
X
XSun Apr 28 02:06:57 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.63
X	* xheader.c 1.10
X	  New SCHILY.* xheader Types: SCHILY.dev/SCHILY.ino/SCHILY.nlink/SCHILY.filetype/SCHILY.tarfiletype
X
XSun Apr 28 01:09:52 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.12
X	* table.h 1.6
X	  BSD whiteout XT_WHT new, Solaris cpio acl corrected, xtexustar_tab[] new
X
XSun Apr 28 01:07:06 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.24
X	  Enhanced List erlaubterof possible File Types for H_EXUSTAR
X
XSun Apr 28 01:05:13 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.38
X	  Directory Hardlinks new, FileType printout using info->f_rxftype instead of info->f_xftype
X
XSun Apr 28 00:29:03 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.116
X	  Experimental chdrtype = H_EXUSTAR for -dump
X
XSun Apr 28 00:25:53 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.23
X	* star_unix.c 1.51
X	  info->f_typeflag= 0 new, info->f_rxftype = info->f_xftype new, BSD whiteout File S_IFWHT new
X
XSat Apr 27 21:39:07 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.58
X	  f_rxftype new
X
XSat Apr 27 18:10:00 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.61
X	  -link-dirs implemented
X
XSat Apr 27 18:07:24 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.43
X	  -link-dirs new, -sparse Documentation extended
X
XThu Apr 25 01:28:52 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.49
X	  Take care of EISDIR ro remove non-empty Directories
X
XThu Apr 25 01:09:49 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.44
X	  Implement first version of recursive remove
X
XWed Apr 24 21:41:17 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.11
X	  Better comment
X
XWed Apr 24 01:35:55 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.60
X	  Printout enhanced for 'file changed size' (increased/shrunk)
X
XWed Apr 24 00:57:43 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.115
X	  Version -> 1.4a23, verbose -> int, Support for -vv, -link-dirs new, -dump new
X
XWed Apr 24 00:42:33 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.62
X	* diff.c 1.39
X	  verbose -> int for -vv
X
XWed Apr 24 00:40:49 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.37
X	  Support for -vv in create mode
X
XWed Apr 24 00:35:10 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.23
X	  More comment
X
XWed Apr 24 00:29:34 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.42
X	  Many - to \-, -v is inc type
X
XTue Apr 23 22:49:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.26
X	  Problem with virtual growing sparse Files fixed
X
XSat Apr 20 22:13:44 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.8
X	* extract.c 1.48
X	* remote.c 1.37
X	* star_unix.c 1.50
X	* create.c 1.59
X	  Now using geterrno()/seterrno()
X
XFri Apr 19 23:46:54 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.22
X	* star_unix.c 1.49
X	  set st_rdev to 0 for plain Files, dirs, ...
X
XSun Apr 14 16:29:59 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.114
X	  Version -> 1.4a22
X
XSun Apr 14 16:24:11 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.113
X	  -z/-bz before b= in option string
X
XSun Apr 14 16:22:29 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.58
X	  maxsize now is byte oriented
X
XWed Mar 27 00:23:13 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.41
X	* buffer.c 1.70
X	* star.c 1.112
X	  new-volume-script= Option new
X
XTue Mar 26 23:55:59 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.40
X	* buffer.c 1.69
X	* star.c 1.111
X	  f= Option now allows up to 100 Files
X
XSun Mar 24 13:04:29 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.110
X	  Version -> 1.4a21, Short Usage corrected
X
XFri Mar  8 01:26:08 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.7
X	  Patch from Andreas Gruenbacher <ag@bestbits.at> for buffer conversions error with 4 ACL entries
X
XFri Mar  1 21:26:39 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.109
X	  Version -> 1.4a19
X
XFri Mar  1 21:25:09 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.25
X	  cmpbytes() -> cmpnullbytes(), read 32kB instead of 512 Bytes to increase speed
X
XTue Feb 26 22:47:23 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.33
X	  copy 100 Char Linknames before filenames because there may be a return
X	  copy 100 Char Linknames only if not case 'K' or 'x' longlink active
X
XSun Feb 24 21:12:59 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.57
X	  t_mode Definitions T* new
X
XSun Feb 24 21:08:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.48
X	  HAVE_POSIX_MODE_BITS Test Code deactivated (now again standard UNIX Mode)
X
XSun Feb 24 21:06:51 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.47
X	  POSIX TAR <-> OS Mode bit convertion new
X
XSun Feb 24 12:37:34 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.108
X	  Version -> 1.4a18, Copyright -> 2002
X
XTue Feb 19 10:31:01 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.61
X	  Uverflow check for octal string generation by checking fieldw
X
XMon Feb 11 22:42:14 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.47
X	  newer label -> isnewer for K&R C
X
XSun Feb 10 20:48:04 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.46
X	  Loop around fsync() and test for EINVAL/EINTR
X
XSat Jan 19 17:57:10 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.4
X	  True64 has chflags() but no #define UF_SETTABLE
X
XMon Jan 14 21:59:03 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.46
X	* Makefile 1.20
X	* xheader.c 1.9
X	* header.c 1.60
X	* star.c 1.107
X	* starsubs.h 1.22
X	  Support for extended file flags new
X
XMon Jan 14 21:51:27 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.39
X	  -xfflags Option new, Documenting problems with -fxxx & -fifo
X
XMon Jan 14 21:31:42 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.3
X	  If setting of all flags does not work, try if it works witout the ohne root only flags
X
XSun Jan 13 23:13:20 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.59
X	  Correctly Masking uid/gid for otar/ustar
X
XSun Jan 13 19:26:07 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.2
X	  first working Version
X
XWed Jan  9 11:27:30 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fflags.c 1.1
X	  date and time created 02/01/09 11:27:30 by joerg
X
XSun Jan  6 20:09:36 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.106
X	  Version -> 1.4a16, gnutar comment enhanced
X
XSun Jan  6 19:40:36 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.38
X	  Optionstexts reworked.
X
XSun Jan  6 00:13:30 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.37
X	  -S ... -z alphabetically towards the front
X
XSun Jan  6 00:00:50 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.36
X	  -i ... -remove-recursive alphabetically towards the front
X
XSat Jan  5 12:47:00 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.35
X	  -block-numer -copylinks -ctime -D -d ... H= alphabetically towards the front
X
XThu Jan  3 21:46:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.34
X	  -/ -atime -acl -ask_remove -B -bz -C  alphabetically towards the front
X
XTue Jan  1 23:43:42 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.105
X	  Version -> 1.4a15
X
XTue Jan  1 21:19:39 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.33
X	  EXAMPLES/FILES/SEE ALSO/DIAGNOSTICS/NOTES/LIMITATIONS/BUGS reworked
X
XTue Jan  1 20:19:51 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.29
X	* buffer.c 1.68
X	* star.c 1.104
X	* header.c 1.58
X	  Now using exprstats() and calling checkerrs() in exprstats()
X
XTue Jan  1 20:08:47 2002 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.57
X	  Now implementing POSIX conformant usage of the Size Field
X
XFri Dec 28 13:44:05 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.32
X	  Hinr for multi volume support in tsize=
X
XFri Dec 28 01:49:16 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.103
X	  blocks= & b= now supports mutiplyers (like bs= )
X
XFri Dec 28 01:41:59 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.31
X	  blocks= Option now also mentions POSIX limits, bs= directly after blocks= Doc
X
XFri Dec 28 00:23:47 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.30
X	  Man Page inclusive command description reworked, -dirmode new, H=headertype reworked
X
XThu Dec 27 23:13:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.67
X	  Komment for O_BINARY and O_TRUNC
X
XThu Dec 27 19:23:52 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.102
X	  Version -> 1.4a14, -p -> -p/-dirmode, If av[0] == tar -> xustar Format
X
XThu Dec 27 19:14:13 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.21
X	* star_unix.c 1.45
X	  dirmode -> pflag (in extract mode) to allow -p to be separated from -dirmode
X
XWed Dec 19 23:51:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.28
X	* star.c 1.101
X	  fifo_exit() enhanced so that FIFO backgroundprocess may be shut down (TAR File is much longer than it should be logically: star hangs at end)
X
XTue Dec 18 23:54:15 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.32
X	* header.c 1.56
X	  Supporting Linknames with exactly 100 chars
X
XMon Dec 17 23:52:56 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.29
X	  Hint for unsupported ACLs removed
X
XSun Dec 16 17:34:17 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.28
X	* star_unix.c 1.44
X	  New Option -acl
X
XSun Dec 16 16:39:14 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.100
X	  Version -> 1.4a13, New Option -acl, Preparing for better TAR compatibility (e.g. -l Option)
X
XSun Dec 16 16:16:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.55
X	  POSIX.1-200x -> POSIX.1-2001, f_offset -> f_contoffset because of SCO OpenServer Makro in file.h
X
XSun Dec 16 16:11:09 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.27
X	* fifo.c 1.27
X	  Reducing default FIFO Size to 4MB on Linux only if mmap() is not present
X
XSun Dec 16 16:10:24 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.57
X	  Hardlinks bekommen size == 0 wie in POSIX-1003.1-1990 verlangt
X
XSun Dec  9 17:19:10 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.8
X	  POSIX.1-200x -> POSIX.1-2001
X
XSun Dec  9 17:10:45 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.45
X	  option -block-number now also works extract mode
X
XFri Dec  7 21:30:37 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* movearch.c 1.27
X	* longnames.c 1.31
X	* star.h 1.56
X	* star.c 1.99
X	* props.h 1.12
X	* star.1 1.26
X	* props.c 1.22
X	  POSIX.1-200x -> POSIX.1-2001
X
XWed Dec  5 23:03:20 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.43
X	  File flags (-nodump) Support for Linux new
X
XWed Dec  5 20:50:27 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.44
X	  Better comment for copy_file in do_symlink, emul_link()/emul_symlink() started
X
XWed Dec  5 20:47:28 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.55
X	  New Flag XF_FFLAGS
X
XWed Dec  5 20:46:35 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.25
X	  New Options -nodump/-hardlinks/-symlinks, extension for bs=, New properties of tsize=/maxsize=
X
XWed Dec  5 20:40:03 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.98
X	  New short Usage Funktion susage()
X	  getnum() now using Llong 
X	  getnum() now understands '.' as 1x Mult
X	  New Functions getbnum()/getknum()
X	  -tsize/maxsize= now with getbnum()/getknum() with default to old behavior
X
XWed Dec  5 20:26:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.97
X	  Version -> 1.4a11, new Optionen -nodump/-hardlinks/-symlinks, Usage now also with -version/-debug/-refresh
X
XMon Dec  3 19:28:43 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.36
X	* star.h 1.53
X	  f_offset -> f_contoffset because of SCO OpenServer Macro in file.h
X
XMon Dec  3 19:27:29 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.54
X	* create.c 1.56
X	  -nodump / F_NODUMP new
X
XMon Dec  3 19:24:14 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.6
X	  #ifdef ENOSYS new, if removing ACL and POSIX ACLs xstats.s_setacl++ instead of xstats.s_badacl++
X
XSat Dec  1 22:09:49 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.20
X	* star_unix.c 1.42
X	* star.h 1.52
X	  File flags for BSD-4.4 Support new in finfo
X
XWed Nov 28 23:39:53 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.43
X	  Better error messages for links
X
XWed Nov 28 16:14:49 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.41
X	  HAVE_SETTIMEOFDAY for BeOS and #define utimes __nothing__ because of defect BeOS Prototyp
X
XSun Nov 25 17:41:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.5
X	  Try to handle ENOTSUP on Linux if the FS does not support ACLs
X
XSun Nov 25 17:17:05 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.24
X	* buffer.c 1.66
X	* star.c 1.96
X	* list.c 1.35
X	* create.c 1.55
X	  New Option -block-number
X
XSun Nov 25 17:00:50 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.23
X	  ACLs documented, New bs= Multiplyer 'g'
X
XSun Nov 25 15:47:51 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.38
X	  Volhdr may not be diff'ed 
X
XSun Nov 11 22:12:33 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.4
X	  Symlinks have no ACLs on Solaris or POSIX
X
XSun Nov 11 18:02:13 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.65
X	* remote.c 1.36
X	  Test HAVE_RCMD new
X
XThu Nov  8 16:33:58 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.3
X	  Better error messages, base_acl() also for Solaris, default ACL Problem for FreeBSD removed
X
XThu Nov  8 11:56:25 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.40
X	* acl_unix.c 1.2
X	  HAVE_ACL (always) -> HAVE_ANY_ACL because of Clash with Sun acl()
X
XThu Nov  8 11:55:28 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.51
X	  #undef isdigit for HP-UX
X
XThu Nov  8 00:06:56 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.95
X	  Version -> 1.4a07
X
XWed Nov  7 23:21:15 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* acl_unix.c 1.1
X	  date and time created 01/11/07 23:21:15 by joerg
X
XWed Nov  7 20:14:53 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.39
X	  Enhancements for ACLs, Cast to int for st_rdev in switch for S_IFNAM because of compiler Warnung,
X	  NEW_P_FLAG prepared
X
XWed Nov  7 20:10:21 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.7
X	  Enhancements for ACLs
X
XWed Nov  7 20:05:38 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.19
X	* starsubs.h 1.21
X	  New File acl_unix.c
X
XWed Nov  7 20:04:52 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.64
X	* star.h 1.50
X	  New xstats fields xstats.s_getaclerrs/xstats.s_badacl/xstats.s_setacl
X
XTue Nov  6 22:52:55 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.18
X	* list.c 1.34
X	* star.h 1.49
X	  Enhancements for ACLs
X
XTue Nov  6 22:51:31 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.37
X	  Abort if we cannot allow diffbuf, Hint for missinfg ACL diff
X
XTue Oct 30 22:56:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.35
X	  rmtxstatus() -> LLong
X
XMon Oct 29 18:50:51 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.6
X	* star.c 1.94
X	* remote.c 1.34
X	* hole.c 1.24
X	* fifo.c 1.26
X	* device.c 1.8
X	* buffer.c 1.63
X	* table.c 1.10
X	  -> statdefs.h, avoid sys/types.h 
X
XSat Oct 27 15:23:47 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.33
X	  Test for HAVE_NETDB_H for rcmd() in remote.c
X
XSat Oct 27 15:22:46 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.62
X	  Test for HAVE_NETDB_H for rcmd() in remote.c, Test for HAVE_FORK
X
XSat Oct 27 15:10:06 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.25
X	  Test for HAVE_FORK new
X
XWed Oct 10 18:02:44 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.93
X	  number() now accepts 'g' for Giga
X
XWed Oct 10 18:01:36 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.32
X	  rmtaborted() now by default returns EPIPE (to help for sdd -noerror)
X
XTue Oct  9 01:36:07 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.38
X	  sys/types.h & sys/stat.h -> statdefs.h
X
XThu Sep 27 02:49:37 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.61
X	* dirtime.c 1.10
X	* star_unos.c 1.19
X	* star_unix.c 1.37
X	* star.h 1.48
X	  New sumerror messages for xstats.s_settime/xstats.s_setmodes
X
XThu Sep 27 00:51:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.42
X	  Bugfix for double mkfifo after make_fifo() has been added (File exists ...)
X
XThu Sep 27 00:46:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.54
X	  checkdirexclude() reworked
X
XWed Aug 22 22:04:33 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.92
X	  Version -> 1.4a06
X
XWed Aug 22 22:03:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.17
X	  xheader.c/unicode.c/movearch.[hc] new, cpmodes new
X
XWed Aug 22 21:59:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.22
X	  Removed a hint htat -r/-u are non-funktional
X
XWed Aug 22 01:19:37 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.21
X	  Put atime/ctime in default diff mask for pax Format
X
XTue Aug 21 16:56:48 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.5
X	  sprintf() -> js_sprintf()
X
XTue Aug 21 14:47:47 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.21
X	  POSIX.1-200x Enhancements documented
X
XTue Aug 21 14:37:27 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.54
X	  GCC mbracket warning removed
X
XTue Aug 21 14:24:37 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.53
X	  Support for extended POSIX header
X	  pax/exustar/suntar new
X	  
X
XTue Aug 21 02:40:15 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.20
X	  'X' typeflag now only for suntar
X
XTue Aug 21 02:37:25 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.4
X	  Short Name for extended header -> "././@PaxHeader"
X
XTue Aug 21 01:23:58 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.33
X	* append.c 1.16
X	  Nanoseconds implementiert
X
XTue Aug 21 01:13:40 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.36
X	  Nanosecond usage prepared
X
XMon Aug 20 20:16:06 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.19
X	  Support for extended POSIX header
X
XMon Aug 20 19:07:46 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.47
X	* star.c 1.91
X	* props.h 1.11
X	* xheader.c 1.3
X	  Support for Sun tar
X
XMon Aug 20 02:57:32 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.2
X	  addslash fuer gen_text() damit dirs wir immer funktionieren
X
XSun Aug 19 23:43:14 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.10
X	  Support for extended POSIX header
X	  pr_unsuptype()/pr_validtype()/pr_isxheader() new
X
XSun Aug 19 23:39:39 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.20
X	  info_to_xhdr() -> void
X
XSun Aug 19 23:38:48 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.36
X	  F_NSECS new
X
XSun Aug 19 23:38:13 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.46
X	  MAXINT32 & F_NSECS new
X
XSun Aug 19 23:36:50 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.30
X	* create.c 1.53
X	  Support fuer extended POSIX header
X
XSun Aug 19 23:32:05 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xheader.c 1.1
X	  date and time created 01/08/19 22:32:05 by joerg
X
XSat Aug 18 00:54:28 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* unicode.c 1.2
X	  from_utf8() now with *to = 0
X
XSat Aug 18 00:51:41 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.52
X	  is_unsuptype() -> pr_unsuptype()
X
XSat Aug 18 00:46:43 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.45
X	  XF_NOTIME new, is_unsuptype -> pr_unsuptype()
X
XWed Aug 15 22:24:35 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.52
X	  filltcb()/movetcb() new 
X	  tblocks() -> Llong 
X	  llotoa() -> llitos(), astollo() -> stolli() 
X	  otoa() -> litos(), astoo() -> stoli() 
X	  astob() -> stob(), astollb() -> stollb(), btos() -> btos(), llbtoa() -> llbtos()
X
XWed Aug 15 22:04:57 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.90
X	* star.h 1.44
X	  H_EXUSTAR new
X
XWed Aug 15 22:01:16 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.29
X	* hole.c 1.23
X	  llotoa() -> llitos(), astollo() -> stolli()
X
XWed Aug 15 22:00:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.18
X	* star_unix.c 1.35
X	  info->f_xflags new
X
XWed Aug 15 21:56:34 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.19
X	  filltcb()/movetcb() new
X	  tblocks() -> Llong 
X	  xheader.c & unicode.c new
X	  llotoa() -> llitos(), astollo() -> stolli()
X
XTue Aug 14 17:50:12 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* unicode.c 1.1
X	  date and time created 01/08/14 16:50:12 by joerg
X
XTue Aug 14 17:44:31 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.32
X	  Now using movetcb(), info->f_typeflag new
X
XTue Aug 14 17:21:22 2001 jes
X	* fifo.h 1.8
X	* buffer.c 1.60
X	  stats->blocks/stats->parts -> Llong, tblocks() -> Llong
X
XTue Aug 14 17:18:22 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.89
X	* create.c 1.51
X	  tsize -> Ullong, maxsize -> Ullong, Newer -> time_t
X
XTue Aug 14 16:50:45 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.41
X	  Lokal Variable tsize -> tasize
X
XTue Aug 14 16:37:51 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.7
X	* buffer.c 1.59
X	  stats->nblocks new, tblocks() now tries to avoid integer overflows
X
XTue Aug 14 02:25:52 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.43
X	  MAXOCTAL #defines for 8/12 Byte fields
X	  better GNU tar Header description
X	  GNU tar POSIX Bug description with History
X	  Better BAR Header description
X	  f_xflags/f_typeflag new
X	  f_xflags #define's
X
XMon Aug 13 01:00:09 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.58
X	  movetcb() new
X
XSun Aug 12 23:51:01 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.28
X	* hole.c 1.22
X	  Now uses filltcb()
X
XSun Aug 12 23:49:56 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.50
X	* buffer.c 1.57
X	  filltcb() -> buffer.c to make if globally usable
X
XSun Aug 12 15:09:06 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.27
X	  Comment for file size == strlen corrected
X
XSun Aug 12 14:34:09 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.49
X	* append.c 1.15
X	* buffer.c 1.56
X	* longnames.c 1.26
X	  Copyright String with 2001
X
XSun Aug 12 14:24:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.25
X	  movearch.c created & more universal code in movearch.c
X
XSun Aug 12 14:22:38 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* movearch.c 1.26
X	  More universal code for longnames.c & xheader.c
X
XSun Aug 12 14:21:55 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* movearch.h 1.1
X	  date and time created 01/08/12 13:21:55 by joerg
X
XSun Aug 12 14:21:06 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* movearch.c 1.25
X	  Made from longanmes.c
X
XThu Aug  2 01:32:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.h 1.7
X	* remote.c 1.31
X	  rmthostname() Parameter filename -> rmtspec
X
XTue Jul 31 02:48:10 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.88
X	* star.h 1.42
X	* header.c 1.51
X	  H_CPIO -> H_CPIO_BASE, H_PAX new
X
XMon Jul 23 20:48:08 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.41
X	  POSIX-200x extended header typeflags
X
XMon Jul 23 20:47:30 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.55
X	  Check for autodecompression only if not -cflag
X
XMon Jul 23 15:54:13 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.50
X	* remove.c 1.43
X	* create.c 1.48
X	* extract.c 1.40
X	* append.c 1.14
X	* star_unix.c 1.34
X	* diff.c 1.35
X	  printf() -> fprintf(vpr, ...) because of tarf == stdout
X
XSat Jul 21 10:09:38 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.16
X	  remove.c new, parameterized rel: Target
X
XFri Jul 20 11:57:03 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.17
X	* star_unix.c 1.33
X	  make checkarch() better
X
XFri Jul 20 11:56:21 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.54
X	  always call checkarch() to make star -cz work again (Bug since star-1.4a02)
X
XThu Jul 19 18:03:14 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X		* star.c 1.87
X	  Version -> 1.4a04
X
XThu Jul 19 17:52:28 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.9
X	* table.h 1.5
X	* table.c 1.9
X	* props.c 1.18
X	  xttoname_tab[] XT_ to named file type text table new,
X	  xt*tar_tab[] with BOOL content to tell whether a file can be represented in a format
X
XThu Jul 19 01:49:38 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.47
X	  Use is_unsuptype() for files that cannot be dumped
X
XThu Jul 19 01:47:17 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unos.c 1.16
X	* star_unix.c 1.32
X	  correctly set info->f_xftype using switch statement for all file types
X
XThu Jul 19 01:19:33 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.40
X	  Better comment & is_unsuptype() Makro new
X
XThu Jul 19 01:16:57 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.20
X	  Better documentation for remote Syntax
X
XThu Jul 19 01:04:27 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.53
X	  Changed to use new remote.c
X
XTue Jul 17 12:56:06 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.h 1.6
X	* remote.c 1.30
X	  debug -> LOCAL rmt_debug, rmtdebug() new
X
XTue Jul 17 12:48:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.h 1.5
X	* remote.c 1.29
X	  rmtfilename()/rmthostname() new
X
XFri Jul 13 00:04:36 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.42
X	  Return TRUE on successful unlink(file)
X
XThu Jul 12 18:57:23 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.h 1.4
X	* remote.c 1.28
X	  Make struct mtget a Parameter in rmtstatus() -> no more static data
X
XThu Jul 12 18:12:19 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.27
X	  Check for data overflow from rmt Server in rmtread(),
X	  Check if amount of data != sizeof(mts) in rmtstatus(),
X	  rmtgetline() with better debug message
X
XThu Jul 12 01:51:40 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.h 1.3
X	* remote.c 1.26
X	  Definitions for RMT Protocol Version 1 -> remote.h
X
XThu Jul 12 01:22:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.41
X	  Prepare the implementaion of -remove-recursive
X
XThu Jul 12 01:20:05 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.86
X	  Remove "Not Implemented" message for -remove-recursive
X
XThu Jul 12 00:56:45 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.25
X	  call (void)rmtioctl(fd, -1, 0); only if open() suceeded
X
XWed Jul 11 17:49:54 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.40
X	  Cygwin workaround for rmdir() Bug in B20 removed
X
XWed Jul 11 00:54:54 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.52
X	  Add ':' past WARNING
X
XWed Jul 11 00:54:28 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.19
X	  -F -FF... better comment
X
XWed Jul 11 00:53:58 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.46
X	  make-F -FF... fit to BSD tar
X
XTue Jul 10 23:41:25 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.49
X	* props.c 1.17
X	  ULL past unsigned long long constants
X
XTue Jul 10 23:39:22 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.21
X	  & vor Array beseitigt
X
XTue Jul 10 22:34:28 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.39
X	* starsubs.h 1.18
X	* extract.c 1.39
X	  remove_file() from extract.c -> remove.c
X
XSun Jul  8 22:39:38 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.45
X	  fillbytes() -> filltcb() for better Performance
X
XSun Jul  8 22:32:50 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.85
X	  -h Option as in BSD tar,
X	   Version -> 1.4a03,
X	   better comment before docompat()
X
XSun Jul  8 22:28:10 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.24
X	  Default Fifosize -> 8 MB except Linux & sun3,
X	  lock FIFO in memory if root
X
XSun Jul  8 22:22:22 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.39
X	  ldummy in TCB union for alignement
X
XFri Jul  6 01:04:56 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.48
X	  Better XUSTAR recognition
X
XThu Jul  5 03:47:34 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.51
X	  Check for compression only when not in -create mode ...
X
XThu Jul  5 03:25:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.50
X	  ffileread(tarf) -> _niread(fileno(tarf)),
X	  ffilewrite(tarf) -> _niwrite(fileno(tarf),
X	  fseek(tarf) -> lseek(fileno(tarf))
X
XWed Jul  4 23:50:19 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.24
X	  read() -> _niread(), write() -> _niwrite()
X
XTue Jul  3 00:32:25 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.49
X	  Automatic recognition of compression and use of the decompression if the archive is a file
X
XTue Jul  3 00:31:26 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.23
X	  fifo_exit() now checks mp pointer before use because comerr() without FIFO caused Core
X
XTue Jul  3 00:30:33 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.84
X	* star_unos.c 1.15
X	* star_unix.c 1.31
X	  tape_isreg new
X
XMon Jul  2 02:48:48 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.47
X	* starsubs.h 1.17
X	  get_hdrtype() -> EXPORT, get_compression() new
X
XMon Jul  2 01:26:14 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.38
X	  Define compressionstypes
X
XMon Jul  2 00:30:41 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.46
X	  Automatic recognition and swich to signed checksum
X
XSun Jul  1 15:23:07 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.44
X	  Clear reminder of a file (up to 512 byte) to make gzip work more effective
X
XSun Jul  1 15:18:43 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remove.c 1.38
X	* extract.c 1.38
X	  Volheader with size != null now corectly skipped
X
XSun Jul  1 15:12:43 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.16
X	  Max USTAR Filesize is 8 GB-1 and not 8 GB-2
X
XSun Jul  1 15:07:56 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.37
X	  isupper with #undef (already bereits defined on  HP-UX)
X
XFri Jun 29 00:47:43 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.45
X	  Support for Largefiles
X
XThu Jun 28 23:47:31 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.20
X	  Support for Largefiles
X
XThu Jun 28 23:46:24 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.15
X	  LARGEFILES new
X
XThu Jun 28 23:43:21 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.16
X	  neue ll functions in header.c
X
XThu Jun 28 23:38:42 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.8
X	* props.c 1.15
X	* create.c 1.43
X	  props.pr_maxsize new
X
XWed Jun 27 23:44:55 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.36
X	  NODEV past #include sys/param.h, #include sys/param.h with #ifdef
X
XWed Jun 27 19:53:38 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.23
X	* remote.h 1.2
X	* star.h 1.35
X	* buffer.c 1.48
X	* starsubs.h 1.15
X	* star_unos.c 1.14
X	* star_unix.c 1.30
X	* star.c 1.83
X	* movearch.c 1.24
X	* list.c 1.31
X	* longnames.c 1.24
X	* remove.c 1.37
X	* extract.c 1.37
X	* diff.c 1.34
X	* create.c 1.42
X	  Support for largefiles
X
XTue Jun 26 17:46:23 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.8
X	* star_unix.c 1.29
X	* star_unos.c 1.13
X	* star.h 1.34
X	* star.c 1.82
X	* hole.c 1.19
X	* header.c 1.44
X	* fifo.c 1.22
X	* create.c 1.41
X	* buffer.c 1.47
X	* append.c 1.13
X	  curfs: Ulong -> dev_t, Lint messages reduced
X
X*************** Release 1.3.1 *******************
X
XWed Jun 20 23:31:36 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.81
X	  Version -> 1.3.1
X
XMon Apr 30 20:05:49 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.28
X	  Fehler mit _FIOSATIME beseitigt der durch Umstellung auf nanosekunden entstand (tv_usec > 1000000)
X
X*************** Release 1.3 *******************
X
XSat Apr 14 15:28:35 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.80
X	  Version -> 1.3
X
XSat Apr 14 13:26:35 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.79
X	  set back UID only if euid != uid for AIX
X
XSun Apr  8 00:18:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.30
X	  Listing print for Files without Group Execution bit now 'l'
X
XSat Apr  7 23:31:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.29
X	  Major/Minor now unsigned for FreeBSD
X
XSat Apr  7 13:06:01 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* append.c 1.12
X	* create.c 1.40
X	* diff.c 1.33
X	* list.c 1.28
X	* extract.c 1.36
X	  Warning for nsec introduction in future
X
XSat Apr  7 12:25:49 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.27
X	* star_unos.c 1.12
X	* dirtime.c 1.9
X	* header.c 1.43
X	* star.h 1.33
X	  info->f_*time from Ulong -> time_t, info->f_spare? -> info->f_*nsec
X
XSat Apr  7 01:42:10 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.17
X	* star.c 1.78
X	  Options from '_' to '-', -onull now alias for -nullout
X
XSat Apr  7 01:36:44 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.46
X	* extract.c 1.35
X	* diff.c 1.32
X	* list.c 1.27
X	  time.h/timedefs.h -> star.h
X
XSun Mar  4 17:40:02 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.77
X	  Version -> 1.3a10, Copyright 2001
X
XSun Feb 25 21:52:49 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.26
X	  Now using utimdefs.h
X
XSun Feb 25 13:13:07 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.21
X	  Now using mmapdefs.h
X
XFri Feb 23 17:34:45 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.20
X	  Support for mmap() on Apollo Domain/OS with mmap(0, &size, ...)
X
XFri Feb 16 00:45:11 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.42
X	  New comment for Char past digit in octal number
X
XFri Feb 16 00:42:18 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.39
X	  Skip empty lines in file from list= 
X
XFri Feb 16 00:39:07 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* device.c 1.7
X	  Support for dev_t > 32 Bits
X
XMon Jan 15 01:19:01 2001 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.19
X	  %x -> %p Format
X
XWed Nov 15 22:48:21 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* mtio.h 1.2
X	  Restructured, Definitions for ioctl's
X
XWed Nov 15 22:27:16 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.16
X	  Typo removed
X
XWed Nov 15 09:18:16 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.76
X	  -> 1.3a9
X
XWed Nov 15 01:37:16 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.25
X	  HAS_FILIO -> HAVE_SYS_FILIO_H (was a typo)
X
XMon Nov 13 00:06:33 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.75
X	  Using new patmatch() with state[] array for Patterns with unlimited length
X
XSun Nov 12 17:24:46 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.45
X	* starsubs.h 1.14
X	* remote.c 1.22
X	  remote.h from starsubs.h
X
XSun Nov 12 17:23:06 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.h 1.1
X	  date and time created 00/11/12 17:23:06 by joerg
X
XThu Nov  9 10:51:17 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.34
X	  make_copy()/copy_file()/make_fifo() new
X	  create_dirs() now checks if orig file (on disk) has different file type
X
XThu Nov  9 09:36:55 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.44
X	  Printf-like Formate aufgeraeumt, Weitergabe von O_CREAT an remote.c (wird dort behandelt).
X
XThu Nov  9 09:31:36 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.13
X	* header.c 1.41
X	* create.c 1.38
X	* fifo.c 1.18
X	* longnames.c 1.23
X	  Printf-like Formats reworked
X
XThu Nov  9 09:25:23 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* append.c 1.11
X	  Hash code allows append mode for star
X
XThu Nov  9 09:22:16 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.21
X	  Mask Open Modes with O_ACCMODE in numeric mode
X
XThu Nov  9 09:19:33 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.15
X	  Hints for open Modes & Schily rmt
X
XThu Nov  9 08:58:17 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.6
X	  #undef FIFO if no FIFO possible
X
XTue Oct 31 14:09:01 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.17
X	  FIFO for OS/2
X
XFri Aug 11 00:18:49 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.20
X	  O_TEXT new
X	  No more global static data
X	  Prevent buffer overflow on rmtuser
X
XThu Aug 10 22:07:00 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.43
X	  Host -> 128 Bytes, prevent buffer overflow in host
X
XThu Aug 10 11:20:41 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.19
X	  Now using js_snprintf(), Use String Open modes as in GNU rmt
X
XTue Aug  8 17:43:15 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.18
X	  "S" command now without "\n"
X	  send I-1\n0\n after open to inform /etc/rmt about our version
X	  all Members from struct mtget now in autoconf
X	  Mapp  all Opcodes 0..7 for Linux
X	  rmtstatus() now returns NULL on error.
X
XSun Aug  6 01:47:10 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.17
X	  rmtgetstatus() now fetches as many bytes as available from peer
X
XSun May  7 17:54:24 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* device.c 1.6
X	* lhash.c 1.8
X	* dirtime.c 1.8
X	* star_unos.c 1.11
X	* buffer.c 1.42
X	* star_unix.c 1.24
X	* longnames.c 1.22
X	* diff.c 1.31
X	* hole.c 1.18
X	* props.c 1.14
X	* fifo.c 1.16
X	* remote.c 1.16
X	* create.c 1.37
X	* list.c 1.26
X	* header.c 1.40
X	* star.c 1.74
X	  #include <schily.h>
X
XSun May  7 17:44:32 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.73
X	  #include "fifo.h" for #undef FIFO when features are missing
X
XThu Feb 10 01:24:29 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.41
X	  #ifdef USE_REMOTE new
X
XThu Feb 10 01:23:49 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.23
X	  #ifdef HAVE_ST_BLOCKS new
X
XThu Feb 10 01:21:55 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.15
X	  #define USE_REMOTE removed and -> Makefile
X
XThu Feb 10 01:20:51 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.72
X	  #define __XDEV__ for new device.h
X	  CPU/VENDOR/OS with -version
X	  -refresh as alias for -refesh_old_files
X
XThu Feb 10 01:19:18 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.39
X	* device.c 1.5
X	  #define __XDEV__ for new device.h
X
XThu Feb 10 01:16:27 2000 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.32
X	  is_fifo() Makro new
X	   max/min #undef for QNX
X
XSun Dec 19 15:48:20 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.36
X	* starsubs.h 1.12
X	  open Paramter clash for Linux removed
X
XSun Nov 21 01:00:26 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.15
X	  Support for OS/2 shared memory
X
XFri Nov 12 12:42:27 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.38
X	  rdevmin ist only 7 bytes in mod 256, rdevvmin -> 0 for non devices for maximum POSIX compatibility
X
XFri Nov 12 12:30:54 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.71
X	  -copylinks new
X
XTue Sep 14 19:56:16 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.37
X	  astob()/btoa() new
X	  -i now works again although better messages about tar type have been introduced
X	  write 7 bytes into 8 Byte fieds with USTAR
X	  -modebits allows to have more than 12 Bits into t_mode
X	  DEV_MINOR_NONCONTIG new
X	  -hpdev allows to have 24 Bits in devminor like the HP method
X	  base 256 allows 32 Bits in devminor
X
XTue Sep 14 19:18:08 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.22
X	  Now using local lokale major()/minor() Macros
X	  New function snulltimes()
X
XTue Sep 14 18:45:45 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.70
X	  -hpdev/-modebits new
X
XTue Sep 14 14:11:01 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.33
X	  xt_file() modified to make ret == -1 with hard errors
X	  Now calling snulltimes() if an extraction error occurred
X	  Now calling fsync() before calling fclose() for NFS consistence
X
XTue Sep 14 14:06:19 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.11
X	* buffer.c 1.40
X	* longnames.c 1.21
X	* hole.c 1.17
X	* diff.c 1.30
X	* buffer.c 1.39
X	  Modified for changes in function xt_file(), new function die()
X
XWed Sep  8 01:06:54 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	  Hack to avoid gcc inuninitialized err
X
XSun Aug 22 14:26:41 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.38
X	  Now handling EFBIG (write() == 0) and fifoexit() new to avoid error message if another message was already pringed
X
XSun Aug 22 14:21:30 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.14
X	* fifo.h 1.5
X	* starsubs.h 1.10
X	  fifo_exit()/FIFO_EXIT new
X
XTue Jul 13 10:50:26 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.36
X	  Typo in get_volhdr() Prototype.
X
XTue Jul 13 08:14:10 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.32
X	* star.1 1.14
X	* star.c 1.69
X	  New Option -refresh_old_files
X
XTue Jul 13 01:41:49 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.31
X	  HAVE_LONGLONG instead of SVR4
X
XFri Jun 18 02:50:06 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.31
X	  DOS Filesystem time workaround always active because a DOS FS
X	  may also bei present on UNIX
X
XFri Jun 18 02:44:19 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.25
X	  Paranoia while copying filenames: clear PATH_MAX index.
X
XFri Jun 18 02:40:21 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.30
X	  PATH_MAX now is minimal 1024
X
XFri Jun 18 02:38:40 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.20
X	  get_tcb() past void_file() on extract if Filename too long
X
XFri Jun 18 02:31:50 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.35
X	  fileopen() with "b" Binary for DOS, test for HAVE_SEEKDIR
X
XTue Jun 15 01:33:26 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.6
X	  common long diffopts -> extern long diffopts
X
XTue Jun 15 01:32:30 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.68
X	  common diffopts -> int difftopts (data)
X
XTue Jun 15 01:31:50 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.14
X	  common int debug -> extern BOOL debug
X
XTue Jun 15 01:31:00 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.13
X	  debug int -> BOOL
X
XTue Jun 15 01:30:02 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.13
X	  debug int -> BOOL, shmflag common -> extern
X
XSun Jun  6 17:30:00 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.21
X	  #ifndef S_IFLNK -> #ifndef HAVE_LSTAT, #ifndef SVR4 -> #ifndef HAVE_LCHOWN
X
XSun Jun  6 17:27:30 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.20
X	  Workaround for DOS problem with set time & Read Only Files
X
XSun May  2 16:36:12 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.19
X	  Now using S_IS???() macros
X
XSun May  2 16:34:06 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.30
X	  Timestamp for DOS is always modulo 2
X	  Workaround for ENOTEMPTY & GYGWIN32 when doing rmdir(file)
X
XSun May  2 16:32:26 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.37
X	  O_BINARY & "b" for DOS
X
XSun May  2 03:26:40 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.29
X	  To allow DOS use "b" for fileopen()
X	  Do not remove '/' for symlinks
X
XSun May  2 03:25:58 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.29
X	  For DOS, use  "b" for fileopen()
X
XSat Feb  6 19:05:38 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.35
X	  Compress/gzip recognition and printout if an unknown format is found
X
XMon Jan 25 21:18:48 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.28
X	  Typo in Parameter
X
XSun Jan 24 14:42:54 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.9
X	* header.c 1.34
X	* extract.c 1.27
X	  Check VOLHDR on extract.
X
XSun Jan 24 14:32:39 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.13
X	  New option -bz.
X
XSun Jan 24 14:31:47 1999 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.66
X	* buffer.c 1.35
X	  New option -bz, Check VOLHDR on extract.
X
XSat Nov 21 13:50:51 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.18
X	* star.c 1.65
X	* header.c 1.33
X	* device.c 1.4
X	  #include <sys/types.h> for #include <device.h> and SCO
X
XSat Nov 21 13:47:59 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.64
X	  call closepattern() if -c und !cflag in match() to allow pat= to
X	  work with -c flag
X
XSun Nov 15 19:26:23 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.32
X	  Warning for partial EOF Blocks (only 1 EOF block)
X
XFri Nov 13 00:02:08 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.31
X	  Workaround for ptb->dbuf.t_name[NAMSIZ] == '\0' (buggy Sun tar)
X
XTue Nov 10 00:29:08 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.34
X	  Don't use get_block() to allocate TCB buffer if -p Flag & directory
X
XSun Nov  8 18:31:09 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.29
X	  New descrition on how to recognise xstar archives
X
XSun Nov  8 01:18:35 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.12
X	  -h Option removed
X
XSun Nov  8 00:43:31 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.30
X	  isxmagic() enhanced
X	  force t_prefix[130] = '\0' for xstar
X
XSun Nov  8 00:00:06 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.33
X	  _fileopen()/_fileread() new
X	  put_file(FILE *) -> put_file(int *)
X
XSat Nov  7 23:59:01 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.16
X	* starsubs.h 1.8
X	  _fileopen()/_fileread() new
X	  put_file(FILE *) -> put_file(int *)
X	  put_sparse(FILE *) -> put_sparse(int *)
X
XSat Nov  7 21:20:10 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.7
X	* star_unix.c 1.17
X	  rs_acctime(FILE *f, ...) -> rs_acctime(int fd, ...)
X
XSat Nov  7 18:09:39 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.12
X	  USE_SHM -> USE_USGSHM (similar to cdrecord)
X
XSat Nov  7 18:06:12 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.63
X	  Converted to use dirdefs.h/maxpath.h/getcwd.h
X	  USE_SHM -> USE_USGSHM (similar to cdrecord)
X	  usage() for bad Compat Option
X
XSat Nov  7 17:55:32 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.28
X	  star_ext_header -> xstar_ext_header
X	  xstar_in_header better modeled similar to xstar_header (t_prefix[])
X
XSun Sep 13 18:22:33 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.32
X	* extract.c 1.26
X	* header.c 1.29
X	* list.c 1.24
X	* star_unix.c 1.16
X	* diff.c 1.28
X	  Converted to use dirdefs.h
X
XSun Sep 13 17:02:56 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.25
X	  Recognition of unexpected end of archive even if amount % 512 != 0
X	  EEXIST now yields to removes the File in get_file()
X
XSun Sep 13 16:23:21 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.15
X	* buffer.c 1.34
X	  BSD4_2 define removed
X
XSun Sep 13 16:19:20 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.33
X	  converted to use vadefs.h
X
XMon Aug 10 23:42:03 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.62
X	  backtape() call new to allow -u & -r
X	  -u/-r enabled
X	  no_fifo = TRUE for -u/-r
X	  D_SPARSE/sparse new for -diff
X	  H_XUSTAR new
X
XMon Aug 10 23:39:34 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.28
X	  H_XUSTAR without "tar" magic new 
X	  hdrtxt[] enhanced for H_XUSTAR
X	  isxmagic() new
X
XMon Aug 10 04:06:27 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.6
X	  markeof() / backtape() / mtioctl() / mtseek() / update_newer() new
X
XMon Aug 10 04:05:01 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.32
X	  markeof() / backtape() / mtioctl() / mtseek() new
X	  syncbuf() corrected 
X	 -nullout enhanced for -rflag/-uflag
X
XMon Aug 10 03:46:56 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.27
X	  D_TYPE if Statement remodeled to make it more readable
X	  D_SPARS new
X	  Don't evaluate D_SIZE for hard links
X
XMon Aug 10 03:42:59 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.27
X	  H_XUSTAR new
X	  comment for recognition of xstar
X
XMon Aug 10 03:41:43 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.12
X	  H_XUSTAR new
X
XMon Aug 10 03:41:15 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.31
X	  checkdirexclude() / checkexclude() new
X	  xstats Support new
X	  uflag / update_newer() Support new
X
XSun Aug  9 20:41:36 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.15
X	  change from  fileseek() -> lseek() to fix Sparse Problems on FreeBSD & Linux
X
XSun Aug  9 16:42:24 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.5
X	  new Option D_SPARS
X
XSun Aug  9 14:52:15 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.19
X	  s_toolong Increment for cannot split correctly moved to coditional part.
X
XThu Jul 30 00:22:10 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.4
X	  lastsize new for append Option
X
XMon Jul  6 02:09:37 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.61
X	  copt[] -> *copt for K&R automatic Vars
X
XSun Jul  5 23:05:38 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.27
X	  numeric now works in create Mode too
X
XSun Jul  5 23:02:47 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.7
X	  Cachesize enhanced from 1 -> 16 and new Code
X
XSun Jul  5 21:48:12 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.60
X	  filename() new
X	  -F Option new
X	  checkerrs() new
X	  -w Option in Usage
X	  av[0] == "tar" now uses  xstar Format as default
X
XSun Jul  5 21:36:25 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.14
X	* diff.c 1.26
X	* extract.c 1.24
X	* longnames.c 1.18
X	  xstats new
X
XSun Jul  5 21:14:38 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.31
X	  checkerrs() new
X	  Allow overwriting of empty files in compat mode (tar cf <filename>)
X
XSun Jul  5 21:05:29 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.5
X	  checkerrs() and filename() new
X
XSun Jul  5 20:35:49 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.26
X	  struct star_stats enhanced
X
XThu Jul  2 23:12:58 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.59
X	  nameprefix() nee
X	  namefound() new
X	  addarg() new
X	  addfile() new
X	  File selection for Extraction now compatible to old tar
X
XThu Jul  2 21:45:39 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.23
X	* extract.c 1.23
X	* diff.c 1.25
X	* create.c 1.30
X	* append.c 1.10
X	  npat -> havepat
X
XThu Jul  2 01:54:31 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.25
X	* lhash.c 1.7
X	* remote.c 1.13
X	* longnames.c 1.17
X	* list.c 1.22
X	* hole.c 1.13
X	* header.c 1.26
X	* fifo.c 1.11
X	* extract.c 1.22
X	* create.c 1.29
X	* buffer.c 1.30
X	* star.c 1.58
X	  BAD -> EX_BAD
X
XThu Jul  2 01:35:33 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.25
X	  Print warning if found more than 12 Bits in mode Feld
X
XThu Jul  2 01:33:37 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.57
X	  include getargs.h
X	  __malloc()/__savestr() new
X	  docompat() for old option syntax new
X	  fcompat new
X	  -version pption new
X	  -h Option removed
X	  -w Option new
X	  av[0] == "ustar" fixed
X	  av[0] == "tar" new 
X
XMon Jun 29 21:37:07 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.29
X	  fcompat new (Option compat for old tar)
X
XMon Jun 29 21:36:27 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.4
X	  __malloc()/__savestr() new
X
XWed Jun 24 19:41:04 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.11
X	  _FIOAI Bug description removed
X
X*************** Release 1.2 *******************
X
XTue Jun 23 03:00:40 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.12
X	  Support for sun ioctl() _FIOAI
X
XTue Jun 23 02:48:38 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.24
X	  Enhanced comment for F_HAS_NAME
X
XTue Jun 23 02:47:07 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.21
X	  If -listnew is specified, svae Linkname
X	  If -listnew only try to list file if a file was really found
X
XTue Jun 23 02:40:44 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.24
X	  If F_HAS_NAME is set retain f_lname and don't read LF_LONGLINK/LF_LONGNAME to retain f_name too
X
XSun Apr  5 17:02:49 1998 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.14
X	  Add 2nd chmod() past chown() if the suid/sgid/svtx Bit is set for Linux
X
XSat Dec  6 01:48:47 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.28
X	  Fix problem that caused Coredump without fifo on -nullout 
X
XSun Nov  9 15:27:23 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.10
X	  -dodesc option new
X	  _FIOAI Documented
X
XSun Nov  9 15:26:18 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.56
X	  Do dochdir() on listfile= too.
X
XTue Jun 24 11:06:15 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.27
X	  Don't call checkarch() if -nullout to avoid core dump
X
XSun Jun 22 19:33:14 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.55
X	  New Option -dodesc
X
X*************** Release 1.1 *******************
X
XSun Jun 15 19:11:04 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.9
X	  Additions for Release 1.1
X
XSun Jun 15 19:10:17 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.23
X	  is_bdev() is_cdev() & is_dev() new, struct star_stats started
X
XSun Jun 15 19:09:28 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.54
X	  -C flag correct and complete implementation
X	  -z flag, -xdir flag
X	   xstats struct new
X	   NPAT from 10 to 100
X	   #include <patmatch.h> for MAXPAT
X	   tape_dev & tape_ino for archive recogniction
X	   getdir() new, dogetwdir() new, dochdir() new, closepattern() new
X	   H_USTAR is default if av[0] == "ustar"
X	   getenv("STAR_FIFO_SIZE")
X	   addpattern() stores dir & allocates aux array
X	   wait() as loop
X	   closetape for -z flag
X
XSun Jun 15 17:50:35 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.24
X	  Need to test ino *and* dev for hard links
X
XSun Jun 15 15:49:06 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.13
X	  checkarch() new to prevent archive file to be archived
X
XSun Jun 15 15:26:38 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.23
X	  Better EOF handling (text for GNU tar)
X
XSun Jun 15 15:20:22 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.23
X	  Compare filetype only if no hardlink or star format
X	  Compare rdev only for char/blk device
X
XSat Jun 14 20:03:12 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.21
X	  -xdir flag new
X	  remove_first new, force_remove new, ask_remove new
X	  isfirst in remove_file()
X
XSat Jun 14 18:54:12 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.3
X	  checkarch() new
X
XSat Jun 14 18:46:59 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.26
X	  verbose print modified for -z flag
X	  checkarch() new
X	  activate multblk (-B) for -z flag
X
XSat Jun 14 16:53:44 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.28
X	  is_tape() new, archiv will not be dumped anymore
X
XSat Jun 14 16:28:41 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.10
X	  initfifo corrected: don't call mkshm()/mkshare() twice if both USE_* activ
X
XSat Jun 14 16:09:09 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.20
X	  verbode print output file now extern variable for -z flag
X
XMon Jun  9 21:37:57 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.25
X	  -z gzip Compression new
X
XFri Jun  6 00:02:37 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.22
X	* buffer.c 1.24
X	* create.c 1.27
X	* hole.c 1.11
X	* star.c 1.53
X	  New Option -nullout
X
XTue Jun  3 03:15:15 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.52
X	  New Options -force_remove -ask_remove -remove_first -remove_recursive
X
XTue Jun  3 01:57:55 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dir.h 1.4
X	  SVR4 -> HAVE_DIRENT_H
X
XSun Jun  1 16:16:18 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.11
X	  include mconfig.h
X
XSun Jun  1 16:16:17 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* append.c 1.9
X	  include mconfig.h
X
XFri May 30 01:12:08 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.16
X	  Avoid strcatl() for speed
X	  f_name/f_lname bug and bug with non-initialized m_add
X
XFri May 30 01:00:40 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.10
X	  If sparse_in_hdr == 0 extended is always true
X	  EDEBUG '(', TCB local if allocated Block is in buffer
X
XFri May 30 00:50:23 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.20
X	  remove_file() core dump if not called interactiv (-I).
X
XFri May 30 00:43:48 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.6
X	  avoid strncpy() by inserting a NULL bytes into the string
X
XFri May 30 00:35:42 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.51
X	  file_raise() uses global flag
X
XFri May 30 00:23:38 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.26
X	  createi() with namlen, fileopen() without "u", file_raise() now global in main()
X
XFri May 30 00:10:37 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.22
X	  Do not compare filetype on hardlinks
X
XSun May 11 17:52:24 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.19
X	  fileread() -> ffileread(), filewrite() -> ffilewrite()
X
XSun May 11 17:52:23 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.9
X	  fileread() -> ffileread(), filewrite() -> ffilewrite()
X
XSun May 11 17:52:23 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.21
X	  fileread() -> ffileread(), filewrite() -> ffilewrite()
X
XSun May 11 17:52:22 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.25
X	  fileread() -> ffileread(), filewrite() -> ffilewrite()
X
XSat May 10 22:51:48 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.21
X	  strcpy() -> inline byte copy
X
XFri May  9 21:25:18 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.15
X	  NAMSIZ -> props.pr_maxsname/props.pr_maxslname
X
XFri May  9 21:25:17 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.24
X	  NAMSIZ -> props.pr_maxsname/props.pr_maxslname
X
XFri May  9 21:24:58 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.20
X	  NAMSIZ -> props.pr_maxsname/props.pr_maxslname
X	  devmajor/devminor for GNU tar only if CHR/BLK
X
XFri May  9 17:38:02 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.19
X	  If F_TCB_BUF Flag is true TCB must be copied
X
XFri May  9 17:26:09 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.23
X	  TCB allocated from buffer if namelen < props.pr_maxsname
X
XFri May  9 17:09:52 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.23
X	  get_block() & put_block() new
X
XFri May  9 17:07:49 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.7
X	* props.c 1.10
X	  pr_maxsname & pr_maxslname new, pr_fillc to the top
X
XFri May  9 17:07:49 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.2
X	  get_block() & put_block() new
X
XFri May  9 16:59:56 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.22
X	  F_TCB_BUF & F_ADDSLASH new
X
XFri May  9 16:58:15 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.14
X	  Bug that caused very long directory names from command line to overwrite the stack (av[i+1)
X
XFri May  9 00:51:57 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.22
X	  hashlist for linklist, cr_file() needs one read() less, fileopen() only if siz > 0
X
XThu May  8 23:42:28 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.18
X	  checksum() faster, strncpy(..."00") becomes two assignements, otoa() faster
X
XThu May  8 21:40:42 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.6
X	* props.c 1.9
X	  pr_fillc new
X
XThu May  8 21:28:36 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.50
X	  -I usage better readable
X
XFri May  2 23:43:22 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.20
X	  Option -tpath also for -diff
X
X*************** Release 1.0 *******************
X
XTue Apr 29 00:52:53 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.18
X	  Bug in remove_file() that caused infinite loops with no permission to remove
X
XMon Apr 28 03:41:54 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.8
X	  Type, new Options -wready and -tpath, Section LIMITATIONS
X
XMon Apr 28 02:54:23 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.19
X	  Problem with Posix-Compatibility of new format.c (info->f_?maxlen == 0)
X
XMon Apr 28 02:02:09 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.8
X	* props.c 1.8
X	  SPARSE_IN_HDR for star/xstar is now 0
X
XMon Apr 28 01:58:55 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.5
X	* props.c 1.7
X	  New Props Member: sparse_in_hdr
X
XMon Apr 28 01:52:30 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.9
X	  Comment for shmat()
X
XMon Apr 28 00:44:26 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.21
X	  Better comment
X
XSun Apr 27 23:54:23 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.49
X	* list.c 1.18
X	  New Option -tpath
X
XSun Apr 27 23:53:16 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.3
X	* buffer.c 1.22
X	  stats->blocksize new: the display was wrong if blocksize < bigsize and we were using the fifo
X
XSun Apr 27 20:06:24 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.21
X	  New option -wready, fileread() -> ffileread()
X
XSun Apr 27 20:05:40 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.48
X	  New option -wready
X
XSun Apr 27 19:54:10 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.17
X	  New function remove_file()
X
XMon Jan 27 18:57:50 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.21
X	  rs_acctime() only if f != NULL (otherwise coredump)
X
XSun Jan 26 19:35:42 1997 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.8
X	  _SC_PAGE_SIZE definition -> unixstd.h
X
XWed Nov 27 23:29:15 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.7
X	  USE_SHM now default. No more Problemes if mmap() is not properly working.
X
XWed Nov 27 23:13:40 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.16
X	  directories now are not extracted if they are not more recent
X	  same_symlink() new (symlink will not be extracted if  it points to the same name but is newer)
X
XWed Jun 26 11:59:47 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* device.c 1.2
X	  K&R C (does not grok 1234U constants)
X
XWed Jun 26 11:50:53 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* mtio.h 1.1
X	  date and time created 96/06/26 10:50:53 by joerg
X
XWed Jun 26 11:47:44 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.12
X	  info->f_rdev handling now OK (no more getting negative)
X
XWed Jun 26 11:45:45 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.47
X	  SIGDEFER new
X
XWed Jun 26 11:45:12 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.12
X	  SIGDEFER new, local & remote user corrected in rmtgetconn(), several #defines in struct mtget
X
XWed Jun 26 11:43:39 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.17
X	  Old Code from get_hdrtype() removed
X
XThu Jun 13 22:10:33 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* xutimes.h 1.1
X	  date and time created 96/06/13 21:10:33 by joerg
X
XThu Jun 13 22:07:38 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.h 1.1
X	  date and time created 96/06/13 21:07:38 by joerg
X
XThu Jun 13 22:05:18 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* starsubs.h 1.1
X	  date and time created 96/06/13 21:05:18 by joerg
X
XThu Jun 13 22:02:15 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* device.c 1.1
X	  date and time created 96/06/13 21:02:15 by joerg
X
XThu Jun 13 21:49:59 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.11
X	  switch cast -> int & utimes() -> sutimes()
X
XThu Jun 13 21:47:46 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.3
X	  S_IFSHAD * cpio acl
X
XFri May 31 01:26:08 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.10
X	* header.c 1.16
X	  Now using dev_*() Macros
X
XFri May 31 00:58:10 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.46
X	  dev_init() new
X
XTue May 28 23:02:05 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.14
X	  Now using Prototypes
X
XTue May 28 22:58:41 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.9
X	  Now using Prototypes & sdirtimes() & sutimes() & sxsymlink() new with info Pointer
X
XMon May 27 14:06:55 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.19
X	  Type modifications for ANSI Prototypes
X
XMon May 27 14:06:00 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.2
X	  Multiplexed char, multiplexed block & Solaris Door new
X
XMon May 27 14:03:42 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.45
X	* remote.c 1.11
X	* props.c 1.5
X	* names.c 1.4
X	* longnames.c 1.12
X	* list.c 1.16
X	* lhash.c 1.5
X	* hole.c 1.6
X	* header.c 1.15
X	* fifo.c 1.5
X	* append.c 1.7
X	* buffer.c 1.19
X	* create.c 1.19
X	  Now using Prototypes
X
XMon May 27 13:47:34 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.6
X	  Now using Prototypes && sdirtimes() new with info pointer
X
XMon May 27 13:46:12 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.18
X	  Now using Prototypee && parenthesis bug on D_TYPE removed
X
XFri Apr  5 22:50:51 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.8
X	  #endif lint -> #endif for ANSI, mconfig.h
X	  __hpux added for 1024 Bytes st_blocksize
X	  HAVE_UTIMES, HAVE_UTIME_H new, utimes simulation new
X
XFri Apr  5 22:40:14 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.44
X	  #endif lint -> #endif for ANSI, HAVE_SETREUID, HAVE_SETEUID new
X
XFri Apr  5 22:35:31 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.10
X	  #endif lint -> #endif for ANSI, HAVE_SYS_MTIO_H, HAVE_MTGET_DSREG, MTxxx > 7 in #ifdef
X
XFri Apr  5 21:37:56 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.18
X	  f_spare* not even for BSD4_2
X
XFri Apr  5 21:36:48 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.4
X	  #endif lint -> #endif for ANSI, _SC_PAGE_SIZE (HP/UX & OSF), MAP_ANONYMOUS (HP/UX)
X
XFri Apr  5 20:55:38 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* lhash.c 1.4
X	  #endif lint -> #endif for ANSI, mconfig.h -> HAVE_STDLIB_H
X
XFri Apr  5 20:50:13 1996 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.14
X	  #endif lint -> #endif for ANSI, f_spare* not even for BSD4_2
X
XSat Dec 30 01:06:51 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.13
X	* dirtime.c 1.5
X	* create.c 1.18
X	* buffer.c 1.18
X	* props.c 1.4
X	* table.c 1.6
X	* names.c 1.3
X	* longnames.c 1.11
X	* hole.c 1.5
X	* diff.c 1.17
X	* append.c 1.6
X	* list.c 1.15
X	  #endif lint -> #endif for ANSI
X
XWed May 24 23:42:05 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.13
X	  create info->f_rdev even for star format from f_rdevmaj & f_rdevmin 
X
XWed May 24 17:22:34 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.12
X	  make_dir() to allow ANSI (dirs without '/' on the end)
X
XWed May 24 14:42:35 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.4
X	  Several changes to allow ANSI (dirs without '/' on the end)
X
XMon May 22 03:27:43 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.13
X	  gnulib for long long on sun3
X
XMon May 22 03:23:54 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.17
X	  nowarn var
X
XMon May 22 03:22:06 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.16
X	  ulong -> Ulong, l_nlink < 0 testing
X
XMon May 22 03:18:10 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.43
X	* longnames.c 1.10
X	* list.c 1.14
X	* header.c 1.12
X	  ulong -> Ulong
X
XMon May 22 03:13:44 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.17
X	  prstats() now using long long
X
XMon May 22 03:11:47 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.16
X	  ulong -> Ulong, long long new
X
XMon May 22 00:52:37 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.6
X	  ulong -> Ulong, chown() -> lchown()
X
XMon May 22 00:50:23 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.12
X	  -Dchown=lchown for SVR4 removed
X
XSat May 20 20:52:23 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.42
X	  patmatch() -> unsigned char
X
XSat May 20 20:17:47 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.11
X	  t_name[NAMSIZ] = '\0' Hack moved to the back, for using t_uid on Solaris tar.
X
XMon Apr 24 18:31:18 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.41
X	  hdrtype default: H_XSTAR, -qic250 Option, -T option, Signalhandler even for extract
X
XMon Apr 24 18:30:38 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.7
X	  -T Option, -qic250 Option
X
XMon Apr 24 18:28:43 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.10
X	  extern char *strcatl(); removed for ... Prototyp in standard.h
X
XTue Apr 18 17:02:29 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.6
X	  -p Option in create (directories last) & SIGNALS
X
XTue Apr 11 18:41:37 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.5
X	  description for ./ handling 
X
XTue Apr 11 18:28:41 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.4
X	  Several enhancements for FEATURES & Pathnames
X
XFri Apr  7 01:23:18 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.9
X	  raise() -> raisecond()
X
XFri Apr  7 01:05:00 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.15
X	  _FIOSATIME with rs_acctime() new.
X
XFri Apr  7 00:49:47 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.5
X	  rs_acctime new
X
XFri Apr  7 00:47:35 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.40
X	  Typo in  -help
X
XWed Apr  5 21:53:07 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.3
X	  Minor changes
X
XTue Apr  4 18:18:19 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.2
X	  First release of the man page
X
XTue Apr  4 07:09:28 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.1 1.1
X	  date and time created 95/04/04 06:09:28 by joerg
X
XWed Mar  1 01:51:30 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.14
X	  errno -> 0 und geterrno() around telldir() und seekdir() for recognition Bug in seek on Directory in Filesystemcode (/dev/fd)
X
XWed Mar  1 01:46:47 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.39
X	* remote.c 1.9
X	  signal() -> sigset() in SVR4 (reliable)
X
XWed Mar  1 01:45:47 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.3
X	  loop around read() in swait() for EINTR in SVR4
X
XThu Feb 16 14:57:51 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.16
X	  swabbytes() into libschily
X
XSat Feb 11 23:12:15 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.38
X	* buffer.c 1.15
X	  new Option -fifostats
X
XSat Feb 11 22:08:01 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.4
X	* header.c 1.9
X	  SYS5_4 -> SVR4 new define
X
XSat Feb 11 22:04:43 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dir.h 1.2
X	  sys/dir.h -> dirent.h for SVR4
X
XSat Feb 11 21:58:52 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.8
X	  extern int errno; -> #include <errno.h>, find() -> strchr(), signalhandler with arg for SVR4
X
XSat Feb 11 21:56:10 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.37
X	  setreuid(-1, getuid()) -> seteuid(getuid()), find() -> strchr(), signalhandler with arg for SVR4
X
XSat Feb 11 21:53:03 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.3
X	  extern int errno; -> #include <errno.h>
X
XSat Feb 11 21:19:35 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.2
X	  getdtablesize() -> sysconf(_SC_OPEN_MAX), roundup local for SVR4 & bzero() -> fillbytes()
X
XSat Feb 11 21:18:10 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.13
X	  getdtablesize() -> sysconf(_SC_OPEN_MAX) for SVR4
X
XSat Feb 11 21:12:41 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.14
X	  find() -> strchr()
X
XFri Feb 10 15:58:55 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.13
X	* append.c 1.5
X	* extract.c 1.11
X	* diff.c 1.16
X	  finfo init with fillbytes (for f_flags * F_HAS_NAME)
X
XFri Feb 10 15:41:17 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.15
X	  abs_path & skip_slash() slightly modified
X
XFri Feb 10 15:40:48 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.10
X	  abs_path & skip_slash() new but mot jet ready
X
XFri Feb 10 15:35:43 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.12
X	  abs_path & skip_slash() prepared
X
XFri Feb 10 02:13:00 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.36
X	  chdrtype was without -H-Flag for -create modified
X
XFri Feb 10 00:43:39 1995 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.7
X	  RMT_VERSION 1 Commands
X
XWed Nov 23 20:13:56 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.35
X	* diff.c 1.14
X	  New var abs_path
X
XWed Nov 23 03:52:04 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.8
X	  oldtar var removed & hdrtype display new
X
XTue Nov 22 16:32:25 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.1
X	  hdrtxt[] in header.c new
X
XTue Nov 22 16:31:38 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.34
X	  oldtar var removed
X
XMon Nov 21 20:13:37 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.33
X	  oldtar handling new
X
XMon Nov 21 19:55:41 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.13
X	  PATH_MAX Macro modified
X
XMon Nov 21 19:43:31 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.10
X	  fifo.c new
X
XMon Nov 21 19:31:26 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.13
X	* star.c 1.32
X	  Modified for fifo
X
XMon Nov 21 19:30:24 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.7
X	  swabbytes modified for Fifo  & check == 0 (correct EOF recognition)
X	  Volheader Hack for list Module (save name[NAMESIZ] & linkname[NAMSIZ])
X
XMon Nov 21 17:47:47 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.4
X	  sparse Option
X
XMon Nov 21 17:40:03 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.c 1.1
X	  date and time created 94/11/21 17:40:03 by joerg
X
XMon Nov 21 15:55:22 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.12
X	  xstar Format
X
XMon Nov 21 13:14:27 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.13
X	  limit transfer size in cmp_file to  bigsize == allocated diff buf
X
XMon Nov 21 13:12:47 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.6
X	  better errno display
X
XMon Nov 21 12:12:35 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* fifo.h 1.1
X	  date and time created 94/11/21 12:12:35 by joerg
X
XSat Nov 19 17:04:42 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.3
X	* props.c 1.3
X	  VOLHDR new
X
XSat Nov 19 16:57:37 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.9
X	  Changes for fifo 
X	  keep_old Flag & Volhdr
X
XSat Nov 19 16:54:15 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.11
X	  Changes for fifo 
X	  LNKTYPE Bug
X
XSat Nov 19 16:48:59 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.12
X	* longnames.c 1.8
X	  New functionality for tcb_to_name
X
XSat Nov 19 15:30:55 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.5
X	  Bug when reading 0 Bytes
X
XSat Nov 12 18:01:09 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.12
X	  cmp_sparse
X
XFri Nov 11 13:57:27 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.2
X	* props.h 1.2
X	  several new Flags (LONG NAMES, SPARSE ...)
X
XFri Nov 11 13:55:13 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.6
X	  better checksum
X	  better Tar recognition
X	  SPARSE & xstar Format
X
XFri Nov 11 13:52:56 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.10
X	  list_tcb -> list_file without TCB Parameter & SPARSE &
X	  cr_file with new Parameter
X	  better recognition for File changed size
X
XFri Nov 11 13:41:03 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.8
X	  list_tcb -> list_file without TCB Parameter & SPARSE Files
X
XFri Nov 11 13:39:11 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.7
X	  tcb_undo_split & cr_file with new Parameter
X
XFri Nov 11 13:37:54 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.31
X	  new Header Type xstar
X
XFri Nov 11 13:37:01 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.11
X	* list.c 1.11
X	* append.c 1.4
X	  list_tcb -> list_file without TCB Parameter
X
XMon Oct 31 22:38:41 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.5
X	  put_tcb new and better
X	  create gnutar too
X
XMon Oct 31 22:35:51 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.10
X	  omit call to name_to_tcb()
X
XMon Oct 31 22:34:57 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.6
X	  name_to_tcb interface new
X	  add "/" even on  very long Filenames
X
XMon Oct 31 22:32:36 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.9
X	  name_to_tcb interface new
X
XMon Oct 31 18:52:05 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.8
X	  Longname handling new
X	  long name dirs corrected
X
XMon Oct 31 18:50:58 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.5
X	  Longname handling new
X
XMon Oct 31 18:49:46 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.30
X	  sparse option
X
XMon Oct 31 18:00:32 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.11
X	* star_unix.c 1.2
X	  info->f_flags new
X
XMon Oct 31 14:47:03 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.5
X	  xttost (xt to star) table corrected
X	  Index 20-32 is not always F_SPEC
X
XMon Oct 31 14:45:06 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.29
X	  Uname & Gname diff
X	  Several mods for very long Filenames
X
XMon Oct 31 14:42:11 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.3
X	  UNAME & GNAME Option
X
XMon Oct 31 14:41:38 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.4
X	* longnames.c 1.4
X	* list.c 1.10
X	* hole.c 1.3
X	* extract.c 1.7
X	* diff.c 1.9
X	* create.c 1.7
X	* append.c 1.3
X	  Several mods for very long Filenames
X
XMon Oct 31 14:39:09 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.9
X	  props.c & props.h for gnutar & very long Filenames
X
XMon Oct 31 14:37:46 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.h 1.1
X	  date and time created 94/10/31 14:37:46 by joerg
X
XMon Oct 31 14:37:45 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* props.c 1.1
X	  date and time created 94/10/31 14:37:45 by joerg
X
XThu Oct 27 22:17:18 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.6
X	  empty unreadable Files now on tape
X
XWed Oct 26 15:26:51 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.8
X	  include Path corrected (star/new -> star)
X
XWed Oct 26 14:29:29 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.3
X	  New Filetype system with Tables (remove rest if tested enough)
X
XSat Oct  8 13:14:10 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.8
X	  first read tcb then mod diffopts to avoid wrong atime & ctime comparison with ustar & oldtar
X
XFri Oct  7 23:05:14 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.4
X	  xttost_tab corrected
X
XFri Oct  7 22:53:57 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.3
X	  Several Filetypes mapped to S_IFREG, mappt for non existence
X
XFri Oct  7 21:15:45 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.2
X	  xttous_tab socket from \0 -> REGTYPE
X
XFri Oct  7 14:28:45 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* header.c 1.2
X	  bar & more cpio recognition
X	  Record Numberprintf on errors
X	  First ustar create Support
X	  star_unix.c extracted
X	  devminorbits for SYSV support
X
XFri Oct  7 14:25:25 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.7
X	  star_unix.c from header.c 
X
XFri Oct  7 14:14:03 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.c 1.1
X	  date and time created 94/10/07 14:14:03 by joerg
X
XFri Oct  7 14:13:59 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* table.h 1.1
X	  date and time created 94/10/07 14:13:59 by joerg
X
XFri Oct  7 14:09:31 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star_unix.c 1.1
X	  date and time created 94/10/07 14:09:31 by joerg
X
XTue Oct  4 23:44:41 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.10
X	  New archive types & minorbits for SYSV & bar header & f_xftype
X
XTue Oct  4 23:42:12 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.9
X	  table.h new
X
XTue Oct  4 22:41:43 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.6
X	  xsymlink for SET_CTIME (in ..._unix.c)
X
XTue Oct  4 01:04:21 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* dirtime.c 1.3
X	  SET_CTIME define & new Option
X
XTue Oct  4 00:32:34 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.6
X	  header.c from star.c extracted & table.c new
X
XTue Oct  4 00:24:23 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.8
X	  acctime & ctime in Listing && New Filetyp handling with table
X
XTue Oct  4 00:10:20 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.28
X	  New Option -H (header type) & prstats with signals & SIGQUIT only statistics
X
XTue Oct  4 00:05:07 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.3
X	  -oldtar now again correctly displays: name too long
X
XTue Oct  4 00:03:10 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.12
X	  tblocks() now using new var "reading" for read/write
X
XMon Jun 13 00:48:49 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.27
X	  header.c extracted
X
XMon Jun 13 00:45:09 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.5
X	  curfs -> ulong
X
XWed Jun  8 20:05:34 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.26
X	  hack for major/minor (SysV)
X
XWed Jun  8 19:39:04 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.5
X	  hole.c & longnames.c
X
XWed Jun  8 19:39:04 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.25
X	  f_rdevmaj & f_rdevmin & rdev diffopt
X
XWed Jun  8 19:34:17 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.7
X	* star.h 1.9
X	  f_rdevmaj & f_rdevmin
X
XTue Jun  7 15:46:47 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.2
X	* diff.c 1.7
X	  rdev diffopt
X
XMon Jun  6 20:30:20 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.24
X	  setreuid(-1,getuid()) allows star suid root for remote dump
X
XMon Jun  6 20:29:15 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.11
X	  openremote extracted
X
XMon Jun  6 18:05:14 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.6
X	* star.c 1.23
X	  Display bug uname/gname on not mappable id's corrected for diff.c
X
XFri Jun  3 15:40:13 1994 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.4
X	  SO_SNDBUF & SO_RCVBUF in #ifdef
X
XTue Dec 21 06:42:21 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.5
X	  avoid permission denied on f_size == 0 && debug changes
X
XFri Dec  3 01:28:30 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.4
X	  Listfile option corrected
X
XThu Dec  2 14:36:05 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.6
X	  New Option -newest_file && Display bug (id) for -newest corrected
X
XThu Dec  2 14:35:17 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.22
X	  New Option -newest_file
X
XThu Dec  2 14:34:10 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.5
X	  setmodes not for -to_stdout
X
XTue Nov 30 21:21:04 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.21
X	  -qic120 tape vloume size corrected
X
XThu Nov 25 14:58:12 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.20
X	* buffer.c 1.10
X	  -no_statistics option
X
XSun Oct 17 22:39:55 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.19
X	  bs= option
X
XSat Oct 16 21:54:54 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.18
X	* extract.c 1.4
X	  -to_stdout flag
X
XFri Oct 15 12:47:43 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.17
X	  -qicxxx options documented
X
XThu Oct 14 15:09:32 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.16
X	  -numeric option
X
XThu Oct 14 15:09:14 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.5
X	  -numeric option
X
XThu Oct 14 14:49:57 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.4
X	* star.c 1.15
X	* star.h 1.8
X	  Uname/Gname display in list
X
XWed Oct 13 17:58:17 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.14
X	  set rsize to 0 only for LNKTYPE & DIRTYPE
X
XWed Oct 13 15:42:02 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.13
X	* star.h 1.7
X	* longnames.c 1.2
X	  Header recognition new
X
XWed Oct 13 14:27:33 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.6
X	  gnutar definitions added
X
XWed Oct 13 14:26:02 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.12
X	  MIN macro -> MINUTE
X
XTue Oct 12 23:03:13 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.2
X	  ommit info->f_size comparison
X
XTue Oct 12 17:50:38 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.11
X	  force_hole option moved before f= option to work correctly
X
XTue Oct 12 17:23:48 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.10
X	  omagic -> stmagic & -force_hole
X
XTue Oct 12 17:22:57 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.5
X	  ustar header added
X
XTue Oct 12 17:16:49 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* extract.c 1.3
X	  -force_hole option
X
XTue Oct 12 17:15:35 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* hole.c 1.1
X	  date and time created 93/10/12 17:15:35 by joerg
X
XTue Oct 12 11:15:07 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.3
X	  remote status -> debugging
X
XTue Oct 12 01:04:10 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.9
X	  correct buffersize & better error messages
X
XTue Oct 12 01:02:35 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.9
X	  initbuf & opentape reversed (for remote.c)
X
XMon Oct 11 16:06:19 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.8
X	  -time option
X
XMon Oct 11 16:06:06 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.8
X	  -time option
X
XFri Oct  8 23:36:55 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* longnames.c 1.1
X	  date and time created 93/10/08 23:36:55 by joerg
X
XFri Oct  8 21:38:17 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.7
X	  cnt == 0 -> bigcnt == 0 in read..
X
XFri Oct  8 16:11:36 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.4
X	* extract.c 1.2
X	* diff.c 1.3
X	* dirtime.c 1.2
X	  long Filenames
X
XFri Oct  8 15:45:04 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.7
X	  signed_checksum flag & long Filenames
X
XFri Oct  8 15:21:52 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* lhash.c 1.3
X	  long Filenames
X
XFri Oct  8 15:21:00 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.3
X	  vprint using fprintf & long Filenames
X
XFri Oct  8 15:15:33 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.2
X	  namelen added
X
XFri Oct  8 15:14:41 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.2
X	  debug flag
X
XFri Oct  8 14:33:50 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.6
X	  excomerrno
X
XFri Oct  8 13:05:50 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.4
X	* append.c 1.2
X	  long Filenames
X
XFri Oct  8 12:56:14 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.5
X	  debug flag & excomerr
X
XMon Sep 27 15:23:16 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.4
X	  names.c remote.c diff.c
X
XMon Sep 27 15:22:48 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* names.c 1.1
X	  date and time created 93/09/27 15:22:48 by joerg
X
XMon Sep 27 15:21:30 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* remote.c 1.1
X	  date and time created 93/09/27 15:21:30 by joerg
X
XMon Sep 27 15:20:56 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.4
X	  remote first try
X
XMon Sep 27 15:20:25 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.2
X	  diff.h & diffopts
X
XMon Sep 27 15:19:45 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.h 1.1
X	  date and time created 93/09/27 15:19:45 by joerg
X
XMon Sep 27 15:18:19 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.6
X	  diff option added
X
XSat Aug  7 15:18:57 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* Makefile 1.3
X	  append.c cmpbytes.c diff.c new
X
XSat Aug  7 15:17:16 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* diff.c 1.1
X	  date and time created 93/08/07 14:17:16 by joerg
X
XSat Aug  7 15:16:29 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* append.c 1.1
X	  date and time created 93/08/07 14:16:29 by joerg
X
XSat Aug  7 15:15:36 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.5
X	  -C flag, ([r/u]flag started) -nochown Headertype recognition started
X
XSat Aug  7 15:09:27 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.3
X	  Blocksize recognition & DO8 Macro
X
XSat Aug  7 15:08:21 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* list.c 1.2
X	  New Option -listnew
X
XSat Aug  7 15:06:32 1993 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.h 1.3
X	  TSWMAGIC corrected & Headertype recognition
X
XMon Nov 16 16:25:41 1992 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.3
X	  intr() in createlist()
X
XMon Nov  2 00:20:52 1992 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.4
X	  Usage & read ANSI as old tar
X
XMon Nov 25 11:21:17 1991 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.3
X	  Timestamp File
X
XMon Feb 25 01:21:00 1991 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* create.c 1.2
X	  closedir for createi(dir)
X
XSat Feb  9 20:21:10 1991 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.2
X	  Multiple tapes
X
XThu Jan 31 17:20:19 1991 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* buffer.c 1.1
X	  date and time created 91/01/31 17:20:19 by joerg
X
XTue May 30 12:01:59 1989 Joerg Schilling <joerg@schily.isdn.cs.tu-berlin.de>
X	* star.c 1.2
X	  star divided into (star extract list create)
X...
X
XSCCS revision info lost
X
XFirst full version made in 1985
END-of-star-1.5.2/Changelog
echo x - star-1.5.2/.clean
sed 's/^X//' >star-1.5.2/.clean << 'END-of-star-1.5.2/.clean'
X#!/bin/sh
Xrm -rf */OBJ */*/OBJ libs/* incs/*
Xrm -f core */core */*/core
Xrm -f .EDT* */.EDT* */*/.EDT*
Xrm -f .vedt* */.vedt* */*/.vedt*
Xrm -f *.bak */*.bak */*/*.bak
Xrm -f */tags */*/tags
Xrm -f */TAGS */*/TAGS
Xrm -rf proto/* packages/*
X
Xif [ -f .links ]; then
X	rm -f `cat .links`
Xfi
END-of-star-1.5.2/.clean
echo x - star-1.5.2/AN-1.5
sed 's/^X//' >star-1.5.2/AN-1.5 << 'END-of-star-1.5.2/AN-1.5'
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximplementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.berlios.de/pub/star
X
XChanges since star-1.4:
X
X/*--------------------------------------------------------------------------*/
XBetween star-1.4 and star-1.5, there have been more changes than in the
Xwhole life of star untill star-1.4.
X
XImportant changes as an overview:
X
X-	Changed license from GPL to CDDL
X
X-	There are really many new features and the codesize was doubled
X
X-	star now includes code to emulate different Command line interface types.
X	The following CLI are currently implemented:
X
X	-	star	-> the classical star CLI
X
X	-	suntar	-> the UNIX SUSv2 OpenGroup standard CLI with Sun
X								enhancements
X
X	-	cpio	-> the UNIX SUSv2 OpenGroup standard CLI with SVr4
X								enhancements
X
X	-	pax	-> the POSIX.1-2001 standard CLI
X
X	-	gnutar	-> the CLI from GNU tar 1.14
X
X	The command lind interface is automatically selected from argv[0].
X
X-	True and reliable incremental backup/restore has been implemented using
X	the basic ideas from ufsdump/ufsrestore. Whether a file gets archived
X	on an incremental depends on the dump level and the time of the last
X	incremental or full backup. Whether a file needs to be renamed or
X	removed while restoring incrementals depends on the data in a database
X	that is created for the period of time of the incremental restore. The
X	database contains file names as well as old and new inode numbers.
X	
X-	A configurable error control mechanism allows to selectively ignore
X	certain problems.
X
X-	Star now implements a fast and reliable -copy option.
X
X-	Star now implements true and efficient Sparse file support for
X	Solaris 11 (and Solaris 10 updates).
X
X-	Star now implements reliable multi-volume support with automated tape
X	end/size recognition
X
X-	Star now uses "libfind" and thus allows to use find(1) syntax in star
X	command lines.
X
X-	New program "tartest" reads TAR archives from "stdin" and prints
X	a list of non-compliances with POSIX.1-1990
X
X	Call e.g.
X			tar cf - | tartest
X
X	To check your favorite TAR implementation against POSIX.1-1990
X
X
X/*--------------------------------------------------------------------------*/
XAll changes in a fine grained list:
X
X-	Significant speed up for creating POSIX.1-2001 extended TAR headers
X
X	When star creates archives with POSIX.1-2001 extended TAR headers,
X	it needs to create twice as many TAR headers as with 'classic' TAR
X	archives. In addition the POSIX.1-2001 meta information needs to be 
X	coded.
X
X	While it is impossible to speed up the creation of the additional
X	TAR headers, the coding of the POSIX.1-2001 meta information has now
X	been implemented in a way that now only spends half of the time
X	compared to the time used up by star-1.4
X
X-	Speed up the recognition of POSIX.1-2001 extended header tags
X
X-	Diff code now is able to compare the number of hard links to 
X	a file if the archive is in -dump (exeustar) format.
X
X-	List code now includes hard link count in the long listing if the
X	archive is in -dump (exeustar) format.
X
X	This allows to see the difference in the number of hard links
X	in diff mode if the archive is in POSIX.1-2001 extended -dump
X	(exeustar) format.
X
X-	Diff code now is able to compare the directory content if the
X	archive is in -dump (exeustar) format.
X
X	This allows star to tell whether the target directory on disk
X	includes more files than the archive. This property is
X	needed in incremental restore mode to remove files that
X	have been removed between incremental dumps.
X
X	NEW FEATURE: you now can compare two directory trees on disk
X	with only one run of star by calling:
X
X	star -C fromdir -c -dump . | star -C todir -diff -v
X
X	or 
X
X	star -C fromdir -c -dump . | star -C todir -diff -vv
X
X	Star will now even complain if the directory 'todir' contains
X	more files than the directory 'fromdir'.
X
X-	New diffopt= 'dir' to tell star whether to compare or 
X	dir content if the archive is in -dump (exeustar) format.
X
X-	Enhanced autoconf code for OS/2
X
X-	Add socket lib definition to RULES to allow networking programs
X	to work
X
X-	Check whether readlink() is present to allow compilation on OS/2
X
X-	Check whether symlink() is present to allow compilation on OS/2
X
X-	Check whether chown() is present to allow compilation on OS/2
X
X-	fexec.c in libschily now uses ';' as PATH Environment delimiter
X	for EMX to allow path search to work on OS/2 too.
X
X-	Call setmode(stdin/stdout, O_BINARY) on OS/2 EMX too.
X
X-	Now call setmode(pipe, O_BINARY) on _both_ sides of the compress pipe.
X	This should affect OS/2 _and_ Cygwin.
X
X-	Work around a OS/2 EMX bug that causes star to dump core if the
X	FIFO code correctly closes the unused parts of the pipes that
X	are used o synchronize the cache.
X
X	This was caused by attaching the shared memory segment too late
X	to the child process.
X
X-	In create mode try always to avoid to need to call 
X
X		telldir()/closedir()/opendir()/seekdir()
X	
X	by reading the directory content into allocated memory.
X	This may cause problems on systems that are low with memory.
X	This is implemented in the new function fetchdir().
X
X-	New option -lowmem to tell star to behave as before.
X	With -lowmem is used, star does not malloc() the dir content
X	and defaults to 1 MB FIFO size (see above)
X
X-	include the directory content (names and inode numbers) in the 
X	extended POSIX.1-2001 header if in -dump mode.
X
X	Star uses a vendor unique extended POSIX.1-2001 header tag named
X
X		SCHILY.dir
X
X        The tags
X
X		SCHILY.ddev
X		SCHILY.dino
X
X	are used with incremental dumps. They are used only if the dump level 
X	is greater than 0. They are neded to allow star in incremental restore 
X	mode to know which files have been removed before the tape has 
X	completely passed. For this reason, star will be able
X	to do incremental restores even if the filesystem is nearly full.
X
X
X-	Fixed a bug introduced by applying a patch from 8.3.2002
X	from Andreas Gruenbacher <ag@bestbits.at>
X
X	The bug caused a needed ',' to be omited from the ACL string
X	in extract mode if the target platform did not have named entries
X	in the passwd file and the ACL string was converted to use the 
X	numeric user id instead.
X
X-	Fixed a bug that caused star to complain
X
X		"star: Cannot handle multi volume archives from/to stdin/stdout."
X
X	if called "star -c f=- ..." or "star cf - ...".
X
X-	Fixed a bug that did not allow it to specify the keyword "nlink" with the
X	diffopts= option. Old star versions did not implement this option and thus
X	it has been forbidden before.
X
X-	Make sure that Base 256 coding is only used in the "classical tar headers"
X	if the receiving archive format will understand it.
X
X
X-	Fixed a bug in star that caused star to create wrong filenames if the
X	POSIX.1-1990 file name prefix was exactly 155 chars _and_ the
X	reserved field in the TAR header that directly follows the prefix
X	field included non-null characters.
X
X-	Call fflush(vpr) before executing volume change script
X	to sync output from star with output from the script.
X	Thanks to a hint from Abramo Bagnara <abramo@alsa-project.org>
X
X-	Do not open /dev/tty in case that a volume change script
X	has been specified. This allows star to be called from
X	a cron script.
X
X-	Fix a minor bug in the new diff code. The bug caused that
X	star -diff -vv used on TAR archives created with -dump
X	not to print all directory differences.
X
X	-	If one of both (the dir in the archive or the dir on
X		disk) was empty no file list was printed
X
X	-	If one of the sorted lists was longer than the other
X		starting from some point, the rest of filenames
X		was not printed.
X
X	The pure fact that the directories were different however
X	was always printed.
X
X-	New directory 'testscrips/' with data for the program 'tartest'.
X
X-	A 20 year old extension has been removed from libschily/format.c
X	This caused printf() to interpret %X as %lX. This caused noticable
X	problems on IA-64. It should have created problems on True64
X	and on 64 bit Sparc programs too but was not directly visible
X	due to a different stack content.
X
X-	#elif removed to avoid GCC-3.x warnings
X
X-	several new autoconf tests for 'struct mtget' members
X
X-	remote tape client code now uses a new abstract 'struct rmtget'
X	to avoid that 'mt status' for a remote tape drive depends on
X	the least common denominator from both (local and remote) systems.
X
X-	-wready option now also looks for EBUSY which allows
X	to use star and mt to wait for remote tape drive to become
X	ready again. This option should be used if you like to do a series
X	of backups as it may be that writing the EOF mark blocks
X	the tape for a while.
X
X-	-wready now waits up to 120 seconds for the tape drive to 
X	become ready
X
X-	star manpage enhanced to reflect the new sense for -wready
X
X-	With FIFO enabled (default since 1994) star is now able to
X	exit() with a correct exit code != 0 if a write error occurs
X	on the tape. Due to a missing feature, star did exit(0) if the
X	fifo was active.
X
X-	star man page enhanced to mention the new diff properties that
X	are present when using the -dump option.
X
X-	Remote tape client code has been made a bit faster (5-10%)
X
X-	Remote tape client code now includes a new interface for an
X	abstract 'struct mtget'. This allows the mt program to work
X	more smoothly when issuing a remote status command.
X
X	Before the result was caused by the least common denominator 
X	of both, the local and the remote system. With the enhancements,
X	the outout of the mt program with the 'status' opcode only depends
X	on the properties of the remote system where the tape is connected
X	to.
X
X-	mt program now also supports -wready option
X
X-	mt program has new opcode 'nop' to allow mt to be used
X	as stand alone program to wait for a tape to become ready
X	by calling "mt -wready nop"
X
X-	mt program now supports the new abstract remote tape interface
X	for struct mtget.
X
X-	Remote MT client code moved into 'librmt'.
X	I also modified the code in a way that allows to compile librmt
X	in a way that does not need libschily in order to work if the
X	OS is at least UNIX-98 compliant.
X
X	This makes it possible to use a complete portable remote tape access
X	solution in any application.
X
X	If someone is interested to get a BSD licensed version of librmt
X	please contact me!
X
X-	Special support for an ndocumented but unfortunately important
X	"feature" for symlinks on HP-UX.
X
X	Now star tries to retain the permissions of a symlink by
X	setting umask() before creating the symklink.
X
X-	Fixed a bug in _fileread() that caused a lseek() return code
X	not to be evaluated correctly.
X
X-	Fixed a bug in create_dirs() that may have caused incorrect behavior
X	when a non-directory should be converted into a directory.
X
X-	Fixed a bug in create_dirs() that caused an endless loop if trying
X	to extract e.g.
X
X		dir1/dir2/file
X
X	When
X
X		dir1
X
X	Exists and may not be written to.
X
X
X-	Auto-create dependencies for HP-UX bundled C-compiler
X
X-	Auto-create dependencies for AIX C-compiler
X
X-	Reworked 'librmt' now allows to use star in remote mode without
X	being installed suid root.
X
X	To force star to use rsh(1) instead of rcmd(3), use
X
X		env RSH=rsh star ...
X
X	To tell star to use a different RMT server, call
X
X		env RMT=/path/to/rmt star ....
X
X	NOTE: Transfer speed is much slower if star does not use rcmd(3)
X	in root mode to establish the remote connection. If you like to
X	do fast, always make sure to be root or install star suid root.
X
X	For late 2002, we know that the following programs
X	are broken and do not implement signal handling correctly:
X
X	      rsh     on SunOS-5.0...SunOS-5.9
X	      ssh     from ssh.com
X	      ssh     from openssh.org
X
X	Sun already did accept a bug report for 'rsh'. Meanwhile it could
X	help to call setsid() if we are running under X so the ssh
X	X pop up for passwd reading will work.
X
X	For Solaris the following Bug requests are open:
X
X	rsh/rlogin	4776756
X	sun ssh		4777436
X
X	The source from OpenSSH.org has been fixed on Monday 11.11.2002.
X
X	Due to the signal handling bug, star will die if you try to type
X	^\ (SIGQUIT) to get an intermediate status summary. Star will
X	also not be able to write the current file to a logical end before
X	stopping because it received a SIGINT - this will result in
X	archives with a defective logical structure.
X
X
X-	Reworked 'librmt' allows to use ssh(1) to be used for remote tape
X	access. Use 
X		env RSH=ssh star ....
X	or 
X		env RSH=/usr/bin/ssh star ....
X	to tell star to use the secure shell to establish a remote tape 
X	connection. Note that using the secure shell causes the transfer
X	speed to be significantly lower than for the default case where
X	a suid root star used rcmd(3) to set up the connection.
X
X
X-	Man pages for librmt new.
X
X-	Include a patch from Andreas Gruenbacher to fix a problem with
X	illegal ACL comments in linux tar archives that caused star 
X	to be unable to extract the archive.
X
X-	Add support for *BSD SIGINFO (SIGINFO has been added by BSD in 1990)
X	We do support intermediate status printing much longer but triggered
X	by SIGQUIT (^\).
X
X-	Major rework for "rmt" man page
X
X-	Make "rmt" return the string "PIPE" if "stdin" is connected to a pipe.
X	This allows to use ssh(1) for the remote tape interface.
X
X-	changes to reflect new interfaces of 'librmt'.
X
X-	'mt' command renamed to 'smt' to allow it to be installed as
X	alternate mt program to be used for backup purposes
X
X-	follow the strange POSIX rules for the strerror() behavior
X
X-	Support for sparc64-freebsd
X
X-	Try to work around a bug in OpenBSD. 
X	OpenBSD defines EOF in ctype.h but POSIX only mentions an EOF definition 
X	for stdio.h. If we include ctype.h before schily.h on OpenBSD while 
X	stdio.h has not been included, this will fail. 
X
X-	Support for BSDi version 4.x
X
X-	Support for i786-cygwin32_nt
X
X-	RMT program now supports IPv6
X
X-	Fix a bug that caused star to dump core with star -diff -vv
X	if the archive has been created with star -c -dump and the
X	target directory in the filesystem was not readable.
X
X-	Fixed a bug that caused star to be unable to correctly deal with
X	ACLs where the user or group name contains spaces.
X
X-	Workaround for reading rotten archives caused by above bug.
X
X-	Fixed a bug that caused star to create broken archives if
X	the POSIX.1-2001 extended format is used for sparse files > 8 GB.
X	For this reason, a new extended header tag SCHILY.realsize has
X	been added.
X
X-	New option -no-xheader disables PORIX.1-2001 extended headers
X	regardless of the archiveformat. This may help to read archives
X	that have been created with previous versions of star if there
X	is a sparse file > 8 GB in the archive.
X
X-	New Option xdebug= #
X	Currently star xdebug=1 tells star tu print a dump of the internal
X	datatructures for every file ifin list or extract mode.
X
X-	Allow floating point printing on OS/2. This has been possible
X	since 11/2001 but OS/2 has been forgotten.
X
X-	Correct OS/2 ranlib handling
X
X-	New architecture 9000-831-hp
X
X-	Include +DAportable in HP-UX cc options
X
X-	Reordered and restructured librmt code to allow compilation on OS/2
X	and hopefully other OS like BeOS
X
X-	Fixed a bug that caused star to print '^Aname' instead of 'name'
X	in extended directory diff mode.
X
X-	Fixed a bug that caused star to dump core on UNIX-98 TAR compat mode
X	with e.g. 'star cbv' because star did not check for the missing arg to
X	the -b option.
X
X-	Fixed a bug in POSIX.1-2002 mode (SCHILY dir namelist extension) that 
X	resulted in wrong directory name lists (used for diff mode only) if
X	the directory contained japanese filenames. The bug was present because
X	star did not move enough space if the filename length changed when
X	converting to  Unicode.
X
X-	Fixed a typo (R_RDONLY instead of O_RDONLY) in fctldefs.h
X
X-	Support for macppc-netbsd-cc NetBSD on MAC HW.
X
X-	Fixed a minor typo in the star man page.
X	Thanks to Eric Raymond
X
X-	'star -n -tpath ...' now only prints the pathnames to allow
X	to use the output directly in scripts. If you like the old
X	behavior, use 'star -nv ...'
X
X-	Better autoconfiguration for librmt and its users yields in better
X	compilation and portability results for OS that do not support the 
X	needed internet features for remote tape support.
X
X-	mt.c adopted to the better autoconf support in librmt
X
X-	New option  errctl= name
X          Use the file name as error control  file.   The  reason
X          for  using  an error control file is to make star quiet
X          about error conditions that are known to be  irrelevant
X          on the quality of the archive or restore run. A typical
X          reason to use error control  is  to  suppress  warnings
X          about  growing log files while doing a backup on a life
X          file system.
X
X          The list of error conditions to be handled may use  one
X          or  more  (in  this  case separated by a '|' character)
X          identifiers from the list below:
X
X          ABORT       If this meta condition is  included  in  an
X                      error  condition,  star  aborts  (exits) as
X                      soon as possible after this error condition
X                      has  been seen instead of making star quiet
X                      about the condition.  This error  condition
X                      flag  may  only  be  used  together with at
X                      another error condition or a list of  error
X                      conditions (separated by a '|' character).
X
X          WARN        If this meta condition is  included  in  an
X                      error  condition,  star  prints the warning
X                      about the error  condition  but  the  error
X                      condition  does not affect the exit code of
X                      star and the  error  statistics  (which  is
X                      printed  to  the  end) does not include the
X                      related errors.  This error condition  flag
X                      may  only  be used together with at another
X                      error condition or a list of  error  condi-
X                      tions  (separated by a '|' character).  The
X                      WARN meta condition has a lower  precedence
X                      than ABORT.
X
X          DIFF        Suppress output in case that star -diff did
X                      encounter any differences.
X
X          ALL         This is a shortcut for all error conditions
X                      below.
X
X          STAT        Suppress  warnings  that  star  could   not
X                      stat(2) a file.
X
X          GETACL      Suppress warnings about files on which star
X                      had  problems  to retrieve the ACL informa-
X                      tion.
X
X          OPEN        Suppress warnings about  files  that  could
X                      not be opened.
X
X          READ        Suppress warnings read errors on files.
X
X          WRITE       Suppress warnings write errors on files.
X
X          READLINK    Suppress  warnings  readlink(2)  errors  on
X                      symbolic links.
X
X          GROW        Suppress warnings about files that did grow
X                      while they have been archived.
X
X          SHRINK      Suppress  warnings  about  files  that  did
X                      shrink while they have been archived.
X
X          MISSLINK    Suppress warnings  about  files  for  which
X                      star was unable to archive all hard links.
X
X          NAMETOOLONG Suppress warnings about  files  that  could
X                      not  be  archived  because  the name of the
X                      file is too long for the archive format.
X
X          FILETOOBIG  Suppress warnings about  files  that  could
X                      not  be  archived  because  the size of the
X                      file is too big for the archive format.
X
X          SPECIALFILE Suppress warnings about  files  that  could
X                      not  be  archived  because the file type is
X                      not supported by the archive format.
X
X          GETXATTR    Suppress warnings about files on that  star
X                      could not retrieve the extended file attri-
X                      bute information.
X
X          SETTIME     Suppress warnings about files on that  star
X                      could  not  set the time information during
X                      extraction.
X
X          SETMODE     Suppress warnings about files on that  star
X                      could  not  set  the  access  modes  during
X                      extraction.
X
X          SECURITY    Suppress warnings  about  files  that  have
X                      been  skipped  on  extraction  because they
X                      have been considered to be a security risk.
X                      This  currently  applies  to all files that
X                      have a '/../' sequence inside when -..  has
X                      not been specified.
X
X          LSECURITY   Suppress warnings  about  links  that  have
X                      been  skipped  on  extraction  because they
X                      have been considered to be a security risk.
X                      This  currently  applies  to all link names
X                      that  start  with  '/'  or  have  a  '/../'
X                      sequence inside when -secure-links has been
X                      specified.  In this  case,  star  tries  to
X                      match  the link name against the pattern in
X                      the error control file.
X
X          SAMEFILE    Suppress warnings  about  links  that  have
X                      been  skipped  on extraction because source
X                      and target of the link are pointing to  the
X                      same  file.   If  star would not skip these
X                      files, it would end up  with  removing  the
X                      file  completely.  In this case, star tries
X                      to match the link name against the  pattern
X                      in the error control file.
X
X          BADACL      Suppress  warnings  access   control   list
X                      conversion problems.
X
X          SETACL      Suppress warnings about files on that  star
X                      could  not  set  the ACL information during
X                      extraction.
X
X          SETXATTR    Suppress warnings about files on that  star
X                      could  not  set the extended file attribute
X                      information during extraction.
X
X     If a specific error condition is  ignored,  then  the  error
X     condition  is  not  only  handled  in  a silent way but also
X     excluded from the error statistics that are printed  at  the
X     end of the star run.
X
X     Be very careful when using error control as you  may  ignore
X     any  error  condition.  If you ignore the wrong error condi-
X     tions, you may not be able to see real problems anymore.
X
X	A typical error control file line might look this way:
X
X	GROW		*/log/#[^/].log
X
X
X-	Typo in DEFAULTS files fixed
X
X-	Better Next STep support:
X
X	-	Some workarounds for broken unistd.h
X
X	-	-lkvm removed from Next Step config.
X
X	-	waitdefs.h fixed for very old BSD based systems (~ 1980)
X		like Next STep
X
X	-	fixed typo in fctldefs.h R_RDONLY -> O_RDONLY
X
X-	Better Portability for SCO UnixWare
X
X	-	New platforms i486, i586, Pentium III, Pentium Pro
X
X	-	Let strdefs.h also include strings.h for strcasecmp()
X
X	-	Support for missing struct sockaddr_storage
X
X	-	Support for broken wait3() (returns wrong timings)
X
X	-	Changed broken portability Prototype support in libfile
X		to use 'makefiles / prototype.h' based system
X
X	-	Changed fileopen() and filereopen() to avoid fdopen()
X		problems (does not accept mode string that does not
X		match fd flags)
X
X-	Change autoconf/statdefs.h to support nanosecond support for SCO
X	UnixWare and FreeBSD
X
X-	Call conf/mkdep-sco.sh via sh to be independent from 'x' bit.
X
X-	starting to port ACL support to SCO UnixWare (not yet ready)
X
X-	Removed option -I in preparation for using it in a different way
X	in future releases.
X
X-	Trying to make the source get accepted by 'cstyle'.
X
X-	changed conf/cc-config.sh to check for a bad PATH set up
X	(e.g. /usr/ucb before /opt/SUNWspro/bin) which would cause
X	problems to use cc on Solaris.
X
X-	Second fix from Andreas Grünbacher for #default comments
X	in ACLs now also works correctly with multiple #default comments.
X
X-	Warning: Environment STAR_FIFO_SIZE changed to STAR_FIFOSIZE
X	This is to make star and cdrecord behave similar.
X
X-	Star now reads a file /etc/default/star for default parameters.
X	Currently implemented are:
X
X	STAR_FIFOSIZE=
X	and
X	STAR_FIFOSIZE_MAX=
X
X	STAR_FIFOSIZE= sets the FIFO size if no fs= option has been specified
X	STAR_FIFOSIZE_MAX= limits the FIFO size even if a fs= option has been specified
X
X-	Try to avoid that the verbose or diagnostic messages are
X	sometimes lost if called on Linux via "ssh". Unfortunately,
X	this does not always help. If you like to make sure that
X	nothing gets lost, call: ssh host "star .... ; sleep 10"
X
X		NOTE: The basic problem is caused ba a Linux bug
X
X
X-	Star now opens a file that is going to be extracted with O_DSYNC.
X	Thanks to a hint from Frank Batschulat from the Solaris filesystem
X	kernel team.
X
X	On operating systems with a decent buffer cache implementation
X	(like Solaris), this speeds up extraction of many small or medium
X	sizes files (e.g. a Linux kernel TAR archive) by approx. 20%
X	On Linux, this change unfortunately is ineffective.
X
X
X-	New option -no-fsync to avoid calling fsync(2) for each file
X	if in extract mode.
X
X	This helps to increase extraction speed on operating systems
X	with badly implemented buffer cache (e.g. Linux).
X
X	Note that using this option may be dangerous as star will not
X	even be able to detect if a file could not be extracted correctly
X	if it has been called with -no-fsync
X
X	Background information:
X
X	Calling fsync(2) in star's extract mode has been introduced in 1999.
X	As star is developed on Solaris and on Solaris the performance degradation
X	that is caused by calling fsync(2) is close to imperceptible, no 
X	performance tests have been made for this feature until recently.
X
X	A few weeks ago, some people reported that GNU tar is much faster
X	than star when extracting files.
X
X	Doing performance tests by extracting linux kernel TAR archives
X	leads to the following results:
X
X	-	Extraction on Solaris without calling fsync(2) did speed up
X		by ~ 40% compared to the standard case with calling fsync(2).
X
X	-	After O_DSYNC has been introduced, the speed difference
X		(compared to extraction without fsync) reduced to ~ 20%
X
X		Extraction of a recent 2.4 Linux developer kernel archive
X		took 50 seconds with star's default that calls fsync and
X		42 seconds with star -no-fsync (56 seconds with star-1.5a14)
X
X	-	On Linux (depending on filesystem type and disk type)
X		extraction without calling fsync(2) is 3x to 8x faster
X		than with the standard case that includes calling fsync.
X
X	Star is developed for best possible data integrity while GNU tar
X	does not seem to care about data integrity. The fact that GNU tar
X	on Linux is much faster (for extraction) than star is no reason
X	to blame star but a reason to blame the quality of the Linux
X	buffer cache. Star will not change its default to a method that
X	gives less data integrity just to speed up compared to GNU tar.
X
X	The Solaris kernel is developed for best speed with guaranteed
X	data integrity while the Linux kernel is developed for best speed
X	without caring for data integrity. If you like that star will
X	speed up in the star default (secure) mode, send a message to the
X	Linux kernel developers team and request a change that gives a
X	better behaviour of the Linux buffer cache.
X
X-	New option level= # to set the current incremental dump level
X
X-	New option tardumps=name to set file name for tar dump dates
X	file. This file is similar to the file /etc/dumpdates that
X	is manages by ufsdump.
X
X-	New option -wtardumps to tell star update file for tar dump 
X	dates if in dump mode.
X
X	If you like to experiment with the new incremental dump features,
X	you should start this way:
X
X	Create a level 0 dump:
X
X		star -cM -dump -sparse level=0 -wtardumps -C /usr .
X
X	Create a level 1 dump:
X
X		star -cM -dump -sparse level=1 -wtardumps -C /usr .
X
X	If you do not have files that changed the type, no files that
X	have been removed and no files that have been renamed,
X	star would already be able to do incremental restores.
X
X
X-	Better handling for the exitcode for star (needed for dump
X	handling).
X
X-	Allow 'smt' to understand that EACCES for read-only open may
X	not be caused by a write protected tape but rather by access
X	problems for a remote tape drive.
X
X-	Do no more archive the list of files in a directory
X	(usually done with -dump) if this directory is a mount
X	point and star has been told not to cross mount points.
X
X	We cannot use the real content of the underlying dir
X	anyway and the content of the mounted FS makes no sense.
X
X	Conclusion: try to use a filesystem snapshot whenever
X	possible.
X
X-	Fixed a problem when extracting extended file flags on FreeBSD
X	Thanks to Marius Strobl <marius@alchemy.franken.de>
X
X-	Added a workaround for permission problems when trying to extract
X	hard links to immutable files by resetting the flags, creating the link
X	and later restoring the flags.
X	Thanks to Marius Strobl <marius@alchemy.franken.de>
X	
X-	made handlecond()/raisecond() portable in libschily
X
X-	Extended README.hpux to mention how to compile in 64 bit mode.
X
X-	Added a security check for "/../" in the path for the "rmt"
X	program that helps to prevent user from opening /dev/../etc/passwd
X	in case there is no /etc/default/rmt
X
X-	Add a security check in star's extract mode.
X	Files containing /../ will be skipped by default.
X	Exceptions are -w or -.. (the latter is a new option) has been specified
X
X-	New option -.. to tell star that extracting files containing /../ in
X	the path name is OK.
X
X-	New option -secure-links to tell star to skip hard links and symbolic links
X	that have a link name starting with / or contain "/../" in the link name.
X	Note that it is impossible for a tar implementation to prevent any
X	possible exploit. It is the duty of the user to act carefully.
X	For this reason, -secure-links has not made the default behavior. It cannot
X	work 100% correctly but it gives a wrong feeling of security.
X
X-	New error control tag SAMEFILE allows to check for links where source/destination
X	point to the same file.
X
X-	Added SECURITY & LSECURITY error control to the man page.
X
X-	Fixed a bug that caused star to use a wrong length for extended TAR headers.
X	As a result if this bug, a wrong UTF-8 -> ISO-8859 coding could occur.
X
X-	Added a test that prevents that star would remove a file if the tar archive
X	contains a had link to the file itself.
X
X	0 -rw-r--r--  root/root Jul 25 20:06 2003 f1
X	0 Hrw-r--r--  root/root Jul 25 20:06 2003 f1 link to f1
X
X	If the archive is hand crafted and the file itself has been removed,
X	it would have been possible to remove close to any file if the caller of star
X	has the needed permissions.
X
X-	Added a test that check whether source/destination are the same when copying
X	a instead of making a hard link. This prevents star from removing the file
X	by accident.
X
X-	New option -s replstr implements 'ed' like pattern substitutions
X	as documented for 'pax'.
X
X-	Intercative (manual) renaming now allows longer file names than 100
X	characters to be typed in.
X
X-	-p does no longer imply -dirmode if in create mode. If you like to 
X	have the old behavior, call star -c -dirmode .... instead
X
X-	New option -copy
X
X	This option allows three new operation modes:
X
X	-	Without other commands:
X		Copying files and directory trees to a target directory
X		in a very efficient way.
X		The last file type argument is a target directory.
X
X		star -copy -time -sparse -acl -p source_dir | files  target_dir
X
X	-	In conjunction with the -diff command:
X		Comparing two directory trees in a very efficient way
X		The last file type argument is a target directory.
X
X		star -copy -time -sparse -acl -diff -v diffopts=... source_dir | files  target_dir
X
X
X
X	-	In conjunction with the -t command:
X		A way to get a one pass tar like listing.
X		In this case all file type arguments are use to list.
X
X		star -copy -tv source_dir | files
X
X
X-	Several small bugs in the FIFO have been fixed. These bugs did only affect the
X	new -copy mode.
X
X
X-	Debugging via command line arguments (rmt debugfile) has been disabled
X	for security reasons.
X
X-	Allow shorthands for
X
X		star -copy -t -v 	-> star -ctv
X		star -copy -diff	-> star -c -diff
X
X-	Do not try to get current working directory if star -tv -C dir 
X	has been called
X
X-	Make FIFO code mark the sync pipe files "close on exec" so a bzip/gzip
X	will not inherit them and prevent the FIFO from detecting the death
X	of the other side
X
X-	Call on_comerr() with fifo_exit() routine so an arborted star will not
X	leave the FIFO process and the bzip/gzip process after it did die.
X
X-	Call new volume script with two parameters:
X
X	1	the next volume number
X	2	the file name of the next volume
X
X-	Better man page for -no-fsync now better describes Linux kernel implementation
X	design flaws (that make programs that like to grant data integrity slow),
X	and gives hints when using -no-fsync may speed up things on Linux on expense
X	of data integrity.
X
X-	Better man page for for tar archive format description
X
X-	New command 'spax' implements a POSIX.1 pax style command line interface
X	on top of star. The command is basically SUSv2/UNIX-98 
X
X	The following extensions from SVSv3 / POSIX.1-2001 are implemented:
X
X	-	The options -H and -L
X
X	-	Support for the PSOX.1-2001 extended TAR header format
X		called 'pax'. This makes 'spax' the first pax like command that
X		supports this infinitely extensible and highly portable archive
X		format.
X
X	The following limitations currently apply:
X
X	-	No support for the -l option (create hard links if possible
X		in copy mode).
X
X	-	The privileges option -pa is ignored
X
X	-	The privileges option -pm will not only not set the mtime
X		but also not set the atime in extract and copy mode.
X
X	-	without  -po SUID/SGID permission bits are not masked off.
X
X	-	Pattern matching for command line type args is not yet POSIX/PAX
X		compliant. It should emulate the shell's way of matching file names
X		where '/' is not part of the pattern and each path name component
X		needs to match separately, but it treats a filename like an unstructured
X		piece of text.
X
X	Although there are several limitations, spax should be POSIX compliant enough
X	for the everyday work.
X
X	Rationale: spax only implements a limited set of options to grant best POSIX
X	compliance. Anything you can do with spax may also be done with star. To be able
X	to do this, a new set of options has been added to star for this reason.
X
X-	New options in star:
X
X	-pax-ls		Switch to POSIX ls/pax style listing
X
X	-pax-match	Allow patterns in file type arguments
X
X	-pax-c		Invert matching from file type arguments
X
X	-pax-n		Allow only one match per pattern
X
X	-pax-i		PAX style interactive mode
X
X	-pax-p		PAX style privileges option setup
X
X	-pax-L		Follow all symbolic links (PAX/POSIX style) 
X
X	-pax-H		Follow cmd line symbolic links (PAX/POSIX style)
X
X-	list= option now also works on -copy mode
X
X-	Support for POSIX.1-1988 CPIO archive format.
X	Two new formats are available:
X
X	cpio	The POSIX.1-1988 CPIO format
X
X	odc	This is what SYSvR4 cpio -Hodc understands
X		Unfortunately SYSvR4 cpio is not fully POSIX.1-1988
X		compliant.
X
X-	Support for SYSvR4 CPIO ASC and ACRC formats
X	(cpio -o -c or cpio -o -Hcrc).
X	The checksum with -Hcrc is ignored in extract mode.
X
X	The star header format names are:
X
X	asc	Equals to what SYSvR4 cpio -c creates
X
X	crc	Equals to what SYSvR4 cpio -Hcrc creates
X
X-	Limited extract support for UNIX.V7 binary CPIO archives.
X
X-	Do not do sparse file checking in -diff mode if the archive
X	format does not support to archive sparse files.
X
X-	Fixed a typo on the property set up that caused star to print
X	incorrect bad checksum messages in some cases.
X
X-	First support for Linux extended file attributes.
X	Thanks to Andreas Grünbacher <agruen@suse.de> for the 
X	first implementation. 
X
X	Note that this implementation is not generic enough to cover
X	more general Extended File Attribute implementations as found on
X	Solaris. The current implementation thus may go away in the future
X	if star implements support for Solaris Extended File Attributes.
X
X-	If a archive contains Extended File Attributes, then a long listing
X	will show up a '@' after the permission mode string.
X
X-	New error control attributes: "GETXATTR" & "SETXATTR"
X
X-	Star is now able to create old binary CPIO archives.
X	Note that star always creates binary CPIO archives in network byte order.
X	Other cpio implementations create binary archives in host byte order.
X	Use star -Hbin to create old binary CPIO archives.
X
X-	Messages about unknown POSIX.1-2001 extended header keywords are now
X	printed only once.
X
X-	New program "suntar" should behave exactly like /bin/tar on Solaris
X
X-	New program "scpio". This program is SUSv2 cpio compliant except that the
X	-l option is not yet supported.
X	It is also SVr4 cpio compliant which a few exceptions
X
X-	defaults.c now is able check for archive entries in /etc/default/tar
X	Currently only used from suntar.c
X
X-	Set errno = 0 before FIFO sync pipe read to suppress wrong error message
X	in case star is aborted.
X
X-	star.c now has a new option (not yet a flag) to allow -C to work like
X	it does in old BSD tar. This is used by suntar.c
X
X-	Special option parsing for Solaris tar (suntar.c) has been added to docompat()
X
X-	Handle EINTR for stat()/lstat() in getinfo()
X
X-	New man page for the star archive format
X
X-	-U does no longer unconditionally remove the target (it has never been
X	documented anyway). If you like the old behavior, call star -U -remove-first
X
X-	The exception handling for missing directories and existing files that need to
X	be removed is now the same if the target is a plain file. In previous
X	versions of star, plain files have been handled differently.
X
X-	Fixed a bug that caused star to hang if an GNU tar 'M' header was seen.
X	This was because 'M' did incorrectly make it into the list of extended header
X	type flags.
X
X-	Following POSIX PAX Rationale ././@PaxHeader now has TUREAD|TUWRITE Permissions
X	Thanks to a hint from Glen Fowler gsf@research.att.com
X
X-	GNU Long names and GNU Long links now also follow the TUREAD|TUWRITE Permission
X	rule.
X
X-	star now does no longer hang if a POSIX.1-2001 extended 'g' header is encountered.
X	Thanks to a hint from Glen Fowler gsf@research.att.com
X
X-	New program 'gnutar' should behave exactly like GNU tar except that it
X	writes POSIX.1-1988 TAR archives by default and that it automatically understands
X	all archive formats that are used on UNIX. It of course also auto detects and
X	uses de-compression. If you like to replace GNU tar on a linux system,
X	you may do:
X		su
X		cd /bin
X		mv tar gtar
X		cp opt/schily/bin//gnutar tar
X
X	The intention of this program is to allow Linux users to migrate to a 
X	tar implementation that honors POSIX standards while still being able to 
X	read old non-standard GNU tar archives and staying with the old GNU tar
X	command line syntax.
X
X	If you discover a problem that is caused with deviations to the real GNU tar
X	or caused by missing features, please send me a mail.
X
X	If you are unhappy with this "gnutar" please keep in mind that it took only
X	8 hour to write this gnutar.c If you are able to emulate star from another
X	tar implementation in less than 8 hours, give me a call!
X
X-	suntar/spax/scpio now use a unique function to check if the used options are
X	useful.
X
X-	star now also understands -0 .. -7 as a shorthand for archive entries that
X	are inside the file /etc/default/tar or /etc/default/star may be used.
X
X-	New option -Z calls 'compress'
X
X-	New option compress-program=name calls 'name' as compress program.
X	Use instead of -Z, -z & -bz
X
X-	New option -bsdchdir.
X	Star by default stays in a directory that has been selected via a C=
X	option. With -bsdchdir in effect, star changes back to the directory
X	from where star has been started directly after the next file type arg.
X
X-	Star now checks if it has been called with enough parameters.
X	If the new check believes that star would otherwise have written amn empty
X	archives, it writes an error message and aborts. Please test! As this
X	may be buggy.
X
X-	Fixed a bug introduced by the XATTR patch from Andreas Grünbacher:
X	Changed snprintf() -> js_snprintf() to allow compilation on systems without
X	snprintf()
X
X-	The 'Total' statistics that are printed during a media change are now correct
X
X-	New option -multivol
X	If -multivol is in effect, no logical TAR eof marker is written before the
X	medium is changed. In read/extract mode, a hard EOF condition causes star
X	to ask for the next medium.
X
X		Warning: do not expect that the current implementation will
X		not change. It may be that future versions of star will not deal
X		as expected with the multi volume archives from this version of star.
X
X	The current multi volume implementation is the first step towards a universal
X	multi-volume implementation. I am looking for volunteers who like to test
X	and to help with the implementation.
X
X-	Star now supports reading 'g'lobal POSIX.1-2001 extended headers
X
X-	Star now creates a 'g'lobal POSIX.1-2001 extended header with a
X	"SCHILY.release" tag if an archive type has been selected that
X	would otherwise use SCHILY.* "vendor" specific POSIX extensions.
X	The content is the release string that is used with star -version
X
X-	First attempt to support multi volume writing with automated tape-end
X	recognition. To use this method of multi volume support, call
X	star -multi-volume ... and don't specify tsize=
X	To read the tapes back, you also need -multi-volume 
X
X	IMPORTANT: The current implementation is an intermediate state of the
X	implementation. There is absolutely no check if the 'next' medium
X	is the right continuation for the current medium. The next version of
X	star will use specific volume information in a 'g'lobal POSIX.1-2001 
X	extended header to insure that the right medium is used.
X
X	Please test if the method to detect the EOT condition works for your
X	platform and your Tape Drive and report problems!
X
X
X-	Trying to correct the 'Total' numbers that are printed from the star
X	statistics. This is only printed in multi volume mode.
X
X-	New option -qic525 includes size information for QIC525 tapes.
X
X-	-newer now uses a time stamp with microsecond resolution (microseconds
X	are not yet used).
X
X-	Dump date management now includes a time stamp with microsecond resolution
X	(microseconds are not yet used).
X
X-	Star now does no longer emit extensions to POSIX.1-2001 if called with -Hpax
X	If you like to create the Star specific extensions, use star -Hexustar
X
X	This causes "vendor" specific SCHILY.* extensions to be omitted if
X	"pax" archive format has been selected. The effect from this change is
X	that e.g. star -Hpax -c -acl ..... will no longer archive ACL entries.
X	This is how it has been documented since the last two years.
X
X	star -Hpax is now a vanilla POSIX.1-2001 format
X
X-	-bsdchdir now works correctly for file type arguments that are not preceded
X	with a -C option
X
X-	star -c and star -copy now use a common code for the create side of the
X	task.
X
X-	star -version as well as scpio -version, spax -version, suntar --version
X	and gnutar --version now print a modified version string that makes it
X	obvious that 'star' based software is used.
X
X-	new star option -no-dirslash suppresses to add a "/" to directory names
X
X-	suntar now supports -P via -no-dirslash
X
X-	star now prints directory names in the same way as they are used for the
X	archive. If the archive appends "/" to directory names, then a "/" shows
X	up in listings too.
X
X-	'gnutar' verbose printing in -x and -c mode now looks as if star -tpath
X	has been called
X
X-	Dump date archive management does now deal with microseconds.
X
X-	Star man page now describes the Dump date archive format.
X
X-	Star archive format man page now includes the new Volume header tags
X	that are used with the 'g'lobal POSIX.1-2001 extended tar headers.
X
X-	The archive type name handling has been unified with a globally used
X	table.
X
X-	A new global volume header data structure has been introduced.
X
X-	The time stamp read function for 'x'tended POSIX.1-2001 tar headers
X	now also deals with a sub second granularity that is less than nanoseconds.
X
X-	Many SCHILY.volhdr.*  extended POSIX.1-2001 tar header tags have been
X	added.
X
X-	A SCHILY.archtype tag has been introduced. This tag allows to
X	reliability detect archive formats that are based on clean "vendor unique"
X	POSIX.1-2001 "pax" format enhancements.
X
X
XIntroducing a reliable multi-volume mode.
XThe reliability comes from new volume header tags that allow to verify
Xthe correct volume in read back mode.
X
Xstar tsize=xxx -c ....		does multi-volume without splitting files across
X				volumes. The resultant archives are independent
X				and cannot be read back by a single star run.
X				This feature is in star since the last 10 years.
X
Xstar -multivol			does multi volume triggered by EOT conditions.
X				Files may be split across volumes. The resultant
X				archives should be read back by a single star run.
X				This is new				
X
Xstar -multivol tsize=xxx -c ... does multi volume with a limited medium size.
X				Files may be split across volumes. The resultant
X				archives should be read back by a single star run.
X				This is new				
X
XThe reliable multi volume mode only works if the tape record size (usually 10 kB)
Xis not smaller than the volume header; so reading the first tape record allows
Xto verify a volume.
X
XA future star version will add Multi volume continuation headers that allow to
Xstart a multi volume extract past volume #1. This may be needed if a tape has
Xbecome unreadable and allows to continue extraction past the bad medium.
XTo do this with the current star release you would need to call "star -i ..."
Xto skip over "bad" archive headers as the archive (if starting with the end of a
Xsplit file) does yet contain a pointer the the next valid archive header.
X
XThe fact that the multi volume continuation headers have not yet been implemented
Xis not considered to be a real problem as GNU tar for the last 10 years only has
Xa broken implementation of multi volume continuation headers. GNU tar rejects
Xto accept 1-5% of the continuation volumes due to a conceptional bug.
XThe current star release however, is able to read back those archives as star
Xdoes not try to verify GNU tar multi volume continuation headers but only skips
Xthem.
X
X
X-	Better syntax checks for POSIX.1-2001 extended headers.
X	Now that there is a second POSIX.1-2001 aware tar implementation
X	(from AT&T research), we need to take more care when reading POSIX.1-2001
X	archives as other worse implementations may occur in the future.
X
X-	The decimal number output routine for POSIX.1-2001 headers is now able to
X	convert negative numbers.
X
X-	A new routine for outputting unsigned decimal numbers in POSIX.1-2001 headers
X	has been introduced.
X
X-	Star archive format man page updated: SCHILY.acl.* and SCHILY.xattr.* 
X	documented. Added a note that there is not yet a documentation for
X	SCHILY.fflags
X
X-	Change tape routine enhanced so that it is able to change to the same tape
X	drive in case a wrong media has been inserted when trying to read back multi
X	volume archives.
X
X-	Some new precautions have been taken to put more variables into the shared
X	memory. This is needed so that some additional information that is fetched
X	after the fifo did fork may be used from the other process.
X
X-	Verify volume headers after a media change in multi volume mode.
X
X-	fixed three bugs in the routine that reads /etc/default/*tar
X	-0 .. -7 abstract archive names. 
X	-	star did not read /etc/default/star at all
X	-	tsize & block size entries have been used with wrong multipliers
X
X-	Man page enhanced for the new multi volume properties:
X
X	star -c tsize=xxx creates multi volume archives that may be read back each
X	separately. Files are not split across volumes.
X
X	star -c -multivol or star -c tsize=xxx -multivol splits files across volumes
X	and the resultant media must be read back in one star run.
X
X-	tsize is now silently rounded down to a multiple of the tape block size.
X
X-	Tape change in write mode now writes a POSIX.1-2001 based volume header that
X	is used for media verification.
X
X-	Fixed a bug in the old multi volume mode (where files are not split across
X	volumes) that caused extended headers to be written to the old volume
X	and the related file to be written to the new volume.
X
X
X-	The POSIX.1-2001 based dump dir values have been slightly modified:
X	Old star versions did only contain a single null byte at the end of the record.
X	New star versions have two null bytes at the end of the record and the
X	second null byte is counted in the length value. Old archives may be read back
X	with new star versions. The new method is more "correct" as the second null
X	byte is a "end of list" null byte that has been created by fetchdir().
X	The single null byte in old archives was the null byte for the last string and
X	not the "list of strings" terminator.
X
X-	The SCHILY.dino keyword (planned 1.5 years ago) has been implemented.
X	This keyword helps to implement better true incremental dump support.
X	It is needed to detect file renaming on file systems that don't change
X	st_ctime on a rename(2) operation (e.g. ReiserFS on Linux).
X
X	If SCHILY.dino is present, the algorithm for the incremental restore
X	is much simpler.
X
X-	A new reusable function to compare directory contents has been implemented.
X	This is needed to implement incremental restores.
X
X-	A workaround for a FreeBSD/MacOS X bug in struct timeval.tv_sec vs. time_t
X	has been implemented.
X
X-	A new option -restore in preparation for the planned incremental restore
X	has been introduced.
X
X-	A new option -xdot has been introduced to help to avoid the message
X		"star: current './' newer."
X	when calling
X		star -copy  -C from_dir . to_dir
X
X-	A new option -j as an alternative to -bz has been introduced.
X	This is mainly to help GNU tar users to convert as GNU tar did not follow
X	our -bz option when it introduced bzip2 compression.
X
X-	Fixed a bug that caused star to complain about a NULL directory name
X	when calling:
X		star -ctv -C some_dir .
X
X-	Fixed a bug that caused the wrong POSIX.1-2001 xheader tag content to
X	be moved if the length of the length field had been guessed wrong.
X	Move started at new offset but should start at old offset.
X	This was a serious bug that could cause corruption in extended headers
X	if non US-ascii characters appeared inside filenames.
X
X-	Hopefully last "fix" from Andreas Grünbacher to work around a problem
X	with defective ACL texts in tar archives created on Linux.
X
X-	align_test modified to make some vars static.
X	This was needed to work around MacOS X name space pollution and a linker bug
X
X-	-multivol in create mode now is only allowed with star formats.
X
X-	New function _getinfo() introduced for all simple stat() purposes.
X	The background is that getinfo() may allocate memory if it looks for ACLs
X	or extended file attributes.
X
X-	Extended header information is now deleted according to the POSIX.1-2001
X	standard if the length of the value string is 0.
X
X-	The star archive format man page has been massively enhanced.
X	This man page is far from being complete but it is now more complete than
X	archive format man pages for other tar implementations.
X
X-	Fixed a bug that is caused by the fact that you need to break clean
X	layering in order to implement EOT induced media change.
X
X	If a data section from a POSIX.1-2001 extended TAR header was hit by a 
X	medium change, then the content of the original extended header data was
X	overwritten by the data from the volume header.
X
X	Star now implements a two level stack for the xheader data.
X
X-	Fixed a bug with several calls to execl(2) that could cause problems on
X	architectures where sizeof(int) != sizeof(char *). This is usually the
X	case for 64 bit compilations. As the number of parameters actually used
X	was 7, the problem was not only present on IA64 systems but also on 64 bit
X	Sparc compilations as Sparc allows to pass only 6 parapeters via
X	registers.
X
X	Note that his is a problem caused by the bad C-99 documentation. A pointer
X	constant is not a pointer! and the C-compiler is unable to do automatic
X	type conversion for varargs parameters. All varargs functions are affected
X	that detect the end of a var arg list via a null pointer.
X
X	Thanks to Christian Weisgerber for reporting.
X
X
X-	First step towards reliable support for starting to read back multi volume
X	archives past volume #0. Star now writes multi volume continuation headers
X	for split files if called with -no-fifo. The FIFO case is much more complex
X	and will be implemented in a later version.
X
X-	New POSIX.1-2001 header tag "SCHILY.offset" is used for multi volume continuation
X	offsets.
X
X-	Introducing an enhanced version of the BSD bitstring library for
X	implementing multi volume continuation headers in the -fifo case.
X
X-	First attempt to implement multi volume continuation headers
X	for the default star case when -fifo is in effect.
X
X	This is done by managing a bit map for blocks that hold a valid
X	TAR header.
X
X-	Better readable output when star does automatic decompression.
X
X-	Fixed the recognition of 'packed' archives.
X
X-	Added support to detect 'pkzip' compressed archives.
X
X-	New option -print-artype prints compression and archive type on a single
X	line and exits.
X
X-	Introducing a new option artype=headertype as alias for H=headertype
X	Note that POSIX.1-2001 defines a command independent option -H
X	to follow symbolic links encountered on the command line.
X	Star currently still follows the idea introduced with SVr4 cpio in 1989
X	-H headertype, but it may in future try to follow the POSIX.1-2001 ideas.
X
X	I am currently thinking about a second new (short) option -A headertype
X	please comment!
X
X-	Require the -M option for dumps with level=
X
X-	Better documentation for the -tpath option
X
X-	Try to fix a problem in the copy mode with:
X		echo README | star -copy list=- /tmp 
X
X	where both the read and the write process did a chdir("/tmp").
X	Thanks to Rasmus Hahn <rassahah@neofonie.de>
X
X-	Fixed a bug that caused star to reject files > tape volume size
X	set by tsize= even with -multivol active.
X
X-	If a file name is too long for the current archive format or cannot be split
X	in POSIX.1-1988 flavor, now exactly one error message is printed.
X
X-	Better error message when star rejects to create an empty archive (no file type args)
X
X-	Fixed a bug that caused star to dump core with command lines like:
X	star -c -diff -C /tmp . /etc
X
X-	New makerules for DOS/DJGPP
X
X-	Change fetchdir.c not to use DIR*->d_ino for DJGPP 
X
X-	Call setmode(file no, O_BINARY) also for DJGPP for files where binary operation
X	is needed.
X
X-	First attempt to implement build in compression pipes for DJGPP to allow
X	star -xz ....
X
X-	Changed rmt.c so it compiles to a dummy program on DOS/DJGPP
X
X-	Thanks to Alex Kopylov reanimatolog@yandex.ru for the help with the DOS/DJGPP port.
X
X	Note that in order to compile star on DOS/DJGPP you need smake-1.2a21 or newer.
X	GNU make does not seem to work for a DOS compilation. Note that you need to read
X
X-	install-sh now knows about platforms that allow to give away files (like
X	SCO UNIX); it will no longer leave undeletable (by non-root users) files in /tmp
X	if not called by root.
X
X-	Support for calling 'smake install' on systems that use a '.exe' suffix for
X	executable files has been added.
X
X-	Fixed a bug with Extended File Attribute handling that caused the '@'
X	XFA indicator to be displayed for every file.
X	Thanks to Leland Lucius (llucius@tiny.net) for his patch.
X
X-	Added support for "diffing" ACLs.
X	Thanks to Leland Lucius (llucius@tiny.net) for his demo implementation.
X
X	You need to call star -diff -acl ... and use an archive that contains
X	ACLs if you like to compare ACLs.
X
X-	Added support for "diffing" Extended File Attributes.
X	Thanks to Leland Lucius (llucius@tiny.net) for his demo implementation.
X
X	You need to call star -diff -xattr ... and use an archive that contains
X	Extended File Attributes if you like to compare Extended File Attributes.
X
X-	Added support for "diffing" Extended File Flags.
X
X	You need to call star -diff -xfflags ... and use an archive that contains
X	Extended File Flags if you like to compare Extended File Flags.
X
X-	mconfig.h now supports make COPTX=-DNO_FORK & COPTX=-DNO_VFORK
X
X-	librmt and the rmt server have been enhanced to allow long file names up
X	to 4096 bytes.
X
X	The historic rmt interface has not been designed to be used with plain files
X	and thus file names have traditionally been limited to 64 characters.
X	Note that in order to be able to use long file names with remote tape
X	connections you _definitely_ need to use the rmt server that comes with star.
X
X-	Fix a bug that caused ':> /tmp/empty; star -u f=/tmp/empy ....' to dump core.
X
X-	Do not abort with "Will not overwrite non empty files in compat mode...
X	if called with star uf /tmp/file. We will later check if this is a real tar
X	archive so there is no problem in this case.
X
X-	snprintf() in libschily modified to match SVSv3 (POSIX.1-2001)
X
X-	Fixed a minor bug that caused star to complain about "star rf filename ..."
X	when "filename" was not an empty file.
X
X-	The handling ot the -p option has been massively changed.
X
X	The old way was to always extract file permissions and to extract directory
X	permissions with -p.
X
X	The new way is to extract file/directory permissions for new files modified
X	by the umask if -p has not been specified old files/directories keep their
X	old modes. It -p has been specified, permissions for files and directories
X	are restored to the values from the archive disregarding the umask.
X
X	If star is called by root, -p is implied.
X
X-	New option -no-p to avoid automatic activation of -p in case star
X	has been called by root.
X
X-	The directory stack code has been enhanced to allow to do delayed restores
X	of directory permissions. This finally allows to extract "read only"
X	directories from an archive. Star will never grant more permissions to
X	other users while doing this.
X
X-	Fixed a minor bug in rmt.c in the handling of too long file names.
X	The only result of the bug has been that in case of too long file names
X	the protocol may have been screwed up.
X
X-	cpio now by default restores all permission (like star -p).
X
X-	Better printout for the FIFO block remainder moving statistics with
X	-fifostats
X
X-	New FIFO statistics print current FIFO fill ratio in addition.
X	To check current FIFO fill ratio, just hit ^\ (or ^T on FreeBSD).
X
X-	Try to use sigaction()/sigvec() instead of signal() to be able to
X	set up restartable syscalls.
X
X-	Try to avoid setting times/modes for targets of hard links if the
X	file type of the hard link is unknown by the archive but really 
X	is a hard link to a symlink.
X
X	Note that you should avoid to create portable archives that contain
X	hard links to symlinks. Hardlinks to symlinks are not mandatory by
X	POSIX and implementation specific. For backups, it makes sense to
X	use star's dump format; with star's dump format, hard links to 
X	symlinks have already been handled correctly before this fix because
X	star then knows the file type of a target from a hard link.
X
X	Star's dump format is used with star -copy, so star -copy has not been
X	affected.
X
X-	star -cz and similar now also work on DOS/DJGPP
X	Thanks to Alex Kopylov <reanimatolog@yandex.ru>
X
X-	New supported format "v7tar" allows to create tar archives with
X	UNIX V7 restrictions:
X
X	-	Only plain files and hard links (no directories and symlinks)
X
X	-	Only files < 2 GB.
X
X-	tartest now sets stdin into binary mode (needed on DOS and similar).
X	Thanks to Alex Kopylov <reanimatolog@yandex.ru>
X
X-	New options -copyhardlinks/-copysymlinks/-copydlinks for improved
X	link copy support. The code has been developed after an idea from
X	Alex Kopylov <reanimatolog@yandex.ru>
X
X-	New option -match-tree
X
X	If in create mode a pattern did not match a directory, star did always
X	still recursively scan the content of this directory as complex patterns
X	could allow files inside the directory tree to match.
X
X	Using -match-tree now allows to efficiently exclude whole trees from
X	scanning. This helps to avoid scannings directory trees that are on remote
X	file systems or contain excessive bad blocks.
X
X-	Correctly deal with chars that are by default unsigned on IRIX.
X	This fixes a bug that caused star to output the following error text:
X	errmsgno(EX_BAD, "Bad Option: -%c.\n", archive);
X
X-	The options -copyhardlinks/-copysymlinks/-copydlinks have been improved
X	to be able to copy symbolic links to files that appear later on the archive
X	and to symbolic links to symbolic links.
X	The code has been proposed by Alex Kopylov <reanimatolog@yandex.ru>
X
X-	Close the tape too, when the FIFO is used.
X
X-	New option -dumpmeta
X
X	Without this new option, star in incremental dump mode now also
X	archives file content if only st_ctime of a file is newer.
X	This prevents star from omitting the file content for new files
X	that have been created with old date (st_mtime is older than st_ctime).
X
X-	star now does no longer loop if there is a loop in the directory
X	structure (e.g. from a hard link to a directory). Star did not loop
X	before in case the -link-dirs option has been specified. Now star
X	does not loop even if -link-dirs is not in use.
X
X-	Added forgotten code so star is now able to extract hard links to
X	directories even when the archive is in star's dump format.
X
X-	star now also archives unreable directories (but of course without
X	content).
X
X-	New make file rules for Win32/Mingw
X
X-	setmode(f, O_BINARY) extended for Win32/Mingw
X
X-	star -restore is now 1000x faster than before
X
X-	First attempt to start dealing with the incremental dump information
X	in the archives while in -restore mode.
X
X-	New option -xdev as alias for -M
X
X-	-restore now implies -xdot
X
X-	The SCHILY.volhdr.dumptype= header has been activated.
X
X	If the -C option in a dump run is referring to a root directory of
X	a file system, the resulting dump ps called a "full dump".
X	If the -C option in a dump run is not referring to a root directory of
X	a file system, the resulting dump ps called a "partial dump".
X
X-	/etc/tardumps is now only written if the dump is a "full dump".
X
X-	star now writes a message after /etc/tardumps has been written.
X
X-	/star-tmpdir is now created in -restore mode
X
X-	sym_init() adds new consistency checks in -restore mode
X
X-	/star-symtable now is created with mode 0600 
X
X-	libschily's stdio now uses #include "schilyio.h" instead of "io.h"
X
X-	Warning for GNU make problems added
X
X-	Fixed a security bug in remote tape support librmt/remote.c (the RMT client).
X
X-	Incremental restore has been implemented. This makes star the first
X	true incremental backup system that is TAR based and that passes basic
X	verification tests for:
X
X	-	Removed files
X
X	-	Removed directories
X
X	-	Renamed files
X
X	-	File removed and new file of different type created with the
X		same name. This may include the fact that the inode number
X		of the new file is the same as with the old file.
X
X	-	Renamed directories
X
X	Note that it is unclear whether star can handle renamed hard links
X	to directories.
X
X	Please test and report. Star will write messages for unexpected problems.
X
X
X	To create a level 0 dump:
X
X	star -cM -dump -sparse -acl -link-dirs -level=0 -wtardumps f=<archive-name> -C /<filesystem-mount-point> .
X
X	To create a level 1 dump:
X
X	star -cM -dump -sparse -acl -link-dirs -level=1 -wtardumps f=<archive-name> -C /<filesystem-mount-point> .
X
X	To extract a level 0 dump:
X
X	cd /<filesystem-mount-point>
X	star -xpU -restore f=<archive-name>
X
X	To extract a level 1 dump:
X
X	cd /<filesystem-mount-point>
X	star -xpU -restore f=<archive-name>
X
X	Notes:
X
X		-	You need to use the -M/-xdev option as star
X			currently only allows to dump a single filesystem at a time.
X
X		-	You may do the restore only to a single filesystem
X			(no sub mounts allowed)
X
X		-	The filesystem where you start the restore needs to be
X			empty (except for lost+found)
X
X		-	star does not yet remove files that have been
X			removed between incremental dumps. Files that have been
X			removed between incremental dumps are moved to the
X			directory star-tmpdir. Before you start to extract the next
X			incremental, you need to remove all files in star-tmpdir.
X
X	-	Star now correctly sets up permissions, time stamps and owners
X		for directories that have been extracted because -xdir or -xdot
X		has been specified.
X
X	-	Star now correctly reports read error on files in create mode.
X		Before, star did report that the file did change size (shrink).
X
X
X-	New rule file x86_64-linux-gcc.rul allows compilation on AMD-64 systems
X	without automake enabled make programs like 'smake'.
X
X-	Several changes to make 'lint' happy.
X
X-	Make star report different data in any case where the size of the
X	file in the archive differs from the size of the file on disk.
X
X-	Set Linux xattr only in case that the archive did contain xattr
X	values for the current file.
X
X-	The algorithm used to fill up the archive to a specific block size
X	has been corrected. This mainly causes scpio to behave more correctly
X	and to create archives of the mininum possible size.
X
X-	scpio and spax now also support the archive=header option (like star).
X
X-	scpio now correctly supports the SVr4 -C option.
X
X-	The default archive format used by scpio has been changed to -Hodc.
X	This is more POSIX 1003.1-1988 compliant and also gives better
X	compatibility than the -H bin format (used before and used by SVr4)
X	which has byte order problems.
X
X-	The output with the -debug option now prints the archive format in
X	text version and not only in the star specific internal numeric value.
X
X-	Manual page for scpio new (based on the Open Group Standard and with
X	permission of the Open Group).
X
X-	First version of a manual page for spax new (based on the IEEE /
X	Open Group Standard and with permission of the IEEE / Open Group).
X
X-	Manual page for gnutar new
X
X-	Manual page for suntar new
X
X-	smt now correctly opens the tape drive for the "load" command.
X
X-	Added a note related to the extended file flag design bug on Linux
X	to the star man page.
X
X-	Star now aborts if you call star -c list=xxx files
X	as it does not use the "files" argument.
X
X-	Added a usage() prototype to tartest.c
X
X-	Star now allows "partial" dumps to update the data base file
X	/etc/tardumps. Partial dump entries are marked with a 'P'
X	directly after the dump level.
X
X-	New option -force-restore tells star to accept partial dumps
X	in restore mode. Note that with partial dumps, there is no
X	guarantee that renamed files are handled correctly during
X	incremental restores.
X
X-	Star now evaluates the SCHILY.archtype= entry of the first
X	POSIX.1-2001 extended header to get the archive type.
X
X-	As star (in the FAT binary variant) now defaults to the "suntar"
X	behavior (which is closer to the historical tar than the "star"
X	behavior), star no longer writes a 'g' header by default to
X	have better compatibility with historical tar implementations.
X
X-	The star man page has been enhanced by a "INCREMENTAL BACKUPS"
X	and a "INCREMENTAL RESTORES" section.
X
X-	Man Page for scpio completed.
X
X-	Star now checks whether the incremental restore procedure is done
X	using the right order of incremental dumps.
X
X-	Better man page for star for incremental dumps/restores
X
X-	Reading the star volume header from incremental dumps now results
X	in the correct microsecond values. Before tv_usec has been assigned
X	to the nanosecond value.
X
X-	Better autoconf tests for ACLs
X
X-	New option -force-restore now finally works.
X
X-	Added a workaround for a Linux kernel developer Bug:
X	Old Linux Kernels have <linux/ext2_fs.h>
X	New Linux Kernels have a broken <linux/ext2_fs.h> and a usable
X	<ext2fs/ext2_fs.h> 
X
X-	Better config.* for IBM s390 machines
X
X-	Changed librmt/remote.c to make star compile again on HP-UX.
X
X-	Correct a side effect of a recent star -diff modification.
X	Star now does not try to compare a hardlink (with size 0 on the archive)
X	against the data of a disk file.
X
X-	Fixed a bug introduced with the new enhanced archive type recognition
X	that evaluates the SCHILY.archtype keyword in a POSIX.1-2001 extended header.
X
X	The error message was:
X	star: Syntax error in extended header: non digit in len.
X
X-	more debugs for star -restore. Use smake COPTX=-DRES2_DEBUG
X	to activate this code.
X
X-	sym_dirprepare()/sym_typecheck() may now modify imp * 
X
X-	Better restore warning messages
X
X-	padd_node() now sets flags (e.g. I_DIR) for old tmp nodes
X
X-	sym_addrec() no longer adds dir content into files that need to be 
X	removed in favor of a dir of the same name.
X
X-	sym_dirprepare() now may remove files that turned into a dir
X	sym_dirprepare() then also returns a modified imp * pointer
X
X-	Write a file "star-symdump" with "Panic: amnesia ..."
X	The file "star-symdump" contains the current database status.
X
X-	sym_typecheck() now honors I_DELETE in move2tmp() loop
X
X-	sym_typecheck() now calls purgeent() for removed files.
X
X-	Initialize do_void = FALSE; in diff.c to make GCC happy.
X
X-	New option -prinodes prints inode number from archive if present if
X	star is called with -tv
X
X-	Added /* LINTED */ comments to some files to tell people and lint that
X	there is no out of bounds array indexing.
X
X-	New options  fs-name= name &  dumpdate= name help using star with
X	file system snapshots. 
X
X	fs-name=	allows to have the right FS name in the archive and
X			in /etc/tardumps
X
X	dumpdate=	allows to have the right timestamp in the archive and
X			in /etc/tardumps
X
X-	Man page now includes an example on how to create incremental backups
X	using file system snapshots
X
X-	New keyword "SCHILY.volhdr.cwd" is used for the real working directory
X	with incremental backups when fs-name= name is used.
X
X-	New diff option "lmtime" allows star to exclude checking the mtimes
X	for symbolic links only.
X
X-	Star now automatically removes all files from ./star-tmpdir if in
X	incremental restore mode and the environment variable "STAR_DEBUG"
X	is not present.
X
X-	New Option -dump-cumulative/-cumulative allows star to be used
X	to synchronize filesystems in an efficient way.
X
X-	Man page enhenced to describe how to use star to synchronize 
X	filesystems.
X
X-	Star now writes a file ./star-symdump if a problem is detected that
X	will result in a coredump
X
X-	spax man page now competely converted from the text file format
X	from The Open Group to 'troff'.
X
X-	New program star_sym to convert star's incremental restore database
X	into a human readable format for better debugging of incremental
X	restore related problems.
X
X-	star now checks whether the selected archive format supports
X	ACLs if called in create mode with -acl.
X
X-	Fixed a bug that caused star -match-tree to behave incorrectly
X	if no pattern matching was involved.
X
X-	Changed license from GPL to CDDL
X
X-	Included acltext.c from OpenSolaris sources. This allows star to
X	support ACLs on Solaris systems that are older than Solaris 9.
X
X-	acltext.c modified to allow star to extract Tar Archives with ACLs
X	on machines that do not have a uname to uid & gname to gid database
X	for the users in the archive. Star in this case extracts ACL 
X	users/groups by numeric id.
X
X-	Add acltext.c to star_fat.mk
X
X-	Make star_fat the default. Previously, star, suntar, gnutar, scpio
X	and spax have been different binaries.
X
X-	Added support for the Linux EXT2_JOURNAL_DATA_FL file flag.
X	See man chattr ('j' flag).
X
X-	Do not compile acltext.c on Cygwin.
X
X-	Added debug code to restore.c to help finding the minor bug in the 
X	incremental restore code.
X
X-	Try to avoid a core dump when checkerr() is called with a NULL ptr
X	file name.
X
X-	fetching ACL info via get_acls(info) has been moved to create.c
X	to speed up the archiving process.
X
X-	Broken error message string on restore.c fixed
X
X-	Better syntax checking and messages for POSIX.1-2001 extended tar
X	headers: we now check whether each record ends with a \n
X
X-	Workaround for an old broken /bin/sh found on BSDi
X
X-	Workaround for chmod being in /usr/sbin on BSDi
X
X-	make DESTDIR=/some/path install is now supported
X
X-	Autoconf test for broken Linux Kernel include file <linux/ext2_fs.h>
X	and workaround for the unwillingness of the Linux Kernel Maintainers
X	to fix their bugs.
X
X-	Added support for the SEEK_HOLE / SEEK_DATA feature of current
X	Solaris development releases. This allows to implement efficient
X	support for sparse (holey) files. Note that star did implement
X	a similar improvement this for Solaris-2.3 .. Solaris-2.5.1 but
X	the related call did disappear with Solaris-2.6
X
X-	Fixed a bug that caused star to list the size of the file in the
X	archive instead of the real size in case sparse file handling was
X	done in POSIX.1-2001 mode and the file size was greater than 8 GB.
X
X-	star.4 extended to mention that a "SCHILY.realsize" keyword needs 
X	to be after any "size" keyword.
X
X-	Fixed a bug that caused star to dump core while extracting a file
X	with more than 10016 holes.
X	
X-	The function to	read the data from sparse files has been
X	optimized. The speed for archiving sparse files has been
X	enhanced by approx. 50%, it is now nearly 2x the speed from ufsdump.
X
X-	Avoid unneeded lseek() calls for sparse files in -onull mode.
X
X-	Support for extracting hard links in the SVr4 cpio CRC archive format
X	has been added.
X
X-	Fixed a bug in xheader.c that caused star to write to a wrong buffer
X	addres after a realloc() while archiving inode # lists for directory
X	content.
X
X	As the probability for calling realloc() for this task is extremely
X	low, the problem did hit during dayly incremental backups once every
X	three months.
X
X	It seems that we did now fix the last known problem with incremental
X	backup/restore with star.
X
X	Thanks to: Roland Friedwagner <r.friedwagner@gmx.net>
X
X-	New autoconf checks for OS (Linux) madness (broken kernel include files).
X
X-	New option -read0 as a counterpart for gfind -print0 is used when reading
X	filenames with the list= option. Note that it is better to just use the
X	built in -find code in star...
X
X-	New option pkglist= (which is an unstable internal interface for the
X	Schily Source Package System SPS). It allows to overwrite permissions
X	and uid/gid for files. The file used with pkglist contains a list
X	if file names (each on a separate line). The format is:
X
X		filename permission uname gname
X
X		e.g.	Makefile 0444 root bin
X
X	All field that should not overwrite the values from stat(2) may be replaced
X	by '?', e.g. Makefile ? root bin
X
X-	Multi Volume support has been completed:
X
X	-	Star now supports to read back multvol archives in
X		H_XSTAR & H_XUSTAR Format
X
X	-	Star now more completely evaluates the header bitmap
X		of the FIFO to find the "nearest next header".
X		This helps to see more files when starting to read back
X		a multi vol archive on a volume > #1
X
X	-	Star now includes support to protect a critical section
X		in the volume media change code. The variable that is
X		shared between the archive process and the write process
X		to tell the write process where the next header past a large
X		file will be can no longer be modified by the archiver
X		process while the tape process checks the content of the
X		variable and the FIFO bitmap.
X
X-	New keyword "SCHILY.volhdr.tapesize" allows star to verify the
X	archive volume size on read back.
X
X-	Warnings and debug messages related to EOF recognition now
X	contain archive block numbers.
X
X-	Avoid star core dumpd in incremental restore mode when the
X	inode database is corrupted and causes NULL pointers inside
X	star's data.
X
X-	For suntar & tar, tar -x is now star -xU
X
X-	Unconditionally overwrite non-empty plain files if the "tar"
X	command line interface is active. This is not true if star
X	is called as "star" or "ustar".
X	Note that while this gives full compatibility to historical
X	tar implementations, it may allow people to accidentally
X	overwrite random files from miss typed command lines as
X	the tar command line syntax is error prone.
X
X-	Autoconf now correctly detects contiguous vs. non-contiguous
X	device Major/Minor numbers when compiling for 64 bit CPUs.
X
X
X-	The -copy option has been documented in the EXAMPLES section 
X	of star's man page.
X
X-	The star directory stack (delayed time/mode setting) now also
X	works correctly when the directory names in the archive do
X	not end with a '/'.
X
X-	scpio now includes "star -xdir" as the classic UNIX cpio program
X	always unconditionally extracts directories.
X
X-	Several bugs in acltext.c fixed:
X
X	-	it did assume that a uname / gname fits into 8 chars
X
X	-	it did assume that a numerical uid/gid value fits into 8 chars
X
X	-	The variable id was not always initialized.
X
X-	Fixed a typo in a printf format string that could cause core dumps.
X
X-	Star man page now mentions the new efficient support for archiving
X	sparse files on Solaris 11
X
X-	nameuid()/namegid()uidname()/gidname() converted to use
X	uid_t/gid_t as parameter
X
X-	Struct FINFO converted to use uid_t/gid_t for f_uid / f_gid
X
X-	Struct FINFO converted to use nlink_t for f_nlink
X
X-	Struct FINFO converted to use mode_t for f_mode
X
X-	Struct FINFO converted to use mode_t for f_type
X
X-	Fixed the option -xdot to work correctly for archives that
X	do not start with a "." or "./" entry.
X
X-	Star now includes code to allow to skip large files (>= 2 GB)
X	on non largefile aware systems. In order to allow this, a 
X	C-compiler is needed that supports the type 'long long'.
X
X-	Range checking for selected parts of the TAR header
X
X-	Star now takes more care for converting numbers in the 
X	historical tar header.
X
X-	Range checking for POSIX.1-2001 headers. If a critical type
X	overflows on extraction, the file is marked for having bad meta
X	data and skipped.
X
X-	In case of uid/gid overflows on extract, star now maps the
X	overflowing id to nobody to avoid assigning the files to arbitrary
X	users.
X
X-	diffopts=lmtime is now implemented in a less confusing way.
X	The man page now describes the behavior correctly.
X
X-	New diff option "xtimes" as an alias to times+lmtime.
X
X
XNew Options for SchilliX & SPS:
X
X-	New option umask=mask option allows to set the umask that is used
X	by star. This allows to e.g. control the permissions of 
X	directories that are created as intermediate directories.
X
X-	New option dir-owner=user allows to set the owner used for
X	directories that are created as intermediate directories.
X	This only works if star is run as root.
X
X-	New option dir-group=group allows to set the owner used for
X	directories that are created as intermediate directories.
X	This only works if star is run as root.
X
X
X
X-	Workaround for a /usr/ucb/tr related endless loop that could
X	cause gmake (not smake) to hang on Solaris if /usr/ucb/ is in
X	PATH before /usr/bin/
X
X-	star -x -ctime now also works with POSIX.1-2001 tar extensions
X	that include usec time stamps. Note that although star tries to
X	correct the time spent in syscalls, there is still a tendency
X	that the system time will be a bit too slow while star -x -ctime
X	is running.
X
X-	Makefiles fixed so that 'make CCOM=cc64' will even work on a
X	maiden (just unpacked) source tree.
X
X-	Better template 'rmt.dfl' for /etc/default/rmt
X
X-	Better template 'star.dfl' for /etc/default/star
X
X-	The star man page now lists the exit codes for star
X
X-	star now creates a file 'star-lock' in the root directory
X	of a filesystem, if while restore operation is in progress.
X	This prevents star from being run more than once (e.g.
X	from a cron script).
X
X-	get_xtime() fixed so that the print_range() function knows
X	the len of the xheader argument.
X
X-	Trying to find a workaround for a bug found on Solaris that
X	caused a negative nanosecond value to be returned for st_mtime.
X
X-	Do no longer immediately abort if less that 512 bytes are read
X	from an archive.
X
X-	Finally support extracting files into directories that
X	are maked "read only" in the archive.
X
X
X-	A new option -e has been introduced (similar to Sun tar's -e).
X	It is equivalent to a errctl file that has:
X
X	ABORT|ALL|DIFF	*
X
X	in the last line.
X
X-	New error exit code -3 (253) is used if star exits because of -e
X	or the ABORT error control condition.
X
X-	New star option -data-change-warn (suntar -e) causes star not to 
X	exit with a non-zero exit code in case the size of a file changes
X	while it is being archives.
X
X-	suntar now supports the -e option
X
X-	suntar now supports the -D option
X
X-	Star now allows to specify more than one errctl= option.
X
X-	Star now allows to have the error control definitions to be the
X	parameter of a errctl= option. Every errctl= parameter looks
X	like a single file from the error control file.
X
X
X-	The errctl= feature now allows anything that may be desired in
X	order to control the error related behavior of star.
X
X-	errctl.c now calls realloc() instead of malloc() is the length
X	of the longest pattern did increase. This avoids a small memory leak.
X
X-	The star -data-change-warn (suntar -D) option is now implemented via
X	errctl="WARN|GROW|SHRINK *"
X
X-	Avoid core dumps that did occur when star was reading POSIX.1-2001
X	"pax" archives created by simple tar implementations (like GNU tar-1.15.1)
X	that do not create 'g'-type headers and thus may create a path=
X	or lpath= entry in the first tar header that is an extended header.
X
X-	star.1 man page now gives better hints that -multivol and -w are
X	interactive options that cannot be used in non-interactive
X	scenarios like cron.
X
X-	star.1 man page now includes a warning about the possibility to
X	overwrite files outside the current directory tree if the directory 
X	is not empty before starting the restore.
X
X-	star.4 man page now correctly describes signed/unsigned and bit width
X	requirements for the integer types in the extended header.
X
X-	Sun Tar header added to star.h this is in preparation for supporting
X	the (limited) multi volume features of Sun tar.
X
X-	Better range checks for the star's volume header fields in the
X	POSIX.1-2001 extended tar header.
X
X-	Using now unsigned ints for the star's volume header fields in the
X	POSIX.1-2001 extended tar header.
X
X-	Carefully using and checking for signed/unsigned numbers in all
X	numeric field of the POSIX.1-2001 extended tar header.
X
X-	Signed/unsigned discrimination for 
X	"SUN.devmajor"/"SUN.devminor"/"SCHILY.devmajor"/"SCHILY.devminor"/"SCHILY.dev" 
X	added in create mode.
X
X-	get_iarray() is now using astoull() for inode numbers
X
X-	New test in get_iarray() for inode number > INO_T_MAX
X
X-	Now all error messages related to POSIX.1-2001 extended tar headers
X	include the archive block number.
X
X-	Flags XF_BAD_SIZE -> F_BAD_SIZE, XF_BAD_META -> F_BAD_META
X
X-	New Flags F_BAD_UID/F_BAD_GID
X
X-	If a bad uid or gid is detected and the uig/gid is set to nobody,
X	then the file is no longer made suid nobody or sgid nobody.
X
X-	utypes.h now includes MIN/MAX #defines for all basic OS types.
X
X-	New autoconf tests for major_t / minor_t
X
X-	put_dir() now no longer calls fetchdir() if (!nomount || !newfs(info))
X	but if ((!nodesc || dodump > 0) && (!nomount || !newfs(info)))
X	This avoids calling fetchdir() with star -cD but only if star -cD -dump.
X
X-	Star man page now warns to use -restore in case that a user only
X	likes to extract a single file but is not going to start a complete
X	incremental restore.
X
X-	The program star_sym now includes a version number
X
X-	Two powerful programs (star & sfind) announce their marriage that
X	results in a feature enhanced star.
X
X	This code integration was originally planned for the star-1.6
X	development cycle, but it turned out that it is possible to
X	implement a subset of the full set of features without causing
X	any harm to the rest of the code as long as the find code is
X	not actually used.
X
X	To the beginning of the 1980's, AT&T included a simplified cpio
X	implementation to find(1) but this venture did not result in added
X	value (there was only a minor speed up by avoiding a second stat(2)
X	for every file) and the cpio archive format is outdated since a while.
X
X	As a side effect, the functionality of the find(1) program is
X	now available as a library implementation.
X
X	BTW: Although the sfind(1) source is written more cleanly than the
X	UNIX find(1) source, it did take more time to create the library
X	code from the original sfind(1) source than it took to write sfind
X	from scratch.
X
X	The integrated find code has been enhanced compared to the
X	standard sfind(1) code by the following primary operators:
X
X	-chgrp <gname>
X		The primary always evaluates as true; it sets  the
X		group of the file to gname.
X
X	-chmod <mode>
X		The primary always evaluates as true; it sets  the
X		permissions  of  the file to mode.  Octal and symbolic
X		permissions are accepted for  mode  as  with chmod(1).
X
X		Note that this version of star does not yet implement
X		the 'X' character from chmod(1), but future versions of
X		star will add support for 'X' permission mods.
X
X		Meanwhile you could use something like:
X
X		star -c -find . ( -type d -chmod a=rx -o -chmod a=r ) 
X
X	-chown <uname>
X		The primary always evaluates as true; it sets  the
X		owner of the file to uname.
X
X	-false
X		The primary always evaluates as false;  it  allows
X		to  make  the  result  of the full expression different
X		from the result of a part  of  the  expression.
X
X	-true
X		The primary always evaluates as true; it allows to
X		make  the  result of the full expression different
X		from the result of a part of the expression.
X
X	The first three operators allow to modify the file meta data
X	between the time when star fetches the meta data from the
X	filesystem or from the archive and the time when star evaluates
X	the file meta data while adding the file to the archive or
X	extracting the file to the filesystem.
X
X	The last two operators make it more convenient to use find(1)
X	expressions to control an archiver like star.
X
X	The basic idea behind the find(1) integration is:
X
X	Define a find expression and let star evaluate the expression
X	for every file as the first possible "filter" operation.
X	If the "find expression" returns TRUE for the current file,
X	this file is either archived, extracted, diffed or listed
X	as usual.
X	If the "find expression" returns FALSE for the current file,
X	the file is skipped.
X
X	Note that the find primaries -chgrp/-chown/-chmod modify
X	the file meta data as a side effect.
X
X-	New option -find acts as a separator between the "star" command line
X	interface and the "sfind" command line interface.
X
X	To the left of the -find option, star accepts well known
X	star options from the past.
X
X	To the right of the -find option, star expects a list of path
X	names followed by a find(1) expression.
X
X	As with future star-1.6 versions of star, star will allow more
X	new features, it is possible to omit the find(1) expression.
X	This results in the same behavior as if
X
X		star ... -find <path list> -true
X
X	had been specified.
X
X	For more information, check the star and the sfind man page.
X
X	Star currently suffers from the following problems:
X
X	-	If the archive is stdin or stdout, star redefines
X		stdin or stdout. As 'find -exec ...' propagates
X		stdin/stdout/stderr to the called program, this
X		causes unplanned problems.
X
X	-	If the archive is stdout, star redefines stdout.
X		As 'find -print', 'find -printnnl' and 'find -ls'
X		outputs to stdout, this also caused unplanned problems.
X
X	-	Find primaries like '-linkedto' cannot be implemented in
X		extract/list mode as they need to wo preparation work
X		on the local filesystem that cannot be converted to
X		work on an archive.
X
X	-	find options like -H -L -P are not yet implemented
X		in star -find mode
X
X
X-	New files: libfind/*
X
X-	LLONG_MIN/LLONG_MAX/ULLONG_MAX definitions added 
X
X-	Added support for 64 Bit compiling on Solaris using
X
X		smake CCOM=cc64
X
X-	Autoconf test for declaration extern stat() / extern lstat() added.
X
X-	star -find -chmod  now supports the symbolic mode character 'X'
X
X-	star -tv now uses correct type casting for st_uid/st_gid with
X	printf() calls
X
X-	Star -x -C dir pat=pattern now works as documented
X
X-	Star -x -C dir1 -C dir2 now works as expected
X
X-	star man page now documents problems with reused file descriptors
X	from star < file, star list=- and star -find -exec or -ls
X
X-	star -pax-H -pax-L -pax-P now also sets find tree walker options.
X
X-	Star now sets rdevmajor & rdevminor to 0 if the file is off type
X	FIFO. This is to avoid range check warnings in extract mode.
X
X-	Add a workaround for star -find when it is crossing a automounter
X	mount point. Before the fix was added, star -find did complain
X	of not being able to chdir .. because descending into the mount
X	point would change st_dev/st_ino for the mount point.
X
X-	star -x -find -exec does no longer complain of not being able to
X	chdir home
X
X-	star -c -find dir1 dir2 does no longer complain of not being able
X	to find dir2
X
X-	New diffopts= tag: "sympath" checks whether symlink targets
X	are characterwise equal. The old "symlink" tag now only checks
X	whether the symlink targets are pointing to the same file.
X
X-	Support for sfind -maxdepth & -mindepth has been added in create
X	mode
X
X-	Support for BeOS/Zeta shared memory using create_area() has been
X	added.
X
X-	Make star compile again on BeOS/Zeta
X
X-	Make star compile on DragonFly BSD in case gnumake is used.
X
X-	Star now reads answers from stderr on OS like BeOS that do
X	not support /dev/tty
X
X-	Support for compilation in 64 bit mode on Solaris added
X
X-	Added support for Sparc T1000 & T2000 systems (Niagara)
X
X-	Support for fine grained privileges from Solaris 10 added.
X
X-	Added support for armv5teb-linux
X
X-	Default install user/groups changed for Cygwin & MacOS X
X
X-	Autoconf tests for /dev/tty, /dev/null & /dev/zero
X
X-	Now using l*attr() functions from the Linux extended attribute
X	interface. This fixes a bug introduced by the author of the 
X	related code in Linux.
X
X-	Make star not print a Panic: Messahe for lock_ino ("star-lock") in
X	incremental restore mode.
X
X-	star -diff now uses the same sparse test (using SEEK_HOLE) as 
X	create.c uses.
X
X-	star -diff fixed for directory diff checks
X	Before, star did not find both (archive & disk) differences if the
X	number if directories were identical and the last entries were
X	different. 
X	Note that this bug did not affect incremental backups or restores!
X
X-	Star no longer checks the devmajor/devminor values for being inside
X	the allowed range (in restore mode) in case the related file is not
X	a device node. This helps to unpack some older archives.	
X
X-	Added code to support unfixed (Sun Solaris) kernels that do not
X	handle SEEK_HOLE in a way compatible to older OS revisions.
X
X-	Tring to fix a FIFO deadlock bug that happens on very fast multi
X	CPU systems. You should have at least a dual Opteron to suffer 
X	from this bug.
X
X	The new carefully modified algorithm looks more safe.
X
X-	Added a workaround for GNU tar archives with "dumpdirs" that
X	violate the tar structuring rules.
X
X	Note that star will never try to incrementally restore GNU tar
X	"incremental" archives as not even GNU tar is able to do this
X	correctly and as it is questionable whether this is possible at all.
X
X-	Added Support for "mips64" in the makefile system.
X
X-	Try to add a workaround for the this error message:
X
X	star: Operation not applicable. Cannot set ACL 'user::rwx,group::r-x,other::r-x' for 'socket'.
X
X	which happens e.g. when extracting with -acl and the "file" is a socket.
X
X-	Better man page now tells people that the tsize= option refers to the
X	uncompressed archive size.
X
X-	Better documentation for the algorithm used in incremental restore mode.
X
X-	Support for i386-darwin (Intel MacOS X) added
X
X-	Decrease the CPU time needed to extract sparse files.
X	On a slow CPU, this could double the extract speed.
X
X-	Better work around for skipping sparse files in GNU tar archives
X	that violate the tar structuring rules.
X
X-	Star now skips the rest of a file in the archive if a write
X	error occurs during extract.
X
X-	Star now supports to archive and extract sparse file that end 
X	on a hole.
X
X	WARNING: older star versions are unable to correctly extract
X	files that end on a hole. Star will ignore the last hole and not
X	extract it.
X
X-	Star now honors the -force-hole option in create mode and uses
X	the "scan hole" function instead of using SEEK_HOLE/SEEK_DATA
X	to retrieve the hole positions of sparse files.
X
X-	Added a workaround to prevent star from dumping core while trying
X	to extract sparse files > 4 GB created with broken GNU tar.
X
X	NOTE: All GNU tar versions before 1.15.91 are seriously broken
X	and will create defective archives from sparse files > 4 GB.
X
X	Star will now skip the defective files from the archive and
X	print the following warning:
X
X	star: Bad sparse data:   offset 61198336, numbytes 480768 at idx 30609.
X	star: Current write position is 4333572096.
X	star: Skipping 'sparse-file.bin' sorry ...
X	star: WARNING: 'sparse-file.bin' is damaged
X
X-	New test added whether dirent->d_ino exists. This was not true for
X	__DJGPP__ and seems also be false for newer __CYGWIN__ versions.
X
X-	fetchdir() now calls lstat() in case that dirent->d_ino does not exist.
X	This is slow but this is a Cygwin problem.
X
X-	A better error message was added to fifo.c for a rare case that only seems
X	to happen on Linux.
X
X-	find.c now defines DEV_BSIZE to 512 in case it is not defined.
X
X-	findinfo.c now defines DEV_BSIZE to 512 in case it is not defined.
X
X-	The makefilesystem has been revised to allow compilation on SFU (Services
X	for UNIX on MS-WIN - also known as Interix UNIX) and with MSVC.
X
X
X-	The basic "fat" star binary is now named "star" again (was
X	"star_fat" before).
X
X-	Rename all *printf() calls to js_*printf()
X
X-	Make sure that star x dir/ will not print "Pattern 'dir/' did not match"
X	although there was a match.
X
X-	New C++ enhanced makefile system
X
X-	Makefilesystem now starts to support dynamic libraries.
X	use 
X		smake LIMKMODE=dynamic 
X
X	to build a share library version of this project
X
X-	All include files have been moved to include/schily/*
X
X-	New autoconf test for C99 compliant isinf()/isnan()
X
X-	Fixed a typo in fconv.c that caused problems on IBM AIX5.
X
X-	New pthread autoconf tests 
X
X-	New autoconf tests for strncpy()/strlcpy()
X
X-	added snprintf.c to libschily to make star compile again on
X	old operating systems.
X
X-	Added calls to walkopen()/walkgethome() as well as 
X	walkhome()/walkclose()/free(walkstate.twprivate)
X	for recent libfind/find_expr()
X
X-	New enhanced libfind
X
X-	Allow 4 GB (instead of 2 GB) for CPIO asc/crc archives.
X
X-	Fixed a problem from uninitialized data while extracting sparse files.
X
X-	Fixed a problem on platforms without pathconf while extracting sparse files.
X
X-	star -u now removes a slash at the end of a file/directory name before
X	it compares pathnames.
X
X-	Initialize f_namelen and f_lnamelen in extract mode before filling 
X	FINFO from tcb.
X
X-	mem.c moved into libschily
X
X-	Try to avoid an exception during autoconf that happens with the MS C-compiler
X	cl and is caused by a bug in MS's implementation of "access()".
X
X-	Do not print error messages if
X	acl(info->f_name, GETACLCNT, 0, NULL) returns ENOSYS 
X	This is the case for e.g. ZFS.
X
X-	Do no longer print wrong numbers in the statistics in case that
X	star reported a smaller blocksize than the expected block size.
X
X-	The test for incorrect sparse lists (broken sparse tar archives)
X	has been enhanced to match more problem cases.
X
X-	Tar header recognition procedure enhanced. Star no longer believes
X	that a valid tar header may have a zero checksum field.
X
X-	Fixed a bug reported by John Groenveld that caused star to extract
X	some sparse files with Jan 1st 1970 although they have been OK.
X
X-	Better (more correct) computing of signed checksums.
X
X-	star now warns if someone tries to "update" a compressed archive.
X	This is not possible
X
X-	Better error messages for corrupted (edited) /etc/tardump files.
X
X-	bitstring.h corrected to avoid GCC warnings
X
X-	libfind now supports "Solaris event ports" via "-type P"
X
X-	Avoid a core dump in libfind caused by probably uninitialized data
X	when using -exec ... {} +
X
X-	libfind now does much less calls to exit() making libfind more
X	of a real library
X
X-	Take care about the fact that uid_t and gid_t may be less than "int",
X	e.g. short.
X
X-	Several fixes in the man page spax.1 (thanks to Eric Raymond for the
X	hints)
X
X-	Some typo fixes in the star.1 man page
X
X-	Workaround for a Mac OS X linker bug
X
X-	/usr/src/linux/include is no longer included if it contains
X	broken include files.
X
X	Please send a bug report to the Linux Kernel maintainers in case
X	that the makefile system reports broken Linux kernel include files.
X
X-	No longer using -ztext linker option for creating shared libs with GCC
X	as GCC does not create 100% correct binaries and this would abort
X	the process of creating a shared library.
X
X-	New autoconf tests for POSIX compliant time functions in libc
X
X-	GCC Warning setup no longer includes -Wtraditional
X
X-	Cast 3rd parameter from open() to mode_t. This is needed as
X	open() is a varargs function.
X
X-	New targets "html" and "htmlx" for Manual page makefiles
X	allows to convert man pages using "man2html"
X
X-	Dynamic libraries are now supported for Mac OS X
X
X-	Support for WIN-NT-5.2 (MS-Windows 2003) added to the makefile system
X
X-	Better setup for the environment variables that are needed for the
X	Microsoft "cl" compiler.
X
X	NOTE: The current setup is for "english" versions of MS-WIN.
X	You may need to edit the files DEFAULTS/vc6-setup or DEFAULTS/vc7-setup
X	depending on your locale version and the "c"-compiler version you
X	are using.
X
X-	Prevent MSVC ("cl") from creating silly messages
X	like: "... Consider using strerror_s instead."
X
X-	Prevent MSVC ("cl") from complaining about deprecated 
X	option "-ofilename"
X
X-	smake CCOM=xx will now result in writing DEFCCOM=xx into incs/Dcc.<platform>
X	if this is done on the initial make run.
X	conf/cc-config.sh now has one additional parameter
X
X-	Include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from
X	DEFAULTS/Defaults.cygwin32_nt already to allow the script
X	conf/cc-config.sh to detect that "cl" is working. 
X
X-	DEFAULTS/vc7-setup & DEFAULTS/vc6-setup now set
X	.NOWARN: := to tell smake-1.2a41 or newer not to warn
X	about a nonportable assignment (we do
X	not have a UNIX "make" in Cygwin).
X
X-	smake COPTX=-DNO_LARGEFILES now allows to compile in non-largefile mode
X
X-	configure now checks for ctime cftime ascftime strftime and
X	for libresolv and whether /bin/sh is bash
X
X-	New include file schily/wchar.h
X
X-	New include file schily/schilyp.h
X
X-	Typo in schily/param.h fixed
X
X-	getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily
X
X-	printf()/fprintf()/sprintf()/snprintf() have been removed from libschily
X	we now use js_*printf() instead.
X
X-	The makefile system no longer adds -I. to the standard include search path
X
X-	New function dfetchdir() 
X
X-	getargs() now accepts '+' in longopt=
X
X-	remove libxxx.so link before trying to create it
X
X-	Allow a mixture of static and dynamic libraries to link against
X	a program
X
X-	new option -lzo to support "lzop" compression
X
X-	new option -7z to support "p7zip" compression
X
X-	Libfind is now close from the final state
X
X-	Added README file to the directory libfind/ that help to learn how
X	to create a complete find(1) command, a "bsh" find builtin and a 
X	ksh93 find builtin using libfind.
X
X-	Libfind Version is now 1.3
X
X-	libfind has been restructured to allow it to be used as builtin function
X	inside shells like e.g. "bsh" and "ksh93".
X
X-	libfind now allows I/O redirection (needed for shell builtins).
X
X-	libfind now may be told to check for abort situations (needed for
X	shell builtins in order to check for abort on ^C).
X
X-	New function find_free()
X
X-	Libfind no longer leaks memory if called with a commandline with
X	syntax errors.
X
X-	Added autoconf platform recognition code for Intel MacOS X
X
X-	New autoconf test for struct timeval in sys/time.h
X
X-	New autoconf test for struct timezone in sys/time.h
X
X-	Changed include/schily/time.h to depend on the 
X	new autoconf #defines HAVE_STRUCT_TIMEVAL and
X	HAVE_STRUCT_TIMEZONE
X
X-	The Schily makefile system is now also passing OS
X	specific #defines to "configure".
X
X-	New Schily makefile system Target shell allows to
X	call "make shell" in order to get a shell with exactly
X	the same environment as the compilers will see from
X	the makefile system. This helps testing.
X
X-	New autoconf test checks whether we need to call
X	"xx.exe" on a platform. This is needed in order to
X	be able to call the Microsoft compiler from the
X	SFU (Services for UNIX) environment.
X
X-	It is now possible to call the Microsoft compiler
X	from SFU. In order to do this, call "smake CCOM=cl"
X
X	If this does not work, you may need to change the
X	file DEFAULTS/vc7-interix-setup
X
X-	Fixed a bug in names.c that caused nameinit() to go into an endless
X	recursion and dump core if there is no "nobody" in /etc/passwd.
X	This bug has been introduced recently.
X
X-	star is now able to correctly deal with default ACLs on Linux 
X	this is because star now is happy with 3 ACL entries in the default
X	ACL list.
X
X-	New macro OSVERSION implemented in the schily makefilesystem
X
X-	Better support for the "html" and "htmlx" targets
X	that are used to create html versions of the man pages
X
X-	Support for SCO-OpenServer 6.x was added to the makefile system
X
X-	Support for pentium-4-unixware-cc.rul & pentium-4-unixware-gcc.rul
X	was added
X
X-	Support to suppress the echo for the filename with cl.exe
X	was added to the makefile system.
X
X-	Better SFU (Interix) support
X
X-	libiconv autoconf support was added
X
X-	Support for the SFU extended fields in struct utsname was added
X
X-	On FreeBSD, /usr/local/include and /usr/local/lib is now searched.
X	This is needed for gettext()/iconv()
X
X-	Updated man pages for librmt
X
X-	Updated file README
X
X-	Updated file STARvsGNUTAR
X
X-	Include #ifdef S_IFLNK and similar to find_list.c in order to
X	make it work on platforms that do not implement all file types.
X
X
X-	Corrected some typos that caused star not to use O_DSYNC
X	in extract mode.
X
X-	Trying to better work around some broken Linux kernel include files.
X	Thanks to a hint from Michael Teichgräber <mt@wmipf.in-berlin.de>
X
X-	"suntar" now supports the artype=headertype option
X
X-	"suntar" now supports the Sun tar -E option
X
X-	"suntar" now supports the Sun tar -k option
X
X-	"suntar" now supports the Sun tar -P option
X
X-	"suntar" now supports the Sun tar -T option as dummy
X
X-	star/gnutar/suntar now support the new -X option.
X
X-	Set the option string for the non "star" CLI to make getfiles()
X	work correctly.
X
X-	star no longer prints this warning:
X
X	"Notice: link_file: '%s' from/to identical, skipping ...\n"
X
X	if -force-remove has been specified. This has been done in
X	order better emulate the behavior of "suntar".
X
X-	New option -keep-nonempty-dirs prevents star from complaining
X	about trying to remove non-empty directories with -remove-first
X	in case that -remove-recursive has not been specified.
X
X-	New star option -install emulates the behavior of the install(1)
X	program and allows to implement the extract behavior of cpio.
X
X-	suntar -x is now star -xU -force-remove -remove-first -keep-nonempty-dirs -no-fsync
X
X-	New "suntar" option --do-fsync to switch on synchronous writes.
X
X-	scpio -iu is now star -xpU -xdir -install -force-remove -remove-recursive -no-fsync
X
X-	New "scpio" option --do-fsync to switch on synchronous writes.
X
X-	Support for SunStudio 12 on Linux was added.
X	Call "make CCOM=suncc", but note that you then
X	will not be able to compile Linux specific functions like
X	support for ext2 file flags. This does not work because the
X	related include files are not written in clean C.
X
X-	Added a workaround to config.guess to get correct
X	platform names from "configure" even thogh suncc 
X	does not #define __ELF__
X
X-	Linux specific autoconf tests are not only executed on Linux
X	based platforms
X
X-	In order to allow star to compile on broken Linux platforms
X	with broken Linux kernel include files, the autoconfiguration
X	now has been restructured to disable support for ext2 file flags
X	in case that the local include files are broken.
X
X	You may still try: "smake COPTX=-DTRY_EXT2_FS'"
X	and check whether this results in a working binary, but
X	due to the Linux kernel bugs, star now defaults to compile
X	before trying to support features that depend on broken 
X	include files.
X
X-	Include "install" support (to /usr/share/doc/star) for the
X	README files.
X
X-	Added sample files for /etc/default/star and /etc/default/rmt
X
X-	Avoid to print statistics that mention  xxx blocks + -1bytes
X	written in case of write errors to the tape.
X
X
X-	Added Support to create Blastwave SVr4 packages.
X	To create a Blastwave package, call:
X
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that this source tree will allow you to create the package
X	CSWstar but not the packages CSWschilybase and CSWschilyutils
X	on which CSWstar depends.
X
X
X-	Added a note to README.compile on how to work around a problem
X	in /usr/include/linux/types.h that prevents to compile cdrtools
X	on Linux using the Sun Studio compiler.
X
X-	Fixed a typo in RUES/rules.hlp
X
X-	make install now supports a "static" compile enviromnent 
X	for HP-UX.
X
X-	New POSIX enhanced getargs() command line parser.
X
X-	Some small typo fixes in the star man page
X
X-	Make sure that in case of incremental dumps, star writes at
X	least the directory "." even if the incremental dump would be 
X	otherwise empty.
X
X-	Allow to call star -xpU -restore -force-restore
X	to force restoring the next level dump. This is needed in case that
X	the previous dump was empty and star did reject to restore it.
X
X-	Some small typo fixes in the rmt man page
X
X-	The profiled libraries now have names that do no longer end in _p.a
X	To create a profiled version of a command, do something like this: 
X 
X	cd star
X	smake clean
X	smake COPTX=-xpg LXOPTX=-xpg LINKMODE=profiled
X 
X	For GCC use:
X 
X	cd star
X	smake clean
X	smake COPTX=-pg LXOPTX=-pg LINKMODE=profiled
X
X-	libschily::*bytes.c have now better comment.
X
X
X-	smake COPTX=-DNO_LARGEFILES now allows to compile in non-largefile mode
X
X-	Star no longer removes and re-creates identical symlinks and special files
X	in restore mode. This avoids that the time stamps for the parent directory
X	are updated and cause time stamp deviations in some cases in incremental
X	restore mode.
X
X-	Star now implements a better update method for the file "star-symtable".
X	This avoids that only an incomplete "star-symtable" file is present in
X	case that the operating system crashes at the time star writes the data
X	base.
X
X-	treewalk() now initializes struct stat in the WALK_NOSTAT case in a 
X	basic way.
X
X-	star -diff -sparse no longer compares "sparseness" for hardlinks if
X	there is no data for the file in the archive.
X
X-	Use a page aligned buffer too in the -no-fifo case to speed up
X	star a bit in the non-default -no-fifo case.
X
X-	Use the standard big buffer for reading data related to the
X	compression auto-detection.
X
X-	scpio now prints the cpio message "xxx blocks" instead of the
X	star statistics line.
X
X	Note that both Sun cpio and GNU cpio print wrong numbers for
X	tar archives. Star prints the number of 512 byte blocks that
X	make a complete minimal tar archive including both zero 
X	EOF blocks.
X
X-	new option -cpio-statistics allows star to switch to the 
X	CPIO style statistics output.
X
X-	new option -xmeta allows to "extract" meta files from a star
X	archive that has been created with "star -c -meta". This option
X	mainly exists to allow people to give away long list of filenames
X	for debugging purposes without including the file content. It helps
X	e.g. to debug problems in mkisofs that are a result of specific
X	filenames.
X
X-	New option -link-data allows star to add data to hard links in
X	archives. This is currently just a first step and only works
X	with the H=exustar archive format. Note that before POSIX.1-2001
X	there was no permission to add data to a hard-link type tar header.
X
X-	Abort star in case that "star ... dumplevel=" has been used together
X	with list= or -find. This will not result in useful incremental 
X	backups and must be prevented to protect people.
X
X-	Do record locking on the file /etc/tardumps to protect updates
X	against multiple simultaneous incremental star backups.
X	Thanks to a hint from Jean-Louis Martineau <martineau@zmanda.com>
X
X-	star_sym/Makefile now includes  $(LIB_INTL)
X
X-	Upgrade to a newer schily makefile system
X
X-	Catch the case star -f /dev/stdout and still allow star
X	to avoid adding the archive file to the archive.
X
X-	New diffopts=symperm feature allows to exclude comparing
X	permissions with symlinks
X
X-	move getperm() from libfind to libschily 
X
X-	Added a rule to the makefilesystem to auto-create the directory ./incs
X	which was the only "empty" directory without creation rule. Thanks to a hint
X	from Michael Prokop <mika@grml.org>
X
X-	star -version now prints the compile options. This helps to find out whether
X	e.g. ACL support is included. As Linux distributions usually install non
X	developer friendly, this is a common problem on Linux.
X
X-	Star has been prepareed for a future POSIX.1-2001 extended tar header keyword
X	"SCHILY.acl.type" that is needed in future when ZFS ACLs support is added.
X
X-	The suntar ("tar") command line interface now switches to artype=exustar
X	if the -p (archive ACLs) option has been specified.
X
X-	Star in incremental dump mode now compares whether info->f_mtime >= Newer.tv_sec
X	instead of info->f_mtime > Newer.tv_sec to avoid race conditions. Thanks
X	to a hint from Lasse Kliemann.
X
XTODO: 
X
X	-	Complete the man page for spax
X
X	-	Implement multi volume continuation headers that work for
X		files > 8 GB where the last tar header
X		(a POSIX.1-2001 'x'-header) was split across volumes.
X		In this case, if only POSIX compliant TAR features are allowed,
X		the extracting TAR would not be able to correctly skip the
X		large file as it does not know the content of the POSIX.1-2001
X		'x'-header. For this reason, later star versions need to implement
X		a method to create multi volume continuation (skip) headers that
X		include the size of the split POSIX.1-2001 'x'-header and the
X		size of the following large file.
X
X		Note that even with this method we would need a new method
X		(different from the current bitmap) to deal with multi volume
X		continuation headers for split files in case the FIFO in star
X		may be larger than 8 GB.
X
X	-	Implement a autoconf extension to to deal with Linux with XFS
X		where not all ACL handling is inside -lacl ??? is this still true?
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully functional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix.1-1988) handling added
X1994	Xstar format (extended Posix.1-1988) defined and introduced
X1995	Ported to many platforms
X1999	Support for Win32 (Cygwin)
X1999	base 256 support to overcome limitation with octal fields
X2001	Large file support
X2001	Support for POSIX.1-2001 extended headers
X2001	Support for ACLs in POSIX.1-2001 extended headers
X2002	Support for extended file flags in POSIX.1-2001 extended headers
X2002	Support for extended inode meta data and meta files
X2003	Error control added to allow to selectively ignore error contitions
X2003	ED like pattern based file name substitution with -s '/from/to/[gp]'
X2003	Efficient built in -copy mode
X2003	Basic support for incremental dumps (incremental restore not yet ready)
X2003	CPIO archive support
X2003	New command 'spax' for POSIX.1 command line compatibility.
X2003	New command 'scpio' for SUSv2 command line compatibility.
X2003	New command 'suntar' for Solaris command line compatibility.
X2003	New command 'gnutar' for GNU tar command line compatibility.
X2003	Support for reliable multi-volume archives with media size detection
X2005	Support for full and incremental dumps and restores.
X2005	The find(1) code has been integrated and allows to use find on archives
X
XSupported platforms:
X
XVirtually any! Known to work:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux,
XHP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD, OpenBSD,
XOSF-1, True-64, QNX, BeOS, Apollo Domain/OS, Next-STep, 
XOS/2, SCO-openserver, SCO-unixware, Caldera OpenUnix,
XCygwin (Win32), Sony NewsOS,  BSDi (BSD/OS), QNX,
XApple Rhapsody, MacOS X, AmigaOS, GNU Hurd
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
X
XStar development started 1982, the first complete implementation has 
Xbeen done in 1985. I never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	remote tape support	- a fast RMT implementation that has no
X				  probems to saturate a 100 Mb/s network.
X
X	accurate sparse files	- star is able to reproduce holes in sparse
X				  files accurately if the OS includes 
X				  the needed support functions. This is
X				  currently true for Solaris-2.3 to
X				  Solaris-2.5.1
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record
X				  long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  With POSIX.1-2001 the times are in nanosecond
X				  granularity.
X				  Star may reset access time after doing
X				  backup. On Solaris this can be done without
X				  changing the ctime.
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star,
X				  POSIX.1-2001 PAX, Sun's Solaris tar.
X
X
X	automatic compression detect - star automatically detects whether the
X				  archive is compressed. If it has been
X				  compressed with a compression program that
X				  is compatible to decompression with "gzip"
X				  or "bzip2", star automatically activates
X				  decompression.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete
X				  description of bugs found in other tar
X				  implementations. Star is the first tar
X				  implementation that supports POSIX.1-2001.
X
X	support for ACLs and file flags - star supports Access Control Lists
X				  and extended file flags (as found on FreeBSD
X				  and Linux). Support to archive and restore
X				  other file properties may be easily added.
X
X	support for all inode metadata - star supports to put all inode
X				  metadata on the archive. This allows future
X				  versions of star to perform true
X				  incremental dumps.
X
X	sophisticated error control - allows to tell star which error types
X				  should be ignored for wich file name pattern.
X				  This allows to write backup scripts that give
X				  no error messages for all problems that are
X				  tolerable (e.g. growing log files).
X
X	ED like filename substitution - star supports automated pattern rule based
X				  file name substitution as documented for 'pax'.
X
X	A fast built in -copy mode - allows to make fast and accurate copies and
X				  directory tree comparisons.
X
X	Integrated find(1) code - allows many interesting new features that would
X				  be possible with a separate find call.
X
XHave a look at the manual page, it is included in the distribution.
X
END-of-star-1.5.2/AN-1.5
echo x - star-1.5.2/STATUS.alpha
sed 's/^X//' >star-1.5.2/STATUS.alpha << 'END-of-star-1.5.2/STATUS.alpha'
XThis is the actual snapshot of the star-1.5 release.
END-of-star-1.5.2/STATUS.alpha
echo x - star-1.5.2/AN-1.2
sed 's/^X//' >star-1.5.2/AN-1.2 << 'END-of-star-1.5.2/AN-1.2'
XNewsgroups: comp.unix.admin,comp.unix.misc,alt.os.linux,alt.sys.sun,bln.comp.sun,bln.comp.unix,comp.os.linux.development.apps,comp.os.linux.misc,comp.sys.hp.apps,comp.sys.hp.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.misc,comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.misc,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.bsd.netbsd.misc,comp.unix.solaris,de.comp.os.linux.misc,de.comp.os.unix,linux.dev.admin,linux.dev.apps,maus.os.linux,maus.os.linux68k,maus.os.unix,uk.comp.os.linux
XSubject: Star-1.2 source has been released
X
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximlementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.fokus.gmd.de/pub/unix/star
X
XThis release is mostly a bugfix release and now gives a 
Xnew stable base release in preparation of future changes.
X
XChanges since star-1.1:
X
X	Fixed some problems with the -z option
X	Fixed some oddities with the -listnew option
X	Fixed a bug that caused a coredump with -nullout
X	Added support for the different behavior of the chown() syscall
X		in Linux that caused problems with extracting 
X		suid root files on Linux
X	Allow the -C option to work with the listfile= option too
X	New option -dodesc
X	Added the code to use the _FIOAI ioctl on Solaris to speed up
X		archiving sparse files > 200 times. You need a hacked
X		ufs filesystem in order to use this on Solaris 2.6
X		ftp://ftp.fokus.gmd.de/pub/unix/kernel/ufs
X
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully funtional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix) handling added
X1994	Xstar format (extended Posix) defined and introduced
X1995	Ported to many platforms
X
XSupported platforms:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux, HP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
XStar is able to make backups with more than 12MB/s if the
Xdisk and tape drive support such a speed. This is more than
Xdouble the speed that ufsdump will get.
XAmpex got 13.5 MB/s with their new DLT tape drive.
XUfsdump got a maximum speed of about 6MB/s with the same hardware.
X
XStar development started 1982, development is still in progress.
XThe current version of star is stable and 
XI never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  may reset access time after doing backup
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete description
X				  of bugs found in other tar implementations.
X
XHave a look at the manual page, it is included in the distribution.
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	schilling@fokus.gmd.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/AN-1.2
echo x - star-1.5.2/COMPILE
sed 's/^X//' >star-1.5.2/COMPILE << 'END-of-star-1.5.2/COMPILE'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X	The location for the root specific configuratin files is controlled
X	via the INS_RBASE= make macro. The default vaulue for this macro is "/".
X	If you like to install global default configuration files into 
X	/usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local
X
X	Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into.
X	If you like to like to modify the compiled-in path values, call:
X
X		smake clean
X		smake INS_BASE=/usr/local INS_RBASE=/usr/local
X
XCompiling in a different ELF RUNPATH:
X
X	In order to allow binaries to work correctly even if the shared
X	libraries are not in the default search path of the runtime linker,
X	a RUINPATH needs to be set.
X
X	The ELF RUNPATH is by default derived from $(INS_BASE). If you like to
X	set INS_BASE=/usr and create binaries that do not include a RUNPATH at all,
X	call:
X
X		smake relink RUNPATH=
X
X
XUsing a different man path prefix:
X
X	Man Pages are by default installed under:
X
X	$(INS_BASE)/$(MANBASE)/man
X	and MANBASE=share
X
X	If you like a different prefix for man pages, call:
X
X		smake DEFMANBASE=soething install
X
X	to install man pages into $(INS_BASE)/something/man/*
X
X	If you like to install man pages under $(INS_BASE)/man/*, call
X
X		smake DEFMANBASE=. install
X
XInstalling stripped binaries:
X
X	If you like to install stripped binaries via "smake install", call:
X
X		smake STRIPFLAGS=-s install
X
X	This calls "strip" on every final install path for all executable
X	binaries.
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will compile in "/usr/local" as prefix into all related binaries
X	and then create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
X	Note that you need to call "smake clean" before in case that the code
X	was previously compiled with different defaults.
X
XSetting different default directory permissions for install directories:
X
X	All directories that are created by the Schily makefile system in the
X	target directory path when
X
X		smake install
X
X	is called system use a special default 022 that is in DEFINSUMASK=
X	This causes all directories in the target install path to be created
X	with 0755 permissions.
X
X	All other directories that are created by the Schily makefile system 
X	use a single global default 002 that is in DEFUMASK=
X
X	If you like to create install directories with e.g. 0775 permissions,
X	call:
X
X		smake DEFINSUMASK=002 install
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X	If your debugger does not like optimized binaries, call something
X	like:
X
X		 make "COPTX=-g -xO0" LDOPTX=-g
X	or
X		 make "COPTX=-g -O0" LDOPTX=-g
X
X	depending on the option system of your C-compiler
X
X
XCompiling the project to allow performance monitoring with gprof from BSD:
X
X	If you like to compile for performance monitoriing with gprof,
X	call:
X
X		make clean
X		make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled
X
X	or
X		make COPTX=-pg LDOPTX=-pg LINKMODE=profiled
X
X	depending on the option system of your C-compiler
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XCompiling in a cross compilation environment:
X
X	The Schily autoconf system has been enhanced to support cross
X	compilation. Schily autoconf is based on GNU autoconf-2.13 and
X	GNU autoconf does not support cross compilation because it needs
X	to run scripts on the target system for some of the tests.
X
X	The "configure" script that is delivered with the Schily makefile
X	system runs more than 770 tests and aprox 70 of them need to be 
X	run on the target system.
X
X	The Schily autoconf system now supports a method to run these ~70
X	tests natively on a target system. You either need a machine with
X	remote login features or you need an emulator with a method to
X	copy files into the emulated system and to run binaries on the
X	emulated system as e.g. the Android emulator.
X
X	We currently deliver three scripts for "remote" execution of
X	programs on the target system:
X
X	runrmt_ssh		runs the commands remove via ssh
X	runrmt_rsh		runs the commands remove via rsh
X	runrmt_android		runs the commands remove via the debug bridge
X
X	If you need to remotely run programs on a system that is not
X	supported by one of there three scripts, you need to modify one
X	of them to match your needs.
X
X	To enable Cross Compilation use the following environment variables:
X
X	CONFIG_RMTCALL=		Set up to point to a script that does
X				the remote execution, e.g.:
X
X				CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh
X
X	CONFIG_RMTHOST=		Set up to point to your remote host, e.g.:
X
X				CONFIG_RMTHOST=hostname 
X				or
X				CONFIG_RMTHOST=user@hostname
X
X				use a dummy if you like to use something
X				like to the Android emulator.
X
X	CONFIG_RMTDEBUG=	Set to something non-null in order to 
X				let the remote execution script mark
X				remote comands. This will result in
X				configure messages like:
X
X				checking bits in minor device number... REMOTE 8
X
X				If you cannot run commands on the target
X				platform, you may set:
X
X				CONFIG_RMTDEBUG=true
X				CONFIG_RMTCALL=:
X
X				carefully watch for the "REMOTE" flagged test
X				output and later manually edit the file:
X
X				incs/<arch-dir>/xconfig.h
X
X				Do not forget to manually edit the files:
X
X				incs/<arch-dir>/align.h
X				and
X				incs/<arch-dir>/avoffset.h
X
X	Note that smake includes automake features that automatically
X	retrieve system ID information. For this reason, you need to overwrite 
X	related macros from the command line if you like to do a
X	cross compilation.
X
X	Related make macros:
X
X	K_ARCH=			# (sun4v) Kernel ARCH filled from uname -m / arch -k
X	M_ARCH=			# (sun4)  Machine filled from arch
X	P_ARCH=			# (sparc) CPU ARCH filled from uname -p / mach
X	OSNAME=			# sunos, linux, ....
X	OSREL=			# 5.11
X	OSVERSION=		# snv_130
X	CCOM=			# generic compiler name (e.g. "gcc")
X	CC_COM=			# compiler to call (name + basic args)
X
X	ARCH=			overwrites M_ARCH and P_ARCH
X
X	It is usually suffucient to set ARCH and OSNAME.
X
X	In order to use a cross compiler environment instead of a native compiler,
X	set the make macro CC_COM to something different than "cc".
X
X	If you are on Linux and like to compile for Android, do the following:
X
X	1) 	set up CC acording to the instructions from the cross compiler
X		tool chain
X
X	2)	set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.:
X		setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android
X		setenv CONFIG_RMTHOST NONE
X
X	3)	call smake:
X
X		smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC"
X	
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/COMPILE
echo x - star-1.5.2/PORTING
sed 's/^X//' >star-1.5.2/PORTING << 'END-of-star-1.5.2/PORTING'
XPorting FAQ for SING (Schily Is Not Gnu) utilities.
X
X-	The base for porting is the makefile system.
X	Always look into:
X		ftp://ftp.berlios.de/pub/makefiles
X	for a version that might be newer than the one used
X	inside the program that should be ported.
X
X	If you want to know more about the makefile system,
X	read the man pages makefiles4 and makerules.4,
X	they are located in man/man4/*
X
X		to convert a manpage troff->postscript use:
X			gtroff -man file.tr | grops > file.ps
X
X		to convert a manpage troff->Terminal use:
X			nroff -man file.tr | more -s
X
X
X-	To be able to use the makefile system, you need a
X	make program that meets the minimum requirements 
X	for a make program (see makerules(4) man page)
X	Currently, the following make programs meet this
X	minimum requirements: Smake (my program), SunPro Make and Gmake
X
X	A good idea is to first compile 'smake' if you don't
X	have it already.
X
X	The smake source can be found on:
X
X		ftp://ftp.berlios.de/pub/smake/
X	or
X		ftp://ftp.berlios.de/pub/smake/alpha
X
X	for the most recent version.
X
X-	To be able to use the makefile system with gmake,
X	the operating system must have a command named 'uname'.
X	If not, you have to provide it as a shell script.
X
X
X1)	If you are using smake release 1.1 or newer and 
X	a recent makefile system, the next step should be done
X	automagically (smake-1.1 or newer implement a -version
X	option to retrieve the version number).
X
X	If you are using gmake, you need to do this by hand.
X
X	First step for adding a new architecture is creating
X	the appropriate rule files in the RULES directory:
X
X		RULES/os-{newos}.id	For OS identification
X		RULES/os-{newos}.def	For OS definition (man style)
X		RULES/{newarch}-{newos}-cc.rul
X		RULES/{newarch}-{newos}-gcc.rul
X
X	And create a file:
X
X		DEFAULTS/Defaults.{newos}
X
X	Have a look in similar files for a template.
X
X	If the files hae been generated automagically by smake,
X	please check the content and mail me a working set for your OS.
X
X2)	All C-porting control is located in include/mconfig.h
X	and in the file incs/{newarch}-{newos}-{cc!gcc}/xconfig.h
X	The later file is created automatically using GNU 
X	configure. The File conf/xconfig.h.in contains all
X	templates and comments for the various things that are tested.
X
X	In any case, it is recommended to carefully watch the
X	outout from the 'configure' run (which is automatically
X	started from within 'make'). You may also wish to check all
X	files that are created in the directory 
X	incs/{newarch}-{newos}-{cc!gcc}/
X
X3)	Everything should compile now.
X	If not, try to hack the files and mail me your problems.
X
X	You should have a closer look at the sources as it may be that
X	the first attempt to port a utility will not support
X	all possible features of the new OS.
X	If your OS supportes these features in a non standard way,
X	you need to hack conf/configure.in and the source and add 
X	support for the non standard behaviour of your OS.
X
X	This is definitely recommended if you want to port programs 
X	like 'cdrecord' 'star' and similar which need fork(2) and
X	mmap(2) or setprioriry(2) or if you check programs on
X	non POSIX operating systems like W95/W98/WNT OS/2 and
X	similar.
X
X
XNotice for porting tools, that use the SCSI library libscg:
X
XI)	Cdrecord should compile at this moment if you are using
X	a new architecture. The SCSI transport however will not work.
X	Check this!
X
X	All files that contain low level code for SCSI transport are 
X	located in the directory libscg/
X
XII)	Implementing a SCSI Transport Layer for your architecture:
X
X	You need to add a new block into scsihack.c that will add
X	support for your OS. Copy the block:
X
X	#ifdef  __NEW_ARCHITECTURE
X	#define SCSI_IMPL               /* We have a SCSI implementation for XXX */
X	/*
X	 * Add new hacks here
X	 */
X	#include "scsi-new-arch.c"
X	#endif
X
X	and rename __NEW_ARCHITECTURE to reflect your new architecture.
X
X	Add a new file that will be called scsi-{newarch}.c
X	Have a look into scsi-linux-sg.c for a template how to do this.
X
X	More hints for writing the needed SCSI low level transport functions
X	is in:
X
X		ftp://ftp.berlios.de/pub/cdrecord/README.scsi-IF
X
X4)	Test your ported program.
X
X5)	You may check other programs from me to see if everything compiles
X	and works.
X
X6)	Send me your changes
X
XJoerg Schilling
X
Xjoerg.schilling@fokus.fraunhofer.de
Xjoerg@schily.isdn.cs.tu-berlin.de
Xjs@cs.tu-berlin.de
X
X
X
X
END-of-star-1.5.2/PORTING
echo x - star-1.5.2/BUILD
sed 's/^X//' >star-1.5.2/BUILD << 'END-of-star-1.5.2/BUILD'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X	The location for the root specific configuratin files is controlled
X	via the INS_RBASE= make macro. The default vaulue for this macro is "/".
X	If you like to install global default configuration files into 
X	/usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local
X
X	Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into.
X	If you like to like to modify the compiled-in path values, call:
X
X		smake clean
X		smake INS_BASE=/usr/local INS_RBASE=/usr/local
X
XCompiling in a different ELF RUNPATH:
X
X	In order to allow binaries to work correctly even if the shared
X	libraries are not in the default search path of the runtime linker,
X	a RUINPATH needs to be set.
X
X	The ELF RUNPATH is by default derived from $(INS_BASE). If you like to
X	set INS_BASE=/usr and create binaries that do not include a RUNPATH at all,
X	call:
X
X		smake relink RUNPATH=
X
X
XUsing a different man path prefix:
X
X	Man Pages are by default installed under:
X
X	$(INS_BASE)/$(MANBASE)/man
X	and MANBASE=share
X
X	If you like a different prefix for man pages, call:
X
X		smake DEFMANBASE=soething install
X
X	to install man pages into $(INS_BASE)/something/man/*
X
X	If you like to install man pages under $(INS_BASE)/man/*, call
X
X		smake DEFMANBASE=. install
X
XInstalling stripped binaries:
X
X	If you like to install stripped binaries via "smake install", call:
X
X		smake STRIPFLAGS=-s install
X
X	This calls "strip" on every final install path for all executable
X	binaries.
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will compile in "/usr/local" as prefix into all related binaries
X	and then create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
X	Note that you need to call "smake clean" before in case that the code
X	was previously compiled with different defaults.
X
XSetting different default directory permissions for install directories:
X
X	All directories that are created by the Schily makefile system in the
X	target directory path when
X
X		smake install
X
X	is called system use a special default 022 that is in DEFINSUMASK=
X	This causes all directories in the target install path to be created
X	with 0755 permissions.
X
X	All other directories that are created by the Schily makefile system 
X	use a single global default 002 that is in DEFUMASK=
X
X	If you like to create install directories with e.g. 0775 permissions,
X	call:
X
X		smake DEFINSUMASK=002 install
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X	If your debugger does not like optimized binaries, call something
X	like:
X
X		 make "COPTX=-g -xO0" LDOPTX=-g
X	or
X		 make "COPTX=-g -O0" LDOPTX=-g
X
X	depending on the option system of your C-compiler
X
X
XCompiling the project to allow performance monitoring with gprof from BSD:
X
X	If you like to compile for performance monitoriing with gprof,
X	call:
X
X		make clean
X		make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled
X
X	or
X		make COPTX=-pg LDOPTX=-pg LINKMODE=profiled
X
X	depending on the option system of your C-compiler
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XCompiling in a cross compilation environment:
X
X	The Schily autoconf system has been enhanced to support cross
X	compilation. Schily autoconf is based on GNU autoconf-2.13 and
X	GNU autoconf does not support cross compilation because it needs
X	to run scripts on the target system for some of the tests.
X
X	The "configure" script that is delivered with the Schily makefile
X	system runs more than 770 tests and aprox 70 of them need to be 
X	run on the target system.
X
X	The Schily autoconf system now supports a method to run these ~70
X	tests natively on a target system. You either need a machine with
X	remote login features or you need an emulator with a method to
X	copy files into the emulated system and to run binaries on the
X	emulated system as e.g. the Android emulator.
X
X	We currently deliver three scripts for "remote" execution of
X	programs on the target system:
X
X	runrmt_ssh		runs the commands remove via ssh
X	runrmt_rsh		runs the commands remove via rsh
X	runrmt_android		runs the commands remove via the debug bridge
X
X	If you need to remotely run programs on a system that is not
X	supported by one of there three scripts, you need to modify one
X	of them to match your needs.
X
X	To enable Cross Compilation use the following environment variables:
X
X	CONFIG_RMTCALL=		Set up to point to a script that does
X				the remote execution, e.g.:
X
X				CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh
X
X	CONFIG_RMTHOST=		Set up to point to your remote host, e.g.:
X
X				CONFIG_RMTHOST=hostname 
X				or
X				CONFIG_RMTHOST=user@hostname
X
X				use a dummy if you like to use something
X				like to the Android emulator.
X
X	CONFIG_RMTDEBUG=	Set to something non-null in order to 
X				let the remote execution script mark
X				remote comands. This will result in
X				configure messages like:
X
X				checking bits in minor device number... REMOTE 8
X
X				If you cannot run commands on the target
X				platform, you may set:
X
X				CONFIG_RMTDEBUG=true
X				CONFIG_RMTCALL=:
X
X				carefully watch for the "REMOTE" flagged test
X				output and later manually edit the file:
X
X				incs/<arch-dir>/xconfig.h
X
X				Do not forget to manually edit the files:
X
X				incs/<arch-dir>/align.h
X				and
X				incs/<arch-dir>/avoffset.h
X
X	Note that smake includes automake features that automatically
X	retrieve system ID information. For this reason, you need to overwrite 
X	related macros from the command line if you like to do a
X	cross compilation.
X
X	Related make macros:
X
X	K_ARCH=			# (sun4v) Kernel ARCH filled from uname -m / arch -k
X	M_ARCH=			# (sun4)  Machine filled from arch
X	P_ARCH=			# (sparc) CPU ARCH filled from uname -p / mach
X	OSNAME=			# sunos, linux, ....
X	OSREL=			# 5.11
X	OSVERSION=		# snv_130
X	CCOM=			# generic compiler name (e.g. "gcc")
X	CC_COM=			# compiler to call (name + basic args)
X
X	ARCH=			overwrites M_ARCH and P_ARCH
X
X	It is usually suffucient to set ARCH and OSNAME.
X
X	In order to use a cross compiler environment instead of a native compiler,
X	set the make macro CC_COM to something different than "cc".
X
X	If you are on Linux and like to compile for Android, do the following:
X
X	1) 	set up CC acording to the instructions from the cross compiler
X		tool chain
X
X	2)	set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.:
X		setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android
X		setenv CONFIG_RMTHOST NONE
X
X	3)	call smake:
X
X		smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC"
X	
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/BUILD
echo x - star-1.5.2/INSTALL
sed 's/^X//' >star-1.5.2/INSTALL << 'END-of-star-1.5.2/INSTALL'
XShort overview for those who don't read manuals:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	There is no 'configure', simply call 'make' on the top level
X	directory.
X
X	***** If this does not work for you, read the rest if this file   *****
X	***** If you have any problem, also first read the topic specific *****
X	***** README.* files (e.g. README.linux for Linux problems).	  *****
X
X	All results in general will be placed into a directory named 
X	OBJ/<arch-name>/ in the current projects leaf directory.
X
X	You **need** either my "smake" program, the SunPRO make 
X	from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x)
X	or GNU make to compile this program. Read READMEs/README.gmake for 
X	more information on gmake and a list of the most annoying bugs in gmake.
X
X	All other make programs are either not smart enough or have bugs.
X
X	My "smake" source is at:
X
X	ftp://ftp.berlios.de/pub/smake/alpha/
X
X	It is easy to compile and doesn't need a working make program
X	on your machine. If you don't have a working "make" program on the
X	machine where you like to compile "smake" read the file "BOOTSTRAP".
X
X	If you have the choice between all three make programs, the
X	preference would be 
X
X		1)	smake		(preferred)
X		2)	SunPRO make
X		3)	GNU make	(this is the last resort)
X
X	Important notice: "smake" that comes with SGI/IRIX will not work!!!
X	This is not the Schily "smake" but a dumb make program from SGI.
X
X	***** If you are on a platform that is not yet known by the	 *****
X	***** Schily makefilesystem you cannot use GNU make.		 *****
X	***** In this case, the automake features of smake are required. *****
X
X	Please read the README's for your operating system too.
X
X			WARNING
X	Do not use 'mc' to extract the tar file!
X	All mc versions before 4.0.14 cannot extract symbolic links correctly.
X
X	The versions of WinZip that support tar archives cannot be used too.
X	The reason is that they don't support symbolic links.
X	Star and Gnutar do support symbolic links even on win32 systems.
X	To support symbolic links on win32, you need to link with the
X	Cygwin32 POSIX library.
X
X	To unpack an archive use:
X
X		gzip -d < some-arch.tar.gz | tar -xpf -
X
X	Replace 'star' by the actual archive name.
X
X	If your Platform does not support hard links or symbolic links, you
X	first need to compile "star" and then call:
X
X		star -xpz -copy-links < some-arch.tar.gz
X
X	If your platform does not support hard links but supports
X	symbolic links, you only need to call the command above once.
X	If your platform does not support symbolic links, you need to call
X	the command twice because a symbolic link may occur in the archive
X	before the file it points to.
X		
X
X
XHere comes the long form:
X
X
XPREFACE:
X
X	Calling configure manually is outdated because this is a task of the
X	makefile system.
X
X	You don't have to call configure with this make file system.
X
X	Calling	'make' or 'make all' on the top level directory will create
X	all needed targets. Calling 'make install' will install all needed
X	files.
X
X	This program uses a new makefilesystem. This makefilesystem uses
X	techniques and ideas from the 1980s and 1990s, is designed in a
X	modular way and allows sources to be combined in a modular way.
X	For mor information on the modular features read README.SSPM.
X
X	The makefilesystem is optimized for a program called 'smake'
X	Copyright 1985 by Jörg Schilling, but SunPro make (the make program
X	that comes with SunOS >= 4.0 and Solaris) as well as newer versions
X	of GNU make will work also. BSDmake could be made working, if it
X	supports pattern matching rules correctly.
X
X	The makefile system allows simultaneous compilation on a wide
X	variety of target systems if the source tree is accessible via NFS.
X
X
XFinding Compilation Results:
X
X	To allow this, all binaries and results of a 'compilation' in any form
X	are placed in sub-directories. This includes automatically generated
X	include files. Results in general will be placed into
X	a directory named OBJ/<arch-name>/ in the current projects
X	leaf directory, libraries will be placed into a directory called
X	libs/<arch-name>/ that is located in the source tree root directory.
X
X		<arch-name> will be something like 'sparc-sunos5-cc'
X
X	This is the main reason why simultaneous compilation is possible on
X	all supported platforms if the source is mounted via NFS.
X
X
XHow to compile:
X
X	To compile a system or sub-system, simply enter 'smake', 'make' or 
X	'Gmake'. Compilation may be initialized at any point of the source
X	tree of a system. If compilation is started in a sub tree, all objects
X	in that sub tree will be made.
X
X
XHow to install results:
X
X	To install the product of a compilation in your system, call:
X
X		smake install
X
X	at top level. The binaries will usually be installed in 
X	/opt/schily/bin. The directory /opt/<vendor-name>/ has been agreed
X	on by all major UNIX vendors in 1989. Unfortunately, still not all
X	vendors follow this agreement.
X
X	If you want to change the default installation directory, edit the
X	appropriate (system dependent) files in the DEFAULTS directory
X	(e.g. DEFAULTS/Defaults.sunos5).
X
X	***** If "smake install" doesn't do anything, you are on a broken *****
X	***** File System. Remove the file INSTALL in this case (the FS   *****
X	***** does not handle upper/lower case characters correctly).	  *****
X	***** This is true for all DOS based filesystems and for Apple's  *****
X	***** HFS+ filesystem.						  *****
X
X
XUsing a different installation directory:
X
X	If your system does not yet use the standard installation path /opt
X	or if you don't like this installation directory, you can easily 
X	change the installation directory. You may edit the DEFAULTS file 
X	for your system and modify the macro INS_BASE.
X
X	You may  use a different installation directory without editing the
X	DEFAULTS files. If you like to install everything in /usr/local, call:
X
X
X	If your make program supports to propagate make macros to sub make programs
X	which is the case for recent smake releases as well as for a recent gnumake:
X
X		smake INS_BASE=/usr/local install
X	or
X		gmake INS_BASE=/usr/local install
X
X	If you make program doesn't propagate make macros (e.g. SunPRO make) call:
X
X		env INS_BASE=/usr/local make -e install
X
X	Note that INS_BASE=/usr/local needs to be specified for every operation
X	that compiles or links programs as the path is stored inside the
X	binaries.
X
X	The location for the root specific configuratin files is controlled
X	via the INS_RBASE= make macro. The default vaulue for this macro is "/".
X	If you like to install global default configuration files into 
X	/usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local
X
X	Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into.
X	If you like to like to modify the compiled-in path values, call:
X
X		smake clean
X		smake INS_BASE=/usr/local INS_RBASE=/usr/local
X
XCompiling in a different ELF RUNPATH:
X
X	In order to allow binaries to work correctly even if the shared
X	libraries are not in the default search path of the runtime linker,
X	a RUINPATH needs to be set.
X
X	The ELF RUNPATH is by default derived from $(INS_BASE). If you like to
X	set INS_BASE=/usr and create binaries that do not include a RUNPATH at all,
X	call:
X
X		smake relink RUNPATH=
X
X
XUsing a different man path prefix:
X
X	Man Pages are by default installed under:
X
X	$(INS_BASE)/$(MANBASE)/man
X	and MANBASE=share
X
X	If you like a different prefix for man pages, call:
X
X		smake DEFMANBASE=soething install
X
X	to install man pages into $(INS_BASE)/something/man/*
X
X	If you like to install man pages under $(INS_BASE)/man/*, call
X
X		smake DEFMANBASE=. install
X
XInstalling stripped binaries:
X
X	If you like to install stripped binaries via "smake install", call:
X
X		smake STRIPFLAGS=-s install
X
X	This calls "strip" on every final install path for all executable
X	binaries.
X
XInstalling to a prototype directory to implement package creation staging:
X
X	If you like to create a prototype directory tree that is used as an
X	intermediate store for package creation, use the DESTDIR macro:
X
X		smake INS_BASE=/usr/local DESTDIR=/tmp install
X
X	This will compile in "/usr/local" as prefix into all related binaries
X	and then create a usr/local tree below /tmp (i.e. /tmp/usr/local).
X
X	Note that you need to call "smake clean" before in case that the code
X	was previously compiled with different defaults.
X
XSetting different default directory permissions for install directories:
X
X	All directories that are created by the Schily makefile system in the
X	target directory path when
X
X		smake install
X
X	is called system use a special default 022 that is in DEFINSUMASK=
X	This causes all directories in the target install path to be created
X	with 0755 permissions.
X
X	All other directories that are created by the Schily makefile system 
X	use a single global default 002 that is in DEFUMASK=
X
X	If you like to create install directories with e.g. 0775 permissions,
X	call:
X
X		smake DEFINSUMASK=002 install
X
XUsing a different C-compiler:
X
X	If the configured default compiler is not present on the current machine,
X	the makefilesystem will try an automatic fallback to GCC. For this reason
X	in most cases you will not need to manually select a compiler.
X
X	The default C-compiler can be modified in the files in the
X	DEFAULT directory. If you want to have a different compiler
X	for one compilation, call:
X
X		make CCOM=gcc
X	or
X		make CCOM=cc
X
X	This works even when your make program doesn't propagate make macros.
X
X
XCreating 64 bit executables on Solaris:
X
X	Simply call:
X
X		make CCOM=gcc64
X	or
X		make CCOM=cc64
X
X	It is not clear if GCC already supports other platforms in 64 bit mode.
X	As all GCC versions before 3.1 did emit hundreds of compilation
X	warnings related to 64 bit bugs when compiling itself, there is little
X	hope that other platforms are already supported in 64 bit mode.
X
XCreating executables using the Sun Studio compiler on Linux:
X
X	Simply call:
X
X		make CCOM=suncc
X
X	If the compilation does not work, try:
X
X	mkdir   /opt/sunstudio12/prod/include/cc/linux 
X	cp      /usr/include/linux/types.h  /opt/sunstudio12/prod/include/cc/linux
X
X	Then edit /opt/sunstudio12/prod/include/cc/linux/types.h and remove all
X	lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)"
X	as well as the related #endif.
X
X
X
XGetting help from make:
X
X	For a list of targets call:
X
X		make .help
X
X
XGetting more information on the make file system:
X
X	The man page makefiles.4 located in man/man4/makefiles.4 contains
X	the documentation on general use and for leaf makefiles.
X
X	The man page makerules.4 located in man/man4/makerules.4 contains
X	the documentation for system programmers who want to modify
X	the make rules of the makefile system.
X
X	For further information read
X
X		ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz
X
X
XHints for compilation:
X
X	The makefile system is optimized for 'smake'. Smake will give the
X	fastest processing and best debugging output.
X
X	SunPro make will work as is. GNU make need some special preparation.
X
X	Read READMEs/README.gmake for more information on gmake.
X
X	To use GNU make create a file called 'Gmake' in your search path
X	that contains:
X
X		#!/bin/sh
X		MAKEPROG=gmake
X		export MAKEPROG
X		exec gmake "$@"
X
X	and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make'
X	on Linux is really a gmake.
X
X	'Gmake' and 'Gmake.linux' are part of this distribution.
X
X	Some versions of gmake are very buggy. There are e.g. versions of gmake
X	on some architectures that will not correctly recognize the default
X	target. In this case call 'make all' or ../Gmake all'.
X
X	Note that pseudo error messages from gmake similar to:
X
X	gmake[1]: Entering directory `cdrtools-1.10/conf'
X	../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory
X	../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory
X
X	Are a result of a bug un GNU make. The make file system itself is
X	correct (as you could prove by using smake).
X	If your gmake version still has this bug, send a bug report to:
X
X		"Paul D. Smith" <psmith@gnu.org>
X
X	He is the current GNU make maintainer.
X
X	If you like to use 'smake', please always compile it from source.
X	The packages are located on:
X
X		ftp://ftp.berlios.de/pub/smake/alpha/
X
X	Smake has a -D flag to see the actual makefile source used
X	and a -d flag that gives easy to read debugging info. Use smake -xM
X	to get a makefile dependency list. Try smake -help
X
X
XCompiling the project using engineering defaults:
X
X	The defaults found in the directory DEFAULTS are configured to
X	give minimum warnings. This is made because many people will
X	be irritated by warning messages and because the GNU c-compiler
X	will give warnings for perfectly correct and portable c-code.
X
X	If you want to port code to new platforms or do engineering
X	on the code, you should use the alternate set of defaults found
X	in the directory DEFAULTS_ENG.
X	You may do this permanently by renaming the directories or
X	for one compilation by calling:
X
X		make DEFAULTSDIR=DEFAULTS_ENG
X
X
XCompiling the project to allow debugging with dbx/gdb:
X
X	If you like to compile with debugging information for dbx or gdb,
X	call:
X
X		make clean
X		make COPTX=-g LDOPTX=-g
X
X	If your debugger does not like optimized binaries, call something
X	like:
X
X		 make "COPTX=-g -xO0" LDOPTX=-g
X	or
X		 make "COPTX=-g -O0" LDOPTX=-g
X
X	depending on the option system of your C-compiler
X
X
XCompiling the project to allow performance monitoring with gprof from BSD:
X
X	If you like to compile for performance monitoriing with gprof,
X	call:
X
X		make clean
X		make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled
X
X	or
X		make COPTX=-pg LDOPTX=-pg LINKMODE=profiled
X
X	depending on the option system of your C-compiler
X
X
XCreting Blastwave packages:
X
X	Call:
X		.clean
X		smake -f Mcsw
X
X	You need the program "fakeroot" and will find the results
X	in packages/<arch-dir>
X
X	Note that a single program source tree will allow you to create
X	packages like CSWstar but not the packages CSWschilybase and
X	CSWschilyutils on which CSWstar depends.
X
X
X
X
X	If you want to see an example, please have a look at the "star"
X	source. It may be found on:
X
X		ftp://ftp.berlios.de/pub/star
X
X	Have a look at the manual page, it is included in the distribution.
X	Install the manual page with 
X
X	make install first and include /opt/schily/man in your MANPATH
X
X	Note that some systems (e.g. Solaris 2.x) require you either to call
X	/usr/lib/makewhatis /opt/schily/man or to call 
X
X		man -F <man-page-name>
X
X
XCompiling in a cross compilation environment:
X
X	The Schily autoconf system has been enhanced to support cross
X	compilation. Schily autoconf is based on GNU autoconf-2.13 and
X	GNU autoconf does not support cross compilation because it needs
X	to run scripts on the target system for some of the tests.
X
X	The "configure" script that is delivered with the Schily makefile
X	system runs more than 770 tests and aprox 70 of them need to be 
X	run on the target system.
X
X	The Schily autoconf system now supports a method to run these ~70
X	tests natively on a target system. You either need a machine with
X	remote login features or you need an emulator with a method to
X	copy files into the emulated system and to run binaries on the
X	emulated system as e.g. the Android emulator.
X
X	We currently deliver three scripts for "remote" execution of
X	programs on the target system:
X
X	runrmt_ssh		runs the commands remove via ssh
X	runrmt_rsh		runs the commands remove via rsh
X	runrmt_android		runs the commands remove via the debug bridge
X
X	If you need to remotely run programs on a system that is not
X	supported by one of there three scripts, you need to modify one
X	of them to match your needs.
X
X	To enable Cross Compilation use the following environment variables:
X
X	CONFIG_RMTCALL=		Set up to point to a script that does
X				the remote execution, e.g.:
X
X				CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh
X
X	CONFIG_RMTHOST=		Set up to point to your remote host, e.g.:
X
X				CONFIG_RMTHOST=hostname 
X				or
X				CONFIG_RMTHOST=user@hostname
X
X				use a dummy if you like to use something
X				like to the Android emulator.
X
X	CONFIG_RMTDEBUG=	Set to something non-null in order to 
X				let the remote execution script mark
X				remote comands. This will result in
X				configure messages like:
X
X				checking bits in minor device number... REMOTE 8
X
X				If you cannot run commands on the target
X				platform, you may set:
X
X				CONFIG_RMTDEBUG=true
X				CONFIG_RMTCALL=:
X
X				carefully watch for the "REMOTE" flagged test
X				output and later manually edit the file:
X
X				incs/<arch-dir>/xconfig.h
X
X				Do not forget to manually edit the files:
X
X				incs/<arch-dir>/align.h
X				and
X				incs/<arch-dir>/avoffset.h
X
X	Note that smake includes automake features that automatically
X	retrieve system ID information. For this reason, you need to overwrite 
X	related macros from the command line if you like to do a
X	cross compilation.
X
X	Related make macros:
X
X	K_ARCH=			# (sun4v) Kernel ARCH filled from uname -m / arch -k
X	M_ARCH=			# (sun4)  Machine filled from arch
X	P_ARCH=			# (sparc) CPU ARCH filled from uname -p / mach
X	OSNAME=			# sunos, linux, ....
X	OSREL=			# 5.11
X	OSVERSION=		# snv_130
X	CCOM=			# generic compiler name (e.g. "gcc")
X	CC_COM=			# compiler to call (name + basic args)
X
X	ARCH=			overwrites M_ARCH and P_ARCH
X
X	It is usually suffucient to set ARCH and OSNAME.
X
X	In order to use a cross compiler environment instead of a native compiler,
X	set the make macro CC_COM to something different than "cc".
X
X	If you are on Linux and like to compile for Android, do the following:
X
X	1) 	set up CC acording to the instructions from the cross compiler
X		tool chain
X
X	2)	set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.:
X		setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android
X		setenv CONFIG_RMTHOST NONE
X
X	3)	call smake:
X
X		smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC"
X	
X
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	joerg.schilling@fokus.fraunhufer.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/INSTALL
echo c - star-1.5.2/conf
mkdir -p star-1.5.2/conf > /dev/null 2>&1
echo x - star-1.5.2/conf/Makefile
sed 's/^X//' >star-1.5.2/conf/Makefile << 'END-of-star-1.5.2/conf/Makefile'
X#ident @(#)Makefile	1.6 07/10/24 
X###########################################################################
X# Written 1998 by J. Schilling
X###########################################################################
X# Makefile for local dynamic configuration
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XCONFFILES=	Inull rules.cnf xconfig.h
X
XPCONFFILES=	$(CONFFILES:%=$(OINCSDIR)/%)
X
X_INSMODEI=	$(_UNIQ)$(INSMODE)
X__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
XINSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		xconfig.h
XPTARGET=	../incs/$(OARCH)/xconfig.h
X
Xall: config
X
Xclobber:
X	$(RM_F) $(PCONFFILES)
X
Xdistclean:
X		$(RM) $(RM_RF)		$(PCONFFILES) \
X						.vedtmp* *.bak OBJ/* \
X						$(SRCROOT)/libs/* $(SRCROOT)/incs/*
X
XXMK_FILE=	xconfig.mk
X
X###########################################################################
X# Now done in rules.top
X#include		$(SRCROOT)/$(RULESDIR)/rules.cnf
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.ins
X###########################################################################
X
XOTHERTARGETS=	clean ibins depend rmdep \
X		TAGS tags rmtarget relink
X
X$(OTHERTARGETS):
X	@echo "$@: nothing to make"
END-of-star-1.5.2/conf/Makefile
echo x - star-1.5.2/conf/makeinc
sed 's/^X//' >star-1.5.2/conf/makeinc << 'END-of-star-1.5.2/conf/makeinc'
X#!/bin/sh
X#
X# @(#)makeinc	1.6 11/12/16 Copyright 1998 J. Schilling
X###########################################################################
X# Copyright 1998 by J. Schilling
X###########################################################################
X#
X# Automake script for the Schily (SING) makefile system
X#
X###########################################################################
X#
X#	Creates the following files:
X#
X#	./RULES/os-sunos.id
X#	./RULES/os-sunos.def
X#	./DEFAULTS/Defaults.sunos
X#	./RULES/sun4c-sunos-gcc.rul
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XMAILADDR=joerg.schilling@fokus.fraunhofer.de
X
X###########################################################################
X# Option processing
X###########################################################################
Xcase $1 in
X
X-r)
X	shift
X	SRCROOT=$1
X	shift
X	;;
Xesac
X
Xif [ $# -lt 1 ]; then
X	echo 'Usage: makeinc [-r srcroot] filename'	1>&2
X	exit 1
Xfi
X
X###########################################################################
X# Find SRCROOT if not specified via option
X###########################################################################
Xif [ .$SRCROOT = . ]; then
X	SRCROOT=.
X	loop=1
X	while [ $loop -lt 100 ]; do
X		if [ ! -d $SRCROOT ]; then
X			# Abort on ENAMETOOLONG
X			break
X		fi
X		if [ -r $SRCROOT/RULES/rules.top ]; then
X			break
X		fi
X		if [ "$SRCROOT" = . ]; then
X			SRCROOT=".."
X		else
X			SRCROOT="$SRCROOT/.."
X		fi
X		loop="`expr $loop + 1`"
X	done
X	if [ ! -r $SRCROOT/RULES/rules.top ]; then
X		echo "Cannot find SRCROOT directory" 1>&2
X		exit 1
X	fi
Xfi
X
X###########################################################################
X# Real start of automake script
X###########################################################################
Xecho 'NOTICE:		Automake script called'
Xif [ -r $1 ]; then
X	echo "WARNING:	requested file '$1' already exists"
X	exit
Xfi
Xecho "IMPORTANT:	Please report your architecture to $MAILADDR"
Xecho
Xecho "Trying to create missing rule file '$1'"
Xsleep 1
Xecho
X
XCC=cc
Xgcc -v 2> /dev/null && CC=gcc
Xecho "CC:		$CC"
X
XMANSTYLE=sysv
Xif [ -r /usr/man/*man7*/man.* -o -r /usr/share/man/*man7*/man.* \
X	-o -r /usr/man/*man7*/mandoc.* -o -r /usr/share/man/*man7*/mandoc.* \
X	-o -r /usr/man/*man7*/ascii* -o -r /usr/share/man/*man7*/ascii* ]; then 
X	MANSTYLE=bsd
Xfi
Xecho "MANSTYLE:	$MANSTYLE"
X
X	case $1 in
X
X	*os-*.id)
X		echo $1
X		OSNAME=`echo $1 | sed -e 's;\(.*\)os-\(.*\)\.id;\2;'`
X		echo '###########################################################################' > $1
X		echo "# OS specific MACRO definitions for $OSNAME"	>> $1
X		echo "# This file is auto generated and may be wrong"	>> $1
X		echo '###########################################################################' >> $1
X		echo "O_ARCH=		$OSNAME"	>> $1 
X		echo '-O_ARCH=	-$(O_ARCH)'		>> $1 
X		;;
X	
X	*os-*.def)
X		echo $1
X		OSNAME=`echo $1 | sed -e 's;\(.*\)os-\(.*\)\.def;\2;'`
X		echo '###########################################################################' > $1
X		echo "# Global os definitions for $OSNAME"		>> $1
X		echo "# This file is auto generated and may be wrong"	>> $1
X		echo '###########################################################################' >> $1
X		echo "MANSTYLE=	$MANSTYLE"		>> $1 
X		;;
X	
X	*Defaults.*)
X		echo $1
X		OSNAME=`echo $1 | sed -e 's;\(.*\)\.\(.*\);\2;'`
X		echo '###########################################################################' > $1
X		echo "# global definitions for $OSNAME Systems"		>> $1
X		echo "# This file is auto generated and may be wrong"	>> $1
X		echo '###########################################################################' >> $1
X		if [ $CC = gcc ]; then
X			cat $SRCROOT/TEMPLATES/Defaults.gcc >> $1
X		else
X			cat $SRCROOT/TEMPLATES/Defaults.xcc >> $1
X		fi
X		echo							>> $1
X		echo '###########################################################################' >> $1
X		echo "# Do compilattion with minimal warnings"		>> $1
X		echo '###########################################################################' >> $1
X		echo "CWARNOPTS="					>> $1
X		;;
X	
X	*-*-*cc.rul)
X		ARCH=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\2;'`
X		OSNAME=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\3;'`
X		CCOM=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\4;'`
X		DIR=`echo $1 | sed -e "s;\(.*\)/$ARCH-$OSNAME-$CCOM.rul;\1;"`
X		echo "ARCH:		$ARCH"
X		echo "OSNAME:		$OSNAME"
X		echo "CCOM:		$CCOM"
X		echo "DIR:		$DIR"
X		echo $1
X		echo "Trying to find similar architecture for '$1'"
X		similar=`ls $DIR/*-$OSNAME-$CCOM.rul 2>/dev/null| head -1`
X		SARCH=`echo $similar | sed -e "s;\(.*\)/\(.*\)-$OSNAME-$CCOM.rul;\2;"`
X
X		if [ .$similar != . ]; then
X			echo 'Found similar architecture             ' "'$similar'"
X			echo 'creating symlink:' ln -s $SARCH-$OSNAME-$CCOM.rul $1
X			echo "Please send a mail to $MAILADDR to report whether this works or not"
X			sleep 10
X			ln -s $SARCH-$OSNAME-$CCOM.rul $1 || cp $SARCH-$OSNAME-$CCOM.rul $1
X			exit
X		else
X			echo '###########################################################################' > $1
X			echo "# global definitions for $OSNAME Systems"		>> $1
X			echo "# This file is auto generated and may be wrong"	>> $1
X			echo '###########################################################################' >> $1
X
X			if [ $CCOM = gcc ]; then
X				echo 'Using generic GCC machine configuration file' 
X				cat $SRCROOT/TEMPLATES/temp-gcc.rul >> $1
X			else
X				echo 'Using generic dumb cc machine configuration file' 
X				cat $SRCROOT/TEMPLATES/temp-xcc.rul >> $1
X			fi
X		fi
X		;;
X
X	#######################################################################
X	# This entry is not really needed...
X	#######################################################################
X	*TARGETS/Targetdirs*)
X		echo "Linking $1 to $SRCROOT/TARGETS/Targetdirs"
X		ln -s Targetdirs $1
X		;;
X	*)
X		echo "Unknown rule to build: '$1'."
X		exit 1
X		;;
X	
X	esac
X
Xecho "Please send a mail to $MAILADDR to report whether this works or not"
Xsleep 10
END-of-star-1.5.2/conf/makeinc
echo x - star-1.5.2/conf/install-sh
sed 's/^X//' >star-1.5.2/conf/install-sh << 'END-of-star-1.5.2/conf/install-sh'
X#! /bin/sh
X#
X# @(#)install-sh	1.11 09/01/29 1999-2009 J. Schilling
X#
X# install - install a program, script, or datafile
X# This comes from X11R5 (mit/util/scripts/install.sh).
X# Mods to make install-sh behave reasonable when called by
X# non root user by J. Schilling
X#
X# Copyright 1991 by the Massachusetts Institute of Technology
X# Copyright 1999-2009 by J. Schilling
X#
X# Permission to use, copy, modify, distribute, and sell this software and its
X# documentation for any purpose is hereby granted without fee, provided that
X# the above copyright notice appear in all copies and that both that
X# copyright notice and this permission notice appear in supporting
X# documentation, and that the name of M.I.T. not be used in advertising or
X# publicity pertaining to distribution of the software without specific,
X# written prior permission.  M.I.T. makes no representations about the
X# suitability of this software for any purpose.  It is provided "as is"
X# without express or implied warranty.
X#
X# Calling this script install-sh is preferred over install.sh, to prevent
X# `make' implicit rules from creating a file called install from it
X# when there is no Makefile.
X#
X# This script is compatible with the BSD install script, but was written
X# from scratch.  It can only install one file at a time, a restriction
X# shared with many OS's install programs.
X
X# on BSDi chown is in /usr/sbin
X
XPATH="${PATH}:/usr/sbin"
X
X# set DOITPROG to echo to test this script
X
X# Don't use :- since 4.3BSD and earlier shells don't like it.
Xdoit="${DOITPROG-}"
X
X
X# put in absolute paths if you don't have them in your path; or use env. vars.
X
Xmvprog="${MVPROG-mv}"
Xcpprog="${CPPROG-cp}"
Xchmodprog="${CHMODPROG-chmod}"
Xchownprog="${CHOWNPROG-chown}"
Xchgrpprog="${CHGRPPROG-chgrp}"
Xstripprog="${STRIPPROG-strip}"
Xrmprog="${RMPROG-rm}"
Xmkdirprog="${MKDIRPROG-mkdir}"
X
Xtransformbasename=""
Xtransform_arg=""
Xinstcmd="$mvprog"
Xchmodcmd="$chmodprog 0755"
Xchowncmd=""
Xchgrpcmd=""
Xstripcmd=""
Xrmcmd="$rmprog -f"
Xmvcmd="$mvprog"
Xsrc=""
Xdst=""
Xdir_arg=""
Xnoclobber=""
X
X#
X# Check if we are 'root' to avoid chown as non root user
X#
Xrootflag=FALSE
Xdstdir=/tmp/xd.$$
Xdsttmp=${dstdir}/xx.$$
Xtrap "rm -f ${dsttmp}; rm -rf ${dstdir}" 0
Xmkdir ${dstdir}
X${chmodcmd} ${dstdir}
Xecho > ${dsttmp}
X${chownprog} root ${dsttmp} 2> /dev/null && ${chmodcmd} ${dsttmp} 2> /dev/null && rootflag=TRUE
X#
X# Win95 has no user 'root' and chown succeeds always.
X# Unfortunately, there is also no user 'bin' and chown complains about
X# user 'bin' being non-existant.
X# Check if the file is now really owned by 'root' to avoid the Win95 probems
X#
Xif [ $rootflag = TRUE ]; then
X	ls -l ${dsttmp} 2> /dev/null | grep root > /dev/null || rootflag=FALSE
Xfi
Xrm -f ${dsttmp}
Xrm -rf ${dstdir}
X
Xwhile [ x"$1" != x ]; do
X    case $1 in
X	-help)
X	    echo "Usage:	install-sh [options] srcfile dstfile"
X	    echo "	install-sh [options] srcfile dstdir"
X	    echo "	install-sh [options] -d dstdir"
X	    echo "Options:"
X	    echo "	-c		copy srcfile rather than renaming it"
X	    echo "	-d dir		create dir"
X	    echo "	-noclobber	do not replace existing files"
X	    echo "	-m mode		install new files with 'mode'"
X	    echo "	-o owner	install new files with 'owner'"
X	    echo "	-g group	install new files with 'group'"
X	    echo "	-s		strip file after installing"
X	    echo "	-t=sed-cmd	sed command to transform the basename"
X	    echo "	-b=suff		file name suffix for -t"
X	    exit
X	    continue;;
X
X	-c) instcmd="$cpprog"
X	    shift
X	    continue;;
X
X	-d) dir_arg=true
X	    shift
X	    continue;;
X
X	-noclobber) noclobber=true
X	    shift
X	    continue;;
X
X	-m) chmodcmd="$chmodprog $2"
X	    Asuidflag=FALSE
X	    Ssuidflag=FALSE
X	    if [ $rootflag = FALSE ] ; then
X		echo "$2" | grep '[1-7][0-7][0-7][0-7]$' > /dev/null && Asuidflag=TRUE
X		echo "$2" | grep '[st]' > /dev/null && Ssuidflag=TRUE
X	    fi
X	    if [ $Asuidflag = TRUE ]; then
X		nmode=`echo "$2" | sed 's/\(.*\)\([0-7][0-7][0-7]\)/\2/'`
X		chmodcmd="$chmodprog $nmode"
X		echo "install: -m option with suid/sticky available only to root -- ignored"
X	    fi
X	    if [ $Ssuidflag = TRUE ]; then
X		nmode=`echo "$2" | sed 's/\(.*\)/\1,a-st/'`
X		chmodcmd="$chmodprog $nmode"
X		echo "install: -m option with suid/sticky available only to root -- ignored"
X	    fi
X	    shift
X	    shift
X	    continue;;
X
X	-o) if [ $rootflag = TRUE ]
X	    then
X		chowncmd="$chownprog $2"
X	    else
X		echo "install: -o option available only to root -- ignored"
X	    fi
X	    shift
X	    shift
X	    continue;;
X
X	-g) if [ $rootflag = TRUE ]
X	    then
X		chgrpcmd="$chgrpprog $2"
X	    else
X		echo "install: -g option available only to root -- ignored"
X	    fi
X	    shift
X	    shift
X	    continue;;
X
X	-s) stripcmd="$stripprog"
X	    shift
X	    continue;;
X
X	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
X	    shift
X	    continue;;
X
X	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
X	    shift
X	    continue;;
X
X	*)  if [ x"$src" = x ]
X	    then
X		src=$1
X	    else
X		# this colon is to work around a 386BSD /bin/sh bug
X		:
X		dst=$1
X	    fi
X	    shift
X	    continue;;
X    esac
Xdone
X
Xif [ x"$src" = x ]
Xthen
X	echo "install:	no input file specified"
X	exit 1
Xelse
X	true
Xfi
X
Xif [ x"$dir_arg" != x ]; then
X	dst=$src
X	src=""
X	
X	if [ -d $dst ]; then
X		instcmd=:
X	else
X		instcmd=mkdir
X	fi
Xelse
X
X# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
X# might cause directories to be created, which would be especially bad 
X# if $src (and thus $dsttmp) contains '*'.
X
X	if [ -f $src -o -d $src ]
X	then
X		true
X	else
X		echo "install:  $src does not exist"
X		exit 1
X	fi
X	
X	if [ x"$dst" = x ]
X	then
X		echo "install:	no destination specified"
X		exit 1
X	else
X		true
X	fi
X
X# If destination is a directory, append the input filename; if your system
X# does not like double slashes in filenames, you may need to add some logic
X
X	if [ -d $dst ]
X	then
X		dst="$dst"/`basename $src`
X	else
X		true
X	fi
Xfi
X
X## this sed command emulates the dirname command
Xdstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
X
X# Make sure that the destination directory exists.
X#  this part is taken from Noah Friedman's mkinstalldirs script
X
X# Skip lots of stat calls in the usual case.
Xif [ ! -d "$dstdir" ]; then
XdefaultIFS='	
X'
XIFS="${IFS-${defaultIFS}}"
X
XoIFS="${IFS}"
X# Some sh's can't handle IFS=/ for some reason.
XIFS='%'
Xset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
XIFS="${oIFS}"
X
Xpathcomp=''
X
Xwhile [ $# -ne 0 ] ; do
X	pathcomp="${pathcomp}${1}"
X	shift
X
X	if [ ! -d "${pathcomp}" ] ;
X        then
X		$mkdirprog "${pathcomp}"
X	else
X		true
X	fi
X
X	pathcomp="${pathcomp}/"
Xdone
Xfi
X
Xif [ x"$dir_arg" != x ]
Xthen
X	$doit $instcmd $dst &&
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
Xelse
X
X# If we're going to rename the final executable, determine the name now.
X
X	if [ x"$transformarg" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		dstfile=`basename $dst $transformbasename | 
X			sed $transformarg`$transformbasename
X	fi
X
X# don't allow the sed command to completely eliminate the filename
X
X	if [ x"$dstfile" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		true
X	fi
X
X# Check whether we might clobber an existing file
X
X	if [ "$noclobber" -a -r "$dstdir/$dstfile" ]; then
X		echo "File '$dstdir/$dstfile' exists"
X		echo "Will not overwrite '$dstdir/$dstfile'."
X		exit
X	fi
X
X# Make a temp file name in the proper directory.
X
X	dsttmp=$dstdir/#inst.$$#
X
X# Move or copy the file name to the temp name
X
X	$doit $instcmd $src $dsttmp &&
X
X	trap "rm -f ${dsttmp}" 0 &&
X
X# and set any options; do chmod last to preserve setuid bits
X
X# If any of these fail, we abort the whole thing.  If we want to
X# ignore errors from any of these, just make sure not to ignore
X# errors from the above "$doit $instcmd $src $dsttmp" command.
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
X
X# Now rename the file to the real destination.
X
X	$doit $rmcmd -f $dstdir/$dstfile &&
X	$doit $mvcmd $dsttmp $dstdir/$dstfile 
X
Xfi &&
X
X
Xexit 0
END-of-star-1.5.2/conf/install-sh
echo x - star-1.5.2/conf/src-get
sed 's/^X//' >star-1.5.2/conf/src-get << 'END-of-star-1.5.2/conf/src-get'
X#!/bin/sh
X# @(#)src-get  1.21 09/12/22 Copyright 2005-2009 J. Schilling
X###########################################################################
X# Written 2005-2009 by J. Schilling
X###########################################################################
X# A source package controlling system which should behave similar to
X# the Debian apt-get command.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X#
X# Set up server URL for package description files.
X# Must have a slash at the end.
X#
Xserver_url=http://sps.berlios.de/pkg/testing/
X
X#
X# If you do not have write access to a server, you may set up a local copy
X#
X#server_url=file:///tmp/pkg/
X
X#
X# Set up default pager.
X#
XPAGER=${PAGER-more}
X
X#
X# Set up default wget.
X#
XWGET=${WGET-sh_wget}
X
Xcase $PATH in
X	*/usr/sfw/bin*)
X		;;
X	*)
X		if [ -d /usr/sfw/bin ]; then
X			XPATH=/usr/sfw/bin:${XPATH-}
X		fi
X		;;
Xesac
X
XPATH=${XPATH-}${PATH}
X
Xusage() {
X	echo "Usage: src-get [cmd] [target]..."
X	echo "Possible commands are:"
X	echo "	init	initialize skeleton makefile system in empty directory"
X	echo "	setup	setup platform dependent build commands in bins/<archdir>/*"
X	echo "	install	install a source package"
X	echo "	list	list installable packages"
X	echo "	shell	start a SHELL with a clean environment"
X	echo "	compile	do a full compilation from SRCROOT with a clean environment"
X	echo "	version	print the 'srg-get' version"
X}
X
Xif [ $# -lt 1 ]; then
X	usage
X	exit 1
Xfi
Xcmd=$1
Xshift
X
Xcase "$cmd" in
X	*version*)
X		;;
X
X	*)
X		echo "cmd:  $cmd"
X		echo "args: $@"
X		;;
Xesac
X
Xexcode=255
Xtrap 'rm -rf /tmp/.d.$$; if [ -f ./$do_wget_file ]; then rm -f ./$do_wget_file; fi; exit 1' 1 2 15
Xtrap 'rm -rf /tmp/.d.$$; exit $excode' 0
X
XZIP_SUFFIX=
XZIP=cat
XUNZIP=cat
X
Xif bzip2 --help > /dev/null 2>&1; then
X	UNZIP="bzip2 -d"
X	ZIP=bzip2
X	ZIP_SUFFIX=.bz2
Xelif gzip --help > /dev/null 2>&1; then
X	UNZIP="gzip -d"
X	ZIP=gzip
X	ZIP_SUFFIX=.gz
Xfi
X
Xget_srcroot() {
X	SRCROOT=.
X	loop=1
X	while [ $loop -lt 100 ]; do
X		if [ ! -d $SRCROOT ]; then
X			# Abort on ENAMETOOLONG
X			break
X		fi
X		if [ -r $SRCROOT/RULES/rules.top ]; then
X			break
X		fi
X		if [ "$SRCROOT" = . ]; then
X			SRCROOT=".."
X		else
X			SRCROOT="$SRCROOT/.."
X		fi
X		loop="`expr $loop + 1`"
X	done
X	if [ ! -r $SRCROOT/RULES/rules.top ]; then
X		echo "Cannot find SRCROOT directory" 1>&2
X		return 1
X	fi
X	return 0
X}
X
Xcd_srcroot() {
X	if [ ".$SRCROOT" = ".$NO_SRCROOT" ]; then
X		echo "SRCROOT not known."			1>&2
X		exit 1
X	fi
X	cd "$SRCROOT" || (echo "Cannot chdir to $SRCROOT"	1>&2; exit 1)
X	SRCROOT=.
X}
X
Xset_binspath() {
X	PWD=`pwd`
X	if [ "$SRCROOT" = . ];then
X		PATH="${PWD}/${BINS}:${PWD}/conf:${PATH}"
X	else
X		PATH="${PWD}/${SRCROOT}/${BINS}:${PWD}/${SRCROOT}/conf:${PATH}"
X	fi
X	export PATH
X	unset PWD
X}
X
Xget_bins() {
X	if [ ".$SRCROOT" = ".$NO_SRCROOT" ]; then
X		return 1
X	fi
X	OARCH=`${SRCROOT}/conf/oarch.sh`
X	BINS=bins/"$OARCH"
X}
X
Xneed_mfs() {
X	if [ ! -r ${SRCROOT}/RULES/rules.top ]; then
X		echo "A makefile system is not installed."	1>&2
X		echo "Run 'src-get init' first."		1>&2
X		exit 1
X	fi
X}
X
Xcheck_bins() {
X	if [	-r ${SRCROOT}/${BINS}/bzip2 -a	\
X		-r ${SRCROOT}/${BINS}/gzip -a	\
X		-r ${SRCROOT}/${BINS}/lndir -a	\
X		-r ${SRCROOT}/${BINS}/patch -a	\
X		-r ${SRCROOT}/${BINS}/smake -a	\
X		-r ${SRCROOT}/${BINS}/star -a	\
X		-r ${SRCROOT}/${BINS}/wget	]; then
X			if [ "$WGET" = sh_wget ]; then
X				WGET="wget --passive-ftp"
X			fi
X			return 0
X	fi
X	return 1
X}
X
Xneed_bins() {
X	need_mfs
X	get_bins
X	if check_bins; then
X		return 0
X	else
X		echo "Setup for $OARCH not yet done."	1>&2
X		echo "Run 'src-get setup' first."	1>&2
X		exit 1
X	fi
X}
X
X
Xsh_wget() {
X	excode=255
X
X	if [ $# -lt 1 ]; then
X		echo "Usage: wget.sh URL"			1>&2
X		echo "Only ftp:// type URLs are supported"	1>&2
X		return 1
X	fi
X
X	wget_url="$1"
X	wget_rest=`echo "$wget_url" | sed -e 's,^ftp://,,'`
X	if [ "$wget_url" = "$wget_rest" ]; then
X		echo "Unsupported protocol in" "$wget_url"	1>&2
X		return 1
X	fi
X	wget_host=`echo "$wget_rest" | sed -e 's,/.*,,'`
X	wget_file=`echo "$wget_rest" | sed -e 's,^[^/]*/,,'`
X	wget_dname=`echo "$wget_file" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
X	wget_fname=`echo "$wget_file" | sed -e 's,.*/,,'`
X
X	mkdir /tmp/.d.$$
X	cat <<-	EOF > /tmp/.d.$$/.netrc
X		machine "$wget_host"  login ftp password wget.sh@Makefiles.Schily.build
X	EOF
X	chmod 600 /tmp/.d.$$/.netrc
X
X	HOME=/tmp/.d.$$ ftp "$wget_host" <<- EOF
X		bin
X		passive on
X		cd "$wget_dname"
X		dir "$wget_fname"
X		hash on
X		verbose on
X		get "$wget_fname"
X		bye
X	EOF
X	excode=$?
X	rm -fr /tmp/.d.$$
X	return $excode
X}
X
Xdo_wget() {
X	do_wget_url="$1"
X	case "$1" in
X	file:///*)
X		do_wget_rest=`echo "$do_wget_url" | sed -e 's,^file://,,'`
X		do_wget_file=`echo "$do_wget_url" | sed -e 's,.*/,,'`
X		rm -rf "$do_wget_file"
X		cp "$do_wget_rest" "$do_wget_file"
X		return $?
X		;;
X	esac
X	loop=0
X	wget_retries=10
X	while [ $loop -lt $wget_retries ]; do
X		do_wget_file=`echo "$do_wget_url" | sed -e 's,.*/,,'`
X		rm -rf "$do_wget_file"
X		$WGET "$do_wget_url"
X
X		if [ -f "$do_wget_file" ]; then
X			break
X		fi
X		echo
X		echo Retrying in 10 seconds
X		sleep 10
X		loop="`expr $loop + 1`"
X	done
X	if [ $loop -ge $wget_retries ]; then
X		echo "Wget retry count exhausted - giving up."	1>&2
X		exit 1
X	fi
X	do_wget_file=
X}
X
Xget_catalog() {
X	mkdir -p src-list
X	cd src-list
X	rm -f catalog
X	do_wget ${server_url}catalog
X	cd ..
X}
X
Xdo_dep() {
X	deps="$@"
X
X	if [ ."$@" = . ]; then
X		return
X	fi
X	echo "Fetching dependencies: $deps"
X	src-get install $deps
X}
X
Xdo_patch() {
X	(
X		cd $1
X		if [ -r patches/patch.sh ]; then
X			patches/patch.sh
X		fi
X	)
X}
X
Xdo_install() {
X	target="$1"
X	echo "Searching for target:" $target
X	mkdir -p src-list
X	cd src-list
X	# target already installed?
X	#rm $target
X	TGT=`grep "$target" < ../src-list/catalog`
X	#echo TGT $TGT
X	nmatches=`echo "$TGT" | wc -w`
X	#echo MATCHES $nmatches
X	if [ $nmatches = 0 ]; then
X		echo "No matching source for" $target
X		exit
X	fi
X	if [ $nmatches -gt 1 ]; then
X		echo "Too many matching sources for" $target
X		echo "Select one from:" $TGT
X		exit
X	fi
X	echo "Matching target:     " "$TGT"
X	#
X	# Retrieve Target desciption file that contains:
X	#
X	#	PKG=	The URL of the tar archive containing the wrappers
X	#	DIR=	The directory in local tree where to put the target dir
X	#	URL=	The URL where to fetch the source from upstream
X	#	DEP=	A list of package names the current target depends on
X	#
X	do_wget ${server_url}"$TGT"
X	PKG=
X	DIR=
X	URL=
X	DEP=
X	. ./$TGT
X	echo PKG "'$PKG'"
X	echo DIR "'$DIR'"
X	echo URL "'$URL'"
X	echo DEP "'$DEP'"
X	do_dep "$DEP"
X
X	if [ ."$URL" = . ]; then
X		cd ..
X		return
X	fi
X	do_wget ${server_url}"$PKG"
X	cd ..
X	pkg_fname=`echo "$PKG" | sed -e 's,.*/,,'`
X	url_fname=`echo "$URL" | sed -e 's,.*/,,'`
X	conf/mkdir.sh -p -T "$DIR"/"$TGT"
X	star -x -C "$DIR" < src-list/"$pkg_fname"
X	(cd "$DIR"/"$TGT" && ( do_wget $URL; star -x < "$url_fname" ) )
X	do_patch "$DIR"/"$TGT"
X}
X
XNO_SRCROOT=no-SRCROOT-directory-found
Xif get_srcroot; then
X	case "$cmd" in
X
X		*version*)	;;
X
X		*)		echo SRCROOT: $SRCROOT;;
X	esac
Xelse
X	SRCROOT="$NO_SRCROOT"
Xfi
X
Xcase $cmd in
X
X	init)	
X			if [ -r RULES/rules.top ]; then
X				echo "A makefile system is already installed in the current directory."	1>&2
X				exit 1
X			fi
X			if [ ! -z "`ls`" ]; then
X				if [ "`ls`" != src-get ]; then
X					echo "Current directory not empty."		1>&2
X					echo "Will not install makefile system."	1>&2
X					exit 1
X				fi
X			fi
X			do_wget ftp://ftp.berlios.de/pub/makefiles/testing/makefiles.tar${ZIP_SUFFIX}
X			${UNZIP} < makefiles.tar${ZIP_SUFFIX} | tar xf -
X			#
X			# tar on HP-UX-10.x does not like tar xpf
X			#
X			if [ ! -r RULES/rules.top ]; then
X				echo "The installation of the makefile system did fail."		1>&2
X				exit 1
X			fi
X			echo
X			echo "*********"
X			echo "The installation of Makefiles was successful."
X			echo
X			echo "Do not forget to run 'src-get setup' for all platforms."
X			echo "*********"
X			echo
X			exit
X			;;
X
X	setup)
X			need_mfs
X			# $BINS not set up
X			#
X			if [ ! -r RULES/rules.top ]; then
X				echo "A makefile system is not installed in the current directory."	1>&2
X				echo "Run 'src-get init' first"						1>&2
X				exit 1
X			fi
X			sh conf/setup.sh
X			;;
X
X	list)
X			need_bins
X			set_binspath
X			cd_srcroot
X			get_catalog
X			$PAGER src-list/catalog
X			;;
X
X	install)
X			need_bins
X			set_binspath
X			cd_srcroot
X			get_catalog
X			for i in "$@"; do
X				echo $i
X				do_install "$i"
X			done
X			;;
X
X	shell)
X			need_bins
X			unset LD_LIBRARY_PATH
X			unset LD_RUN_PATH
X			SHELL=${SHELL-/bin/sh}
X			set_binspath
X			echo "Note that 'smake' is the preferred make program."
X			echo "Starting ${SHELL}..."
X			exec ${SHELL}
X			echo "Cannot exec ${SHELL}"	1>&2
X			exit 1
X			;;
X
X	compile)
X			need_bins
X			unset LD_LIBRARY_PATH
X			unset LD_RUN_PATH
X			SHELL=${SHELL-/bin/sh}
X			set_binspath
X			cd_srcroot
X			echo "Starting compilation..."
X			exec smake "$@"
X			echo "Cannot exec smake $@"	1>&2
X			exit 1
X			;;
X
X	version|-version|--version)
X			echo "src-get  1.21 09/12/22 Copyright 2005-2009 J. Schilling"
X			exit 0
X			;;
X
X	-help|*)	echo "@(#)src-get  1.21 09/12/22 Copyright 2005-2009 J. Schilling"
X			usage
X			exit 0
X			;;
X
Xesac
X
END-of-star-1.5.2/conf/src-get
echo x - star-1.5.2/conf/oarch.sh
sed 's/^X//' >star-1.5.2/conf/oarch.sh << 'END-of-star-1.5.2/conf/oarch.sh'
X#!/bin/sh
X# @(#)oarch.sh  1.15 09/10/31 Copyright 2005-2009 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# A simulation of $(OARCH) from the Schily Makefile system
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X#
X# Processor	P_ARCH	MAKE_ARCH	Instruction Set Architecture or Processor type
X# Kernel	K_ARCH	MAKE_MACH	Machine hardware class
X# Machine	M_ARCH	MAKE_M_ARCH	ISA or Processor type
X#
X# P	mach	== * uname -p			(i386/mc68020/sparc/powerpc
X# K	arch -k ==   uname -m			(i86pc/sun3x/sun4u/power-macintosh
X# M	arch	== * uname -p + map sparc->sun4	(i86pc/sun3/sun4/ppc
X#
X#	* Not available on vanilla SVr4
X#
X# If P_ARCH or M_ARCH are not set, K_ARCH us used.
X#
X# P_ARCH -> OARCH (sparc-sunos5-cc) used as default OBJ arch subdir
X# K_ARCH -> XARCH (sun4u-sunos5-cc) used as OBJ arch subdir for kernel modules
X
Xdbgflag=FALSE
Xxflag=FALSE
Xcflag=FALSE
Xoflag=FALSE
Xpflag=FALSE
Xif [ .$1 = .-help ]; then
X	echo "Usage: oarch.sh [options]"
X	echo "Options:"
X	echo "	-debug	Print debugging information"
X	echo "	-c	Print C_ARCH instrad of OARCH"
X	echo "	-o	Print O_ARCH instrad of OARCH"
X	echo "	-p	Print PARCH instrad of OARCH"
X	echo "	-x	Print XARCH instrad of OARCH"
X	exit
Xfi
Xif [ .$1 = .-debug ]; then
X	dbgflag=TRUE
Xfi
Xif [ .$1 = .-x ]; then
X	xflag=TRUE
Xfi
Xif [ .$1 = .-c ]; then
X	cflag=TRUE
Xfi
Xif [ .$1 = .-o ]; then
X	oflag=TRUE
Xfi
Xif [ .$1 = .-p ]; then
X	pflag=TRUE
Xfi
X
X#
X# '((' does not work because of a parser bug in ksh on Interix.
X# This is why we use '( (' here.
X#
XMACHCMD="( (mach || uname -p || true)		2> /dev/null)"
XARCHCMD="( (arch || /usr/ucb/arch || true)	2> /dev/null)"
X
XXP_ARCH=`eval ${MACHCMD} | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XXK_ARCH=`uname -m        | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XXM_ARCH=`eval ${ARCHCMD} | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
X
X#echo XP_ARCH $XP_ARCH
X#echo XK_ARCH $XK_ARCH
X#echo XM_ARCH $XM_ARCH
X
XP_ARCH="${XP_ARCH}"
XK_ARCH="${XK_ARCH}"
XM_ARCH="${XM_ARCH}"
X
Xif [ ."$XP_ARCH" = .unknown ]; then
X	P_ARCH="${K_ARCH}"
Xfi
Xif [ ."$XP_ARCH" = . ]; then
X	P_ARCH="${K_ARCH}"
Xfi
X
Xif [ ."${XM_ARCH}" = . ]; then
X	M_ARCH="${K_ARCH}"
Xfi
X
XOSNAME=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XOSHOST=`uname -n | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XOSREL=`uname -r | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
XOSVERS=`uname -v | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'`
X
XO_ARCH="$OSNAME"
X
Xcase "$OSREL" in
X	cygwin*) O_ARCH=cygwin32_nt;;
Xesac
Xif [ ."$OSNAME" = .bsd-os ]; then
X	case "$OSREL" in
X		3.*)	O_ARCH=bsd-os3;;
X		4.*)	O_ARCH=bsd-os;;
X	esac
Xfi
Xif [ ."$OSNAME" = .bsd-os ]; then
X	case "$OSREL" in
X		3.*)	O_ARCH=bsd-os3;;
X		4.*)	O_ARCH=bsd-os;;
X	esac
Xfi
Xif [ ."$OSNAME" = .dgux ]; then
X	case "$OSREL" in
X		r4.*)	O_ARCH=dgux4;;
X		5.4r3*)	O_ARCH=dgux3;;
X	esac
Xfi
Xif [ ."$OSNAME" = .irix64 ]; then
X	O_ARCH=irix
Xfi
Xif [ ."$OSNAME" = .mac-os ]; then
X	case "$OSREL" in
X		9.*)	O_ARCH=mac-os9;;
X		10.*)	O_ARCH=mac-os10;;
X	esac
Xfi
Xcase "$OSREL" in
X	mingw*) O_ARCH= mingw32_nt;;
Xesac
Xif [ ."$OSNAME" = .newsos ]; then
X	case "$OSREL" in
X		5.*)	O_ARCH=newsos5;;
X		6.*)	O_ARCH=newsos6;;
X	esac
Xfi
Xif [ ."$OSNAME" = .openunix ]; then
X	O_ARCH=unixware
Xfi
Xif [ ."$OSNAME" = .os-2 ]; then
X	O_ARCH=os2
Xfi
Xif [ ."$OSNAME" = .sco_sv ]; then
X	O_ARCH=openserver
Xfi
Xif [ ."$OSNAME" = .sunos ]; then
X	case "$OSREL" in
X		4.*)	O_ARCH=sunos4;;
X		5.*)	O_ARCH=sunos5;;
X	esac
Xfi
Xif [ ."$OSNAME" = .unix_sv ]; then
X	O_ARCH=unixware
Xfi
X
X###########################################################################
X#
X# Interix: Avoid to have something like "Intel_x86_Family15_Model4_Stepping1"
X# in $(OARCH), we rather use $(K_ARCH) which is e.g. "x86".
X# XXX If this is changed, both files in DEFAULTS/ and DEFAULTS_ENG as
X# XXX well as the file conf/oarch.sh need to be changed.
X#
X###########################################################################
Xif [ ."$OSNAME" = .interix ]; then
X	P_ARCH=${K_ARCH}
Xfi
X
XMARCH="$M_ARCH"
Xif [ ."$ARCH" != . ]; then
X	MARCH="$ARCH"
Xfi
X
XPARCH="$P_ARCH"
Xif [ ."$ARCH" != . ]; then
X	PARCH="$ARCH"
Xfi
X
XKARCH="$K_ARCH"
Xif [ ."$ARCH" != . ]; then
X	KARCH="$ARCH"
Xfi
X
Xconfdir=
Xif [ -z "$confdir" ]; then
X	#
X	# Try the directory containing this script.
X	#
X	prog=$0 
X	confdir=`echo $prog|sed 's,/[^/][^/]*$,,'` 
X	test ".$confdir" = ".$prog" && confdir=. 
X	confdir=$confdir
Xfi 
X
XCC="`grep '^DEFCCOM' $confdir/../incs/Dcc.${PARCH}-${O_ARCH} 2>/dev/null | sed -e 's,^DEFCCOM=[      ]*,,'`"
Xif [ ".$CC" = . ]; then
X	CC="`grep '^DEFCCOM' $confdir/../DEFAULTS/Defaults.${O_ARCH} 2>/dev/null | sed -e 's,^DEFCCOM=[ 	]*,,'`"
Xfi
Xif [ ".$CC" = . ]; then
X	CC=cc
Xfi
X
XC_ARCH="`sh $confdir/../conf/cc-config.sh -echo $CC $CC ${O_ARCH}`"
X
XOARCH="${PARCH}-${O_ARCH}-${C_ARCH}"
XXARCH="${KARCH}-${O_ARCH}-${C_ARCH}"
X
Xif [ $dbgflag = TRUE ]; then
X#echo xx"$P_ARCH"
X	echo C_ARCH "	$C_ARCH"
X	echo P_ARCH "	$P_ARCH"
X	echo K_ARCH "	$K_ARCH"
X	echo M_ARCH "	$M_ARCH"
X	echo OSNAME "	$OSNAME"
X	echo OSHOST "	$OSHOST"
X	echo OSREL  "	$OSREL"
X	echo OSVERS "	$OSVERS"
X	echo OARCH  "	$OARCH"
X	echo XARCH  "	$XARCH"
X	exit
Xfi
Xif [ $cflag = TRUE ]; then
X	echo "${C_ARCH}"
X	exit
Xfi
Xif [ $oflag = TRUE ]; then
X	echo "${O_ARCH}"
X	exit
Xfi
Xif [ $pflag = TRUE ]; then
X	echo "${PARCH}"
X	exit
Xfi
Xif [ $xflag = TRUE ]; then
X	echo "${XARCH}"
X	exit
Xfi
Xecho "$OARCH"
END-of-star-1.5.2/conf/oarch.sh
echo x - star-1.5.2/conf/mkdir-sh
sed 's/^X//' >star-1.5.2/conf/mkdir-sh << 'END-of-star-1.5.2/conf/mkdir-sh'
X#!/bin/sh
X#
X# Replacement for mkdir -p ... functionality.
X#
X# BSD-4.3, NeXT Step <= 3.x and similar don't accept the -p flag
X#
X# @(#)mkdir-sh	1.2 98/12/14 Copyright 1998 J. Schilling
X#
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X
Xif [ $# -lt 1 ]; then
X	echo "Usage: mkdir-sh [-p] dir ...."
X	exit 1
Xfi
X
Xdop=false
Xcase $1 in
X-p)
X	dop=true
X	shift
X	;;
Xesac
X
Xif [ $dop = false ]; then
X	for i in "$@"; do
X		mkdir "$i"
X	done
Xelse
X	for i in "$@"; do
X		if [ -d "$i" ]; then
X			continue
X		fi
X		# Don't use ${i:-.}, BSD4.3 doen't like it
X		#
X		fullname="$i"
X		if [ ."$i" = . ]; then
X			fullname=.
X		fi
X		dirname=`expr \
X			"$fullname/" : '\(/\)/*[^/]*//*$'  \| \
X			"$fullname/" : '\(.*[^/]\)//*[^/][^/]*//*$' \| \
X			.`
X		sh $0 -p "$dirname"
X		mkdir "$i"
X	done
Xfi
END-of-star-1.5.2/conf/mkdir-sh
echo x - star-1.5.2/conf/cc-config.sh
sed 's/^X//' >star-1.5.2/conf/cc-config.sh << 'END-of-star-1.5.2/conf/cc-config.sh'
X#!/bin/sh
X# @(#)cc-config.sh	1.8 07/02/13 Copyright 2002 J. Schilling
X###########################################################################
X# Written 2002 by J. Schilling
X###########################################################################
X# Configuration script called to verify system default C-compiler.
X# It tries to fall back to GCC if the system default could not be found.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X#
X# Usage:
X#	sh ./conf/cc-config.sh cc default-cc incs/Dcc.<platform>
X#
Xif [ $# -lt 3 ]; then
X	echo 'Usage: sh ./conf/cc-config.sh [-echo] <cc> <default-cc> incs/Dcc.<platform>'
X	echo 'Options:'
X	echo '	-echo	Do not write into incs/Dcc.<platform> but echo to stdout'
X	echo
X	echo 'The "cc"         parameter is the name of the preferred C-compiler'
X	echo 'The "default-cc" parameter is the name of the default   C-compiler'
X	exit 1
Xfi
X
Xecho=echo
Xif [ ".$1" = .-echo ]; then
X	echo=:
X	shift
Xfi
X
X#
X# Try to make sure all error messages are in english.
X#
XLC_ALL=C
XLANG=C
X
XCC=$1
XARG_CC=$1
XDEF_CC=$2
XPLATFORM_FILE=$3
X${echo} "Trying to find $CC"
X
X#
X# Check if we are on SunOS-5.x and /usr/ucb is in PATH before /opt/SUNWspro/bin
X# /usr/ucb/cc will not work correctly to compile things on Solaris.
X#
X# This check will also catch the case where no Sun C-compiler is installed and
X# calling cc results in the message:
X#	/usr/ucb/cc:  language optional software package not installed
X#
Xxos=`echo "$PLATFORM_FILE" | grep sunos5 `
Xif [ -n "$xos" ]; then
X	#
X	# On Solaris, the type builtin is working.
X	#
X	xcc=`type "$CC" | grep '/usr/ucb/*cc' `
X	if [ -n "$xcc" ]; then
X		#
X		# We did find /usr/ucb/cc
X		#
X		echo											1>&2
X		echo 'Warning:' "$xcc"									1>&2
X		echo '         You should not have "/usr/ucb" in your PATH if you like to compile.'	1>&2
X		echo '         "/usr/ucb/cc" is not working correclty on Solaris.'			1>&2
X		echo '         If you did install a C-compiler in /opt/SUNWspro/bin, abort'		1>&2
X		echo '         fix your PATH and start again.'						1>&2
X		echo '         Otherwise GCC will be used.'						1>&2
X		echo											1>&2
X		sleep 60
X		CC=do-no-use-ucb-cc
X	fi
Xfi
X
X#
X# There are old shells that don't support the 'type' builtin.
X# For this reason it is not a simple task to find out whether
X# this compiler exists and works.
X#
X# First try to run the default C-compiler without args
X#
Xeval "$CC > /dev/null 2>&1" 2> /dev/null
Xif [ $? = 0 ]; then
X	${echo} "Found $CC"
X	if [  ".$CC" = ".$DEF_CC" ]; then
X		${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X		else
X			echo "$DEF_CC"
X		fi
X	else
X		${echo} "Making $CC the default compiler in '$PLATFORM_FILE'"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X			echo DEFCCOM=$CC > $PLATFORM_FILE
X		else
X			echo "$CC"
X		fi
X	fi
X	exit
Xfi
X
X#
X# Now try to run the default C-compiler and check whether it creates
X# any output (usually an error message).
X#
X# This test will fail if the shell does redirect the error message
X# "cc: not found". All shells I tested (except ksh) send this message to
X# the stderr stream the shell itself is attached to and only redirects the
X# output from the command. As there may no output if there is no binary,
X# this proves the existence of the default compiler.
X#
Xccout=`eval "$CC 2>&1" 2>/dev/null`
Xret=$?
X
Xnf=`echo "$ccout" | grep 'not found' `
Xif [ $ret = 127 -a -n "$nf" ]; then
X	#
X	# ksh redirects even the error message from the shell, but we
X	# see that there is no executable because the exit code is 127
X	# we detect "command not found" if exit code is 127 and
X	# the message contains 'not found'
X	#
X	ccout=""
Xfi
X
Xif [ -n "$ccout" ]; then
X	${echo} "Found $CC"
X	if [  ".$CC" = ".$DEF_CC" ]; then
X		${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X		else
X			echo "$DEF_CC"
X		fi
X	else
X		${echo} "Making $CC the default compiler in '$PLATFORM_FILE'"
X		if [ ${echo} = echo ]; then
X			:> $PLATFORM_FILE
X			echo DEFCCOM=$CC > $PLATFORM_FILE
X		else
X			echo "$CC"
X		fi
X	fi
X	exit
Xfi
X
X#
X# If the current default is gcc or anything != cc, try cc.
X# Last resort: try gcc.
X#
Xif [ ".$CC" = ".gcc" -o ".$CC" != ".cc" ]; then
X	XCC=cc
X	${echo} 'Trying to find cc'
X	ccout=`eval "$XCC -c tt.$$.c 2>&1" 2> /dev/null`
X	ret=$?
X	nf=`echo "$ccout" | grep 'not found' `
X	if [ $ret = 127 -a -n "$nf" ]; then
X		#
X		# ksh redirects even the error message from the shell, but we
X		# see that there is no executable because the exit code is 127
X		# we detect "command not found" if exit code is 127 and
X		# the message contains 'not found'
X		#
X		ccout=""
X	fi
X	xos=`echo "$PLATFORM_FILE" | grep sunos5 `
X	if [ -n "$xos" ]; then
X		xcc=`type "$XCC" | grep '/usr/ucb/*cc' `
X		if [ -n "$xcc" -a  -n "$ccout" ]; then
X			echo "Cannot use $XCC because $XCC is /usr/ucb/cc"
X		fi
X		if [ -z "$xcc" -a  -n "$ccout" ]; then
X			CC="$XCC"
X		fi
X	fi
Xfi
Xif [ ".$CC" = ".$ARG_CC" ]; then
X	XCC=gcc
X	${echo} 'Trying to find GCC'
X	eval "gcc -v" 2> /dev/null && CC=gcc
Xfi
X
Xif [ ".$CC" = ".$DEF_CC" ]; then
X	${echo} "$XCC not found, keeping current global default"
X	${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler"
X	if [ ${echo} = echo ]; then
X		:> $PLATFORM_FILE
X	else
X		echo "$DEF_CC"
X	fi
Xelse
X	${echo} "Found $CC"
X	${echo} "Making $CC the default compiler in '$PLATFORM_FILE'"
X	if [ ${echo} = echo ]; then
X		echo DEFCCOM=$CC > $PLATFORM_FILE
X	else
X		echo "$CC"
X	fi
Xfi
END-of-star-1.5.2/conf/cc-config.sh
echo x - star-1.5.2/conf/mkdep-hpux.sh
sed 's/^X//' >star-1.5.2/conf/mkdep-hpux.sh << 'END-of-star-1.5.2/conf/mkdep-hpux.sh'
X#!/bin/sh
X#ident "@(#)mkdep-hpux.sh	1.2 11/11/12 "
X###########################################################################
X# Copyright 2002 by J. Schilling
X###########################################################################
X#
X# Create dependency list with the HP-UX bundled cc
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X# Due to a design bug in the compiler interface we cannot tell the compiler
X# to output the list on stdout, -Wp,-M- does not work. As the default
X# output is on stderr and the output is even completely confused with
X# error messages and warnings, we cannot just grep away the warnings
X# like we do on SCO unix.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xtrap 'rm -fr /tmp/cpp-m.$$ ; exit 1' 1 2 15
X
Xcc -Wp,-M/tmp/cpp-m.$$ -E > /dev/null "$@" 
X
X#
X# The HP compiler creates xxx/file.o: xxx/file.c in case that
X# file.c is in a sub.directory. This is wrong. The following sed
X# command removes "^xxx/" from the output
X#
Xsed -e 's;^[^/ ]*/\(.*\)\.o;\1.o;' < /tmp/cpp-m.$$
X
Xrm -f /tmp/cpp-m.$$
END-of-star-1.5.2/conf/mkdep-hpux.sh
echo x - star-1.5.2/conf/mkdep-sco.sh
sed 's/^X//' >star-1.5.2/conf/mkdep-sco.sh << 'END-of-star-1.5.2/conf/mkdep-sco.sh'
X#!/bin/sh
X#ident "@(#)mkdep-sco.sh	1.5 03/03/05 "
X###########################################################################
X# Copyright 1999 by J. Schilling
X###########################################################################
X#
X# Create dependency list with SCO's cc
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X	*.c)	if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		# base name from $i
X		base=`echo $i | sed -e 's;[^/]*/;;'`
X		FILES="$FILES$base"
X		;;
X	esac
Xdone
X
XOFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.c;\1.o;g'`
X
Xcc -H -E 2>&1 > /dev/null "$@" | grep -hv '^"' | grep -hv '^UX:' | sed -e "s;^;$OFILES: ;"
END-of-star-1.5.2/conf/mkdep-sco.sh
echo x - star-1.5.2/conf/mkdep-aix.sh
sed 's/^X//' >star-1.5.2/conf/mkdep-aix.sh << 'END-of-star-1.5.2/conf/mkdep-aix.sh'
X#!/bin/sh
X#ident "@(#)mkdep-aix.sh	1.2 09/12/31 "
X###########################################################################
X# Copyright 2002 by J. Schilling
X###########################################################################
X#
X# Create dependency list with AIX cc
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X# Note that AIX cc will create a file foo.u for every foo.c file. The file
X# foo.u is located in the directory where cc is run.
X# For this reason, there may be problems of other software likes to create
X# foo.u during compilation. Please report problems.
X#
X# In former times, we used -E but this calls the C-preprocessor that complains
X# about #pragma weak a = b entries. We thus now use -qsyntaxonly in hope
X# that all IBM compiler versions support it.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
XUFILES=
Xtrap 'rm -f $UFILES ; exit 1' 1 2 15
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X	*.c)	if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		b=`basename $i ''`
X		FILES="$FILES$b"
X		;;
X	esac
Xdone
X
XUFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.c;\1.u;g'`
X
Xrm -f $UFILES
X#cc -M -E > /dev/null "$@"
Xcc -M -qsyntaxonly > /dev/null "$@"
Xcat $UFILES
Xrm -f $UFILES
END-of-star-1.5.2/conf/mkdep-aix.sh
echo x - star-1.5.2/conf/wget.sh
sed 's/^X//' >star-1.5.2/conf/wget.sh << 'END-of-star-1.5.2/conf/wget.sh'
X#!/bin/sh
X# @(#)wget.sh  1.3 05/05/30 Copyright 2005 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# A simulation of wget using ftp
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xexcod=255
X
Xtrap 'rm -fr /tmp/.d.$$ ; exit 1' 1 2 15
Xtrap 'rm -fr /tmp/.d.$$ ; exit $excode' 0
X
Xif [ $# -lt 1 ]; then
X	echo "Usage: wget.sh [-d] URL"
X	echo "Options:"
X	echo "	-d	Print a listing of the dir part and exit"
X	echo
X	echo "Only ftp:// type URLs are supported"
X	exit 1
Xfi
X
Xdodir=FALSE
Xif [ ."$1" = .-d ]; then
X	dodir=TRUE
X	shift
Xfi
XURL="$1"
Xrest=`echo "$URL" | sed -e 's,^ftp://,,'`
Xif [ "$URL" = "$rest" ]; then
X	echo "Unsupported protocol in" "$URL"
X	exit 1
Xfi
X
XHOST=`echo "$rest" | sed -e 's,/.*,,'`
XFILE=`echo "$rest" | sed -e 's,^[^/]*/,,'`
X#echo HOST "$HOST"
X#echo FILE "$FILE"
X
XDNAME=`echo "$FILE" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
XFNAME=`echo "$FILE" | sed -e 's,.*/,,'`
X#echo DNAME "$DNAME"
X#echo FNAME "$FNAME"
X
Xmkdir /tmp/.d.$$
Xcat <<EOF > /tmp/.d.$$/.netrc
Xmachine "$HOST"  login ftp password wget.sh@Makefiles.Schily.build
XEOF
Xchmod 600 /tmp/.d.$$/.netrc
X
Xif [ $dodir = TRUE ]; then
X	HOME=/tmp/.d.$$ ftp "$HOST" <<EOF
X	bin
X	passive on
X	cd "$DNAME"
X	dir
X	bye
XEOF
Xexcode=$?
X
Xelse
X
X	HOME=/tmp/.d.$$ ftp "$HOST" <<EOF
X	bin
X	passive on
X	cd "$DNAME"
X	dir "$FNAME"
X	hash on
X	verbose on
X	get "$FNAME"
X	bye
XEOF
Xexcode=$?
Xfi
END-of-star-1.5.2/conf/wget.sh
echo x - star-1.5.2/conf/srcroot.sh
sed 's/^X//' >star-1.5.2/conf/srcroot.sh << 'END-of-star-1.5.2/conf/srcroot.sh'
X#!/bin/sh
X# @(#)srcroot.sh  1.3 05/05/01 Copyright 2005 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# Find and print SRCROOT
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only.
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
XSRCROOT=.
Xloop=1
Xwhile [ $loop -lt 100 ]; do
X	#echo "$SRCROOT"
X	if [ ! -d $SRCROOT ]; then
X		# Abort on ENAMETOOLONG
X		break
X	fi
X	if [ -r $SRCROOT/RULES/rules.top ]; then
X		break
X	fi
X	if [ "$SRCROOT" = . ]; then
X		SRCROOT=".."
X	else
X		SRCROOT="$SRCROOT/.."
X	fi
X	loop="`expr $loop + 1`"
Xdone
Xif [ ! -r $SRCROOT/RULES/rules.top ]; then
X	echo "Cannot find SRCROOT" 1>&2
X	exit 1
Xfi
Xecho "$SRCROOT"
END-of-star-1.5.2/conf/srcroot.sh
echo x - star-1.5.2/conf/setup.sh
sed 's/^X//' >star-1.5.2/conf/setup.sh << 'END-of-star-1.5.2/conf/setup.sh'
X#!/bin/sh
X# @(#)setup.sh  1.17 10/05/01 Copyright 2005 J. Schilling
X###########################################################################
X# Written 2005 by J. Schilling
X###########################################################################
X# Set up bins/<archdir>/{bzip2}!{gzip}!{patch}!{smake}!{star}!{wget}
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
X# Benoetigte Kommandos:
X#
X#	makefiles	ftp://ftp.berlios.de/pub/makefiles/
X#	makefiles	ftp://ftp.berlios.de/pub/makefiles/testing/makefiles.tar
X#	smake		ftp://ftp.berlios.de/pub/smake/alpha/
X#	star		ftp://ftp.berlios.de/pub/star/alpha/
X#	gzip		ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar
X#	wget		ftp://ftp.gnu.org/gnu/wget/wget-1.9.1.tar.gz
X#	wget		ftp://ftp.berlios.de/pub/makefiles/testing/wget-1.9.1-1.tar
X#	gzip		http://www.gzip.org/gzip-1.3.3.tar.gz
X#	gzip		ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.3.3.tar.gz
X#	bzip2		ftp://sources.redhat.com/pub/bzip2/v102/bzip2-1.0.2.tar.gz
X#	bzip2		http://www.bzip.org/1.0.3/bzip2-1.0.3.tar.gz
X#	bzip2		ftp://ftp.berlios.de/pub/makefiles/testing/bzip2-1.0.3.tar.gz
X#	patch		ftp://ftp.gnu.org/pub/gnu/patch/patch-2.5.4.tar.gz
X#	patch		ftp://ftp.berlios.de/pub/makefiles/testing/patch-2.5.4-1.tar.bz2
X
Xtrap 'if [ -f ./$xfile ]; then rm -f ./$xfile; fi; rm -rf /tmp/i.$$/; exit 1' 1 2 15
X
XSRCROOT=.
Xloop=1
Xwhile [ $loop -lt 100 ]; do
X	#echo "$SRCROOT"
X	if [ ! -d $SRCROOT ]; then
X		# Abort on ENAMETOOLONG
X		break
X	fi
X	if [ -r $SRCROOT/RULES/rules.top ]; then
X		break
X	fi
X	if [ "$SRCROOT" = . ]; then
X		SRCROOT=".."
X	else
X		SRCROOT="$SRCROOT/.."
X	fi
X	loop="`expr $loop + 1`"
Xdone
Xif [ ! -r $SRCROOT/RULES/rules.top ]; then
X	echo "Cannot find SRCROOT" 1>&2
X	exit 1
Xfi
X
Xcd "$SRCROOT"
X
Xif [ ! -r RULES/rules.top ]; then
X	echo "Cannot chdir to SRCROOT" 1>&2
X	exit 1
Xfi
X
XOARCH=`conf/oarch.sh`
XBINS=bins/"$OARCH"
XPWD=`pwd`
Xmkdir -p "$BINS"
XPATH="${PWD}/${BINS}:${PATH}"
Xexport PATH
XMAKE="make"
X
Xif [	-r ${BINS}/bzip2 -a	\
X	-r ${BINS}/gzip -a	\
X	-r ${BINS}/lndir -a	\
X	-r ${BINS}/patch -a	\
X	-r ${BINS}/smake -a	\
X	-r ${BINS}/star -a	\
X	-r ${BINS}/wget		]; then
X	echo "Setup for $OARCH already done." 1>&2
X	exit
Xfi
X
XCC="${CC-`conf/oarch.sh -c`}"
X
XZIP_SUFFIX=
XZIP=cat
XUNZIP=cat
X
Xif bzip2 --help > /dev/null 2>&1; then
X	UNZIP="bzip2 -d"
X	ZIP=bzip2
X	ZIP_SUFFIX=.bz2
Xelif gzip --help > /dev/null 2>&1; then
X	UNZIP="gzip -d"
X	ZIP=gzip
X	ZIP_SUFFIX=.gz
Xfi
X
XWGET="${WGET-sh conf/wget.sh}"
X
Xdo_wget() {
X	URL="$1"
X	while true; do
X		xfile=`echo "$URL" | sed -e 's,.*/,,'`
X		$WGET "$URL"
X
X		if [ -f "$xfile" ]; then
X			break
X		fi
X		echo
X		echo Retrying in 10 seconds
X		sleep 10
X	done
X	xfile=
X}
X
Xdo_wget ftp://ftp.berlios.de/pub/smake/testing/smake.tar${ZIP_SUFFIX}
X${UNZIP} < smake.tar${ZIP_SUFFIX} | tar xf -
X#
X# tar on HP-UX-10.x does not like tar xpf
X#
Xcd smake-*/psmake/.
Xsh ./MAKE-all
Xcd ..
Xpsmake/smake -r DESTDIR=/tmp/i.$$/ COPTX=-DDEFAULTS_PATH_SEARCH_FIRST install
Xcd ..
Xecho "Configuring Makefile system"
Xcd conf
X/tmp/i.$$/opt/schily/bin/smake -r
Xcd ..
Xcd inc
X/tmp/i.$$/opt/schily/bin/smake -r
Xcd ..
Xstrip /tmp/i.$$/opt/schily/bin/smake
Xrm -f "$BINS"/smake
Xcp -p /tmp/i.$$/opt/schily/bin/smake "$BINS"
Xmkdir -p "$BINS"/lib
Xrm -f "$BINS"/lib/defaults.smk
Xcp -p /tmp/i.$$/opt/schily/lib/defaults.smk "$BINS"/lib
Xrm -rf smake-* smake.tar*
XMAKE="${PWD}/${BINS}/smake"
X
Xif [ $ZIP = cat ]; then
X	#do_wget ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar
X	do_wget ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.2.4.tar
X	tar xf gzip-1.2.4.tar
X	#
X	# tar on HP-UX-10.x does not like tar xpf
X	#
X	cd gzip-1.2.4
X	CC="$CC" MAKE="$MAKE" CFLAGS=-O ./configure
X	smake
X	cd ..
X	strip gzip-1.2.4/gzip
X	rm -f "${BINS}"/gzip
X	cp -p gzip-1.2.4/gzip "${BINS}"
X	rm -rf gzip-1.2.4*
X	UNZIP="gzip -d"
X	ZIP=gzip
X	ZIP_SUFFIX=.gz
Xfi
X
Xdo_wget ftp://ftp.berlios.de/pub/star/testing/star.tar${ZIP_SUFFIX}
X${UNZIP} < star.tar${ZIP_SUFFIX} | tar xf -
X#
X# tar on HP-UX-10.x does not like tar xpf
X#
Xcd star-*/.
Xsmake DESTDIR=/tmp/i.$$/ install
Xcd ..
Xstrip /tmp/i.$$/opt/schily/bin/star
Xrm -f "${BINS}"/star
Xcp -p /tmp/i.$$/opt/schily/bin/star "$BINS"
Xrm -rf star-* star.tar*
X
Xdo_compile() {
X	url="$1"
X	dir="$2"
X	binpath="$3"
X	fname=`echo "$url" | sed -e 's,.*/,,'`
X	do_wget "$url"
X	star xpf "$fname"
X	cd "$dir"
X	if [ -r ./configure ]; then
X		CC="$CC" MAKE="$MAKE" CFLAGS=-O ./configure
X	elif [ -r ./Configure ]; then
X		CC="$CC" MAKE="$MAKE" CFLAGS=-O ./Configure
X	fi
X	smake CC="$CC" CFLAGS=-O
X	cd ..
X	if [ ! -r "$binpath" ]; then
X		echo "Cound not make $binpath"	1>&2
X	fi
X	fname=`echo "$binpath" | sed -e 's,.*/,,'`
X	strip "$binpath"
X	rm -f "${BINS}"/"$fname"
X	cp -p "$binpath" "${BINS}"
X	rm -rf "$dir"*
X}
X
Xdo_install() {
X	url="$1"
X	dir="$2"
X
X	fname=`echo "$url" | sed -e 's,.*/,,'`
X	do_wget "$url"
X	star xpf "$fname"
X	cd "$dir"
X	smake
X	smake ibins
X	cd ..
X	rm -rf "$dir"*
X}
X
Xdo_compile 	ftp://ftp.berlios.de/pub/makefiles/testing/wget-1.9.1-2.tar${ZIP_SUFFIX} \
X		wget-1.9.1 \
X		wget-1.9.1/src/wget
X
XWGET="${BINS}/wget --passive-ftp"
X
Xdo_compile	ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.3.3.tar.gz \
X		gzip-1.3.3 \
X		gzip-1.3.3/gzip
X
Xdo_compile	ftp://ftp.berlios.de/pub/makefiles/testing/bzip2-1.0.3.tar.gz \
X		bzip2-1.0.3 \
X		bzip2-1.0.3/bzip2
X
Xdo_compile	ftp://ftp.berlios.de/pub/makefiles/testing/patch-2.5.4-1.tar.bz2 \
X		patch-2.5.4 \
X		patch-2.5.4/patch
Xln -s patch ${BINS}/gpatch
X
Xdo_install	ftp://ftp.berlios.de/pub/makefiles/testing/lndir.tar.bz2 \
X		lndir
X
Xrm -rf /tmp/i.$$/
END-of-star-1.5.2/conf/setup.sh
echo x - star-1.5.2/conf/mkdir.sh
sed 's/^X//' >star-1.5.2/conf/mkdir.sh << 'END-of-star-1.5.2/conf/mkdir.sh'
X#!/bin/sh
X# @(#)mkdir.sh	1.5 09/12/22 Copyright 1998 J. Schilling
X###########################################################################
X# Written 1998-2005 by J. Schilling
X###########################################################################
X#
X# Schily Makefile slottable source high level mkdir -p command
X# Creates TARGETS/ and needed content
X#
X# Replacement for mkdir -p ... functionality.
X#
X# mkdir(1) on BSD-4.3, NeXT Step <= 3.x and similar don't accept the -p flag
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xdop=false
XdoT=false
Xok=true
Xwhile test $# -ne 0; do
X	case $1 in
X	-p)
X		dop=true
X		shift
X		;;
X	-T)
X		doT=true
X		shift
X		;;
X	-*)
X		echo "Unknown Option '$1'"	1>&2
X		ok=false
X		break
X		;;
X	*)
X		break
X		;;
X	esac
Xdone
X
Xif [ $doT = true -a $dop = false ]; then
X	echo "Option -T needs -p in addition"      1>&2
X	ok=false
Xfi
X
Xif [ $# -lt 1 ]; then
X	echo "Missing <dir> parameter"      1>&2
Xfi
Xif [ $# -lt 1 -o $ok = false ]; then
X	echo "Usage: $0 [-p] [-T] dir ...."
X	echo "Options:"
X	echo "	-p	Create <dir> and including all non existing parent directories"
X	echo "	-T	Add Schily Makefile directory template files"
X	exit 1
Xfi
X
Xif [ $doT = true -a ."$SRCROOT" = . ]; then
X	SRCROOT=.
X	loop=1
X	while [ $loop -lt 100 ]; do
X		if [ ! -d $SRCROOT ]; then
X			# Abort on ENAMETOOLONG
X			break
X		fi
X		if [ -r $SRCROOT/RULES/rules.top ]; then
X			break
X		fi
X		if [ "$SRCROOT" = . ]; then
X			SRCROOT=".."
X		else
X			SRCROOT="$SRCROOT/.."
X		fi
X		loop="`expr $loop + 1`"
X	done
X	if [ ! -r $SRCROOT/RULES/rules.top ]; then
X		echo "Cannot find SRCROOT directory" 1>&2
X		exit 1
X	fi
X	export SRCROOT
Xfi
X
Xif [ $dop = false ]; then
X	for i in "$@"; do
X		mkdir "$i"
X	done
Xelse
X	for i in "$@"; do
X		# Don't use ${i:-.}, BSD4.3 doen't like it
X		#
X		fullname="$i"
X		if [ ."$i" = . ]; then
X			fullname=.
X		fi
X		if [ "$fullname" = . ]; then
X			continue
X		fi
X		dirname=`expr \
X			"$fullname/" : '\(/\)/*[^/]*//*$'  \| \
X			"$fullname/" : '\(.*[^/]\)//*[^/][^/]*//*$' \| \
X			.`
X
X		if [ $doT = false ]; then 
X			sh $0 -p "$dirname"
X			if [ ! -d "$i" ]; then
X				mkdir "$i"
X			fi
X			continue
X		else
X			sh $0 -p -T "$dirname"
X		fi
X
X		if [ ! -d "$dirname"/TARGETS ]; then
X			mkdir "$dirname"/TARGETS
X		fi
X		if [ ! -r "$dirname"/TARGETS/__slot ]; then
X			echo 'This file enables the "slot" feature of the Schily SING makefile system' > "$dirname"/TARGETS/__slot
X		fi
X		dirbase=`echo "$i" | sed -e 's,/*$,,;s,.*/\([^/]*\),\1,'`
X		if [ ! -r "$dirname"/TARGETS/55"$dirbase" ]; then
X			: > "$dirname"/TARGETS/55"$dirbase"
X		fi
X		if [ ! -r "$dirname"/Makefile ]; then
X			srcroot=`echo "$dirname" | sed -e 's,[^/][^/]*,..,g'`
X			srcroot=`echo "$SRCROOT/$srcroot" | sed -e 's,^\./,,'`
X
X			echo '#ident %'W'% %'E'% %'Q'%'								 > "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo '# Sample makefile for sub directory makes'					>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo "SRCROOT=	$srcroot"								>> "$dirname"/Makefile
X			echo 'RULESDIR=	RULES'									>> "$dirname"/Makefile
X			echo 'include		$(SRCROOT)/$(RULESDIR)/rules.top'				>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo											>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X			echo 'include		$(SRCROOT)/$(RULESDIR)/rules.dir'				>> "$dirname"/Makefile
X			echo '###########################################################################'	>> "$dirname"/Makefile
X		fi
X
X		if [ ! -d "$i" ]; then
X			mkdir "$i"
X		fi
X	done
Xfi
END-of-star-1.5.2/conf/mkdir.sh
echo x - star-1.5.2/conf/mkdep-msc.sh
sed 's/^X//' >star-1.5.2/conf/mkdep-msc.sh << 'END-of-star-1.5.2/conf/mkdep-msc.sh'
X#!/bin/sh
X#ident "@(#)mkdep-msc.sh	1.3 11/08/11 "
X###########################################################################
X# Copyright 1999,2006 by J. Schilling
X###########################################################################
X#
X# Create dependency list with Microsoft's cl
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X
X	*.c | *.C | *.cc | *.cxx | *.cpp)
X
X		if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		# base name from $i
X		base=`echo $i | sed -e 's;[^/]*/;;'`
X		FILES="$FILES$base"
X		;;
X	esac
Xdone
X
XOFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.[cC]$;\1.obj;g' -e 's;\([^.]*\)\.cc$;\1.obj;g' -e 's;\([^.]*\)\.c..$;\1.obj;g' `
X
Xecho ".SPACE_IN_NAMES: true"
Xcl -E -nologo 2> /dev/null "$@"  | grep '\#line' | sed -e 's,^.*\#line[ \t]*[^ ]*[ \t]*",,' \
X							-e 's,"$,,' -e 's/\([^\]\) /\1\\ /g' \
X							-e  's,\.\\\\*,.\\,g' \
X							-e "s;^;$OFILES: ;" | sort -u
Xecho ".SPACE_IN_NAMES:"
END-of-star-1.5.2/conf/mkdep-msc.sh
echo x - star-1.5.2/conf/xconfig.mk
sed 's/^X//' >star-1.5.2/conf/xconfig.mk << 'END-of-star-1.5.2/conf/xconfig.mk'
X#ident @(#)xconfig.mk	1.1 06/10/31 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X.SEARCHLIST:	../incs/$(OARCH) ../incs/$(OARCH)
XVPATH=		../incs/$(OARCH)
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		xconfig.h
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
X
XPTARGET=	../incs/$(OARCH)/xconfig.h
END-of-star-1.5.2/conf/xconfig.mk
echo x - star-1.5.2/conf/post.html
sed 's/^X//' >star-1.5.2/conf/post.html << 'END-of-star-1.5.2/conf/post.html'
X<p><hr>
X<a href="http://www.fraunhofer.de/"><IMG SRC="fhglogr.gif" ALT="FhG " BORDER=0></a>
X<a href="http://www.fokus.fraunhofer.de/home/"><IMG SRC="fhlogo.gif" ALT="FhG FOKUS " BORDER=0></a>
X<a href="http://www.berlios.de/"><IMG SRC="berliOS_logo.jpg" ALT="BerliOS " BORDER=0 WIDTH=159 HEIGHT=41></a>
X<a href="http://cdrecord.berlios.de/private/index.html">
X<IMG SRC="schilling.gif" ALT="Schily " BORDER=0 WIDTH=41 HEIGHT=54></a>
X<a href="http://cdrecord.berlios.de/private/index.html">Schily's Home</a>
X<a href="ftp://ftp.berlios.de/pub/ved/"><IMG SRC="vedpowered.gif" ALT="VED powered " BORDER=0 ></a>
X
X</body>
X</html>
END-of-star-1.5.2/conf/post.html
echo x - star-1.5.2/conf/pre.html
sed 's/^X//' >star-1.5.2/conf/pre.html << 'END-of-star-1.5.2/conf/pre.html'
X<html>
X<head>
X<title>Manpage for XXX</title>
X<META name="description" content="A html version of the manpage for XXX">
X<META name="keywords" content="XXX">
X</head>
X<body background=corrugated_xxxxxlight_metal.gif>
END-of-star-1.5.2/conf/pre.html
echo x - star-1.5.2/conf/mkdep-msc-interix.sh
sed 's/^X//' >star-1.5.2/conf/mkdep-msc-interix.sh << 'END-of-star-1.5.2/conf/mkdep-msc-interix.sh'
X#!/bin/sh
X#ident "@(#)mkdep-msc-interix.sh	1.4 07/04/24 "
X###########################################################################
X# Copyright 1999,2006-2007 by J. Schilling
X###########################################################################
X#
X# Create dependency list with Microsoft's cl from Interix
X#
X###########################################################################
X#
X# This script will probably not work correctly with a list of C-files
X# but as we don't need it with 'smake' or 'gmake' it seems to be sufficient.
X#
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
XFILES=
X
Xfor i in "$@"; do
X
X	case "$i" in
X
X	-*)	# ignore options
X		;;
X
X	*.c | *.C | *.cc | *.cxx | *.cpp)
X
X		if [ ! -z "$FILES" ]; then
X			FILES="$FILES "
X		fi
X		# base name from $i
X		base=`echo $i | sed -e 's;[^/]*/;;'`
X		FILES="$FILES$base"
X		;;
X	esac
Xdone
X
XOFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.[cC]$;\1.obj;g' -e 's;\([^.]*\)\.cc$;\1.obj;g' -e 's;\([^.]*\)\.c..$;\1.obj;g' `
X
Xecho ".SPACE_IN_NAMES: true"
Xcl.exe -E -nologo 2> /dev/null "$@" | grep '^\#line' | cut -d\" -f2 | sort -u | \
X	sed '
Xs,^a:,/dev/fs/A,
Xs,^b:,/dev/fs/B,
Xs,^c:,/dev/fs/C,
Xs,^d:,/dev/fs/D,
Xs,^e:,/dev/fs/E,
Xs,^f:,/dev/fs/F,
Xs,^g:,/dev/fs/G,
Xs,^h:,/dev/fs/H,
Xs,^i:,/dev/fs/I,
Xs,^j:,/dev/fs/J,
Xs,^k:,/dev/fs/K,
Xs,^l:,/dev/fs/L,
Xs,^m:,/dev/fs/M,
Xs,^n:,/dev/fs/N,
Xs,^o:,/dev/fs/O,
Xs,^p:,/dev/fs/P,
Xs,^q:,/dev/fs/Q,
Xs,^r:,/dev/fs/R,
Xs,^s:,/dev/fs/S,
Xs,^t:,/dev/fs/T,
Xs,^u:,/dev/fs/U,
Xs,^v:,/dev/fs/V,
Xs,^w:,/dev/fs/W,
Xs,^x:,/dev/fs/X,
Xs,^y:,/dev/fs/Y,
Xs,^z:,/dev/fs/Z,
Xs,\([A-Z]\):,/dev/fs/\1,
Xs,\\\\,/,g
Xs/\([^\]\) /\1\\ /g' | sed -e "s;^;$OFILES: ;"
Xecho ".SPACE_IN_NAMES:"
END-of-star-1.5.2/conf/mkdep-msc-interix.sh
echo x - star-1.5.2/conf/runrmt_android
sed 's/^X//' >star-1.5.2/conf/runrmt_android << 'END-of-star-1.5.2/conf/runrmt_android'
X#!/bin/sh
X# @(#)runrmt_android	1.4 12/03/11 Copyright 2011 J. Schilling
X###########################################################################
X# Written 2011 by J. Schilling
X###########################################################################
X# Remotely execute a test from "configure" and copy back "conftestval" as
X# well as the exit code from the program on the remote platform.
X#
X# This is the Android emulator variant that calls commands via the
X# Android Debug Bridge.
X#
X# Note that the shell variable '$?' needs to be handled with caution in
X# order to prevent early expansion.
X# We use "sh -c" to make sure that this script will work correctly in case
X# the remote user has a strange login shell.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xremote_test=FALSE
Xif test "$1" = "-r" ; then
X	remote_test=TRUE
X	shift
Xfi
X
Xif test $# -lt 1 ; then
X	echo "Usage: runrmt_android program-to-execute" 1>&2
X	echo "or"
X	echo "       runrmt -r file-to-test" 1>&2
X	exit 255
Xfi
X
Xif test $remote_test = FALSE -a ! -r $1 ; then
X	echo "$1: not found" 1>&2
X	exit 254
Xfi
X
X#
X# We should tar and feather the Android authors for redefining the name
X# of the standard UNIX debugger for their tool. Hey, next time you could use
X# "ls", "ps", "df" or something similar to cause even more fun.
X#
X# Edit this line if your Android Emulator is on a different location:
Xrmt=$HOME/android-sdk-linux_x86/platform-tools/adb
X
X#
X# Only do debugging when we are called from the schily makefilesystem
X#
Xif test ."$CONFIG_RMTDEBUG" != . -a ."$CONFIG_NOFAIL" != . ; then
X	echo "REMOTE \c" 1>&6	# configure checking messages are on fd 6
Xfi
X
Xif test $remote_test = TRUE; then
X	#
X	# Android has no "test" command, do the best we can do...
X	# As "ls" on Android does not implement -L, we may be fooled by symlinks.
X	#
X	$rmt shell "cd /data/local/tmp;ls -l $1>/dev/null 2>/dev/null;echo "'$?'" > o.exit"	2> /dev/null
X	$rmt pull /data/local/tmp/o.exit .				2> /dev/null
X	$rmt shell "rm /data/local/tmp/o.exit"				2> /dev/null > /dev/null
X	$rmt shell "rm /data/local/tmp/core"				2> /dev/null > /dev/null
Xelse
X	F=`echo $1 |  sed -e 's,.*/,,'`
X	$rmt push $1 /data/local/tmp					2> /dev/null
X	$rmt shell "cd /data/local/tmp;./$F > o.out 2> o.err ;echo "'$?'" > o.exit"	2> /dev/null
X	$rmt pull /data/local/tmp/o.exit .				2> /dev/null
X	$rmt pull /data/local/tmp/o.out .				2> /dev/null
X	$rmt pull /data/local/tmp/o.err .				2> /dev/null
X	$rmt pull /data/local/tmp/conftestval .				2> /dev/null
X	$rmt shell "rm /data/local/tmp/$F /data/local/tmp/o.exit"	2> /dev/null > /dev/null
X	$rmt shell "rm /data/local/tmp/o.out /data/local/tmp/o.err"	2> /dev/null > /dev/null
X	$rmt shell "rm /data/local/tmp/core"				2> /dev/null > /dev/null
X	$rmt shell "rm /data/local/tmp/conftestval"			2> /dev/null > /dev/null
Xfi
Xexcode=`cat ./o.exit`
Xif [ -f o.out ]; then
X	cat o.out
Xfi
Xif [ -f o.err ]; then
X	cat o.err 1>&2
Xfi
Xrm -f ./o.exit ./o.out ./o.err
X#echo excode: $excode
Xexit $excode
END-of-star-1.5.2/conf/runrmt_android
echo x - star-1.5.2/conf/runrmt_rsh
sed 's/^X//' >star-1.5.2/conf/runrmt_rsh << 'END-of-star-1.5.2/conf/runrmt_rsh'
X#!/bin/sh
X# @(#)runrmt_rsh	1.3 11/07/16 Copyright 2011 J. Schilling
X###########################################################################
X# Written 2011 by J. Schilling
X###########################################################################
X# Remotely execute a test from "configure" and copy back "conftestval" as
X# well as the exit code from the program on the remote platform.
X#
X# This is the generic UNIX variant that calls commands via "rsh".
X#
X# Note that the shell variable '$?' needs to be handled with caution in
X# order to prevent early expansion.
X# We use "sh -c" to make sure that this script will work correctly in case
X# the remote user has a strange login shell.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xremote_test=FALSE
Xif test "$1" = "-r" ; then
X	remote_test=TRUE
X	shift
Xfi
X
Xif test $# -lt 1 ; then
X	echo "Usage: runrmt program-to-execute" 1>&2
X	echo "or"
X	echo "       runrmt -r file-to-test" 1>&2
X	exit 255
Xfi
X
Xif test $remote_test = FALSE -a ! -r $1 ; then
X	echo "$1: not found" 1>&2
X	exit 254
Xfi
X
Xif test ."$CONFIG_RMTHOST" = . ; then
X	echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2
X	exit 253
Xfi
Xremote="$CONFIG_RMTHOST"
X
Xif test ."$CONFIG_RMTDEBUG" != . ; then
X	echo "REMOTE \c" 1>&6	# configure checking messages are on fd 6
Xfi
X
Xif test $remote_test = TRUE; then
X	rsh $remote sh -c "'cd /tmp/;test -r $1; echo "'$?'" > o.exit'"	2> /dev/null
X	rcp -p $remote:/tmp/o.exit .					2> /dev/null
X	rsh $remote "rm -f /tmp/core /tmp/o.exit"			2> /dev/null >/dev/null
Xelse
X	F=`echo $1 |  sed -e 's,.*/,,'`
X	rcp $1 $remote:/tmp/						2> /dev/null
X	rsh $remote sh -c "'cd /tmp/;./$F; echo "'$?'" > o.exit'"
X	rcp -p $remote:/tmp/o.exit .					2> /dev/null
X	rcp -p $remote:/tmp/conftestval .				2> /dev/null
X	rsh $remote "rm -f /tmp/core /tmp/$F /tmp/o.exit /tmp/conftestval" 2> /dev/null >/dev/null
Xfi
Xexcode=`cat ./o.exit`
Xrm -f ./o.exit
X#echo excode: $excode
Xexit $excode
END-of-star-1.5.2/conf/runrmt_rsh
echo x - star-1.5.2/conf/runrmt_ssh
sed 's/^X//' >star-1.5.2/conf/runrmt_ssh << 'END-of-star-1.5.2/conf/runrmt_ssh'
X#!/bin/sh
X# @(#)runrmt_ssh	1.3 11/07/16 Copyright 2011 J. Schilling
X###########################################################################
X# Written 2011 by J. Schilling
X###########################################################################
X# Remotely execute a test from "configure" and copy back "conftestval" as
X# well as the exit code from the program on the remote platform.
X#
X# This is the generic UNIX variant that calls commands via "ssh".
X#
X# Note that the shell variable '$?' needs to be handled with caution in
X# order to prevent early expansion.
X# We use "sh -c" to make sure that this script will work correctly in case
X# the remote user has a strange login shell.
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
X
Xremote_test=FALSE
Xif test "$1" = "-r" ; then
X	remote_test=TRUE
X	shift
Xfi
X
Xif test $# -lt 1 ; then
X	echo "Usage: runrmt program-to-execute" 1>&2
X	echo "or"
X	echo "       runrmt -r file-to-test" 1>&2
X	exit 255
Xfi
X
Xif test $remote_test = FALSE -a ! -r $1 ; then
X	echo "$1: not found" 1>&2
X	exit 254
Xfi
X
Xif test ."$CONFIG_RMTHOST" = . ; then
X	echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2
X	exit 253
Xfi
Xremote="$CONFIG_RMTHOST"
X
Xif test ."$CONFIG_RMTDEBUG" != . ; then
X	echo "REMOTE \c" 1>&6	# configure checking messages are on fd 6
Xfi
X
Xif test $remote_test = TRUE; then
X	ssh $remote sh -c "'cd /tmp/;test -r $1; echo "'$?'" > o.exit'"	2> /dev/null
X	scp -p $remote:/tmp/o.exit .					2> /dev/null
X	ssh $remote "rm -f /tmp/core /tmp/o.exit"			2> /dev/null >/dev/null
Xelse
X	F=`echo $1 |  sed -e 's,.*/,,'`
X	scp $1 $remote:/tmp/						2> /dev/null
X	ssh $remote sh -c "'cd /tmp/;./$F; echo "'$?'" > o.exit'"
X	scp -p $remote:/tmp/o.exit .					2> /dev/null
X	scp -p $remote:/tmp/conftestval .				2> /dev/null
X	ssh $remote "rm -f /tmp/core /tmp/$F /tmp/o.exit /tmp/conftestval" 2> /dev/null >/dev/null
Xfi
Xexcode=`cat ./o.exit`
Xrm -f ./o.exit
X#echo excode: $excode
Xexit $excode
END-of-star-1.5.2/conf/runrmt_ssh
echo c - star-1.5.2/incs
mkdir -p star-1.5.2/incs > /dev/null 2>&1
echo c - star-1.5.2/inc
mkdir -p star-1.5.2/inc > /dev/null 2>&1
echo x - star-1.5.2/inc/Makefile
sed 's/^X//' >star-1.5.2/inc/Makefile << 'END-of-star-1.5.2/inc/Makefile'
X#ident "@(#)Makefile	1.3 08/09/10 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= align_test.mk avoffset.mk
X
Xalign_test.c:
X	@echo "	==> MAKING SYMLINKS in ." && sh ./MKLINKS
X$(ALLTARGETS): align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/inc/Makefile
echo x - star-1.5.2/inc/align_test.c
sed 's/^X//' >star-1.5.2/inc/align_test.c << 'END-of-star-1.5.2/inc/align_test.c'
X/* @(#)align_test.c	1.29 10/08/26 Copyright 1995-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef	lint
Xstatic	UConst char sccsid[] =
X	"@(#)align_test.c	1.29 10/08/26 Copyright 1995-2010 J. Schilling";
X#endif
X/*
X *	Generate machine dependant align.h
X *
X *	Copyright (c) 1995-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#undef	NO_LONGLONG	/* Make sure that Llong wil be long long */
X#include <schily/utypes.h>
X
X/*
X * Be very careful here as MSVC does not implement long long but rather __int64
X * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to
X * check for a MSVC __int128 type.
X */
X
X/*
X * CHECK_ALIGN needs SIGBUS, but DJGPP has no SIGBUS
X */
X/*#define	FORCE_ALIGN*/
X/*#define	OFF_ALIGN*/
X/*#define	CHECK_ALIGN*/
X
XEXPORT	int	main	__PR((int ac, char **av));
X
X#if	!defined(FORCE_ALIGN) && !defined(OFF_ALIGN) &&	!defined(CHECK_ALIGN)
X#define	OFF_ALIGN
X#endif
X
Xchar	buf[8192+1024];
Xchar	*buf_aligned;
X
X#ifdef	FORCE_ALIGN
X#	undef	CHECK_ALIGN
X#	undef	OFF_ALIGN
X#endif
X
X#ifdef	CHECK_ALIGN
X#	undef	FORCE_ALIGN
X#	undef	OFF_ALIGN
X#endif
X
X#ifdef	OFF_ALIGN
X#	undef	FORCE_ALIGN
X#	undef	CHECK_ALIGN
X#endif
X
X
X#ifdef	FORCE_ALIGN
X
X#define	ALIGN_short	sizeof (short)
X#define	ALIGN_int	sizeof (int)
X#define	ALIGN_long	sizeof (long)
X#define	ALIGN_longlong	sizeof (Llong)
X#define	ALIGN_float	sizeof (float)
X#define	ALIGN_double	sizeof (double)
X#define	ALIGN_ldouble	sizeof (long double)
X#define	ALIGN_ptr	sizeof (char *)
X
X#endif
X
X#ifdef	CHECK_ALIGN
X
X#include <schily/signal.h>
X#include <schily/setjmp.h>
XLOCAL	jmp_buf	jb;
X
XLOCAL	int	check_align	__PR((int (*)(char *, int),
X					void (*)(char *, int), int));
XLOCAL	int	check_short	__PR((char *, int));
XLOCAL	int	check_int	__PR((char *, int));
XLOCAL	int	check_long	__PR((char *, int));
XLOCAL	int	check_longlong	__PR((char *, int));
XLOCAL	int	check_float	__PR((char *, int));
XLOCAL	int	check_double	__PR((char *, int));
X#ifdef	HAVE_LONGDOUBLE
XLOCAL	int	check_ldouble	__PR((char *, int));
X#endif
XLOCAL	int	check_ptr	__PR((char *, int));
X
XLOCAL	int	speed_check	__PR((char *,
X					void (*)(char *, int), int));
XLOCAL	void	speed_short	__PR((char *, int));
XLOCAL	void	speed_int	__PR((char *, int));
XLOCAL	void	speed_long	__PR((char *, int));
XLOCAL	void	speed_longlong	__PR((char *, int));
XLOCAL	void	speed_float	__PR((char *, int));
XLOCAL	void	speed_double	__PR((char *, int));
X#ifdef	HAVE_LONGDOUBLE
XLOCAL	void	speed_ldouble	__PR((char *, int));
X#endif
XLOCAL	void	speed_ptr	__PR((char *, int));
X
X#define	ALIGN_short	check_align(check_short, speed_short, sizeof (short))
X#define	ALIGN_int	check_align(check_int, speed_int, sizeof (int))
X#define	ALIGN_long	check_align(check_long, speed_long, sizeof (long))
X#define	ALIGN_longlong	check_align(check_longlong, speed_longlong, sizeof (Llong))
X#define	ALIGN_float	check_align(check_float, speed_float, sizeof (float))
X#define	ALIGN_double	check_align(check_double, speed_double, sizeof (double))
X#define	ALIGN_ldouble	check_align(check_ldouble, speed_ldouble, sizeof (long double))
X#define	ALIGN_ptr	check_align(check_ptr, speed_ptr, sizeof (char *))
X
X#endif
X
X#ifdef	OFF_ALIGN
X
X#define	sm_off(s, m)	((size_t)&((s)0)->m)
X
XLOCAL	int	off_short	__PR((void));
XLOCAL	int	off_int		__PR((void));
XLOCAL	int	off_long	__PR((void));
XLOCAL	int	off_longlong	__PR((void));
XLOCAL	int	off_float	__PR((void));
XLOCAL	int	off_double	__PR((void));
X#ifdef	HAVE_LONGDOUBLE
XLOCAL	int	off_ldouble	__PR((void));
X#endif
XLOCAL	int	off_ptr		__PR((void));
X
X#define	ALIGN_short	off_short()
X#define	ALIGN_int	off_int()
X#define	ALIGN_long	off_long()
X#define	ALIGN_longlong	off_longlong()
X#define	ALIGN_float	off_float()
X#define	ALIGN_double	off_double()
X#define	ALIGN_ldouble	off_ldouble()
X#define	ALIGN_ptr	off_ptr()
X
X#endif
X
XLOCAL	void	printmacs	__PR((void));
X
X#ifdef	CHECK_ALIGN
XLOCAL	void	sig		__PR((int));
X
XLOCAL void
Xsig(signo)
X	int	signo;
X{
X	signal(signo, sig);
X	longjmp(jb, 1);
X}
X#endif
X
X#if defined(mc68000) || defined(mc68020)
X#define	MIN_ALIGN	2
X#else
X#define	MIN_ALIGN	2
X#endif
X
X
X#define	min_align(i)	(((i) < MIN_ALIGN) ? MIN_ALIGN : (i))
X
X/*
X * Make it LOCAL MacOS-X by default links against libcurses and
X * so we totherwise have a double defined "al".
X */
XLOCAL	char	al[] = "alignment value for ";
XLOCAL	char	ms[] = "alignment mask  for ";
XLOCAL	char	so[] = "sizeof ";
XLOCAL	char	sh[] = "short";
XLOCAL	char	in[] = "int";
XLOCAL	char	lo[] = "long";
XLOCAL	char	ll[] = "long long";
XLOCAL	char	fl[] = "float";
XLOCAL	char	db[] = "double";
XLOCAL	char	ld[] = "long double";
XLOCAL	char	pt[] = "pointer";
XLOCAL	char	mt[] = "max type";
X
X#define	xalign(x, a, m)		(((char *)(x)) + ((a) - (((UIntptr_t)(x))&(m))))
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	char	*p;
X	int	i;
X	int	s;
X	int	amax = 0;
X	int	smax = 0;
X
X#ifdef	CHECK_ALIGN
X#ifdef	SIGBUS
X	signal(SIGBUS, sig);
X#endif
X#endif
X
X	i = ((size_t)buf) % 1024;
X	i = 1024 - i;
X	p = &buf[i];
X	buf_aligned = p;
X
X#ifdef	DEBUG
X	fprintf(stderr, "buf: 0x%lX 0x%lX\n",
X		(unsigned long)buf, (unsigned long)xalign(buf, 1024, 1023));
X#endif
X
X	printf("/*\n");
X	printf(" * This file has been generated automatically\n");
X	printf(" * by %s\n", sccsid);
X	printf(" * do not edit by hand.\n");
X	printf(" */\n");
X	printf("#ifndef	__ALIGN_H\n");
X	printf("#define	__ALIGN_H\n\n");
X
X	s = sizeof (short);
X	i  = ALIGN_short;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_SHORT	%d\t/* %s(%s *)\t*/\n", i, al, sh);
X	printf("#define	ALIGN_SMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, sh);
X	printf("#define	SIZE_SHORT	%d\t/* %s(%s)\t\t\t*/\n", s, so, sh);
X
X	s = sizeof (int);
X	i  = ALIGN_int;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_INT	%d\t/* %s(%s *)\t\t*/\n", i, al, in);
X	printf("#define	ALIGN_IMASK	%d\t/* %s(%s *)\t\t*/\n", i-1, ms, in);
X	printf("#define	SIZE_INT	%d\t/* %s(%s)\t\t\t\t*/\n", s, so, in);
X
X	s = sizeof (long);
X	i  = ALIGN_long;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_LONG	%d\t/* %s(%s *)\t\t*/\n", i, al, lo);
X	printf("#define	ALIGN_LMASK	%d\t/* %s(%s *)\t\t*/\n", i-1, ms, lo);
X	printf("#define	SIZE_LONG	%d\t/* %s(%s)\t\t\t*/\n", s, so, lo);
X
X#ifdef	HAVE_LONGLONG
X	s = sizeof (Llong);
X	i  = ALIGN_longlong;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X#endif
X	printf("\n");
X	printf("#define	ALIGN_LLONG	%d\t/* %s(%s *)\t*/\n", i, al, ll);
X	printf("#define	ALIGN_LLMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, ll);
X	printf("#define	SIZE_LLONG	%d\t/* %s(%s)\t\t\t*/\n", s, so, ll);
X
X	s = sizeof (float);
X	i  = ALIGN_float;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_FLOAT	%d\t/* %s(%s *)\t*/\n", i, al, fl);
X	printf("#define	ALIGN_FMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, fl);
X	printf("#define	SIZE_FLOAT	%d\t/* %s(%s)\t\t\t*/\n", s, so, fl);
X
X	s = sizeof (double);
X	i  = ALIGN_double;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_DOUBLE	%d\t/* %s(%s *)\t*/\n", i, al, db);
X	printf("#define	ALIGN_DMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, db);
X	printf("#define	SIZE_DOUBLE	%d\t/* %s(%s)\t\t\t*/\n", s, so, db);
X
X#ifdef	HAVE_LONGDOUBLE
X	s = sizeof (long double);
X	i  = ALIGN_ldouble;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X#endif
X	printf("\n");
X	printf("#define	ALIGN_LDOUBLE	%d\t/* %s(%s *)\t*/\n", i, al, ld);
X	printf("#define	ALIGN_LDMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, ld);
X	printf("#define	SIZE_LDOUBLE	%d\t/* %s(%s)\t\t\t*/\n", s, so, ld);
X
X	s = sizeof (char *);
X	i  = ALIGN_ptr;
X	i = min_align(i);
X	if (i > amax)
X		amax = i;
X	if (s > smax)
X		smax = s;
X	printf("\n");
X	printf("#define	ALIGN_PTR	%d\t/* %s(%s *)\t*/\n", i, al, pt);
X	printf("#define	ALIGN_PMASK	%d\t/* %s(%s *)\t*/\n", i-1, ms, pt);
X	printf("#define	SIZE_PTR	%d\t/* %s(%s)\t\t\t*/\n", s, so, pt);
X
X	printf("\n");
X	printf("#define	ALIGN_TMAX	%d\t/* %s(%s *)\t*/\n", amax, al, mt);
X	printf("#define	ALIGN_TMMASK	%d\t/* %s(%s *)\t*/\n", amax-1, ms, mt);
X	printf("#define	SIZE_TMAX	%d\t/* %s(%s)\t\t\t*/\n", smax, so, mt);
X
X	printmacs();
X	printf("\n#endif	/* __ALIGN_H */\n");
X	fflush(stdout);
X	return (0);
X}
X
XLOCAL void
Xprintmacs()
X{
Xprintf("\n\n");
Xprintf("/*\n * There used to be a cast to an int but we get a warning from GCC.\n");
Xprintf(" * This warning message from GCC is wrong.\n");
Xprintf(" * Believe me that this macro would even be usable if I would cast to short.\n");
Xprintf(" * In order to avoid this warning, we are now using UIntptr_t\n */\n");
X/*printf("\n");*/
X/*printf("\n");*/
Xprintf("#define	xaligned(a, s)		((((UIntptr_t)(a)) & (s)) == 0)\n");
Xprintf("#define	x2aligned(a, b, s)	(((((UIntptr_t)(a)) | ((UIntptr_t)(b))) & (s)) == 0)\n");
Xprintf("\n");
Xprintf("#define	saligned(a)		xaligned(a, ALIGN_SMASK)\n");
Xprintf("#define	s2aligned(a, b)		x2aligned(a, b, ALIGN_SMASK)\n");
Xprintf("\n");
Xprintf("#define	ialigned(a)		xaligned(a, ALIGN_IMASK)\n");
Xprintf("#define	i2aligned(a, b)		x2aligned(a, b, ALIGN_IMASK)\n");
Xprintf("\n");
Xprintf("#define	laligned(a)		xaligned(a, ALIGN_LMASK)\n");
Xprintf("#define	l2aligned(a, b)		x2aligned(a, b, ALIGN_LMASK)\n");
Xprintf("\n");
Xprintf("#define	llaligned(a)		xaligned(a, ALIGN_LLMASK)\n");
Xprintf("#define	ll2aligned(a, b)	x2aligned(a, b, ALIGN_LLMASK)\n");
Xprintf("\n");
Xprintf("#define	faligned(a)		xaligned(a, ALIGN_FMASK)\n");
Xprintf("#define	f2aligned(a, b)		x2aligned(a, b, ALIGN_FMASK)\n");
Xprintf("\n");
Xprintf("#define	daligned(a)		xaligned(a, ALIGN_DMASK)\n");
Xprintf("#define	d2aligned(a, b)		x2aligned(a, b, ALIGN_DMASK)\n");
Xprintf("\n");
Xprintf("#define	ldaligned(a)		xaligned(a, ALIGN_LDMASK)\n");
Xprintf("#define	ld2aligned(a, b)	x2aligned(a, b, ALIGN_LDMASK)\n");
Xprintf("\n");
Xprintf("#define	paligned(a)		xaligned(a, ALIGN_PMASK)\n");
Xprintf("#define	p2aligned(a, b)		x2aligned(a, b, ALIGN_PMASK)\n");
Xprintf("\n");
Xprintf("#define	maligned(a)		xaligned(a, ALIGN_TMMASK)\n");
Xprintf("#define	m2aligned(a, b)		x2aligned(a, b, ALIGN_TMMASK)\n");
X
Xprintf("\n\n");
Xprintf("/*\n * There used to be a cast to an int but we get a warning from GCC.\n");
Xprintf(" * This warning message from GCC is wrong.\n");
Xprintf(" * Believe me that this macro would even be usable if I would cast to short.\n");
Xprintf(" * In order to avoid this warning, we are now using UIntptr_t\n */\n");
Xprintf("#define	xalign(x, a, m)		(((char *)(x)) + ((a) - 1 - ((((UIntptr_t)(x))-1)&(m))))\n");
Xprintf("\n");
Xprintf("#define	salign(x)		xalign((x), ALIGN_SHORT, ALIGN_SMASK)\n");
Xprintf("#define	ialign(x)		xalign((x), ALIGN_INT, ALIGN_IMASK)\n");
Xprintf("#define	lalign(x)		xalign((x), ALIGN_LONG, ALIGN_LMASK)\n");
Xprintf("#define	llalign(x)		xalign((x), ALIGN_LLONG, ALIGN_LLMASK)\n");
Xprintf("#define	falign(x)		xalign((x), ALIGN_FLOAT, ALIGN_FMASK)\n");
Xprintf("#define	dalign(x)		xalign((x), ALIGN_DOUBLE, ALIGN_DMASK)\n");
Xprintf("#define	ldalign(x)		xalign((x), ALIGN_LDOUBLE, ALIGN_LDMASK)\n");
Xprintf("#define	palign(x)		xalign((x), ALIGN_PTR, ALIGN_PMASK)\n");
Xprintf("#define	malign(x)		xalign((x), ALIGN_TMAX, ALIGN_TMMASK)\n");
X}
X
X#ifdef	CHECK_ALIGN
X/*
X * Routines to compute the alignement by checking if the assignement
X * causes a bus error.
X * Some systems (e.g. Linux on DEC Aplha) will allow to fetch any
X * type from any address. On these systems we must check the speed
X * because unaligned fetches will take more time.
X */
XLOCAL int
Xcheck_align(cfunc, sfunc, tsize)
X	int	(*cfunc)();
X	void	(*sfunc)();
X	int	tsize;
X{
X		int	calign;
X		int	align;
X		int	tcheck;
X		int	t;
X	register int	i;
X	register char	*p = buf_aligned;
X
X	for (i = 1; i < 128; i++) {
X		if (!setjmp(jb)) {
X			(cfunc)(p, i);
X			break;
X		}
X	}
X#ifdef	DEBUG
X	fprintf(stderr, "i: %d tsize: %d\n", i, tsize);
X#endif
X	if (i == tsize)
X		return (i);
X
X	align = calign = i;
X	tcheck = speed_check(p, sfunc, i);
X#ifdef	DEBUG
X	fprintf(stderr, "tcheck: %d\n", tcheck);
X#endif
X
X	for (i = calign*2; i <= tsize; i *= 2) {
X		t = speed_check(p, sfunc, i);
X#ifdef	DEBUG
X		fprintf(stderr, "tcheck: %d t: %d i: %d\n", tcheck, t, i);
X		fprintf(stderr, "tcheck - t: %d ... * 3: %d\n",  (tcheck - t), (tcheck - t) * 3);
X#endif
X		if (((tcheck - t) > 0) && ((tcheck - t) * 3) > tcheck) {
X#ifdef	DEBUG
X			fprintf(stderr, "kleiner\n");
X#endif
X			align = i;
X			tcheck = t;
X		}
X	}
X	return (align);
X}
X
XLOCAL int
Xcheck_short(p, i)
X	char	*p;
X	int	i;
X{
X	short	*sp;
X
X	sp = (short *)&p[i];
X	*sp = 1;
X	return (0);
X}
X
XLOCAL int
Xcheck_int(p, i)
X	char	*p;
X	int	i;
X{
X	int	*ip;
X
X	ip = (int *)&p[i];
X	*ip = 1;
X	return (0);
X}
X
XLOCAL int
Xcheck_long(p, i)
X	char	*p;
X	int	i;
X{
X	long	*lp;
X
X	lp = (long *)&p[i];
X	*lp = 1;
X	return (0);
X}
X
X#ifdef	HAVE_LONGLONG
XLOCAL int
Xcheck_longlong(p, i)
X	char	*p;
X	int	i;
X{
X	Llong	*llp;
X
X	llp = (Llong *)&p[i];
X	*llp = 1;
X	return (0);
X}
X#endif
X
XLOCAL int
Xcheck_float(p, i)
X	char	*p;
X	int	i;
X{
X	float	*fp;
X
X	fp = (float *)&p[i];
X	*fp = 1.0;
X	return (0);
X}
X
XLOCAL int
Xcheck_double(p, i)
X	char	*p;
X	int	i;
X{
X	double	*dp;
X
X	dp = (double *)&p[i];
X	*dp = 1.0;
X	return (0);
X}
X
X#ifdef	HAVE_LONGDOUBLE
XLOCAL int
Xcheck_ldouble(p, i)
X	char	*p;
X	int	i;
X{
X	long double	*dp;
X
X	dp = (long double *)&p[i];
X	*dp = 1.0;
X	return (0);
X}
X#endif
X
XLOCAL int
Xcheck_ptr(p, i)
X	char	*p;
X	int	i;
X{
X	char	**pp;
X
X	pp = (char  **)&p[i];
X	*pp = (char *)1;
X	return (0);
X}
X
X/*
X * Routines to compute the alignement by checking the speed of the
X * assignement.
X * Some systems (e.g. Linux on DEC Aplha) will allow to fetch any
X * type from any address. On these systems we must check the speed
X * because unaligned fetches will take more time.
X */
XLOCAL void
Xspeed_short(p, n)
X	char	*p;
X	int	n;
X{
X	short	*sp;
X	int	i;
X
X	sp = (short *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*sp = i;
X}
X
XLOCAL void
Xspeed_int(p, n)
X	char	*p;
X	int	n;
X{
X	int	*ip;
X	int	i;
X
X	ip = (int *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*ip = i;
X}
X
XLOCAL void
Xspeed_long(p, n)
X	char	*p;
X	int	n;
X{
X	long	*lp;
X	int	i;
X
X	lp = (long *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*lp = i;
X}
X
X#ifdef	HAVE_LONGLONG
XLOCAL void
Xspeed_longlong(p, n)
X	char	*p;
X	int	n;
X{
X	Llong *llp;
X	int	i;
X
X	llp = (Llong *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*llp = i;
X}
X#endif
X
XLOCAL void
Xspeed_float(p, n)
X	char	*p;
X	int	n;
X{
X	float	*fp;
X	int	i;
X
X	fp = (float *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*fp = i;
X}
X
XLOCAL void
Xspeed_double(p, n)
X	char	*p;
X	int	n;
X{
X	double	*dp;
X	int	i;
X
X	dp = (double *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*dp = i;
X}
X
X#ifdef	HAVE_LONGDOUBLE
XLOCAL void
Xspeed_ldouble(p, n)
X	char	*p;
X	int	n;
X{
X	long double	*dp;
X	int	i;
X
X	dp = (long double *)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*dp = i;
X}
X#endif
X
XLOCAL void
Xspeed_ptr(p, n)
X	char	*p;
X	int	n;
X{
X	char	**pp;
X	int	i;
X
X	pp = (char **)&p[n];
X
X	for (i = 1000000; --i >= 0; )
X		*pp = (char *)i;
X}
X
X#include <schily/time.h>
X#include <schily/times.h>
XLOCAL int
Xspeed_check(p, sfunc, n)
X	char	*p;
X	void	(*sfunc)();
X	int	n;
X{
X	struct tms tm1;
X	struct tms tm2;
X
X	times(&tm1);
X	(*sfunc)(p, n);
X	times(&tm2);
X
X#ifdef	DEBUG
X	fprintf(stderr, "t1: %ld\n", (long)tm2.tms_utime-tm1.tms_utime);
X#endif
X
X	return ((int)tm2.tms_utime-tm1.tms_utime);
X}
X
X#endif	/* CHECK_ALIGN */
X
X#ifdef	OFF_ALIGN
X/*
X * Routines to compute the alignement by using the knowledge
X * of the C-compiler.
X * We define a structure and check the padding that has been inserted
X * by the compiler to keep the apropriate type on a properly aligned
X * address.
X */
XLOCAL int
Xoff_short()
X{
X	struct ss {
X		char	c;
X		short	s;
X	} ss;
X	ss.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct ss *, s));
X}
X
XLOCAL int
Xoff_int()
X{
X	struct si {
X		char	c;
X		int	i;
X	} si;
X	si.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct si *, i));
X}
X
XLOCAL int
Xoff_long()
X{
X	struct sl {
X		char	c;
X		long	l;
X	} sl;
X	sl.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sl *, l));
X}
X
X#ifdef	HAVE_LONGLONG
XLOCAL int
Xoff_longlong()
X{
X	struct sll {
X		char	c;
X		Llong	ll;
X	} sll;
X	sll.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sll *, ll));
X}
X#endif
X
XLOCAL int
Xoff_float()
X{
X	struct sf {
X		char	c;
X		float	f;
X	} sf;
X	sf.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sf *, f));
X}
X
XLOCAL int
Xoff_double()
X{
X	struct sd {
X		char	c;
X		double	d;
X	} sd;
X	sd.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sd *, d));
X}
X
X#ifdef	HAVE_LONGDOUBLE
XLOCAL int
Xoff_ldouble()
X{
X	struct sd {
X		char		c;
X		long double	ld;
X	} sd;
X	sd.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sd *, ld));
X}
X#endif
X
XLOCAL int
Xoff_ptr()
X{
X	struct sp {
X		char	c;
X		char	*p;
X	} sp;
X	sp.c = 0;		/* fool C-compiler */
X
X	return (sm_off(struct sp *, p));
X}
X
X#endif	/* OFF_ALIGN */
END-of-star-1.5.2/inc/align_test.c
echo x - star-1.5.2/inc/align_test.mk
sed 's/^X//' >star-1.5.2/inc/align_test.mk << 'END-of-star-1.5.2/inc/align_test.mk'
X#ident @(#)align_test.mk	1.2 06/10/31 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		align.h
XTARGETC=	align_test
XCPPOPTS +=	-D__OPRINTF__
XCFILES=		align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-star-1.5.2/inc/align_test.mk
echo x - star-1.5.2/inc/avoffset.c
sed 's/^X//' >star-1.5.2/inc/avoffset.c << 'END-of-star-1.5.2/inc/avoffset.c'
X/* @(#)avoffset.c	1.33 11/11/28 Copyright 1987, 1995-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)avoffset.c	1.33 11/11/28 Copyright 1987, 1995-2011 J. Schilling";
X#endif
X/*
X * This program is a tool to generate the file "avoffset.h".
X * It is used by functions that trace the stack to get to the top of the stack.
X *
X * It generates two defines:
X *	AV_OFFSET	- offset of argv relative to the main() frame pointer
X *	FP_INDIR	- number of stack frames above main()
X *			  before encountering a NULL pointer.
X *
X *	Copyright (c) 1987, 1995-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X#include <schily/stdlib.h>
X#include <schily/signal.h>
X
X#ifdef	HAVE_SCANSTACK
X#	include <schily/stkframe.h>
X#endif
X
XLOCAL	RETSIGTYPE	handler 	__PR((int signo));
XEXPORT	int		main		__PR((int ac, char **av));
XLOCAL	int		stack_direction	__PR((long *lp));
X
XLOCAL	RETSIGTYPE
Xhandler(signo)
X	int	signo;
X{
X	fprintf(stderr, "Warning: Cannot scan stack on this environment.\n");
X
X	printf("\n#endif	/* __AVOFFSET_H */\n");
X	fflush(stdout);
X	exit(0);
X}
X
X
Xint
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	int		stdir;
X#ifdef	HAVE_SCANSTACK
X	register struct frame *fp;
X	register int	i = 0;
X	register int	o = 0;
X
X	/*
X	 * As the SCO OpenServer C-Compiler has a bug that may cause
X	 * the first function call to getfp() been done before the
X	 * new stack frame is created, we call getfp() twice.
X	 */
X	(void) getfp();
X	fp = (struct frame *)getfp();
X#endif
X
X#ifdef	SIGBUS
X	signal(SIGBUS, handler);
X#endif
X	signal(SIGSEGV, handler);
X#ifdef	SIGILL
X	signal(SIGILL, handler);	/* For gcc -m64/sparc on FreeBSD */
X#endif
X
X	printf("/*\n");
X	printf(" * This file has been generated automatically\n");
X	printf(" * by %s\n", sccsid);
X	printf(" * do not edit by hand.\n");
X	printf(" *\n");
X	printf(" * This file includes definitions for AV_OFFSET and FP_INDIR.\n");
X	printf(" * FP_INDIR is the number of fp chain elements above 'main'.\n");
X	printf(" * AV_OFFSET is the offset of &av[0] relative to the frame pointer in 'main'.\n");
X	printf(" *\n");
X	printf(" * If getav0() does not work on a specific architecture\n");
X	printf(" * the program which generated this include file may dump core.\n");
X	printf(" * In this case, the generated include file does not include\n");
X	printf(" * definitions for AV_OFFSET and FP_INDIR but ends after this comment.\n");
X	printf(" * If AV_OFFSET or FP_INDIR are missing in this file, all programs\n");
X	printf(" * which use the definitions are automatically disabled.\n");
X	printf(" */\n");
X	printf("#ifndef	__AVOFFSET_H\n");
X	printf("#define	__AVOFFSET_H\n\n");
X
X	stdir = stack_direction(0);
X	printf("#define	STACK_DIRECTION	%d\n", stdir);
X	fflush(stdout);
X
X#ifdef	HAVE_SCANSTACK
X	/*
X	 * Note: Scanning the stack to look for argc/argv
X	 *	 works only in the main thread.
X	 *
X	 * llvm-gcc-4.2 has a bug and creates an endless loop if we call:
X	 *	while (fp->fr_savfp) {
X	 * We now try to limit this to 1000 loops in hope that the bug
X	 * does not affect the new code extended as well.
X	 */
X	while (i <= 1000 && fp->fr_savfp) {
X		if (fp->fr_savpc == 0)
X			break;
X
X		fp = (struct frame *)fp->fr_savfp;
X
X		i++;
X	}
X	/*
X	 * Do not add any printf()'s before this line to allow avoffset
X	 * to abort without printing more than the comment above.
X	 */
X	fp = (struct frame *)getfp();
X	o = ((char *)av) - ((char *)fp);
X	if ((o % sizeof (char *)) != 0) {
X		fprintf(stderr, "AV_OFFSET value (%d) not a multiple of pointer size.\n", o);
X		fprintf(stderr, "Disabling scanning the stack.\n");
X
X		printf("\n#endif	/* __AVOFFSET_H */\n");
X		exit(0);
X	}
X	if (o < -1000 || o > 1000) {
X		fprintf(stderr, "AV_OFFSET value (%d) does not look reasonable.\n", o);
X		fprintf(stderr, "Disabling scanning the stack.\n");
X
X		printf("\n#endif	/* __AVOFFSET_H */\n");
X		exit(0);
X	}
X	if (i > 1000) {
X		fprintf(stderr, "FP_INDIR value (%d) does not look reasonable.\n", i);
X		fprintf(stderr, "Disabling scanning the stack.\n");
X
X		printf("\n#endif	/* __AVOFFSET_H */\n");
X		exit(0);
X	}
X	printf("#define	AV_OFFSET	%d\n", o);
X	printf("#define	FP_INDIR	%d\n", i);
X#endif
X	printf("\n#endif	/* __AVOFFSET_H */\n");
X	fflush(stdout);
X	exit(0);
X	return (0);	/* keep lint happy */
X}
X
XLOCAL int
Xstack_direction(lp)
X	long	*lp;
X{
X	auto long	*dummy[4];
X	int		i;
X
X	for (i = 0; i < 4; i++)
X		dummy[i] = lp;
X
X	if (lp == 0) {
X		return (stack_direction((long *)dummy));
X	} else {
X		if ((long *)dummy == lp)
X			return (0);
X		return (((long *)dummy > lp) ? 1 : -1);
X	}
X}
X
X#ifdef	HAVE_SCANSTACK
X#define	IS_AVOFFSET
X#include "getfp.c"
X#endif
END-of-star-1.5.2/inc/avoffset.c
echo x - star-1.5.2/inc/avoffset.mk
sed 's/^X//' >star-1.5.2/inc/avoffset.mk << 'END-of-star-1.5.2/inc/avoffset.mk'
X#ident @(#)avoffset.mk	1.2 06/10/31 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include/schily/$(OARCH)
XTARGET=		avoffset.h
XTARGETC=	avoffset
XCPPOPTS +=	-DUSE_SCANSTACK
XCPPOPTS +=	-D__OPRINTF__
XCFILES=		avoffset.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-star-1.5.2/inc/avoffset.mk
echo x - star-1.5.2/inc/getfp.c
sed 's/^X//' >star-1.5.2/inc/getfp.c << 'END-of-star-1.5.2/inc/getfp.c'
X/* @(#)getfp.c	1.18 08/06/14 Copyright 1988-2008 J. Schilling */
X/*
X *	Get frame pointer
X *
X *	Copyright (c) 1988-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X#include <schily/standard.h>
X#include <schily/schily.h>
X
X#ifndef	IS_AVOFFSET
X/*
X * We usually don't like to compile a getfp() that returns junk data in case
X * we cannot scan the stack.
X * The only way to find this out is by including avoffset.h. Unfortunately, we
X * need to be able to use getfp() from avoffset.c in order to check if the
X * return value is usable or junk. To be able to do this, we include getfp.c
X * from avoffset.c and define IS_AVOFFSET before.
X */
X#include <schily/avoffset.h>
X
X#if	!defined(AV_OFFSET) || !defined(FP_INDIR)
X#	ifdef	HAVE_SCANSTACK
X#	undef	HAVE_SCANSTACK
X#	endif
X#endif
X#endif
X
X#ifdef	HAVE_SCANSTACK
X#include <schily/stkframe.h>
X
X#define	MAXWINDOWS	32
X#define	NWINDOWS	7
X
X#if defined(sparc) && defined(__GNUC__)
X#	define	FP_OFF		0x10	/* some strange things on sparc gcc */
X#else
X#	define	FP_OFF		0
X#endif
X
XEXPORT	void	**___fpoff	__PR((char *cp));
X
XEXPORT void **
Xgetfp()
X{
X		long	**dummy[1];
X
X#ifdef	sparc
X	flush_reg_windows(MAXWINDOWS-2);
X#endif
X	return ((void **)((struct frame *)___fpoff((char *)&dummy[0]))->fr_savfp);
X}
X
X/*
X * Don't make it static to avoid inline optimization.
X *
X * We need this function to fool GCCs check for returning addresses
X * from outside the functions local address space.
X */
XEXPORT void **
X___fpoff(cp)
X	char	*cp;
X{
X	long ***lp;
X
X	lp = (long ***)(cp + FP_OFF);
X	lp++;
X	return ((void **)lp);
X}
X
X#ifdef	sparc
XEXPORT int
Xflush_reg_windows(n)
X	int	n;
X{
X	if (--n > 0)
X		flush_reg_windows(n);
X	return (0);
X}
X#endif
X
X#else	/* HAVE_SCANSTACK */
X
XEXPORT void **
Xgetfp()
X{
X	raisecond("getfp", 0);
X	return ((void **)0);
X}
X
X#endif	/* HAVE_SCANSTACK */
END-of-star-1.5.2/inc/getfp.c
echo x - star-1.5.2/inc/README
sed 's/^X//' >star-1.5.2/inc/README << 'END-of-star-1.5.2/inc/README'
XThe programs 'smake and 'star' are of strategic importance for portability.
X
XAt least for these programs, getfp.c should be a copy rather than a link.
X
XOnce you have star running on a system with no symlinks, you may use star
Xto create copies rather than links.
END-of-star-1.5.2/inc/README
echo c - star-1.5.2/rmt
mkdir -p star-1.5.2/rmt > /dev/null 2>&1
echo x - star-1.5.2/rmt/Makefile
sed 's/^X//' >star-1.5.2/rmt/Makefile << 'END-of-star-1.5.2/rmt/Makefile'
X#ident @(#)Makefile	1.5 11/04/15 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		sbin
XTARGET=		rmt
XCPPOPTS +=	-DUSE_REMOTE
XCPPOPTS +=	-DUSE_LARGEFILES
XCFILES=		rmt.c
X#HFILES=
XLIBS=		-ldeflt -lschily $(LIB_SOCKET)
XXMK_FILE=	Makefile.man Makefile.dfl Makefile.doc
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/rmt/Makefile
echo x - star-1.5.2/rmt/rmt.c
sed 's/^X//' >star-1.5.2/rmt/rmt.c << 'END-of-star-1.5.2/rmt/rmt.c'
X/* @(#)rmt.c	1.37 09/08/04 Copyright 1994,2000-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)rmt.c	1.37 09/08/04 Copyright 1994,2000-2009 J. Schilling";
X#endif
X/*
X *	Remote tape server
X *	Supports both the old BSD format and the new abstract Sun format
X *	which is called RMT V1 protocol.
X *
X *	A client that likes to use the enhanced features of the RMT V1 protocol
X *	needs to send a "I-1\n0\n" request directly after opening the remote
X *	file using the 'O' rmt command.
X *	If the client requests the new protocol, MTIOCTOP ioctl opcodes
X *	in the range 0..7 are mapped to the BSD values to prevent problems
X *	from Linux opcode incompatibility.
X *
X *	The open modes support an abstract string notation found in rmt.c from
X *	GNU. This makes it possible to use more than O_RDONLY|O_WRONLY|O_RDWR
X *	with open(). MTIOCTOP tape ops could be enhanced the same way, but it
X *	seems that the current interface supports all what we need over the
X *	wire.
X *
X *	Copyright (c) 1994,2000-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X/*#define	FORCE_DEBUG*/
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>	/* includes sys/types.h */
X#include <schily/fcntl.h>
X#include <schily/stat.h>
X#include <schily/string.h>
X#include <schily/socket.h>
X#include <schily/param.h>	/* BSD-4.2 & Linux need this for MAXHOSTNAMELEN */
X#include <schily/ioctl.h>
X#include <schily/mtio.h>
X#include <schily/errno.h>
X#include <schily/pwd.h>
X
X#include <schily/utypes.h>
X#include <schily/standard.h>
X#include <schily/deflts.h>
X#include <schily/patmatch.h>
X#include <schily/schily.h>
X#include <schily/in.h>
X#include <schily/inet.h>	/* BeOS does not have <arpa/inet.h> */
X				/* but inet_ntaoa() is in <netdb.h> */
X#include <schily/netdb.h>
X
X#if (!defined(HAVE_NETDB_H) || !defined(HAVE_SYS_SOCKET_H))
X#undef	USE_REMOTE
X#endif
X
XEXPORT	int	main		__PR((int argc, char **argv));
X#ifdef	USE_REMOTE
XLOCAL	void	checkuser	__PR((void));
XLOCAL	char	*getpeer	__PR((void));
XLOCAL	BOOL	checkaccess	__PR((char *device));
XLOCAL	BOOL	strmatch	__PR((char *str, char *pat));
XLOCAL	void	dormt		__PR((void));
XLOCAL	void	opentape	__PR((void));
XLOCAL	int	rmtoflags	__PR((char *omode));
XLOCAL	void	closetape	__PR((void));
XLOCAL	void	readtape	__PR((void));
XLOCAL	void	writetape	__PR((void));
XLOCAL	void	ioctape		__PR((int cmd));
X#ifdef	HAVE_SYS_MTIO_H
XLOCAL	int	rmtmapold	__PR((int cmd));
XLOCAL	int	rmtmapnew	__PR((int cmd));
X#endif
XLOCAL	void	statustape	__PR((int cmd));
XLOCAL	void	seektape	__PR((void));
XLOCAL	void	doversion	__PR((void));
XLOCAL	int	fillrdbuf	__PR((void));
XLOCAL	void	tryfillrdbuf	__PR((void));
XLOCAL	int	readchar	__PR((char *cp));
XLOCAL	void	readbuf		__PR((char *buf, int n));
XLOCAL	int	readarg		__PR((char *buf, int n));
XLOCAL	char *	preparebuffer	__PR((int size));
XLOCAL	int	checktape	__PR((char *device));
XLOCAL	BOOL	has_dotdot	__PR((char *name));
XLOCAL	void	rmtrespond	__PR((long ret, int err));
XLOCAL	void	rmterror	__PR((char *str));
X
X#define	CMD_SIZE	80
X
XLOCAL	char	*username;
XLOCAL	char	*peername;
X
XLOCAL	int	tape_fd = -1;
X
XLOCAL	char	*debug_name;
XLOCAL	FILE	*debug_file;
XLOCAL	BOOL	found_dfltfile;
X
X#define	DEBUG(fmt)			if (debug_file) js_fprintf(debug_file, fmt)
X#define	DEBUG1(fmt, a)			if (debug_file) js_fprintf(debug_file, fmt, a)
X#define	DEBUG2(fmt, a1, a2)		if (debug_file) js_fprintf(debug_file, fmt, a1, a2)
X#define	DEBUG3(fmt, a1, a2, a3)		if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3)
X#define	DEBUG4(fmt, a1, a2, a3, a4)	if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4)
X#endif	/* USE_REMOTE */
X
XEXPORT int
Xmain(argc, argv)
X	int	argc;
X	char	**argv;
X{
X	save_args(argc, argv);
X#ifndef	USE_REMOTE
X	comerrno(EX_BAD, "No remote TAPE support on this platform.\n");
X#else
X	argc--, argv++;
X	if (argc > 0 && strcmp(*argv, "-c") == 0) {
X		/*
X		 * Skip params in case we have been installed/called as shell.
X		 */
X		argc--, argv++;
X		argc--, argv++;
X	}
X	/*
X	 * If we are running as root (uid 0), the existence of /etc/default/rmt
X	 * is required. If our uid is != 0 and there is no /etc/default/rmt
X	 * we will only allow to access files in /dev (see below).
X	 *
X	 * WARNING you are only allowed to change the defaults configuration
X	 * filename if you also change the documentation and add a statement
X	 * that makes clear where the official location of the file is, why you
X	 * did choose a nonstandard location and that the nonstandard location
X	 * only refers to inofficial rmt versions.
X	 *
X	 * I was forced to add this because some people change cdrecord without
X	 * rational reason and then publish the result. As those people
X	 * don't contribute work and don't give support, they are causing extra
X	 * work for me and this way slow down the development.
X	 */
X	if (defltopen("/etc/default/rmt") < 0) {
X		if (geteuid() == 0) {
X			rmterror("Remote configuration error: Cannot open /etc/default/rmt");
X			exit(EX_BAD);
X		}
X	} else {
X		found_dfltfile = TRUE;
X	}
X	debug_name = defltread("DEBUG=");	/* Get debug file name */
X#ifdef	FORCE_DEBUG
X	if (debug_name == NULL && argc <= 0)
X		debug_name = "/tmp/RMT";
X#endif
X#ifdef	NONONO
X	/*
X	 * Allowing to write arbitrary files may be a security risk.
X	 */
X	if (argc > 0)
X		debug_name = *argv;
X#endif
X
X	if (debug_name != NULL)
X		debug_file = fopen(debug_name, "w");
X
X	if (argc > 0) {
X		if (debug_file == 0) {
X			rmtrespond((long)-1, geterrno());
X			exit(EX_BAD);
X		}
X		(void) setbuf(debug_file, (char *)0);
X	}
X	checkuser();		/* Check if we are called by a bad guy	*/
X	peername = getpeer();	/* Get host name of caller		*/
X	dormt();
X#endif	/* USE_REMOTE */
X	return (0);
X}
X
X#ifdef	USE_REMOTE
XLOCAL void
Xcheckuser()
X{
X	uid_t	uid = getuid();
X	char	*uname;
X	struct passwd *pw;
X
X	pw = getpwuid(uid);
X	if (pw == NULL)
X		goto notfound;
X
X	username = pw->pw_name;
X
X	/*
X	 * If no /etc/default/rmt could be found allow general access.
X	 */
X	if (!found_dfltfile)
X		return;
X
X	defltfirst();
X	while ((uname = defltnext("USER=")) != NULL) {
X		if (strmatch(username, uname))
X			return;
X	}
Xnotfound:
X	rmterror("Illegal user id for RMT server");
X	exit(EX_BAD);
X}
X
X#ifndef	NI_MAXHOST
X#ifdef	MAXHOSTNAMELEN			/* XXX remove this and sys/param.h */
X#define	NI_MAXHOST	MAXHOSTNAMELEN
X#else
X#define	NI_MAXHOST	64
X#endif
X#endif
X
XLOCAL char *
Xgetpeer()
X{
X#ifdef	HAVE_GETNAMEINFO
X#ifdef	HAVE_SOCKADDR_STORAGE
X	struct sockaddr_storage sa;
X#else
X	char			sa[256];
X#endif
X#else
X	struct	sockaddr sa;
X	struct hostent	*he;
X#endif
X	struct	sockaddr *sap;
X	struct	sockaddr_in *s;
X	socklen_t	 sasize = sizeof (sa);
Xstatic	char		buffer[NI_MAXHOST];
X
X	sap = (struct  sockaddr *)&sa;
X	if (getpeername(STDIN_FILENO, sap, &sasize) < 0) {
X		int		errsav = geterrno();
X		struct stat	sb;
X
X		if (fstat(STDIN_FILENO, &sb) >= 0) {
X			if (S_ISFIFO(sb.st_mode)) {
X				DEBUG("rmt: stdin is a PIPE\n");
X				return ("PIPE");
X			}
X			DEBUG1("rmt: stdin st_mode %0llo\n", (Llong)sb.st_mode);
X		}
X
X		DEBUG1("rmt: peername %s\n", errmsgstr(errsav));
X		return ("ILLEGAL_SOCKET");
X	} else {
X		s = (struct sockaddr_in *)&sa;
X#ifdef	AF_INET6
X		if (s->sin_family != AF_INET && s->sin_family != AF_INET6) {
X#else
X		if (s->sin_family != AF_INET) {
X#endif
X#ifdef	AF_UNIX
X			/*
X			 * AF_UNIX is not defined on BeOS
X			 */
X			if (s->sin_family == AF_UNIX) {
X				DEBUG("rmt: stdin is a PIPE (UNIX domain socket)\n");
X				return ("PIPE");
X			}
X#endif
X			DEBUG1("rmt: stdin NOT_IP socket (sin_family: %d)\n",
X							s->sin_family);
X			return ("NOT_IP");
X		}
X
X#ifdef	HAVE_GETNAMEINFO
X		buffer[0] = '\0';
X		if (debug_file &&
X		    getnameinfo(sap, sasize, buffer, sizeof (buffer), NULL, 0,
X		    NI_NUMERICHOST) == 0) {
X			DEBUG1("rmt: peername %s\n", buffer);
X		}
X		buffer[0] = '\0';
X		if (getnameinfo(sap, sasize, buffer, sizeof (buffer), NULL, 0,
X		    0) == 0) {
X			DEBUG1("rmt: peername %s\n", buffer);
X			return (buffer);
X		}
X		return ("CANNOT_MAP_ADDRESS");
X#else	/* HAVE_GETNAMEINFO */
X#ifdef	HAVE_INET_NTOA
X		(void) js_snprintf(buffer, sizeof (buffer), "%s",
X						inet_ntoa(s->sin_addr));
X#else
X		(void) js_snprintf(buffer, sizeof (buffer), "%x",
X						s->sin_addr.s_addr);
X#endif
X		DEBUG1("rmt: peername %s\n", buffer);
X		he = gethostbyaddr((char *)&s->sin_addr.s_addr, 4, AF_INET);
X		DEBUG1("rmt: peername %s\n", he != NULL ? he->h_name:buffer);
X		if (he != NULL)
X			return (he->h_name);
X		return (buffer);
X#endif	/* HAVE_GETNAMEINFO */
X	}
X}
X
XLOCAL BOOL
Xcheckaccess(device)
X	char	*device;
X{
X	char	*target;
X	char	*user;
X	char	*host;
X	char	*fname;
X	char	*p;
X
X	if (peername == NULL)
X		return (FALSE);
X	defltfirst();
X	while ((target = defltnext("ACCESS=")) != NULL) {
X		p = target;
X		while (*p == '\t')
X			p++;
X		user = p;
X		if ((p = strchr(p, '\t')) != NULL)
X			*p++ = '\0';
X		else
X			continue;
X		if (!strmatch(username, user))
X			continue;
X
X		while (*p == '\t')
X			p++;
X		host = p;
X		if ((p = strchr(p, '\t')) != NULL)
X			*p++ = '\0';
X		else
X			continue;
X		if (!strmatch(peername, host))
X			continue;
X
X		fname = p;
X		if ((p = strchr(p, '\t')) != NULL)
X			*p++ = '\0';
X
X		DEBUG3("ACCESS %s %s %s\n", user, host, fname);
X
X		if (has_dotdot(device))		/* Do not allow ".." in name */
X			continue;
X		if (!strmatch(device, fname))
X			continue;
X		return (TRUE);
X	}
X	return (FALSE);
X}
X
XLOCAL BOOL
Xstrmatch(str, pat)
X	char	*str;
X	char	*pat;
X{
X	int	*aux;
X	int	*state;
X	int	alt;
X	int	plen;
X	char	*p;
X
X	plen = strlen(pat);
X	aux = malloc(plen*sizeof (int));
X	state = malloc((plen+1)*sizeof (int));
X	if (aux == NULL || state == NULL) {
X		if (aux) free(aux);
X		if (state) free(state);
X		return (FALSE);
X	}
X
X	if ((alt = patcompile((const unsigned char *)pat, plen, aux)) == 0) {
X		/* Bad pattern */
X		free(aux);
X		free(state);
X		return (FALSE);
X	}
X
X	p = (char *)patmatch((const unsigned char *)pat, aux,
X						(const unsigned char *)str, 0,
X						strlen(str), alt, state);
X	free(aux);
X	free(state);
X
X	if (p != NULL && *p == '\0')
X		return (TRUE);
X	return (FALSE);
X}
X
XLOCAL void
Xdormt()
X{
X	char	c;
X
X	while (readchar(&c) == 1) {
X		seterrno(0);
X
X		switch (c) {
X
X		case 'O':
X			opentape();
X			break;
X		case 'C':
X			closetape();
X			break;
X		case 'R':
X			readtape();
X			break;
X		case 'W':
X			writetape();
X			break;
X		case 'I':
X		case 'i':
X			ioctape(c);
X			break;
X		case 'S':
X		case 's':
X			statustape(c);
X			break;
X		case 'L':
X			seektape();
X			break;
X		/*
X		 * It would be nice to have something like 'V' for retrieving
X		 * Version information. But unfortunately newer BSD rmt version
X		 * implement this command in a way that is not useful at all.
X		 */
X		case 'v':
X			doversion();
X			break;
X		default:
X			DEBUG1("rmtd: garbage command %c\n", c);
X			rmterror("Garbage command");
X			exit(EX_BAD);
X		}
X	}
X	exit(0);
X}
X
XLOCAL void
Xopentape()
X{
X	char	device[4096];
X	char	omode[CMD_SIZE];
X	int	omodes;
X	int	n;
X
X	if (tape_fd >= 0)
X		(void) close(tape_fd);
X
X	n = readarg(device, sizeof (device));
X	if (n < 0 || n >= sizeof (device)) {	/* Try to recover */
X		readarg(omode, sizeof (omode));	/* honor protocol */
X		DEBUG2("rmtd: O %s %s\n", device, omode);
X#ifdef	ENAMETOOLONG
X		seterrno(ENAMETOOLONG);
X#else
X		seterrno(EINVAL);
X#endif
X		goto out;
X	}
X	readarg(omode, sizeof (omode));
X	omodes = rmtoflags(omode);
X	if (omodes == -1) {
X		/*
X		 * Mask off all bits that differ between operating systems.
X		 */
X		omodes = atoi(omode);
X		omodes &= (O_RDONLY|O_WRONLY|O_RDWR);
X	}
X#ifdef	O_TEXT
X	/*
X	 * Default to O_BINARY the client may not know that we need it.
X	 */
X	if ((omodes & O_TEXT) == 0)
X		omodes |= O_BINARY;
X#endif
X	DEBUG2("rmtd: O %s %s\n", device, omode);
X	if (!checktape(device)) {
X		tape_fd = -1;
X		seterrno(EACCES);
X	} else {
X		tape_fd = open(device, omodes, (mode_t)0666);
X	}
Xout:
X	rmtrespond((long)tape_fd, geterrno());
X}
X
XLOCAL struct oflags {
X	char	*fname;
X	int	fval;
X} oflags[] = {
X	{ "O_RDONLY",	O_RDONLY },
X	{ "O_RDWR",	O_RDWR },
X	{ "O_WRONLY",	O_WRONLY },
X#ifdef	O_TEXT
X	{ "O_TEXT",	O_TEXT },
X#endif
X#ifdef	O_NDELAY
X	{ "O_NDELAY",	O_NDELAY },
X#endif
X#ifdef	O_APPEND
X	{ "O_APPEND",	O_APPEND },
X#endif
X#ifdef	O_SYNC
X	{ "O_SYNC",	O_SYNC },
X#endif
X#ifdef	O_DSYNC
X	{ "O_DSYNC",	O_DSYNC },
X#endif
X#ifdef	O_RSYNC
X	{ "O_RSYNC",	O_RSYNC },
X#endif
X#ifdef	O_NONBLOCK
X	{ "O_NONBLOCK",	O_NONBLOCK },
X#endif
X#ifdef	O_PRIV
X	{ "O_PRIV",	O_PRIV },
X#endif
X#ifdef	O_LARGEFILE
X	{ "O_LARGEFILE",O_LARGEFILE },
X#endif
X#ifdef	O_CREAT
X	{ "O_CREAT",	O_CREAT },
X#endif
X#ifdef	O_TRUNC
X	{ "O_TRUNC",	O_TRUNC },
X#endif
X#ifdef	O_EXCL
X	{ "O_EXCL",	O_EXCL },
X#endif
X#ifdef	O_NOCTTY
X	{ "O_NOCTTY",	O_NOCTTY },
X#endif
X	{ NULL,		0 }
X};
X
XLOCAL int
Xrmtoflags(omode)
X	char	*omode;
X{
X	register char		*p = omode;
X	register struct oflags	*op;
X	register int		slen;
X	register int		nmodes = 0;
X
X	/*
X	 * First skip numeric open modes...
X	 */
X	while (*p != '\0' && *p == ' ')
X		p++;
X	if (*p != 'O') while (*p != '\0' && *p != ' ')
X		p++;
X	while (*p != '\0' && *p != 'O')
X		p++;
X	do {
X		if (p[0] != 'O' || p[1] != '_')
X			return (-1);
X
X		for (op = oflags; op->fname; op++) {
X			slen = strlen(op->fname);
X			if ((strncmp(op->fname, p, slen) == 0) &&
X			    (p[slen] == '|' || p[slen] == ' ' ||
X			    p[slen] == '\0')) {
X				nmodes |= op->fval;
X				break;
X			}
X		}
X		p = strchr(p, '|');
X	} while (p && *p++ == '|');
X
X	return (nmodes);
X}
X
XLOCAL void
Xclosetape()
X{
X	int	ret;
X	char	device[CMD_SIZE];
X
X	DEBUG("rmtd: C\n");
X	readarg(device, sizeof (device));
X	ret = close(tape_fd);
X	rmtrespond((long)ret, geterrno());
X	tape_fd = -1;
X}
X
XLOCAL void
Xreadtape()
X{
X	int	n;
X	long	ret;
X	char	*buf;
X	char	count[CMD_SIZE];
X
X	readarg(count, sizeof (count));
X	DEBUG1("rmtd: R %s\n", count);
X	n = atoi(count);		/* Only an int because of setsockopt */
X	buf = preparebuffer(n);
X	ret = _niread(tape_fd, buf, n);
X	rmtrespond(ret, geterrno());
X	if (ret >= 0) {
X		(void) _nixwrite(STDOUT_FILENO, buf, ret);
X	}
X}
X
XLOCAL void
Xwritetape()
X{
X	int	n;
X	long	ret;
X	char	*buf;
X	char	count[CMD_SIZE];
X
X	readarg(count, sizeof (count));
X	n = atoi(count);		/* Only an int because of setsockopt */
X	DEBUG1("rmtd: W %s\n", count);
X	buf = preparebuffer(n);
X	readbuf(buf, n);
X	ret = _niwrite(tape_fd, buf, n);
X	rmtrespond(ret, geterrno());
X}
X
X/*
X * Definitions for the new RMT Protocol version 1
X *
X * The new Protocol version tries to make the use
X * of rmtioctl() more portable between different platforms.
X */
X#define	RMTIVERSION	-1
X#define	RMT_VERSION	1
X
X/*
X * Support for commands beyond MTWEOF..MTNOP (0..7)
X */
X#define	RMTICACHE	0
X#define	RMTINOCACHE	1
X#define	RMTIRETEN	2
X#define	RMTIERASE	3
X#define	RMTIEOM		4
X#define	RMTINBSF	5
X
X#ifndef	HAVE_SYS_MTIO_H
XLOCAL void
Xioctape(cmd)
X	int	cmd;
X{
X	char	count[CMD_SIZE];
X	char	opcode[CMD_SIZE];
X
X	readarg(opcode, sizeof (opcode));
X	readarg(count, sizeof (count));
X	DEBUG3("rmtd: %c %s %s\n", cmd, opcode, count);
X	if (atoi(opcode) == RMTIVERSION) {
X		rmtrespond((long)RMT_VERSION, 0);
X	} else {
X		rmtrespond((long)-1, ENOTTY);
X	}
X}
X#else
X
XLOCAL void
Xioctape(cmd)
X	int	cmd;
X{
X	long	ret = 0;
X	int	i;
X	char	count[CMD_SIZE];
X	char	opcode[CMD_SIZE];
X	struct mtop mtop;
Xstatic	BOOL	version_seen = FALSE;
X
X	readarg(opcode, sizeof (opcode));
X	readarg(count, sizeof (count));
X	DEBUG3("rmtd: %c %s %s\n", cmd, opcode, count);
X	mtop.mt_op = atoi(opcode);
X	ret = atol(count);
X	mtop.mt_count = ret;
X	if (mtop.mt_count != ret) {
X		rmtrespond((long)-1, EINVAL);
X		return;
X	}
X
X	/*
X	 * Only Opcodes 0..7 are unique across different architectures.
X	 * But as in many cases Linux does not even follow this rule.
X	 * If we know that we have been called by a VERSION 1 client,
X	 * we may safely assume that the client is not using Linux mapping
X	 * but the standard mapping.
X	 */
X	ret = 0;
X	if (cmd == 'I' && version_seen && (mtop.mt_op != RMTIVERSION)) {
X		i = rmtmapold(mtop.mt_op);
X		if (i < 0) {
X			/*
X			 * Should we rather give it a chance instead
X			 * of aborting the command?
X			 */
X			rmtrespond((long)-1, EINVAL);
X			return;
X		}
X		mtop.mt_op = i;
X	}
X	if (cmd == 'i') {
X		i = rmtmapnew(mtop.mt_op);
X		if (i < 0) {
X			ret = -1;
X			seterrno(EINVAL);
X		} else {
X			mtop.mt_op = i;
X		}
X	}
X	DEBUG4("rmtd: %c %d %ld ret: %ld (mapped)\n", cmd, mtop.mt_op,
X						(long)mtop.mt_count, ret);
X	if (ret == 0) {
X		if (mtop.mt_op == RMTIVERSION) {
X			/*
X			 * Client must retrieve RMTIVERSION directly after
X			 * opening the drive using the 'O' rmt command.
X			 */
X			ret = mtop.mt_count = RMT_VERSION;
X			version_seen = TRUE;
X		} else {
X			ret = ioctl(tape_fd, MTIOCTOP, (char *)&mtop);
X		}
X	}
X	if (ret < 0) {
X		rmtrespond(ret, geterrno());
X	} else {
X		ret = mtop.mt_count;
X		rmtrespond(ret, geterrno());
X	}
X}
X
X/*
X * Map all old /etc/rmt (over the wire) opcodes that should be in range 0..7
X * to numbers that are understood by the local driver.
X * This is needed because Linux does not follow the UNIX conventions.
X */
XLOCAL int
Xrmtmapold(cmd)
X	int	cmd;
X{
X	switch (cmd) {
X
X	case 0:
X#ifdef	MTWEOF
X		return (MTWEOF);
X#else
X		return (-1);
X#endif
X
X	case 1:
X#ifdef	MTFSF
X		return (MTFSF);
X#else
X		return (-1);
X#endif
X
X	case 2:
X#ifdef	MTBSF
X		return (MTBSF);
X#else
X		return (-1);
X#endif
X
X	case 3:
X#ifdef	MTFSR
X		return (MTFSR);
X#else
X		return (-1);
X#endif
X
X	case 4:
X#ifdef	MTBSR
X		return (MTBSR);
X#else
X		return (-1);
X#endif
X
X	case 5:
X#ifdef	MTREW
X		return (MTREW);
X#else
X		return (-1);
X#endif
X
X	case 6:
X#ifdef	MTOFFL
X		return (MTOFFL);
X#else
X		return (-1);
X#endif
X
X	case 7:
X#ifdef	MTNOP
X		return (MTNOP);
X#else
X		return (-1);
X#endif
X
X	}
X	return (-1);
X}
X
X/*
X * Map all new /etc/rmt (over the wire) opcodes from 'i' command
X * to numbers that are understood by the local driver.
X */
XLOCAL int
Xrmtmapnew(cmd)
X	int	cmd;
X{
X	switch (cmd) {
X
X#ifdef	MTCACHE
X	case RMTICACHE:		return (MTCACHE);
X#endif
X#ifdef	MTNOCACHE
X	case RMTINOCACHE:	return (MTNOCACHE);
X#endif
X#ifdef	MTRETEN
X	case RMTIRETEN:		return (MTRETEN);
X#endif
X#ifdef	MTERASE
X	case RMTIERASE:		return (MTERASE);
X#endif
X#ifdef	MTEOM
X	case RMTIEOM:		return (MTEOM);
X#endif
X#ifdef	MTNBSF
X	case RMTINBSF:		return (MTNBSF);
X#endif
X	}
X	return (-1);
X}
X#endif
X
X/*
X * Old MTIOCGET copies a binary version of struct mtget back
X * over the wire. This is highly non portable.
X * MTS_* retrieves ascii versions (%d format) of a single
X * field in the struct mtget.
X * NOTE: MTS_ERREG may only be valid on the first call and
X *	 must be retrived first.
X */
X#define	MTS_TYPE	'T'		/* mtget.mt_type */
X#define	MTS_DSREG	'D'		/* mtget.mt_dsreg */
X#define	MTS_ERREG	'E'		/* mtget.mt_erreg */
X#define	MTS_RESID	'R'		/* mtget.mt_resid */
X#define	MTS_FILENO	'F'		/* mtget.mt_fileno */
X#define	MTS_BLKNO	'B'		/* mtget.mt_blkno */
X#define	MTS_FLAGS	'f'		/* mtget.mt_flags */
X#define	MTS_BF		'b'		/* mtget.mt_bf */
X
X#ifndef	HAVE_SYS_MTIO_H
XLOCAL void
Xstatustape(cmd)
X	int	cmd;
X{
X	char	subcmd;
X
X	if (cmd == 's') {
X		if (readchar(&subcmd) != 1)
X			return;
X		DEBUG2("rmtd: %c%c\n", cmd, subcmd);
X	} else {
X		DEBUG1("rmtd: %c\n", cmd);
X	}
X	rmtrespond((long)-1, ENOTTY);
X}
X#else
X
XLOCAL void
Xstatustape(cmd)
X	int	cmd;
X{
X	int	ret;
X	char	subcmd;
X	struct mtget mtget;
X
X	/*
X	 * Only the first three fields of the struct mtget (mt_type, mt_dsreg
X	 * and mt_erreg) are identical on all platforms. The original struct
X	 * mtget is 16 bytes. All client implementations except the one from
X	 * star will overwrite other data and probably die if the remote struct
X	 * mtget is bigger than the local one.
X	 * In addition, there are byte order problems.
X	 */
X	if (cmd == 's') {
X		if (readchar(&subcmd) != 1)
X			return;
X		DEBUG2("rmtd: %c%c\n", cmd, subcmd);
X	} else {
X		DEBUG1("rmtd: %c\n", cmd);
X	}
X	ret = ioctl(tape_fd, MTIOCGET, (char *)&mtget);
X	if (ret < 0) {
X		rmtrespond((long)ret, geterrno());
X	} else {
X		if (cmd == 's') switch (subcmd) {
X
X#ifdef	HAVE_MTGET_TYPE
X		case MTS_TYPE:
X			rmtrespond(mtget.mt_type, geterrno());	break;
X#endif
X#ifdef	HAVE_MTGET_DSREG
X		case MTS_DSREG:
X			rmtrespond(mtget.mt_dsreg, geterrno());	break;
X#endif
X#ifdef	HAVE_MTGET_ERREG
X		case MTS_ERREG:
X			rmtrespond(mtget.mt_erreg, geterrno());	break;
X#endif
X#ifdef	HAVE_MTGET_RESID
X		case MTS_RESID:
X			rmtrespond(mtget.mt_resid, geterrno());	break;
X#endif
X#ifdef	HAVE_MTGET_FILENO
X		case MTS_FILENO:
X			rmtrespond(mtget.mt_fileno, geterrno()); break;
X#endif
X#ifdef	HAVE_MTGET_BLKNO
X		case MTS_BLKNO:
X			rmtrespond(mtget.mt_blkno, geterrno());	break;
X#endif
X#ifdef	HAVE_MTGET_FLAGS
X		case MTS_FLAGS:
X			rmtrespond(mtget.mt_flags, geterrno());	break;
X#endif
X#ifdef	HAVE_MTGET_BF
X		case MTS_BF:
X			rmtrespond(mtget.mt_bf, geterrno());	break;
X#endif
X		default:
X			rmtrespond((long)-1, EINVAL);		break;
X		} else {
X			/*
X			 * Do not expect that this interface makes any sense.
X			 * With UNIX, you may at least trust the first two
X			 * struct members, but Linux is completely incompatible
X			 */
X			ret = sizeof (mtget);
X			rmtrespond((long)ret, geterrno());
X			(void) _nixwrite(STDOUT_FILENO, (char *)&mtget,
X							sizeof (mtget));
X		}
X	}
X}
X#endif
X
XLOCAL void
Xseektape()
X{
X	off_t	ret;
X	char	count[CMD_SIZE];
X	char	whence[CMD_SIZE];
X	Llong	offset = (Llong)0;
X	int	iwhence;
X
X	readarg(count, sizeof (count));
X	readarg(whence, sizeof (whence));
X	DEBUG2("rmtd: L %s %s\n", count, whence);
X	(void) astoll(count, &offset);
X	iwhence = atoi(whence);
X	switch (iwhence) {
X
X	case 0:	iwhence = SEEK_SET; break;
X	case 1:	iwhence = SEEK_CUR; break;
X	case 2:	iwhence = SEEK_END; break;
X#ifdef	SEEK_DATA
X	case 3:	iwhence = SEEK_DATA; break;
X#endif
X#ifdef	SEEK_HOLE
X	case 4:	iwhence = SEEK_HOLE; break;
X#endif
X
X	default:
X		DEBUG1("rmtd: Illegal lseek() whence %d\n", iwhence);
X		rmtrespond((long)-1, EINVAL);
X		return;
X	}
X	ret = (off_t)offset;
X	if (ret != offset) {
X		DEBUG1("rmtd: Illegal seek offset %lld\n", offset);
X		rmtrespond((long)-1, EINVAL);
X		return;
X	}
X	ret = lseek(tape_fd, (off_t)offset, iwhence);
X	if ((ret != (off_t)-1) && (sizeof (ret) > sizeof (long))) {
X		DEBUG1("rmtd: A %lld\n", (Llong)ret);
X		(void) js_snprintf(count, sizeof (count), "A%lld\n",
X								(Llong)ret);
X		(void) _nixwrite(STDOUT_FILENO, count, strlen(count));
X		return;
X	}
X	rmtrespond((long)ret, geterrno());
X}
X
XLOCAL void
Xdoversion()
X{
X	char	arg[CMD_SIZE];
X
X	readarg(arg, sizeof (arg));	/* We may like to add an arg later */
X	DEBUG1("rmtd: v %s\n", arg);
X	rmtrespond((long)RMT_VERSION, 0);
X}
X
X#define	READB_SIZE	128
XLOCAL	char		readb[READB_SIZE];
XLOCAL	char		*readbptr;
XLOCAL	int		readbcnt;
X
XLOCAL int
Xfillrdbuf()
X{
X	readbptr = readb;
X
X	return (readbcnt = _niread(STDIN_FILENO, readb, READB_SIZE));
X}
X
X/*
X * This function is used for error recovery, it thus may be slow.
X * We try to fill the read buffer in case there is something to read.
X * We will not block here, if the OS does not support O_NONBLOCK we
X * will just do nothing.
X */
XLOCAL void
Xtryfillrdbuf()
X{
X#if	defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK)
X	int	fl;
X
X	fl = fcntl(STDIN_FILENO, F_GETFL, 0);
X	fcntl(STDIN_FILENO, F_SETFL, fl|O_NONBLOCK);
X
X	fillrdbuf();
X
X	fcntl(STDIN_FILENO, F_SETFL, fl);
X#endif
X}
X
XLOCAL int
Xreadchar(cp)
X	char	*cp;
X{
X	if (--readbcnt < 0) {
X		if (fillrdbuf() <= 0)
X			return (readbcnt);
X		--readbcnt;
X	}
X	*cp = *readbptr++;
X	return (1);
X}
X
XLOCAL void
Xreadbuf(buf, n)
X	register char	*buf;
X	register int	n;
X{
X	register int	i = 0;
X	register int	amt;
X
X	if (readbcnt > 0) {
X		amt = readbcnt;
X		if (amt > n)
X			amt = n;
X		movebytes(readbptr, buf, amt);
X		readbptr += amt;
X		readbcnt -= amt;
X		i += amt;
X	}
X
X	for (; i < n; i += amt) {
X		amt = _niread(STDIN_FILENO, &buf[i], n - i);
X		if (amt <= 0) {
X			DEBUG("rmtd: premature eof\n");
X			rmterror("Premature eof");
X			exit(EX_BAD);
X		}
X	}
X}
X
XLOCAL int
Xreadarg(buf, n)
X	char	*buf;
X	int	n;
X{
X	int	i;
X	char	c;
X
X	for (i = 0; i < n; i++) {
X		if (readchar(&buf[i]) != 1)
X			exit(0);
X		if (buf[i] == '\n')
X			break;
X	}
X	if (buf[i] == '\n') {
X		buf[i] = '\0';
X		return (--i);		/* Do not include null byte */
X	}
X	buf[n-1] = '\0';
X
X	/*
X	 * The following code is for error recovery.
X	 * We come here if the client send us too long parameters.
X	 * We try to recover from the problem by reading a reasonable
X	 * amount of data in hope to find the newline which is the
X	 * argument terminator.
X	 */
X	if (readbcnt <= 0)
X		tryfillrdbuf();
X	for (i = 0; readbcnt > 0 && i < 10000; i++) {
X		if (readchar(&c) != 1)
X			exit(0);
X		if (c == '\n')
X			break;
X		if (readbcnt <= 0)
X			tryfillrdbuf();
X	}
X	return (n);
X}
X
XLOCAL char *
Xpreparebuffer(size)
X	int	size;
X{
Xstatic	char	*buffer		= 0;
Xstatic	int	buffersize	= 0;
X
X	if (buffer != 0 && size <= buffersize)
X		return (buffer);
X	if (buffer != 0)
X		free(buffer);
X	buffer = malloc(size);
X	if (buffer == 0) {
X		DEBUG("rmtd: cannot allocate buffer space\n");
X		rmterror("Cannot allocate buffer space");
X		exit(EX_BAD);
X	}
X	buffersize = size;
X
X#ifdef	SO_SNDBUF
X	while (size > 512 &&
X		setsockopt(STDOUT_FILENO, SOL_SOCKET, SO_SNDBUF,
X					(char *)&size, sizeof (size)) < 0)
X		size -= 512;
X	DEBUG1("rmtd: sndsize: %d\n", size);
X#endif
X#ifdef	SO_RCVBUF
X	while (size > 512 &&
X		setsockopt(STDIN_FILENO, SOL_SOCKET, SO_RCVBUF,
X					(char *)&size, sizeof (size)) < 0)
X		size -= 512;
X	DEBUG1("rmtd: rcvsize: %d\n", size);
X#endif
X	return (buffer);
X}
X
X/*
X * If we are not root and there is no /etc/default/rmt
X * we will only allow to access files in /dev.
X * We do this because we may assume that non-root access to files
X * in /dev is only granted if it does not open security holes.
X * Accessing files (e.g. /etc/passwd) is not possible.
X * Otherwise permissions depend on the content of /etc/default/rmt.
X */
XLOCAL int
Xchecktape(device)
X	char	*device;
X{
X	if (!found_dfltfile) {
X		if (has_dotdot(device))
X			return (0);
X		if (strncmp(device, "/dev/", 5) == 0)
X			return (1);
X		return (0);
X	}
X	return (checkaccess(device));
X}
X
XLOCAL BOOL
Xhas_dotdot(name)
X	char	*name;
X{
X	register char	*p = name;
X
X	while (*p) {
X		if ((p[0] == '.' && p[1] == '.') &&
X		    (p[2] == '/' || p[2] == '\0')) {
X			return (TRUE);
X		}
X		do {
X			if (*p++ == '\0')
X				return (FALSE);
X		} while (*p != '/');
X		p++;
X		while (*p == '/')	/* Skip multiple slashes */
X			p++;
X	}
X	return (FALSE);
X}
XLOCAL void
Xrmtrespond(ret, err)
X	long	ret;
X	int	err;
X{
X	char	rbuf[2*CMD_SIZE];
X
X	if (ret >= 0) {
X		DEBUG1("rmtd: A %ld\n", ret);
X		(void) js_snprintf(rbuf, sizeof (rbuf), "A%ld\n", ret);
X	} else {
X		DEBUG2("rmtd: E %d (%s)\n", err, errmsgstr(err));
X		(void) js_snprintf(rbuf, sizeof (rbuf), "E%d\n%s\n", err,
X							errmsgstr(err));
X	}
X	(void) _nixwrite(STDOUT_FILENO, rbuf, strlen(rbuf));
X}
X
XLOCAL void
Xrmterror(str)
X	char	*str;
X{
X	char	rbuf[2*CMD_SIZE];
X
X	DEBUG1("rmtd: E 0 (%s)\n", str);
X	(void) js_snprintf(rbuf, sizeof (rbuf), "E0\n%s\n", str);
X	(void) _nixwrite(STDOUT_FILENO, rbuf, strlen(rbuf));
X}
X#endif	/* USE_REMOTE */
END-of-star-1.5.2/rmt/rmt.c
echo x - star-1.5.2/rmt/rmt.1
sed 's/^X//' >star-1.5.2/rmt/rmt.1 << 'END-of-star-1.5.2/rmt/rmt.1'
X. \" @(#)rmt.1	1.15 09/10/16 Copyr 1994-2009 J. Schilling
X. \"  Manual Seite fuer rmt
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U
X.if t .ds s \\(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH RMT 1 "Release 1.1" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xrmt \- remote magnetic tape protocol server
X.SH SYNOPSIS
X.B /opt/schily/sbin/rmt
X.br
X.B /etc/rmt
X
X.SH DESCRIPTION
X.IX  "rmt command"  ""  "\fLrmt\fP \(em remote magnetic tape protocol server"
X.IX  "remote magnetic tape protocol server"  ""  "remote magnetic tape protocol server \(em \fLrmt\fP"
XThis is the description of the enhanced 
X.B "Schily"
Xversion of the 
X.B rmt
Xremote tape server program.
X.B rmt
Xis a program used by programs like
X.B star 
Xand
X.B ufsdump 
Xthat like to access remote magnetic tape drives and files
Xthrough an interprocess communication connection.
X.B rmt
Xis normally started up with an
X.BR rexec (3)
Xor
X.BR rcmd (3)
Xcall.
X.LP
XThe
X.B rmt
Xprogram accepts 
X.BR open ,
X.BR close ,
X.BR read ,
X.B write 
Xand
X.B seek
Xrequests as well as requests that are specific to magnetic tapes.
X.B rmt
Xperforms the commands and then responds with a status indication.
X.LP
XThis version of the rmt server gives full compatibility to the
Xoriginal BSD version, the enhanced Sun version and the 
Xenhanced GNU version.
XIn addition to the Sun and GNU enhancements, it implements further
Xabstractions for better cross platform compliance.
XIt supports best speed and
Xbest compliance even when server and client code are running
Xon different platforms.
XIt is prepared to be installed as a user shell in the passwd
Xfile to create remote tape specific logins and security checking.
XTo use the enhanced compatibility features, you need to either
Xuse the remote tape client code from 
X.B star
Xwhich is available in
X.B librmt
Xor reimplement its features.
X.LP
XAll responses are send back in
X.SM ASCII.
XThey are in one of the following two forms.
X.LP
XSuccessful commands have responses of
X.IP
X.BI A number\en
X.LP
Xwhere
X.I number
Xis the
X.SM ASCII
Xrepresentation of a decimal number that usually is the return
Xcode of the corresponding system call.
XUnsuccessful commands are responded to with
X.IP
X.BI E error-number \en error-message \en
X.LP
Xwhere
X.I error-number
Xis one of the possible error
Xnumbers described in
X.BR intro (2),
Xand
X.I error-message
Xis the corresponding error string as retrieved by
X.BR strerror (3).
X.ne 4
XNote that the error number is valid on the remote system where the 
X.B rmt
Xcode runs and may have a different meaning on the local system.
X.LP
X.ne 5
XThe protocol implements the
Xfollowing commands:
X.RS
X.TP 15
X.BI O device \en mode \en
X.TP
X.BI O device \en "mode symbolic_mode" \en
XOpen the specified
X.I device
Xor file using the indicated
X.IR mode .
X.I device
Xis a full path name, and
X.I mode
Xis an
X.SM ASCII
Xrepresentation of a decimal
Xnumber suitable for being passed as second parameter to
X.BR open (2).
XA variant of the 
X.B open 
Xcommand includes the 
X.B "symbolic_mode"
Xstring which is a 
X.B GNU
Xextension.
XIf both,
X.I mode
Xand 
X.I symbolic_mode
Xare present, they are separated by a space character;
X.I symbolic_mode
Xappears on the same line as the numeric mode.
XIt is send using the same notation as used in a C source (e.g.
X.BR O_RDWR|O_CREAT ).
XIf the
X.I symbolic_mode
Xis send to the server, the numeric
X.B mode
Xis ignored.
XThe symbolic notation allows to send the expected open mode over
Xthe wire, using a system independent method.
XThis is needed because different operating systems usually define all
Xbits in a different way. An exception are the lowest two bits.
XThe lowest two bits allow to code 
X.IR O_RDONLY , O_WRONLY " and " O_RDWR .
XTo prevent unexpected behavior, 
X.B rmt
Xmasks the numeric open mode with
X.B 0x03 
Xbefore using it as argument to the 
X.BR open (2)
Xcall.
XIf you need more bits in the second parameter ot
X.BR open (2),
Xyou need to use the symbolic mode.
X.sp
XIf no file
X.I /etc/default/rmt
Xexists, only filenames starting with /dev/ are accepted for security reasons.
X.sp
XIf a device is already open, it is
Xclosed before a new open is performed.
X.sp
XA
X.B RMT protocol VERSION 1 
Xclient should issue a
X.br
X.BI I -1 \en 0\en
X.br
Xcommand just after opening a file or device. This is needed to
Xtell the server that the client is aware of the official order
Xof the 
X.I mt_op
Xcodes in the range 0..7 and that is maps deviating values to the official
Xones.
X.br
X.ne 7
X.TP
X.BI C device \en
XClose the currently open device or file.  The argument
X.I device
Xis ignored.
X.br
X.ne 7
X.TP
X.BI R count \en
XRead
X.I count
Xbytes of data from the open device or file.
X.B rmt
Xperforms the requested
X.BR read (2)
Xoperation and responds with
X.BI A count-read\en
Xif the read operation was
Xsuccessful; otherwise an error in 
Xstandard format is returned.  If the read operation
Xwas successful, the data read is sent directly after
Xthe response described above.
X.br
X.ne 7
X.TP
X.BI W count \en
XWrite data to the open device or file.
XAfter reading the command specification,
X.B rmt
Xreads
X.I count
Xbytes from the network connection and aborts if a premature
X.SM EOF
Xis encountered.
XThe return value from the
X.BR write (2)
Xoperation is returned as reply.
X.br
X.ne 7
X.TP
X.BI L whence \en offset \en
XPerform an
X.BR lseek (2)
Xoperation on the open device or file using the specified parameters.
XThe return value from the
X.BR lseek (2)
Xoperation is returned as reply.
X.sp
XOn large file aware operating systems,
X.B rmt
Xwill correctly handle large
X.BR lseek (2)
Xrequests.
X.RS
X.PP
XThe following whence values are supported:
X.TP
X0
XMapped to 
X.BR SEEK_SET .
X.TP
X1
XMapped to 
X.BR SEEK_CUR .
X.TP
X2
XMapped to 
X.BR SEEK_END .
X.TP
X3
XMapped to 
X.B SEEK_DATA
XIf avalable on the remote system.
X.TP
X4
XMapped to 
X.B SEEK_HOLE
XIf avalable on the remote system.
X.RE
X.br
X.ne 7
X.TP
X.B S
XThe old non-portable status call.
XThis call should not be used anymore, it has been replaced by the
Xnew
X.B RMT protocol version 1
Xextended status call below.
XIf the currently open device is a magnetic tape, return the magnetic tape status,
Xas obtained with a
X.SB MTIOCGET
X.B ioctl
Xcall.
XIf the open device is not a magnetic tape, an error is returned.
XIf the 
X.SB MTIOCGET
Xoperation was successful,
Xan \*(lqack\*(rq is sent with the size of the
Xstatus buffer, then the status buffer is sent.
XAs the status buffer is sent in binary, this
Xcommand it considered outdated. Please use the extended status command instead.
XThis command is not terminated by a new-line.
X.br
X.ne 7
X.TP
X.BI s sub-command
XThe new portable status call.
XThis command is part of the
X.BR "RMT protocol version 1" .
XIf the currently open device is a magnetic tape, return a single specified
Xmember of the magnetic tape status structure, as obtained with a
X.SB MTIOCGET
X.B ioctl
Xcall.
XIf the open device is not a magnetic tape, an error is returned.
XIf the 
X.SB MTIOCGET
Xoperation was successful, the numerical value of the structure member
Xis returned in decimal.
XThe following sub commands are supported:
X.RS
X.br
X.ne 3
X.TP
XT
Xreturn the content of the structure member
X.B mt_type
Xwhich contains the type of the magnetic tape device.
X.br
X.ne 3
X.TP
XD
Xreturn the content of the structure member
X.B mt_dsreg
Xwhich contains the \*(lqdrive status register\*(rq.
X.br
X.ne 3
X.TP
XE
Xreturn the content of the structure member
X.B mt_erreg
Xwhich contains the \*(lqerror register\*(rq.
X.sp
XThis structure member must be retrieved first
Xbecause it is cleared after each
X.SB MTIOCGET
X.B ioctl
Xcall.
XThe 
X.B librmt
Xwill always retrieve the member
X.B mt_erreg
Xfirst when it is told to retrieve a complete status structure.
X.br
X.ne 3
X.TP
XR
Xreturn the content of the structure member
X.B mt_resid
Xwhich contains the residual count of the last I/O.
X.br
X.ne 3
X.TP
XF
Xreturn the content of the structure member
X.B mt_fileno
Xwhich contains the block number of the current tape position.
X.br
X.ne 3
X.TP
XB
Xreturn the content of the structure member
X.B mt_blkno
Xwhich contains the block number of the current tape position.
X.br
X.ne 3
X.TP
Xf
Xreturn the content of the structure member
X.B mt_flags
Xwhich contains MTF_ flags from the driver.
X.br
X.ne 3
X.TP
Xb
Xreturn the content of the structure member
X.B mt_bf
Xwhich contains the optimum blocking factor.
X.LP
XThis command is not terminated with a new-line.
X.RE
X.br
X.ne 7
X.TP
X.BI I operation \en count \en
XPerform a
X.SB MTIOCOP
X.BR ioctl (2)
Xcommand using the specified parameters.
XThe parameters are interpreted as the
X.SM ASCII
Xrepresentations of the decimal values to place in the
X.I mt_op
Xand
X.I mt_count
Xfields of the structure used in the
X.B ioctl
Xcall.  
XWhen the operation is successful the return value is the
X.I count
Xparameter.
XOnly Opcodes 0..7 are unique across different architectures.
XIn many cases 
X.B Linux
Xdoes not even follow this rule.
XIf we know that we have been called by a 
X.B RMT protocol VERSION 1 
Xclient, we may safely assume that the client is not using
X.B Linux
Xmapping over the wire but the standard mapping described below:
X.RS
X.TP
X-1
XRetrieve the version number of the
X.B rmt
Xserver and tell the server that the client is aware of the official
Xorder of the 
X.SB MTIOCOP
X.BR ioctl (2)
Xopcodes in the range 0..7.
XLocal
X.I mt_op
Xcodes must be remapped to the official values before sending them
Xover the wire.
X.sp
XThe answer of the current version of
X.B rmt
Xis 1.
XOld
X.B rmt
Ximplementations send an error code back when this
Xcommand is used.
XFuture
X.B rmt
Ximplementations with further enhancements will send an answer
Xwith a value > 1.
X.TP
X0
XIssue a
X.B MTWEOF
Xcommand (write 
X.I count
Xend-of-file records).
X.TP
X1
XIssue a
X.B MTFSF
Xcommand (forward space over
X.I count
Xfile marks).
X.TP
X2
XIssue a
X.B MTBSF
Xcommand (backward space over
X.I count
Xfile marks).
X.TP
X3
XIssue a
X.B MTFSR
Xcommand (forward space
X.I count
Xinter-record gaps).
X.TP
X4
XIssue a
X.B MTBSR
Xcommand (backward space 
X.I count
Xinter-record gaps).
X.TP
X5
XIssue a
X.B MTREW
Xcommand (rewind).
X.TP
X6
XIssue a
X.B MTOFFL
Xcommand (rewind and put the drive off-line).
X.TP
X7
XIssue a
X.B MTNOP
Xcommand (no operation, set status only).
X.RE
X.br
X.ne 7
X.TP
X.BI i operation \en count \en
XPerform a
X.SB MTIOCOP
X.BR ioctl (2)
Xcommand using the specified parameters.
XThis command is a
X.B RMT protocol VERSION 1 
Xextension and implements support for commands beyond MTWEOF..MTNOP (0..7).
XThe parameters are interpreted as the
X.SM ASCII
Xrepresentations of the decimal values described below.
XThey are converted into the local values
X.I mt_op
Xand
X.I mt_count
Xfields of the structure used in the
X.B ioctl
Xcall according to the actual values found in <sys/mtio.h>.
XWhen the operation is successful the return value is the
X.I count
Xparameter.
X.RS
X.TP
X0
XIssue a
X.B MTCACHE
Xcommand (switch cache on).
X.TP
X1
XIssue a
X.B MTNOCACHE
Xcommand (switch cache off).
X.TP
X2
XIssue a
X.B MTRETEN
Xcommand (retension the tape).
X.TP
X3
XIssue a
X.B MTERASE
Xcommand (erase the entire tape).
X.TP
X4
XIssue a
X.B MTEOM
Xcommand (position to end of media).
X.TP
X5
XIssue a
X.B MTNBSF
Xcommand (backward space
X.I count
Xfiles to BOF).
X.RE
X.br
X.ne 7
X.TP
X.BI v \en
XReturn the version of the 
X.B rmt
Xserver. This is currently the decimal number 1.
X.RE
X.LP
XAny other command causes
X.B rmt
Xto exit.
X.SH FILES
X.TP
X/etc/default/rmt
XThe file
X.B /etc/default/rmt
Xallows to set up rules to limit the accessibility of files based on rules.
XThis feature is typically used when the rmt run from a non personal but
Xtask specific login.
X.sp
XDefault values can be set for the following options in /etc/default/rmt.
XFor example:
X.sp
X.BR DEBUG= /tmp/rmt.debug
X.br
X.BR USER= tape
X.br
X.BR ACCESS= "tape	myhost.mydomain.org	/dev/rmt/*"
X.sp
XAll keywords must be on the beginning of a line.
X.RS
X.TP
X.B DEBUG
XIf you like to get debug information, set this to a file name where 
X.B rmt
Xshould put debug information.
X.TP
X.B USER
XThe name of a user (local to the magnetic tape server) that may use
Xthe services of the
X.B rmt
Xserver.
XMore than one
X.BI USER= name
Xline is possible.
XA line
X.BR USER= *
Xgrants access to all users.
X.TP
X.B ACCESS
XThis keyword is followed by three parameters separated by a TAB.
XThe name of a user (local to the magnetic tape server host) that may use
Xthe services of the
X.B rmt
Xserver followed by the name of a host from where operation is granted 
Xand a file specifier pattern for a file or file sub tree that may be accessed
Xif this 
X.B ACCESS
Xline matches.
XMore than one
X.BI ACCESS= "name host path"
Xline is possible.
X.sp
XIf standard input of 
X.B rmt
Xis not a socket from a remote host, 
X.B rmt
Xwill compare the host entry from 
X.B /etc/default/rmt
Xwith the following strings:
X.RS
X.TP 10
X.B PIPE
XIf 
X.B stdin
Xis a 
X.SM UNIX 
Xpipe.
X.sp
XIf you like to allow remote connections that use the
X.B ssh
Xprotocol, you need to use the word
X.B PIPE
Xinstead of the real hostname in the matching
X.B ACCESS=
Xline.
X.TP
X.B ILLEGAL_SOCKET
XIf 
X.B getpeername()
Xdoes not work for
X.BR stdin .
X.TP
X.B NOT_IP
XIf 
X.B getpeername()
Xworks for
X.B stdin
Xbut is not connected to an internet socket.
X.RE
X.RE
X.SH "SEE ALSO"
X.BR star (1),
X.BR ufsdump (1),
X.BR ufsrestore (1),
X.BR intro (2),
X.BR open (2),
X.BR close (2),
X.BR read (2),
X.BR write (2),
X.BR ioctl (2),
X.BR lseek (2),
X.BR getpeername (3),
X.BR rcmd (3),
X.BR rexec (3),
X.BR strerror (3),
X.BR mtio (7),
X.BR rmtopen (3),
X.BR rmtclose (3),
X.BR rmtread (3),
X.BR rmtwrite (3),
X.BR rmtseek (3),
X.BR rmtioctl (3),
X.BR rmtstatus (3)
X
X.SH DIAGNOSTICS
XAll responses are send to the network connection.
XThey use the form described above.
X.SH NOTES
X.LP
XTo use 
X.B rmt
Xas a remote file access protocol you need to use the symbolic open
Xmodes as e.g. the
X.I O_CREAT
Xflag is not unique between different architectures.
X.LP
XIn order to allow this implementation to be used
Xas a remote file access protocol,
Xit accepts file names up to 4096 bytes with the open command.
XOther
X.B rmt
Ximplementations allow no more than 64 bytes.
X.LP
XThe possibility to create a debug file by calling
X.BI rmt " file
Xhas been disabled for security reasons.
XIf you like to debug
X.B rmt
Xedit
X.B /etc/default/rmt
Xand insert a 
X.B DEBUG
Xentry.
X.LP
XThis implementation of
X.B rmt
Xadds some security features to the server that make it behave
Xslightly different from older implementations.
XRead the above documentation about the file 
X/etc/default/rmt
Xto make sure your local installation is configured for your needs.
X.LP
XTo grant the same permissions as with old
X.B rmt
Xservers, create a file /etc/default/rmt and add the following lines
Xto this file:
X.LP
X.BR USER= *
X.br
X.BR ACCESS= "* * *"
X.LP
XNote that the three fields in the
X.B ACCESS=
Xline need to be separated by a TAB character.
X.LP
XBe very careful when designing patterns to match path names that may
Xbe accepted for 
X.IR open .
XIf a pattern would allow to include
X.I /../
Xin the path,
Xa possible intruder could virtually access any path on your system.
XFor this reason, 
X.I /../
Xis not allowed to appear in a path regardless of the pattern.
X.SH BUGS
X.LP
XNone known.
X.SH HISTORY
X.LP
XThe 
X.B rmt
Xcommand first appeared on BSD in march 1981. This 
X.B rmt
Xserver is a new implementation
Xthat tries to be compatible to all existing implementations.
XIt is the only known implementation that in addition tries to
Xfix the data exchange problems between different architectures.
X
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg.schilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu-berlin.de
END-of-star-1.5.2/rmt/rmt.1
echo x - star-1.5.2/rmt/Makefile.man
sed 's/^X//' >star-1.5.2/rmt/Makefile.man << 'END-of-star-1.5.2/rmt/Makefile.man'
X#ident @(#)Makefile.man	1.1 00/12/04 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmt
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	rmt.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/rmt/Makefile.man
echo x - star-1.5.2/rmt/rmt.dfl
sed 's/^X//' >star-1.5.2/rmt/rmt.dfl << 'END-of-star-1.5.2/rmt/rmt.dfl'
X#ident @(#)rmt.dfl	1.2 05/08/09 Copyr 2000 J. Schilling
X#
X# This file is /etc/default/rmt
X#
X# NOTE: If this file is not present, rmt will reject to work for root.
X#
X# If no USER= entry is present, nobody is allowed to run rmt.
X# If no ACCESS= entry is present, no device may to be used by remote users.
X
X# 
X# The file where debug info should go to.
X# If you don't like debugging (e.g. for speed) comment out
X# the this line.
X#
X#DEBUG=/tmp/RMT
X
X#
X# Each USER= entry adds the listed user to the users who may run rmt
X#
X# A typical passwd entry looks like this:
X# rtape:x:1999:1000:Remote TAPE:/export/home/rtape:/opt/schily/sbin/rmt
X#
X# Add entries for all valid remote users to /export/home/rtape/.rhosts
X#
X#USER=rtape
X#USER=joerg
X# Default to old SunOS behavior. If you like to be more restrictive, comment
X# out the entry below and enable the explicit USER= entries above.
XUSER=*
X
X#
X# Each ACCESS= entry adds a target or group of targets to the list of visible
X# targets for all users that do remote tape/file access from a specific host.
X#
X#	Username is the name of the user that runs rmt. If you create
X#	different users, you may assign different permissions to different
X#	users from the same host.
X#
X#	Hostname must be in the same notation as needed for .rhosts (e.g. in
X#	the way you will be listed by 'who' if you log in from this host).
X#
X#	local	remote
X#	user	host	file
X#	name	name
X#
X#ACCESS=rtape	sparky	/dev/rmt/*
XACCESS=*	*	/dev/rmt/*
XACCESS=*	*	/dev/null
XACCESS=*	*	/dev/zero
X#ACCESS=*	*	*
END-of-star-1.5.2/rmt/rmt.dfl
echo x - star-1.5.2/rmt/Makefile.dfl
sed 's/^X//' >star-1.5.2/rmt/Makefile.dfl << 'END-of-star-1.5.2/rmt/Makefile.dfl'
X#ident @(#)Makefile.dfl	1.4 10/05/14 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSMODE=	0644
XINSDIR=		etc/default
XINSBASE=	$(INS_RBASE:%/=%)
XTARGET=		rmt
XAUXSRCEXT=	.dfl
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/rmt/Makefile.dfl
echo x - star-1.5.2/rmt/Makefile.doc
sed 's/^X//' >star-1.5.2/rmt/Makefile.doc << 'END-of-star-1.5.2/rmt/Makefile.doc'
X#ident @(#)Makefile.doc	1.1 07/06/13 
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		share/doc/rmt
XTARGET=		default-rmt.sample
X#XMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/rmt/Makefile.doc
echo x - star-1.5.2/rmt/default-rmt.sample
sed 's/^X//' >star-1.5.2/rmt/default-rmt.sample << 'END-of-star-1.5.2/rmt/default-rmt.sample'
X#ident @(#)rmt.dfl	1.2 05/08/09 Copyr 2000 J. Schilling
X#
X# This file is /etc/default/rmt
X#
X# NOTE: If this file is not present, rmt will reject to work for root.
X#
X# If no USER= entry is present, nobody is allowed to run rmt.
X# If no ACCESS= entry is present, no device may to be used by remote users.
X
X# 
X# The file where debug info should go to.
X# If you don't like debugging (e.g. for speed) comment out
X# the this line.
X#
X#DEBUG=/tmp/RMT
X
X#
X# Each USER= entry adds the listed user to the users who may run rmt
X#
X# A typical passwd entry looks like this:
X# rtape:x:1999:1000:Remote TAPE:/export/home/rtape:/opt/csw/sbin/rmt
X#
X# Add entries for all valid remote users to /export/home/rtape/.rhosts
X#
XUSER=rtape
X#USER=joerg
X# Default to old SunOS behavior. If you like to be more restrictive, comment
X# out the entry below and enable the explicit USER= entries above.
XUSER=*
X
X#
X# Each ACCESS= entry adds a target or group of targets to the list of visible
X# targets for all users that do remote tape/file access from a specific host.
X#
X#	Username is the name of the user that runs rmt. If you create
X#	different users, you may assign different permissions to different
X#	users from the same host.
X#
X#	Hostname must be in the same notation as needed for .rhosts (e.g. in
X#	the way you will be listed by 'who' if you log in from this host).
X#
X#	local	remote
X#	user	host	file
X#	name	name
X#
X#ACCESS=rtape	sparky	/dev/rmt/*
XACCESS=*	*	/dev/rmt/*
XACCESS=*	*	/dev/null
XACCESS=*	*	/dev/zero
X#ACCESS=*	*	*
END-of-star-1.5.2/rmt/default-rmt.sample
echo x - star-1.5.2/configure
sed 's/^X//' >star-1.5.2/configure << 'END-of-star-1.5.2/configure'
X#!/bin/sh -
Xecho 'configure is no longer used - just type "make", supported make programs are:'
Xecho ''
Xecho 'smake	-	The Schily smake program'
Xecho '			This is the preferred make program, the source can be'
Xecho '			found on ftp://ftp.berlios.de/pub/smake/alpha/'
Xecho ''
Xecho '		Smake is the only make program with automake features, it is'
Xecho '		the only program that works on unknown platforms.'
Xecho ''
Xecho 'make	-	SunPRO make (on SunOS/Solaris only)'
Xecho '			in /usr/bin/ (SunOS 4.x) or /usr/ccs/bin/ (Solaris)'
Xecho ''
Xecho 'gmake	-	GNU make'
Xecho '			GNU make will not work correctly on all platforms'
Xecho '			and due to some conceptional bugs output several'
Xecho '			error messages that are not related to the makefile'
Xecho '			system but to GNU make (see README.gmake)'
Xecho ''
Xecho 'Other make programs will not work, for more information read README.compile'
Xecho ''
Xecho 'If you have problems and if you are in doubt, try to use smake'
Xecho '	Always compile the latest version that can be found on:'
Xecho '		ftp://ftp.berlios.de/pub/smake/alpha/'
Xecho ''
X#
X# Make automated procedures that believe all programs still use the outdated GNU
X# "./configure; make" procedure think configure failed and get the attention of
X# a human ...
X#
Xexit 1
END-of-star-1.5.2/configure
echo c - star-1.5.2/TEMPLATES
mkdir -p star-1.5.2/TEMPLATES > /dev/null 2>&1
echo x - star-1.5.2/TEMPLATES/Defaults.gcc
sed 's/^X//' >star-1.5.2/TEMPLATES/Defaults.gcc << 'END-of-star-1.5.2/TEMPLATES/Defaults.gcc'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for unknown Systems using CC=gcc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
X#DEFCCOM=	cc
XDEFCCOM=	gcc
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
XRUNPATH=	-R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	bin
XDEFINSGRP=	bin
END-of-star-1.5.2/TEMPLATES/Defaults.gcc
echo x - star-1.5.2/TEMPLATES/Defaults.xcc
sed 's/^X//' >star-1.5.2/TEMPLATES/Defaults.xcc << 'END-of-star-1.5.2/TEMPLATES/Defaults.xcc'
X#ident "%W% %E% %Q%"
X###########################################################################
X#
X# global definitions for unknown Systems using CC=cc
X#
X###########################################################################
X#
X# Compiler stuff
X#
X###########################################################################
XDEFCCOM=	cc
X#DEFCCOM=	gcc
X###########################################################################
X#
X# If the next line is commented out, compilation is done with max warn level
X# If the next line is uncommented, compilation is done with minimal warnings
X#
X###########################################################################
X#CWARNOPTS=
X
XDEFINCDIRS=	$(SRCROOT)/include
XLDPATH=		-L/opt/schily/lib
X#RUNPATH=	-R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR)	Will probably not work
X
X###########################################################################
X#
X# Installation config stuff
X#
X###########################################################################
XINS_BASE=	/opt/schily
XINS_KBASE=	/
X#
XDEFUMASK=	002
X#
XDEFINSMODEF=	444
XDEFINSMODEX=	755
XDEFINSUSR=	bin
XDEFINSGRP=	bin
END-of-star-1.5.2/TEMPLATES/Defaults.xcc
echo x - star-1.5.2/TEMPLATES/temp-gcc.rul
sed 's/^X//' >star-1.5.2/TEMPLATES/temp-gcc.rul << 'END-of-star-1.5.2/TEMPLATES/temp-gcc.rul'
X#ident "@(#)temp-gcc.rul	1.3 09/07/26 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown GCC systems
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
X
XOSDEFS=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
XSHL_SUFFIX=	.so.1.0
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XLDOPTS=		$(LIBS_PATH) $(LDPATH)
X
XRANLIB=		@echo "	==> RANDOMIZING ARCHIVE \"$@\""; true
XARFLAGS=	cr
X#LORDER=		lorder
X#TSORT=		tsort
XLORDER=		echo
XTSORT=		cat
X
XMKDIR=		$(MKDIR_SH)
END-of-star-1.5.2/TEMPLATES/temp-gcc.rul
echo x - star-1.5.2/TEMPLATES/temp-xcc.rul
sed 's/^X//' >star-1.5.2/TEMPLATES/temp-xcc.rul << 'END-of-star-1.5.2/TEMPLATES/temp-xcc.rul'
X#ident "@(#)temp-xcc.rul	1.3 09/07/26 "
X###########################################################################
X# Written 1997 by J. Schilling
X###########################################################################
X#
X# Platform dependent MACROS for unknown systems systems with dumb cc
X#
X###########################################################################
X# Copyright (c) J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/rules.prg
X###########################################################################
Xinclude $(SRCROOT)/$(RULESDIR)/cc-dumb.rul
X
XOSDEFS=
X
XKDEFINES=	-DKERNEL -D_KERNEL
X
X#LIB_SOCKET=	-lsocket -lnsl -ldl
XLIB_SOCKET=	
XLIB_MATH=	-lm
X#LIB_KVM=	-lkvm
XLIB_KVM=	
X
XARFLAGS=	cr
X#LORDER=		lorder
X#TSORT=		tsort
XLORDER=		echo
XTSORT=		cat
END-of-star-1.5.2/TEMPLATES/temp-xcc.rul
echo x - star-1.5.2/TEMPLATES/Makefile.aux
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.aux << 'END-of-star-1.5.2/TEMPLATES/Makefile.aux'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing non-localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		etc
XTARGET=		help.dat
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.aux
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.aux
echo x - star-1.5.2/TEMPLATES/Makefile.cmd
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.cmd << 'END-of-star-1.5.2/TEMPLATES/Makefile.cmd'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for general application programs
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		cfform
X#CPPOPTS +=	-Ispecincl
XCFILES=		cfform.c
XLIBS=		-lat
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.cmd
echo x - star-1.5.2/TEMPLATES/Makefile.dir
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.dir << 'END-of-star-1.5.2/TEMPLATES/Makefile.dir'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for sub directory makes
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# include Targetdirs no longer needed, we use SSPM
X#include		Targetdirs.$(M_ARCH)
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.dir
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.dir
echo x - star-1.5.2/TEMPLATES/Makefile.drv
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.drv << 'END-of-star-1.5.2/TEMPLATES/Makefile.drv'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for general device drivers
X###########################################################################
XSRCROOT=	../../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		usr/kernel/drv
XTARGET=		ga
XCPPOPTS +=	-DFOKUS -DATMNA -DBROKEN_PROM -DTPI_COMPAT \
X		-DGADEBUG -DGADEBUG_MASK=0x0 
XCFILES=		ga.c
XSRCLIBS=
XLIBS=		
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.drv
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.drv
echo x - star-1.5.2/TEMPLATES/Makefile.lib
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.lib << 'END-of-star-1.5.2/TEMPLATES/Makefile.lib'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for non-shared libraries
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib
XTARGETLIB=	aal
XCPPOPTS +=	-DFOKUS
XCFILES=		aallib.c
XLIBS=
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.lib
echo x - star-1.5.2/TEMPLATES/Makefile.loc
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.loc << 'END-of-star-1.5.2/TEMPLATES/Makefile.loc'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing localized auxiliary files
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		etc
XTARGET=		test
XSRCFILE=	test
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.loc
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.loc
echo x - star-1.5.2/TEMPLATES/Makefile.man
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.man << 'END-of-star-1.5.2/TEMPLATES/Makefile.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	test
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	test.tr
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.man
echo x - star-1.5.2/TEMPLATES/Makefile.mks
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.mks << 'END-of-star-1.5.2/TEMPLATES/Makefile.mks'
X#ident "%W% %E% %Q%"
X###########################################################################
X# Sample makefile for sub-makes in one directory
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#MK_FILES=	cfform.mk cfget20.mk cfhec11.mk cfinfo20.mk cfpld.mk cfput20.mk
XMK_FILES=	cfform.mk
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.mks
echo x - star-1.5.2/TEMPLATES/Makefile.root
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.root << 'END-of-star-1.5.2/TEMPLATES/Makefile.root'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for the source root
X###########################################################################
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#
X# include Targetdirs no longer needed, we use SSPM
X#include		Targetdirs.$(M_ARCH)
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.root
echo x - star-1.5.2/TEMPLATES/Makefile.scr
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.scr << 'END-of-star-1.5.2/TEMPLATES/Makefile.scr'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing localized shell scripts
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		test
XSCRFILE=	test.sh
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.scr
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.scr
echo x - star-1.5.2/TEMPLATES/Makefile.shl
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.shl << 'END-of-star-1.5.2/TEMPLATES/Makefile.shl'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for shared libraries
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		lib
XTARGETLIB=	aal
XCPPOPTS +=	-DFOKUS
XCFILES=		aallib.c
XLIBS=
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.shl
echo x - star-1.5.2/TEMPLATES/Makefile_de.man
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile_de.man << 'END-of-star-1.5.2/TEMPLATES/Makefile_de.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing non english manual pages
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X# Rules for German manual pages (replace de with your locale)
X###########################################################################
X
XMANDIR=		man/de
XTARGETMAN=	test
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	test-de.tr
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile_de.man
echo x - star-1.5.2/TEMPLATES/Makefile.mod
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.mod << 'END-of-star-1.5.2/TEMPLATES/Makefile.mod'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for loadable streams modules
X###########################################################################
XSRCROOT=	../../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		usr/kernel/strmod
XTARGET=		ga
XCPPOPTS +=	-DFOKUS -DATMNA -DBROKEN_PROM -DTPI_COMPAT \
X		-DGADEBUG -DGADEBUG_MASK=0x0 
XCFILES=		ga.c
XSRCLIBS=
XLIBS=		
XXMK_FILE=	Makefile.man
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mod
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.mod
echo x - star-1.5.2/TEMPLATES/Makefile.inc
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.inc << 'END-of-star-1.5.2/TEMPLATES/Makefile.inc'
X#ident %W% %E% %Q%
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		include
XTARGET=		align.h
XTARGETC=	align_test
XCFILES=		align_test.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.inc
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.inc
echo x - star-1.5.2/TEMPLATES/Makefile.wrap
sed 's/^X//' >star-1.5.2/TEMPLATES/Makefile.wrap << 'END-of-star-1.5.2/TEMPLATES/Makefile.wrap'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for wrapping makes
X###########################################################################
XSRCROOT=	../..
XRULESDIR=	RULES
X#CCOM=	gcc
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSRC_DIR=	wget-1.9.1
X#CONF_OPTS=	--prefix=$(INS_BASE)
X#CONF_OPTS=	--prefix=$(INS_BASE) --program-prefix=g
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.sps
X###########################################################################
END-of-star-1.5.2/TEMPLATES/Makefile.wrap
echo x - star-1.5.2/TEMPLATES/noshlxxx.mk
sed 's/^X//' >star-1.5.2/TEMPLATES/noshlxxx.mk << 'END-of-star-1.5.2/TEMPLATES/noshlxxx.mk'
X#ident "%W% %E% %Q%"
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-star-1.5.2/TEMPLATES/noshlxxx.mk
echo x - star-1.5.2/TEMPLATES/MKLINKS
sed 's/^X//' >star-1.5.2/TEMPLATES/MKLINKS << 'END-of-star-1.5.2/TEMPLATES/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.3 11/08/04 "
X###########################################################################
X# Written 2008-2011 by J. Schilling
X###########################################################################
X# Copyright (c) 2008-2011 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xsymlink="ln -s"
XMKLINKS_TEST=${MKLINKS_TEST-:}
Xif [ ".$MKLINKS_COPY" = '.' ]; then
X	rm -f xxzzy.123 xxzzy.345
X	echo test > xxzzy.123
X	$symlink xxzzy.123 xxzzy.345
X	test $? = 0 || symlink=cp
X	test -r xxzzy.345 || symlink=cp
X	${MKLINKS_TEST} -h xxzzy.345 || symlink=cp
X	rm -f xxzzy.123 xxzzy.345
Xelse
X	symlink=cp
Xfi
X###########################################################################
X
X$symlink Makefile.cmd	cmd.mk
X$symlink Makefile.inc	inc.mk
X$symlink Makefile.lib	lib.mk
X$symlink Makefile.shl	shl.mk
END-of-star-1.5.2/TEMPLATES/MKLINKS
echo c - star-1.5.2/mt
mkdir -p star-1.5.2/mt > /dev/null 2>&1
echo x - star-1.5.2/mt/Makefile
sed 's/^X//' >star-1.5.2/mt/Makefile << 'END-of-star-1.5.2/mt/Makefile'
X#ident @(#)Makefile	1.8 11/04/16 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		smt
XSYMLINKS=	mt
XCPPOPTS +=	-DUSE_REMOTE
XCPPOPTS +=	-DSCHILY_PRINT
X
XCFILES=		mt.c
X#HFILES=
XLIBS=		-lrmt -lschily $(LIB_SOCKET)
XXMK_FILE=	Makefile.man mt.mk1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
Xcount:	$(CFILES) $(HFILES)
X	count $r1
X
END-of-star-1.5.2/mt/Makefile
echo x - star-1.5.2/mt/mt.c
sed 's/^X//' >star-1.5.2/mt/mt.c << 'END-of-star-1.5.2/mt/mt.c'
X/* @(#)mt.c	1.28 11/08/14 Copyright 2000-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)mt.c	1.28 11/08/14 Copyright 2000-2011 J. Schilling";
X#endif
X/*
X *	Magnetic tape manipulation program
X *
X *	Copyright (c) 2000-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/mconfig.h>
X
X/*
X * XXX Until we find a better way, the next definitions must be in sync
X * XXX with the definitions in librmt/remote.c
X */
X#if !defined(HAVE_FORK) || !defined(HAVE_SOCKETPAIR) || !defined(HAVE_DUP2)
X#undef	USE_RCMD_RSH
X#endif
X#if !defined(HAVE_GETSERVBYNAME)
X#undef	USE_REMOTE				/* Cannot get rcmd() port # */
X#endif
X#if (!defined(HAVE_NETDB_H) || !defined(HAVE_RCMD)) && !defined(USE_RCMD_RSH)
X#undef	USE_REMOTE				/* There is no rcmd() */
X#endif
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/string.h>
X#include <schily/utypes.h>
X#include <schily/fcntl.h>
X#include <schily/ioctl.h>
X#include <schily/errno.h>
X
X#include <schily/schily.h>
X#include <schily/standard.h>
X/*#undef	HAVE_SYS_MTIO_H*/
X#include <schily/mtio.h>
X#include <schily/librmt.h>
X
XLOCAL BOOL	help;
XLOCAL BOOL	prvers;
XLOCAL BOOL	wready;
XLOCAL int	debug;
X
XLOCAL struct mtop	mt_op;
XLOCAL struct rmtget	mt_status;
X
X#ifndef	HAVE_MTGET_TYPE
X#ifdef	HAVE_MTGET_MODEL
X#define	HAVE_MTGET_TYPE
X#define	mt_type	mt_model
X#endif
X#endif
X
X#define	NO_ASF		1000
X#define	NO_NBSF		1001
X#ifndef	MTASF
X#	define	MTASF	NO_ASF
X#endif
X#ifndef	MTNBSF
X#	define	MTNBSF	NO_NBSF
X#endif
X
X#define	MTC_NONE	0	/* No flags defined			*/
X#define	MTC_RW		0	/* This command writes to the tape	*/
X#define	MTC_RDO		1	/* This command does not write		*/
X#define	MTC_CNT		2	/* This command uses the count arg	*/
X#define	MTC_NDEL	4	/* Open the tape drive with O_NDELAY	*/
X
X
XLOCAL struct mt_cmds {
X	char *mtc_name;		/* The name of the command		*/
X	char *mtc_text;		/* Description of the command		*/
X	int mtc_opcode;		/* The opcode for mtio			*/
X	int mtc_flags;		/* Flags for this command		*/
X} cmds[] = {
X#ifdef	MTWEOF
X	{ "weof",	"write EOF mark",		MTWEOF,		MTC_RW|MTC_CNT },
X	{ "eof",	"write EOF mark",		MTWEOF,		MTC_RW|MTC_CNT },
X#endif
X#ifdef	MTFSF
X	{ "fsf",	"forward skip FILE mark",	MTFSF,		MTC_RDO|MTC_CNT },
X#endif
X#ifdef	MTBSF
X	{ "bsf",	"backward skip FILE mark",	MTBSF,		MTC_RDO|MTC_CNT },
X#endif
X	{ "asf",	"absolute FILE mark pos",	MTASF,		MTC_RDO|MTC_CNT },
X#ifdef	MTFSR
X	{ "fsr",	"forward skip record",		MTFSR,		MTC_RDO|MTC_CNT },
X#endif
X#ifdef	MTBSR
X	{ "bsr",	"backward skip record",		MTBSR,		MTC_RDO|MTC_CNT },
X#endif
X#ifdef	MTREW
X	{ "rewind",	"rewind tape",			MTREW,		MTC_RDO },
X#endif
X#ifdef	MTOFFL
X	{ "offline",	"rewind and unload",		MTOFFL,		MTC_RDO },
X	{ "rewoffl",	"rewind and unload",		MTOFFL,		MTC_RDO },
X#endif
X#ifdef	MTNOP
X	{ "status",	"get tape status",		MTNOP,		MTC_RDO },
X#endif
X	{ "nop",	"no operation",			MTNOP,		MTC_RDO },
X#ifdef	MTRETEN
X	{ "retension",	"retension tape cartridge",	MTRETEN,	MTC_RDO },
X#endif
X#ifdef	MTERASE
X	{ "erase",	"erase tape",			MTERASE,	MTC_RW },
X#endif
X#ifdef	MTEOM
X	{ "eom",	"position to EOM",		MTEOM,		MTC_RDO },
X#endif
X
X#if	MTNBSF != NO_NBSF
X	{ "nbsf",	"backward skip FILE mark",	MTNBSF,		MTC_RDO|MTC_CNT },
X#endif
X
X#ifdef	MTLOAD
X	{ "load",	"load tape",			MTLOAD,		MTC_RDO|MTC_NDEL },
X#endif
X
X	{ NULL, 	NULL,				0,		MTC_NONE }
X};
X
XLOCAL	void	usage		__PR((int ex));
XEXPORT	int	main		__PR((int ac, char *av[]));
XLOCAL	void	mtstatus	__PR((struct rmtget *sp));
XLOCAL	char 	*print_key	__PR((Llong key));
XLOCAL	int	openremote	__PR((char *tape));
XLOCAL	int	opentape	__PR((char *tape, struct mt_cmds *cp));
XLOCAL	int	mtioctl		__PR((int cmd, caddr_t arg));
X
XLOCAL void
Xusage(ex)
X	int	ex;
X{
X	struct mt_cmds	*cp;
X	int		i;
X
X	error("Usage: mt [ -f device ] [options] command [ count ]\n");
X	error("Options:\n");
X	error("\t-help\t\tprint this online help\n");
X	error("\t-version\tprint version number\n");
X	error("\t-wready\t\twait for the tape to become ready before doing command\n");
X	error("\n");
X	error("Commands are:\n");
X	for (cp = cmds; cp->mtc_name != NULL; cp++) {
X		error("%s%n", cp->mtc_name, &i);
X		error("%*s%s\n", 14-i, "", cp->mtc_text);
X	}
X	exit(ex);
X}
X
XLOCAL char	opts[] = "f*,t*,version,help,h,debug,wready";
X
Xint
Xmain(ac, av)
X	int	ac;
X	char	*av[];
X{
X	int	cac;
X	char	* const *cav;
X	char	*tape = NULL;
X	char	*cmd = "BADCMD";
X	int	count = 1;
X	struct mt_cmds	*cp;
X
X	save_args(ac, av);
X	cac = --ac;
X	cav = ++av;
X	
X	if (getallargs(&cac, &cav, opts,
X			&tape, &tape,
X			&prvers,
X			&help, &help,
X			&debug,
X			&wready) < 0) {
X		errmsgno(EX_BAD, "Bad Option: '%s'.\n", cav[0]);
X		usage(EX_BAD);
X	}
X	if (help) usage(0);
X	if (prvers) {
X		printf("mt %s (%s-%s-%s)\n\n", "1.28", HOST_CPU, HOST_VENDOR, HOST_OS);
X		printf("Copyright (C) 2000-2009 Jörg Schilling\n");
X		printf("This is free software; see the source for copying conditions.  There is NO\n");
X		printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
X		exit(0);
X	}
X
X	if (tape == NULL && (tape = getenv("TAPE")) == NULL) {
X#ifdef	DEFTAPE
X		tape = DEFTAPE;
X#else
X		errmsgno(EX_BAD, "No default tape defined.\n");
X		usage(EX_BAD);
X		/* NOTREACHED */
X#endif
X	}
X
X	cac = ac;
X	cav = av;
X	if (getfiles(&cac, &cav, opts) == 0) {
X		errmsgno(EX_BAD, "Missing args.\n");
X		usage(EX_BAD);
X	} else {
X		cmd = cav[0];
X		cav++;
X		cac--;	
X	}
X	if (getfiles(&cac, &cav, opts) > 0) {
X		if (*astoi(cav[0], &count) != '\0') {
X			errmsgno(EX_BAD, "Not a number: '%s'.\n", cav[0]);
X			usage(EX_BAD);
X		}
X		if (count < 0) {
X			comerrno(EX_BAD, "negative file number or repeat count\n");
X			/* NOTREACHED */
X		}
X		cav++;
X		cac--;	
X	}
X	if (getfiles(&cac, &cav, opts) > 0) {
X		errmsgno(EX_BAD, "Too many args.\n");
X		usage(EX_BAD);
X	}
X
X	for (cp = cmds; cp->mtc_name != NULL; cp++) {
X		if (strncmp(cmd, cp->mtc_name, strlen(cmd)) == 0)
X			break;
X	}
X	if (cp->mtc_name == NULL) {
X		comerrno(EX_BAD, "Unknown command: %s\n", cmd);
X		/* NOTREACHED */
X	}
X#ifdef	DEBUG
X	error("cmd: %s opcode: %d %s %s\n",
X		cp->mtc_name, cp->mtc_opcode,
X		(cp->mtc_flags & MTC_RDO) != 0 ? "RO":"RW",
X		(cp->mtc_flags & MTC_CNT) != 0 ? "usecount":"");
X#endif
X
X	if ((cp->mtc_flags & MTC_CNT) == 0)
X		count = 1;
X
X#ifdef	USE_REMOTE
X	rmtdebug(debug);
X	(void)openremote(tape);		/* This needs super user privilleges */
X#endif
X#ifdef	HAVE_SETREUID
X	if (setreuid(-1, getuid()) < 0)
X#else
X#ifdef	HAVE_SETEUID
X	if (seteuid(getuid()) < 0)
X#else
X	if (setuid(getuid()) < 0)
X#endif
X#endif
X		comerr("Panic cannot set back effective uid.\n");
X
X	if (opentape(tape, cp) < 0) {
X		if (geterrno() == EIO) {
X			comerrno(EX_BAD, "'%s': no tape loaded or drive offline.\n",
X				tape);
X		} else if ((cp->mtc_flags & MTC_RDO) == 0 &&
X			    geterrno() == EACCES) {
X			comerr("Cannot open '%s': tape may be write protected.\n", tape);
X		} else {
X			comerr("Cannot open '%s'.\n", tape); 
X		}
X		/* NOTREACHED */
X	}
X
X#ifdef	DEBUG
X	error("Tape: %s cmd : %s (%s) count: %d\n", tape, cmd, cp->mtc_name, count);
X#endif
X
X	if (cp->mtc_opcode == MTNOP) {
X		if (strcmp(cp->mtc_name, "nop")) {
X			/*
X			 * Status ioctl
X			 */
X			if (mtioctl(MTIOCGET, (caddr_t)&mt_status) < 0) {
X				comerr("Cannot get mt status from '%s'.\n", tape);
X				/* NOTREACHED */
X			}
X			mtstatus(&mt_status);
X		}
X#if	MTASF == NO_ASF
X	} else if (cp->mtc_opcode == MTASF) {
X		(void)mtioctl(MTIOCGET, (caddr_t)&mt_status);
X		if (mtioctl(MTIOCGET, (caddr_t)&mt_status) < 0) {
X			comerr("Cannot get mt status from '%s'.\n", tape); 
X			/* NOTREACHED */
X		}
X		/*
X		 * If the device does not support to report the current file
X		 * tape file position - rewind the tape, and space forward.
X		 */
X#ifndef	MTF_ASF
X		if (1) {
X#else
X		if (!(mt_status.mt_flags & MTF_ASF) || MTNBSF == NO_NBSF) {
X#endif
X			mt_status.mt_fileno = 0;
X			mt_op.mt_count = 1;
X			mt_op.mt_op = MTREW;
X			if (mtioctl(MTIOCTOP, (caddr_t)&mt_op) < 0) {
X				comerr("%s %s %d failed\n", tape, cp->mtc_name,
X							count);
X				/* NOTREACHED */
X			}
X		}
X		if (count < mt_status.mt_fileno) {
X			mt_op.mt_op = MTNBSF;
X			mt_op.mt_count =  mt_status.mt_fileno - count;
X			/*printf("mt: bsf= %lld\n", (Llong)mt_op.mt_count);*/
X		} else {
X			mt_op.mt_op = MTFSF;
X			mt_op.mt_count =  count - mt_status.mt_fileno;
X			/*printf("mt: fsf= %lld\n", (Llong)mt_op.mt_count);*/
X		}
X		if (mtioctl(MTIOCTOP, (caddr_t)&mt_op) < 0) {
X			if (mtioctl(MTIOCTOP, (caddr_t)&mt_op) < 0) {
X				comerr("%s %s %d failed\n", tape, cp->mtc_name,
X							count);
X				/* NOTREACHED */
X			}
X		}
X#endif
X	} else {
X		/*
X		 * Regular magnetic tape ioctl
X		 */
X		mt_op.mt_op = cp->mtc_opcode;
X		mt_op.mt_count = count;
X		if (mtioctl(MTIOCTOP, (caddr_t)&mt_op) < 0) {
X			comerr("%s %s %lld failed\n", tape, cp->mtc_name,
X						(Llong)mt_op.mt_count);
X			/* NOTREACHED */
X		}
X	}
X	return (0);
X}
X
X/*
X * If we try to make this portable, we need a way to initialize it
X * in an OS independant way.
X * Don't use it for now.
X */
X/*LOCAL */
Xstruct tape_info {
X	short	t_type;		/* type of magnetic tape device	*/
X	char	*t_name;	/* name for prining		*/
X	char	*t_dsbits;	/* "drive status" register	*/
X	char	*t_erbits;	/* "error" register		*/
X};
X#ifdef	XXX
X tapes[] = {
X	{ MT_ISTS,	"ts11",		0,		TSXS0_BITS },
X	{ 0 }
X};
X#endif
X
X/*
X * Interpret the status buffer returned
X */
XLOCAL void
Xmtstatus(sp)
X	register struct rmtget *sp;
X{
X	register struct tape_info *mt = NULL;
X
X#ifdef	XXX
X#ifdef	HAVE_MTGET_TYPE
X	for (mt = tapes; mt->t_type; mt++)
X		if (mt->t_type == sp->mt_type)
X			break;
X#endif
X#endif
X
X#if	defined(MTF_SCSI)
X
X	if ((sp->mt_xflags & RMT_FLAGS) && (sp->mt_flags & MTF_SCSI)) {
X		/*
X		 * Handle SCSI tape drives specially.
X		 */
X		if (sp->mt_xflags & RMT_TYPE) {
X			if (mt != NULL && mt->t_type == sp->mt_type)
X				printf("%s tape drive:\n", mt->t_name);
X			else
X				printf("%s tape drive:\n", "SCSI");
X		} else {
X			printf("Unknown SCSI tape drive:\n");
X		}
X		printf("   sense key(0x%llx)= %s   residual= %lld   ",
X			sp->mt_erreg, print_key(sp->mt_erreg), sp->mt_resid);
X		printf("retries= %lld\n", sp->mt_dsreg);
X	} else
X#endif	/* MTF_SCSI */
X		{
X		/*
X		 * Handle other drives below.
X		 */
X		if (sp->mt_xflags & RMT_TYPE) {
X			if (mt == NULL || mt->t_type == 0) {
X				printf("Unknown tape drive type (0x%llX):\n", (Ullong)sp->mt_type);
X			} else {
X				printf("%s tape drive:\n", mt->t_name);
X			}
X		} else {
X			printf("Unknown tape drive:\n");
X		}
X		if (sp->mt_xflags & RMT_RESID)
X			printf("   residual= %lld", sp->mt_resid);
X		/*
X		 * If we implement better support for specific OS,
X		 * then we may want to implement something like the
X		 * *BSD kernel %b printf format (e.g. printreg).
X		 */
X		if (sp->mt_xflags & RMT_DSREG)
X			printf  ("   ds = %llX", (Ullong)sp->mt_dsreg);
X
X		if (sp->mt_xflags & RMT_ERREG)
X			printf  ("   er = %llX", sp->mt_erreg);
X		putchar('\n');
X	}
X	printf("   file no= %lld   block no= %lld\n",
X			(sp->mt_xflags & RMT_FILENO)?
X				sp->mt_fileno:
X				(Llong)-1,
X			(sp->mt_xflags & RMT_BLKNO)?
X				sp->mt_blkno:
X				(Llong)-1);
X
X	if (sp->mt_xflags & RMT_BF)
X		printf("   optimum blocking factor= %ld\n", sp->mt_bf);
X
X	if (sp->mt_xflags & RMT_FLAGS)
X		printf("   flags= 0x%llX\n", sp->mt_flags);
X}
X
Xstatic char *sense_keys[] = {
X	"No Additional Sense",		/* 0x00 */
X	"Recovered Error",		/* 0x01 */
X	"Not Ready",			/* 0x02 */
X	"Medium Error",			/* 0x03 */
X	"Hardware Error",		/* 0x04 */
X	"Illegal Request",		/* 0x05 */
X	"Unit Attention",		/* 0x06 */
X	"Data Protect",			/* 0x07 */
X	"Blank Check",			/* 0x08 */
X	"Vendor Unique",		/* 0x09 */
X	"Copy Aborted",			/* 0x0a */
X	"Aborted Command",		/* 0x0b */
X	"Equal",			/* 0x0c */
X	"Volume Overflow",		/* 0x0d */
X	"Miscompare",			/* 0x0e */
X	"Reserved"			/* 0x0f */
X};
X
XLOCAL char *
Xprint_key(key)
X	Llong	key;
X{
X	static	char keys[32];
X
X	if (key >= 0 && key < (sizeof(sense_keys)/sizeof(sense_keys[0])))
X		return (sense_keys[key]);
X	js_snprintf(keys, sizeof(keys), "Unknown Key: %lld", key);
X	return (keys);
X}
X
X/*--------------------------------------------------------------------------*/
XLOCAL int	isremote;
XLOCAL int	remfd	= -1;
XLOCAL int	mtfd;
XLOCAL char	*remfn;
X
X#ifdef	USE_REMOTE
XLOCAL int
Xopenremote(tape)
X	char	*tape;
X{
X	char	host[128];
X
X	if ((remfn = rmtfilename(tape)) != NULL) {
X		rmthostname(host, sizeof(host), tape);
X		isremote++;
X
X		if (debug)
X			errmsgno(EX_BAD, "Remote: %s Host: %s file: %s\n",
X							tape, host, remfn);
X
X		if ((remfd = rmtgetconn(host, 4096, 0)) < 0)
X			comerrno(EX_BAD, "Cannot get connection to '%s'.\n",
X				/* errno not valid !! */		host);
X	}
X	return (isremote);
X}
X#endif
X
XLOCAL int
Xopentape(tape, cp)
X		char		*tape;
X	register struct mt_cmds *cp;
X{
X	int	ret;
X	int	n = 0;
X	int	oflag;
X
X	oflag = (cp->mtc_flags & MTC_RDO) ? O_RDONLY : O_RDWR;
X#ifdef	O_NDELAY
X	if (cp->mtc_flags & MTC_NDEL)
X		oflag |= O_NDELAY;
X#endif
X
Xretry:
X	ret = 0;
X	if (isremote) {
X#ifdef	USE_REMOTE
X		if (rmtopen(remfd, remfn, oflag) < 0)
X			ret = -1;
X#else
X		comerrno(EX_BAD, "Remote tape support not present.\n");
X#endif
X	} else if ((mtfd = open(tape, oflag)) < 0) {
X			ret = -1;
X	}
X	if (wready && n++ < 120 && (geterrno() == EIO || geterrno() == EBUSY)) {
X		sleep(1);
X		goto retry;
X	}
X	return (ret);
X}
X
XLOCAL int
Xmtioctl(cmd, arg)
X	int	cmd;
X	caddr_t	arg;
X{
X	int	ret = -1;
X	struct rmtget *mtp;
X	struct mtop *mop;
X
X	if (isremote) {
X#ifdef	USE_REMOTE
X		switch (cmd) {
X
X		case MTIOCGET:
X			ret = rmtxstatus(remfd, (struct rmtget *)arg);
X			if (ret < 0)
X				return (ret);
X
X			mtp = (struct rmtget *)arg;
X/*#define	DEBUG*/
X#ifdef	DEBUG
Xerror("type: %llX ds: %llX er: %llX resid: %lld fileno: %lld blkno: %lld flags: %llX bf: %ld\n",
Xmtp->mt_type, mtp->mt_dsreg, mtp->mt_erreg, mtp->mt_resid, mtp->mt_fileno,
Xmtp->mt_blkno, mtp->mt_flags, mtp->mt_bf);
X#endif
X			break;
X		case MTIOCTOP:
X			mop = (struct mtop *)arg;
X			ret = rmtioctl(remfd, mop->mt_op, mop->mt_count);
X			break;
X		default:
X			comerrno(ENOTTY, "Invalid mtioctl.\n");
X			/* NOTREACHED */
X		}
X#else
X		comerrno(EX_BAD, "Remote tape support not present.\n");
X#endif
X	} else {
X#ifdef	HAVE_IOCTL
X		if (cmd == MTIOCGET) {
X			struct mtget mtget;
X
X			ret = ioctl(mtfd, cmd, &mtget);
X			if (ret >= 0) {
X				if (_mtg2rmtg((struct rmtget *)arg, &mtget) < 0)
X					ret = -1;
X			}
X		} else
X		ret = ioctl(mtfd, cmd, arg);
X#else
X		ret = -1;
X#ifdef	ENOSYS
X		seterrno(ENOSYS);
X#else
X		seterrno(EINVAL);
X#endif
X#endif
X	}
X	return (ret);
X}
END-of-star-1.5.2/mt/mt.c
echo x - star-1.5.2/mt/Makefile.man
sed 's/^X//' >star-1.5.2/mt/Makefile.man << 'END-of-star-1.5.2/mt/Makefile.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	smt
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	smt.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/mt/Makefile.man
echo x - star-1.5.2/mt/smt.1
sed 's/^X//' >star-1.5.2/mt/smt.1 << 'END-of-star-1.5.2/mt/smt.1'
X. \" @(#)smt.1	1.1 04/09/26 Copyr 2004 J. Schilling
X. \"  Manual Seite fuer smt
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U
X.if t .ds s \\(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH SMT 1 "04/09/26" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xsmt \- magnetic tape control
X.SH SYNOPSIS
X.B smt
X[
X.BI \-f " tapename
X]
X.I command
X[
X.I count
X] 
X.SH DESCRIPTION
X.PP
XThe
X.B smt
Xprogram sends commands to a local or a remote magnetic tape drive.
X.PP
XThe
X.I count
Xoperand specifies the number of times the requested command is
Xto be performed. If
X.I count
Xis omitted, the value of
X.I count
Xdefaults to one.
X.SH OPTIONS
X.TP
X.B \-help
XPrints a summary of the options for
X.BR smt (1)
Xand exits.
X.TP
X.B \-version
XPrints the 
X.B smt
Xversion number string and exists.
X.TP
X.B \-debug
Xprint additional debug messages.
X.TP
X.BI \-f " tapename
X.TP
X.BI \-t " tapename
XSet the raw tape device to use, otherwise
X.B smt
Xuses a system specific default for the rtape device.
XIf 
X.B smt
Xis installed suid root or if it has been called by root,
X.I tapename
Xmay be in remote syntax: user@host:filename as in 
X.BR rcp (1)
Xeven if 
Xinvoked by non root users.
XSee SUID NOTES for more information.
X.sp
XTo make a file local although it includes a colon (:), the filename
Xmust start with:
X.IR "'/'" ,
X.IR "'./'" " or"
X.I "'../'"
X.sp
XNote that if
X.B smt 
Xtalks to an old 
X.B rmt
Xremote tape server that does not support symbolic open modes,
Xit does not open a remote tape with the 
X.B O_CREAT
Xopen flag because this would be extremely dangerous.
XIf the 
X.B rmt 
Xserver on the other side is the 
X.B rmt
Xserver that comes with 
X.B star
Xor the GNU
X.B rmt
Xserver,
X.B smt
Xmay use the symbolic mode for the open flags.
XOnly the symbolic open modes allow to send all possible open
Xmodes in a portable way to remote tape servers.
X.sp
XIt is recommended to use the 
X.B rmt
Xserver that comes with
X.BR star .
XIt is the only
X.B rmt
Xserver that gives platform independent compatibility with BSD, Sun and GNU
X.B rmt 
Xclients and it includes security features that may be set up in /etc/default/rmt.
X.sp
XSee ENVIRONMENT section for information on how to use 
X.B ssh(1)
Xto create a remote tape server connection.
X.TP
X.B \-wready
XWait for the tape drive to become ready before executing the command.
X.SH COMMANDS
XThe following commands are supported:
X.TP 12
X.B eof
X.TP
X.B weof
XWrite
X.I count
XEOF (FILE) marks at the current position on the tape.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B fsf
XForward skip over
X.I count
XFILE marks.
XThe tape is positioned on the first block of the file.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B bsf
XBackward skip 
X.I count
XFILE marks.
XThe tape is positioned on side of the FILE mark
Xthat is closer to the beginning of the tape.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B asf
XAbsolute FILE mark positioning to file number
X.IR count .
XThis is equivalent to a rewind followed by a
X.BI fsf " count.
X.sp
XA RMT version 1 server is needed to run this command on a remote tape drive.
X.TP
X.B fsr
XForward skip
X.I count 
Xtape records.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B bsr
XBackward skip
X.I count 
Xtape records.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B rewind
XRewind the tape.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B offline
X.TP
X.B rewoffl
XRewind the tape.
XIf the specified tape drive allows to take the drive off-line
Xor to unload the tape, a off-line or unload operation is performed
Xin addition.
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B status
XRetrieve and print status information for the tape drive.
X.sp
XA RMT version 1 server is needed to get correct status information
Xon a remote tape drive.
X.TP
X.B nop
XNo operation.
XIf you only like to wait for the tape drive to become ready, call
X.BR "smt -wready nop" .
X.sp
XThis command may be run remotely with any BSD compliant old rmt server.
X.TP
X.B retension
XRetension the tape. This only makes sende with cartridge tape drives.
X.sp
XA RMT version 1 server is needed to run this command on a remote tape drive.
X.TP
X.B erase
XErase the entire tape. This may take a long time (up to several hours)
Xdepending on the tape drive and the medium.
X.sp
XA RMT version 1 server is needed to run this command on a remote tape drive.
X.TP
X.B eom
XPosition the tape to the end of the recorded media.
XThis allows to append data to previously written tapes.
X.sp
XA RMT version 1 server is needed to run this command on a remote tape drive.
X.TP
X.B nbsf
XBackward skip 
X.I count
XFILE marks.
XThe tape is positioned on side of the FILE mark
Xthat is closer to the end of the tape. This is before the first
Xblock of the file.
XThe 
X.B nbsf 
Xcommand is equivalent to 
X.I count+1
X.B bsf's
Xfollowed by one
X.BR fsf .
X.sp
XA RMT version 1 server is needed to run this command on a remote tape drive.
X.TP
X.B load
XIf the specified tape drive allows to take the drive on-line
Xor to load the tape, a on-line or load operation is performed.
Xin addition.
XFor remote tape drives, this command only works if the remote tape server
Xsupports symbolic open modes as the command needs the 
X.I O_NDELAY
Xflag to succeed.
X.sp
XA RMT version 1 server is needed to run this command on a remote tape drive.
X.SH EXAMPLES
X.SH ENVIRONMENT
X.TP
X.B RSH
XIf the 
X.B RSH
Xenvironment is present, the remote connection will not be created via
X.BR rcmd (3)
Xbut by calling the program pointed to by
X.BR RSH .
XUse e.g. 
X.BR RSH= /usr/bin/ssh
Xto create a secure shell connection.
X.sp
XNote that this forces 
X.B smt
Xto create a pipe to the 
X.B rsh(1)
Xprogram and disallows
X.B smt
Xto directly access the network socket to the remote server.
XThis makes it impossible to set up performance parameters and slows down
Xthe connection compared to a 
X.B root
Xinitiated
X.B rcmd(3)
Xconnection.
X.TP
X.B RMT
XIf the 
X.B RMT
Xenvironment is present, the remote tape server will not be the program
X.B /etc/rmt
Xbut the program pointed to by
X.BR RMT .
XNote that the remote tape server program name will be ignored if you log in
Xusing an account that has been created with a remote tape server program as
Xlogin shell.
X.TP
X.B TAPE
XIn case no 
X.B \-f
Xoption pas been specified, the default tape name is taken from the
X.B TAPE
Xenvironment.
X
X.SH FILES
X.SH "SEE ALSO"
X.BR spax (1), 
X.BR suntar (1), 
X.BR scpio (1), 
X.BR tar (1), 
X.BR cpio (1), 
X.BR pax (1), 
X.BR rcp (1), 
X.BR mt (1),
X.BR rmt (1), 
X.BR match (1), 
X.BR dd (1), 
X.BR sdd (1), 
X.BR rsh (1),
X.BR ssh (1),
X.BR star (1),
X.BR star (4/5),
X.BR rcmd (3),
X.SH DIAGNOSTICS
X.SH NOTES
XIf the remote tape server is running Linux and the remote tape server on
Xsuch a system is not the rmt server that comes with 
X.BR star (1),
Xthen completely unexpected results (including unexpectedly erased tapes)
Xmay occur. This is because Linux ignores the numbering values for the
Xmagnetic tape op codes and only the rmt server from
X.BR star (1)
Xmaps to standard values.
XThe standard rmt server on Linux for this reason may not be called
XBSD compliant.
X.SH BUGS
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xschilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
Xor
X.B
Xjoerg@schily.isdn.cs.tu\-berlin.de
END-of-star-1.5.2/mt/smt.1
echo x - star-1.5.2/mt/mt.mk1
sed 's/^X//' >star-1.5.2/mt/mt.mk1 << 'END-of-star-1.5.2/mt/mt.mk1'
X#ident "@(#)mt.mk1	1.1 10/05/12 "
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	mt
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	mt.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/mt/mt.mk1
echo x - star-1.5.2/mt/mt.1
sed 's/^X//' >star-1.5.2/mt/mt.1 << 'END-of-star-1.5.2/mt/mt.1'
X.so man1/smt.1
X.\" "@(#)mt.1	1.1 10/05/12 "
END-of-star-1.5.2/mt/mt.1
echo c - star-1.5.2/libdeflt
mkdir -p star-1.5.2/libdeflt > /dev/null 2>&1
echo x - star-1.5.2/libdeflt/default.c
sed 's/^X//' >star-1.5.2/libdeflt/default.c << 'END-of-star-1.5.2/libdeflt/default.c'
X/* @(#)default.c	1.9 11/11/28 Copyright 1997-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)default.c	1.9 11/11/28 Copyright 1997-2011 J. Schilling";
X#endif
X/*
X *	Copyright (c) 1997-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/standard.h>
X#include <schily/stdio.h>
X#include <schily/string.h>
X#include <schily/types.h>	/* For strncasecmp  size_t */
X#include <schily/unistd.h>
X#include <schily/deflts.h>
X
X#define	MAXLINE	512
X
Xstatic	FILE	*dfltfile	= (FILE *)NULL;
Xstatic	const char *dfltsect	= NULL;
Xstatic	int	dfltflags	= DC_STD;
X
XEXPORT	int	defltopen	__PR((const char *name));
XEXPORT	int	defltclose	__PR((void));
XEXPORT	int	defltsect	__PR((const char *name));
XEXPORT	int	defltfirst	__PR((void));
XEXPORT	char	*defltread	__PR((const char *name));
XEXPORT	char	*defltnext	__PR((const char *name));
XEXPORT	int	defltcntl	__PR((int cmd, int flags));
X
XEXPORT int
Xdefltopen(name)
X	const char	*name;
X{
X	if (dfltfile != (FILE *)NULL)
X		fclose(dfltfile);
X
X	if (name == (char *)NULL) {
X		fclose(dfltfile);
X		dfltfile = NULL;
X		return (0);
X	}
X
X	if ((dfltfile = fopen(name, "r")) == (FILE *)NULL) {
X		return (-1);
X	}
X	dfltflags = DC_STD;
X	dfltsect  = NULL;
X
X	return (0);
X}
X
XEXPORT int
Xdefltclose()
X{
X	int	ret;
X
X	if (dfltfile != (FILE *)NULL) {
X		ret = fclose(dfltfile);
X		dfltfile = NULL;
X		return (ret);
X	}
X	return (0);
X}
X
XEXPORT int
Xdefltsect(name)
X	const char	*name;
X{
X	size_t	len;
X
X	if (name == NULL) {
X		dfltsect = NULL;
X		return (0);
X	}
X	if (*name != '[')
X		return (-1);
X
X	len = strlen(name);
X	if (len >= MAXLINE)
X		return (-1);
X	if (len < 3 || name[len-1] != ']')
X		return (-1);
X
X	dfltsect = name;
X	return (0);
X}
X
XEXPORT int
Xdefltfirst()
X{
X	if (dfltfile == (FILE *)NULL) {
X		return (-1);
X	}
X	rewind(dfltfile);
X	if (dfltsect) {
X		register int	len;
X		register int	sectlen;
X			char	buf[MAXLINE];
X
X		sectlen = strlen(dfltsect);
X		while (fgets(buf, sizeof (buf), dfltfile)) {
X			len = strlen(buf);
X			if (buf[len-1] == '\n') {
X				buf[len-1] = 0;
X			} else {
X				continue;
X			}
X			if (buf[0] != '[')
X				continue;
X			if (dfltflags & DC_CASE) {
X				if (strncmp(dfltsect, buf, sectlen) == 0) {
X					return (0);
X				}
X			} else {
X				if (strncasecmp(dfltsect, buf, sectlen) == 0) {
X					return (0);
X				}
X			}
X		}
X		return (-1);
X	}
X	return (0);
X}
X
XEXPORT char *
Xdefltread(name)
X	const char	*name;
X{
X	if (dfltfile == (FILE *)NULL) {
X		return ((char *)NULL);
X	}
X	defltfirst();
X	return (defltnext(name));
X}
X
XEXPORT char *
Xdefltnext(name)
X	const char	*name;
X{
X	register int	len;
X	register int	namelen;
X	static	 char	buf[MAXLINE];
X
X	if (dfltfile == (FILE *)NULL) {
X		return ((char *)NULL);
X	}
X	namelen = strlen(name);
X
X	while (fgets(buf, sizeof (buf), dfltfile)) {
X		len = strlen(buf);
X		if (buf[len-1] == '\n') {
X			buf[len-1] = 0;
X		} else {
X			return ((char *)NULL);
X		}
X		/*
X		 * Check for end of current section. Seek to the end of file to
X		 * prevent other calls to defltnext() return unexpected data.
X		 */
X		if (dfltsect != NULL && buf[0] == '[') {
X			fseek(dfltfile, (off_t)0, SEEK_END);
X			return ((char *)NULL);
X		}
X		if (dfltflags & DC_CASE) {
X			if (strncmp(name, buf, namelen) == 0) {
X				return (&buf[namelen]);
X			}
X		} else {
X			if (strncasecmp(name, buf, namelen) == 0) {
X				return (&buf[namelen]);
X			}
X		}
X	}
X	return ((char *)NULL);
X}
X
XEXPORT int
Xdefltcntl(cmd, flags)
X	int	cmd;
X	int	flags;
X{
X	int  oldflags = dfltflags;
X
X	dfltflags = flags;
X
X	return (oldflags);
X}
END-of-star-1.5.2/libdeflt/default.c
echo x - star-1.5.2/libdeflt/Makefile
sed 's/^X//' >star-1.5.2/libdeflt/Makefile << 'END-of-star-1.5.2/libdeflt/Makefile'
X#ident "@(#)Makefile	1.1 06/09/15 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= libdeflt.mk libdeflt_p.mk $(NO_SHL)shldeflt.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/libdeflt/Makefile
echo x - star-1.5.2/libdeflt/libdeflt.mk
sed 's/^X//' >star-1.5.2/libdeflt/libdeflt.mk << 'END-of-star-1.5.2/libdeflt/libdeflt.mk'
X#ident @(#)libdeflt.mk	1.2 11/04/15 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	deflt
X#CPPOPTS +=	-Ispecincl
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
X#CC=		echo "	==> COMPILING \"$@\""; cc
X###########################################################################
X
END-of-star-1.5.2/libdeflt/libdeflt.mk
echo x - star-1.5.2/libdeflt/Targets
sed 's/^X//' >star-1.5.2/libdeflt/Targets << 'END-of-star-1.5.2/libdeflt/Targets'
XCFILES=		default.c
END-of-star-1.5.2/libdeflt/Targets
echo x - star-1.5.2/libdeflt/libdeflt_p.mk
sed 's/^X//' >star-1.5.2/libdeflt/libdeflt_p.mk << 'END-of-star-1.5.2/libdeflt/libdeflt_p.mk'
X#ident @(#)libdeflt_p.mk	1.3 08/01/11 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/profiled
XSUBINSDIR=	/profiled
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	deflt
X#CPPOPTS +=	-Ispecincl
XCOPTS +=	$(COPTGPROF)
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
X#CC=		echo "	==> COMPILING \"$@\""; cc
X###########################################################################
END-of-star-1.5.2/libdeflt/libdeflt_p.mk
echo x - star-1.5.2/libdeflt/noshldeflt.mk
sed 's/^X//' >star-1.5.2/libdeflt/noshldeflt.mk << 'END-of-star-1.5.2/libdeflt/noshldeflt.mk'
X#ident "@(#)noshldeflt.mk	1.1 06/07/21 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-star-1.5.2/libdeflt/noshldeflt.mk
echo x - star-1.5.2/libdeflt/shldeflt.mk
sed 's/^X//' >star-1.5.2/libdeflt/shldeflt.mk << 'END-of-star-1.5.2/libdeflt/shldeflt.mk'
X#ident @(#)shldeflt.mk	1.1 05/06/13 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/pic
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	deflt
X#CPPOPTS +=	-Ispecincl
Xinclude		Targets
XLIBS=		-lc
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
X#CC=		echo "	==> COMPILING \"$@\""; cc
X###########################################################################
END-of-star-1.5.2/libdeflt/shldeflt.mk
echo x - star-1.5.2/libdeflt/libdeflt-mapvers
sed 's/^X//' >star-1.5.2/libdeflt/libdeflt-mapvers << 'END-of-star-1.5.2/libdeflt/libdeflt-mapvers'
X# /* @(#)libdeflt-mapvers        1.1 10/10/02 Copyright 2005-2010 J. Schilling */
X
XSCHILY_1.0 {
Xglobal:
X	defltopen;
X	defltfirst;
X	defltclose;
X	defltcntl;
X	defltnext;
X	defltread;
X
Xlocal:
X	*;
X};
END-of-star-1.5.2/libdeflt/libdeflt-mapvers
echo x - star-1.5.2/AN-1.3
sed 's/^X//' >star-1.5.2/AN-1.3 << 'END-of-star-1.5.2/AN-1.3'
XNewsgroups: comp.unix.admin,comp.unix.misc,alt.os.linux,alt.sys.sun,bln.comp.sun,bln.comp.unix,comp.os.linux.development.apps,comp.os.linux.misc,comp.sys.hp.apps,comp.sys.hp.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.misc,comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.misc,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.bsd.netbsd.misc,comp.unix.solaris,de.comp.os.linux.misc,de.comp.os.unix,linux.dev.admin,linux.dev.apps,maus.os.linux,maus.os.linux68k,maus.os.unix,uk.comp.os.linux
XSubject: Star-1.3 source has been released
X
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximlementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.fokus.gmd.de/pub/unix/star
X
XChanges since star-1.2:
X
X-	star -c now don't uses STDIO
X	This speeds things up (15% on Solaris 50% on Linux due to the bad 
X	STDIO implementation on Linux)
X
X	Star now usually needs significant less user CPU time than GNU tar.
X
X	On Intel processors star uses about the same CPU time than GNU tar.
X	This is because star uses structured code which is punished by the
X	Intel Processor implementation.
X
X	Star is now at least 30% faster than ufsdump
X
X-	Experimental -Hxustar option to create xstar archives without the
X	extra 'tar' signature at the end of the tar header.
X	This makes the xstar format 100% POSIX compliant too.
X
X-	Compat code for old tar option behaviour.
X	Allows all but to use "tar -cf file" on an existent file. 
X	tar -cf file remains valid if "file" does not exist or is empty. 
X	This keeps the star behaviour not to clobber files on miss typed
X	command lines and gives old tar compatibility.
X
X-	star now realises if the tar archive is too small and not a multiple
X	of 512 bytes.
X
X-	Converted to the new makefile system that uses autoconf.
X
X-	-u/-r options enabled
X
X-	-diff now checks for sparse files too.
X	Note that this will give probems if the file is located on a buggy
X	HP-UX NFS file server.
X
X-	-F option new to exclude *.o SCCS/* and similar
X
X-	-w optionm as alias for -I
X	-I will go away with old behavior in star-1.4
X
X-	Exit code now reflects the status of the exeution
X
X-	New error statistic prints counts for several common error situations.
X
X-	Print a warning if found more than 12 Bits in mode Feld
X	This helps to find non POSIX compliant Sun tar & GNU tar archives
X
X
X-	Added code to use the _FIOAI ioctl on Solaris to speed up
X		archiving sparse files > 200 times. You need a hacked
X		ufs filesystem in order to use this on Solaris 2.6
X		ftp://ftp.fokus.gmd.de/pub/unix/kernel/ufs
X
X-	Workaround for a bug in Sun's tar on Solaris that creates
X	illegal null terminated filenames (if the filename is 
X	exactly 100 chars long).
X
X-	Fixed a problem with autoconf & SCO for major()...
X
X-	Check VOLHDR on extract
X
X-	New option -bz to call bzip2 as compress program.
X
X-	added O_BINARY to allow star to work corectly on Cygwin32
X
X-	Avoid seekdir() in Cygwin32 
X
X-	New option -refresh-old-files to prevent star from creating
X	new files while extracting an archive.
X
X-	Don't strip leading '/' from targets of symlinks
X
X-	Star now knows that that DOS filesystems increment the time
X	stamp of a file only in 2 second steps.
X	This is needed to make the skipping of older files on extraction
X	work correctly.
X
X-	Correctly skip a file on tape if the filename is longer than the
X	OS can handle.
X
X-	Always make the path tables at least 1024 bytes even when the actual OS
X	does not allow that much. This helps to read archives from other OS.
X
X-	Workaround for the Cygwin bug that causes maxfilename to be longer
X	than maxpathname.
X
X-	Workaround for Cygwin bug that return ENOTEMPTY for
X	rmdir() if the arg does not refer to a directory.
X	***********
X	We need to check this if Cygwin-1.x hast been corrected
X	***********
X
X-	Workaround for the fact that Cygwin32 does not allow us to set the
X	file access times for read only files.
X
X-	Print warning for unknown archive types.
X
X-	Knowledge base for
X
X		Packed, Gzip compressed, LZW compressed, Freezed,
X		SCO LZH compressed and bzip2
X
X	compressed magic numbers gives hints for correct usage of -z or -bz
X	options. Tell user about the compression program that will
X	help to unpack the archive.
X
X-	Star offeres full FIFO and remote tape access support even
X	on Cygwin32.
X
X-	Better portability support
X
X-	Support for various new OS platforms (e.g. QNX)
X
X-	New option -refresh as alias to -refresh-old-files
X
X-	New option -hpdev allows 24 bits in dev_minor using 8 octal
X	digits. Note that although it allows to ctreate tar archives
X	that can be read with HP-UX tar, this creates tar archives
X	which violate POSIX.
X
X-	New option -modebits allows to create tar archives that include
X	more than 12 bits from st_mode. Note this create tar archives
X	that violate POSIX but some tar implementations insist in reading
X	such nonstandard archives....
X
X-	New option -copylinks allows to copy hard/symlinks targets 
X	rather than creating a link. This helps to extract tar files
X	on systems that do not implement links (e.g. OS/2).
X
X-	Print a message for EFBIG on the archive
X
X-	Suppress the sync pipe read error messages when another
X	error message is already printed and the sync pipe read error
X	is only a result of this other error.
X
X-	set the time of a file to 0 (1. Jan 1970) if an error occurs.
X	This allows to use another runf of star to overwrite this file
X	whithout having to specify the -U flag.
X
X-	Use fsync() to force file consistence on NFS filesystems.
X
X-	Allow 7 octal numbers in 8 Byte fields in POSIX mode.
X	This gives 21 bits in minor device numbers.
X
X-	New base 256 coding allows 63 bits in minor device numbers.
X	This coding has been negotiated with the new gnutar 
X	maintainer.
X	Warning, this is not yet 100% stable code but it allows
X	to archive device files on FreeBSD.
X
X-	Use mkfifo() if present
X
X-	Add remove_file support to more than plain files only.
X
X-	Added FIFO suport for OS/2
X
X-	Better portability support
X
X-	Automated de-configuration of the FIFO on platforms
X	that do not support shared memory
X
X-	Fix for a buffer overflow problem with remote tape access.
X
X-	Remote tape client in star now supports the GNU extension
X	for the open command that transmitts abstract open(2) flags.
X
X-	Now includes a /etc/rmt remote tape server.
X	This is the first open source remote tape server that
X	is as portable and interoperable as possible.
X	Support for Sun and GNU extensions.
X
X-	New mt program
X
X-	rmt Program now supports additional security features
X	that are driven by entries in /etc/default/rmt
X
X-	Man page created for rmt.
X
X-	align_test.c removed from lib/
X
X-	avoffset.c removed from lib/
X
X-	several functions now use js_snprintf() instead of
X	sprintf()
X
X-	star now supports to open remote files with O_CREATE
X	if the remote tape sever (/etc/rmt) is the Schily rmt
X	sever or the GNU rmt server
X
X-	Format strings of printf-like functions checked and corrected.
X
X-	FIFO now should work on OS/2 too
X
X-	Fixed a autoconf typo in star_unix.c that 
X	disabled _FIOSATIME and thus star -c -atime ...
X	did modify ctime when trying to reset atime after
X	reading a file.
X
X-	Fixed a typo in mt.c (active if no default tape definition exists)
X
X-	Allow mt.c to compile on systems that have no sys/mtio.h
X	e.g. SCO
X
X-	mt.c will now compile on HP-UX
X
X-	support for win98-2 & win2000 & Win ME
X
X-	star list= ... will now skip empty lines (llen == 0)
X
X-	Support for dev_t > 32 bits (e.g. Solaris in 64 bit mode)
X
X-	Support for Apollo Domain/OS (e.g. mmap() specials)
X
X-	Support for MacOS X (Darwin)
X
X-	Support for GCC on IRIX
X
X-	New option -onull as alias for -nullout to make star behave similar to sdd
X
X-	Made all options that include a '_' obolete and replaced
X	'_' by '-' in the option names.
X
X-	Long Listing now prints a 'l' for files with mandatory record locking
X
X-	Long listing for major/minor now unsigned
X
X-	timedefs.h typo fixed (caused time.h & sys/time.h never be both included)
X
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully funtional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix) handling added
X1994	Xstar format (extended Posix) defined and introduced
X1995	Ported to many platforms
X
XSupported platforms:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux,
XHP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD, OpenBSD,
XOSF-1, True-64, BeOS, Apollo Domain/OS, Next-STep, 
XOS/2, SCO-openserver, SCO-unixware, Cygwin (Win32),
XSony NewsOS,  BSDi (BSD/OS), QNX, Apple Rhapsody,
XMacOS X
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
XStar is able to make backups with more than 12MB/s if the
Xdisk and tape drive support such a speed. This is more than
Xdouble the speed that ufsdump will get.
XAmpex got 13.5 MB/s with their new DLT tape drive.
XUfsdump got a maximum speed of about 6MB/s with the same hardware.
X
XStar development started 1982, development is still in progress.
XThe current version of star is stable and 
XI never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  may reset access time after doing backup
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete description
X				  of bugs found in other tar implementations.
X
XHave a look at the manual page, it is included in the distribution.
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	schilling@fokus.gmd.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/AN-1.3
echo x - star-1.5.2/AN-1.3.1
sed 's/^X//' >star-1.5.2/AN-1.3.1 << 'END-of-star-1.5.2/AN-1.3.1'
XNewsgroups: comp.unix.admin,comp.unix.misc,alt.os.linux,alt.sys.sun,bln.comp.sun,bln.comp.unix,comp.os.linux.development.apps,comp.os.linux.misc,comp.sys.hp.apps,comp.sys.hp.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.misc,comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.misc,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.bsd.netbsd.misc,comp.unix.solaris,de.comp.os.linux.misc,de.comp.os.unix,linux.dev.admin,linux.dev.apps,maus.os.linux,maus.os.linux68k,maus.os.unix,uk.comp.os.linux
XSubject: Star-1.3 source has been released
X
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximlementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.fokus.gmd.de/pub/unix/star
X
XChanges since star-1.3:
X
X-	Fixed a bug introduced a few days before releasing 1.3 that
X	caused star -atime not to work on Solaris.
X
X	Star now again is able to do archiving without modifying
X	times on Solaris if the user us root.
X
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully funtional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix) handling added
X1994	Xstar format (extended Posix) defined and introduced
X1995	Ported to many platforms
X
XSupported platforms:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux,
XHP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD, OpenBSD,
XOSF-1, True-64, BeOS, Apollo Domain/OS, Next-STep, 
XOS/2, SCO-openserver, SCO-unixware, Cygwin (Win32),
XSony NewsOS,  BSDi (BSD/OS), QNX, Apple Rhapsody,
XMacOS X
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
XStar is able to make backups with more than 12MB/s if the
Xdisk and tape drive support such a speed. This is more than
Xdouble the speed that ufsdump will get.
XAmpex got 13.5 MB/s with their new DLT tape drive.
XUfsdump got a maximum speed of about 6MB/s with the same hardware.
X
XStar development started 1982, development is still in progress.
XThe current version of star is stable and 
XI never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  may reset access time after doing backup
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete description
X				  of bugs found in other tar implementations.
X
XHave a look at the manual page, it is included in the distribution.
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	schilling@fokus.gmd.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/AN-1.3.1
echo x - star-1.5.2/AN-1.4
sed 's/^X//' >star-1.5.2/AN-1.4 << 'END-of-star-1.5.2/AN-1.4'
XNewsgroups: comp.unix.admin,comp.unix.misc,alt.os.linux,alt.sys.sun,bln.comp.sun,bln.comp.unix,comp.os.linux.development.apps,comp.os.linux.misc,comp.sys.hp.apps,comp.sys.hp.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.misc,comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.misc,comp.unix.aix,comp.unix.bsd.freebsd.misc,comp.unix.bsd.netbsd.misc,comp.unix.solaris,de.comp.os.linux.misc,de.comp.os.unix,linux.dev.admin,linux.dev.apps,maus.os.linux,maus.os.linux68k,maus.os.unix,uk.comp.os.linux
XSubject: Star-1.4 source has been released
X
X***************
XPlease have a look at the German open Source Center BerliOS at www.berlios.de
XBerliOS will continue to support free hosting of cryptography projects even
Xwhen US laws change and don't allow to host cryptography projects in the USA.
XAlso look at sourcewell.berlios.de, the first Open Source announcement service
Xthat itself is implemented as Open Source project.
X***************
X
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximplementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.fokus.gmd.de/pub/unix/star
X
XChanges since star-1.3.1:
X
X-	Used lint on Solaris to clean up code.
X	GCC does not help that much....
X
X-	star now supports large files
X
X	Files up to 8 GB are supported in a 100% POSIX compliant
X	way. Files > 8 GB use a proprietary number format that I designed
X	some years ago but I negotiated this format with the current
X	GNU tar maintainer - GNU tar uses the same format.
X
X-	rmt now is large file aware too.
X
X-	rmt (both: this server and the client in star) 
X	now also abstract from the lseek whence values.
X
X		SEEK_SET is mapped to 0 on the wire
X		SEEK_CUR is mapped to 1 on the wire
X		SEEK_END is mapped to 2 on the wire
X
X-	Changed POSIX USTAR limitation from 8 GB-2 to 8 GB-1.
X	(note that the proprietary star method allows full
X	64 bit filesize and will support up to 95 bits which
X	will _never_ be reached as long as you cannot place
X	storage space into a parallel universe ;-)
X	This is from the estimation that each atom may only store
X	approx 1 bit. With 95 bits you would need to use several
X	tons of active storage mass.
X
X-	Honor Volheader file size when extracting archives.
X
X-	Clear fraction of 512 bytes past the end of a file.
X	This was _no_ security problem as star never included any
X	junk that was not already part of the archive earlier.
X	It is done as it turns out that archives with lots of small
X	files (ad the FreeDB CD database) will compress more then
X	20 % more effective if this space is clreared.
X
X-	Automatic recognition and adoption to tar archives with
X	signed checkums. Signed checkums are needed to read tar archives
X	created with old SunOS-3.x and SunOS-4.x tar programs.
X	Note that the UNIX tar documentation always requested unsigned
X	checksums but the BSD based tar used to ignore this fact.
X
X-	Atomatic use of compression programs (if needed) if the archive
X	is a plain file and thus seekable.
X
X-	use non-interruptable write in remote tape handler.
X	This makes star .... interruped by ^\  work corectly on non BSD
X	systems. Note that interrupting star by ^\ causes star to
X	write an intermediate statistic printout.
X
X-	rmt now uses buffered readline code re-imported from rscsi.c
X	to speed up rmt transfers.
X
X-	increase the default FIFO from 1 MB to 8 MB for most OS.
X
X-	Try to lock FIFO into memory in case star is run by root.
X	This helps to make tape streaming more probable.
X
X-	-h Option as alias to the old star Option -L
X
X-	Make -F -FF ... behave more similar to BSD tar
X
X-	Remote tape client code now checks if the RMT server returns
X	more data with rmtread() or if rmtstatus() gets not the expected amount
X	of bytes for struct mtget.
X
X-	Call code to switch rmt server into the new abstract mode only of the
X	open was successful. This avoids to clear the valid error code
X	resulting in the unability to report open errors on previous versions.
X
X-	New remote.c client code gives improved unique remote file name parsing
X	To make a file local altough it looks "remote" prepend it
X	with "/", "./" or "../"
X
X	f=ntape@tapehost:/dev/rmt/0 is remote
X	f=/ntape@tapehost:/dev/rmt/0 is local
X
X-	Now star is again able to reject unsupported file types as it has been
X	up to 1994 when the USTAR & GNU based archive types have been 
X	introduced.
X
X	The new method to check for unsupported file types is again table
X	driven and thus fully configurable.
X
X-	stat wrapper now fully classifies all file types
X
X-	new table to print the name for all known file types
X
X-	mt.c now uses the new remote file name parsing functions
X
X-	NOTE: the new remote tape client code is also used by sdd-1.31 and
X	newer. If you like to have a enhanced "dd" substitution, check:
X
X		ftp://ftp.fokus.gmd.de/pub/unix/sdd/
X
X	Now you can make any tar work remote (even GNU tar ;-) by calling e.g.:
X
X		sdd if=ntape@tapehost:/dev/rmt/0cbn bs=63k | tar tvbf 126 -
X
X-	Added a comment in star.h to clearify when/why GNUtar became
X	non-standard
X
X-	Fixed a bug with printing to stdout while the tar archive
X	itself is stdout.
X
X-	Faster zero'ing and copying of tar headers to speed up operation.
X	Used to compensate slow down from Extended POSIX.1-2001 headers.
X
X-	Fixed a integer overflow bug in tape length computation that made 
X	it impossible to specify a tape length of e.g. 35 GB as needed
X	for the Quantum DLT-7000.
X
X-	append.c (used with -u/-r) now tries to use Nanoseconds from time
X	stamps
X
X-	list.c now tries to handle Nanoseconds with the -newest & -newest-file
X	options
X
X-	New archive format "pax" which is the extended "ustar" proposal
X	from POSIX.1-2001. This format is based on "ustar" and adds
X	extended headers that are infinite extensible. The headers are
X	added only when the old header would overflow otherwise.
X
X-	New archive format "exustar" which is the extended "xustar" format.
X	This format is based on "xustar" and always adds extended headers.
X
X-	New archive format "sunstar" which is an extended "ustar" format.
X	This format based on "ustar" always adds extended headers.
X	The extended headers are not 100% POSIX compliant:
X
X	-	no atime/ctime
X
X	-	typeflag is 'X' instead of 'x'
X
X-	First support for extended tar headers from POSIX.1-2001.
X
X-	Support for Caldera/SCO OpenUNIX has been added
X
X-	New sum statistics for chmod() utimes() errors.
X
X-	Fixed a bug that caused a FIFO (named pipe) to be created twice
X	in extract mode. This resulted in a warning "File exists...".
X
X-	Better support for True-64 aka. OFS-1
X
X-	First support for POSIX ACL's with help from
X	Andreas Gruenbacher <ag@bestbits.at>
X	First support for Solaris ACL's (converted into POSIX strings).
X
X	ACL support should work on Solaris, Linux, FreeBSD and True64.....
X
X
X	Solaris ACL's are smilar enough to POSIX ACL's so I convert them to
X	POSIX ACLs before archiving them. Unfortunately the function
X	aclfromtext() from the Solaris library libsec is not usable
X	(see **** Solaris BUG *** description below). This bug makes it
X	impossible to do ACL backup/restores on passwd-less file servers.
X
X	**** Solaris is unable to restore ACLs numerically (see description
X	**** below).
X
X	HP-UX ACLs are so different from POSIX.1e that it would take a 
X	significant amount of time to code a translation module for star.
X	For this reason, HP-UX is not supported at the moment.
X
X	**** First tests on True64 show that the POSIX.1e function
X	**** acl_from_text() does not work as expected. I have no idea how to
X	**** work around this problem.
X	**** It may be that True64 does not support the ACL 'masks' entry.
X	**** This would force us to create syntetic 'mask' entries when in star
X	**** create mode and to compute the effective mode when in extract
X	**** mode. On True64 also the function acl_get_file() does not work
X	**** properly if a file does not have ACLs. Note that the standard
X	**** requests that in this case acl_get_file() should return a 3 entry
X	**** ACL, but on True64 it returns NULL with 'errno' unchanged.
X	**** Archiving and restoring ACLs from/to True64 will most likely work.
X	**** If you like to transfer TAR archives from/to other platforms you
X	**** will not be able to restore any ACL.
X	****
X	**** As a TAR archive with ACLs made on True64 is not usable on any
X	**** other system, ACL support on True64 could be called broken.
X
X
X	If you list a TAR archive that contains ACLs for certain files,
X	those files are marked with a '+' sign past the UNIX permissions
X	if you request a long listing:
X
X	      0 -rw-r--r--  gruenbacher/assis Nov  4 04:43 2001 default/file
X	      0 drwxrwxr-x+ gruenbacher/assis Nov  4 04:43 2001 default/dir2/
X	      0 drwxr-xr-x+ gruenbacher/assis Nov  4 04:44 2001 default/dir3/
X	      0 drwxrwxr-x+ gruenbacher/assis Nov  4 04:44 2001 default/
X
X	If you like ACL test tar archives, have a look at:
X
X		http://acl.bestbits.at/pre/
X
X	and fetch the files acl*.tar
X
X	If you are on Solaris, read the man pages: getfacl, setfacl, acl
X
X	If you are on Linux, note that by default Linux does not yet support
X	ACLs. You first need to install ACL support by installing a patch
X	from: 
X		http://acl.bestbits.at/
X
X	This page also lists the man pages for the ACL support commands
X	for Linux.
X
X	If you are on FreeBSD current, you need to know that you need to
X	activate ACLs in the kernel _and_ in each filesystem that should
X	carry ACLs.
X
X	If you are on True64, note that you first need to activate extended
X	security features in order to use ACLs.
X	The administratice command names to list or set ACLs are 'getacl' and
X	'setacl'.
X
X	Note: The ACL support code in star is alpha! Do not expect it to be
X	stable in any part. I cannot even grant that the archive format
X	will not change. However, if it turns out to be the right solution, I
X	will mail the star ACL format to the POSIX.1e standard commitee.
X	All changes have been made in a way that does not affec the behaviour
X	of star in case no ACLs are present.
X
X	The format for ACLs in the extended headers used by star looks like:
X
X	SCHILY.acl.access=user::rwx,group::rwx,mask::rwx,other::rwx
X	SCHILY.acl.default=user::rwx,group::rwx,mask::rwx,other::rwx
X
X	This is a legal 'vendor unique' POSIX.1-2001 extension for extended
X	tar headers.
X
X	If the format gets accepted by the POSIX.1 and POSIX1e commitee, it
X	would look like:
X
X	security.acl...=user::rwx,group::rwx,mask::rwx,other::rwx
X
X	As the text format specified by POSIX.1e is not sufficient for TAR, we
X	added a numerical field for all names user and group fields.
X
X	POSIX.1e named user entry:	'user:joe:rwx,'
X	STAR named user entry:		'user:joe:rwx:1431,'
X
X	When star extracts the ACL string, it first checks if user 'joe' is
X	known if 'joe' is known, the numerical value is stripped off and a
X	standard POSIX.1e ACL entry is created. If 'joe' is not known, the
X	text 'joe' is replaced by the numerical value '1431' and a new
X	POSIX.1e entry that looks like 'user:1431:rwx,' is created.
X
X	**** Solaris BUG ***
X	As the function aclfromtext() on Solaris is unable to recognise a
X	numerical (all digit) user id, it is not possible to do ACL
X	backup/restore on a Solaris fileserver that has no access to the same
X	passwd data as it's NFS clients.
X
X	Even worse, aclfromtext() changed the UID for each unknown user to
X	NOBODY and the function aclfromtext() returns as if there was no error.
X	This is a serious security problem as because if this behavior the file
X	becomes (in addition to the other users in the ACL) accessible by
X	"nobody" which definitely is intended.
X
X	This is Sun bug 4426407 ;-)
X	**** Solaris BUG ***
X
X
X	To archive ACLs (star in create mode, you need to specify a TAR format
X	that supports extended POSIX.1-2001 headers _and_ uses them by default.
X	This may currently be achieved by calling "star -Hexustar ...".
X
X	To extract ACLs you need to call "star -p ..."
X
X	Note that the needed actions to archive ACLs or to extract ACLs may
X	change in the near future.
X
X-	For hints on the new Access Control List support read README.ACL
X
X-	When remote protocol error happen (e.g. because the remote server
X	proces dies) star now aborts faster and with better error message.
X
X-	Check for HAVE_FORK to allow compilation (without FIFO) on strange
X	platforms.
X
X-	star now supports 'G' as "multiplyer" in fs= bs= ... options.
X
X-	Support for MacOSX-10.1 (aka Darwin-1.4) now works smoothly
X
X-	Restructured Schily portability include files for easier and cleaner
X	portability
X
X-	Better Linux support for the program 'mt'. It now prints the 
X	file number and record number when calling 'mt status'.
X
X-	Support for QNX Neutrino
X
X-	Now we hopefully have floating point support for _all_ platforms
X	even those without *cvt() and without __dtoa(). Thanks to a hint
X	from Thomas Langer <Langer.Thomas@gmx.net> we now use strtod.c
X	to gert a fallback __dtoa()
X
X-	Added an autoconf test for rcmd() so cdrtools now should compile 
X	again on BeOS and AmigaOS where no rcmd() is present.
X
X-	New option -block-number
X	This option has been inspired by gnutar, but with gnutar it is
X	useless as it prints wrong numbers. With star -block-number is
X	expected to print correct numbers. However star has a higly complex
X	dataflow because of the FIFO. If you find that it prints wrong numbers
X	with star, please report so I may check for the reason.
X
X-	Do not try to "diff" Volume headers with star -diff.
X	This is a pseudo file with no representation in the file system!
X
X-	Better portability for QNX
X
X-	Try to support recent BeOS
X
X	-	(has no settimeofday() and some strange network woes)
X
X	-	Does not have utimes() but wrong utimes() prototype in
X		posix/sys/time.h
X
X	-	add getpagesize() emulation for BeOS
X
X	-	Workaround in libschily/comerr.c for the nonstandard 
X		big negative errno values on BeOS
X
X-	Try to support AmigaOS
X
X
X-	Renamed a structure member from f_offset to f_contoffset to allow
X	compilation on SCO OpenServer which has a macro of the same
X	name in file.h.
X
X-	First support for filesystem flags (see below)
X
X-	New Option -nodump that implements support for the 'nodump' file
X	flag on BSD-4.4 derivates and Linux.
X	 On *BSD this works without performance degradation, on Linux the
X	system time will increase by 10% if -nodump is used.
X
X-	New option -o as alias for -nochown to complete POSIX compatibility.
X
X-	New 'README' file STARvsGNUTAR that is intended to help people
X	(currently using GNU tar) to use star.
X
X-	Restructured the usage() functions to better deal with the fact that
X	the usage listing for star has become quite long.
X	Now every usage error will only result in a short info that gives
X	a hint what star options may print the needed help information.
X
X-	The option tsize=# now has an increased functionality.
X	In former times, the argument was the size of a medium in multiples
X	of TAR blocks. Now the syntax of the bs= option has been added.
X
X		tsize=100	means 100 tape blocks (51200 bytes)
X		tsize=100m	means 100MBytes
X		tsize=10240.	means 10240 Bytes
X	
X-	The option maxsize=# now has an increased functionality.
X	In former times, the argument was the size of a file in kBytes.
X	Now the syntax of the bs= option has been added.
X
X		maxsize=100	means 100 kBytes
X		maxsize=100m	means 100MBytes
X		maxsize=10240.	means 10240 Bytes
X	
X
X
X-	A lot of code and documentation has been changed as on Friday afternoon
X	(7.12.2001) the new ieee POSIX-1003.1-2001 standard has been approved
X	and star is the first TAR archiver that is POSIX-1003.1-2001 compliant
X	and supports the POSIX-1003.1-2001 extended TAR headers. Old versions
X	of star did refer the standard as POSIX-1003.1-200x as it was not
X	100% clear whether it would be approved in 2001 or 2002.
X
X-	Large File support for IRIX-6.2 (added autoconf test for -n32 cc
X	option)
X
X-	Large File support for IRIX-6.5 now everything works correctly if the
X	OS supports Large Files by default in 32 bit mode
X	(uses fseeko()/ftello() if present). This could only be done by
X	massively changing the autoconf code stolen from GNUtar.
X
X-	Support for SGI IRIX platform ip17-irix
X
X
X-	Make hardlinks have size == 0 in the archive. This is a bug that
X	has been present for a long time. It seems that it has been overseen
X	sor a long time and was eported a few months ago.
X
X-	New option -acl now needed to tell star to handle ACLs.
X
X	This option has been introduced because it turns out that it is
X	impossible to handle the extract case (when the filesystem does
X	not support ACLs) in a decent way. Without -acl star would either
X	be forced to suppress eror messages for ACL handling or people
X	would see hundreds of ACL warnings.
X
X	The intention for the -acl option was to make ACL handling easy
X	to understand.
X
X	Here is a description how -acl works:
X
X	-	if -acl is not present in create mode, star does not
X		archive ACLs
X
X	-	if -acl is present in create mode and the header type
X		is 'exustar' (selected by H=exustar), star will
X		add ACL information to the archive.
X
X	-	if -acl is not present in extract mode, star does not
X		handle ACL information (i.e. if the FS does not handle
X		ACLs, no error messages will occur, if the FS handles
X		ACLs and there are default ACLs set up for the directory
X		where star puts the extracted files the extracted files
X		will have the inherited ACLs from the Default ACL od the
X		directory regardless of the ACL information in the archive).
X
X	-	if -acl is present in extract mode, star handles ACLs.
X		If the tar archive does not include ACL information at all
X		or if the archiv does not include ACL information for a 
X		specific file, star will clear the ACL for this file.
X		If the tar archive includes ACL information for the file,
X		star will set up the ACL to be the same as the ACL information
X		in the archive (i.e. if -acl is present in extract mode,
X		no ACL information will be inherited from the ACL information
X		that was present in the filesystem tree before the exrtact
X		operation took place).
X
X		If -acl is present in extract mode and the filesystem where
X		the files are extracted to does not support ACLs, star will
X		display an error message fo each file that is extracted.
X
X
X-	Added better compatibility to the POSIX-1003.1 standard and allow
X	star to handle the 'l' option as requested by the standard if
X	the last pacth name compoent of av[0] is either tar or ustar.
X
X	To get a version if star with this property, you need to compile
X	star with:
X			make COPTX=-DTAR_COMPAT
X
X-	Make the default FIFO size on Linix 8 MB as with other architectures
X	if the Linux version supports mmap() and thus is not tightly limited
X	in shared memory size.
X
X
X-	New supported architctures:
X		s390-linux-cc.rul parisc-linux-cc.rul parisc64-linux-cc.rul
X
X-	fixed a bug that could hang the FIFO at the end of a archive read
X	operation if the archive file is much bigger than the archive
X	seems to be from the logical EOF mark.
X
X	This is done by introducing a long planned FIFO shut down operation.
X
X-	fixed a bug with links names that are exactly 100 chars long.
X	The bug caused the link name to be concatenated with the
X	string 'ustar'.
X
X-	-p option in create mode now is -dirmode to make the meaning of
X	the flags easier to understand and to allow -acl to include -p
X
X-	-acl option now includes -p in extract mode
X
X-	When star is called as "tar" the default format is "xustar". This
X	avoids problems with the pax program which does not compute checksums
X	correctly and thus believes that the "xstar" format is not TAR.
X
X-	blocks= and b= option now allow to specify multiplication factors 
X	different from 512 (as with the bs= option).
X
X
X-	Print the error statistics when star aborts due to a hard error.
X
X-	New flag -xfflags allows to archive and restore extended file flags
X	as found on *BSD and Linux. Archiving is done as extension to the
X	POSIX.1-2001 extended file headers. The flags:
X
X		sappnd		root settable append only
X		schg 		root settable immutable
X		nodump		no dump
X
X	are found on both *BSD and Linux and thus are mapped vice versa
X
X-	3rd stage and last of revision the man page
X	OPTIONS section alphabetically ordered and revised
X
X-	Fixed a bug that appeared with uids/gids in the range between
X	65534 and 2097151. Star did mask uid/gid values with 0xFFFF
X	before (as needed with historic UNIX implementations).
X	Bigger values are not affected as they are handled by different
X	methods.
X
X	Now star correctly uses MAXOCTAL6 and MAXOCTAL7 as mask for the
X	POSIX.1-1988 compliant uig/gid/ values.
X	
X
X-	New rule allows automatic fallback to GCC if the configured
X	default compiler could not be found.
X
X-	Fix for a bug that caused star to create broken archives when
X	archiving files with negative time stamp ( < 1970) on 64 bit
X	platforms using a 64 bit variant of star.
X
X	Star now checks for octal digit overflows that did cause
X	the time and the size field run together.
X
X-	Check whether the OS uses the same st_mode definitions as
X	the TAR archive format. If both definitions differ,
X	convert the modes.
X
X-	Introduced a loop around fsync() and code to check for
X	EINTR & EINVAL
X
X-	Support Win XP (NT-5.1 os-cygwin_nt-5.1.id)
X	
X-	Significant speed up for scanning sparse files for the files's hole
X	list. star is now 3x faster than old star versions and 4x faster
X	than GNUtar
X
X-	Fix for a Linux ACL bug.
X	Extracting files with 4 ACL entries did not work,
X	The last entry has been repeated in the buffer.
X	Thanks to Andreas Gruenbacher <ag@bestbits.at>
X
X	Description:
X/*--------------------------------------------------------------------------*/
X$ getfacl e f
X# file: e
X# owner: root
X# group: root
Xuser::rw-
Xuser:hofer:rw-
Xgroup::r--
Xmask::rw-
Xother::r--
X
X# file: f
X# owner: root
X# group: root
Xuser::rw-
Xgroup::---
Xmask::---
Xother::r--
X
X$ star -c -acl H=exustar e f > ef.tar
Xstar: 1 blocks + 0 bytes (total of 10240 bytes = 10.00k).
X$ rm e f
X$ star -x -acl < ef.tar
Xstar: Invalid argument. Cannot convert ACL 'user::rw-,group::---,mask::---,other::r--,rw-,other::r--,r--' to internal format for 'f'.
X[...]
X/*--------------------------------------------------------------------------*/
X
X
X-	Fixed autoconf code to circumvent a bug in the Linux include files
X	with fseeko()/ftello() which causes problems on 64 bit systems.
X
X-	Allow file= and f= option to be used more than once (up to 100 times).
X
X-	New option new-volume-script=script to call script at end of each
X	tape in multi volume mode.
X
X-	Set devmajor/devminor to 0 for all file types where it does
X	not make sense. This make sure that on operating systems or file 
X	systems that e.g. return -1 for the device number no extended
X	header is generated.
X
X-	Fixed a bug that caused star to print 'file changed size' with
X	some sparse files. The bug has been introduced in star-1.4a19
X	and caused broken sparse files if the warning is printed.
X
X-	-v option changed from BOOL to inc type to allow more verbose
X	create mode.
X
X-	change 'file changed size' message so that is now reports either
X	'file changed size (increased)' or 'file changed size (shrunk)'.
X
X-	First implementation that is able to recursively remove non-empty
X	directories.
X
X-	Added links for ia64-linux to the Make RULES to allow users of GNUmake
X	to compile cdrtools on IA64. Note that "smake" includes automake
X	features and will auto-create the missing links.
X
X-	New option -link-dirs tells star to look for hard linked directories.
X	This makes star the first TAR implementation that allows to
X	archive hard linked directories.
X
X-	New transient option -dump.
X	This option is to used to make testing of the new features for
X	incremental dumps easier.
X
X	It currently defaults to the 'exustar' archive format and activates
X	the creation of more extended header fields that are needed to
X	have more file metadata information on the archive.
X
X-	In -dump mode (a preparation for incremental dumps) star now archives:
X
X	"SCHILY.dev"		The field stat.st_dev	- the filesys indicator
X	"SCHILY.ino"		The field stat.st_ino	- the file ID #
X	"SCHILY.nlink"		The field stat.st_nlink	- the hard link count
X	"SCHILY.filetype"	The real file type 	- this allows e.g.
X							  socket/door
X
X	These fields will in future allow star to archive and extract all
X	information that is needed for incremental dumps.
X
X	Star now includes ALL file metadata that is available. This allows a
X	complete restauration of all file properties and a diff mode that
X	checks for diffs in all file properties.
X
X-	The new extended header field SCHILY.filetype now allows (again) to
X	archive sockets. Star's pre-posix format did allow this in 1985 but
X	the 'star' archive format is deprecated these days.
X
X-	With -dump, DOOR files are archived as DOOR and extracted as plain file
X	of size 0.
X
X-	statdefs.h extended to include support for the BSD 'whiteout' file
X	type.
X
X-	List real file type instead of 'H' (Hard link) if this information
X	is available.
X
X-	man page for sparse files extended to help to understand possible
X	problems.
X
X-	New option -silent to supress informational messages like
X	'xxx is sparse'.
X
X-	New option -meta to tell star to archive only file metadate (from the
X	inode) but no file content. This option is needed to allow future
X	versions of star to support true incremental backups.
X
X	If in extract mode, star will not attempt to create or overwrite
X	files/specials.
X
X	*********
X	WARNING: Do not try to extract a star archive that includes meta files.
X	Other tar implementations may clobber files on disk when reading such
X	archives.
X
X	Star tries to cause other tar implementations to abort when they read
X	archives that contain meta files, but when other tar implementations
X	start to support POSIX.1-2001 extended headers this will not work
X	anymore.
X
X	If I get support from other TAR/PAX implementors, there is a chance to
X	integrate the needed features into POSIX-1-2005. Please help he to
X	support this as meta files are needed to allow true incremental
X	backups.
X	*********
X
X-	Better code to check if a file is 'the archive' because MacOS X
X	has directories with ino # 0.
X
X-	Compare filetype of hard links not only if the archive is the old
X	1985 star format. The POSIX.1-2001 extended headers may also hold
X	the real file type.
X
X-	Better warning for the broken tar headers used by GNUtar when
X	it adds volume headers.
X
X/*--------------------------------------------------------------------------*/
X
X	Hints for using extended POSIX.1-2001 headers:
X		See README.posix-2001
X
X/*--------------------------------------------------------------------------*/
X
X*** Fixed problems with files that are close to the maximum file size:
X
X-	better tarblock() macro that avoids off_t overflows
X
X-	Try to avoid problems while reading files when off+amt < 0
X	or off+amt > size.
X
X-	Try to avoid problems with the Solaris ioctl _FIOAI when off+amt < 0
X	or off+amt > size.
X
X/*--------------------------------------------------------------------------*/
XLate changes:
X
X-	Cast pointerdiffs to int for printf() %.*s format and/or include
X	workarounds for 64 bit problems in this area.
X	
X-	Use generic __malloc()/__realloc() if no memory would result in abort
X
X-	Better autoconf test for not working mlock() on HP-UX-10.20
X
X-	Better autocheck code for available C-compilers on HP-UX
X	Now even a fallback from GCC to CC works.
X
X-	Some changes to make compilation on 64 bit systems more correct
X
X-	Added support for GNU Hurd to the Schily Makefilesystem
X
X-	rmt.c changed because GNU Hurd has no MAXHOSTNAMELEN 
X
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully functional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix.1-1988) handling added
X1994	Xstar format (extended Posix.1-1988) defined and introduced
X1995	Ported to many platforms
X1999	Support for Win32 (Cygwin)
X1999	base 256 support to overcome limitation with octal fields
X2001	Large file support
X2001	Support for POSIX.1-2001 extended headers
X2001	Support for ACLs in POSIX.1-2001 extended headers
X2002	Support for extended file flags in POSIX.1-2001 extended headers
X2002	Support for extended inode meta data and meta files
X
XSupported platforms:
X
XVirtually any! Known to work:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux,
XHP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD, OpenBSD,
XOSF-1, True-64, QNX, BeOS, Apollo Domain/OS, Next-STep, 
XOS/2, SCO-openserver, SCO-unixware, Caldera OpenUnix,
XCygwin (Win32), Sony NewsOS,  BSDi (BSD/OS), QNX,
XApple Rhapsody, MacOS X, AmigaOS, GNU Hurd
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
XStar is able to make backups with far more than 10MB/s if the
Xdisk and tape drive support such a speed. This is more than
Xdouble the speed that ufsdump will get.
XIn 1996, Ampex got 13.5 MB/s with their DLT tape drive which is a
Xmodified professional digital video tape drive and not related
Xto Quantum's DLT type drives.
XUfsdump got a maximum speed of about 6MB/s with the same hardware.
X
XStar development started 1982, the first complete implementation has 
Xbeen done in 1985. I never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	remote tape support	- a fast RMT implementation that has no
X				  probems to saturate a 100 Mb/s network.
X
X	accurate sparse files	- star is able to reproduce holes in sparse
X				  files accurately if the OS includes 
X				  the needed support functions. This is
X				  currently true for Solaris-2.3 to
X				  Solaris-2.5.1
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record
X				  long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  With POSIX.1-2001 the times are in nanosecond
X				  granularity.
X				  Star may reset access time after doing
X				  backup. On Solaris this can be done without
X				  changing the ctime.
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star,
X				  POSIX.1-2001 PAX, Sun's Solaris tar.
X
X
X	automatic compression detect - star automatically detects whether the
X				  archive is compressed. If it has been
X				  compressed with a compression program that
X				  is compatible to decompression with "gzip"
X				  or "bzip2", star automatically activates
X				  decompression.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete
X				  description of bugs found in other tar
X				  implementations. Star is the first tar
X				  implementation that supports POSIX.1-2001.
X
X	support for ACLs and file flags - star supports Access Control Lists
X				  and extened file flags (as found on FreeBSD
X				  and Linux). Support to archive and restore
X				  other file properties may easily added.
X
X	support for all inode metadata - star supports to put all inode
X				  metadata on the archive. This allows future
X				  versions of star to perform true
X				  incremental dumps.
X
XHave a look at the manual page, it is included in the distribution.
X
XAuthor:
X
XJoerg Schilling
XSeestr. 110
XD-13353 Berlin
XGermany
X
XEmail: 	joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de
X	schilling@fokus.gmd.de
X
XPlease mail bugs and suggestions to me.
END-of-star-1.5.2/AN-1.4
echo x - star-1.5.2/README.SSPM
sed 's/^X//' >star-1.5.2/README.SSPM << 'END-of-star-1.5.2/README.SSPM'
X     A new milestone in modular portable programming is ready!
X
XThe "Slottable Source Plugin Module" system (SSPM) is an idea that
Xreally is more than 3 years old but I was hesitating to announce it
Xearlier. Now I can tell you that the new makefile system has been
Xunder test during the last 6 months and nobody complained about any 
Xproblem caused by the SSPM.
X
XThe portability overhead is currently about 2 MB. This turns a medium
Xsized application like 'star' which is about 500 kB of pure source
Xinto a packet that is 5x as big as the pure source size.
X
XAs all my applications are based on the Schily SING makefile system
Xand share a common portability base it makes sense to share the
Xadvantages of the Schily makefile system with all users.
X
XSimple ideas like the SSPM are usually hard to understand by people
Xfrom outside, so I try to describe the new system by giving you an
Xexample on how it is used:
X
X--------------------
XYou may test the new system by first downloading the latest
Xcdrtools package 
X
X	ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-1.11a11.tar.gz
X
Xor newer. Then unpack the source tarball, chdir into the top level
Xdirectory of the cdrtools package. Run 'make' and wait until the 
Xcompilation has finished.
X
XSo far, there is nothing new (except that some people may recognize
Xthat this is a 'smooth' fully integrated compilation and you don't need
Xto call 'configure'.
X
XNow, to understand what a "Slottable Source Plugin Module" is, fetch
Xanother source. There is currently only one demo source that is ready
Xfor testing:
X
X	ftp://ftp.berlios.de/pub/star/alpha/star-1.4a08-sspm.tar.gz
X
XUnpack this tarball in the top level directory of cdrtools and
Xcall 'make' again. The Schily makefile system does recognize that there
Xis additional (uncompiled) source and will compile these new parts.
XAs there is no need to run 'configure' again, compilation of the 
Xadditional 'star' sources is much faster than the compilation of the
Xcomplete 'star' source package would take.
X
XTo understand how the "Slottable Source Plugin Module" system works,
Xhave a look into the TARGETS directory.....
X
X-------------------
END-of-star-1.5.2/README.SSPM
echo c - star-1.5.2/tartest
mkdir -p star-1.5.2/tartest > /dev/null 2>&1
echo x - star-1.5.2/tartest/tartest.c
sed 's/^X//' >star-1.5.2/tartest/tartest.c << 'END-of-star-1.5.2/tartest/tartest.c'
X/* @(#)tartest.c	1.18 11/07/15 Copyright 2002-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)tartest.c	1.18 11/07/15 Copyright 2002-2011 J. Schilling";
X#endif
X/*
X *	Copyright (c) 2002-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X
X#include "star.h"
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/getargs.h>
X#include <schily/schily.h>
X
X#include <schily/fcntl.h>			/* O_BINARY */
X#include <schily/io.h>				/* for setmode() prototype */
X
XLOCAL	void	usage		__PR((int ret));
XEXPORT	int	main		__PR((int ac, char *av[]));
XLOCAL	BOOL	doit		__PR((FILE *f));
XLOCAL	BOOL	checkhdr	__PR((TCB *ptb));
XLOCAL	BOOL	checkoctal	__PR((char *ptr, int len, char *text));
XLOCAL	BOOL	checktype	__PR((TCB *ptb));
XLOCAL	BOOL	checkid		__PR((char *ptr, char *text));
XLOCAL	BOOL	checkmagic	__PR((char *ptr));
XLOCAL	BOOL	checkvers	__PR((char *ptr));
XEXPORT	void	stolli		__PR((char *s, Ullong *ull, int len));
XLOCAL	Ulong	checksum	__PR((TCB *ptb));
XLOCAL	void	pretty_char	__PR((char *p, unsigned c));
X
XLOCAL	BOOL	verbose;
XLOCAL	BOOL	signedcksum;
XLOCAL	BOOL	is_posix_2001;
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s [options] < file\n", get_progname());
X	error("Options:\n");
X	error("\t-help\t\tprint this help\n");
X	error("\t-version\tPrint version number.\n");
X	error("\t-v\t\tprint all filenames during verification\n");
X	error("\n%s checks stdin fore compliance with the POSIX.1-1990 TAR standard\n", get_progname());
X	exit(ret);
X	/* NOTREACHED */
X}
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	*av[];
X{
X	int		cac = ac;
X	char	*const *cav = av;
X	BOOL		help = FALSE;
X	BOOL		prversion = FALSE;
X
X	save_args(ac, av);
X	cac--;
X	cav++;
X	if (getallargs(&cac, &cav, "help,h,version,v", &help, &help,
X						&prversion, &verbose) < 0) {
X		errmsgno(EX_BAD, "Bad Option: '%s'.\n", cav[0]);
X		usage(EX_BAD);
X	}
X	if (help)
X		usage(0);
X
X	printf("tartest %s (%s-%s-%s)\n\n", "1.18",
X					HOST_CPU, HOST_VENDOR, HOST_OS);
X	printf("Copyright (C) 2002 Jörg Schilling\n");
X	printf("This is free software; see the source for copying conditions.  There is NO\n");
X	printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
X	if (prversion)
X		exit(0);
X
X	printf("\nTesting for POSIX.1-1990 TAR compliance...\n");
X
X	setmode(fileno(stdin), O_BINARY);
X
X	if (!doit(stdin)) {
X		printf(">>> Archive is not POSIX.1-1990 TAR standard compliant.\n");
X		return (1);
X	}
X	printf("No deviations from POSIX.1-1990 TAR standard found.\n");
X	return (0);
X}
X
XLOCAL BOOL
Xdoit(f)
X	FILE	*f;
X{
X	BOOL	ret = TRUE;
X	BOOL	r;
X	TCB	tcb;
X	TCB	*ptb;
X	char	name[257];
X	char	lname[101];
X	Ullong	checks;
X	Ullong	hsum;
X	Ullong	size;
X	Ullong	blockno = 0;
X	int	i;
X
X	ptb = &tcb;
X	for (;;) {
X		r = TRUE;
X		fillbytes(ptb, TBLOCK, '\0');
X		if (fileread(f, ptb, TBLOCK) != TBLOCK) {
X			printf("Hard EOF at block %lld\n", blockno);
X			return (FALSE);
X		}
X
X		stolli(ptb->ustar_dbuf.t_chksum, &checks, 8);
X		hsum = checksum(ptb);
X		if (hsum == 0) {
X			/*
X			 * Check EOF
X			 */
X			printf("Found 1st EOF block at %lld\n", blockno);
X			blockno++;
X			if (fileread(f, ptb, TBLOCK) != TBLOCK) {
X				printf(
X				"Hard EOF at block %lld (second EOF block missing)\n",
X					blockno);
X				return (FALSE);
X			}
X			hsum = checksum(ptb);
X			if (hsum != 0) {
X				printf(
X					"Second EOF block missing at %lld\n",
X					blockno);
X				return (FALSE);
X			}
X			printf("Found 2nd EOF block at %lld\n", blockno);
X			return (ret);
X		} if (checks != hsum) {
X			printf("Bad Checksum %0llo != %0llo at block %lld\n",
X							checks, hsum, blockno);
X			signedcksum = TRUE;
X			hsum = checksum(ptb);
X			if (checks == hsum) {
X				printf("Warning: archive uses signed checksums.\n");
X				return (FALSE);
X			}
X			if (blockno != 0) {
X				if (is_posix_2001) {
X					printf(
X					"The archive may either be corrupted or using the POSIX.1-2001 size field.\n");
X				} else {
X					printf(
X					"Warning: Corrupted TAR archive.\n");
X				}
X			}
X			return (FALSE);
X		}
X		blockno++;
X
X		stolli(ptb->ustar_dbuf.t_size, &size, 12);
X
X		if (ptb->ustar_dbuf.t_prefix[0]) {
X			js_snprintf(name, sizeof (name), "%.155s/%.100s",
X				ptb->ustar_dbuf.t_prefix,
X				ptb->ustar_dbuf.t_name);
X		} else {
X			strncpy(name, ptb->ustar_dbuf.t_name, 100);
X			name[100] = '\0';
X		}
X		strncpy(lname, ptb->ustar_dbuf.t_linkname, 100);
X		lname[100] = '\0';
X
X		r = checkhdr(ptb);
X		if (!r)
X			ret = FALSE;
X
X		/*
X		 * Handle the size field acording to POSIX.1-1990.
X		 */
X		i = tarblocks(size);
X		switch ((int)(ptb->ustar_dbuf.t_typeflag & 0xFF)) {
X
X		case '\0':	/* Old plain file */
X		case '0':	/* Ustar plain file */
X		case '7':	/* Contiguous file */
X			break;
X
X		case '1':	/* Hard link */
X		case '2':	/* Symbolic link */
X			if (i != 0) {
X				printf(
X				"Warning: t_size field: %0llu, should be 0 for %s link\n",
X					size,
X					ptb->ustar_dbuf.t_typeflag == '1'?
X					"hard":"symbolic");
X				ret = r = FALSE;
X			}
X			i = 0;
X			break;
X		case '3':	/* Character special */
X		case '4':	/* Block special */
X		case '5':	/* Directory */
X		case '6':	/* FIFO  (named pipe) */
X			i = 0;
X			break;
X		}
X
X		if (!r || verbose) {
X			printf("*** %sFilename '%s'\n",
X						r == FALSE ?
X						"Failing ":"", name);
X			if (lname[0]) {
X				printf("*** %sLinkname '%s'\n",
X						r == FALSE ?
X						"Failing ":"", lname);
X			}
X		}
X
X		/*
X		 * Skip file content.
X		 */
X		while (--i >= 0) {
X			if (fileread(f, ptb, TBLOCK) != TBLOCK) {
X				printf("Hard EOF at block %lld\n", blockno);
X				return (FALSE);
X			}
X			blockno++;
X		}
X	}
X
X}
X
XLOCAL BOOL
Xcheckhdr(ptb)
X	TCB	*ptb;
X{
X	BOOL	ret = TRUE;
X	int	errs = 0;
X	Ullong	ll;
X
X	if (ptb->ustar_dbuf.t_name[  0] != '\0' &&
X	    ptb->ustar_dbuf.t_name[ 99] != '\0' &&
X	    /* LINTED */
X	    ptb->ndbuf.t_name[100] == '\0') {
X		printf("Warning: t_name[100] is a null character.\n");
X		errs++;
X	}
X	if (ptb->ustar_dbuf.t_linkname[  0] != '\0' &&
X	    ptb->ustar_dbuf.t_linkname[ 99] != '\0' &&
X	    /* LINTED */
X	    ptb->ndbuf.t_linkname[100] == '\0') {
X		printf("Warning: t_linkname[100] is a null character.\n");
X		errs++;
X	}
X
X	if (!checkoctal(ptb->ustar_dbuf.t_mode, 8, "t_mode"))
X		errs++;
X
X	stolli(ptb->ustar_dbuf.t_mode, &ll, 8);
X	if (ll & ~07777) {
X		printf(
X		"Warning: too many bits in t_mode field: 0%llo, should be 0%llo\n",
X			ll, ll & 07777);
X		errs++;
X	}
X
X	if (!checkoctal(ptb->ustar_dbuf.t_uid, 8, "t_uid"))
X		errs++;
X
X	if (!checkoctal(ptb->ustar_dbuf.t_gid, 8, "t_gid"))
X		errs++;
X
X	if (!checkoctal(ptb->ustar_dbuf.t_size, 12, "t_size"))
X		errs++;
X
X	if (!checkoctal(ptb->ustar_dbuf.t_mtime, 12, "t_mtime"))
X		errs++;
X
X	if (!checkoctal(ptb->ustar_dbuf.t_chksum, 8, "t_chksum"))
X		errs++;
X
X	if (!checktype(ptb))
X		errs++;
X
X	if (!checkmagic(ptb->ustar_dbuf.t_magic))
X		errs++;
X
X	if (!checkvers(ptb->ustar_dbuf.t_version))
X		errs++;
X
X	if (!checkid(ptb->ustar_dbuf.t_uname, "t_uname"))
X		errs++;
X	if (!checkid(ptb->ustar_dbuf.t_gname, "t_gname"))
X		errs++;
X
X	if (!checkoctal(ptb->ustar_dbuf.t_devmajor, 8, "t_devmajor"))
X		errs++;
X
X	if (!checkoctal(ptb->ustar_dbuf.t_devminor, 8, "t_devminor"))
X		errs++;
X
X#ifdef	__needed__
X	/*
X	 * The POSIX.1 TAR standard does not mention the last 12 bytes in the
X	 * TAR header. They may have any value...
X	 */
X	if (cmpnullbytes(ptb->ustar_dbuf.t_mfill, 12) < 12) {
X		printf(
X		"Warning: non null character in last 12 bytes of header\n");
X		errs++;
X	}
X#endif
X
X	if (errs)
X		ret = FALSE;
X	return (ret);
X}
X
X/*
X * Check whether octal numeric fields are according to POSIX.1-1990.
X */
XLOCAL BOOL
Xcheckoctal(ptr, len, text)
X	char	*ptr;
X	int	len;
X	char	*text;
X{
X	BOOL	ret = TRUE;
X	BOOL	foundoctal = FALSE;
X	int	i;
X	int	endoff = 0;
X	char	endc = '\0';
X	char	cs[4];
X
X	for (i = 0; i < len; i++) {
X#ifdef	CHECKOCTAL_DEBUG
X		error("%d '%c'\n", i, ptr[i]);
X#endif
X
X#ifdef		END_ALL_THESAME
X		if (endoff > 0 && ptr[i] != endc) {
X#else
X		/*
X		 * Ugly, but the standard seems to allow mixins space and null
X		 * characters at the end of an octal numeric field.
X		 */
X		if (endoff > 0 && (ptr[i] != ' ' && ptr[i] != '\0')) {
X#endif
X			pretty_char(cs, ptr[i] & 0xFF);
X			printf(
X			"Warning: illegal end character '%s' (0x%02X) found in field '%s[%d]'\n",
X					cs,
X					ptr[i] & 0xFF,
X					text, i);
X			ret = FALSE;
X		}
X		if (endoff > 0)
X			continue;
X		if (ptr[i] == ' ' || ptr[i] == '\0') {
X			if (foundoctal) {
X				endoff = i;
X				endc = ptr[i];
X				continue;
X			}
X		}
X		if (!isoctal(ptr[i])) {
X			pretty_char(cs, ptr[i] & 0xFF);
X			printf(
X			"Warning: non octal character '%s' (0x%02X) found in field '%s[%d]'\n",
X					cs,
X					ptr[i] & 0xFF,
X					text, i);
X			ret = FALSE;
X		} else {
X			foundoctal = TRUE;
X		}
X	}
X	if (foundoctal && endoff == 0) {
X		printf("Warning: no end character found in field '%s'\n",
X			text);
X		ret = FALSE;
X	}
X	return (ret);
X}
X
X/*
X * Check whether the POSIX.1-1990 'typeflag' field contains a valid character.
X */
XLOCAL BOOL
Xchecktype(ptb)
X	TCB	*ptb;
X{
X	BOOL	ret = TRUE;
X	char	cs[4];
X
X	switch ((int)(ptb->ustar_dbuf.t_typeflag & 0xFF)) {
X
X	case '\0':	/* Old plain file */
X	case '0':	/* Ustar plain file */
X	case '1':	/* Hard link */
X	case '2':	/* Symbolic link */
X	case '3':	/* Character special */
X	case '4':	/* Block special */
X	case '5':	/* Directory */
X	case '6':	/* FIFO  (named pipe) */
X	case '7':	/* Contiguous file */
X		break;
X
X	case 'g':
X	case 'x':
X		if (!is_posix_2001) {
X			error("Archive uses POSIX.1-2001 extensions.\n");
X			error("The correctness of the size field cannot be checked for this reason.\n");
X			is_posix_2001 = TRUE;
X		}
X		break;
X
X	case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
X	case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
X	case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U':
X	case 'V': case 'W': case 'X': case 'Y': case 'Z':
X		{ static char vend[256];
X			if (vend[ptb->ustar_dbuf.t_typeflag & 0xFF] == 0) {
X				error(
X				"Archive uses Vendor specific extension file type '%c'.\n",
X				ptb->ustar_dbuf.t_typeflag & 0xFF);
X				vend[ptb->ustar_dbuf.t_typeflag & 0xFF] = 1;
X			}
X		}
X		break;
X
X	default:
X		pretty_char(cs, ptb->ustar_dbuf.t_typeflag & 0xFF);
X		printf(
X		"Warning: Archive uses illegal file type '%s' (0x%02X).\n",
X				cs,
X				ptb->ustar_dbuf.t_typeflag & 0xFF);
X		ret = FALSE;
X	}
X	return (ret);
X}
X
X/*
X * Check whether the POSIX.1-1990 'uid' or 'gid' field contains
X * reasonable things.
X */
XLOCAL BOOL
Xcheckid(ptr, text)
X	char	*ptr;
X	char	*text;
X{
X	BOOL	ret = TRUE;
X	char	cs[4];
X	int	len = 32;
X	int	i;
X
X	if (ptr[0] == '\0') {
X		for (i = 0; i < len; i++) {
X			if (ptr[i] != '\0') {
X				pretty_char(cs, ptr[i] & 0xFF);
X				printf(
X				"Warning: non null character '%s' (0x%02X) found in field '%s[%d]'\n",
X						cs,
X						ptr[i] & 0xFF,
X						text, i);
X				ret = FALSE;
X			}
X		}
X		return (ret);
X	}
X	i = len - 1;
X	if (ptr[i] != '\0') {
X		pretty_char(cs, ptr[i] & 0xFF);
X		printf(
X		"Warning: non null string terminator character '%s' (0x%02X) found in field '%s[%d]'\n",
X				cs,
X				ptr[i] & 0xFF,
X				text, i);
X		ret = FALSE;
X	}
X	return (ret);
X}
X
X/*
X * Check whether the POSIX.1-1990 'magic' field contains the
X * two string "ustar" (5 characters and a null byte).
X */
XLOCAL BOOL
Xcheckmagic(ptr)
X	char	*ptr;
X{
X	BOOL	ret = TRUE;
X	char	*mag = "ustar";
X	char	cs[4];
X	int	i;
X
X	for (i = 0; i < 6; i++) {
X		if (ptr[i] != mag[i]) {
X			pretty_char(cs, ptr[i] & 0xFF);
X			printf(
X			"Warning: illegal character '%s' (0x%02X) found in field 't_magic[%d]'\n",
X					cs,
X					ptr[i] & 0xFF, i);
X			ret = FALSE;
X		}
X	}
X	return (ret);
X}
X
X/*
X * Check whether the POSIX.1-1990 'version' field contains the
X * two characters "00".
X */
XLOCAL BOOL
Xcheckvers(ptr)
X	char	*ptr;
X{
X	BOOL	ret = TRUE;
X	char	*vers = "00";
X	char	cs[4];
X	int	i;
X
X	for (i = 0; i < 2; i++) {
X		if (ptr[i] != vers[i]) {
X			pretty_char(cs, ptr[i] & 0xFF);
X			printf(
X			"Warning: illegal character '%s' (0x%02X) found in field 't_version[%d]'\n",
X					cs,
X					ptr[i] & 0xFF, i);
X			ret = FALSE;
X		}
X	}
X	return (ret);
X}
X
X
X/*
X * Convert string -> long long int
X * This is the debug version that stops at "len" size to be safe against
X * field overflow.
X */
XEXPORT void
Xstolli(s, ull, len)
X	register char	*s;
X		Ullong	*ull;
X		int	len;
X{
X	register Ullong	ret = (Ullong)0;
X	register char	c;
X	register int	t;
X
X	while (*s == ' ') {
X		if (--len < 0)
X			break;
X		s++;
X	}
X
X	for (;;) {
X		if (--len < 0)
X			break;
X		c = *s++;
X#ifdef	STOLLI_DEBUG
X		error("'%c'\n", c);
X#endif
X		if (isoctal(c))
X			t = c - '0';
X		else
X			break;
X		ret *= 8;
X		ret += t;
X	}
X	*ull = ret;
X#ifdef	STOLLI_DEBUG
X	error("len: %d\n", len);
X#endif
X}
X
X/*
X * Checsum function.
X * Returns 0 if the block contains nothing but null characters.
X */
X#define	CHECKS	sizeof (ptb->ustar_dbuf.t_chksum)
X/*
X * We know, that sizeof (TCP) is 512 and therefore has no
X * reminder when dividing by 8
X *
X * CHECKS is known to be 8 too, use loop unrolling.
X */
X#define	DO8(a)	a; a; a; a; a; a; a; a;
X
XLOCAL Ulong
Xchecksum(ptb)
X	register	TCB	*ptb;
X{
X	register	int	i;
X	register	Ulong	sum = 0;
X	register	Uchar	*us;
X
X	if (signedcksum) {
X		register	char	*ss;
X
X		ss = (char *)ptb;
X		for (i = sizeof (*ptb)/8; --i >= 0; ) {
X			DO8(sum += *ss++);
X		}
X		if (sum == 0L)		/* Block containing 512 nul's */
X			return (sum);
X
X		ss = (char *)ptb->ustar_dbuf.t_chksum;
X		DO8(sum -= *ss++);
X		sum += CHECKS*' ';
X	} else {
X		us = (Uchar *)ptb;
X		for (i = sizeof (*ptb)/8; --i >= 0; ) {
X			DO8(sum += *us++);
X		}
X		if (sum == 0L)		/* Block containing 512 nul's */
X			return (sum);
X
X		us = (Uchar *)ptb->ustar_dbuf.t_chksum;
X		DO8(sum -= *us++);
X		sum += CHECKS*' ';
X	}
X	return (sum);
X}
X
X/*
X * Pretty print one character.
X * Quote anything that is not a printable 7 bit ASCII character.
X */
X#define	SP	' '
X#define	DEL	'\177'
X#define	SP8	(SP | 0x80)
X#define	DEL8	(DEL | 0x80)
X
XLOCAL void
Xpretty_char(p, c)
X	char		*p;
X	unsigned	c;
X{
X	c &= 0xFF;
X
X	if (c < SP || c == DEL) {			/* ctl char */
X		*p++ = '^';
X		*p++ = c ^ 0100;
X	} else if ((c > DEL && c < SP8) || c == DEL8) {  /* 8 bit ctl */
X		*p++ = '~';
X		*p++ = '^';
X		*p++ = c ^ 0300;
X	} else if (c >= SP8) {				/* 8 bit char */
X		*p++ = '~';
X		*p++ = c & 0177;
X	} else {					/* normal char */
X		*p++ = c;
X	}
X	*p = '\0';
X}
END-of-star-1.5.2/tartest/tartest.c
echo x - star-1.5.2/tartest/Makefile
sed 's/^X//' >star-1.5.2/tartest/Makefile << 'END-of-star-1.5.2/tartest/Makefile'
X#ident @(#)tartest.mk	1.7 08/08/15 
X###########################################################################
X# Sample makefile for general application programs
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		tartest
XCPPOPTS +=	-I../star
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DSCHILY_PRINT
X
XCFILES=		tartest.c
XLIBS=		-lschily
X#XMK_FILE=	Makefile.man
XXMK_FILE=	tartestman.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
X
END-of-star-1.5.2/tartest/Makefile
echo x - star-1.5.2/tartest/tartest.1
sed 's/^X//' >star-1.5.2/tartest/tartest.1 << 'END-of-star-1.5.2/tartest/tartest.1'
X. \" @(#)tartest.1	1.1 02/06/23 Copyr 2002 J. Schilling
X. \"  Manual page for tartest
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH TARTEST 1 "02/06/23" "J\*org Schilling" "Schily\'s USER COMMANDS"
X.SH NAME
Xtartest \- test tar archive for POSIX.1-1990 compliance
X.SH SYNOPSIS
X.B
Xtartest
X[
X.I options
X]
X.I < file
X.SH DESCRIPTION
X.B Tartest
Xreads a tar archive from 
X.B stdin
Xand checks this archive for compliance with POSIX.1-1990.
X
X.SH OPTIONS
XAll options can be abbreviated by their first letter.
X.TP
X.B \-help
XPrint a short help message.
X.TP
X.B \-v
Xprint all filenames during verification.
X
X.SH ENVIRONMENT
Xnone
X
X.SH FILES
Xnone
X
X.SH NOTES
XAs
X.B tartest
Xis limited to tests the data that is delivered by the tar archiver that is going
Xto be checked, it cannot tests if the tar archiver in question will produce
Xcorrect archives under all circumstances. There may be borderline cases that 
Xtrigger bugs in the tar archiver.
X.LP
XIf you like to to a more complete test, you should have a look at the file
X.B READE.quicktest
Xin the directory 
X.B testscripts
Xof either the 
X.B star
Xdistribution or the ftp server.
X
X.SH BUGS
END-of-star-1.5.2/tartest/tartest.1
echo x - star-1.5.2/tartest/tartestman.mk
sed 's/^X//' >star-1.5.2/tartest/tartestman.mk << 'END-of-star-1.5.2/tartest/tartestman.mk'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	tartest
XMANSECT=	$(MANSECT_CMD)
XMANSUFFIX=	$(MANSUFF_CMD)
XMANFILE=	tartest.1
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/tartest/tartestman.mk
echo c - star-1.5.2/autoconf
mkdir -p star-1.5.2/autoconf > /dev/null 2>&1
echo x - star-1.5.2/autoconf/acgeneral.m4
sed 's/^X//' >star-1.5.2/autoconf/acgeneral.m4 << 'END-of-star-1.5.2/autoconf/acgeneral.m4'
Xdnl @(#)acgeneral.m4	1.15 11/08/02 Copyright 1998-2011 J. Schilling
Xdnl
Xdnl Parameterized macros.
Xdnl Requires GNU m4.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl As a special exception, the Free Software Foundation gives unlimited
Xdnl permission to copy, distribute and modify the configure scripts that
Xdnl are the output of Autoconf.  You need not follow the terms of the GNU
Xdnl General Public License when using or distributing such scripts, even
Xdnl though portions of the text of Autoconf appear in them.  The GNU
Xdnl General Public License (GPL) does govern all other use of the material
Xdnl that constitutes the Autoconf program.
Xdnl
Xdnl Certain portions of the Autoconf source text are designed to be copied
Xdnl (in certain cases, depending on the input) into the output of
Xdnl Autoconf.  We call these the "data" portions.  The rest of the Autoconf
Xdnl source text consists of comments plus executable code that decides which
Xdnl of the data portions to output in any given case.  We call these
Xdnl comments and executable code the "non-data" portions.  Autoconf never
Xdnl copies any of the non-data portions into its output.
Xdnl
Xdnl This special exception to the GPL applies to versions of Autoconf
Xdnl released by the Free Software Foundation.  When you make and
Xdnl distribute a modified version of Autoconf, you may extend this special
Xdnl exception to the GPL to apply to your modified version as well, *unless*
Xdnl your modified version has the potential to copy into its output some
Xdnl of the text that was the non-data portion of the version that you started
Xdnl with.  (In other words, unless your change moves or copies text from
Xdnl the non-data portions to the data portions.)  If your modification has
Xdnl such potential, you must delete any notice of this special exception
Xdnl to the GPL from your modified version.
Xdnl
Xdnl Written by David MacKenzie, with help from
Xdnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
Xdnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
Xdnl
Xdivert(-1)dnl Throw away output until AC_INIT is called.
Xchangequote([, ])
X
Xdefine(AC_ACVERSION, 2.13)
Xdefine(AC_ACVERSION_SCHILY, 1.15-Schily)
X
Xdnl Some old m4's don't support m4exit.  But they provide
Xdnl equivalent functionality by core dumping because of the
Xdnl long macros we define.
Xifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
XInstall it before installing Autoconf or set the
XM4 environment variable to its path name.
X)m4exit(2)])
X
Xundefine([eval])
Xundefine([include])
Xundefine([shift])
Xundefine([format])
X
X
Xdnl ### Defining macros
X
X
Xdnl m4 output diversions.  We let m4 output them all in order at the end,
Xdnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
Xdnl and AC_DIVERSION_ICMDS.
X
Xdnl AC_DIVERSION_NOTICE - 1 (= 0)	AC_REQUIRE'd #! /bin/sh line
Xdefine(AC_DIVERSION_NOTICE, 1)dnl	copyright notice & option help strings
Xdefine(AC_DIVERSION_INIT, 2)dnl		initialization code
Xdefine(AC_DIVERSION_NORMAL_4, 3)dnl	AC_REQUIRE'd code, 4 level deep
Xdefine(AC_DIVERSION_NORMAL_3, 4)dnl	AC_REQUIRE'd code, 3 level deep
Xdefine(AC_DIVERSION_NORMAL_2, 5)dnl	AC_REQUIRE'd code, 2 level deep
Xdefine(AC_DIVERSION_NORMAL_1, 6)dnl	AC_REQUIRE'd code, 1 level deep
Xdefine(AC_DIVERSION_NORMAL, 7)dnl	the tests and output code
Xdefine(AC_DIVERSION_SED, 8)dnl		variable substitutions in config.status
Xdefine(AC_DIVERSION_CMDS, 9)dnl		extra shell commands in config.status
Xdefine(AC_DIVERSION_ICMDS, 10)dnl	extra initialization in config.status
X
Xdnl Change the diversion stream to STREAM, while stacking old values.
Xdnl AC_DIVERT_PUSH(STREAM)
Xdefine(AC_DIVERT_PUSH,
X[pushdef([AC_DIVERSION_CURRENT], $1)dnl
Xdivert(AC_DIVERSION_CURRENT)dnl
X])
X
Xdnl Change the diversion stream to its previous value, unstacking it.
Xdnl AC_DIVERT_POP()
Xdefine(AC_DIVERT_POP,
X[popdef([AC_DIVERSION_CURRENT])dnl
Xdivert(AC_DIVERSION_CURRENT)dnl
X])
X
Xdnl Initialize the diversion setup.
Xdefine([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
Xdnl This will be popped by AC_REQUIRE in AC_INIT.
Xpushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
X
Xdnl The prologue for Autoconf macros.
Xdnl AC_PRO(MACRO-NAME)
Xdefine(AC_PRO,
X[define([AC_PROVIDE_$1], )dnl
Xifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
X[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
X[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
X])
X
Xdnl The Epilogue for Autoconf macros.
Xdnl AC_EPI()
Xdefine(AC_EPI,
X[AC_DIVERT_POP()dnl
Xifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
X[undivert(AC_DIVERSION_NORMAL_4)dnl
Xundivert(AC_DIVERSION_NORMAL_3)dnl
Xundivert(AC_DIVERSION_NORMAL_2)dnl
Xundivert(AC_DIVERSION_NORMAL_1)dnl
X])dnl
X])
X
Xdnl Define a macro which automatically provides itself.  Add machinery
Xdnl so the macro automatically switches expansion to the diversion
Xdnl stack if it is not already using it.  In this case, once finished,
Xdnl it will bring back all the code accumulated in the diversion stack.
Xdnl This, combined with AC_REQUIRE, achieves the topological ordering of
Xdnl macros.  We don't use this macro to define some frequently called
Xdnl macros that are not involved in ordering constraints, to save m4
Xdnl processing.
Xdnl AC_DEFUN(NAME, EXPANSION)
Xdefine([AC_DEFUN],
X[define($1, [AC_PRO([$1])$2[]AC_EPI()])])
X
X
Xdnl ### Initialization
X
X
Xdnl AC_INIT_NOTICE()
XAC_DEFUN(AC_INIT_NOTICE,
X[# Guess values for system-dependent variables and create Makefiles.
X# Generated automatically using autoconf version] AC_ACVERSION AC_ACVERSION_SCHILY [
X# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
X# Copyright (C) 1998-2011 J. Schilling
X#
X# This configure script is free software; the Free Software Foundation
X# gives unlimited permission to copy, distribute and modify it.
X
X# Defaults:
Xac_help=
Xac_default_prefix=/usr/local
X[#] Any additions from configure.in:])
X
Xdnl AC_PREFIX_DEFAULT(PREFIX)
XAC_DEFUN(AC_PREFIX_DEFAULT,
X[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Xac_default_prefix=$1
XAC_DIVERT_POP()])
X
Xdnl AC_INIT_PARSE_ARGS()
XAC_DEFUN(AC_INIT_PARSE_ARGS,
X[
X# Initialize some variables set by options.
X# The variables have the same names as the options, with
X# dashes changed to underlines.
Xbuild=NONE
Xcache_file=./config.cache
Xexec_prefix=NONE
Xhost=NONE
Xno_create=
Xnonopt=NONE
Xno_recursion=
Xprefix=NONE
Xprogram_prefix=NONE
Xprogram_suffix=NONE
Xprogram_transform_name=s,x,x,
Xsilent=
Xsite=
Xsrcdir=
Xtarget=NONE
Xverbose=
Xrmttest=test
Xrmtcall=
XCONFIG_RMTCALL=${CONFIG_RMTCALL-NONE}
Xx_includes=NONE
Xx_libraries=NONE
Xdnl Installation directory options.
Xdnl These are left unexpanded so users can "make install exec_prefix=/foo"
Xdnl and all the variables that are supposed to be based on exec_prefix
Xdnl by default will actually change.
Xdnl Use braces instead of parens because sh, perl, etc. also accept them.
Xbindir='${exec_prefix}/bin'
Xsbindir='${exec_prefix}/sbin'
Xlibexecdir='${exec_prefix}/libexec'
Xdatadir='${prefix}/share'
Xsysconfdir='${prefix}/etc'
Xsharedstatedir='${prefix}/com'
Xlocalstatedir='${prefix}/var'
Xlibdir='${exec_prefix}/lib'
Xincludedir='${prefix}/include'
Xoldincludedir='/usr/include'
Xinfodir='${prefix}/info'
Xmandir='${prefix}/man'
X
X# Initialize some other variables.
Xsubdirs=
XMFLAGS= MAKEFLAGS=
XSHELL=${CONFIG_SHELL-/bin/sh}
X# Maximum number of lines to put in a shell here document.
Xac_max_here_lines=12
X
Xac_prev=
Xfor ac_option
Xdo
X
X  # If the previous option needs an argument, assign it.
X  if test -n "$ac_prev"; then
X    eval "$ac_prev=\$ac_option"
X    ac_prev=
X    continue
X  fi
X
X  case "$ac_option" in
Xchangequote(, )dnl
X  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
Xchangequote([, ])dnl
X  *) ac_optarg= ;;
X  esac
X
X  # Accept the important Cygnus configure options, so we can diagnose typos.
X
X  case "$ac_option" in
X
X  -bindir | --bindir | --bindi | --bind | --bin | --bi)
X    ac_prev=bindir ;;
X  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
X    bindir="$ac_optarg" ;;
X
X  -build | --build | --buil | --bui | --bu)
X    ac_prev=build ;;
X  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
X    build="$ac_optarg" ;;
X
X  -cache-file | --cache-file | --cache-fil | --cache-fi \
X  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X    ac_prev=cache_file ;;
X  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X    cache_file="$ac_optarg" ;;
X
X  -cc=* | --cc=* )
X    CC="$ac_optarg" ; echo using $CC as compiler ;;
X
X  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
X    ac_prev=datadir ;;
X  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
X  | --da=*)
X    datadir="$ac_optarg" ;;
X
X  -disable-* | --disable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_feature: invalid feature name)
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    eval "enable_${ac_feature}=no" ;;
X
X  -enable-* | --enable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_feature: invalid feature name)
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "enable_${ac_feature}='$ac_optarg'" ;;
X
X  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
X  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
X  | --exec | --exe | --ex)
X    ac_prev=exec_prefix ;;
X  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
X  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
X  | --exec=* | --exe=* | --ex=*)
X    exec_prefix="$ac_optarg" ;;
X
X  -gas | --gas | --ga | --g)
X    # Obsolete; use --with-gas.
X    with_gas=yes ;;
X
X  -help | --help | --hel | --he)
X    # Omit some internal or obsolete options to make the list less imposing.
X    # This message is too long to be a string in the A/UX 3.1 sh.
X    cat << EOF
Xchangequote(, )dnl
XUsage: configure [options] [host]
XOptions: [defaults in brackets after descriptions]
XConfiguration:
X  --cache-file=FILE       cache test results in FILE
X  --help                  print this message
X  --no-create             do not create output files
X  --quiet, --silent       do not print \`checking...' messages
X  --version               print the version of autoconf that created configure
XDirectory and file names:
X  --prefix=PREFIX         install architecture-independent files in PREFIX
X                          [$ac_default_prefix]
X  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
X                          [same as prefix]
X  --bindir=DIR            user executables in DIR [EPREFIX/bin]
X  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
X  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
X  --datadir=DIR           read-only architecture-independent data in DIR
X                          [PREFIX/share]
X  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
X  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
X                          [PREFIX/com]
X  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
X  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
X  --includedir=DIR        C header files in DIR [PREFIX/include]
X  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
X  --infodir=DIR           info documentation in DIR [PREFIX/info]
X  --mandir=DIR            man documentation in DIR [PREFIX/man]
X  --srcdir=DIR            find the sources in DIR [configure dir or ..]
X  --program-prefix=PREFIX prepend PREFIX to installed program names
X  --program-suffix=SUFFIX append SUFFIX to installed program names
X  --program-transform-name=PROGRAM
X                          run sed PROGRAM on installed program names
XEOF
X    cat << EOF
XHost type:
X  --build=BUILD           configure for building on BUILD [BUILD=HOST]
X  --host=HOST             configure for HOST [guessed]
X  --target=TARGET         configure for TARGET [TARGET=HOST]
XFeatures and packages:
X  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
X  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
X  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
X  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
X  --x-includes=DIR        X include files are in DIR
X  --x-libraries=DIR       X library files are in DIR
Xchangequote([, ])dnl
XEOF
X    if test -n "$ac_help"; then
X      echo "--enable and --with options recognized:$ac_help"
X    fi
X    exit 0 ;;
X
X  -host | --host | --hos | --ho)
X    ac_prev=host ;;
X  -host=* | --host=* | --hos=* | --ho=*)
X    host="$ac_optarg" ;;
X
X  -includedir | --includedir | --includedi | --included | --include \
X  | --includ | --inclu | --incl | --inc)
X    ac_prev=includedir ;;
X  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
X  | --includ=* | --inclu=* | --incl=* | --inc=*)
X    includedir="$ac_optarg" ;;
X
X  -infodir | --infodir | --infodi | --infod | --info | --inf)
X    ac_prev=infodir ;;
X  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
X    infodir="$ac_optarg" ;;
X
X  -libdir | --libdir | --libdi | --libd)
X    ac_prev=libdir ;;
X  -libdir=* | --libdir=* | --libdi=* | --libd=*)
X    libdir="$ac_optarg" ;;
X
X  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
X  | --libexe | --libex | --libe)
X    ac_prev=libexecdir ;;
X  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
X  | --libexe=* | --libex=* | --libe=*)
X    libexecdir="$ac_optarg" ;;
X
X  -localstatedir | --localstatedir | --localstatedi | --localstated \
X  | --localstate | --localstat | --localsta | --localst \
X  | --locals | --local | --loca | --loc | --lo)
X    ac_prev=localstatedir ;;
X  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
X  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
X  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
X    localstatedir="$ac_optarg" ;;
X
X  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
X    ac_prev=mandir ;;
X  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
X    mandir="$ac_optarg" ;;
X
X  -nfp | --nfp | --nf)
X    # Obsolete; use --without-fp.
X    with_fp=no ;;
X
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c)
X    no_create=yes ;;
X
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
X    no_recursion=yes ;;
X
X  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
X  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
X  | --oldin | --oldi | --old | --ol | --o)
X    ac_prev=oldincludedir ;;
X  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
X  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
X  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
X    oldincludedir="$ac_optarg" ;;
X
X  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
X    ac_prev=prefix ;;
X  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
X    prefix="$ac_optarg" ;;
X
X  -program-prefix | --program-prefix | --program-prefi | --program-pref \
X  | --program-pre | --program-pr | --program-p)
X    ac_prev=program_prefix ;;
X  -program-prefix=* | --program-prefix=* | --program-prefi=* \
X  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
X    program_prefix="$ac_optarg" ;;
X
X  -program-suffix | --program-suffix | --program-suffi | --program-suff \
X  | --program-suf | --program-su | --program-s)
X    ac_prev=program_suffix ;;
X  -program-suffix=* | --program-suffix=* | --program-suffi=* \
X  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
X    program_suffix="$ac_optarg" ;;
X
X  -program-transform-name | --program-transform-name \
X  | --program-transform-nam | --program-transform-na \
X  | --program-transform-n | --program-transform- \
X  | --program-transform | --program-transfor \
X  | --program-transfo | --program-transf \
X  | --program-trans | --program-tran \
X  | --progr-tra | --program-tr | --program-t)
X    ac_prev=program_transform_name ;;
X  -program-transform-name=* | --program-transform-name=* \
X  | --program-transform-nam=* | --program-transform-na=* \
X  | --program-transform-n=* | --program-transform-=* \
X  | --program-transform=* | --program-transfor=* \
X  | --program-transfo=* | --program-transf=* \
X  | --program-trans=* | --program-tran=* \
X  | --progr-tra=* | --program-tr=* | --program-t=*)
X    program_transform_name="$ac_optarg" ;;
X
X  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X  | -silent | --silent | --silen | --sile | --sil)
X    silent=yes ;;
X
X  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
X    ac_prev=sbindir ;;
X  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
X  | --sbi=* | --sb=*)
X    sbindir="$ac_optarg" ;;
X
X  -sharedstatedir | --sharedstatedir | --sharedstatedi \
X  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
X  | --sharedst | --shareds | --shared | --share | --shar \
X  | --sha | --sh)
X    ac_prev=sharedstatedir ;;
X  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
X  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
X  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
X  | --sha=* | --sh=*)
X    sharedstatedir="$ac_optarg" ;;
X
X  -site | --site | --sit)
X    ac_prev=site ;;
X  -site=* | --site=* | --sit=*)
X    site="$ac_optarg" ;;
X
X  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X    ac_prev=srcdir ;;
X  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X    srcdir="$ac_optarg" ;;
X
X  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
X  | --syscon | --sysco | --sysc | --sys | --sy)
X    ac_prev=sysconfdir ;;
X  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
X  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
X    sysconfdir="$ac_optarg" ;;
X
X  -target | --target | --targe | --targ | --tar | --ta | --t)
X    ac_prev=target ;;
X  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
X    target="$ac_optarg" ;;
X
X  -v | -verbose | --verbose | --verbos | --verbo | --verb)
X    verbose=yes ;;
X
X  -version | --version | --versio | --versi | --vers)
X    echo "configure generated by autoconf version AC_ACVERSION AC_ACVERSION_SCHILY"
X    exit 0 ;;
X
X  -with-* | --with-*)
X    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_package: invalid package name)
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "with_${ac_package}='$ac_optarg'" ;;
X
X  -without-* | --without-*)
X    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
X    # Reject names that are not valid shell variable names.
Xchangequote(, )dnl
X    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_ERROR($ac_package: invalid package name)
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    eval "with_${ac_package}=no" ;;
X
X  --x)
X    # Obsolete; use --with-x.
X    with_x=yes ;;
X
X  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
X  | --x-incl | --x-inc | --x-in | --x-i)
X    ac_prev=x_includes ;;
X  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
X  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
X    x_includes="$ac_optarg" ;;
X
X  -x-libraries | --x-libraries | --x-librarie | --x-librari \
X  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
X    ac_prev=x_libraries ;;
X  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
X  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
X    x_libraries="$ac_optarg" ;;
X
X  -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
X    ;;
X
X  *)
Xchangequote(, )dnl
X    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Xchangequote([, ])dnl
X      AC_MSG_WARN($ac_option: invalid host type)
X    fi
X    if test "x$nonopt" != xNONE; then
X      AC_MSG_ERROR(can only configure for one host and one target at a time)
X    fi
X    nonopt="$ac_option"
X    ;;
X
X  esac
Xdone
X
Xif test -n "$ac_prev"; then
X  AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
Xfi
X])
X
Xdnl Try to have only one #! line, so the script doesn't look funny
Xdnl for users of AC_REVISION.
Xdnl AC_INIT_BINSH()
XAC_DEFUN(AC_INIT_BINSH,
X[#! /bin/sh
X])
X
Xdnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
XAC_DEFUN(AC_INIT,
X[sinclude(acsite.m4)dnl
Xsinclude(./aclocal.m4)dnl
XAC_REQUIRE([AC_INIT_BINSH])dnl
XAC_INIT_NOTICE
XAC_DIVERT_POP()dnl to NORMAL
XAC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
XAC_INIT_PARSE_ARGS
XAC_INIT_PREPARE($1)dnl
XAC_DIVERT_POP()dnl to NORMAL
X])
X
Xdnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
XAC_DEFUN(AC_INIT_PREPARE,
X[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
X# File descriptor usage:
X# 0 standard input
X# 1 file creation
X# 2 errors and warnings
X# 3 some systems may open it to /dev/tty
X# 4 used on the Kubota Titan
Xdefine(AC_FD_MSG, 6)dnl
X[#] AC_FD_MSG checking for... messages and results
Xdefine(AC_FD_CC, 5)dnl
X[#] AC_FD_CC compiler messages saved in config.log
Xif test "$silent" = yes; then
X  exec AC_FD_MSG>/dev/null
Xelse
X  exec AC_FD_MSG>&1
Xfi
Xexec AC_FD_CC>./config.log
X
Xecho "\
XThis file contains any messages produced by compilers while
Xrunning configure, to aid debugging if configure makes a mistake.
X" 1>&AC_FD_CC
X
X# Strip out --no-create and --no-recursion so they do not pile up.
X# Also quote any args containing shell metacharacters.
Xac_configure_args=
Xfor ac_arg
Xdo
X  case "$ac_arg" in
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c) ;;
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
Xchangequote(<<, >>)dnl
Xdnl If you change this globbing pattern, test it on an old shell --
Xdnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
X  *" "*|*"	"*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
X  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
Xchangequote([, ])dnl
X  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
X  esac
Xdone
X
X# NLS nuisances.
X# Only set these to C if already set.  These must not be set unconditionally
X# because not all systems understand e.g. LANG=C (notably SCO).
X# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
X# Non-C LC_CTYPE values break the ctype check.
Xif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Xif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Xif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Xif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
X
X# confdefs.h avoids OS command line length limits that DEFS can exceed.
Xrm -rf conftest* confdefs.h
X# AIX cpp loses on an empty file, so make sure it contains at least a newline.
Xecho > confdefs.h
X
X# A filename unique to this package, relative to the directory that
X# configure is in, which we can look for to find out if srcdir is correct.
Xac_unique_file=$1
X
X# Find the source files, if location was not specified.
Xif test -z "$srcdir"; then
X  ac_srcdir_defaulted=yes
X  # Try the directory containing this script, then its parent.
X  ac_prog=[$]0
Xchangequote(, )dnl
X  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
X  srcdir=$ac_confdir
X  if test ! -r $srcdir/$ac_unique_file; then
X    srcdir=..
X  fi
Xelse
X  ac_srcdir_defaulted=no
Xfi
Xif test ! -r $srcdir/$ac_unique_file; then
X  if test "$ac_srcdir_defaulted" = yes; then
X    AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
X  else
X    AC_MSG_ERROR(can not find sources in $srcdir)
X  fi
Xfi
Xdnl Double slashes in pathnames in object file debugging info
Xdnl mess up M-x gdb in Emacs.
Xchangequote(, )dnl
Xsrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Xchangequote([, ])dnl
X
Xdnl Let the site file select an alternate cache file if it wants to.
XAC_SITE_LOAD
XAC_CACHE_LOAD
XAC_LANG_C
Xdnl By default always use an empty string as the executable
Xdnl extension.  Only change it if the script calls AC_EXEEXT.
Xac_exeext=
Xac_xexeext=
Xdnl By default assume that objects files use an extension of .o.  Only
Xdnl change it if the script calls AC_OBJEXT.
Xac_objext=o
XAC_PROG_ECHO_N
Xdnl Substitute for predefined variables.
XAC_SUBST(SHELL)dnl
XAC_SUBST(CFLAGS)dnl
XAC_SUBST(CPPFLAGS)dnl
XAC_SUBST(CXXFLAGS)dnl
XAC_SUBST(FFLAGS)dnl
XAC_SUBST(DEFS)dnl
XAC_SUBST(LDFLAGS)dnl
XAC_SUBST(LIBS)dnl
XAC_SUBST(exec_prefix)dnl
XAC_SUBST(prefix)dnl
XAC_SUBST(program_transform_name)dnl
Xdnl Installation directory options.
XAC_SUBST(bindir)dnl
XAC_SUBST(sbindir)dnl
XAC_SUBST(libexecdir)dnl
XAC_SUBST(datadir)dnl
XAC_SUBST(sysconfdir)dnl
XAC_SUBST(sharedstatedir)dnl
XAC_SUBST(localstatedir)dnl
XAC_SUBST(libdir)dnl
XAC_SUBST(includedir)dnl
XAC_SUBST(oldincludedir)dnl
XAC_SUBST(infodir)dnl
XAC_SUBST(mandir)dnl
X])
X
X
Xdnl ### Selecting optional features
X
X
Xdnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
XAC_DEFUN(AC_ARG_ENABLE,
X[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Xac_help="$ac_help
X[$2]"
XAC_DIVERT_POP()dnl
X[#] Check whether --enable-[$1] or --disable-[$1] was given.
Xif test "[${enable_]patsubst([$1], -, _)+set}" = set; then
X  enableval="[$enable_]patsubst([$1], -, _)"
X  ifelse([$3], , :, [$3])
Xifelse([$4], , , [else
X  $4
X])dnl
Xfi
X])
X
XAC_DEFUN(AC_ENABLE,
X[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
XAC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
X])
X
X
Xdnl ### Working with optional software
X
X
Xdnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
XAC_DEFUN(AC_ARG_WITH,
X[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Xac_help="$ac_help
X[$2]"
XAC_DIVERT_POP()dnl
X[#] Check whether --with-[$1] or --without-[$1] was given.
Xif test "[${with_]patsubst([$1], -, _)+set}" = set; then
X  withval="[$with_]patsubst([$1], -, _)"
X  ifelse([$3], , :, [$3])
Xifelse([$4], , , [else
X  $4
X])dnl
Xfi
X])
X
XAC_DEFUN(AC_WITH,
X[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
XAC_ARG_WITH([$1], [  --with-$1], [$2], [$3])dnl
X])
X
X
Xdnl ### Transforming program names.
X
X
Xdnl AC_ARG_PROGRAM()
XAC_DEFUN(AC_ARG_PROGRAM,
X[if test "$program_transform_name" = s,x,x,; then
X  program_transform_name=
Xelse
X  # Double any \ or $.  echo might interpret backslashes.
X  cat <<\EOF_SED > conftestsed
Xs,\\,\\\\,g; s,\$,$$,g
XEOF_SED
X  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
X  rm -f conftestsed
Xfi
Xtest "$program_prefix" != NONE &&
X  program_transform_name="s,^,${program_prefix},; $program_transform_name"
X# Use a double $ so make ignores it.
Xtest "$program_suffix" != NONE &&
X  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
X
X# sed with no file args requires a program.
Xtest "$program_transform_name" = "" && program_transform_name="s,x,x,"
X])
X
X
Xdnl ### Version numbers
X
X
Xdnl AC_REVISION(REVISION-INFO)
XAC_DEFUN(AC_REVISION,
X[AC_REQUIRE([AC_INIT_BINSH])dnl
X[# From configure.in] translit([$1], $")])
X
Xdnl Subroutines of AC_PREREQ.
X
Xdnl Change the dots in NUMBER into commas.
Xdnl AC_PREREQ_SPLIT(NUMBER)
Xdefine(AC_PREREQ_SPLIT,
X[translit($1, ., [, ])])
X
Xdnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
Xdnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
Xdefine(AC_PREREQ_CANON,
X[$1, $2, ifelse([$3], , 0, [$3])])
X
Xdnl Complain and exit if version number 1 is less than version number 2.
Xdnl PRINTABLE2 is the printable version of version number 2.
Xdnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
Xdnl                   PRINTABLE2)
Xdefine(AC_PREREQ_COMPARE,
X[ifelse(builtin([eval],
X[$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
X[errprint(dnl
XFATAL ERROR: Autoconf version $7 or higher is required for this script
X)m4exit(3)])])
X
Xdnl Complain and exit if the Autoconf version is less than VERSION.
Xdnl AC_PREREQ(VERSION)
Xdefine(AC_PREREQ,
X[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
XAC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
X
X
Xdnl ### Getting the canonical system type
X
X
Xdnl Find install-sh, config.sub, config.guess, and Cygnus configure
Xdnl in directory DIR.  These are auxiliary files used in configuration.
Xdnl DIR can be either absolute or relative to $srcdir.
Xdnl AC_CONFIG_AUX_DIR(DIR)
XAC_DEFUN(AC_CONFIG_AUX_DIR,
X[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
X
Xdnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
Xdnl There's no need to call this macro explicitly; just AC_REQUIRE it.
XAC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
X[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
X
Xdnl Internal subroutine.
Xdnl Search for the configuration auxiliary files in directory list $1.
Xdnl We look only for install-sh, so users of AC_PROG_INSTALL
Xdnl do not automatically need to distribute the other auxiliary files.
Xdnl AC_CONFIG_AUX_DIRS(DIR ...)
XAC_DEFUN(AC_CONFIG_AUX_DIRS,
X[ac_aux_dir=
Xfor ac_dir in $1; do
X  if test -f $ac_dir/install-sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install-sh -c"
X    break
X  elif test -f $ac_dir/install.sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install.sh -c"
X    break
X  fi
Xdone
Xif test -z "$ac_aux_dir"; then
X  AC_MSG_ERROR([can not find install-sh or install.sh in $1])
Xfi
Xac_config_guess=$ac_aux_dir/config.guess
Xac_config_sub=$ac_aux_dir/config.sub
Xac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
XAC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
X])
X
Xdnl Canonicalize the host, target, and build system types.
XAC_DEFUN(AC_CANONICAL_SYSTEM,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
XAC_BEFORE([$0], [AC_ARG_PROGRAM])
X# Do some error checking and defaulting for the host and target type.
X# The inputs are:
X#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
X#
X# The rules are:
X# 1. You are not allowed to specify --host, --target, and nonopt at the
X#    same time.
X# 2. Host defaults to nonopt.
X# 3. If nonopt is not specified, then host defaults to the current host,
X#    as determined by config.guess.
X# 4. Target and build default to nonopt.
X# 5. If nonopt is not specified, then target and build default to host.
X
X# The aliases save the names the user supplied, while $host etc.
X# will get canonicalized.
Xcase $host---$target---$nonopt in
XNONE---*---* | *---NONE---* | *---*---NONE) ;;
X*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
Xesac
X
XAC_CANONICAL_HOST
XAC_CANONICAL_TARGET
XAC_CANONICAL_BUILD
Xtest "$host_alias" != "$target_alias" &&
X  test "$program_prefix$program_suffix$program_transform_name" = \
X    NONENONEs,x,x, &&
X  program_prefix=${target_alias}-
X])
X
Xdnl Subroutines of AC_CANONICAL_SYSTEM.
X
XAC_DEFUN(AC_CANONICAL_HOST,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
X
X# Make sure we can run config.sub.
Xif ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
Xelse AC_MSG_ERROR(can not run $ac_config_sub)
Xfi
X
XAC_MSG_CHECKING(host system type)
X
Xdnl Set host_alias.
Xhost_alias=$host
Xcase "$host_alias" in
XNONE)
X  case $nonopt in
X  NONE)
X    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
X    else AC_MSG_ERROR(can not guess host type; you must specify one)
X    fi ;;
X  *) host_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xdnl Set the other host vars.
Xchangequote(<<, >>)dnl
Xhost=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
Xhost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xhost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xhost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xchangequote([, ])dnl
XAC_MSG_RESULT($host)
XAC_SUBST(host)dnl
XAC_SUBST(host_alias)dnl
XAC_SUBST(host_cpu)dnl
XAC_SUBST(host_vendor)dnl
XAC_SUBST(host_os)dnl
X])
X
Xdnl Internal use only.
XAC_DEFUN(AC_CANONICAL_TARGET,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
XAC_MSG_CHECKING(target system type)
X
Xdnl Set target_alias.
Xtarget_alias=$target
Xcase "$target_alias" in
XNONE)
X  case $nonopt in
X  NONE) target_alias=$host_alias ;;
X  *) target_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xdnl Set the other target vars.
Xchangequote(<<, >>)dnl
Xtarget=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
Xtarget_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xtarget_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xtarget_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xchangequote([, ])dnl
XAC_MSG_RESULT($target)
XAC_SUBST(target)dnl
XAC_SUBST(target_alias)dnl
XAC_SUBST(target_cpu)dnl
XAC_SUBST(target_vendor)dnl
XAC_SUBST(target_os)dnl
X])
X
Xdnl Internal use only.
XAC_DEFUN(AC_CANONICAL_BUILD,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
XAC_MSG_CHECKING(build system type)
X
Xdnl Set build_alias.
Xbuild_alias=$build
Xcase "$build_alias" in
XNONE)
X  case $nonopt in
X  NONE) build_alias=$host_alias ;;
X  *) build_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xdnl Set the other build vars.
Xchangequote(<<, >>)dnl
Xbuild=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
Xbuild_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xbuild_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xbuild_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xchangequote([, ])dnl
XAC_MSG_RESULT($build)
XAC_SUBST(build)dnl
XAC_SUBST(build_alias)dnl
XAC_SUBST(build_cpu)dnl
XAC_SUBST(build_vendor)dnl
XAC_SUBST(build_os)dnl
X])
X
X
Xdnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
Xdnl if the cache file is inconsistent with the current host,
Xdnl target and build system types, execute CMD or print a default
Xdnl error message.
XAC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
X  AC_REQUIRE([AC_CANONICAL_SYSTEM])
X  AC_MSG_CHECKING([cached system tuple])
X  if { test x"${ac_cv_host_system_type+set}" = x"set" &&
X       test x"$ac_cv_host_system_type" != x"$host"; } ||
X     { test x"${ac_cv_build_system_type+set}" = x"set" &&
X       test x"$ac_cv_build_system_type" != x"$build"; } ||
X     { test x"${ac_cv_target_system_type+set}" = x"set" &&
X       test x"$ac_cv_target_system_type" != x"$target"; }; then
X      AC_MSG_RESULT([different])
X      ifelse($#, 1, [$1],
X        [AC_MSG_ERROR([remove config.cache and re-run configure])])
X  else
X    AC_MSG_RESULT(ok)
X  fi
X  ac_cv_host_system_type="$host"
X  ac_cv_build_system_type="$build"
X  ac_cv_target_system_type="$target"
X])
X
X
Xdnl ### Caching test results
X
X
Xdnl Look for site or system specific initialization scripts.
Xdnl AC_SITE_LOAD()
Xdefine(AC_SITE_LOAD,
X[# Prefer explicitly selected file to automatically selected ones.
Xif test -z "$CONFIG_SITE"; then
X  if test "x$prefix" != xNONE; then
X    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
X  else
X    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
X  fi
Xfi
Xfor ac_site_file in $CONFIG_SITE; do
X  if test -r "$ac_site_file"; then
X    echo "loading site script $ac_site_file"
X    . "$ac_site_file"
X  fi
Xdone
X])
X
Xdnl AC_CACHE_LOAD()
Xdefine(AC_CACHE_LOAD,
X[if test -r "$cache_file"; then
X  echo "loading cache $cache_file"
X  . $cache_file
Xelse
X  echo "creating cache $cache_file"
X  > $cache_file
Xfi
X])
X
Xdnl AC_CACHE_SAVE()
Xdefine(AC_CACHE_SAVE,
X[cat > confcache <<\EOF
X# This file is a shell script that caches the results of configure
X# tests run on this system so they can be shared between configure
X# scripts and configure runs.  It is not useful on other systems.
X# If it contains results you don't want to keep, you may remove or edit it.
X#
X# By default, configure uses ./config.cache as the cache file,
X# creating it if it does not exist already.  You can give configure
X# the --cache-file=FILE option to use a different cache file; that is
X# what configure does when it calls configure scripts in
X# subdirectories, so they share the cache.
X# Giving --cache-file=/dev/null disables caching, for debugging configure.
X# config.status only pays attention to the cache file if you give it the
X# --recheck option to rerun configure.
X#
XEOF
Xdnl Allow a site initialization script to override cache values.
X# The following way of writing the cache mishandles newlines in values,
X# but we know of no workaround that is simple, portable, and efficient.
X# So, don't put newlines in cache variables' values.
X# Ultrix sh set writes to stderr and can't be redirected directly,
X# and sets the high bit in the cache file unless we assign to the vars.
Xchangequote(, )dnl
X(set) 2>&1 |
X  case `(ac_space=' '; set | grep ac_space) 2>&1` in
X  *ac_space=\ *)
X    # `set' does not quote correctly, so add quotes (double-quote substitution
X    # turns \\\\ into \\, and sed turns \\ into \).
X    sed -n \
X      -e "s/'/'\\\\''/g" \
X      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
X    ;;
X  *)
X    # `set' quotes correctly as required by POSIX, so do not add quotes.
X    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
X    ;;
X  esac >> confcache
Xchangequote([, ])dnl
Xif cmp -s $cache_file confcache; then
X  :
Xelse
X  if test -w $cache_file; then
X    echo "updating cache $cache_file"
X    cat confcache > $cache_file
X  else
X    echo "not updating unwritable cache $cache_file"
X  fi
Xfi
Xrm -f confcache
X])
X
Xdnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
Xdnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
Xdefine(AC_CACHE_VAL,
X[dnl We used to use the below line, but it fails if the 1st arg is a
Xdnl shell variable, so we need the eval.
Xdnl if test "${$1+set}" = set; then
Xdnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
Xif eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
Xelse
X  $2
Xfi
X])
X
Xdnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
Xdefine(AC_CACHE_CHECK,
X[AC_MSG_CHECKING([$1])
XAC_CACHE_VAL([$2], [$3])
XAC_MSG_RESULT([$]$2)])
X
X
Xdnl ### Defining symbols
X
X
Xdnl Set VARIABLE to VALUE, verbatim, or 1.
Xdnl AC_DEFINE(VARIABLE [, VALUE])
Xdefine(AC_DEFINE,
X[cat >> confdefs.h <<\EOF
X[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
XEOF
X])
X
Xdnl Similar, but perform shell substitutions $ ` \ once on VALUE.
Xdefine(AC_DEFINE_UNQUOTED,
X[cat >> confdefs.h <<EOF
X[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
XEOF
X])
X
X
Xdnl ### Setting output variables
X
X
Xdnl This macro protects VARIABLE from being diverted twice
Xdnl if this macro is called twice for it.
Xdnl AC_SUBST(VARIABLE)
Xdefine(AC_SUBST,
X[ifdef([AC_SUBST_$1], ,
X[define([AC_SUBST_$1], )dnl
XAC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
Xs%@$1@%[$]$1%g
XAC_DIVERT_POP()dnl
X])])
X
Xdnl AC_SUBST_FILE(VARIABLE)
Xdefine(AC_SUBST_FILE,
X[ifdef([AC_SUBST_$1], ,
X[define([AC_SUBST_$1], )dnl
XAC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
X/@$1@/r [$]$1
Xs%@$1@%%g
XAC_DIVERT_POP()dnl
X])])
X
X
Xdnl ### Printing messages
X
X
Xdnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
Xdefine(AC_MSG_CHECKING,
X[echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG
Xecho "configure:__oline__: checking $1" >&AC_FD_CC])
X
Xdnl AC_CHECKING(FEATURE-DESCRIPTION)
Xdefine(AC_CHECKING,
X[echo "checking $1" 1>&AC_FD_MSG
Xecho "configure:__oline__: checking $1" >&AC_FD_CC])
X
Xdnl AC_MSG_RESULT(RESULT-DESCRIPTION)
Xdefine(AC_MSG_RESULT,
X[eval echo "$ac_t""$1" 1>&AC_FD_MSG])
X
Xdnl AC_VERBOSE(RESULT-DESCRIPTION)
Xdefine(AC_VERBOSE,
X[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
Xecho "	$1" 1>&AC_FD_MSG])
X
Xdnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
Xdefine(AC_MSG_WARN,
X[echo "configure: warning: $1" 1>&2])
X
Xdnl AC_MSG_ERROR(ERROR-DESCRIPTION)
Xdefine(AC_MSG_ERROR,
X[{ echo "configure: error: $1" 1>&2; exit 1; }])
X
X
Xdnl ### Selecting which language to use for testing
X
X
Xdnl AC_LANG_C()
XAC_DEFUN(AC_LANG_C,
X[define([AC_LANG], [C])dnl
Xac_ext=c
X# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CPP $CPPFLAGS'
Xac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Xac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC'
Xcross_compiling=$ac_cv_prog_cc_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X])
X
Xdnl AC_LANG_CPLUSPLUS()
XAC_DEFUN(AC_LANG_CPLUSPLUS,
X[define([AC_LANG], [CPLUSPLUS])dnl
Xac_ext=C
X# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CXXCPP $CPPFLAGS'
Xac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Xac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC'
Xcross_compiling=$ac_cv_prog_cxx_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X])
X
Xdnl AC_LANG_FORTRAN77()
XAC_DEFUN(AC_LANG_FORTRAN77,
X[define([AC_LANG], [FORTRAN77])dnl
Xac_ext=f
Xac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Xac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC'
Xcross_compiling=$ac_cv_prog_f77_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X])
X
Xdnl Push the current language on a stack.
Xdnl AC_LANG_SAVE()
Xdefine(AC_LANG_SAVE,
X[pushdef([AC_LANG_STACK], AC_LANG)])
X
Xdnl Restore the current language from the stack.
Xdnl AC_LANG_RESTORE()
Xpushdef([AC_LANG_RESTORE],
X[ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl
XAC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl
XAC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])])
X
X
Xdnl ### Compiler-running mechanics
X
X
Xdnl The purpose of this macro is to "configure:123: command line"
Xdnl written into config.log for every test run.
Xdnl AC_TRY_EVAL(VARIABLE)
XAC_DEFUN(AC_TRY_EVAL,
X[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
X(eval [$]$1) 2>&AC_FD_CC; }])
X
Xdnl AC_TRY_COMMAND(COMMAND)
XAC_DEFUN(AC_TRY_COMMAND,
X[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
X
X
Xdnl ### Dependencies between macros
X
X
Xdnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
Xdefine(AC_BEFORE,
X[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
X])])])
X
Xdnl AC_REQUIRE(MACRO-NAME)
Xdefine(AC_REQUIRE,
X[ifdef([AC_PROVIDE_$1], ,
X[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
Xindir([$1])
XAC_DIVERT_POP()dnl
X])])
X
Xdnl AC_PROVIDE(MACRO-NAME)
Xdefine(AC_PROVIDE,
X[define([AC_PROVIDE_$1], )])
X
Xdnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
Xdefine(AC_OBSOLETE,
X[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
X)])
X
X
Xdnl ### Checking for programs
X
X
Xdnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
Xdnl               [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]])
XAC_DEFUN(AC_CHECK_PROG,
X[# Extract the first word of "$2", so it can be a program name with args.
Xset dummy $2; ac_word=[$]2
XAC_MSG_CHECKING([for $ac_word])
XAC_CACHE_VAL(ac_cv_prog_$1,
X[if test -n "[$]$1"; then
X  ac_cv_prog_$1="[$]$1" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
Xifelse([$6], , , [  ac_prog_rejected=no
X])dnl
Xdnl $ac_dummy forces splitting on constant user-supplied paths.
Xdnl POSIX.2 word splitting is done only on the output of word expansions,
Xdnl not every word.  This closes a longstanding sh security hole.
X  ac_dummy="ifelse([$5], , $PATH, [$5])"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
Xifelse([$6], , , dnl
X[      if test "[$ac_dir/$ac_word]" = "$6"; then
X        ac_prog_rejected=yes
X	continue
X      fi
X])dnl
X      ac_cv_prog_$1="$3"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xifelse([$6], , , [if test $ac_prog_rejected = yes; then
X  # We found a bogon in the path, so make sure we never use it.
X  set dummy [$]ac_cv_prog_$1
X  shift
X  if test [$]# -gt 0; then
X    # We chose a different compiler from the bogus one.
X    # However, it has the same basename, so the bogon will be chosen
X    # first if we set $1 to just the basename; use the full file name.
X    shift
X    set dummy "$ac_dir/$ac_word" "[$]@"
X    shift
X    ac_cv_prog_$1="[$]@"
Xifelse([$2], [$4], dnl
X[  else
X    # Default is a loser.
X    AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
Xifelse([$5], , [\$]PATH, [$5])])
X])dnl
X  fi
Xfi
X])dnl
Xdnl If no 4th arg is given, leave the cache variable unset,
Xdnl so AC_CHECK_PROGS will keep looking.
Xifelse([$4], , , [  test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
X])dnl
Xfi])dnl
X$1="$ac_cv_prog_$1"
Xif test -n "[$]$1"; then
X  AC_MSG_RESULT([$]$1)
Xelse
X  AC_MSG_RESULT(no)
Xfi
XAC_SUBST($1)dnl
X])
X
Xdnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
XAC_DEFUN(AC_PATH_PROG,
X[# Extract the first word of "$2", so it can be a program name with args.
Xset dummy $2; ac_word=[$]2
XAC_MSG_CHECKING([for $ac_word])
XAC_CACHE_VAL(ac_cv_path_$1,
X[case "[$]$1" in
X  /*)
X  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
X  ;;
X  ?:/*)			 
X  ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
X  ;;
X  *)
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
Xdnl $ac_dummy forces splitting on constant user-supplied paths.
Xdnl POSIX.2 word splitting is done only on the output of word expansions,
Xdnl not every word.  This closes a longstanding sh security hole.
X  ac_dummy="ifelse([$4], , $PATH, [$4])"
X  for ac_dir in $ac_dummy; do 
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_path_$1="$ac_dir/$ac_word"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xdnl If no 3rd arg is given, leave the cache variable unset,
Xdnl so AC_PATH_PROGS will keep looking.
Xifelse([$3], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
X])dnl
X  ;;
Xesac])dnl
X$1="$ac_cv_path_$1"
Xif test -n "[$]$1"; then
X  AC_MSG_RESULT([$]$1)
Xelse
X  AC_MSG_RESULT(no)
Xfi
XAC_SUBST($1)dnl
X])
X
Xdnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
Xdnl                [, PATH]])
XAC_DEFUN(AC_CHECK_PROGS,
X[for ac_prog in $2
Xdo
XAC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
Xtest -n "[$]$1" && break
Xdone
Xifelse([$3], , , [test -n "[$]$1" || $1="$3"
X])])
X
Xdnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
Xdnl               [, PATH]])
XAC_DEFUN(AC_PATH_PROGS,
X[for ac_prog in $2
Xdo
XAC_PATH_PROG($1, [$]ac_prog, , $4)
Xtest -n "[$]$1" && break
Xdone
Xifelse([$3], , , [test -n "[$]$1" || $1="$3"
X])])
X
Xdnl Internal subroutine.
XAC_DEFUN(AC_CHECK_TOOL_PREFIX,
X[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Xif test $host != $build; then
X  ac_tool_prefix=${host_alias}-
Xelse
X  ac_tool_prefix=
Xfi
X])
X
Xdnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
XAC_DEFUN(AC_CHECK_TOOL,
X[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
XAC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
X	      ifelse([$3], , [$2], ), $4)
Xifelse([$3], , , [
Xif test -z "$ac_cv_prog_$1"; then
Xif test -n "$ac_tool_prefix"; then
X  AC_CHECK_PROG($1, $2, $2, $3)
Xelse
X  $1="$3"
Xfi
Xfi])
X])
X
Xdnl Guess the value for the `prefix' variable by looking for
Xdnl the argument program along PATH and taking its parent.
Xdnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
Xdnl set `prefix' to /usr/local/gnu.
Xdnl This comes too late to find a site file based on the prefix,
Xdnl and it might use a cached value for the path.
Xdnl No big loss, I think, since most configures don't use this macro anyway.
Xdnl AC_PREFIX_PROGRAM(PROGRAM)
XAC_DEFUN(AC_PREFIX_PROGRAM,
X[if test "x$prefix" = xNONE; then
Xchangequote(<<, >>)dnl
Xdefine(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
Xchangequote([, ])dnl
Xdnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
Xecho $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG
XAC_PATH_PROG(AC_VAR_NAME, $1)
Xchangequote(<<, >>)dnl
X  if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
X    prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  fi
Xfi
Xundefine([AC_VAR_NAME])dnl
X])
X
Xdnl Try to compile, link and execute TEST-PROGRAM.  Set WORKING-VAR to
Xdnl `yes' if the current compiler works, otherwise set it ti `no'.  Set
Xdnl CROSS-VAR to `yes' if the compiler and linker produce non-native
Xdnl executables, otherwise set it to `no'.  Before calling
Xdnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
Xdnl language.
Xdnl 
Xdnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR)
XAC_DEFUN(AC_TRY_COMPILER,
X[cat > conftest.$ac_ext << EOF
Xifelse(AC_LANG, [FORTRAN77], ,
X[
X[#]line __oline__ "configure"
X#include "confdefs.h"
X])
X[$1]
XEOF
Xif AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
X  [$2]=yes
X  # If we can't run a trivial program, we are probably using a cross compiler.
X  if (./conftest${ac_xexeext}; exit) 2>/dev/null; then
X    [$3]=no
X  else
X    [$3]=yes
X  fi
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
X  [$2]=no
Xfi
Xrm -fr conftest*])
X
X
Xdnl ### Checking for libraries
X
X
Xdnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found)
Xdnl Try to link a program that calls FUNC, handling GCC builtins.  If
Xdnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
Xdnl ACTION-IF-NOT-FOUND.
X
XAC_DEFUN(AC_TRY_LINK_FUNC,
XAC_TRY_LINK(dnl
Xifelse([$1], [main], , dnl Avoid conflicting decl of main.
X[/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $1();
X]),
X[$1()],
X[$2],
X[$3]))
X
X
Xdnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
Xdnl            [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
Xdnl Search for a library defining FUNC, if it's not already available.
X
XAC_DEFUN(AC_SEARCH_LIBS,
X[AC_PREREQ([2.13])
XAC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
X[ac_func_search_save_LIBS="$LIBS"
Xac_cv_search_$1="no"
XAC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
Xtest "$ac_cv_search_$1" = "no" && for i in $2; do
XLIBS="-l$i $5 $ac_func_search_save_LIBS"
XAC_TRY_LINK_FUNC([$1],
X[ac_cv_search_$1="-l$i"
Xbreak])
Xdone
XLIBS="$ac_func_search_save_LIBS"])
Xif test "$ac_cv_search_$1" != "no"; then
X  test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
X  $3
Xelse :
X  $4
Xfi])
X
X
X
Xdnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl              [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_CHECK_LIB,
X[AC_MSG_CHECKING([for $2 in -l$1])
Xdnl Use a cache variable name containing both the library and function name,
Xdnl because the test really is for library $1 defining function $2, not
Xdnl just for library $1.  Separate tests with the same $1 and different $2s
Xdnl may have different results.
Xac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
X[ac_save_LIBS="$LIBS"
XLIBS=`echo "-l$1 $5 $LIBS" | sed -e 's/-lc //'`
XAC_TRY_LINK(dnl
Xifelse(AC_LANG, [FORTRAN77], ,
Xifelse([$2], [main], , dnl Avoid conflicting decl of main.
X[/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $2();
X])),
X	    [$2()],
X	    eval "ac_cv_lib_$ac_lib_var=yes",
X	    eval "ac_cv_lib_$ac_lib_var=no")
XLIBS="$ac_save_LIBS"
X])dnl
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$3], ,
X[changequote(, )dnl
X  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
X    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_lib)
X  LIBS="-l$1 $LIBS"
X], [$3])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$4], , , [$4
X])dnl
Xfi
X])
X
Xdnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl                 [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_HAVE_LIBRARY,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
Xchangequote(<<, >>)dnl
Xdefine(<<AC_LIB_NAME>>, dnl
Xpatsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
Xdefine(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING([for -l[]AC_LIB_NAME])
XAC_CACHE_VAL(AC_CV_NAME,
X[ac_save_LIBS="$LIBS"
XLIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
XAC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)
XLIBS="$ac_save_LIBS"
X])dnl
XAC_MSG_RESULT($AC_CV_NAME)
Xif test "$AC_CV_NAME" = yes; then
X  ifelse([$2], ,
X[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
X  LIBS="-l[]AC_LIB_NAME[] $LIBS"
X], [$2])
Xifelse([$3], , , [else
X  $3
X])dnl
Xfi
Xundefine([AC_LIB_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
X
Xdnl ### Examining declarations
X
X
Xdnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
XAC_DEFUN(AC_TRY_CPP,
X[AC_REQUIRE_CPP()dnl
Xcat > conftest.$ac_ext <<EOF
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$1]
XEOF
Xdnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
Xdnl We used to copy stderr to stdout and capture it in a variable, but
Xdnl that breaks under sh -x, which writes compile commands starting
Xdnl with ` +' to stderr in eval and subshells.
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
XAC_TRY_EVAL(ac_try)
Xdnl ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  ifelse([$2], , :, [rm -rf conftest*
X  $2])
Xelse
X  echo "$ac_err" >&AC_FD_CC
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$3], , , [  rm -rf conftest*
X  $3
X])dnl
Xfi
Xrm -f conftest*])
X
Xdnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
Xdnl                 ACTION-IF-NOT-FOUND])
XAC_DEFUN(AC_EGREP_HEADER,
X[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
X
Xdnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
Xdnl come early, it is not included in AC_BEFORE checks.
Xdnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [,
Xdnl              ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_EGREP_CPP,
X[AC_REQUIRE_CPP()dnl
Xcat > conftest.$ac_ext <<EOF
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$2]
XEOF
Xdnl eval is necessary to expand ac_cpp.
Xdnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
Xdnl Prevent m4 from eating character classes:
Xchangequote(, )dnl
X  egrep "$1" >/dev/null 2>&1; then
Xchangequote([, ])dnl
X  ifelse([$3], , :, [rm -rf conftest*
X  $3])
Xifelse([$4], , , [else
X  rm -rf conftest*
X  $4
X])dnl
Xfi
Xrm -f conftest*
X])
X
X
Xdnl ### Examining syntax
X
X
Xdnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
Xdnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_TRY_COMPILE,
X[cat > conftest.$ac_ext <<EOF
Xifelse(AC_LANG, [FORTRAN77],
X[      program main
X[$2]
X      end],
X[dnl This sometimes fails to find confdefs.h, for some reason.
Xdnl [#]line __oline__ "[$]0"
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$1]
Xint main() {
X[$2]
X; return 0; }
X])EOF
Xif AC_TRY_EVAL(ac_compile); then
X  ifelse([$3], , :, [rm -rf conftest*
X  $3])
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$4], , , [  rm -rf conftest*
X  $4
X])dnl
Xfi
Xrm -f conftest*])
X
X
Xdnl ### Examining libraries
X
X
Xdnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
Xdnl                  ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
XAC_DEFUN(AC_COMPILE_CHECK,
X[AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
Xifelse([$1], , , [AC_CHECKING([for $1])
X])dnl
XAC_TRY_LINK([$2], [$3], [$4], [$5])
X])
X
Xdnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
Xdnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_TRY_LINK,
X[cat > conftest.$ac_ext <<EOF
Xifelse(AC_LANG, [FORTRAN77],
X[
X      program main
X      call [$2]
X      end
X],
X[dnl This sometimes fails to find confdefs.h, for some reason.
Xdnl [#]line __oline__ "[$]0"
X[#]line __oline__ "configure"
X#include "confdefs.h"
X[$1]
Xint main() {
X[$2]
X; return 0; }
X])EOF
Xif AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
X  ifelse([$3], , :, [rm -rf conftest*
X  $3])
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$4], , , [  rm -rf conftest*
X  $4
X])dnl
Xfi
Xrm -f conftest*])
X
X
Xdnl ### Checking for run-time features
X
X
Xdnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
Xdnl            [, ACTION-IF-CROSS-COMPILING]]])
XAC_DEFUN(AC_TRY_RUN,
X[if test "$cross_compiling" = yes; then
X  ifelse([$4], ,
X    [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
X)dnl
X  AC_MSG_ERROR(can not run test program while cross compiling)],
X  [$4])
Xelse
X  AC_TRY_RUN_NATIVE([$1], [$2], [$3])
Xfi
X])
X
Xdnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
Xdnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
XAC_DEFUN(AC_TRY_RUN_NATIVE,
X[cat > conftest.$ac_ext <<EOF
X[#]line __oline__ "configure"
X#include "confdefs.h"
Xifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C" void exit(int);
X#endif
X])dnl
X[$1]
XEOF
Xif AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
Xdnl Don't remove the temporary files here, so they can be examined.
X  ifelse([$2], , :, [$2])
Xelse
X  echo "configure: failed program was:" >&AC_FD_CC
X  cat conftest.$ac_ext >&AC_FD_CC
Xifelse([$3], , , [  rm -fr conftest*
X  $3
X])dnl
Xfi
Xrm -fr conftest*])
X
X
Xdnl ### Checking for header files
X
X
Xdnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_HEADER,
X[dnl Do the transliteration at runtime so arg 1 can be a shell variable.
Xac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
XAC_MSG_CHECKING([for $1])
XAC_CACHE_VAL(ac_cv_header_$ac_safe,
X[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
X  eval "ac_cv_header_$ac_safe=no")])dnl
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3
X])dnl
Xfi
X])
X
Xdnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_HEADERS,
X[for ac_hdr in $1
Xdo
XAC_CHECK_HEADER($ac_hdr,
X[changequote(, )dnl
X  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
Xdone
X])
X
X
Xdnl ### Checking for the existence of files
X
Xdnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FILE,
X[AC_REQUIRE([AC_PROG_CC])
Xdnl Do the transliteration at runtime so arg 1 can be a shell variable.
Xac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
XAC_MSG_CHECKING([for $1])
XAC_CACHE_VAL(ac_cv_file_$ac_safe,
X[if test "$cross_compiling" = yes; then
X  errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
X)dnl
X  AC_MSG_ERROR(Cannot check for file existence when cross compiling)
Xelse
X  if $rmttest -r $1; then
X    eval "ac_cv_file_$ac_safe=yes"
X  else
X    eval "ac_cv_file_$ac_safe=no"
X  fi
Xfi])dnl
Xif eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3])
Xfi
X])
X
Xdnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FILES,
X[for ac_file in $1
Xdo
XAC_CHECK_FILE($ac_file,
X[changequote(, )dnl
X  ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
Xdone
X])
X
X
Xdnl ### Checking for library functions
X
X
Xdnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FUNC,
X[AC_MSG_CHECKING([for $1])
XAC_CACHE_VAL(ac_cv_func_$1,
X[AC_TRY_LINK(
Xdnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
Xdnl which includes <sys/select.h> which contains a prototype for
Xdnl select.  Similarly for bzero.
X[/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $1(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $1();
X], [
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$1) || defined (__stub___$1)
Xchoke me
X#else
X$1();
X#endif
X], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
Xif eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3
X])dnl
Xfi
X])
X
Xdnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_CHECK_FUNCS,
X[for ac_func in $1
Xdo
XAC_CHECK_FUNC($ac_func,
X[changequote(, )dnl
X  ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
Xdone
X])
X
Xdnl AC_REPLACE_FUNCS(FUNCTION...)
XAC_DEFUN(AC_REPLACE_FUNCS,
X[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"])
XAC_SUBST(LIBOBJS)dnl
X])
X
X
Xdnl ### Raw Checking for the pure existence of library functions
X
X
Xdnl AC_RCHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_RCHECK_FUNC,
X[AC_MSG_CHECKING([for raw availability of $1])
XAC_CACHE_VAL(ac_cv_rfunc_$1,
X[AC_TRY_LINK(
Xdnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
Xdnl which includes <sys/select.h> which contains a prototype for
Xdnl select.  Similarly for bzero.
X[/* Override any gcc2 internal prototype to avoid an error.  */
X]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Xextern "C"
X#endif
X])dnl
X[/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $1();
X], [
X$1();
X], eval "ac_cv_rfunc_$1=yes", eval "ac_cv_rfunc_$1=no")])
Xif eval "test \"`echo '$ac_cv_rfunc_'$1`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$2], , :, [$2])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$3], , , [$3
X])dnl
Xfi
X])
X
Xdnl AC_RCHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
XAC_DEFUN(AC_RCHECK_FUNCS,
X[for ac_func in $1
Xdo
XAC_RCHECK_FUNC($ac_func,
X[changequote(, )dnl
X  ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
Xdone
X])
X
X
Xdnl ### Checking compiler characteristics
X
X
Xdnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
XAC_DEFUN(AC_CHECK_SIZEOF,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of $1)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof($1));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
X
Xdnl ### Checking for typedefs
X
X
Xdnl AC_CHECK_TYPE(TYPE, DEFAULT)
XAC_DEFUN(AC_CHECK_TYPE,
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for $1)
XAC_CACHE_VAL(ac_cv_type_$1,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
XAC_MSG_RESULT($ac_cv_type_$1)
Xif test $ac_cv_type_$1 = no; then
X  AC_DEFINE($1, $2)
Xfi
X])
X
Xdnl AC_INCL_CHECK_TYPE(INCLUDES, TYPE, DEFAULT)
XAC_DEFUN(AC_INCL_CHECK_TYPE,
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for $2)
XAC_CACHE_VAL(ac_cv_type_$2,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X$1], ac_cv_type_$2=yes, ac_cv_type_$2=no)])dnl
XAC_MSG_RESULT($ac_cv_type_$2)
Xif test $ac_cv_type_$2 = no; then
X  AC_DEFINE($2, $3)
Xfi
X])
X
X
Xdnl ### Creating output files
X
X
Xdnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
XAC_DEFUN(AC_CONFIG_HEADER,
X[define(AC_LIST_HEADER, $1)])
X
Xdnl Link each of the existing files SOURCE... to the corresponding
Xdnl link name in DEST...
Xdnl AC_LINK_FILES(SOURCE..., DEST...)
XAC_DEFUN(AC_LINK_FILES,
X[dnl
Xdefine([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
Xdefine([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
X
Xdnl Add additional commands for AC_OUTPUT to put into config.status.
Xdnl Use diversions instead of macros so we can be robust in the
Xdnl presence of commas in $1 and/or $2.
Xdnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
XAC_DEFUN(AC_OUTPUT_COMMANDS,
X[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl
X[$1]
XAC_DIVERT_POP()dnl
XAC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
X[$2]
XAC_DIVERT_POP()])
X
Xdnl AC_CONFIG_SUBDIRS(DIR ...)
XAC_DEFUN(AC_CONFIG_SUBDIRS,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Xdefine([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl
Xsubdirs="AC_LIST_SUBDIRS"
XAC_SUBST(subdirs)dnl
X])
X
Xdnl The big finish.
Xdnl Produce config.status, config.h, and links; and configure subdirs.
Xdnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
Xdefine(AC_OUTPUT,
X[trap '' 1 2 15
XAC_CACHE_SAVE
Xtrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
Xtest "x$prefix" = xNONE && prefix=$ac_default_prefix
X# Let make expand exec_prefix.
Xtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
X
X# Any assignment to VPATH causes Sun make to only execute
X# the first set of double-colon rules, so remove it if not needed.
X# If there is a colon in the path, we need to keep it.
Xif test "x$srcdir" = x.; then
Xchangequote(, )dnl
X  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Xchangequote([, ])dnl
Xfi
X
Xtrap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
X
Xifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
X
X# Without the "./", some shells look in PATH for config.status.
X: ${CONFIG_STATUS=./config.status}
X
Xecho creating $CONFIG_STATUS
Xrm -f $CONFIG_STATUS
Xcat > $CONFIG_STATUS <<EOF
X#! /bin/sh
X# Generated automatically by configure.
X# Run this file to recreate the current configuration.
X# This directory was configured as follows,
Xdnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Xdnl so uname gets run too.
X# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
X#
X[#] [$]0 [$]ac_configure_args
X#
X# Compiler output produced by configure, useful for debugging
X# configure, is in ./config.log if it exists.
X
Xchangequote(, )dnl
Xac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Xchangequote([, ])dnl
Xfor ac_option
Xdo
X  case "[\$]ac_option" in
X  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
X    echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
X    exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
X  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
X    echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION AC_ACVERSION_SCHILY"
X    exit 0 ;;
X  -help | --help | --hel | --he | --h)
X    echo "[\$]ac_cs_usage"; exit 0 ;;
X  *) echo "[\$]ac_cs_usage"; exit 1 ;;
X  esac
Xdone
X
Xac_given_srcdir=$srcdir
Xifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
X])dnl
X
Xchangequote(<<, >>)dnl
Xifdef(<<AC_LIST_HEADER>>,
X<<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
X<<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
Xchangequote([, ])dnl
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X
XAC_OUTPUT_FILES($1)
Xifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
Xifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
XEOF
Xcat >> $CONFIG_STATUS <<EOF
Xundivert(AC_DIVERSION_ICMDS)dnl
X$3
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xundivert(AC_DIVERSION_CMDS)dnl
X$2
Xexit 0
XEOF
Xchmod +x $CONFIG_STATUS
Xrm -fr confdefs* $ac_clean_files
Xtest "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Xdnl config.status should not do recursion.
Xifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
X])dnl
X
Xdnl Set the DEFS variable to the -D options determined earlier.
Xdnl This is a subroutine of AC_OUTPUT.
Xdnl It is called inside configure, outside of config.status.
Xdnl AC_OUTPUT_MAKE_DEFS()
Xdefine(AC_OUTPUT_MAKE_DEFS,
X[# Transform confdefs.h into DEFS.
Xdnl Using a here document instead of a string reduces the quoting nightmare.
X# Protect against shell expansion while executing Makefile rules.
X# Protect against Makefile macro expansion.
Xcat > conftest.defs <<\EOF
Xchangequote(<<, >>)dnl
Xs%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
Xs%[ 	`~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
Xs%\[%\\&%g
Xs%\]%\\&%g
Xs%\$%$$%g
Xchangequote([, ])dnl
XEOF
XDEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
Xrm -f conftest.defs
X])
X
Xdnl Do the variable substitutions to create the Makefiles or whatever.
Xdnl This is a subroutine of AC_OUTPUT.  It is called inside an unquoted
Xdnl here document whose contents are going into config.status, but
Xdnl upon returning, the here document is being quoted.
Xdnl AC_OUTPUT_FILES(FILE...)
Xdefine(AC_OUTPUT_FILES,
X[# Protect against being on the right side of a sed subst in config.status.
Xchangequote(, )dnl
Xsed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
X s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Xchangequote([, ])dnl
Xdnl These here document variables are unquoted when configure runs
Xdnl but quoted when config.status runs, so variables are expanded once.
X$ac_vpsub
Xdnl Shell code in configure.in might set extrasub.
X$extrasub
Xdnl Insert the sed substitutions of variables.
Xundivert(AC_DIVERSION_SED)
XCEOF
XEOF
X
Xcat >> $CONFIG_STATUS <<\EOF
X
X# Split the substitutions into bite-sized pieces for seds with
X# small command number limits, like on Digital OSF/1 and HP-UX.
Xac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
Xac_file=1 # Number of current file.
Xac_beg=1 # First line for current file.
Xac_end=$ac_max_sed_cmds # Line after last line for current file.
Xac_more_lines=:
Xac_sed_cmds=""
Xwhile $ac_more_lines; do
X  if test $ac_beg -gt 1; then
X    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
X  else
X    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
X  fi
X  if test ! -s conftest.s$ac_file; then
X    ac_more_lines=false
X    rm -f conftest.s$ac_file
X  else
X    if test -z "$ac_sed_cmds"; then
X      ac_sed_cmds="sed -f conftest.s$ac_file"
X    else
X      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
X    fi
X    ac_file=`expr $ac_file + 1`
X    ac_beg=$ac_end
X    ac_end=`expr $ac_end + $ac_max_sed_cmds`
X  fi
Xdone
Xif test -z "$ac_sed_cmds"; then
X  ac_sed_cmds=cat
Xfi
XEOF
X
Xcat >> $CONFIG_STATUS <<EOF
X
XCONFIG_FILES=\${CONFIG_FILES-"$1"}
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfor ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Xchangequote(, )dnl
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
X
X  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
X
X  # Remove last slash and all that follows it.  Not all systems have dirname.
X  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X    # The file is in a subdirectory.
X    test ! -d "$ac_dir" && mkdir "$ac_dir"
X    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
X    # A "../" for each directory in $ac_dir_suffix.
Xchangequote(, )dnl
X    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Xchangequote([, ])dnl
X  else
X    ac_dir_suffix= ac_dots=
X  fi
X
X  case "$ac_given_srcdir" in
X  .)  srcdir=.
X      if test -z "$ac_dots"; then top_srcdir=.
X      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
X  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
X  *) # Relative path.
X    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
X    top_srcdir="$ac_dots$ac_given_srcdir" ;;
X  esac
X
Xifdef([AC_PROVIDE_AC_PROG_INSTALL],
X[  case "$ac_given_INSTALL" in
Xchangequote(, )dnl
X  [/$]*) INSTALL="$ac_given_INSTALL" ;;
Xchangequote([, ])dnl
X  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
X  esac
X])dnl
X
X  echo creating "$ac_file"
X  rm -f "$ac_file"
X  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
X  case "$ac_file" in
X  *Makefile*) ac_comsub="1i\\
X# $configure_input" ;;
X  *) ac_comsub= ;;
X  esac
X
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  sed -e "$ac_comsub
Xs%@configure_input@%$configure_input%g
Xs%@srcdir@%$srcdir%g
Xs%@top_srcdir@%$top_srcdir%g
Xifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
X])dnl
Xdnl The parens around the eval prevent an "illegal io" in Ultrix sh.
X" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Xdnl This would break Makefile dependencies.
Xdnl  if cmp -s $ac_file conftest.out 2>/dev/null; then
Xdnl    echo "$ac_file is unchanged"
Xdnl    rm -f conftest.out
Xdnl   else
Xdnl     rm -f $ac_file
Xdnl    mv conftest.out $ac_file
Xdnl  fi
Xfi; done
Xrm -f conftest.s*
X])
X
Xdnl Create the config.h files from the config.h.in files.
Xdnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
Xdnl here document whose contents are going into config.status.
Xdnl AC_OUTPUT_HEADER(HEADER-FILE...)
Xdefine(AC_OUTPUT_HEADER,
X[changequote(<<, >>)dnl
X# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
X# NAME is the cpp macro being defined and VALUE is the value it is being given.
X#
X# ac_d sets the value in "#define NAME VALUE" lines.
Xac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
Xac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
Xac_dC='\3'
Xac_dD='%g'
X# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Xac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_uB='\([ 	]\)%\1#\2define\3'
Xac_uC=' '
Xac_uD='\4%g'
X# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Xac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_eB='<<$>>%\1#\2define\3'
Xac_eC=' '
Xac_eD='%g'
Xchangequote([, ])dnl
X
Xif test "${CONFIG_HEADERS+set}" != set; then
XEOF
Xdnl Support passing AC_CONFIG_HEADER a value containing shell variables.
Xcat >> $CONFIG_STATUS <<EOF
X  CONFIG_HEADERS="$1"
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfi
Xfor ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Xchangequote(, )dnl
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
Xchangequote([, ])dnl
X
X  echo creating $ac_file
X
X  rm -f conftest.frag conftest.in conftest.out
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  cat $ac_file_inputs > conftest.in
X
XEOF
X
X# Transform confdefs.h into a sed script conftest.vals that substitutes
X# the proper values into config.h.in to produce config.h.  And first:
X# Protect against being on the right side of a sed subst in config.status.
X# Protect against being in an unquoted here document in config.status.
Xrm -f conftest.vals
Xdnl Using a here document instead of a string reduces the quoting nightmare.
Xdnl Putting comments in sed scripts is not portable.
Xcat > conftest.hdr <<\EOF
Xchangequote(<<, >>)dnl
Xs/[\\&%]/\\&/g
Xs%[\\$`]%\\&%g
Xs%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Xs%ac_d%ac_u%gp
Xs%ac_u%ac_e%gp
Xchangequote([, ])dnl
XEOF
Xsed -n -f conftest.hdr confdefs.h > conftest.vals
Xrm -f conftest.hdr
X
X# This sed command replaces #undef with comments.  This is necessary, for
X# example, in the case of _POSIX_SOURCE, which is predefined and required
X# on some systems where configure will not decide to define it.
Xcat >> conftest.vals <<\EOF
Xchangequote(, )dnl
Xs%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Xchangequote([, ])dnl
XEOF
X
X# Break up conftest.vals because some shells have a limit on
X# the size of here documents, and old seds have small limits too.
X
Xrm -f conftest.tail
Xwhile :
Xdo
X  ac_lines=`grep -c . conftest.vals`
X  # grep -c gives empty output for an empty file on some AIX systems.
X  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
X  # Write a limited-size here document to conftest.frag.
X  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
X  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
X  echo 'CEOF
X  sed -f conftest.frag conftest.in > conftest.out
X  rm -f conftest.in
X  mv conftest.out conftest.in
X' >> $CONFIG_STATUS
X  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
X  rm -f conftest.vals
X  mv conftest.tail conftest.vals
Xdone
Xrm -f conftest.vals
X
Xdnl Now back to your regularly scheduled config.status.
Xcat >> $CONFIG_STATUS <<\EOF
X  rm -f conftest.frag conftest.h
X  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
X  cat conftest.in >> conftest.h
X  rm -f conftest.in
X  if cmp -s $ac_file conftest.h 2>/dev/null; then
X    echo "$ac_file is unchanged"
X    rm -f conftest.h
X  else
X    # Remove last slash and all that follows it.  Not all systems have dirname.
X  changequote(, )dnl
X    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X  changequote([, ])dnl
X    if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X      # The file is in a subdirectory.
X      test ! -d "$ac_dir" && mkdir "$ac_dir"
X    fi
X    rm -f $ac_file
X    mv conftest.h $ac_file
X  fi
Xfi; done
X
X])
X
Xdnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
Xdnl here document whose contents are going into config.status.
Xdnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
Xdefine(AC_OUTPUT_LINKS,
X[EOF
X
Xcat >> $CONFIG_STATUS <<EOF
Xac_sources="$1"
Xac_dests="$2"
XEOF
X
Xcat >> $CONFIG_STATUS <<\EOF
Xsrcdir=$ac_given_srcdir
Xwhile test -n "$ac_sources"; do
X  set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
X  set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
X
X  echo "linking $srcdir/$ac_source to $ac_dest"
X
X  if test ! -r $srcdir/$ac_source; then
X    AC_MSG_ERROR($srcdir/$ac_source: File not found)
X  fi
X  rm -f $ac_dest
X
X  # Make relative symlinks.
X  # Remove last slash and all that follows it.  Not all systems have dirname.
Xchangequote(, )dnl
X  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
Xchangequote([, ])dnl
X  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
X    # The dest file is in a subdirectory.
X    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
X    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
X    # A "../" for each directory in $ac_dest_dir_suffix.
Xchangequote(, )dnl
X    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
Xchangequote([, ])dnl
X  else
X    ac_dest_dir_suffix= ac_dots=
X  fi
X
X  case "$srcdir" in
Xchangequote(, )dnl
X  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
Xchangequote([, ])dnl
X  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
X  esac
X
X  # Make a symlink if possible; otherwise try a hard link.
X  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
X    ln $srcdir/$ac_source $ac_dest; then :
X  else
X    AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
X  fi
Xdone
X])
X
Xdnl This is a subroutine of AC_OUTPUT.
Xdnl It is called after running config.status.
Xdnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
Xdefine(AC_OUTPUT_SUBDIRS,
X[
Xif test "$no_recursion" != yes; then
X
X  # Remove --cache-file and --srcdir arguments so they do not pile up.
X  ac_sub_configure_args=
X  ac_prev=
X  for ac_arg in $ac_configure_args; do
X    if test -n "$ac_prev"; then
X      ac_prev=
X      continue
X    fi
X    case "$ac_arg" in
X    -cache-file | --cache-file | --cache-fil | --cache-fi \
X    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X      ac_prev=cache_file ;;
X    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X      ;;
X    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X      ac_prev=srcdir ;;
X    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X      ;;
X    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
X    esac
X  done
X
X  for ac_config_dir in $1; do
X
X    # Do not complain, so a configure script can configure whichever
X    # parts of a large source tree are present.
X    if test ! -d $srcdir/$ac_config_dir; then
X      continue
X    fi
X
X    echo configuring in $ac_config_dir
X
X    case "$srcdir" in
X    .) ;;
X    *)
X      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
X      else
X        AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
X      fi
X      ;;
X    esac
X
X    ac_popdir=`pwd`
X    cd $ac_config_dir
X
Xchangequote(, )dnl
X      # A "../" for each directory in /$ac_config_dir.
X      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
Xchangequote([, ])dnl
X
X    case "$srcdir" in
X    .) # No --srcdir option.  We are building in place.
X      ac_sub_srcdir=$srcdir ;;
X    /*) # Absolute path.
X      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
X    *) # Relative path.
X      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
X    esac
X
X    # Check for guested configure; otherwise get Cygnus style configure.
X    if test -f $ac_sub_srcdir/configure; then
X      ac_sub_configure=$ac_sub_srcdir/configure
X    elif test -f $ac_sub_srcdir/configure.in; then
X      ac_sub_configure=$ac_configure
X    else
X      AC_MSG_WARN(no configuration information is in $ac_config_dir)
X      ac_sub_configure=
X    fi
X
X    # The recursion is here.
X    if test -n "$ac_sub_configure"; then
X
X      # Make the cache file name correct relative to the subdirectory.
X      case "$cache_file" in
X      /*) ac_sub_cache_file=$cache_file ;;
X      *) # Relative path.
X        ac_sub_cache_file="$ac_dots$cache_file" ;;
X      esac
Xifdef([AC_PROVIDE_AC_PROG_INSTALL],
X      [  case "$ac_given_INSTALL" in
Xchangequote(, )dnl
X        [/$]*) INSTALL="$ac_given_INSTALL" ;;
Xchangequote([, ])dnl
X        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
X        esac
X])dnl
X
X      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
X      # The eval makes quoting arguments work.
X      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
X      then :
X      else
X        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
X      fi
X    fi
X
X    cd $ac_popdir
X  done
Xfi
X])
END-of-star-1.5.2/autoconf/acgeneral.m4
echo x - star-1.5.2/autoconf/aclocal.m4
sed 's/^X//' >star-1.5.2/autoconf/aclocal.m4 << 'END-of-star-1.5.2/autoconf/aclocal.m4'
Xdnl @(#)aclocal.m4	1.99 11/08/02 Copyright 1998-2011 J. Schilling
X
Xdnl Set VARIABLE to VALUE in C-string form, verbatim, or 1.
Xdnl AC_DEFINE_STRING(VARIABLE [, VALUE])
Xdefine(AC_DEFINE_STRING,
X[cat >> confdefs.h <<\EOF
X[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1)
XEOF
X])
X
Xdnl Similar, but perform shell substitutions $ ` \ once on VALUE.
Xdefine(AC_DEFINE_UNQUOTED_STRING,
X[cat >> confdefs.h <<EOF
X[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1)
XEOF
X])
X
Xdnl ==== Check if we have  typedef
X
Xdnl AC_HAVE_TYPE(INCLUDES, TYPE)
XAC_DEFUN(AC_HAVE_TYPE,
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for $2)
XAC_CACHE_VAL(ac_cv_have_type_$2,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X$1], eval ac_cv_have_type_$2=yes, eval ac_cv_have_type_$2=no)])dnl
XAC_MSG_RESULT($ac_cv_have_type_$2)
Xchangequote(, )dnl
X  ac_tr_type=HAVE_TYPE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
Xif test $ac_cv_have_type_$2 = yes; then
X  AC_DEFINE_UNQUOTED($ac_tr_type)
Xfi
X])
X
XAC_DEFUN(AC_ICONV_CONST,
X[AC_CACHE_CHECK(whether iconv() uses const char **, ac_cv_iconv_const,
X[cat > conftest.c <<EOF
X#include <iconv.h>
XEOF
Xif AC_TRY_COMMAND(${CC-cc} -E conftest.c) | grep 'size_t.*iconv.*iconv_t.*const' >/dev/null 2>&1; then
X  ac_cv_iconv_const=yes
Xelse
X  ac_cv_iconv_const=no
Xfi])
Xif test $ac_cv_iconv_const = yes; then
X  AC_DEFINE(HAVE_ICONV_CONST)
Xfi])
X
XAC_DEFUN(AC_PROG_CPPX,
X[AC_REQUIRE([AC_PROG_CPP])dnl
XAC_MSG_CHECKING(how to run the C preprocessor for any type of file)
Xif test -z "$CPPX"; then
XAC_CACHE_VAL(ac_cv_prog_CPPX,
X[  # This must be in double quotes, not single quotes, because CPP may get
X  # substituted into the Makefile and "${CC-cc}" will confuse make.
X  CPPX="$CPP"
X	cat > conftestcpp << EOF
X	xxzzy
XEOF
X	# gcc -E does not accept any file suffix, so we need to test
X	# and if $CC -E fails, we try to use dirname(which($CC))/cpp
X	# We cannot use AC_TRY_EVAL(CPPX conftestcpp | grep xxzzy) because
X	# of a bug in the parser from bash
X	ac_result=`(echo configure:1288: "$CPPX conftestcpp | grep xxzzy" 1>&5; eval $CPPX conftestcpp | grep xxzzy) 2>&5`
X	if test -z "$ac_result"; then
X		changequote(, )dnl
X		ac_file=`eval type ${CC-cc} 2>/dev/null | sed 's%[^/]*/%/%'`
X		# Remove last slash and all that follows it.  Not all systems have dirname.
X		ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
X		changequote([, ])dnl
X		if test -f "$ac_dir"/cpp; then
X			CPPX="$ac_dir"/cpp
X		fi
X	fi
X	ac_cv_prog_CPPX="$CPPX"])dnl
X	CPPX="$ac_cv_prog_CPPX"
Xelse
X	ac_cv_prog_CPPX="$CPPX"
Xfi
XAC_MSG_RESULT($CPPX)
XAC_SUBST(CPPX)dnl
X])
X
Xdnl Checks if /bin/sh is bash
Xdnl Defines BIN_SHELL_IS_BASH on success.
XAC_DEFUN([AC_BIN_SHELL_BASH],
X[AC_CACHE_CHECK([if /bin/sh is bash], ac_cv_bin_shell_is_bash,
X                [
Xac_err=`< /dev/null /bin/sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_is_bash=yes
Xelse
X	ac_cv_bin_shell_is_bash=no
Xfi
X])
Xif test $ac_cv_bin_shell_is_bash = yes; then
X  AC_DEFINE(BIN_SHELL_IS_BASH)
Xfi])
X
Xdnl Checks if sh is bash
Xdnl Defines SHELL_IS_BASH on success.
XAC_DEFUN([AC_SHELL_BASH],
X[AC_CACHE_CHECK([if sh is bash], ac_cv_shell_is_bash,
X                [
Xac_err=`< /dev/null sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_shell_is_bash=yes
Xelse
X	ac_cv_shell_is_bash=no
Xfi
X])
Xif test $ac_cv_shell_is_bash = yes; then
X  AC_DEFINE(SHELL_IS_BASH)
Xfi])
X
Xdnl Checks if /bin/sh -ce is broken
Xdnl Defines BIN_SHELL_CE_IS_BROKEN on success.
XAC_DEFUN([AC_BIN_SHELL_CE_BROKEN],
X[AC_CACHE_CHECK([whether /bin/sh -ce is broken], ac_cv_bin_shell_ce_is_broken,
X                [
Xac_err=`/bin/sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_ce_is_broken=yes
Xelse
X	ac_cv_bin_shell_ce_is_broken=no
Xfi
X])
Xif test $ac_cv_bin_shell_ce_is_broken = yes; then
X  AC_DEFINE(BIN_SHELL_CE_IS_BROKEN)
Xfi])
X
Xdnl Checks if /bin/bosh is a working shell
Xdnl Defines BIN_SHELL_BOSH on success.
XAC_DEFUN([AC_BIN_SHELL_BOSH],
X[AC_CACHE_CHECK([whether /bin/bosh is a working shell], ac_cv_bin_shell_bosh,
X                [
Xac_err=`< /dev/null /bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_bin_shell_bosh=no
Xelse
X	ac_err=`/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_bin_shell_bosh=yes
X	else
X		ac_cv_bin_shell_bosh=no
X	fi
Xfi
X])
Xif test $ac_cv_bin_shell_bosh = yes; then
X  AC_DEFINE(BIN_SHELL_BOSH)
Xfi])
X
Xdnl Checks if /opt/schily/bin/bosh is a working shell
Xdnl Defines OPT_SCHILY_BIN_SHELL_BOSH on success.
XAC_DEFUN([AC_OPT_SCHILY_BIN_SHELL_BOSH],
X[AC_CACHE_CHECK([whether /opt/schily/bin/bosh is a working shell], ac_cv_opt_schily_bin_shell_bosh,
X                [
Xac_err=`< /dev/null /opt/schily/bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_opt_schily_bin_shell_bosh=no
Xelse
X	ac_err=`/opt/schily/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_opt_schily_bin_shell_bosh=yes
X	else
X		ac_cv_opt_schily_bin_shell_bosh=no
X	fi
Xfi
X])
Xif test $ac_cv_opt_schily_bin_shell_bosh = yes; then
X  AC_DEFINE(OPT_SCHILY_BIN_SHELL_BOSH)
Xfi])
X
Xdnl Checks if sh -ce is broken
Xdnl Defines SHELL_CE_IS_BROKEN on success.
XAC_DEFUN([AC_SHELL_CE_BROKEN],
X[AC_CACHE_CHECK([whether sh -ce is broken], ac_cv_shell_ce_is_broken,
X                [
Xac_err=`sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_shell_ce_is_broken=yes
Xelse
X	ac_cv_shell_ce_is_broken=no
Xfi
X])
Xif test $ac_cv_shell_ce_is_broken = yes; then
X  AC_DEFINE(SHELL_CE_IS_BROKEN)
Xfi])
X
Xdnl Checks if Sun cc supports -m64
Xdnl Defines sun_cc64_opt on success.
XAC_DEFUN([AC_SUN_CC64_OPT],
X[AC_CACHE_CHECK([if suncc/cc supports -m64], ac_cv_sun_cc64_opt,
X                [
Xsun_cc64=cc
Xsun_cc64_opt=''
Xac_cv_sun_cc64_opt=no
Xif test "$GCC" != yes; then
X	if test "$CC" = suncc; then
X		sun_cc64=suncc
X	fi
X	ac_err=`< /dev/null eval $sun_cc64 -m64 -c 2>&1 | grep illegal`
X	if test -n "$ac_err"; then
X		ac_cv_sun_cc64_opt=no
X	else
X		ac_cv_sun_cc64_opt=yes
X	fi
Xfi
X])
Xif test $ac_cv_sun_cc64_opt = yes; then
X  sun_cc64_opt='-m64'
Xfi])
X
Xdnl Checks if HP cc supports -Ae
Xdnl Defines hp_cc_ansi_opt on success.
XAC_DEFUN([AC_HP_CC_ANSI_OPT],
X[AC_CACHE_CHECK([if HP cc supports -Ae], ac_cv_hp_cc_ansi_opt,
X                [
Xhp_cc=cc
Xhp_cc_ansi_opt=''
Xac_cv_hp_cc_ansi_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -Ae -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_ansi_opt=no
X		else
X			ac_cv_hp_cc_ansi_opt=yes
X		fi
X	fi
Xfi
X])
Xif test $ac_cv_hp_cc_ansi_opt = yes; then
X  hp_cc_ansi_opt='-Ae'
Xfi])
X
Xdnl Checks if HP cc supports -O
Xdnl Defines hp_cc_opt_opt on success.
XAC_DEFUN([AC_HP_CC_OPT_OPT],
X[AC_CACHE_CHECK([if HP cc supports -O], ac_cv_hp_cc_opt_opt,
X                [
Xhp_cc=cc
Xhp_cc_opt_opt=''
Xac_cv_hp_cc_opt_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_opt_opt=no
X		else
X			ac_cv_hp_cc_opt_opt=yes
X		fi
X	fi
Xfi
X])
Xif test $ac_cv_hp_cc_opt_opt = yes; then
X  hp_cc_opt_opt='-O'
Xfi])
X
Xdnl Checks if HP cc supports -G
Xdnl Defines hp_cc_gprof_opt on success.
XAC_DEFUN([AC_HP_CC_GPROF_OPT],
X[AC_CACHE_CHECK([if HP cc supports -G], ac_cv_hp_cc_gprof_opt,
X                [
Xhp_cc=cc
Xhp_cc_gprof_opt=''
Xac_cv_hp_cc_gprof_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_gprof_opt=no
X		else
X			ac_cv_hp_cc_gprof_opt=yes
X		fi
X	fi
Xfi
X])
Xif test $ac_cv_hp_cc_gprof_opt = yes; then
X  hp_cc_gprof_opt='-G'
Xfi])
X
Xdnl XXX this used to be:
Xdnl #ifndef $2 
Xdnl	char *p = (char *) $2; 
Xdnl #endif
Xdnl but we use this test in order to check whether we are able to get the
Xdnl address of a function from this name, so we did replace this by:
Xdnl  char *p = (char *) $2;
Xdnl  exit (p != (char *)0 && *p != 0);	Prevent optimizer from removing previous line
Xdnl 
Xdnl AC_CHECK_DECLARE(INCLUDES, SYMBOL)
Xdnl Checks if symbol is declared
Xdnl Defines HAVE_DECL_SYMBOL on success.
XAC_DEFUN([AC_CHECK_DECLARE],
X[AC_CACHE_CHECK([if $2 is declared], ac_cv_have_decl_$2,
X                [AC_TRY_COMPILE([$1],
X[ char *p = (char *) $2; exit (p != (char *)0 && *p != 0); ],
X		[eval ac_cv_have_decl_$2=yes],
X		[eval ac_cv_have_decl_$2=no])])
Xchangequote(, )dnl
X  ac_tr_decl=HAVE_DECL_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
Xif test $ac_cv_have_decl_$2 = yes; then
X  AC_DEFINE_UNQUOTED($ac_tr_decl)
Xfi])
X
Xdnl AC_CHECK_DFUNC(INCLUDES, SYMBOL)
Xdnl Checks if symbol is defined or a function
Xdnl Defines HAVE_SYMBOL on success.
XAC_DEFUN([AC_CHECK_DFUNC],
X[AC_CACHE_CHECK([if $2 is defined or function], ["ac_cv_have_$2"],
X                [AC_TRY_LINK([$1],
X[
X#ifndef $2
X	char *p = (char *) $2;
X	exit (p != (char *)0 && *p != 0);
X#endif],
X		[eval ac_cv_have_$2=yes],
X		[eval ac_cv_have_$2=no])])
Xchangequote(, )dnl
X  ac_tr_dfunc=HAVE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
Xif eval "test \"`echo '$ac_cv_have_'$2`\" = yes"; then
X  AC_DEFINE_UNQUOTED($ac_tr_dfunc)
Xfi
X])
X
Xdnl AC_CHECK_DFUNCS(INCLUDES, FUNCTION...)
XAC_DEFUN(AC_CHECK_DFUNCS,
X[for ac_func in [$2]
Xdo
XAC_CHECK_DFUNC([$1], $ac_func)dnl
Xdone
X])
X 
Xdnl Checks whether symbol is defined or a function in a lib
Xdnl AC_CHECK_DLIB(INCLUDES, LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl              [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_CHECK_DLIB,
X[AC_MSG_CHECKING([for $3 in -l$2])
Xdnl Use a cache variable name containing both the library and function name,
Xdnl because the test really is for library $2 defining function $3, not
Xdnl just for library $2.  Separate tests with the same $2 and different $3s
Xdnl may have different results.
Xac_lib_var=`echo $2['_']$3 | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
X[ac_save_LIBS="$LIBS"
XLIBS="-l$2 $6 $LIBS"
XAC_TRY_LINK([$1],
X[
X#ifndef $3
X	char *p = (char *) $3;
X	exit (p != (char *)0 && *p != 0);
X#endif],
X	    eval "ac_cv_lib_$ac_lib_var=yes",
X	    eval "ac_cv_lib_$ac_lib_var=no")
XLIBS="$ac_save_LIBS"
X])dnl
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$4], ,
X[changequote(, )dnl
X  ac_tr_lib=HAVE_LIB`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
X    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_lib)
X  LIBS="-l$2 $LIBS"
X], [$4])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$5], , , [$5
X])dnl
Xfi
X])
X
Xdnl Checks whether symbol is in a lib
Xdnl this does not work for void func()
Xdnl AC_CHECK_ILIB(INCLUDES, LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Xdnl              [, OTHER-LIBRARIES]]])
XAC_DEFUN(AC_CHECK_ILIB,
X[AC_MSG_CHECKING([for $3 in -l$2])
Xdnl Use a cache variable name containing both the library and function name,
Xdnl because the test really is for library $2 defining function $3, not
Xdnl just for library $2.  Separate tests with the same $2 and different $3s
Xdnl may have different results.
Xac_lib_var=`echo $2['_']$3 | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
X[ac_save_LIBS="$LIBS"
XLIBS="-l$2 $6 $LIBS"
XAC_TRY_LINK([$1],
X[
X	char *p = (char *) $3;
X
X	return ((int)p);
X],
X	    eval "ac_cv_lib_$ac_lib_var=yes",
X	    eval "ac_cv_lib_$ac_lib_var=no")
XLIBS="$ac_save_LIBS"
X])dnl
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  ifelse([$4], ,
X[changequote(, )dnl
X  ac_tr_lib=HAVE_LIB`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
X    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_lib)
X  LIBS="-l$2 $LIBS"
X], [$4])
Xelse
X  AC_MSG_RESULT(no)
Xifelse([$5], , , [$5
X])dnl
Xfi
X])
X
Xdnl getpagesize is a inline function in unistd.h on Android
XAC_DEFUN([AC_FUNC_GETPAGESIZE],
X[AC_CHECK_DFUNC([
X#ifdef	HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X], getpagesize)])
X
X
Xdnl Checks if structure 'stat' have field 'st_spare1'.
Xdnl Defines HAVE_ST_SPARE1 on success.
XAC_DEFUN([AC_STRUCT_ST_SPARE1],
X[AC_CACHE_CHECK([if struct stat contains st_spare1], ac_cv_struct_st_spare1,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_spare1 = 0;],
X                                [ac_cv_struct_st_spare1=yes],
X                                [ac_cv_struct_st_spare1=no])])
Xif test $ac_cv_struct_st_spare1 = yes; then
X  AC_DEFINE(HAVE_ST_SPARE1)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atimensec'.
Xdnl Defines HAVE_ST_ATIMENSEC on success.
XAC_DEFUN([AC_STRUCT_ST_ATIMENSEC],
X[AC_CACHE_CHECK([if struct stat contains st_atimensec], ac_cv_struct_st_atimensec,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atimensec = 0;],
X                                [ac_cv_struct_st_atimensec=yes],
X                                [ac_cv_struct_st_atimensec=no])])
Xif test $ac_cv_struct_st_atimensec = yes; then
X  AC_DEFINE(HAVE_ST_ATIMENSEC)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atime_n'.
Xdnl Defines HAVE_ST_ATIME_N on success.
XAC_DEFUN([AC_STRUCT_ST_ATIME_N],
X[AC_CACHE_CHECK([if struct stat contains st_atime_n], ac_cv_struct_st_atime_n,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atime_n = 0;],
X                                [ac_cv_struct_st_atime_n=yes],
X                                [ac_cv_struct_st_atime_n=no])])
Xif test $ac_cv_struct_st_atime_n = yes; then
X  AC_DEFINE(HAVE_ST_ATIME_N)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atim.tv_nsec'.
Xdnl Defines HAVE_ST_NSEC on success.
XAC_DEFUN([AC_STRUCT_ST_NSEC],
X[AC_CACHE_CHECK([if struct stat contains st_atim.tv_nsec], ac_cv_struct_st_nsec,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atim.tv_nsec = 0;],
X                                [ac_cv_struct_st_nsec=yes],
X                                [ac_cv_struct_st_nsec=no])])
Xif test $ac_cv_struct_st_nsec = yes; then
X  AC_DEFINE(HAVE_ST_NSEC)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atim.st__tim.tv_nsec'.
Xdnl Defines HAVE_ST__TIM on success.
XAC_DEFUN([AC_STRUCT_ST__TIM],
X[AC_CACHE_CHECK([if struct stat contains st_atim.st__tim.tv_nsec], ac_cv_struct_st__tim,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atim.st__tim.tv_nsec = 0;],
X                                [ac_cv_struct_st__tim=yes],
X                                [ac_cv_struct_st__tim=no])])
Xif test $ac_cv_struct_st__tim = yes; then
X  AC_DEFINE(HAVE_ST__TIM)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_atimspec.tv_nsec'.
Xdnl Defines HAVE_ST_ATIMESPEC on success.
XAC_DEFUN([AC_STRUCT_ST_ATIMESPEC],
X[AC_CACHE_CHECK([if struct stat contains st_atimespec.tv_nsec], ac_cv_struct_st_atimespec,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_atimespec.tv_nsec = 0;],
X                                [ac_cv_struct_st_atimespec=yes],
X                                [ac_cv_struct_st_atimespec=no])])
Xif test $ac_cv_struct_st_atimespec = yes; then
X  AC_DEFINE(HAVE_ST_ATIMESPEC)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_flag'.
Xdnl Defines HAVE_ST_FLAG on success.
XAC_DEFUN([AC_STRUCT_ST_FLAG],
X[AC_CACHE_CHECK([if struct stat contains st_flag], ac_cv_struct_st_flag,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_flag = 0;],
X                                [ac_cv_struct_st_flag=yes],
X                                [ac_cv_struct_st_flag=no])])
Xif test $ac_cv_struct_st_flag = yes; then
X  AC_DEFINE(HAVE_ST_FLAG)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_flags'.
Xdnl Defines HAVE_ST_FLAGS on success.
XAC_DEFUN([AC_STRUCT_ST_FLAGS],
X[AC_CACHE_CHECK([if struct stat contains st_flags], ac_cv_struct_st_flags,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_flags = 0;],
X                                [ac_cv_struct_st_flags=yes],
X                                [ac_cv_struct_st_flags=no])])
Xif test $ac_cv_struct_st_flags = yes; then
X  AC_DEFINE(HAVE_ST_FLAGS)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_fstype'.
Xdnl Defines HAVE_ST_FSTYPE on success.
XAC_DEFUN([AC_STRUCT_ST_FSTYPE],
X[AC_CACHE_CHECK([if struct stat contains st_fstype], ac_cv_struct_st_fstype,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_fstype[0] = 0;],
X                                [ac_cv_struct_st_fstype=yes],
X                                [ac_cv_struct_st_fstype=no])])
Xif test $ac_cv_struct_st_fstype = yes; then
X  AC_DEFINE(HAVE_ST_FSTYPE)
Xfi])
X
Xdnl Checks if structure 'stat' have field 'st_aclcnt'.
Xdnl Defines HAVE_ST_ACLCNT on success.
XAC_DEFUN([AC_STRUCT_ST_ACLCNT],
X[AC_CACHE_CHECK([if struct stat contains st_aclcnt], ac_cv_struct_st_aclcnt,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>],
X                                [struct  stat s; s.st_aclcnt = 0;],
X                                [ac_cv_struct_st_aclcnt=yes],
X                                [ac_cv_struct_st_aclcnt=no])])
Xif test $ac_cv_struct_st_aclcnt = yes; then
X  AC_DEFINE(HAVE_ST_ACLCNT)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'arch'.
Xdnl Defines HAVE_UTSNAME_ARCH on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_ARCH],
X[AC_CACHE_CHECK([if struct utsname contains arch], ac_cv_struct_utsname_arch,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.arch[0] = 0;],
X                                [ac_cv_struct_utsname_arch=yes],
X                                [ac_cv_struct_utsname_arch=no])])
Xif test $ac_cv_struct_utsname_arch = yes; then
X  AC_DEFINE(HAVE_UTSNAME_ARCH)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'processor'.
Xdnl Defines HAVE_UTSNAME_PROCESSOR on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_PROCESSOR],
X[AC_CACHE_CHECK([if struct utsname contains processor], ac_cv_struct_utsname_processor,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.processor[0] = 0;],
X                                [ac_cv_struct_utsname_processor=yes],
X                                [ac_cv_struct_utsname_processor=no])])
Xif test $ac_cv_struct_utsname_processor = yes; then
X  AC_DEFINE(HAVE_UTSNAME_PROCESSOR)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'sysname_host'.
Xdnl Defines HAVE_UTSNAME_SYSNAME_HOST on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_SYSNAME_HOST],
X[AC_CACHE_CHECK([if struct utsname contains sysname_host], ac_cv_struct_utsname_sysname_host,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.sysname_host[0] = 0;],
X                                [ac_cv_struct_utsname_sysname_host=yes],
X                                [ac_cv_struct_utsname_sysname_host=no])])
Xif test $ac_cv_struct_utsname_sysname_host = yes; then
X  AC_DEFINE(HAVE_UTSNAME_SYSNAME_HOST)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'release_host'.
Xdnl Defines HAVE_UTSNAME_RELEASE_HOST on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_RELEASE_HOST],
X[AC_CACHE_CHECK([if struct utsname contains release_host], ac_cv_struct_utsname_release_host,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.release_host[0] = 0;],
X                                [ac_cv_struct_utsname_release_host=yes],
X                                [ac_cv_struct_utsname_release_host=no])])
Xif test $ac_cv_struct_utsname_release_host = yes; then
X  AC_DEFINE(HAVE_UTSNAME_RELEASE_HOST)
Xfi])
X
Xdnl Checks if structure 'utsname' have field 'version_host'.
Xdnl Defines HAVE_UTSNAME_VERSION_HOST on success.
XAC_DEFUN([AC_STRUCT_UTSNAME_VERSION_HOST],
X[AC_CACHE_CHECK([if struct utsname contains version_host], ac_cv_struct_utsname_version_host,
X                [AC_TRY_COMPILE([#include <sys/utsname.h>],
X                                [struct  utsname u; u.version_host[0] = 0;],
X                                [ac_cv_struct_utsname_version_host=yes],
X                                [ac_cv_struct_utsname_version_host=no])])
Xif test $ac_cv_struct_utsname_version_host = yes; then
X  AC_DEFINE(HAVE_UTSNAME_VERSION_HOST)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_type'.
Xdnl Defines HAVE_MTGET_TYPE on success.
XAC_DEFUN([AC_STRUCT_MTGET_TYPE],
X[AC_CACHE_CHECK([if struct mtget contains mt_type], ac_cv_struct_mtget_type,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_type = 0;],
X                                [ac_cv_struct_mtget_type=yes],
X                                [ac_cv_struct_mtget_type=no])])
Xif test $ac_cv_struct_mtget_type = yes; then
X  AC_DEFINE(HAVE_MTGET_TYPE)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_model'.
Xdnl Defines HAVE_MTGET_MODEL on success.
XAC_DEFUN([AC_STRUCT_MTGET_MODEL],
X[AC_CACHE_CHECK([if struct mtget contains mt_model], ac_cv_struct_mtget_model,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_model = 0;],
X                                [ac_cv_struct_mtget_model=yes],
X                                [ac_cv_struct_mtget_model=no])])
Xif test $ac_cv_struct_mtget_model = yes; then
X  AC_DEFINE(HAVE_MTGET_MODEL)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_dsreg'.
Xdnl Defines HAVE_MTGET_DSREG on success.
XAC_DEFUN([AC_STRUCT_MTGET_DSREG],
X[AC_CACHE_CHECK([if struct mtget contains mt_dsreg], ac_cv_struct_mtget_dsreg,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_dsreg = 0;],
X                                [ac_cv_struct_mtget_dsreg=yes],
X                                [ac_cv_struct_mtget_dsreg=no])])
Xif test $ac_cv_struct_mtget_dsreg = yes; then
X  AC_DEFINE(HAVE_MTGET_DSREG)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_dsreg1'.
Xdnl Defines HAVE_MTGET_DSREG on success.
XAC_DEFUN([AC_STRUCT_MTGET_DSREG1],
X[AC_CACHE_CHECK([if struct mtget contains mt_dsreg1], ac_cv_struct_mtget_dsreg1,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_dsreg1 = 0;],
X                                [ac_cv_struct_mtget_dsreg1=yes],
X                                [ac_cv_struct_mtget_dsreg1=no])])
Xif test $ac_cv_struct_mtget_dsreg1 = yes; then
X  AC_DEFINE(HAVE_MTGET_DSREG1)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_dsreg2'.
Xdnl Defines HAVE_MTGET_DSREG2 on success.
XAC_DEFUN([AC_STRUCT_MTGET_DSREG2],
X[AC_CACHE_CHECK([if struct mtget contains mt_dsreg2], ac_cv_struct_mtget_dsreg2,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_dsreg2 = 0;],
X                                [ac_cv_struct_mtget_dsreg2=yes],
X                                [ac_cv_struct_mtget_dsreg2=no])])
Xif test $ac_cv_struct_mtget_dsreg2 = yes; then
X  AC_DEFINE(HAVE_MTGET_DSREG2)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_gstat'.
Xdnl Defines HAVE_MTGET_GSTAT on success.
XAC_DEFUN([AC_STRUCT_MTGET_GSTAT],
X[AC_CACHE_CHECK([if struct mtget contains mt_gstat], ac_cv_struct_mtget_gstat,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_gstat = 0;],
X                                [ac_cv_struct_mtget_gstat=yes],
X                                [ac_cv_struct_mtget_gstat=no])])
Xif test $ac_cv_struct_mtget_gstat = yes; then
X  AC_DEFINE(HAVE_MTGET_GSTAT)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_erreg'.
Xdnl Defines HAVE_MTGET_ERREG on success.
XAC_DEFUN([AC_STRUCT_MTGET_ERREG],
X[AC_CACHE_CHECK([if struct mtget contains mt_erreg], ac_cv_struct_mtget_erreg,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_erreg = 0;],
X                                [ac_cv_struct_mtget_erreg=yes],
X                                [ac_cv_struct_mtget_erreg=no])])
Xif test $ac_cv_struct_mtget_erreg = yes; then
X  AC_DEFINE(HAVE_MTGET_ERREG)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_resid'.
Xdnl Defines HAVE_MTGET_RESID on success.
XAC_DEFUN([AC_STRUCT_MTGET_RESID],
X[AC_CACHE_CHECK([if struct mtget contains mt_resid], ac_cv_struct_mtget_resid,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_resid = 0;],
X                                [ac_cv_struct_mtget_resid=yes],
X                                [ac_cv_struct_mtget_resid=no])])
Xif test $ac_cv_struct_mtget_resid = yes; then
X  AC_DEFINE(HAVE_MTGET_RESID)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_fileno'.
Xdnl Defines HAVE_MTGET_FILENO on success.
XAC_DEFUN([AC_STRUCT_MTGET_FILENO],
X[AC_CACHE_CHECK([if struct mtget contains mt_fileno],
X                ac_cv_struct_mtget_fileno,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X		                [struct  mtget t; t.mt_fileno = 0;],
X	        	        [ac_cv_struct_mtget_fileno=yes],
X                		[ac_cv_struct_mtget_fileno=no])])
Xif test $ac_cv_struct_mtget_fileno = yes; then
X  AC_DEFINE(HAVE_MTGET_FILENO)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_blkno'.
Xdnl Defines HAVE_MTGET_BLKNO on success.
XAC_DEFUN([AC_STRUCT_MTGET_BLKNO],
X[AC_CACHE_CHECK([if struct mtget contains mt_blkno], ac_cv_struct_mtget_blkno,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_blkno = 0;],
X                                [ac_cv_struct_mtget_blkno=yes],
X                                [ac_cv_struct_mtget_blkno=no])])
Xif test $ac_cv_struct_mtget_blkno = yes; then
X  AC_DEFINE(HAVE_MTGET_BLKNO)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_flags'.
Xdnl Defines HAVE_MTGET_FLAGS on success.
XAC_DEFUN([AC_STRUCT_MTGET_FLAGS],
X[AC_CACHE_CHECK([if struct mtget contains mt_flags], ac_cv_struct_mtget_flags,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_flags = 0;],
X                                [ac_cv_struct_mtget_flags=yes],
X                                [ac_cv_struct_mtget_flags=no])])
Xif test $ac_cv_struct_mtget_flags = yes; then
X  AC_DEFINE(HAVE_MTGET_FLAGS)
Xfi])
X
Xdnl Checks if structure 'mtget' have field 'mt_bf'.
Xdnl Defines HAVE_MTGET_BF on success.
XAC_DEFUN([AC_STRUCT_MTGET_BF],
X[AC_CACHE_CHECK([if struct mtget contains mt_bf], ac_cv_struct_mtget_bf,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mtio.h>],
X                                [struct  mtget t; t.mt_bf = 0;],
X                                [ac_cv_struct_mtget_bf=yes],
X                                [ac_cv_struct_mtget_bf=no])])
Xif test $ac_cv_struct_mtget_bf = yes; then
X  AC_DEFINE(HAVE_MTGET_BF)
Xfi])
X
Xdnl Checks for illegal declaration of 'union semun' in sys/sem.h.
Xdnl Defines HAVE_UNION_SEMUN on success.
XAC_DEFUN([AC_STRUCT_UNION_SEMUN],
X[AC_CACHE_CHECK([if an illegal declaration for union semun in sys/sem.h exists], ac_cv_struct_union_semun,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/sem.h>], [union semun s;],
X                [ac_cv_struct_union_semun=yes],
X                [ac_cv_struct_union_semun=no])])
Xif test $ac_cv_struct_union_semun = yes; then
X  AC_DEFINE(HAVE_UNION_SEMUN)
Xfi])
X
Xdnl Checks if 'union wait' is declared in 'wait.h' or 'sys/wait.h'.
Xdnl Defines HAVE_UNION_WAIT on success.
XAC_DEFUN([AC_STRUCT_UNION_WAIT],
X[AC_CACHE_CHECK([if union wait is declared in wait.h or sys/wait.h], ac_cv_struct_union_wait,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif], [union wait w;],
X                [ac_cv_struct_union_wait=yes],
X                [ac_cv_struct_union_wait=no])])
Xif test $ac_cv_struct_union_wait = yes; then
X  AC_DEFINE(HAVE_UNION_WAIT)
Xfi])
X
Xdnl Checks if union wait is used by default
Xdnl Defines USE_UNION_WAIT to int on failure.
XAC_DEFUN([AC_USE_STRUCT_UNION_WAIT],
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(if union wait is used by default)
XAC_CACHE_VAL(ac_cv_use_union_wait,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<xxzzy.*x_|xxzzy.*union>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
Xxxzzy WTERMSIG(status)
Xxxzzy WCOREDUMP(status)
Xxxzzy WEXITSTATUS(status)
Xxxzzy WSTOPSIG(status)
Xxxzzy WIFSTOPPED(status)
Xxxzzy WIFSIGNALED(status)
Xxxzzy WIFEXITED(status)], ac_cv_use_union_wait=yes, ac_cv_use_union_wait=no)])dnl
XAC_MSG_RESULT($ac_cv_use_union_wait)
Xif test $ac_cv_use_union_wait = yes; then
X  AC_DEFINE(USE_UNION_WAIT)
Xfi])
X
Xdnl Checks if 'struct rusage' is declared in sys/resource.h.
Xdnl Defines HAVE_STRUCT_RUSAGE on success.
XAC_DEFUN([AC_STRUCT_RUSAGE],
X[AC_CACHE_CHECK([if struct rusage is declared in sys/resource.h], ac_cv_struct_rusage,
X                [AC_TRY_COMPILE([#include <sys/time.h>
X#include <sys/resource.h>], [struct rusage r;],
X                [ac_cv_struct_rusage=yes],
X                [ac_cv_struct_rusage=no])])
Xif test $ac_cv_struct_rusage = yes; then
X  AC_DEFINE(HAVE_STRUCT_RUSAGE)
Xfi])
X
Xdnl Checks if structure 'siginfo' have field 'si_utime'.
Xdnl Defines HAVE_SI_UTIME on success.
XAC_DEFUN([AC_STRUCT_SI_UTIME],
X[AC_CACHE_CHECK([if struct siginfo contains si_utime], ac_cv_struct_si_utime,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/siginfo.h>],
X                                [struct  siginfo si; si.si_utime = 0;],
X                                [ac_cv_struct_si_utime=yes],
X                                [ac_cv_struct_si_utime=no])])
Xif test $ac_cv_struct_si_utime = yes; then
X  AC_DEFINE(HAVE_SI_UTIME)
Xfi])
X
X
Xdnl Checks if structure 'dirent' have field 'd_ino'.
Xdnl Defines HAVE_DIRENT_D_INO on success.
XAC_DEFUN([AC_STRUCT_DIRENT_D_INO],
X[AC_CACHE_CHECK([if struct dirent contains d_ino], ac_cv_struct_dirent_d_ino,
X                [AC_TRY_COMPILE([
X/*
X * This must be kept in sync with schily/dirdesf.h
X */
X#ifdef	HAVE_SYS_TYPES_H
X#	include <sys/types.h>
X#endif
X#ifdef	HAVE_SYS_STAT_H
X#	include <sys/stat.h>
X#endif
X#	ifdef	HAVE_DIRENT_H		/* This a POSIX compliant system */
X#		include <dirent.h>
X#		define	_FOUND_DIR_
X#	else				/* This is a Pre POSIX system	 */
X
X#	define 	dirent	direct
X
X#	if	defined(HAVE_SYS_DIR_H)
X#		include <sys/dir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <sys/ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X#	endif	/* HAVE_DIRENT_H */
X				],
X                                [struct  dirent d; d.d_ino = 0;],
X                                [ac_cv_struct_dirent_d_ino=yes],
X                                [ac_cv_struct_dirent_d_ino=no])])
Xif test $ac_cv_struct_dirent_d_ino = yes; then
X  AC_DEFINE(HAVE_DIRENT_D_INO)
Xfi])
X
Xdnl Checks if structure 'DIR' have field 'dd_fd'.
Xdnl Defines HAVE_DIR_DD_FD on success.
XAC_DEFUN([AC_STRUCT_DIR_DD_FD],
X[AC_CACHE_CHECK([if DIR * contains dd_fd], ac_cv_struct_dir_dd_fd,
X                [AC_TRY_COMPILE([#include <dirent.h>],
X                                [DIR d; d.dd_fd = 0; exit (d.dd_fd == 0);],
X                                [ac_cv_struct_dir_dd_fd=yes],
X                                [ac_cv_struct_dir_dd_fd=no])])
Xif test $ac_cv_struct_dir_dd_fd = yes; then
X  AC_DEFINE(HAVE_DIR_DD_FD)
Xfi])
X
Xdnl Checks wether major(), minor() and makedev() are defined in
Xdnl 'sys/mkdev.h' or in 'sys/sysmacros.h. Defines MAJOR_IN_MKDEV or
Xdnl MAJOR_IN_SYSMACROS or nothing.
XAC_DEFUN([AC_HEADER_MAKEDEV],
X[AC_CACHE_CHECK([for header file containing  major(), minor() and makedev()],
X               ac_cv_header_makedev,
X[ac_cv_header_makedev=none
XAC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/mkdev.h>],
X               [int i = major(0); i = minor(0); i = makedev(0,0);],
X                [ac_cv_header_makedev=sys/mkdev.h])
Xif test $ac_cv_header_makedev = none; then
X  AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/sysmacros.h>],
X                 [int i = major(0); i = minor(0); i = makedev(0,0);],
X                 [ac_cv_header_makedev=sys/sysmacros.h])
Xfi])
Xif test $ac_cv_header_makedev = sys/mkdev.h; then
X  AC_DEFINE(MAJOR_IN_MKDEV)
Xfi
Xif test $ac_cv_header_makedev = sys/sysmacros.h; then
X  AC_DEFINE(MAJOR_IN_SYSMACROS)
Xfi])
X
Xdnl Checks for USG derived STDIO that uses _filbuf()
Xdnl Defines HAVE__FILBUF on success.
XAC_DEFUN([AC_HEADER__FILBUF],
X[AC_CACHE_CHECK([for _filbuf()], ac_cv_func__filbuf,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X_filbuf(f);
X_flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);],
X                [ac_cv_func__filbuf=yes],
X                [ac_cv_func__filbuf=no])])
Xif test $ac_cv_func__filbuf = yes; then
X  AC_DEFINE(HAVE__FILBUF)
Xfi])
X
Xdnl Checks for USG derived STDIO that uses __filbuf()
Xdnl Defines HAVE___FILBUF on success.
XAC_DEFUN([AC_HEADER___FILBUF],
X[AC_CACHE_CHECK([for __filbuf()], ac_cv_func___filbuf,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X__filbuf(f);
X__flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);],
X                [ac_cv_func___filbuf=yes],
X                [ac_cv_func___filbuf=no])])
Xif test $ac_cv_func___filbuf = yes; then
X  AC_DEFINE(HAVE___FILBUF)
Xfi])
X
Xdnl Checks for USG derived STDIO
Xdnl Defines HAVE_USG_STDIO on success.
XAC_DEFUN([AC_HEADER_USG_STDIO],
X[AC_REQUIRE([AC_HEADER__FILBUF])AC_REQUIRE([AC_HEADER___FILBUF])dnl
XAC_CACHE_CHECK([for USG derived STDIO], ac_cv_header_usg_stdio,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X#ifdef	HAVE___FILBUF
X__filbuf(f);
X__flsbuf(c, f);
X#else
X#	ifdef	HAVE__FILBUF
X_filbuf(f);
X_flsbuf(c, f);
X#	else
Xno filbuf()
X#	endif
X#endif
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);],
X                [ac_cv_header_usg_stdio=yes],
X                [ac_cv_header_usg_stdio=no])])
Xif test $ac_cv_header_usg_stdio = yes; then
X  AC_DEFINE(HAVE_USG_STDIO)
Xfi])
X
Xdnl Checks for Linux stdio with f->_flags
Xdnl Defines HAVE_FILE__FLAGS on success.
XAC_DEFUN([AC_HEADER_FILE__FLAGS],
X[AC_CACHE_CHECK([for f->_flags in FILE *], ac_cv_file__flags,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xint     flags;
Xf = fopen("confdefs.h", "r");
Xflags  = f->_flags;
Xfclose(f);],
X                [ac_cv_file__flags=yes],
X                [ac_cv_file__flags=no])])
Xif test $ac_cv_file__flags = yes; then
X  AC_DEFINE(HAVE_FILE__FLAGS)
Xfi])
X
Xdnl Checks for Linux stdio with f->_IO_buf_base
Xdnl Defines HAVE_FILE__IO_BUF_BASE on success.
XAC_DEFUN([AC_HEADER_FILE__IO_BUF_BASE],
X[AC_CACHE_CHECK([for f->_IO_buf_base in FILE *], ac_cv_file__io_buf_base,
X                [AC_TRY_LINK([#include <stdio.h>],
X[FILE    *f;
Xchar     *ptr;
Xf = fopen("confdefs.h", "r");
Xptr = f->_IO_buf_base;
Xfclose(f);],
X                [ac_cv_file__io_buf_base=yes],
X                [ac_cv_file__io_buf_base=no])])
Xif test $ac_cv_file__io_buf_base = yes; then
X  AC_DEFINE(HAVE_FILE__IO_BUF_BASE)
Xfi])
X
Xdnl Checks for errno definition in <errno.h>
Xdnl Defines HAVE_ERRNO_DEF on success.
XAC_DEFUN([AC_HEADER_ERRNO_DEF],
X[AC_CACHE_CHECK([for errno definition in errno.h], ac_cv_header_errno_def,
X                [AC_TRY_COMPILE([#include <errno.h>],
X[errno = 0;],
X                [ac_cv_header_errno_def=yes],
X                [ac_cv_header_errno_def=no])])
Xif test $ac_cv_header_errno_def = yes; then
X  AC_DEFINE(HAVE_ERRNO_DEF)
Xfi])
X
Xdnl Checks for environ definition in <unistd.h>
Xdnl Defines HAVE_ENVIRON_DEF on success.
XAC_DEFUN([AC_HEADER_ENVIRON_DEF],
X[AC_CACHE_CHECK([for environ definition in unistd.h/stdlib.h], ac_cv_header_environ_def,
X                [AC_TRY_COMPILE([
X#ifdef	HAVE_UNISTD_H
X#include <unistd.h>
X#else
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>	/* MSC no unistd.h but environ in stdlib.h */
X#endif
X#endif
X],
X[environ = 0;],
X                [ac_cv_header_environ_def=yes],
X                [ac_cv_header_environ_def=no])])
Xif test $ac_cv_header_environ_def = yes; then
X  AC_DEFINE(HAVE_ENVIRON_DEF)
Xfi])
X
Xdnl Checks for sys_siglist definition in <signal.h>
Xdnl Defines HAVE_SYS_SIGLIST_DEF on success.
XAC_DEFUN([AC_HEADER_SYS_SIGLIST_DEF],
X[AC_CACHE_CHECK([for sys_siglist definition in signal.h], ac_cv_header_sys_siglist_def,
X                [AC_TRY_COMPILE([#include <signal.h>],
X[char *cp = (char *)sys_siglist[0]; exit (cp != (char *)0 && *cp != 0);],
X                [ac_cv_header_sys_siglist_def=yes],
X                [ac_cv_header_sys_siglist_def=no])])
Xif test $ac_cv_header_sys_siglist_def = yes; then
X  AC_DEFINE(HAVE_SYS_SIGLIST_DEF)
Xfi])
X
Xdnl Checks for extern timezone in time.h or sys/time.h
Xdnl Defines HAVE_VAR_TIMEZONE_DEF on success.
XAC_DEFUN([AC_VAR_TIMEZONE_DEF],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for extern timezone in time.h or sys/time.h], ac_cv_var_timezone_def,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [timezone = 1;],
X                [ac_cv_var_timezone_def=yes],
X                [ac_cv_var_timezone_def=no])])
Xif test $ac_cv_var_timezone_def = yes; then
X  AC_DEFINE(HAVE_VAR_TIMEZONE_DEF)
Xfi])
X
Xdnl Checks if extern long timezone exists in libc
Xdnl Defines HAVE_VAR_TIMEZONE on success.
XAC_DEFUN([AC_VAR_TIMEZONE],
X[AC_CACHE_CHECK([for working extern long timezone ], ac_cv_var_timezone,
X                [AC_TRY_RUN([
Xextern	long	timezone;
X
Xint
Xmain()
X{
X	exit(timezone != 0);
X}],
X                [ac_cv_var_timezone=yes],
X                [ac_cv_var_timezone=no])])
Xif test $ac_cv_var_timezone = yes; then
X  AC_DEFINE(HAVE_VAR_TIMEZONE)
Xfi])
X
Xdnl Checks if extern char *__progname exists in libc
Xdnl Defines HAVE_VAR___PROGNAME on success.
XAC_DEFUN([AC_VAR___PROGNAME],
X[AC_CACHE_CHECK([for working extern char *__progname ], ac_cv_var___progname,
X                [AC_TRY_RUN([
Xextern	char	*__progname;
X
Xint
Xmain()
X{
X	exit (!(__progname != 0 && *__progname != '\0'));
X}],
X                [ac_cv_var___progname=yes],
X                [ac_cv_var___progname=no])])
Xif test $ac_cv_var___progname = yes; then
X  AC_DEFINE(HAVE_VAR___PROGNAME)
Xfi])
X
Xdnl Checks if extern char *__progname_full exists in libc
Xdnl Defines HAVE_VAR___PROGNAME_FULL on success.
XAC_DEFUN([AC_VAR___PROGNAME_FULL],
X[AC_CACHE_CHECK([for working extern char *__progname_full ], ac_cv_var___progname_full,
X                [AC_TRY_RUN([
Xextern	char	*__progname_full;
X
Xint
Xmain()
X{
X	exit (!(__progname_full != 0 && *__progname_full != '\0'));
X}],
X                [ac_cv_var___progname_full=yes],
X                [ac_cv_var___progname_full=no])])
Xif test $ac_cv_var___progname_full = yes; then
X  AC_DEFINE(HAVE_VAR___PROGNAME_FULL)
Xfi])
X
Xdnl Checks for UNIX-98 compliant <inttypes.h>
Xdnl Defines HAVE_INTTYPES_H on success.
XAC_DEFUN([AC_HEADER_INTTYPES],
X[AC_CACHE_CHECK([for UNIX-98 compliant inttypes.h], ac_cv_header_inttypes,
X                [AC_TRY_COMPILE([#include <inttypes.h>],
X[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;],
X                [ac_cv_header_inttypes=yes],
X                [ac_cv_header_inttypes=no])])
Xif test $ac_cv_header_inttypes = yes; then
X  AC_DEFINE(HAVE_INTTYPES_H)
Xfi])
X
Xdnl Checks for SUSv3 compliant <stdint.h>
Xdnl Defines HAVE_STDINT_H and HAVE_TYPE_INTMAX_T/HAVE_TYPE_UINTMAX_T on success.
XAC_DEFUN([AC_HEADER_STDINT],
X[AC_CACHE_CHECK([for SUSv3 compliant stdint.h], ac_cv_header_stdint,
X                [AC_TRY_COMPILE([#include <stdint.h>],
X[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;
Xintmax_t im; uintmax_t uim;],
X                [ac_cv_header_stdint=yes],
X                [ac_cv_header_stdint=no])])
Xif test $ac_cv_header_stdint = yes; then
X  AC_DEFINE(HAVE_STDINT_H)
X  AC_DEFINE(HAVE_TYPE_INTMAX_T)
X  AC_DEFINE(HAVE_TYPE_UINTMAX_T)
Xfi])
X
Xdnl Checks for struct timeval in time.h or sys/time.h
Xdnl Defines HAVE_STRUCT_TIMEVAL on success.
XAC_DEFUN([AC_STRUCT_TIMEVAL],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for struct timeval in time.h or sys/time.h], ac_cv_struct_timeval,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [struct timeval tv;],
X                [ac_cv_struct_timeval=yes],
X                [ac_cv_struct_timeval=no])])
Xif test $ac_cv_struct_timeval = yes; then
X  AC_DEFINE(HAVE_STRUCT_TIMEVAL)
Xfi])
X
Xdnl Checks for struct timezone in time.h or sys/time.h
Xdnl Defines HAVE_STRUCT_TIMEZONE on success.
XAC_DEFUN([AC_STRUCT_TIMEZONE],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for struct timezone in time.h or sys/time.h], ac_cv_struct_timezone,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [struct timezone tz;],
X                [ac_cv_struct_timezone=yes],
X                [ac_cv_struct_timezone=no])])
Xif test $ac_cv_struct_timezone = yes; then
X  AC_DEFINE(HAVE_STRUCT_TIMEZONE)
Xfi])
X
Xdnl Checks for type time_t
Xdnl Defines time_t to long on failure.
XAC_DEFUN([AC_TYPE_TIME_T],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for time_t], ac_cv_type_time_t,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif], [time_t t;],
X                [ac_cv_type_time_t=yes],
X                [ac_cv_type_time_t=no])])
Xif test $ac_cv_type_time_t = no; then
X  AC_DEFINE(time_t, long)
Xfi])
X
Xdnl AC_CHECK_SIZE_TIME([CROSS-SIZE])
Xdnl This must be called past AC_CHECK_SIZEOF(long int)
XAC_DEFUN(AC_CHECK_SIZE_TIME_T,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_time_t, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_time_t, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of time_t)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(time_t));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=SIZEOF_LONG_INT, ifelse([$1], , , AC_CV_NAME=$1))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
Xdnl AC_CHECK_SIZE_WCHAR([CROSS-SIZE])
XAC_DEFUN(AC_CHECK_SIZE_WCHAR,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_wchar, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_wchar, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of wchar)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(L'a'));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$1], , , AC_CV_NAME=$1))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
Xdnl AC_CHECK_SIZE_WCHAR([CROSS-SIZE])
XAC_DEFUN(AC_CHECK_SIZE_WCHAR_T,
X[changequote(<<, >>)dnl
Xdnl The name to #define.
Xdefine(<<AC_TYPE_NAME>>, translit(sizeof_wchar_t, [a-z *], [A-Z_P]))dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_wchar_t, [ *], [_p]))dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(size of wchar_t)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(wchar_t));
X  exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=SIZEOF_CHAR, ifelse([$1], , , AC_CV_NAME=$1))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Xundefine([AC_TYPE_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
X
Xdnl Checks for type clock_t
Xdnl Defines clock_t to long on failure.
Xdnl XXX we cannot check for AC_CHECK_HEADERS(sys/times.h)
XAC_DEFUN([AC_TYPE_CLOCK_T],
X[AC_REQUIRE([AC_HEADER_TIME])dnl
XAC_CACHE_CHECK([for clock_t], ac_cv_type_clock_t,
X                [AC_TRY_COMPILE([
X#include <sys/types.h>
X/*
X * time.h is needed because of a bug in Next Step.
X * Next Step needs time.h for clock_t
X */
X#ifdef	TIME_WITH_SYS_TIME
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#else
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#endif
X#endif
X#ifdef	HAVE_SYS_TIMES_H
X#include <sys/times.h>
X#endif
X		], [clock_t t;],
X                [ac_cv_type_clock_t=yes],
X                [ac_cv_type_clock_t=no])])
Xif test $ac_cv_type_clock_t = no; then
X  AC_DEFINE(clock_t, long)
Xfi])
X
Xdnl Checks for type socklen_t
Xdnl Defines socklen_t to int on failure.
XAC_DEFUN([AC_TYPE_SOCKLEN_T],
X[AC_REQUIRE([AC_HEADER_STDC])dnl
XAC_MSG_CHECKING(for socklen_t)
XAC_CACHE_VAL(ac_cv_type_socklen_t,
X[AC_EGREP_CPP(dnl
Xchangequote(<<,>>)dnl
X<<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl
Xchangequote([,]), [#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#include <sys/socket.h>], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])dnl
XAC_MSG_RESULT($ac_cv_type_socklen_t)
Xif test $ac_cv_type_socklen_t = no; then
X  AC_DEFINE(socklen_t, int)
Xfi])
X
Xdnl Checks for type stack_t
Xdnl Defines HAVE_STACK_T on success.
XAC_DEFUN([AC_TYPE_STACK_T],
X[AC_CACHE_CHECK([if stack_t is declared in signal.h], ac_cv_stack_t,
X                [AC_TRY_COMPILE([#include <signal.h>],
X                                [stack_t ss; ss.ss_size = 0; exit (ss.ss_size == 0);],
X                                [ac_cv_stack_t=yes],
X                                [ac_cv_stack_t=no])])
Xif test $ac_cv_stack_t = yes; then
X  AC_DEFINE(HAVE_STACK_T)
Xfi])
X
Xdnl Checks for type siginfo_t
Xdnl Defines HAVE_SIGINFO_T on success.
XAC_DEFUN([AC_TYPE_SIGINFO_T],
X[AC_CACHE_CHECK([if siginfo_t is declared in signal.h], ac_cv_siginfo_t,
X                [AC_TRY_COMPILE([#include <signal.h>
X#ifdef	HAVE_SIGINFO_H
X#include <siginfo.h>
X#else
X#ifdef	HAVE_SYS_SIGINFO_H
X#include <sys/siginfo.h>
X#endif
X#endif],
X                                [siginfo_t si; si.si_signo = 0; exit (si.si_signo == 0);],
X                                [ac_cv_siginfo_t=yes],
X                                [ac_cv_siginfo_t=no])])
Xif test $ac_cv_siginfo_t = yes; then
X  AC_DEFINE(HAVE_SIGINFO_T)
Xfi])
X
Xdnl Checks for type struct sockaddr_storage
Xdnl Defines HAVE_SOCKADDR_STORAGE on success.
XAC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE],
X[AC_CACHE_CHECK([if struct sockaddr_storage is declared in socket.h], ac_cv_struct_sockaddr_storage,
X                [AC_TRY_COMPILE([#include <sys/socket.h>],
X                                [struct  sockaddr_storage ss; ss.ss_family = 0; exit (ss.ss_family == 0);],
X                                [ac_cv_struct_sockaddr_storage=yes],
X                                [ac_cv_struct_sockaddr_storage=no])])
Xif test $ac_cv_struct_sockaddr_storage = yes; then
X  AC_DEFINE(HAVE_SOCKADDR_STORAGE)
Xfi])
X
Xdnl Checks for type long long
Xdnl Defines HAVE_LONGLONG on success.
XAC_DEFUN([AC_TYPE_LONGLONG],
X[AC_CACHE_CHECK([for type long long], ac_cv_type_longlong,
X                [AC_TRY_COMPILE([], [long long i;],
X                [ac_cv_type_longlong=yes],
X                [ac_cv_type_longlong=no])])
Xif test $ac_cv_type_longlong = yes; then
X  AC_DEFINE(HAVE_LONGLONG)
Xfi])
X
Xdnl Checks for type __int64
Xdnl Defines HAVE___INT64 on success.
XAC_DEFUN([AC_TYPE___INT64],
X[AC_CACHE_CHECK([for type __int64], ac_cv_type___int64,
X                [AC_TRY_COMPILE([], [__int64 i;],
X                [ac_cv_type___int64=yes],
X                [ac_cv_type___int64=no])])
Xif test $ac_cv_type___int64 = yes; then
X  AC_DEFINE(HAVE___INT64)
Xfi])
X
Xdnl Checks for type long double
Xdnl Defines HAVE_LONGDOUBLE on success.
XAC_DEFUN([AC_TYPE_LONGDOUBLE],
X[AC_CACHE_CHECK([for type long double], ac_cv_type_longdouble,
X                [AC_TRY_COMPILE([], [long double ld;],
X                [ac_cv_type_longdouble=yes],
X                [ac_cv_type_longdouble=no])])
Xif test $ac_cv_type_longdouble = yes; then
X  AC_DEFINE(HAVE_LONGDOUBLE)
Xfi])
X
Xdnl Checks if C-compiler orders bitfields htol
Xdnl Defines BITFIELDS_HTOL on success.
XAC_DEFUN([AC_C_BITFIELDS],
X[AC_CACHE_CHECK([whether bitorder in bitfields is htol], ac_cv_c_bitfields_htol,
X                [AC_TRY_RUN([
Xstruct {
X	unsigned char	x1:4;
X	unsigned char	x2:4;
X} a;
Xint
Xmain()
X{
Xchar	*cp;
X
Xcp = (char *)&a;
X*cp = 0x12;
Xexit(a.x1 == 2);}],
X                [ac_cv_c_bitfields_htol=yes],
X                [ac_cv_c_bitfields_htol=no])])
Xif test $ac_cv_c_bitfields_htol = yes; then
X  AC_DEFINE(BITFIELDS_HTOL)
Xfi])
X
Xdnl Checks if C-compiler understands prototypes
Xdnl Defines PROTOTYPES on success.
XAC_DEFUN([AC_TYPE_PROTOTYPES],
X[AC_CACHE_CHECK([for prototypes], ac_cv_type_prototypes,
X                [AC_TRY_RUN([
Xdoit(int i, ...)
X{return 0;}
Xint
Xmain(int ac, char *av[])
X{ doit(1, 2, 3);
Xexit(0);}],
X                [ac_cv_type_prototypes=yes],
X                [ac_cv_type_prototypes=no])])
Xif test $ac_cv_type_prototypes = yes; then
X  AC_DEFINE(PROTOTYPES)
Xfi])
X
Xdnl Checks for type size_t
Xdnl Defines HAVE_SIZE_T_ on success.
XAC_DEFUN([AC_TYPE_SIZE_T_],
X[AC_CACHE_CHECK([for type size_t], ac_cv_type_size_t_,
X                [AC_TRY_COMPILE([
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#ifdef	HAVE_STDDEF_H
X#include <stddef.h>
X#endif
X#ifdef	HAVE_STDIO_H
X#include <stdio.h>
X#endif
X		], [size_t s;],
X                [ac_cv_type_size_t_=yes],
X                [ac_cv_type_size_t_=no])])
Xif test $ac_cv_type_size_t_ = yes; then
X  AC_DEFINE(HAVE_SIZE_T)
Xelse
X  AC_DEFINE(NO_SIZE_T)
Xfi])
X
Xdnl Checks if type char is unsigned
Xdnl Defines CHAR_IS_UNSIGNED on success.
XAC_DEFUN([AC_TYPE_CHAR],
X[AC_CACHE_CHECK([if char is unsigned], ac_cv_type_char_unsigned,
X                [AC_TRY_RUN([
Xint
Xmain()
X{
X	char c;
X
X	c = -1;
X	exit(c < 0);}],
X		[ac_cv_type_char_unsigned=yes],
X		[ac_cv_type_char_unsigned=no],
X		[ac_cv_type_char_unsigned=no])]) 
Xif test $ac_cv_type_char_unsigned = yes; then
X  AC_DEFINE(CHAR_IS_UNSIGNED)
Xfi])
X
Xdnl Checks if function/macro va_copy() is available
Xdnl Defines HAVE_VA_COPY on success.
XAC_DEFUN([AC_FUNC_VA_COPY],
X[AC_CACHE_CHECK([for va_copy], ac_cv_func_va_copy,
X                [AC_TRY_LINK([
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif], 
X		[
Xva_list a, b;
X
Xva_copy(a, b);],
X                [ac_cv_func_va_copy=yes],
X                [ac_cv_func_va_copy=no])])
Xif test $ac_cv_func_va_copy = yes; then
X  AC_DEFINE(HAVE_VA_COPY)
Xfi])
X
Xdnl Checks if function/macro __va_copy() is available
Xdnl Defines HAVE__VA_COPY on success.
XAC_DEFUN([AC_FUNC__VA_COPY],
X[AC_CACHE_CHECK([for __va_copy], ac_cv_func__va_copy,
X                [AC_TRY_LINK([
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif], 
X		[
Xva_list a, b;
X
X__va_copy(a, b);],
X
X                [ac_cv_func__va_copy=yes],
X                [ac_cv_func__va_copy=no])])
Xif test $ac_cv_func__va_copy = yes; then
X  AC_DEFINE(HAVE__VA_COPY)
Xfi])
X
Xdnl Checks if va_list is an array
Xdnl Defines VA_LIST_IS_ARRAY on success.
XAC_DEFUN([AC_TYPE_VA_LIST],
X[AC_CACHE_CHECK([if va_list is an array], ac_cv_type_va_list_array,
X                [AC_TRY_LINK([
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
X],
X	[
Xva_list a, b;
X
Xa = b;],
X		[ac_cv_type_va_list_array=no],
X		[ac_cv_type_va_list_array=yes])]) 
Xif test $ac_cv_type_va_list_array = yes; then
X  AC_DEFINE(VA_LIST_IS_ARRAY)
Xfi])
X
Xdnl Checks if quotactl is present as ioctl
Xdnl Defines HAVE_QUOTAIOCTL on success.
XAC_DEFUN([AC_FUNC_QUOTAIOCTL],
X[AC_CACHE_CHECK([if quotactl is an ioctl], ac_cv_func_quotaioctl,
X                [AC_TRY_LINK([#include <sys/types.h>
X#include <sys/fs/ufs_quota.h>],
X		[struct quotctl q; ioctl(0, Q_QUOTACTL, &q)],
X		[ac_cv_func_quotaioctl=yes],
X		[ac_cv_func_quotaioctl=no])]) 
Xif test $ac_cv_func_quotaioctl = yes; then
X  AC_DEFINE(HAVE_QUOTAIOCTL)
Xfi])
X
Xdnl Checks if function __dtoa() is available
Xdnl Defines HAVE_DTOA on success.
XAC_DEFUN([AC_FUNC_DTOA],
X[AC_CACHE_CHECK([for __dtoa], ac_cv_func_dtoa,
X                [AC_TRY_LINK([extern  char *__dtoa();], 
X[int decpt; int sign; char *ep; char *bp;
Xbp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);],
X                [ac_cv_func_dtoa=yes],
X                [ac_cv_func_dtoa=no])])
Xif test $ac_cv_func_dtoa = yes; then
X  AC_DEFINE(HAVE_DTOA)
Xfi])
X
Xdnl Checks if reentrant __dtoa() exists (needs a result prt)
Xdnl Defines HAVE_DTOA_R on success.
XAC_DEFUN([AC_FUNC_DTOA_R],
X[AC_REQUIRE([AC_FUNC_DTOA])dnl
XAC_CACHE_CHECK([for __dtoa that needs result ptr], ac_cv_func_dtoa_r,
X                [AC_TRY_RUN([
Xextern	char *__dtoa();
Xint
Xmain()
X{
X#ifdef	HAVE_DTOA
X	int	decpt, sign;
X	char	*bp;
X	char	*ep;
X	char	*result;
X
X	result = 0;
X	bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result);
X	exit(result == 0);
X#else
X	exit(1);
X#endif
X}],
X                [ac_cv_func_dtoa_r=yes],
X                [ac_cv_func_dtoa_r=no])])
Xif test $ac_cv_func_dtoa_r = yes; then
X  AC_DEFINE(HAVE_DTOA_R)
Xfi])
X
Xdnl Checks if working ecvt() exists
Xdnl Defines HAVE_ECVT on success.
XAC_DEFUN([AC_FUNC_ECVT],
X[AC_CACHE_CHECK([for working ecvt() ], ac_cv_func_ecvt,
X                [AC_TRY_RUN([
Xextern	char *ecvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0);
X}],
X                [ac_cv_func_ecvt=yes],
X                [ac_cv_func_ecvt=no])])
Xif test $ac_cv_func_ecvt = yes; then
X  AC_DEFINE(HAVE_ECVT)
Xfi])
X
Xdnl Checks if working fcvt() exists
Xdnl Defines HAVE_FCVT on success.
XAC_DEFUN([AC_FUNC_FCVT],
X[AC_CACHE_CHECK([for working fcvt() ], ac_cv_func_fcvt,
X                [AC_TRY_RUN([
Xextern	char *fcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0);
X}],
X                [ac_cv_func_fcvt=yes],
X                [ac_cv_func_fcvt=no])])
Xif test $ac_cv_func_fcvt = yes; then
X  AC_DEFINE(HAVE_FCVT)
Xfi])
X
Xdnl Checks if working gcvt() exists
Xdnl Defines HAVE_GCVT on success.
XAC_DEFUN([AC_FUNC_GCVT],
X[AC_CACHE_CHECK([for working gcvt() ], ac_cv_func_gcvt,
X                [AC_TRY_RUN([
Xextern	char *gcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	char	buf[32];
X
X/*	exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/
X	exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0);
X}],
X                [ac_cv_func_gcvt=yes],
X                [ac_cv_func_gcvt=no])])
Xif test $ac_cv_func_gcvt = yes; then
X  AC_DEFINE(HAVE_GCVT)
Xfi])
X
Xdnl Checks if function uname() is available
Xdnl Defines HAVE_UNAME on success.
XAC_DEFUN([AC_FUNC_UNAME],
X[AC_CACHE_CHECK([for uname], ac_cv_func_uname,
X                [AC_TRY_LINK([#include <sys/utsname.h>], 
X[struct	utsname un;
Xuname(&un);],
X                [ac_cv_func_uname=yes],
X                [ac_cv_func_uname=no])])
Xif test $ac_cv_func_uname = yes; then
X  AC_DEFINE(HAVE_UNAME)
Xfi])
X
Xdnl Checks if function mlock() is available
Xdnl beware HP-UX 10.x it contains a bad mlock() in libc
Xdnl Defines HAVE_MLOCK on success.
XAC_DEFUN([AC_FUNC_MLOCK],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CACHE_CHECK([for mlock], ac_cv_func_mlock,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X	if (mlock(0, 0) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}],
X                [ac_cv_func_mlock=yes],
X                [ac_cv_func_mlock=no])
Xrm -f core core.* *.core])
Xif test $ac_cv_func_mlock = yes; then
X  AC_DEFINE(HAVE_MLOCK)
Xfi])
X
Xdnl Checks if function mlockall() is available
Xdnl beware HP-UX 10.x it contains a bad mlockall() in libc
Xdnl Defines HAVE_MLOCKALL on success.
XAC_DEFUN([AC_FUNC_MLOCKALL],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CACHE_CHECK([for mlockall], ac_cv_func_mlockall,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/mman.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xint
Xmain()
X{
X	if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}
X],
X                [ac_cv_func_mlockall=yes],
X                [ac_cv_func_mlockall=no])
Xrm -f core core.* *.core])
Xif test $ac_cv_func_mlockall = yes; then
X  AC_DEFINE(HAVE_MLOCKALL)
Xfi])
X
XAC_DEFUN([jsAC_FUNC_MMAP],
X[AC_CHECK_HEADERS(unistd.h)dnl
XAC_REQUIRE([AC_MMAP_SIZEP])dnl
XAC_REQUIRE([AC_FUNC_GETPAGESIZE])dnl
XAC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
X[AC_TRY_RUN([
X/* Thanks to Mike Haertel and Jim Avera for this test.
X   Here is a matrix of mmap possibilities:
X	mmap private not fixed
X	mmap private fixed at somewhere currently unmapped
X	mmap private fixed at somewhere already mapped
X	mmap shared not fixed
X	mmap shared fixed at somewhere currently unmapped
X	mmap shared fixed at somewhere already mapped
X   For private mappings, we should verify that changes cannot be read()
X   back from the file, nor mmap's back from the file at a different
X   address.  (There have been systems where private was not correctly
X   implemented like the infamous i386 svr4.0, and systems where the
X   VM page cache was not coherent with the filesystem buffer cache
X   like early versions of FreeBSD and possibly contemporary NetBSD.)
X   For shared mappings, we should conversely verify that changes get
X   propogated back to all the places they're supposed to be.
X
X   Grep wants private fixed already mapped.
X   The main things grep needs to know about mmap are:
X   * does it exist and is it safe to write into the mmap'd area
X   * how to use it (BSD variants)  */
X#include <sys/types.h>
X#include <fcntl.h>
X#include <sys/mman.h>
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xint
Xmain()
X{
X	char *data, *data2, *data3;
X	int i, pagesize;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X	data2 = malloc(2 * pagesize);
X	if (!data2)
X		exit(1);
X	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
X	if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE,
X	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	/*
X	 * Finally, make sure that changes to the mapped area
X	 * do not percolate back to the file as seen by read().
X	 * (This is a bug on some variants of i386 svr4.0.)
X	 */
X	for (i = 0; i < pagesize; ++i)
X		*(data2 + i) = *(data2 + i) + 1;
X	data3 = malloc(pagesize);
X	if (!data3)
X		exit(1);
X	if (read(fd, data3, pagesize) != pagesize)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data3 + i))
X			exit(1);
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no,
Xac_cv_func_mmap_fixed_mapped=no)])
Xif test $ac_cv_func_mmap_fixed_mapped = yes; then
X  AC_DEFINE(HAVE_MMAP)
Xfi
X])
X
XAC_DEFUN([AC_MMAP_SIZEP],
X[AC_CHECK_HEADERS(unistd.h)dnl
XAC_REQUIRE([AC_FUNC_GETPAGESIZE])dnl
XAC_CACHE_CHECK(for mmap that needs ptr to size, ac_cv_func_mmap_sizep,
X[AC_TRY_RUN([
X#include <sys/types.h>
X#include <fcntl.h>
X#include <signal.h>
X#include <setjmp.h>
X#include <sys/mman.h>
X
X#ifndef MAP_FILE
X#define MAP_FILE   0		/* Needed on Apollo Domain/OS */
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xjmp_buf jenv;
X
Xint
Xintr()
X{
X	signal(SIGSEGV, intr);
X	longjmp(jenv, 1);
X}
X
Xint
Xmain()
X{
X	char *data, *data2;
X	int i, pagesize, ps;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X
X	/*
X	 * Keep a copy, Apollo modifies the value...
X	 */
X	ps = pagesize;
X
X	/*
X	 * Apollo mmap() is not a syscall but a library function and fails
X	 * if it tries to dereference 'ps'. We must use setjmp in order to
X	 * catch the failure.
X	 */
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 != (char *)-1)
X		exit(1);
X
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 == (char *)-1)
X		exit(1);
X
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X], ac_cv_func_mmap_sizep=yes, ac_cv_func_mmap_sizep=no,
Xac_cv_func_mmap_sizep=no)])
Xif test $ac_cv_func_mmap_sizep = yes; then
X  AC_DEFINE(_MMAP_WITH_SIZEP)
Xfi
X])
X
Xdnl Checks if mmap() works to get shared memory
Xdnl Defines HAVE_SMMAP on success.
XAC_DEFUN([AC_FUNC_SMMAP],
X[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/mman.h>
X
X#ifndef	MAP_ANONYMOUS
X#	ifdef	MAP_ANON
X#		define MAP_ANONYMOUS MAP_ANON
X#	endif
X#endif
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
Xchar *
Xmkshare()
X{
X        int     size = 8192;
X        int     f;
X        char    *addr;
X
X#ifdef  MAP_ANONYMOUS   /* HP/UX */
X        f = -1;
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0);
X#else
X        if ((f = open("/dev/zero", 2)) < 0)
X                exit(1);
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
X#endif
X        if (addr == (char *)-1)
X                exit(1);
X        close(f);
X
X        return (addr);
X}
X
Xint
Xmain()
X{
X        char    *addr;
X        
X        addr = mkshare();
X        *addr = 'I';
X
X        switch (fork()) {
X
X        case -1:
X                printf("help\n"); exit(1);
X
X        case 0: /* child */
X                *addr = 'N';
X                _exit(0);
X                break;
X        default: /* parent */
X                wait(0);
X                sleep(1);
X                break;
X        }
X
X        if (*addr != 'N')
X                exit(1);
X        exit(0);
X}
X], 
X                [ac_cv_func_smmap=yes],
X                [ac_cv_func_smmap=no],
X                [ac_cv_func_smmap=no])])
Xif test $ac_cv_func_smmap = yes; then
X  AC_DEFINE(HAVE_SMMAP)
Xfi])
X
Xdnl Checks if shmget() works to get shared memory
Xdnl Defines HAVE_SHMGET on success.
XAC_DEFUN([AC_FUNC_SHMGET],
X[AC_CACHE_CHECK([if shmget works to get shared memory], ac_cv_func_shmget,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/shm.h>
Xint
Xmain()
X{
X	int	id;
X
X	id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600);
X	if (id == -1)
X		exit(1);
X	shmctl(id, IPC_RMID, 0);
X        exit(0);
X}
X], 
X                [ac_cv_func_shmget=yes],
X                [ac_cv_func_shmget=no],
X                [ac_cv_func_shmget=no])])
Xif test $ac_cv_func_shmget = yes; then
X  AC_DEFINE(HAVE_SHMGET)
Xfi])
X
Xdnl Checks if sys_siglist[] exists
Xdnl Defines HAVE_SYS_SIGLIST on success.
XAC_DEFUN([AC_FUNC_SYS_SIGLIST],
X[AC_CACHE_CHECK([for sys_siglist], ac_cv_func_sys_siglist,
X                [AC_TRY_RUN([
Xint
Xmain()
X{ extern char *sys_siglist[];
Xif (sys_siglist[1] == 0)
X	exit(1);
Xexit(0);}],
X                [ac_cv_func_sys_siglist=yes],
X                [ac_cv_func_sys_siglist=no])])
Xif test $ac_cv_func_sys_siglist = yes; then
X  AC_DEFINE(HAVE_SYS_SIGLIST)
Xfi])
X
Xdnl Checks for maximum number of bits in minor device number
XAC_DEFUN([AC_CHECK_MINOR_BITS],
X[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl
Xchangequote(<<, >>)dnl
Xdefine(<<AC_MACRO_NAME>>, DEV_MINOR_BITS)dnl
Xdnl The cache variable name.
Xdefine(<<AC_CV_NAME>>, ac_cv_dev_minor_bits)dnl
Xchangequote([, ])dnl
XAC_MSG_CHECKING(bits in minor device number)
XAC_CACHE_VAL(AC_CV_NAME,
X[AC_TRY_RUN([#include <stdio.h>
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	FILE	*f=fopen("conftestval", "w");
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	if (!f) exit(1);
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
X	fprintf(f, "%d\n", m);
X	exit(0);
X}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
XAC_MSG_RESULT($AC_CV_NAME)
XAC_DEFINE_UNQUOTED(AC_MACRO_NAME, $AC_CV_NAME)
Xundefine([AC_MACRO_NAME])dnl
Xundefine([AC_CV_NAME])dnl
X])
X
Xdnl Checks for maximum number of bits in minor device numbers are non contiguous
Xdnl Defines DEV_MINOR_NONCONTIG on success.
XAC_DEFUN([AC_CHECK_MINOR_NONCONTIG],
X[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl
XAC_CACHE_CHECK([whether bits in minor device numbers are non contiguous], ac_cv_dev_minor_noncontig,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
Xexit (m == c);}],
X                [ac_cv_dev_minor_noncontig=yes],
X                [ac_cv_dev_minor_noncontig=no])])
Xif test $ac_cv_dev_minor_noncontig = yes; then
X  AC_DEFINE(DEV_MINOR_NONCONTIG)
Xfi])
X
Xdnl Checks if we may not define our own malloc()
Xdnl Defines NO_USER_MALLOC if we cannot.
XAC_DEFUN([AC_USER_MALLOC],
X[AC_CACHE_CHECK([if we may not define our own malloc()], ac_cv_no_user_malloc,
X                [AC_TRY_RUN([
Xstatic int mcalled;
Xchar *
Xmalloc(s)
X	int	s;
X{
X	extern	char *sbrk();
X
X	/*
X	 * Don't ask me why, but with Cygwin on 64 Bit Vista this hangs
X	 * infinitely and is undebuggable unless we call write() here...
X	 */
X	write(2, "", 0);
X	mcalled++;
X	_exit(0);
X	return (sbrk(s));
X}
X
Xfree(p) char *p;{}
X	
Xmain()
X{
X#ifdef	HAVE_STRDUP
X	strdup("aaa");
X#else
X	exit(0);
X#endif
X	exit(1);}],
X                [ac_cv_no_user_malloc=no],
X                [ac_cv_no_user_malloc=yes])])
Xif test $ac_cv_no_user_malloc = yes; then
X  AC_DEFINE(NO_USER_MALLOC)
Xfi])
X
Xdnl Checks if ecvt()/fcvt()/gcvt() may be replaced by local implementations
Xdnl There are known problems on ATARI MINT and older Linux version and statical linking
Xdnl Defines NO_USER_XCVT on failure.
XAC_DEFUN([AC_USER_XCVT],
X[AC_CACHE_CHECK([if we may not define our own ecvt()/fcvt()/gcvt()], ac_cv_no_user_xcvt,
X                [AC_TRY_LINK([
X#include <stdio.h>
X
Xchar *
Xecvt(value, ndig, decpt, sign)
X	double	value;
X	int	ndig;
X	int	*decpt;
X	int	*sign;
X{
X	return ("ecvt-test");
X}
X
Xchar *
Xfcvt(value, ndig, decpt, sign)
X	double	value;
X	int	ndig;
X	int	*decpt;
X	int	*sign;
X{
X	return ("fcvt-test");
X}
X
Xchar *
Xgcvt(value, ndig, bp)
X	double	value;
X	int	ndig;
X	char	*bp;
X{
X	return ("gcvt-test");
X}
X], 
X		[
X	char	buf[64];
X
X	printf("E: %e F: %f G: %g local gcvt: %s\n", 1.234, 1.234, 1.234, gcvt(1.234, 4, buf));
X],
X                [ac_cv_no_user_xcvt=no],
X                [ac_cv_no_user_xcvt=yes])])
Xif test $ac_cv_no_user_xcvt = yes; then
X  AC_DEFINE(NO_USER_XCVT)
Xfi])
X
Xdnl Checks if BSD-4.2 compliant getpgrp() exists
Xdnl Defines HAVE_BSD_GETPGRP on success.
XAC_DEFUN([AC_FUNC_BSD_GETPGRP],
X[AC_CACHE_CHECK([for BSD compliant getpgrp], ac_cv_func_bsd_getpgrp,
X                [AC_TRY_RUN([
Xint
Xmain()
X{ long p;
X/*
X * POSIX getpgrp() has void parameter...
X */
X	p = getpgrp(-1);
X	if (p == getpgrp(1) && p == getpgrp(getpid()))
X		exit(1);
Xexit(0);}],
X                [ac_cv_func_bsd_getpgrp=yes],
X                [ac_cv_func_bsd_getpgrp=no])])
Xif test $ac_cv_func_bsd_getpgrp = yes; then
X  AC_DEFINE(HAVE_BSD_GETPGRP)
Xfi])
X
Xdnl Checks if BSD-4.2 compliant setpgrp() exists
Xdnl Defines HAVE_BSD_SETPGRP on success.
XAC_DEFUN([AC_FUNC_BSD_SETPGRP],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CACHE_CHECK([for BSD compliant setpgrp], ac_cv_func_bsd_setpgrp,
X                [AC_TRY_RUN([
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
Xint
Xmain()
X{ errno = 0;
X/*
X * Force illegal pid on BSD
X */
Xif (setpgrp(-1, 100) < 0 && errno == ESRCH)
X	exit(0);
Xexit(1);}],
X                [ac_cv_func_bsd_setpgrp=yes],
X                [ac_cv_func_bsd_setpgrp=no])])
Xif test $ac_cv_func_bsd_setpgrp = yes; then
X  AC_DEFINE(HAVE_BSD_SETPGRP)
Xfi])
X
Xdnl Checks if *printf() supports %jd
Xdnl Defines HAVE_PRINTF_J on success.
XAC_DEFUN([AC_FUNC_PRINTF_J],
X[AC_CACHE_CHECK([whether *printf() supports %jd], ac_cv_func_printf_j,
X                [AC_TRY_RUN([
X#include <inttypes.h>
Xint
Xmain()
X{ intmax_t m = 123456789012LL;
Xchar buf[32];
Xsprintf(buf, "%jd", m);
Xif (strcmp(buf, "123456789012") == 0)
X	exit(0);
Xexit(1);}],
X                [ac_cv_func_printf_j=yes],
X                [ac_cv_func_printf_j=no])])
Xif test $ac_cv_func_printf_j = yes; then
X  AC_DEFINE(HAVE_PRINTF_J)
Xfi])
X
Xdnl Checks if *printf() supports %lld
Xdnl Defines HAVE_PRINTF_LL on success.
XAC_DEFUN([AC_FUNC_PRINTF_LL],
X[AC_CACHE_CHECK([whether *printf() supports %lld], ac_cv_func_printf_ll,
X                [AC_TRY_RUN([
Xint
Xmain()
X{ long long ll = 123456789012LL;
Xchar buf[32];
Xsprintf(buf, "%lld", ll);
Xif (strcmp(buf, "123456789012") == 0)
X	exit(0);
Xexit(1);}],
X                [ac_cv_func_printf_ll=yes],
X                [ac_cv_func_printf_ll=no])])
Xif test $ac_cv_func_printf_ll = yes; then
X  AC_DEFINE(HAVE_PRINTF_LL)
Xfi])
X
Xdnl Checks if C99 compliant isinf() exists
Xdnl Defines HAVE_C99_ISINF on success.
XAC_DEFUN([AC_FUNC_C99_ISINF],
X[AC_CACHE_CHECK([for C99 compliant isinf], ac_cv_func_c99_isinf,
X                [AC_TRY_LINK([#include <math.h>], [ double	d;
X#ifndef	isinf
XThe isinf macro is not defined
X#endif
Xreturn (isinf(d));
X],
X                [ac_cv_func_c99_isinf=yes],
X                [ac_cv_func_c99_isinf=no])])
Xif test $ac_cv_func_c99_isinf = yes; then
X  AC_DEFINE(HAVE_C99_ISINF)
Xfi])
X
Xdnl Checks if C99 compliant isnan() exists
Xdnl Defines HAVE_C99_ISNAN on success.
XAC_DEFUN([AC_FUNC_C99_ISNAN],
X[AC_CACHE_CHECK([for C99 compliant isnan], ac_cv_func_c99_isnan,
X                [AC_TRY_LINK([#include <math.h>], [ double	d;
X#ifndef	isnan
XThe isnan macro is not defined
X#endif
Xreturn (isnan(d));
X],
X                [ac_cv_func_c99_isnan=yes],
X                [ac_cv_func_c99_isnan=no])])
Xif test $ac_cv_func_c99_isnan = yes; then
X  AC_DEFINE(HAVE_C99_ISNAN)
Xfi])
X
Xdnl Checks if select() needs more than sys/time.h & sys/types.h
Xdnl Defines SELECT_NONSTD_HDR on success.
XAC_DEFUN([AC_HEADER_SELECT_NONSTD],
X[AC_CACHE_CHECK([if select needs nonstd include files], ac_cv_header_slect_nonstd_hdr,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>],
X			[fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);],
X				[ac_cv_header_slect_nonstd_hdr=no],
X				[ac_cv_header_slect_nonstd_hdr=yes])])
Xif test $ac_cv_header_slect_nonstd_hdr = yes; then
X  AC_DEFINE(SELECT_NONSTD_HDR)
Xfi])
X
Xdnl Checks if select() needs sys/select.h
Xdnl Defines NEED_SYS_SELECT_H on success.
XAC_DEFUN([AC_HEADER_SYS_SELECT],
X[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl
XAC_CACHE_CHECK([if sys/select.h is needed for select], ac_cv_header_need_sys_select_h,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/select.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif],
X			[fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);],
X				[ac_cv_header_need_sys_select_h=yes],
X				[ac_cv_header_need_sys_select_h=no])])
Xif test $ac_cv_header_need_sys_select_h = yes; then
X  AC_DEFINE(NEED_SYS_SELECT_H)
Xfi])
X
Xdnl Checks if select() needs sys/socket.h
Xdnl Defines NEED_SYS_SOCKET_H on success.
XAC_DEFUN([AC_HEADER_SELECT2],
X[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl
XAC_CACHE_CHECK([if sys/socket.h is needed for select], ac_cv_header_need_sys_socket_h,
X                [AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/socket.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif],
X			[fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);],
X				[ac_cv_header_need_sys_socket_h=yes],
X				[ac_cv_header_need_sys_socket_h=no])])
Xif test $ac_cv_header_need_sys_socket_h = yes; then
X  AC_DEFINE(NEED_SYS_SOCKET_H)
Xfi])
X
Xdnl Checks if file locking via fcntl() is available
Xdnl Defines HAVE_FCNTL_LOCKF on success.
XAC_DEFUN([AC_FUNC_FCNTL_LOCKF],
X[AC_CACHE_CHECK([for file locking via fcntl], ac_cv_func_fcntl_lock,
X                [AC_TRY_LINK([
X#include <sys/types.h>
X#include <fcntl.h>], 
X		[
Xstruct flock fl;
Xfcntl(0, F_SETLK, &fl);],
X                [ac_cv_func_fcntl_lock=yes],
X                [ac_cv_func_fcntl_lock=no])])
Xif test $ac_cv_func_fcntl_lock = yes; then
X  AC_DEFINE(HAVE_FCNTL_LOCKF)
Xfi])
X
X
Xdnl Checks if sigsetjmp() is available
Xdnl Defines HAVE_SIGSETJMP on success.
XAC_DEFUN([AC_FUNC_SIGSETJMP],
X[AC_CACHE_CHECK([for sigsetjmp], ac_cv_func_sigsetjmp,
X                [AC_TRY_LINK([
X#include <setjmp.h>],
X		[
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);],
X                [ac_cv_func_sigsetjmp=yes],
X                [ac_cv_func_sigsetjmp=no])])
Xif test $ac_cv_func_sigsetjmp = yes; then
X  AC_DEFINE(HAVE_SIGSETJMP)
Xfi])
X
Xdnl Checks if siglongjmp() is available
Xdnl Defines HAVE_SIGLONGJMP on success.
XAC_DEFUN([AC_FUNC_SIGLONGJMP],
X[AC_CACHE_CHECK([for siglongjmp], ac_cv_func_siglongjmp,
X                [AC_TRY_LINK([
X#include <setjmp.h>],
X		[
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);
Xsiglongjmp(jb, 1);],
X                [ac_cv_func_siglongjmp=yes],
X                [ac_cv_func_siglongjmp=no])])
Xif test $ac_cv_func_siglongjmp = yes; then
X  AC_DEFINE(HAVE_SIGLONGJMP)
Xfi])
X
X
Xdnl Checks if link() allows hard links on symlinks
Xdnl Defines HAVE_HARD_SYMLINKS on success.
XAC_DEFUN([AC_HARD_SYMLINKS],
X[AC_CACHE_CHECK([if link() allows hard links on symlinks], ac_cv_hard_symlinks,
X                [AC_TRY_RUN([
Xmain()
X{
X	int	ret = 0;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}],
X                [ac_cv_hard_symlinks=yes],
X                [ac_cv_hard_symlinks=no])])
Xif test $ac_cv_hard_symlinks = yes; then
X  AC_DEFINE(HAVE_HARD_SYMLINKS)
Xfi])
X
X
Xdnl Checks if link() does not follow symlinks
Xdnl Defines HAVE_LINK_NOFOLLOW on success.
XAC_DEFUN([AC_LINK_NOFOLLOW],
X[AC_CACHE_CHECK([if link() does not folow symlinks], ac_cv_link_nofollow,
X                [AC_TRY_RUN([
X#include <sys/types.h>
X#include <sys/stat.h>
X
Xmain()
X{
X	int	ret = 0;
X	int	f;
X	struct stat sb;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	f = creat("confdefs.f1", 0666);
X	close(f);
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	stat("confdefs.f1", &sb);
X	if (sb.st_nlink == 2)
X		ret = 1;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}],
X                [ac_cv_link_nofollow=yes],
X                [ac_cv_link_nofollow=no])])
Xif test $ac_cv_link_nofollow = yes; then
X  AC_DEFINE(HAVE_LINK_NOFOLLOW)
Xfi])
X
Xdnl Checks if access() does implement E_OK (010) for effective UIDs
Xdnl Defines HAVE_ACCESS_E_OK on success.
XAC_DEFUN([AC_ACCESS_E_OK],
X[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl
XAC_CHECK_HEADERS(unistd.h)
XAC_CACHE_CHECK([if access() does implement E_OK], ac_cv_access_e_ok,
X                [AC_TRY_RUN([
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X#ifndef	R_OK
X#define	R_OK	4	/* Test for Read permission */
X#define	W_OK	2	/* Test for Write permission */
X#define	X_OK	1	/* Test for eXecute permission */
X#define	F_OK	0	/* Test for existence of File */
X#endif
X
X#ifndef	E_OK
X#ifdef	EFF_ONLY_OK
X#define	E_OK	EFF_ONLY_OK /* Irix */
X#else
X#ifdef	EUID_OK
X#define	E_OK	EUID_OK	/* UNICOS (0400) */
X#else
X#define	E_OK	010	/* Test effective uids */
X#endif
X#endif
X#endif
X
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X#ifdef	_MSC_VER
X/*
X * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will
X * cause an exception that results in a popup window. For this reason, the test
X * is disabled for "cl",  it would not work anyway.
X */	
X	int	ret = 1;
X#else
X	int	ret = 0;
X
X	if (access(".", F_OK) != 0)
X		ret = 1;
X	else if (access(".", E_OK|F_OK) != 0)
X		ret = 1;
X	else if (access(".", (R_OK<<4)|F_OK) == 0)
X		ret = 1;
X#endif
X
X	exit(ret);
X}],
X                [ac_cv_access_e_ok=yes],
X                [ac_cv_access_e_ok=no])])
Xif test $ac_cv_access_e_ok = yes; then
X  AC_DEFINE(HAVE_ACCESS_E_OK)
Xfi])
X
Xdnl Checks if fnmatch() does implement FNM_IGNORECASE
Xdnl Defines HAVE_FNMATCH_IGNORECASE on success.
XAC_DEFUN([AC_FNMATCH_IGNORECASE],
X[AC_CHECK_HEADERS(fnmatch.h)
XAC_CACHE_CHECK([if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD], ac_cv_fnmatch_igncase,
X                [AC_TRY_RUN([
X#ifdef	HAVE_FNMATCH
X#include <fnmatch.h>
X#endif
X
X#ifndef	FNM_IGNORECASE
X#ifdef	FNM_CASEFOLD
X#define	FNM_IGNORECASE	FNM_CASEFOLD
X#endif
X#endif
X
Xmain()
X{
X	int	ret;
X
X	ret = fnmatch("a", "A", FNM_IGNORECASE);
X	exit(ret);
X}],
X                [ac_cv_fnmatch_igncase=yes],
X                [ac_cv_fnmatch_igncase=no])])
Xif test $ac_cv_fnmatch_igncase = yes; then
X  AC_DEFINE(HAVE_FNMATCH_IGNORECASE)
Xfi])
X
X
X
Xdnl Checks if realloc() does implement realloc(NULL, size)
Xdnl Defines HAVE_REALLOC_NULL on success.
XAC_DEFUN([AC_FUNC_REALLOC_NULL],
X[AC_CHECK_HEADERS(stdlib.h)
XAC_TYPE_SIGNAL
XAC_CACHE_CHECK([if realloc() does implement realloc(NULL, size)], ac_cv_realloc_null,
X                [AC_TRY_RUN([
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#include <signal.h>
X
XRETSIGTYPE
Xsig(s)
X	int	s;
X{
X	exit(1);
X}
Xint
Xmain()
X{
X	char	*p;
X
X	signal(SIGSEGV, sig);
X	p = realloc((char *)0, 10);
X	if (p == (char *)0)
X		exit(1);
X	exit(0);
X}],
X                [ac_cv_realloc_null=yes],
X                [ac_cv_realloc_null=no])])
Xif test $ac_cv_realloc_null = yes; then
X  AC_DEFINE(HAVE_REALLOC_NULL)
Xfi])
X
X
Xdnl XXXXXXXXXXXXXXXXXX Begin Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXX
Xdnl Changes:
X
Xdnl One line has been changed to:    [ac_save_CC="${CC-cc}" to default to "'cc"
X
Xdnl AC_SYS_LARGEFILE_MACRO_VALUE test moved from AC_FUNC_FSEEKO into AC_SYS_LARGEFILE
Xdnl Do not call AC_FUNC_FSEEKO because it does not check whether fseeko() is
Xdnl available on non Large File mode. There are additionoal tests for fseeko()/ftello()
Xdnl inside the AC_HAVE_LARGEFILES test.
X
Xdnl largefile_cc_opt definition added
X
X#serial 18
X
Xdnl By default, many hosts won't let programs access large files;
Xdnl one must use special compiler options to get large-file access to work.
Xdnl For more details about this brain damage please see:
Xdnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
X
Xdnl Written by Paul Eggert <eggert@twinsun.com>.
X
Xdnl Internal subroutine of AC_SYS_LARGEFILE.
Xdnl AC_SYS_LARGEFILE_TEST_INCLUDES
XAC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES],
X  [[#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  ]])
X
Xdnl Internal subroutine of AC_SYS_LARGEFILE.
Xdnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY)
XAC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
X  [AC_CACHE_CHECK([for $1 value needed for large files], $3,
X     [$3=no
X      AC_TRY_COMPILE([$5],
X	[$6], 
X	,
X	[AC_TRY_COMPILE([#define $1 $2]
X[$5]
X	   ,
X	   [$6],
X	   [$3=$2])])])
X   if test "[$]$3" != no; then
X     AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
X   fi])
X
XAC_DEFUN([AC_SYS_LARGEFILE],
X  [AC_ARG_ENABLE(largefile,
X     [  --disable-largefile     omit support for large files])
X   if test "$enable_largefile" != no; then
X
X     AC_CACHE_CHECK([for special C compiler options needed for large files],
X       ac_cv_sys_largefile_CC,
X       [ac_cv_sys_largefile_CC=no
X        largefile_cc_opt=""
X        if test "$GCC" != yes; then
X	  # IRIX 6.2 and later do not support large files by default,
X	  # so use the C compiler's -n32 option if that helps.
X	  AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
X	    [ac_save_CC="${CC-cc}"
X	     CC="$CC -n32"
X	     AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
X	       ac_cv_sys_largefile_CC=' -n32')
X	     CC="$ac_save_CC"])
X        fi])
X     if test "$ac_cv_sys_largefile_CC" != no; then
X       CC="$CC$ac_cv_sys_largefile_CC"
X       largefile_cc_opt="$ac_cv_sys_largefile_CC"
X     fi
X
X     AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
X       ac_cv_sys_file_offset_bits,
X       [Number of bits in a file offset, on hosts where this is settable.],
X       AC_SYS_LARGEFILE_TEST_INCLUDES)
X     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
X       ac_cv_sys_large_files,
X       [Define for large files, on AIX-style hosts.],
X       AC_SYS_LARGEFILE_TEST_INCLUDES)
X     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
X       ac_cv_sys_largefile_source,
X       [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
X       [#include <stdio.h>], [return !fseeko;])
X   fi
X  ])
X
X
XAC_DEFUN([AC_FUNC_FSEEKO],
X  [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
X     ac_cv_sys_largefile_source,
X     [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
X     [#include <stdio.h>], [return !fseeko;])
X   # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
X   # in glibc 2.1.3, but that breaks too many other things.
X   # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
X
X   AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
X     [ac_cv_func_fseeko=no
X      AC_TRY_LINK([#include <stdio.h>],
X        [return fseeko && fseeko (stdin, 0, 0);],
X	[ac_cv_func_fseeko=yes])])
X   if test $ac_cv_func_fseeko != no; then
X     AC_DEFINE(HAVE_FSEEKO, 1,
X       [Define if fseeko (and presumably ftello) exists and is declared.])
X   fi])
X
X
Xdnl XXXXXXXXXXXXXXXXXX End Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X
XAC_DEFUN([AC_HAVE_LARGEFILES],
X[AC_CACHE_CHECK([if system supports Large Files at all], ac_cv_largefiles,
X     	[AC_TRY_COMPILE([#include <stdio.h>
X#include <sys/types.h>],
X     		[
X/*
X * Check that off_t can represent 2**63 - 1 correctly.
X * We can't simply "#define LARGE_OFF_T 9223372036854775807",
X * since some C++ compilers masquerading as C compilers
X * incorrectly reject 9223372036854775807.
X */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
Xreturn !fseeko;
Xreturn !ftello;],
X     		[ac_cv_largefiles=yes],
X     		[ac_cv_largefiles=no])])
X	if test $ac_cv_largefiles = yes; then
X		AC_DEFINE(HAVE_LARGEFILES)
X	fi])
X
Xdnl Checks for whether fseeko() is available in non large file mode
Xdnl and whether there is a prototype for fseeko()
Xdnl Defines HAVE_FSEEKO on success.
XAC_DEFUN([AC_SMALL_FSEEKO],
X[AC_CACHE_CHECK([for fseeko()], ac_cv_func_fseeko,
X                [AC_TRY_LINK([#include <stdio.h>],
X[return !fseeko;],
X                [ac_cv_func_fseeko=yes],
X                [ac_cv_func_fseeko=no])])
Xif test $ac_cv_func_fseeko = yes; then
X  AC_DEFINE(HAVE_FSEEKO)
Xfi])
X
Xdnl Checks for whether ftello() is available in non large file mode
Xdnl and whether there is a prototype for ftello()
Xdnl Defines HAVE_FTELLO on success.
XAC_DEFUN([AC_SMALL_FTELLO],
X[AC_CACHE_CHECK([for ftello()], ac_cv_func_ftello,
X                [AC_TRY_LINK([#include <stdio.h>],
X[return !ftello;],
X                [ac_cv_func_ftello=yes],
X                [ac_cv_func_ftello=no])])
Xif test $ac_cv_func_ftello = yes; then
X  AC_DEFINE(HAVE_FTELLO)
Xfi])
X
Xdnl Checks if compiler allows dynamic arrays.
Xdnl Defines HAVE_DYN_ARRAYS on success.
XAC_DEFUN([AC_DYN_ARRAYS],
X[AC_CACHE_CHECK([if compiler allows dynamic arrays], ac_cv_dyn_arrays,
X                [AC_TRY_COMPILE([],
X                                [extern int __aa(); int len = __aa(); char some_array[len];],
X                                [ac_cv_dyn_arrays=yes],
X                                [ac_cv_dyn_arrays=no])])
Xif test $ac_cv_dyn_arrays = yes; then
X  AC_DEFINE(HAVE_DYN_ARRAYS)
Xfi])
X
Xdnl Checks if the compiler allows #pragma weak
Xdnl Defines HAVE_PRAGMA_WEAK on success.
XAC_DEFUN([AC_PRAGMA_WEAK],
X[AC_CACHE_CHECK([if compiler allows pragma weak], ac_cv_pragma_weak,
X                [AC_TRY_LINK([#pragma weak test2 = test1
Xint test1() {return 0;}],
X[return test2();],
X                [ac_cv_pragma_weak=yes],
X                [ac_cv_pragma_weak=no])])
Xif test $ac_cv_pragma_weak = yes; then
X  AC_DEFINE(HAVE_PRAGMA_WEAK)
Xfi])
X
Xdnl Checks if Linux include file linux/ext2_fs.h is broken
Xdnl Defines HAVE_BROKEN_LINUX_EXT2_FS_H on success.
XAC_DEFUN([AC_BROKEN_LINUX_EXT2_FS_H],
X[AC_CACHE_CHECK([if Linux include file linux/ext2_fs.h is broken], ac_cv_broken_linux_ext2_fs_h,
X                [AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif],
X                                [],
X                                [ac_cv_broken_linux_ext2_fs_h=no],
X                                [ac_cv_broken_linux_ext2_fs_h=yes])])
Xif test $ac_cv_broken_linux_ext2_fs_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_LINUX_EXT2_FS_H)
Xfi])
X
Xdnl Checks if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken
Xdnl Defines HAVE_BROKEN_SRC_LINUX_EXT2_FS_H on success.
XAC_DEFUN([AC_BROKEN_SRC_LINUX_EXT2_FS_H],
X[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken], ac_cv_broken_src_linux_ext2_fs_h,
X                [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X		AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif],
X                                [],
X                                [ac_cv_broken_src_linux_ext2_fs_h=no],
X                                [ac_cv_broken_src_linux_ext2_fs_h=yes])])
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_linux_ext2_fs_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SRC_LINUX_EXT2_FS_H)
Xfi])
X
Xdnl Checks if Linux include file scsi/scsi.h is broken
Xdnl Defines HAVE_BROKEN_SCSI_SCSI_H on success.
XAC_DEFUN([AC_BROKEN_SCSI_SCSI_H],
X[AC_CACHE_CHECK([if Linux include file scsi/scsi.h is broken], ac_cv_broken_scsi_scsi_h,
X                [AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif],
X                                [],
X                                [ac_cv_broken_scsi_scsi_h=no],
X                                [ac_cv_broken_scsi_scsi_h=yes])])
Xif test $ac_cv_broken_scsi_scsi_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SCSI_SCSI_H)
Xfi])
X
Xdnl Checks if Linux include file /usr/src/linux/include/scsi/scsi.h is broken
Xdnl Defines HAVE_BROKEN_SRC_SCSI_SCSI_H on success.
XAC_DEFUN([AC_BROKEN_SRC_SCSI_SCSI_H],
X[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/scsi.h is broken], ac_cv_broken_src_scsi_scsi_h,
X                [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif],
X                                [],
X                                [ac_cv_broken_src_scsi_scsi_h=no],
X                                [ac_cv_broken_src_scsi_scsi_h=yes])])
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_scsi_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SCSI_H)
Xfi])
X
Xdnl Checks if Linux include file scsi/sg.h is broken
Xdnl Defines HAVE_BROKEN_SCSI_SG_H on success.
XAC_DEFUN([AC_BROKEN_SCSI_SG_H],
X[AC_CACHE_CHECK([if Linux include file scsi/sg.h is broken], ac_cv_broken_scsi_sg_h,
X                [AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif],
X                                [],
X                                [ac_cv_broken_scsi_sg_h=no],
X                                [ac_cv_broken_scsi_sg_h=yes])])
Xif test $ac_cv_broken_scsi_sg_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SCSI_SG_H)
Xfi])
X
Xdnl Checks if Linux include file /usr/src/linux/include/scsi/sg.h is broken
Xdnl Defines HAVE_BROKEN_SRC_SCSI_SG_H on success.
XAC_DEFUN([AC_BROKEN_SRC_SCSI_SG_H],
X[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/sg.h is broken], ac_cv_broken_src_scsi_sg_h,
X                [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                AC_TRY_COMPILE([
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif],
X                                [],
X                                [ac_cv_broken_src_scsi_sg_h=no],
X                                [ac_cv_broken_src_scsi_sg_h=yes])])
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_sg_h = yes; then
X  AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SG_H)
Xfi])
X
XAC_DEFUN(AC_PROG_SHELL_BROKEN_E,
X[AC_CACHE_CHECK(whether handling of /bin/sh -ce 'command' is broken, ac_cv_prog_shell_broken_e,
X[if AC_TRY_COMMAND(/bin/sh -ce 'if false; true; then echo yes; else echo no; fi') | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_shell_broken_e=no
Xelse
X  ac_cv_prog_shell_broken_e=yes
Xfi
Xif test $ac_cv_prog_shell_broken_e = yes; then
X  AC_DEFINE(HAVE_PROG_SHELL_BROKEN_E)
Xfi])])
END-of-star-1.5.2/autoconf/aclocal.m4
echo x - star-1.5.2/autoconf/acoldnames.m4
sed 's/^X//' >star-1.5.2/autoconf/acoldnames.m4 << 'END-of-star-1.5.2/autoconf/acoldnames.m4'
Xdnl @(#)acoldnames.m4	1.3 08/08/01 Copyright 1998-2008 J. Schilling
Xdnl
Xdnl Map old names of Autoconf macros to new regularized names.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1994 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl General macros.
Xdnl
Xdefine(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl
Xdefine(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl
XAC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl
XAC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl
XAC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl
XAC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl
XAC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl
XAC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl
XAC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl
XAC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl
XAC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl
XAC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl
XAC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl
XAC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl
XAC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl
XAC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl
Xdnl
Xdnl Specific macros.
Xdnl
XAC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl
XAC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl
XAC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl
XAC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl
XAC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl
XAC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl
XAC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl
XAC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl
XAC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl
XAC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl
XAC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl
XAC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl
XAC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl
XAC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl
XAC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl
XAC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl
XAC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl
XAC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl
XAC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl
XAC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl
XAC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl
XAC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl
XAC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl
XAC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl
XAC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl
XAC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl
XAC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TM_ZONE])])dnl
XAC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl
XAC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl
XAC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl
XAC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl
XAC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl
XAC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl
XAC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl
XAC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl
XAC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl
XAC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl
XAC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl
XAC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl
XAC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl
END-of-star-1.5.2/autoconf/acoldnames.m4
echo x - star-1.5.2/autoconf/acspecific.m4
sed 's/^X//' >star-1.5.2/autoconf/acspecific.m4 << 'END-of-star-1.5.2/autoconf/acspecific.m4'
Xdnl @(#)acspecific.m4	1.16 12/04/09 Copyright 1998-2011 J. Schilling
Xdnl
Xdnl Macros that test for specific features.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl As a special exception, the Free Software Foundation gives unlimited
Xdnl permission to copy, distribute and modify the configure scripts that
Xdnl are the output of Autoconf.  You need not follow the terms of the GNU
Xdnl General Public License when using or distributing such scripts, even
Xdnl though portions of the text of Autoconf appear in them.  The GNU
Xdnl General Public License (GPL) does govern all other use of the material
Xdnl that constitutes the Autoconf program.
Xdnl
Xdnl Certain portions of the Autoconf source text are designed to be copied
Xdnl (in certain cases, depending on the input) into the output of
Xdnl Autoconf.  We call these the "data" portions.  The rest of the Autoconf
Xdnl source text consists of comments plus executable code that decides which
Xdnl of the data portions to output in any given case.  We call these
Xdnl comments and executable code the "non-data" portions.  Autoconf never
Xdnl copies any of the non-data portions into its output.
Xdnl
Xdnl This special exception to the GPL applies to versions of Autoconf
Xdnl released by the Free Software Foundation.  When you make and
Xdnl distribute a modified version of Autoconf, you may extend this special
Xdnl exception to the GPL to apply to your modified version as well, *unless*
Xdnl your modified version has the potential to copy into its output some
Xdnl of the text that was the non-data portion of the version that you started
Xdnl with.  (In other words, unless your change moves or copies text from
Xdnl the non-data portions to the data portions.)  If your modification has
Xdnl such potential, you must delete any notice of this special exception
Xdnl to the GPL from your modified version.
Xdnl
Xdnl Written by David MacKenzie, with help from
Xdnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
Xdnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
X
X
Xdnl ### Checks for programs
X
X
Xdnl Check whether to use -n, \c, or newline-tab to separate
Xdnl checking messages from result messages.
Xdnl Idea borrowed from dist 3.0.
Xdnl Internal use only.
XAC_DEFUN(AC_PROG_ECHO_N,
X[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
X  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
X  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
X    ac_n= ac_c='
X' ac_t='	'
X  else
X    ac_n=-n ac_c= ac_t=
X  fi
Xelse
X  ac_n= ac_c='\c' ac_t=
Xfi
X])
X
XAC_DEFUN(AC_PROG_CC,
X[AC_BEFORE([$0], [AC_PROG_CPP])dnl
XAC_CHECK_PROG(CC, gcc, gcc)
Xif test -z "$CC"; then
X  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
X  if test -z "$CC"; then
X    case "`uname -s`" in
X    *win32* | *WIN32*)
X      AC_CHECK_PROG(CC, cl, cl) ;;
X    esac
X  fi
X  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
Xfi
X
XAC_PROG_CC_WORKS
XAC_PROG_CC_GNU
X
Xif test $ac_cv_prog_gcc = yes; then
X  GCC=yes
Xelse
X  GCC=
Xfi
X
Xdnl Check whether -g works, even if CFLAGS is set, in case the package
Xdnl plays around with CFLAGS (such as to build both debugging and
Xdnl normal versions of a library), tasteless as that idea is.
Xac_test_CFLAGS="${CFLAGS+set}"
Xac_save_CFLAGS="$CFLAGS"
XCFLAGS=
XAC_PROG_CC_G
Xif test "$ac_test_CFLAGS" = set; then
X  CFLAGS="$ac_save_CFLAGS"
Xelif test $ac_cv_prog_cc_g = yes; then
X  if test "$GCC" = yes; then
X    CFLAGS="-g -O2"
X  else
X    CFLAGS="-g"
X  fi
Xelse
X  if test "$GCC" = yes; then
X    CFLAGS="-O2"
X  else
X    CFLAGS=
X  fi
Xfi
X])
X
XAC_DEFUN(AC_PROG_CXX,
X[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
XAC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
X
XAC_PROG_CXX_WORKS
XAC_PROG_CXX_GNU
X
Xif test $ac_cv_prog_gxx = yes; then
X  GXX=yes
Xelse
X  GXX=
Xfi
X
Xdnl Check whether -g works, even if CXXFLAGS is set, in case the package
Xdnl plays around with CXXFLAGS (such as to build both debugging and
Xdnl normal versions of a library), tasteless as that idea is.
Xac_test_CXXFLAGS="${CXXFLAGS+set}"
Xac_save_CXXFLAGS="$CXXFLAGS"
XCXXFLAGS=
XAC_PROG_CXX_G
Xif test "$ac_test_CXXFLAGS" = set; then
X  CXXFLAGS="$ac_save_CXXFLAGS"
Xelif test $ac_cv_prog_cxx_g = yes; then
X  if test "$GXX" = yes; then
X    CXXFLAGS="-g -O2"
X  else
X    CXXFLAGS="-g"
X  fi
Xelse
X  if test "$GXX" = yes; then
X    CXXFLAGS="-O2"
X  else
X    CXXFLAGS=
X  fi
Xfi
X])
X
Xdnl Determine a Fortran 77 compiler to use.  If `F77' is not already set
Xdnl in the environment, check for `g77', `f77' and `f2c', in that order.
Xdnl Set the output variable `F77' to the name of the compiler found.
Xdnl 
Xdnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77'
Xdnl will set the shell variable `G77' to `yes', and empty otherwise.  If
Xdnl the output variable `FFLAGS' was not already set in the environment,
Xdnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not
Xdnl accept `-g').  Otherwise, set `FFLAGS' to `-g' for all other Fortran
Xdnl 77 compilers.
Xdnl 
Xdnl AC_PROG_F77()
XAC_DEFUN(AC_PROG_F77,
X[AC_BEFORE([$0], [AC_PROG_CPP])dnl
Xif test -z "$F77"; then
X  AC_CHECK_PROGS(F77, g77 f77 f2c)
X    test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH])
Xfi
X
XAC_PROG_F77_WORKS
XAC_PROG_F77_GNU
X
Xif test $ac_cv_prog_g77 = yes; then
X  G77=yes
Xdnl Check whether -g works, even if FFLAGS is set, in case the package
Xdnl plays around with FFLAGS (such as to build both debugging and
Xdnl normal versions of a library), tasteless as that idea is.
X  ac_test_FFLAGS="${FFLAGS+set}"
X  ac_save_FFLAGS="$FFLAGS"
X  FFLAGS=
X  AC_PROG_F77_G
X  if test "$ac_test_FFLAGS" = set; then
X    FFLAGS="$ac_save_FFLAGS"
X  elif test $ac_cv_prog_f77_g = yes; then
X    FFLAGS="-g -O2"
X  else
X    FFLAGS="-O2"
X  fi
Xelse
X  G77=
X  test "${FFLAGS+set}" = set || FFLAGS="-g"
Xfi
X])
X
XAC_DEFUN(AC_PROG_CC_WORKS,
X[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
XAC_LANG_SAVE
XAC_LANG_C
XAC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
XAC_LANG_RESTORE
XAC_MSG_RESULT($ac_cv_prog_cc_works)
Xif test $ac_cv_prog_cc_works = no; then
X  ccout=`eval "${CC-cc} 2>&1" 2> /dev/null`
X  ret=$?
X  nf=`echo "$ccout" | grep 'not found'`
X  if test $ret = 127 -a -n "$nf" ; then	# Korn Shell
X      ccout=""
X  fi
X  if test "$ret" -ne 0 -a ! -n "$ccout" ; then
X      AC_MSG_ERROR([installation or configuration problem: C compiler ${CC-cc} not found.])
X  fi
X  AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
Xfi
XAC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
XAC_MSG_RESULT($ac_cv_prog_cc_cross)
Xcross_compiling=$ac_cv_prog_cc_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X])
X
XAC_DEFUN(AC_PROG_CXX_WORKS,
X[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
XAC_LANG_SAVE
XAC_LANG_CPLUSPLUS
XAC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
XAC_LANG_RESTORE
XAC_MSG_RESULT($ac_cv_prog_cxx_works)
Xif test $ac_cv_prog_cxx_works = no; then
X  AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
Xfi
XAC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler])
XAC_MSG_RESULT($ac_cv_prog_cxx_cross)
Xcross_compiling=$ac_cv_prog_cxx_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X])
X
Xdnl Test whether the Fortran 77 compiler can compile and link a trivial
Xdnl Fortran program.  Also, test whether the Fortran 77 compiler is a
Xdnl cross-compiler (which may realistically be the case if the Fortran
Xdnl compiler is `g77').
Xdnl 
Xdnl AC_PROG_F77_WORKS()
XAC_DEFUN(AC_PROG_F77_WORKS,
X[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works])
XAC_LANG_SAVE
XAC_LANG_FORTRAN77
XAC_TRY_COMPILER(dnl
X[      program conftest
X      end
X], ac_cv_prog_f77_works, ac_cv_prog_f77_cross)
XAC_LANG_RESTORE
XAC_MSG_RESULT($ac_cv_prog_f77_works)
Xif test $ac_cv_prog_f77_works = no; then
X  AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.])
Xfi
XAC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler])
XAC_MSG_RESULT($ac_cv_prog_f77_cross)
Xcross_compiling=$ac_cv_prog_f77_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X])
X
Xdnl Checks whether $CONFIG_RMTCALL and $CONFIG_RMTHOST are both set up
Xdnl in our enviroment to avoid hidden failures in the tests.
Xdnl In case of calling programs on an emulator, set CONFIG_RMTHOST=none
XAC_DEFUN(AC_REMOTE_PARMS,[
Xif test "$cross_compiling" = remote -a ."$CONFIG_RMTCALL" = . ; then
X	echo 'CONFIG_RMTCALL=script-path required for remote execution' 1>&2
X	exit 1
Xfi
Xif test "$cross_compiling" = remote -a ."$CONFIG_RMTHOST" = . ; then
X	echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2
X	exit 1
Xfi
Xif test "$cross_compiling" = remote ; then
X	echo "Cross-Compiling with remote execution of test programs"
X	echo "Cross-Compile script: $CONFIG_RMTCALL"
X	echo "Cross-Compile host:   $CONFIG_RMTHOST"
Xfi
X])
X
X
XAC_DEFUN(AC_PROG_CC_GNU,
X[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
X[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
Xcat > conftest.c <<EOF
X#ifdef __GNUC__
X  yes;
X#endif
XEOF
Xif AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_gcc=yes
Xelse
X  ac_cv_prog_gcc=no
Xfi])])
X
XAC_DEFUN(AC_PROG_CXX_GNU,
X[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
X[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
Xcat > conftest.C <<EOF
X#ifdef __GNUC__
X  yes;
X#endif
XEOF
Xif AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_gxx=yes
Xelse
X  ac_cv_prog_gxx=no
Xfi])])
X
Xdnl Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77
Xdnl Compiler).  This test depends on whether the Fortran 77 compiler can
Xdnl do CPP pre-processing.
Xdnl 
Xdnl AC_PROG_F77_GNU()
XAC_DEFUN(AC_PROG_F77_GNU,
X[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
X[cat > conftest.fpp <<EOF
X#ifdef __GNUC__
X  yes
X#endif
XEOF
Xif AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_g77=yes
Xelse
X  ac_cv_prog_g77=no
Xfi])])
X
XAC_DEFUN(AC_PROG_CC_G,
X[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
X[echo 'void f(){}' > conftest.c
Xif test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
X  ac_cv_prog_cc_g=yes
Xelse
X  ac_cv_prog_cc_g=no
Xfi
Xrm -f conftest*
X])])
X
XAC_DEFUN(AC_PROG_CXX_G,
X[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
X[echo 'void f(){}' > conftest.cc
Xif test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
X  ac_cv_prog_cxx_g=yes
Xelse
X  ac_cv_prog_cxx_g=no
Xfi
Xrm -f conftest*
X])])
X
Xdnl Test whether the Fortran 77 compiler can accept the `-g' option to
Xdnl enable debugging.
Xdnl 
Xdnl AC_PROG_F77_G()
XAC_DEFUN(AC_PROG_F77_G,
X[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
X[cat > conftest.f << EOF
X       program conftest
X       end
XEOF
Xif test -z "`$F77 -g -c conftest.f 2>&1`"; then
X  ac_cv_prog_f77_g=yes
Xelse
X  ac_cv_prog_f77_g=no
Xfi
Xrm -f conftest*
X])])
X
XAC_DEFUN(AC_PROG_GCC_TRADITIONAL,
X[AC_REQUIRE([AC_PROG_CC])dnl
XAC_REQUIRE([AC_PROG_CPP])dnl
Xif test $ac_cv_prog_gcc = yes; then
X    AC_CACHE_CHECK(whether ${CC-cc} needs -traditional,
X      ac_cv_prog_gcc_traditional,
X[  ac_pattern="Autoconf.*'x'"
X  AC_EGREP_CPP($ac_pattern, [#include <sgtty.h>
XAutoconf TIOCGETP],
X  ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no)
X
X  if test $ac_cv_prog_gcc_traditional = no; then
X    AC_EGREP_CPP($ac_pattern, [#include <termio.h>
XAutoconf TCGETA],
X    ac_cv_prog_gcc_traditional=yes)
X  fi])
X  if test $ac_cv_prog_gcc_traditional = yes; then
X    CC="$CC -traditional"
X  fi
Xfi
X])
X
XAC_DEFUN(AC_PROG_CC_C_O,
X[if test "x$CC" != xcc; then
X  AC_MSG_CHECKING(whether $CC and cc understand -c and -o together)
Xelse
X  AC_MSG_CHECKING(whether cc understands -c and -o together)
Xfi
Xset dummy $CC; ac_cc="`echo [$]2 |
Xchangequote(, )dnl
X		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
Xchangequote([, ])dnl
XAC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
X[echo 'foo(){}' > conftest.c
X# Make sure it works both with $CC and with simple cc.
X# We do the test twice because some compilers refuse to overwrite an
X# existing .o file with -o, though they will create one.
Xac_try='${CC-cc} -c conftest.c -o conftest.o 1>&AC_FD_CC'
Xif AC_TRY_EVAL(ac_try) &&
X   test -f conftest.o && AC_TRY_EVAL(ac_try);
Xthen
X  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
X  if test "x$CC" != xcc; then
X    # Test first that cc exists at all.
X    if AC_TRY_COMMAND(cc -c conftest.c 1>&AC_FD_CC); then
X      ac_try='cc -c conftest.c -o conftest.o 1>&AC_FD_CC'
X      if AC_TRY_EVAL(ac_try) &&
X	 test -f conftest.o && AC_TRY_EVAL(ac_try);
X      then
X        # cc works too.
X        :
X      else
X        # cc exists but doesn't like -o.
X        eval ac_cv_prog_cc_${ac_cc}_c_o=no
X      fi
X    fi
X  fi
Xelse
X  eval ac_cv_prog_cc_${ac_cc}_c_o=no
Xfi
Xrm -f conftest*
X])dnl
Xif eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
X  AC_MSG_RESULT(yes)
Xelse
X  AC_MSG_RESULT(no)
X  AC_DEFINE(NO_MINUS_C_MINUS_O)
Xfi
X])
X
Xdnl Test if the Fortran 77 compiler accepts the options `-c' and `-o'
Xdnl simultaneously, and define `F77_NO_MINUS_C_MINUS_O' if it does not.
Xdnl
Xdnl The usefulness of this macro is questionable, as I can't really see
Xdnl why anyone would use it.  The only reason I include it is for
Xdnl completeness, since a similar test exists for the C compiler.
Xdnl 
Xdnl AC_PROG_F77_C_O
XAC_DEFUN(AC_PROG_F77_C_O,
X[AC_BEFORE([$0], [AC_PROG_F77])dnl
XAC_MSG_CHECKING(whether $F77 understand -c and -o together)
Xset dummy $F77; ac_f77="`echo [$]2 |
Xchangequote(, )dnl
Xsed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
Xchangequote([, ])dnl
XAC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
X[cat > conftest.f << EOF
X       program conftest
X       end
XEOF
X# We do the `AC_TRY_EVAL' test twice because some compilers refuse to
X# overwrite an existing `.o' file with `-o', although they will create
X# one.
Xac_try='$F77 $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC'
Xif AC_TRY_EVAL(ac_try) && test -f conftest.o && AC_TRY_EVAL(ac_try); then
X  eval ac_cv_prog_f77_${ac_f77}_c_o=yes
Xelse
X  eval ac_cv_prog_f77_${ac_f77}_c_o=no
Xfi
Xrm -f conftest*
X])dnl
Xif eval "test \"`echo '$ac_cv_prog_f77_'${ac_f77}_c_o`\" = yes"; then
X  AC_MSG_RESULT(yes)
Xelse
X  AC_MSG_RESULT(no)
X  AC_DEFINE(F77_NO_MINUS_C_MINUS_O)
Xfi
X])
X
Xdnl Define SET_MAKE to set ${MAKE} if make doesn't.
XAC_DEFUN(AC_PROG_MAKE_SET,
X[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
Xset dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'`
XAC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
X[cat > conftestmake <<\EOF
Xall:
X	@echo 'ac_maketemp="${MAKE}"'
XEOF
Xchangequote(, )dnl
X# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Xeval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
Xchangequote([, ])dnl
Xif test -n "$ac_maketemp"; then
X  eval ac_cv_prog_make_${ac_make}_set=yes
Xelse
X  eval ac_cv_prog_make_${ac_make}_set=no
Xfi
Xrm -f conftestmake])dnl
Xif eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  SET_MAKE=
Xelse
X  AC_MSG_RESULT(no)
X  SET_MAKE="MAKE=${MAKE-make}"
Xfi
XAC_SUBST([SET_MAKE])dnl
X])
X
XAC_DEFUN(AC_PROG_RANLIB,
X[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])
X
Xdnl Check for mawk first since it's generally faster.
XAC_DEFUN(AC_PROG_AWK,
X[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
X
XAC_DEFUN(AC_PROG_YACC,
X[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])
X
XAC_DEFUN(AC_PROG_CPP,
X[AC_MSG_CHECKING(how to run the C preprocessor)
X# On Suns, sometimes $CPP names a directory.
Xif test -n "$CPP" && test -d "$CPP"; then
X  CPP=
Xfi
Xif test -z "$CPP"; then
XAC_CACHE_VAL(ac_cv_prog_CPP,
X[  # This must be in double quotes, not single quotes, because CPP may get
X  # substituted into the Makefile and "${CC-cc}" will confuse make.
X  CPP="${CC-cc} -E"
X  # On the NeXT, cc -E runs the code through the compiler's parser,
X  # not just through cpp.
Xdnl Use a header file that comes with gcc, so configuring glibc
Xdnl with a fresh cross-compiler works.
X  AC_TRY_CPP([#include <assert.h>
XSyntax Error], ,
X  CPP="${CC-cc} -E -traditional-cpp"
X  AC_TRY_CPP([#include <assert.h>
XSyntax Error], ,
X  CPP="${CC-cc} -nologo -E"
X  AC_TRY_CPP([#include <assert.h>
XSyntax Error], , CPP=/lib/cpp)))
X  ac_cv_prog_CPP="$CPP"])dnl
X  CPP="$ac_cv_prog_CPP"
Xelse
X  ac_cv_prog_CPP="$CPP"
Xfi
XAC_MSG_RESULT($CPP)
XAC_SUBST(CPP)dnl
X])
X
XAC_DEFUN(AC_PROG_CXXCPP,
X[AC_MSG_CHECKING(how to run the C++ preprocessor)
Xif test -z "$CXXCPP"; then
XAC_CACHE_VAL(ac_cv_prog_CXXCPP,
X[AC_LANG_SAVE[]dnl
XAC_LANG_CPLUSPLUS[]dnl
X  CXXCPP="${CXX-g++} -E"
X  AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
X  ac_cv_prog_CXXCPP="$CXXCPP"
XAC_LANG_RESTORE[]dnl
Xfi])dnl
XCXXCPP="$ac_cv_prog_CXXCPP"
XAC_MSG_RESULT($CXXCPP)
XAC_SUBST(CXXCPP)dnl
X])
X
Xdnl Require finding the C or C++ preprocessor, whichever is the
Xdnl current language.
XAC_DEFUN(AC_REQUIRE_CPP,
X[ifelse(AC_LANG, C, [AC_REQUIRE([AC_PROG_CPP])], [AC_REQUIRE([AC_PROG_CXXCPP])])])
X
XAC_DEFUN(AC_PROG_LEX,
X[AC_CHECK_PROG(LEX, flex, flex, lex)
Xif test -z "$LEXLIB"
Xthen
X  case "$LEX" in
X  flex*) ac_lib=fl ;;
X  *) ac_lib=l ;;
X  esac
X  AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib")
Xfi
XAC_SUBST(LEXLIB)])
X
Xdnl Check if lex declares yytext as a char * by default, not a char[].
Xundefine([AC_DECL_YYTEXT])
XAC_DEFUN(AC_DECL_YYTEXT,
X[AC_REQUIRE_CPP()dnl
XAC_REQUIRE([AC_PROG_LEX])dnl
XAC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root,
X[# The minimal lex program is just a single line: %%.  But some broken lexes
X# (Solaris, I think it was) want two %% lines, so accommodate them.
Xecho '%%
X%%' | $LEX
Xif test -f lex.yy.c; then
X  ac_cv_prog_lex_root=lex.yy
Xelif test -f lexyy.c; then
X  ac_cv_prog_lex_root=lexyy
Xelse
X  AC_MSG_ERROR(cannot find output from $LEX; giving up)
Xfi])
XLEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
XAC_SUBST(LEX_OUTPUT_ROOT)dnl
X
XAC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer,
X[# POSIX says lex can declare yytext either as a pointer or an array; the
X# default is implementation-dependent. Figure out which it is, since
X# not all implementations provide the %pointer and %array declarations.
Xac_cv_prog_lex_yytext_pointer=no
Xecho 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $LEXLIB"
XAC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes)
XLIBS="$ac_save_LIBS"
Xrm -f "${LEX_OUTPUT_ROOT}.c"
X])
Xdnl
Xif test $ac_cv_prog_lex_yytext_pointer = yes; then
X  AC_DEFINE(YYTEXT_POINTER)
Xfi
X])
X
XAC_DEFUN(AC_PROG_INSTALL,
X[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
X# Find a good install program.  We prefer a C program (faster),
X# so one script is as good as another.  But avoid the broken or
X# incompatible versions:
X# SysV /etc/install, /usr/sbin/install
X# SunOS /usr/etc/install
X# IRIX /sbin/install
X# AIX /bin/install
X# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
X# AFS /usr/afsws/bin/install, which mishandles nonexistent args
X# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
X# ./install, which can be erroneously created by make from ./install.sh.
XAC_MSG_CHECKING(for a BSD compatible install)
Xif test -z "$INSTALL"; then
XAC_CACHE_VAL(ac_cv_path_install,
X[  IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
X  for ac_dir in $PATH; do
X    # Account for people who put trailing slashes in PATH elements.
X    case "$ac_dir/" in
X    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
X    *)
X      # OSF1 and SCO ODT 3.0 have their own names for install.
X      # Don't use installbsd from OSF since it installs stuff as root
X      # by default.
X      for ac_prog in ginstall scoinst install; do
X        if test -f $ac_dir/$ac_prog; then
X	  if test $ac_prog = install &&
X            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
X	    # AIX install.  It has an incompatible calling convention.
X	    :
X	  else
X	    ac_cv_path_install="$ac_dir/$ac_prog -c"
X	    break 2
X	  fi
X	fi
X      done
X      ;;
X    esac
X  done
X  IFS="$ac_save_IFS"
X])dnl
X  if test "${ac_cv_path_install+set}" = set; then
X    INSTALL="$ac_cv_path_install"
X  else
X    # As a last resort, use the slow shell script.  We don't cache a
X    # path for INSTALL within a source directory, because that will
X    # break other packages using the cache if that directory is
X    # removed, or if the path is relative.
X    INSTALL="$ac_install_sh"
X  fi
Xfi
Xdnl We do special magic for INSTALL instead of AC_SUBST, to get
Xdnl relative paths right.
XAC_MSG_RESULT($INSTALL)
X
X# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
X# It thinks the first close brace ends the variable substitution.
Xtest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
XAC_SUBST(INSTALL_PROGRAM)dnl
X
Xtest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
XAC_SUBST(INSTALL_SCRIPT)dnl
X
Xtest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
XAC_SUBST(INSTALL_DATA)dnl
X])
X
XAC_DEFUN(AC_PROG_LN_S,
X[AC_MSG_CHECKING(whether ln -s works)
XAC_CACHE_VAL(ac_cv_prog_LN_S,
X[rm -f conftestdata
Xif ln -s X conftestdata 2>/dev/null
Xthen
X  rm -f conftestdata
X  ac_cv_prog_LN_S="ln -s"
Xelse
X  ac_cv_prog_LN_S=ln
Xfi])dnl
XLN_S="$ac_cv_prog_LN_S"
Xif test "$ac_cv_prog_LN_S" = "ln -s"; then
X  AC_MSG_RESULT(yes)
Xelse
X  AC_MSG_RESULT(no)
Xfi
XAC_SUBST(LN_S)dnl
X])
X
Xdefine(AC_RSH,
X[errprint(__file__:__line__: [$0] has been removed; replace it with equivalent code
X)m4exit(4)])
X
X
Xdnl ### Checks for header files
X
X
XAC_DEFUN(AC_HEADER_STDC,
X[AC_REQUIRE_CPP()dnl
XAC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc,
X[AC_TRY_CPP([#include <stdlib.h>
X#include <stdarg.h>
X#include <string.h>
X#include <float.h>], ac_cv_header_stdc=yes, ac_cv_header_stdc=no)
X
Xif test $ac_cv_header_stdc = yes; then
X  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
XAC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no)
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
XAC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no)
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
XAC_TRY_RUN([#include <ctype.h>
X#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
X#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
X#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Xint main () { int i; for (i = 0; i < 256; i++)
Xif (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
Xexit (0); }
X], , ac_cv_header_stdc=no, :)
Xfi])
Xif test $ac_cv_header_stdc = yes; then
X  AC_DEFINE(STDC_HEADERS)
X  AC_DEFINE(HAVE_STDARG_H)
X  AC_DEFINE(HAVE_STDLIB_H)
X  AC_DEFINE(HAVE_STRING_H)
X  AC_DEFINE(HAVE_FLOAT_H)
Xfi
X])
X
XAC_DEFUN(AC_UNISTD_H,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])dnl
XAC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))])
X
XAC_DEFUN(AC_USG,
X[AC_OBSOLETE([$0],
X  [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl
XAC_MSG_CHECKING([for BSD string and memory functions])
XAC_TRY_LINK([#include <strings.h>], [rindex(0, 0); bzero(0, 0);],
X  [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); AC_DEFINE(USG)])])
X
X
Xdnl If memchr and the like aren't declared in <string.h>, include <memory.h>.
Xdnl To avoid problems, don't check for gcc2 built-ins.
XAC_DEFUN(AC_MEMORY_H,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])dnl
XAC_MSG_CHECKING(whether string.h declares mem functions)
XAC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no)
XAC_MSG_RESULT($ac_found)
Xif test $ac_found = no; then
X  AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)])
Xfi
X])
X
XAC_DEFUN(AC_HEADER_MAJOR,
X[AC_CACHE_CHECK(whether sys/types.h defines makedev,
X  ac_cv_header_sys_types_h_makedev,
X[AC_TRY_LINK([#include <sys/types.h>], [return makedev(0, 0);],
X  ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no)
X])
X
Xif test $ac_cv_header_sys_types_h_makedev = no; then
XAC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV)])
X
X  if test $ac_cv_header_sys_mkdev_h = no; then
XAC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS)])
X  fi
Xfi
X])
X
XAC_DEFUN(AC_HEADER_DIRENT,
X[ac_header_dirent=no
XAC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h,
X  [ac_header_dirent=$ac_hdr; break])
X# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
Xif test $ac_header_dirent = dirent.h; then
XAC_CHECK_LIB(c, opendir, :,
X  [AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")])
Xelse
XAC_CHECK_LIB(c, opendir, :,
X  [AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")])
Xfi
X])
X
Xdnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
Xdnl defines the type `DIR'.  dirent.h on NextStep 3.2 doesn't.
Xdnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND)
XAC_DEFUN(AC_CHECK_HEADER_DIRENT,
X[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
XAC_MSG_CHECKING([for $1 that defines DIR])
XAC_CACHE_VAL(ac_cv_header_dirent_$ac_safe,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <$1>], [DIR *dirp = 0;],
X  eval "ac_cv_header_dirent_$ac_safe=yes",
X  eval "ac_cv_header_dirent_$ac_safe=no")])dnl
Xif eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
X  AC_MSG_RESULT(yes)
X  $2
Xelse
X  AC_MSG_RESULT(no)
Xfi
X])
X
Xdnl Like AC_CHECK_HEADERS, except succeed only for a HEADER-FILE that
Xdnl defines `DIR'.
Xdnl AC_CHECK_HEADERS_DIRENT(HEADER-FILE... [, ACTION])
Xdefine(AC_CHECK_HEADERS_DIRENT,
X[for ac_hdr in $1
Xdo
XAC_CHECK_HEADER_DIRENT($ac_hdr,
X[changequote(, )dnl
X  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xchangequote([, ])dnl
X  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl
Xdone])
X
XAC_DEFUN(AC_DIR_HEADER,
X[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
Xac_header_dirent=no
Xfor ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
X  AC_CHECK_HEADER_DIRENT($ac_hdr, [ac_header_dirent=$ac_hdr; break])
Xdone
X
Xcase "$ac_header_dirent" in
Xdirent.h) AC_DEFINE(DIRENT) ;;
Xsys/ndir.h) AC_DEFINE(SYSNDIR) ;;
Xsys/dir.h) AC_DEFINE(SYSDIR) ;;
Xndir.h) AC_DEFINE(NDIR) ;;
Xesac
X
XAC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
X[AC_TRY_RUN([#include <sys/types.h>
X#include <$ac_header_dirent>
Xint closedir(); main() { exit(closedir(opendir(".")) != 0); }],
X  ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
Xif test $ac_cv_func_closedir_void = yes; then
X  AC_DEFINE(VOID_CLOSEDIR)
Xfi
X])
X
XAC_DEFUN(AC_HEADER_STAT,
X[AC_CACHE_CHECK(whether stat file-mode macros are broken,
X  ac_cv_header_stat_broken,
X[AC_EGREP_CPP([You lose], [#include <sys/types.h>
X#include <sys/stat.h>
X
X#if defined(S_ISBLK) && defined(S_IFDIR)
X# if S_ISBLK (S_IFDIR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISBLK) && defined(S_IFCHR)
X# if S_ISBLK (S_IFCHR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISLNK) && defined(S_IFREG)
X# if S_ISLNK (S_IFREG)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISSOCK) && defined(S_IFREG)
X# if S_ISSOCK (S_IFREG)
XYou lose.
X# endif
X#endif
X], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])
Xif test $ac_cv_header_stat_broken = yes; then
X  AC_DEFINE(STAT_MACROS_BROKEN)
Xfi
X])
X
XAC_DEFUN(AC_DECL_SYS_SIGLIST,
X[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h],
X  ac_cv_decl_sys_siglist,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <signal.h>
X/* NetBSD declares sys_siglist in unistd.h.  */
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif], [char *msg = *(sys_siglist + 1);],
X  ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])
Xif test $ac_cv_decl_sys_siglist = yes; then
X  AC_DEFINE(SYS_SIGLIST_DECLARED)
Xfi
X])
X
XAC_DEFUN(AC_HEADER_SYS_WAIT,
X[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible],
X  ac_cv_header_sys_wait_h,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/wait.h>
X#ifndef WEXITSTATUS
X#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
X#endif
X#ifndef WIFEXITED
X#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
X#endif], [int s;
Xwait (&s);
Xs = WIFEXITED (s) ? WEXITSTATUS (s) : 1;],
Xac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)])
Xif test $ac_cv_header_sys_wait_h = yes; then
X  AC_DEFINE(HAVE_SYS_WAIT_H)
Xfi
X])
X
X
Xdnl ### Checks for typedefs
X
X
XAC_DEFUN(AC_TYPE_GETGROUPS,
X[AC_REQUIRE([AC_TYPE_UID_T])dnl
XAC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups,
X[AC_TRY_RUN(
Xchangequote(<<, >>)dnl
X<<
X/* Thanks to Mike Rendell for this test.  */
X#include <sys/types.h>
X#define NGID 256
X#undef MAX
X#define MAX(x, y) ((x) > (y) ? (x) : (y))
Xmain()
X{
X  gid_t gidset[NGID];
X  int i, n;
X  union { gid_t gval; long lval; }  val;
X
X  val.lval = -1;
X  for (i = 0; i < NGID; i++)
X    gidset[i] = val.gval;
X  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
X                 gidset);
X  /* Exit non-zero if getgroups seems to require an array of ints.  This
X     happens when gid_t is short but getgroups modifies an array of ints.  */
X  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
X}
X>>,
Xchangequote([, ])dnl
X  ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int,
X  ac_cv_type_getgroups=cross)
Xif test $ac_cv_type_getgroups = cross; then
X  dnl When we can't run the test program (we are cross compiling), presume
X  dnl that <unistd.h> has either an accurate prototype for getgroups or none.
X  dnl Old systems without prototypes probably use int.
X  AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h,
X		  ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)
Xfi])
XAC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
X])
X
XAC_DEFUN(AC_TYPE_UID_T,
X[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t,
X[AC_EGREP_HEADER(uid_t, sys/types.h,
X  ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])
Xif test $ac_cv_type_uid_t = no; then
X  AC_DEFINE(uid_t, int)
X  AC_DEFINE(gid_t, int)
Xfi
X])
X
XAC_DEFUN(AC_TYPE_SIZE_T,
X[AC_CHECK_TYPE(size_t, unsigned)])
X
XAC_DEFUN(AC_TYPE_PID_T,
X[AC_CHECK_TYPE(pid_t, int)])
X
XAC_DEFUN(AC_TYPE_OFF_T,
X[AC_CHECK_TYPE(off_t, long)])
X
XAC_DEFUN(AC_TYPE_MODE_T,
X[AC_CHECK_TYPE(mode_t, int)])
X
Xdnl Note that identifiers starting with SIG are reserved by ANSI C.
XAC_DEFUN(AC_TYPE_SIGNAL,
X[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <signal.h>
X#ifdef signal
X#undef signal
X#endif
X#ifdef __cplusplus
Xextern "C" void (*signal (int, void (*)(int)))(int);
X#else
Xvoid (*signal ()) ();
X#endif
X],
X[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])
XAC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
X])
X
X
Xdnl ### Checks for functions
X
X
XAC_DEFUN(AC_FUNC_CLOSEDIR_VOID,
X[AC_REQUIRE([AC_HEADER_DIRENT])dnl
XAC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void,
X[AC_TRY_RUN([#include <sys/types.h>
X#include <$ac_header_dirent>
Xint closedir(); main() { exit(closedir(opendir(".")) != 0); }],
X  ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
Xif test $ac_cv_func_closedir_void = yes; then
X  AC_DEFINE(CLOSEDIR_VOID)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_FNMATCH,
X[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works,
X# Some versions of Solaris or SCO have a broken fnmatch function.
X# So we run a test program.  If we are cross-compiling, take no chance.
X# Thanks to John Oleynick and Franc,ois Pinard for this test.
X[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }],
Xac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
Xac_cv_func_fnmatch_works=no)])
Xif test $ac_cv_func_fnmatch_works = yes; then
X  AC_DEFINE(HAVE_FNMATCH)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_MMAP,
X[AC_CHECK_HEADERS(unistd.h)
XAC_CHECK_FUNCS(getpagesize)
XAC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
X[AC_TRY_RUN([
X/* Thanks to Mike Haertel and Jim Avera for this test.
X   Here is a matrix of mmap possibilities:
X	mmap private not fixed
X	mmap private fixed at somewhere currently unmapped
X	mmap private fixed at somewhere already mapped
X	mmap shared not fixed
X	mmap shared fixed at somewhere currently unmapped
X	mmap shared fixed at somewhere already mapped
X   For private mappings, we should verify that changes cannot be read()
X   back from the file, nor mmap's back from the file at a different
X   address.  (There have been systems where private was not correctly
X   implemented like the infamous i386 svr4.0, and systems where the
X   VM page cache was not coherent with the filesystem buffer cache
X   like early versions of FreeBSD and possibly contemporary NetBSD.)
X   For shared mappings, we should conversely verify that changes get
X   propogated back to all the places they're supposed to be.
X
X   Grep wants private fixed already mapped.
X   The main things grep needs to know about mmap are:
X   * does it exist and is it safe to write into the mmap'd area
X   * how to use it (BSD variants)  */
X#include <sys/types.h>
X#include <fcntl.h>
X#include <sys/mman.h>
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xint
Xmain()
X{
X	char *data, *data2, *data3;
X	int i, pagesize;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X	data2 = malloc(2 * pagesize);
X	if (!data2)
X		exit(1);
X	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
X	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
X	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	/*
X	 * Finally, make sure that changes to the mapped area
X	 * do not percolate back to the file as seen by read().
X	 * (This is a bug on some variants of i386 svr4.0.)
X	 */
X	for (i = 0; i < pagesize; ++i)
X		*(data2 + i) = *(data2 + i) + 1;
X	data3 = malloc(pagesize);
X	if (!data3)
X		exit(1);
X	if (read(fd, data3, pagesize) != pagesize)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data3 + i))
X			exit(1);
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no,
Xac_cv_func_mmap_fixed_mapped=no)])
Xif test $ac_cv_func_mmap_fixed_mapped = yes; then
X  AC_DEFINE(HAVE_MMAP)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_GETPGRP,
X[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void,
X[AC_TRY_RUN([
X/*
X * If this system has a BSD-style getpgrp(),
X * which takes a pid argument, exit unsuccessfully.
X *
X * Snarfed from Chet Ramey's bash pgrp.c test program
X */
X#include <stdio.h>
X#include <sys/types.h>
X
Xint     pid;
Xint     pg1, pg2, pg3, pg4;
Xint     ng, np, s, child;
X
Xmain()
X{
X        pid = getpid();
X        pg1 = getpgrp(0);
X        pg2 = getpgrp();
X        pg3 = getpgrp(pid);
X        pg4 = getpgrp(1);
X
X        /*
X         * If all of these values are the same, it's pretty sure that
X         * we're on a system that ignores getpgrp's first argument.
X         */
X        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
X                exit(0);
X
X        child = fork();
X        if (child < 0)
X                exit(1);
X        else if (child == 0) {
X                np = getpid();
X                /*
X                 * If this is Sys V, this will not work; pgrp will be
X                 * set to np because setpgrp just changes a pgrp to be
X                 * the same as the pid.
X                 */
X                setpgrp(np, pg1);
X                ng = getpgrp(0);        /* Same result for Sys V and BSD */
X                if (ng == pg1) {
X                        exit(1);
X                } else {
X                        exit(0);
X                }
X        } else {
X                wait(&s);
X                exit(s>>8);
X        }
X}
X], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
X   AC_MSG_ERROR(cannot check getpgrp if cross compiling))
X])
Xif test $ac_cv_func_getpgrp_void = yes; then
X  AC_DEFINE(GETPGRP_VOID)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_SETPGRP,
X[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void,
XAC_TRY_RUN([
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X
X/*
X * If this system has a BSD-style setpgrp, which takes arguments, exit
X * successfully.
X */
Xmain()
X{
X    if (setpgrp(1,1) == -1)
X	exit(0);
X    else
X	exit(1);
X}
X], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes,
X   AC_MSG_ERROR(cannot check setpgrp if cross compiling))
X)
Xif test $ac_cv_func_setpgrp_void = yes; then
X  AC_DEFINE(SETPGRP_VOID)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_VPRINTF,
X[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF))
Xif test "$ac_cv_func_vprintf" != yes; then
XAC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT))
Xfi
X])
X
XAC_DEFUN(AC_FUNC_VFORK,
X[AC_REQUIRE([AC_TYPE_PID_T])dnl
XAC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
XAC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
X[AC_TRY_RUN([/* Thanks to Paul Eggert for first version of this test.  */
X#include <stdio.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X#ifdef HAVE_VFORK_H
X#include <vfork.h>
X#endif
X#ifdef HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#if defined(HAVE_WAIT_H)
X#include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
X/* On some sparc systems, changes by the child to local and incoming
X   argument registers are propagated back to the parent.
X   The compiler is told about this with #include <vfork.h>,
X   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
X   Test for this by using a static variable whose address
X   is put into a register that is clobbered by the vfork.  */
X#ifndef	VMS
Xstatic int
X#ifdef __cplusplus
Xsparc_address_test (int arg)
X#else
Xsparc_address_test (arg) int arg;
X#endif
X{
X  static pid_t child;
X  if (!child) {
X    child = vfork ();
X    if (child < 0) {
X      perror ("vfork");
X      _exit(2);
X    }
X    if (!child) {
X      arg = getpid();
X      write(-1, "", 0);
X      _exit (arg);
X    }
X  }
X  return (0);
X}
X#endif
Xint exc = 0;
X
Xint
Xmain() {
X  pid_t parent = getpid ();
X  pid_t child;
X
X#ifndef	VMS
X  sparc_address_test(0);
X#endif
X
X  child = vfork ();
X
X  if (child == 0) {
X    /* Here is another test for sparc vfork register problems.
X       This test uses lots of local variables, at least
X       as many local variables as main has allocated so far
X       including compiler temporaries.  4 locals are enough for
X       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
X       A buggy compiler should reuse the register of parent
X       for one of the local variables, since it will think that
X       parent can't possibly be used any more in this routine.
X       Assigning to the local variable will thus munge parent
X       in the parent process.  */
X    pid_t
X      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
X      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
X    /* Convince the compiler that p..p7 are live; otherwise, it might
X       use the same hardware register for all 8 local variables.  */
X    if (p != p1 || p != p2 || p != p3 || p != p4
X	|| p != p5 || p != p6 || p != p7)
X      exc = 1;
X
X    /* On some systems (e.g. IRIX 3.3),
X       vfork doesn't separate parent from child file descriptors.
X       If the child closes a descriptor before it execs or exits,
X       this munges the parent's descriptor as well.
X       Test for this by closing stdout in the child.  */
X    if (exc == 0)
X	exc = close(fileno(stdout)) != 0;
X    /*
X     * VMS hangs if we do not call execl()
X     */
X#ifdef HAVE_EXECL
X    /*
X     * On VMS, things hang unless the child calls exec()
X     */
X    if (exc == 0)
X	execl("/bin/true", "true", (char *)0);
X    else
X	execl("/bin/false", "false", (char *)0);
X#endif
X    _exit(exc);
X  } else {
X    int status;
X    struct stat st;
X
X    while (wait(&status) != child)
X      ;
X    exit(
X	 /* Was there some problem with vforking?  */
X	 child < 0
X
X	 /* Did the child fail?  (This shouldn't happen.)  */
X	 || status
X
X	 /* Did the vfork/compiler bug occur?  */
X	 || parent != getpid()
X
X	 /* Did the file descriptor bug occur?  */
X	 || fstat(fileno(stdout), &st) != 0
X	 );
X  }
X}],
Xac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork)
Xac_cv_func_vfork_works=$ac_cv_func_vfork)])
Xif test $ac_cv_func_vfork_works = no; then
X  AC_DEFINE(vfork, fork)
Xelse
X  AC_DEFINE(HAVE_VFORK)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_WAIT3,
X[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
X[AC_TRY_RUN([#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/resource.h>
X#include <stdio.h>
X/* HP-UX has wait3 but does not fill in rusage at all.  */
Xmain() {
X  struct rusage r;
X  int i;
X  /* Use a field that we can force nonzero --
X     voluntary context switches.
X     For systems like NeXT and OSF/1 that don't set it,
X     also use the system CPU time.  And page faults (I/O) for Linux.  */
X  r.ru_nvcsw = 0;
X  r.ru_utime.tv_sec = 0;
X  r.ru_utime.tv_usec = 0;
X  r.ru_stime.tv_sec = 0;
X  r.ru_stime.tv_usec = 0;
X  r.ru_majflt = r.ru_minflt = 0;
X  switch (fork()) {
X  case 0: /* Child.  */
X    sleep(1); /* Give up the CPU.  */
X    for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */
X    _exit(0);
X  case -1: _exit(0); /* What can we do?  */
X  default: /* Parent.  */
X    wait3(&i, 0, &r);
X    sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
X    exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
X	 && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0
X	 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
X  }
X}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no,
Xac_cv_func_wait3_rusage=no)])
Xif test $ac_cv_func_wait3_rusage = yes; then
X  AC_DEFINE(HAVE_WAIT3)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_ALLOCA,
X[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
X# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
X# for constant arguments.  Useless!
XAC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
X[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
X  ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
Xif test $ac_cv_header_alloca_h = yes; then
X  AC_DEFINE(HAVE_ALLOCA_H)
Xfi
X
XAC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
X[AC_TRY_LINK([
X#ifdef __GNUC__
X# define alloca __builtin_alloca
X#else
X# ifdef _MSC_VER
X#  include <malloc.h>
X#  define alloca _alloca
X# else
X#  if HAVE_ALLOCA_H
X#   include <alloca.h>
X#  else
X#   ifdef _AIX
X #pragma alloca
X#   else
X#    ifndef alloca /* predefined by HP cc +Olibcalls */
Xchar *alloca ();
X#    endif
X#   endif
X#  endif
X# endif
X#endif
X], [char *p = (char *) alloca(1);],
X  ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
Xif test $ac_cv_func_alloca_works = yes; then
X  AC_DEFINE(HAVE_ALLOCA)
Xfi
X
Xif test $ac_cv_func_alloca_works = no; then
X  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
X  # that cause trouble.  Some versions do not even contain alloca or
X  # contain a buggy version.  If you still want to use their alloca,
X  # use ar to extract alloca.o from them instead of compiling alloca.c.
X  ALLOCA=alloca.${ac_objext}
X  AC_DEFINE(C_ALLOCA)
X
XAC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
X[AC_EGREP_CPP(webecray,
X[#if defined(CRAY) && ! defined(CRAY2)
Xwebecray
X#else
Xwenotbecray
X#endif
X], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
Xif test $ac_cv_os_cray = yes; then
Xfor ac_func in _getb67 GETB67 getb67; do
X  AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
X  break])
Xdone
Xfi
X
XAC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
X[AC_TRY_RUN([find_stack_direction ()
X{
X  static char *addr = 0;
X  auto char dummy;
X  if (addr == 0)
X    {
X      addr = &dummy;
X      return find_stack_direction ();
X    }
X  else
X    return (&dummy > addr) ? 1 : -1;
X}
Xmain ()
X{
X  exit (find_stack_direction() < 0);
X}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
X  ac_cv_c_stack_direction=0)])
XAC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
Xfi
XAC_SUBST(ALLOCA)dnl
X])
X
XAC_DEFUN(AC_FUNC_GETLOADAVG,
X[ac_have_func=no # yes means we've found a way to get the load average.
X
X# Some systems with -lutil have (and need) -lkvm as well, some do not.
X# On Solaris, -lkvm requires nlist from -lelf, so check that first
X# to get the right answer into the cache.
XAC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
XAC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
X# Check for the 4.4BSD definition of getloadavg.
XAC_CHECK_LIB(util, getloadavg,
X  [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
X
Xif test $ac_have_func = no; then
X  # There is a commonly available library for RS/6000 AIX.
X  # Since it is not a standard part of AIX, it might be installed locally.
X  ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS"
X  AC_CHECK_LIB(getloadavg, getloadavg,
X    LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS")
Xfi
X
X# Make sure it is really in the library, if we think we found it.
XAC_REPLACE_FUNCS(getloadavg)
X
Xif test $ac_cv_func_getloadavg = yes; then
X  AC_DEFINE(HAVE_GETLOADAVG)
X  ac_have_func=yes
Xelse
X  # Figure out what our getloadavg.c needs.
X  ac_have_func=no
X  AC_CHECK_HEADER(sys/dg_sys_info.h,
X  [ac_have_func=yes; AC_DEFINE(DGUX)
X  AC_CHECK_LIB(dgc, dg_sys_info)])
X
X  # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
X  # uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
X  # Irix 4.0.5F has the header but not the library.
X  if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
X    ac_have_func=yes; AC_DEFINE(SVR4)
X  fi
X
X  if test $ac_have_func = no; then
X    AC_CHECK_HEADER(inq_stats/cpustats.h,
X    [ac_have_func=yes; AC_DEFINE(UMAX)
X    AC_DEFINE(UMAX4_3)])
X  fi
X
X  if test $ac_have_func = no; then
X    AC_CHECK_HEADER(sys/cpustats.h,
X    [ac_have_func=yes; AC_DEFINE(UMAX)])
X  fi
X
X  if test $ac_have_func = no; then
X    AC_CHECK_HEADERS(mach/mach.h)
X  fi
X
X  AC_CHECK_HEADER(nlist.h,
X  [AC_DEFINE(NLIST_STRUCT)
X  AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
X  [AC_TRY_COMPILE([#include <nlist.h>],
X  [struct nlist n; n.n_un.n_name = 0;],
X  ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
X  if test $ac_cv_struct_nlist_n_un = yes; then
X    AC_DEFINE(NLIST_NAME_UNION)
X  fi
X  ])dnl
Xfi # Do not have getloadavg in system libraries.
X
X# Some definitions of getloadavg require that the program be installed setgid.
Xdnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory.
XAC_CACHE_CHECK(whether getloadavg requires setgid,
X  ac_cv_func_getloadavg_setgid,
X[AC_EGREP_CPP([Yowza Am I SETGID yet],
X[#include "$srcdir/getloadavg.c"
X#ifdef LDAV_PRIVILEGED
XYowza Am I SETGID yet
X#endif],
X  ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
Xif test $ac_cv_func_getloadavg_setgid = yes; then
X  NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
Xelse
X  NEED_SETGID=false
Xfi
XAC_SUBST(NEED_SETGID)dnl
X
Xif test $ac_cv_func_getloadavg_setgid = yes; then
X  AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
X[changequote(, )dnl
X  # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
X  ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
X  # If we got an error (system does not support symlinks), try without -L.
X  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
X  ac_cv_group_kmem=`echo $ac_ls_output \
X    | sed -ne 's/[ 	][ 	]*/ /g;
X	       s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/;
X	       / /s/.* //;p;'`
Xchangequote([, ])dnl
X])
X  KMEM_GROUP=$ac_cv_group_kmem
Xfi
XAC_SUBST(KMEM_GROUP)dnl
X])
X
XAC_DEFUN(AC_FUNC_UTIME_NULL,
X[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
X[rm -f conftestdata; > conftestdata
X# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
XAC_TRY_RUN([#include <sys/types.h>
X#include <sys/stat.h>
Xmain() {
Xstruct stat s, t;
Xexit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
X&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
X&& t.st_mtime - s.st_mtime < 120));
X}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no,
X  ac_cv_func_utime_null=no)
Xrm -f core core.* *.core])
Xif test $ac_cv_func_utime_null = yes; then
X  AC_DEFINE(HAVE_UTIME_NULL)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_STRCOLL,
X[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works,
X[AC_TRY_RUN([#include <string.h>
Xmain ()
X{
X  exit (strcoll ("abc", "def") >= 0 ||
X	strcoll ("ABC", "DEF") >= 0 ||
X	strcoll ("123", "456") >= 0);
X}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no,
Xac_cv_func_strcoll_works=no)])
Xif test $ac_cv_func_strcoll_works = yes; then
X  AC_DEFINE(HAVE_STRCOLL)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
X[AC_CACHE_CHECK(whether setvbuf arguments are reversed,
X  ac_cv_func_setvbuf_reversed,
X[AC_TRY_RUN([#include <stdio.h>
X/* If setvbuf has the reversed format, exit 0. */
Xmain () {
X  /* This call has the arguments reversed.
X     A reversed system may check and see that the address of main
X     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
X  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
X    exit(1);
X  putc('\r', stdout);
X  exit(0);			/* Non-reversed systems segv here.  */
X}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
Xrm -f core core.* *.core])
Xif test $ac_cv_func_setvbuf_reversed = yes; then
X  AC_DEFINE(SETVBUF_REVERSED)
Xfi
X])
X
XAC_DEFUN(AC_FUNC_GETMNTENT,
X[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
XAC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
X  [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
X    [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])])
XAC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
X
XAC_DEFUN(AC_FUNC_STRFTIME,
X[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)],
X[# strftime is in -lintl on SCO UNIX.
XAC_CHECK_LIB(intl, strftime, 
X[AC_DEFINE(HAVE_STRFTIME)
XLIBS="-lintl $LIBS"])])])
X
XAC_DEFUN(AC_FUNC_MEMCMP,
X[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
X[AC_TRY_RUN([
Xmain()
X{
X  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
X  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
X}
X], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no,
Xac_cv_func_memcmp_clean=no)])
Xtest $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
XAC_SUBST(LIBOBJS)dnl
X])
X
XAC_DEFUN(AC_FUNC_SELECT_ARGTYPES,
X[AC_MSG_CHECKING([types of arguments for select()])
X AC_CACHE_VAL(ac_cv_func_select_arg234,dnl
X [AC_CACHE_VAL(ac_cv_func_select_arg1,dnl
X  [AC_CACHE_VAL(ac_cv_func_select_arg5,dnl
X   [for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
X     for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
X      for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
X       AC_TRY_COMPILE(dnl
X[#ifdef HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef HAVE_SYS_TIME_H
X#include <sys/time.h>
X#endif
X#ifdef HAVE_SYS_SELECT_H
X#include <sys/select.h>
X#endif
X#ifdef HAVE_SYS_SOCKET_H
X#include <sys/socket.h>
X#endif
Xextern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl
X        [ac_not_found=no ; break 3],ac_not_found=yes)
X      done
X     done
X    done
X   ])dnl AC_CACHE_VAL
X  ])dnl AC_CACHE_VAL
X ])dnl AC_CACHE_VAL
X if test "$ac_not_found" = yes; then
X  ac_cv_func_select_arg1=int 
X  ac_cv_func_select_arg234='int *' 
X  ac_cv_func_select_arg5='struct timeval *'
X fi
X AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5])
X AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1)
X AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234))
X AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
X])
X
X
Xdnl ### Checks for structure members
X
X
XAC_DEFUN(AC_HEADER_TIME,
X[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included],
X  ac_cv_header_time,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/time.h>
X#include <time.h>],
X[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])
Xif test $ac_cv_header_time = yes; then
X  AC_DEFINE(TIME_WITH_SYS_TIME)
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_TM,
X[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h],
X  ac_cv_struct_tm,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <time.h>],
X[struct tm *tp; tp->tm_sec;],
X  ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])
Xif test $ac_cv_struct_tm = sys/time.h; then
X  AC_DEFINE(TM_IN_SYS_TIME)
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_TM_ZONE,
X[AC_REQUIRE([AC_STRUCT_TM])dnl
XAC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
X  ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
Xif test "$ac_cv_struct_tm_zone" = yes; then
X  AC_DEFINE(HAVE_TM_ZONE)
Xelse
X  AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
X[AC_TRY_LINK(
Xchangequote(<<, >>)dnl
X<<#include <time.h>
X#ifndef tzname /* For SGI.  */
Xextern char *tzname[]; /* RS6000 and others reject char **tzname.  */
X#endif>>,
Xchangequote([, ])dnl
X[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
X  if test $ac_cv_var_tzname = yes; then
X    AC_DEFINE(HAVE_TZNAME)
X  fi
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_ST_BLOCKS,
X[AC_CACHE_CHECK([for st_blocks in struct stat], ac_cv_struct_st_blocks,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>], [struct stat s; s.st_blocks;],
Xac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])
Xif test $ac_cv_struct_st_blocks = yes; then
X  AC_DEFINE(HAVE_ST_BLOCKS)
Xelse
X  LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Xfi
XAC_SUBST(LIBOBJS)dnl
X])
X
XAC_DEFUN(AC_STRUCT_ST_BLKSIZE,
X[AC_CACHE_CHECK([for st_blksize in struct stat], ac_cv_struct_st_blksize,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>], [struct stat s; s.st_blksize;],
Xac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])
Xif test $ac_cv_struct_st_blksize = yes; then
X  AC_DEFINE(HAVE_ST_BLKSIZE)
Xfi
X])
X
XAC_DEFUN(AC_STRUCT_ST_RDEV,
X[AC_CACHE_CHECK([for st_rdev in struct stat], ac_cv_struct_st_rdev,
X[AC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/stat.h>], [struct stat s; s.st_rdev;],
Xac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])
Xif test $ac_cv_struct_st_rdev = yes; then
X  AC_DEFINE(HAVE_ST_RDEV)
Xfi
X])
X
X
Xdnl ### Checks for compiler characteristics
X
X
XAC_DEFUN(AC_C_CROSS,
X[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])])
X
XAC_DEFUN(AC_C_CHAR_UNSIGNED,
X[AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned,
X[if test "$GCC" = yes; then
X  # GCC predefines this symbol on systems where it applies.
XAC_EGREP_CPP(yes,
X[#ifdef __CHAR_UNSIGNED__
X  yes
X#endif
X], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
Xelse
XAC_TRY_RUN(
X[/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
X#if !defined(__STDC__) || __STDC__ != 1
X#define volatile
X#endif
Xmain() {
X  volatile char c = 255; exit(c < 0);
X}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)
Xfi])
Xif test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
X  AC_DEFINE(__CHAR_UNSIGNED__)
Xfi
X])
X
XAC_DEFUN(AC_C_LONG_DOUBLE,
X[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
X[if test "$GCC" = yes; then
X  ac_cv_c_long_double=yes
Xelse
XAC_TRY_RUN([int main() {
X/* The Stardent Vistra knows sizeof(long double), but does not support it.  */
Xlong double foo = 0.0;
X/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
Xexit(sizeof(long double) < sizeof(double)); }],
Xac_cv_c_long_double=yes, ac_cv_c_long_double=no)
Xfi])
Xif test $ac_cv_c_long_double = yes; then
X  AC_DEFINE(HAVE_LONG_DOUBLE)
Xfi
X])
X
XAC_DEFUN(AC_INT_16_BITS,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl
XAC_MSG_CHECKING(whether int is 16 bits)
XAC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
X [AC_MSG_RESULT(yes)
X AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no))
X])
X
XAC_DEFUN(AC_LONG_64_BITS,
X[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl
XAC_MSG_CHECKING(whether long int is 64 bits)
XAC_TRY_RUN([main() { exit(sizeof(long int) != 8); }],
X [AC_MSG_RESULT(yes)
X AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no))
X])
X
XAC_DEFUN(AC_C_BIGENDIAN,
X[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
X[ac_cv_c_bigendian=unknown
X# See if sys/param.h defines the BYTE_ORDER macro.
XAC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/param.h>], [
X#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
X bogus endian macros
X#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
XAC_TRY_COMPILE([#include <sys/types.h>
X#include <sys/param.h>], [
X#if BYTE_ORDER != BIG_ENDIAN
X not big endian
X#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
Xif test $ac_cv_c_bigendian = unknown; then
XAC_TRY_RUN([main () {
X  /* Are we little or big endian?  From Harbison&Steele.  */
X  union
X  {
X    long l;
X    char c[sizeof (long)];
X  } u;
X  u.l = 1;
X  exit (u.c[sizeof (long) - 1] == 1);
X}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)
Xfi])
Xif test $ac_cv_c_bigendian = yes; then
X  AC_DEFINE(WORDS_BIGENDIAN)
Xfi
X])
X
Xdnl Do nothing if the compiler accepts the inline keyword.
Xdnl Otherwise define inline to __inline__ or __inline if one of those work,
Xdnl otherwise define inline to be empty.
XAC_DEFUN(AC_C_INLINE,
X[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
X[ac_cv_c_inline=no
Xfor ac_kw in inline __inline__ __inline; do
X  AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
Xdone
X])
Xcase "$ac_cv_c_inline" in
X  inline | yes)
X	AC_DEFINE(HAVE_INLINE)
X	;;
X  no)	AC_DEFINE(inline, )
X	;;
X  *)	AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline)
X	AC_DEFINE(HAVE_INLINE)
X	;;
Xesac
X])
X
XAC_DEFUN(AC_C_CONST,
X[dnl This message is consistent in form with the other checking messages,
Xdnl and with the result message.
XAC_CACHE_CHECK([for working const], ac_cv_c_const,
X[AC_TRY_COMPILE(,
Xchangequote(<<, >>)dnl
X<<
X/* Ultrix mips cc rejects this.  */
Xtypedef int charset[2]; const charset x;
X/* SunOS 4.1.1 cc rejects this.  */
Xchar const *const *ccp;
Xchar **p;
X/* NEC SVR4.0.2 mips cc rejects this.  */
Xstruct point {int x, y;};
Xstatic struct point const zero = {0,0};
X/* AIX XL C 1.02.0.0 rejects this.
X   It does not let you subtract one const X* pointer from another in an arm
X   of an if-expression whose if-part is not a constant expression */
Xconst char *g = "string";
Xccp = &g + (g ? g-g : 0);
X/* HPUX 7.0 cc rejects these. */
X++ccp;
Xp = (char**) ccp;
Xccp = (char const *const *) p;
X{ /* SCO 3.2v4 cc rejects this.  */
X  char *t;
X  char const *s = 0 ? (char *) 0 : (char const *) 0;
X
X  *t++ = 0;
X}
X{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
X  int x[] = {25, 17};
X  const int *foo = &x[0];
X  ++foo;
X}
X{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
X  typedef const int *iptr;
X  iptr p = 0;
X  ++p;
X}
X{ /* AIX XL C 1.02.0.0 rejects this saying
X     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
X  struct s { int j; const int *ap[3]; };
X  struct s *b; b->j = 5;
X}
X{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
X  const int foo = 10;
X}
X>>,
Xchangequote([, ])dnl
Xac_cv_c_const=yes, ac_cv_c_const=no)])
Xif test $ac_cv_c_const = no; then
X  AC_DEFINE(const, )
Xfi
X])
X
XAC_DEFUN(AC_C_STRINGIZE, [
XAC_REQUIRE([AC_PROG_CPP])
XAC_MSG_CHECKING([for preprocessor stringizing operator])
XAC_CACHE_VAL(ac_cv_c_stringize,
XAC_EGREP_CPP([#teststring],[
X#define x(y) #y
X
Xchar *s = x(teststring);
X], ac_cv_c_stringize=no, ac_cv_c_stringize=yes))
Xif test "${ac_cv_c_stringize}" = yes
Xthen
X        AC_DEFINE(HAVE_STRINGIZE)
Xfi
XAC_MSG_RESULT([${ac_cv_c_stringize}])
X])dnl
X
Xdefine(AC_ARG_ARRAY,
X[errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments
X)m4exit(4)])
X
Xdnl Check the object extension used by the compiler: typically .o or
Xdnl .obj.  If this is called, some other behaviour will change,
Xdnl determined by ac_objext.
XAC_DEFUN(AC_OBJEXT,
X[AC_MSG_CHECKING([for object suffix])
XAC_CACHE_VAL(ac_cv_objext,
X[rm -f conftest*
Xecho 'int i = 1;' > conftest.$ac_ext
Xif AC_TRY_EVAL(ac_compile); then
X  for ac_file in conftest.*; do
X    case $ac_file in
X    *.c) ;;
X    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
X    esac
X  done
Xelse
X  AC_MSG_ERROR([installation or configuration problem; compiler does not work])
Xfi
Xrm -f conftest*])
XAC_MSG_RESULT($ac_cv_objext)
XOBJEXT=$ac_cv_objext
Xac_objext=$ac_cv_objext
XAC_SUBST(OBJEXT)])
X
Xdnl Determine the linker flags (e.g. `-L' and `-l') for the Fortran 77
Xdnl intrinsic and run-time libraries that are required to successfully
Xdnl link a Fortran 77 program or shared library.  The output variable
Xdnl FLIBS is set to these flags.
Xdnl 
Xdnl This macro is intended to be used in those situations when it is
Xdnl necessary to mix, e.g. C++ and Fortran 77, source code into a single
Xdnl program or shared library.
Xdnl 
Xdnl For example, if object files from a C++ and Fortran 77 compiler must
Xdnl be linked together, then the C++ compiler/linker must be used for
Xdnl linking (since special C++-ish things need to happen at link time
Xdnl like calling global constructors, instantiating templates, enabling
Xdnl exception support, etc.).
Xdnl 
Xdnl However, the Fortran 77 intrinsic and run-time libraries must be
Xdnl linked in as well, but the C++ compiler/linker doesn't know how to
Xdnl add these Fortran 77 libraries.  Hence, the macro
Xdnl `AC_F77_LIBRARY_LDFLAGS' was created to determine these Fortran 77
Xdnl libraries.
Xdnl
Xdnl This macro was packaged in its current form by Matthew D. Langston
Xdnl <langston@SLAC.Stanford.EDU>.  However, nearly all of this macro
Xdnl came from the `OCTAVE_FLIBS' macro in `octave-2.0.13/aclocal.m4',
Xdnl and full credit should go to John W. Eaton for writing this
Xdnl extremely useful macro.  Thank you John.
Xdnl
Xdnl AC_F77_LIBRARY_LDFLAGS()
XAC_DEFUN(AC_F77_LIBRARY_LDFLAGS,
X[AC_MSG_CHECKING([for Fortran 77 libraries])
XAC_REQUIRE([AC_PROG_F77])
XAC_REQUIRE([AC_CANONICAL_HOST])
XAC_CACHE_VAL(ac_cv_flibs,
X[changequote(, )dnl
Xdnl Write a minimal program and compile it with -v.  I don't know what
Xdnl to do if your compiler doesn't have -v...
Xecho "      END" > conftest.f
Xfoutput=`${F77} -v -o conftest conftest.f 2>&1`
Xdnl
Xdnl The easiest thing to do for xlf output is to replace all the commas
Xdnl with spaces.  Try to only do that if the output is really from xlf,
Xdnl since doing that causes problems on other systems.
Xdnl
Xxlf_p=`echo $foutput | grep xlfentry`
Xif test -n "$xlf_p"; then
X  foutput=`echo $foutput | sed 's/,/ /g'`
Xfi
Xdnl
Xld_run_path=`echo $foutput | \
X  sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`
Xdnl
Xdnl We are only supposed to find this on Solaris systems...
Xdnl Uh, the run path should be absolute, shouldn't it?
Xdnl
Xcase "$ld_run_path" in
X  /*)
X    if test "$ac_cv_prog_gcc" = yes; then
X      ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
X    else
X      ld_run_path="-R $ld_run_path"
X    fi
X  ;;
X  *)
X    ld_run_path=
X  ;;
Xesac
Xdnl
Xflibs=
Xlflags=
Xdnl
Xdnl If want_arg is set, we know we want the arg to be added to the list,
Xdnl so we don't have to examine it.
Xdnl
Xwant_arg=
Xdnl
Xfor arg in $foutput; do
X  old_want_arg=$want_arg
X  want_arg=
Xdnl
Xdnl None of the options that take arguments expect the argument to
Xdnl start with a -, so pretend we didn't see anything special.
Xdnl
X  if test -n "$old_want_arg"; then
X    case "$arg" in
X      -*)
X        old_want_arg=
X      ;;
X    esac
X  fi
X  case "$old_want_arg" in
X    '')
X      case $arg in
X        /*.a)
X          exists=false
X          for f in $lflags; do
X            if test x$arg = x$f; then
X              exists=true
X            fi
X          done
X          if $exists; then
X            arg=
X          else
X            lflags="$lflags $arg"
X          fi
X        ;;
X        -bI:*)
X          exists=false
X          for f in $lflags; do
X            if test x$arg = x$f; then
X              exists=true
X            fi
X          done
X          if $exists; then
X            arg=
X          else
X            if test "$ac_cv_prog_gcc" = yes; then
X              lflags="$lflags -Xlinker $arg"
X            else
X              lflags="$lflags $arg"
X            fi
X          fi
X        ;;
X        -lang* | -lcrt0.o | -lc | -lgcc)
X          arg=
X        ;;
X        -[lLR])
X          want_arg=$arg
X          arg=
X        ;;
X        -[lLR]*)
X          exists=false
X          for f in $lflags; do
X            if test x$arg = x$f; then
X              exists=true
X            fi
X          done
X          if $exists; then
X            arg=
X          else
X            case "$arg" in
X              -lkernel32)
X                case "$canonical_host_type" in
X                  *-*-cygwin*)
X                    arg=
X                  ;;
X                  *)
X                    lflags="$lflags $arg"
X                  ;;
X                esac
X              ;;
X              -lm)
X              ;;
X              *)
X                lflags="$lflags $arg"
X              ;;
X            esac
X          fi
X        ;;
X        -u)
X          want_arg=$arg
X          arg=
X        ;;
X        -Y)
X          want_arg=$arg
X          arg=
X        ;;
X        *)
X          arg=
X        ;;
X      esac
X    ;;
X    -[lLR])
X      arg="$old_want_arg $arg"
X    ;;
X    -u)
X      arg="-u $arg"
X    ;;
X    -Y)
Xdnl
Xdnl Should probably try to ensure unique directory options here too.
Xdnl This probably only applies to Solaris systems, and then will only
Xdnl work with gcc...
Xdnl
X      arg=`echo $arg | sed -e 's%^P,%%'`
X      SAVE_IFS=$IFS
X      IFS=:
X      list=
X      for elt in $arg; do
X        list="$list -L$elt"
X      done
X      IFS=$SAVE_IFS
X      arg="$list"
X    ;;
X  esac
Xdnl
X  if test -n "$arg"; then
X    flibs="$flibs $arg"
X  fi
Xdone
Xif test -n "$ld_run_path"; then
X  flibs_result="$ld_run_path $flibs"
Xelse
X  flibs_result="$flibs"
Xfi
Xchangequote([, ])dnl
Xac_cv_flibs="$flibs_result"])
XFLIBS="$ac_cv_flibs"
XAC_SUBST(FLIBS)dnl
XAC_MSG_RESULT($FLIBS)
X])
X
X
Xdnl ### Checks for operating system services
X
X
XAC_DEFUN(AC_SYS_INTERPRETER,
X[# Pull the hash mark out of the macro call to avoid m4 problems.
Xac_msg="whether #! works in shell scripts"
XAC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter,
X[echo '#! /bin/cat
Xexit 69
X' > conftest
Xchmod u+x conftest
X(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
Xif test $? -ne 69; then
X   ac_cv_sys_interpreter=yes
Xelse
X   ac_cv_sys_interpreter=no
Xfi
Xrm -f conftest])
Xinterpval="$ac_cv_sys_interpreter"
X])
X
Xdefine(AC_HAVE_POUNDBANG,
X[errprint(__file__:__line__: [$0 has been replaced by AC_SYS_INTERPRETER, taking no arguments
X])m4exit(4)])
X
XAC_DEFUN(AC_SYS_LONG_FILE_NAMES,
X[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names,
X[ac_cv_sys_long_file_names=yes
X# Test for long file names in all the places we know might matter:
X#      .		the current directory, where building will happen
X#      $prefix/lib	where we will be installing things
X#      $exec_prefix/lib	likewise
X# eval it to expand exec_prefix.
X#      $TMPDIR		if set, where it might want to write temporary files
X# if $TMPDIR is not set:
X#      /tmp		where it might want to write temporary files
X#      /var/tmp		likewise
X#      /usr/tmp		likewise
Xif test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
X  ac_tmpdirs="$TMPDIR"
Xelse
X  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
Xfi
Xfor ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
X  test -d $ac_dir || continue
X  test -w $ac_dir || continue # It is less confusing to not echo anything here.
X  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
X  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
X  val=`cat $ac_dir/conftest9012345 2>/dev/null`
X  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
X    ac_cv_sys_long_file_names=no
X    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
X    break
X  fi
X  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
Xdone])
Xif test $ac_cv_sys_long_file_names = yes; then
X  AC_DEFINE(HAVE_LONG_FILE_NAMES)
Xfi
X])
X
XAC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
X[AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,
X[AC_TRY_RUN(
X[/* Exit 0 (true) if wait returns something other than -1,
X   i.e. the pid of the child, which means that wait was restarted
X   after getting the signal.  */
X#include <sys/types.h>
X#include <signal.h>
Xucatch (isig) { }
Xmain () {
X  int i = fork (), status;
X  if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
X  signal (SIGINT, ucatch);
X  status = wait(&i);
X  if (status == -1) wait(&i);
X  exit (status == -1);
X}
X], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])
Xif test $ac_cv_sys_restartable_syscalls = yes; then
X  AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
Xfi
X])
X
XAC_DEFUN(AC_PATH_X,
X[AC_REQUIRE_CPP()dnl Set CPP; we run AC_PATH_X_DIRECT conditionally.
X# If we find X, set shell vars x_includes and x_libraries to the
X# paths, otherwise set no_x=yes.
X# Uses ac_ vars as temps to allow command line to override cache and checks.
X# --without-x overrides everything else, but does not touch the cache.
XAC_MSG_CHECKING(for X)
X
XAC_ARG_WITH(x, [  --with-x                use the X Window System])
X# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
Xif test "x$with_x" = xno; then
X  # The user explicitly disabled X.
X  have_x=disabled
Xelse
X  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
X    # Both variables are already set.
X    have_x=yes
X  else
XAC_CACHE_VAL(ac_cv_have_x,
X[# One or both of the vars are not set, and there is no cached value.
Xac_x_includes=NO ac_x_libraries=NO
XAC_PATH_X_XMKMF
XAC_PATH_X_DIRECT
Xif test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
X  # Didn't find X anywhere.  Cache the known absence of X.
X  ac_cv_have_x="have_x=no"
Xelse
X  # Record where we found X for the cache.
X  ac_cv_have_x="have_x=yes \
X	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
Xfi])dnl
X  fi
X  eval "$ac_cv_have_x"
Xfi # $with_x != no
X
Xif test "$have_x" != yes; then
X  AC_MSG_RESULT($have_x)
X  no_x=yes
Xelse
X  # If each of the values was on the command line, it overrides each guess.
X  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
X  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
X  # Update the cache value to reflect the command line values.
X  ac_cv_have_x="have_x=yes \
X		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
X  AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
Xfi
X])
X
Xdnl Internal subroutine of AC_PATH_X.
Xdnl Set ac_x_includes and/or ac_x_libraries.
XAC_DEFUN(AC_PATH_X_XMKMF,
X[rm -fr conftestdir
Xif mkdir conftestdir; then
X  cd conftestdir
X  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
X  cat > Imakefile <<'EOF'
Xacfindx:
X	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
XEOF
X  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
X    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
X    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
X    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
X    for ac_extension in a so sl; do
X      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
X        test -f $ac_im_libdir/libX11.$ac_extension; then
X        ac_im_usrlibdir=$ac_im_libdir; break
X      fi
X    done
X    # Screen out bogus values from the imake configuration.  They are
X    # bogus both because they are the default anyway, and because
X    # using them would break gcc on systems where it needs fixed includes.
X    case "$ac_im_incroot" in
X	/usr/include) ;;
X	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
X    esac
X    case "$ac_im_usrlibdir" in
X	/usr/lib | /lib) ;;
X	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
X    esac
X  fi
X  cd ..
X  rm -fr conftestdir
Xfi
X])
X
Xdnl Internal subroutine of AC_PATH_X.
Xdnl Set ac_x_includes and/or ac_x_libraries.
XAC_DEFUN(AC_PATH_X_DIRECT,
X[if test "$ac_x_includes" = NO; then
X  # Guess where to find include files, by looking for this one X11 .h file.
X  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
X
X  # First, try using that file with no special directory specified.
XAC_TRY_CPP([#include <$x_direct_test_include>],
X[# We can compile using X headers with no special include directory.
Xac_x_includes=],
X[# Look for the header file in a standard set of common directories.
X# Check X11 before X11Rn because it is often a symlink to the current release.
X  for ac_dir in               \
X    /usr/X11/include          \
X    /usr/X11R6/include        \
X    /usr/X11R5/include        \
X    /usr/X11R4/include        \
X                              \
X    /usr/include/X11          \
X    /usr/include/X11R6        \
X    /usr/include/X11R5        \
X    /usr/include/X11R4        \
X                              \
X    /usr/local/X11/include    \
X    /usr/local/X11R6/include  \
X    /usr/local/X11R5/include  \
X    /usr/local/X11R4/include  \
X                              \
X    /usr/local/include/X11    \
X    /usr/local/include/X11R6  \
X    /usr/local/include/X11R5  \
X    /usr/local/include/X11R4  \
X                              \
X    /usr/X386/include         \
X    /usr/x386/include         \
X    /usr/XFree86/include/X11  \
X                              \
X    /usr/include              \
X    /usr/local/include        \
X    /usr/unsupported/include  \
X    /usr/athena/include       \
X    /usr/local/x11r5/include  \
X    /usr/lpp/Xamples/include  \
X                              \
X    /usr/openwin/include      \
X    /usr/openwin/share/include \
X    ; \
X  do
X    if test -r "$ac_dir/$x_direct_test_include"; then
X      ac_x_includes=$ac_dir
X      break
X    fi
X  done])
Xfi # $ac_x_includes = NO
X
Xif test "$ac_x_libraries" = NO; then
X  # Check for the libraries.
X
X  test -z "$x_direct_test_library" && x_direct_test_library=Xt
X  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
X
X  # See if we find them without any special options.
X  # Don't add to $LIBS permanently.
X  ac_save_LIBS="$LIBS"
X  LIBS="-l$x_direct_test_library $LIBS"
XAC_TRY_LINK(, [${x_direct_test_function}()],
X[LIBS="$ac_save_LIBS"
X# We can link X programs with no special library path.
Xac_x_libraries=],
X[LIBS="$ac_save_LIBS"
X# First see if replacing the include by lib works.
X# Check X11 before X11Rn because it is often a symlink to the current release.
Xfor ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
X    /usr/X11/lib          \
X    /usr/X11R6/lib        \
X    /usr/X11R5/lib        \
X    /usr/X11R4/lib        \
X                          \
X    /usr/lib/X11          \
X    /usr/lib/X11R6        \
X    /usr/lib/X11R5        \
X    /usr/lib/X11R4        \
X                          \
X    /usr/local/X11/lib    \
X    /usr/local/X11R6/lib  \
X    /usr/local/X11R5/lib  \
X    /usr/local/X11R4/lib  \
X                          \
X    /usr/local/lib/X11    \
X    /usr/local/lib/X11R6  \
X    /usr/local/lib/X11R5  \
X    /usr/local/lib/X11R4  \
X                          \
X    /usr/X386/lib         \
X    /usr/x386/lib         \
X    /usr/XFree86/lib/X11  \
X                          \
X    /usr/lib              \
X    /usr/local/lib        \
X    /usr/unsupported/lib  \
X    /usr/athena/lib       \
X    /usr/local/x11r5/lib  \
X    /usr/lpp/Xamples/lib  \
X    /lib/usr/lib/X11	  \
X                          \
X    /usr/openwin/lib      \
X    /usr/openwin/share/lib \
X    ; \
Xdo
Xdnl Don't even attempt the hair of trying to link an X program!
X  for ac_extension in a so sl; do
X    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
X      ac_x_libraries=$ac_dir
X      break 2
X    fi
X  done
Xdone])
Xfi # $ac_x_libraries = NO
X])
X
Xdnl Find additional X libraries, magic flags, etc.
XAC_DEFUN(AC_PATH_XTRA,
X[AC_REQUIRE([AC_PATH_X])dnl
Xif test "$no_x" = yes; then
X  # Not all programs may use this symbol, but it does not hurt to define it.
X  AC_DEFINE(X_DISPLAY_MISSING)
X  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
Xelse
X  if test -n "$x_includes"; then
X    X_CFLAGS="$X_CFLAGS -I$x_includes"
X  fi
X
X  # It would also be nice to do this for all -L options, not just this one.
X  if test -n "$x_libraries"; then
X    X_LIBS="$X_LIBS -L$x_libraries"
Xdnl FIXME banish uname from this macro!
X    # For Solaris; some versions of Sun CC require a space after -R and
X    # others require no space.  Words are not sufficient . . . .
X    case "`(uname -sr) 2>/dev/null`" in
X    "SunOS 5"*)
X      AC_MSG_CHECKING(whether -R must be followed by a space)
X      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
X      AC_TRY_LINK(, , ac_R_nospace=yes, ac_R_nospace=no)
X      if test $ac_R_nospace = yes; then
X	AC_MSG_RESULT(no)
X	X_LIBS="$X_LIBS -R$x_libraries"
X      else
X	LIBS="$ac_xsave_LIBS -R $x_libraries"
X	AC_TRY_LINK(, , ac_R_space=yes, ac_R_space=no)
X	if test $ac_R_space = yes; then
X	  AC_MSG_RESULT(yes)
X	  X_LIBS="$X_LIBS -R $x_libraries"
X	else
X	  AC_MSG_RESULT(neither works)
X	fi
X      fi
X      LIBS="$ac_xsave_LIBS"
X    esac
X  fi
X
X  # Check for system-dependent libraries X programs must link with.
X  # Do this before checking for the system-independent R6 libraries
X  # (-lICE), since we may need -lsocket or whatever for X linking.
X
X  if test "$ISC" = yes; then
X    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
X  else
X    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
X    # libraries were built with DECnet support.  And karl@cs.umb.edu says
X    # the Alpha needs dnet_stub (dnet does not exist).
X    AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
X    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
X      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
X	[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
X    fi
X
X    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
X    # to get the SysV transport functions.
X    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
X    # needs -lnsl.
X    # The nsl library prevents programs from opening the X display
X    # on Irix 5.2, according to dickey@clark.net.
X    AC_CHECK_FUNC(gethostbyname)
X    if test $ac_cv_func_gethostbyname = no; then
X      AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
X    fi
X
X    # lieder@skyler.mavd.honeywell.com says without -lsocket,
X    # socket/setsockopt and other routines are undefined under SCO ODT
X    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
X    # on later versions), says simon@lia.di.epfl.ch: it contains
X    # gethostby* variants that don't use the nameserver (or something).
X    # -lsocket must be given before -lnsl if both are needed.
X    # We assume that if connect needs -lnsl, so does gethostbyname.
X    AC_CHECK_FUNC(connect)
X    if test $ac_cv_func_connect = no; then
X      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
X	$X_EXTRA_LIBS)
X    fi
X
X    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
X    AC_CHECK_FUNC(remove)
X    if test $ac_cv_func_remove = no; then
X      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
X    fi
X
X    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
X    AC_CHECK_FUNC(shmat)
X    if test $ac_cv_func_shmat = no; then
X      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")
X    fi
X  fi
X
X  # Check for libraries that X11R6 Xt/Xaw programs need.
X  ac_save_LDFLAGS="$LDFLAGS"
X  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
X  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
X  # check for ICE first), but we must link in the order -lSM -lICE or
X  # we get undefined symbols.  So assume we have SM if we have ICE.
X  # These have to be linked with before -lX11, unlike the other
X  # libraries we check for below, so use a different variable.
X  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
X  AC_CHECK_LIB(ICE, IceConnectionNumber,
X    [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS)
X  LDFLAGS="$ac_save_LDFLAGS"
X
Xfi
XAC_SUBST(X_CFLAGS)dnl
XAC_SUBST(X_PRE_LIBS)dnl
XAC_SUBST(X_LIBS)dnl
XAC_SUBST(X_EXTRA_LIBS)dnl
X])
X
Xdnl The old Cygwin32 macro is deprecated.
XAC_DEFUN(AC_CYGWIN32,
X[AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl
XAC_CYGWIN])
X
Xdnl Check for Cygwin.  This is a way to set the right value for
Xdnl EXEEXT.
XAC_DEFUN(AC_CYGWIN,
X[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
X[AC_TRY_COMPILE(,[
X#ifndef __CYGWIN__
X#define __CYGWIN__ __CYGWIN32__
X#endif
Xreturn __CYGWIN__;],
Xac_cv_cygwin=yes, ac_cv_cygwin=no)
Xrm -f conftest*])
XCYGWIN=
Xtest "$ac_cv_cygwin" = yes && CYGWIN=yes])
X
Xdnl Check for mingw32.  This is another way to set the right value for
Xdnl EXEEXT.
XAC_DEFUN(AC_MINGW32,
X[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
X[AC_TRY_COMPILE(,[return __MINGW32__;],
Xac_cv_mingw32=yes, ac_cv_mingw32=no)
Xrm -f conftest*])
XMINGW32=
Xtest "$ac_cv_mingw32" = yes && MINGW32=yes])
X
Xdnl Check for EMX/OS2.  This is another way to set the right value for
Xdnl EXEEXT.
XAC_DEFUN(AC_EMXOS2,
X[AC_CACHE_CHECK(for EMX/OS2 environment, ac_cv_emxos2,
X[AC_TRY_COMPILE(,[return __EMX__;],
Xac_cv_emxos2=yes, ac_cv_emxos2=no)
Xrm -f conftest*])
XAC_CACHE_VAL(ac_cv_libpre,
Xif test "$ac_cv_emxos2" = yes ; then
X  ac_cv_libpre=
Xelse
X  ac_cv_libpre=lib
Xfi
X)
XEMXOS2=
Xtest "$ac_cv_emxos2" = yes && EMXOS2=yes])
X
Xdnl Check for the extension used for executables.  This knows that we
Xdnl add .exe for Cygwin or mingw32.  Otherwise, it compiles a test
Xdnl executable.  If this is called, the executable extensions will be
Xdnl automatically used by link commands run by the configure script.
Xdnl
Xdnl exeext -> whether prog.exe ist created instead of prog
Xdnl xexeect -> whether prog.exe needs to be called instead of prog
Xdnl
XAC_DEFUN(AC_EXEEXT,
X[AC_REQUIRE([AC_CYGWIN])
XAC_REQUIRE([AC_MINGW32])
XAC_REQUIRE([AC_EMXOS2])
XAC_MSG_CHECKING([for executable suffix])
XAC_CACHE_VAL(ac_cv_exeext,
X[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
X  ac_cv_exeext=.exe
X  ac_cv_xexeext=""
Xelse
X  rm -f conftest*
X  echo 'int main () { return 0; }' > conftest.$ac_ext
X  ac_cv_exeext=
X  if AC_TRY_EVAL(ac_link); then
X    for file in conftest.*; do
X      case $file in
X      *.c | *.o | *.obj) ;;
X      *.dSYM) ;;	# Ignore strange directory found on Mac OS X with cc -g
X      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
X      esac
X    done
X  else
X    ccout=`eval "${CC-cc} 2>&1" 2> /dev/null`
X    ret=$?
X    nf=`echo "$ccout" | grep 'not found'`
X    if test $ret = 127 -a -n "$nf" ; then	# Korn Shell
X        ccout=""
X    fi
X    if test "$ret" -ne 0 -a ! -n "$ccout" ; then
X        AC_MSG_ERROR([installation or configuration problem: C compiler ${CC-cc} not found.])
X    fi
X    AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.])
X  fi
X  (./conftest ; exit) 2> /dev/null
X  if test $? != 0 ; then
X	ac_cv_xexeext="${ac_cv_exeext}"
X	(./conftest${ac_cv_xexeext} ; exit) 2> /dev/null
X	if test $? != 0 ; then
X		ac_cv_xexeext=""
X	fi
X  fi
X  rm -f conftest*
X  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
X  test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no
Xfi])
XEXEEXT=""
XXEXEEXT=""
Xtest x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
Xtest x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext}
XAC_MSG_RESULT(${ac_cv_exeext})
XAC_MSG_CHECKING([for executable calling suffix])
XAC_MSG_RESULT(${ac_cv_xexeext})
Xdnl Setting ac_exeext will implicitly change the ac_link command.
Xac_exeext=$EXEEXT
Xac_xexeext=$XEXEEXT
XAC_SUBST(EXEEXT)
XAC_SUBST(XEXEEXT)
X])
X
X
Xdnl ### Checks for UNIX variants
Xdnl These are kludges which should be replaced by a single POSIX check.
Xdnl They aren't cached, to discourage their use.
X
X
XAC_DEFUN(AC_AIX,
X[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
XAC_BEFORE([$0], [AC_TRY_RUN])dnl
XAC_MSG_CHECKING(for AIX)
XAC_EGREP_CPP(yes,
X[#ifdef _AIX
X  yes
X#endif
X], [AC_MSG_RESULT(yes); AC_DEFINE(_ALL_SOURCE)], AC_MSG_RESULT(no))
X])
X
XAC_DEFUN(AC_MINIX,
X[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
XAC_BEFORE([$0], [AC_TRY_RUN])dnl
XAC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
Xif test "$MINIX" = yes; then
X  AC_DEFINE(_POSIX_SOURCE)
X  AC_DEFINE(_POSIX_1_SOURCE, 2)
X  AC_DEFINE(_MINIX)
Xfi
X])
X
XAC_DEFUN(AC_ISC_POSIX,
X[AC_REQUIRE([AC_PROG_CC])dnl
XAC_BEFORE([$0], [AC_TRY_COMPILE])dnl
XAC_BEFORE([$0], [AC_TRY_RUN])dnl
XAC_MSG_CHECKING(for POSIXized ISC)
Xif test -d /etc/conf/kconfig.d &&
X  grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1
Xthen
X  AC_MSG_RESULT(yes)
X  ISC=yes # If later tests want to check for ISC.
X  AC_DEFINE(_POSIX_SOURCE)
X  if test "$GCC" = yes; then
X    CC="$CC -posix"
X  else
X    CC="$CC -Xp"
X  fi
Xelse
X  AC_MSG_RESULT(no)
X  ISC=
Xfi
X])
X
XAC_DEFUN(AC_XENIX_DIR,
X[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
XAC_REQUIRE([AC_DIR_HEADER])dnl
XAC_MSG_CHECKING(for Xenix)
XAC_EGREP_CPP(yes,
X[#if defined(M_XENIX) && !defined(M_UNIX)
X  yes
X#endif
X], [AC_MSG_RESULT(yes); XENIX=yes], [AC_MSG_RESULT(no); XENIX=])
Xif test "$XENIX" = yes; then
X  # Make sure -ldir precedes -lx.
X  test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS"
X  LIBS="$LIBS -lx"
Xfi
X])
X
XAC_DEFUN(AC_DYNIX_SEQ,
X[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl
XAC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")
X])
X
XAC_DEFUN(AC_IRIX_SUN,
X[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl
XAC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
X])
X
XAC_DEFUN(AC_SCO_INTL,
X[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl
XAC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
X])
END-of-star-1.5.2/autoconf/acspecific.m4
echo x - star-1.5.2/autoconf/autoconf
sed 's/^X//' >star-1.5.2/autoconf/autoconf << 'END-of-star-1.5.2/autoconf/autoconf'
X#! /bin/sh
X# @(#)autoconf	1.8 09/04/19 Copyright 1999-2009 J. Schilling
X#
X# autoconf -- create `configure' using m4 macros
X# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
X
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2, or (at your option)
X# any later version.
X
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X# GNU General Public License for more details.
X
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
X# 02111-1307, USA.
X
X# If given no args, create `configure' from template file `configure.in'.
X# With one arg, create a configure script on standard output from
X# the given template file.
X
Xusage="\
XUsage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
X       [-l dir] [--localdir=dir] [--version] [template-file]"
X
X# NLS nuisances.
X# Only set these to C if already set.  These must not be set unconditionally
X# because not all systems understand e.g. LANG=C (notably SCO).
X# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
X# Non-C LC_CTYPE values break the ctype check.
Xif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Xif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Xif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Xif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
X
X: ${AC_MACRODIR=.}
X
X: ${M4=/usr/bin/gm4}
X$M4 < /dev/null 2> /dev/null || M4=/opt/sfw/bin/gm4
X$M4 < /dev/null 2> /dev/null || M4=/usr/sfw/bin/gm4
X$M4 < /dev/null 2> /dev/null || M4=/opt/csw/bin/gm4
X$M4 < /dev/null 2> /dev/null || M4=gm4
X$M4 < /dev/null 2> /dev/null || M4=m4
X
X: ${AWK=/usr/bin/gawk}
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/opt/sfw/bin/gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/usr/sfw/bin/gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/opt/csw/bin/gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=gawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=nawk
X$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=awk
X
Xcase "${M4}" in
X/*) # Handle the case that m4 has moved since we were configured.
X    # It may have been found originally in a build directory.
X    test -f "${M4}" || M4=/usr/sfw/bin/gm4
X    test -f "${M4}" || M4=m4 ;;
Xesac
X
X: ${TMPDIR=/tmp}
Xtmpout=${TMPDIR}/acout.$$
Xlocaldir=
Xshow_version=no
X
Xwhile test $# -gt 0 ; do
X   case "${1}" in
X      -h | --help | --h* )
X         echo "${usage}" 1>&2; exit 0 ;;
X      --localdir=* | --l*=* )
X         localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
X         shift ;;
X      -l | --localdir | --l*)
X         shift
X         test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
X         localdir="${1}"
X         shift ;;
X      --macrodir=* | --m*=* )
X         AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
X         shift ;;
X      -m | --macrodir | --m* )
X         shift
X         test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
X         AC_MACRODIR="${1}"
X         shift ;;
X      --version | --v* )
X         show_version=yes; shift ;;
X      -- )     # Stop option processing
X        shift; break ;;
X      - )	# Use stdin as input.
X        break ;;
X      -* )
X        echo "${usage}" 1>&2; exit 1 ;;
X      * )
X        break ;;
X   esac
Xdone
X
Xif test $show_version = yes; then
X  version=`sed -n 's/define.AC_ACVERSION.[ 	]*\([0-9.]*\).*/\1/p' \
X    $AC_MACRODIR/acgeneral.m4`
X  echo "Autoconf version $version"
X  exit 0
Xfi
X
Xcase $# in
X  0) infile=configure.in ;;
X  1) infile="$1" ;;
X  *) echo "$usage" >&2; exit 1 ;;
Xesac
X
Xtrap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
X
Xtmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
Xif test z$infile = z-; then
X  infile=$tmpin
X  cat > $infile
Xelif test ! -r "$infile"; then
X  echo "autoconf: ${infile}: No such file or directory" >&2
X  exit 1
Xfi
X
Xif test -n "$localdir"; then
X  use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
Xelse
X  use_localdir=
Xfi
X
X# Use the frozen version of Autoconf if available.
Xr= f=
X# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
Xcase `$M4 --help < /dev/null 2>&1` in
X*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
X*traditional*) ;;
X*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
Xesac
X
X$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
X  { rm -f $tmpin $tmpout; exit 2; }
X
X# You could add your own prefixes to pattern if you wanted to check for
X# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do
X# alternation.
Xpattern="AC_"
X
Xstatus=0
Xif grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
X  echo "autoconf: Undefined macros:" >&2
X  sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
X    while read macro; do
X      grep -n "^[^#]*$macro" $infile /dev/null
X      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
X    done | sort -u >&2
X  status=1
Xfi
X
Xif test $# -eq 0; then
X  exec 4> configure; chmod +x configure
Xelse
X  exec 4>&1
Xfi
X
X# Put the real line numbers into configure to make config.log more helpful.
X$AWK '
X/__oline__/ { printf "%d:", NR + 1 }
X           { print }
X' $tmpout | sed '
X/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
X' >&4
X
Xrm -f $tmpout
X
Xexit $status
END-of-star-1.5.2/autoconf/autoconf
echo x - star-1.5.2/autoconf/autoconf.m4
sed 's/^X//' >star-1.5.2/autoconf/autoconf.m4 << 'END-of-star-1.5.2/autoconf/autoconf.m4'
Xdnl Driver that loads the Autoconf macro files.
Xdnl Requires GNU m4.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1994 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl Written by David MacKenzie.
Xdnl
Xinclude(acgeneral.m4)dnl
Xbuiltin(include, acspecific.m4)dnl
Xbuiltin(include, acoldnames.m4)dnl
Xdnl Do not sinclude acsite.m4 here, because it may not be installed
Xdnl yet when Autoconf is frozen.
Xdnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.
END-of-star-1.5.2/autoconf/autoconf.m4
echo x - star-1.5.2/autoconf/autoheader.m4
sed 's/^X//' >star-1.5.2/autoconf/autoheader.m4 << 'END-of-star-1.5.2/autoconf/autoheader.m4'
Xdnl Driver and redefinitions of some Autoconf macros for autoheader.
Xdnl This file is part of Autoconf.
Xdnl Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Xdnl
Xdnl This program is free software; you can redistribute it and/or modify
Xdnl it under the terms of the GNU General Public License as published by
Xdnl the Free Software Foundation; either version 2, or (at your option)
Xdnl any later version.
Xdnl
Xdnl This program is distributed in the hope that it will be useful,
Xdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Xdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Xdnl GNU General Public License for more details.
Xdnl
Xdnl You should have received a copy of the GNU General Public License
Xdnl along with this program; if not, write to the Free Software
Xdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Xdnl 02111-1307, USA.
Xdnl
Xdnl Written by Roland McGrath.
Xdnl
Xinclude(acgeneral.m4)dnl
Xbuiltin(include, acspecific.m4)dnl
Xbuiltin(include, acoldnames.m4)dnl
X
Xdnl These are alternate definitions of some macros, which produce
Xdnl strings in the output marked with "@@@" so we can easily extract
Xdnl the information we want.  The `#' at the end of the first line of
Xdnl each definition seems to be necessary to prevent m4 from eating
Xdnl the newline, which makes the @@@ not always be at the beginning of
Xdnl a line.
X
Xdefine([AC_CHECK_FUNCS], [#
X@@@funcs="$funcs $1"@@@
Xifelse([$2], , , [
X# If it was found, we do:
X$2
X# If it was not found, we do:
X$3
X])
X])
X
Xdefine([AC_CHECK_HEADERS], [#
X@@@headers="$headers $1"@@@
Xifelse([$2], , , [
X# If it was found, we do:
X$2
X# If it was not found, we do:
X$3
X])
X])
X
Xdefine([AC_CHECK_HEADERS_DIRENT], [#
X@@@headers="$headers $1"@@@
X])
X
Xdefine([AC_CHECK_LIB], [#
X  ifelse([$3], , [
X@@@libs="$libs $1"@@@
X], [
X# If it was found, we do:
X$3
X# If it was not found, we do:
X$4
X])
X])
X
Xdefine([AC_HAVE_LIBRARY], [#
Xchangequote(<<, >>)dnl
Xdefine(<<AC_LIB_NAME>>, dnl
Xpatsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
Xchangequote([, ])dnl
X  ifelse([$2], , [
X@@@libs="$libs AC_LIB_NAME"@@@
X], [
X# If it was found, we do:
X$2
X# If it was not found, we do:
X$3
X])
X])
X
Xdefine([AC_CHECK_SIZEOF], [#
X@@@types="$types,$1"@@@
X])
X
Xdefine([AC_CONFIG_HEADER], [#
Xdefine([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
X@@@config_h=AC_CONFIG_H@@@
X])
X
Xdefine([AC_DEFINE], [#
Xifelse([$3],,[#
X@@@syms="$syms $1"@@@
X], [#
X@@@verbatim="$verbatim
X/* $3 */
X#undef $1
X"@@@
X])])
X
Xdefine([AC_DEFINE_UNQUOTED], [#
Xifelse([$3],,[#
X@@@syms="$syms $1"@@@
X], [#
X@@@verbatim="$verbatim
X/* $3 */
X#undef $1
X"@@@
X])])
END-of-star-1.5.2/autoconf/autoheader.m4
echo x - star-1.5.2/autoconf/config.guess
sed 's/^X//' >star-1.5.2/autoconf/config.guess << 'END-of-star-1.5.2/autoconf/config.guess'
X#! /bin/sh
X# @(#)config.guess	1.15 09/10/31 Copyright 1999-2009 J. Schilling
X#
X# Attempt to guess a canonical system name.
X#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
X#
X# This file is free software; you can redistribute it and/or modify it
X# under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful, but
X# WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
X# General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
X#
X# As a special exception to the GNU General Public License, if you
X# distribute this file as part of a program that contains a
X# configuration script generated by Autoconf, you may include it under
X# the same distribution terms that you use for the rest of that program.
X
X# Written by Per Bothner <bothner@cygnus.com>.
X# The master version of this file is at the FSF in /home/gd/gnu/lib.
X#
X# This script attempts to guess a canonical system name similar to
X# config.sub.  If it succeeds, it prints the system name on stdout, and
X# exits with 0.  Otherwise, it exits with 1.
X#
X# The plan is that this can be called by configure scripts if you
X# don't specify an explicit system type (host/target name).
X#
X# Only a few systems have been added to this list; please add others
X# (but try to keep the structure clean).
X#
X
X# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
X# (ghazi@noc.rutgers.edu 8/24/94.)
Xif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
X	PATH=$PATH:/.attbin ; export PATH
Xfi
X
XUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
XUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
XUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
XUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
X
Xtrap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
X
X# Note: order is significant - the case branches are not exclusive.
X
Xcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
X    alpha:OSF1:*:*)
X	if test $UNAME_RELEASE = "V4.0"; then
X		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
X	fi
X	# A Vn.n version is a released version.
X	# A Tn.n version is a released field test version.
X	# A Xn.n version is an unreleased experimental baselevel.
X	# 1.2 uses "1.2" for uname -r.
X	cat <<EOF >dummy.s
X	.globl main
X	.ent main
Xmain:
X	.frame \$30,0,\$26,0
X	.prologue 0
X	.long 0x47e03d80 # implver $0
X	lda \$2,259
X	.long 0x47e20c21 # amask $2,$1
X	srl \$1,8,\$2
X	sll \$2,2,\$2
X	sll \$0,3,\$0
X	addl \$1,\$0,\$0
X	addl \$2,\$0,\$0
X	ret \$31,(\$26),1
X	.end main
XEOF
X	${CC-cc} dummy.s -o dummy 2>/dev/null
X	if test "$?" = 0 ; then
X		./dummy
X		case "$?" in
X			7)
X				UNAME_MACHINE="alpha"
X				;;
X			15)
X				UNAME_MACHINE="alphaev5"
X				;;
X			14)
X				UNAME_MACHINE="alphaev56"
X				;;
X			10)
X				UNAME_MACHINE="alphapca56"
X				;;
X			16)
X				UNAME_MACHINE="alphaev6"
X				;;
X		esac
X	fi
X	rm -f dummy.s dummy
X	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
X	exit 0 ;;
X    21064:Windows_NT:50:3)
X	echo alpha-dec-winnt3.5
X	exit 0 ;;
X    *:FreeMiNT:*:*)
X	echo m68k-atari-freemint
X	exit 0 ;;
X    *:MiNT:*:*)
X	echo m68k-atari-mint
X	exit 0 ;;
X    *:TOS:*:*)
X	echo m68k-atari-tos
X	exit 0 ;;
X    Amiga*:UNIX_System_V:4.0:*)
X	echo m68k-cbm-sysv4
X	exit 0;;
X    amiga:NetBSD:*:*)
X      echo m68k-cbm-netbsd${UNAME_RELEASE}
X      exit 0 ;;
X    amiga:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    *:[Aa]miga[Oo][Ss]:*:*)
X	echo ${UNAME_MACHINE}-unknown-amigaos
X	exit 0 ;;
X    arc64:OpenBSD:*:*)
X	echo mips64el-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    arc:OpenBSD:*:*)
X	echo mipsel-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    hkmips:OpenBSD:*:*)
X	echo mips-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    pmax:OpenBSD:*:*)
X	echo mipsel-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sgi:OpenBSD:*:*)
X	echo mips-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    wgrisc:OpenBSD:*:*)
X	echo mipsel-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
X	echo arm-acorn-riscix${UNAME_RELEASE}
X	exit 0;;
X    arm32:NetBSD:*:*)
X	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
X	exit 0 ;;
X    SR2?01:HI-UX/MPP:*:*)
X	echo hppa1.1-hitachi-hiuxmpp
X	exit 0;;
X    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
X	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
X	if test "`(/bin/universe) 2>/dev/null`" = att ; then
X		echo pyramid-pyramid-sysv3
X	else
X		echo pyramid-pyramid-bsd
X	fi
X	exit 0 ;;
X    NILE:*:*:dcosx)
X	echo pyramid-pyramid-svr4
X	exit 0 ;;
X    sun4H:SunOS:5.*:*)
X	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
X	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    i86pc:SunOS:5.*:*)
X	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    sun4*:SunOS:6*:*)
X	# According to config.sub, this is the proper way to canonicalize
X	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
X	# it's likely to be more like Solaris than SunOS4.
X	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    sun4*:SunOS:*:*)
X	case "`/usr/bin/arch -k`" in
X	    Series*|S4*)
X		UNAME_RELEASE=`uname -v`
X		;;
X	esac
X	# Japanese Language versions have a version number like `4.1.3-JL'.
X	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
X	exit 0 ;;
X    sun3*:SunOS:*:*)
X	echo m68k-sun-sunos${UNAME_RELEASE}
X	exit 0 ;;
X    sun*:*:4.2BSD:*)
X	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
X	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
X	case "`/bin/arch`" in
X	    sun3)
X		echo m68k-sun-sunos${UNAME_RELEASE}
X		;;
X	    sun4)
X		echo sparc-sun-sunos${UNAME_RELEASE}
X		;;
X	esac
X	exit 0 ;;
X    aushp:SunOS:*:*)
X	echo sparc-auspex-sunos${UNAME_RELEASE}
X	exit 0 ;;
X    atari*:NetBSD:*:*)
X	echo m68k-atari-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    atari*:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sun3*:NetBSD:*:*)
X	echo m68k-sun-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sun3*:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mac68k:NetBSD:*:*)
X	echo m68k-apple-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mac68k:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mvme68k:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    mvme88k:OpenBSD:*:*)
X	echo m88k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    powerpc:machten:*:*)
X	echo powerpc-apple-machten${UNAME_RELEASE}
X	exit 0 ;;
X    macppc:NetBSD:*:*)
X        echo powerpc-apple-netbsd${UNAME_RELEASE}
X        exit 0 ;;
X    RISC*:Mach:*:*)
X	echo mips-dec-mach_bsd4.3
X	exit 0 ;;
X    RISC*:ULTRIX:*:*)
X	echo mips-dec-ultrix${UNAME_RELEASE}
X	exit 0 ;;
X    VAX*:ULTRIX*:*:*)
X	echo vax-dec-ultrix${UNAME_RELEASE}
X	exit 0 ;;
X    2020:CLIX:*:*)
X	echo clipper-intergraph-clix${UNAME_RELEASE}
X	exit 0 ;;
X    mips:*:*:UMIPS | mips:*:*:RISCos)
X	sed 's/^	//' << EOF >dummy.c
X	int main (argc, argv) int argc; char **argv; {
X	#if defined (host_mips) && defined (MIPSEB)
X	#if defined (SYSTYPE_SYSV)
X	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
X	#endif
X	#if defined (SYSTYPE_SVR4)
X	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
X	#endif
X	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
X	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
X	#endif
X	#endif
X	  exit (-1);
X	}
XEOF
X	${CC-cc} dummy.c -o dummy \
X	  && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
X	  && rm dummy.c dummy && exit 0
X	rm -f dummy.c dummy
X	echo mips-mips-riscos${UNAME_RELEASE}
X	exit 0 ;;
X    Night_Hawk:Power_UNIX:*:*)
X	echo powerpc-harris-powerunix
X	exit 0 ;;
X    m88k:CX/UX:7*:*)
X	echo m88k-harris-cxux7
X	exit 0 ;;
X    m88k:*:4*:R4*)
X	echo m88k-motorola-sysv4
X	exit 0 ;;
X    m88k:*:3*:R3*)
X	echo m88k-motorola-sysv3
X	exit 0 ;;
X    AViiON:dgux:*:*)
X        # DG/UX returns AViiON for all architectures
X        UNAME_PROCESSOR=`/usr/bin/uname -p`
X        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
X	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
X	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
X		echo m88k-dg-dgux${UNAME_RELEASE}
X	else
X		echo m88k-dg-dguxbcs${UNAME_RELEASE}
X	fi
X        else echo i586-dg-dgux${UNAME_RELEASE}
X        fi
X 	exit 0 ;;
X    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
X	echo m88k-dolphin-sysv3
X	exit 0 ;;
X    M88*:*:R3*:*)
X	# Delta 88k system running SVR3
X	echo m88k-motorola-sysv3
X	exit 0 ;;
X    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
X	echo m88k-tektronix-sysv3
X	exit 0 ;;
X    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
X	echo m68k-tektronix-bsd
X	exit 0 ;;
X    *:IRIX*:*:*)
X	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
X	exit 0 ;;
X    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
X	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
X	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
X    i?86:AIX:*:*)
X	echo i386-ibm-aix
X	exit 0 ;;
X    *:AIX:2:3)
X	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
X		sed 's/^		//' << EOF >dummy.c
X		#include <sys/systemcfg.h>
X
X		main()
X			{
X			if (!__power_pc())
X				exit(1);
X			puts("powerpc-ibm-aix3.2.5");
X			exit(0);
X			}
XEOF
X		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
X		rm -f dummy.c dummy
X		echo rs6000-ibm-aix3.2.5
X	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
X		echo rs6000-ibm-aix3.2.4
X	else
X		echo rs6000-ibm-aix3.2
X	fi
X	exit 0 ;;
X    *:AIX:*:4)
X	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
X	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
X		IBM_ARCH=rs6000
X	else
X		IBM_ARCH=powerpc
X	fi
X	if [ -x /usr/bin/oslevel ] ; then
X		IBM_REV=`/usr/bin/oslevel`
X	else
X		IBM_REV=4.${UNAME_RELEASE}
X	fi
X	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
X	exit 0 ;;
X    *:AIX:*:*)
X	echo rs6000-ibm-aix
X	exit 0 ;;
X    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
X	echo romp-ibm-bsd4.4
X	exit 0 ;;
X    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
X	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
X	exit 0 ;;                           # report: romp-ibm BSD 4.3
X    *:BOSX:*:*)
X	echo rs6000-bull-bosx
X	exit 0 ;;
X    DPX/2?00:B.O.S.:*:*)
X	echo m68k-bull-sysv3
X	exit 0 ;;
X    9000/[34]??:4.3bsd:1.*:*)
X	echo m68k-hp-bsd
X	exit 0 ;;
X    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
X	echo m68k-hp-bsd4.4
X	exit 0 ;;
X    9000/[34678]??:HP-UX:*:*)
X	case "${UNAME_MACHINE}" in
X	    9000/31? )            HP_ARCH=m68000 ;;
X	    9000/[34]?? )         HP_ARCH=m68k ;;
X	    9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 | 9000/820 | 9000/800 )
X              sed 's/^              //' << EOF >dummy.c
X              #include <stdlib.h>
X              #include <unistd.h>
X              
X              int main ()
X              {
X              #if defined(_SC_KERNEL_BITS)
X                  long bits = sysconf(_SC_KERNEL_BITS);
X              #endif 
X                  long cpu  = sysconf (_SC_CPU_VERSION);
X              
X                  switch (cpu) 
X              	{
X              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
X              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
X              	case CPU_PA_RISC2_0: 
X              #if defined(_SC_KERNEL_BITS)
X              	    switch (bits) 
X              		{
X              		case 64: puts ("hppa2.0w"); break;
X              		case 32: puts ("hppa2.0n"); break;
X              		default: puts ("hppa2.0"); break;
X              		} break;
X              #else  /* !defined(_SC_KERNEL_BITS) */
X              	    puts ("hppa2.0"); break;
X              #endif 
X              	default: puts ("hppa1.0"); break;
X              	}
X                  exit (0);
X              }
XEOF
X	(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
X	rm -f dummy.c dummy
X	esac
X	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
X	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
X	exit 0 ;;
X    3050*:HI-UX:*:*)
X	sed 's/^	//' << EOF >dummy.c
X	#include <unistd.h>
X	int
X	main ()
X	{
X	  long cpu = sysconf (_SC_CPU_VERSION);
X	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
X	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
X	     results, however.  */
X	  if (CPU_IS_PA_RISC (cpu))
X	    {
X	      switch (cpu)
X		{
X		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
X		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
X		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
X		  default: puts ("hppa-hitachi-hiuxwe2"); break;
X		}
X	    }
X	  else if (CPU_IS_HP_MC68K (cpu))
X	    puts ("m68k-hitachi-hiuxwe2");
X	  else puts ("unknown-hitachi-hiuxwe2");
X	  exit (0);
X	}
XEOF
X	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
X	rm -f dummy.c dummy
X	echo unknown-hitachi-hiuxwe2
X	exit 0 ;;
X    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
X	echo hppa1.1-hp-bsd
X	exit 0 ;;
X    9000/8??:4.3bsd:*:*)
X	echo hppa1.0-hp-bsd
X	exit 0 ;;
X    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
X	echo hppa1.1-hp-osf
X	exit 0 ;;
X    hp8??:OSF1:*:*)
X	echo hppa1.0-hp-osf
X	exit 0 ;;
X    i?86:OSF1:*:*)
X	if [ -x /usr/sbin/sysversion ] ; then
X	    echo ${UNAME_MACHINE}-unknown-osf1mk
X	else
X	    echo ${UNAME_MACHINE}-unknown-osf1
X	fi
X	exit 0 ;;
X    parisc*:Lites*:*:*)
X	echo hppa1.1-hp-lites
X	exit 0 ;;
X    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
X	echo c1-convex-bsd
X        exit 0 ;;
X    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
X	if getsysinfo -f scalar_acc
X	then echo c32-convex-bsd
X	else echo c2-convex-bsd
X	fi
X        exit 0 ;;
X    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
X	echo c34-convex-bsd
X        exit 0 ;;
X    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
X	echo c38-convex-bsd
X        exit 0 ;;
X    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
X	echo c4-convex-bsd
X        exit 0 ;;
X    CRAY*X-MP:*:*:*)
X	echo xmp-cray-unicos
X        exit 0 ;;
X    CRAY*Y-MP:*:*:*)
X	echo ymp-cray-unicos${UNAME_RELEASE}
X	exit 0 ;;
X    CRAY*[A-Z]90:*:*:*)
X	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
X	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
X	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
X	exit 0 ;;
X    CRAY*TS:*:*:*)
X	echo t90-cray-unicos${UNAME_RELEASE}
X	exit 0 ;;
X    CRAY-2:*:*:*)
X	echo cray2-cray-unicos
X        exit 0 ;;
X    F300:UNIX_System_V:*:*)
X        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
X        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
X        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
X        exit 0 ;;
X    F301:UNIX_System_V:*:*)
X       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
X       exit 0 ;;
X    hp3[0-9][05]:NetBSD:*:*)
X	echo m68k-hp-netbsd${UNAME_RELEASE}
X	exit 0 ;;
X    hp300:OpenBSD:*:*)
X	echo m68k-unknown-openbsd${UNAME_RELEASE}
X	exit 0 ;;
X    sparc*:BSD/OS:*:*)
X	echo sparc-unknown-bsdi${UNAME_RELEASE}
X	exit 0 ;;
X    i?86:BSD/386:*:* | *:BSD/OS:*:*)
X	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
X	exit 0 ;;
X    *:FreeBSD:*:*)
X	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
X	exit 0 ;;
X    *:DragonFly:*:*)
X	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
X	exit 0 ;;
X    *:NetBSD:*:*)
X	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
X	exit 0 ;;
X    *:OpenBSD:*:*)
X	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
X	exit 0 ;;
X    i*:CYGWIN*:*)
X	echo ${UNAME_MACHINE}-pc-cygwin
X	exit 0 ;;
X    i*:MINGW*:*)
X	echo ${UNAME_MACHINE}-pc-mingw32
X	exit 0 ;;
X    p*:CYGWIN*:*)
X	echo powerpcle-unknown-cygwin
X	exit 0 ;;
X    x86:Interix*:3*)
X	echo i586-pc-interix3
X	exit 0 ;;
X    prep*:SunOS:5.*:*)
X	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
X	exit 0 ;;
X    *:GNU:*:*)
X	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
X	exit 0 ;;
X    s390:Linux:*:* | s390x:Linux:*:*)
X	echo ${UNAME_MACHINE}-ibm-linux
X	exit 0 ;;
X    *:Linux:*:*)
X	# uname on the ARM produces all sorts of strangeness, and we need to
X	# filter it out.
X	case "$UNAME_MACHINE" in
X	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
X	esac
X
X	# The BFD linker knows what the default object file format is, so
X	# first see if it will tell us.
X	ld_help_string=`ld --help 2>&1`
X	ld_supported_emulations=`echo $ld_help_string \
X			 | sed -ne '/supported emulations:/!d
X				    s/[ 	][ 	]*/ /g
X				    s/.*supported emulations: *//
X				    s/ .*//
X				    p'`
X        case "$ld_supported_emulations" in
X	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
X	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
X	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
X	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
X	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
X	  elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
X	esac
X
X	if test "${UNAME_MACHINE}" = "alpha" ; then
X		sed 's/^	//'  <<EOF >dummy.s
X		.globl main
X		.ent main
X	main:
X		.frame \$30,0,\$26,0
X		.prologue 0
X		.long 0x47e03d80 # implver $0
X		lda \$2,259
X		.long 0x47e20c21 # amask $2,$1
X		srl \$1,8,\$2
X		sll \$2,2,\$2
X		sll \$0,3,\$0
X		addl \$1,\$0,\$0
X		addl \$2,\$0,\$0
X		ret \$31,(\$26),1
X		.end main
XEOF
X		LIBC=""
X		${CC-cc} dummy.s -o dummy 2>/dev/null
X		if test "$?" = 0 ; then
X			./dummy
X			case "$?" in
X			7)
X				UNAME_MACHINE="alpha"
X				;;
X			15)
X				UNAME_MACHINE="alphaev5"
X				;;
X			14)
X				UNAME_MACHINE="alphaev56"
X				;;
X			10)
X				UNAME_MACHINE="alphapca56"
X				;;
X			16)
X				UNAME_MACHINE="alphaev6"
X				;;
X			esac	
X
X			objdump --private-headers dummy | \
X			  grep ld.so.1 > /dev/null
X			if test "$?" = 0 ; then
X				LIBC="libc1"
X			fi
X		fi	
X		rm -f dummy.s dummy
X		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
X	elif test "${UNAME_MACHINE}" = "mips" ; then
X	  cat >dummy.c <<EOF
Xmain(argc, argv)
X     int argc;
X     char *argv[];
X{
X#ifdef __MIPSEB__
X  printf ("%s-unknown-linux-gnu\n", argv[1]);
X#endif
X#ifdef __MIPSEL__
X  printf ("%sel-unknown-linux-gnu\n", argv[1]);
X#endif
X  return 0;
X}
XEOF
X	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
X	  rm -f dummy.c dummy
X	else
X	  # Either a pre-BFD a.out linker (linux-gnuoldld)
X	  # or one that does not give us useful --help.
X	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
X	  # If ld does not provide *any* "supported emulations:"
X	  # that means it is gnuoldld.
X	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
X	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
X
X	  case "${UNAME_MACHINE}" in
X	  i?86)
X	    VENDOR=pc;
X	    ;;
X	  *)
X	    VENDOR=unknown;
X	    ;;
X	  esac
X	  # Determine whether the default compiler is a.out or elf
X	  cat >dummy.c <<EOF
X#include <features.h>
Xmain(argc, argv)
X     int argc;
X     char *argv[];
X{
X#if defined __ELF__ || defined __SUNPRO_C
X# ifdef __GLIBC__
X#  if __GLIBC__ >= 2
X    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
X#  else
X    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
X#  endif
X# else
X   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
X# endif
X#else
X  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
X#endif
X  return 0;
X}
XEOF
X	  ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
X	  rm -f dummy.c dummy
X	fi ;;
X# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
X# are messed up and put the nodename in both sysname and nodename.
X    i?86:DYNIX/ptx:4*:*)
X	echo i386-sequent-sysv4
X	exit 0 ;;
X    i?86:UNIX_SV:4.2MP:2.*)
X        # Unixware is an offshoot of SVR4, but it has its own version
X        # number series starting with 2...
X        # I am not positive that other SVR4 systems won't match this,
X	# I just have to hope.  -- rms.
X        # Use sysv4.2uw... so that sysv4* matches it.
X	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
X	exit 0 ;;
X    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
X	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
X		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
X	else
X		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
X	fi
X	exit 0 ;;
X    i?86:MS-DOS:5:50)
X    	# DJGPP v2
X	echo ${UNAME_MACHINE}-pc-msdos
X        exit 0 ;;
X    i?86:*:5:*)
X        # Fixed at (any) Pentium or better
X        UNAME_MACHINE=i586
X        if [ ${UNAME_SYSTEM} = "UnixWare" ] ||
X	   [ ${UNAME_SYSTEM} = "OpenUNIX" ]; then
X            echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
X        else
X            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
X        fi
X        exit 0 ;;
X    i?86:*:3.2:*)
X	if test -f /usr/options/cb.name; then
X		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
X		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
X	elif /bin/uname -X 2>/dev/null >/dev/null ; then
X		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
X		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
X		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
X			&& UNAME_MACHINE=i586
X		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
X	else
X		echo ${UNAME_MACHINE}-pc-sysv32
X	fi
X	exit 0 ;;
X    pc:*:*:*)
X        # uname -m prints for DJGPP always 'pc', but it prints nothing about
X        # the processor, so we play safe by assuming i386.
X	echo i386-pc-msdosdjgpp
X        exit 0 ;;
X    Intel:Mach:3*:*)
X	echo i386-pc-mach3
X	exit 0 ;;
X    paragon:*:*:*)
X	echo i860-intel-osf1
X	exit 0 ;;
X    i860:*:4.*:*) # i860-SVR4
X	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
X	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
X	else # Add other i860-SVR4 vendors below as they are discovered.
X	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
X	fi
X	exit 0 ;;
X    mini*:CTIX:SYS*5:*)
X	# "miniframe"
X	echo m68010-convergent-sysv
X	exit 0 ;;
X    M68*:*:R3V[567]*:*)
X	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
X    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
X	OS_REL=''
X	test -r /etc/.relid \
X	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
X	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
X	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
X	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
X	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
X    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
X        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
X          && echo i486-ncr-sysv4 && exit 0 ;;
X    m68*:LynxOS:2.*:*)
X	echo m68k-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    mc68030:UNIX_System_V:4.*:*)
X	echo m68k-atari-sysv4
X	exit 0 ;;
X    i?86:LynxOS:2.*:*)
X	echo i386-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    TSUNAMI:LynxOS:2.*:*)
X	echo sparc-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
X	echo rs6000-unknown-lynxos${UNAME_RELEASE}
X	exit 0 ;;
X    SM[BE]S:UNIX_SV:*:*)
X	echo mips-dde-sysv${UNAME_RELEASE}
X	exit 0 ;;
X    RM*:SINIX-*:*:*)
X	echo mips-sni-sysv4
X	exit 0 ;;
X    *:SINIX-*:*:*)
X	if uname -p 2>/dev/null >/dev/null ; then
X		UNAME_MACHINE=`(uname -p) 2>/dev/null`
X		echo ${UNAME_MACHINE}-sni-sysv4
X	else
X		echo ns32k-sni-sysv
X	fi
X	exit 0 ;;
X    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
X                           # says <Richard.M.Bartel@ccMail.Census.GOV>
X        echo i586-unisys-sysv4
X        exit 0 ;;
X    *:UNIX_System_V:4*:FTX*)
X	# From Gerald Hewes <hewes@openmarket.com>.
X	# How about differentiating between stratus architectures? -djm
X	echo hppa1.1-stratus-sysv4
X	exit 0 ;;
X    *:*:*:FTX*)
X	# From seanf@swdc.stratus.com.
X	echo i860-stratus-sysv4
X	exit 0 ;;
X    mc68*:A/UX:*:*)
X	echo m68k-apple-aux${UNAME_RELEASE}
X	exit 0 ;;
X    news*:NEWS-OS:*:6*)
X	echo mips-sony-newsos6
X	exit 0 ;;
X    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
X	if [ -d /usr/nec ]; then
X	        echo mips-nec-sysv${UNAME_RELEASE}
X	else
X	        echo mips-unknown-sysv${UNAME_RELEASE}
X	fi
X        exit 0 ;;
X    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
X	echo powerpc-be-beos
X	exit 0 ;;
X    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
X	echo powerpc-apple-beos
X	exit 0 ;;
X    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
X	echo i586-pc-beos
X	exit 0 ;;
X    BeMac:Haiku:*:*)
X	echo powerpc-apple-haiku
X	exit ;;
X    BePC:Haiku:*:*)
X	echo i586-pc-haiku
X	exit ;;
X    "Power Macintosh":Rhapsody:*)
X	echo powerpc-apple-rhapsody${UNAME_RELEASE}
X	exit 0 ;;
X    "Power Macintosh":"Mac OS":*)
X	echo powerpc-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    "Power Macintosh":"Darwin":*)
X	echo powerpc-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    "i386":"Darwin":*)
X	echo i386-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    "x86":"Darwin":*)
X	echo i386-apple-macosx${UNAME_RELEASE}
X	exit 0 ;;
X    *:OS/2:*:*)
X        echo "i386-pc-os2_emx"
X	exit 0;;
X    *:OpenVMS:*:*)
X	UNAME_PROCESSOR=`uname -p | tr [A-Z] [a-z]`
X	echo "${UNAME_PROCESSOR}-hp-openvms"
X	exit 0;;
Xesac
X
X#echo '(No uname command or uname output not recognized.)' 1>&2
X#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
X
Xcat >dummy.c <<EOF
X#ifdef _SEQUENT_
X# include <sys/types.h>
X# include <sys/utsname.h>
X#endif
Xmain ()
X{
X#if defined (sony)
X#if defined (MIPSEB)
X  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
X     I don't know....  */
X  printf ("mips-sony-bsd\n"); exit (0);
X#else
X#include <sys/param.h>
X  printf ("m68k-sony-newsos%s\n",
X#ifdef NEWSOS4
X          "4"
X#else
X	  ""
X#endif
X         ); exit (0);
X#endif
X#endif
X
X#if defined (__arm) && defined (__acorn) && defined (__unix)
X  printf ("arm-acorn-riscix"); exit (0);
X#endif
X
X#if defined (hp300) && !defined (hpux)
X  printf ("m68k-hp-bsd\n"); exit (0);
X#endif
X
X#if defined (NeXT)
X#if !defined (__ARCHITECTURE__)
X#define __ARCHITECTURE__ "m68k"
X#endif
X  int version;
X  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
X  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
X  exit (0);
X#endif
X
X#if defined (MULTIMAX) || defined (n16)
X#if defined (UMAXV)
X  printf ("ns32k-encore-sysv\n"); exit (0);
X#else
X#if defined (CMU)
X  printf ("ns32k-encore-mach\n"); exit (0);
X#else
X  printf ("ns32k-encore-bsd\n"); exit (0);
X#endif
X#endif
X#endif
X
X#if defined (__386BSD__)
X  printf ("i386-pc-bsd\n"); exit (0);
X#endif
X
X#if defined (sequent)
X#if defined (i386)
X  printf ("i386-sequent-dynix\n"); exit (0);
X#endif
X#if defined (ns32000)
X  printf ("ns32k-sequent-dynix\n"); exit (0);
X#endif
X#endif
X
X#if defined (_SEQUENT_)
X    struct utsname un;
X
X    uname(&un);
X
X    if (strncmp(un.version, "V2", 2) == 0) {
X	printf ("i386-sequent-ptx2\n"); exit (0);
X    }
X    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
X	printf ("i386-sequent-ptx1\n"); exit (0);
X    }
X    printf ("i386-sequent-ptx\n"); exit (0);
X
X#endif
X
X#if defined (vax)
X#if !defined (ultrix)
X  printf ("vax-dec-bsd\n"); exit (0);
X#else
X  printf ("vax-dec-ultrix\n"); exit (0);
X#endif
X#endif
X
X#if defined (alliant) && defined (i860)
X  printf ("i860-alliant-bsd\n"); exit (0);
X#endif
X
X  exit (1);
X}
XEOF
X
X${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
Xrm -f dummy.c dummy
X
X# Apollos put the system type in the environment.
X
Xtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
X
X# Convex versions that predate uname can use getsysinfo(1)
X
Xif [ -x /usr/convex/getsysinfo ]
Xthen
X    case `getsysinfo -f cpu_type` in
X    c1*)
X	echo c1-convex-bsd
X	exit 0 ;;
X    c2*)
X	if getsysinfo -f scalar_acc
X	then echo c32-convex-bsd
X	else echo c2-convex-bsd
X	fi
X	exit 0 ;;
X    c34*)
X	echo c34-convex-bsd
X	exit 0 ;;
X    c38*)
X	echo c38-convex-bsd
X	exit 0 ;;
X    c4*)
X	echo c4-convex-bsd
X	exit 0 ;;
X    esac
Xfi
X
Xif [ x$CONFIG_NOFAIL = xTRUE ]; then
X	echo unknownCPU-unknownMFR-unknownOS
X	exit 0
Xfi
X
X#echo '(Unable to guess system type)' 1>&2
X
Xexit 1
END-of-star-1.5.2/autoconf/config.guess
echo x - star-1.5.2/autoconf/config.sub
sed 's/^X//' >star-1.5.2/autoconf/config.sub << 'END-of-star-1.5.2/autoconf/config.sub'
X#! /bin/sh
X# @(#)config.sub	1.9 09/09/15 Copyright 1999-2009 J. Schilling
X#
X# Configuration validation subroutine script, version 1.1.
X#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
X# This file is (in principle) common to ALL GNU software.
X# The presence of a machine in this file suggests that SOME GNU software
X# can handle that machine.  It does not imply ALL GNU software can.
X#
X# This file is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 59 Temple Place - Suite 330,
X# Boston, MA 02111-1307, USA.
X
X# As a special exception to the GNU General Public License, if you
X# distribute this file as part of a program that contains a
X# configuration script generated by Autoconf, you may include it under
X# the same distribution terms that you use for the rest of that program.
X
X# Configuration subroutine to validate and canonicalize a configuration type.
X# Supply the specified configuration type as an argument.
X# If it is invalid, we print an error message on stderr and exit with code 1.
X# Otherwise, we print the canonical config type on stdout and succeed.
X
X# This file is supposed to be the same for all GNU packages
X# and recognize all the CPU types, system types and aliases
X# that are meaningful with *any* GNU software.
X# Each package is responsible for reporting which valid configurations
X# it does not support.  The user should be able to distinguish
X# a failure to support a valid configuration from a meaningless
X# configuration.
X
X# The goal of this file is to map all the various variations of a given
X# machine specification into a single specification in the form:
X#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
X# or in some cases, the newer four-part form:
X#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
X# It is wrong to echo any other type of specification.
X
Xif [ x$1 = x ]
Xthen
X	echo Configuration name missing. 1>&2
X	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
X	echo "or     $0 ALIAS" 1>&2
X	echo where ALIAS is a recognized configuration type. 1>&2
X	exit 1
Xfi
X
X# First pass through any local machine types.
Xcase $1 in
X	*local*)
X		echo $1
X		exit 0
X		;;
X	*)
X	;;
Xesac
X
X# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
X# Here we must recognize all the valid KERNEL-OS combinations.
Xmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
Xcase $maybe_os in
X  linux-gnu*)
X    os=-$maybe_os
X    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
X    ;;
X  *)
X    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
X    if [ $basic_machine != $1 ]
X    then os=`echo $1 | sed 's/.*-/-/'`
X    else os=; fi
X    ;;
Xesac
X
X### Let's recognize common machines as not being operating systems so
X### that things like config.sub decstation-3100 work.  We also
X### recognize some manufacturers as not being operating systems, so we
X### can provide default operating systems below.
Xcase $os in
X	-sun*os*)
X		# Prevent following clause from handling this invalid input.
X		;;
X	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
X	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
X	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
X	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
X	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
X	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
X	-apple)
X		os=
X		basic_machine=$1
X		;;
X	-hiux*)
X		os=-hiuxwe2
X		;;
X	-sco5)
X		os=sco3.2v5
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco4)
X		os=-sco3.2v4
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco3.2.[4-9]*)
X		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco3.2v[4-9]*)
X		# Don't forget version if it is 3.2v4 or newer.
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-sco*)
X		os=-sco3.2v2
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-isc)
X		os=-isc2.2
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-clix*)
X		basic_machine=clipper-intergraph
X		;;
X	-isc*)
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
X		;;
X	-lynx*)
X		os=-lynxos
X		;;
X	-ptx*)
X		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
X		;;
X	-windowsnt*)
X		os=`echo $os | sed -e 's/windowsnt/winnt/'`
X		;;
X	-psos*)
X		os=-psos
X		;;
Xesac
X
X# Decode aliases for certain CPU-COMPANY combinations.
Xcase $basic_machine in
X	# Recognize the basic CPU types without company name.
X	# Some are omitted here because they have special meanings below.
X	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
X		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
X		| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0? \
X		| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
X		| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
X		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
X		| mipstx39 | mipstx39el \
X		| sparc | sparclet | sparclite | sparc64 | v850)
X		basic_machine=$basic_machine-unknown
X		;;
X
X	# We use `pc' rather than `unknown'
X	# because (1) that's what they normally are, and
X	# (2) the word "unknown" tends to confuse beginning users.
X	i[34567]86)
X	  basic_machine=$basic_machine-pc
X	  ;;
X	# Object if more than one company name word.
X	*-*-*)
X		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
X		exit 1
X		;;
X	# Recognize the basic CPU types with company name.
X	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
X	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
X	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
X	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
X	      | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0?-* \
X	      | ia64-* \
X	      | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \
X	      | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
X	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
X	      | sparc64-* | mips64-* | mipsel-* \
X	      | mips64el-* | mips64orion-* | mips64orionel-*  \
X	      | mipstx39-* | mipstx39el-* \
X	      | f301-* \
X	      | x86-* | x86_64-* | amd64-*)
X		;;
X	# Recognize the various machine names and aliases which stand
X	# for a CPU type and a company and sometimes even an OS.
X	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
X		basic_machine=m68000-att
X		;;
X	3b*)
X		basic_machine=we32k-att
X		;;
X	alliant | fx80)
X		basic_machine=fx80-alliant
X		;;
X	altos | altos3068)
X		basic_machine=m68k-altos
X		;;
X	am29k)
X		basic_machine=a29k-none
X		os=-bsd
X		;;
X	amdahl)
X		basic_machine=580-amdahl
X		os=-sysv
X		;;
X	amiga | amiga-*)
X		basic_machine=m68k-cbm
X		;;
X	amigaos | amigados)
X		basic_machine=m68k-cbm
X		os=-amigaos
X		;;
X	amigaunix | amix)
X		basic_machine=m68k-cbm
X		os=-sysv4
X		;;
X	apollo68)
X		basic_machine=m68k-apollo
X		os=-sysv
X		;;
X	aux)
X		basic_machine=m68k-apple
X		os=-aux
X		;;
X	balance)
X		basic_machine=ns32k-sequent
X		os=-dynix
X		;;
X	convex-c1)
X		basic_machine=c1-convex
X		os=-bsd
X		;;
X	convex-c2)
X		basic_machine=c2-convex
X		os=-bsd
X		;;
X	convex-c32)
X		basic_machine=c32-convex
X		os=-bsd
X		;;
X	convex-c34)
X		basic_machine=c34-convex
X		os=-bsd
X		;;
X	convex-c38)
X		basic_machine=c38-convex
X		os=-bsd
X		;;
X	cray | ymp)
X		basic_machine=ymp-cray
X		os=-unicos
X		;;
X	cray2)
X		basic_machine=cray2-cray
X		os=-unicos
X		;;
X	[ctj]90-cray)
X		basic_machine=c90-cray
X		os=-unicos
X		;;
X	crds | unos)
X		basic_machine=m68k-crds
X		;;
X	da30 | da30-*)
X		basic_machine=m68k-da30
X		;;
X	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
X		basic_machine=mips-dec
X		;;
X	delta | 3300 | motorola-3300 | motorola-delta \
X	      | 3300-motorola | delta-motorola)
X		basic_machine=m68k-motorola
X		;;
X	delta88)
X		basic_machine=m88k-motorola
X		os=-sysv3
X		;;
X	dpx20 | dpx20-*)
X		basic_machine=rs6000-bull
X		os=-bosx
X		;;
X	dpx2* | dpx2*-bull)
X		basic_machine=m68k-bull
X		os=-sysv3
X		;;
X	ebmon29k)
X		basic_machine=a29k-amd
X		os=-ebmon
X		;;
X	elxsi)
X		basic_machine=elxsi-elxsi
X		os=-bsd
X		;;
X	encore | umax | mmax)
X		basic_machine=ns32k-encore
X		;;
X	fx2800)
X		basic_machine=i860-alliant
X		;;
X	genix)
X		basic_machine=ns32k-ns
X		;;
X	gmicro)
X		basic_machine=tron-gmicro
X		os=-sysv
X		;;
X	h3050r* | hiux*)
X		basic_machine=hppa1.1-hitachi
X		os=-hiuxwe2
X		;;
X	h8300hms)
X		basic_machine=h8300-hitachi
X		os=-hms
X		;;
X	harris)
X		basic_machine=m88k-harris
X		os=-sysv3
X		;;
X	hp300-*)
X		basic_machine=m68k-hp
X		;;
X	hp300bsd)
X		basic_machine=m68k-hp
X		os=-bsd
X		;;
X	hp300hpux)
X		basic_machine=m68k-hp
X		os=-hpux
X		;;
X	hp9k2[0-9][0-9] | hp9k31[0-9])
X		basic_machine=m68000-hp
X		;;
X	hp9k3[2-9][0-9])
X		basic_machine=m68k-hp
X		;;
X	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
X		basic_machine=hppa1.1-hp
X		;;
X	hp9k8[0-9][0-9] | hp8[0-9][0-9])
X		basic_machine=hppa1.0-hp
X		;;
X	hppa-next)
X		os=-nextstep3
X		;;
X	i370-ibm* | ibm*)
X		basic_machine=i370-ibm
X		os=-mvs
X		;;
X# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
X	i[34567]86v32)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-sysv32
X		;;
X	i[34567]86v4*)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-sysv4
X		;;
X	i[34567]86v)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-sysv
X		;;
X	i[34567]86sol2)
X		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
X		os=-solaris2
X		;;
X	iris | iris4d)
X		basic_machine=mips-sgi
X		case $os in
X		    -irix*)
X			;;
X		    *)
X			os=-irix4
X			;;
X		esac
X		;;
X	isi68 | isi)
X		basic_machine=m68k-isi
X		os=-sysv
X		;;
X	m88k-omron*)
X		basic_machine=m88k-omron
X		;;
X	magnum | m3230)
X		basic_machine=mips-mips
X		os=-sysv
X		;;
X	merlin)
X		basic_machine=ns32k-utek
X		os=-sysv
X		;;
X	miniframe)
X		basic_machine=m68000-convergent
X		;;
X	mipsel*-linux*)
X		basic_machine=mipsel-unknown
X		os=-linux-gnu
X		;;
X	mips*-linux*)
X		basic_machine=mips-unknown
X		os=-linux-gnu
X		;;
X	mips3*-*)
X		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
X		;;
X	mips3*)
X		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
X		;;
X	ncr3000)
X		basic_machine=i486-ncr
X		os=-sysv4
X		;;
X	news | news700 | news800 | news900)
X		basic_machine=m68k-sony
X		os=-newsos
X		;;
X	news1000)
X		basic_machine=m68030-sony
X		os=-newsos
X		;;
X	news-3600 | risc-news)
X		basic_machine=mips-sony
X		os=-newsos
X		;;
X	next | m*-next )
X		basic_machine=m68k-next
X		case $os in
X		    -nextstep* )
X			;;
X		    -ns2*)
X		      os=-nextstep2
X			;;
X		    *)
X		      os=-nextstep3
X			;;
X		esac
X		;;
X	nh3000)
X		basic_machine=m68k-harris
X		os=-cxux
X		;;
X	nh[45]000)
X		basic_machine=m88k-harris
X		os=-cxux
X		;;
X	nindy960)
X		basic_machine=i960-intel
X		os=-nindy
X		;;
X	np1)
X		basic_machine=np1-gould
X		;;
X	pa-hitachi)
X		basic_machine=hppa1.1-hitachi
X		os=-hiuxwe2
X		;;
X	paragon)
X		basic_machine=i860-intel
X		os=-osf
X		;;
X	parisc-unknown)
X		basic_machine=parisc-unknown
X		;;
X	pbd)
X		basic_machine=sparc-tti
X		;;
X	pbb)
X		basic_machine=m68k-tti
X		;;
X        pc532 | pc532-*)
X		basic_machine=ns32k-pc532
X		;;
X	pentium | p5 | k5 | nexen)
X		basic_machine=i586-pc
X		;;
X	pentiumpro | p6 | k6 | 6x86)
X		basic_machine=i686-pc
X		;;
X	pentiumii | pentium2)
X		basic_machine=i786-pc
X		;;
X	pentium-* | p5-* | k5-* | nexen-*)
X		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	pentiumpro-* | p6-* | k6-* | 6x86-*)
X		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	pentiumii-* | pentium2-*)
X		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	pn)
X		basic_machine=pn-gould
X		;;
X	power)	basic_machine=rs6000-ibm
X		;;
X	ppc)	basic_machine=powerpc-unknown
X	        ;;
X	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	ppcle | powerpclittle | ppc-le | powerpc-little)
X		basic_machine=powerpcle-unknown
X	        ;;
X	ppcle-* | powerpclittle-*)
X		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
X		;;
X	ps2)
X		basic_machine=i386-ibm
X		;;
X	rm[46]00)
X		basic_machine=mips-siemens
X		;;
X	rtpc | rtpc-*)
X		basic_machine=romp-ibm
X		;;
X	s390 | s390-*)
X		basic_machine=s390-ibm
X		;;
X	s390x | s390x-*)
X		basic_machine=s390x-ibm
X		;;
X	sequent)
X		basic_machine=i386-sequent
X		;;
X	sh)
X		basic_machine=sh-hitachi
X		os=-hms
X		;;
X	sps7)
X		basic_machine=m68k-bull
X		os=-sysv2
X		;;
X	spur)
X		basic_machine=spur-unknown
X		;;
X	sun2)
X		basic_machine=m68000-sun
X		;;
X	sun2os3)
X		basic_machine=m68000-sun
X		os=-sunos3
X		;;
X	sun2os4)
X		basic_machine=m68000-sun
X		os=-sunos4
X		;;
X	sun3os3)
X		basic_machine=m68k-sun
X		os=-sunos3
X		;;
X	sun3os4)
X		basic_machine=m68k-sun
X		os=-sunos4
X		;;
X	sun4os3)
X		basic_machine=sparc-sun
X		os=-sunos3
X		;;
X	sun4os4)
X		basic_machine=sparc-sun
X		os=-sunos4
X		;;
X	sun4sol2)
X		basic_machine=sparc-sun
X		os=-solaris2
X		;;
X	sun3 | sun3-*)
X		basic_machine=m68k-sun
X		;;
X	sun4)
X		basic_machine=sparc-sun
X		;;
X	sun386 | sun386i | roadrunner)
X		basic_machine=i386-sun
X		;;
X	symmetry)
X		basic_machine=i386-sequent
X		os=-dynix
X		;;
X	tx39)
X		basic_machine=mipstx39-unknown
X		;;
X	tx39el)
X		basic_machine=mipstx39el-unknown
X		;;
X	tower | tower-32)
X		basic_machine=m68k-ncr
X		;;
X	udi29k)
X		basic_machine=a29k-amd
X		os=-udi
X		;;
X	ultra3)
X		basic_machine=a29k-nyu
X		os=-sym1
X		;;
X	vaxv)
X		basic_machine=vax-dec
X		os=-sysv
X		;;
X	vms)
X		basic_machine=vax-dec
X		os=-vms
X		;;
X	vpp*|vx|vx-*)
X               basic_machine=f301-fujitsu
X               ;;
X	vxworks960)
X		basic_machine=i960-wrs
X		os=-vxworks
X		;;
X	vxworks68)
X		basic_machine=m68k-wrs
X		os=-vxworks
X		;;
X	vxworks29k)
X		basic_machine=a29k-wrs
X		os=-vxworks
X		;;
X	xmp)
X		basic_machine=xmp-cray
X		os=-unicos
X		;;
X        xps | xps100)
X		basic_machine=xps100-honeywell
X		;;
X	none)
X		basic_machine=none-none
X		os=-none
X		;;
X
X# Here we handle the default manufacturer of certain CPU types.  It is in
X# some cases the only manufacturer, in others, it is the most popular.
X	mips)
X		if [ x$os = x-linux-gnu ]; then
X			basic_machine=mips-unknown
X		else
X			basic_machine=mips-mips
X		fi
X		;;
X	romp)
X		basic_machine=romp-ibm
X		;;
X	rs6000)
X		basic_machine=rs6000-ibm
X		;;
X	vax)
X		basic_machine=vax-dec
X		;;
X	pdp11)
X		basic_machine=pdp11-dec
X		;;
X	we32k)
X		basic_machine=we32k-att
X		;;
X	sparc)
X		basic_machine=sparc-sun
X		;;
X        cydra)
X		basic_machine=cydra-cydrome
X		;;
X	orion)
X		basic_machine=orion-highlevel
X		;;
X	orion105)
X		basic_machine=clipper-highlevel
X		;;
X	*)
X		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
X		exit 1
X		;;
Xesac
X
X# Here we canonicalize certain aliases for manufacturers.
Xcase $basic_machine in
X	*-digital*)
X		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
X		;;
X	*-commodore*)
X		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
X		;;
X	*)
X		;;
Xesac
X
X# Decode manufacturer-specific aliases for certain operating systems.
X
Xif [ x"$os" != x"" ]
Xthen
Xcase $os in
X        # First match some system type aliases
X        # that might get confused with valid system types.
X	# -solaris* is a basic system type, with this one exception.
X	-solaris1 | -solaris1.*)
X		os=`echo $os | sed -e 's|solaris1|sunos4|'`
X		;;
X	-solaris)
X		os=-solaris2
X		;;
X	-svr4*)
X		os=-sysv4
X		;;
X	-unixware*)
X		os=-sysv4.2uw
X		;;
X	-gnu/linux*)
X		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
X		;;
X	# First accept the basic system types.
X	# The portable systems comes first.
X	# Each alternative MUST END IN A *, to match a version number.
X	# -sysv* is not here because it comes later, after sysvr4.
X	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
X	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
X	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
X	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
X	      | -aos* \
X	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
X	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
X	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -dragonfly* | -riscix* \
X	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
X	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
X	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
X	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
X	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -os2* \
X	      | -interix* | -uwin* | -mks* | -rhapsody* | -macos* | -haiku* )
X	# Remember, each alternative MUST END IN *, to match a version number.
X		;;
X	-linux*)
X		os=`echo $os | sed -e 's|linux|linux-gnu|'`
X		;;
X	-sunos5*)
X		os=`echo $os | sed -e 's|sunos5|solaris2|'`
X		;;
X	-sunos6*)
X		os=`echo $os | sed -e 's|sunos6|solaris3|'`
X		;;
X	-osfrose*)
X		os=-osfrose
X		;;
X	-osf*)
X		os=-osf
X		;;
X	-utek*)
X		os=-bsd
X		;;
X	-dynix*)
X		os=-bsd
X		;;
X	-acis*)
X		os=-aos
X		;;
X	-ctix* | -uts*)
X		os=-sysv
X		;;
X	-ns2 )
X	        os=-nextstep2
X		;;
X	# Preserve the version number of sinix5.
X	-sinix5.*)
X		os=`echo $os | sed -e 's|sinix|sysv|'`
X		;;
X	-sinix*)
X		os=-sysv4
X		;;
X	-triton*)
X		os=-sysv3
X		;;
X	-oss*)
X		os=-sysv3
X		;;
X	-svr4)
X		os=-sysv4
X		;;
X	-svr3)
X		os=-sysv3
X		;;
X	# For sys5.3 apollo
X	-sys5.3)
X		os=-sysv3
X		;;
X	-sysvr4)
X		os=-sysv4
X		;;
X	# This must come after -sysvr4.
X	-sysv*)
X		;;
X	-xenix)
X		os=-xenix
X		;;
X	-freemint)
X		os=-freemint
X		;;
X	-mint)
X		os=-mint
X		;;
X	-tos)
X		os=-tos
X		;;
X
X	-none)
X		;;
X	*)
X		# Get rid of the `-' at the beginning of $os.
X		os=`echo $os | sed 's/[^-]*-//'`
X		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
X		exit 1
X		;;
Xesac
Xelse
X
X# Here we handle the default operating systems that come with various machines.
X# The value should be what the vendor currently ships out the door with their
X# machine or put another way, the most popular os provided with the machine.
X
X# Note that if you're going to try to match "-MANUFACTURER" here (say,
X# "-sun"), then you have to tell the case statement up towards the top
X# that MANUFACTURER isn't an operating system.  Otherwise, code above
X# will signal an error saying that MANUFACTURER isn't an operating
X# system, and we'll never get to this point.
X
Xcase $basic_machine in
X	*-acorn)
X		os=-riscix1.2
X		;;
X	arm*-semi)
X		os=-aout
X		;;
X        pdp11-*)
X		os=-none
X		;;
X	*-dec | vax-*)
X		os=-ultrix4.2
X		;;
X	m68*-apollo)
X		os=-domain
X		;;
X	i386-sun)
X		os=-sunos4.0.2
X		;;
X	m68000-sun)
X		os=-sunos3
X		# This also exists in the configure program, but was not the
X		# default.
X		# os=-sunos4
X		;;
X	*-tti)	# must be before sparc entry or we get the wrong os.
X		os=-sysv3
X		;;
X	sparc-* | *-sun)
X		os=-sunos4.1.1
X		;;
X	*-be)
X		os=-beos
X		;;
X	*-haiku)
X		os=-haiku
X		;;
X	*-ibm)
X		os=-aix
X		;;
X	*-hp)
X		os=-hpux
X		;;
X	*-hitachi)
X		os=-hiux
X		;;
X	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
X		os=-sysv
X		;;
X	*-cbm)
X		os=-amigaos
X		;;
X	*-dg)
X		os=-dgux
X		;;
X	*-dolphin)
X		os=-sysv3
X		;;
X	m68k-ccur)
X		os=-rtu
X		;;
X	m88k-omron*)
X		os=-luna
X		;;
X	*-next )
X		os=-nextstep
X		;;
X	*-sequent)
X		os=-ptx
X		;;
X	*-crds)
X		os=-unos
X		;;
X	*-ns)
X		os=-genix
X		;;
X	i370-*)
X		os=-mvs
X		;;
X	*-next)
X		os=-nextstep3
X		;;
X        *-gould)
X		os=-sysv
X		;;
X        *-highlevel)
X		os=-bsd
X		;;
X	*-encore)
X		os=-bsd
X		;;
X        *-sgi)
X		os=-irix
X		;;
X        *-siemens)
X		os=-sysv4
X		;;
X	*-masscomp)
X		os=-rtu
X		;;
X	f301-fujitsu)
X		os=-uxpv
X		;;
X	*)
X		os=-none
X		;;
Xesac
Xfi
X
X# Here we handle the case where we know the os, and the CPU type, but not the
X# manufacturer.  We pick the logical manufacturer.
Xvendor=unknown
Xcase $basic_machine in
X	*-unknown)
X		case $os in
X			-riscix*)
X				vendor=acorn
X				;;
X			-sunos*)
X				vendor=sun
X				;;
X			-aix*)
X				vendor=ibm
X				;;
X			-hpux*)
X				vendor=hp
X				;;
X			-hiux*)
X				vendor=hitachi
X				;;
X			-unos*)
X				vendor=crds
X				;;
X			-dgux*)
X				vendor=dg
X				;;
X			-luna*)
X				vendor=omron
X				;;
X			-genix*)
X				vendor=ns
X				;;
X			-mvs*)
X				vendor=ibm
X				;;
X			-ptx*)
X				vendor=sequent
X				;;
X			-vxsim* | -vxworks*)
X				vendor=wrs
X				;;
X			-aux*)
X				vendor=apple
X				;;
X		esac
X		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
X		;;
Xesac
X
Xecho $basic_machine$os
END-of-star-1.5.2/autoconf/config.sub
echo x - star-1.5.2/autoconf/configure.in
sed 's/^X//' >star-1.5.2/autoconf/configure.in << 'END-of-star-1.5.2/autoconf/configure.in'
Xdnl @(#)configure.in	1.243 11/11/22 Copyright 1998-2011 J. Schilling
Xdnl Process this file with autoconf to produce a configure script.
XAC_REVISION(1.243)dnl
X
Xdnl AC_INIT(xconfig.h.in)
XAC_INIT(config.guess)
XAC_CONFIG_HEADER(xconfig.h)
XAC_CANONICAL_HOST
X
Xdnl Checks for programs.
XAC_SHELL_BASH
XAC_BIN_SHELL_BASH
XAC_SHELL_CE_BROKEN
XAC_BIN_SHELL_CE_BROKEN
XAC_BIN_SHELL_BOSH
XAC_OPT_SCHILY_BIN_SHELL_BOSH
Xdnl CC=${CC-cc}
Xdnl AC_PROG_CC
XAC_CHECK_PROG(CC, cc, cc, gcc)	dnl we default to cc not gcc
Xdnl The cross compile concepts from GNU autoconf are not usable.
Xdnl We permit to execute test programs on a remote machine while
Xdnl running "configure" in a cross compile environment.
XAC_PROG_CC			dnl now check for cross compiling
Xdnl cross_compiling=remote	dnl disable GNU cross compile "defaults"
Xdnl rmtcall="$CONFIG_RMTCALL"	dnl enable script for remote execution
Xdnl remote execution of test programs may be set up with:
Xdnl CONFIG_RMTCALL=script-path
Xdnl and
Xdnl CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host
Xdnl If AC_PROG_CC detects a cross compiler and CONFIG_RMTCALL is set, then
Xdnl all test programs are automatically transferred to the test machine
Xdnl and run on that machine.
XAC_REMOTE_PARMS			dnl check for correct remote parameters
XAC_OBJEXT
XAC_EXEEXT
XAC_PROG_CPP
XAC_PROG_CPPX
XAC_SUN_CC64_OPT
XAC_HP_CC_ANSI_OPT
XAC_HP_CC_OPT_OPT
XAC_HP_CC_GPROF_OPT
Xdnl AC_PROG_INSTALL
XAC_PROG_RANLIB
XAC_PROG_MAKE_SET
XAC_CHECK_PROGS(YACC, yacc 'bison -y' byacc, noyacc)
XAC_CHECK_PROGS(BISON, bison, nobison)
X
Xdnl Checks for header files.
XAC_HEADER_STDC
XAC_CHECK_HEADERS(stdarg.h stdlib.h string.h float.h)	dnl AC_HEADER_STDC in particular
XAC_HEADER_INTTYPES
XAC_HEADER_STDINT
Xac_xsave_LIBS="$LIBS"
XLIBS=""
XAC_HEADER_DIRENT
Xlib_dir="$LIBS"
XLIBS="$ac_xsave_LIBS"
XAC_HEADER_STAT
XAC_HEADER_TIME
XAC_HEADER_SYS_WAIT
Xdnl check whether select() needs sys/select.h
XAC_HEADER_SYS_SELECT
Xdnl check whether select() needs sys/socket.h (BeOS)
XAC_HEADER_SELECT2
XAC_CHECK_HEADERS(assert.h)
XAC_CHECK_HEADERS(stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h io.h sys/file.h)
XAC_CHECK_HEADERS(conio.h)
XAC_CHECK_HEADERS(getopt.h)
XAC_CHECK_HEADERS(limits.h)
XAC_CHECK_HEADERS(a.out.h aouthdr.h elf.h)
XAC_CHECK_HEADERS(sysexits.h)
XAC_CHECK_HEADERS(malloc.h sgtty.h termios.h termio.h)
XAC_CHECK_HEADERS(pwd.h grp.h sys/acl.h acllib.h acl/libacl.h)
XAC_CHECK_HEADERS(signal.h siginfo.h sys/siginfo.h ucontext.h)
XAC_CHECK_HEADERS(shadow.h syslog.h)
XAC_CHECK_HEADERS(sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h)
XAC_CHECK_HEADERS(sys/syscall.h)
XAC_CHECK_HEADERS(mach/machine.h)
XAC_CHECK_HEADERS(mntent.h sys/mntent.h sys/mnttab.h sys/mount.h)
XAC_CHECK_HEADERS(sys/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h libproc.h)
XAC_CHECK_HEADERS(ulimit.h)
XAC_CHECK_HEADERS(process.h)
XAC_CHECK_HEADERS(sys/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h)
XAC_CHECK_HEADERS(sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h)
XAC_CHECK_HEADERS(sys/shm.h sys/sem.h sys/ipc.h)
XAC_CHECK_HEADERS(sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h)
XAC_CHECK_HEADERS(sys/types.h sys/stat.h types.h stat.h)
XAC_CHECK_HEADERS(sys/stypes.h sys/filedesc.h)
XAC_CHECK_HEADERS(sys/acct.h)
XAC_CHECK_HEADERS(poll.h sys/poll.h sys/select.h)
XAC_CHECK_HEADERS(netdb.h sys/socket.h netinet/in.h stropts.h)
XAC_CHECK_HEADERS(ieeefp.h fp.h)
XAC_CHECK_HEADERS(values.h float.h math.h)
XAC_CHECK_HEADERS(arpa/inet.h)
XAC_CHECK_HEADERS(bsd/dev/scsireg.h)
Xdnl Check for HP-UX sys/bsdtty.h (needed for TIOCGPGRP)
XAC_CHECK_HEADERS(sys/bsdtty.h)
Xdnl Check for Linux kernel definitions
XAC_CHECK_HEADERS(scsi/scsi.h scsi/sg.h linux/scsi.h linux.sg.h)
XAC_CHECK_HEADERS(linux/types.h linux/gfp.h asm/types.h)
Xdnl Check for BeOS kernel definitions (e.g. B_PAGE_SIZE)
XAC_CHECK_HEADERS(OS.h)
Xdnl needed for newer OS/2 versions of EMX
XAC_CHECK_HEADERS(os2.h)
XAC_CHECK_HEADERS(os2me.h)
Xdnl Check for MS-Win's junkyard
XAC_CHECK_HEADERS(windows.h)
Xdnl Check for moving Linux targets caused by missing concepts
XAC_CHECK_HEADERS(ext2fs/ext2_fs.h)
Xdnl Check for Linux Extended File Attributes definitions
XAC_CHECK_HEADERS(attr/xattr.h)
Xdnl Check for Mas OS X ac, av, env delarations
XAC_CHECK_HEADERS(crt_externs.h)
XAC_CHECK_HEADERS(fnmatch.h)
XAC_CHECK_HEADERS(libintl.h locale.h langinfo.h nl_types.h)
XAC_CHECK_HEADERS(ctype.h wctype.h wchar.h iconv.h)
XAC_CHECK_HEADERS(priv.h sys/priv.h)
XAC_CHECK_HEADERS(exec_attr.h secdb.h)
XAC_CHECK_HEADERS(direct.h)
XAC_CHECK_HEADERS(pthread.h thread.h)
XAC_CHECK_HEADERS(libgen.h)
XAC_CHECK_HEADERS(regex.h regexp.h regexpr.h)
XAC_CHECK_HEADERS(dlfcn.h link.h dl.h)
X
Xdnl from aclocal.m4 (uses AC_TRY_COMPILE)
XAC_HEADER_MAKEDEV
X
Xdnl don't use GNU original
Xdnl from GNU acspecific.m4 (uses AC_CHECK_HEADER)
Xdnl AC_HEADER_MAJOR
X
XAC_CHECK_MINOR_BITS
XAC_CHECK_MINOR_NONCONTIG
X
XAC_HEADER_USG_STDIO
XAC_HEADER_ERRNO_DEF
XAC_HEADER_ENVIRON_DEF
XAC_HEADER_SYS_SIGLIST_DEF
X
Xdnl Checks for typedefs, structures, and compiler characteristics.
XAC_C_CONST
XAC_C_BIGENDIAN
XAC_C_BITFIELDS
XAC_C_STRINGIZE
XAC_C_INLINE
XAC_TYPE_SIGNAL
XAC_TYPE_GETGROUPS
XAC_TYPE_LONGLONG
XAC_TYPE___INT64
XAC_TYPE_LONGDOUBLE
XAC_TYPE_PROTOTYPES
Xdnl AC_USER_MALLOC must be past AC_CHECK_FUNCS(strdup)
XAC_DYN_ARRAYS
XAC_PRAGMA_WEAK
X
XAC_TYPE_UID_T
XAC_TYPE_SIZE_T
XAC_CHECK_TYPE(ssize_t, int)
XAC_CHECK_TYPE(ptrdiff_t, int)
XAC_TYPE_PID_T
XAC_TYPE_OFF_T
XAC_TYPE_MODE_T
XAC_TYPE_TIME_T
XAC_CHECK_TYPE(caddr_t, char *)
XAC_CHECK_TYPE(daddr_t, long)
XAC_CHECK_TYPE(dev_t, unsigned short)
XAC_CHECK_TYPE(major_t, dev_t)
XAC_CHECK_TYPE(minor_t, dev_t)
XAC_CHECK_TYPE(ino_t, unsigned long)
XAC_CHECK_TYPE(nlink_t, unsigned long)
XAC_CHECK_TYPE(blksize_t, long)
XAC_CHECK_TYPE(blkcnt_t, Intmax_t)
XAC_TYPE_CLOCK_T
XAC_TYPE_SOCKLEN_T
XAC_HAVE_TYPE([#include <sys/frame.h>], greg_t)
XAC_TYPE_STACK_T
XAC_TYPE_SIGINFO_T
X
Xdnl These types are present on all UNIX systems but should be avoided
Xdnl for portability.
Xdnl On Apollo/Domain OS we don't have them....
Xdnl Better include <utypes.h> and use Uchar, Uint & Ulong
XAC_CHECK_TYPE(u_char, unsigned char)
XAC_CHECK_TYPE(u_short, unsigned short)
XAC_CHECK_TYPE(u_int, unsigned int)
XAC_CHECK_TYPE(u_long, unsigned long)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], int8_t, Int8_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], int16_t, Int16_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], int32_t, Int32_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], int64_t, Int64_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], intmax_t, Intmax_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], intptr_t, Intptr_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], uint8_t, UInt8_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], uint16_t, UInt16_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], uint32_t, UInt32_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], uint64_t, UInt64_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], uintmax_t, UIntmax_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_INTTYPES_H
X[#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X], uintptr_t, UIntptr_t)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_WCHAR_H
X[#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], wctype_t, int)
X
XAC_INCL_CHECK_TYPE(
X#ifdef	HAVE_WCHAR_H
X[#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], mbstate_t, int)
X
XAC_CHECK_SIZEOF(char)
XAC_CHECK_SIZEOF(short int)
XAC_CHECK_SIZEOF(int)
XAC_CHECK_SIZEOF(long int)
XAC_CHECK_SIZEOF(long long)
XAC_CHECK_SIZEOF(__int64)
XAC_CHECK_SIZEOF(char *)
X
XAC_CHECK_SIZEOF(unsigned char)
XAC_CHECK_SIZEOF(unsigned short int)
XAC_CHECK_SIZEOF(unsigned int)
XAC_CHECK_SIZEOF(unsigned long int)
XAC_CHECK_SIZEOF(unsigned long long)
XAC_CHECK_SIZEOF(unsigned __int64)
XAC_CHECK_SIZEOF(unsigned char *)
XAC_CHECK_SIZEOF(float)
XAC_CHECK_SIZEOF(double)
XAC_CHECK_SIZEOF(long double)
X
XAC_CHECK_SIZEOF(size_t)
XAC_CHECK_SIZEOF(ssize_t)
XAC_CHECK_SIZEOF(ptrdiff_t)
X
XAC_CHECK_SIZEOF(mode_t)
XAC_CHECK_SIZEOF(uid_t)
XAC_CHECK_SIZEOF(gid_t)
XAC_CHECK_SIZEOF(pid_t)
X
XAC_CHECK_SIZEOF(dev_t)
XAC_CHECK_SIZEOF(major_t)
XAC_CHECK_SIZEOF(minor_t)
X
Xdnl This call must be past AC_CHECK_SIZEOF(long int)
XAC_CHECK_SIZE_TIME_T
XAC_CHECK_SIZE_WCHAR
XAC_CHECK_SIZE_WCHAR_T
X
Xdnl # AC_TYPE_SIZE_T_		# Defines HAVE_SIZE_T / NO_SIZE_T
XAC_TYPE_CHAR
XAC_TYPE_VA_LIST
XAC_HEADER_FILE__FLAGS
XAC_HEADER_FILE__IO_BUF_BASE
XAC_STRUCT_TIMEVAL
XAC_STRUCT_TIMEZONE
XAC_STRUCT_MTGET_TYPE
XAC_STRUCT_MTGET_MODEL
XAC_STRUCT_MTGET_DSREG
XAC_STRUCT_MTGET_DSREG1
XAC_STRUCT_MTGET_DSREG2
XAC_STRUCT_MTGET_GSTAT
XAC_STRUCT_MTGET_ERREG
XAC_STRUCT_MTGET_RESID
XAC_STRUCT_MTGET_FILENO
XAC_STRUCT_MTGET_BLKNO
XAC_STRUCT_MTGET_FLAGS
XAC_STRUCT_MTGET_BF
XAC_STRUCT_RUSAGE
XAC_STRUCT_SI_UTIME
XAC_STRUCT_SOCKADDR_STORAGE
XAC_STRUCT_UNION_SEMUN
XAC_STRUCT_UNION_WAIT
XAC_USE_STRUCT_UNION_WAIT
XAC_STRUCT_ST_SPARE1
XAC_STRUCT_ST_ATIMENSEC
XAC_STRUCT_ST_ATIME_N
XAC_STRUCT_ST_NSEC
XAC_STRUCT_ST__TIM
XAC_STRUCT_ST_ATIMESPEC
XAC_STRUCT_ST_BLKSIZE
XAC_STRUCT_ST_BLOCKS
XAC_STRUCT_ST_FSTYPE
XAC_STRUCT_ST_ACLCNT
XAC_STRUCT_ST_RDEV
XAC_STRUCT_ST_FLAG
XAC_STRUCT_ST_FLAGS
XAC_STRUCT_DIRENT_D_INO
XAC_STRUCT_DIR_DD_FD
XAC_STRUCT_UTSNAME_ARCH
XAC_STRUCT_UTSNAME_PROCESSOR
XAC_STRUCT_UTSNAME_SYSNAME_HOST
XAC_STRUCT_UTSNAME_RELEASE_HOST
XAC_STRUCT_UTSNAME_VERSION_HOST
X
Xdnl Check whether iconv() uses const char ** arguments
XAC_ICONV_CONST
X
Xdnl Check whether we are able to get the address of a function
Xdnl or whether the symbol is declared and usable as rhs
XAC_CHECK_DECLARE([
X#include <sys/types.h>
X#include <sys/stat.h>], stat)
XAC_CHECK_DECLARE([
X#include <sys/types.h>
X#include <sys/stat.h>], lstat)
X
Xdnl Checks for library functions.
XAC_FUNC_WAIT3
XAC_FUNC_MLOCK
XAC_FUNC_MLOCKALL
XAC_FUNC_VA_COPY
XAC_FUNC__VA_COPY
XAC_FUNC_ECVT
XAC_FUNC_FCVT
XAC_FUNC_GCVT
XAC_FUNC_DTOA
XAC_FUNC_DTOA_R
XAC_FUNC_GETPAGESIZE
XjsAC_FUNC_MMAP
XAC_MMAP_SIZEP
XAC_FUNC_SMMAP
XAC_FUNC_SHMGET
XAC_FUNC_ALLOCA
XAC_FUNC_QUOTAIOCTL
XAC_FUNC_FCNTL_LOCKF
XAC_FUNC_UNAME
XAC_CHECK_FUNCS(execl)
XAC_FUNC_VFORK
XAC_FUNC_SYS_SIGLIST
XAC_FUNC_BSD_GETPGRP
XAC_FUNC_BSD_SETPGRP
XAC_FUNC_C99_ISINF
XAC_FUNC_C99_ISNAN
XAC_FUNC_SIGSETJMP
XAC_FUNC_SIGLONGJMP
XAC_FUNC_PRINTF_J
XAC_FUNC_PRINTF_LL
XAC_FUNC_REALLOC_NULL
XAC_CHECK_FUNCS(access eaccess euidaccess)
XAC_CHECK_FUNCS(memchr memcmp memcpy memccpy memmove memset)
XAC_CHECK_FUNCS(brk sbrk strerror nice flock lockf fchdir statvfs quotactl)
XAC_CHECK_FUNCS(realpath resolvepath)
XAC_CHECK_FUNCS(dup dup2)
XAC_CHECK_FUNCS(getcwd shmat semget)
XAC_CHECK_FUNCS(lstat readlink symlink link rename mkfifo mknod)
XAC_CHECK_FUNCS(setreuid setresuid seteuid setuid)
XAC_CHECK_FUNCS(setregid setresgid setegid setgid)
XAC_CHECK_FUNCS(getuid geteuid getgid getegid)
XAC_CHECK_FUNCS(getpid getppid)
XAC_CHECK_FUNCS(getpgid setpgid getsid setsid)
XAC_CHECK_FUNCS(getpgrp setpgrp)
XAC_CHECK_FUNCS(getpwnam getpwent getpwuid setpwent endpwent)
XAC_CHECK_FUNCS(getgrnam getgrent getgrgid setgrent endgrent)
Xdnl			getspwnam() on HP-UX is in libsec.a
XAC_CHECK_FUNCS(getspnam getspwnam)
XAC_CHECK_FUNCS(getlogin)
XAC_CHECK_FUNCS(sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit)
XAC_CHECK_FUNCS(execl execle execlp execv execve execvp)
XAC_CHECK_FUNCS(spawnl spawnle spawnlp spawnlpe)
XAC_CHECK_FUNCS(spawnv spawnve spawnvp spawnvpe)
XAC_CHECK_FUNCS(cwait)
XAC_CHECK_FUNCS(getexecname)
XAC_CHECK_FUNCS(getprogname setprogname)
XAC_CHECK_FUNCS(proc_pidpath)
XAC_CHECK_FUNCS(gethostid gethostname getdomainname getdtablesize)
XAC_CHECK_FUNCS(gettimeofday settimeofday time stime gethrtime)
XAC_CHECK_FUNCS(ftime tzset mktime gmtime localtime timegm timelocal)
XAC_CHECK_FUNCS(ctime cftime ascftime strftime)
XAC_CHECK_FUNCS(poll select isastream)
XAC_CHECK_FUNCS(chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes)
XAC_CHECK_FUNCS(futimens utimensat)
XAC_CHECK_FUNCS(ioctl fcntl)
Xdnl AC_CHECK_FUNCS(ecvt fcvt gcvt)
XAC_CHECK_FUNCS(qecvt qfcvt qgcvt)
XAC_CHECK_FUNCS(_qecvt _qfcvt _qgcvt)
XAC_CHECK_FUNCS(_qecvt_r _qfcvt_r _qgcvt_r)
XAC_CHECK_FUNCS(_ldecvt _ldfcvt _ldgcvt)
XAC_CHECK_FUNCS(ecvt_r fcvt_r gcvt_r)
XAC_CHECK_FUNCS(_ldecvt_r _ldfcvt_r _ldgcvt_r)
XAC_CHECK_FUNCS(econvert fconvert gconvert)
XAC_CHECK_FUNCS(qeconvert qfconvert qgconvert)
XAC_CHECK_FUNCS(isinf isnan)
XAC_CHECK_FUNCS(rand drand48)
XAC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtod)
XAC_CHECK_FUNCS(setpriority DosSetPriority)
XAC_CHECK_FUNCS(DosAllocSharedMem)
XAC_CHECK_FUNCS(getdelim)
XAC_CHECK_FUNCS(seekdir fdopendir)
Xdnl These are POSIX.1 functions (syscalls on Solaris)
XAC_CHECK_FUNCS(openat fstatat fchownat futimesat renameat unlinkat)
Xdnl This is a library function for the Solaris extended attr interface
XAC_CHECK_FUNCS(attropen)
Xdnl This appeared on Solaris 11 Build 63
XAC_CHECK_FUNCS(__accessat)
Xdnl This appeared not yet in POSIX
XAC_CHECK_FUNCS(accessat)
Xdnl This are POSIX extensions not found on Solaris 10
XAC_CHECK_FUNCS(mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat)
XAC_CHECK_FUNCS(pipe _pipe)
XAC_CHECK_FUNCS(popen pclose _popen _pclose)
XAC_CHECK_FUNCS(strsignal str2sig sig2str)
XAC_CHECK_FUNCS(kill killpg)
XAC_CHECK_FUNCS(signal sighold sigrelse sigignore sigpause sigprocmask sigsetmask sigset sigaltstack sigblock)
XAC_CHECK_FUNCS(alarm sleep usleep yield)
Xdnl tcgetattr and tcsetattr are a inline functions in termios.h on Android
XAC_CHECK_DFUNC([
X#ifdef	HAVE_TERMIOS_H
X#include <termios.h>
X#endif
X], tcgetattr)
XAC_CHECK_DFUNC([
X#ifdef	HAVE_TERMIOS_H
X#include <termios.h>
X#endif
X], tcsetattr)
XAC_CHECK_FUNCS(tcgetpgrp tcsetpgrp)
XAC_CHECK_FUNCS(getenv putenv setenv unsetenv)
XAC_CHECK_FUNCS(snprintf strcasecmp strncasecmp)
X
XAC_CHECK_DFUNCS([
X#ifdef	HAVE_STRING_H
X#include <string.h>
X#endif
X], strcat strncat strcmp strncmp strcpy strlcat strlcpy strncpy strdup strndup strlen strnlen strchr strrchr strstr)
XAC_CHECK_DFUNCS([
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X], wcscat wcsncat wcscmp wcsncmp wcscpy wcslcat wcslcpy wcsncpy wcsdup wcsndup wcslen wcsnlen wcschr wcsrchr wcsstr)
X
XAC_CHECK_FUNCS(wcwidth wcswidth wctype iswctype)
XAC_CHECK_FUNCS(basename dirname)
XAC_CHECK_FUNCS(pathconf fpathconf)
XAC_CHECK_FUNCS(malloc calloc valloc realloc memalign posix_memalign)
XAC_CHECK_FUNCS(madvise)
XAC_CHECK_FUNCS(mktemp mkstemp)
XAC_CHECK_FUNCS(chflags fchflags fflagstostr strtofflags)
XAC_CHECK_FUNCS(fnmatch)
XAC_CHECK_FUNCS(truncate ftruncate)
XAC_CHECK_FUNCS(getppriv setppriv priv_set)
XAC_CHECK_FUNCS(getroles privbit_set)
XAC_CHECK_FUNCS(setlocale localeconv nl_langinfo)
XAC_CHECK_FUNCS(setbuf setvbuf)
XAC_CHECK_FUNCS(clone_area create_area delete_area)
X
Xdnl The official POSIX rule is not to define "new" interfaces that
Xdnl are in conflict with older interfaces of the same name.
Xdnl Our interfaces fexec*() have been defined and published in 1982.
Xdnl The new POSIX interfaces define a different interface and the
Xdnl new POSIX interfaces even use names that are not compatible with
Xdnl POSIX rules. The new POSIX interfaces in question should be called
Xdnl fdexec*() to follow the rules of other similar POSIX functions.
Xdnl
Xdnl We use AC_RCHECK_FUNCS() because some Linux distros define a
Xdnl fexecve() that returns ENOSYS an AC_CHECK_FUNCS() would return FALSE
Xdnl
Xecho Checking for POSIX violations by the POSIX.1-2008 standard:
XAC_RCHECK_FUNCS(fexecl fexecle fexecv fexecve)
XAC_RCHECK_FUNCS(fspawnv fspawnl fspawnv_nowait)
X
Xdnl A similar problem exists with the new POSIX.1-2008 interfaces 
Xdnl getline() and fgetline(). These interfaces are also incompatible
Xdnl with our interfaces defined in 1982.
XAC_RCHECK_FUNCS(getline fgetline)
Xecho End of tests for POSIX violations by the POSIX.1-2008 standard.
X
Xdnl Check whether a symbol is either defined in an include file or
Xdnl otherwise usable (e.g. as function)
XAC_CHECK_DFUNC([#include <dirent.h>], dirfd)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], iswprint)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], mbsinit)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X], mbtowc)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X], wctomb)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], mbrtowc)
X
XAC_CHECK_DFUNC([
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X], wcrtomb)
X
XAC_CHECK_DFUNC([#include <ieeefp.h>], finite)
XAC_CHECK_DFUNC([#include <ieeefp.h>], isnand)
X
Xdnl Checks for typedefs, structures, and compiler characteristics.
Xdnl that need results from the AC_CHECK_FUNCS() calls.
XAC_USER_MALLOC
Xdnl AC_USER_XCVT test macro does not yet work
XAC_VAR_TIMEZONE
XAC_VAR_TIMEZONE_DEF
XAC_VAR___PROGNAME
XAC_VAR___PROGNAME_FULL
X
Xdnl Checks for OS characteristics.
XAC_HARD_SYMLINKS
XAC_LINK_NOFOLLOW
XAC_ACCESS_E_OK
XAC_FNMATCH_IGNORECASE
X
Xdnl Need to check this in default compilation mode to find out
Xdnl whether this platform supports both functions by default too.
Xdnl We cannot use the standard tests because they would find
Xdnl that fseeko()/ftello() are present in small file mode on
Xdnl Limnux while there is no prototype for these functions.
XAC_SMALL_FSEEKO
XAC_SMALL_FTELLO
X
XAC_CHECK_LIB(c, dlopen, lib_dl="",
X  [AC_CHECK_LIB(dl, dlopen, lib_dl="-ldl")])
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_dl"
XAC_CHECK_FUNCS(dlopen dlclose dlsym dlerror dlinfo)
XAC_CHECK_FUNCS(shl_load shl_unload shl_gethandle)
XLIBS="$ac_save_LIBS"
Xif test ."$lib_dl" = .""; then
X	AC_DEFINE(HAVE_DLOPEN_IN_LIBC)
Xfi
X
XAC_CHECK_DFUNCS([
X#ifdef	HAVE_WINDOWS_H
X#undef	u_char
X#undef	u_short
X#undef	u_int
X#undef	u_long
X#include <windows.h>
X#endif
X], LoadLibrary FreeLibrary GetProcAddress)
X
Xdnl ??? AC_CHECK_LIB(socket, socket, lib_socket="-lsocket")
Xdnl
XAC_CHECK_LIB(socket, rcmd, lib_socket="-lsocket")
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_socket"
XAC_CHECK_LIB(nsl, inet_ntoa, lib_nsl="-lnsl")
XLIBS="$LIBS $lib_nsl"
XAC_CHECK_FUNCS(rcmd socket socketpair)
XAC_CHECK_FUNCS(getservbyname inet_ntoa)
XAC_CHECK_FUNCS(getaddrinfo getnameinfo)
XLIBS="$ac_save_LIBS"
X
Xac_save_LIBS="$LIBS"
XAC_CHECK_LIB(c, res_init, lib_resolv="",
X  [AC_CHECK_LIB(resolv, res_init, lib_resolv="-lresolv")])
XLIBS="$ac_save_LIBS"
X
Xdnl Check for largefile support
Xdnl Do this last to make sure that no large file definition
Xdnl in confdefs.h will modify our results
XAC_SYS_LARGEFILE
Xdnl Warning do not run this test. it interferes with the test
Xdnl AC_CHECK_FUNCS(fseeko ftello) from above.
Xdnl The test AC_HAVE_LARGEFILES will check whether ftello/fseeko
Xdnl are available in Large File mode
Xdnl AC_FUNC_FSEEKO
XAC_HAVE_LARGEFILES
X
XAC_DEFINE_UNQUOTED_STRING(HOST_ALIAS,$host_alias)
XAC_DEFINE_UNQUOTED_STRING(HOST_SUB,$host)
XAC_DEFINE_UNQUOTED_STRING(HOST_CPU,$host_cpu)
XAC_DEFINE_UNQUOTED_STRING(HOST_VENDOR,$host_vendor)
XAC_DEFINE_UNQUOTED_STRING(HOST_OS,$host_os)
X
Xdnl AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt")
X
XAC_CHECK_LIB(c, crypt, lib_crypt="",
X  [AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_crypt"
XAC_CHECK_FUNCS(crypt)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_ILIB([#include <libintl.h>], c, gettext, lib_intl="",
X  [AC_CHECK_ILIB([#include <libintl.h>], intl, gettext, lib_intl="-lintl")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_intl"
XAC_CHECK_DFUNC([#include <libintl.h>], gettext)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_ILIB([#include <iconv.h>], c, iconv_open, lib_iconv="",
X    [AC_CHECK_ILIB([#include <iconv.h>], iconv, iconv_open, lib_iconv="-liconv")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_iconv"
XAC_CHECK_DFUNC([#include <iconv.h>], iconv)
XAC_CHECK_DFUNC([#include <iconv.h>], iconv_open)
XAC_CHECK_DFUNC([#include <iconv.h>], iconv_close)
Xdnl GNU libiconv on Linux and Cygwin may make "configure" fail :-(
XAC_CHECK_DFUNC([#include <iconv.h>], libiconv)
XAC_CHECK_DFUNC([#include <iconv.h>], libiconv_open)
XAC_CHECK_DFUNC([#include <iconv.h>], libiconv_close)
XLIBS="$ac_save_LIBS"
X
Xif test $ac_cv_header_camlib_h = yes; then
X  scsi_lib=-lcam
X  lib_scsi=-lcam
Xfi
X
Xif test "$ac_cv_header_sys_acl_h" = yes; then
X
X  AC_CHECKING(for Posix Access Control List support)
X  AC_CHECK_LIB(acl, acl_get_file, lib_acl="-lacl")
X  AC_CHECK_LIB(pacl, acl_get_file, lib_acl="-lpacl")
X
X	dnl If $lib_acl is nonempty, save it in $lib_acl_test
X	
X	if test ".$lib_acl" != .; then
X		lib_acl_test="$lib_acl"
X	fi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  AC_CHECK_FUNCS(acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file)
X  AC_CHECK_FUNCS(acl_extended_file)
X  AC_CHECK_FUNCS(acl_get_entry)
X  LIBS="$ac_save_LIBS"
X
X  AC_CHECKING(for Solaris Access Control List support)
X  AC_CHECK_LIB(sec, acltotext, lib_acl="-lsec")
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  AC_CHECK_FUNCS(acl facl aclfromtext acltotext)
X  LIBS="$ac_save_LIBS"
X
X  dnl On Solaris, there is no need for lib_acl_test as acl(2) is in -libc
X
X  AC_CHECKING(for HP-UX Access Control List support)
X  AC_CHECK_FUNCS(getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry)
X
X  dnl XXX lib_acl_test: How do we test for ACLs on HP-UX?
X
Xfi
X
Xif test "$ac_cv_header_attr_xattr_h" = yes; then
X  AC_CHECKING(for Linux flavor Extended Attribute support)
X  AC_CHECK_LIB(attr, getxattr, lib_attr="-lattr")
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_attr"
X  AC_CHECK_FUNCS(getxattr setxattr listxattr lgetxattr lsetxattr llistxattr)
X  LIBS="$ac_save_LIBS"
Xfi
X
XAC_CHECKING(for RBAC support)
XAC_CHECK_LIB(secdb, getuserattr, lib_secdb="-lsecdb")
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_secdb"
XAC_CHECK_FUNCS(getauthattr getuserattr getexecattr getprofattr)
XLIBS="$ac_save_LIBS"
X
XAC_CHECKING(for gmatch() support)
XAC_CHECK_LIB(gen, gmatch, lib_gen="-lgen")
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_gen"
XAC_CHECK_FUNCS(gmatch)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_FUNCS(thr_yield)
X
XAC_CHECK_LIB(pthread, pthread_create, lib_pthread="-lpthread",
X  [AC_CHECK_LIB(c, pthread_create, lib_pthread="")])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_pthread"
XAC_CHECK_FUNCS(pthread_create pthread_kill)
XAC_CHECK_FUNCS(pthread_mutex_lock pthread_cond_wait pthread_spin_lock)
XLIBS="$ac_save_LIBS"
X
XAC_CHECK_LIB(c, clock_gettime, lib_rt="",
X  [AC_CHECK_LIB(rt, clock_gettime, lib_rt="-lrt",
X  [AC_CHECK_LIB(posix4, clock_gettime, lib_rt="-lposix4")])])
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_rt"
XAC_CHECK_FUNCS(clock_gettime clock_settime clock_getres)
XAC_CHECK_FUNCS(sched_getparam sched_setparam sched_getscheduler sched_setscheduler)
XAC_CHECK_FUNCS(sched_yield)
XAC_CHECK_FUNCS(nanosleep)
XLIBS="$ac_save_LIBS"
X
Xdnl Misc OS checks.
XAC_CHECK_FILES(/dev/tty /dev/null /dev/zero)
XAC_CHECK_FILES(/dev/stdin /dev/stdout /dev/stderr)
XAC_CHECK_FILES(/dev/fd/0 /dev/fd/1 /dev/fd/2)
X
Xdnl Checks for OS madness.
XUNAME=`uname || true`
X
Xif test ."$UNAME" = .Linux; then
X
Xdnl Linux madness tests:
X
XAC_BROKEN_LINUX_EXT2_FS_H
XAC_BROKEN_SRC_LINUX_EXT2_FS_H
Xif test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then
X	#
X	# If either /usr/include/linux/ex2_fs.h works or
X	# /usr/src/linux/include/linux/ex2_fs.h works, we will
X	# #define HAVE_USABLE_LINUX_EXT2_FS_H
X	#
X	# If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple
X	# #include <linux/ex2_fs.h> will work.
X	#
X	ac_cv_usable_linux_ext2_fs_h=yes
X	AC_DEFINE(HAVE_USABLE_LINUX_EXT2_FS_H)
Xelse
X	ac_cv_usable_linux_ext2_fs_h=no
Xfi
XAC_BROKEN_SCSI_SCSI_H
XAC_BROKEN_SRC_SCSI_SCSI_H
XAC_BROKEN_SCSI_SG_H
XAC_BROKEN_SRC_SCSI_SG_H
X
Xif test .$ac_cv_broken_src_scsi_scsi_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$may_linux_src_include = .no; then
X	echo
X	echo "Warning: *** /usr/src/linux/include contains broken include files ***"
X	echo "Warning: *** /usr/src/linux/include is not used this reason ***"
X	echo "Warning: This may result in the inability to use recent Linux kernel interfaces" 
X	echo
Xfi
Xif test .$ac_cv_usable_linux_ext2_fs_h = .no; then
X	echo
X	echo "Warning: *** linux/ext2_fs.h is not usable at all ***"
X	echo "Warning: *** This makes it impossible to support Linux file flags ***"
X	echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'"
X	echo
X	sleep 10
Xfi
Xfi	# Linux only tests
X
XAC_SUBST(may_linux_src_include)
X
XAC_SUBST(largefile_cc_opt)
XAC_SUBST(sun_cc64_opt)
XAC_SUBST(hp_cc_ansi_opt)
XAC_SUBST(hp_cc_opt_opt)
XAC_SUBST(hp_cc_gprof_opt)
X
XAC_SUBST(lib_crypt)
XAC_SUBST(lib_resolv)
XAC_SUBST(lib_intl)
XAC_SUBST(lib_iconv)
XAC_SUBST(scsi_lib)
XAC_SUBST(lib_scsi)
XAC_SUBST(lib_acl)
XAC_SUBST(lib_acl_test)
XAC_SUBST(lib_attr)
XAC_SUBST(lib_secdb)
XAC_SUBST(lib_gen)
XAC_SUBST(lib_pthread)
XAC_SUBST(lib_rt)
XAC_SUBST(lib_dl)
XAC_SUBST(lib_dir)
X
XAC_OUTPUT(rules.cnf)
END-of-star-1.5.2/autoconf/configure.in
echo x - star-1.5.2/autoconf/install-sh
sed 's/^X//' >star-1.5.2/autoconf/install-sh << 'END-of-star-1.5.2/autoconf/install-sh'
X#! /bin/sh
X#
X# install - install a program, script, or datafile
X# This comes from X11R5 (mit/util/scripts/install.sh).
X#
X# Copyright 1991 by the Massachusetts Institute of Technology
X#
X# Permission to use, copy, modify, distribute, and sell this software and its
X# documentation for any purpose is hereby granted without fee, provided that
X# the above copyright notice appear in all copies and that both that
X# copyright notice and this permission notice appear in supporting
X# documentation, and that the name of M.I.T. not be used in advertising or
X# publicity pertaining to distribution of the software without specific,
X# written prior permission.  M.I.T. makes no representations about the
X# suitability of this software for any purpose.  It is provided "as is"
X# without express or implied warranty.
X#
X# Calling this script install-sh is preferred over install.sh, to prevent
X# `make' implicit rules from creating a file called install from it
X# when there is no Makefile.
X#
X# This script is compatible with the BSD install script, but was written
X# from scratch.  It can only install one file at a time, a restriction
X# shared with many OS's install programs.
X
X
X# set DOITPROG to echo to test this script
X
X# Don't use :- since 4.3BSD and earlier shells don't like it.
Xdoit="${DOITPROG-}"
X
X
X# put in absolute paths if you don't have them in your path; or use env. vars.
X
Xmvprog="${MVPROG-mv}"
Xcpprog="${CPPROG-cp}"
Xchmodprog="${CHMODPROG-chmod}"
Xchownprog="${CHOWNPROG-chown}"
Xchgrpprog="${CHGRPPROG-chgrp}"
Xstripprog="${STRIPPROG-strip}"
Xrmprog="${RMPROG-rm}"
Xmkdirprog="${MKDIRPROG-mkdir}"
X
Xtransformbasename=""
Xtransform_arg=""
Xinstcmd="$mvprog"
Xchmodcmd="$chmodprog 0755"
Xchowncmd=""
Xchgrpcmd=""
Xstripcmd=""
Xrmcmd="$rmprog -f"
Xmvcmd="$mvprog"
Xsrc=""
Xdst=""
Xdir_arg=""
X
Xwhile [ x"$1" != x ]; do
X    case $1 in
X	-c) instcmd="$cpprog"
X	    shift
X	    continue;;
X
X	-d) dir_arg=true
X	    shift
X	    continue;;
X
X	-m) chmodcmd="$chmodprog $2"
X	    shift
X	    shift
X	    continue;;
X
X	-o) chowncmd="$chownprog $2"
X	    shift
X	    shift
X	    continue;;
X
X	-g) chgrpcmd="$chgrpprog $2"
X	    shift
X	    shift
X	    continue;;
X
X	-s) stripcmd="$stripprog"
X	    shift
X	    continue;;
X
X	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
X	    shift
X	    continue;;
X
X	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
X	    shift
X	    continue;;
X
X	*)  if [ x"$src" = x ]
X	    then
X		src=$1
X	    else
X		# this colon is to work around a 386BSD /bin/sh bug
X		:
X		dst=$1
X	    fi
X	    shift
X	    continue;;
X    esac
Xdone
X
Xif [ x"$src" = x ]
Xthen
X	echo "install:	no input file specified"
X	exit 1
Xelse
X	true
Xfi
X
Xif [ x"$dir_arg" != x ]; then
X	dst=$src
X	src=""
X	
X	if [ -d $dst ]; then
X		instcmd=:
X	else
X		instcmd=mkdir
X	fi
Xelse
X
X# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
X# might cause directories to be created, which would be especially bad 
X# if $src (and thus $dsttmp) contains '*'.
X
X	if [ -f $src -o -d $src ]
X	then
X		true
X	else
X		echo "install:  $src does not exist"
X		exit 1
X	fi
X	
X	if [ x"$dst" = x ]
X	then
X		echo "install:	no destination specified"
X		exit 1
X	else
X		true
X	fi
X
X# If destination is a directory, append the input filename; if your system
X# does not like double slashes in filenames, you may need to add some logic
X
X	if [ -d $dst ]
X	then
X		dst="$dst"/`basename $src`
X	else
X		true
X	fi
Xfi
X
X## this sed command emulates the dirname command
Xdstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
X
X# Make sure that the destination directory exists.
X#  this part is taken from Noah Friedman's mkinstalldirs script
X
X# Skip lots of stat calls in the usual case.
Xif [ ! -d "$dstdir" ]; then
XdefaultIFS='	
X'
XIFS="${IFS-${defaultIFS}}"
X
XoIFS="${IFS}"
X# Some sh's can't handle IFS=/ for some reason.
XIFS='%'
Xset - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
XIFS="${oIFS}"
X
Xpathcomp=''
X
Xwhile [ $# -ne 0 ] ; do
X	pathcomp="${pathcomp}${1}"
X	shift
X
X	if [ ! -d "${pathcomp}" ] ;
X        then
X		$mkdirprog "${pathcomp}"
X	else
X		true
X	fi
X
X	pathcomp="${pathcomp}/"
Xdone
Xfi
X
Xif [ x"$dir_arg" != x ]
Xthen
X	$doit $instcmd $dst &&
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
Xelse
X
X# If we're going to rename the final executable, determine the name now.
X
X	if [ x"$transformarg" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		dstfile=`basename $dst $transformbasename | 
X			sed $transformarg`$transformbasename
X	fi
X
X# don't allow the sed command to completely eliminate the filename
X
X	if [ x"$dstfile" = x ] 
X	then
X		dstfile=`basename $dst`
X	else
X		true
X	fi
X
X# Make a temp file name in the proper directory.
X
X	dsttmp=$dstdir/#inst.$$#
X
X# Move or copy the file name to the temp name
X
X	$doit $instcmd $src $dsttmp &&
X
X	trap "rm -f ${dsttmp}" 0 &&
X
X# and set any options; do chmod last to preserve setuid bits
X
X# If any of these fail, we abort the whole thing.  If we want to
X# ignore errors from any of these, just make sure not to ignore
X# errors from the above "$doit $instcmd $src $dsttmp" command.
X
X	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
X	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
X	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
X	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
X
X# Now rename the file to the real destination.
X
X	$doit $rmcmd -f $dstdir/$dstfile &&
X	$doit $mvcmd $dsttmp $dstdir/$dstfile 
X
Xfi &&
X
X
Xexit 0
END-of-star-1.5.2/autoconf/install-sh
echo x - star-1.5.2/autoconf/rules.cnf.in
sed 's/^X//' >star-1.5.2/autoconf/rules.cnf.in << 'END-of-star-1.5.2/autoconf/rules.cnf.in'
X# @(#)rules.cnf.in	1.24 10/10/01 Copyright 1998-2009 J. Schilling
X
XEXEEXT= @EXEEXT@
XXEXEEXT= @XEXEEXT@
XOBJEXT= @OBJEXT@
X
XYACC= @YACC@
XBISON= @BISON@
XCPP= @CPP@
XCPPX= @CPPX@
X
XLARGEFILE_CC_OPT= @largefile_cc_opt@
XSUN_CC64_OPT= @sun_cc64_opt@	# Used on e.g. Solaris and Linux
XHP_CC_ANSI_OPT= @hp_cc_ansi_opt@	# Used on HP-UX
XHP_CC_OPT_OPT= @hp_cc_opt_opt@	# Used on HP-UX
XHP_CC_GPROF_OPT= @hp_cc_gprof_opt@	# Used on HP-UX
X
XMAY_LINUX_SRC_INCLUDE= @may_linux_src_include@
X
XSCSILIB= @scsi_lib@
XLIB_SCSI= @lib_scsi@
XLIB_RESOLV= @lib_resolv@
XLIB_CRYPT= @lib_crypt@
XLIB_INTL= @lib_intl@
XLIB_ICONV= @lib_iconv@
XLIB_ACL= @lib_acl@		# Full (test/set) ACL users like star
XLIB_ACL_TEST= @lib_acl_test@	# Test only ACL users like libfind
XLIB_ATTR = @lib_attr@
XLIB_SECDB = @lib_secdb@
XLIB_GEN = @lib_gen@
XLIB_PTHREAD = @lib_pthread@
XLIB_RT = @lib_rt@
XLIB_DL= @lib_dl@
XLIB_DIR= @lib_dir@
END-of-star-1.5.2/autoconf/rules.cnf.in
echo x - star-1.5.2/autoconf/xconfig.h.in
sed 's/^X//' >star-1.5.2/autoconf/xconfig.h.in << 'END-of-star-1.5.2/autoconf/xconfig.h.in'
X/* @(#)xconfig.h.in	1.228 11/11/22 Copyright 1998-2011 J. Schilling */
X/*
X *	Dynamic autoconf C-include code.
X *	Do not edit, this file has been created automatically.
X *
X *	Copyright (c) 1998-2011 J. Schilling
X *
X *	The layout for this file is controlled by "configure".
X *	Switch off cstyle(1) checks for now.
X */
X#ifndef	__XCONFIG_H
X#define	__XCONFIG_H
X/* BEGIN CSTYLED */
X
X/*
X * Header Files
X */
X#undef PROTOTYPES	/* if Compiler supports ANSI C prototypes */
X#undef HAVE_INLINE	/* if Compiler supports "inline" keyword */
X#undef HAVE_ASSERT_H	/* to use stdio.h */
X#undef HAVE_STDIO_H	/* to use stdio.h */
X#undef HAVE_STDARG_H	/* to use stdarg.h, else use varargs.h NOTE: SaberC on a Sun has prototypes but no stdarg.h */
X#undef HAVE_VARARGS_H	/* to use use varargs.h NOTE: The free HP-UX C-compiler has stdarg.h but no PROTOTYPES */
X#undef HAVE_STDLIB_H	/* to use general utility defines (malloc(), size_t ...) and general C library prototypes */
X#undef HAVE_STDDEF_H	/* to use offsetof(), ptrdiff_t, wchar_t, size_t */
X#undef HAVE_STRING_H	/* to get NULL and ANSI C string function prototypes */
X#undef HAVE_STRINGS_H	/* to get BSD string function prototypes */
X#undef STDC_HEADERS	/* if ANSI compliant stdlib.h, stdarg.h, string.h, float.h are present */
X#undef HAVE_UNISTD_H	/* to get POSIX syscall prototypes XXX sys/file.h fcntl.h (unixstd/fctl)XXX*/
X#undef HAVE_GETOPT_H	/* to get getopt() prototype from getopt.h instead of unistd.h */
X#undef HAVE_LIMITS_H	/* to get POSIX numeric limits constants */
X#undef HAVE_A_OUT_H	/* if a.out.h is present (may be a system using a.out format) */
X#undef HAVE_AOUTHDR_H	/* if aouthdr.h is present. This is a COFF system */
X#undef HAVE_ELF_H	/* if elf.h is present. This is an ELF system */
X#undef HAVE_FCNTL_H	/* to access, O_XXX constants for open(), otherwise use sys/file.h */
X#undef HAVE_IO_H	/* to access setmode()... from WIN-DOS, OS/2 and similar */
X#undef HAVE_CONIO_H	/* to access getch()... from WIN-DOS, OS/2 and similar */
X#undef HAVE_SYS_FILE_H	/* to use O_XXX constants for open() and flock() defs */
X#undef HAVE_INTTYPES_H	/* to use UNIX-98 inttypes.h */
X#undef HAVE_STDINT_H	/* to use SUSv3 stdint.h */
X#undef HAVE_DIRENT_H	/* to use POSIX dirent.h */
X#undef HAVE_SYS_DIR_H	/* to use BSD sys/dir.h */
X#undef HAVE_NDIR_H	/* to use ndir.h */
X#undef HAVE_SYS_NDIR_H	/* to use sys/ndir.h */
X#undef HAVE_ALLOCA_H	/* if alloca.h exists */
X#undef HAVE_MALLOC_H	/* if malloc.h exists */
X#undef HAVE_SGTTY_H	/* if sgtty.h exists */
X#undef HAVE_TERMIOS_H	/* to use POSIX termios.h */
X#undef HAVE_TERMIO_H	/* to use SVR4 termio.h */
X#undef HAVE_PWD_H	/* if pwd.h exists */
X#undef HAVE_GRP_H	/* if grp.h exists */
X#undef HAVE_SIGNAL_H	/* if signal.h exists */
X#undef HAVE_SIGINFO_H	/* if siginfo.h exists */
X#undef HAVE_SYS_SIGINFO_H /* if sys/siginfo.h exists */
X#undef HAVE_UCONTEXT_H	/* if ucontext.h exists */
X#undef HAVE_SYS_ACL_H	/* to use <sys/acl.h> for ACL definitions */
X#undef HAVE_ACLLIB_H	/* if HP-UX <acllib.h> is present */
X#undef HAVE_ACL_LIBACL_H /* if Linux <acl/libacl.h> is present */
X#undef HAVE_SHADOW_H	/* if shadow.h exists */
X#undef HAVE_SYSLOG_H	/* if syslog.h exists */
X#undef HAVE_SYS_TIME_H	/* may include sys/time.h for struct timeval */
X#undef TIME_WITH_SYS_TIME	/* may include both time.h and sys/time.h */
X#undef HAVE_TIMES	/* to use times() and sys/times.h */
X#undef HAVE_SYS_TIMES_H	/* may include sys/times.h for struct tms */
X#undef HAVE_UTIME		/* to use AT&T utime() and utimbuf */
X#undef HAVE_UTIMES		/* to use BSD utimes() and sys/time.h */
X#undef HAVE_FUTIMES		/* to use BSD futimes() and sys/time.h */
X#undef HAVE_LUTIMES		/* to use BSD lutimes() and sys/time.h */
X#undef HAVE_UTIME_H		/* to use utime.h for the utimbuf structure declaration, else declare struct utimbuf yourself */
X#undef HAVE_SYS_UTIME_H		/* to use sys/utime.h if utime.h does not exist */
X#undef HAVE_SYS_IOCTL_H		/* if sys/ioctl.h is present */
X#undef HAVE_SYS_FILIO_H		/* if sys/ioctl.h is present */
X#undef HAVE_SYS_PARAM_H		/* if sys/param.h is present */
X#undef HAVE_MACH_MACHINE_H	/* if mach/machine.h is present */
X#undef HAVE_MNTENT_H		/* if mntent.h is present */
X#undef HAVE_SYS_MNTENT_H	/* if sys/mntent.h is present */
X#undef HAVE_SYS_MNTTAB_H	/* if sys/mnttab.h is present */
X#undef HAVE_SYS_MOUNT_H		/* if sys/mount.h is present */
X#undef HAVE_WAIT_H		/* to use wait.h for prototypes and union wait */
X#undef HAVE_SYS_WAIT_H		/* else use sys/wait.h */
X#undef HAVE_ULIMIT_H		/* to use ulimit() as fallback for getrlimit()  */
X#undef HAVE_PROCESS_H		/* to use process.h for spawn*() and cwait() */
X#undef HAVE_SYS_RESOURCE_H	/* to use sys/resource.h for rlimit() and wait3() */
X#undef HAVE_PROCFS_H		/* to use procfs.h instead of sys/procfs.h (Solaris forces profcs-2) */
X#undef HAVE_SYS_PROCFS_H	/* to use sys/procfs.h for wait3() emulation */
X#undef HAVE_LIBPROC_H		/* to use libproc.h (Mac OS X) */
X#undef HAVE_SYS_SYSTEMINFO_H	/* to use SVr4 sysinfo() */
X#undef HAVE_SYS_SYSCTL_H	/* to use BSD sysctl() */
X#undef HAVE_SYS_UTSNAME_H	/* to use uname() */
X#undef HAVE_SYS_PRIOCNTL_H	/* to use SVr4 priocntl() instead of nice()/setpriority() */
X#undef HAVE_SYS_RTPRIOCNTL_H	/* if the system supports SVr4 real time classes */
X#undef HAVE_SYS_PROCSET_H	/* if the system supports SVr4 process sets */
X#undef HAVE_SYS_SYSCALL_H	/* to use syscall() */
X#undef HAVE_SYS_MTIO_H		/* to use mtio definitions from sys/mtio.h */
X#undef HAVE_SYS_TAPE_H		/* to use mtio definitions from AIX sys/tape.h */
X#undef HAVE_SYS_MMAN_H		/* to use definitions for mmap()/madvise()... from sys/mman.h */
X#undef HAVE_SYS_SHM_H		/* to use definitions for shmget() ... from sys/shm.h */
X#undef HAVE_SYS_SEM_H		/* to use definitions for semget() ... from sys/sem.h */
X#undef HAVE_SYS_IPC_H		/* to use definitions for ftok() ... from sys/ipc.h */
X#undef MAJOR_IN_MKDEV		/* if we should include sys/mkdev.h to get major()/minor()/makedev() */
X#undef MAJOR_IN_SYSMACROS	/* if we should include sys/sysmacros.h to get major()/minor()/makedev() */
X#undef HAVE_SYS_DKIO_H		/* if we may include sys/dkio.h for disk ioctls */
X#undef HAVE_SYS_DKLABEL_H	/* if we may include sys/dklabel.h for disk label */
X#undef HAVE_SUN_DKIO_H		/* if we may include sun/dkio.h for disk ioctls */
X#undef HAVE_SUN_DKLABEL_H	/* if we may include sun/dklabel.h for disk label */
X#undef HAVE_SYS_TYPES_H		/* if we may include sys/types.h (the standard) */
X#undef HAVE_SYS_STYPES_H	/* if we may include sys/stypes.h (JOS) */
X#undef HAVE_SYS_FILEDESC_H	/* if we may include sys/filedesc.h (JOS) */
X#undef HAVE_SYS_STAT_H		/* if we may include sys/stat.h (the standard) */
X#undef HAVE_SYS_ACCT_H		/* if we may include sys/acct.h */
X#undef HAVE_TYPES_H		/* if we may include types.h (rare cases e.g. ATARI TOS) */
X#undef HAVE_STAT_H		/* if we may include stat.h (rare cases e.g. ATARI TOS) */
X#undef HAVE_POLL_H		/* if we may include poll.h to use poll() */
X#undef HAVE_SYS_POLL_H		/* if we may include sys/poll.h to use poll() */
X#undef HAVE_SYS_SELECT_H	/* if we may have sys/select.h nonstandard use for select() on some systems*/
X#undef NEED_SYS_SELECT_H	/* if we need sys/select.h to use select() (this is nonstandard) */
X#undef HAVE_NETDB_H		/* if we have netdb.h for get*by*() and rcmd() */
X#undef HAVE_SYS_SOCKET_H	/* if we have sys/socket.h for socket() */
X#undef NEED_SYS_SOCKET_H	/* if we need sys/socket.h to use select() (this is nonstandard) */
X#undef HAVE_NETINET_IN_H	/* if we have netinet/in.h */
X#undef HAVE_STROPTS_H		/* if we have stropts.h */
X#undef HAVE_LINUX_PG_H		/* if we may include linux/pg.h for PP ATAPI sypport */
X#undef HAVE_CAMLIB_H		/* if we may include camlib.h for CAM SCSI transport definitions */
X#undef HAVE_IEEEFP_H		/* if we may include ieeefp.h for finite()/isnand() */
X#undef HAVE_FP_H		/* if we may include fp.h for FINITE()/IS_INF()/IS_NAN() */
X#undef HAVE_VALUES_H		/* if we may include values.h for MAXFLOAT */
X#undef HAVE_FLOAT_H		/* if we may include float.h for FLT_MAX */
X#undef HAVE_MATH_H		/* if we may include math.h for e.g. isinf()/isnan() */
X#undef HAVE__FILBUF		/* if we have _filbuf() for USG derived STDIO */
X#undef HAVE___FILBUF		/* if we have __filbuf() for USG derived STDIO */
X#undef HAVE_USG_STDIO		/* if we have USG derived STDIO */
X#undef HAVE_ERRNO_DEF		/* if we have errno definition in <errno.h> */
X#undef HAVE_ENVIRON_DEF		/* if we have environ definition in <unistd.h> */
X#undef HAVE_SYS_SIGLIST_DEF	/* if we have sys_siglist definition in <signal.h> */
X#undef HAVE_SYS_FORK_H		/* if we should include sys/fork.h for forkx() definitions */
X#undef HAVE_VFORK_H		/* if we should include vfork.h for vfork() definitions */
X#undef HAVE_ARPA_INET_H		/* if we have arpa/inet.h (missing on BeOS) */
X				/* BeOS has inet_ntoa() in <netdb.h> */
X#undef HAVE_BSD_DEV_SCSIREG_H	/* if we have a NeXT Step compatible sg driver */
X#undef HAVE_SCSI_SCSI_H		/* if we may include scsi/scsi.h */
X#undef HAVE_SCSI_SG_H		/* if we may include scsi/sg.h */
X#undef HAVE_LINUX_SCSI_H	/* if we may include linux/scsi.h */
X#undef HAVE_LINUX_SG_H		/* if we may include linux/sg.h */
X#undef HAVE_LINUX_TYPES_H	/* if we may include linux/types.h */
X#undef HAVE_LINUX_GFP_H		/* if we may include linux/gfp.h */
X#undef HAVE_ASM_TYPES_H		/* if we may include asm/types.h */
X#undef HAVE_SYS_BSDTTY_H	/* if we have sys/bsdtty.h on HP-UX for TIOCGPGRP */
X#undef HAVE_OS_H		/* if we have the BeOS kernel definitions in OS.h */
X#undef HAVE_OS2_H		/* if we have the OS/2 definitions in os2.h */
X#undef HAVE_OS2ME_H		/* if we have the OS/2 definitions in os2me.h */
X#undef HAVE_WINDOWS_H		/* if we have the MS-Win definitions in windows.h */
X#undef HAVE_EXT2FS_EXT2_FS_H	/* if we have the Linux moving target ext2fs/ext2_fs.h */
X#undef HAVE_ATTR_XATTR_H	/* if we have the Linux Extended File Attr definitions in attr/xattr.h */
X#undef HAVE_CRT_EXTERNS_H	/* if we have the Mac OS X env definitions in crt_externs.h */
X#undef HAVE_FNMATCH_H		/* if we may include fnmatch.h */
X#undef HAVE_DIRECT_H		/* if we may include direct.h  (MSVC for getcwd()/chdir()/mkdir()/rmdir()) */
X#undef HAVE_SYSEXITS_H		/* if we may include sysexits.h */
X
X#undef HAVE_LIBINTL_H		/* if we may include libintl.h */
X#undef HAVE_LOCALE_H		/* if we may include locale.h */
X#undef HAVE_LANGINFO_H		/* if we may include langinfo.h */
X#undef HAVE_NL_TYPES_H		/* if we may include nl_types.h */
X#undef HAVE_CTYPE_H		/* if we may include ctype.h */
X#undef HAVE_WCTYPE_H		/* if we may include wctype.h */
X#undef HAVE_WCHAR_H		/* if we may include wchar.h */
X#undef HAVE_ICONV_H		/* if we may include iconv.h */
X
X#undef HAVE_PRIV_H		/* if we may include priv.h */
X#undef HAVE_SYS_PRIV_H		/* if we may include sys/priv.h */
X#undef HAVE_EXEC_ATTR_H		/* if we may include exec_attr.h */
X#undef HAVE_SECDB_H		/* if we may include secdb.h */
X#undef HAVE_PTHREAD_H		/* if we may include pthread.h */
X#undef HAVE_THREAD_H		/* if we may include thread.h */
X
X#undef HAVE_LIBGEN_H		/* if we may include libgen.h */
X#undef HAVE_REGEX_H		/* if we may include regex.h */
X#undef HAVE_REGEXP_H		/* if we may include regexp.h */
X#undef HAVE_REGEXPR_H		/* if we may include regexpr.h */
X
X#undef HAVE_DLFCN_H		/* if we may include dlfcn.h */
X#undef HAVE_LINK_H		/* if we may include linh.h */
X#undef HAVE_DL_H		/* if we may include dl.h */
X
X/*
X * Convert to SCHILY name
X */
X#ifdef	STDC_HEADERS
X#	ifndef	HAVE_STDC_HEADERS
X#		define	HAVE_STDC_HEADERS
X#	endif
X#endif
X
X#ifdef	HAVE_ELF_H
X#define	HAVE_ELF			/* This system uses ELF */
X#else
X#	ifdef	HAVE_AOUTHDR_H
X#	define	HAVE_COFF		/* This system uses COFF */
X#	else
X#		ifdef HAVE_A_OUT_H
X#		define HAVE_AOUT	/* This system uses AOUT */
X#		endif
X#	endif
X#endif
X
X/*
X * Function declarations
X */
X#undef HAVE_DECL_STAT		/* Whether <sys/stat.h> defines extern stat(); */
X#undef HAVE_DECL_LSTAT		/* Whether <sys/stat.h> defines extern lstat(); */
X
X/*
X * Library Functions
X */
X#undef HAVE_ACCESS		/* access() is present in libc */
X#undef HAVE_EACCESS		/* eaccess() is present in libc */
X#undef HAVE_EUIDACCESS		/* euidaccess() is present in libc */
X#undef HAVE_ACCESS_E_OK		/* access() implements E_OK (010) for effective UIDs */
X#undef HAVE_CRYPT		/* crypt() is present in libc or libcrypt */
X#undef HAVE_STRERROR		/* strerror() is present in libc */
X#undef HAVE_MEMCHR		/* memchr() is present in libc */
X#undef HAVE_MEMCMP		/* memcmp() is present in libc */
X#undef HAVE_MEMCPY		/* memcpy() is present in libc */
X#undef HAVE_MEMCCPY		/* memccpy() is present in libc */
X#undef HAVE_MEMMOVE		/* memmove() is present in libc */
X#undef HAVE_MEMSET		/* memset() is present in libc */
X#undef HAVE_MADVISE		/* madvise() is present in libc */
X#undef HAVE_MLOCK		/* mlock() is present in libc */
X#undef HAVE_MLOCKALL		/* working mlockall() is present in libc */
X#undef HAVE_MMAP		/* working mmap() is present in libc */
X#undef _MMAP_WITH_SIZEP		/* mmap() needs address of size parameter */
X#undef HAVE_FLOCK		/* *BSD flock() is present in libc */
X#undef HAVE_LOCKF		/* lockf() is present in libc (XOPEN) */
X#undef HAVE_FCNTL_LOCKF		/* file locking via fcntl() is present in libc */
X#undef HAVE_FCHDIR		/* fchdir() is present in libc */
X#undef HAVE_FDOPENDIR		/* fdopendir() is present in libc */
X#undef HAVE_GETDELIM		/* getdelim() is present in libc */
X#undef HAVE_OPENAT		/* openat() is present in libc */
X#undef HAVE_ATTROPEN		/* attropen() is present in libc */
X#undef HAVE_FSTATAT		/* fstatat() is present in libc */
X#undef HAVE_FCHOWNAT		/* fchownat() is present in libc */
X#undef HAVE_FUTIMESAT		/* futimesat() is present in libc */
X#undef HAVE_RENAMEAT		/* renameat() is present in libc */
X#undef HAVE_UNLINKAT		/* unlinkat() is present in libc */
X#undef HAVE___ACCESSAT		/* __accessat() is present in libc */
X#undef HAVE_ACCESSAT		/* accessat() is present in libc */
X#undef HAVE_REALPATH		/* realpath() is present in libc */
X#undef HAVE_RESOLVEPATH		/* resolvepath() is present in libc */
X/*
X * See e.g. http://www.die.net/doc/linux/man/man2/mkdirat.2.html
X */
X#undef HAVE_MKDIRAT		/* mkdirat() is present in libc */
X#undef HAVE_FACCESSAT		/* faccessat() is present in libc */
X#undef HAVE_FCHMODAT		/* fchmodat() is present in libc */
X#undef HAVE_LINKAT		/* inkat() is present in libc */
X#undef HAVE_MKFIFOAT		/* mkfifoat() is present in libc */
X#undef HAVE_MKNODKAT		/* mknodat() is present in libc */
X#undef HAVE_READLINKAT		/* readlinkat() is present in libc */
X#undef HAVE_SYMLINKAT		/* symlinkat() is present in libc */
X#undef HAVE_FUTIMENS		/* futimens() is present in libc */
X#undef HAVE_UTIMENSAT		/* utimensat() is present in libc */
X#undef HAVE_IOCTL		/* ioctl() is present in libc */
X#undef HAVE_FCNTL		/* fcntl() is present in libc */
X#undef HAVE_PIPE		/* pipe() is present in libc */
X#undef HAVE__PIPE		/* _pipe() is present in libc */
X#undef HAVE_POPEN		/* popen() is present in libc */
X#undef HAVE_PCLOSE		/* pclose() is present in libc */
X#undef HAVE__POPEN		/* _popen() is present in libc */
X#undef HAVE__PCLOSE		/* _pclose() is present in libc */
X#undef HAVE_STATVFS		/* statvfs() is present in libc */
X#undef HAVE_QUOTACTL		/* quotactl() is present in libc */
X#undef HAVE_QUOTAIOCTL		/* use ioctl(f, Q_QUOTACTL, &q) instead of quotactl() */
X#undef HAVE_GETPID		/* getpid() is present in libc */
X#undef HAVE_GETPPID		/* getppid() is present in libc */
X#undef HAVE_SETREUID		/* setreuid() is present in libc */
X#undef HAVE_SETRESUID		/* setresuid() is present in libc */
X#undef HAVE_SETEUID		/* seteuid() is present in libc */
X#undef HAVE_SETUID		/* setuid() is present in libc */
X#undef HAVE_SETREGID		/* setregid() is present in libc */
X#undef HAVE_SETRESGID		/* setresgid() is present in libc */
X#undef HAVE_SETEGID		/* setegid() is present in libc */
X#undef HAVE_SETGID		/* setgid() is present in libc */
X#undef HAVE_GETUID		/* getuid() is present in libc */
X#undef HAVE_GETEUID		/* geteuid() is present in libc */
X#undef HAVE_GETGID		/* getgid() is present in libc */
X#undef HAVE_GETEGID		/* getegid() is present in libc */
X#undef HAVE_GETPGID		/* getpgid() is present in libc (POSIX) */
X#undef HAVE_SETPGID		/* setpgid() is present in libc (POSIX) */
X#undef HAVE_GETPGRP		/* getpgrp() is present in libc (ANY) */
X#undef HAVE_GETSID		/* getsid() is present in libc (POSIX) */
X#undef HAVE_SETSID		/* setsid() is present in libc (POSIX) */
X#undef HAVE_SETPGRP		/* setpgrp() is present in libc (ANY) */
X#undef HAVE_BSD_GETPGRP		/* getpgrp() in libc is BSD-4.2 compliant */
X#undef HAVE_BSD_SETPGRP		/* setpgrp() in libc is BSD-4.2 compliant */
X#undef HAVE_GETPWNAM		/* getpwnam() in libc */
X#undef HAVE_GETPWENT		/* getpwent() in libc */
X#undef HAVE_GETPWUID		/* getpwuid() in libc */
X#undef HAVE_SETPWENT		/* setpwent() in libc */
X#undef HAVE_ENDPWENT		/* endpwent() in libc */
X#undef HAVE_GETGRNAM		/* getgrnam() in libc */
X#undef HAVE_GETGRENT		/* getgrent() in libc */
X#undef HAVE_GETGRGID		/* getgrgid() in libc */
X#undef HAVE_SETGRENT		/* setgrent() in libc */
X#undef HAVE_ENDGRENT		/* endgrent() in libc */
X#undef HAVE_GETSPNAM		/* getspnam() in libc (SVR4 compliant) */
X#undef HAVE_GETSPWNAM		/* getspwnam() in libsec.a (HP-UX) */
X#undef HAVE_GETLOGIN		/* getlogin() in libc */
X#undef HAVE_SYNC		/* sync() is present in libc */
X#undef HAVE_FSYNC		/* fsync() is present in libc */
X#undef HAVE_TCGETATTR		/* tcgetattr() is present in libc */
X#undef HAVE_TCSETATTR		/* tcsetattr() is present in libc */
X#undef HAVE_TCGETPGRP		/* tcgetpgrp() is present in libc */
X#undef HAVE_TCSETPGRP		/* tcsetpgrp() is present in libc */
X#undef HAVE_WAIT		/* wait() is present in libc */
X#undef HAVE_WAIT3		/* working wait3() is present in libc */
X#undef HAVE_WAIT4		/* wait4() is present in libc */
X#undef HAVE_WAITID		/* waitid() is present in libc */
X#undef HAVE_WAITPID		/* waitpid() is present in libc */
X#undef HAVE_CWAIT		/* cwait() is present in libc */
X#undef HAVE_GETHOSTID		/* gethostid() is present in libc */
X#undef HAVE_GETHOSTNAME		/* gethostname() is present in libc */
X#undef HAVE_GETDOMAINNAME	/* getdomainname() is present in libc */
X#undef HAVE_GETPAGESIZE		/* getpagesize() is present in libc */
X#undef HAVE_GETDTABLESIZE	/* getdtablesize() is present in libc */
X#undef HAVE_GETRUSAGE		/* getrusage() is present in libc */
X#undef HAVE_GETRLIMIT		/* getrlimit() is present in libc */
X#undef HAVE_SETRLIMIT		/* setrlimit() is present in libc */
X#undef HAVE_ULIMIT		/* ulimit() is present in libc */
X#undef HAVE_GETTIMEOFDAY	/* gettimeofday() is present in libc */
X#undef HAVE_SETTIMEOFDAY	/* settimeofday() is present in libc */
X#undef HAVE_VAR_TIMEZONE	/* extern long timezone is present in libc */
X#undef HAVE_VAR_TIMEZONE_DEF	/* extern long timezone is present in time.h */
X#undef HAVE_TIME		/* time() is present in libc */
X#undef HAVE_GMTIME		/* gmtime() is present in libc */
X#undef HAVE_LOCALTIME		/* localtime() is present in libc */
X#undef HAVE_MKTIME		/* mktime() is present in libc */
X#undef HAVE_TIMEGM		/* timegm() is present in libc */
X#undef HAVE_TIMELOCAL		/* timelocal() is present in libc */
X#undef HAVE_FTIME		/* ftime() is present in libc */
X#undef HAVE_STIME		/* stime() is present in libc */
X#undef HAVE_TZSET		/* tzset() is present in libc */
X#undef HAVE_CTIME		/* ctime() is present in libc */
X#undef HAVE_CFTIME		/* cftime() is present in libc */
X#undef HAVE_ASCFTIME		/* ascftime() is present in libc */
X#undef HAVE_STRFTIME		/* strftime() is present in libc */
X#undef HAVE_GETHRTIME		/* gethrtime() is present in libc */
X#undef HAVE_POLL		/* poll() is present in libc */
X#undef HAVE_SELECT		/* select() is present in libc */
X#undef HAVE_ISASTREAM		/* isastream() is present in libc */
X#undef HAVE_CHMOD		/* chmod() is present in libc */
X#undef HAVE_FCHMOD		/* fchmod() is present in libc */
X#undef HAVE_LCHMOD		/* lchmod() is present in libc */
X#undef HAVE_CHOWN		/* chown() is present in libc */
X#undef HAVE_FCHOWN		/* fchown() is present in libc */
X#undef HAVE_LCHOWN		/* lchown() is present in libc */
X#undef HAVE_TRUNCATE		/* truncate() is present in libc */
X#undef HAVE_FTRUNCATE		/* ftruncate() is present in libc */
X#undef HAVE_BRK			/* brk() is present in libc */
X#undef HAVE_SBRK		/* sbrk() is present in libc */
X#undef HAVE_VA_COPY		/* va_copy() is present in varargs.h/stdarg.h */
X#undef HAVE__VA_COPY		/* __va_copy() is present in varargs.h/stdarg.h */
X#undef HAVE_DTOA		/* BSD-4.4 __dtoa() is present in libc */
X#undef HAVE_DTOA_R		/* BSD-4.4 __dtoa() with result ptr (reentrant) */
X#undef HAVE_DUP			/* dup() is present in libc */
X#undef HAVE_DUP2		/* dup2() is present in libc */
X#undef HAVE_GETCWD		/* POSIX getcwd() is present in libc */
X#undef HAVE_SMMAP		/* may map anonymous memory to get shared mem */
X#undef HAVE_SHMAT		/* shmat() is present in libc */
X#undef HAVE_SHMGET		/* shmget() is present in libc and working */
X#undef HAVE_SEMGET		/* semget() is present in libc */
X#undef HAVE_LSTAT		/* lstat() is present in libc */
X#undef HAVE_READLINK		/* readlink() is present in libc */
X#undef HAVE_SYMLINK		/* symlink() is present in libc */
X#undef HAVE_LINK		/* link() is present in libc */
X#undef HAVE_HARD_SYMLINKS	/* link() allows hard links on symlinks */
X#undef HAVE_LINK_NOFOLLOW	/* link() does not follow symlinks when hard linking symlinks */
X#undef HAVE_RENAME		/* rename() is present in libc */
X#undef HAVE_MKFIFO		/* mkfifo() is present in libc */
X#undef HAVE_MKNOD		/* mknod() is present in libc */
X#undef HAVE_ECVT		/* ecvt() is present in libc */
X#undef HAVE_FCVT		/* fcvt() is present in libc */
X#undef HAVE_GCVT		/* gcvt() is present in libc */
X#undef HAVE_ECVT_R		/* ecvt_r() is present in libc */
X#undef HAVE_FCVT_R		/* fcvt_r() is present in libc */
X#undef HAVE_GCVT_R		/* gcvt_r() is present in libc */
X#undef HAVE_QECVT		/* qecvt() is present in libc */
X#undef HAVE_QFCVT		/* qfcvt() is present in libc */
X#undef HAVE_QGCVT		/* qgcvt() is present in libc */
X#undef HAVE__QECVT		/* _qecvt() is present in libc */
X#undef HAVE__QFCVT		/* _qfcvt() is present in libc */
X#undef HAVE__QGCVT		/* _qgcvt() is present in libc */
X#undef HAVE__QECVT_R		/* _qecvt_r() is present in libc */
X#undef HAVE__QFCVT_R		/* _qfcvt_r() is present in libc */
X#undef HAVE__QGCVT_R		/* _qgcvt_r() is present in libc */
X#undef HAVE__LDECVT		/* _ldecvt() is present in libc */
X#undef HAVE__LDFCVT		/* _ldfcvt() is present in libc */
X#undef HAVE__LDGCVT		/* _ldgcvt() is present in libc */
X#undef HAVE__LDECVT_R		/* _ldecvt_r() is present in libc */
X#undef HAVE__LDFCVT_R		/* _ldfcvt_r() is present in libc */
X#undef HAVE__LDGCVT_R		/* _ldgcvt_r() is present in libc */
X#undef HAVE_ECONVERT		/* econvert() is present in libc */
X#undef HAVE_FCONVERT		/* fconvert() is present in libc */
X#undef HAVE_GCONVERT		/* gconvert() is present in libc */
X#undef HAVE_QECONVERT		/* qeconvert() is present in libc */
X#undef HAVE_QFCONVERT		/* qfconvert() is present in libc */
X#undef HAVE_QGCONVERT		/* qgconvert() is present in libc */
X#undef HAVE_ISINF		/* isinf() is present in libc */
X#undef HAVE_ISNAN		/* isnan() is present in libc */
X#undef HAVE_C99_ISINF		/* isinf() is present in math.h/libc */
X#undef HAVE_C99_ISNAN		/* isnan() is present in math.h/libc */
X#undef HAVE_FINITE		/* finite() is present in libc/ieeefp.h (SVr4) */
X#undef HAVE_ISNAND		/* isnand() is present in libc/ieeefp.h (SVr4) */
X#undef HAVE_RAND		/* rand() is present in libc */
X#undef HAVE_DRAND48		/* drand48() is present in libc */
X#undef HAVE_ICONV		/* iconv() is present in libiconv */
X#undef HAVE_ICONV_OPEN		/* iconv_open() is present in libiconv */
X#undef HAVE_ICONV_CLOSE		/* iconv_close() is present in libiconc */
X#undef HAVE_LIBICONV		/* libiconv() is present in libiconv */
X#undef HAVE_LIBICONV_OPEN	/* libiconv_open() is present in liiconv */
X#undef HAVE_LIBICONV_CLOSE	/* libiconv_close() is present in libiconv */
X#undef HAVE_SETPRIORITY		/* setpriority() is present in libc */
X#undef HAVE_NICE		/* nice() is present in libc */
X#undef HAVE_DOSSETPRIORITY	/* DosSetPriority() is present in libc */
X#undef HAVE_DOSALLOCSHAREDMEM	/* DosAllocSharedMem() is present in libc */
X#undef HAVE_SEEKDIR		/* seekdir() is present in libc */
X#undef HAVE_GETENV		/* getenv() is present in libc */
X#undef HAVE_PUTENV		/* putenv() is present in libc (preferred function) */
X#undef HAVE_SETENV		/* setenv() is present in libc (use instead of putenv()) */
X#undef HAVE_UNSETENV		/* unsetenv() is present in libc */
X#undef HAVE_UNAME		/* uname() is present in libc */
X#undef HAVE_SNPRINTF		/* snprintf() is present in libc */
X#undef HAVE_STRCAT		/* strcat() is present in libc */
X#undef HAVE_STRNCAT		/* strncat() is present in libc */
X#undef HAVE_STRCMP		/* strcmp() is present in libc */
X#undef HAVE_STRNCMP		/* strncmp() is present in libc */
X#undef HAVE_STRCPY		/* strcpy() is present in libc */
X#undef HAVE_STRLCAT		/* strlcat() is present in libc */
X#undef HAVE_STRLCPY		/* strlcpy() is present in libc */
X#undef HAVE_STRNCPY		/* strncpy() is present in libc */
X#undef HAVE_STRDUP		/* strdup() is present in libc */
X#undef HAVE_STRNDUP		/* strndup() is present in libc */
X#undef HAVE_STRLEN		/* strlen() is present in libc */
X#undef HAVE_STRNLEN		/* strnlen() is present in libc */
X#undef HAVE_STRCHR		/* strchr() is present in libc */
X#undef HAVE_STRRCHR		/* strrchr() is present in libc */
X#undef HAVE_STRSTR		/* strstr() is present in libc */
X#undef HAVE_STRCASECMP		/* strcasecmp() is present in libc */
X#undef HAVE_STRNCASECMP		/* strncasecmp() is present in libc */
X#undef HAVE_BASENAME		/* basename() is present in libc */
X#undef HAVE_DIRNAME		/* dirname() is present in libc */
X#undef HAVE_PATHCONF		/* pathconf() is present in libc */
X#undef HAVE_FPATHCONF		/* fpathconf() is present in libc */
X#undef HAVE_STRTOL		/* strtol() is present in libc */
X#undef HAVE_STRTOLL		/* strtoll() is present in libc */
X#undef HAVE_STRTOUL		/* strtoul() is present in libc */
X#undef HAVE_STRTOULL		/* strtoull() is present in libc */
X#undef HAVE_STRTOD		/* strtold() is present in libc */
X#undef HAVE_STRSIGNAL		/* strsignal() is present in libc */
X#undef HAVE_STR2SIG		/* str2sig() is present in libc */
X#undef HAVE_SIG2STR		/* sig2str() is present in libc */
X#undef HAVE_SIGSETJMP		/* sigsetjmp() is present in libc */
X#undef HAVE_SIGLONGJMP		/* siglongjmp() is present in libc */
X#undef HAVE_KILL		/* kill() is present in libc */
X#undef HAVE_KILLPG		/* killpg() is present in libc */
X#undef HAVE_SIGNAL		/* signal() is present in libc */
X#undef HAVE_SIGHOLD		/* sighold() is present in libc */
X#undef HAVE_SIGRELSE		/* sigrelse() is present in libc */
X#undef HAVE_SIGIGNORE		/* sigignore() is present in libc */
X#undef HAVE_SIGPAUSE		/* sigpause() is present in libc */
X#undef HAVE_SIGPROCMASK		/* sigprocmask() is present in libc (POSIX) */
X#undef HAVE_SIGSETMASK		/* sigsetmask() is present in libc (BSD) */
X#undef HAVE_SIGSET		/* sigset() is present in libc (POSIX) */
X#undef HAVE_SIGALTSTACK		/* sigaltstack() is present in libc (POSIX) */
X#undef HAVE_SIGBLOCK		/* sigblock() is present in libc (BSD) */
X#undef HAVE_SYS_SIGLIST		/* char *sys_siglist[] is present in libc */
X#undef HAVE_ALARM		/* alarm() is present in libc */
X#undef HAVE_SLEEP		/* sleep() is present in libc */
X#undef HAVE_USLEEP		/* usleep() is present in libc */
X#undef HAVE_FORK		/* fork() is present in libc */
X#undef HAVE_FORKX		/* forkx() is present in libc */
X#undef HAVE_FORKALL		/* forkall() is present in libc */
X#undef HAVE_FORKALLX		/* forkallx() is present in libc */
X#undef HAVE_VFORK		/* working vfork() is present in libc */
X#undef HAVE_VFORKX		/* working vforkx() is present in libc */
X#undef HAVE_EXECL		/* execl() is present in libc */
X#undef HAVE_EXECLE		/* execle() is present in libc */
X#undef HAVE_EXECLP		/* execlp() is present in libc */
X#undef HAVE_EXECV		/* execv() is present in libc */
X#undef HAVE_EXECVE		/* execve() is present in libc */
X#undef HAVE_EXECVP		/* execvp() is present in libc */
X#undef HAVE_SPAWNL		/* spawnl() is present in libc */
X#undef HAVE_SPAWNLE		/* spawnle() is present in libc */
X#undef HAVE_SPAWNLP		/* spawnlp() is present in libc */
X#undef HAVE_SPAWNLPE		/* spawnlpe() is present in libc */
X#undef HAVE_SPAWNV		/* spawnv() is present in libc */
X#undef HAVE_SPAWNVE		/* spawnve() is present in libc */
X#undef HAVE_SPAWNVP		/* spawnvp() is present in libc */
X#undef HAVE_SPAWNVPE		/* spawnvpe() is present in libc */
X#undef HAVE_GETEXECNAME		/* getexecname() is present in libc */
X#undef HAVE_GETPROGNAME		/* getprogname() is present in libc */
X#undef HAVE_SETPROGNAME		/* setprogname() is present in libc */
X#undef HAVE_PROC_PIDPATH	/* proc_pidpath() is present in libc */
X#undef HAVE_VAR_PROGNAME	/* extern char *__progname is present in libc */
X#undef HAVE_VAR_PROGNAME_FULL	/* extern char *__progname_full is present in libc */
X#undef HAVE_ALLOCA		/* alloca() is present (else use malloc())*/
X#undef HAVE_MALLOC		/* malloc() is present in libc */
X#undef HAVE_CALLOC		/* calloc() is present in libc */
X#undef HAVE_REALLOC		/* realloc() is present in libc */
X#undef HAVE_REALLOC_NULL	/* realloc() implements realloc(NULL, size) */
X#undef HAVE_VALLOC		/* valloc() is present in libc (else use malloc())*/
X#undef HAVE_MEMALIGN		/* memalign() is present in libc */
X#undef HAVE_POSIX_MEMALIGN	/* posix_memalign() is present in libc */
X#undef vfork
X#undef HAVE_WCSCAT		/* wcscat() is present in libc */
X#undef HAVE_WCSNCAT		/* wcsncat() is present in libc */
X#undef HAVE_WCSCMP		/* wcscmp() is present in libc */
X#undef HAVE_WCSNCMP		/* wcsncmp() is present in libc */
X#undef HAVE_WCSCPY		/* wcscpy() is present in libc */
X#undef HAVE_WCSLCAT		/* wcsncat() is present in libc */
X#undef HAVE_WCSLCPY		/* wcsncpy() is present in libc */
X#undef HAVE_WCSNCPY		/* wcsncpy() is present in libc */
X#undef HAVE_WCSDUP		/* wcsdup() is present in libc */
X#undef HAVE_WCSNDUP		/* wcsndup() is present in libc */
X#undef HAVE_WCSLEN		/* wcslen() is present in libc */
X#undef HAVE_WCSNLEN		/* wcsnlen() is present in libc */
X#undef HAVE_WCSCHR		/* wcschr() is present in libc */
X#undef HAVE_WCSRCHR		/* wcsrchr() is present in libc */
X#undef HAVE_WCSSTR		/* wcsstr() is present in libc */
X#undef HAVE_WCWIDTH		/* wcwidth() is present in libc */
X#undef HAVE_WCSWIDTH		/* wcswidth() is present in libc */
X#undef HAVE_WCTYPE		/* wctype() is present in libc */
X#undef HAVE_ISWCTYPE		/* iswctype() is present in libc */
X
X
X#undef HAVE_CHFLAGS		/* chflags() is present in libc */
X#undef HAVE_FCHFLAGS		/* fchflags() is present in libc */
X#undef HAVE_FFLAGSTOSTR		/* fflagstostr() is present in libc */
X#undef HAVE_STRTOFFLAGS		/* strtofflags() is present in libc */
X
X#undef HAVE_GETTEXT		/* gettext() is present in -lintl */
X#undef HAVE_SETLOCALE		/* setlocale() is present in libc */
X#undef HAVE_LOCALECONV		/* localeconv() is present in libc */
X#undef HAVE_NL_LANGINFO		/* nl_langinfo() is present in libc */
X
X#undef HAVE_SETBUF		/* setbuf() is present in libc */
X#undef HAVE_SETVBUF		/* setvbuf() is present in libc */
X
X#undef HAVE_FNMATCH		/* fnmatch() is present in libc */
X#undef HAVE_FNMATCH_IGNORECASE	/* fnmatch() implements FNM_IGNORECASE */
X
X#undef HAVE_MKTEMP		/* mktemp() is present in libc */
X#undef HAVE_MKSTEMP		/* mkstemp() is present in libc */
X
X#undef HAVE_GETPPRIV		/* getppriv() is present in libc */
X#undef HAVE_SETPPRIV		/* setppriv() is present in libc */
X#undef HAVE_PRIV_SET		/* priv_set() is present in libc */
X#undef HAVE_GETROLES		/* getroles() is present in libc (AIX) */
X#undef HAVE_PRIVBIT_SET		/* privbit_set() is present in libc (AIX) */
X
X#undef HAVE_GETAUTHATTR		/* getauthattr() is present in -lsecdb */
X#undef HAVE_GETUSERATTR		/* getuserattr() is present in -lsecdb */
X#undef HAVE_GETEXECATTR		/* getexecattr() is present in -lsecdb */
X#undef HAVE_GETPROFATTR		/* getprofattr() is present in -lsecdb */
X
X#undef HAVE_GMATCH		/* gmatch() is present in -lgen */
X
X#undef HAVE_CLONE_AREA		/* clone_area() is present in libc */
X#undef HAVE_CREATE_AREA		/* create_area() is present in libc */
X#undef HAVE_DELETE_AREA		/* delete_area() is present in libc */
X
X#undef HAVE_DLOPEN_IN_LIBC	/* whether dlopen() is in libc (needs no -ldl) */
X#undef HAVE_DLOPEN		/* dlopen() is present in libc */
X#undef HAVE_DLCLOSE		/* dlclose() is present in libc */
X#undef HAVE_DLSYM		/* dlsym() is present in libc */
X#undef HAVE_DLERROR		/* dlerror() is present in libc */
X#undef HAVE_DLINFO		/* dlinfo() is present in libc */
X#undef HAVE_SHL_LOAD		/* shl_load() is present in libc */
X#undef HAVE_SHL_UNLOAD		/* shl_unload() is present in libc */
X#undef HAVE_SHL_GETHANDLE	/* shl_gethandle() is present in libc */
X#undef HAVE_LOADLOBRARY		/* LoadLibrary() as present in libc */
X#undef HAVE_FREELIBRARY		/* FreeLibrary() is present in libc */
X#undef HAVE_GETPROCADDRESS	/* GetProcAddress() is present in libc */
X
X#undef HAVE_YIELD		/* yield() is present in libc */
X#undef HAVE_THR_YIELD		/* thr_yield() is present in libc */
X
X#undef HAVE_PTHREAD_CREATE	/* pthread_create() is present in libpthread */
X#undef HAVE_PTHREAD_KILL	/* pthread_kill() is present in libpthread */
X#undef HAVE_PTHREAD_MUTEX_LOCK	/* pthread_mutex_lock() is present in libpthread */
X#undef HAVE_PTHREAD_COND_WAIT	/* pthread_cond_wait() is present in libpthread */
X#undef HAVE_PTHREAD_SPIN_LOCK	/* pthread_spin_lock() is present in libpthread */
X
X#undef HAVE_CLOCK_GETTIME	/* clock_gettime() is present in librt */
X#undef HAVE_CLOCK_SETTIME	/* clock_settime() is present in librt */
X#undef HAVE_CLOCK_GETRES	/* clock_getres() is present in librt */
X#undef HAVE_SCHED_GETPARAM	/* sched_getparam() is present in librt */
X#undef HAVE_SCHED_SETPARAM	/* sched_setparam() is present in librt */
X#undef HAVE_SCHED_GETSCHEDULER	/* sched_getscheduler() is present in librt */
X#undef HAVE_SCHED_SETSCHEDULER	/* sched_setscheduler() is present in librt */
X#undef HAVE_SCHED_YIELD		/* sched_yield() is present in librt */
X#undef HAVE_NANOSLEEP		/* nanosleep() is present in librt */
X
X#undef HAVE_DIRFD		/* dirfd() is present in libc */
X#undef HAVE_ISWPRINT		/* iswprint() is present in libc */
X#undef HAVE_MBSINIT		/* mbsinit() is present in libc */
X#undef HAVE_MBTOWC		/* mbtowc() is present in libc */
X#undef HAVE_WCTOMB		/* wctomb() is present in libc */
X#undef HAVE_MBRTOWC		/* mbrtowc() is present in libc */
X#undef HAVE_WCRTOMB		/* wcrtomb() is present in libc */
X
X#undef HAVE_PRINTF_J		/* *printf() in libc supports %jd */
X#undef HAVE_PRINTF_LL		/* *printf() in libc supports %lld */
X
X/*
X * Functions that we defined in 1982 but where POSIX.1-2008 defined
X * a POSIX violating incompatible definition.
X * We use AC_RCHECK_FUNCS(), so we get HAVE_RAW_* results as some
X * Linux distros have fexecve() that returns ENOSYS.
X */
X#undef HAVE_RAW_FEXECL		/* fexecl() */
X#undef HAVE_RAW_FEXECLE		/* fexecle() */
X#undef HAVE_RAW_FEXECV		/* fexecv() */
X#undef HAVE_RAW_FEXECVE		/* fexecve() */
X#undef HAVE_RAW_FSPAWNV		/* fspawnv() */
X#undef HAVE_RAW_FSPAWNL		/* fspawnl() */
X#undef HAVE_RAW_FSPAWNV_NOWAIT	/* fspawnv_nowait() */
X#undef HAVE_RAW_GETLINE		/* getline() */
X#undef HAVE_RAW_FGETLINE	/* fgetline() */
X
X
X/*
X * Misc OS stuff
X */
X#ifndef	_MSC_VER		/* Dirty hack, better use C program not test */
X#undef HAVE__DEV_TTY		/* /dev/tty present */
X#undef HAVE__DEV_NULL		/* /dev/null present */
X#undef HAVE__DEV_ZERO		/* /dev/zero present */
X#undef HAVE__DEV_STDIN		/* /dev/stdin present */
X#undef HAVE__DEV_STDOUT		/* /dev/stdout present */
X#undef HAVE__DEV_STDERR		/* /dev/stderr present */
X#undef HAVE__DEV_FD_0		/* /dev/fd/0 present */
X#undef HAVE__DEV_FD_1		/* /dev/fd/1 present */
X#undef HAVE__DEV_FD_2		/* /dev/fd/2 present */
X#endif
X
X/*
X * Misc OS programs
X */
X#undef	SHELL_IS_BASH		/* sh is bash */
X#undef	BIN_SHELL_IS_BASH	/* /bin/sh is bash */
X#undef	SHELL_CE_IS_BROKEN	/* sh -ce is broken */
X#undef	BIN_SHELL_CE_IS_BROKEN	/* /bin/sh -ce is broken */
X#undef	BIN_SHELL_BOSH		/* /bin/bosh is a working Bourne Shell */
X#undef	OPT_SCHILY_BIN_SHELL_BOSH /* /opt/schily/bin/bosh is a working Bourne Shell */
X
X/*
X * OS madness
X */
X#undef HAVE_BROKEN_LINUX_EXT2_FS_H	/* whether <linux/ext2_fs.h> is broken */
X#undef HAVE_BROKEN_SRC_LINUX_EXT2_FS_H	/* whether /usr/src/linux/include/linux/ext2_fs.h is broken */
X#undef HAVE_USABLE_LINUX_EXT2_FS_H	/* whether linux/ext2_fs.h is usable at all */
X#undef HAVE_BROKEN_SCSI_SCSI_H		/* whether <scsi/scsi.h> is broken */
X#undef HAVE_BROKEN_SRC_SCSI_SCSI_H	/* whether /usr/src/linux/include/scsi/scsi.h is broken */
X#undef HAVE_BROKEN_SCSI_SG_H		/* whether <scsi/sg.h> is broken */
X#undef HAVE_BROKEN_SRC_SCSI_SG_H	/* whether /usr/src/linux/include/scsi/sg.h is broken */
X
X/*
X * Linux Extended File Attributes
X */
X#undef HAVE_GETXATTR		/* getxattr()				*/
X#undef HAVE_SETXATTR		/* setxattr()				*/
X#undef HAVE_LISTXATTR		/* listxattr()				*/
X#undef HAVE_LGETXATTR		/* lgetxattr()				*/
X#undef HAVE_LSETXATTR		/* lsetxattr()				*/
X#undef HAVE_LLISTXATTR		/* llistxattr()				*/
X
X/*
X * Important:	This must be a result from a check _before_ the Large File test
X *		has been run. It then tells us whether these functions are
X *		available even when not in Large File mode.
X *
X *	Do not run the AC_FUNC_FSEEKO test from the GNU tar Large File test
X *	siute. It will use the same cache names and interfere with our test.
X *	Instead use the tests AC_SMALL_FSEEKO/AC_SMALL/STELLO and make sure
X *	they are placed before the large file tests.
X */
X#undef HAVE_FSEEKO		/* fseeko() is present in default compile mode */
X#undef HAVE_FTELLO		/* ftello() is present in default compile mode */
X
X#undef HAVE_RCMD		/* rcmd() is present in libc/libsocket */
X#undef HAVE_SOCKET		/* socket() is present in libc/libsocket */
X#undef HAVE_SOCKETPAIR		/* socketpair() is present in libc/libsocket */
X#undef HAVE_GETSERVBYNAME	/* getservbyname() is present in libc/libsocket */
X#undef HAVE_INET_NTOA		/* inet_ntoa() is present in libc/libsocket */
X#undef HAVE_GETADDRINFO		/* getaddrinfo() is present in libc/libsocket */
X#undef HAVE_GETNAMEINFO		/* getnameinfo() is present in libc/libsocket */
X
X#if	defined(HAVE_QUOTACTL) || defined(HAVE_QUOTAIOCTL)
X#	define HAVE_QUOTA	/* The system inludes quota */
X#endif
X
X/*
X * We need to test for the include files too because Apollo Domain/OS has a
X * libc that includes the functions but the includes files are not visible
X * from the BSD compile environment.
X *
X * ATARI MiNT has a non-working shmget(), so we test for it separately.
X */
X#if	defined(HAVE_SHMAT) && defined(HAVE_SHMGET) && \
X	defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H)
X#	define	HAVE_USGSHM	/* USG shared memory is present */
X#endif
X#if	defined(HAVE_SEMGET) && defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H)
X#	define	HAVE_USGSEM	/* USG semaphores are present */
X#endif
X
X#if	defined(HAVE_GETPGRP) && !defined(HAVE_BSD_GETPGRP)
X#define	HAVE_POSIX_GETPGRP 1	/* getpgrp() in libc is POSIX compliant */
X#endif
X#if	defined(HAVE_SETPGRP) && !defined(HAVE_BSD_SETPGRP)
X#define	HAVE_POSIX_SETPGRP 1	/* setpgrp() in libc is POSIX compliant */
X#endif
X
X/*
X * Structures
X */
X#undef HAVE_FILE__FLAGS		/* if FILE * contains _flags */
X#undef HAVE_FILE__IO_BUF_BASE	/* if FILE * contains _IO_buf_base */
X
X#undef HAVE_MTGET_TYPE		/* if struct mtget contains mt_type (drive type) */
X#undef HAVE_MTGET_MODEL		/* if struct mtget contains mt_model (drive type) */
X#undef HAVE_MTGET_DSREG		/* if struct mtget contains mt_dsreg (drive status) */
X#undef HAVE_MTGET_DSREG1	/* if struct mtget contains mt_dsreg1 (drive status msb) */
X#undef HAVE_MTGET_DSREG2	/* if struct mtget contains mt_dsreg2 (drive status lsb) */
X#undef HAVE_MTGET_GSTAT		/* if struct mtget contains mt_gstat (generic status) */
X#undef HAVE_MTGET_ERREG		/* if struct mtget contains mt_erreg (error register) */
X#undef HAVE_MTGET_RESID		/* if struct mtget contains mt_resid (residual count) */
X#undef HAVE_MTGET_FILENO	/* if struct mtget contains mt_fileno (file #) */
X#undef HAVE_MTGET_BLKNO		/* if struct mtget contains mt_blkno (block #) */
X#undef HAVE_MTGET_FLAGS		/* if struct mtget contains mt_flags (flags) */
X#undef HAVE_MTGET_BF		/* if struct mtget contains mt_bf (optimum blocking factor) */
X#undef HAVE_STRUCT_TIMEVAL	/* have struct timeval in time.h or sys/time.h */
X#undef HAVE_STRUCT_TIMEZONE	/* have struct timezone in time.h or sys/time.h */
X#undef HAVE_STRUCT_RUSAGE	/* have struct rusage in sys/resource.h */
X#undef HAVE_SI_UTIME		/* if struct siginfo contains si_utime */
X#undef HAVE_UNION_SEMUN		/* have an illegal definition for union semun in sys/sem.h */
X#undef HAVE_UNION_WAIT		/* have union wait in wait.h */
X#undef USE_UNION_WAIT		/* union wait in wait.h is used by default */
X#undef HAVE_DIRENT_D_INO	/* have d_ino in struct dirent */
X#undef HAVE_DIR_DD_FD		/* have dd_fd in DIR * */
X/*
X * SCO UnixWare has st_atim.st__tim.tv_nsec but the st_atim.tv_nsec tests also
X * succeeds. If you use st_atim.tv_nsec on UnixWare, you get a warning about
X * illegal structure usage. For this reason, your code needs to have
X * #ifdef HAVE_ST__TIM before #ifdef HAVE_ST_NSEC.
X */
X#undef HAVE_ST_SPARE1		/* if struct stat contains st_spare1 (usecs) */
X#undef HAVE_ST_ATIMENSEC	/* if struct stat contains st_atimensec (nanosecs) */
X#undef HAVE_ST_ATIME_N		/* if struct stat contains st_atime_n (nanosecs) */
X#undef HAVE_ST_NSEC		/* if struct stat contains st_atim.tv_nsec (nanosecs) */
X#undef HAVE_ST__TIM		/* if struct stat contains st_atim.st__tim.tv_nsec (nanosecs) */
X#undef HAVE_ST_ATIMESPEC	/* if struct stat contains st_atimespec.tv_nsec (nanosecs) */
X#undef HAVE_ST_BLKSIZE		/* if struct stat contains st_blksize */
X#undef HAVE_ST_BLOCKS		/* if struct stat contains st_blocks */
X#undef HAVE_ST_FSTYPE		/* if struct stat contains st_fstype */
X#undef HAVE_ST_ACLCNT		/* if struct stat contains st_aclcnt */
X#undef HAVE_ST_RDEV		/* if struct stat contains st_rdev */
X#undef HAVE_ST_FLAG		/* if struct stat contains st_flag */
X#undef HAVE_ST_FLAGS		/* if struct stat contains st_flags */
X#undef STAT_MACROS_BROKEN	/* if the macros S_ISDIR, S_ISREG .. don't work */
X
X#undef HAVE_UTSNAME_ARCH	/* if struct utsname contains processor as arch */
X#undef HAVE_UTSNAME_PROCESSOR	/* if struct utsname contains processor */
X#undef HAVE_UTSNAME_SYSNAME_HOST /* if struct utsname contains sysname_host */
X#undef HAVE_UTSNAME_RELEASE_HOST /* if struct utsname contains release_host */
X#undef HAVE_UTSNAME_VERSION_HOST /* if struct utsname contains version_host */
X
X#undef DEV_MINOR_BITS		/* # if bits needed to hold minor device number */
X#undef DEV_MINOR_NONCONTIG	/* if bits in minor device number are noncontiguous */
X
X#undef HAVE_SOCKADDR_STORAGE	/* if socket.h defines struct sockaddr_storage */
X
X
X/*
X * Byteorder/Bitorder
X */
X#define	HAVE_C_BIGENDIAN	/* Flag that WORDS_BIGENDIAN test was done */
X#undef WORDS_BIGENDIAN		/* If using network byte order             */
X#define	HAVE_C_BITFIELDS	/* Flag that BITFIELDS_HTOL test was done  */
X#undef BITFIELDS_HTOL		/* If high bits come first in structures   */
X
X/*
X * Types/Keywords
X */
X#undef SIZEOF_CHAR
X#undef SIZEOF_SHORT_INT
X#undef SIZEOF_INT
X#undef SIZEOF_LONG_INT
X#undef SIZEOF_LONG_LONG
X#undef SIZEOF___INT64
X#undef SIZEOF_CHAR_P
X#undef SIZEOF_UNSIGNED_CHAR
X#undef SIZEOF_UNSIGNED_SHORT_INT
X#undef SIZEOF_UNSIGNED_INT
X#undef SIZEOF_UNSIGNED_LONG_INT
X#undef SIZEOF_UNSIGNED_LONG_LONG
X#undef SIZEOF_UNSIGNED___INT64
X#undef SIZEOF_UNSIGNED_CHAR_P
X#undef SIZEOF_FLOAT
X#undef SIZEOF_DOUBLE
X#undef SIZEOF_LONG_DOUBLE
X
X#undef SIZEOF_SIZE_T
X#undef SIZEOF_SSIZE_T
X#undef SIZEOF_PTRDIFF_T
X
X#undef SIZEOF_MODE_T
X#undef SIZEOF_UID_T
X#undef SIZEOF_GID_T
X#undef SIZEOF_PID_T
X
X/*
X * If sizeof (mode_t) is < sizeof (int) and used with va_arg(),
X * GCC4 will abort the code. So we need to use the promoted size.
X */
X#if	SIZEOF_MODE_T < SIZEOF_INT
X#define	PROMOTED_MODE_T	int
X#else
X#define	PROMOTED_MODE_T	mode_t
X#endif
X
X#undef SIZEOF_DEV_T
X#undef SIZEOF_MAJOR_T
X#undef SIZEOF_MINOR_T
X
X#undef SIZEOF_TIME_T
X#undef SIZEOF_WCHAR		/* sizeof (L'a')	*/
X#undef SIZEOF_WCHAR_T		/* sizeof (wchar_t)	*/
X
X#undef HAVE_LONGLONG		/* Compiler defines long long type */
X#undef HAVE___INT64		/* Compiler defines __int64 type */
X#undef HAVE_LONGDOUBLE		/* Compiler defines long double type */
X#undef CHAR_IS_UNSIGNED		/* Compiler defines char to be unsigned */
X
X#undef const			/* Define to empty if const doesn't work */
X#undef uid_t			/* To be used if uid_t is not present  */
X#undef gid_t			/* To be used if gid_t is not present  */
X#undef size_t			/* To be used if size_t is not present */
X#undef ssize_t			/* To be used if ssize_t is not present */
X#undef ptrdiff_t		/* To be used if ptrdiff_t is not present */
X#undef pid_t			/* To be used if pid_t is not present  */
X#undef off_t			/* To be used if off_t is not present  */
X#undef mode_t			/* To be used if mode_t is not present */
X#undef time_t			/* To be used if time_t is not present */
X#undef caddr_t			/* To be used if caddr_t is not present */
X#undef daddr_t			/* To be used if daddr_t is not present */
X#undef dev_t			/* To be used if dev_t is not present */
X#undef major_t			/* To be used if major_t is not present */
X#undef minor_t			/* To be used if minor_t is not present */
X#undef ino_t			/* To be used if ino_t is not present */
X#undef nlink_t			/* To be used if nlink_t is not present */
X#undef blksize_t		/* To be used if blksize_t is not present */
X#undef blkcnt_t			/* To be used if blkcnt_t is not present */
X
X#undef	HAVE_TYPE_INTMAX_T	/* if <stdint.h> defines intmax_t */
X#undef	HAVE_TYPE_UINTMAX_T	/* if <stdint.h> defines uintmax_t */
X
X#undef int8_t			/* To be used if int8_t is not present */
X#undef int16_t			/* To be used if int16_t is not present */
X#undef int32_t			/* To be used if int32_t is not present */
X#if	defined(HAVE_LONGLONG) || defined(HAVE___INT64)
X#undef int64_t			/* To be used if int64_t is not present */
X#endif
X#undef intmax_t			/* To be used if intmax_t is not present */
X#undef uint8_t			/* To be used if uint8_t is not present */
X#undef uint16_t			/* To be used if uint16_t is not present */
X#undef uint32_t			/* To be used if uint32_t is not present */
X#if	defined(HAVE_LONGLONG) || defined(HAVE___INT64)
X#undef uint64_t			/* To be used if uint64_t is not present */
X#endif
X#undef uintmax_t		/* To be used if uintmax_t is not present */
X
X#undef	HAVE_TYPE_GREG_T	/* if <sys/frame.h> defines greg_t */
X
X#undef	HAVE_STACK_T		/* if <signal.h> defines stack_t */
X#undef	HAVE_SIGINFO_T		/* if <signal.h> defines siginfo_t */
X
X/*
X * Important:	Next Step needs time.h for clock_t (because of a bug)
X */
X#undef clock_t			/* To be used if clock_t is not present */
X#undef socklen_t		/* To be used if socklen_t is not present */
X
X/*
X * These types are present on all UNIX systems but should be avoided
X * for portability.
X * On Apollo/Domain OS we don't have them....
X *
X * Better include <schily/utypes.h> and use Uchar, Uint & Ulong
X */
X#undef u_char			/* To be used if u_char is not present	*/
X#undef u_short			/* To be used if u_short is not present	*/
X#undef u_int			/* To be used if u_int is not present	*/
X#undef u_long			/* To be used if u_long is not present	*/
X
X#undef wctype_t			/* To be used if wctype_t is not in wchar.h */
X#undef mbstate_t		/* To be used if mbstate_t is not in wchar.h */
X
X/*#undef HAVE_SIZE_T*/
X/*#undef NO_SIZE_T*/
X#undef VA_LIST_IS_ARRAY		/* va_list is an array */
X#undef GETGROUPS_T
X#define GID_T		GETGROUPS_T
X
X/*
X * Define as the return type of signal handlers (int or void).
X */
X#undef RETSIGTYPE
X
X/*
X * Defined in case that we have iconv(iconv_t, const char **, site_t *, ...)
X */
X#undef HAVE_ICONV_CONST
X
X/*
X * Defines needed to get large file support.
X */
X#ifdef	USE_LARGEFILES
X
X#undef	HAVE_LARGEFILES
X
X#ifdef	HAVE_LARGEFILES		/* If we have working largefiles at all	   */
X				/* This is not defined with glibc-2.1.3	   */
X
X#undef _FILE_OFFSET_BITS	/* # of bits in off_t if settable	   */
X#undef _LARGEFILE_SOURCE	/* To make ftello() visible (HP-UX 10.20). */
X#undef _LARGE_FILES		/* Large file defined on AIX-style hosts.  */
X#undef _XOPEN_SOURCE		/* To make ftello() visible (glibc 2.1.3). */
X				/* XXX We don't use this because glibc2.1.3*/
X				/* XXX is bad anyway. If we define	   */
X				/* XXX _XOPEN_SOURCE we will loose caddr_t */
X
X#undef HAVE_FSEEKO		/* Do we need this? If HAVE_LARGEFILES is  */
X				/* defined, we have fseeko()		   */
X
X#endif	/* HAVE_LARGEFILES */
X#endif	/* USE_LARGEFILES */
X
X#ifdef USE_ACL			/* Enable/disable ACL support */
X/*
X * POSIX ACL support
X */
X#undef HAVE_ACL_GET_FILE	/* acl_get_file() function */
X#undef HAVE_ACL_SET_FILE	/* acl_set_file() function */
X#undef HAVE_ACL_GET_ENTRY	/* acl_get_entry() function */
X#undef HAVE_ACL_FROM_TEXT	/* acl_from_text() function */
X#undef HAVE_ACL_TO_TEXT		/* acl_to_text() function */
X#undef HAVE_ACL_FREE		/* acl_free() function */
X#undef HAVE_ACL_DELETE_DEF_FILE	/* acl_delete_def_file() function */
X#undef HAVE_ACL_EXTENDED_FILE	/* acl_extended_file() function (Linux only)*/
X
X#if defined(HAVE_ACL_GET_FILE) && defined(HAVE_ACL_SET_FILE) && \
X    defined(HAVE_ACL_FROM_TEXT) && defined(HAVE_ACL_TO_TEXT) && \
X    defined(HAVE_ACL_FREE)
X#	define	HAVE_POSIX_ACL	1 /* POSIX ACL's present */
X#endif
X
X/*
X * Sun ACL support.
X * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc.
X */
X#undef HAVE_ACL			/* acl() function */
X#undef HAVE_FACL		/* facl() function */
X#undef HAVE_ACLFROMTEXT		/* aclfromtext() function */
X#undef HAVE_ACLTOTEXT		/* acltotext() function */
X
X#if defined(HAVE_ACL) && defined(HAVE_FACL) && \
X    defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT)
X#	define	HAVE_SUN_ACL	1 /* Sun ACL's present */
X#endif
X
X/*
X * HP-UX ACL support.
X * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc.
X */
X#undef HAVE_GETACL		/* getacl() function */
X#undef HAVE_FGETACL		/* fgetacl() function */
X#undef HAVE_SETACL		/* setacl() function */
X#undef HAVE_FSETACL		/* fsetacl() function */
X#undef HAVE_STRTOACL		/* strtoacl() function */
X#undef HAVE_ACLTOSTR		/* acltostr() function */
X#undef HAVE_CPACL		/* cpacl() function */
X#undef HAVE_FCPACL		/* fcpacl() function */
X#undef HAVE_CHOWNACL		/* chownacl() function */
X#undef HAVE_SETACLENTRY		/* setaclentry() function */
X#undef HAVE_FSETACLENTRY	/* fsetaclentry() function */
X
X#if defined(HAVE_GETACL) && defined(HAVE_FGETACL) && \
X    defined(HAVE_SETACL) && defined(HAVE_FSETACL) && \
X    defined(HAVE_STRTOACL) && defined(HAVE_ACLTOTEXT)
X#	define	HAVE_HP_ACL	1 /* HP-UX ACL's present */
X#endif
X
X/*
X * Global definition whether ACL support is present.
X * As HP-UX differs too much from other implementations, HAVE_HP_ACL is not
X * included in HAVE_ANY_ACL.
X */
X#if defined(HAVE_POSIX_ACL) || defined(HAVE_SUN_ACL)
X#	define	HAVE_ANY_ACL	1 /* Any ACL implementation present */
X#endif
X
X#endif	/* USE_ACL */
X
X/*
X * Misc CC / LD related stuff
X */
X#undef NO_USER_MALLOC		/* If we cannot define our own malloc()	*/
X#undef NO_USER_XCVT		/* If we cannot define our own ecvt()/fcvt()/gcvt() */
X#undef HAVE_DYN_ARRAYS		/* If the compiler allows dynamic sized arrays */
X#undef HAVE_PRAGMA_WEAK		/* If the compiler allows #pragma weak */
X#undef HAVE_STRINGIZE		/* If the cpp supports ANSI C stringize */
X#undef inline
X
X/*
X * Strings that help to maintain OS/platform id's in C-programs
X */
X#undef HOST_ALIAS		/* Output from config.guess (orig)	*/
X#undef HOST_SUB			/* Output from config.sub (modified)	*/
X#undef HOST_CPU			/* CPU part from HOST_SUB		*/
X#undef HOST_VENDOR		/* VENDOR part from HOST_SUB		*/
X#undef HOST_OS			/* CPU part from HOST_SUB		*/
X
X
X/*
X * Begin restricted code for quality assurance.
X *
X * Warning: you are not allowed to include the #define below if you are not
X * using the Schily makefile system or if you modified the autoconfiguration
X * tests.
X *
X * If you only added other tests you are allowed to keep this #define.
X *
X * This restiction is introduced because this way, I hope that people
X * contribute to the project instead of creating branches.
X */
X#define	IS_SCHILY_XCONFIG
X/*
X * End restricted code for quality assurance.
X */
X
X#endif	/* __XCONFIG_H */
END-of-star-1.5.2/autoconf/xconfig.h.in
echo x - star-1.5.2/autoconf/configure
sed 's/^X//' >star-1.5.2/autoconf/configure << 'END-of-star-1.5.2/autoconf/configure'
X#! /bin/sh
X
X# From configure.in 1.243
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X 
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X#serial 18
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X# Guess values for system-dependent variables and create Makefiles.
X# Generated automatically using autoconf version 2.13 1.15-Schily 
X# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
X# Copyright (C) 1998-2011 J. Schilling
X#
X# This configure script is free software; the Free Software Foundation
X# gives unlimited permission to copy, distribute and modify it.
X
X# Defaults:
Xac_help=
Xac_default_prefix=/usr/local
X# Any additions from configure.in:
Xac_help="$ac_help
X  --disable-largefile     omit support for large files"
X
X# Initialize some variables set by options.
X# The variables have the same names as the options, with
X# dashes changed to underlines.
Xbuild=NONE
Xcache_file=./config.cache
Xexec_prefix=NONE
Xhost=NONE
Xno_create=
Xnonopt=NONE
Xno_recursion=
Xprefix=NONE
Xprogram_prefix=NONE
Xprogram_suffix=NONE
Xprogram_transform_name=s,x,x,
Xsilent=
Xsite=
Xsrcdir=
Xtarget=NONE
Xverbose=
Xrmttest=test
Xrmtcall=
XCONFIG_RMTCALL=${CONFIG_RMTCALL-NONE}
Xx_includes=NONE
Xx_libraries=NONE
Xbindir='${exec_prefix}/bin'
Xsbindir='${exec_prefix}/sbin'
Xlibexecdir='${exec_prefix}/libexec'
Xdatadir='${prefix}/share'
Xsysconfdir='${prefix}/etc'
Xsharedstatedir='${prefix}/com'
Xlocalstatedir='${prefix}/var'
Xlibdir='${exec_prefix}/lib'
Xincludedir='${prefix}/include'
Xoldincludedir='/usr/include'
Xinfodir='${prefix}/info'
Xmandir='${prefix}/man'
X
X# Initialize some other variables.
Xsubdirs=
XMFLAGS= MAKEFLAGS=
XSHELL=${CONFIG_SHELL-/bin/sh}
X# Maximum number of lines to put in a shell here document.
Xac_max_here_lines=12
X
Xac_prev=
Xfor ac_option
Xdo
X
X  # If the previous option needs an argument, assign it.
X  if test -n "$ac_prev"; then
X    eval "$ac_prev=\$ac_option"
X    ac_prev=
X    continue
X  fi
X
X  case "$ac_option" in
X  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
X  *) ac_optarg= ;;
X  esac
X
X  # Accept the important Cygnus configure options, so we can diagnose typos.
X
X  case "$ac_option" in
X
X  -bindir | --bindir | --bindi | --bind | --bin | --bi)
X    ac_prev=bindir ;;
X  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
X    bindir="$ac_optarg" ;;
X
X  -build | --build | --buil | --bui | --bu)
X    ac_prev=build ;;
X  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
X    build="$ac_optarg" ;;
X
X  -cache-file | --cache-file | --cache-fil | --cache-fi \
X  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X    ac_prev=cache_file ;;
X  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X    cache_file="$ac_optarg" ;;
X
X  -cc=* | --cc=* )
X    CC="$ac_optarg" ; echo using $CC as compiler ;;
X
X  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
X    ac_prev=datadir ;;
X  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
X  | --da=*)
X    datadir="$ac_optarg" ;;
X
X  -disable-* | --disable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
X      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    eval "enable_${ac_feature}=no" ;;
X
X  -enable-* | --enable-*)
X    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
X      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
X    fi
X    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "enable_${ac_feature}='$ac_optarg'" ;;
X
X  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
X  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
X  | --exec | --exe | --ex)
X    ac_prev=exec_prefix ;;
X  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
X  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
X  | --exec=* | --exe=* | --ex=*)
X    exec_prefix="$ac_optarg" ;;
X
X  -gas | --gas | --ga | --g)
X    # Obsolete; use --with-gas.
X    with_gas=yes ;;
X
X  -help | --help | --hel | --he)
X    # Omit some internal or obsolete options to make the list less imposing.
X    # This message is too long to be a string in the A/UX 3.1 sh.
X    cat << EOF
XUsage: configure [options] [host]
XOptions: [defaults in brackets after descriptions]
XConfiguration:
X  --cache-file=FILE       cache test results in FILE
X  --help                  print this message
X  --no-create             do not create output files
X  --quiet, --silent       do not print \`checking...' messages
X  --version               print the version of autoconf that created configure
XDirectory and file names:
X  --prefix=PREFIX         install architecture-independent files in PREFIX
X                          [$ac_default_prefix]
X  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
X                          [same as prefix]
X  --bindir=DIR            user executables in DIR [EPREFIX/bin]
X  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
X  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
X  --datadir=DIR           read-only architecture-independent data in DIR
X                          [PREFIX/share]
X  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
X  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
X                          [PREFIX/com]
X  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
X  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
X  --includedir=DIR        C header files in DIR [PREFIX/include]
X  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
X  --infodir=DIR           info documentation in DIR [PREFIX/info]
X  --mandir=DIR            man documentation in DIR [PREFIX/man]
X  --srcdir=DIR            find the sources in DIR [configure dir or ..]
X  --program-prefix=PREFIX prepend PREFIX to installed program names
X  --program-suffix=SUFFIX append SUFFIX to installed program names
X  --program-transform-name=PROGRAM
X                          run sed PROGRAM on installed program names
XEOF
X    cat << EOF
XHost type:
X  --build=BUILD           configure for building on BUILD [BUILD=HOST]
X  --host=HOST             configure for HOST [guessed]
X  --target=TARGET         configure for TARGET [TARGET=HOST]
XFeatures and packages:
X  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
X  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
X  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
X  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
X  --x-includes=DIR        X include files are in DIR
X  --x-libraries=DIR       X library files are in DIR
XEOF
X    if test -n "$ac_help"; then
X      echo "--enable and --with options recognized:$ac_help"
X    fi
X    exit 0 ;;
X
X  -host | --host | --hos | --ho)
X    ac_prev=host ;;
X  -host=* | --host=* | --hos=* | --ho=*)
X    host="$ac_optarg" ;;
X
X  -includedir | --includedir | --includedi | --included | --include \
X  | --includ | --inclu | --incl | --inc)
X    ac_prev=includedir ;;
X  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
X  | --includ=* | --inclu=* | --incl=* | --inc=*)
X    includedir="$ac_optarg" ;;
X
X  -infodir | --infodir | --infodi | --infod | --info | --inf)
X    ac_prev=infodir ;;
X  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
X    infodir="$ac_optarg" ;;
X
X  -libdir | --libdir | --libdi | --libd)
X    ac_prev=libdir ;;
X  -libdir=* | --libdir=* | --libdi=* | --libd=*)
X    libdir="$ac_optarg" ;;
X
X  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
X  | --libexe | --libex | --libe)
X    ac_prev=libexecdir ;;
X  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
X  | --libexe=* | --libex=* | --libe=*)
X    libexecdir="$ac_optarg" ;;
X
X  -localstatedir | --localstatedir | --localstatedi | --localstated \
X  | --localstate | --localstat | --localsta | --localst \
X  | --locals | --local | --loca | --loc | --lo)
X    ac_prev=localstatedir ;;
X  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
X  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
X  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
X    localstatedir="$ac_optarg" ;;
X
X  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
X    ac_prev=mandir ;;
X  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
X    mandir="$ac_optarg" ;;
X
X  -nfp | --nfp | --nf)
X    # Obsolete; use --without-fp.
X    with_fp=no ;;
X
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c)
X    no_create=yes ;;
X
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
X    no_recursion=yes ;;
X
X  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
X  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
X  | --oldin | --oldi | --old | --ol | --o)
X    ac_prev=oldincludedir ;;
X  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
X  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
X  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
X    oldincludedir="$ac_optarg" ;;
X
X  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
X    ac_prev=prefix ;;
X  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
X    prefix="$ac_optarg" ;;
X
X  -program-prefix | --program-prefix | --program-prefi | --program-pref \
X  | --program-pre | --program-pr | --program-p)
X    ac_prev=program_prefix ;;
X  -program-prefix=* | --program-prefix=* | --program-prefi=* \
X  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
X    program_prefix="$ac_optarg" ;;
X
X  -program-suffix | --program-suffix | --program-suffi | --program-suff \
X  | --program-suf | --program-su | --program-s)
X    ac_prev=program_suffix ;;
X  -program-suffix=* | --program-suffix=* | --program-suffi=* \
X  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
X    program_suffix="$ac_optarg" ;;
X
X  -program-transform-name | --program-transform-name \
X  | --program-transform-nam | --program-transform-na \
X  | --program-transform-n | --program-transform- \
X  | --program-transform | --program-transfor \
X  | --program-transfo | --program-transf \
X  | --program-trans | --program-tran \
X  | --progr-tra | --program-tr | --program-t)
X    ac_prev=program_transform_name ;;
X  -program-transform-name=* | --program-transform-name=* \
X  | --program-transform-nam=* | --program-transform-na=* \
X  | --program-transform-n=* | --program-transform-=* \
X  | --program-transform=* | --program-transfor=* \
X  | --program-transfo=* | --program-transf=* \
X  | --program-trans=* | --program-tran=* \
X  | --progr-tra=* | --program-tr=* | --program-t=*)
X    program_transform_name="$ac_optarg" ;;
X
X  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X  | -silent | --silent | --silen | --sile | --sil)
X    silent=yes ;;
X
X  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
X    ac_prev=sbindir ;;
X  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
X  | --sbi=* | --sb=*)
X    sbindir="$ac_optarg" ;;
X
X  -sharedstatedir | --sharedstatedir | --sharedstatedi \
X  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
X  | --sharedst | --shareds | --shared | --share | --shar \
X  | --sha | --sh)
X    ac_prev=sharedstatedir ;;
X  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
X  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
X  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
X  | --sha=* | --sh=*)
X    sharedstatedir="$ac_optarg" ;;
X
X  -site | --site | --sit)
X    ac_prev=site ;;
X  -site=* | --site=* | --sit=*)
X    site="$ac_optarg" ;;
X
X  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X    ac_prev=srcdir ;;
X  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X    srcdir="$ac_optarg" ;;
X
X  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
X  | --syscon | --sysco | --sysc | --sys | --sy)
X    ac_prev=sysconfdir ;;
X  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
X  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
X    sysconfdir="$ac_optarg" ;;
X
X  -target | --target | --targe | --targ | --tar | --ta | --t)
X    ac_prev=target ;;
X  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
X    target="$ac_optarg" ;;
X
X  -v | -verbose | --verbose | --verbos | --verbo | --verb)
X    verbose=yes ;;
X
X  -version | --version | --versio | --versi | --vers)
X    echo "configure generated by autoconf version 2.13 1.15-Schily"
X    exit 0 ;;
X
X  -with-* | --with-*)
X    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
X      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    case "$ac_option" in
X      *=*) ;;
X      *) ac_optarg=yes ;;
X    esac
X    eval "with_${ac_package}='$ac_optarg'" ;;
X
X  -without-* | --without-*)
X    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
X    # Reject names that are not valid shell variable names.
X    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
X      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
X    fi
X    ac_package=`echo $ac_package| sed 's/-/_/g'`
X    eval "with_${ac_package}=no" ;;
X
X  --x)
X    # Obsolete; use --with-x.
X    with_x=yes ;;
X
X  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
X  | --x-incl | --x-inc | --x-in | --x-i)
X    ac_prev=x_includes ;;
X  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
X  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
X    x_includes="$ac_optarg" ;;
X
X  -x-libraries | --x-libraries | --x-librarie | --x-librari \
X  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
X    ac_prev=x_libraries ;;
X  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
X  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
X    x_libraries="$ac_optarg" ;;
X
X  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
X    ;;
X
X  *)
X    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
X      echo "configure: warning: $ac_option: invalid host type" 1>&2
X    fi
X    if test "x$nonopt" != xNONE; then
X      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
X    fi
X    nonopt="$ac_option"
X    ;;
X
X  esac
Xdone
X
Xif test -n "$ac_prev"; then
X  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Xfi
X
Xtrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
X# File descriptor usage:
X# 0 standard input
X# 1 file creation
X# 2 errors and warnings
X# 3 some systems may open it to /dev/tty
X# 4 used on the Kubota Titan
X# 6 checking for... messages and results
X# 5 compiler messages saved in config.log
Xif test "$silent" = yes; then
X  exec 6>/dev/null
Xelse
X  exec 6>&1
Xfi
Xexec 5>./config.log
X
Xecho "\
XThis file contains any messages produced by compilers while
Xrunning configure, to aid debugging if configure makes a mistake.
X" 1>&5
X
X# Strip out --no-create and --no-recursion so they do not pile up.
X# Also quote any args containing shell metacharacters.
Xac_configure_args=
Xfor ac_arg
Xdo
X  case "$ac_arg" in
X  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X  | --no-cr | --no-c) ;;
X  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
X  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
X  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
X  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
X  esac
Xdone
X
X# NLS nuisances.
X# Only set these to C if already set.  These must not be set unconditionally
X# because not all systems understand e.g. LANG=C (notably SCO).
X# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
X# Non-C LC_CTYPE values break the ctype check.
Xif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Xif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Xif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Xif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
X
X# confdefs.h avoids OS command line length limits that DEFS can exceed.
Xrm -rf conftest* confdefs.h
X# AIX cpp loses on an empty file, so make sure it contains at least a newline.
Xecho > confdefs.h
X
X# A filename unique to this package, relative to the directory that
X# configure is in, which we can look for to find out if srcdir is correct.
Xac_unique_file=config.guess
X
X# Find the source files, if location was not specified.
Xif test -z "$srcdir"; then
X  ac_srcdir_defaulted=yes
X  # Try the directory containing this script, then its parent.
X  ac_prog=$0
X  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
X  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
X  srcdir=$ac_confdir
X  if test ! -r $srcdir/$ac_unique_file; then
X    srcdir=..
X  fi
Xelse
X  ac_srcdir_defaulted=no
Xfi
Xif test ! -r $srcdir/$ac_unique_file; then
X  if test "$ac_srcdir_defaulted" = yes; then
X    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
X  else
X    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
X  fi
Xfi
Xsrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
X
X# Prefer explicitly selected file to automatically selected ones.
Xif test -z "$CONFIG_SITE"; then
X  if test "x$prefix" != xNONE; then
X    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
X  else
X    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
X  fi
Xfi
Xfor ac_site_file in $CONFIG_SITE; do
X  if test -r "$ac_site_file"; then
X    echo "loading site script $ac_site_file"
X    . "$ac_site_file"
X  fi
Xdone
X
Xif test -r "$cache_file"; then
X  echo "loading cache $cache_file"
X  . $cache_file
Xelse
X  echo "creating cache $cache_file"
X  > $cache_file
Xfi
X
Xac_ext=c
X# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CPP $CPPFLAGS'
Xac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Xac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5'
Xcross_compiling=$ac_cv_prog_cc_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X
Xac_exeext=
Xac_xexeext=
Xac_objext=o
Xif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
X  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
X  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
X    ac_n= ac_c='
X' ac_t='	'
X  else
X    ac_n=-n ac_c= ac_t=
X  fi
Xelse
X  ac_n= ac_c='\c' ac_t=
Xfi
X
X
X
Xac_aux_dir=
Xfor ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
X  if test -f $ac_dir/install-sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install-sh -c"
X    break
X  elif test -f $ac_dir/install.sh; then
X    ac_aux_dir=$ac_dir
X    ac_install_sh="$ac_aux_dir/install.sh -c"
X    break
X  fi
Xdone
Xif test -z "$ac_aux_dir"; then
X  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Xfi
Xac_config_guess=$ac_aux_dir/config.guess
Xac_config_sub=$ac_aux_dir/config.sub
Xac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
X
X
X# Make sure we can run config.sub.
Xif ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
Xelse { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
Xfi
X
Xecho $ac_n "checking host system type""... $ac_c" 1>&6
Xecho "configure:873: checking host system type" >&5
X
Xhost_alias=$host
Xcase "$host_alias" in
XNONE)
X  case $nonopt in
X  NONE)
X    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
X    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
X    fi ;;
X  *) host_alias=$nonopt ;;
X  esac ;;
Xesac
X
Xhost=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
Xhost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Xhost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Xhost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Xeval echo "$ac_t""$host" 1>&6
X
X
Xecho $ac_n "checking if sh is bash""... $ac_c" 1>&6
Xecho "configure:895: checking if sh is bash" >&5
Xif eval "test \"`echo '$''{'ac_cv_shell_is_bash'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_shell_is_bash=yes
Xelse
X	ac_cv_shell_is_bash=no
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_shell_is_bash" 1>&6
Xif test $ac_cv_shell_is_bash = yes; then
X  cat >> confdefs.h <<\EOF
X#define SHELL_IS_BASH 1
XEOF
X
Xfi
Xecho $ac_n "checking if /bin/sh is bash""... $ac_c" 1>&6
Xecho "configure:917: checking if /bin/sh is bash" >&5
Xif eval "test \"`echo '$''{'ac_cv_bin_shell_is_bash'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null /bin/sh --version 2> /dev/null | egrep 'GNU sh|bash'`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_is_bash=yes
Xelse
X	ac_cv_bin_shell_is_bash=no
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_bin_shell_is_bash" 1>&6
Xif test $ac_cv_bin_shell_is_bash = yes; then
X  cat >> confdefs.h <<\EOF
X#define BIN_SHELL_IS_BASH 1
XEOF
X
Xfi
Xecho $ac_n "checking whether sh -ce is broken""... $ac_c" 1>&6
Xecho "configure:939: checking whether sh -ce is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_shell_ce_is_broken'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_shell_ce_is_broken=yes
Xelse
X	ac_cv_shell_ce_is_broken=no
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_shell_ce_is_broken" 1>&6
Xif test $ac_cv_shell_ce_is_broken = yes; then
X  cat >> confdefs.h <<\EOF
X#define SHELL_CE_IS_BROKEN 1
XEOF
X
Xfi
Xecho $ac_n "checking whether /bin/sh -ce is broken""... $ac_c" 1>&6
Xecho "configure:961: checking whether /bin/sh -ce is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_bin_shell_ce_is_broken'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`/bin/sh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
Xif test -n "$ac_err"; then
X	ac_cv_bin_shell_ce_is_broken=yes
Xelse
X	ac_cv_bin_shell_ce_is_broken=no
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_bin_shell_ce_is_broken" 1>&6
Xif test $ac_cv_bin_shell_ce_is_broken = yes; then
X  cat >> confdefs.h <<\EOF
X#define BIN_SHELL_CE_IS_BROKEN 1
XEOF
X
Xfi
Xecho $ac_n "checking whether /bin/bosh is a working shell""... $ac_c" 1>&6
Xecho "configure:983: checking whether /bin/bosh is a working shell" >&5
Xif eval "test \"`echo '$''{'ac_cv_bin_shell_bosh'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null /bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_bin_shell_bosh=no
Xelse
X	ac_err=`/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_bin_shell_bosh=yes
X	else
X		ac_cv_bin_shell_bosh=no
X	fi
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_bin_shell_bosh" 1>&6
Xif test $ac_cv_bin_shell_bosh = yes; then
X  cat >> confdefs.h <<\EOF
X#define BIN_SHELL_BOSH 1
XEOF
X
Xfi
Xecho $ac_n "checking whether /opt/schily/bin/bosh is a working shell""... $ac_c" 1>&6
Xecho "configure:1010: checking whether /opt/schily/bin/bosh is a working shell" >&5
Xif eval "test \"`echo '$''{'ac_cv_opt_schily_bin_shell_bosh'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xac_err=`< /dev/null /opt/schily/bin/bosh -c 'echo abc' 2> /dev/null | grep abc`
Xif test "$ac_err" != "abc"; then
X	ac_cv_opt_schily_bin_shell_bosh=no
Xelse
X	ac_err=`/opt/schily/bin/bosh -ce 'for i in 1 2 3; do  ( echo $i; if test -d . ; then (false; echo 4);  fi ) ; done' | grep 2`
X	if test -z "$ac_err"; then
X		ac_cv_opt_schily_bin_shell_bosh=yes
X	else
X		ac_cv_opt_schily_bin_shell_bosh=no
X	fi
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_opt_schily_bin_shell_bosh" 1>&6
Xif test $ac_cv_opt_schily_bin_shell_bosh = yes; then
X  cat >> confdefs.h <<\EOF
X#define OPT_SCHILY_BIN_SHELL_BOSH 1
XEOF
X
Xfi
X# Extract the first word of "cc", so it can be a program name with args.
Xset dummy cc; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1039: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$CC"; then
X  ac_cv_prog_CC="$CC" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_CC="cc"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
X  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
Xfi
Xfi
XCC="$ac_cv_prog_CC"
Xif test -n "$CC"; then
X  eval echo "$ac_t""$CC" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X	# Extract the first word of "gcc", so it can be a program name with args.
Xset dummy gcc; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1068: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$CC"; then
X  ac_cv_prog_CC="$CC" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_CC="gcc"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xfi
Xfi
XCC="$ac_cv_prog_CC"
Xif test -n "$CC"; then
X  eval echo "$ac_t""$CC" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xif test -z "$CC"; then
X  # Extract the first word of "cc", so it can be a program name with args.
Xset dummy cc; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1098: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$CC"; then
X  ac_cv_prog_CC="$CC" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_prog_rejected=no
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
X        ac_prog_rejected=yes
X	continue
X      fi
X      ac_cv_prog_CC="cc"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xif test $ac_prog_rejected = yes; then
X  # We found a bogon in the path, so make sure we never use it.
X  set dummy $ac_cv_prog_CC
X  shift
X  if test $# -gt 0; then
X    # We chose a different compiler from the bogus one.
X    # However, it has the same basename, so the bogon will be chosen
X    # first if we set CC to just the basename; use the full file name.
X    shift
X    set dummy "$ac_dir/$ac_word" "$@"
X    shift
X    ac_cv_prog_CC="$@"
X  fi
Xfi
Xfi
Xfi
XCC="$ac_cv_prog_CC"
Xif test -n "$CC"; then
X  eval echo "$ac_t""$CC" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
X  if test -z "$CC"; then
X    case "`uname -s`" in
X    *win32* | *WIN32*)
X      # Extract the first word of "cl", so it can be a program name with args.
Xset dummy cl; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1149: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$CC"; then
X  ac_cv_prog_CC="$CC" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_CC="cl"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xfi
Xfi
XCC="$ac_cv_prog_CC"
Xif test -n "$CC"; then
X  eval echo "$ac_t""$CC" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X ;;
X    esac
X  fi
X  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
Xfi
X
Xecho $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Xecho "configure:1181: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
X
Xac_ext=c
X# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CPP $CPPFLAGS'
Xac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Xac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5'
Xcross_compiling=$ac_cv_prog_cc_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X
Xcat > conftest.$ac_ext << EOF
X
X#line 1197 "configure"
X#include "confdefs.h"
X
Xmain(){return(0);}
XEOF
Xif { (eval echo configure:1202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  ac_cv_prog_cc_works=yes
X  # If we can't run a trivial program, we are probably using a cross compiler.
X  if (./conftest${ac_xexeext}; exit) 2>/dev/null; then
X    ac_cv_prog_cc_cross=no
X  else
X    ac_cv_prog_cc_cross=yes
X  fi
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  ac_cv_prog_cc_works=no
Xfi
Xrm -fr conftest*
Xac_ext=c
X# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Xac_cpp='$CPP $CPPFLAGS'
Xac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Xac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5'
Xcross_compiling=$ac_cv_prog_cc_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X
Xeval echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
Xif test $ac_cv_prog_cc_works = no; then
X  ccout=`eval "${CC-cc} 2>&1" 2> /dev/null`
X  ret=$?
X  nf=`echo "$ccout" | grep 'not found'`
X  if test $ret = 127 -a -n "$nf" ; then	# Korn Shell
X      ccout=""
X  fi
X  if test "$ret" -ne 0 -a ! -n "$ccout" ; then
X      { echo "configure: error: installation or configuration problem: C compiler ${CC-cc} not found." 1>&2; exit 1; }
X  fi
X  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
Xfi
Xecho $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Xecho "configure:1242: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Xeval echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
Xcross_compiling=$ac_cv_prog_cc_cross
Xif test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then
X	cross_compiling=remote
X	rmtcall="$CONFIG_RMTCALL"
X	rmttest="$CONFIG_RMTCALL"
Xfi
X
Xecho $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Xecho "configure:1252: checking whether we are using GNU C" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.c <<EOF
X#ifdef __GNUC__
X  yes;
X#endif
XEOF
Xif { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
X  ac_cv_prog_gcc=yes
Xelse
X  ac_cv_prog_gcc=no
Xfi
Xfi
X
Xeval echo "$ac_t""$ac_cv_prog_gcc" 1>&6
X
Xif test $ac_cv_prog_gcc = yes; then
X  GCC=yes
Xelse
X  GCC=
Xfi
X
Xac_test_CFLAGS="${CFLAGS+set}"
Xac_save_CFLAGS="$CFLAGS"
XCFLAGS=
Xecho $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Xecho "configure:1280: checking whether ${CC-cc} accepts -g" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  echo 'void f(){}' > conftest.c
Xif test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
X  ac_cv_prog_cc_g=yes
Xelse
X  ac_cv_prog_cc_g=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Xif test "$ac_test_CFLAGS" = set; then
X  CFLAGS="$ac_save_CFLAGS"
Xelif test $ac_cv_prog_cc_g = yes; then
X  if test "$GCC" = yes; then
X    CFLAGS="-g -O2"
X  else
X    CFLAGS="-g"
X  fi
Xelse
X  if test "$GCC" = yes; then
X    CFLAGS="-O2"
X  else
X    CFLAGS=
X  fi
Xfi
X			
Xif test "$cross_compiling" = remote -a ."$CONFIG_RMTCALL" = . ; then
X	echo 'CONFIG_RMTCALL=script-path required for remote execution' 1>&2
X	exit 1
Xfi
Xif test "$cross_compiling" = remote -a ."$CONFIG_RMTHOST" = . ; then
X	echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2
X	exit 1
Xfi
Xif test "$cross_compiling" = remote ; then
X	echo "Cross-Compiling with remote execution of test programs"
X	echo "Cross-Compile script: $CONFIG_RMTCALL"
X	echo "Cross-Compile host:   $CONFIG_RMTHOST"
Xfi
X			echo $ac_n "checking for object suffix""... $ac_c" 1>&6
Xecho "configure:1325: checking for object suffix" >&5
Xif eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  rm -f conftest*
Xecho 'int i = 1;' > conftest.$ac_ext
Xif { (eval echo configure:1331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  for ac_file in conftest.*; do
X    case $ac_file in
X    *.c) ;;
X    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
X    esac
X  done
Xelse
X  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_objext" 1>&6
XOBJEXT=$ac_cv_objext
Xac_objext=$ac_cv_objext
X
Xecho $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Xecho "configure:1349: checking for Cygwin environment" >&5
Xif eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1354 "configure"
X#include "confdefs.h"
X
Xint main() {
X
X#ifndef __CYGWIN__
X#define __CYGWIN__ __CYGWIN32__
X#endif
Xreturn __CYGWIN__;
X; return 0; }
XEOF
Xif { (eval echo configure:1365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_cygwin=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_cygwin=no
Xfi
Xrm -f conftest*
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_cygwin" 1>&6
XCYGWIN=
Xtest "$ac_cv_cygwin" = yes && CYGWIN=yes
Xecho $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Xecho "configure:1382: checking for mingw32 environment" >&5
Xif eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1387 "configure"
X#include "confdefs.h"
X
Xint main() {
Xreturn __MINGW32__;
X; return 0; }
XEOF
Xif { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_mingw32=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_mingw32=no
Xfi
Xrm -f conftest*
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_mingw32" 1>&6
XMINGW32=
Xtest "$ac_cv_mingw32" = yes && MINGW32=yes
Xecho $ac_n "checking for EMX/OS2 environment""... $ac_c" 1>&6
Xecho "configure:1411: checking for EMX/OS2 environment" >&5
Xif eval "test \"`echo '$''{'ac_cv_emxos2'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1416 "configure"
X#include "confdefs.h"
X
Xint main() {
Xreturn __EMX__;
X; return 0; }
XEOF
Xif { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_emxos2=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_emxos2=no
Xfi
Xrm -f conftest*
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_emxos2" 1>&6
Xif eval "test \"`echo '$''{'ac_cv_libpre'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$ac_cv_emxos2" = yes ; then
X  ac_cv_libpre=
Xelse
X  ac_cv_libpre=lib
Xfi
X
Xfi
X
XEMXOS2=
Xtest "$ac_cv_emxos2" = yes && EMXOS2=yes
X
X
X
Xecho $ac_n "checking for executable suffix""... $ac_c" 1>&6
Xecho "configure:1454: checking for executable suffix" >&5
Xif eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
X  ac_cv_exeext=.exe
X  ac_cv_xexeext=""
Xelse
X  rm -f conftest*
X  echo 'int main () { return 0; }' > conftest.$ac_ext
X  ac_cv_exeext=
X  if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
X    for file in conftest.*; do
X      case $file in
X      *.c | *.o | *.obj) ;;
X      *.dSYM) ;;	# Ignore strange directory found on Mac OS X with cc -g
X      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
X      esac
X    done
X  else
X    ccout=`eval "${CC-cc} 2>&1" 2> /dev/null`
X    ret=$?
X    nf=`echo "$ccout" | grep 'not found'`
X    if test $ret = 127 -a -n "$nf" ; then	# Korn Shell
X        ccout=""
X    fi
X    if test "$ret" -ne 0 -a ! -n "$ccout" ; then
X        { echo "configure: error: installation or configuration problem: C compiler ${CC-cc} not found." 1>&2; exit 1; }
X    fi
X    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
X  fi
X  (./conftest ; exit) 2> /dev/null
X  if test $? != 0 ; then
X	ac_cv_xexeext="${ac_cv_exeext}"
X	(./conftest${ac_cv_xexeext} ; exit) 2> /dev/null
X	if test $? != 0 ; then
X		ac_cv_xexeext=""
X	fi
X  fi
X  rm -f conftest*
X  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
X  test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no
Xfi
Xfi
X
XEXEEXT=""
XXEXEEXT=""
Xtest x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
Xtest x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext}
Xeval echo "$ac_t""${ac_cv_exeext}" 1>&6
Xecho $ac_n "checking for executable calling suffix""... $ac_c" 1>&6
Xecho "configure:1505: checking for executable calling suffix" >&5
Xeval echo "$ac_t""${ac_cv_xexeext}" 1>&6
Xac_exeext=$EXEEXT
Xac_xexeext=$XEXEEXT
X
X
X
Xecho $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Xecho "configure:1513: checking how to run the C preprocessor" >&5
X# On Suns, sometimes $CPP names a directory.
Xif test -n "$CPP" && test -d "$CPP"; then
X  CPP=
Xfi
Xif test -z "$CPP"; then
Xif eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X    # This must be in double quotes, not single quotes, because CPP may get
X  # substituted into the Makefile and "${CC-cc}" will confuse make.
X  CPP="${CC-cc} -E"
X  # On the NeXT, cc -E runs the code through the compiler's parser,
X  # not just through cpp.
X  cat > conftest.$ac_ext <<EOF
X#line 1528 "configure"
X#include "confdefs.h"
X#include <assert.h>
XSyntax Error
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  :
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  CPP="${CC-cc} -E -traditional-cpp"
X  cat > conftest.$ac_ext <<EOF
X#line 1545 "configure"
X#include "confdefs.h"
X#include <assert.h>
XSyntax Error
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  :
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  CPP="${CC-cc} -nologo -E"
X  cat > conftest.$ac_ext <<EOF
X#line 1562 "configure"
X#include "confdefs.h"
X#include <assert.h>
XSyntax Error
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  :
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  CPP=/lib/cpp
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
X  ac_cv_prog_CPP="$CPP"
Xfi
X  CPP="$ac_cv_prog_CPP"
Xelse
X  ac_cv_prog_CPP="$CPP"
Xfi
Xeval echo "$ac_t""$CPP" 1>&6
X
Xecho $ac_n "checking how to run the C preprocessor for any type of file""... $ac_c" 1>&6
Xecho "configure:1593: checking how to run the C preprocessor for any type of file" >&5
Xif test -z "$CPPX"; then
Xif eval "test \"`echo '$''{'ac_cv_prog_CPPX'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X    # This must be in double quotes, not single quotes, because CPP may get
X  # substituted into the Makefile and "${CC-cc}" will confuse make.
X  CPPX="$CPP"
X	cat > conftestcpp << EOF
X	xxzzy
XEOF
X	# gcc -E does not accept any file suffix, so we need to test
X	# and if $CC -E fails, we try to use dirname(which($CC))/cpp
X	# We cannot use AC_TRY_EVAL(CPPX conftestcpp | grep xxzzy) because
X	# of a bug in the parser from bash
X	ac_result=`(echo configure:1288: "$CPPX conftestcpp | grep xxzzy" 1>&5; eval $CPPX conftestcpp | grep xxzzy) 2>&5`
X	if test -z "$ac_result"; then
X				ac_file=`eval type ${CC-cc} 2>/dev/null | sed 's%[^/]*/%/%'`
X		# Remove last slash and all that follows it.  Not all systems have dirname.
X		ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
X				if test -f "$ac_dir"/cpp; then
X			CPPX="$ac_dir"/cpp
X		fi
X	fi
X	ac_cv_prog_CPPX="$CPPX"
Xfi
X	CPPX="$ac_cv_prog_CPPX"
Xelse
X	ac_cv_prog_CPPX="$CPPX"
Xfi
Xeval echo "$ac_t""$CPPX" 1>&6
X
Xecho $ac_n "checking if suncc/cc supports -m64""... $ac_c" 1>&6
Xecho "configure:1626: checking if suncc/cc supports -m64" >&5
Xif eval "test \"`echo '$''{'ac_cv_sun_cc64_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xsun_cc64=cc
Xsun_cc64_opt=''
Xac_cv_sun_cc64_opt=no
Xif test "$GCC" != yes; then
X	if test "$CC" = suncc; then
X		sun_cc64=suncc
X	fi
X	ac_err=`< /dev/null eval $sun_cc64 -m64 -c 2>&1 | grep illegal`
X	if test -n "$ac_err"; then
X		ac_cv_sun_cc64_opt=no
X	else
X		ac_cv_sun_cc64_opt=yes
X	fi
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_sun_cc64_opt" 1>&6
Xif test $ac_cv_sun_cc64_opt = yes; then
X  sun_cc64_opt='-m64'
Xfi
Xecho $ac_n "checking if HP cc supports -Ae""... $ac_c" 1>&6
Xecho "configure:1653: checking if HP cc supports -Ae" >&5
Xif eval "test \"`echo '$''{'ac_cv_hp_cc_ansi_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xhp_cc=cc
Xhp_cc_ansi_opt=''
Xac_cv_hp_cc_ansi_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -Ae -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_ansi_opt=no
X		else
X			ac_cv_hp_cc_ansi_opt=yes
X		fi
X	fi
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_hp_cc_ansi_opt" 1>&6
Xif test $ac_cv_hp_cc_ansi_opt = yes; then
X  hp_cc_ansi_opt='-Ae'
Xfi
Xecho $ac_n "checking if HP cc supports -O""... $ac_c" 1>&6
Xecho "configure:1680: checking if HP cc supports -O" >&5
Xif eval "test \"`echo '$''{'ac_cv_hp_cc_opt_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xhp_cc=cc
Xhp_cc_opt_opt=''
Xac_cv_hp_cc_opt_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_opt_opt=no
X		else
X			ac_cv_hp_cc_opt_opt=yes
X		fi
X	fi
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_hp_cc_opt_opt" 1>&6
Xif test $ac_cv_hp_cc_opt_opt = yes; then
X  hp_cc_opt_opt='-O'
Xfi
Xecho $ac_n "checking if HP cc supports -G""... $ac_c" 1>&6
Xecho "configure:1707: checking if HP cc supports -G" >&5
Xif eval "test \"`echo '$''{'ac_cv_hp_cc_gprof_opt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  
Xhp_cc=cc
Xhp_cc_gprof_opt=''
Xac_cv_hp_cc_gprof_opt=no
Xif test "$GCC" != yes; then
X	os_name=`(uname -s) 2> /dev/null`
X	if test ."$os_name" = .HP-UX ; then
X		ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'`
X		if test -n "$ac_err"; then
X			ac_cv_hp_cc_gprof_opt=no
X		else
X			ac_cv_hp_cc_gprof_opt=yes
X		fi
X	fi
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_hp_cc_gprof_opt" 1>&6
Xif test $ac_cv_hp_cc_gprof_opt = yes; then
X  hp_cc_gprof_opt='-G'
Xfi
X# Extract the first word of "ranlib", so it can be a program name with args.
Xset dummy ranlib; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1736: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$RANLIB"; then
X  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_RANLIB="ranlib"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
X  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Xfi
Xfi
XRANLIB="$ac_cv_prog_RANLIB"
Xif test -n "$RANLIB"; then
X  eval echo "$ac_t""$RANLIB" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xecho $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Xecho "configure:1764: checking whether ${MAKE-make} sets \${MAKE}" >&5
Xset dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftestmake <<\EOF
Xall:
X	@echo 'ac_maketemp="${MAKE}"'
XEOF
X# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Xeval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
Xif test -n "$ac_maketemp"; then
X  eval ac_cv_prog_make_${ac_make}_set=yes
Xelse
X  eval ac_cv_prog_make_${ac_make}_set=no
Xfi
Xrm -f conftestmake
Xfi
Xif eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  SET_MAKE=
Xelse
X  eval echo "$ac_t""no" 1>&6
X  SET_MAKE="MAKE=${MAKE-make}"
Xfi
X
Xfor ac_prog in yacc 'bison -y' byacc
Xdo
X# Extract the first word of "$ac_prog", so it can be a program name with args.
Xset dummy $ac_prog; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1795: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$YACC"; then
X  ac_cv_prog_YACC="$YACC" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_YACC="$ac_prog"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xfi
Xfi
XYACC="$ac_cv_prog_YACC"
Xif test -n "$YACC"; then
X  eval echo "$ac_t""$YACC" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xtest -n "$YACC" && break
Xdone
Xtest -n "$YACC" || YACC="noyacc"
X
Xfor ac_prog in bison
Xdo
X# Extract the first word of "$ac_prog", so it can be a program name with args.
Xset dummy $ac_prog; ac_word=$2
Xecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
Xecho "configure:1830: checking for $ac_word" >&5
Xif eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test -n "$BISON"; then
X  ac_cv_prog_BISON="$BISON" # Let the user override the test.
Xelse
X  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
X  ac_dummy="$PATH"
X  for ac_dir in $ac_dummy; do
X    test -z "$ac_dir" && ac_dir=.
X    if test -f $ac_dir/$ac_word; then
X      ac_cv_prog_BISON="$ac_prog"
X      break
X    fi
X  done
X  IFS="$ac_save_ifs"
Xfi
Xfi
XBISON="$ac_cv_prog_BISON"
Xif test -n "$BISON"; then
X  eval echo "$ac_t""$BISON" 1>&6
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xtest -n "$BISON" && break
Xdone
Xtest -n "$BISON" || BISON="nobison"
X
X
Xecho $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Xecho "configure:1862: checking for ANSI C header files" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1867 "configure"
X#include "confdefs.h"
X#include <stdlib.h>
X#include <stdarg.h>
X#include <string.h>
X#include <float.h>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  ac_cv_header_stdc=yes
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -f conftest*
X
Xif test $ac_cv_header_stdc = yes; then
X  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Xcat > conftest.$ac_ext <<EOF
X#line 1892 "configure"
X#include "confdefs.h"
X#include <string.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "memchr" >/dev/null 2>&1; then
X  :
Xelse
X  rm -rf conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Xcat > conftest.$ac_ext <<EOF
X#line 1910 "configure"
X#include "confdefs.h"
X#include <stdlib.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "free" >/dev/null 2>&1; then
X  :
Xelse
X  rm -rf conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xif test $ac_cv_header_stdc = yes; then
X  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Xif test "$cross_compiling" = yes; then
X  :
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1931 "configure"
X#include "confdefs.h"
X#include <ctype.h>
X#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
X#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
X#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Xint main () { int i; for (i = 0; i < 256; i++)
Xif (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
Xexit (0); }
X
XEOF
Xif { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_header_stdc=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_stdc" 1>&6
Xif test $ac_cv_header_stdc = yes; then
X  cat >> confdefs.h <<\EOF
X#define STDC_HEADERS 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_STDARG_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_STDLIB_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRING_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_FLOAT_H 1
XEOF
X
Xfi
X
Xfor ac_hdr in stdarg.h stdlib.h string.h float.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:1985: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 1990 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X	echo $ac_n "checking for UNIX-98 compliant inttypes.h""... $ac_c" 1>&6
Xecho "configure:2021: checking for UNIX-98 compliant inttypes.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_inttypes'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2026 "configure"
X#include "confdefs.h"
X#include <inttypes.h>
Xint main() {
Xint8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;
X; return 0; }
XEOF
Xif { (eval echo configure:2035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_inttypes=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_inttypes=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_inttypes" 1>&6
Xif test $ac_cv_header_inttypes = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_INTTYPES_H 1
XEOF
X
Xfi
Xecho $ac_n "checking for SUSv3 compliant stdint.h""... $ac_c" 1>&6
Xecho "configure:2055: checking for SUSv3 compliant stdint.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_stdint'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2060 "configure"
X#include "confdefs.h"
X#include <stdint.h>
Xint main() {
Xint8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui;
Xint64_t ll; uint64_t ull;
Xintptr_t ip; uintptr_t uip;
Xintmax_t im; uintmax_t uim;
X; return 0; }
XEOF
Xif { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_stdint=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_stdint=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_stdint" 1>&6
Xif test $ac_cv_header_stdint = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STDINT_H 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_TYPE_INTMAX_T 1
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define HAVE_TYPE_UINTMAX_T 1
XEOF
X
Xfi
Xac_xsave_LIBS="$LIBS"
XLIBS=""
Xac_header_dirent=no
Xfor ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Xecho "configure:2104: checking for $ac_hdr that defines DIR" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2109 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <$ac_hdr>
Xint main() {
XDIR *dirp = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  eval "ac_cv_header_dirent_$ac_safe=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_dirent_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X ac_header_dirent=$ac_hdr; break
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
Xif test $ac_header_dirent = dirent.h; then
Xecho $ac_n "checking for opendir in -lc""... $ac_c" 1>&6
Xecho "configure:2142: checking for opendir in -lc" >&5
Xac_lib_var=`echo c'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 2150 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  :
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Xecho "configure:2180: checking for opendir in -ldir" >&5
Xac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-ldir  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 2188 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  LIBS="$LIBS -ldir"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xelse
Xecho $ac_n "checking for opendir in -lc""... $ac_c" 1>&6
Xecho "configure:2223: checking for opendir in -lc" >&5
Xac_lib_var=`echo c'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 2231 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  :
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Xecho "configure:2261: checking for opendir in -lx" >&5
Xac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lx  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 2269 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar opendir();
X
Xint main() {
Xopendir()
X; return 0; }
XEOF
Xif { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  LIBS="$LIBS -lx"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xfi
X
Xlib_dir="$LIBS"
XLIBS="$ac_xsave_LIBS"
Xecho $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
Xecho "configure:2307: checking whether stat file-mode macros are broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2312 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#if defined(S_ISBLK) && defined(S_IFDIR)
X# if S_ISBLK (S_IFDIR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISBLK) && defined(S_IFCHR)
X# if S_ISBLK (S_IFCHR)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISLNK) && defined(S_IFREG)
X# if S_ISLNK (S_IFREG)
XYou lose.
X# endif
X#endif
X
X#if defined(S_ISSOCK) && defined(S_IFREG)
X# if S_ISSOCK (S_IFREG)
XYou lose.
X# endif
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "You lose" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_header_stat_broken=yes
Xelse
X  rm -rf conftest*
X  ac_cv_header_stat_broken=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
Xif test $ac_cv_header_stat_broken = yes; then
X  cat >> confdefs.h <<\EOF
X#define STAT_MACROS_BROKEN 1
XEOF
X
Xfi
X
Xecho $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Xecho "configure:2363: checking whether time.h and sys/time.h may both be included" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2368 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <time.h>
Xint main() {
Xstruct tm *tp;
X; return 0; }
XEOF
Xif { (eval echo configure:2377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_time=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_time=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_time" 1>&6
Xif test $ac_cv_header_time = yes; then
X  cat >> confdefs.h <<\EOF
X#define TIME_WITH_SYS_TIME 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
Xecho "configure:2398: checking for sys/wait.h that is POSIX.1 compatible" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2403 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/wait.h>
X#ifndef WEXITSTATUS
X#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
X#endif
X#ifndef WIFEXITED
X#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
X#endif
Xint main() {
Xint s;
Xwait (&s);
Xs = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
X; return 0; }
XEOF
Xif { (eval echo configure:2419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_sys_wait_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_sys_wait_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
Xif test $ac_cv_header_sys_wait_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SYS_WAIT_H 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if select needs nonstd include files""... $ac_c" 1>&6
Xecho "configure:2440: checking if select needs nonstd include files" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_slect_nonstd_hdr'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2445 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
Xint main() {
Xfd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);
X; return 0; }
XEOF
Xif { (eval echo configure:2453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_slect_nonstd_hdr=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_slect_nonstd_hdr=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_slect_nonstd_hdr" 1>&6
Xif test $ac_cv_header_slect_nonstd_hdr = yes; then
X  cat >> confdefs.h <<\EOF
X#define SELECT_NONSTD_HDR 1
XEOF
X
Xfi
Xecho $ac_n "checking if sys/select.h is needed for select""... $ac_c" 1>&6
Xecho "configure:2473: checking if sys/select.h is needed for select" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_need_sys_select_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2478 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/select.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif
Xint main() {
Xfd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);
X; return 0; }
XEOF
Xif { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_need_sys_select_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_need_sys_select_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_need_sys_select_h" 1>&6
Xif test $ac_cv_header_need_sys_select_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define NEED_SYS_SELECT_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if sys/socket.h is needed for select""... $ac_c" 1>&6
Xecho "configure:2510: checking if sys/socket.h is needed for select" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_need_sys_socket_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2515 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/socket.h>
X#ifndef	SELECT_NONSTD_HDR
Xdo not compile if we do not need nonstandard headers
X#endif
Xint main() {
Xfd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);
X; return 0; }
XEOF
Xif { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_need_sys_socket_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_need_sys_socket_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_need_sys_socket_h" 1>&6
Xif test $ac_cv_header_need_sys_socket_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define NEED_SYS_SOCKET_H 1
XEOF
X
Xfi
Xfor ac_hdr in assert.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2550: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2555 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h io.h sys/file.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2590: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2595 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in conio.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2630: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2635 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in getopt.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2670: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2675 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in limits.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2710: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2715 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in a.out.h aouthdr.h elf.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2750: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2755 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sysexits.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2790: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2795 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in malloc.h sgtty.h termios.h termio.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2830: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2835 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in pwd.h grp.h sys/acl.h acllib.h acl/libacl.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2870: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2875 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in signal.h siginfo.h sys/siginfo.h ucontext.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2910: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2915 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in shadow.h syslog.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2950: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2955 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:2960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:2990: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 2995 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/syscall.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3030: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3035 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in mach/machine.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3070: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3075 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in mntent.h sys/mntent.h sys/mnttab.h sys/mount.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3110: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3115 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h libproc.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3150: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3155 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ulimit.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3190: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3195 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in process.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3230: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3235 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3270: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3275 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3310: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3315 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/shm.h sys/sem.h sys/ipc.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3350: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3355 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3390: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3395 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/types.h sys/stat.h types.h stat.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3430: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3435 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/stypes.h sys/filedesc.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3470: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3475 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/acct.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3510: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3515 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in poll.h sys/poll.h sys/select.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3550: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3555 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in netdb.h sys/socket.h netinet/in.h stropts.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3590: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3595 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ieeefp.h fp.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3630: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3635 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in values.h float.h math.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3670: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3675 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in arpa/inet.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3710: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3715 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in bsd/dev/scsireg.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3750: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3755 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in sys/bsdtty.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3790: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3795 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in scsi/scsi.h scsi/sg.h linux/scsi.h linux.sg.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3830: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3835 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in linux/types.h linux/gfp.h asm/types.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3870: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3875 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in OS.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3910: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3915 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in os2.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3950: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3955 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:3960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in os2me.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:3990: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 3995 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in windows.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4030: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4035 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ext2fs/ext2_fs.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4070: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4075 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in attr/xattr.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4110: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4115 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in crt_externs.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4150: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4155 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in fnmatch.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4190: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4195 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in libintl.h locale.h langinfo.h nl_types.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4230: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4235 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in ctype.h wctype.h wchar.h iconv.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4270: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4275 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in priv.h sys/priv.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4310: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4315 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in exec_attr.h secdb.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4350: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4355 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in direct.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4390: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4395 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in pthread.h thread.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4430: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4435 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in libgen.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4470: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4475 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in regex.h regexp.h regexpr.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4510: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4515 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_hdr in dlfcn.h link.h dl.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:4550: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4555 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xecho $ac_n "checking for header file containing  major(), minor() and makedev()""... $ac_c" 1>&6
Xecho "configure:4588: checking for header file containing  major(), minor() and makedev()" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_makedev'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_header_makedev=none
Xcat > conftest.$ac_ext <<EOF
X#line 4594 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mkdev.h>
Xint main() {
Xint i = major(0); i = minor(0); i = makedev(0,0);
X; return 0; }
XEOF
Xif { (eval echo configure:4602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_makedev=sys/mkdev.h
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xif test $ac_cv_header_makedev = none; then
X  cat > conftest.$ac_ext <<EOF
X#line 4612 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/sysmacros.h>
Xint main() {
Xint i = major(0); i = minor(0); i = makedev(0,0);
X; return 0; }
XEOF
Xif { (eval echo configure:4620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_makedev=sys/sysmacros.h
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_makedev" 1>&6
Xif test $ac_cv_header_makedev = sys/mkdev.h; then
X  cat >> confdefs.h <<\EOF
X#define MAJOR_IN_MKDEV 1
XEOF
X
Xfi
Xif test $ac_cv_header_makedev = sys/sysmacros.h; then
X  cat >> confdefs.h <<\EOF
X#define MAJOR_IN_SYSMACROS 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking bits in minor device number""... $ac_c" 1>&6
Xecho "configure:4647: checking bits in minor device number" >&5
Xif eval "test \"`echo '$''{'ac_cv_dev_minor_bits'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4655 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	FILE	*f=fopen("conftestval", "w");
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	if (!f) exit(1);
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
X	fprintf(f, "%d\n", m);
X	exit(0);
X}
XEOF
Xif { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_dev_minor_bits=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_dev_minor_bits=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_dev_minor_bits" 1>&6
Xcat >> confdefs.h <<EOF
X#define DEV_MINOR_BITS $ac_cv_dev_minor_bits
XEOF
X
X
Xecho $ac_n "checking whether bits in minor device numbers are non contiguous""... $ac_c" 1>&6
Xecho "configure:4732: checking whether bits in minor device numbers are non contiguous" >&5
Xif eval "test \"`echo '$''{'ac_cv_dev_minor_noncontig'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4740 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef major
X#	define _FOUND_MAJOR_
X#endif
X
X#ifdef MAJOR_IN_MKDEV
X#	include <sys/mkdev.h>
X#	define _FOUND_MAJOR_
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	ifdef MAJOR_IN_SYSMACROS
X#		include <sys/sysmacros.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	if defined(hpux) || defined(__hpux__) || defined(__hpux)
X#		include <sys/mknod.h>
X#		define _FOUND_MAJOR_
X#	endif
X#endif
X
X#ifndef _FOUND_MAJOR_
X#	define major(dev)		(((dev) >> 8) & 0xFF)
X#	define minor(dev)		((dev) & 0xFF)
X#	define makedev(majo, mino)	(((majo) << 8) | (mino))
X#endif
Xint
Xmain()
X{
X	long	l = 1;
X	int	i;
X	int	m;
X	int	c = 0;
X	int	maxloop = 32;
X
X	if (sizeof (long) > 4)
X		maxloop = 64;
X
X	for (i=1, m=0; i <= maxloop; i++, l<<=1) {
X		if (minor(l) == 0 && c == 0)
X			c = m;
X		if (minor(l) != 0)
X			m = i;
X	}
Xexit (m == c);}
XEOF
Xif { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_dev_minor_noncontig=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_dev_minor_noncontig=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_dev_minor_noncontig" 1>&6
Xif test $ac_cv_dev_minor_noncontig = yes; then
X  cat >> confdefs.h <<\EOF
X#define DEV_MINOR_NONCONTIG 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for _filbuf()""... $ac_c" 1>&6
Xecho "configure:4815: checking for _filbuf()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func__filbuf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4820 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X_filbuf(f);
X_flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func__filbuf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func__filbuf=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func__filbuf" 1>&6
Xif test $ac_cv_func__filbuf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE__FILBUF 1
XEOF
X
Xfi
Xecho $ac_n "checking for __filbuf()""... $ac_c" 1>&6
Xecho "configure:4860: checking for __filbuf()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func___filbuf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4865 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X__filbuf(f);
X__flsbuf(c, f);
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func___filbuf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func___filbuf=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func___filbuf" 1>&6
Xif test $ac_cv_func___filbuf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE___FILBUF 1
XEOF
X
Xfi
Xecho $ac_n "checking for USG derived STDIO""... $ac_c" 1>&6
Xecho "configure:4905: checking for USG derived STDIO" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_usg_stdio'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4910 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flag;
Xint     count;
Xchar    *ptr;
Xchar	c = 0;
Xf = fopen("confdefs.h", "r");
X#ifdef	HAVE___FILBUF
X__filbuf(f);
X__flsbuf(c, f);
X#else
X#	ifdef	HAVE__FILBUF
X_filbuf(f);
X_flsbuf(c, f);
X#	else
Xno filbuf()
X#	endif
X#endif
Xflag  = f->_flag & _IONBF;
Xflag |= f->_flag & _IOERR;
Xflag |= f->_flag & _IOEOF;
Xcount = f->_cnt;
Xptr = (char *)f->_ptr;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_header_usg_stdio=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_usg_stdio=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_usg_stdio" 1>&6
Xif test $ac_cv_header_usg_stdio = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_USG_STDIO 1
XEOF
X
Xfi
Xecho $ac_n "checking for errno definition in errno.h""... $ac_c" 1>&6
Xecho "configure:4959: checking for errno definition in errno.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_errno_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4964 "configure"
X#include "confdefs.h"
X#include <errno.h>
Xint main() {
Xerrno = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:4971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_errno_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_errno_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_errno_def" 1>&6
Xif test $ac_cv_header_errno_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ERRNO_DEF 1
XEOF
X
Xfi
Xecho $ac_n "checking for environ definition in unistd.h/stdlib.h""... $ac_c" 1>&6
Xecho "configure:4991: checking for environ definition in unistd.h/stdlib.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_environ_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 4996 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_UNISTD_H
X#include <unistd.h>
X#else
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>	/* MSC no unistd.h but environ in stdlib.h */
X#endif
X#endif
X
Xint main() {
Xenviron = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:5011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_environ_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_environ_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_environ_def" 1>&6
Xif test $ac_cv_header_environ_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ENVIRON_DEF 1
XEOF
X
Xfi
Xecho $ac_n "checking for sys_siglist definition in signal.h""... $ac_c" 1>&6
Xecho "configure:5031: checking for sys_siglist definition in signal.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_sys_siglist_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5036 "configure"
X#include "confdefs.h"
X#include <signal.h>
Xint main() {
Xchar *cp = (char *)sys_siglist[0]; exit (cp != (char *)0 && *cp != 0);
X; return 0; }
XEOF
Xif { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_header_sys_siglist_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_sys_siglist_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_sys_siglist_def" 1>&6
Xif test $ac_cv_header_sys_siglist_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SYS_SIGLIST_DEF 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for working const""... $ac_c" 1>&6
Xecho "configure:5064: checking for working const" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5069 "configure"
X#include "confdefs.h"
X
Xint main() {
X
X/* Ultrix mips cc rejects this.  */
Xtypedef int charset[2]; const charset x;
X/* SunOS 4.1.1 cc rejects this.  */
Xchar const *const *ccp;
Xchar **p;
X/* NEC SVR4.0.2 mips cc rejects this.  */
Xstruct point {int x, y;};
Xstatic struct point const zero = {0,0};
X/* AIX XL C 1.02.0.0 rejects this.
X   It does not let you subtract one const X* pointer from another in an arm
X   of an if-expression whose if-part is not a constant expression */
Xconst char *g = "string";
Xccp = &g + (g ? g-g : 0);
X/* HPUX 7.0 cc rejects these. */
X++ccp;
Xp = (char**) ccp;
Xccp = (char const *const *) p;
X{ /* SCO 3.2v4 cc rejects this.  */
X  char *t;
X  char const *s = 0 ? (char *) 0 : (char const *) 0;
X
X  *t++ = 0;
X}
X{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
X  int x[] = {25, 17};
X  const int *foo = &x[0];
X  ++foo;
X}
X{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
X  typedef const int *iptr;
X  iptr p = 0;
X  ++p;
X}
X{ /* AIX XL C 1.02.0.0 rejects this saying
X     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
X  struct s { int j; const int *ap[3]; };
X  struct s *b; b->j = 5;
X}
X{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
X  const int foo = 10;
X}
X
X; return 0; }
XEOF
Xif { (eval echo configure:5118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_c_const=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_c_const=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_c_const" 1>&6
Xif test $ac_cv_c_const = no; then
X  cat >> confdefs.h <<\EOF
X#define const 
XEOF
X
Xfi
X
Xecho $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Xecho "configure:5139: checking whether byte ordering is bigendian" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_c_bigendian=unknown
X# See if sys/param.h defines the BYTE_ORDER macro.
Xcat > conftest.$ac_ext <<EOF
X#line 5146 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/param.h>
Xint main() {
X
X#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
X bogus endian macros
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:5157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  # It does; now see whether it defined to BIG_ENDIAN or not.
Xcat > conftest.$ac_ext <<EOF
X#line 5161 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/param.h>
Xint main() {
X
X#if BYTE_ORDER != BIG_ENDIAN
X not big endian
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_c_bigendian=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_c_bigendian=no
Xfi
Xrm -f conftest*
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xif test $ac_cv_c_bigendian = unknown; then
Xif test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5192 "configure"
X#include "confdefs.h"
Xmain () {
X  /* Are we little or big endian?  From Harbison&Steele.  */
X  union
X  {
X    long l;
X    char c[sizeof (long)];
X  } u;
X  u.l = 1;
X  exit (u.c[sizeof (long) - 1] == 1);
X}
XEOF
Xif { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_c_bigendian=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_c_bigendian=yes
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xfi
X
Xeval echo "$ac_t""$ac_cv_c_bigendian" 1>&6
Xif test $ac_cv_c_bigendian = yes; then
X  cat >> confdefs.h <<\EOF
X#define WORDS_BIGENDIAN 1
XEOF
X
Xfi
X
Xecho $ac_n "checking whether bitorder in bitfields is htol""... $ac_c" 1>&6
Xecho "configure:5229: checking whether bitorder in bitfields is htol" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_bitfields_htol'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5237 "configure"
X#include "confdefs.h"
X
Xstruct {
X	unsigned char	x1:4;
X	unsigned char	x2:4;
X} a;
Xint
Xmain()
X{
Xchar	*cp;
X
Xcp = (char *)&a;
X*cp = 0x12;
Xexit(a.x1 == 2);}
XEOF
Xif { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_c_bitfields_htol=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_c_bitfields_htol=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_c_bitfields_htol" 1>&6
Xif test $ac_cv_c_bitfields_htol = yes; then
X  cat >> confdefs.h <<\EOF
X#define BITFIELDS_HTOL 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
Xecho "configure:5277: checking for preprocessor stringizing operator" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5282 "configure"
X#include "confdefs.h"
X
X#define x(y) #y
X
Xchar *s = x(teststring);
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "#teststring" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_c_stringize=no
Xelse
X  rm -rf conftest*
X  ac_cv_c_stringize=yes
Xfi
Xrm -f conftest*
X
Xfi
X
Xif test "${ac_cv_c_stringize}" = yes
Xthen
X        cat >> confdefs.h <<\EOF
X#define HAVE_STRINGIZE 1
XEOF
X
Xfi
Xeval echo "$ac_t""${ac_cv_c_stringize}" 1>&6
X
Xecho $ac_n "checking for inline""... $ac_c" 1>&6
Xecho "configure:5312: checking for inline" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_c_inline=no
Xfor ac_kw in inline __inline__ __inline; do
X  cat > conftest.$ac_ext <<EOF
X#line 5319 "configure"
X#include "confdefs.h"
X
Xint main() {
X} $ac_kw foo() {
X; return 0; }
XEOF
Xif { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_c_inline=$ac_kw; break
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xdone
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_c_inline" 1>&6
Xcase "$ac_cv_c_inline" in
X  inline | yes)
X	cat >> confdefs.h <<\EOF
X#define HAVE_INLINE 1
XEOF
X
X	;;
X  no)	cat >> confdefs.h <<\EOF
X#define inline 
XEOF
X
X	;;
X  *)	cat >> confdefs.h <<EOF
X#define inline $ac_cv_c_inline
XEOF
X
X	cat >> confdefs.h <<\EOF
X#define HAVE_INLINE 1
XEOF
X
X	;;
Xesac
X
Xecho $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Xecho "configure:5363: checking return type of signal handlers" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5368 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <signal.h>
X#ifdef signal
X#undef signal
X#endif
X#ifdef __cplusplus
Xextern "C" void (*signal (int, void (*)(int)))(int);
X#else
Xvoid (*signal ()) ();
X#endif
X
Xint main() {
Xint i;
X; return 0; }
XEOF
Xif { (eval echo configure:5385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_signal=void
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_signal=int
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_signal" 1>&6
Xcat >> confdefs.h <<EOF
X#define RETSIGTYPE $ac_cv_type_signal
XEOF
X
X
Xecho $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Xecho "configure:5404: checking for uid_t in sys/types.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5409 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "uid_t" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uid_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uid_t=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Xif test $ac_cv_type_uid_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uid_t int
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define gid_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
Xecho "configure:5438: checking type of array argument to getgroups" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_type_getgroups=cross
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5446 "configure"
X#include "confdefs.h"
X
X/* Thanks to Mike Rendell for this test.  */
X#include <sys/types.h>
X#define NGID 256
X#undef MAX
X#define MAX(x, y) ((x) > (y) ? (x) : (y))
Xmain()
X{
X  gid_t gidset[NGID];
X  int i, n;
X  union { gid_t gval; long lval; }  val;
X
X  val.lval = -1;
X  for (i = 0; i < NGID; i++)
X    gidset[i] = val.gval;
X  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
X                 gidset);
X  /* Exit non-zero if getgroups seems to require an array of ints.  This
X     happens when gid_t is short but getgroups modifies an array of ints.  */
X  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
X}
X
XEOF
Xif { (eval echo configure:5471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X    ac_cv_type_getgroups=gid_t
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_type_getgroups=int
Xfi
Xrm -fr conftest*
Xfi
X
Xif test $ac_cv_type_getgroups = cross; then
X        cat > conftest.$ac_ext <<EOF
X#line 5485 "configure"
X#include "confdefs.h"
X#include <unistd.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_getgroups=gid_t
Xelse
X  rm -rf conftest*
X  ac_cv_type_getgroups=int
Xfi
Xrm -f conftest*
X
Xfi
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_getgroups" 1>&6
Xcat >> confdefs.h <<EOF
X#define GETGROUPS_T $ac_cv_type_getgroups
XEOF
X
X
Xecho $ac_n "checking for type long long""... $ac_c" 1>&6
Xecho "configure:5509: checking for type long long" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5514 "configure"
X#include "confdefs.h"
X
Xint main() {
Xlong long i;
X; return 0; }
XEOF
Xif { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_longlong=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_longlong=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_longlong" 1>&6
Xif test $ac_cv_type_longlong = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_LONGLONG 1
XEOF
X
Xfi
Xecho $ac_n "checking for type __int64""... $ac_c" 1>&6
Xecho "configure:5541: checking for type __int64" >&5
Xif eval "test \"`echo '$''{'ac_cv_type___int64'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5546 "configure"
X#include "confdefs.h"
X
Xint main() {
X__int64 i;
X; return 0; }
XEOF
Xif { (eval echo configure:5553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type___int64=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type___int64=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type___int64" 1>&6
Xif test $ac_cv_type___int64 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE___INT64 1
XEOF
X
Xfi
Xecho $ac_n "checking for type long double""... $ac_c" 1>&6
Xecho "configure:5573: checking for type long double" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_longdouble'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5578 "configure"
X#include "confdefs.h"
X
Xint main() {
Xlong double ld;
X; return 0; }
XEOF
Xif { (eval echo configure:5585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_longdouble=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_longdouble=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_longdouble" 1>&6
Xif test $ac_cv_type_longdouble = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_LONGDOUBLE 1
XEOF
X
Xfi
Xecho $ac_n "checking for prototypes""... $ac_c" 1>&6
Xecho "configure:5605: checking for prototypes" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_prototypes'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5613 "configure"
X#include "confdefs.h"
X
Xdoit(int i, ...)
X{return 0;}
Xint
Xmain(int ac, char *av[])
X{ doit(1, 2, 3);
Xexit(0);}
XEOF
Xif { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_type_prototypes=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_type_prototypes=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_prototypes" 1>&6
Xif test $ac_cv_type_prototypes = yes; then
X  cat >> confdefs.h <<\EOF
X#define PROTOTYPES 1
XEOF
X
Xfi
Xecho $ac_n "checking if compiler allows dynamic arrays""... $ac_c" 1>&6
Xecho "configure:5645: checking if compiler allows dynamic arrays" >&5
Xif eval "test \"`echo '$''{'ac_cv_dyn_arrays'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5650 "configure"
X#include "confdefs.h"
X
Xint main() {
Xextern int __aa(); int len = __aa(); char some_array[len];
X; return 0; }
XEOF
Xif { (eval echo configure:5657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_dyn_arrays=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_dyn_arrays=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_dyn_arrays" 1>&6
Xif test $ac_cv_dyn_arrays = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DYN_ARRAYS 1
XEOF
X
Xfi
Xecho $ac_n "checking if compiler allows pragma weak""... $ac_c" 1>&6
Xecho "configure:5677: checking if compiler allows pragma weak" >&5
Xif eval "test \"`echo '$''{'ac_cv_pragma_weak'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5682 "configure"
X#include "confdefs.h"
X#pragma weak test2 = test1
Xint test1() {return 0;}
Xint main() {
Xreturn test2();
X; return 0; }
XEOF
Xif { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_pragma_weak=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_pragma_weak=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_pragma_weak" 1>&6
Xif test $ac_cv_pragma_weak = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_PRAGMA_WEAK 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Xecho "configure:5711: checking for uid_t in sys/types.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5716 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "uid_t" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uid_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uid_t=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Xif test $ac_cv_type_uid_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uid_t int
XEOF
X
X  cat >> confdefs.h <<\EOF
X#define gid_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for size_t""... $ac_c" 1>&6
Xecho "configure:5745: checking for size_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5750 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_size_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_size_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_size_t" 1>&6
Xif test $ac_cv_type_size_t = no; then
X  cat >> confdefs.h <<\EOF
X#define size_t unsigned
XEOF
X
Xfi
X
Xecho $ac_n "checking for ssize_t""... $ac_c" 1>&6
Xecho "configure:5780: checking for ssize_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5785 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_ssize_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_ssize_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
Xif test $ac_cv_type_ssize_t = no; then
X  cat >> confdefs.h <<\EOF
X#define ssize_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
Xecho "configure:5815: checking for ptrdiff_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5820 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_ptrdiff_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_ptrdiff_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
Xif test $ac_cv_type_ptrdiff_t = no; then
X  cat >> confdefs.h <<\EOF
X#define ptrdiff_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for pid_t""... $ac_c" 1>&6
Xecho "configure:5850: checking for pid_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5855 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_pid_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_pid_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Xif test $ac_cv_type_pid_t = no; then
X  cat >> confdefs.h <<\EOF
X#define pid_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for off_t""... $ac_c" 1>&6
Xecho "configure:5885: checking for off_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5890 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_off_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_off_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_off_t" 1>&6
Xif test $ac_cv_type_off_t = no; then
X  cat >> confdefs.h <<\EOF
X#define off_t long
XEOF
X
Xfi
X
Xecho $ac_n "checking for mode_t""... $ac_c" 1>&6
Xecho "configure:5920: checking for mode_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5925 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_mode_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_mode_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Xif test $ac_cv_type_mode_t = no; then
X  cat >> confdefs.h <<\EOF
X#define mode_t int
XEOF
X
Xfi
X
Xecho $ac_n "checking for time_t""... $ac_c" 1>&6
Xecho "configure:5955: checking for time_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 5960 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xtime_t t;
X; return 0; }
XEOF
Xif { (eval echo configure:5978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_time_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_time_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_time_t" 1>&6
Xif test $ac_cv_type_time_t = no; then
X  cat >> confdefs.h <<\EOF
X#define time_t long
XEOF
X
Xfi
Xecho $ac_n "checking for caddr_t""... $ac_c" 1>&6
Xecho "configure:5998: checking for caddr_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6003 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_caddr_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_caddr_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_caddr_t" 1>&6
Xif test $ac_cv_type_caddr_t = no; then
X  cat >> confdefs.h <<\EOF
X#define caddr_t char *
XEOF
X
Xfi
X
Xecho $ac_n "checking for daddr_t""... $ac_c" 1>&6
Xecho "configure:6033: checking for daddr_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6038 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_daddr_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_daddr_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_daddr_t" 1>&6
Xif test $ac_cv_type_daddr_t = no; then
X  cat >> confdefs.h <<\EOF
X#define daddr_t long
XEOF
X
Xfi
X
Xecho $ac_n "checking for dev_t""... $ac_c" 1>&6
Xecho "configure:6068: checking for dev_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6073 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_dev_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_dev_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_dev_t" 1>&6
Xif test $ac_cv_type_dev_t = no; then
X  cat >> confdefs.h <<\EOF
X#define dev_t unsigned short
XEOF
X
Xfi
X
Xecho $ac_n "checking for major_t""... $ac_c" 1>&6
Xecho "configure:6103: checking for major_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6108 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_major_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_major_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_major_t" 1>&6
Xif test $ac_cv_type_major_t = no; then
X  cat >> confdefs.h <<\EOF
X#define major_t dev_t
XEOF
X
Xfi
X
Xecho $ac_n "checking for minor_t""... $ac_c" 1>&6
Xecho "configure:6138: checking for minor_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6143 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_minor_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_minor_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_minor_t" 1>&6
Xif test $ac_cv_type_minor_t = no; then
X  cat >> confdefs.h <<\EOF
X#define minor_t dev_t
XEOF
X
Xfi
X
Xecho $ac_n "checking for ino_t""... $ac_c" 1>&6
Xecho "configure:6173: checking for ino_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6178 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_ino_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_ino_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_ino_t" 1>&6
Xif test $ac_cv_type_ino_t = no; then
X  cat >> confdefs.h <<\EOF
X#define ino_t unsigned long
XEOF
X
Xfi
X
Xecho $ac_n "checking for nlink_t""... $ac_c" 1>&6
Xecho "configure:6208: checking for nlink_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6213 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_nlink_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_nlink_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_nlink_t" 1>&6
Xif test $ac_cv_type_nlink_t = no; then
X  cat >> confdefs.h <<\EOF
X#define nlink_t unsigned long
XEOF
X
Xfi
X
Xecho $ac_n "checking for blksize_t""... $ac_c" 1>&6
Xecho "configure:6243: checking for blksize_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_blksize_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6248 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])blksize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_blksize_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_blksize_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_blksize_t" 1>&6
Xif test $ac_cv_type_blksize_t = no; then
X  cat >> confdefs.h <<\EOF
X#define blksize_t long
XEOF
X
Xfi
X
Xecho $ac_n "checking for blkcnt_t""... $ac_c" 1>&6
Xecho "configure:6278: checking for blkcnt_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_blkcnt_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6283 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])blkcnt_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_blkcnt_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_blkcnt_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_blkcnt_t" 1>&6
Xif test $ac_cv_type_blkcnt_t = no; then
X  cat >> confdefs.h <<\EOF
X#define blkcnt_t Intmax_t
XEOF
X
Xfi
X
Xecho $ac_n "checking for clock_t""... $ac_c" 1>&6
Xecho "configure:6313: checking for clock_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_clock_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6318 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X/*
X * time.h is needed because of a bug in Next Step.
X * Next Step needs time.h for clock_t
X */
X#ifdef	TIME_WITH_SYS_TIME
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	ifndef	_INCL_SYS_TIME_H
X#	include <sys/time.h>
X#	define	_INCL_SYS_TIME_H
X#	endif
X#else
X#	ifndef	_INCL_TIME_H
X#	include <time.h>
X#	define	_INCL_TIME_H
X#	endif
X#endif
X#endif
X#ifdef	HAVE_SYS_TIMES_H
X#include <sys/times.h>
X#endif
X		
Xint main() {
Xclock_t t;
X; return 0; }
XEOF
Xif { (eval echo configure:6356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_clock_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_clock_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_clock_t" 1>&6
Xif test $ac_cv_type_clock_t = no; then
X  cat >> confdefs.h <<\EOF
X#define clock_t long
XEOF
X
Xfi
Xecho $ac_n "checking for socklen_t""... $ac_c" 1>&6
Xecho "configure:6376: checking for socklen_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6381 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#include <sys/socket.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_socklen_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_socklen_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
Xif test $ac_cv_type_socklen_t = no; then
X  cat >> confdefs.h <<\EOF
X#define socklen_t int
XEOF
X
Xfi
Xecho $ac_n "checking for greg_t""... $ac_c" 1>&6
Xecho "configure:6411: checking for greg_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_type_greg_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6416 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#include <sys/frame.h>
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])greg_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  eval ac_cv_have_type_greg_t=yes
Xelse
X  rm -rf conftest*
X  eval ac_cv_have_type_greg_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_have_type_greg_t" 1>&6
X  ac_tr_type=HAVE_TYPE_`echo greg_t | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_type_greg_t = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_type 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if stack_t is declared in signal.h""... $ac_c" 1>&6
Xecho "configure:6448: checking if stack_t is declared in signal.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_stack_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6453 "configure"
X#include "confdefs.h"
X#include <signal.h>
Xint main() {
Xstack_t ss; ss.ss_size = 0; exit (ss.ss_size == 0);
X; return 0; }
XEOF
Xif { (eval echo configure:6460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_stack_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_stack_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_stack_t" 1>&6
Xif test $ac_cv_stack_t = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STACK_T 1
XEOF
X
Xfi
Xecho $ac_n "checking if siginfo_t is declared in signal.h""... $ac_c" 1>&6
Xecho "configure:6480: checking if siginfo_t is declared in signal.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6485 "configure"
X#include "confdefs.h"
X#include <signal.h>
X#ifdef	HAVE_SIGINFO_H
X#include <siginfo.h>
X#else
X#ifdef	HAVE_SYS_SIGINFO_H
X#include <sys/siginfo.h>
X#endif
X#endif
Xint main() {
Xsiginfo_t si; si.si_signo = 0; exit (si.si_signo == 0);
X; return 0; }
XEOF
Xif { (eval echo configure:6499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_siginfo_t=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_siginfo_t=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_siginfo_t" 1>&6
Xif test $ac_cv_siginfo_t = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SIGINFO_T 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_char""... $ac_c" 1>&6
Xecho "configure:6520: checking for u_char" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6525 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_char[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_char=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_char=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_u_char" 1>&6
Xif test $ac_cv_type_u_char = no; then
X  cat >> confdefs.h <<\EOF
X#define u_char unsigned char
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_short""... $ac_c" 1>&6
Xecho "configure:6555: checking for u_short" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_short'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6560 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_short[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_short=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_short=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_u_short" 1>&6
Xif test $ac_cv_type_u_short = no; then
X  cat >> confdefs.h <<\EOF
X#define u_short unsigned short
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_int""... $ac_c" 1>&6
Xecho "configure:6590: checking for u_int" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6595 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_int=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_int=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_u_int" 1>&6
Xif test $ac_cv_type_u_int = no; then
X  cat >> confdefs.h <<\EOF
X#define u_int unsigned int
XEOF
X
Xfi
X
Xecho $ac_n "checking for u_long""... $ac_c" 1>&6
Xecho "configure:6625: checking for u_long" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6630 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])u_long[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_u_long=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_u_long=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_u_long" 1>&6
Xif test $ac_cv_type_u_long = no; then
X  cat >> confdefs.h <<\EOF
X#define u_long unsigned long
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for int8_t""... $ac_c" 1>&6
Xecho "configure:6661: checking for int8_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6666 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_int8_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_int8_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_int8_t" 1>&6
Xif test $ac_cv_type_int8_t = no; then
X  cat >> confdefs.h <<\EOF
X#define int8_t Int8_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for int16_t""... $ac_c" 1>&6
Xecho "configure:6704: checking for int16_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6709 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_int16_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_int16_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_int16_t" 1>&6
Xif test $ac_cv_type_int16_t = no; then
X  cat >> confdefs.h <<\EOF
X#define int16_t Int16_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for int32_t""... $ac_c" 1>&6
Xecho "configure:6747: checking for int32_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6752 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_int32_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_int32_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_int32_t" 1>&6
Xif test $ac_cv_type_int32_t = no; then
X  cat >> confdefs.h <<\EOF
X#define int32_t Int32_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for int64_t""... $ac_c" 1>&6
Xecho "configure:6790: checking for int64_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6795 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_int64_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_int64_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_int64_t" 1>&6
Xif test $ac_cv_type_int64_t = no; then
X  cat >> confdefs.h <<\EOF
X#define int64_t Int64_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for intmax_t""... $ac_c" 1>&6
Xecho "configure:6833: checking for intmax_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_intmax_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6838 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])intmax_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_intmax_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_intmax_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_intmax_t" 1>&6
Xif test $ac_cv_type_intmax_t = no; then
X  cat >> confdefs.h <<\EOF
X#define intmax_t Intmax_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for intptr_t""... $ac_c" 1>&6
Xecho "configure:6876: checking for intptr_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_intptr_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6881 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])intptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_intptr_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_intptr_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_intptr_t" 1>&6
Xif test $ac_cv_type_intptr_t = no; then
X  cat >> confdefs.h <<\EOF
X#define intptr_t Intptr_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for uint8_t""... $ac_c" 1>&6
Xecho "configure:6919: checking for uint8_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6924 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])uint8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uint8_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uint8_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_uint8_t" 1>&6
Xif test $ac_cv_type_uint8_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uint8_t UInt8_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for uint16_t""... $ac_c" 1>&6
Xecho "configure:6962: checking for uint16_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 6967 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])uint16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uint16_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uint16_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_uint16_t" 1>&6
Xif test $ac_cv_type_uint16_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uint16_t UInt16_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for uint32_t""... $ac_c" 1>&6
Xecho "configure:7005: checking for uint32_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7010 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uint32_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uint32_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_uint32_t" 1>&6
Xif test $ac_cv_type_uint32_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uint32_t UInt32_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for uint64_t""... $ac_c" 1>&6
Xecho "configure:7048: checking for uint64_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uint64_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7053 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])uint64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uint64_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uint64_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_uint64_t" 1>&6
Xif test $ac_cv_type_uint64_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uint64_t UInt64_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for uintmax_t""... $ac_c" 1>&6
Xecho "configure:7091: checking for uintmax_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uintmax_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7096 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])uintmax_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uintmax_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uintmax_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_uintmax_t" 1>&6
Xif test $ac_cv_type_uintmax_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uintmax_t UIntmax_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for uintptr_t""... $ac_c" 1>&6
Xecho "configure:7134: checking for uintptr_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7139 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_INTTYPES_H
X#include <inttypes.h>
X#endif
X#ifdef	HAVE_STDINT_H
X#include <stdint.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_uintptr_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_uintptr_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_uintptr_t" 1>&6
Xif test $ac_cv_type_uintptr_t = no; then
X  cat >> confdefs.h <<\EOF
X#define uintptr_t UIntptr_t
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for wctype_t""... $ac_c" 1>&6
Xecho "configure:7177: checking for wctype_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_wctype_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7182 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])wctype_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_wctype_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_wctype_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_wctype_t" 1>&6
Xif test $ac_cv_type_wctype_t = no; then
X  cat >> confdefs.h <<\EOF
X#define wctype_t int
XEOF
X
Xfi
X
X
Xecho $ac_n "checking for mbstate_t""... $ac_c" 1>&6
Xecho "configure:7220: checking for mbstate_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7225 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	HAVE_STDLIB_H || STDC_HEADERS
X#include <stdlib.h>
X#endif
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>
X#endif
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "(^|[^a-zA-Z_0-9])mbstate_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_type_mbstate_t=yes
Xelse
X  rm -rf conftest*
X  ac_cv_type_mbstate_t=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_type_mbstate_t" 1>&6
Xif test $ac_cv_type_mbstate_t = no; then
X  cat >> confdefs.h <<\EOF
X#define mbstate_t int
XEOF
X
Xfi
X
X
Xecho $ac_n "checking size of char""... $ac_c" 1>&6
Xecho "configure:7263: checking size of char" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7271 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(char));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_char=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_char=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_char" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_CHAR $ac_cv_sizeof_char
XEOF
X
X
Xecho $ac_n "checking size of short int""... $ac_c" 1>&6
Xecho "configure:7308: checking size of short int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7316 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(short int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_short_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_short_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
XEOF
X
X
Xecho $ac_n "checking size of int""... $ac_c" 1>&6
Xecho "configure:7353: checking size of int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7361 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_INT $ac_cv_sizeof_int
XEOF
X
X
Xecho $ac_n "checking size of long int""... $ac_c" 1>&6
Xecho "configure:7398: checking size of long int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7406 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(long int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_long_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_long_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
XEOF
X
X
Xecho $ac_n "checking size of long long""... $ac_c" 1>&6
Xecho "configure:7443: checking size of long long" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7451 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(long long));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_long_long=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_long_long=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
XEOF
X
X
Xecho $ac_n "checking size of __int64""... $ac_c" 1>&6
Xecho "configure:7488: checking size of __int64" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7496 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(__int64));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof___int64=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof___int64=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF___INT64 $ac_cv_sizeof___int64
XEOF
X
X
Xecho $ac_n "checking size of char *""... $ac_c" 1>&6
Xecho "configure:7533: checking size of char *" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7541 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(char *));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_char_p=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_char_p=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
XEOF
X
X
X
Xecho $ac_n "checking size of unsigned char""... $ac_c" 1>&6
Xecho "configure:7579: checking size of unsigned char" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7587 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned char));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_char=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_char=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
XEOF
X
X
Xecho $ac_n "checking size of unsigned short int""... $ac_c" 1>&6
Xecho "configure:7624: checking size of unsigned short int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7632 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned short int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_short_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_short_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_SHORT_INT $ac_cv_sizeof_unsigned_short_int
XEOF
X
X
Xecho $ac_n "checking size of unsigned int""... $ac_c" 1>&6
Xecho "configure:7669: checking size of unsigned int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7677 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
XEOF
X
X
Xecho $ac_n "checking size of unsigned long int""... $ac_c" 1>&6
Xecho "configure:7714: checking size of unsigned long int" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_int'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7722 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned long int));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_long_int=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_long_int=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_LONG_INT $ac_cv_sizeof_unsigned_long_int
XEOF
X
X
Xecho $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
Xecho "configure:7759: checking size of unsigned long long" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7767 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned long long));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_long_long=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
XEOF
X
X
Xecho $ac_n "checking size of unsigned __int64""... $ac_c" 1>&6
Xecho "configure:7804: checking size of unsigned __int64" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned___int64'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7812 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned __int64));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned___int64=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned___int64=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned___int64" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED___INT64 $ac_cv_sizeof_unsigned___int64
XEOF
X
X
Xecho $ac_n "checking size of unsigned char *""... $ac_c" 1>&6
Xecho "configure:7849: checking size of unsigned char *" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char_p'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7857 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(unsigned char *));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_unsigned_char_p=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_unsigned_char_p=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_unsigned_char_p" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UNSIGNED_CHAR_P $ac_cv_sizeof_unsigned_char_p
XEOF
X
X
Xecho $ac_n "checking size of float""... $ac_c" 1>&6
Xecho "configure:7894: checking size of float" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7902 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(float));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_float=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_float=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_float" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_FLOAT $ac_cv_sizeof_float
XEOF
X
X
Xecho $ac_n "checking size of double""... $ac_c" 1>&6
Xecho "configure:7939: checking size of double" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7947 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(double));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:7964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_double=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_double=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_double" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_DOUBLE $ac_cv_sizeof_double
XEOF
X
X
Xecho $ac_n "checking size of long double""... $ac_c" 1>&6
Xecho "configure:7984: checking size of long double" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 7992 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(long double));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_long_double=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_long_double=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
XEOF
X
X
X
Xecho $ac_n "checking size of size_t""... $ac_c" 1>&6
Xecho "configure:8030: checking size of size_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8038 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(size_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_size_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_size_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
XEOF
X
X
Xecho $ac_n "checking size of ssize_t""... $ac_c" 1>&6
Xecho "configure:8075: checking size of ssize_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_ssize_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8083 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(ssize_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_ssize_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_ssize_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_ssize_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
XEOF
X
X
Xecho $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6
Xecho "configure:8120: checking size of ptrdiff_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8128 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(ptrdiff_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_ptrdiff_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_ptrdiff_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_ptrdiff_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t
XEOF
X
X
X
Xecho $ac_n "checking size of mode_t""... $ac_c" 1>&6
Xecho "configure:8166: checking size of mode_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_mode_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8174 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(mode_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_mode_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_mode_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_mode_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_MODE_T $ac_cv_sizeof_mode_t
XEOF
X
X
Xecho $ac_n "checking size of uid_t""... $ac_c" 1>&6
Xecho "configure:8211: checking size of uid_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_uid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8219 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(uid_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_uid_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_uid_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_uid_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_UID_T $ac_cv_sizeof_uid_t
XEOF
X
X
Xecho $ac_n "checking size of gid_t""... $ac_c" 1>&6
Xecho "configure:8256: checking size of gid_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_gid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8264 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(gid_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_gid_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_gid_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_gid_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_GID_T $ac_cv_sizeof_gid_t
XEOF
X
X
Xecho $ac_n "checking size of pid_t""... $ac_c" 1>&6
Xecho "configure:8301: checking size of pid_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_pid_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8309 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(pid_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_pid_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_pid_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_pid_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
XEOF
X
X
X
Xecho $ac_n "checking size of dev_t""... $ac_c" 1>&6
Xecho "configure:8347: checking size of dev_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_dev_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8355 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(dev_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_dev_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_dev_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_dev_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_DEV_T $ac_cv_sizeof_dev_t
XEOF
X
X
Xecho $ac_n "checking size of major_t""... $ac_c" 1>&6
Xecho "configure:8392: checking size of major_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_major_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8400 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(major_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_major_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_major_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_major_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_MAJOR_T $ac_cv_sizeof_major_t
XEOF
X
X
Xecho $ac_n "checking size of minor_t""... $ac_c" 1>&6
Xecho "configure:8437: checking size of minor_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_minor_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8445 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#if	HAVE_STDDEF_H || STDC_HEADERS
X#include <stddef.h>	/* For ptrdiff_t, wchar_t, size_t */
X#endif
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(minor_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_minor_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_minor_t=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_minor_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_MINOR_T $ac_cv_sizeof_minor_t
XEOF
X
X
X
Xecho $ac_n "checking size of time_t""... $ac_c" 1>&6
Xecho "configure:8483: checking size of time_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8491 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(time_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_time_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_time_t=SIZEOF_LONG_INT
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
XEOF
X
X
Xecho $ac_n "checking size of wchar""... $ac_c" 1>&6
Xecho "configure:8533: checking size of wchar" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_wchar'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8541 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(L'a'));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_wchar=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_wchar=0
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_wchar" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_WCHAR $ac_cv_sizeof_wchar
XEOF
X
X
Xecho $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Xecho "configure:8572: checking size of wchar_t" >&5
Xif eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8580 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#ifdef	HAVE_SYS_TYPES_H
X#include <sys/types.h>
X#endif
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
Xmain()
X{
X  FILE *f=fopen("conftestval", "w");
X  if (!f) exit(1);
X  fprintf(f, "%d\n", sizeof(wchar_t));
X  exit(0);
X}
XEOF
Xif { (eval echo configure:8600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_sizeof_wchar_t=`cat conftestval`
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_sizeof_wchar_t=SIZEOF_CHAR
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
Xeval echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
Xcat >> confdefs.h <<EOF
X#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
XEOF
X
X
X
Xecho $ac_n "checking if char is unsigned""... $ac_c" 1>&6
Xecho "configure:8621: checking if char is unsigned" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_char_unsigned'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_type_char_unsigned=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8629 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{
X	char c;
X
X	c = -1;
X	exit(c < 0);}
XEOF
Xif { (eval echo configure:8640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_type_char_unsigned=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_type_char_unsigned=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_char_unsigned" 1>&6 
Xif test $ac_cv_type_char_unsigned = yes; then
X  cat >> confdefs.h <<\EOF
X#define CHAR_IS_UNSIGNED 1
XEOF
X
Xfi
Xecho $ac_n "checking if va_list is an array""... $ac_c" 1>&6
Xecho "configure:8662: checking if va_list is an array" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_va_list_array'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8667 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
X
Xint main() {
X
Xva_list a, b;
X
Xa = b;
X; return 0; }
XEOF
Xif { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_type_va_list_array=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_va_list_array=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_va_list_array" 1>&6 
Xif test $ac_cv_type_va_list_array = yes; then
X  cat >> confdefs.h <<\EOF
X#define VA_LIST_IS_ARRAY 1
XEOF
X
Xfi
Xecho $ac_n "checking for f->_flags in FILE *""... $ac_c" 1>&6
Xecho "configure:8703: checking for f->_flags in FILE *" >&5
Xif eval "test \"`echo '$''{'ac_cv_file__flags'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8708 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xint     flags;
Xf = fopen("confdefs.h", "r");
Xflags  = f->_flags;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:8719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_file__flags=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_file__flags=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_file__flags" 1>&6
Xif test $ac_cv_file__flags = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FILE__FLAGS 1
XEOF
X
Xfi
Xecho $ac_n "checking for f->_IO_buf_base in FILE *""... $ac_c" 1>&6
Xecho "configure:8739: checking for f->_IO_buf_base in FILE *" >&5
Xif eval "test \"`echo '$''{'ac_cv_file__io_buf_base'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8744 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
XFILE    *f;
Xchar     *ptr;
Xf = fopen("confdefs.h", "r");
Xptr = f->_IO_buf_base;
Xfclose(f);
X; return 0; }
XEOF
Xif { (eval echo configure:8755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_file__io_buf_base=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_file__io_buf_base=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_file__io_buf_base" 1>&6
Xif test $ac_cv_file__io_buf_base = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FILE__IO_BUF_BASE 1
XEOF
X
Xfi
Xecho $ac_n "checking for struct timeval in time.h or sys/time.h""... $ac_c" 1>&6
Xecho "configure:8775: checking for struct timeval in time.h or sys/time.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_timeval'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8780 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xstruct timeval tv;
X; return 0; }
XEOF
Xif { (eval echo configure:8798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_timeval=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_timeval=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_timeval" 1>&6
Xif test $ac_cv_struct_timeval = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRUCT_TIMEVAL 1
XEOF
X
Xfi
Xecho $ac_n "checking for struct timezone in time.h or sys/time.h""... $ac_c" 1>&6
Xecho "configure:8818: checking for struct timezone in time.h or sys/time.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_timezone'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8823 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xstruct timezone tz;
X; return 0; }
XEOF
Xif { (eval echo configure:8841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_timezone=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_timezone=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_timezone" 1>&6
Xif test $ac_cv_struct_timezone = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRUCT_TIMEZONE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_type""... $ac_c" 1>&6
Xecho "configure:8861: checking if struct mtget contains mt_type" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_type'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8866 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_type = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_type=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_type=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_type" 1>&6
Xif test $ac_cv_struct_mtget_type = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_TYPE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_model""... $ac_c" 1>&6
Xecho "configure:8894: checking if struct mtget contains mt_model" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_model'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8899 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_model = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_model=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_model=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_model" 1>&6
Xif test $ac_cv_struct_mtget_model = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_MODEL 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_dsreg""... $ac_c" 1>&6
Xecho "configure:8927: checking if struct mtget contains mt_dsreg" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8932 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_dsreg = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_dsreg" 1>&6
Xif test $ac_cv_struct_mtget_dsreg = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_DSREG 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_dsreg1""... $ac_c" 1>&6
Xecho "configure:8960: checking if struct mtget contains mt_dsreg1" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg1'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8965 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_dsreg1 = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:8973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg1=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg1=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_dsreg1" 1>&6
Xif test $ac_cv_struct_mtget_dsreg1 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_DSREG1 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_dsreg2""... $ac_c" 1>&6
Xecho "configure:8993: checking if struct mtget contains mt_dsreg2" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg2'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 8998 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_dsreg2 = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg2=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_dsreg2=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_dsreg2" 1>&6
Xif test $ac_cv_struct_mtget_dsreg2 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_DSREG2 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_gstat""... $ac_c" 1>&6
Xecho "configure:9026: checking if struct mtget contains mt_gstat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_gstat'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9031 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_gstat = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_gstat=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_gstat=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_gstat" 1>&6
Xif test $ac_cv_struct_mtget_gstat = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_GSTAT 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_erreg""... $ac_c" 1>&6
Xecho "configure:9059: checking if struct mtget contains mt_erreg" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_erreg'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9064 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_erreg = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_erreg=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_erreg=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_erreg" 1>&6
Xif test $ac_cv_struct_mtget_erreg = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_ERREG 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_resid""... $ac_c" 1>&6
Xecho "configure:9092: checking if struct mtget contains mt_resid" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_resid'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9097 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_resid = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_resid=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_resid=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_resid" 1>&6
Xif test $ac_cv_struct_mtget_resid = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_RESID 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_fileno""... $ac_c" 1>&6
Xecho "configure:9125: checking if struct mtget contains mt_fileno" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_fileno'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9130 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_fileno = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_fileno=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_fileno=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_fileno" 1>&6
Xif test $ac_cv_struct_mtget_fileno = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_FILENO 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_blkno""... $ac_c" 1>&6
Xecho "configure:9158: checking if struct mtget contains mt_blkno" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_blkno'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9163 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_blkno = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_blkno=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_blkno=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_blkno" 1>&6
Xif test $ac_cv_struct_mtget_blkno = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_BLKNO 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_flags""... $ac_c" 1>&6
Xecho "configure:9191: checking if struct mtget contains mt_flags" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_flags'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9196 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_flags = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_flags=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_flags=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_flags" 1>&6
Xif test $ac_cv_struct_mtget_flags = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_FLAGS 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct mtget contains mt_bf""... $ac_c" 1>&6
Xecho "configure:9224: checking if struct mtget contains mt_bf" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_mtget_bf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9229 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/mtio.h>
Xint main() {
Xstruct  mtget t; t.mt_bf = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_mtget_bf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_mtget_bf=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_mtget_bf" 1>&6
Xif test $ac_cv_struct_mtget_bf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MTGET_BF 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct rusage is declared in sys/resource.h""... $ac_c" 1>&6
Xecho "configure:9257: checking if struct rusage is declared in sys/resource.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_rusage'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9262 "configure"
X#include "confdefs.h"
X#include <sys/time.h>
X#include <sys/resource.h>
Xint main() {
Xstruct rusage r;
X; return 0; }
XEOF
Xif { (eval echo configure:9270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_rusage=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_rusage=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_rusage" 1>&6
Xif test $ac_cv_struct_rusage = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_STRUCT_RUSAGE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct siginfo contains si_utime""... $ac_c" 1>&6
Xecho "configure:9290: checking if struct siginfo contains si_utime" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_si_utime'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9295 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/siginfo.h>
Xint main() {
Xstruct  siginfo si; si.si_utime = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_si_utime=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_si_utime=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_si_utime" 1>&6
Xif test $ac_cv_struct_si_utime = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SI_UTIME 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct sockaddr_storage is declared in socket.h""... $ac_c" 1>&6
Xecho "configure:9323: checking if struct sockaddr_storage is declared in socket.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9328 "configure"
X#include "confdefs.h"
X#include <sys/socket.h>
Xint main() {
Xstruct  sockaddr_storage ss; ss.ss_family = 0; exit (ss.ss_family == 0);
X; return 0; }
XEOF
Xif { (eval echo configure:9335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_sockaddr_storage=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_sockaddr_storage=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Xif test $ac_cv_struct_sockaddr_storage = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SOCKADDR_STORAGE 1
XEOF
X
Xfi
Xecho $ac_n "checking if an illegal declaration for union semun in sys/sem.h exists""... $ac_c" 1>&6
Xecho "configure:9355: checking if an illegal declaration for union semun in sys/sem.h exists" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_union_semun'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9360 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/sem.h>
Xint main() {
Xunion semun s;
X; return 0; }
XEOF
Xif { (eval echo configure:9369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_union_semun=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_union_semun=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_union_semun" 1>&6
Xif test $ac_cv_struct_union_semun = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UNION_SEMUN 1
XEOF
X
Xfi
Xecho $ac_n "checking if union wait is declared in wait.h or sys/wait.h""... $ac_c" 1>&6
Xecho "configure:9389: checking if union wait is declared in wait.h or sys/wait.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_union_wait'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9394 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
Xint main() {
Xunion wait w;
X; return 0; }
XEOF
Xif { (eval echo configure:9406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_union_wait=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_union_wait=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_union_wait" 1>&6
Xif test $ac_cv_struct_union_wait = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UNION_WAIT 1
XEOF
X
Xfi
Xecho $ac_n "checking if union wait is used by default""... $ac_c" 1>&6
Xecho "configure:9426: checking if union wait is used by default" >&5
Xif eval "test \"`echo '$''{'ac_cv_use_union_wait'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9431 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#if	defined(HAVE_WAIT_H)
X#	include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
Xxxzzy WTERMSIG(status)
Xxxzzy WCOREDUMP(status)
Xxxzzy WEXITSTATUS(status)
Xxxzzy WSTOPSIG(status)
Xxxzzy WIFSTOPPED(status)
Xxxzzy WIFSIGNALED(status)
Xxxzzy WIFEXITED(status)
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "xxzzy.*x_|xxzzy.*union" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_use_union_wait=yes
Xelse
X  rm -rf conftest*
X  ac_cv_use_union_wait=no
Xfi
Xrm -f conftest*
X
Xfi
Xeval echo "$ac_t""$ac_cv_use_union_wait" 1>&6
Xif test $ac_cv_use_union_wait = yes; then
X  cat >> confdefs.h <<\EOF
X#define USE_UNION_WAIT 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_spare1""... $ac_c" 1>&6
Xecho "configure:9466: checking if struct stat contains st_spare1" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_spare1'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9471 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_spare1 = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_spare1=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_spare1=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_spare1" 1>&6
Xif test $ac_cv_struct_st_spare1 = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_SPARE1 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atimensec""... $ac_c" 1>&6
Xecho "configure:9499: checking if struct stat contains st_atimensec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_atimensec'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9504 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atimensec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_atimensec=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_atimensec=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_atimensec" 1>&6
Xif test $ac_cv_struct_st_atimensec = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ATIMENSEC 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atime_n""... $ac_c" 1>&6
Xecho "configure:9532: checking if struct stat contains st_atime_n" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_atime_n'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9537 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atime_n = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_atime_n=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_atime_n=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_atime_n" 1>&6
Xif test $ac_cv_struct_st_atime_n = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ATIME_N 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atim.tv_nsec""... $ac_c" 1>&6
Xecho "configure:9565: checking if struct stat contains st_atim.tv_nsec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_nsec'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9570 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atim.tv_nsec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_nsec=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_nsec=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_nsec" 1>&6
Xif test $ac_cv_struct_st_nsec = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_NSEC 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atim.st__tim.tv_nsec""... $ac_c" 1>&6
Xecho "configure:9598: checking if struct stat contains st_atim.st__tim.tv_nsec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st__tim'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9603 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atim.st__tim.tv_nsec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st__tim=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st__tim=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st__tim" 1>&6
Xif test $ac_cv_struct_st__tim = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST__TIM 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_atimespec.tv_nsec""... $ac_c" 1>&6
Xecho "configure:9631: checking if struct stat contains st_atimespec.tv_nsec" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_atimespec'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9636 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_atimespec.tv_nsec = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_atimespec=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_atimespec=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_atimespec" 1>&6
Xif test $ac_cv_struct_st_atimespec = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ATIMESPEC 1
XEOF
X
Xfi
Xecho $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Xecho "configure:9664: checking for st_blksize in struct stat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9669 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct stat s; s.st_blksize;
X; return 0; }
XEOF
Xif { (eval echo configure:9677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_blksize=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_blksize=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
Xif test $ac_cv_struct_st_blksize = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_BLKSIZE 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Xecho "configure:9698: checking for st_blocks in struct stat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9703 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct stat s; s.st_blocks;
X; return 0; }
XEOF
Xif { (eval echo configure:9711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_blocks=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_blocks=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
Xif test $ac_cv_struct_st_blocks = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_BLOCKS 1
XEOF
X
Xelse
X  LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Xfi
X
Xecho $ac_n "checking if struct stat contains st_fstype""... $ac_c" 1>&6
Xecho "configure:9734: checking if struct stat contains st_fstype" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_fstype'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9739 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_fstype[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_fstype=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_fstype=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_fstype" 1>&6
Xif test $ac_cv_struct_st_fstype = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_FSTYPE 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_aclcnt""... $ac_c" 1>&6
Xecho "configure:9767: checking if struct stat contains st_aclcnt" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_aclcnt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9772 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_aclcnt = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_aclcnt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_aclcnt=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_aclcnt" 1>&6
Xif test $ac_cv_struct_st_aclcnt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_ACLCNT 1
XEOF
X
Xfi
Xecho $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Xecho "configure:9800: checking for st_rdev in struct stat" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9805 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct stat s; s.st_rdev;
X; return 0; }
XEOF
Xif { (eval echo configure:9813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_rdev=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_rdev=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
Xif test $ac_cv_struct_st_rdev = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_RDEV 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if struct stat contains st_flag""... $ac_c" 1>&6
Xecho "configure:9834: checking if struct stat contains st_flag" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_flag'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9839 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_flag = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_flag=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_flag=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_flag" 1>&6
Xif test $ac_cv_struct_st_flag = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_FLAG 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct stat contains st_flags""... $ac_c" 1>&6
Xecho "configure:9867: checking if struct stat contains st_flags" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_st_flags'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9872 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
Xstruct  stat s; s.st_flags = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_st_flags=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_st_flags=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_st_flags" 1>&6
Xif test $ac_cv_struct_st_flags = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ST_FLAGS 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct dirent contains d_ino""... $ac_c" 1>&6
Xecho "configure:9900: checking if struct dirent contains d_ino" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_dirent_d_ino'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9905 "configure"
X#include "confdefs.h"
X
X/*
X * This must be kept in sync with schily/dirdesf.h
X */
X#ifdef	HAVE_SYS_TYPES_H
X#	include <sys/types.h>
X#endif
X#ifdef	HAVE_SYS_STAT_H
X#	include <sys/stat.h>
X#endif
X#	ifdef	HAVE_DIRENT_H		/* This a POSIX compliant system */
X#		include <dirent.h>
X#		define	_FOUND_DIR_
X#	else				/* This is a Pre POSIX system	 */
X
X#	define 	dirent	direct
X
X#	if	defined(HAVE_SYS_DIR_H)
X#		include <sys/dir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X
X#	if	defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_)
X#		include <sys/ndir.h>
X#		define	_FOUND_DIR_
X#	endif
X#	endif	/* HAVE_DIRENT_H */
X				
Xint main() {
Xstruct  dirent d; d.d_ino = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:9944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_dirent_d_ino=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_dirent_d_ino=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_dirent_d_ino" 1>&6
Xif test $ac_cv_struct_dirent_d_ino = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DIRENT_D_INO 1
XEOF
X
Xfi
Xecho $ac_n "checking if DIR * contains dd_fd""... $ac_c" 1>&6
Xecho "configure:9964: checking if DIR * contains dd_fd" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_dir_dd_fd'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 9969 "configure"
X#include "confdefs.h"
X#include <dirent.h>
Xint main() {
XDIR d; d.dd_fd = 0; exit (d.dd_fd == 0);
X; return 0; }
XEOF
Xif { (eval echo configure:9976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_dir_dd_fd=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_dir_dd_fd=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_dir_dd_fd" 1>&6
Xif test $ac_cv_struct_dir_dd_fd = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DIR_DD_FD 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains arch""... $ac_c" 1>&6
Xecho "configure:9996: checking if struct utsname contains arch" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_arch'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10001 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.arch[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:10008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_arch=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_arch=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_utsname_arch" 1>&6
Xif test $ac_cv_struct_utsname_arch = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_ARCH 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains processor""... $ac_c" 1>&6
Xecho "configure:10028: checking if struct utsname contains processor" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_processor'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10033 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.processor[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:10040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_processor=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_processor=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_utsname_processor" 1>&6
Xif test $ac_cv_struct_utsname_processor = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_PROCESSOR 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains sysname_host""... $ac_c" 1>&6
Xecho "configure:10060: checking if struct utsname contains sysname_host" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_sysname_host'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10065 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.sysname_host[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:10072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_sysname_host=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_sysname_host=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_utsname_sysname_host" 1>&6
Xif test $ac_cv_struct_utsname_sysname_host = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_SYSNAME_HOST 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains release_host""... $ac_c" 1>&6
Xecho "configure:10092: checking if struct utsname contains release_host" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_release_host'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10097 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.release_host[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:10104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_release_host=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_release_host=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_utsname_release_host" 1>&6
Xif test $ac_cv_struct_utsname_release_host = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_RELEASE_HOST 1
XEOF
X
Xfi
Xecho $ac_n "checking if struct utsname contains version_host""... $ac_c" 1>&6
Xecho "configure:10124: checking if struct utsname contains version_host" >&5
Xif eval "test \"`echo '$''{'ac_cv_struct_utsname_version_host'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10129 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct  utsname u; u.version_host[0] = 0;
X; return 0; }
XEOF
Xif { (eval echo configure:10136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_struct_utsname_version_host=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_struct_utsname_version_host=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_struct_utsname_version_host" 1>&6
Xif test $ac_cv_struct_utsname_version_host = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UTSNAME_VERSION_HOST 1
XEOF
X
Xfi
X
Xecho $ac_n "checking whether iconv() uses const char **""... $ac_c" 1>&6
Xecho "configure:10157: checking whether iconv() uses const char **" >&5
Xif eval "test \"`echo '$''{'ac_cv_iconv_const'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.c <<EOF
X#include <iconv.h>
XEOF
Xif { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:10164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | grep 'size_t.*iconv.*iconv_t.*const' >/dev/null 2>&1; then
X  ac_cv_iconv_const=yes
Xelse
X  ac_cv_iconv_const=no
Xfi
Xfi
X
Xeval echo "$ac_t""$ac_cv_iconv_const" 1>&6
Xif test $ac_cv_iconv_const = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ICONV_CONST 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if stat is declared""... $ac_c" 1>&6
Xecho "configure:10180: checking if stat is declared" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_decl_stat'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10185 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
X char *p = (char *) stat; exit (p != (char *)0 && *p != 0); 
X; return 0; }
XEOF
Xif { (eval echo configure:10194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  eval ac_cv_have_decl_stat=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_decl_stat=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_have_decl_stat" 1>&6
X  ac_tr_decl=HAVE_DECL_`echo stat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_decl_stat = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_decl 1
XEOF
X
Xfi
Xecho $ac_n "checking if lstat is declared""... $ac_c" 1>&6
Xecho "configure:10215: checking if lstat is declared" >&5
Xif eval "test \"`echo '$''{'ac_cv_have_decl_lstat'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10220 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/stat.h>
Xint main() {
X char *p = (char *) lstat; exit (p != (char *)0 && *p != 0); 
X; return 0; }
XEOF
Xif { (eval echo configure:10229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  eval ac_cv_have_decl_lstat=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_decl_lstat=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_have_decl_lstat" 1>&6
X  ac_tr_decl=HAVE_DECL_`echo lstat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif test $ac_cv_have_decl_lstat = yes; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_decl 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
Xecho "configure:10251: checking for wait3 that fills in rusage" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_wait3_rusage=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10259 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/time.h>
X#include <sys/resource.h>
X#include <stdio.h>
X/* HP-UX has wait3 but does not fill in rusage at all.  */
Xmain() {
X  struct rusage r;
X  int i;
X  /* Use a field that we can force nonzero --
X     voluntary context switches.
X     For systems like NeXT and OSF/1 that don't set it,
X     also use the system CPU time.  And page faults (I/O) for Linux.  */
X  r.ru_nvcsw = 0;
X  r.ru_utime.tv_sec = 0;
X  r.ru_utime.tv_usec = 0;
X  r.ru_stime.tv_sec = 0;
X  r.ru_stime.tv_usec = 0;
X  r.ru_majflt = r.ru_minflt = 0;
X  switch (fork()) {
X  case 0: /* Child.  */
X    sleep(1); /* Give up the CPU.  */
X    for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */
X    _exit(0);
X  case -1: _exit(0); /* What can we do?  */
X  default: /* Parent.  */
X    wait3(&i, 0, &r);
X    sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
X    exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
X	 && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0
X	 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
X  }
X}
XEOF
Xif { (eval echo configure:10294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_wait3_rusage=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_wait3_rusage=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
Xif test $ac_cv_func_wait3_rusage = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_WAIT3 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for mlock""... $ac_c" 1>&6
Xecho "configure:10317: checking for mlock" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mlock'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10325 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X	if (mlock(0, 0) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}
XEOF
Xif { (eval echo configure:10345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mlock=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mlock=no
Xfi
Xrm -fr conftest*
Xfi
X
Xrm -f core core.* *.core
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_mlock" 1>&6
Xif test $ac_cv_func_mlock = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MLOCK 1
XEOF
X
Xfi
Xecho $ac_n "checking for mlockall""... $ac_c" 1>&6
Xecho "configure:10368: checking for mlockall" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mlockall'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10376 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/mman.h>
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xint
Xmain()
X{
X	if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) {
X		if (errno == EINVAL || errno ==  ENOMEM ||
X		    errno == EPERM  || errno ==  EACCES)
X			exit(0);
X		exit(-1);
X	}
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mlockall=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mlockall=no
Xfi
Xrm -fr conftest*
Xfi
X
Xrm -f core core.* *.core
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_mlockall" 1>&6
Xif test $ac_cv_func_mlockall = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MLOCKALL 1
XEOF
X
Xfi
Xecho $ac_n "checking for va_copy""... $ac_c" 1>&6
Xecho "configure:10422: checking for va_copy" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_va_copy'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10427 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
Xint main() {
X
Xva_list a, b;
X
Xva_copy(a, b);
X; return 0; }
XEOF
Xif { (eval echo configure:10442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_va_copy=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_va_copy=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_va_copy" 1>&6
Xif test $ac_cv_func_va_copy = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VA_COPY 1
XEOF
X
Xfi
Xecho $ac_n "checking for __va_copy""... $ac_c" 1>&6
Xecho "configure:10462: checking for __va_copy" >&5
Xif eval "test \"`echo '$''{'ac_cv_func__va_copy'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10467 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDARG_H
X#	include <stdarg.h>
X#else
X#	include <varargs.h>
X#endif
Xint main() {
X
Xva_list a, b;
X
X__va_copy(a, b);
X; return 0; }
XEOF
Xif { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func__va_copy=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func__va_copy=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func__va_copy" 1>&6
Xif test $ac_cv_func__va_copy = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE__VA_COPY 1
XEOF
X
Xfi
Xecho $ac_n "checking for working ecvt() ""... $ac_c" 1>&6
Xecho "configure:10502: checking for working ecvt() " >&5
Xif eval "test \"`echo '$''{'ac_cv_func_ecvt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10510 "configure"
X#include "confdefs.h"
X
Xextern	char *ecvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0);
X}
XEOF
Xif { (eval echo configure:10530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_ecvt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_ecvt=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_ecvt" 1>&6
Xif test $ac_cv_func_ecvt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ECVT 1
XEOF
X
Xfi
Xecho $ac_n "checking for working fcvt() ""... $ac_c" 1>&6
Xecho "configure:10552: checking for working fcvt() " >&5
Xif eval "test \"`echo '$''{'ac_cv_func_fcvt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10560 "configure"
X#include "confdefs.h"
X
Xextern	char *fcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	int a, b;
X
X/*	exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/
X	exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0);
X}
XEOF
Xif { (eval echo configure:10580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_fcvt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_fcvt=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_fcvt" 1>&6
Xif test $ac_cv_func_fcvt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FCVT 1
XEOF
X
Xfi
Xecho $ac_n "checking for working gcvt() ""... $ac_c" 1>&6
Xecho "configure:10602: checking for working gcvt() " >&5
Xif eval "test \"`echo '$''{'ac_cv_func_gcvt'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10610 "configure"
X#include "confdefs.h"
X
Xextern	char *gcvt();
X
Xsprintf(s)
X	char	*s;
X{
X	strcpy(s, "DEAD");
X}
X
Xint
Xmain()
X{
X	char	buf[32];
X
X/*	exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/
X	exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0);
X}
XEOF
Xif { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_gcvt=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_gcvt=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_gcvt" 1>&6
Xif test $ac_cv_func_gcvt = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_GCVT 1
XEOF
X
Xfi
Xecho $ac_n "checking for __dtoa""... $ac_c" 1>&6
Xecho "configure:10652: checking for __dtoa" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_dtoa'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10657 "configure"
X#include "confdefs.h"
Xextern  char *__dtoa();
Xint main() {
Xint decpt; int sign; char *ep; char *bp;
Xbp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);
X; return 0; }
XEOF
Xif { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_dtoa=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_dtoa=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_dtoa" 1>&6
Xif test $ac_cv_func_dtoa = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DTOA 1
XEOF
X
Xfi
Xecho $ac_n "checking for __dtoa that needs result ptr""... $ac_c" 1>&6
Xecho "configure:10685: checking for __dtoa that needs result ptr" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_dtoa_r'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10693 "configure"
X#include "confdefs.h"
X
Xextern	char *__dtoa();
Xint
Xmain()
X{
X#ifdef	HAVE_DTOA
X	int	decpt, sign;
X	char	*bp;
X	char	*ep;
X	char	*result;
X
X	result = 0;
X	bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result);
X	exit(result == 0);
X#else
X	exit(1);
X#endif
X}
XEOF
Xif { (eval echo configure:10714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_dtoa_r=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_dtoa_r=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_dtoa_r" 1>&6
Xif test $ac_cv_func_dtoa_r = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_DTOA_R 1
XEOF
X
Xfi
Xecho $ac_n "checking if getpagesize is defined or function""... $ac_c" 1>&6
Xecho "configure:10736: checking if getpagesize is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_getpagesize"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10741 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X
Xint main() {
X
X#ifndef getpagesize
X	char *p = (char *) getpagesize;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_getpagesize=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_getpagesize=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_getpagesize"" 1>&6
X  ac_tr_dfunc=HAVE_`echo getpagesize | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'getpagesize`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:10781: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10786 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:10791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
Xecho $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6
Xecho "configure:10817: checking for mmap that needs ptr to size" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_mmap_sizep=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10825 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <fcntl.h>
X#include <signal.h>
X#include <setjmp.h>
X#include <sys/mman.h>
X
X#ifndef MAP_FILE
X#define MAP_FILE   0		/* Needed on Apollo Domain/OS */
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xjmp_buf jenv;
X
Xint
Xintr()
X{
X	signal(SIGSEGV, intr);
X	longjmp(jenv, 1);
X}
X
Xint
Xmain()
X{
X	char *data, *data2;
X	int i, pagesize, ps;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X
X	/*
X	 * Keep a copy, Apollo modifies the value...
X	 */
X	ps = pagesize;
X
X	/*
X	 * Apollo mmap() is not a syscall but a library function and fails
X	 * if it tries to dereference 'ps'. We must use setjmp in order to
X	 * catch the failure.
X	 */
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 != (char *)-1)
X		exit(1);
X
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 == (char *)-1)
X		exit(1);
X
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:10966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mmap_sizep=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mmap_sizep=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_mmap_sizep" 1>&6
Xif test $ac_cv_func_mmap_sizep = yes; then
X  cat >> confdefs.h <<\EOF
X#define _MMAP_WITH_SIZEP 1
XEOF
X
Xfi
X
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:10992: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 10997 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:11002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
Xecho $ac_n "checking for working mmap""... $ac_c" 1>&6
Xecho "configure:11028: checking for working mmap" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_mmap_fixed_mapped=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11036 "configure"
X#include "confdefs.h"
X
X/* Thanks to Mike Haertel and Jim Avera for this test.
X   Here is a matrix of mmap possibilities:
X	mmap private not fixed
X	mmap private fixed at somewhere currently unmapped
X	mmap private fixed at somewhere already mapped
X	mmap shared not fixed
X	mmap shared fixed at somewhere currently unmapped
X	mmap shared fixed at somewhere already mapped
X   For private mappings, we should verify that changes cannot be read()
X   back from the file, nor mmap's back from the file at a different
X   address.  (There have been systems where private was not correctly
X   implemented like the infamous i386 svr4.0, and systems where the
X   VM page cache was not coherent with the filesystem buffer cache
X   like early versions of FreeBSD and possibly contemporary NetBSD.)
X   For shared mappings, we should conversely verify that changes get
X   propogated back to all the places they're supposed to be.
X
X   Grep wants private fixed already mapped.
X   The main things grep needs to know about mmap are:
X   * does it exist and is it safe to write into the mmap'd area
X   * how to use it (BSD variants)  */
X#include <sys/types.h>
X#include <fcntl.h>
X#include <sys/mman.h>
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xint
Xmain()
X{
X	char *data, *data2, *data3;
X	int i, pagesize;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X	data2 = malloc(2 * pagesize);
X	if (!data2)
X		exit(1);
X	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
X	if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE,
X	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	/*
X	 * Finally, make sure that changes to the mapped area
X	 * do not percolate back to the file as seen by read().
X	 * (This is a bug on some variants of i386 svr4.0.)
X	 */
X	for (i = 0; i < pagesize; ++i)
X		*(data2 + i) = *(data2 + i) + 1;
X	data3 = malloc(pagesize);
X	if (!data3)
X		exit(1);
X	if (read(fd, data3, pagesize) != pagesize)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data3 + i))
X			exit(1);
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:11185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mmap_fixed_mapped=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mmap_fixed_mapped=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
Xif test $ac_cv_func_mmap_fixed_mapped = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_MMAP 1
XEOF
X
Xfi
X
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:11211: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11216 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:11221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
Xecho $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6
Xecho "configure:11247: checking for mmap that needs ptr to size" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_mmap_sizep=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11255 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <fcntl.h>
X#include <signal.h>
X#include <setjmp.h>
X#include <sys/mman.h>
X
X#ifndef MAP_FILE
X#define MAP_FILE   0		/* Needed on Apollo Domain/OS */
X#endif
X
X/* This mess was copied from the GNU getpagesize.h.  */
X#ifndef HAVE_GETPAGESIZE
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X
X/* Assume that all systems that can run configure have sys/param.h.  */
X# ifndef HAVE_SYS_PARAM_H
X#  define HAVE_SYS_PARAM_H 1
X# endif
X
X# ifdef _SC_PAGESIZE
X#  define getpagesize() sysconf(_SC_PAGESIZE)
X# else /* no _SC_PAGESIZE */
X#  ifdef HAVE_SYS_PARAM_H
X#   include <sys/param.h>
X#   ifdef EXEC_PAGESIZE
X#    define getpagesize() EXEC_PAGESIZE
X#   else /* no EXEC_PAGESIZE */
X#    ifdef NBPG
X#     define getpagesize() NBPG * CLSIZE
X#     ifndef CLSIZE
X#      define CLSIZE 1
X#     endif /* no CLSIZE */
X#    else /* no NBPG */
X#     ifdef NBPC
X#      define getpagesize() NBPC
X#     else /* no NBPC */
X#      ifdef PAGESIZE
X#       define getpagesize() PAGESIZE
X#      endif /* PAGESIZE */
X#     endif /* no NBPC */
X#    endif /* no NBPG */
X#   endif /* no EXEC_PAGESIZE */
X#  else /* no HAVE_SYS_PARAM_H */
X#   define getpagesize() 8192	/* punt totally */
X#  endif /* no HAVE_SYS_PARAM_H */
X# endif /* no _SC_PAGESIZE */
X
X#endif /* no HAVE_GETPAGESIZE */
X
X#ifdef __cplusplus
Xextern "C" { void *malloc(unsigned); }
X#else
Xchar *malloc();
X#endif
X
Xjmp_buf jenv;
X
Xint
Xintr()
X{
X	signal(SIGSEGV, intr);
X	longjmp(jenv, 1);
X}
X
Xint
Xmain()
X{
X	char *data, *data2;
X	int i, pagesize, ps;
X	int fd;
X
X	pagesize = getpagesize();
X
X	/*
X	 * First, make a file with some known garbage in it.
X	 */
X	data = malloc(pagesize);
X	if (!data)
X		exit(1);
X	for (i = 0; i < pagesize; ++i)
X		*(data + i) = rand();
X	umask(0);
X	fd = creat("conftestmmap", 0600);
X	if (fd < 0)
X		exit(1);
X	if (write(fd, data, pagesize) != pagesize)
X		exit(1);
X	close(fd);
X
X	/*
X	 * Next, try to mmap the file at a fixed address which
X	 * already has something else allocated at it.  If we can,
X	 * also make sure that we see the same garbage.
X	 */
X	fd = open("conftestmmap", O_RDWR);
X	if (fd < 0)
X		exit(1);
X
X	/*
X	 * Keep a copy, Apollo modifies the value...
X	 */
X	ps = pagesize;
X
X	/*
X	 * Apollo mmap() is not a syscall but a library function and fails
X	 * if it tries to dereference 'ps'. We must use setjmp in order to
X	 * catch the failure.
X	 */
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 != (char *)-1)
X		exit(1);
X
X	signal(SIGSEGV, intr);
X	if (setjmp(jenv) == 0) {
X		data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L);
X	} else {
X		data2 = (char *)-1;
X	}
X	if (data2 == (char *)-1)
X		exit(1);
X
X	for (i = 0; i < pagesize; ++i)
X		if (*(data + i) != *(data2 + i))
X			exit(1);
X
X	close(fd);
X	unlink("conftestmmap");
X	exit(0);
X}
X
XEOF
Xif { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_mmap_sizep=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_mmap_sizep=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_mmap_sizep" 1>&6
Xif test $ac_cv_func_mmap_sizep = yes; then
X  cat >> confdefs.h <<\EOF
X#define _MMAP_WITH_SIZEP 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if mmap works to get shared memory""... $ac_c" 1>&6
Xecho "configure:11419: checking if mmap works to get shared memory" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_smmap'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_smmap=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11427 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/mman.h>
X
X#ifndef	MAP_ANONYMOUS
X#	ifdef	MAP_ANON
X#		define MAP_ANONYMOUS MAP_ANON
X#	endif
X#endif
X
X/*
X * Needed for Apollo Domain/OS and may be for others?
X */
X#ifdef	_MMAP_WITH_SIZEP
X#	define	mmap_sizeparm(s)	(&(s))
X#else
X#	define	mmap_sizeparm(s)	(s)
X#endif
X
Xchar *
Xmkshare()
X{
X        int     size = 8192;
X        int     f;
X        char    *addr;
X
X#ifdef  MAP_ANONYMOUS   /* HP/UX */
X        f = -1;
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0);
X#else
X        if ((f = open("/dev/zero", 2)) < 0)
X                exit(1);
X        addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0);
X#endif
X        if (addr == (char *)-1)
X                exit(1);
X        close(f);
X
X        return (addr);
X}
X
Xint
Xmain()
X{
X        char    *addr;
X        
X        addr = mkshare();
X        *addr = 'I';
X
X        switch (fork()) {
X
X        case -1:
X                printf("help\n"); exit(1);
X
X        case 0: /* child */
X                *addr = 'N';
X                _exit(0);
X                break;
X        default: /* parent */
X                wait(0);
X                sleep(1);
X                break;
X        }
X
X        if (*addr != 'N')
X                exit(1);
X        exit(0);
X}
X
XEOF
Xif { (eval echo configure:11499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_smmap=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_smmap=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_smmap" 1>&6
Xif test $ac_cv_func_smmap = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SMMAP 1
XEOF
X
Xfi
Xecho $ac_n "checking if shmget works to get shared memory""... $ac_c" 1>&6
Xecho "configure:11521: checking if shmget works to get shared memory" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_shmget'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_func_shmget=no
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11529 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/ipc.h>
X#include <sys/shm.h>
Xint
Xmain()
X{
X	int	id;
X
X	id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600);
X	if (id == -1)
X		exit(1);
X	shmctl(id, IPC_RMID, 0);
X        exit(0);
X}
X
XEOF
Xif { (eval echo configure:11548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_shmget=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_shmget=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_shmget" 1>&6
Xif test $ac_cv_func_shmget = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SHMGET 1
XEOF
X
Xfi
X# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
X# for constant arguments.  Useless!
Xecho $ac_n "checking for working alloca.h""... $ac_c" 1>&6
Xecho "configure:11572: checking for working alloca.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11577 "configure"
X#include "confdefs.h"
X#include <alloca.h>
Xint main() {
Xchar *p = alloca(2 * sizeof(int));
X; return 0; }
XEOF
Xif { (eval echo configure:11584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_header_alloca_h=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_header_alloca_h=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
Xif test $ac_cv_header_alloca_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ALLOCA_H 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for alloca""... $ac_c" 1>&6
Xecho "configure:11605: checking for alloca" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11610 "configure"
X#include "confdefs.h"
X
X#ifdef __GNUC__
X# define alloca __builtin_alloca
X#else
X# ifdef _MSC_VER
X#  include <malloc.h>
X#  define alloca _alloca
X# else
X#  if HAVE_ALLOCA_H
X#   include <alloca.h>
X#  else
X#   ifdef _AIX
X #pragma alloca
X#   else
X#    ifndef alloca /* predefined by HP cc +Olibcalls */
Xchar *alloca ();
X#    endif
X#   endif
X#  endif
X# endif
X#endif
X
Xint main() {
Xchar *p = (char *) alloca(1);
X; return 0; }
XEOF
Xif { (eval echo configure:11638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_alloca_works=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_alloca_works=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
Xif test $ac_cv_func_alloca_works = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ALLOCA 1
XEOF
X
Xfi
X
Xif test $ac_cv_func_alloca_works = no; then
X  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
X  # that cause trouble.  Some versions do not even contain alloca or
X  # contain a buggy version.  If you still want to use their alloca,
X  # use ar to extract alloca.o from them instead of compiling alloca.c.
X  ALLOCA=alloca.${ac_objext}
X  cat >> confdefs.h <<\EOF
X#define C_ALLOCA 1
XEOF
X
X
Xecho $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
Xecho "configure:11670: checking whether alloca needs Cray hooks" >&5
Xif eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11675 "configure"
X#include "confdefs.h"
X#if defined(CRAY) && ! defined(CRAY2)
Xwebecray
X#else
Xwenotbecray
X#endif
X
XEOF
Xif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X  egrep "webecray" >/dev/null 2>&1; then
X  rm -rf conftest*
X  ac_cv_os_cray=yes
Xelse
X  rm -rf conftest*
X  ac_cv_os_cray=no
Xfi
Xrm -f conftest*
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_os_cray" 1>&6
Xif test $ac_cv_os_cray = yes; then
Xfor ac_func in _getb67 GETB67 getb67; do
X  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11700: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11705 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  cat >> confdefs.h <<EOF
X#define CRAY_STACKSEG_END $ac_func
XEOF
X
X  break
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xdone
Xfi
X
Xecho $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
Xecho "configure:11755: checking stack direction for C alloca" >&5
Xif eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  ac_cv_c_stack_direction=0
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11763 "configure"
X#include "confdefs.h"
Xfind_stack_direction ()
X{
X  static char *addr = 0;
X  auto char dummy;
X  if (addr == 0)
X    {
X      addr = &dummy;
X      return find_stack_direction ();
X    }
X  else
X    return (&dummy > addr) ? 1 : -1;
X}
Xmain ()
X{
X  exit (find_stack_direction() < 0);
X}
XEOF
Xif { (eval echo configure:11782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_c_stack_direction=1
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_c_stack_direction=-1
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
Xcat >> confdefs.h <<EOF
X#define STACK_DIRECTION $ac_cv_c_stack_direction
XEOF
X
Xfi
X
Xecho $ac_n "checking if quotactl is an ioctl""... $ac_c" 1>&6
Xecho "configure:11804: checking if quotactl is an ioctl" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_quotaioctl'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11809 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <sys/fs/ufs_quota.h>
Xint main() {
Xstruct quotctl q; ioctl(0, Q_QUOTACTL, &q)
X; return 0; }
XEOF
Xif { (eval echo configure:11817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_quotaioctl=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_quotaioctl=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_quotaioctl" 1>&6 
Xif test $ac_cv_func_quotaioctl = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_QUOTAIOCTL 1
XEOF
X
Xfi
Xecho $ac_n "checking for file locking via fcntl""... $ac_c" 1>&6
Xecho "configure:11837: checking for file locking via fcntl" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_fcntl_lock'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11842 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <fcntl.h>
Xint main() {
X
Xstruct flock fl;
Xfcntl(0, F_SETLK, &fl);
X; return 0; }
XEOF
Xif { (eval echo configure:11853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_fcntl_lock=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_fcntl_lock=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_fcntl_lock" 1>&6
Xif test $ac_cv_func_fcntl_lock = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FCNTL_LOCKF 1
XEOF
X
Xfi
Xecho $ac_n "checking for uname""... $ac_c" 1>&6
Xecho "configure:11873: checking for uname" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11878 "configure"
X#include "confdefs.h"
X#include <sys/utsname.h>
Xint main() {
Xstruct	utsname un;
Xuname(&un);
X; return 0; }
XEOF
Xif { (eval echo configure:11886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_uname=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_uname=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_uname" 1>&6
Xif test $ac_cv_func_uname = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_UNAME 1
XEOF
X
Xfi
Xfor ac_func in execl
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:11908: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11913 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:11936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for vfork.h""... $ac_c" 1>&6
Xecho "configure:11962: checking for vfork.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 11967 "configure"
X#include "confdefs.h"
X#include <vfork.h>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:11972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  cat >> confdefs.h <<\EOF
X#define HAVE_VFORK_H 1
XEOF
X
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xecho $ac_n "checking for working vfork""... $ac_c" 1>&6
Xecho "configure:11997: checking for working vfork" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X  echo $ac_n "checking for vfork""... $ac_c" 1>&6
Xecho "configure:12003: checking for vfork" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12008 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char vfork(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar vfork();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_vfork) || defined (__stub___vfork)
Xchoke me
X#else
Xvfork();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_vfork=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_vfork=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  :
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xac_cv_func_vfork_works=$ac_cv_func_vfork
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12053 "configure"
X#include "confdefs.h"
X/* Thanks to Paul Eggert for first version of this test.  */
X#include <stdio.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X#ifdef HAVE_UNISTD_H
X#include <unistd.h>
X#endif
X#ifdef HAVE_VFORK_H
X#include <vfork.h>
X#endif
X#ifdef HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#if defined(HAVE_WAIT_H)
X#include <wait.h>
X#else
X#include <sys/wait.h>
X#endif
X/* On some sparc systems, changes by the child to local and incoming
X   argument registers are propagated back to the parent.
X   The compiler is told about this with #include <vfork.h>,
X   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
X   Test for this by using a static variable whose address
X   is put into a register that is clobbered by the vfork.  */
X#ifndef	VMS
Xstatic int
X#ifdef __cplusplus
Xsparc_address_test (int arg)
X#else
Xsparc_address_test (arg) int arg;
X#endif
X{
X  static pid_t child;
X  if (!child) {
X    child = vfork ();
X    if (child < 0) {
X      perror ("vfork");
X      _exit(2);
X    }
X    if (!child) {
X      arg = getpid();
X      write(-1, "", 0);
X      _exit (arg);
X    }
X  }
X  return (0);
X}
X#endif
Xint exc = 0;
X
Xint
Xmain() {
X  pid_t parent = getpid ();
X  pid_t child;
X
X#ifndef	VMS
X  sparc_address_test(0);
X#endif
X
X  child = vfork ();
X
X  if (child == 0) {
X    /* Here is another test for sparc vfork register problems.
X       This test uses lots of local variables, at least
X       as many local variables as main has allocated so far
X       including compiler temporaries.  4 locals are enough for
X       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
X       A buggy compiler should reuse the register of parent
X       for one of the local variables, since it will think that
X       parent can't possibly be used any more in this routine.
X       Assigning to the local variable will thus munge parent
X       in the parent process.  */
X    pid_t
X      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
X      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
X    /* Convince the compiler that p..p7 are live; otherwise, it might
X       use the same hardware register for all 8 local variables.  */
X    if (p != p1 || p != p2 || p != p3 || p != p4
X	|| p != p5 || p != p6 || p != p7)
X      exc = 1;
X
X    /* On some systems (e.g. IRIX 3.3),
X       vfork doesn't separate parent from child file descriptors.
X       If the child closes a descriptor before it execs or exits,
X       this munges the parent's descriptor as well.
X       Test for this by closing stdout in the child.  */
X    if (exc == 0)
X	exc = close(fileno(stdout)) != 0;
X    /*
X     * VMS hangs if we do not call execl()
X     */
X#ifdef HAVE_EXECL
X    /*
X     * On VMS, things hang unless the child calls exec()
X     */
X    if (exc == 0)
X	execl("/bin/true", "true", (char *)0);
X    else
X	execl("/bin/false", "false", (char *)0);
X#endif
X    _exit(exc);
X  } else {
X    int status;
X    struct stat st;
X
X    while (wait(&status) != child)
X      ;
X    exit(
X	 /* Was there some problem with vforking?  */
X	 child < 0
X
X	 /* Did the child fail?  (This shouldn't happen.)  */
X	 || status
X
X	 /* Did the vfork/compiler bug occur?  */
X	 || parent != getpid()
X
X	 /* Did the file descriptor bug occur?  */
X	 || fstat(fileno(stdout), &st) != 0
X	 );
X  }
X}
XEOF
Xif { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_vfork_works=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_vfork_works=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
Xif test $ac_cv_func_vfork_works = no; then
X  cat >> confdefs.h <<\EOF
X#define vfork fork
XEOF
X
Xelse
X  cat >> confdefs.h <<\EOF
X#define HAVE_VFORK 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for sys_siglist""... $ac_c" 1>&6
Xecho "configure:12206: checking for sys_siglist" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_sys_siglist'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12214 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{ extern char *sys_siglist[];
Xif (sys_siglist[1] == 0)
X	exit(1);
Xexit(0);}
XEOF
Xif { (eval echo configure:12224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_sys_siglist=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_sys_siglist=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_sys_siglist" 1>&6
Xif test $ac_cv_func_sys_siglist = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SYS_SIGLIST 1
XEOF
X
Xfi
Xecho $ac_n "checking for BSD compliant getpgrp""... $ac_c" 1>&6
Xecho "configure:12246: checking for BSD compliant getpgrp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_bsd_getpgrp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12254 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{ long p;
X/*
X * POSIX getpgrp() has void parameter...
X */
X	p = getpgrp(-1);
X	if (p == getpgrp(1) && p == getpgrp(getpid()))
X		exit(1);
Xexit(0);}
XEOF
Xif { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_bsd_getpgrp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_bsd_getpgrp=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_bsd_getpgrp" 1>&6
Xif test $ac_cv_func_bsd_getpgrp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BSD_GETPGRP 1
XEOF
X
Xfi
Xecho $ac_n "checking for BSD compliant setpgrp""... $ac_c" 1>&6
Xecho "configure:12290: checking for BSD compliant setpgrp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_bsd_setpgrp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12298 "configure"
X#include "confdefs.h"
X
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
Xint
Xmain()
X{ errno = 0;
X/*
X * Force illegal pid on BSD
X */
Xif (setpgrp(-1, 100) < 0 && errno == ESRCH)
X	exit(0);
Xexit(1);}
XEOF
Xif { (eval echo configure:12315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_bsd_setpgrp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_bsd_setpgrp=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_bsd_setpgrp" 1>&6
Xif test $ac_cv_func_bsd_setpgrp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BSD_SETPGRP 1
XEOF
X
Xfi
Xecho $ac_n "checking for C99 compliant isinf""... $ac_c" 1>&6
Xecho "configure:12337: checking for C99 compliant isinf" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_c99_isinf'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12342 "configure"
X#include "confdefs.h"
X#include <math.h>
Xint main() {
X double	d;
X#ifndef	isinf
XThe isinf macro is not defined
X#endif
Xreturn (isinf(d));
X
X; return 0; }
XEOF
Xif { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_c99_isinf=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_c99_isinf=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_c99_isinf" 1>&6
Xif test $ac_cv_func_c99_isinf = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_C99_ISINF 1
XEOF
X
Xfi
Xecho $ac_n "checking for C99 compliant isnan""... $ac_c" 1>&6
Xecho "configure:12374: checking for C99 compliant isnan" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_c99_isnan'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12379 "configure"
X#include "confdefs.h"
X#include <math.h>
Xint main() {
X double	d;
X#ifndef	isnan
XThe isnan macro is not defined
X#endif
Xreturn (isnan(d));
X
X; return 0; }
XEOF
Xif { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_c99_isnan=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_c99_isnan=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_c99_isnan" 1>&6
Xif test $ac_cv_func_c99_isnan = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_C99_ISNAN 1
XEOF
X
Xfi
Xecho $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
Xecho "configure:12411: checking for sigsetjmp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_sigsetjmp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12416 "configure"
X#include "confdefs.h"
X
X#include <setjmp.h>
Xint main() {
X
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);
X; return 0; }
XEOF
Xif { (eval echo configure:12426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_sigsetjmp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_sigsetjmp=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_sigsetjmp" 1>&6
Xif test $ac_cv_func_sigsetjmp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SIGSETJMP 1
XEOF
X
Xfi
Xecho $ac_n "checking for siglongjmp""... $ac_c" 1>&6
Xecho "configure:12446: checking for siglongjmp" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_siglongjmp'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12451 "configure"
X#include "confdefs.h"
X
X#include <setjmp.h>
Xint main() {
X
Xsigjmp_buf jb;
Xsigsetjmp(jb, 1);
Xsiglongjmp(jb, 1);
X; return 0; }
XEOF
Xif { (eval echo configure:12462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_siglongjmp=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_siglongjmp=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_siglongjmp" 1>&6
Xif test $ac_cv_func_siglongjmp = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_SIGLONGJMP 1
XEOF
X
Xfi
Xecho $ac_n "checking whether *printf() supports %jd""... $ac_c" 1>&6
Xecho "configure:12482: checking whether *printf() supports %jd" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_printf_j'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12490 "configure"
X#include "confdefs.h"
X
X#include <inttypes.h>
Xint
Xmain()
X{ intmax_t m = 123456789012LL;
Xchar buf[32];
Xsprintf(buf, "%jd", m);
Xif (strcmp(buf, "123456789012") == 0)
X	exit(0);
Xexit(1);}
XEOF
Xif { (eval echo configure:12503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_printf_j=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_printf_j=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_printf_j" 1>&6
Xif test $ac_cv_func_printf_j = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_PRINTF_J 1
XEOF
X
Xfi
Xecho $ac_n "checking whether *printf() supports %lld""... $ac_c" 1>&6
Xecho "configure:12525: checking whether *printf() supports %lld" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_printf_ll'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12533 "configure"
X#include "confdefs.h"
X
Xint
Xmain()
X{ long long ll = 123456789012LL;
Xchar buf[32];
Xsprintf(buf, "%lld", ll);
Xif (strcmp(buf, "123456789012") == 0)
X	exit(0);
Xexit(1);}
XEOF
Xif { (eval echo configure:12545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_func_printf_ll=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_func_printf_ll=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_printf_ll" 1>&6
Xif test $ac_cv_func_printf_ll = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_PRINTF_LL 1
XEOF
X
Xfi
Xfor ac_hdr in stdlib.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:12570: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12575 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:12580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Xecho "configure:12607: checking return type of signal handlers" >&5
Xif eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12612 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X#include <signal.h>
X#ifdef signal
X#undef signal
X#endif
X#ifdef __cplusplus
Xextern "C" void (*signal (int, void (*)(int)))(int);
X#else
Xvoid (*signal ()) ();
X#endif
X
Xint main() {
Xint i;
X; return 0; }
XEOF
Xif { (eval echo configure:12629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_type_signal=void
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_type_signal=int
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_type_signal" 1>&6
Xcat >> confdefs.h <<EOF
X#define RETSIGTYPE $ac_cv_type_signal
XEOF
X
X
Xecho $ac_n "checking if realloc() does implement realloc(NULL, size)""... $ac_c" 1>&6
Xecho "configure:12648: checking if realloc() does implement realloc(NULL, size)" >&5
Xif eval "test \"`echo '$''{'ac_cv_realloc_null'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12656 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X#include <signal.h>
X
XRETSIGTYPE
Xsig(s)
X	int	s;
X{
X	exit(1);
X}
Xint
Xmain()
X{
X	char	*p;
X
X	signal(SIGSEGV, sig);
X	p = realloc((char *)0, 10);
X	if (p == (char *)0)
X		exit(1);
X	exit(0);
X}
XEOF
Xif { (eval echo configure:12682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_realloc_null=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_realloc_null=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_realloc_null" 1>&6
Xif test $ac_cv_realloc_null = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_REALLOC_NULL 1
XEOF
X
Xfi
Xfor ac_func in access eaccess euidaccess
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12706: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12711 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in memchr memcmp memcpy memccpy memmove memset
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12761: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12766 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in brk sbrk strerror nice flock lockf fchdir statvfs quotactl
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12816: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12821 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in realpath resolvepath
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12871: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12876 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in dup dup2
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12926: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12931 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:12954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getcwd shmat semget
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:12981: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 12986 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in lstat readlink symlink link rename mkfifo mknod
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13036: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13041 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setreuid setresuid seteuid setuid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13091: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13096 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setregid setresgid setegid setgid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13146: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13151 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getuid geteuid getgid getegid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13201: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13206 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpid getppid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13256: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13261 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpgid setpgid getsid setsid
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13311: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13316 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpgrp setpgrp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13366: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13371 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getpwnam getpwent getpwuid setpwent endpwent
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13421: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13426 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getgrnam getgrent getgrgid setgrent endgrent
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13476: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13481 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getspnam getspwnam
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13531: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13536 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getlogin
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13586: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13591 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13641: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13646 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in execl execle execlp execv execve execvp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13696: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13701 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in spawnl spawnle spawnlp spawnlpe
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13751: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13756 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in spawnv spawnve spawnvp spawnvpe
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13806: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13811 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in cwait
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13861: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13866 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getexecname
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13916: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13921 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getprogname setprogname
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:13971: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 13976 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:13999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in proc_pidpath
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14026: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14031 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in gethostid gethostname getdomainname getdtablesize
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14081: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14086 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in gettimeofday settimeofday time stime gethrtime
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14136: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14141 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ftime tzset mktime gmtime localtime timegm timelocal
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14191: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14196 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ctime cftime ascftime strftime
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14246: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14251 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in poll select isastream
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14301: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14306 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14356: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14361 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in futimens utimensat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14411: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14416 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ioctl fcntl
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14466: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14471 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in qecvt qfcvt qgcvt
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14521: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14526 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in _qecvt _qfcvt _qgcvt
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14576: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14581 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in _qecvt_r _qfcvt_r _qgcvt_r
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14631: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14636 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in _ldecvt _ldfcvt _ldgcvt
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14686: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14691 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in ecvt_r fcvt_r gcvt_r
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14741: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14746 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in _ldecvt_r _ldfcvt_r _ldgcvt_r
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14796: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14801 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in econvert fconvert gconvert
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14851: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14856 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in qeconvert qfconvert qgconvert
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14906: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14911 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in isinf isnan
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:14961: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 14966 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:14989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in rand drand48
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15016: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15021 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in strtol strtoll strtoul strtoull strtod
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15071: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15076 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setpriority DosSetPriority
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15126: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15131 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in DosAllocSharedMem
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15181: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15186 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getdelim
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15236: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15241 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in seekdir fdopendir
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15291: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15296 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in openat fstatat fchownat futimesat renameat unlinkat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15346: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15351 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in attropen
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15401: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15406 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in __accessat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15456: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15461 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in accessat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15511: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15516 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15566: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15571 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in pipe _pipe
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15621: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15626 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in popen pclose _popen _pclose
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15676: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15681 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in strsignal str2sig sig2str
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15731: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15736 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in kill killpg
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15786: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15791 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in signal sighold sigrelse sigignore sigpause sigprocmask sigsetmask sigset sigaltstack sigblock
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15841: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15846 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in alarm sleep usleep yield
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:15896: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15901 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:15924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking if tcgetattr is defined or function""... $ac_c" 1>&6
Xecho "configure:15949: checking if tcgetattr is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_tcgetattr"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15954 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_TERMIOS_H
X#include <termios.h>
X#endif
X
Xint main() {
X
X#ifndef tcgetattr
X	char *p = (char *) tcgetattr;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:15969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_tcgetattr=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_tcgetattr=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_tcgetattr"" 1>&6
X  ac_tr_dfunc=HAVE_`echo tcgetattr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'tcgetattr`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if tcsetattr is defined or function""... $ac_c" 1>&6
Xecho "configure:15991: checking if tcsetattr is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_tcsetattr"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 15996 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_TERMIOS_H
X#include <termios.h>
X#endif
X
Xint main() {
X
X#ifndef tcsetattr
X	char *p = (char *) tcsetattr;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_tcsetattr=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_tcsetattr=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_tcsetattr"" 1>&6
X  ac_tr_dfunc=HAVE_`echo tcsetattr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'tcsetattr`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xfor ac_func in tcgetpgrp tcsetpgrp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16035: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16040 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getenv putenv setenv unsetenv
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16090: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16095 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in snprintf strcasecmp strncasecmp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16145: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16150 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xfor ac_func in strcat strncat strcmp strncmp strcpy strlcat strlcpy strncpy strdup strndup strlen strnlen strchr strrchr strstr
Xdo
Xecho $ac_n "checking if $ac_func is defined or function""... $ac_c" 1>&6
Xecho "configure:16201: checking if $ac_func is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_$ac_func"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16206 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STRING_H
X#include <string.h>
X#endif
X
Xint main() {
X
X#ifndef $ac_func
X	char *p = (char *) $ac_func;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_$ac_func=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_$ac_func=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_$ac_func"" 1>&6
X  ac_tr_dfunc=HAVE_`echo $ac_func | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'$ac_func`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xdone
X
Xfor ac_func in wcscat wcsncat wcscmp wcsncmp wcscpy wcslcat wcslcpy wcsncpy wcsdup wcsndup wcslen wcsnlen wcschr wcsrchr wcsstr
Xdo
Xecho $ac_n "checking if $ac_func is defined or function""... $ac_c" 1>&6
Xecho "configure:16246: checking if $ac_func is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_$ac_func"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16251 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X
Xint main() {
X
X#ifndef $ac_func
X	char *p = (char *) $ac_func;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:16266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_$ac_func=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_$ac_func=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_$ac_func"" 1>&6
X  ac_tr_dfunc=HAVE_`echo $ac_func | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'$ac_func`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xdone
X
X
Xfor ac_func in wcwidth wcswidth wctype iswctype
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16292: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16297 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in basename dirname
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16347: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16352 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in pathconf fpathconf
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16402: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16407 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in malloc calloc valloc realloc memalign posix_memalign
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16457: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16462 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in madvise
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16512: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16517 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in mktemp mkstemp
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16567: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16572 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in chflags fchflags fflagstostr strtofflags
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16622: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16627 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in fnmatch
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16677: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16682 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in truncate ftruncate
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16732: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16737 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getppriv setppriv priv_set
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16787: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16792 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getroles privbit_set
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16842: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16847 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setlocale localeconv nl_langinfo
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16897: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16902 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in setbuf setvbuf
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:16952: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 16957 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:16980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in clone_area create_area delete_area
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:17007: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17012 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:17035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xecho Checking for POSIX violations by the POSIX.1-2008 standard:
Xfor ac_func in fexecl fexecle fexecv fexecve
Xdo
Xecho $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6
Xecho "configure:17064: checking for raw availability of $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17069 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X$ac_func();
X
X; return 0; }
XEOF
Xif { (eval echo configure:17082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in fspawnv fspawnl fspawnv_nowait
Xdo
Xecho $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6
Xecho "configure:17109: checking for raw availability of $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17114 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X$ac_func();
X
X; return 0; }
XEOF
Xif { (eval echo configure:17127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xfor ac_func in getline fgetline
Xdo
Xecho $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6
Xecho "configure:17155: checking for raw availability of $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17160 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X$ac_func();
X
X; return 0; }
XEOF
Xif { (eval echo configure:17173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_rfunc_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho End of tests for POSIX violations by the POSIX.1-2008 standard.
X
Xecho $ac_n "checking if dirfd is defined or function""... $ac_c" 1>&6
Xecho "configure:17200: checking if dirfd is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_dirfd"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17205 "configure"
X#include "confdefs.h"
X#include <dirent.h>
Xint main() {
X
X#ifndef dirfd
X	char *p = (char *) dirfd;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_dirfd=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_dirfd=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_dirfd"" 1>&6
X  ac_tr_dfunc=HAVE_`echo dirfd | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'dirfd`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if iswprint is defined or function""... $ac_c" 1>&6
Xecho "configure:17239: checking if iswprint is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_iswprint"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17244 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
Xint main() {
X
X#ifndef iswprint
X	char *p = (char *) iswprint;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_iswprint=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_iswprint=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_iswprint"" 1>&6
X  ac_tr_dfunc=HAVE_`echo iswprint | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'iswprint`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if mbsinit is defined or function""... $ac_c" 1>&6
Xecho "configure:17285: checking if mbsinit is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_mbsinit"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17290 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
Xint main() {
X
X#ifndef mbsinit
X	char *p = (char *) mbsinit;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_mbsinit=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_mbsinit=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_mbsinit"" 1>&6
X  ac_tr_dfunc=HAVE_`echo mbsinit | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'mbsinit`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if mbtowc is defined or function""... $ac_c" 1>&6
Xecho "configure:17331: checking if mbtowc is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_mbtowc"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17336 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X
Xint main() {
X
X#ifndef mbtowc
X	char *p = (char *) mbtowc;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_mbtowc=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_mbtowc=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_mbtowc"" 1>&6
X  ac_tr_dfunc=HAVE_`echo mbtowc | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'mbtowc`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if wctomb is defined or function""... $ac_c" 1>&6
Xecho "configure:17374: checking if wctomb is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_wctomb"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17379 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_STDLIB_H
X#include <stdlib.h>
X#endif
X
Xint main() {
X
X#ifndef wctomb
X	char *p = (char *) wctomb;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_wctomb=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_wctomb=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_wctomb"" 1>&6
X  ac_tr_dfunc=HAVE_`echo wctomb | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'wctomb`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if mbrtowc is defined or function""... $ac_c" 1>&6
Xecho "configure:17417: checking if mbrtowc is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_mbrtowc"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17422 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
Xint main() {
X
X#ifndef mbrtowc
X	char *p = (char *) mbrtowc;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_mbrtowc=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_mbrtowc=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_mbrtowc"" 1>&6
X  ac_tr_dfunc=HAVE_`echo mbrtowc | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'mbrtowc`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if wcrtomb is defined or function""... $ac_c" 1>&6
Xecho "configure:17463: checking if wcrtomb is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_wcrtomb"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17468 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WCHAR_H
X#include <wchar.h>
X#endif
X#ifdef	HAVE_WCTYPE_H
X#include <wctype.h>
X#endif
X
Xint main() {
X
X#ifndef wcrtomb
X	char *p = (char *) wcrtomb;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_wcrtomb=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_wcrtomb=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_wcrtomb"" 1>&6
X  ac_tr_dfunc=HAVE_`echo wcrtomb | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'wcrtomb`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if finite is defined or function""... $ac_c" 1>&6
Xecho "configure:17509: checking if finite is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_finite"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17514 "configure"
X#include "confdefs.h"
X#include <ieeefp.h>
Xint main() {
X
X#ifndef finite
X	char *p = (char *) finite;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_finite=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_finite=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_finite"" 1>&6
X  ac_tr_dfunc=HAVE_`echo finite | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'finite`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if isnand is defined or function""... $ac_c" 1>&6
Xecho "configure:17547: checking if isnand is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_isnand"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17552 "configure"
X#include "confdefs.h"
X#include <ieeefp.h>
Xint main() {
X
X#ifndef isnand
X	char *p = (char *) isnand;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:17563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_isnand=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_isnand=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_isnand"" 1>&6
X  ac_tr_dfunc=HAVE_`echo isnand | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'isnand`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
X
Xecho $ac_n "checking if we may not define our own malloc()""... $ac_c" 1>&6
Xecho "configure:17586: checking if we may not define our own malloc()" >&5
Xif eval "test \"`echo '$''{'ac_cv_no_user_malloc'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17594 "configure"
X#include "confdefs.h"
X
Xstatic int mcalled;
Xchar *
Xmalloc(s)
X	int	s;
X{
X	extern	char *sbrk();
X
X	/*
X	 * Don't ask me why, but with Cygwin on 64 Bit Vista this hangs
X	 * infinitely and is undebuggable unless we call write() here...
X	 */
X	write(2, "", 0);
X	mcalled++;
X	_exit(0);
X	return (sbrk(s));
X}
X
Xfree(p) char *p;{}
X	
Xmain()
X{
X#ifdef	HAVE_STRDUP
X	strdup("aaa");
X#else
X	exit(0);
X#endif
X	exit(1);}
XEOF
Xif { (eval echo configure:17625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_no_user_malloc=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_no_user_malloc=yes
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_no_user_malloc" 1>&6
Xif test $ac_cv_no_user_malloc = yes; then
X  cat >> confdefs.h <<\EOF
X#define NO_USER_MALLOC 1
XEOF
X
Xfi
Xecho $ac_n "checking for working extern long timezone ""... $ac_c" 1>&6
Xecho "configure:17647: checking for working extern long timezone " >&5
Xif eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17655 "configure"
X#include "confdefs.h"
X
Xextern	long	timezone;
X
Xint
Xmain()
X{
X	exit(timezone != 0);
X}
XEOF
Xif { (eval echo configure:17666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_var_timezone=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_var_timezone=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_var_timezone" 1>&6
Xif test $ac_cv_var_timezone = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VAR_TIMEZONE 1
XEOF
X
Xfi
Xecho $ac_n "checking for extern timezone in time.h or sys/time.h""... $ac_c" 1>&6
Xecho "configure:17688: checking for extern timezone in time.h or sys/time.h" >&5
Xif eval "test \"`echo '$''{'ac_cv_var_timezone_def'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17693 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#ifdef	TIME_WITH_SYS_TIME_H
X#	include <sys/time.h>
X#	include <time.h>
X#else
X#ifdef	HAVE_SYS_TIME_H
X#	include <sys/time.h>
X#else
X#	include <time.h>
X#endif
X#endif
Xint main() {
Xtimezone = 1;
X; return 0; }
XEOF
Xif { (eval echo configure:17711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_var_timezone_def=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_var_timezone_def=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_var_timezone_def" 1>&6
Xif test $ac_cv_var_timezone_def = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VAR_TIMEZONE_DEF 1
XEOF
X
Xfi
Xecho $ac_n "checking for working extern char *__progname ""... $ac_c" 1>&6
Xecho "configure:17731: checking for working extern char *__progname " >&5
Xif eval "test \"`echo '$''{'ac_cv_var___progname'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17739 "configure"
X#include "confdefs.h"
X
Xextern	char	*__progname;
X
Xint
Xmain()
X{
X	exit (!(__progname != 0 && *__progname != '\0'));
X}
XEOF
Xif { (eval echo configure:17750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_var___progname=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_var___progname=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_var___progname" 1>&6
Xif test $ac_cv_var___progname = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VAR___PROGNAME 1
XEOF
X
Xfi
Xecho $ac_n "checking for working extern char *__progname_full ""... $ac_c" 1>&6
Xecho "configure:17772: checking for working extern char *__progname_full " >&5
Xif eval "test \"`echo '$''{'ac_cv_var___progname_full'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17780 "configure"
X#include "confdefs.h"
X
Xextern	char	*__progname_full;
X
Xint
Xmain()
X{
X	exit (!(__progname_full != 0 && *__progname_full != '\0'));
X}
XEOF
Xif { (eval echo configure:17791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_var___progname_full=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_var___progname_full=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_var___progname_full" 1>&6
Xif test $ac_cv_var___progname_full = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_VAR___PROGNAME_FULL 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if link() allows hard links on symlinks""... $ac_c" 1>&6
Xecho "configure:17814: checking if link() allows hard links on symlinks" >&5
Xif eval "test \"`echo '$''{'ac_cv_hard_symlinks'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17822 "configure"
X#include "confdefs.h"
X
Xmain()
X{
X	int	ret = 0;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:17844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_hard_symlinks=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_hard_symlinks=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_hard_symlinks" 1>&6
Xif test $ac_cv_hard_symlinks = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_HARD_SYMLINKS 1
XEOF
X
Xfi
Xecho $ac_n "checking if link() does not folow symlinks""... $ac_c" 1>&6
Xecho "configure:17866: checking if link() does not folow symlinks" >&5
Xif eval "test \"`echo '$''{'ac_cv_link_nofollow'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17874 "configure"
X#include "confdefs.h"
X
X#include <sys/types.h>
X#include <sys/stat.h>
X
Xmain()
X{
X	int	ret = 0;
X	int	f;
X	struct stat sb;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	f = creat("confdefs.f1", 0666);
X	close(f);
X	if (symlink("confdefs.f1", "confdefs.l1") < 0)
X		ret = 1;
X	if (link("confdefs.l1", "confdefs.h1") < 0)
X		ret = 1;
X
X	stat("confdefs.f1", &sb);
X	if (sb.st_nlink == 2)
X		ret = 1;
X
X	unlink("confdefs.f1");
X	unlink("confdefs.l1");
X	unlink("confdefs.h1");
X
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:17908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_link_nofollow=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_link_nofollow=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_link_nofollow" 1>&6
Xif test $ac_cv_link_nofollow = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_LINK_NOFOLLOW 1
XEOF
X
Xfi
Xfor ac_hdr in unistd.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:17933: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17938 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:17943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking if access() does implement E_OK""... $ac_c" 1>&6
Xecho "configure:17970: checking if access() does implement E_OK" >&5
Xif eval "test \"`echo '$''{'ac_cv_access_e_ok'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 17978 "configure"
X#include "confdefs.h"
X
X# ifdef HAVE_UNISTD_H
X#  include <unistd.h>
X# endif
X#ifndef	R_OK
X#define	R_OK	4	/* Test for Read permission */
X#define	W_OK	2	/* Test for Write permission */
X#define	X_OK	1	/* Test for eXecute permission */
X#define	F_OK	0	/* Test for existence of File */
X#endif
X
X#ifndef	E_OK
X#ifdef	EFF_ONLY_OK
X#define	E_OK	EFF_ONLY_OK /* Irix */
X#else
X#ifdef	EUID_OK
X#define	E_OK	EUID_OK	/* UNICOS (0400) */
X#else
X#define	E_OK	010	/* Test effective uids */
X#endif
X#endif
X#endif
X
X#include <errno.h>
X#ifndef	HAVE_ERRNO_DEF
Xextern	int	errno;
X#endif
X
Xmain()
X{
X#ifdef	_MSC_VER
X/*
X * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will
X * cause an exception that results in a popup window. For this reason, the test
X * is disabled for "cl",  it would not work anyway.
X */	
X	int	ret = 1;
X#else
X	int	ret = 0;
X
X	if (access(".", F_OK) != 0)
X		ret = 1;
X	else if (access(".", E_OK|F_OK) != 0)
X		ret = 1;
X	else if (access(".", (R_OK<<4)|F_OK) == 0)
X		ret = 1;
X#endif
X
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:18031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_access_e_ok=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_access_e_ok=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_access_e_ok" 1>&6
Xif test $ac_cv_access_e_ok = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_ACCESS_E_OK 1
XEOF
X
Xfi
Xfor ac_hdr in fnmatch.h
Xdo
Xac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Xecho "configure:18056: checking for $ac_hdr" >&5
Xif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18061 "configure"
X#include "confdefs.h"
X#include <$ac_hdr>
XEOF
Xac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
X{ (eval echo configure:18066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Xac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"`
Xif test -z "$ac_err"; then
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=yes"
Xelse
X  echo "$ac_err" >&5
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_header_$ac_safe=no"
Xfi
Xrm -f conftest*
Xfi
Xif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_hdr 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xecho $ac_n "checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD""... $ac_c" 1>&6
Xecho "configure:18093: checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD" >&5
Xif eval "test \"`echo '$''{'ac_cv_fnmatch_igncase'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18101 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_FNMATCH
X#include <fnmatch.h>
X#endif
X
X#ifndef	FNM_IGNORECASE
X#ifdef	FNM_CASEFOLD
X#define	FNM_IGNORECASE	FNM_CASEFOLD
X#endif
X#endif
X
Xmain()
X{
X	int	ret;
X
X	ret = fnmatch("a", "A", FNM_IGNORECASE);
X	exit(ret);
X}
XEOF
Xif { (eval echo configure:18122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null
Xthen
X  ac_cv_fnmatch_igncase=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -fr conftest*
X  ac_cv_fnmatch_igncase=no
Xfi
Xrm -fr conftest*
Xfi
X
Xfi
X
Xeval echo "$ac_t""$ac_cv_fnmatch_igncase" 1>&6
Xif test $ac_cv_fnmatch_igncase = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FNMATCH_IGNORECASE 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for fseeko()""... $ac_c" 1>&6
Xecho "configure:18145: checking for fseeko()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18150 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
Xreturn !fseeko;
X; return 0; }
XEOF
Xif { (eval echo configure:18157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_fseeko=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_fseeko=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_fseeko" 1>&6
Xif test $ac_cv_func_fseeko = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FSEEKO 1
XEOF
X
Xfi
Xecho $ac_n "checking for ftello()""... $ac_c" 1>&6
Xecho "configure:18177: checking for ftello()" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_ftello'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18182 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
Xreturn !ftello;
X; return 0; }
XEOF
Xif { (eval echo configure:18189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  ac_cv_func_ftello=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_func_ftello=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_func_ftello" 1>&6
Xif test $ac_cv_func_ftello = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_FTELLO 1
XEOF
X
Xfi
X
Xecho $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
Xecho "configure:18210: checking for dlopen in -lc" >&5
Xac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 18218 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar dlopen();
X
Xint main() {
Xdlopen()
X; return 0; }
XEOF
Xif { (eval echo configure:18229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_dl=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Xecho "configure:18248: checking for dlopen in -ldl" >&5
Xac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-ldl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 18256 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar dlopen();
X
Xint main() {
Xdlopen()
X; return 0; }
XEOF
Xif { (eval echo configure:18267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_dl="-ldl"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_dl"
Xfor ac_func in dlopen dlclose dlsym dlerror dlinfo
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:18294: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18299 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:18322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in shl_load shl_unload shl_gethandle
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:18349: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18354 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:18377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
Xif test ."$lib_dl" = .""; then
X	cat >> confdefs.h <<\EOF
X#define HAVE_DLOPEN_IN_LIBC 1
XEOF
X
Xfi
X
Xfor ac_func in LoadLibrary FreeLibrary GetProcAddress
Xdo
Xecho $ac_n "checking if $ac_func is defined or function""... $ac_c" 1>&6
Xecho "configure:18412: checking if $ac_func is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_$ac_func"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18417 "configure"
X#include "confdefs.h"
X
X#ifdef	HAVE_WINDOWS_H
X#undef	u_char
X#undef	u_short
X#undef	u_int
X#undef	u_long
X#include <windows.h>
X#endif
X
Xint main() {
X
X#ifndef $ac_func
X	char *p = (char *) $ac_func;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:18436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_$ac_func=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_$ac_func=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_$ac_func"" 1>&6
X  ac_tr_dfunc=HAVE_`echo $ac_func | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'$ac_func`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
Xdone
X
X
Xecho $ac_n "checking for rcmd in -lsocket""... $ac_c" 1>&6
Xecho "configure:18460: checking for rcmd in -lsocket" >&5
Xac_lib_var=`echo socket'_'rcmd | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lsocket  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 18468 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar rcmd();
X
Xint main() {
Xrcmd()
X; return 0; }
XEOF
Xif { (eval echo configure:18479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_socket="-lsocket"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_socket"
Xecho $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
Xecho "configure:18502: checking for inet_ntoa in -lnsl" >&5
Xac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lnsl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 18510 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar inet_ntoa();
X
Xint main() {
Xinet_ntoa()
X; return 0; }
XEOF
Xif { (eval echo configure:18521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_nsl="-lnsl"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
XLIBS="$LIBS $lib_nsl"
Xfor ac_func in rcmd socket socketpair
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:18545: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18550 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:18573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getservbyname inet_ntoa
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:18600: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18605 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:18628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in getaddrinfo getnameinfo
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:18655: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 18660 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:18683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xac_save_LIBS="$LIBS"
Xecho $ac_n "checking for res_init in -lc""... $ac_c" 1>&6
Xecho "configure:18711: checking for res_init in -lc" >&5
Xac_lib_var=`echo c'_'res_init | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 18719 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar res_init();
X
Xint main() {
Xres_init()
X; return 0; }
XEOF
Xif { (eval echo configure:18730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_resolv=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6
Xecho "configure:18749: checking for res_init in -lresolv" >&5
Xac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lresolv  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 18757 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar res_init();
X
Xint main() {
Xres_init()
X; return 0; }
XEOF
Xif { (eval echo configure:18768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_resolv="-lresolv"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
XLIBS="$ac_save_LIBS"
X
X# Check whether --enable-largefile or --disable-largefile was given.
Xif test "${enable_largefile+set}" = set; then
X  enableval="$enable_largefile"
X  :
Xfi
X
X   if test "$enable_largefile" != no; then
X
X     echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
Xecho "configure:18801: checking for special C compiler options needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_largefile_CC=no
X        largefile_cc_opt=""
X        if test "$GCC" != yes; then
X	  # IRIX 6.2 and later do not support large files by default,
X	  # so use the C compiler's -n32 option if that helps.
X	  cat > conftest.$ac_ext <<EOF
X#line 18811 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_save_CC="${CC-cc}"
X	     CC="$CC -n32"
X	     cat > conftest.$ac_ext <<EOF
X#line 18836 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_largefile_CC=' -n32'
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
X	     CC="$ac_save_CC"
Xfi
Xrm -f conftest*
X        fi
Xfi
X
Xeval echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
X     if test "$ac_cv_sys_largefile_CC" != no; then
X       CC="$CC$ac_cv_sys_largefile_CC"
X       largefile_cc_opt="$ac_cv_sys_largefile_CC"
X     fi
X
X     echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
Xecho "configure:18873: checking for _FILE_OFFSET_BITS value needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_file_offset_bits=no
X      cat > conftest.$ac_ext <<EOF
X#line 18879 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  cat > conftest.$ac_ext <<EOF
X#line 18902 "configure"
X#include "confdefs.h"
X#define _FILE_OFFSET_BITS 64
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
X	   
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_file_offset_bits=64
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
X   if test "$ac_cv_sys_file_offset_bits" != no; then
X     cat >> confdefs.h <<EOF
X#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
XEOF
X
X   fi
X     echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
Xecho "configure:18940: checking for _LARGE_FILES value needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_large_files=no
X      cat > conftest.$ac_ext <<EOF
X#line 18946 "configure"
X#include "confdefs.h"
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  cat > conftest.$ac_ext <<EOF
X#line 18969 "configure"
X#include "confdefs.h"
X#define _LARGE_FILES 1
X#include <sys/types.h>
X    /* Check that off_t can represent 2**63 - 1 correctly.
X       We can't simply "#define LARGE_OFF_T 9223372036854775807",
X       since some C++ compilers masquerading as C compilers
X       incorrectly reject 9223372036854775807.  */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
X  
X	   
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:18987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_large_files=1
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_sys_large_files" 1>&6
X   if test "$ac_cv_sys_large_files" != no; then
X     cat >> confdefs.h <<EOF
X#define _LARGE_FILES $ac_cv_sys_large_files
XEOF
X
X   fi
X     echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
Xecho "configure:19007: checking for _LARGEFILE_SOURCE value needed for large files" >&5
Xif eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_cv_sys_largefile_source=no
X      cat > conftest.$ac_ext <<EOF
X#line 19013 "configure"
X#include "confdefs.h"
X#include <stdio.h>
Xint main() {
Xreturn !fseeko;
X; return 0; }
XEOF
Xif { (eval echo configure:19020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  :
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  cat > conftest.$ac_ext <<EOF
X#line 19027 "configure"
X#include "confdefs.h"
X#define _LARGEFILE_SOURCE 1
X#include <stdio.h>
X	   
Xint main() {
Xreturn !fseeko;
X; return 0; }
XEOF
Xif { (eval echo configure:19036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_sys_largefile_source=1
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
Xfi
Xrm -f conftest*
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
X   if test "$ac_cv_sys_largefile_source" != no; then
X     cat >> confdefs.h <<EOF
X#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
XEOF
X
X   fi
X   fi
X  
Xecho $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
Xecho "configure:19058: checking if system supports Large Files at all" >&5
Xif eval "test \"`echo '$''{'ac_cv_largefiles'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19063 "configure"
X#include "confdefs.h"
X#include <stdio.h>
X#include <sys/types.h>
Xint main() {
X
X/*
X * Check that off_t can represent 2**63 - 1 correctly.
X * We can't simply "#define LARGE_OFF_T 9223372036854775807",
X * since some C++ compilers masquerading as C compilers
X * incorrectly reject 9223372036854775807.
X */
X#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
X    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
X			&& LARGE_OFF_T % 2147483647 == 1)
X		       ? 1 : -1];
Xreturn !fseeko;
Xreturn !ftello;
X; return 0; }
XEOF
Xif { (eval echo configure:19083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_largefiles=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_largefiles=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_largefiles" 1>&6
X	if test $ac_cv_largefiles = yes; then
X		cat >> confdefs.h <<\EOF
X#define HAVE_LARGEFILES 1
XEOF
X
X	fi
X
Xcat >> confdefs.h <<EOF
X#define HOST_ALIAS "$host_alias"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_SUB "$host"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_CPU "$host_cpu"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_VENDOR "$host_vendor"
XEOF
X
Xcat >> confdefs.h <<EOF
X#define HOST_OS "$host_os"
XEOF
X
X
X
Xecho $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
Xecho "configure:19126: checking for crypt in -lc" >&5
Xac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 19134 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar crypt();
X
Xint main() {
Xcrypt()
X; return 0; }
XEOF
Xif { (eval echo configure:19145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_crypt=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
Xecho "configure:19164: checking for crypt in -lcrypt" >&5
Xac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lcrypt  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 19172 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar crypt();
X
Xint main() {
Xcrypt()
X; return 0; }
XEOF
Xif { (eval echo configure:19183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_crypt="-lcrypt"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_crypt"
Xfor ac_func in crypt
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:19211: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19216 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:19239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for gettext in -lc""... $ac_c" 1>&6
Xecho "configure:19266: checking for gettext in -lc" >&5
Xac_lib_var=`echo c'_'gettext | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-lc  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 19274 "configure"
X#include "confdefs.h"
X#include <libintl.h>
Xint main() {
X
X	char *p = (char *) gettext;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:19285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_intl=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
Xecho "configure:19304: checking for gettext in -lintl" >&5
Xac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-lintl  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 19312 "configure"
X#include "confdefs.h"
X#include <libintl.h>
Xint main() {
X
X	char *p = (char *) gettext;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:19323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_intl="-lintl"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_intl"
Xecho $ac_n "checking if gettext is defined or function""... $ac_c" 1>&6
Xecho "configure:19349: checking if gettext is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_gettext"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19354 "configure"
X#include "confdefs.h"
X#include <libintl.h>
Xint main() {
X
X#ifndef gettext
X	char *p = (char *) gettext;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_gettext=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_gettext=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_gettext"" 1>&6
X  ac_tr_dfunc=HAVE_`echo gettext | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'gettext`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for iconv_open in -lc""... $ac_c" 1>&6
Xecho "configure:19389: checking for iconv_open in -lc" >&5
Xac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-lc  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 19397 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X	char *p = (char *) iconv_open;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:19408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_iconv=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
Xecho "configure:19427: checking for iconv_open in -liconv" >&5
Xac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS="-liconv  $LIBS"
Xcat > conftest.$ac_ext <<EOF
X#line 19435 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X	char *p = (char *) iconv_open;
X
X	return ((int)p);
X
X; return 0; }
XEOF
Xif { (eval echo configure:19446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_iconv="-liconv"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_iconv"
Xecho $ac_n "checking if iconv is defined or function""... $ac_c" 1>&6
Xecho "configure:19472: checking if iconv is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_iconv"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19477 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef iconv
X	char *p = (char *) iconv;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_iconv=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_iconv=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_iconv"" 1>&6
X  ac_tr_dfunc=HAVE_`echo iconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'iconv`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if iconv_open is defined or function""... $ac_c" 1>&6
Xecho "configure:19510: checking if iconv_open is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_iconv_open"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19515 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef iconv_open
X	char *p = (char *) iconv_open;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_iconv_open=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_iconv_open=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_iconv_open"" 1>&6
X  ac_tr_dfunc=HAVE_`echo iconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'iconv_open`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if iconv_close is defined or function""... $ac_c" 1>&6
Xecho "configure:19548: checking if iconv_close is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_iconv_close"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19553 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef iconv_close
X	char *p = (char *) iconv_close;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_iconv_close=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_iconv_close=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_iconv_close"" 1>&6
X  ac_tr_dfunc=HAVE_`echo iconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'iconv_close`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if libiconv is defined or function""... $ac_c" 1>&6
Xecho "configure:19586: checking if libiconv is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_libiconv"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19591 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef libiconv
X	char *p = (char *) libiconv;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_libiconv=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_libiconv=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_libiconv"" 1>&6
X  ac_tr_dfunc=HAVE_`echo libiconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'libiconv`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if libiconv_open is defined or function""... $ac_c" 1>&6
Xecho "configure:19624: checking if libiconv_open is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_libiconv_open"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19629 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef libiconv_open
X	char *p = (char *) libiconv_open;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_libiconv_open=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_libiconv_open=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_libiconv_open"" 1>&6
X  ac_tr_dfunc=HAVE_`echo libiconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'libiconv_open`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
Xecho $ac_n "checking if libiconv_close is defined or function""... $ac_c" 1>&6
Xecho "configure:19662: checking if libiconv_close is defined or function" >&5
Xif eval "test \"`echo '$''{'"ac_cv_have_libiconv_close"'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19667 "configure"
X#include "confdefs.h"
X#include <iconv.h>
Xint main() {
X
X#ifndef libiconv_close
X	char *p = (char *) libiconv_close;
X	exit (p != (char *)0 && *p != 0);
X#endif
X; return 0; }
XEOF
Xif { (eval echo configure:19678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval ac_cv_have_libiconv_close=yes
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval ac_cv_have_libiconv_close=no
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$"ac_cv_have_libiconv_close"" 1>&6
X  ac_tr_dfunc=HAVE_`echo libiconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Xif eval "test \"`echo '$ac_cv_have_'libiconv_close`\" = yes"; then
X  cat >> confdefs.h <<EOF
X#define $ac_tr_dfunc 1
XEOF
X
Xfi
X
XLIBS="$ac_save_LIBS"
X
Xif test $ac_cv_header_camlib_h = yes; then
X  scsi_lib=-lcam
X  lib_scsi=-lcam
Xfi
X
Xif test "$ac_cv_header_sys_acl_h" = yes; then
X
X  echo "checking for Posix Access Control List support" 1>&6
Xecho "configure:19709: checking for Posix Access Control List support" >&5
X  echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
Xecho "configure:19711: checking for acl_get_file in -lacl" >&5
Xac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lacl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 19719 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar acl_get_file();
X
Xint main() {
Xacl_get_file()
X; return 0; }
XEOF
Xif { (eval echo configure:19730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_acl="-lacl"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
X  echo $ac_n "checking for acl_get_file in -lpacl""... $ac_c" 1>&6
Xecho "configure:19751: checking for acl_get_file in -lpacl" >&5
Xac_lib_var=`echo pacl'_'acl_get_file | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lpacl  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 19759 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar acl_get_file();
X
Xint main() {
Xacl_get_file()
X; return 0; }
XEOF
Xif { (eval echo configure:19770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_acl="-lpacl"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
X
X		
X	if test ".$lib_acl" != .; then
X		lib_acl_test="$lib_acl"
X	fi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  for ac_func in acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:19801: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19806 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:19829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  for ac_func in acl_extended_file
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:19856: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19861 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:19884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  for ac_func in acl_get_entry
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:19911: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 19916 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:19939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  LIBS="$ac_save_LIBS"
X
X  echo "checking for Solaris Access Control List support" 1>&6
Xecho "configure:19966: checking for Solaris Access Control List support" >&5
X  echo $ac_n "checking for acltotext in -lsec""... $ac_c" 1>&6
Xecho "configure:19968: checking for acltotext in -lsec" >&5
Xac_lib_var=`echo sec'_'acltotext | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lsec  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 19976 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar acltotext();
X
Xint main() {
Xacltotext()
X; return 0; }
XEOF
Xif { (eval echo configure:19987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_acl="-lsec"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_acl"
X  for ac_func in acl facl aclfromtext acltotext
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20012: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20017 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  LIBS="$ac_save_LIBS"
X
X  
X  echo "checking for HP-UX Access Control List support" 1>&6
Xecho "configure:20068: checking for HP-UX Access Control List support" >&5
X  for ac_func in getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20072: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20077 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
X  
Xfi
X
Xif test "$ac_cv_header_attr_xattr_h" = yes; then
X  echo "checking for Linux flavor Extended Attribute support" 1>&6
Xecho "configure:20130: checking for Linux flavor Extended Attribute support" >&5
X  echo $ac_n "checking for getxattr in -lattr""... $ac_c" 1>&6
Xecho "configure:20132: checking for getxattr in -lattr" >&5
Xac_lib_var=`echo attr'_'getxattr | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lattr  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20140 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar getxattr();
X
Xint main() {
Xgetxattr()
X; return 0; }
XEOF
Xif { (eval echo configure:20151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_attr="-lattr"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
X  ac_save_LIBS="$LIBS"
X  LIBS="$LIBS $lib_attr"
X  for ac_func in getxattr setxattr listxattr lgetxattr lsetxattr llistxattr
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20176: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20181 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X  LIBS="$ac_save_LIBS"
Xfi
X
Xecho "checking for RBAC support" 1>&6
Xecho "configure:20232: checking for RBAC support" >&5
Xecho $ac_n "checking for getuserattr in -lsecdb""... $ac_c" 1>&6
Xecho "configure:20234: checking for getuserattr in -lsecdb" >&5
Xac_lib_var=`echo secdb'_'getuserattr | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lsecdb  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20242 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar getuserattr();
X
Xint main() {
Xgetuserattr()
X; return 0; }
XEOF
Xif { (eval echo configure:20253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_secdb="-lsecdb"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_secdb"
Xfor ac_func in getauthattr getuserattr getexecattr getprofattr
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20278: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20283 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho "checking for gmatch() support" 1>&6
Xecho "configure:20333: checking for gmatch() support" >&5
Xecho $ac_n "checking for gmatch in -lgen""... $ac_c" 1>&6
Xecho "configure:20335: checking for gmatch in -lgen" >&5
Xac_lib_var=`echo gen'_'gmatch | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lgen  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20343 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar gmatch();
X
Xint main() {
Xgmatch()
X; return 0; }
XEOF
Xif { (eval echo configure:20354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_gen="-lgen"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_gen"
Xfor ac_func in gmatch
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20379: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20384 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xfor ac_func in thr_yield
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20436: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20441 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
X
Xecho $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Xecho "configure:20490: checking for pthread_create in -lpthread" >&5
Xac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lpthread  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20498 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar pthread_create();
X
Xint main() {
Xpthread_create()
X; return 0; }
XEOF
Xif { (eval echo configure:20509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_pthread="-lpthread"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
Xecho "configure:20528: checking for pthread_create in -lc" >&5
Xac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20536 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar pthread_create();
X
Xint main() {
Xpthread_create()
X; return 0; }
XEOF
Xif { (eval echo configure:20547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_pthread=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_pthread"
Xfor ac_func in pthread_create pthread_kill
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20575: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20580 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in pthread_mutex_lock pthread_cond_wait pthread_spin_lock
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20630: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20635 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xecho $ac_n "checking for clock_gettime in -lc""... $ac_c" 1>&6
Xecho "configure:20685: checking for clock_gettime in -lc" >&5
Xac_lib_var=`echo c'_'clock_gettime | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lc  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20693 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar clock_gettime();
X
Xint main() {
Xclock_gettime()
X; return 0; }
XEOF
Xif { (eval echo configure:20704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_rt=""
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6
Xecho "configure:20723: checking for clock_gettime in -lrt" >&5
Xac_lib_var=`echo rt'_'clock_gettime | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lrt  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20731 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar clock_gettime();
X
Xint main() {
Xclock_gettime()
X; return 0; }
XEOF
Xif { (eval echo configure:20742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_rt="-lrt"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xecho $ac_n "checking for clock_gettime in -lposix4""... $ac_c" 1>&6
Xecho "configure:20761: checking for clock_gettime in -lposix4" >&5
Xac_lib_var=`echo posix4'_'clock_gettime | sed 'y%./+-%__p_%'`
Xif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ac_save_LIBS="$LIBS"
XLIBS=`echo "-lposix4  $LIBS" | sed -e 's/-lc //'`
Xcat > conftest.$ac_ext <<EOF
X#line 20769 "configure"
X#include "confdefs.h"
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar clock_gettime();
X
Xint main() {
Xclock_gettime()
X; return 0; }
XEOF
Xif { (eval echo configure:20780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_lib_$ac_lib_var=no"
Xfi
Xrm -f conftest*
XLIBS="$ac_save_LIBS"
X
Xfi
Xif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X  lib_rt="-lposix4"
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
X
Xfi
X
Xfi
X
X
Xac_save_LIBS="$LIBS"
XLIBS="$LIBS $lib_rt"
Xfor ac_func in clock_gettime clock_settime clock_getres
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20810: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20815 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sched_getparam sched_setparam sched_getscheduler sched_setscheduler
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20865: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20870 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in sched_yield
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20920: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20925 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:20948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
Xfor ac_func in nanosleep
Xdo
Xecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
Xecho "configure:20975: checking for $ac_func" >&5
Xif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 20980 "configure"
X#include "confdefs.h"
X/* System header to define __stub macros and hopefully few prototypes,
X    which can conflict with char $ac_func(); below.  */
X#include <assert.h>
X/* Override any gcc2 internal prototype to avoid an error.  */
X/* We use char because int might match the return type of a gcc2
X    builtin and then its argument prototype would still apply.  */
Xchar $ac_func();
X
Xint main() {
X
X/* The GNU C library defines this for functions which it implements
X    to always fail with ENOSYS.  Some functions are actually named
X    something starting with __ and the normal name is an alias.  */
X#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Xchoke me
X#else
X$ac_func();
X#endif
X
X; return 0; }
XEOF
Xif { (eval echo configure:21003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=yes"
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  eval "ac_cv_func_$ac_func=no"
Xfi
Xrm -f conftest*
Xfi
X
Xif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_func 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
Xfi
Xdone
X
XLIBS="$ac_save_LIBS"
X
Xfor ac_file in /dev/tty /dev/null /dev/zero
Xdo
X
Xac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_file""... $ac_c" 1>&6
Xecho "configure:21034: checking for $ac_file" >&5
Xif eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
Xelse
X  if $rmttest -r $ac_file; then
X    eval "ac_cv_file_$ac_safe=yes"
X  else
X    eval "ac_cv_file_$ac_safe=no"
X  fi
Xfi
Xfi
Xif eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_file 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
X
Xfi
Xdone
X
Xfor ac_file in /dev/stdin /dev/stdout /dev/stderr
Xdo
X
Xac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_file""... $ac_c" 1>&6
Xecho "configure:21066: checking for $ac_file" >&5
Xif eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
Xelse
X  if $rmttest -r $ac_file; then
X    eval "ac_cv_file_$ac_safe=yes"
X  else
X    eval "ac_cv_file_$ac_safe=no"
X  fi
Xfi
Xfi
Xif eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_file 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
X
Xfi
Xdone
X
Xfor ac_file in /dev/fd/0 /dev/fd/1 /dev/fd/2
Xdo
X
Xac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
Xecho $ac_n "checking for $ac_file""... $ac_c" 1>&6
Xecho "configure:21098: checking for $ac_file" >&5
Xif eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  if test "$cross_compiling" = yes; then
X    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
Xelse
X  if $rmttest -r $ac_file; then
X    eval "ac_cv_file_$ac_safe=yes"
X  else
X    eval "ac_cv_file_$ac_safe=no"
X  fi
Xfi
Xfi
Xif eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
X  eval echo "$ac_t""yes" 1>&6
X    ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
X  cat >> confdefs.h <<EOF
X#define $ac_tr_file 1
XEOF
X 
Xelse
X  eval echo "$ac_t""no" 1>&6
X
Xfi
Xdone
X
X
XUNAME=`uname || true`
X
Xif test ."$UNAME" = .Linux; then
X
X
Xecho $ac_n "checking if Linux include file linux/ext2_fs.h is broken""... $ac_c" 1>&6
Xecho "configure:21132: checking if Linux include file linux/ext2_fs.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_linux_ext2_fs_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 21137 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:21147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_linux_ext2_fs_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_linux_ext2_fs_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_broken_linux_ext2_fs_h" 1>&6
Xif test $ac_cv_broken_linux_ext2_fs_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_LINUX_EXT2_FS_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken""... $ac_c" 1>&6
Xecho "configure:21167: checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_src_linux_ext2_fs_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X		cat > conftest.$ac_ext <<EOF
X#line 21173 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <linux/ext2_fs.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:21183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_src_linux_ext2_fs_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_src_linux_ext2_fs_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_broken_src_linux_ext2_fs_h" 1>&6
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_linux_ext2_fs_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SRC_LINUX_EXT2_FS_H 1
XEOF
X
Xfi
Xif test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then
X	#
X	# If either /usr/include/linux/ex2_fs.h works or
X	# /usr/src/linux/include/linux/ex2_fs.h works, we will
X	# #define HAVE_USABLE_LINUX_EXT2_FS_H
X	#
X	# If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple
X	# #include <linux/ex2_fs.h> will work.
X	#
X	ac_cv_usable_linux_ext2_fs_h=yes
X	cat >> confdefs.h <<\EOF
X#define HAVE_USABLE_LINUX_EXT2_FS_H 1
XEOF
X
Xelse
X	ac_cv_usable_linux_ext2_fs_h=no
Xfi
Xecho $ac_n "checking if Linux include file scsi/scsi.h is broken""... $ac_c" 1>&6
Xecho "configure:21221: checking if Linux include file scsi/scsi.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_scsi_scsi_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 21226 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:21236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_scsi_scsi_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_scsi_scsi_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_broken_scsi_scsi_h" 1>&6
Xif test $ac_cv_broken_scsi_scsi_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SCSI_SCSI_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken""... $ac_c" 1>&6
Xecho "configure:21256: checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_src_scsi_scsi_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                cat > conftest.$ac_ext <<EOF
X#line 21262 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <scsi/scsi.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:21272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_scsi_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_scsi_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_broken_src_scsi_scsi_h" 1>&6
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_scsi_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SRC_SCSI_SCSI_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file scsi/sg.h is broken""... $ac_c" 1>&6
Xecho "configure:21293: checking if Linux include file scsi/sg.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_scsi_sg_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  cat > conftest.$ac_ext <<EOF
X#line 21298 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:21309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_scsi_sg_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_scsi_sg_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_broken_scsi_sg_h" 1>&6
Xif test $ac_cv_broken_scsi_sg_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SCSI_SG_H 1
XEOF
X
Xfi
Xecho $ac_n "checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken""... $ac_c" 1>&6
Xecho "configure:21329: checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken" >&5
Xif eval "test \"`echo '$''{'ac_cv_broken_src_scsi_sg_h'+set}'`\" = set"; then
X  echo $ac_n "(cached) $ac_c" 1>&6
Xelse
X  ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS"
X                cat > conftest.$ac_ext <<EOF
X#line 21335 "configure"
X#include "confdefs.h"
X
X#if defined(__linux__) || defined(__linux) || defined(linux)
X#include <sys/types.h>
X#include <scsi/sg.h>
X#endif
Xint main() {
X
X; return 0; }
XEOF
Xif { (eval echo configure:21346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_sg_h=no
Xelse
X  echo "configure: failed program was:" >&5
X  cat conftest.$ac_ext >&5
X  rm -rf conftest*
X  ac_cv_broken_src_scsi_sg_h=yes
Xfi
Xrm -f conftest*
Xfi
X
Xeval echo "$ac_t""$ac_cv_broken_src_scsi_sg_h" 1>&6
XCPPFLAGS=$___CPPFLAGS
Xif test $ac_cv_broken_src_scsi_sg_h = yes; then
X  cat >> confdefs.h <<\EOF
X#define HAVE_BROKEN_SRC_SCSI_SG_H 1
XEOF
X
Xfi
X
Xif test .$ac_cv_broken_src_scsi_scsi_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then
X	may_linux_src_include=no
Xfi
Xif test .$may_linux_src_include = .no; then
X	echo
X	echo "Warning: *** /usr/src/linux/include contains broken include files ***"
X	echo "Warning: *** /usr/src/linux/include is not used this reason ***"
X	echo "Warning: This may result in the inability to use recent Linux kernel interfaces" 
X	echo
Xfi
Xif test .$ac_cv_usable_linux_ext2_fs_h = .no; then
X	echo
X	echo "Warning: *** linux/ext2_fs.h is not usable at all ***"
X	echo "Warning: *** This makes it impossible to support Linux file flags ***"
X	echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'"
X	echo
X	sleep 10
Xfi
Xfi	# Linux only tests
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Xtrap '' 1 2 15
Xcat > confcache <<\EOF
X# This file is a shell script that caches the results of configure
X# tests run on this system so they can be shared between configure
X# scripts and configure runs.  It is not useful on other systems.
X# If it contains results you don't want to keep, you may remove or edit it.
X#
X# By default, configure uses ./config.cache as the cache file,
X# creating it if it does not exist already.  You can give configure
X# the --cache-file=FILE option to use a different cache file; that is
X# what configure does when it calls configure scripts in
X# subdirectories, so they share the cache.
X# Giving --cache-file=/dev/null disables caching, for debugging configure.
X# config.status only pays attention to the cache file if you give it the
X# --recheck option to rerun configure.
X#
XEOF
X# The following way of writing the cache mishandles newlines in values,
X# but we know of no workaround that is simple, portable, and efficient.
X# So, don't put newlines in cache variables' values.
X# Ultrix sh set writes to stderr and can't be redirected directly,
X# and sets the high bit in the cache file unless we assign to the vars.
X(set) 2>&1 |
X  case `(ac_space=' '; set | grep ac_space) 2>&1` in
X  *ac_space=\ *)
X    # `set' does not quote correctly, so add quotes (double-quote substitution
X    # turns \\\\ into \\, and sed turns \\ into \).
X    sed -n \
X      -e "s/'/'\\\\''/g" \
X      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
X    ;;
X  *)
X    # `set' quotes correctly as required by POSIX, so do not add quotes.
X    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
X    ;;
X  esac >> confcache
Xif cmp -s $cache_file confcache; then
X  :
Xelse
X  if test -w $cache_file; then
X    echo "updating cache $cache_file"
X    cat confcache > $cache_file
X  else
X    echo "not updating unwritable cache $cache_file"
X  fi
Xfi
Xrm -f confcache
X
Xtrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
X
Xtest "x$prefix" = xNONE && prefix=$ac_default_prefix
X# Let make expand exec_prefix.
Xtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
X
X# Any assignment to VPATH causes Sun make to only execute
X# the first set of double-colon rules, so remove it if not needed.
X# If there is a colon in the path, we need to keep it.
Xif test "x$srcdir" = x.; then
X  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Xfi
X
Xtrap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
X
XDEFS=-DHAVE_CONFIG_H
X
X# Without the "./", some shells look in PATH for config.status.
X: ${CONFIG_STATUS=./config.status}
X
Xecho creating $CONFIG_STATUS
Xrm -f $CONFIG_STATUS
Xcat > $CONFIG_STATUS <<EOF
X#! /bin/sh
X# Generated automatically by configure.
X# Run this file to recreate the current configuration.
X# This directory was configured as follows,
X# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
X#
X# $0 $ac_configure_args
X#
X# Compiler output produced by configure, useful for debugging
X# configure, is in ./config.log if it exists.
X
Xac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Xfor ac_option
Xdo
X  case "\$ac_option" in
X  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
X    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
X    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
X  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
X    echo "$CONFIG_STATUS generated by autoconf version 2.13 1.15-Schily"
X    exit 0 ;;
X  -help | --help | --hel | --he | --h)
X    echo "\$ac_cs_usage"; exit 0 ;;
X  *) echo "\$ac_cs_usage"; exit 1 ;;
X  esac
Xdone
X
Xac_given_srcdir=$srcdir
X
Xtrap 'rm -fr `echo "rules.cnf xconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X
X# Protect against being on the right side of a sed subst in config.status.
Xsed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
X s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
X$ac_vpsub
X$extrasub
Xs%@SHELL@%$SHELL%g
Xs%@CFLAGS@%$CFLAGS%g
Xs%@CPPFLAGS@%$CPPFLAGS%g
Xs%@CXXFLAGS@%$CXXFLAGS%g
Xs%@FFLAGS@%$FFLAGS%g
Xs%@DEFS@%$DEFS%g
Xs%@LDFLAGS@%$LDFLAGS%g
Xs%@LIBS@%$LIBS%g
Xs%@exec_prefix@%$exec_prefix%g
Xs%@prefix@%$prefix%g
Xs%@program_transform_name@%$program_transform_name%g
Xs%@bindir@%$bindir%g
Xs%@sbindir@%$sbindir%g
Xs%@libexecdir@%$libexecdir%g
Xs%@datadir@%$datadir%g
Xs%@sysconfdir@%$sysconfdir%g
Xs%@sharedstatedir@%$sharedstatedir%g
Xs%@localstatedir@%$localstatedir%g
Xs%@libdir@%$libdir%g
Xs%@includedir@%$includedir%g
Xs%@oldincludedir@%$oldincludedir%g
Xs%@infodir@%$infodir%g
Xs%@mandir@%$mandir%g
Xs%@host@%$host%g
Xs%@host_alias@%$host_alias%g
Xs%@host_cpu@%$host_cpu%g
Xs%@host_vendor@%$host_vendor%g
Xs%@host_os@%$host_os%g
Xs%@CC@%$CC%g
Xs%@OBJEXT@%$OBJEXT%g
Xs%@EXEEXT@%$EXEEXT%g
Xs%@XEXEEXT@%$XEXEEXT%g
Xs%@CPP@%$CPP%g
Xs%@CPPX@%$CPPX%g
Xs%@RANLIB@%$RANLIB%g
Xs%@SET_MAKE@%$SET_MAKE%g
Xs%@YACC@%$YACC%g
Xs%@BISON@%$BISON%g
Xs%@LIBOBJS@%$LIBOBJS%g
Xs%@ALLOCA@%$ALLOCA%g
Xs%@may_linux_src_include@%$may_linux_src_include%g
Xs%@largefile_cc_opt@%$largefile_cc_opt%g
Xs%@sun_cc64_opt@%$sun_cc64_opt%g
Xs%@hp_cc_ansi_opt@%$hp_cc_ansi_opt%g
Xs%@hp_cc_opt_opt@%$hp_cc_opt_opt%g
Xs%@hp_cc_gprof_opt@%$hp_cc_gprof_opt%g
Xs%@lib_crypt@%$lib_crypt%g
Xs%@lib_resolv@%$lib_resolv%g
Xs%@lib_intl@%$lib_intl%g
Xs%@lib_iconv@%$lib_iconv%g
Xs%@scsi_lib@%$scsi_lib%g
Xs%@lib_scsi@%$lib_scsi%g
Xs%@lib_acl@%$lib_acl%g
Xs%@lib_acl_test@%$lib_acl_test%g
Xs%@lib_attr@%$lib_attr%g
Xs%@lib_secdb@%$lib_secdb%g
Xs%@lib_gen@%$lib_gen%g
Xs%@lib_pthread@%$lib_pthread%g
Xs%@lib_rt@%$lib_rt%g
Xs%@lib_dl@%$lib_dl%g
Xs%@lib_dir@%$lib_dir%g
X
XCEOF
XEOF
X
Xcat >> $CONFIG_STATUS <<\EOF
X
X# Split the substitutions into bite-sized pieces for seds with
X# small command number limits, like on Digital OSF/1 and HP-UX.
Xac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
Xac_file=1 # Number of current file.
Xac_beg=1 # First line for current file.
Xac_end=$ac_max_sed_cmds # Line after last line for current file.
Xac_more_lines=:
Xac_sed_cmds=""
Xwhile $ac_more_lines; do
X  if test $ac_beg -gt 1; then
X    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
X  else
X    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
X  fi
X  if test ! -s conftest.s$ac_file; then
X    ac_more_lines=false
X    rm -f conftest.s$ac_file
X  else
X    if test -z "$ac_sed_cmds"; then
X      ac_sed_cmds="sed -f conftest.s$ac_file"
X    else
X      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
X    fi
X    ac_file=`expr $ac_file + 1`
X    ac_beg=$ac_end
X    ac_end=`expr $ac_end + $ac_max_sed_cmds`
X  fi
Xdone
Xif test -z "$ac_sed_cmds"; then
X  ac_sed_cmds=cat
Xfi
XEOF
X
Xcat >> $CONFIG_STATUS <<EOF
X
XCONFIG_FILES=\${CONFIG_FILES-"rules.cnf"}
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfor ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
X
X  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
X
X  # Remove last slash and all that follows it.  Not all systems have dirname.
X  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X    # The file is in a subdirectory.
X    test ! -d "$ac_dir" && mkdir "$ac_dir"
X    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
X    # A "../" for each directory in $ac_dir_suffix.
X    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
X  else
X    ac_dir_suffix= ac_dots=
X  fi
X
X  case "$ac_given_srcdir" in
X  .)  srcdir=.
X      if test -z "$ac_dots"; then top_srcdir=.
X      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
X  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
X  *) # Relative path.
X    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
X    top_srcdir="$ac_dots$ac_given_srcdir" ;;
X  esac
X
X
X  echo creating "$ac_file"
X  rm -f "$ac_file"
X  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
X  case "$ac_file" in
X  *Makefile*) ac_comsub="1i\\
X# $configure_input" ;;
X  *) ac_comsub= ;;
X  esac
X
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  sed -e "$ac_comsub
Xs%@configure_input@%$configure_input%g
Xs%@srcdir@%$srcdir%g
Xs%@top_srcdir@%$top_srcdir%g
X" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Xfi; done
Xrm -f conftest.s*
X
X# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
X# NAME is the cpp macro being defined and VALUE is the value it is being given.
X#
X# ac_d sets the value in "#define NAME VALUE" lines.
Xac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
Xac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
Xac_dC='\3'
Xac_dD='%g'
X# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Xac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_uB='\([ 	]\)%\1#\2define\3'
Xac_uC=' '
Xac_uD='\4%g'
X# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Xac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Xac_eB='$%\1#\2define\3'
Xac_eC=' '
Xac_eD='%g'
X
Xif test "${CONFIG_HEADERS+set}" != set; then
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X  CONFIG_HEADERS="xconfig.h"
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
Xfi
Xfor ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
X  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
X  case "$ac_file" in
X  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
X       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X  *) ac_file_in="${ac_file}.in" ;;
X  esac
X
X  echo creating $ac_file
X
X  rm -f conftest.frag conftest.in conftest.out
X  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
X  cat $ac_file_inputs > conftest.in
X
XEOF
X
X# Transform confdefs.h into a sed script conftest.vals that substitutes
X# the proper values into config.h.in to produce config.h.  And first:
X# Protect against being on the right side of a sed subst in config.status.
X# Protect against being in an unquoted here document in config.status.
Xrm -f conftest.vals
Xcat > conftest.hdr <<\EOF
Xs/[\\&%]/\\&/g
Xs%[\\$`]%\\&%g
Xs%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Xs%ac_d%ac_u%gp
Xs%ac_u%ac_e%gp
XEOF
Xsed -n -f conftest.hdr confdefs.h > conftest.vals
Xrm -f conftest.hdr
X
X# This sed command replaces #undef with comments.  This is necessary, for
X# example, in the case of _POSIX_SOURCE, which is predefined and required
X# on some systems where configure will not decide to define it.
Xcat >> conftest.vals <<\EOF
Xs%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
XEOF
X
X# Break up conftest.vals because some shells have a limit on
X# the size of here documents, and old seds have small limits too.
X
Xrm -f conftest.tail
Xwhile :
Xdo
X  ac_lines=`grep -c . conftest.vals`
X  # grep -c gives empty output for an empty file on some AIX systems.
X  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
X  # Write a limited-size here document to conftest.frag.
X  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
X  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
X  echo 'CEOF
X  sed -f conftest.frag conftest.in > conftest.out
X  rm -f conftest.in
X  mv conftest.out conftest.in
X' >> $CONFIG_STATUS
X  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
X  rm -f conftest.vals
X  mv conftest.tail conftest.vals
Xdone
Xrm -f conftest.vals
X
Xcat >> $CONFIG_STATUS <<\EOF
X  rm -f conftest.frag conftest.h
X  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
X  cat conftest.in >> conftest.h
X  rm -f conftest.in
X  if cmp -s $ac_file conftest.h 2>/dev/null; then
X    echo "$ac_file is unchanged"
X    rm -f conftest.h
X  else
X    # Remove last slash and all that follows it.  Not all systems have dirname.
X      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X      # The file is in a subdirectory.
X      test ! -d "$ac_dir" && mkdir "$ac_dir"
X    fi
X    rm -f $ac_file
X    mv conftest.h $ac_file
X  fi
Xfi; done
X
XEOF
Xcat >> $CONFIG_STATUS <<EOF
X
XEOF
Xcat >> $CONFIG_STATUS <<\EOF
X
Xexit 0
XEOF
Xchmod +x $CONFIG_STATUS
Xrm -fr confdefs* $ac_clean_files
Xtest "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
X
END-of-star-1.5.2/autoconf/configure
echo c - star-1.5.2/librmt
mkdir -p star-1.5.2/librmt > /dev/null 2>&1
echo x - star-1.5.2/librmt/Makefile
sed 's/^X//' >star-1.5.2/librmt/Makefile << 'END-of-star-1.5.2/librmt/Makefile'
X#ident "%W% %E% %Q%"
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= librmt.mk librmt_p.mk $(NO_SHL)shlrmt.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/librmt/Makefile
echo x - star-1.5.2/librmt/remote.c
sed 's/^X//' >star-1.5.2/librmt/remote.c << 'END-of-star-1.5.2/librmt/remote.c'
X/*#define	NO_LIBSCHILY*/
X/* @(#)remote.c	1.75 10/08/23 Copyright 1990-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)remote.c	1.75 10/08/23 Copyright 1990-2010 J. Schilling";
X#endif
X/*
X *	Remote tape client interface code
X *
X *	Copyright (c) 1990-2010 J. Schilling
X *
X *	TOTO:
X *		Signal handler for SIGPIPE
X *		check rmtaborted for exit() / clean abort of connection
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#if !defined(HAVE_FORK) || !defined(HAVE_SOCKETPAIR) || !defined(HAVE_DUP2)
X#undef	USE_RCMD_RSH
X#endif
X/*
X * We may work without getservbyname() if we restructure the code not to
X * use the port number if we only use _rcmdrsh().
X */
X#if !defined(HAVE_GETSERVBYNAME)
X#undef	USE_REMOTE				/* Cannot get rcmd() port # */
X#endif
X#if (!defined(HAVE_NETDB_H) || !defined(HAVE_RCMD)) && !defined(USE_RCMD_RSH)
X#undef	USE_REMOTE				/* There is no rcmd() */
X#endif
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/fcntl.h>
X#include <schily/ioctl.h>
X#include <schily/socket.h>
X#include <schily/errno.h>
X#include <schily/signal.h>
X#include <schily/netdb.h>
X#include <schily/pwd.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/utypes.h>
X#include <schily/mtio.h>
X#include <schily/librmt.h>
X#include <schily/schily.h>
X#include <schily/ctype.h>
X#include <schily/priv.h>
X
X#if	defined(SIGDEFER) || defined(SVR4)
X#define	signal	sigset
X#endif
X
X/*
X * On Cygwin, there are no privilleged ports.
X * On UNIX, rcmd() uses privilleged port that only work for root.
X */
X#if	defined(IS_CYGWIN) || defined(__MINGW32__)
X#define	privport_ok()	(1)
X#else
X#ifdef	HAVE_SOLARIS_PPRIV
X#define	privport_ok()	ppriv_ok()
X#else
X#define	privport_ok()	(geteuid() == 0)
X#endif
X#endif
X
X
X#ifdef	NO_LIBSCHILY
X
X/* >>>>>>>>>> Begin compatibility code for use without libschily <<<<<<<<<<< */
X/*
X * This code is needed for applications that like to use librmt but don't
X * link against libschily.
X *
X * A working vfprintf(), snprintf(), strerror(), memmove() and atoll() is
X * needed.
X * For this reason, the portability in this compilation mode is limited.
X */
X#include <schily/varargs.h>
X#define	geterrno()		(errno)
X#define	seterrno(err)		(errno = (err))
X#define	js_snprintf		snprintf
X#define	_niread			_lniread
X#define	_niwrite		_lniwrite
X#define	movebytes(f, t, n)	memmove((t), (f), (n))
X#define	astoll(s, np)		{*np = atoll(s); }
X#define	comerrno(e, s)		{_errmsgno(e, s); rmt_exit(e); }
X#define	errmsgno		_errmsgno
X#define	errmsgstr		strerror
X
XLOCAL	int _niread	__PR((int f, void *buf, int count));
XLOCAL	int _niwrite	__PR((int f, void *buf, int count));
XLOCAL	int errmsgno	__PR((int, const char *, ...));
X
XLOCAL int
X_niread(f, buf, count)
X	int	f;
X	void	*buf;
X	int	count;
X{
X	int ret;
X
X	while ((ret = read(f, buf, count)) < 0 && geterrno() == EINTR)
X		;
X	return (ret);
X}
X
XLOCAL int
X_niwrite(f, buf, count)
X	int	f;
X	void	*buf;
X	int	count;
X{
X	int ret;
X
X	while ((ret = write(f, buf, count)) < 0 && geterrno() == EINTR)
X		;
X	return (ret);
X}
X
X	/*
X	 * On UNIX errno is a small non-negative number, so we assume that
X	 * negative values cannot be a valid errno and don't print the error
X	 * string in this case. Note that this macro does not work on BeOS.
X	 */
X#define	silent_error(e)		((e) < 0)
X
X/* VARARGS2 */
XLOCAL int
X#ifdef	PROTOTYPES
Xerrmsgno(int err, const char *msg, ...)
X#else
Xerrmsgno(err, msg, va_alist)
X	int	err;
X	char	*msg;
X	va_dcl
X#endif
X{
X	va_list	args;
X	int	ret;
X	char	errbuf[20];
X	char	*errnam;
X
X	ret = fprintf(stderr, "librmt: ");
X	if (ret < 0)
X		return (ret);
X
X	if (!silent_error(err)) {
X		errnam = errmsgstr(err);
X		if (errnam == NULL) {
X			(void) js_snprintf(errbuf, sizeof (errbuf),
X						"Error %d", err);
X			errnam = errbuf;
X		}
X		ret = fprintf(stderr, "%s. ", errnam);
X		if (ret < 0)
X			return (ret);
X	}
X
X#ifdef	PROTOTYPES
X	va_start(args, msg);
X#else
X	va_start(args);
X#endif
X	ret = vfprintf(stderr, msg, args);
X	va_end(args);
X	return (ret);
X}
X
X/* >>>>>>>>>>> End compatibility code for use without libschily <<<<<<<<<<<< */
X
X#endif	/* NO_LIBSCHILY */
X
X#define	CMD_SIZE	80
X
XLOCAL	BOOL	rmt_debug;
XLOCAL	int	(*rmt_errmsgno)		__PR((int, const char *, ...))	= errmsgno;
XLOCAL	void	(*rmt_exit)		__PR((int))			= exit;
X
XEXPORT	void	rmtinit			__PR((int (*errmsgn)(int, const char *, ...),
X						void (*eexit)(int)));
XEXPORT	int	rmtdebug		__PR((int dlevel));
XEXPORT	char	*rmtfilename		__PR((char *name));
XEXPORT	char	*rmthostname		__PR((char *hostname, int hnsize, char *rmtspec));
XEXPORT	int	rmtgetconn		__PR((char *host, int trsize, int excode));
X
X#ifdef	USE_REMOTE
XLOCAL	void	rmtabrt			__PR((int sig));
XLOCAL	BOOL	okuser			__PR((char *name));
XLOCAL	void	rmtoflags		__PR((int fmode, char *cmode));
XEXPORT	int	rmtopen			__PR((int fd, char *fname, int fmode));
XEXPORT	int	rmtclose		__PR((int fd));
XEXPORT	int	rmtread			__PR((int fd, char *buf, int count));
XEXPORT	int	rmtwrite		__PR((int fd, char *buf, int count));
XEXPORT	off_t	rmtseek			__PR((int fd, off_t offset, int whence));
XEXPORT	int	rmtioctl		__PR((int fd, int cmd, int count));
XLOCAL	int	rmtmapold		__PR((int cmd));
XLOCAL	int	rmtmapnew		__PR((int cmd));
XLOCAL	Llong	rmtxgstatus		__PR((int fd, int cmd));
XLOCAL	int	rmt_v1_status		__PR((int fd, struct rmtget *mtp));
XLOCAL	int	rmt_v0_status		__PR((int fd, struct mtget *mtp));
XEXPORT	int	rmxtstatus		__PR((int fd, struct rmtget *mtp));
XEXPORT	int	rmtstatus		__PR((int fd, struct mtget *mtp));
XLOCAL	Llong	rmtcmd			__PR((int fd, char *name, char *cbuf));
XLOCAL	void	rmtsendcmd		__PR((int fd, char *name, char *cbuf));
XLOCAL	int	rmtfillrdbuf		__PR((int fd));
XLOCAL	int	rmtreadchar		__PR((int fd, char *cp));
XLOCAL	int	rmtreadbuf		__PR((int fd, char *buf, int count));
XLOCAL	int	rmtgetline		__PR((int fd, char *line, int count));
XLOCAL	Llong	rmtgetstatus		__PR((int fd, char *name));
XLOCAL	int	rmtaborted		__PR((int fd));
XEXPORT	void	_rmtg2mtg		__PR((struct mtget *mtp, struct rmtget *rmtp));
XEXPORT	int	_mtg2rmtg		__PR((struct rmtget *rmtp, struct mtget *mtp));
X#ifdef	USE_RCMD_RSH
XLOCAL	int	_rcmdrsh		__PR((char **ahost, int inport,
X						const char *locuser,
X						const char *remuser,
X						const char *cmd,
X						const char *rsh));
X#ifdef	HAVE_SOLARIS_PPRIV
XLOCAL	BOOL	ppriv_ok		__PR((void));
X#endif
X#endif
X
X#endif
X
XEXPORT void
Xrmtinit(errmsgn, eexit)
X	int	(*errmsgn) __PR((int, const char *, ...));
X	void	(*eexit)   __PR((int));
X{
X	rmt_errmsgno = errmsgn;
X	if (rmt_errmsgno == (int (*)  __PR((int, const char *, ...)))0)
X		rmt_errmsgno = errmsgno;
X
X	rmt_exit = eexit;
X	if (rmt_exit == (void (*) __PR((int)))0)
X		rmt_exit = exit;
X}
X
XEXPORT int
Xrmtdebug(dlevel)
X	int	dlevel;
X{
X	int	odebug = rmt_debug;
X
X	rmt_debug = dlevel;
X	return (odebug);
X}
X
XEXPORT char *
Xrmtfilename(name)
X	char	*name;
X{
X	char	*ret;
X
X	if (name[0] == '/')
X		return (NULL);		/* Absolut pathname cannot be remote */
X	if (name[0] == '.') {
X		if (name[1] == '/' || (name[1] == '.' && name[2] == '/'))
X			return (NULL);	/* Relative pathname cannot be remote */
X	}
X	if ((ret = strchr(name, ':')) != NULL) {
X		if (name[0] == ':') {
X			/*
X			 * This cannot be a remote filename as the host part
X			 * has zero length.
X			 */
X			return (NULL);
X		}
X		ret++;	/* Skip the colon. */
X	}
X	return (ret);
X}
X
XEXPORT char *
Xrmthostname(hostname, hnsize, rmtspec)
X		char	*hostname;
X	register int	hnsize;
X		char	*rmtspec;
X{
X	register int	i;
X	register char	*hp;
X	register char	*fp;
X	register char	*remfn;
X
X	if ((remfn = rmtfilename(rmtspec)) == NULL) {
X		hostname[0] = '\0';
X		return (NULL);
X	}
X	remfn--;
X	for (fp = rmtspec, hp = hostname, i = 1;
X			fp < remfn && i < hnsize; i++) {
X		*hp++ = *fp++;
X	}
X	*hp = '\0';
X	return (hostname);
X}
X
X#ifdef	USE_REMOTE
X
XEXPORT int
Xrmtgetconn(host, trsize, excode)
X	char	*host;		/* The host name to connect to		    */
X	int	trsize;		/* Max transfer size for SO_SNDBUF/SO_RCVBUF */
X	int	excode;		/* If != 0 use value to exit() in this func  */
X{
X	static	struct servent	*sp = 0;
X	static	struct passwd	*pw = 0;
X		char		*name = "root";
X		char		*p;
X		char		*rmt;
X		char		*rsh;
X		int		rmtsock;
X		char		*rmtpeer;
X		char		rmtuser[128];
X
X
X	signal(SIGPIPE, rmtabrt);
X	if (sp == 0) {
X		sp = getservbyname("shell", "tcp");
X		if (sp == 0) {
X			rmt_errmsgno(EX_BAD, "shell/tcp: unknown service\n");
X			if (excode)
X				rmt_exit(excode);
X			rmt_exit(EX_BAD);
X			return (-2);		/* exit function did not exit */
X		}
X		pw = getpwuid(getuid());
X		if (pw == 0) {
X			rmt_errmsgno(EX_BAD,
X				"who are you? No passwd entry found.\n");
X			if (excode)
X				rmt_exit(excode);
X			rmt_exit(EX_BAD);
X			return (-2);		/* exit function did not exit */
X		}
X	}
X	if ((p = strchr(host, '@')) != NULL) {
X		size_t d = p - host;
X
X		if (d > sizeof (rmtuser))
X			d = sizeof (rmtuser);
X		js_snprintf(rmtuser, sizeof (rmtuser), "%.*s",
X							(int)d, host);
X		if (! okuser(rmtuser)) {
X			if (excode)
X				rmt_exit(excode);
X			rmt_exit(EX_BAD);
X			return (-2);		/* exit function did not exit */
X		}
X		name = rmtuser;
X		host = &p[1];
X	} else {
X		name = pw->pw_name;
X	}
X	if (rmt_debug)
X		rmt_errmsgno(EX_BAD, "locuser: '%s' rmtuser: '%s' host: '%s'\n",
X						pw->pw_name, name, host);
X	rmtpeer = host;
X
X	if ((rmt = getenv("RMT")) == NULL)
X		rmt = "/etc/rmt";
X	rsh = getenv("RSH");
X
X#ifdef	USE_RCMD_RSH
X	if (!privport_ok() || rsh != NULL)
X		rmtsock = _rcmdrsh(&rmtpeer, (unsigned short)sp->s_port,
X					pw->pw_name, name, rmt, rsh);
X	else
X#endif
X#ifdef	HAVE_RCMD
X		rmtsock = rcmd(&rmtpeer, (unsigned short)sp->s_port,
X					pw->pw_name, name, rmt, 0);
X#else
X		rmtsock = _rcmdrsh(&rmtpeer, (unsigned short)sp->s_port,
X					pw->pw_name, name, rmt, rsh);
X#endif
X
X	if (rmtsock < 0)
X		return (-1);
X
X
X#ifdef	SO_SNDBUF
X	while (trsize > 512 &&
X		setsockopt(rmtsock, SOL_SOCKET, SO_SNDBUF,
X				(char *)&trsize, sizeof (trsize)) < 0) {
X		trsize -= 512;
X	}
X	if (rmt_debug)
X		rmt_errmsgno(EX_BAD, "sndsize: %d\n", trsize);
X#endif
X#ifdef	SO_RCVBUF
X	while (trsize > 512 &&
X		setsockopt(rmtsock, SOL_SOCKET, SO_RCVBUF,
X				(char *)&trsize, sizeof (trsize)) < 0) {
X		trsize -= 512;
X	}
X	if (rmt_debug)
X		rmt_errmsgno(EX_BAD, "rcvsize: %d\n", trsize);
X#endif
X
X	return (rmtsock);
X}
X
XLOCAL void
Xrmtabrt(sig)
X	int	sig;
X{
X	rmtaborted(-1);
X}
X
X/*
X * XXX Is such a function really needed?
X * XXX A similar function appeared on FreeBSD with a
X * XXX misterious change to dump(8)
X * XXX N.B. The FreeBSD function excludes '_' in addition.
X */
XLOCAL BOOL
Xokuser(name)
X	char	*name;
X{
X	register char	*p;
X	register Uchar	c;
X
X	for (p = name; *p; ) {
X		c = *p++;
X		if (!isascii(c) || !(isalnum(c) || c == '-')) {
X			rmt_errmsgno(EX_BAD, "invalid user name %s\n", name);
X			return (FALSE);
X		}
X	}
X	return (TRUE);
X}
X
XLOCAL void
Xrmtoflags(fmode, cmode)
X	int	fmode;
X	char	*cmode;
X{
X	register char	*p;
X	register int	amt;
X	register int	maxcnt = CMD_SIZE;
X
X	switch (fmode & O_ACCMODE) {
X
X	case O_RDONLY:	p = "O_RDONLY";	break;
X	case O_RDWR:	p = "O_RDWR";	break;
X	case O_WRONLY:	p = "O_WRONLY";	break;
X
X	default:	p = "Cannot Happen";
X	}
X	amt = js_snprintf(cmode, maxcnt, "%s", p);
X	if (amt < 0)
X		return;
X	p = cmode;
X	p += amt;
X	maxcnt -= amt;
X#ifdef	O_TEXT
X	if (fmode & O_TEXT) {
X		amt = js_snprintf(p, maxcnt, "|O_TEXT");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_NDELAY
X	if (fmode & O_NDELAY) {
X		amt = js_snprintf(p, maxcnt, "|O_NDELAY");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_APPEND
X	if (fmode & O_APPEND) {
X		amt = js_snprintf(p, maxcnt, "|O_APPEND");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_SYNC
X	if (fmode & O_SYNC) {
X		amt = js_snprintf(p, maxcnt, "|O_SYNC");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_DSYNC
X	if (fmode & O_DSYNC) {
X		amt = js_snprintf(p, maxcnt, "|O_DSYNC");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_RSYNC
X	if (fmode & O_RSYNC) {
X		amt = js_snprintf(p, maxcnt, "|O_RSYNC");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_NONBLOCK
X	if (fmode & O_NONBLOCK) {
X		amt = js_snprintf(p, maxcnt, "|O_NONBLOCK");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_PRIV
X	if (fmode & O_PRIV) {
X		amt = js_snprintf(p, maxcnt, "|O_PRIV");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_LARGEFILE
X	if (fmode & O_LARGEFILE) {
X		amt = js_snprintf(p, maxcnt, "|O_LARGEFILE");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_CREAT
X	if (fmode & O_CREAT) {
X		amt = js_snprintf(p, maxcnt, "|O_CREAT");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_TRUNC
X	if (fmode & O_TRUNC) {
X		amt = js_snprintf(p, maxcnt, "|O_TRUNC");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_EXCL
X	if (fmode & O_EXCL) {
X		amt = js_snprintf(p, maxcnt, "|O_EXCL");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X#ifdef	O_NOCTTY
X	if (fmode & O_NOCTTY) {
X		amt = js_snprintf(p, maxcnt, "|O_NOCTTY");
X		if (amt < 0)
X			return;
X		p += amt;
X		maxcnt -= amt;
X	}
X#endif
X}
X
XEXPORT int
Xrmtopen(fd, fname, fmode)
X	int	fd;
X	char	*fname;
X	int	fmode;
X{
X	char	cbuf[4096+CMD_SIZE];
X	char	cmode[CMD_SIZE];
X	int	ret;
X
X	/*
X	 * Convert all fmode bits into the symbolic fmode.
X	 * only send the lowest 2 bits in numeric mode as it would be too
X	 * dangerous because the apropriate bits differ between different
X	 * operating systems.
X	 */
X	rmtoflags(fmode, cmode);
X	ret = js_snprintf(cbuf, sizeof (cbuf), "O%s\n%d %s\n",
X				fname, fmode & O_ACCMODE, cmode);
X	if (ret < 0 || ret >= sizeof (cbuf)) {
X#ifdef	ENAMETOOLONG
X		seterrno(ENAMETOOLONG);
X#else
X		seterrno(EINVAL);
X#endif
X		return (-1);
X	}
X	ret = rmtcmd(fd, "open", cbuf);
X	if (ret < 0)
X		return (ret);
X
X	/*
X	 * Tell the rmt server that we are aware of Version 1 commands.
X	 */
X	(void) rmtioctl(fd, RMTIVERSION, 0);
X
X	return (ret);
X}
X
XEXPORT int
Xrmtclose(fd)
X	int	fd;
X{
X	return (rmtcmd(fd, "close", "C\n"));
X}
X
X/*
X * Check all our callers once we make "count" size_t
X */
XEXPORT int
Xrmtread(fd, buf, count)
X	int	fd;
X	char	*buf;
X	int	count;
X{
X	char	cbuf[CMD_SIZE];
X	int	n;
X	int	amt = 0;
X
X	n = js_snprintf(cbuf, CMD_SIZE, "R%d\n", count);
X	if (n < 0 || n >= CMD_SIZE) {				/* Paranoia */
X		seterrno(EINVAL);
X		return (-1);
X	}
X	n = rmtcmd(fd, "read", cbuf);
X	if (n < 0)
X		return (-1);
X
X	/*
X	 * Nice idea from disassembling Solaris ufsdump...
X	 */
X	if (n > count) {
X		rmt_errmsgno(EX_BAD,
X			"rmtread: expected response size %d, got %d\n",
X			count, n);
X		rmt_errmsgno(EX_BAD,
X			"This means the remote rmt daemon is not compatible.\n");
X		return (rmtaborted(fd));
X		/*
X		 * XXX Should we better abort (exit) here?
X		 */
X	}
X	amt = rmtreadbuf(fd, buf, n);
X
X	return (amt);
X}
X
X/*
X * Check all our callers once we make "count" size_t
X */
XEXPORT int
Xrmtwrite(fd, buf, count)
X	int	fd;
X	char	*buf;
X	int	count;
X{
X	char	cbuf[CMD_SIZE];
X	int	n;
X
X	n = js_snprintf(cbuf, CMD_SIZE, "W%d\n", count);
X	if (n < 0 || n >= CMD_SIZE) {				/* Paranoia */
X		seterrno(EINVAL);
X		return (-1);
X	}
X	rmtsendcmd(fd, "write", cbuf);
X	if (_niwrite(fd, buf, count) != count)
X		rmtaborted(fd);
X	return (rmtgetstatus(fd, "write"));
X}
X
XEXPORT off_t
Xrmtseek(fd, offset, whence)
X	int	fd;
X	off_t	offset;
X	int	whence;
X{
X	char	cbuf[CMD_SIZE];
X	int	n;
X
X	switch (whence) {
X
X	case SEEK_SET: whence = 0; break;
X	case SEEK_CUR: whence = 1; break;
X	case SEEK_END: whence = 2; break;
X#ifdef	SEEK_DATA
X	case SEEK_DATA: whence = 3; break;
X#endif
X#ifdef	SEEK_HOLE
X	case SEEK_HOLE: whence = 4; break;
X#endif
X
X	default:
X		seterrno(EINVAL);
X		return (-1);
X	}
X
X	n = js_snprintf(cbuf, CMD_SIZE, "L%lld\n%d\n", (Llong)offset, whence);
X	if (n < 0 || n >= CMD_SIZE) {				/* Paranoia */
X		seterrno(EINVAL);
X		return (-1);
X	}
X	return ((off_t)rmtcmd(fd, "seek", cbuf));
X}
X
XEXPORT int
Xrmtioctl(fd, cmd, count)
X	int	fd;
X	int	cmd;
X	int	count;
X{
X	char	cbuf[CMD_SIZE];
X	char	c = 'I';
X	int	rmtversion = RMT_NOVERSION;
X	int	i;
X
X	if (cmd != RMTIVERSION)
X		rmtversion = rmtioctl(fd, RMTIVERSION, 0);
X
X	if (cmd >= 0 && (rmtversion == RMT_VERSION)) {
X		/*
X		 * Opcodes 0..7 are unique across different architectures.
X		 * But as in many cases Linux does not even follow this rule.
X		 * If we know that we are calling a VERSION 1 client, we may
X		 * safely assume that the client is not using Linux mapping
X		 * but the standard mapping.
X		 */
X		i = rmtmapold(cmd);
X		if (cmd <= 7 && i  < 0) {
X			/*
X			 * We cannot map the current command but it's value is
X			 * within the range 0..7. Do not send it over the wire.
X			 */
X			seterrno(EINVAL);
X			return (-1);
X		}
X		if (i >= 0)
X			cmd = i;
X	}
X	if (cmd > 7 && (rmtversion == RMT_VERSION)) {
X		i = rmtmapnew(cmd);
X		if (i >= 0) {
X			cmd = i;
X			c = 'i';
X		}
X	}
X
X	i = js_snprintf(cbuf, CMD_SIZE, "%c%d\n%d\n", c, cmd, count);
X	if (i < 0 || i >= CMD_SIZE) {				/* Paranoia */
X		seterrno(EINVAL);
X		return (-1);
X	}
X	return (rmtcmd(fd, "ioctl", cbuf));
X}
X
X/*
X * Map all old opcodes that should be in range 0..7 to numbers /etc/rmt expects
X * This is needed because Linux does not follow the UNIX conventions.
X */
XLOCAL int
Xrmtmapold(cmd)
X	int	cmd;
X{
X	switch (cmd) {
X
X#ifdef	MTWEOF
X	case  MTWEOF:	return (0);
X#endif
X
X#ifdef	MTFSF
X	case MTFSF:	return (1);
X#endif
X
X#ifdef	MTBSF
X	case MTBSF:	return (2);
X#endif
X
X#ifdef	MTFSR
X	case MTFSR:	return (3);
X#endif
X
X#ifdef	MTBSR
X	case MTBSR:	return (4);
X#endif
X
X#ifdef	MTREW
X	case MTREW:	return (5);
X#endif
X
X#ifdef	MTOFFL
X	case MTOFFL:	return (6);
X#endif
X
X#ifdef	MTNOP
X	case MTNOP:	return (7);
X#endif
X	}
X	return (-1);
X}
X
X/*
X * Map all new opcodes that should be in range above 7 to the
X * values expected by the 'i' command of /etc/rmt.
X */
XLOCAL int
Xrmtmapnew(cmd)
X	int	cmd;
X{
X	switch (cmd) {
X
X#ifdef	MTCACHE
X	case MTCACHE:	return (RMTICACHE);
X#endif
X
X#ifdef	MTNOCACHE
X	case MTNOCACHE:	return (RMTINOCACHE);
X#endif
X
X#ifdef	MTRETEN
X	case MTRETEN:	return (RMTIRETEN);
X#endif
X
X#ifdef	MTERASE
X	case MTERASE:	return (RMTIERASE);
X#endif
X
X#ifdef	MTEOM
X	case MTEOM:	return (RMTIEOM);
X#endif
X
X#ifdef	MTNBSF
X	case MTNBSF:	return (RMTINBSF);
X#endif
X	}
X	return (-1);
X}
X
X/*
X * Get one (single) member of struct mtget from remote
X */
XLOCAL Llong
Xrmtxgstatus(fd, cmd)
X	int	fd;
X	char	cmd;
X{
X	char	cbuf[CMD_SIZE];
X	int	n;
X
X			/* No newline */
X	n = js_snprintf(cbuf, CMD_SIZE, "s%c", cmd);
X	if (n < 0 || n >= CMD_SIZE) {				/* Paranoia */
X		seterrno(EINVAL);
X		return (-1);
X	}
X	seterrno(0);
X	return (rmtcmd(fd, "extended status", cbuf));
X}
X
XLOCAL int
Xrmt_v1_status(fd, mtp)
X	int		fd;
X	struct  rmtget	*mtp;
X{
X	mtp->mt_xflags	= 0;
X
X	mtp->mt_erreg	= rmtxgstatus(fd, MTS_ERREG); /* must be first */
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_ERREG;
X
X	mtp->mt_type	= rmtxgstatus(fd, MTS_TYPE);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_TYPE;
X
X	mtp->mt_dsreg	= rmtxgstatus(fd, MTS_DSREG);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_DSREG;
X
X	mtp->mt_resid	= rmtxgstatus(fd, MTS_RESID);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_RESID;
X
X	mtp->mt_fileno	= rmtxgstatus(fd, MTS_FILENO);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_FILENO;
X
X	mtp->mt_blkno	= rmtxgstatus(fd, MTS_BLKNO);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_BLKNO;
X
X	mtp->mt_flags	= rmtxgstatus(fd, MTS_FLAGS);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_FLAGS;
X
X	mtp->mt_bf	= rmtxgstatus(fd, MTS_BF);
X	if (geterrno() == 0)
X		mtp->mt_xflags |= RMT_BF;
X
X	if (mtp->mt_xflags == 0)
X		return (-1);
X
X	return (0);
X}
X
XLOCAL int
Xrmt_v0_status(fd, mtp)
X	int		fd;
X	struct  mtget	*mtp;
X{
X	register int i;
X	register char *cp;
X	char	c;
X	int	n;
X
X				/* No newline */
X	if ((n = rmtcmd(fd, "status", "S")) < 0)
X		return (-1);
X
X	/*
X	 * From disassembling Solaris ufsdump, they seem to check
X	 * only if (n > sizeof (mts)).
X	 */
X	if (n != sizeof (struct mtget)) {
X		rmt_errmsgno(EX_BAD,
X			"rmtstatus: expected response size %d, got %d\n",
X			(int)sizeof (struct mtget), n);
X		rmt_errmsgno(EX_BAD,
X			"This means the remote rmt daemon is not compatible.\n");
X		/*
X		 * XXX should we better abort here?
X		 */
X	}
X
X	for (i = 0, cp = (char *)mtp; i < sizeof (struct mtget); i++)
X		*cp++ = 0;
X	for (i = 0, cp = (char *)mtp; i < n; i++) {
X		/*
X		 * Make sure to read all bytes because we otherwise
X		 * would confuse the protocol. Do not copy more
X		 * than the size of our local struct mtget.
X		 */
X		if (rmtreadchar(fd, &c) != 1)
X			return (rmtaborted(fd));
X
X		if (i < sizeof (struct mtget))
X			*cp++ = c;
X	}
X	/*
X	 * The GNU remote tape lib tries to swap the structure based on the
X	 * value of mt_type. While this makes sense for UNIX, it will not
X	 * work if one system is running Linux. The Linux mtget structure
X	 * is completely incompatible (mt_type is long instead of short).
X	 */
X	return (n);
X}
X
XEXPORT int
Xrmtxstatus(fd, mtp)
X	int		fd;
X	struct  rmtget	*mtp;
X{
X	struct  mtget	mtget;
X
X	if (rmtioctl(fd, RMTIVERSION, 0) == RMT_VERSION)
X		return (rmt_v1_status(fd, mtp));
X
X	if (rmt_v0_status(fd, &mtget) < 0)
X		return (-1);
X
X	if (_mtg2rmtg(mtp, &mtget) < 0)
X		return (-1);
X	return (0);
X}
X
XEXPORT int
Xrmtstatus(fd, mtp)
X	int		fd;
X	struct  mtget	*mtp;
X{
X	struct  rmtget	rmtget;
X	int	ret = -1;
X
X	if (rmtioctl(fd, RMTIVERSION, 0) == RMT_VERSION) {
X		ret = rmt_v1_status(fd, &rmtget);
X		if (ret < 0)
X			return (ret);
X	} else {
X		if (rmt_debug) {
X			rmt_errmsgno(EX_BAD,
X				"Retrieving mt status from old server.\n");
X		}
X		return (rmt_v0_status(fd, mtp));
X	}
X
X	_rmtg2mtg(mtp, &rmtget);
X	return (ret);
X}
X
XLOCAL Llong
Xrmtcmd(fd, name, cbuf)
X	int	fd;
X	char	*name;
X	char	*cbuf;
X{
X	rmtsendcmd(fd, name, cbuf);
X	return (rmtgetstatus(fd, name));
X}
X
XLOCAL void
Xrmtsendcmd(fd, name, cbuf)
X	int	fd;
X	char	*name;
X	char	*cbuf;
X{
X	int	buflen = strlen(cbuf);
X
X	seterrno(0);
X	if (_niwrite(fd, cbuf, buflen) != buflen)
X		rmtaborted(fd);
X}
X
X#define	READB_SIZE	128
XLOCAL	char		readb[READB_SIZE];
XLOCAL	char		*readbptr;
XLOCAL	int		readbcnt;
X
XLOCAL int
Xrmtfillrdbuf(fd)
X	int	fd;
X{
X	readbptr = readb;
X
X	return (readbcnt = _niread(fd, readb, READB_SIZE));
X}
X
XLOCAL int
Xrmtreadchar(fd, cp)
X	int	fd;
X	char	*cp;
X{
X	if (--readbcnt < 0) {
X		if (rmtfillrdbuf(fd) <= 0)
X			return (readbcnt);
X		--readbcnt;
X	}
X	*cp = *readbptr++;
X	return (1);
X}
X
XLOCAL int
Xrmtreadbuf(fd, buf, count)
X	register int	fd;
X	register char	*buf;
X	register int	count;
X{
X	register int	amt = 0;
X	register int	cnt;
X
X	if (readbcnt > 0) {
X		cnt = readbcnt;
X		if (cnt > count)
X			cnt = count;
X		movebytes(readbptr, buf, cnt);
X		readbptr += cnt;
X		readbcnt -= cnt;
X		amt += cnt;
X	}
X	while (amt < count) {
X		if ((cnt = _niread(fd, &buf[amt], count - amt)) <= 0) {
X			return (rmtaborted(fd));
X		}
X		amt += cnt;
X	}
X	return (amt);
X}
X
XLOCAL int
Xrmtgetline(fd, line, count)
X	int	fd;
X	char	*line;
X	int	count;
X{
X	register char	*cp;
X
X	for (cp = line; cp < &line[count]; cp++) {
X		if (rmtreadchar(fd, cp) != 1)
X			return (rmtaborted(fd));
X
X		if (*cp == '\n') {
X			*cp = '\0';
X			return (cp - line);
X		}
X	}
X	if (rmt_debug)
X		rmt_errmsgno(EX_BAD, "Protocol error (in rmtgetline).\n");
X	return (rmtaborted(fd));
X}
X
XLOCAL Llong
Xrmtgetstatus(fd, name)
X	int	fd;
X	char	*name;
X{
X	char	cbuf[CMD_SIZE];
X	char	code;
X	Llong	number;
X
X	rmtgetline(fd, cbuf, sizeof (cbuf));
X	code = cbuf[0];
X	astoll(&cbuf[1], &number);
X
X	if (code == 'E' || code == 'F') {
X		rmtgetline(fd, cbuf, sizeof (cbuf));
X		if (code == 'F')	/* should close file ??? */
X			rmtaborted(fd);
X		if (rmt_debug)
X			rmt_errmsgno(number, "Remote status(%s): %lld '%s'.\n",
X							name, number, cbuf);
X		seterrno(number);
X		return ((Llong)-1);
X	}
X	if (code != 'A') {
X		/* XXX Hier kommt evt Command not found ... */
X		if (rmt_debug) {
X			rmt_errmsgno(EX_BAD, "Protocol error (got %s).\n",
X									cbuf);
X		}
X		return (rmtaborted(fd));
X	}
X	return (number);
X}
X
XLOCAL int
Xrmtaborted(fd)
X	int	fd;
X{
X	if (rmt_debug)
X		rmt_errmsgno(EX_BAD, "Lost connection to remote host ??\n");
X	/* if fd >= 0 */
X	/* close file */
X	if (geterrno() == 0) {
X		/*
X		 * BSD used EIO but EPIPE is better for something like
X		 * sdd -noerror
X		 */
X		seterrno(EPIPE);
X	}
X	/*
X	 * BSD uses exit(X_ABORT) == 3, we return(-1) and let the caller decide
X	 */
X	return (-1);
X}
X
X#else	/* USE_REMOTE */
X
X/* ARGSUSED */
XEXPORT int
Xrmtgetconn(host, trsize, excode)
X	char	*host;		/* The host name to connect to		    */
X	int	trsize;		/* Max transfer size for SO_SNDBUF/SO_RCVBUF */
X	int	excode;		/* If != 0 use value to exit() in this func  */
X{
X	rmt_errmsgno(EX_BAD, "Remote tape support not present.\n");
X
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtopen(fd, fname, fmode)
X	int	fd;
X	char	*fname;
X	int	fmode;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtclose(fd)
X	int	fd;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtread(fd, buf, count)
X	int	fd;
X	char	*buf;
X	int	count;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtwrite(fd, buf, count)
X	int	fd;
X	char	*buf;
X	int	count;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT off_t
Xrmtseek(fd, offset, whence)
X	int	fd;
X	off_t	offset;
X	int	whence;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtioctl(fd, cmd, count)
X	int	fd;
X	int	cmd;
X	int	count;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtxstatus(fd, mtp)
X	int		fd;
X	struct  rmtget	*mtp;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X/* ARGSUSED */
XEXPORT int
Xrmtstatus(fd, mtp)
X	int		fd;
X	struct  mtget	*mtp;
X{
X#ifdef	ENOSYS
X	seterrno(ENOSYS);
X#else
X	seterrno(EINVAL);
X#endif
X	return (-1);
X}
X
X#endif	/* USE_REMOTE */
X
X
X
XEXPORT void
X_rmtg2mtg(mtp, rmtp)
X	struct  mtget	*mtp;
X	struct  rmtget	*rmtp;
X{
X#ifdef	HAVE_MTGET_TYPE
X	if (rmtp->mt_xflags & RMT_TYPE)
X		mtp->mt_type   = rmtp->mt_type;
X	else
X		mtp->mt_type   = 0;
X#endif
X#ifdef	HAVE_MTGET_DSREG
X	if (rmtp->mt_xflags & RMT_DSREG)
X		mtp->mt_dsreg  = rmtp->mt_dsreg;
X	else
X		mtp->mt_dsreg  = 0;
X#endif
X#ifdef	HAVE_MTGET_ERREG
X	if (rmtp->mt_xflags & RMT_ERREG)
X		mtp->mt_erreg  = rmtp->mt_erreg;
X	else
X		mtp->mt_erreg  = 0;
X#endif
X#ifdef	HAVE_MTGET_RESID
X	if (rmtp->mt_xflags & RMT_RESID)
X		mtp->mt_resid  = rmtp->mt_resid;
X	else
X		mtp->mt_resid  = 0;
X#endif
X#ifdef	HAVE_MTGET_FILENO
X	if (rmtp->mt_xflags & RMT_FILENO)
X		mtp->mt_fileno	= rmtp->mt_fileno;
X	else
X		mtp->mt_fileno	= -1;
X#endif
X#ifdef	HAVE_MTGET_BLKNO
X	if (rmtp->mt_xflags & RMT_BLKNO)
X		mtp->mt_blkno  = rmtp->mt_blkno;
X	else
X		mtp->mt_blkno	= -1;
X#endif
X#ifdef	HAVE_MTGET_FLAGS
X	if (rmtp->mt_xflags & RMT_FLAGS)
X		mtp->mt_flags	= rmtp->mt_flags;
X	else
X		mtp->mt_flags	= 0;
X#endif
X#ifdef	HAVE_MTGET_BF
X	if (rmtp->mt_xflags & RMT_BF)
X		mtp->mt_bf	= rmtp->mt_bf;
X	else
X		mtp->mt_bf	= 0;
X#endif
X}
X
XEXPORT int
X_mtg2rmtg(rmtp, mtp)
X	struct  rmtget	*rmtp;
X	struct  mtget	*mtp;
X{
X	rmtp->mt_xflags	= 0;
X
X#ifdef	HAVE_MTGET_TYPE
X	rmtp->mt_xflags	|= RMT_TYPE;
X	rmtp->mt_type	 = mtp->mt_type;
X#else
X	rmtp->mt_type	 = 0;
X#endif
X#ifdef	HAVE_MTGET_DSREG
X	rmtp->mt_xflags	|= RMT_DSREG;
X	rmtp->mt_dsreg	 = mtp->mt_dsreg;
X#else
X	rmtp->mt_dsreg	 = 0;
X#endif
X#ifdef	HAVE_MTGET_ERREG
X	rmtp->mt_xflags	|= RMT_ERREG;
X	rmtp->mt_erreg	 = mtp->mt_erreg;
X#else
X	rmtp->mt_erreg	 = 0;
X#endif
X#ifdef	HAVE_MTGET_RESID
X	rmtp->mt_xflags	|= RMT_RESID;
X	rmtp->mt_resid	 = mtp->mt_resid;
X#else
X	rmtp->mt_resid	 = 0;
X#endif
X#ifdef	HAVE_MTGET_FILENO
X	rmtp->mt_xflags	|= RMT_FILENO;
X	rmtp->mt_fileno	 = mtp->mt_fileno;
X#else
X	rmtp->mt_fileno	 = -1;
X#endif
X#ifdef	HAVE_MTGET_BLKNO
X	rmtp->mt_xflags	|= RMT_BLKNO;
X	rmtp->mt_blkno	 = mtp->mt_blkno;
X#else
X	rmtp->mt_blkno	 = -1;
X#endif
X#ifdef	HAVE_MTGET_FLAGS
X	rmtp->mt_xflags	|= RMT_FLAGS;
X	rmtp->mt_flags	 = mtp->mt_flags;
X#else
X	rmtp->mt_flags	 = 0;
X#endif
X#ifdef	HAVE_MTGET_BF
X	rmtp->mt_xflags |= RMT_BF;
X	rmtp->mt_bf	 = mtp->mt_bf;
X#else
X	rmtp->mt_bf	 = 0;
X#endif
X	if (rmtp->mt_xflags == 0)
X		return (-1);
X
X	rmtp->mt_xflags	|= RMT_COMPAT;
X	return (0);
X}
X
X/* -------------------------------------------------------------------------- */
X#ifdef	USE_REMOTE
X#ifdef	USE_RCMD_RSH
X/*
X * If we make a separate file for libschily, we would need these include files:
X *
X * socketpair():	sys/types.h + sys/socket.h
X * dup2():		schily/unistd.h (hat auch sys/types.h)
X * strrchr():		schily/string.h
X *
X * and make sure that we use sigset() instead of signal() if possible.
X */
X#include <schily/wait.h>
XLOCAL int
X_rcmdrsh(ahost, inport, locuser, remuser, cmd, rsh)
X	char		**ahost;
X	int		inport;		/* port is ignored */
X	const char	*locuser;
X	const char	*remuser;
X	const char	*cmd;
X	const char	*rsh;
X{
X	struct passwd	*pw;
X	int	pp[2];
X	int	pid;
X
X	if (rsh == 0)
X		rsh = "rsh";
X
X	/*
X	 * Verify that 'locuser' is present on local host.
X	 */
X	if ((pw = getpwnam(locuser)) == NULL) {
X		rmt_errmsgno(EX_BAD, "Unknown user: %s\n", locuser);
X		return (-1);
X	}
X	/* XXX Check the existence for 'ahost' here? */
X
X	/*
X	 * rcmd(3) creates a single socket to be used for communication.
X	 * We need a bi-directional pipe to implement the same interface.
X	 * On newer OS that implement bi-directional we could use pipe(2)
X	 * but it makes no sense unless we find an OS that implements a
X	 * bi-directional pipe(2) but no socketpair().
X	 */
X	if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pp) == -1) {
X		rmt_errmsgno(geterrno(), "Cannot create socketpair.\n");
X		return (-1);
X	}
X
X	pid = fork();
X	if (pid < 0) {
X		return (-1);
X	} else if (pid == 0) {
X		const char	*p;
X		const char	*av0;
X		int		xpid;
X
X		(void) close(pp[0]);
X		if (dup2(pp[1], 0) == -1 ||	/* Pipe becomes 'stdin'  */
X		    dup2(0, 1) == -1) {		/* Pipe becomes 'stdout' */
X
X			rmt_errmsgno(geterrno(), "dup2 failed.\n");
X			_exit(EX_BAD);
X			/* NOTREACHED */
X		}
X		(void) close(pp[1]);		/* We don't need this anymore */
X
X		/*
X		 * Become 'locuser' to tell the rsh program the local user id.
X		 */
X		if (getuid() != pw->pw_uid &&
X		    setuid(pw->pw_uid) == -1) {
X			rmt_errmsgno(geterrno(), "setuid(%lld) failed.\n",
X							(Llong)pw->pw_uid);
X			_exit(EX_BAD);
X			/* NOTREACHED */
X		}
X		if (getuid() != geteuid() &&
X#ifdef	HAVE_SETREUID
X		    setreuid(-1, pw->pw_uid) == -1) {
X#else
X#ifdef	HAVE_SETEUID
X		    seteuid(pw->pw_uid) == -1) {
X#else
X		    setuid(pw->pw_uid) == -1) {
X#endif
X#endif
X			errmsg("seteuid(%lld) failed.\n",
X							(Llong)pw->pw_uid);
X			_exit(EX_BAD);
X			/* NOTREACHED */
X		}
X
X		/*
X		 * Fork again to completely detach from parent
X		 * and avoid the need to wait(2).
X		 */
X		if ((xpid = fork()) == -1) {
X			rmt_errmsgno(geterrno(),
X				"rcmdsh: fork to lose parent failed.\n");
X			_exit(EX_BAD);
X			/* NOTREACHED */
X		}
X		if (xpid > 0) {
X			_exit(0);
X			/* NOTREACHED */
X		}
X
X		/*
X		 * Always use remote shell programm (even for localhost).
X		 * The client command may call getpeername() for security
X		 * reasons and this would fail on a simple pipe.
X		 */
X
X
X		/*
X		 * By default, 'rsh' handles terminal created signals
X		 * but this is not what we like.
X		 * For this reason, we tell 'rsh' to ignore these signals.
X		 * Ignoring these signals is important to allow 'star' / 'sdd'
X		 * to e.g. implement SIGQUIT as signal to trigger intermediate
X		 * status printing.
X		 *
X		 * For now (late 2002), we know that the following programs
X		 * are broken and do not implement signal handling correctly:
X		 *
X		 *	rsh	on SunOS-5.0...SunOS-5.9
X		 *	ssh	from ssh.com
X		 *	ssh	from openssh.org
X		 *
X		 * Sun already did accept a bug report for 'rsh'. For the ssh
X		 * commands we need to send out bug reports. Meanwhile it could
X		 * help to call setsid() if we are running under X so the ssh
X		 * X pop up for passwd reading will work.
X		 */
X		signal(SIGINT, SIG_IGN);
X		signal(SIGQUIT, SIG_IGN);
X#ifdef	SIGTSTP
X		signal(SIGTSTP, SIG_IGN); /* We would not be able to continue */
X#endif
X
X		av0 = rsh;
X		if ((p = strrchr(rsh, '/')) != NULL)
X			av0 = ++p;
X		execlp(rsh, av0, *ahost, "-l", remuser, cmd, (char *)NULL);
X
X		rmt_errmsgno(geterrno(), "execlp '%s' failed.\n", rsh);
X		_exit(EX_BAD);
X		/* NOTREACHED */
X	} else {
X		(void) close(pp[1]);
X		/*
X		 * Wait for the intermediate child.
X		 * The real 'rsh' program is completely detached from us.
X		 */
X		wait(0);
X		return (pp[0]);
X	}
X	return (-1);	/* keep gcc happy */
X}
X
X#ifdef	HAVE_SOLARIS_PPRIV
X
XLOCAL BOOL
Xppriv_ok()
X{
X	priv_set_t	*privset;
X	BOOL		net_privaddr = FALSE;
X
X
X	if ((privset = priv_allocset()) == NULL) {
X		return (FALSE);
X	}
X	if (getppriv(PRIV_EFFECTIVE, privset) == -1) {
X		priv_freeset(privset);
X		return (FALSE);
X	}
X	if (priv_ismember(privset, PRIV_NET_PRIVADDR)) {
X		net_privaddr = TRUE;
X	}
X	priv_freeset(privset);
X
X	return (net_privaddr);
X}
X#endif	/* HAVE_SOLARIS_PPRIV */
X
X#endif	/* USE_RCMD_RSH */
X#endif	/* USE_REMOTE */
END-of-star-1.5.2/librmt/remote.c
echo x - star-1.5.2/librmt/librmt.mk
sed 's/^X//' >star-1.5.2/librmt/librmt.mk << 'END-of-star-1.5.2/librmt/librmt.mk'
X#ident @(#)librmt.mk	1.4 11/04/15 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	rmt
XCPPOPTS +=	-DUSE_REMOTE
XCPPOPTS +=	-DUSE_RCMD_RSH
XCPPOPTS +=	-DUSE_LARGEFILES
Xinclude		Targets
XLIBS=		
XXMK_FILE=	Makefile.man rmtinit.mk3 rmtdebug.mk3 \
X		rmtfilename.mk3 rmthostname.mk3 \
X		rmtgetconn.mk3 \
X		rmtopen.mk3 rmtclose.mk3 \
X		rmtread.mk3 rmtwrite.mk3 rmtseek.mk3 rmtioctl.mk3 \
X		rmtstatus.mk3 rmtxstatus.mk3 mtg2rmtg.mk3 rmtg2mtg.mk3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
X#CC=		echo "	==> COMPILING \"$@\""; cc
X###########################################################################
X
END-of-star-1.5.2/librmt/librmt.mk
echo x - star-1.5.2/librmt/Targets
sed 's/^X//' >star-1.5.2/librmt/Targets << 'END-of-star-1.5.2/librmt/Targets'
XCFILES=		remote.c
END-of-star-1.5.2/librmt/Targets
echo x - star-1.5.2/librmt/librmt.3
sed 's/^X//' >star-1.5.2/librmt/librmt.3 << 'END-of-star-1.5.2/librmt/librmt.3'
X. \" @(#)librmt.3	1.3 08/10/12 Copyr 2002 J. Schilling
X. \" Manual page for librmt
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH LIBRMT 3L "08/10/12" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS"
X.SH NAME
Xlibrmt \- remote magtape protocol client interface library
X.SH SYNOPSIS
X.LP
X.B cc
X.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
X.B \-lrmt
X.B \-lsocket
X.B \-lnsl
X.RI "[ " "library" " \|.\|.\|. ]"
X.LP
X.B
X#include <schily/librmt.h>
X.SH DESCRIPTION
X.LP
XFunctions in this library provide an interface to a remote tape server program.
X.LP
XThis implementation takes care of
X.B RMT protocol VERSION 1 
X
X.SH ENVIRONMENT
X.LP
X.TP
X.B RSH
XIf the 
X.B RSH
Xenvironment is present, the remote connection will not be created via
X.BR rcmd (3)
Xbut by calling the program pointed to by
X.BR RSH .
XUse e.g. 
X.BR RSH= /usr/bin/ssh
Xto create a secure shell connection.
X.TP
X.B RMT
XIf the 
X.B RMT
Xenvironment is present, the remote tape server will not be the program
X.B /etc/rmt
Xbut the program pointed to by
X.BR RMT .
XNote that the remote tape server program name will be ignored if you log in
Xusing an account that has been created with a remote tape server program as
Xlogin shell.
X.SH INTERFACES
X
X.BR rmtinit (),
X.BR rmtdebug (),
X.BR rmthostname (),
X.BR rmtfilename (),
X.BR rmtgetconn (),
X.BR rmtopen (),
X.BR rmtioctl (),
X.BR rmtclose (),
X.BR rmtread (),
X.BR rmtwrite (),
X.BR rmtseek (),
X.BR rmtxstatus (),
X.BR rmtstatus (),
X.BR _mtg2rmtg (),
X.BR _rmtg2mtg ()
X
X.SH FILES
X.SH "SEE ALSO"
X.BR rmt (1),
X.BR rsh (1),
X.BR ssh (1),
X.BR rcmd (3)
X
X.\".SH NOTES
X.\".SH BUGS
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg.schilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
END-of-star-1.5.2/librmt/librmt.3
echo x - star-1.5.2/librmt/mtg2rmtg.3
sed 's/^X//' >star-1.5.2/librmt/mtg2rmtg.3 << 'END-of-star-1.5.2/librmt/mtg2rmtg.3'
X.so man3/rmtstatus.3
X.\" @(#)mtg2rmtg.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/mtg2rmtg.3
echo x - star-1.5.2/librmt/rmtclose.3
sed 's/^X//' >star-1.5.2/librmt/rmtclose.3 << 'END-of-star-1.5.2/librmt/rmtclose.3'
X.so man3/rmtopen.3
X.\" @(#)rmtclose.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtclose.3
echo x - star-1.5.2/librmt/rmtdebug.3
sed 's/^X//' >star-1.5.2/librmt/rmtdebug.3 << 'END-of-star-1.5.2/librmt/rmtdebug.3'
X.so man3/rmtgetconn.3
X.\" @(#)rmtdebug.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtdebug.3
echo x - star-1.5.2/librmt/librmt_p.mk
sed 's/^X//' >star-1.5.2/librmt/librmt_p.mk << 'END-of-star-1.5.2/librmt/librmt_p.mk'
X#ident @(#)librmt_p.mk	1.4 08/01/11 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/profiled
XSUBINSDIR=	/profiled
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	rmt
XCPPOPTS +=	-DUSE_REMOTE
XCPPOPTS +=	-DUSE_RCMD_RSH
XCPPOPTS +=	-DUSE_LARGEFILES
XCOPTS +=	$(COPTGPROF)
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
X#CC=		echo "	==> COMPILING \"$@\""; cc
X###########################################################################
END-of-star-1.5.2/librmt/librmt_p.mk
echo x - star-1.5.2/librmt/shlrmt.mk
sed 's/^X//' >star-1.5.2/librmt/shlrmt.mk << 'END-of-star-1.5.2/librmt/shlrmt.mk'
X#ident @(#)shlrmt.mk	1.5 10/08/01 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/pic
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	rmt
XCPPOPTS +=	-DUSE_REMOTE
XCPPOPTS +=	-DUSE_RCMD_RSH
XCPPOPTS +=	-DUSE_LARGEFILES
Xinclude		Targets
XLIBS=		-lschily $(LIB_SOCKET) -lc
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
X#CC=		echo "	==> COMPILING \"$@\""; cc
X###########################################################################
END-of-star-1.5.2/librmt/shlrmt.mk
echo x - star-1.5.2/librmt/rmtfilename.3
sed 's/^X//' >star-1.5.2/librmt/rmtfilename.3 << 'END-of-star-1.5.2/librmt/rmtfilename.3'
X.so man3/rmtgetconn.3
X.\" @(#)rmtfilename.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtfilename.3
echo x - star-1.5.2/librmt/rmtg2mtg.3
sed 's/^X//' >star-1.5.2/librmt/rmtg2mtg.3 << 'END-of-star-1.5.2/librmt/rmtg2mtg.3'
X.so man3/rmtstatus.3
X.\" @(#)rmtg2mtg.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtg2mtg.3
echo x - star-1.5.2/librmt/rmtgetconn.3
sed 's/^X//' >star-1.5.2/librmt/rmtgetconn.3 << 'END-of-star-1.5.2/librmt/rmtgetconn.3'
X. \" @(#)rmtgetconn.3	1.3 08/10/12 Copyr 2002 J. Schilling
X. \" Manual page for rmtgetconn
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH RMTGETCONN 3L "08/10/12" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS"
X.SH NAME
Xrmtinit, rmtdebug, rmthostname, rmtfilename, rmtgetconn \- initiate a connection to a remote tape server
X.SH SYNOPSIS
X.LP
X.B cc
X.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
X.B \-lrmt
X.B \-lsocket
X.B \-lnsl
X.RI "[ " "library" " \|.\|.\|. ]"
X.LP
X.nf
X.B
X#include <schily/librmt.h>
X.sp
X.B
Xvoid rmtinit(errmsgn, eexit)
X.B
X	int     (*errmsgn) (int, const char *, ...);
X.B
X	void    (*eexit)   (int);
X.sp
X.B
Xint rmtdebug(dlevel)
X.B
X	int     dlevel;
X.sp
X.B
Xchar *rmtfilename(name)
X.B
X	char    *name;
X.sp
X.B
Xchar *rmthostname(hostname, hnsize, rmtspec)
X.B
X	char    *hostname;
X.B
X	int     hnsize;
X.B
X	char    *rmtspec;
X.sp
X.B
Xint rmtgetconn(host, trsize, excode)
X.B
X	char    *host;
X.B
X	int     trsize;
X.B
X	int     excode;
X.fi
X.SH DESCRIPTION
X.TP
X.B rmtinit()
XIs an optional function that allows to set up a function for 
Xerror printing and a function to be called to exit the program.
XIf 
X.B rmtinit()
Xis not called or any of the function pointers is 
X.SM NULL,
Xthe appropriate default function is used instead.
XThe supplied error printing function needs to be compatible with
X.BR errmsgno (3)
Xand the supplied exit function needs to be compatible with
X.BR exit (3).
X.TP
X.B rmtdebug()
Xallows to set the debug level for the library code. The default debug
Xlevel is 0 and does not print debug messages.
X.TP
X.B rmtfilename()
Xis given a filename that may be either in remote file syntax (
X.I hostname:filename
Xor
X.I user@hostname:filename
X) or not.
XIf the argument turns out to be in remote file syntax, a pointer to the
Xfilename part is returned.
X.TP
X.B rmthostname()
XThis function copies the user/host part of 
X.I rmtspec
Xwhich should be in remote file syntax.
XThe first argument is a character array that should be large enough to hold
Xthe user/host part of 
X.IR rmtspec .
XThe second argument is the size of the character array.
XThe third argument is a string in remote file syntax.
X.TP
X.B rmtgetconn()
XThis function establishes a connection to the remote tape server process.
XThe first parameter is the usr/host part of a string in remote file syntax
Xand should be created via
X.BR rmthostname().
XThe second parameter is the expected maximum transfer size. It is used to set up
Xkernel buffering via 
X.B setsockopt()
Xto increase performance.
XThe third parameter is an alternate exit code to be used instead of the library 
Xdefault if 
X.B rmtgetconn()
Xdecides to call
X.BR exit().
XThis allows commands like 
X.B ufsdump
Xto use the documented exit codes for startup errors.
X.SH RETURNS
X.TP
X.B rmtdebug()
Xreturns the old debug level.
X.TP
X.B rmtfilename()
Xreturns the filename part of the argument string or
X.SM NULL
Xin case the argument turns out to be not in remote file syntax.
X.TP
X.B rmthostname()
Xreturns a pointer to the first argument or
X.SM NULL
Xin case the 
X.I rmtspec
Xargument turns out to be not in remote file syntax.
X.TP
X.B rmtgetconn()
Xreturn a file descriptor which is suitable to be used as first argument
Xfor functions like
X.B rmtopen()
Xor
X.BR rmtwrite() .
XIf 
X.B rmtgetconn()
Xfails to set up a connection, -1 is returned.
XIf
X.B rmtgetconn()
Xis unable to find the port number for shell/tcp, the current uid has no
Xentry in the passwd file or the user name includes illegal characters,
X.B exit()
Xis called.
XIf you do not like 
X.B rmtgetconn()
Xto exit in this case, call
X.B rmtinit()
Xbefore and install a non exiting function as 
X.B exit() 
Xhandler; 
X.B rmtgetconn()
Xthen will return -2 after this function did return.
X. \" .SH ERRORS
X
X.SH EXAMPLES
X.LP
X\fB
X.nf
Xint	remfd;
Xchar	*remfn;
Xchar	host[256];
X
Xif ((remfn = rmtfilename(filename)) != NULL) {
X	rmthostname(host, sizeof (host), filename);
X
X	if ((remfd = rmtgetconn(host, iosize, 0)) < 0)
X		comerrno(EX_BAD, "Cannot get connection to '%s'.\en",
X			/* errno not valid !! */		host);
X}
X
Xif (rmtopen(remfd, remfn, mode) < 0)
X	comerr("Cannot open '%s'.\en", remfn);
X
Xif (rmtread(remfd, buf, sizeof(buf) < 0)
X	comerr("Read error on '%s'.\en", remfn);
X
Xrmtclose(remfd);
X.fi
X\fP
X.SH ENVIRONMENT
X.LP
X.TP
X.B RSH
XIf the 
X.B RSH
Xenvironment is present, the remote connection will not be created via
X.BR rcmd (3)
Xbut by calling the program pointed to by
X.BR RSH .
XUse e.g. 
X.BR RSH= /usr/bin/ssh
Xto create a secure shell connection.
X.TP
X.B RMT
XIf the 
X.B RMT
Xenvironment is present, the remote tape server will not be the program
X.B /etc/rmt
Xbut the program pointed to by
X.BR RMT .
XNote that the remote tape server program name will be ignored if you log in
Xusing an account that has been created with a remote tape server program as
Xlogin shell.
X.\".SH FILES
X.SH "SEE ALSO"
X.BR rmt (1),
X.BR rsh (1),
X.BR ssh (1),
X.BR rcmd (3),
X.BR rmtinit (3),
X.BR rmtdebug (3),
X.BR rmthostname (3),
X.BR rmtfilename (3),
X.BR rmtgetconn (3),
X.BR rmtopen (3),
X.BR rmtioctl (3),
X.BR rmtclose (3),
X.BR rmtread (3),
X.BR rmtwrite (3),
X.BR rmtseek (3),
X.BR rmtxstatus (3),
X.BR rmtstatus (3),
X.BR _mtg2rmtg (3),
X.BR _rmtg2mtg (3),
X.BR errmsgno (3)
X
X.SH DIAGNOSTICS
X.SH NOTES
X.SH BUGS
X.LP
XFor now (late 2002), we know that the following programs
Xare broken and do not implement signal handling correctly:
X.TP
Xrsh
Xon SunOS-5.0...SunOS-5.9
X.TP
Xssh
Xfrom ssh.com
X.TP
Xssh
Xfrom openssh.org
X.LP
XSun already did accept a bug report for 
X.BR rsh (1). 
XOpenssh.org accepted
Xa bug for their implementation of 
X.BR ssh (1).
X.LP
XIf you use 
X.B rmtgetconn()
Xto create a remote connection via an unfixed
X.BR rsh (1)
Xor 
X.BR ssh (1),
Xbe prepared that terminal generated signals may interrupt the
Xremote connection.
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg.schilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
END-of-star-1.5.2/librmt/rmtgetconn.3
echo x - star-1.5.2/librmt/rmthostname.3
sed 's/^X//' >star-1.5.2/librmt/rmthostname.3 << 'END-of-star-1.5.2/librmt/rmthostname.3'
X.so man3/rmtgetconn.3
X.\" @(#)rmthostname.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmthostname.3
echo x - star-1.5.2/librmt/rmtinit.3
sed 's/^X//' >star-1.5.2/librmt/rmtinit.3 << 'END-of-star-1.5.2/librmt/rmtinit.3'
X.so man3/rmtgetconn.3
X.\" @(#)rmtinit.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtinit.3
echo x - star-1.5.2/librmt/rmtioctl.3
sed 's/^X//' >star-1.5.2/librmt/rmtioctl.3 << 'END-of-star-1.5.2/librmt/rmtioctl.3'
X.so man3/rmtopen.3
X.\" @(#)rmtioctl.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtioctl.3
echo x - star-1.5.2/librmt/rmtopen.3
sed 's/^X//' >star-1.5.2/librmt/rmtopen.3 << 'END-of-star-1.5.2/librmt/rmtopen.3'
X. \" @(#)rmtopen.3	1.4 08/10/12 Copyr 2002 J. Schilling
X. \" Manual page for rmtopen
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH RMTOPEN 3L "08/10/12" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS"
X.SH NAME
Xrmtopen, rmtclose, rmtread, rmtwrite, rmtseek, rmtioctl \- operate on a connection to a remote tape server
X.SH SYNOPSIS
X.LP
X.B cc
X.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
X.B \-lrmt
X.B \-lsocket
X.B \-lnsl
X.RI "[ " "library" " \|.\|.\|. ]"
X.LP
X.nf
X.B
X#include <schily/librmt.h>
X.B
X#include <schily/rmtio.h>
X.sp
X.B
Xint rmtopen(int remfd, char *pathname, int fmode);
X.sp
X.B
Xint rmtclose(int remfd);
X.sp
X.B
Xint rmtread(int remfd, char *buf, int count);
X.sp
X.B
Xint rmtwrite(int remfd, char *buf, int count);
X.sp
X.B
Xint rmtseek(int remfd, off_t offset, int whence);
X.sp
X.B
Xint rmtioctl(int remfd, int cmd, int count);
X.fi
X.SH DESCRIPTION
X.TP
X.B rmtopen()
Xsends an open request to the remote server,
X.I remfd
Xis a file descriptor previously obtained from a call to 
X.BR rmtgetconn() ,
X.I pathname
Xis a path to be opened on the server side and
X.I fmode
Xis the same as the third argument for
X.BR open (2).
XIf the remote server does not support
Xthe GNU open flag enhancements, only the lowest two bits
Xin the open flags can be send to the remote server.
X.sp
XIf the open requests succeeds, 
X.B rmtopen()
Xtakes care of telling the remote side to switch to 
X.B RMT protocol VERSION 1 
X.TP
X.B rmtclose()
Xsends a close request to the remote server,
X.I remfd
Xis a file descriptor previously obtained from a call to 
X.BR rmtgetconn() .
X.TP
X.B rmtread()
Xsends a read request to the remote server, 
X.I remfd
Xis a file descriptor previously obtained from a call to 
X.BR rmtgetconn() .
XThe other parameters are the same as for a local
X.B read(2)
Xcall.
X.B rmtread()
Xwill fail if there was no previous successful 
X.B rmtopen()
Xbefore.
X.TP
X.B rmtwrite()
Xsends a write request to the remote server, 
X.I remfd
Xis a file descriptor previously obtained from a call to 
X.BR rmtgetconn() .
XThe other parameters are the same as for a local
X.B write(2)
Xcall.
X.B rmtwrite()
Xwill fail if there was no previous successful 
X.B rmtopen()
Xbefore.
X.TP
X.B rmtseek()
Xsends a seek request to the remote server, 
X.I remfd
Xis a file descriptor previously obtained from a call to 
X.BR rmtgetconn() .
XThe other parameters are the same as for a local
X.B lseek(2)
Xcall.
X.B rmtseek()
Xwill fail if there was no previous successful 
X.B rmtopen()
Xbefore.
X.TP
X.B rmtioctl()
Xsends a 
X.B MTIOCTOP 
Xrequest to the remote server, 
X.B cmd
Xand
X.B count
Xare the values that should be filled into 
X.BR "struct mtop" .
XSee
X.B mtio(7)
Xfor more information.
X.SH RETURNS
X.TP
X.B rmtopen()
Xreturns a value >= 0 if the remote open succeeds.
X.TP
X.B rmtclose()
Xreturns a value >= 0 if the remote close succeeds.
X.TP
X.B rmtread()
Xreturns the return value obtained the remote 
X.B read(2)
Xrequest.
X.TP
X.B rmtwrite()
Xreturns the return value obtained the remote 
X.B write(2)
Xrequest.
X.TP
X.B rmtseek()
Xreturns the return value obtained the remote 
X.B lseek(2)
Xrequest.
X.TP
X.B rmtioctl()
Xreturns the return value obtained the remote 
X.B ioctl(f, MTIOCTOP, struct mtop *)
Xcall.
X
X.SH ERRORS
XAll functions return -1 on error and set 
X.B errno
Xto the 
X.B errno
Xvalue retrieved from the remote server.
X.SH EXAMPLES
X.LP
X\fB
X.nf
Xint	remfd;
Xchar	*remfn;
Xchar	host[256];
X
Xif ((remfn = rmtfilename(filename)) != NULL) {
X	rmthostname(host, sizeof (host), filename);
X
X	if ((remfd = rmtgetconn(host, iosize, 0)) < 0)
X		comerrno(EX_BAD, "Cannot get connection to '%s'.\en",
X			/* errno not valid !! */		host);
X}
X
Xif (rmtopen(remfd, remfn, mode) < 0)
X	comerr("Cannot open '%s'.\en", remfn);
X
Xif (rmtread(remfd, buf, sizeof(buf)) < 0)
X	comerr("Read error on '%s'.\en", remfn);
X
Xrmtclose(remfd);
X.fi
X\fP
X.SH ENVIRONMENT
X.\".SH FILES
X.SH "SEE ALSO"
X.BR rmt (1),
X.BR rsh (1),
X.BR ssh (1),
X.BR rcmd (3),
X.BR rmtinit (3),
X.BR rmtdebug (3),
X.BR rmthostname (3),
X.BR rmtfilename (3),
X.BR rmtgetconn (3),
X.BR rmtopen (3),
X.BR rmtioctl (3),
X.BR rmtclose (3),
X.BR rmtread (3),
X.BR rmtwrite (3),
X.BR rmtseek (3),
X.BR rmtxstatus (3),
X.BR rmtstatus (3),
X.BR _mtg2rmtg (3),
X.BR _rmtg2mtg (3),
X.BR errmsgno (3),
X.BR mtio (7)
X
X.SH DIAGNOSTICS
X.SH NOTES
XWhile all other known
X.B rmt
Ximplementations limit the size of a single
X.B rmt
Xcommand to 64 bytes, this implementation limits all standard
Xcommand lines to 80 bytes and the file name to 4096 bytes.
X.LP
XNote that this may cause problems if the remote
X.B rmt
Xserver implementation is directly derived from the historic
XBSD server code. This is true for all BSD systems, for SunOS up
Xto 5.9 and even for the GNU
X.B rmt
Xserver.
X.LP
XAs some of the other
X.B rmt
Xservers do not even implement bound checking, be prepared that
Xother server implementations may dump core or at least stop honoring
Xthe
X.B rmt
Xprotocol.
X.LP
XIf you like to use long file names, make sure that you also use the
X.B schily rmt
Xserver.
X.SH BUGS
X.LP
XIf local and remote
X.B errno
Xvalues do not match, programs may get confused.
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg.schilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
END-of-star-1.5.2/librmt/rmtopen.3
echo x - star-1.5.2/librmt/rmtread.3
sed 's/^X//' >star-1.5.2/librmt/rmtread.3 << 'END-of-star-1.5.2/librmt/rmtread.3'
X.so man3/rmtopen.3
X.\" @(#)rmtread.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtread.3
echo x - star-1.5.2/librmt/rmtseek.3
sed 's/^X//' >star-1.5.2/librmt/rmtseek.3 << 'END-of-star-1.5.2/librmt/rmtseek.3'
X.so man3/rmtopen.3
X.\" @(#)rmtseek.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtseek.3
echo x - star-1.5.2/librmt/rmtstatus.3
sed 's/^X//' >star-1.5.2/librmt/rmtstatus.3 << 'END-of-star-1.5.2/librmt/rmtstatus.3'
X. \" @(#)rmtstatus.3	1.3 08/10/12 Copyr 2002 J. Schilling
X. \" Manual page for rmtstatus
X. \"
X.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a
X.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o
X.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u
X.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A
X.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O
X.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U
X.if t .ds s \(*b
X.if t .ds S SS
X.if n .ds a ae
X.if n .ds o oe
X.if n .ds u ue
X.if n .ds s sz
X.TH RMTSTATUS 3L "08/10/12" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS"
X.SH NAME
Xrmtstatus, rmtxstatus, _mtg2rmtg, _rmtg2mtg \- request MTIOCGET on a connection to a remote tape server
X.SH SYNOPSIS
X.LP
X.B cc
X.RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|."
X.B \-lrmt
X.B \-lsocket
X.B \-lnsl
X.RI "[ " "library" " \|.\|.\|. ]"
X.LP
X.nf
X.B
X#include <schily/librmt.h>
X.B
X#include <schily/rmtio.h>
X.sp
X.B
Xint rmtstatus(int remfd, struct mtget *mtp);
X.sp
X.B
Xint rmtxstatus(int remfd, struct rmtget *mtp);
X.sp
X.B
Xvoid _rmtg2mtg(struct mtget *mtp, struct rmtget *rmtp);
X.sp
X.B
Xint _mtg2rmtg(struct rmtget *rmtp, struct mtget *mtp);
X.fi
X.SH DESCRIPTION
X.TP
X.BR rmtstatus() " and " rmtxstatus()
Xperform a MTIOCGET
Xrequest to the remote server, 
X.I remfd
Xis a file descriptor previously obtained from a call to 
X.BR rmtgetconn() ,
X.B "struct mtget
Xis the local magnetic tape status structure,
X.B "struct rmtget
Xis the enhanced magnetic tape status structure from
X.BR librmt .
X.B rmtstatus()
Xand
X.B rmtxstatus()
Xwill fail if there was no previous successful 
X.B rmtopen()
Xbefore.
X.B rmtstatus()
Xand
X.B rmtxstatus()
Xtake care of using
X.B RMT protocol VERSION 1 
Xif the remote side implements support for protocol version 1.
XThe function
X.B rmtstatus()
Xis outdated and should be avoided as the results in
X.B "struct mtget
Xwill be the least common denominator of the local and remote variants
Xof the structure.
XUse
X.B rmtxstatus()
Xinstead.
XThe member
X.B mt_xflags
Xin 
X.B "struct rmtget
Xcontains a bitmap that indicates which members of the structure contain
Xvalid values.
XSee
X.B mtio(7)
Xfor more information.
X.TP
X.B _rmtg2mtg()
Xconverts a
X.B "struct rmtget
Xinto a
X.BR "struct mtget" .
X.TP
X.B _mtg2rmtg()
Xconverts a
X.B "struct mtget
Xinto a
X.B "struct rmtget"
Xand sets the member
X.B mt_xflags
Xin 
X.B "struct rmtget
Xto contain a bitmap that indicates which members of 
X.B "struct mtget
Xare present in the local implementation.
X.SH RETURNS
X.TP
X.BR rmtstatus() " and "rmtxstatus()
Xreturn a value >= 0 if the remote 
X.B ioctl(f, MTIOCGET, struct mtget *)
Xsucceeds.
X
X.SH ERRORS
X.BR rmtstatus() " and "rmtxstatus()
Xreturn -1 on error and set 
X.B errno
Xto the 
X.B errno
Xvalue retrieved from the remote server.
X.TP
X.B _mtg2rmtg()
Xreturns -1 if no value from the local
X.B "struct mtget
Xcould be converted to the abstract
X.BR "struct rmtget" .
X.SH EXAMPLES
X.LP
X\fB
X.nf
Xint	remfd;
Xchar	*remfn;
Xchar	host[256];
Xstruct rmtget rmtg;
X
Xif ((remfn = rmtfilename(filename)) != NULL) {
X	rmthostname(host, sizeof (host), filename);
X
X	if ((remfd = rmtgetconn(host, iosize, 0)) < 0)
X		comerrno(EX_BAD, "Cannot get connection to '%s'.\en",
X			/* errno not valid !! */		host);
X}
X
Xif (rmtopen(remfd, remfn, mode) < 0)
X	comerr("Cannot open '%s'.\en", remfn);
X
Xif (rmtxstatus(remfd, &rmtg) < 0)
X	comerr("Cannot retrieve magnetic tape status fom '%s'.\en", remfn);
X
Xrmtclose(remfd);
X.fi
X\fP
X.SH ENVIRONMENT
X.\".SH FILES
X.SH "SEE ALSO"
X.BR rmt (1),
X.BR rsh (1),
X.BR ssh (1),
X.BR rcmd (3),
X.BR rmtinit (3),
X.BR rmtdebug (3),
X.BR rmthostname (3),
X.BR rmtfilename (3),
X.BR rmtgetconn (3),
X.BR rmtopen (3),
X.BR rmtioctl (3),
X.BR rmtclose (3),
X.BR rmtread (3),
X.BR rmtwrite (3),
X.BR rmtseek (3),
X.BR rmtxstatus (3),
X.BR rmtstatus (3),
X.BR _mtg2rmtg (3),
X.BR _rmtg2mtg (3),
X.BR errmsgno (3),
X.BR mtio (7)
X
X.SH DIAGNOSTICS
X.SH NOTES
X.SH BUGS
X.LP
XIf local and remote
X.B errno
Xvalues do not match, programs may get confused.
X.SH AUTHOR
X.nf
XJ\*org Schilling
XSeestr. 110
XD\-13353 Berlin
XGermany
X.fi
X.PP
XMail bugs and suggestions to:
X.PP
X.B
Xjoerg.schilling@fokus.fraunhofer.de
Xor
X.B
Xjs@cs.tu\-berlin.de
END-of-star-1.5.2/librmt/rmtstatus.3
echo x - star-1.5.2/librmt/rmtwrite.3
sed 's/^X//' >star-1.5.2/librmt/rmtwrite.3 << 'END-of-star-1.5.2/librmt/rmtwrite.3'
X.so man3/rmtopen.3
X.\" @(#)rmtwrite.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtwrite.3
echo x - star-1.5.2/librmt/rmtxstatus.3
sed 's/^X//' >star-1.5.2/librmt/rmtxstatus.3 << 'END-of-star-1.5.2/librmt/rmtxstatus.3'
X.so man3/rmtstatus.3
X.\" @(#)rmtxstatus.3	1.1 02/11/11 Copyright 2002 J. Schilling
END-of-star-1.5.2/librmt/rmtxstatus.3
echo x - star-1.5.2/librmt/mtg2rmtg.mk3
sed 's/^X//' >star-1.5.2/librmt/mtg2rmtg.mk3 << 'END-of-star-1.5.2/librmt/mtg2rmtg.mk3'
X#ident @(#)mtg2rmtg.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	mtg2rmtg
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	mtg2rmtg.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/mtg2rmtg.mk3
echo x - star-1.5.2/librmt/rmtclose.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtclose.mk3 << 'END-of-star-1.5.2/librmt/rmtclose.mk3'
X#ident @(#)rmtclose.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtclose
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtclose.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtclose.mk3
echo x - star-1.5.2/librmt/rmtdebug.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtdebug.mk3 << 'END-of-star-1.5.2/librmt/rmtdebug.mk3'
X#ident @(#)rmtdebug.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtdebug
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtdebug.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtdebug.mk3
echo x - star-1.5.2/librmt/rmtfilename.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtfilename.mk3 << 'END-of-star-1.5.2/librmt/rmtfilename.mk3'
X#ident @(#)rmtfilename.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtfilename
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtfilename.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtfilename.mk3
echo x - star-1.5.2/librmt/rmtg2mtg.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtg2mtg.mk3 << 'END-of-star-1.5.2/librmt/rmtg2mtg.mk3'
X#ident @(#)rmtg2mtg.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtg2mtg
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtg2mtg.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtg2mtg.mk3
echo x - star-1.5.2/librmt/rmtgetconn.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtgetconn.mk3 << 'END-of-star-1.5.2/librmt/rmtgetconn.mk3'
X#ident @(#)rmtgetconn.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtgetconn
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtgetconn.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtgetconn.mk3
echo x - star-1.5.2/librmt/rmthostname.mk3
sed 's/^X//' >star-1.5.2/librmt/rmthostname.mk3 << 'END-of-star-1.5.2/librmt/rmthostname.mk3'
X#ident @(#)rmthostname.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmthostname
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmthostname.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmthostname.mk3
echo x - star-1.5.2/librmt/rmtinit.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtinit.mk3 << 'END-of-star-1.5.2/librmt/rmtinit.mk3'
X#ident @(#)rmtinit.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtinit
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtinit.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtinit.mk3
echo x - star-1.5.2/librmt/rmtioctl.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtioctl.mk3 << 'END-of-star-1.5.2/librmt/rmtioctl.mk3'
X#ident @(#)rmtioctl.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtioctl
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtioctl.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtioctl.mk3
echo x - star-1.5.2/librmt/rmtopen.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtopen.mk3 << 'END-of-star-1.5.2/librmt/rmtopen.mk3'
X#ident @(#)rmtopen.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtopen
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtopen.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtopen.mk3
echo x - star-1.5.2/librmt/rmtread.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtread.mk3 << 'END-of-star-1.5.2/librmt/rmtread.mk3'
X#ident @(#)rmtread.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtread
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtread.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtread.mk3
echo x - star-1.5.2/librmt/rmtseek.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtseek.mk3 << 'END-of-star-1.5.2/librmt/rmtseek.mk3'
X#ident @(#)rmtseek.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtseek
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtseek.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtseek.mk3
echo x - star-1.5.2/librmt/rmtstatus.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtstatus.mk3 << 'END-of-star-1.5.2/librmt/rmtstatus.mk3'
X#ident @(#)rmtstatus.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtstatus
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtstatus.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtstatus.mk3
echo x - star-1.5.2/librmt/rmtwrite.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtwrite.mk3 << 'END-of-star-1.5.2/librmt/rmtwrite.mk3'
X#ident @(#)rmtwrite.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtwrite
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtwrite.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtwrite.mk3
echo x - star-1.5.2/librmt/rmtxstatus.mk3
sed 's/^X//' >star-1.5.2/librmt/rmtxstatus.mk3 << 'END-of-star-1.5.2/librmt/rmtxstatus.mk3'
X#ident @(#)rmtxstatus.mk3	1.1 02/11/11 
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	rmtxstatus
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	rmtxstatus.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/rmtxstatus.mk3
echo x - star-1.5.2/librmt/noshlrmt.mk
sed 's/^X//' >star-1.5.2/librmt/noshlrmt.mk << 'END-of-star-1.5.2/librmt/noshlrmt.mk'
X#ident "@(#)noshlrmt.mk	1.1 06/07/21 "
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-star-1.5.2/librmt/noshlrmt.mk
echo x - star-1.5.2/librmt/librmt-mapvers
sed 's/^X//' >star-1.5.2/librmt/librmt-mapvers << 'END-of-star-1.5.2/librmt/librmt-mapvers'
X# /* @(#)librmt-mapvers        1.1 10/10/02 Copyright 2005-2010 J. Schilling */
X
XSCHILY_1.0 {
Xglobal:
X	_mtg2rmtg;
X	_rmtg2mtg;
X	rmtclose;
X	rmtdebug;
X	rmtfilename;
X	rmtgetconn;
X	rmthostname;
X	rmtinit;
X	rmtioctl;
X	rmtopen;
X	rmtread;
X	rmtseek;
X	rmtstatus;
X	rmtwrite;
X	rmtxstatus;
X
Xlocal:
X	*;
X};
END-of-star-1.5.2/librmt/librmt-mapvers
echo x - star-1.5.2/librmt/Makefile.man
sed 's/^X//' >star-1.5.2/librmt/Makefile.man << 'END-of-star-1.5.2/librmt/Makefile.man'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for installing manual pages
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMANDIR=		man
XTARGETMAN=	librmt
XMANSECT=	$(MANSECT_LIB)
XMANSUFFIX=	$(MANSUFF_LIB)
XMANFILE=	librmt.3
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.man
X###########################################################################
END-of-star-1.5.2/librmt/Makefile.man
echo c - star-1.5.2/TARGETS
mkdir -p star-1.5.2/TARGETS > /dev/null 2>&1
echo x - star-1.5.2/TARGETS/15conf
sed 's/^X//' >star-1.5.2/TARGETS/15conf << 'END-of-star-1.5.2/TARGETS/15conf'
XMakefiles Autoconfiguration part 1. Automated run of configure.
END-of-star-1.5.2/TARGETS/15conf
echo x - star-1.5.2/TARGETS/25inc
sed 's/^X//' >star-1.5.2/TARGETS/25inc << 'END-of-star-1.5.2/TARGETS/25inc'
XMakefiles Autoconfiguration part 2. Create autogenerated include files.
END-of-star-1.5.2/TARGETS/25inc
echo x - star-1.5.2/TARGETS/45librmt
sed 's/^X//' >star-1.5.2/TARGETS/45librmt << 'END-of-star-1.5.2/TARGETS/45librmt'
XRemote TAPE transport library
END-of-star-1.5.2/TARGETS/45librmt
echo x - star-1.5.2/TARGETS/25include
sed 's/^X//' >star-1.5.2/TARGETS/25include << 'END-of-star-1.5.2/TARGETS/25include'
XStatic include files.
END-of-star-1.5.2/TARGETS/25include
echo x - star-1.5.2/TARGETS/43lib
sed 's/^X//' >star-1.5.2/TARGETS/43lib << 'END-of-star-1.5.2/TARGETS/43lib'
XLibrary containing Schily SING (Schily Is Not GNU) extensions
END-of-star-1.5.2/TARGETS/43lib
echo x - star-1.5.2/TARGETS/55rmt
sed 's/^X//' >star-1.5.2/TARGETS/55rmt << 'END-of-star-1.5.2/TARGETS/55rmt'
Xremote magnetic tape protocol server
END-of-star-1.5.2/TARGETS/55rmt
echo x - star-1.5.2/TARGETS/55star
sed 's/^X//' >star-1.5.2/TARGETS/55star << 'END-of-star-1.5.2/TARGETS/55star'
Xunique standard tape archiver
END-of-star-1.5.2/TARGETS/55star
echo x - star-1.5.2/TARGETS/45libfind
sed 's/^X//' >star-1.5.2/TARGETS/45libfind << 'END-of-star-1.5.2/TARGETS/45libfind'
XLibrary version of the find(1) command
END-of-star-1.5.2/TARGETS/45libfind
echo x - star-1.5.2/TARGETS/55tartest
sed 's/^X//' >star-1.5.2/TARGETS/55tartest << 'END-of-star-1.5.2/TARGETS/55tartest'
Xtest tar archive for POSIX.1-1990 compliance
END-of-star-1.5.2/TARGETS/55tartest
echo x - star-1.5.2/TARGETS/55star_sym
sed 's/^X//' >star-1.5.2/TARGETS/55star_sym << 'END-of-star-1.5.2/TARGETS/55star_sym'
END-of-star-1.5.2/TARGETS/55star_sym
echo x - star-1.5.2/TARGETS/55mt
sed 's/^X//' >star-1.5.2/TARGETS/55mt << 'END-of-star-1.5.2/TARGETS/55mt'
Xmagnetic tape control
END-of-star-1.5.2/TARGETS/55mt
echo x - star-1.5.2/TARGETS/55cmd
sed 's/^X//' >star-1.5.2/TARGETS/55cmd << 'END-of-star-1.5.2/TARGETS/55cmd'
XVarious commands
END-of-star-1.5.2/TARGETS/55cmd
echo x - star-1.5.2/TARGETS/85man
sed 's/^X//' >star-1.5.2/TARGETS/85man << 'END-of-star-1.5.2/TARGETS/85man'
XVarious man pages
END-of-star-1.5.2/TARGETS/85man
echo x - star-1.5.2/TARGETS/README
sed 's/^X//' >star-1.5.2/TARGETS/README << 'END-of-star-1.5.2/TARGETS/README'
X05patches
X15conf	- Autofonfiguration part 1. Automated run of configure.
X25inc	- Autofonfiguration part 2. Create autogenerated include files.
X
X35	reserved
X
X45lib
X55cmd
X65kern
X75	reserved
X85man
X95	reserved
END-of-star-1.5.2/TARGETS/README
echo x - star-1.5.2/TARGETS/Targetdirs
sed 's/^X//' >star-1.5.2/TARGETS/Targetdirs << 'END-of-star-1.5.2/TARGETS/Targetdirs'
X###########################################################################
X#
X# This file is intentionally left empty. The targets are now defined by the
X# "Slottable Source" feature of the makefile system
X#
X###########################################################################
END-of-star-1.5.2/TARGETS/Targetdirs
echo x - star-1.5.2/TARGETS/__slot
sed 's/^X//' >star-1.5.2/TARGETS/__slot << 'END-of-star-1.5.2/TARGETS/__slot'
XThis file enables the "slot" feature of the Schily SING makefile system
END-of-star-1.5.2/TARGETS/__slot
echo x - star-1.5.2/TARGETS/44libdeflt
sed 's/^X//' >star-1.5.2/TARGETS/44libdeflt << 'END-of-star-1.5.2/TARGETS/44libdeflt'
XLibrary to read local defaults from /etc/default/*
END-of-star-1.5.2/TARGETS/44libdeflt
echo c - star-1.5.2/libfind
mkdir -p star-1.5.2/libfind > /dev/null 2>&1
echo x - star-1.5.2/libfind/Makefile
sed 's/^X//' >star-1.5.2/libfind/Makefile << 'END-of-star-1.5.2/libfind/Makefile'
X#ident "%W% %E% %Q%"
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XMK_FILES= libfind.mk libfind_p.mk $(NO_SHL)shlfind.mk
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.mks
X###########################################################################
END-of-star-1.5.2/libfind/Makefile
echo x - star-1.5.2/libfind/Targets
sed 's/^X//' >star-1.5.2/libfind/Targets << 'END-of-star-1.5.2/libfind/Targets'
X# @(#)Targets	1.6 10/04/04 Copyright 2005-2010 J. Schilling
X
XCFILES=		find.c walk.c fetchdir.c cmpdir.c find_misc.c find_list.c find_main.c idcache.c
XHFILES=		find_misc.h find_list.h find_tok.h
END-of-star-1.5.2/libfind/Targets
echo x - star-1.5.2/libfind/fetchdir.c
sed 's/^X//' >star-1.5.2/libfind/fetchdir.c << 'END-of-star-1.5.2/libfind/fetchdir.c'
X/* @(#)fetchdir.c	1.27 09/07/11 Copyright 2002-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)fetchdir.c	1.27 09/07/11 Copyright 2002-2009 J. Schilling";
X#endif
X/*
X *	Blocked directory handling.
X *
X *	Copyright (c) 2002-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/dirent.h>
X#include <schily/stat.h>	/* needed in case we have no dirent->d_ino */
X#include <schily/string.h>
X#include <schily/libport.h>
X#include <schily/schily.h>
X#include <schily/fetchdir.h>
X
X#ifndef	HAVE_LSTAT
X#define	lstat	stat
X#endif
X
XEXPORT	char	*fetchdir	__PR((char *dir, int *entp, int *lenp, ino_t **inop));
XEXPORT	char	*dfetchdir	__PR((DIR *dir, char *dirname, int *entp, int *lenp, ino_t **inop));
X
XEXPORT char *
Xfetchdir(dir, entp, lenp, inop)
X	char	*dir;			/* The name of the directory	  */
X	int	*entp;			/* Pointer to # of entries found  */
X	int	*lenp;			/* Pointer to len of returned str */
X	ino_t	**inop;
X{
X	char	*ret;
X	DIR	*d = opendir(dir);
X
X	if (d == NULL)
X		return (NULL);
X	ret = dfetchdir(d, dir, entp, lenp, inop);
X	closedir(d);
X	return (ret);
X}
X
X/*
X * Fetch content of a directory and return all entries (except '.' & '..')
X * concatenated in one memory chunk.
X *
X * Each name is prepended by a binary 1 ('^A') that is used by star to flag
X * additional information for this entry.
X * The end of the returned string contains two additional null character.
X */
XEXPORT char *
Xdfetchdir(d, dirname, entp, lenp, inop)
X	DIR	*d;
X	char	*dirname;		/* The name of the directory	  */
X	int	*entp;			/* Pointer to # of entries found  */
X	int	*lenp;			/* Pointer to len of returned str */
X	ino_t	**inop;
X{
X		char	*erg = NULL;
X		int	esize = 2;
X		int	msize = getpagesize();
X		int	off = 0;
X		ino_t	*ino = NULL;
X		int	mino = 0;
X	struct dirent	*dp;
X	register char	*name;
X	register int	nlen;
X	register int	nents = 0;
X#ifndef	HAVE_DIRENT_D_INO
X	struct stat	sbuf;
X		char	sname[PATH_MAX+1];
X#endif
X
X	if ((erg = ___malloc(esize, "fetchdir")) == NULL)
X		return (NULL);
X	erg[0] = '\0';
X	erg[1] = '\0';
X
X	while ((dp = readdir(d)) != NULL) {
X		name = dp->d_name;
X		/*
X		 * Skip the following names: "", ".", "..".
X		 */
X		if (name[name[0] != '.' ? 0 : name[1] != '.' ? 1 : 2] == '\0')
X			continue;
X		if (inop) {
X			if (mino <= nents) {
X				if (mino == 0)
X					mino = 32;
X				else if (mino < (msize / sizeof (ino_t)))
X					mino *= 2;
X				else
X					mino += msize / sizeof (ino_t);
X				if ((ino = ___realloc(ino, mino * sizeof (ino_t), "fetchdir")) == NULL)
X					return (NULL);
X			}
X#ifdef	HAVE_DIRENT_D_INO
X			ino[nents] = dp->d_ino;
X#else
X			/*
X			 * d_ino is currently missing on __DJGPP__ & __CYGWIN__
X			 * We need to call lstat(2) for every file
X			 * in order to get the needed information.
X			 * Do not care about speed, this should be a rare
X			 * exception.
X			 */
X			if (dirname != NULL) {
X				snprintf(sname, sizeof (sname), "%s/%s",
X								dirname, name);
X				sbuf.st_ino = (ino_t)0;
X				lstat(sname, &sbuf);
X				ino[nents] = sbuf.st_ino;
X			} else {
X				ino[nents] = (ino_t)-1;
X			}
X#endif
X		}
X		nents++;
X		nlen = strlen(name);
X		nlen += 4;		/* ^A name ^@ + ^@^@ Platz fuer Ende */
X		while (esize < (off + nlen)) {
X			if (esize < 64)
X				esize = 32;
X			if (esize < msize)
X				esize *= 2;
X			else
X				esize += msize;
X			if (esize < (off + nlen))
X				continue;
X
X			if ((erg = ___realloc(erg, esize, "fetchdir")) == NULL)
X				return (NULL);
X		}
X#ifdef	DEBUG
X		if (off > 0)
X			erg[off-1] = 2;	/* Hack: ^B statt ^@ zwischen Namen */
X#endif
X		erg[off++] = 1;		/* Platzhalter: ^A vor jeden Namen  */
X
X		strcpy(&erg[off], name);
X		off += nlen -3;		/* ^A  + ^@^@ Platz fuer Ende	    */
X	}
X#ifdef	DEBUG
X	erg[off-1] = 2;			/* Hack: ^B st. ^@ am letzten Namen */
X#endif
X	erg[off] = 0;
X	erg[off+1] = 0;
X
X#ifdef	DEBUG
X	erg[off] = 1;			/* Platzhalter: ^A n. letztem Namen */
X	erg[off+1] = 0;			/* Letztes Null Byte		    */
X#endif
X	off++;				/* List terminator null Byte zaehlt */
X	if (lenp)
X		*lenp = &erg[off] - erg; /* Alloziert ist 1 Byte mehr	    */
X
X	if (entp)
X		*entp = nents;
X	if (inop)
X		*inop = ino;
X
X	return (erg);
X}
END-of-star-1.5.2/libfind/fetchdir.c
echo x - star-1.5.2/libfind/find.c
sed 's/^X//' >star-1.5.2/libfind/find.c << 'END-of-star-1.5.2/libfind/find.c'
X/*#define	PLUS_DEBUG*/
X/* @(#)find.c	1.96 11/07/16 Copyright 2004-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)find.c	1.96 11/07/16 Copyright 2004-2011 J. Schilling";
X#endif
X/*
X *	Another find implementation...
X *
X *	Copyright (c) 2004-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifdef	__FIND__
X#define	FIND_MAIN
X#endif
X
X#include <schily/stdio.h>
X#include <schily/unistd.h>
X#include <schily/stdlib.h>
X#include <schily/fcntl.h>
X#include <schily/stat.h>
X#include <schily/dirent.h>
X#include <schily/time.h>
X#include <schily/wait.h>
X#include <schily/string.h>
X#include <schily/utypes.h>	/* incl. limits.h (_POSIX_ARG_MAX/ARG_MAX) */
X#include <schily/param.h>	/* #defines NCARGS on old systems */
X#include <schily/btorder.h>
X#include <schily/patmatch.h>
X#include <schily/fnmatch.h>
X#include <schily/standard.h>
X#include <schily/jmpdefs.h>
X#include <schily/schily.h>
X#include <schily/pwd.h>
X#include <schily/grp.h>
X#define	VMS_VFORK_OK
X#include <schily/vfork.h>
X
X#include <schily/nlsdefs.h>
X
X#if	defined(_ARG_MAX32) && defined(_ARG_MAX64)
X#define	MULTI_ARG_MAX		/* SunOS only ?			*/
X#endif
X
X#ifdef	__FIND__
Xchar	strvers[] = "1.4";	/* The pure version string	*/
X#endif
X
Xtypedef struct {
X	char	*left;
X	char	*right;
X	char	*this;
X	int	op;
X	union {
X		int	i;
X		long	l;
X		dev_t	dev;
X		ino_t	ino;
X		mode_t	mode;
X		nlink_t	nlink;
X		uid_t	uid;
X		gid_t	gid;
X		size_t	size;
X		time_t	time;
X		FILE	*fp;
X	} val, val2;
X} findn_t;
X
X#include <schily/walk.h>
X#define	FIND_NODE
X#include <schily/find.h>
X#include "find_list.h"
X#include "find_misc.h"
X#define	TOKEN_NAMES
X#include "find_tok.h"
X
X/*
X *	The struct plusargs and the adjacent space that holds the
X *	arg vector and the string table. The struct plusargs member "av"
X *	is also part of the ARG_MAX sized space that follows.
X *
X *	---------------------------------
X *	| Other struct plusargs fields	|	Don't count against ARG_MAX
X *	---------------------------------
X *	---------------------------------
X *	| 	New Arg vector[0]	|	Space for ARG_MAX starts here
X *	---------------------------------
X *	|		.		|
X *	|		.		|	Arg space grows upwards
X *	|		V		|
X *	---------------------------------
X *	|	 Arg vector end		|	"nextargp" points here
X *	---------------------------------
X *	---------------------------------
X *	| Space for first arg string	|
X *	---------------------------------	"laststr" points here
X *	|		^		|
X *	|		.		|	String space "grows" downwards
X *	|		.		|
X *	---------------------------------
X *	| Space for first arg string	|	Space for ARG_MAX ends here
X *	---------------------------------	"endp" points here
X *
X *	The Arg vector in struct plusargs uses the native pointer size
X *	for libfind. ARG_MAX however is based on the pointer size in the
X *	called program.
X *
X *	If a 32 bit libfind calls a 64 bit program, the arg vector and the
X *	environment array in the called program needs more space than in the
X *	calling libfind code.
X *
X *	If a 64 bit libfind calls a 32 bit program, the arg vector and the
X *	environment array in the called program needs less space than in the
X *	calling libfind code.
X */
Xstruct plusargs {
X	struct plusargs	*next;		/* Next in list for flushing	*/
X	char		*endp;		/* Points to end of data block	*/
X	char		**nextargp;	/* Points to next av[] entry	*/
X	char		*laststr;	/* points to last used string	*/
X	int		nenv;		/* Number of entries in env	*/
X	int		ac;		/* The argc for our command	*/
X	char		*av[1];		/* The argv for our command	*/
X};
X
X#ifdef	PLUS_DEBUG			/* We are no longer reentrant	*/
XLOCAL struct plusargs *plusp;		/* Avoid PLUS_DEBUG if possible	*/
X#endif
X
X#define	MINSECS		(60)
X#define	HOURSECS	(60 * MINSECS)
X#define	DAYSECS		(24 * HOURSECS)
X#define	YEARSECS	(365 * DAYSECS)
X
Xextern	time_t	find_sixmonth;		/* 6 months before limit (ls)	*/
Xextern	time_t	find_now;		/* now limit (ls)		*/
X
XLOCAL	findn_t	Printnode = { 0, 0, 0, PRINT };
X
XEXPORT	void	find_argsinit	__PR((finda_t *fap));
XEXPORT	void	find_timeinit	__PR((time_t now));
XEXPORT	findn_t	*find_printnode	__PR((void));
XEXPORT	findn_t	*find_addprint	__PR((findn_t *np, finda_t *fap));
XLOCAL	findn_t	*allocnode	__PR((finda_t *fap));
XEXPORT	void	find_free	__PR((findn_t *t, finda_t *fap));
XLOCAL	void	find_freenode	__PR((findn_t *t));
XLOCAL	void	nexttoken	__PR((finda_t *fap));
XLOCAL	BOOL	_nexttoken	__PR((finda_t *fap));
XLOCAL	void	errjmp		__PR((finda_t *fap, int err));
XEXPORT	int	find_token	__PR((char *word));
XEXPORT	char	*find_tname	__PR((int op));
XLOCAL	char	*nextarg	__PR((finda_t *fap, findn_t *t));
XEXPORT	findn_t	*find_parse	__PR((finda_t *fap));
XLOCAL	findn_t	*parse		__PR((finda_t *fap));
XLOCAL	findn_t	*parseand	__PR((finda_t *fap));
XLOCAL	findn_t	*parseprim	__PR((finda_t *fap));
XEXPORT	void	find_firstprim	__PR((int *pac, char *const **pav));
XEXPORT	BOOL	find_primary	__PR((findn_t *t, int op));
XEXPORT	BOOL	find_pname	__PR((findn_t *t, char *word));
XEXPORT	BOOL	find_hasprint	__PR((findn_t *t));
XEXPORT	BOOL	find_hasexec	__PR((findn_t *t));
X#ifdef	FIND_MAIN
XLOCAL	int	walkfunc	__PR((char *nm, struct stat *fs, int type, struct WALK *state));
X#endif
X#ifdef	__FIND__
XLOCAL	inline BOOL find_expr	__PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t));
X#else
XEXPORT	BOOL	find_expr	__PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t));
X#endif
X#ifdef	HAVE_FORK
XLOCAL	BOOL	doexec		__PR((char *f, findn_t *t, int ac, char **av, struct WALK *state));
X#endif
XLOCAL	int	countenv	__PR((void));
XLOCAL	int	argsize		__PR((int xtype));
XLOCAL	int	extype		__PR((char *name));
X#ifdef	MULTI_ARG_MAX
XLOCAL	int	xargsize	__PR((int xtype, int maxarg));
X#endif
XLOCAL	BOOL	pluscreate	__PR((FILE *f, int ac, char **av, finda_t *fap));
X#ifdef	HAVE_FORK
XLOCAL	BOOL	plusexec	__PR((char *f, findn_t *t, struct WALK *state));
X#endif
XEXPORT	int	find_plusflush	__PR((void *p, struct WALK *state));
XEXPORT	void	find_usage	__PR((FILE *f));
X#ifdef	FIND_MAIN
XLOCAL	int	getflg		__PR((char *optstr, long *argp));
XEXPORT	int	main		__PR((int ac, char **av));
X#endif
X
X
XEXPORT void
Xfind_argsinit(fap)
X	finda_t	*fap;
X{
X	fap->Argc = 0;
X	fap->Argv = (char **)NULL;
X	fap->std[0] = stdin;
X	fap->std[1] = stdout;
X	fap->std[2] = stderr;
X	fap->primtype = 0;
X	fap->found_action = FALSE;
X	fap->patlen = 0;
X	fap->walkflags = 0;
X	fap->maxdepth = -1;
X	fap->mindepth = -1;
X	fap->plusp = (struct plusargs *)NULL;
X	fap->jmp = NULL;
X	fap->error = 0;
X}
X
XEXPORT void
Xfind_timeinit(now)
X	time_t	now;
X{
X	find_now	= now + 60;
X	find_sixmonth	= now - 6L*30L*24L*60L*60L;
X}
X
XEXPORT findn_t *
Xfind_printnode()
X{
X	return (&Printnode);
X}
X
X/*
X * Add a -print node to the parsed tree if there is no action already.
X */
XEXPORT findn_t *
Xfind_addprint(np, fap)
X	findn_t	*np;
X	finda_t	*fap;
X{
X	findn_t	*n;
X
X	n = allocnode(fap);
X	if (n == NULL) {
X		find_freenode(np);
X		return ((void *)NULL);
X	}
X	n->op = AND;
X	n->left = (char *)np;
X	n->right = (char *)&Printnode;
X	return (n);
X}
X
X/*
X * allocnode is currently called by:
X *	find_addprint(), parse(), parseand(), parseprim()
X */
XLOCAL findn_t *
Xallocnode(fap)
X	finda_t	*fap;
X{
X	findn_t *n;
X
X	n = __fjmalloc(fap->std[2], sizeof (findn_t), "allocnode", JM_RETURN);
X	if (n == NULL)
X		return (n);
X	n->left = 0;
X	n->right = 0;
X	n->this = 0;
X	n->op = 0;
X	n->val.l = 0;
X	n->val2.l = 0;
X	return (n);
X}
X
XEXPORT void
Xfind_free(t, fap)
X	findn_t	*t;
X	finda_t	*fap;
X{
X	if (fap != NULL) {
X		struct plusargs *p;
X		struct plusargs *np = NULL;
X
X		for (p = fap->plusp; p != NULL; p = np) {
X			np = p->next;
X			free(p);
X		}
X	}
X
X	find_freenode(t);
X}
X
XLOCAL void
Xfind_freenode(t)
X	findn_t	*t;
X{
X	if (t == (findn_t *)NULL || t == &Printnode)
X		return;
X
X	switch (t->op) {
X
X	case OPEN:
X	case LNOT:
X		find_freenode((findn_t *)t->this);
X		break;
X	case AND:
X	case LOR:
X		find_freenode((findn_t *)t->left);
X		find_freenode((findn_t *)t->right);
X		break;
X	case PAT:
X	case PPAT:
X	case LPAT:
X		if (t->right != NULL)
X			free(t->right);	/* aux array for patcompile() */
X		break;
X	case FLS:
X	case FPRINT:
X	case FPRINT0:
X	case FPRINTNNL:
X		fclose(t->val.fp);
X	default:
X		;
X	}
X	free(t);
X}
X
XLOCAL void
Xnexttoken(fap)
X	register finda_t	*fap;
X{
X	if (!_nexttoken(fap)) {
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X	}
X}
X
X/*
X * No errjmp() variant of nexttoken(), returns FALSE on error.
X */
XLOCAL BOOL
X_nexttoken(fap)
X	register finda_t	*fap;
X{
X	register char	*word;
X	register char	*tail;
X
X	if (fap->Argc <= 0) {
X		fap->primtype = FIND_ENDARGS;
X		return (TRUE);
X	}
X	word = *fap->Argv;
X	if ((tail = strchr(word, '=')) != NULL) {
X#ifdef	XXX
X		if (*tail == '\0') {
X			fap->Argv++; fap->Argc--;
X		} else
X#endif
X			*fap->Argv = ++tail;
X	} else {
X		fap->Argv++; fap->Argc--;
X	}
X	if ((fap->primtype = find_token(word)) >= 0)
X		return (TRUE);
X
X	ferrmsgno(fap->std[2], EX_BAD, gettext("Bad Option: '%s'.\n"), word);
X	find_usage(fap->std[2]);
X	fap->primtype = FIND_ERRARG;	/* Mark as "parse aborted"	*/
X	return (FALSE);
X}
X
XLOCAL void
Xerrjmp(fap, err)
X	register finda_t	*fap;
X		int		err;
X{
X	fap->primtype	= FIND_ERRARG;	/* Mark as "parse aborted"	*/
X	fap->error	= err;		/* Set error return		*/
X
X	siglongjmp(((sigjmps_t *)fap->jmp)->jb, 1);
X	/* NOTREACHED */
X}
X
XEXPORT int
Xfind_token(word)
X	register char	*word;
X{
X	char	**tp;
X	char	*tn;
X	char	*equalp;
X	int	type;
X
X	if ((equalp = strchr(word, '=')) != NULL)
X		*equalp = '\0';
X
X	if (*word == '-') {
X		/*
X		 * Do not allow -(, -), -!
X		 */
X		if (word[1] == '\0' || !strchr("()!", word[1]))
X			word++;
X	} else if (!strchr("()!", word[0]) && (!equalp || equalp[1] == '\0')) {
X		goto bad;
X	}
X	for (type = 0, tp = tokennames; *tp; tp++, type++) {
X		tn = *tp;
X		if (*tn != *word)
X			continue;
X		if (streql(tn, word)) {
X			if (equalp)
X				*equalp = '=';
X			return (type);
X		}
X	}
Xbad:
X	if (equalp)
X		*equalp = '=';
X
X	return (-1);
X}
X
XEXPORT char *
Xfind_tname(op)
X	int	op;
X{
X	if (op >= 0 && op < NTOK)
X		return (tokennames[op]);
X	return ("unknown");
X}
X
XLOCAL char *
Xnextarg(fap, t)
X	finda_t	*fap;
X	findn_t	*t;
X{
X	if (fap->Argc-- <= 0) {
X		char	*prim	= NULL;
X		int	pt	= t->op;
X
X		if (pt >= 0 && pt < NTOK)
X			prim = tokennames[pt];
X		if (prim) {
X			ferrmsgno(fap->std[2], EX_BAD,
X				gettext("Missing arg for '%s%s'.\n"),
X				pt > LNOT ? "-":"", prim);
X		} else {
X			ferrmsgno(fap->std[2], EX_BAD,
X				gettext("Missing arg.\n"));
X		}
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X		return ((char *)0);
X	} else {
X		return (*fap->Argv++);
X	}
X}
X
XEXPORT findn_t *
Xfind_parse(fap)
X	finda_t	*fap;
X{
X	findn_t		*ret;
X
X	if (!_nexttoken(fap))
X		return ((findn_t *)NULL);	/* Immediate parse error */
X	if (fap->primtype == FIND_ENDARGS)
X		return ((findn_t *)NULL);	/* Empty command	 */
X
X	ret = parse(fap);
X	if (ret)
X		return (ret);
X
X	if (fap->primtype == HELP) {
X		fap->primtype = FIND_ERRARG;
X	} else if (fap->error == 0) {
X		fap->primtype = FIND_ERRARG;
X		fap->error = geterrno();
X		if (fap->error == 0)
X			fap->error = EX_BAD;
X	}
X	return (ret);
X}
X
XLOCAL findn_t *
Xparse(fap)
X	finda_t	*fap;
X{
X	findn_t	*n;
X
X	n = parseand(fap);
X	if (n == NULL)
X		return (n);
X	if (fap->primtype == LOR) {
X		findn_t	*l = allocnode(fap);
X
X		if (l == NULL)
X			goto err;
X		l->left = (char *)n;
X		l->op = fap->primtype;
X		if (_nexttoken(fap))
X			l->right = (char *)parse(fap);
X		if (l->right == NULL) {
X			find_freenode(l);
X			n = NULL;		/* Do not free twice		*/
X			goto err;
X		}
X		return (l);
X	}
X	return (n);
Xerr:
X	find_freenode(n);
X	fap->primtype = FIND_ERRARG;		/* Mark as "parse aborted"	*/
X	return ((findn_t *)NULL);
X}
X
XLOCAL findn_t *
Xparseand(fap)
X	finda_t	*fap;
X{
X	findn_t	*n;
X
X	n = parseprim(fap);
X	if (n == NULL)
X		return (n);
X
X	if ((fap->primtype == AND) ||
X	    (fap->primtype != LOR && fap->primtype != CLOSE &&
X	    fap->primtype != FIND_ENDARGS)) {
X		findn_t	*l = allocnode(fap);
X		BOOL	ok = TRUE;
X
X		if (l == NULL)
X			goto err;
X		l->left = (char *)n;
X		l->op = AND;		/* If no Operator, default to AND -a */
X		if (fap->primtype == AND) /* Fetch Operator for next node */
X			ok = _nexttoken(fap);
X		if (ok)
X			l->right = (char *)parseand(fap);
X		if (l->right == NULL) {
X			find_freenode(l);
X			n = NULL;		/* Do not free twice		*/
X			goto err;
X		}
X		return (l);
X	}
X	return (n);
Xerr:
X	find_freenode(n);
X	fap->primtype = FIND_ERRARG;		/* Mark as "parse aborted"	*/
X	return ((findn_t *)NULL);
X}
X
XLOCAL findn_t *
Xparseprim(fap)
X	finda_t	*fap;
X{
X	sigjmps_t	jmp;
X	sigjmps_t	*ojmp = fap->jmp;
X	register findn_t *n;
X	register char	*p;
X		Llong	ll;
X
X	n = allocnode(fap);
X	if (n == (findn_t *)NULL) {
X		fap->primtype = FIND_ERRARG;	/* Mark as "parse aborted"	*/
X		return ((findn_t *)NULL);
X	}
X
X	fap->jmp = &jmp;
X	if (sigsetjmp(jmp.jb, 1) != 0) {
X		/*
X		 * We come here from siglongjmp()
X		 */
X		find_freenode(n);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return ((findn_t *)NULL);
X	}
X	switch (n->op = fap->primtype) {
X
X	/*
X	 * Use simple to old (historic) shell globbing.
X	 */
X	case INAME:
X	case ILNAME:
X	case IPATH:
X#ifndef	FNM_IGNORECASE
X		ferrmsgno(fap->std[2],
X			EX_BAD, gettext("The primary '-%s' is unsupported on this OS.\n"),
X					tokennames[n->op]);
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X#endif
X	case NAME:
X	case PATH:
X	case LNAME:
X#ifndef	HAVE_FNMATCH
X#define	HAVE_FNMATCH				/* We have fnmatch() in libschily */
X#endif
X#if	defined(HAVE_FNMATCH)
X		n->this = nextarg(fap, n);
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X#endif
X		/* FALLTHRU */
X		/* Implement "fallback" to patmatch() if we have no fnmatch() */
X
X	/*
X	 * Use patmatch() which is a regular expression matcher that implements
X	 * extensions that are compatible to old (historic) shell globbing.
X	 */
X	case IPAT:
X	case IPPAT:
X	case ILPAT:
X		ferrmsgno(fap->std[2],
X			EX_BAD, gettext("The primary '-%s' is currently unsupported.\n"),
X					tokennames[n->op]);
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X	case PAT:
X	case PPAT:
X	case LPAT: {
X		int	plen;
X
X		plen = strlen(n->this = nextarg(fap, n));
X		if (plen > fap->patlen)
X			fap->patlen = plen;
X		n->right = __fjmalloc(fap->std[2], sizeof (int)*plen,
X						"space for pattern", fap->jmp);
X
X		if ((n->val.i = patcompile((Uchar *)n->this, plen, (int *)n->right)) == 0) {
X			ferrmsgno(fap->std[2],
X				EX_BAD, gettext("Bad pattern in '-%s %s'.\n"),
X						tokennames[n->op], n->this);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case SIZE: {
X		char	*numarg;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		p = n->left = nextarg(fap, n);
X		numarg = p;
X		if (p[0] == '-' || p[0] == '+')
X			numarg = ++p;
X		p = astoll(p, &ll);
X		if (p[0] == '\0') {
X			/* EMPTY */
X			;
X		} else if (p[0] == 'c' && p[1] == '\0') {
X			n->this = p;
X		} else if (getllnum(numarg, &ll) == 1) {
X			n->this = p;
X		} else if (*p) {
X			ferrmsgno(fap->std[2], EX_BAD,
X			gettext("Non numeric character '%c' in '-size %s'.\n"),
X				*p, n->left);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		n->val.size = ll;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case EMPTY:
X		fap->walkflags &= ~WALK_NOSTAT;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case LINKS:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		p = n->left = nextarg(fap, n);
X		if (p[0] == '-' || p[0] == '+')
X			p++;
X		p = astoll(p, &ll);
X		if (*p) {
X			ferrmsgno(fap->std[2], EX_BAD,
X			gettext("Non numeric character '%c' in '-links %s'.\n"),
X				*p, n->left);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		n->val.nlink = ll;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case INUM:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		p = n->left = nextarg(fap, n);
X		if (p[0] == '-' || p[0] == '+')
X			p++;
X		p = astoll(p, &ll);
X		if (*p) {
X			ferrmsgno(fap->std[2], EX_BAD,
X			gettext("Non numeric character '%c' in '-inum %s'.\n"),
X				*p, n->left);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		n->val.ino = ll;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case LINKEDTO: {
X		struct stat ns;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		if (stat(n->left = nextarg(fap, n), &ns) < 0) {
X			ferrmsg(fap->std[2],
X				gettext("Cannot stat '%s'.\n"), n->left);
X			errjmp(fap, geterrno());
X			/* NOTREACHED */
X		}
X		n->val.ino = ns.st_ino;
X		n->val2.dev = ns.st_dev;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case AMIN:
X	case CMIN:
X	case MMIN:
X		n->val2.i = 1;
X	case TIME:
X	case ATIME:
X	case CTIME:
X	case MTIME: {
X		int	len;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		p = n->left = nextarg(fap, n);
X		if (p[0] == '-' || p[0] == '+')
X			p++;
X		if (gettnum(p, &n->val.time) != 1) {
X			ferrmsgno(fap->std[2], EX_BAD,
X				gettext("Bad timespec in '-%s %s'.\n"),
X				tokennames[n->op], n->left);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		if (n->val2.i)
X			n->val.time *= 60;
X
X		len = strlen(p);
X		if (len > 0) {
X			len = (Uchar)p[len-1];
X			if (!(len >= '0' && len <= '9')) {
X				if (n->val2.i) { /* -mmin, No ext. time spec */
X					ferrmsgno(fap->std[2], EX_BAD,
X					gettext("Unsupported timespec in '-%s %s'.\n"),
X						tokennames[n->op], n->left);
X					errjmp(fap, geterrno());
X					/* NOTREACHED */
X				}
X				n->val2.i = 1;	/* Ext. time spec permitted */
X			}
X		}
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case NEWERAA:
X	case NEWERCA:
X	case NEWERMA: {
X		struct stat ns;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		if (stat(n->left = nextarg(fap, n), &ns) < 0) {
X			ferrmsg(fap->std[2],
X				gettext("Cannot stat '%s'.\n"), n->left);
X			errjmp(fap, geterrno());
X			/* NOTREACHED */
X		}
X		n->val.time = ns.st_atime;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case NEWERAC:
X	case NEWERCC:
X	case NEWERMC: {
X		struct stat ns;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		if (stat(n->left = nextarg(fap, n), &ns) < 0) {
X			ferrmsg(fap->std[2],
X				gettext("Cannot stat '%s'.\n"), n->left);
X			errjmp(fap, geterrno());
X			/* NOTREACHED */
X		}
X		n->val.time = ns.st_ctime;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case NEWERAM:
X	case NEWERCM:
X	case NEWERMM:
X	case NEWER: {
X		struct stat ns;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		if (stat(n->left = nextarg(fap, n), &ns) < 0) {
X			ferrmsg(fap->std[2],
X				gettext("Cannot stat '%s'.\n"), n->left);
X			errjmp(fap, geterrno());
X			/* NOTREACHED */
X		}
X		n->val.time = ns.st_mtime;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X	case TYPE:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		n->this = (char *)nextarg(fap, n);
X		switch (*(n->this)) {
X
X		case 'b': case 'c': case 'd': case 'D':
X		case 'e': case 'f': case 'l': case 'p':
X		case 's':
X			if ((n->this)[1] == '\0') {
X				nexttoken(fap);
X				fap->jmp = ojmp; /* Restore old jump target */
X				return (n);
X			}
X		}
X		ferrmsgno(fap->std[2], EX_BAD,
X			gettext("Bad type '%c' in '-type %s'.\n"),
X			*n->this, n->this);
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X		break;
X
X	case FSTYPE:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X#ifdef	HAVE_ST_FSTYPE
X		n->this = (char *)nextarg(fap, n);
X#else
X		ferrmsgno(fap->std[2], EX_BAD,
X			gettext("-fstype not supported by this OS.\n"));
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X#endif
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case LOCL:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X#ifndef	HAVE_ST_FSTYPE
X		ferrmsgno(fap->std[2], EX_BAD,
X			gettext("-local not supported by this OS.\n"));
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X#endif
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X#ifdef	CHOWN
X	case CHOWN:
X#endif
X	case USER: {
X		struct  passwd  *pw;
X		char		*u;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		u = n->left = nextarg(fap, n);
X		if (u[0] == '-' || u[0] == '+')
X			u++;
X		if ((pw = getpwnam(u)) != NULL) {
X			n->val.uid = pw->pw_uid;
X		} else {
X			if (*astoll(n->left, &ll)) {
X				ferrmsgno(fap->std[2], EX_BAD,
X				gettext("User '%s' not in passwd database.\n"),
X				n->left);
X				errjmp(fap, EX_BAD);
X				/* NOTREACHED */
X			}
X			n->val.uid = ll;
X		}
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X#ifdef	CHGRP
X	case CHGRP:
X#endif
X	case GROUP: {
X		struct  group	*gr;
X		char		*g;
X
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		g = n->left = nextarg(fap, n);
X		if (g[0] == '-' || g[0] == '+')
X			g++;
X		if ((gr = getgrnam(g)) != NULL) {
X			n->val.gid = gr->gr_gid;
X		} else {
X			if (*astoll(n->left, &ll)) {
X				ferrmsgno(fap->std[2], EX_BAD,
X				gettext("Group '%s' not in group database.\n"),
X				n->left);
X				errjmp(fap, EX_BAD);
X				/* NOTREACHED */
X			}
X			n->val.gid = ll;
X		}
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	}
X
X#ifdef	CHMOD
X	case CHMOD:
X#endif
X	case PERM:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		p = n->left = nextarg(fap, n);
X		if (p[0] == '+') {
X			if (p[1] == '0' ||
X			    p[1] == 'u' || p[1] == 'g' || p[1] == 'o' || p[1] == 'a')
X				p++;
X			else
X				n->left = "";
X		}
X		if (getperm(fap->std[2], p, tokennames[n->op],
X				&n->val.mode, (mode_t)0,
X				n->op == PERM ? GP_FPERM|GP_XERR:GP_NOX) < 0) {
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case MODE:
X		fap->walkflags &= ~WALK_NOSTAT;
X
X		ferrmsgno(fap->std[2], EX_BAD,
X				gettext("-mode not yet implemented.\n"));
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case XDEV:
X	case MOUNT:
X		fap->walkflags &= ~WALK_NOSTAT;
X		fap->walkflags |= WALK_MOUNT;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	case DEPTH:
X		fap->walkflags |= WALK_DEPTH;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X	case FOLLOW:
X		fap->walkflags &= ~WALK_PHYS;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case MAXDEPTH:
X	case MINDEPTH:
X		p = n->left = nextarg(fap, n);
X		p = astoll(p, &ll);
X		if (*p) {
X			ferrmsgno(fap->std[2], EX_BAD,
X			gettext("Non numeric character '%c' in '-%s %s'.\n"),
X				*p, tokennames[n->op], n->left);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X		n->val.l = ll;
X		if (n->op == MAXDEPTH)
X			fap->maxdepth = ll;
X		else
X			fap->mindepth = ll;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case NOUSER:
X	case NOGRP:
X	case PACL:
X	case XATTR:
X	case SPARSE:
X	case DOSTAT:
X		fap->walkflags &= ~WALK_NOSTAT;
X		/* FALLTHRU */
X	case PRUNE:
X	case LTRUE:
X	case LFALSE:
X	case READABLE:
X	case WRITABLE:
X	case EXECUTABLE:
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case OK_EXEC:
X	case OK_EXECDIR:
X	case EXEC:
X	case EXECDIR: {
X		int	i = 1;
X
X		n->this = (char *)fap->Argv;	/* Cheat: Pointer is pointer */
X		nextarg(fap, n);		/* Eat up cmd name	    */
X		while ((p = nextarg(fap, n)) != NULL) {
X			if (streql(p, ";"))
X				break;
X			else if (streql(p, "+") && streql(fap->Argv[-2], "{}")) {
X				if (n->op == OK_EXECDIR || n->op == EXECDIR) {
X					ferrmsgno(fap->std[2], EX_BAD,
X					gettext("'-%s' does not yet work with '+'.\n"),
X						tokennames[n->op]);
X					errjmp(fap, EX_BAD);
X					/* NOTREACHED */
X				}
X				n->op = fap->primtype = EXECPLUS;
X				if (!pluscreate(fap->std[2], --i, (char **)n->this, fap)) {
X					errjmp(fap, EX_BAD);
X					/* NOTREACHED */
X				}
X				n->this = (char *)fap->plusp;
X				break;
X			}
X			i++;
X		}
X		n->val.i = i;
X#ifdef	PLUS_DEBUG
X		if (0) {
X			char **pp = (char **)n->this;
X			for (i = 0; i < n->val.i; i++, pp++)
X				printf("ARG %d '%s'\n", i, *pp);
X		}
X#endif
X	}
X	/* FALLTHRU */
X
X	case LS:
X		fap->walkflags &= ~WALK_NOSTAT;
X		goto found_action;
X	case FLS:
X		fap->walkflags &= ~WALK_NOSTAT;
X	case FPRINT:
X	case FPRINT0:
X	case FPRINTNNL:
X		p = nextarg(fap, n);
X		n->val.fp = fileopen(p, "wcta");
X		if (n->val.fp == NULL) {
X			ferrmsg(fap->std[2],
X			gettext("Cannot open '%s' for '-%s'.\n"),
X				p, tokennames[n->op]);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		}
X	case PRINT:
X	case PRINT0:
X	case PRINTNNL:
X	found_action:
X		fap->found_action = TRUE;
X		nexttoken(fap);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case FIND_ENDARGS:
X#ifdef	DEBUG
X		ferrmsgno(fap->std[2], EX_BAD,
X				gettext("ENDARGS in parseprim()\n"));
X#endif
X		ferrmsgno(fap->std[2], EX_BAD,
X				gettext("Incomplete expression.\n"));
X		find_freenode(n);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return ((findn_t *)NULL);
X
X	case OPEN:
X		nexttoken(fap);
X		n->this = (char *)parse(fap);
X		if (n->this == NULL) {
X			find_freenode(n);
X			fap->jmp = ojmp;	/* Restore old jump target */
X			return ((findn_t *)NULL);
X		}
X		if (fap->primtype != CLOSE) {
X			ferrmsgno(fap->std[2], EX_BAD,
X				gettext("Found '%s', but ')' expected.\n"),
X				fap->Argv[-1]);
X			errjmp(fap, EX_BAD);
X			/* NOTREACHED */
X		} else {
X			nexttoken(fap);
X			fap->jmp = ojmp;	/* Restore old jump target */
X			return (n);
X		}
X		break;
X
X	case CLOSE:
X		/*
X		 * The triggering arg is at fap->Argv[-2].
X		 */
X		ferrmsgno(fap->std[2], EX_BAD, gettext("Missing '('.\n"));
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X
X	case LNOT:
X		nexttoken(fap);
X		n->this = (char *)parseprim(fap);
X		if (n->this == NULL) {
X			find_freenode(n);
X			n = (findn_t *)NULL;
X		}
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return (n);
X
X	case AND:
X	case LOR:
X		ferrmsgno(fap->std[2], EX_BAD,
X		gettext("Invalid expression with '-%s'.\n"), tokennames[n->op]);
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X
X	case HELP:
X		find_usage(fap->std[2]);
X		find_freenode(n);
X		fap->jmp = ojmp;		/* Restore old jump target */
X		return ((findn_t *)NULL);
X
X	default:
X		ferrmsgno(fap->std[2], EX_BAD,
X		gettext(
X		"Internal malfunction, found unknown primary '-%s' (%d).\n"),
X			find_tname(n->op), n->op);
X		errjmp(fap, EX_BAD);
X		/* NOTREACHED */
X	}
X	fap->jmp = ojmp;			/* Restore old jump target */
X	fap->primtype = FIND_ERRARG;		/* Mark as "parse aborted" */
X	return (0);
X}
X
X#define	S_ALLPERM	(S_IRWXU|S_IRWXG|S_IRWXO)
X#define	S_ALLFLAGS	(S_ISUID|S_ISGID|S_ISVTX)
X#define	S_ALLMODES	(S_ALLFLAGS | S_ALLPERM)
X
XEXPORT void
Xfind_firstprim(pac, pav)
X	int	*pac;
X	char    *const *pav[];
X{
X	register int	cac  = *pac;
X	register char *const *cav = *pav;
X	register char	c;
X
X	while (cac > 0 &&
X		(c = **cav) != '-' && c != '(' && c != ')' && c != '!') {
X		cav++;
X		cac--;
X	}
X	*pac = cac;
X	*pav = cav;
X}
X
XEXPORT BOOL
Xfind_primary(t, op)
X	findn_t	*t;
X	int	op;
X{
X	BOOL	ret = FALSE;
X
X	if (t->op == op) {
X		return (TRUE);
X	}
X	switch (t->op) {
X
X	case OPEN:
X		ret = find_primary((findn_t *)t->this, op);
X		break;
X	case LNOT:
X		ret = find_primary((findn_t *)t->this, op);
X		break;
X	case AND:
X		ret = find_primary((findn_t *)t->left, op);
X		if (ret)
X			return (ret);
X		ret = find_primary((findn_t *)t->right, op);
X		break;
X	case LOR:
X		ret = find_primary((findn_t *)t->left, op);
X		if (ret)
X			return (ret);
X		ret = find_primary((findn_t *)t->right, op);
X		break;
X
X	default:
X		;
X	}
X	return (ret);
X}
X
XEXPORT BOOL
Xfind_pname(t, word)
X	findn_t	*t;
X	char	*word;
X{
X	if (streql(word, "-exec+"))
X		return (find_primary(t, EXECPLUS));
X	if (streql(word, "-execdir+"))
X		return (find_primary(t, EXECDIRPLUS));
X	return (find_primary(t, find_token(word)));
X}
X
XEXPORT BOOL
Xfind_hasprint(t)
X	findn_t	*t;
X{
X	if (t == NULL)
X		return (FALSE);
X
X	if (find_primary(t, PRINT) || find_primary(t, PRINTNNL) ||
X	    find_primary(t, PRINT0))
X		return (TRUE);
X	if (find_primary(t, LS))
X		return (TRUE);
X	return (FALSE);
X}
X
XEXPORT BOOL
Xfind_hasexec(t)
X	findn_t	*t;
X{
X	if (t == NULL)
X		return (FALSE);
X
X	if (find_primary(t, EXEC) || find_primary(t, EXECPLUS))
X		return (TRUE);
X	if (find_primary(t, EXECDIR) || find_primary(t, EXECDIRPLUS))
X		return (TRUE);
X	if (find_primary(t, OK_EXEC) || find_primary(t, OK_EXECDIR))
X		return (TRUE);
X	return (FALSE);
X}
X
X#ifdef	FIND_MAIN
XLOCAL int
Xwalkfunc(nm, fs, type, state)
X	char		*nm;
X	struct stat	*fs;
X	int		type;
X	struct WALK	*state;
X{
X	if (type == WALK_NS) {
X		ferrmsg(state->std[2], gettext("Cannot stat '%s'.\n"), nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) {
X		ferrmsg(state->std[2],
X				gettext("Cannot follow symlink '%s'.\n"), nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_DNR) {
X		if (state->flags & WALK_WF_NOCHDIR) {
X			ferrmsg(state->std[2],
X				gettext("Cannot chdir to '%s'.\n"), nm);
X		} else {
X			ferrmsg(state->std[2],
X				gettext("Cannot read '%s'.\n"), nm);
X		}
X		state->err = 1;
X		return (0);
X	}
X
X	if (state->maxdepth >= 0 && state->level >= state->maxdepth)
X		state->flags |= WALK_WF_PRUNE;
X	if (state->mindepth >= 0 && state->level < state->mindepth)
X		return (0);
X
X	find_expr(nm, nm + state->base, fs, state, state->tree);
X	return (0);
X}
X#endif
X
X#ifdef	__FIND__
XLOCAL inline BOOL
X#else
XEXPORT BOOL
X#endif
Xfind_expr(f, ff, fs, state, t)
X	char		*f;	/* path name */
X	char		*ff;	/* file name */
X	struct stat	*fs;
X	struct WALK	*state;
X	findn_t		*t;
X{
X	time_t	xtime;
X	FILE	*fp = state->std[1];
X	char	*p;
X	char	lname[8192];
X	int	fnflags = 0;
X
X	switch (t->op) {
X
X	case ILNAME:
X#ifdef	FNM_IGNORECASE
X		fnflags = FNM_IGNORECASE;
X#endif
X	case LNAME: {
X		int	lsize;
X
X		if (!S_ISLNK(fs->st_mode))
X			return (FALSE);
X
X		if (state->lname != NULL) {
X			p = state->lname;
X			goto nmatch;
X		}
X		lname[0] = '\0';
X		/*
X		 * For file names from the command line, we did not perform
X		 * a chdir() before, so we need to use the full path name.
X		 */
X		lsize = readlink(state->level ? ff : f, lname, sizeof (lname));
X		if (lsize < 0) {
X			ferrmsg(state->std[2],
X				gettext("Cannot read link '%s'.\n"), ff);
X			return (FALSE);
X		}
X		lname[sizeof (lname)-1] = '\0';
X		if (lsize >= 0)
X			lname[lsize] = '\0';
X		p = lname;
X		goto nmatch;
X	}
X	case IPATH:
X#ifdef	FNM_IGNORECASE
X		fnflags = FNM_IGNORECASE;
X#endif
X	case PATH:
X		p = f;
X		goto nmatch;
X	case INAME:
X#ifdef	FNM_IGNORECASE
X		fnflags = FNM_IGNORECASE;
X#endif
X	case NAME:
X		p = ff;
X	nmatch:
X#if	defined(HAVE_FNMATCH)
X		return (!fnmatch(t->this, p, fnflags));
X#else
X		goto pattern;		/* Use patmatch() as "fallback" */
X#endif
X
X	case LPAT: {
X		int	lsize;
X
X		if (!S_ISLNK(fs->st_mode))
X			return (FALSE);
X
X		if (state->lname != NULL) {
X			p = state->lname;
X			goto pattern;
X		}
X		lname[0] = '\0';
X		/*
X		 * For file names from the command line, we did not perform
X		 * a chdir() before, so we need to use the full path name.
X		 */
X		lsize = readlink(state->level ? ff : f, lname, sizeof (lname));
X		if (lsize < 0) {
X			ferrmsg(state->std[2],
X				gettext("Cannot read link '%s'.\n"), ff);
X			return (FALSE);
X		}
X		lname[sizeof (lname)-1] = '\0';
X		if (lsize >= 0)
X			lname[lsize] = '\0';
X		p = lname;
X		goto pattern;
X	}
X	case PPAT:
X		p = f;
X		goto pattern;
X	case PAT:
X		p = ff;
X	pattern: {
X		Uchar	*pr;		/* patmatch() return */
X
X		pr = patmatch((Uchar *)t->this, (int *)t->right,
X			(Uchar *)p, 0, strlen(p), t->val.i, state->patstate);
X		return (*p && pr && (*pr == '\0'));
X	}
X
X	case SIZE:
X		switch (*(t->left)) {
X		case '+':
X			if (t->this)
X				return (fs->st_size    > t->val.size);
X			return ((fs->st_size+511)/512  > t->val.size);
X		case '-':
X			if (t->this)
X				return (fs->st_size   <  t->val.size);
X			return ((fs->st_size+511)/512 <  t->val.size);
X		default:
X			if (t->this)
X				return (fs->st_size   == t->val.size);
X			return ((fs->st_size+511)/512 == t->val.size);
X		}
X
X	case EMPTY:
X		if (S_ISREG(fs->st_mode) && fs->st_size == 0)
X			return (TRUE);
X		/*
X		 * For file names from the command line, we did not perform
X		 * a chdir() before, so we need to use the full path name.
X		 */
X		if (S_ISDIR(fs->st_mode)) {
X			struct dirent	*dp;
X			DIR		*d = opendir(state->level ? ff : f);
X
X			if (d == NULL) {
X				ferrmsg(state->std[2],
X					gettext("Cannot open directory '%s'.\n"),
X					ff);
X				return (FALSE);
X			}
X			while ((dp = readdir(d)) != NULL) {
X				register char *name = dp->d_name;
X				/*
X				 * Skip the following names: "", ".", "..".
X				 */
X				if (name[name[0] != '.' ? 0 :
X				    name[1] != '.' ? 1 : 2] == '\0')
X					continue;
X				closedir(d);
X				return (FALSE);
X			}
X			return (TRUE);
X		}
X		return (FALSE);
X
X	case LINKS:
X		switch (*(t->left)) {
X		case '+':
X			return (fs->st_nlink  > t->val.nlink);
X		case '-':
X			return (fs->st_nlink <  t->val.nlink);
X		default:
X			return (fs->st_nlink == t->val.nlink);
X		}
X
X	case INUM:
X		switch (*(t->left)) {
X		case '+':
X			return (fs->st_ino  > t->val.ino);
X		case '-':
X			return (fs->st_ino <  t->val.ino);
X		default:
X			return (fs->st_ino == t->val.ino);
X		}
X
X	case LINKEDTO:
X			return ((fs->st_ino == t->val.ino) &&
X				(fs->st_dev == t->val2.dev));
X
X	case READABLE:
X		t->val.i = R_OK;
X		goto check_access;
X	case WRITABLE:
X		t->val.i = W_OK;
X		goto check_access;
X	case EXECUTABLE:
X		t->val.i = X_OK;
X	check_access:
X		/*
X		 * For file names from the command line, we did not perform
X		 * a chdir() before, so we need to use the full path name.
X		 */
X		if (access(state->level ? ff : f, t->val.i) < 0)
X			return (FALSE);
X		return (TRUE);
X
X	case AMIN:
X	case ATIME:
X		xtime = fs->st_atime;
X		goto times;
X	case CMIN:
X	case CTIME:
X		xtime = fs->st_ctime;
X		goto times;
X	case MMIN:
X	case MTIME:
X	case TIME:
X		xtime = fs->st_mtime;
X	times:
X		if (t->val2.i != 0)
X			goto timex;
X
X		switch (*(t->left)) {
X		case '+':
X			return ((find_now-xtime)/DAYSECS >  t->val.time);
X		case '-':
X			return ((find_now-xtime)/DAYSECS <  t->val.time);
X		default:
X			return ((find_now-xtime)/DAYSECS == t->val.time);
X		}
X	timex:
X		switch (*(t->left)) {
X		case '+':
X			return ((find_now-xtime) >  t->val.time);
X		case '-':
X			return ((find_now-xtime) <  t->val.time);
X		default:
X			return ((find_now-xtime) == t->val.time);
X		}
X
X	case NEWERAA:
X	case NEWERAC:
X	case NEWERAM:
X		return (t->val.time < fs->st_atime);
X
X	case NEWERCA:
X	case NEWERCC:
X	case NEWERCM:
X		return (t->val.time < fs->st_ctime);
X
X	case NEWER:
X	case NEWERMA:
X	case NEWERMC:
X	case NEWERMM:
X		return (t->val.time < fs->st_mtime);
X
X	case TYPE:
X		switch (*(t->this)) {
X		case 'b':
X			return (S_ISBLK(fs->st_mode));
X		case 'c':
X			return (S_ISCHR(fs->st_mode));
X		case 'd':
X			return (S_ISDIR(fs->st_mode));
X		case 'D':
X			return (S_ISDOOR(fs->st_mode));
X		case 'e':
X			return (S_ISEVC(fs->st_mode));
X		case 'f':
X			return (S_ISREG(fs->st_mode));
X		case 'l':
X			return (S_ISLNK(fs->st_mode));
X		case 'p':
X			return (S_ISFIFO(fs->st_mode));
X		case 'P':
X			return (S_ISPORT(fs->st_mode));
X		case 's':
X			return (S_ISSOCK(fs->st_mode));
X		default:
X			return (FALSE);
X		}
X
X	case FSTYPE:
X#ifdef	HAVE_ST_FSTYPE
X		return (streql(t->this, fs->st_fstype));
X#else
X		return (TRUE);
X#endif
X
X	case LOCL:
X#ifdef	HAVE_ST_FSTYPE
X		if (streql("nfs", fs->st_fstype) ||
X		    streql("autofs", fs->st_fstype) ||
X		    streql("cachefs", fs->st_fstype))
X			return (FALSE);
X#endif
X		return (TRUE);
X
X#ifdef	CHOWN
X	case CHOWN:
X		fs->st_uid = t->val.uid;
X		return (TRUE);
X#endif
X
X	case USER:
X		switch (*(t->left)) {
X		case '+':
X			return (fs->st_uid  > t->val.uid);
X		case '-':
X			return (fs->st_uid <  t->val.uid);
X		default:
X			return (fs->st_uid == t->val.uid);
X		}
X
X#ifdef	CHGRP
X	case CHGRP:
X		fs->st_gid = t->val.gid;
X		return (TRUE);
X#endif
X
X	case GROUP:
X		switch (*(t->left)) {
X		case '+':
X			return (fs->st_gid  > t->val.gid);
X		case '-':
X			return (fs->st_gid <  t->val.gid);
X		default:
X			return (fs->st_gid == t->val.gid);
X		}
X
X#ifdef	CHMOD
X	case CHMOD:
X		getperm(state->std[2], t->left, tokennames[t->op],
X			&t->val.mode, fs->st_mode & S_ALLMODES,
X			(S_ISDIR(fs->st_mode) ||
X			(fs->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) != 0) ?
X								GP_DOX:GP_NOX);
X		fs->st_mode &= ~S_ALLMODES;
X		fs->st_mode |= t->val.mode;
X		return (TRUE);
X#endif
X
X	case PERM:
X		if (t->left[0] == '+')
X			return ((fs->st_mode & t->val.mode) != 0);
X		else if (t->left[0] == '-')
X			return ((fs->st_mode & t->val.mode) == t->val.mode);
X		else
X			return ((fs->st_mode & S_ALLMODES) == t->val.mode);
X
X	case MODE:
X		return (TRUE);
X
X	case XDEV:
X	case MOUNT:
X	case DEPTH:
X	case FOLLOW:
X	case DOSTAT:
X		return (TRUE);
X
X	case NOUSER:
X		return (getpwuid(fs->st_uid) == NULL);
X
X	case NOGRP:
X		return (getgrgid(fs->st_gid) == NULL);
X
X	case PRUNE:
X		state->flags |= WALK_WF_PRUNE;
X		return (TRUE);
X
X	case MAXDEPTH:
X	case MINDEPTH:
X		return (TRUE);
X
X	case PACL:
X		if (state->pflags & PF_ACL) {
X			return ((state->pflags & PF_HAS_ACL) != 0);
X		}
X		return (has_acl(state->std[2], f, ff, fs));
X
X	case XATTR:
X		if (state->pflags & PF_XATTR) {
X			return ((state->pflags & PF_HAS_XATTR) != 0);
X		}
X		return (has_xattr(state->std[2], ff));
X
X	case SPARSE:
X		if (!S_ISREG(fs->st_mode))
X			return (FALSE);
X#ifdef	HAVE_ST_BLOCKS
X		return (fs->st_size > (fs->st_blocks * DEV_BSIZE + DEV_BSIZE));
X#else
X		return (FALSE);
X#endif
X
X	case OK_EXEC:
X	case OK_EXECDIR: {
X		char qbuf[32];
X
X		fflush(state->std[1]);
X		fprintf(state->std[2], "< %s ... %s > ? ", ((char **)t->this)[0], f);
X		fflush(state->std[2]);
X		fgetline(state->std[0], qbuf, sizeof (qbuf) - 1);
X
X		switch (qbuf[0]) {
X		case 'y':
X			if (qbuf[1] == '\0' || streql(qbuf, "yes")) break;
X		default:
X			return (FALSE);
X		}
X	}
X	/* FALLTHRU */
X
X	case EXEC:
X	case EXECDIR:
X#ifdef	HAVE_FORK
X		return (doexec(
X			state->level && (t->op == OK_EXECDIR || t->op == EXECDIR)?
X			ff:f,
X			t, t->val.i, (char **)t->this, state));
X#else
X		ferrmsgno(state->std[2], EX_BAD,
X		gettext(
X		"'-%s' is unsupported on this platform, returning FALSE.\n"),
X				find_tname(t->op));
X		return (FALSE);
X#endif
X
X	case EXECPLUS:
X#ifdef	HAVE_FORK
X		return (plusexec(f, t, state));
X#else
X		ferrmsgno(state->std[2], EX_BAD,
X		gettext(
X		"'-%s' is unsupported on this platform, returning FALSE.\n"),
X				find_tname(t->op));
X		return (FALSE);
X#endif
X
X	case FPRINT:
X		fp = t->val.fp;
X		/* FALLTHRU */
X	case PRINT:
X		filewrite(fp, f, strlen(f));
X		putc('\n', fp);
X		return (TRUE);
X
X	case FPRINT0:
X		fp = t->val.fp;
X		/* FALLTHRU */
X	case PRINT0:
X		filewrite(fp, f, strlen(f));
X		putc('\0', fp);
X		return (TRUE);
X
X	case FPRINTNNL:
X		fp = t->val.fp;
X		/* FALLTHRU */
X	case PRINTNNL:
X		filewrite(fp, f, strlen(f));
X		putc(' ', fp);
X		return (TRUE);
X
X	case FLS:
X		fp = t->val.fp;
X		/* FALLTHRU */
X	case LS: {
X		FILE	*std[3];
X		/*
X		 * The third parameter is the file name used for readlink()
X		 * (inside find_list()) relatively to the current working
X		 * directory. For file names from the command line, we did not
X		 * perform a chdir() before, so we need to use the full path
X		 * name.
X		 */
X		std[0] = state->std[0];
X		std[1] = fp;
X		std[2] = state->std[2];
X		find_list(std, fs, f, state->level ? ff : f, state);
X		return (TRUE);
X	}
X	case LTRUE:
X		return (TRUE);
X
X	case LFALSE:
X		return (FALSE);
X
X	case OPEN:
X		return (find_expr(f, ff, fs, state, (findn_t *)t->this));
X	case LNOT:
X		return (!find_expr(f, ff, fs, state, (findn_t *)t->this));
X	case AND:
X		return (find_expr(f, ff, fs, state, (findn_t *)t->left) ?
X			find_expr(f, ff, fs, state, (findn_t *)t->right) : 0);
X	case LOR:
X		return (find_expr(f, ff, fs, state, (findn_t *)t->left) ?
X			1 : find_expr(f, ff, fs, state, (findn_t *)t->right));
X	}
X	if (!(state->pflags & 0x80000000)) {
X
X		ferrmsgno(state->std[2], EX_BAD,
X		gettext(
X		"Internal malfunction, found unknown primary '-%s' (%d).\n"),
X				find_tname(t->op), t->op);
X		state->pflags |= 0x80000000;
X	}
X	return (FALSE);		/* Unknown operator ??? */
X}
X
X#ifdef	HAVE_FORK
XLOCAL BOOL
Xdoexec(f, t, ac, av, state)
X	char	*f;
X	findn_t	*t;
X	int	ac;
X	char	**av;
X	struct WALK *state;
X{
X#ifdef	HAVE_VFORK
X	char	**aav = NULL;
X#endif
X	pid_t	pid;
X	int	retval;
X
X#ifdef	HAVE_VFORK
X	if (f && ac >= 32) {
X		aav = malloc((ac+1) * sizeof (char **));
X		if (aav == NULL) {
X			ferrmsg(state->std[2], gettext("Cannot malloc arg vector for -exec.\n"));
X			return (FALSE);
X		}
X	}
X#endif
X	if ((pid = vfork()) < 0) {
X#ifdef	HAVE_VFORK
X		ferrmsg(state->std[2], gettext("Cannot vfork child.\n"));
X#else
X		ferrmsg(state->std[2], gettext("Cannot fork child.\n"));
X#endif
X#ifdef	HAVE_VFORK
X		if (aav)
X			free(aav);
X#endif
X		return (FALSE);
X	}
X	if (pid) {
X		while (wait(&retval) != pid)
X			/* LINTED */
X			;
X#ifdef	HAVE_VFORK
X		if (aav)
X			free(aav);
X#endif
X		return (retval == 0);
X	} else {
X#ifdef	HAVE_VFORK
X			char	*xav[32];
X		register char	**pp2 = xav;
X#endif
X		register int	i;
X		register char	**pp = av;
X			int	err;
X
X		/*
X		 * This is the forked process and for this reason, we may
X		 * call fcomerr() here without problems.
X		 */
X		if (t != NULL &&	/* Not called from find_plusflush() */
X		    t->op != OK_EXECDIR && t->op != EXECDIR &&
X		    walkhome(state) < 0) {
X			fcomerr(state->std[2],
X					gettext("Cannot chdir to '.'.\n"));
X		}
X#ifndef	F_SETFD
X		walkclose(state);
X#endif
X
X#define	iscurlypair(p)	((p)[0] == '{' && (p)[1] == '}' && (p)[2] == '\0')
X
X#ifdef	HAVE_VFORK
X		if (aav)
X			pp2 = aav;
X#endif
X		if (f) {				/* NULL for -exec+ */
X			for (i = 0; i < ac; i++, pp++) {
X				register char	*p = *pp;
X
X#ifdef	HAVE_VFORK
X				if (iscurlypair(p))	/* streql(p, "{}") */
X					*pp2++ = f;
X				else
X					*pp2++ = p;
X#else
X				if (iscurlypair(p))	/* streql(p, "{}") */
X					*pp = f;
X#endif
X			}
X#ifdef	HAVE_VFORK
X			if (aav)
X				pp = aav;
X			else
X				pp = xav;
X#endif
X		} else {
X			pp = av;
X		}
X#ifndef	HAVE_VFORK
X		pp = av;
X#endif
X#ifdef	PLUS_DEBUG
X		error("argsize %d\n",
X			(plusp->endp - (char *)&plusp->nextargp[0]) -
X			(plusp->laststr - (char *)&plusp->nextargp[1]));
X#endif
X		pp[ac] = NULL;	/* -exec {} \; is not NULL terminated */
X
X		fexecve(av[0], state->std[0], state->std[1], state->std[2],
X							pp, state->env);
X		err = geterrno();
X#ifdef	PLUS_DEBUG
X		error("argsize %d\n",
X			(plusp->endp - (char *)&plusp->nextargp[0]) -
X			(plusp->laststr - (char *)&plusp->nextargp[1]));
X#endif
X		/*
X		 * This is the forked process and for this reason, we may
X		 * call _exit() here without problems.
X		 */
X		ferrmsgno(state->std[2], err,
X			gettext("Cannot execute '%s'.\n"), av[0]);
X		_exit(err);
X		/* NOTREACHED */
X		return (-1);
X	}
X}
X#endif	/* HAVE FORK */
X
X#ifndef	LINE_MAX
X#define	LINE_MAX	1024
X#endif
X
X#if	defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * We need to fetch the address of "environ" using a hack.
X */
X#include <crt_externs.h>
X#define	environ	*_NSGetEnviron()
X#else
Xextern	char **environ;
X#endif
X
X/*
X * Return the number of environment entries including the final NULL pointer.
X */
XLOCAL int
Xcountenv()
X{
X	register int	evs = 0;
X	register char	**ep;
X
X	for (ep = environ; *ep; ep++) {
X		evs++;
X	}
X	evs++;			/* The environ NULL ptr at the end */
X	return (evs);
X}
X
X/*
X * Return ARG_MAX - LINE_MAX - size of current environment.
X *
X * The return value is reduced by LINE_MAX to allow the called
X * program to do own exec(2) calls with slightly increased arg size.
X */
XLOCAL int
Xargsize(xtype)
X	int	xtype;
X{
X	static int	ret = 0;
X
X	if (ret == 0) {
X		register int	evs = 0;
X		register char	**ep;
X
X		for (ep = environ; *ep; ep++) {
X			evs += strlen(*ep) + 1 + sizeof (ep);
X		}
X		evs += sizeof (char **); /* The environ NULL ptr at the end */
X
X#ifdef	_SC_ARG_MAX
X		ret = sysconf(_SC_ARG_MAX);
X		if (ret < 0)
X#ifdef	_POSIX_ARG_MAX
X			ret = _POSIX_ARG_MAX;
X#else
X			ret = ARG_MAX;
X#endif
X#else	/* VV NO _SC_ARG_MAX VV */
X#ifdef	ARG_MAX
X		ret = ARG_MAX;
X#else
X#ifdef	NCARGS
X		/*
X		 * On Solaris: ARG_MAX = NCARGS - space for other stuff on
X		 * initial stack. This size is 256 for 32 bit and 512 for
X		 * 64 bit programs.
X		 */
X		ret = NCARGS - 256;	/* Let us do the same */
X#endif
X#endif
X#endif
X
X#ifdef	MULTI_ARG_MAX
X		ret = xargsize(xtype, ret);
X#endif
X
X#ifdef	PLUS_DEBUG
X		ret = 3000;
X#define		LINE_MAX	100
X		error("evs %d\n", evs);
X#endif
X		if (ret <= 0)
X			ret = 10000;	/* Just a guess */
X
X		ret -= evs;		/* Subtract current env size */
X		if ((ret - LINE_MAX) > 0)
X			ret -= LINE_MAX;
X		else
X			ret -= 100;
X	}
X	return (ret);
X}
X
X/*
X * Return the executable type:
X *
X *	0	unknown type -> default
X *	32	a 32 bit binary
X *	64	a 64 bit binary
X */
XLOCAL int
Xextype(name)
X	char	*name;
X{
X	int	f;
X	char	*xname;
X	char	elfbuf[8];
X
X	xname = findinpath(name, X_OK, TRUE, NULL);
X	if (name == NULL)
X		xname = name;
X
X	if ((f = open(xname, O_RDONLY|O_BINARY)) < 0) {
X		if (xname != name)
X			free(xname);
X		return (0);
X	}
X	if (xname != name)
X		free(xname);
X	if (read(f, elfbuf, sizeof (elfbuf)) < sizeof (elfbuf)) {
X		close(f);
X		return (0);
X	}
X	close(f);
X
X	/*
X	 * We only support ELF binaries
X	 */
X	if (elfbuf[0] != 0x7F ||
X	    elfbuf[1] != 'E' || elfbuf[2] != 'L' || elfbuf[3] != 'F')
X		return (0);
X
X	switch (elfbuf[4] & 0xFF) {
X
X	case 1:	/* ELFCLASS32 */
X		return (32);
X
X	case 2:	/* ELFCLASS64 */
X		return (64);
X	}
X	return (0);
X}
X
X#ifdef	MULTI_ARG_MAX
X/*
X * If we have both _ARG_MAX32 and _ARG_MAX64 (currently on SunOS)
X * correct maxarg based on the target binary type.
X */
XLOCAL int
Xxargsize(xtype, maxarg)
X	int	xtype;
X	int	maxarg;
X{
X	/*
X	 * Set up a safe fallback in case we are not able to determine the
X	 * binary type.
X	 */
X	if (maxarg > _ARG_MAX32)
X		maxarg = _ARG_MAX32;
X
X	switch (xtype) {
X
X	case 32:
X		maxarg = _ARG_MAX32;
X		break;
X
X	case 64:
X		maxarg = _ARG_MAX64;
X		break;
X	}
X
X	return (maxarg);
X}
X#endif
X
XLOCAL BOOL
Xpluscreate(f, ac, av, fap)
X	FILE	*f;
X	int	ac;
X	char	**av;
X	finda_t	*fap;
X{
X	struct plusargs	*pp;
X	register char	**ap = av;
X	register int	i;
X		int	mxtype;
X		int	xtype;
X		int	maxarg;
X		int	nenv;
X
X	xtype  = extype(av[0]);		/* Get -exec executable type	*/
X	maxarg = argsize(xtype);	/* Get ARG_MAX for executable	*/
X	nenv   = countenv();		/* # of ents in current env	*/
X
X	mxtype = sizeof (char *) * CHAR_BIT;
X	if (xtype == 0)
X		mxtype = 0;
X
X	if (xtype == mxtype)
X		nenv = 0;		/* Easy case			*/
X	else if (xtype > mxtype)
X		nenv = -nenv;		/* Need to reduce arg size	*/
X
X	maxarg += nenv * (32 / CHAR_BIT); /* Correct maxarg by ptr size	*/
X
X#ifdef	PLUS_DEBUG
X	printf("Argc %d\n", ac);
X	ap = av;
X	for (i = 0; i < ac; i++, ap++)
X		printf("ARG %d '%s'\n", i, *ap);
X#endif
X
X	pp = __fjmalloc(fap->std[2], maxarg + sizeof (struct plusargs),
X						"-exec args", fap->jmp);
X	pp->laststr = pp->endp = (char *)(&pp->av[0]) + maxarg;
X	pp->nenv = nenv;
X	pp->ac = 0;
X	pp->nextargp = &pp->av[0];
X
X#ifdef	PLUS_DEBUG
X	printf("pp          %d\n", pp);
X	printf("pp->laststr %d\n", pp->laststr);
X	printf("argsize()   %d\n", maxarg);
X#endif
X
X	/*
X	 * Copy args from command line.
X	 */
X	ap = av;
X	for (i = 0; i < ac; i++, ap++) {
X#ifdef	PLUS_DEBUG
X		printf("ARG %d '%s'\n", i, *ap);
X#endif
X		*(pp->nextargp++) = *ap;
X		pp->laststr -= strlen(*ap) + 1;
X		pp->ac++;
X		if (pp->laststr <= (char *)pp->nextargp) {
X			ferrmsgno(f, EX_BAD,
X				gettext("No space to copy -exec args.\n"));
X			free(pp);		/* The exec plusargs struct */
X			return (FALSE);
X		}
X	}
X#ifdef	PLUS_DEBUG
X	error("lastr %d endp %d diff %d\n",
X		pp->laststr, pp->endp, pp->endp - pp->laststr);
X#endif
X	pp->endp = pp->laststr;	/* Reduce endp by the size of cmdline args */
X
X#ifdef	PLUS_DEBUG
X	ap = &pp->av[0];
X	for (i = 0; i < pp->ac; i++, ap++) {
X		printf("ARG %d '%s'\n", i, *ap);
X	}
X#endif
X#ifdef	PLUS_DEBUG
X	printf("pp          %d\n", pp);
X	printf("pp->laststr %d\n", pp->laststr);
X#endif
X	pp->next = fap->plusp;
X	fap->plusp = pp;
X#ifdef	PLUS_DEBUG
X	plusp = fap->plusp;	/* Makes libfind not MT safe */
X#endif
X	return (TRUE);
X}
X
X#ifdef	HAVE_FORK
XLOCAL BOOL
Xplusexec(f, t, state)
X	char	*f;
X	findn_t	*t;
X	struct WALK *state;
X{
X	register struct plusargs *pp = (struct plusargs *)t->this;
X#ifdef	PLUS_DEBUG
X	register char	**ap;
X	register int	i;
X#endif
X	size_t	size;
X	size_t	slen = strlen(f) + 1;
X	char	*nargp = (char *)&pp->nextargp[2];
X	char	*cp;
X	int	ret = TRUE;
X
X	size = pp->laststr - (char *)&pp->nextargp[2];	/* Remaining strlen */
X
X	if (pp->nenv < 0)				/* Called cmd has   */
X		nargp += pp->ac * (32 / CHAR_BIT);	/* larger ptr size  */
X
X	if (pp->laststr < nargp ||			/* Already full	    */
X	    slen > size) {				/* str does not fit */
X		pp->nextargp[0] = NULL;
X		ret = doexec(NULL, t, pp->ac, pp->av, state);
X		pp->laststr = pp->endp;
X		pp->ac = t->val.i;
X		pp->nextargp = &pp->av[t->val.i];
X		size = pp->laststr - (char *)&pp->nextargp[2];
X	}
X	if (pp->laststr < nargp ||
X	    slen > size) {
X		ferrmsgno(state->std[2], EX_BAD,
X			gettext("No space for arg '%s'.\n"), f);
X		return (FALSE);
X	}
X	cp = pp->laststr - slen;
X	strcpy(cp, f);
X	pp->nextargp[0] = cp;
X	pp->ac++;
X	pp->nextargp++;
X	pp->laststr -= slen;
X
X#ifdef	PLUS_DEBUG
X	ap = &plusp->av[0];
X	for (i = 0; i < plusp->ac; i++, ap++) {
X		printf("ARG %d '%s'\n", i, *ap);
X	}
X	error("EXECPLUS '%s'\n", f);
X#endif
X	return (ret);
X}
X#endif	/* HAVE_FORK */
X
XEXPORT int
Xfind_plusflush(p, state)
X	void	*p;
X	struct WALK *state;
X{
X	struct plusargs	*plusp = p;
X	BOOL		ret = TRUE;
X
X	/*
X	 * Execute all unflushed '-exec .... {} +' expressions.
X	 */
X	while (plusp) {
X#ifdef	PLUS_DEBUG
X		error("lastr %p endp %p\n", plusp->laststr, plusp->endp);
X#endif
X		if (plusp->laststr != plusp->endp) {
X			plusp->nextargp[0] = NULL;
X#ifdef	HAVE_FORK
X			if (!doexec(NULL, NULL, plusp->ac, plusp->av, state))
X				ret = FALSE;
X#endif
X		}
X		plusp = plusp->next;
X	}
X	return (ret);
X}
X
XEXPORT void
Xfind_usage(f)
X	FILE	*f;
X{
X	fprintf(f, gettext("Usage:	%s [options] [path_1 ... path_n] [expression]\n"), get_progname());
X	fprintf(f, gettext("Options:\n"));
X	fprintf(f, gettext("	-H	follow symbolic links encountered on command line\n"));
X	fprintf(f, gettext("	-L	follow all symbolic links\n"));
X	fprintf(f, gettext("*	-P	do not follow symbolic links (default)\n"));
X	fprintf(f, gettext("*	-help	Print this help.\n"));
X	fprintf(f, gettext("*	-version Print version number.\n"));
X	fprintf(f, gettext("Operators in decreasing precedence:\n"));
X	fprintf(f, gettext("	( )	group an expression\n"));
X	fprintf(f, gettext("	!, -a, -o negate a primary (unary NOT), logical AND, logical OR\n"));
X	fprintf(f, gettext("Primaries:\n"));
X	fprintf(f, gettext("*	-acl	      TRUE if the file has additional ACLs defined\n"));
X	fprintf(f, gettext("	-atime #      TRUE if st_atime is in specified range\n"));
X#ifdef	CHGRP
X	fprintf(f, gettext("*	-chgrp gname/gid always TRUE, sets st_gid to gname/gid\n"));
X#endif
X#ifdef	CHMOD
X	fprintf(f, gettext("*	-chmod mode/onum always TRUE, sets permissions to mode/onum\n"));
X#endif
X#ifdef	CHOWN
X	fprintf(f, gettext("*	-chown uname/uid always TRUE, sets st_uid to uname/uid\n"));
X#endif
X	fprintf(f, gettext("	-ctime #      TRUE if st_ctime is in specified range\n"));
X	fprintf(f, gettext("	-depth	      evaluate directory content before directory (always TRUE)\n"));
X	fprintf(f, gettext("*	-dostat	      Do not do stat optimization (always TRUE)\n"));
X	fprintf(f, gettext("*	-empty	      TRUE zero sized plain file or empty directory\n"));
X	fprintf(f, gettext("	-exec program [argument ...] \\;\n"));
X	fprintf(f, gettext("	-exec program [argument ...] {} +\n"));
X	fprintf(f, gettext("*	-execdir program [argument ...] \\;\n"));
X	fprintf(f, gettext("*	-executable   TRUE if file is executable by real user id\n"));
X	fprintf(f, gettext("*	-false	      always FALSE\n"));
X	fprintf(f, gettext("*	-fls file     list files similar to 'ls -ilds' into 'file' (always TRUE)\n"));
X	fprintf(f, gettext("*	-follow	      outdated: follow all symbolic links (always TRUE)\n"));
X	fprintf(f, gettext("*	-fprint file  print file names line separated into 'file' (always TRUE)\n"));
X	fprintf(f, gettext("*	-fprint0 file print file names nul separated into 'file' (always TRUE)\n"));
X	fprintf(f, gettext("*	-fprintnnl file print file names space separated into 'file' (always TRUE)\n"));
X	fprintf(f, gettext("*	-fstype type  TRUE if st_fstype matches type\n"));
X	fprintf(f, gettext("	-group gname/gid TRUE if st_gid matches gname/gid\n"));
X	fprintf(f, gettext("*	-ilname glob  TRUE if symlink name matches shell glob\n"));
X	fprintf(f, gettext("*	-ilpat pattern TRUE if symlink name matches pattern\n"));
X	fprintf(f, gettext("*	-iname glob   TRUE if path component matches shell glob\n"));
X	fprintf(f, gettext("*	-inum #	      TRUE if st_ino is in specified range\n"));
X	fprintf(f, gettext("*	-ipat pattern TRUE if path component matches pattern\n"));
X	fprintf(f, gettext("*	-ipath glob   TRUE if full path matches shell glob\n"));
X	fprintf(f, gettext("*	-ippat pattern TRUE if full path matches pattern\n"));
X	fprintf(f, gettext("*	-linkedto path TRUE if the file is linked to path\n"));
X	fprintf(f, gettext("	-links #      TRUE if st_nlink is in specified range\n"));
X	fprintf(f, gettext("*	-lname glob   TRUE if symlink name matches shell glob\n"));
X	fprintf(f, gettext("*	-local	      TRUE if st_fstype does not match remote fs types\n"));
X	fprintf(f, gettext("*	-lpat pattern TRUE if symlink name matches pattern\n"));
X	fprintf(f, gettext("*	-ls	      list files similar to 'ls -ilds' (always TRUE)\n"));
X	fprintf(f, gettext("*	-maxdepth #   descend at most # directory levels (always TRUE)\n"));
X	fprintf(f, gettext("*	-mindepth #   start tests at directory level # (always TRUE)\n"));
X	fprintf(f, gettext("	-mtime #      TRUE if st_mtime is in specified range\n"));
X	fprintf(f, gettext("	-name glob    TRUE if path component matches shell glob\n"));
X	fprintf(f, gettext("	-newer file   TRUE if st_mtime newer then mtime of file\n"));
X	fprintf(f, gettext("*	-newerXY file TRUE if [acm]time (X) newer then [acm]time (Y) of file\n"));
X	fprintf(f, gettext("	-nogroup      TRUE if not in group database\n"));
X	fprintf(f, gettext("	-nouser       TRUE if not in user database\n"));
X	fprintf(f, gettext("	-ok program [argument ...] \\;\n"));
X	fprintf(f, gettext("*	-okdir program [argument ...] \\;\n"));
X	fprintf(f, gettext("*	-pat pattern  TRUE if path component matches pattern\n"));
X	fprintf(f, gettext("*	-path glob    TRUE if full path matches shell glob\n"));
X	fprintf(f, gettext("	-perm mode/onum TRUE if symbolic/octal permission matches\n"));
X	fprintf(f, gettext("*	-ppat pattern TRUE if full path matches pattern\n"));
X	fprintf(f, gettext("	-print	      print file names line separated to stdout (always TRUE)\n"));
X	fprintf(f, gettext("*	-print0	      print file names nul separated to stdout (always TRUE)\n"));
X	fprintf(f, gettext("*	-printnnl     print file names space separated to stdout (always TRUE)\n"));
X	fprintf(f, gettext("	-prune	      do not descent current directory (always TRUE)\n"));
X	fprintf(f, gettext("*	-readable     TRUE if file is readable by real user id\n"));
X	fprintf(f, gettext("	-size #	      TRUE if st_size is in specified range\n"));
X	fprintf(f, gettext("*	-sparse	      TRUE if file appears to be sparse\n"));
X	fprintf(f, gettext("*	-true	      always TRUE\n"));
X	fprintf(f, gettext("	-type c	      TRUE if file type matches, c is from (b c d D e f l p P s)\n"));
X	fprintf(f, gettext("	-user uname/uid TRUE if st_uid matches uname/uid\n"));
X	fprintf(f, gettext("*	-writable     TRUE if file is writable by real user id\n"));
X	fprintf(f, gettext("*	-xattr	      TRUE if the file has extended attributes\n"));
X	fprintf(f, gettext("	-xdev, -mount restrict search to current filesystem (always TRUE)\n"));
X	fprintf(f, gettext("Primaries marked with '*' are POSIX extensions, avoid them in portable scripts.\n"));
X	fprintf(f, gettext("If path is omitted, '.' is used. If expression is omitted, -print is used.\n"));
X}
X
X#ifdef FIND_MAIN
X
X/* ARGSUSED */
XLOCAL int
Xgetflg(optstr, argp)
X	char	*optstr;
X	long	*argp;
X{
X	if (optstr[1] != '\0')
X		return (-1);
X
X	switch (*optstr) {
X
X	case 'H':
X		*(int *)argp |= WALK_ARGFOLLOW;
X		return (TRUE);
X	case 'L':
X		*(int *)argp |= WALK_ALLFOLLOW;
X		return (TRUE);
X	case 'P':
X		*(int *)argp &= ~(WALK_ARGFOLLOW | WALK_ALLFOLLOW);
X		return (TRUE);
X
X	default:
X		return (-1);
X	}
X}
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	**av;
X{
X	int	cac  = ac;
X	char	**cav = av;
X	char	**firstpath;
X	char	**firstprim;
X	BOOL	help = FALSE;
X	BOOL	prversion = FALSE;
X	finda_t	fa;
X	findn_t	*Tree;
X	struct WALK	walkstate;
X
X	save_args(ac, av);
X
X#ifdef	USE_NLS
X	setlocale(LC_ALL, "");
X	bindtextdomain("SCHILY_FIND", "/opt/schily/lib/locale");
X	textdomain("SCHILY_FIND");
X#endif
X	find_argsinit(&fa);
X	fa.walkflags = WALK_CHDIR | WALK_PHYS;
X	fa.walkflags |= WALK_NOSTAT;
X	fa.walkflags |= WALK_NOEXIT;
X
X	/*
X	 * Do not check the return code for getargs() as we may get an error
X	 * code from e.g. "find -print" and we do not like to handle this here.
X	 */
X	cac--, cav++;
X	getargs(&cac, (char * const **)&cav, "help,version,&",
X			&help, &prversion,
X			getflg, (long *)&fa.walkflags);
X	if (help) {
X		find_usage(stderr);
X		return (0);
X	}
X	if (prversion) {
X		printf("sfind release %s (%s-%s-%s) Copyright (C) 2004-2008 Jörg Schilling\n",
X				strvers,
X				HOST_CPU, HOST_VENDOR, HOST_OS);
X		return (0);
X	}
X
X	firstpath = cav;	/* Remember first file type arg */
X	find_firstprim(&cac, (char *const **)&cav);
X	firstprim = cav;	/* Remember first Primary type arg */
X	fa.Argv = cav;
X	fa.Argc = cac;
X
X	if (cac) {
X		Tree = find_parse(&fa);
X		if (fa.primtype == FIND_ERRARG) {
X			find_free(Tree, &fa);
X			return (fa.error);
X		}
X		if (fa.primtype != FIND_ENDARGS) {
X			ferrmsgno(stderr, EX_BAD,
X				gettext("Incomplete expression.\n"));
X			find_free(Tree, &fa);
X			return (EX_BAD);
X		}
X		if (find_pname(Tree, "-chown") || find_pname(Tree, "-chgrp") ||
X		    find_pname(Tree, "-chmod")) {
X			ferrmsgno(stderr, EX_BAD,
X				gettext("Unsupported primary -chown/-chgrp/-chmod.\n"));
X			find_free(Tree, &fa);
X			return (EX_BAD);
X		}
X	} else {
X		Tree = 0;
X	}
X	if (Tree == 0) {
X		Tree = find_printnode();
X	} else if (!fa.found_action) {
X		Tree = find_addprint(Tree, &fa);
X		if (Tree == (findn_t *)NULL)
X			return (geterrno());
X	}
X	walkinitstate(&walkstate);
X	if (fa.patlen > 0) {
X		walkstate.patstate = __jmalloc(sizeof (int) * fa.patlen,
X					"space for pattern state", JM_RETURN);
X		if (walkstate.patstate == NULL)
X			return (geterrno());
X	}
X
X	find_timeinit(time(0));
X
X	walkstate.walkflags	= fa.walkflags;
X	walkstate.maxdepth	= fa.maxdepth;
X	walkstate.mindepth	= fa.mindepth;
X	walkstate.lname		= NULL;
X	walkstate.tree		= Tree;
X	walkstate.err		= 0;
X	walkstate.pflags	= 0;
X
X	if (firstpath == firstprim) {
X		treewalk(".", walkfunc, &walkstate);
X	} else {
X		for (cav = firstpath; cav != firstprim; cav++) {
X			treewalk(*cav, walkfunc, &walkstate);
X			/*
X			 * XXX hier break wenn treewalk() Fehler gemeldet
X			 */
X		}
X	}
X	/*
X	 * Execute all unflushed '-exec .... {} +' expressions.
X	 */
X	find_plusflush(fa.plusp, &walkstate);
X	find_free(Tree, &fa);
X	if (walkstate.patstate != NULL)
X		free(walkstate.patstate);
X	return (walkstate.err);
X}
X
X#endif /* FIND_MAIN */
END-of-star-1.5.2/libfind/find.c
echo x - star-1.5.2/libfind/find_list.c
sed 's/^X//' >star-1.5.2/libfind/find_list.c << 'END-of-star-1.5.2/libfind/find_list.c'
X/* @(#)find_list.c	1.27 10/08/23 Copyright 1985, 1995, 2000-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)find_list.c	1.27 10/08/23 Copyright 1985, 1995, 2000-2010 J. Schilling";
X#endif
X/*
X *	List a file
X *
X *	Copyright (c) 1985, 1995, 2000-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/unistd.h>
X#include <schily/utypes.h>
X#include <schily/dirent.h>
X#include <schily/time.h>
X#include <schily/standard.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/device.h>
X#include <schily/nlsdefs.h>
X#include <schily/param.h>
X#include <schily/walk.h>
X#include <schily/find.h>
X#include <schily/idcache.h>
X#include "find_list.h"
X#include "find_misc.h"
X
X#define	K_DIV	(1024/DEV_BSIZE)
X
X#if	defined(IS_MACOS_X)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * Make find_sixmonth/find_now a "data" variable.
X */
XEXPORT	time_t	find_sixmonth = 0;	/* 6 months before limit (ls)	*/
XEXPORT	time_t	find_now = 0;		/* now limit (ls)		*/
X#else
XEXPORT	time_t	find_sixmonth;		/* 6 months before limit (ls)	*/
XEXPORT	time_t	find_now;		/* now limit (ls)		*/
X#endif
X
X#define	paxls	TRUE
Xextern	BOOL	numeric;
Xextern	int	verbose;
X
XLOCAL	void	modstr		__PR((FILE *f, struct stat *fs, char *s,
X					char *name, char *sname,
X					struct WALK *state));
XEXPORT	void	find_list	__PR((FILE *std[3], struct stat *fs,
X					char *name, char *sname,
X					struct WALK *state));
X
X/*
X * Convert POSIX.1 mode/permission flags into string.
X */
XLOCAL void
Xmodstr(f, fs, s, name, sname, state)
X	FILE		*f;		/* FILE * for error messages	 */
X	struct stat	*fs;		/* Struct stat for this file	 */
X		char	*s;		/* String to fill with mode	 */
X		char	*name;		/* Name to use for stat/readlink */
X		char	*sname;		/* Name to use for stat/readlink */
X	struct WALK	*state;		/* state from treewalk()	 */
X{
X	register char	*mstr = "xwrxwrxwr";
X	register char	*str = s;
X	register int	i;
X	register mode_t	mode = fs->st_mode;
X
X	for (i = 9; --i >= 0; ) {
X		if (mode & (1 << i))
X			*str++ = mstr[i];
X		else
X			*str++ = '-';
X	}
X#ifdef	USE_ACL
X	*str++ = ' ';
X#endif
X#ifdef	USE_XATTR
X	*str++ = '\0';				/* Don't claim space for '@' */
X#endif
X	*str = '\0';
X	str = s;
X	if (mode & S_ISVTX) {
X		if (mode &  S_IXOTH) {
X			str[8] = 't';		/* Sticky & exec. by others  */
X		} else {
X			str[8] = 'T';		/* Sticky but !exec. by oth  */
X		}
X	}
X	if (mode & S_ISGID) {
X		if (mode & S_IXGRP) {
X			str[5] = 's';		/* Sgid & executable by grp  */
X		} else {
X			if (S_ISDIR(mode))
X				str[5] = 'S';	/* Sgid directory	    */
X			else
X				str[5] = 'l';	/* Mandatory lock file	    */
X		}
X	}
X	if (mode & S_ISUID) {
X		if (mode & S_IXUSR)
X			str[2] = 's';		/* Suid & executable by own. */
X		else
X			str[2] = 'S';		/* Suid but not executable   */
X	}
X	i = 9;
X#ifdef	USE_ACL
X	if (state->pflags & PF_ACL) {
X		if (state->pflags & PF_HAS_ACL)
X			str[i++] = '+';
X	} else
X	if (has_acl(f, name, sname, fs))
X		str[i++] = '+';
X#endif
X#ifdef	USE_XATTR
X	if (state->pflags & PF_XATTR) {
X		if (state->pflags & PF_HAS_XATTR)
X			str[i++] = '@';
X	} else
X	if (has_xattr(f, sname))
X		str[i++] = '@';
X#endif
X	i++;	/* Make lint believe that we always use i. */
X}
X
XEXPORT void
Xfind_list(std, fs, name, sname, state)
X	FILE		*std[3];	/* To redirect stdin/stdout/err	 */
X	struct stat	*fs;		/* Struct stat for this file	 */
X	char		*name;		/* Complete path name		 */
X	char		*sname;		/* Name to use for stat/readlink */
X	struct WALK	*state;		/* state from treewalk()	 */
X{
X		time_t	*tp;
X		char	*tstr;
X		char	mstr[12]; /* 9 UNIX chars + ACL '+' XATTR '@' + nul */
X		char	lstr[11]; /* contains link count as string */
X	static	char	nuid[32+1];
X	static	char	ngid[32+1];
X		char	*add = "";
Xchar	lname[8192];
Xchar	*lnamep = lname;
X		int	lsize;
X
X#define	verbose	1
X	if (verbose) {
X		char	*uname;
X		char	*gname;
X		int	umaxlen;
X		int	gmaxlen;
X		char	ft;
X
X		tp = state->walkflags & WALK_LS_ATIME ? &fs->st_atime :
X				(state->walkflags & WALK_LS_CTIME ?
X					&fs->st_ctime : &fs->st_mtime);
X		tstr = ctime(tp);
X
X		if (ic_nameuid(nuid, sizeof (nuid), fs->st_uid)) {
X			uname = nuid;
X			umaxlen = sizeof (nuid)-1;
X		} else {
X			sprintf(nuid, "%llu", (Llong)fs->st_uid);
X			uname = nuid;
X			umaxlen = sizeof (nuid)-1;
X		}
X
X		if (ic_namegid(ngid, sizeof (ngid), fs->st_gid)) {
X			gname = ngid;
X			gmaxlen = sizeof (ngid)-1;
X		} else {
X			sprintf(ngid, "%llu", (Llong)fs->st_gid);
X			gname = ngid;
X			gmaxlen = sizeof (ngid)-1;
X		}
X
X		{
X			fprintf(std[1], "%7llu ", (Llong)fs->st_ino);
X#ifdef	HAVE_ST_BLOCKS
X			fprintf(std[1], "%4llu ", (Llong)fs->st_blocks/K_DIV);
X#else
X			fprintf(std[1], "%4llu ",
X				(Llong)(fs->st_size+1023)/1024);
X#endif
X		}
X		if (!paxls) {
X			if (S_ISBLK(fs->st_mode) || S_ISCHR(fs->st_mode))
X				fprintf(std[1], "%3lu %3lu",
X					(long)major(fs->st_rdev),
X					(long)minor(fs->st_rdev));
X			else
X				fprintf(std[1], "%7llu", (Llong)fs->st_size);
X		}
X		modstr(std[2], fs, mstr, name, sname, state);
X
X		if (paxls || fs->st_nlink > 0) {
X			/*
X			 * UNIX ls uses %3d for the link count
X			 * and does not claim space for ACL '+'
X			 */
X			js_sprintf(lstr, " %2ld", (long)fs->st_nlink);
X		} else {
X			lstr[0] = 0;
X		}
X
X		switch (fs->st_mode & S_IFMT) {
X
X		case S_IFREG:	ft = '-'; break;
X#ifdef	S_IFLNK
X		case S_IFLNK:	ft = 'l';
X				if (state->lname != NULL) {
X					lnamep = state->lname;
X					break;
X				}
X				lname[0] = '\0';
X				lsize = readlink(sname, lname, sizeof (lname));
X				if (lsize < 0)
X					ferrmsg(std[2],
X					gettext("Cannot read link '%s'.\n"),
X						name);
X				lname[sizeof (lname)-1] = '\0';
X				if (lsize >= 0)
X					lname[lsize] = '\0';
X				break;
X#endif
X		case S_IFDIR:	ft = 'd'; break;
X#ifdef	S_IFBLK
X		case S_IFBLK:	ft = 'b'; break;
X#endif
X#ifdef	S_IFCHR
X		case S_IFCHR:	ft = 'c'; break;
X#endif
X#ifdef	S_IFIFO
X		case S_IFIFO:	ft = 'p'; break;
X#endif
X#ifdef	S_IFDOOR
X		case S_IFDOOR:	ft = 'D'; break;
X#endif
X#ifdef	S_IFSOCK
X		case S_IFSOCK:	ft = 's'; break;
X#endif
X#ifdef	S_IFPORT
X		case S_IFPORT:	ft = 'P'; break;
X#endif
X#ifdef	S_IFNAM
X		case S_IFNAM:	switch (fs->st_rdev) {
X				case S_INSEM:
X					ft = 's';
X					break;
X				case S_INSHD:
X					ft = 'm';
X					break;
X				default:
X					ft = '-';
X					break;
X				}
X#endif
X
X		default:	ft = '?'; break;
X		}
X
X		if (!paxls) {
X			fprintf(std[1], " %c%s%s %3.*s/%-3.*s %.12s %4.4s ",
X				ft,
X				mstr,
X				lstr,
X				umaxlen, uname,
X				gmaxlen, gname,
X				&tstr[4], &tstr[20]);
X		} else {
X			fprintf(std[1], "%c%s%s %-8.*s %-8.*s ",
X				ft,
X				mstr,
X				lstr,
X				umaxlen, uname,
X				gmaxlen, gname);
X			if (S_ISBLK(fs->st_mode) || S_ISCHR(fs->st_mode))
X/* XXXXXXXXXXXXXX */		fprintf(std[1], "%3lu, %3lu",
X					(long)major(fs->st_rdev),
X					(long)minor(fs->st_rdev));
X			else
X				fprintf(std[1], "%7llu", (Llong)fs->st_size);
X			if ((*tp < find_sixmonth) || (*tp > find_now)) {
X				fprintf(std[1], " %.6s  %4.4s ",
X					&tstr[4], &tstr[20]);
X			} else {
X				fprintf(std[1], " %.12s ",
X					&tstr[4]);
X			}
X		}
X	}
X	fprintf(std[1], "%s%s", name, add);
X
X	if (S_ISLNK(fs->st_mode))
X		fprintf(std[1], " -> %s", lnamep);
X
X	fprintf(std[1], "\n");
X}
END-of-star-1.5.2/libfind/find_list.c
echo x - star-1.5.2/libfind/find_list.h
sed 's/^X//' >star-1.5.2/libfind/find_list.h << 'END-of-star-1.5.2/libfind/find_list.h'
X/* @(#)find_list.h	1.8 09/07/10 Copyright 2004-2008 J. Schilling */
X/*
X *	Copyright (c) 2004-2008 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_FIND_LIST_H
X#define	_FIND_LIST_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
Xextern	void	find_list		__PR((FILE *std[3], struct stat *fs, char *name, char *sname, struct WALK *state));
X
X#endif	/* _FIND_LIST_H */
END-of-star-1.5.2/libfind/find_list.h
echo x - star-1.5.2/libfind/find_misc.c
sed 's/^X//' >star-1.5.2/libfind/find_misc.c << 'END-of-star-1.5.2/libfind/find_misc.c'
X/* @(#)find_misc.c	1.15 09/11/29 Copyright 2004-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)find_misc.c	1.15 09/11/29 Copyright 2004-2009 J. Schilling";
X#endif
X/*
X *	Copyright (c) 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include <schily/stat.h>
X#include <schily/errno.h>
X#include <schily/schily.h>
X#include <schily/nlsdefs.h>
X
X#include "find_misc.h"
X
X#ifdef	USE_ACL
X#ifdef	HAVE_SYS_ACL_H
X#	include <sys/acl.h>
X#endif
X#ifdef	HAVE_ACL_LIBACL_H
X#	include <acl/libacl.h>	/* Needed for acl_extended_file() */
X#endif
X#endif
X
X/*
X * Define some things that either are missing or defined in a different way
X * on SCO UnixWare
X */
X#if	defined(UNIXWARE) && defined(HAVE_ACL)
Xtypedef struct acl	aclent_t;
X#endif
X#ifndef	GETACL
X#define	GETACL	ACL_GET
X#endif
X#ifndef	SETACL
X#define	SETACL	ACL_SET
X#endif
X#ifndef	GETACLCNT
X#define	GETACLCNT	ACL_CNT
X#endif
X#ifndef	MIN_ACL_ENTRIES
X#define	MIN_ACL_ENTRIES	NACLBASE
X#endif
X
XEXPORT	BOOL	has_acl		__PR((FILE *f, char *name, char *sname, struct stat *sp));
XEXPORT	BOOL	has_xattr	__PR((FILE *f, char *sname));
X
XEXPORT BOOL
Xhas_acl(f, name, sname, sp)
X	FILE	*f;
X	char	*name;
X	char	*sname;
X	struct stat *sp;
X{
X#ifdef	USE_ACL
X#ifdef	HAVE_SUN_ACL	/* Solaris & UnixWare */
X	int	aclcount;
X
X	/*
X	 * Symlinks don't have ACLs
X	 */
X	if (S_ISLNK(sp->st_mode))
X		return (FALSE);
X#ifdef	HAVE_ST_ACLCNT
X	return (sp->st_aclcnt > MIN_ACL_ENTRIES);
X#else
X	if ((aclcount = acl(sname, GETACLCNT, 0, NULL)) < 0) {
X#ifdef	ENOSYS
X		if (geterrno() == ENOSYS)
X			return (FALSE);
X#endif
X		ferrmsg(f, gettext("Cannot get ACL count for '%s'.\n"), name);
X		return (FALSE);
X	}
X	return (aclcount > MIN_ACL_ENTRIES);
X#endif	/* HAVE_ST_ACLCNT */
X#else	/* HAVE_SUN_ACL */
X	/*
X	 * Non Sun ACL implementations.
X	 */
X#ifdef	HAVE_ACL_EXTENDED_FILE
X	/*
X	 * Linux extension
X	 */
X	return (acl_extended_file(sname) == 1);
X#else
X#ifdef	HAVE_POSIX_ACL
X	acl_t	acl;
X
X	if ((acl = acl_get_file(sname, ACL_TYPE_ACCESS)) != NULL) {
X#ifdef	HAVEACL_GET_ENTRY
X		int	id = ACL_FIRST_ENTRY;
X		int	num;
X		acl_entry_t dummy;
X
X		for (num = 0; acl_get_entry(acl, id, &dummy); num++)
X			id = ACL_NEXT_ENTRY;
X		acl_free(acl);
X		if (num > 3)
X			return (TRUE);
X#else
X#ifdef	NACLBASE
X		if (acl->acl_cnt > NACLBASE)
X			return (TRUE);
X#endif
X#endif
X	}
X	/*
X	 * Only directories have DEFAULT ACLs
X	 */
X	if (!S_ISDIR(sp->st_mode))
X		return (FALSE);
X	if ((acl = acl_get_file(sname, ACL_TYPE_DEFAULT)) != NULL) {
X#ifdef	HAVEACL_GET_ENTRY
X		int	id = ACL_FIRST_ENTRY;
X		int	num;
X		acl_entry_t dummy;
X
X		for (num = 0; acl_get_entry(acl, id, &dummy); num++)
X			id = ACL_NEXT_ENTRY;
X		acl_free(acl);
X		if (num > 0)
X			return (TRUE);
X#else
X#ifdef	NACLBASE
X		if (acl->acl_cnt > NACLBASE)
X			return (TRUE);
X#endif
X#endif
X	}
X#endif	/* HAVE_POSIX_ACL */
X
X	return (FALSE);
X
X#endif
X#endif	/* HAVE_SUN_ACL */
X#else	/* USE_ACL */
X	return (FALSE);
X#endif	/* USE_ACL */
X}
X
XEXPORT BOOL
Xhas_xattr(f, sname)
X	FILE	*f;
X	char	*sname;
X{
X#ifdef	_PC_XATTR_EXISTS
X		return (pathconf(sname, _PC_XATTR_EXISTS) > 0);
X#else
X		return (FALSE);
X#endif
X}
END-of-star-1.5.2/libfind/find_misc.c
echo x - star-1.5.2/libfind/find_misc.h
sed 's/^X//' >star-1.5.2/libfind/find_misc.h << 'END-of-star-1.5.2/libfind/find_misc.h'
X/* @(#)find_misc.h	1.7 09/07/10 Copyright 2004-2009 J. Schilling */
X/*
X *	Copyright (c) 2004-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_FIND_MISC_H
X#define	_FIND_MISC_H
X
X#ifndef _SCHILY_MCONFIG_H
X#include <schily/mconfig.h>
X#endif
X#ifndef _SCHILY_UNIXSTD_H
X#include <schily/unistd.h>
X#endif
X#ifndef _SCHILY_STDIO_H
X#include <schily/stdio.h>
X#endif
X
X#if	defined(UNIXWARE) && defined(HAVE_ACL)
X#	define	HAVE_SUN_ACL
X#	define	HAVE_ANY_ACL
X#endif
X
X#ifdef	USE_ACL
X/*
X * HAVE_ANY_ACL currently includes HAVE_POSIX_ACL and HAVE_SUN_ACL.
X * HAVE_HP_ACL is currently not included in HAVE_ANY_ACL.
X */
X#	ifndef	HAVE_ANY_ACL
X#	undef	USE_ACL		/* Do not try to get or set ACLs */
X#	endif
X#endif
X
X#ifdef	USE_XATTR
X#ifndef	_PC_XATTR_EXISTS
X#undef	USE_XATTR
X#endif
X#endif
X
Xextern	BOOL	has_acl		__PR((FILE *f, char *name, char *sname, struct stat *sp));
Xextern	BOOL	has_xattr	__PR((FILE *f, char *sname));
X
X#endif	/* _FIND_MISC_H */
END-of-star-1.5.2/libfind/find_misc.h
echo x - star-1.5.2/libfind/find_main.c
sed 's/^X//' >star-1.5.2/libfind/find_main.c << 'END-of-star-1.5.2/libfind/find_main.c'
X/*#define	PLUS_DEBUG*/
X/* @(#)find_main.c	1.68 10/08/23 Copyright 2004-2010 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)find_main.c	1.68 10/08/23 Copyright 2004-2010 J. Schilling";
X#endif
X/*
X *	Another find implementation...
X *
X *	Copyright (c) 2004-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/unistd.h>
X#include <schily/stdlib.h>
X#include <schily/stat.h>
X#include <schily/time.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/jmpdefs.h>	/* To include __jmalloc() */
X#include <schily/schily.h>
X
X#include <schily/nlsdefs.h>
X
Xchar	strvers[] = "1.5";	/* The pure version string	*/
X
X#include <schily/walk.h>
X#include <schily/find.h>
X
XLOCAL	int	walkfunc	__PR((char *nm, struct stat *fs, int type, struct WALK *state));
XLOCAL	int	getflg		__PR((char *optstr, long *argp));
XEXPORT	int	find_main	__PR((int ac, char **av, char **ev, FILE *std[3], squit_t *quit));
X
XLOCAL int
Xwalkfunc(nm, fs, type, state)
X	char		*nm;
X	struct stat	*fs;
X	int		type;
X	struct WALK	*state;
X{
X	if (state->quitfun) {
X		/*
X		 * Check for shell builtin signal abort condition.
X		 */
X		if ((*state->quitfun)(state->qfarg)) {
X			state->flags |= WALK_WF_QUIT;
X			return (0);
X		}
X	}
X	if (type == WALK_NS) {
X		ferrmsg(state->std[2],
X				gettext("Cannot stat '%s'.\n"), nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) {
X		ferrmsg(state->std[2],
X				gettext("Cannot follow symlink '%s'.\n"), nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_DNR) {
X		if (state->flags & WALK_WF_NOCHDIR) {
X			ferrmsg(state->std[2],
X				gettext("Cannot chdir to '%s'.\n"), nm);
X		} else {
X			ferrmsg(state->std[2],
X				gettext("Cannot read '%s'.\n"), nm);
X		}
X		state->err = 1;
X		return (0);
X	}
X
X	if (state->maxdepth >= 0 && state->level >= state->maxdepth)
X		state->flags |= WALK_WF_PRUNE;
X	if (state->mindepth >= 0 && state->level < state->mindepth)
X		return (0);
X
X	find_expr(nm, nm + state->base, fs, state, state->tree);
X	return (0);
X}
X
X
X
X/* ARGSUSED */
XLOCAL int
Xgetflg(optstr, argp)
X	char	*optstr;
X	long	*argp;
X{
X#ifdef	GETFLG_DEBUG
X	error("optstr: '%s'\n", optstr);
X#endif
X
X	if (optstr[1] != '\0')
X		return (-1);
X
X	switch (*optstr) {
X
X	case 'H':
X		*(int *)argp |= WALK_ARGFOLLOW;
X		return (TRUE);
X	case 'L':
X		*(int *)argp |= WALK_ALLFOLLOW;
X		return (TRUE);
X	case 'P':
X		*(int *)argp &= ~(WALK_ARGFOLLOW | WALK_ALLFOLLOW);
X		return (TRUE);
X
X	default:
X		return (-1);
X	}
X}
X
XEXPORT int
Xfind_main(ac, av, ev, std, quit)
X	int	ac;
X	char	**av;
X	char	**ev;
X	FILE	*std[3];
X	squit_t	*quit;
X{
X	int	cac  = ac;
X	char	**cav = av;
X	char	**firstpath;
X	char	**firstprim;
X	BOOL	help = FALSE;
X	BOOL	prversion = FALSE;
X	finda_t	fa;
X	findn_t	*Tree;
X	struct WALK	walkstate;
X	int	oraise[3];
X	int	ret = 0;
X	int	i;
X
X	save_args(ac, av);
X
X#ifdef	USE_NLS
X	setlocale(LC_ALL, "");
X	bindtextdomain("SCHILY_FIND", "/opt/schily/lib/locale");
X	textdomain("SCHILY_FIND");
X#endif
X	find_argsinit(&fa);
X	for (i = 0; i < 3; i++) {
X		oraise[i] = file_getraise(std[i]);
X		file_raise(std[i], FALSE);
X		fa.std[i] = std[i];
X	}
X	fa.walkflags = WALK_CHDIR | WALK_PHYS;
X	fa.walkflags |= WALK_NOSTAT;
X	fa.walkflags |= WALK_NOEXIT;
X
X	/*
X	 * Do not check the return code for getargs() as we may get an error
X	 * code from e.g. "find -print" and we do not like to handle this here.
X	 */
X	cac--, cav++;
X	getargs(&cac, (char * const **)&cav, "help,version,&",
X			&help, &prversion,
X			getflg, (long *)&fa.walkflags);
X	if (help) {
X		find_usage(std[2]);
X		goto out;
X	}
X	if (prversion) {
X		fprintf(std[1],
X		"sfind release %s (%s-%s-%s) Copyright (C) 2004-2010 Jörg Schilling\n",
X				strvers,
X				HOST_CPU, HOST_VENDOR, HOST_OS);
X		goto out;
X	}
X
X	firstpath = cav;	/* Remember first file type arg */
X	find_firstprim(&cac, (char *const **)&cav);
X	firstprim = cav;	/* Remember first Primary type arg */
X	fa.Argv = cav;
X	fa.Argc = cac;
X
X	if (cac) {
X		Tree = find_parse(&fa);
X		if (fa.primtype == FIND_ERRARG) {
X			find_free(Tree, &fa);
X			ret = fa.error;
X			goto out;
X		}
X		if (fa.primtype != FIND_ENDARGS) {
X			ferrmsgno(std[2], EX_BAD,
X					gettext("Incomplete expression.\n"));
X			find_free(Tree, &fa);
X			ret = EX_BAD;
X			goto out;
X		}
X		if (find_pname(Tree, "-chown") || find_pname(Tree, "-chgrp") ||
X		    find_pname(Tree, "-chmod")) {
X			ferrmsgno(std[2], EX_BAD,
X				gettext("Unsupported primary -chown/-chgrp/-chmod.\n"));
X			find_free(Tree, &fa);
X			ret = EX_BAD;
X			goto out;
X		}
X	} else {
X		Tree = 0;
X	}
X	if (Tree == 0) {
X		Tree = find_printnode();
X	} else if (!fa.found_action) {
X		Tree = find_addprint(Tree, &fa);
X		if (Tree == (findn_t *)NULL) {
X			ret = geterrno();
X			goto out;
X		}
X	}
X	walkinitstate(&walkstate);
X	for (i = 0; i < 3; i++)
X		walkstate.std[i] = std[i];
X	if (ev)
X		walkstate.env = ev;
X	if (quit) {
X		walkstate.quitfun = quit->quitfun;
X		walkstate.qfarg   = quit->qfarg;
X	}
X	if (fa.patlen > 0) {
X		walkstate.patstate = __fjmalloc(std[2],
X					sizeof (int) * fa.patlen,
X					"space for pattern state", JM_RETURN);
X		if (walkstate.patstate == NULL) {
X			ret = geterrno();
X			goto out;
X		}
X	}
X
X	find_timeinit(time(0));
X
X	walkstate.walkflags	= fa.walkflags;
X	walkstate.maxdepth	= fa.maxdepth;
X	walkstate.mindepth	= fa.mindepth;
X	walkstate.lname		= NULL;
X	walkstate.tree		= Tree;
X	walkstate.err		= 0;
X	walkstate.pflags	= 0;
X
X	if (firstpath == firstprim) {
X		treewalk(".", walkfunc, &walkstate);
X	} else {
X		for (cav = firstpath; cav != firstprim; cav++) {
X			treewalk(*cav, walkfunc, &walkstate);
X			/*
X			 * XXX hier break wenn treewalk() Fehler gemeldet
X			 */
X		}
X	}
X	/*
X	 * Execute all unflushed '-exec .... {} +' expressions.
X	 */
X	find_plusflush(fa.plusp, &walkstate);
X	find_free(Tree, &fa);
X	if (walkstate.patstate != NULL)
X		free(walkstate.patstate);
X	ret = walkstate.err;
X
Xout:
X	for (i = 0; i < 3; i++) {
X		fflush(std[i]);
X		if (ferror(std[i]))
X			clearerr(std[i]);
X		file_raise(std[i], oraise[i]);
X	}
X	return (ret);
X}
END-of-star-1.5.2/libfind/find_main.c
echo x - star-1.5.2/libfind/libfind-mapvers
sed 's/^X//' >star-1.5.2/libfind/libfind-mapvers << 'END-of-star-1.5.2/libfind/libfind-mapvers'
X# /* @(#)libfind-mapvers	1.10 10/10/02 Copyright 2005-2010 J. Schilling */
X
XSCHILY_0.1 {		# Not yet a stable interface!
Xglobal:
X	dfetchdir;	# fetchdir.c
X	fetchdir;	# fetchdir.c
X	cmpdir;		# cmpdir.c
X	sortdir;	# cmpdir.c
X	fdircomp;	# cmpdir.c
X	find_addprint;	# find.c
X	find_argsinit;	# find.c
X	find_expr;	# find.c
X	find_firstprim;	# find.c
X	find_free;	# find.c
X	find_list;	# find_list.c
X	find_main;	# find_main.c
X	find_parse;	# find.c
X	find_plusflush;	# find.c
X	find_pname;	# find.c
X	find_primary;	# find.c
X	find_printnode;	# find.c
X	find_timeinit;	# find.c
X	find_tname;	# find.c
X	find_token;	# find.c
X	find_usage;	# find.c
X	has_acl;	# find_misc.c
X	has_xattr;	# find_misc.c
X	treewalk;	# walk.c
X	walkopen;	# walk.c
X	walkclose;	# walk.c
X	walkhome;	# walk.c
X	walkgethome;	# walk.c
X	walkinitstate;	# walk.c
X	ic_gidname;	# idcache.c
X	ic_namegid;	# idcache.c
X	ic_nameuid;	# idcache.c
X	ic_uidname;	# idcache.c
X	ic_uid_nobody;	# idcache.c
X	ic_gid_nobody;	# idcache.c
X
Xlocal:
X	*;
X};
END-of-star-1.5.2/libfind/libfind-mapvers
echo x - star-1.5.2/libfind/libfind.mk
sed 's/^X//' >star-1.5.2/libfind/libfind.mk << 'END-of-star-1.5.2/libfind/libfind.mk'
X#ident @(#)libfind.mk	1.3 10/12/23 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	find
X#CPPOPTS +=	-Istdio
X#CPPOPTS +=	-DUSE_SCANSTACK
X
X#CPPOPTS +=	-D__FIND__
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_NLS
XCPPOPTS +=	-DSCHILY_PRINT
X
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
X
END-of-star-1.5.2/libfind/libfind.mk
echo x - star-1.5.2/libfind/libfind_p.mk
sed 's/^X//' >star-1.5.2/libfind/libfind_p.mk << 'END-of-star-1.5.2/libfind/libfind_p.mk'
X#ident @(#)libfind_p.mk	1.4 08/01/11 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/profiled
XSUBINSDIR=	/profiled
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	find
XCOPTS +=	$(COPTGPROF)
X#CPPOPTS +=	-Istdio
X#CPPOPTS +=	-DUSE_SCANSTACK
X
X#CPPOPTS +=	-D__FIND__
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_NLS
XCPPOPTS +=	-DSCHILY_PRINT
X
Xinclude		Targets
XLIBS=		
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.lib
X###########################################################################
END-of-star-1.5.2/libfind/libfind_p.mk
echo x - star-1.5.2/libfind/idcache.c
sed 's/^X//' >star-1.5.2/libfind/idcache.c << 'END-of-star-1.5.2/libfind/idcache.c'
X/* @(#)idcache.c	1.29 09/11/16 Copyright 1993, 1995-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)idcache.c	1.29 09/11/16 Copyright 1993, 1995-2009 J. Schilling";
X#endif
X/*
X *	UID/GID caching functions
X *
X *	Copyright (c) 1993, 1995-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/pwd.h>
X#include <schily/grp.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X
X#define	TUNMLEN	32			/* Max. UID name len (POSIX)	*/
X#define	TGNMLEN	32			/* Max. GID name len (POSIX)	*/
X
X#define	C_SIZE	16			/* Cache size (cachee is static) */
X
Xtypedef struct u_id {
X	uid_t	uid;
X	char	name[TUNMLEN+1];
X	char	valid;
X} uidc_t;
X
Xtypedef struct g_id {
X	gid_t	gid;
X	char	name[TGNMLEN+1];
X	char	valid;
X} gidc_t;
X
XLOCAL	uidc_t	uidcache[C_SIZE];
XLOCAL	int	lastuidx;		/* Last index for new entry */
X
XLOCAL	gidc_t	gidcache[C_SIZE];
XLOCAL	int	lastgidx;		/* Last index for new entry */
X
XLOCAL	uid_t	_uid_nobody;		/* Uid for user "nobody"    */
XLOCAL	gid_t	_gid_nobody;		/* Gid for user "nobody"    */
XLOCAL	BOOL	name_init = FALSE;
X
XEXPORT	BOOL	ic_nameuid	__PR((char *name, int namelen, uid_t uid));
XEXPORT	BOOL	ic_uidname	__PR((char *name, int namelen, uid_t *uidp));
XEXPORT	BOOL	ic_namegid	__PR((char *name, int namelen, gid_t gid));
XEXPORT	BOOL 	ic_gidname	__PR((char *name, int namelen, gid_t *gidp));
XLOCAL	void	nameinit	__PR((void));
XEXPORT	uid_t	ic_uid_nobody	__PR((void));
XEXPORT	gid_t	ic_gid_nobody	__PR((void));
X
X/*
X * Get name from uid
X */
X#ifdef	PROTOTYPES
XEXPORT BOOL
Xic_nameuid(char *name, int namelen, uid_t uid)
X#else
XEXPORT BOOL
Xic_nameuid(name, namelen, uid)
X	char	*name;
X	int	namelen;
X	uid_t	uid;
X#endif
X{
X	struct passwd	*pw;
X	register int	i;
X	register uidc_t	*idp;
X
X	for (i = 0, idp = uidcache; i < C_SIZE; i++, idp++) {
X		if (idp->valid == 0)		/* Entry not yet filled */
X			break;
X		if (idp->uid == uid)
X			goto out;
X	}
X	idp = &uidcache[lastuidx++];		/* Round robin fill next ent */
X	if (lastuidx >= C_SIZE)
X		lastuidx = 0;
X
X	idp->uid = uid;
X	idp->name[0] = '\0';
X	idp->valid = 1;
X	if ((pw = getpwuid(uid)) != NULL) {
X		strncpy(idp->name, pw->pw_name, TUNMLEN);
X		idp->name[TUNMLEN] = '\0';
X		/*
X		 * XXX We should find a better method than shortening the cache
X		 */
X		if (namelen <= (TUNMLEN+1))
X			idp->name[namelen-1] = 0;
X	}
Xout:
X	strcpy(name, idp->name);
X	return (name[0] != '\0');
X}
X
X/*
X * Get uid from name
X */
XEXPORT BOOL
Xic_uidname(name, namelen, uidp)
X	char	*name;
X	int	namelen;
X	uid_t	*uidp;
X{
X	struct passwd	*pw;
X	register int	len = namelen > TUNMLEN?TUNMLEN:namelen;
X	register int	i;
X	register uidc_t	*idp;
X
X	if (name[0] == '\0') {
X		*uidp = ic_uid_nobody();	/* Return UID_NOBODY */
X		return (FALSE);
X	}
X
X	for (i = 0, idp = uidcache; i < C_SIZE; i++, idp++) {
X		if (idp->valid == 0)		/* Entry not yet filled */
X			break;
X		if (name[0] == idp->name[0] &&
X					strncmp(name, idp->name, len) == 0) {
X			*uidp = idp->uid;
X			if (idp->valid == 2) {	/* Name not found */
X				*uidp = ic_uid_nobody(); /* Return UID_NOBODY */
X				return (FALSE);
X			}
X			return (TRUE);
X		}
X	}
X	idp = &uidcache[lastuidx++];		/* Round robin fill next ent */
X	if (lastuidx >= C_SIZE)
X		lastuidx = 0;
X
X	idp->uid = 0;
X	idp->name[0] = '\0';
X	strncpy(idp->name, name, len);
X	idp->name[len] = '\0';
X	idp->valid = 1;
X	if ((pw = getpwnam(idp->name)) != NULL) {
X		idp->uid = pw->pw_uid;
X		*uidp = idp->uid;
X		return (TRUE);
X	} else {
X		idp->valid = 2;			/* Mark name as not found */
X		*uidp = ic_uid_nobody();	/* Return UID_NOBODY */
X		return (FALSE);
X	}
X}
X
X/*
X * Get name from gid
X */
X#ifdef	PROTOTYPES
XEXPORT BOOL
Xic_namegid(char *name, int namelen, gid_t gid)
X#else
XEXPORT BOOL
Xic_namegid(name, namelen, gid)
X	char	*name;
X	int	namelen;
X	gid_t	gid;
X#endif
X{
X	struct group	*gr;
X	register int	i;
X	register gidc_t	*idp;
X
X	for (i = 0, idp = gidcache; i < C_SIZE; i++, idp++) {
X		if (idp->valid == 0)		/* Entry not yet filled */
X			break;
X		if (idp->gid == gid)
X			goto out;
X	}
X	idp = &gidcache[lastgidx++];		/* Round robin fill next ent */
X	if (lastgidx >= C_SIZE)
X		lastgidx = 0;
X
X	idp->gid = gid;
X	idp->name[0] = '\0';
X	idp->valid = 1;
X	if ((gr = getgrgid(gid)) != NULL) {
X		strncpy(idp->name, gr->gr_name, TGNMLEN);
X		idp->name[TGNMLEN] = '\0';
X		/*
X		 * XXX We should find a better method than shortening the cache
X		 */
X		if (namelen <= (TGNMLEN+1))
X			idp->name[namelen-1] = 0;
X	}
Xout:
X	strcpy(name, idp->name);
X	return (name[0] != '\0');
X}
X
X/*
X * Get gid from name
X */
XEXPORT BOOL
Xic_gidname(name, namelen, gidp)
X	char	*name;
X	int	namelen;
X	gid_t	*gidp;
X{
X	struct group	*gr;
X	register int	len = namelen > TGNMLEN?TGNMLEN:namelen;
X	register int	i;
X	register gidc_t	*idp;
X
X	if (name[0] == '\0') {
X		*gidp = ic_gid_nobody();	/* Return GID_NOBODY */
X		return (FALSE);
X	}
X
X	for (i = 0, idp = gidcache; i < C_SIZE; i++, idp++) {
X		if (idp->valid == 0)		/* Entry not yet filled */
X			break;
X		if (name[0] == idp->name[0] &&
X					strncmp(name, idp->name, len) == 0) {
X			*gidp = idp->gid;
X			if (idp->valid == 2) {	/* Name not found */
X				*gidp = ic_gid_nobody(); /* Return GID_NOBODY */
X				return (FALSE);
X			}
X			return (TRUE);
X		}
X	}
X	idp = &gidcache[lastgidx++];		/* Round robin fill next ent */
X	if (lastgidx >= C_SIZE)
X		lastgidx = 0;
X
X	idp->gid = 0;
X	idp->name[0] = '\0';
X	strncpy(idp->name, name, len);
X	idp->name[len] = '\0';
X	idp->valid = 1;
X	if ((gr = getgrnam(idp->name)) != NULL) {
X		idp->gid = gr->gr_gid;
X		*gidp = idp->gid;
X		return (TRUE);
X	} else {
X		idp->valid = 2;			/* Mark name as not found */
X		*gidp = ic_gid_nobody();	/* Return GID_NOBODY */
X		return (FALSE);
X	}
X}
X
X#include <schily/param.h>
X
X#ifndef	UID_NOBODY
X#define	UID_NOBODY	65534		/* The old SunOS-4.x and *BSD value */
X#endif
X#ifndef	GID_NOBODY
X#define	GID_NOBODY	65534		/* The old SunOS-4.x and *BSD value */
X#endif
X
XLOCAL void
Xnameinit()
X{
X	char	*name;
X	int	namelen;
X	uid_t	uid;
X	gid_t	gid;
X
X	/*
X	 * Make sure that uidname()/gidname() do not call nameinit().
X	 */
X	name_init = TRUE;
X
X	name = "nobody";
X	namelen = strlen(name);
X	if (!ic_uidname(name, namelen, &uid))
X		uid = UID_NOBODY;
X	_uid_nobody = uid;
X
X	if (!ic_gidname(name, namelen, &gid))
X		gid = GID_NOBODY;
X	_gid_nobody = gid;
X}
X
XEXPORT uid_t
Xic_uid_nobody()
X{
X	if (!name_init)
X		nameinit();
X	return (_uid_nobody);
X}
X
XEXPORT gid_t
Xic_gid_nobody()
X{
X	if (!name_init)
X		nameinit();
X	return (_gid_nobody);
X}
END-of-star-1.5.2/libfind/idcache.c
echo x - star-1.5.2/libfind/walk.c
sed 's/^X//' >star-1.5.2/libfind/walk.c << 'END-of-star-1.5.2/libfind/walk.c'
X/* @(#)walk.c	1.44 11/10/19 Copyright 2004-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)walk.c	1.44 11/10/19 Copyright 2004-2011 J. Schilling";
X#endif
X/*
X *	Walk a directory tree
X *
X *	Copyright (c) 2004-2011 J. Schilling
X *
X *	In order to make treewalk() thread safe, we need to make it to not use
X *	chdir(2)/fchdir(2) which is process global.
X *
X *	chdir(newdir)	->	old = dfd;
X *				dfd = openat(old, newdir, O_RDONLY);
X *				close(old)
X *	fchdir(dd)	->	close(dfd); dfd = dd;
X *	stat(name)	->	fstatat(dfd, name, statb, 0)
X *	lstat(name)	-> 	fstatat(dfd, name, statb, AT_SYMLINK_NOFOLLOW)
X *	opendir(dname)	->	dd = openat(dfd, dname, O_RDONLY);
X *				dir = fdopendir(dd);
X *
X *	Similar changes need to be introduced in fetchdir().
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/unistd.h>
X#include <schily/stdlib.h>
X#ifdef	HAVE_FCHDIR
X#include <schily/fcntl.h>
X#else
X#include <schily/maxpath.h>
X#endif
X#include <schily/param.h>	/* NODEV */
X#include <schily/stat.h>
X#include <schily/errno.h>
X#include <schily/string.h>
X#include <schily/standard.h>
X#include <schily/getcwd.h>
X#include <schily/jmpdefs.h>
X#include <schily/schily.h>
X#include <schily/nlsdefs.h>
X#include <schily/walk.h>
X#include <schily/fetchdir.h>
X
X#if	defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H)
X/*
X * The MAC OS X linker does not grok "common" varaibles.
X * We need to fetch the address of "environ" using a hack.
X */
X#include <crt_externs.h>
X#define	environ	*_NSGetEnviron()
X#else
Xextern	char **environ;
X#endif
X
X#ifndef	HAVE_LSTAT
X#define	lstat	stat
X#endif
X#ifndef	HAVE_DECL_STAT
Xextern int stat	__PR((const char *, struct stat *));
X#endif
X#ifndef	HAVE_DECL_LSTAT
Xextern int lstat __PR((const char *, struct stat *));
X#endif
X
X#define	IS_UFS(p)	((p)[0] == 'u' && \
X			(p)[1] == 'f' && \
X			(p)[2] == 's' && \
X			(p)[3] == '\0')
X#define	IS_ZFS(p)	((p)[0] == 'z' && \
X			(p)[1] == 'f' && \
X			(p)[2] == 's' && \
X			(p)[3] == '\0')
X
X#define	DIR_INCR	1024		/* How to increment Curdir size */
X#define	TW_MALLOC	0x01		/* Struct was allocated		*/
Xstruct twvars {
X	char		*Curdir;	/* The current path name	*/
X	int		Curdtail;	/* Where to append to Curdir	*/
X	int		Curdlen;	/* Current size of 'Curdir'	*/
X	int		Flags;		/* Flags related to this struct	*/
X	struct WALK	*Walk;		/* Backpointer to struct WALK	*/
X	struct stat	Sb;		/* stat(2) buffer for start dir	*/
X#ifdef	HAVE_FCHDIR
X	int		Home;		/* open fd to start CWD		*/
X#else
X	char		Home[MAXPATHNAME+1];	/* Abspath to start CWD	*/
X#endif
X};
X
Xstruct pdirs {
X	struct pdirs	*p_last; /* Previous node in list	*/
X	dev_t		p_dev;	/* st_dev for this dir		*/
X	ino_t		p_ino;	/* st_ino for this dir		*/
X	BOOL		p_stat;	/* Need to call stat always	*/
X	nlink_t		p_nlink; /* Number of subdirs to stat	*/
X};
X
X
Xtypedef	int	(*statfun)	__PR((const char *_nm, struct stat *_fs));
X
XEXPORT	int	treewalk	__PR((char *nm, walkfun fn, struct WALK *_state));
XLOCAL	int	walk		__PR((char *nm, statfun sf, walkfun fn, struct WALK *state, struct pdirs *last));
XLOCAL	int	incr_dspace	__PR((FILE *f, struct twvars *varp, int amt));
XEXPORT	void	walkinitstate	__PR((struct WALK *_state));
XEXPORT	void	*walkopen	__PR((struct WALK *_state));
XEXPORT	int	walkgethome	__PR((struct WALK *_state));
XEXPORT	int	walkhome	__PR((struct WALK *_state));
XEXPORT	int	walkclose	__PR((struct WALK *_state));
XLOCAL	int	xchdotdot	__PR((struct pdirs *last, int tail, struct WALK *_state));
XLOCAL	int	xchdir		__PR((char *p));
X
XEXPORT int
Xtreewalk(nm, fn, state)
X	char		*nm;	/* The name to start walking		*/
X	walkfun		fn;	/* The function to call for each node	*/
X	struct WALK	*state; /* Walk state				*/
X{
X	struct twvars	vars;
X	statfun		statf = stat;
X	int		nlen;
X
X	if ((state->walkflags & WALK_CHDIR) == 0) {
X		seterrno(EINVAL);
X		return (-1);
X	}
X
X	vars.Curdir  = NULL;
X	vars.Curdlen = 0;
X	vars.Curdtail = 0;
X	vars.Flags = 0;
X#ifdef	HAVE_FCHDIR
X	vars.Home = -1;
X#endif
X	state->twprivate = &vars;
X	vars.Walk = state;
X	if (walkgethome(state) < 0) {
X		state->twprivate = NULL;
X		return (-1);
X	}
X
X	if (nm == NULL || nm[0] == '\0') {
X		nm = ".";
X	} else if (state->walkflags & WALK_STRIPLDOT) {
X		if (nm[0] == '.' && nm[1] == '/') {
X			for (nm++; nm[0] == '/'; nm++)
X				/* LINTED */
X				;
X		}
X	}
X
X	vars.Curdir = __fjmalloc(state->std[2],
X					DIR_INCR, "path buffer", JM_RETURN);
X	if (vars.Curdir == NULL)
X		return (-1);
X	vars.Curdir[0] = 0;
X	vars.Curdlen = DIR_INCR;
X	/*
X	 * If initial Curdir space is not sufficient, expand it.
X	 */
X	nlen = strlen(nm);
X	if ((vars.Curdlen - 2) < nlen)
X		if (incr_dspace(state->std[2], &vars, nlen + 2) < 0)
X			return (-1);
X
X	while (lstat(nm, &vars.Sb) < 0 && geterrno() == EINTR)
X		;
X
X	state->flags = 0;
X	state->base = 0;
X	state->level = 0;
X
X	if (state->walkflags & WALK_PHYS)
X		statf = lstat;
X
X	if (state->walkflags & (WALK_ARGFOLLOW|WALK_ALLFOLLOW))
X		statf = stat;
X
X	nlen = walk(nm, statf, fn, state, (struct pdirs *)0);
X	walkhome(state);
X	walkclose(state);
X
X	free(vars.Curdir);
X	state->twprivate = NULL;
X	return (nlen);
X}
X
XLOCAL int
Xwalk(nm, sf, fn, state, last)
X	char		*nm;	/* The current name for the walk	*/
X	statfun		sf;	/* stat() or lstat()			*/
X	walkfun		fn;	/* The function to call for each node	*/
X	struct WALK	*state;	/* For communication with (*fn)()	*/
X	struct pdirs	*last;	/* This helps to avoid loops		*/
X{
X	struct pdirs	thisd;
X	struct stat	fs;
X	int		type;
X	int		ret;
X	int		otail;
X	char		*p;
X	struct twvars	*varp = state->twprivate;
X
X	otail = varp->Curdtail;
X	state->base = otail;
X	state->flags = 0;
X	if (varp->Curdtail == 0 || varp->Curdir[varp->Curdtail-1] == '/') {
X		if (varp->Curdtail == 0 &&
X		    (state->walkflags & WALK_STRIPLDOT) &&
X		    (nm[0] == '.' && nm[1] == '\0')) {
X			varp->Curdir[0] = '.';
X			varp->Curdir[1] = '\0';
X		} else {
X			p = strcatl(&varp->Curdir[varp->Curdtail], nm,
X								(char *)0);
X			varp->Curdtail = p - varp->Curdir;
X		}
X	} else {
X		p = strcatl(&varp->Curdir[varp->Curdtail], "/", nm, (char *)0);
X		varp->Curdtail = p - varp->Curdir;
X		state->base++;
X	}
X
X	if ((state->walkflags & WALK_NOSTAT) &&
X	    last != NULL && !last->p_stat && last->p_nlink <= 0) {
X		/*
X		 * Set important fields to useful values to make sure that
X		 * no wrong information is evaluated in the no stat(2) case.
X		 */
X		fs.st_mode = 0;
X		fs.st_ino = 0;
X		fs.st_dev = NODEV;
X		fs.st_nlink = 0;
X		fs.st_size = 0;
X
X		type = WALK_F;
X		goto type_known;
X	} else {
X		while ((ret = (*sf)(nm, &fs)) < 0 && geterrno() == EINTR)
X			;
X	}
X	if (ret >= 0) {
X#ifdef	HAVE_ST_FSTYPE
X		/*
X		 * Check for autofs mount points...
X		 */
X		if (fs.st_fstype[0] == 'a' &&
X		    strcmp(fs.st_fstype, "autofs") == 0) {
X			int	f = open(nm, O_RDONLY|O_NDELAY);
X			if (f < 0) {
X				type = WALK_DNR;
X			} else {
X				if (fstat(f, &fs) < 0)
X					type = WALK_NS;
X				close(f);
X			}
X		}
X#endif
X		if (S_ISDIR(fs.st_mode)) {
X			type = WALK_D;
X			if (last != NULL && !last->p_stat && last->p_nlink > 0)
X				last->p_nlink--;
X		} else if (S_ISLNK(fs.st_mode))
X			type = WALK_SL;
X		else
X			type = WALK_F;
X	} else {
X		int	err = geterrno();
X		while ((ret = lstat(nm, &fs)) < 0 && geterrno() == EINTR)
X			;
X		if (ret >= 0 &&
X		    S_ISLNK(fs.st_mode)) {
X			seterrno(err);
X			/*
X			 * Found symbolic link that points to nonexistent file.
X			 */
X			ret = (*fn)(varp->Curdir, &fs, WALK_SLN, state);
X			goto out;
X		} else {
X			/*
X			 * Found unknown file type because lstat() failed.
X			 */
X			ret = (*fn)(varp->Curdir, &fs, WALK_NS, state);
X			goto out;
X		}
X	}
X	if ((state->walkflags & WALK_MOUNT) != 0 &&
X	    varp->Sb.st_dev != fs.st_dev) {
X		ret = 0;
X		goto out;
X	}
X
Xtype_known:
X	if (type == WALK_D) {
X		BOOL		isdot = (nm[0] == '.' && nm[1] == '\0');
X		struct pdirs	*pd = last;
X
X		ret = 0;
X		if ((state->walkflags & (WALK_PHYS|WALK_ALLFOLLOW)) == WALK_PHYS)
X			sf = lstat;
X
X		/*
X		 * Search parent dir structure for possible loops.
X		 * If a loop is found, do not descend.
X		 */
X		thisd.p_last = last;
X		thisd.p_dev  = fs.st_dev;
X		thisd.p_ino  = fs.st_ino;
X		if (state->walkflags & WALK_NOSTAT && fs.st_nlink >= 2) {
X			thisd.p_stat  = FALSE;
X			thisd.p_nlink  = fs.st_nlink - 2;
X#ifdef	HAVE_ST_FSTYPE
X			if (!IS_UFS(fs.st_fstype) &&
X			    !IS_ZFS(fs.st_fstype))
X				thisd.p_stat  = TRUE;
X#else
X			thisd.p_stat  = TRUE;	/* Safe fallback */
X#endif
X		} else {
X			thisd.p_stat  = TRUE;
X			thisd.p_nlink  = 1;
X		}
X
X		while (pd) {
X			if (pd->p_dev == fs.st_dev &&
X			    pd->p_ino == fs.st_ino) {
X				/*
X				 * Found a directory that has been previously
X				 * visited already. This may happen with hard
X				 * linked directories. We found a loop, so do
X				 * not descend this directory.
X				 */
X				ret = (*fn)(varp->Curdir, &fs, WALK_DP, state);
X				goto out;
X			}
X			pd = pd->p_last;
X		}
X
X		if ((state->walkflags & WALK_DEPTH) == 0) {
X			/*
X			 * Found a directory, check the content past this dir.
X			 */
X			ret = (*fn)(varp->Curdir, &fs, type, state);
X
X			if (state->flags & WALK_WF_PRUNE)
X				goto out;
X		}
X
X		if (!isdot && chdir(nm) < 0) {
X			state->flags |= WALK_WF_NOCHDIR;
X			/*
X			 * Found a directory that does not allow chdir() into.
X			 */
X			ret = (*fn)(varp->Curdir, &fs, WALK_DNR, state);
X			state->flags &= ~WALK_WF_NOCHDIR;
X			goto out;
X		} else {
X			char	*dp;
X			char	*odp;
X			int	nents;
X			int	Dspace;
X
X			/*
X			 * Add space for '/' & '\0'
X			 */
X			Dspace = varp->Curdlen - varp->Curdtail - 2;
X
X			if ((dp = fetchdir(".", &nents, NULL, NULL)) == NULL) {
X				/*
X				 * Found a directory that cannot be read.
X				 */
X				ret = (*fn)(varp->Curdir, &fs, WALK_DNR, state);
X				goto skip;
X			}
X
X			odp = dp;
X			while (nents > 0 && ret == 0) {
X				register char	*name;
X				register int	nlen;
X
X				name = &dp[1];
X				nlen = strlen(name);
X
X				if (Dspace < nlen) {
X					int incr = incr_dspace(state->std[2],
X								varp, nlen + 2);
X					if (incr < 0) {
X						ret = -1;
X						break;
X					}
X					Dspace += incr;
X				}
X				state->level++;
X				ret = walk(name, sf, fn, state, &thisd);
X				state->level--;
X
X				if (state->flags & WALK_WF_QUIT)
X					break;
X				nents--;
X				dp += nlen +2;
X			}
X			free(odp);
X		skip:
X			if (!isdot && state->level > 0 && xchdotdot(last,
X							otail, state) < 0) {
X				ret = geterrno();
X				state->flags |= WALK_WF_NOHOME;
X				if ((state->walkflags & WALK_NOMSG) == 0) {
X					ferrmsg(state->std[2],
X					gettext(
X					"Cannot chdir to '..' from '%s/'.\n"),
X						varp->Curdir);
X				}
X				if ((state->walkflags & WALK_NOEXIT) == 0)
X					comexit(ret);
X				ret = -1;
X				goto out;
X			}
X			if (ret < 0)		/* Do not call callback	    */
X				goto out;	/* func past fatal errors   */
X		}
X		if ((state->walkflags & WALK_DEPTH) != 0) {
X			if (varp->Curdtail == 0 &&
X			    (state->walkflags & WALK_STRIPLDOT) &&
X			    (nm[0] == '.' && nm[1] == '\0')) {
X				varp->Curdir[0] = '.';
X				varp->Curdir[1] = '\0';
X			}
X			ret = (*fn)(varp->Curdir, &fs, type, state);
X		}
X	} else {
X		/*
X		 * Any other non-directory and non-symlink file type.
X		 */
X		ret = (*fn)(varp->Curdir, &fs, type, state);
X	}
Xout:
X	varp->Curdir[otail] = '\0';
X	varp->Curdtail = otail;
X	return (ret);
X}
X
XLOCAL int
Xincr_dspace(f, varp, amt)
X	FILE		*f;
X	struct twvars	*varp;
X	int		amt;
X{
X	int	incr = DIR_INCR;
X	char	*new;
X
X	if (amt < 0)
X		amt = 0;
X	while (incr < amt)
X		incr += DIR_INCR;
X	new = __fjrealloc(f, varp->Curdir, varp->Curdlen + incr,
X						"path buffer", JM_RETURN);
X	if (new == NULL)
X		return (-1);
X	varp->Curdir = new;
X	varp->Curdlen += incr;
X	return (incr);
X}
X
X/*
X * Call first to create a useful WALK state default.
X */
XEXPORT void
Xwalkinitstate(state)
X	struct WALK	*state;
X{
X	state->flags = state->base = state->level = state->walkflags = 0;
X	state->twprivate = NULL;
X	state->std[0] = stdin;
X	state->std[1] = stdout;
X	state->std[2] = stderr;
X	state->env = environ;
X	state->quitfun = NULL;
X	state->qfarg = NULL;
X	state->maxdepth = state->mindepth = 0;
X	state->lname = state->tree = state->patstate = NULL;
X	state->err = state->pflags = state->auxi = 0;
X	state->auxp = NULL;
X}
X
X/*
X * For users that do not call treewalk(), e.g. star in extract mode.
X */
XEXPORT void *
Xwalkopen(state)
X	struct WALK	*state;
X{
X	struct twvars	*varp = __fjmalloc(state->std[2],
X					sizeof (struct twvars), "walk vars",
X								JM_RETURN);
X
X	if (varp == NULL)
X		return (NULL);
X	varp->Curdir  = NULL;
X	varp->Curdlen = 0;
X	varp->Curdtail = 0;
X	varp->Flags = TW_MALLOC;
X#ifdef	HAVE_FCHDIR
X	varp->Home = -1;
X#else
X	varp->Home[0] = '\0';
X#endif
X	state->twprivate = varp;
X	varp->Walk = state;
X
X	return ((void *)varp);
X}
X
XEXPORT int
Xwalkgethome(state)
X	struct WALK	*state;
X{
X	struct twvars	*varp = state->twprivate;
X	int		err = EX_BAD;
X
X	if (varp == NULL) {
X		if ((state->walkflags & WALK_NOMSG) == 0)
X			ferrmsg(state->std[2],
X				gettext("walkgethome: NULL twprivate\n"));
X		if ((state->walkflags & WALK_NOEXIT) == 0)
X			comexit(err);
X		return (-1);
X	}
X#ifdef	HAVE_FCHDIR
X	if (varp->Home >= 0)
X		close(varp->Home);
X	if ((varp->Home = open(".", O_SEARCH|O_NDELAY)) < 0) {
X		err = geterrno();
X		state->flags |= WALK_WF_NOCWD;
X		if ((state->walkflags & WALK_NOMSG) == 0)
X			ferrmsg(state->std[2],
X				gettext("Cannot get working directory.\n"));
X		if ((state->walkflags & WALK_NOEXIT) == 0)
X			comexit(err);
X		return (-1);
X	}
X#ifdef	F_SETFD
X	fcntl(varp->Home, F_SETFD, FD_CLOEXEC);
X#endif
X#else
X	if (getcwd(varp->Home, sizeof (varp->Home)) == NULL) {
X		err = geterrno();
X		state->flags |= WALK_WF_NOCWD;
X		if ((state->walkflags & WALK_NOMSG) == 0)
X			ferrmsg(state->std[2],
X				gettext("Cannot get working directory.\n"));
X		if ((state->walkflags & WALK_NOEXIT) == 0)
X			comexit(err);
X		return (-1);
X	}
X#endif
X	return (0);
X}
X
XEXPORT int
Xwalkhome(state)
X	struct WALK	*state;
X{
X	struct twvars	*varp = state->twprivate;
X
X	if (varp == NULL)
X		return (0);
X#ifdef	HAVE_FCHDIR
X	if (varp->Home >= 0)
X		return (fchdir(varp->Home));
X#else
X	if (varp->Home[0] != '\0')
X		return (chdir(varp->Home));
X#endif
X	return (0);
X}
X
XEXPORT int
Xwalkclose(state)
X	struct WALK	*state;
X{
X	int		ret = 0;
X	struct twvars	*varp = state->twprivate;
X
X	if (varp == NULL)
X		return (0);
X#ifdef	HAVE_FCHDIR
X	if (varp->Home >= 0)
X		ret = close(varp->Home);
X	varp->Home = -1;
X#else
X	varp->Home[0] = '\0';
X#endif
X	if (varp->Flags & TW_MALLOC) {
X		free(varp);
X		state->twprivate = NULL;
X	}
X	return (ret);
X}
X
XLOCAL int
Xxchdotdot(last, tail, state)
X	struct pdirs	*last;
X	int		tail;
X	struct WALK	*state;
X{
X	struct twvars	*varp = state->twprivate;
X	char	c;
X	struct stat sb;
X
X	if (chdir("..") >= 0) {
X		seterrno(0);
X		if (stat(".", &sb) >= 0) {
X			if (sb.st_dev == last->p_dev &&
X			    sb.st_ino == last->p_ino)
X				return (0);
X		}
X	}
X
X	if (walkhome(state) < 0)
X		return (-1);
X
X	c = varp->Curdir[tail];
X	varp->Curdir[tail] = '\0';
X	if (chdir(varp->Curdir) < 0) {
X		if (geterrno() != ENAMETOOLONG) {
X			varp->Curdir[tail] = c;
X			return (-1);
X		}
X		if (xchdir(varp->Curdir) < 0) {
X			varp->Curdir[tail] = c;
X			return (-1);
X		}
X	}
X	varp->Curdir[tail] = c;
X	seterrno(0);
X	if (stat(".", &sb) >= 0) {
X		if (sb.st_dev == last->p_dev &&
X		    sb.st_ino == last->p_ino)
X			return (0);
X	}
X	return (-1);
X}
X
XLOCAL int
Xxchdir(p)
X	char	*p;
X{
X	char	*p2;
X
X	while (*p) {
X		if ((p2 = strchr(p, '/')) != NULL)
X			*p2 = '\0';
X		if (chdir(p) < 0)
X			return (-1);
X		if (p2 == NULL)
X			break;
X		*p2 = '/';
X		p = &p2[1];
X	}
X	return (0);
X}
END-of-star-1.5.2/libfind/walk.c
echo x - star-1.5.2/libfind/noshlfind.mk
sed 's/^X//' >star-1.5.2/libfind/noshlfind.mk << 'END-of-star-1.5.2/libfind/noshlfind.mk'
X#ident %W% %E% %Q%
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xall:
X	@echo "	==> NO shared libs on this platform (yet)"
END-of-star-1.5.2/libfind/noshlfind.mk
echo x - star-1.5.2/libfind/shlfind.mk
sed 's/^X//' >star-1.5.2/libfind/shlfind.mk << 'END-of-star-1.5.2/libfind/shlfind.mk'
X#ident @(#)shlfind.mk	1.3 09/12/06 
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XSUBARCHDIR=	/pic
X#.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
X#VPATH=		.:stdio:$(ARCHDIR)
XINSDIR=		lib
XTARGETLIB=	find
X#CPPOPTS +=	-Istdio
X#CPPOPTS +=	-DUSE_SCANSTACK
X
X#CPPOPTS +=	-D__FIND__
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DUSE_ACL
XCPPOPTS +=	-DUSE_XATTR
XCPPOPTS +=	-DUSE_NLS
XCPPOPTS +=	-DSCHILY_PRINT
X
Xinclude		Targets
XLIBS=		-lschily $(LIB_ACL_TEST) -lc
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.shl
X###########################################################################
END-of-star-1.5.2/libfind/shlfind.mk
echo x - star-1.5.2/libfind/cmpdir.c
sed 's/^X//' >star-1.5.2/libfind/cmpdir.c << 'END-of-star-1.5.2/libfind/cmpdir.c'
X/* @(#)cmpdir.c	1.27 09/07/11 Copyright 2002-2009 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)cmpdir.c	1.27 09/07/11 Copyright 2002-2009 J. Schilling";
X#endif
X/*
X *	Blocked directory sort/compare.
X *
X *	Copyright (c) 2002-2009 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include <schily/utypes.h>
X#include <schily/string.h>
X#include <schily/schily.h>
X#include <schily/fetchdir.h>
X
XEXPORT	int	fdircomp	__PR((const void *p1, const void *p2));
XEXPORT	char	**sortdir	__PR((char *dir, int *entp));
XEXPORT	int	cmpdir		__PR((int ents1, int ents2,
X					char **ep1, char **ep2,
X					char **oa, char **od,
X					int *alenp, int *dlenp));
X
X/*
X * Compare directory entries from fetchdir().
X * Ignore first byte, it does not belong to the directory data.
X */
XEXPORT int
Xfdircomp(p1, p2)
X	const void	*p1;
X	const void	*p2;
X{
X	register Uchar	*s1;
X	register Uchar	*s2;
X
X	s1 = *(Uchar **)p1;
X	s2 = *(Uchar **)p2;
X	s1++;
X	s2++;
X	while (*s1 == *s2) {
X		if (*s1 == '\0')
X			return (0);
X		s1++;
X		s2++;
X	}
X	return (*s1 - *s2);
X}
X
X/*
X * Sort a directory string as returned by fetchdir().
X *
X * Return allocated arry with string pointers.
X */
XEXPORT char **
Xsortdir(dir, entp)
X	char	*dir;
X	int	*entp;
X{
X	int	ents = -1;
X	char	**ea;
X	char	*d;
X	char	*p;
X	int	i;
X
X	if (entp)
X		ents = *entp;
X	if (ents < 0) {
X		d = dir;
X		ents = 0;
X		while (*d) {
X			ents++;
X			p = strchr(d, '\0');
X			d = &p[1];
X		}
X	}
X	ea = ___malloc((ents+1)*sizeof (char *), "sortdir");
X	for (i = 0; i < ents; i++) {
X		ea[i] = NULL;
X	}
X	for (i = 0; i < ents; i++) {
X		ea[i] = dir;
X		p = strchr(dir, '\0');
X		if (p == NULL)
X			break;
X		dir = ++p;
X	}
X	ea[ents] = NULL;
X	qsort(ea, ents, sizeof (char *), fdircomp);
X	if (entp)
X		*entp = ents;
X	return (ea);
X}
X
XEXPORT int
Xcmpdir(ents1, ents2, ep1, ep2, oa, od, alenp, dlenp)
X	register int	ents1;	/* # of directory entries in arch	*/
X	register int	ents2;	/* # of directory entries on disk	*/
X	register char	**ep1;	/* Directory entry pointer array (arch)	*/
X	register char	**ep2;	/* Directory entry pointer array (disk)	*/
X	register char	**oa;	/* Only in arch pointer array		*/
X	register char	**od;	/* Only on disk pointer array		*/
X		int	*alenp;	/* Len pointer for "only in arch" array	*/
X		int	*dlenp;	/* Len pointer for "only on disk" array	*/
X{
X	register int	i1;	/* Index for 'only in archive'		*/
X	register int	i2;	/* Index for 'only on disk'		*/
X	register int	d;	/* 'diff' amount (== 0 means equal)	*/
X	register int	alen = 0; /* Number of ents only in archive	*/
X	register int	dlen = 0; /* Number of ents only on disk	*/
X
X	for (i1 = i2 = 0; i1 < ents1 && i2 < ents2; i1++, i2++) {
X		d = fdircomp(&ep1[i1], &ep2[i2]);
X		retry:
X
X		if (d > 0) {
X			do {
X				d = fdircomp(&ep1[i1], &ep2[i2]);
X				if (d <= 0)
X					goto retry;
X				if (od)
X					od[dlen] = ep2[i2];
X				dlen++;
X				i2++;
X			} while (i1 < ents1 && i2 < ents2);
X		}
X		if (d < 0) {
X			do {
X				d = fdircomp(&ep1[i1], &ep2[i2]);
X				if (d >= 0)
X					goto retry;
X				if (oa)
X					oa[alen] = ep1[i1];
X				alen++;
X				i1++;
X			} while (i1 < ents1 && i2 < ents2);
X		}
X		/*
X		 * Do not increment i1 & i2 in case that the last elements are
X		 * not equal and need to be treaten as longer list elements in
X		 * the code below.
X		 */
X		if (i1 >= ents1 || i2 >= ents2)
X			break;
X	}
X	/*
X	 * One of both lists is longer after some amount.
X	 */
X	if (od == NULL) {
X		if (i2 < ents2)
X			dlen += ents2 - i2;
X	} else {
X		for (; i2 < ents2; i2++) {
X			od[dlen] = ep2[i2];
X			dlen++;
X		}
X	}
X	if (oa == NULL) {
X		if (i1 < ents1)
X			alen += ents1 - i1;
X	} else {
X		for (; i1 < ents1; i1++) {
X			oa[alen] = ep1[i1];
X			alen++;
X		}
X	}
X	if (alenp)
X		*alenp = alen;
X	if (dlenp)
X		*dlenp = dlen;
X
X	return (alen + dlen);
X}
END-of-star-1.5.2/libfind/cmpdir.c
echo x - star-1.5.2/libfind/find_tok.h
sed 's/^X//' >star-1.5.2/libfind/find_tok.h << 'END-of-star-1.5.2/libfind/find_tok.h'
X/* @(#)find_tok.h	1.6 10/04/19 Copyright 2004-2010 J. Schilling */
X/*
X *	Copyright (c) 2004-2010 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#ifndef	_FIND_TOK_H
X#define	_FIND_TOK_H
X
X#define	OPEN	0	/* (				*/
X#define	CLOSE	1	/* )				*/
X#define	LNOT	2	/* !				*/
X#define	AND	3	/* a				*/
X#define	LOR	4	/* o				*/
X#define	ATIME	5	/* -atime			*/
X#define	CTIME	6	/* -ctime			*/
X#define	DEPTH	7	/* -depth			*/
X#define	EXEC	8	/* -exec			*/
X#define	FOLLOW	9	/* -follow	POSIX Extension	*/
X#define	FSTYPE	10	/* -fstype	POSIX Extension	*/
X#define	GROUP	11	/* -group			*/
X#define	INUM	12	/* -inum	POSIX Extension	*/
X#define	LINKS	13	/* -links			*/
X#define	LOCL	14	/* -local	POSIX Extension	*/
X#define	LS	15	/* -ls		POSIX Extension	*/
X#define	MODE	16	/* -mode	POSIX Extension	*/
X#define	MOUNT	17	/* -mount	POSIX Extension	*/
X#define	MTIME	18	/* -mtime			*/
X#define	NAME	19	/* -name			*/
X#define	NEWER	20	/* -newer			*/
X#define	NOGRP	21	/* -nogroup			*/
X#define	NOUSER	22	/* -nouser			*/
X#define	OK_EXEC	23	/* -ok				*/
X#define	PERM	24	/* -perm			*/
X#define	PRINT	25	/* -print			*/
X#define	PRINTNNL 26	/* -printnnl	POSIX Extension	*/
X#define	PRUNE	27	/* -prune			*/
X#define	SIZE	28	/* -size			*/
X#define	TIME	29	/* -time	POSIX Extension	*/
X#define	TYPE	30	/* -type			*/
X#define	USER	31	/* -user 			*/
X#define	XDEV	32	/* -xdev			*/
X#define	PATH	33	/* -path	POSIX Extension	*/
X#define	LNAME	34	/* -lname	POSIX Extension	*/
X#define	PAT	35	/* -pat		POSIX Extension	*/
X#define	PPAT	36	/* -ppat	POSIX Extension	*/
X#define	LPAT	37	/* -lpat	POSIX Extension	*/
X#define	PACL	38	/* -ack		POSIX Extension	*/
X#define	XATTR	39	/* -xattr	POSIX Extension	*/
X#define	LINKEDTO 40	/* -linkedto	POSIX Extension	*/
X#define	NEWERAA	41	/* -neweraa	POSIX Extension	*/
X#define	NEWERAC	42	/* -newerac	POSIX Extension	*/
X#define	NEWERAM	43	/* -neweram	POSIX Extension	*/
X#define	NEWERCA	44	/* -newerca	POSIX Extension	*/
X#define	NEWERCC	45	/* -newercc	POSIX Extension	*/
X#define	NEWERCM	46	/* -newercm	POSIX Extension	*/
X#define	NEWERMA	47	/* -newerma	POSIX Extension	*/
X#define	NEWERMC	48	/* -newermc	POSIX Extension	*/
X#define	NEWERMM	49	/* -newermm	POSIX Extension	*/
X#define	SPARSE	50	/* -sparse	POSIX Extension	*/
X#define	LTRUE	51	/* -true	POSIX Extension	*/
X#define	LFALSE	52	/* -false	POSIX Extension	*/
X#define	MAXDEPTH 53	/* -maxdepth	POSIX Extension	*/
X#define	MINDEPTH 54	/* -mindepth	POSIX Extension	*/
X#define	HELP	55	/* -help	POSIX Extension	*/
X#define	CHOWN	56	/* -chown	POSIX Extension	*/
X#define	CHGRP	57	/* -chgrp	POSIX Extension	*/
X#define	CHMOD	58	/* -chmod	POSIX Extension	*/
X#define	DOSTAT	59	/* -dostat	POSIX Extension	*/
X#define	INAME	60	/* -iname	POSIX Extension	*/
X#define	ILNAME	61	/* -ilname	POSIX Extension	*/
X#define	IPATH	62	/* -ipath	POSIX Extension	*/
X#define	IPAT	63	/* -ipat	POSIX Extension	*/
X#define	IPPAT	64	/* -ippat	POSIX Extension	*/
X#define	ILPAT	65	/* -ilpat	POSIX Extension	*/
X#define	AMIN	66	/* -amin	POSIX Extension	*/
X#define	CMIN	67	/* -cmin	POSIX Extension	*/
X#define	MMIN	68	/* -mmin	POSIX Extension	*/
X#define	PRINT0	69	/* -print0	POSIX Extension	*/
X#define	FPRINT	70	/* -fprint	POSIX Extension	*/
X#define	FPRINTNNL 71	/* -fprintnnl	POSIX Extension	*/
X#define	FPRINT0	72	/* -fprint0	POSIX Extension	*/
X#define	FLS	73	/* -fls		POSIX Extension	*/
X#define	EMPTY	74	/* -empty	POSIX Extension	*/
X#define	READABLE 75	/* -readable	POSIX Extension	*/
X#define	WRITABLE 76	/* -writable	POSIX Extension	*/
X#define	EXECUTABLE 77	/* -executable	POSIX Extension	*/
X#define	EXECDIR	78	/* -execdir	POSIX Extension	*/
X#define	OK_EXECDIR 79	/* -okdir	POSIX Extension	*/
X#define	ENDPRIM	90	/* End of primary list		*/
X#define	EXECPLUS 81	/* -exec			*/
X#define	EXECDIRPLUS 82	/* -execdir			*/
X#define	ENDTLIST 83	/* End of token list		*/
X
X#define	tokennames	_find_tokennames
X
X#ifdef	TOKEN_NAMES
XLOCAL	char	*tokennames[] = {
X	"(",		/* 0 OPEN			*/
X	")",		/* 1 CLOSE			*/
X	"!",		/* 2 LNOT			*/
X	"a",		/* 3 AND			*/
X	"o",		/* 4 LOR			*/
X	"atime",	/* 5 ATIME			*/
X	"ctime",	/* 6 CTIME			*/
X	"depth",	/* 7 DEPTH			*/
X	"exec",		/* 8 EXEC			*/
X	"follow",	/* 9 FOLLOW	POSIX Extension	*/
X	"fstype",	/* 10 FSTYPE	POSIX Extension	*/
X	"group",	/* 11 GROUP			*/
X	"inum",		/* 12 INUM	POSIX Extension	*/
X	"links",	/* 13 LINKS			*/
X	"local",	/* 14 LOCL	POSIX Extension	*/
X	"ls",		/* 15 LS	POSIX Extension	*/
X	"mode",		/* 16 MODE	POSIX Extension	*/
X	"mount",	/* 17 MOUNT	POSIX Extension	*/
X	"mtime",	/* 18 MTIME			*/
X	"name",		/* 19 NAME			*/
X	"newer",	/* 20 NEWER			*/
X	"nogroup",	/* 21 NOGRP			*/
X	"nouser",	/* 22 NOUSER			*/
X	"ok",		/* 23 OK_EXEC			*/
X	"perm",		/* 24 PERM			*/
X	"print",	/* 25 PRINT			*/
X	"printnnl",	/* 26 PRINTNNL	POSIX Extension	*/
X	"prune",	/* 27 PRUNE			*/
X	"size",		/* 28 SIZE			*/
X	"time",		/* 29 TIME	POSIX Extension	*/
X	"type",		/* 30 TYPE			*/
X	"user",		/* 31 USER			*/
X	"xdev",		/* 32 XDEV			*/
X	"path",		/* 33 PATH	POSIX Extension	*/
X	"lname",	/* 34 LNAME	POSIX Extension	*/
X	"pat",		/* 35 PAT	POSIX Extension	*/
X	"ppat",		/* 36 PPAT	POSIX Extension	*/
X	"lpat",		/* 37 LPAT	POSIX Extension	*/
X	"acl",		/* 38 PACL	POSIX Extension	*/
X	"xattr",	/* 39 XATTR	POSIX Extension	*/
X	"linkedto",	/* 40 LINKEDTO	POSIX Extension	*/
X	"neweraa",	/* 41 NEWERAA	POSIX Extension	*/
X	"newerac",	/* 42 NEWERAC	POSIX Extension	*/
X	"neweram",	/* 43 NEWERAM	POSIX Extension	*/
X	"newerca",	/* 44 NEWERCA	POSIX Extension	*/
X	"newercc",	/* 45 NEWERCC	POSIX Extension	*/
X	"newercm",	/* 46 NEWERCM	POSIX Extension	*/
X	"newerma",	/* 47 NEWERMA	POSIX Extension	*/
X	"newermc",	/* 48 NEWERMC	POSIX Extension	*/
X	"newermm",	/* 49 NEWERMM	POSIX Extension	*/
X	"sparse",	/* 50 SPARSE	POSIX Extension	*/
X	"true",		/* 51 LTRUE	POSIX Extension	*/
X	"false",	/* 52 LFALSE	POSIX Extension	*/
X	"maxdepth",	/* 53 MAXDEPTH	POSIX Extension	*/
X	"mindepth",	/* 54 MINDEPTH	POSIX Extension	*/
X	"help",		/* 55 HELP	POSIX Extension	*/
X	"chown",	/* 56 CHOWN	POSIX Extension	*/
X	"chgrp",	/* 57 CHGRP	POSIX Extension	*/
X	"chmod",	/* 58 CHMOD	POSIX Extension	*/
X	"dostat",	/* 59 DOSTAT	POSIX Extension	*/
X	"iname",	/* 60 INAME	POSIX Extension	*/
X	"ilname",	/* 61 ILNAME	POSIX Extension	*/
X	"ipath",	/* 62 IPATH	POSIX Extension	*/
X	"ipat",		/* 63 IPAT	POSIX Extension	*/
X	"ippat",	/* 64 IPPAT	POSIX Extension	*/
X	"ilpat",	/* 65 ILPAT	POSIX Extension	*/
X	"amin",		/* 66 AMIN	POSIX Extension	*/
X	"cmin",		/* 67 CMIN	POSIX Extension	*/
X	"mmin",		/* 68 MMIN	POSIX Extension	*/
X	"print0",	/* 69 PRINT0	POSIX Extension	*/
X	"fprint",	/* 70 FPRINT	POSIX Extension	*/
X	"fprintnnl",	/* 71 FPRINTNNL	POSIX Extension	*/
X	"fprint0",	/* 72 FPRINT0	POSIX Extension	*/
X	"fls",		/* 73 FLS	POSIX Extension	*/
X	"empty",	/* 74 EMPTY	POSIX Extension	*/
X	"readable",	/* 75 READABLE	POSIX Extension	*/
X	"writable",	/* 76 WRITABLE	POSIX Extension	*/
X	"executable",	/* 77 EXECUTABLE POSIX Extension */
X	"execdir",	/* 78 EXECDIR	POSIX Extension */
X	"okdir",	/* 79 OK_EXECDIR POSIX Extension */
X	0,		/* 80 End of primary list	*/
X	"exec",		/* 81 Map EXECPLUS -> "exec"	*/
X	"execdir",	/* 82 Map EXECDIRPLUS -> "execdir" */
X	0		/* 83 End of list		*/
X};
X#define	NTOK	((sizeof (tokennames) / sizeof (tokennames[0])) - 1)
X
X#else	/* TOKEN_NAMES */
X
X#define	NTOK	ENDTLIST
X
X#endif	/* TOKEN_NAMES */
X
X#endif	/* _FIND_TOK_H */
END-of-star-1.5.2/libfind/find_tok.h
echo c - star-1.5.2/star_sym
mkdir -p star-1.5.2/star_sym > /dev/null 2>&1
echo x - star-1.5.2/star_sym/star_sym.c
sed 's/^X//' >star-1.5.2/star_sym/star_sym.c << 'END-of-star-1.5.2/star_sym/star_sym.c'
X/* @(#)star_sym.c	1.15 11/10/19 Copyright 2005-2011 J. Schilling */
X#include <schily/mconfig.h>
X#ifndef lint
Xstatic	UConst char sccsid[] =
X	"@(#)star_sym.c	1.15 11/10/19 Copyright 2005-2011 J. Schilling";
X#endif
X/*
X *	Read in the star inode data base and write a human
X *	readable version.
X *
X *	Copyright (c) 2005-2011 J. Schilling
X */
X/*
X * The contents of this file are subject to the terms of the
X * Common Development and Distribution License, Version 1.0 only
X * (the "License").  You may not use this file except in compliance
X * with the License.
X *
X * See the file CDDL.Schily.txt in this distribution for details.
X *
X * When distributing Covered Code, include this CDDL HEADER in each
X * file and include the License file CDDL.Schily.txt from this distribution.
X */
X
X#include <schily/stdio.h>
X#include <schily/stdlib.h>
X#include <schily/unistd.h>
X#include <schily/standard.h>
X#include "star.h"
X#include "restore.h"
X#include "dumpdate.h"
X#include <schily/jmpdefs.h>	/* To include __jmalloc() */
X#include <schily/fcntl.h>
X#include <schily/schily.h>
X#include <schily/maxpath.h>
X#include "starsubs.h"
X
X#ifndef	HAVE_LSTAT
X#define	lstat	stat
X#endif
X
Xstruct star_stats	xstats;		/* for printing statistics	*/
X
Xdev_t	curfs = NODEV;			/* Current st_dev for -M option	*/
Xchar	*vers;				/* the full version string	*/
XBOOL	force_remove = FALSE;		/* -force-remove on extraction	*/
XBOOL	remove_recursive = FALSE;	/* -remove-recursive on extract	*/
XBOOL	forcerestore = FALSE;		/* -force-restore in incremental mode	*/
XBOOL	uncond	  = FALSE;		/* -U unconditional extract	*/
XBOOL	nowarn	  = FALSE;		/* -nowarn has been specified	*/
Xint	xdebug	  = 0;			/* eXtended debug level		*/
XGINFO	_grinfo;			/* Global read information	*/
XGINFO	*grip = &_grinfo;		/* Global read info pointer	*/
X
XLOCAL	void	star_mkvers	__PR((void));
XLOCAL	void	usage		__PR((int ret));
XEXPORT	int	main		__PR((int ac, char *av[]));
XLOCAL	void	make_symtab	__PR((int ac, char *av[]));
X
X
XEXPORT int
Xhdr_type(name)
X	char	*name;
X{
X	return (-1);
X}
X
XEXPORT BOOL
Xremove_file(name, isfirst)
X	register char	*name;
X		BOOL	isfirst;
X{
X	return (FALSE);
X}
X
XEXPORT BOOL
Xmake_adir(info)
X	register FINFO	*info;
X{
X	return (FALSE);
X}
X
X
X#include <schily/stat.h>
XEXPORT BOOL
X_getinfo(name, info)
X	char	*name;
X	register FINFO	*info;
X{
X	struct stat sb;
X
X	if (lstat(name, &sb) < 0)
X		return (FALSE);
X
X	info->f_name = name;
X	info->f_ino = sb.st_ino;
X	switch ((int)(sb.st_mode & S_IFMT)) {
X
X	case	S_IFREG:	info->f_filetype = F_FILE; break;
X	case	S_IFDIR:	info->f_filetype = F_DIR; break;
X#ifdef	S_IFLNK
X	case	S_IFLNK:	info->f_filetype = F_SLINK; break;
X#endif
X
X	default:		info->f_filetype = F_SPEC;
X	}
X	return (TRUE);
X}
X
X
XEXPORT char *
Xhdr_name(type)
X	int	type;
X{
X	return ("XXX");
X}
X
XEXPORT BOOL
Xcreate_dirs(name)
X	register char	*name;
X{
X	return (TRUE);
X}
X
XEXPORT char *
Xdt_name(type)
X	int	type;
X{
X	return ("unknown");
X}
X
XEXPORT int
Xdt_type(name)
X	char	*name;
X{
X	return (DT_UNKN);
X}
X
XEXPORT BOOL
Xsame_symlink(info)
X	FINFO	*info;
X{
X	return (FALSE);
X}
X
XEXPORT BOOL
Xsame_special(info)
X	FINFO	*info;
X{
X	return (FALSE);
X}
X
XLOCAL char	strvers[] = "1.5";
XLOCAL void
Xstar_mkvers()
X{
X	char	buf[512];
X
X	if (vers != NULL)
X		return;
X
X	js_snprintf(buf, sizeof (buf),
X		"%s %s (%s-%s-%s)", "star", strvers, HOST_CPU, HOST_VENDOR, HOST_OS);
X
X	vers = ___savestr(buf);
X}
X
XLOCAL void
Xusage(ret)
X	int	ret;
X{
X	error("Usage:\t%s [options] < file\n", get_progname());
X	error("Options:\n");
X	error("\t-help\t\tprint this help\n");
X	error("\t-version\tPrint version number.\n");
X	error("\n%s extracts star incremental restore database\n", get_progname());
X	exit(ret);
X	/* NOTREACHED */
X}
X
XEXPORT int
Xmain(ac, av)
X	int	ac;
X	char	*av[];
X{
Xextern	BOOL		is_star;
X	int		cac = ac;
X	char	*const *cav = av;
X	char		*opt = "help,h,version";
X	BOOL		help = FALSE;
X	BOOL		prvers = FALSE;
X
X	is_star = FALSE;
X	save_args(ac, av);
X	star_mkvers();
X
X	cac--;
X	cav++;
X	if (getallargs(&cac, &cav, opt, &help, &help, &prvers) < 0) {
X		errmsgno(EX_BAD, "Bad Option: '%s'.\n", cav[0]);
X		usage(EX_BAD);
X	}
X	if (help)
X		usage(0);
X	if (prvers) {
X		printf("%s: %s\n\n", get_progname(), vers);
X		printf("Copyright (C) 2005-2009 Jörg Schilling\n");
X		printf("This is free software; see the source for copying conditions.  There is NO\n");
X		printf("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
X		exit(0);
X	}
X
X	/*
X	 * As long as all options cause star_sym to exit, we may continue
X	 * with this lazy arg handling.
X	 */
X	if (ac > 2) {
X		/*
X		 * Reconstruct star-symtable
X		 * Call:
X		 * star_sym <restore-dir "."> <backup-dir>
X		 */
X		make_symtab(ac, av);
X		return (0);
X	}
X	if (ac < 2)
X		sym_open(NULL);		/* dump ./star-symtable */
X	else
X		sym_open(av[1]);	/* sump named symtable */
X	printLsym(stderr);
X	return (0);
X}
X
X/* ------------------------------------------------------------------------- */
X#include <schily/nlsdefs.h>
X
X#include <schily/walk.h>
X#include <schily/find.h>
X
X
XLOCAL	int	walkfunc	__PR((char *nm, struct stat *fs, int type, struct WALK *state));
XEXPORT	int	doscan		__PR((int ac, char **av));
X
XLOCAL void
Xmake_symtab(ac, av)
X	int	ac;
X	char	*av[];
X{
Xextern	BOOL	restore_valid;
X
X	sym_initmaps();
X	restore_valid = TRUE;
X	doscan(ac, av);
X	sym_close();
X}
X
X
XLOCAL int
Xwalkfunc(nm, fs, type, state)
X	char		*nm;
X	struct stat	*fs;
X	int		type;
X	struct WALK	*state;
X{
X	if (state->quitfun) {
X		/*
X		 * Check for shell builtin signal abort condition.
X		 */
X		if ((*state->quitfun)(state->qfarg)) {
X			state->flags |= WALK_WF_QUIT;
X			return (0);
X		}
X	}
X	if (type == WALK_NS) {
X		ferrmsg(state->std[2],
X				gettext("Cannot stat '%s'.\n"), nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) {
X		ferrmsg(state->std[2],
X				gettext("Cannot follow symlink '%s'.\n"), nm);
X		state->err = 1;
X		return (0);
X	} else if (type == WALK_DNR) {
X		if (state->flags & WALK_WF_NOCHDIR) {
X			ferrmsg(state->std[2],
X				gettext("Cannot chdir to '%s'.\n"), nm);
X		} else {
X			ferrmsg(state->std[2],
X				gettext("Cannot read '%s'.\n"), nm);
X		}
X		state->err = 1;
X		return (0);
X	}
X
X	if (state->maxdepth >= 0 && state->level >= state->maxdepth)
X		state->flags |= WALK_WF_PRUNE;
X	if (state->mindepth >= 0 && state->level < state->mindepth)
X		return (0);
X
X	{
X#ifndef	HAVE_FCHDIR
X		char		cwd[MAXPATHNAME+1];
X#else
X		int		f;
X#endif
X		struct stat	sb;
X		char		name[4096];
X
X		sprintf(name, "%s/%s", (char *)state->auxp, &nm[1]);
X		sb.st_ino = 0;
X
X#ifndef	HAVE_FCHDIR
X		cwd[0] = '\0';
X		getcwd(cwd, sizeof (cwd));
X#else
X		f = open(".", O_SEARCH);
X#endif
X		walkhome(state);
X		lstat(name, &sb);
X#ifndef	HAVE_FCHDIR
X		chdir(cwd);
X#else
X		fchdir(f);
X		close(f);
X#endif
X		padd_node(nm, sb.st_ino, fs->st_ino, (type ==  WALK_D) ?  I_DIR:0);
X	}
X	return (0);
X}
X
X
XEXPORT int
Xdoscan(ac, av)
X	int	ac;
X	char	**av;
X{
X	finda_t	fa;
X	findn_t	*Tree;
X	struct WALK	walkstate;
X	int	oraise[3];
X	int	ret = 0;
X	int	i;
X	FILE	*std[3];
X
X	std[0] = stdin;
X	std[1] = stdout;
X	std[2] = stderr;
X
X	find_argsinit(&fa);
X	for (i = 0; i < 3; i++) {
X		oraise[i] = file_getraise(std[i]);
X		file_raise(std[i], FALSE);
X		fa.std[i] = std[i];
X	}
X	fa.walkflags = WALK_CHDIR | WALK_PHYS;
X	fa.walkflags |= WALK_NOEXIT;
X
X	Tree = 0;
X	if (Tree == 0) {
X		Tree = find_printnode();
X	} else if (!fa.found_action) {
X		Tree = find_addprint(Tree, &fa);
X		if (Tree == (findn_t *)NULL) {
X			ret = geterrno();
X			goto out;
X		}
X	}
X	walkinitstate(&walkstate);
X	for (i = 0; i < 3; i++)
X		walkstate.std[i] = std[i];
X	if (fa.patlen > 0) {
X		walkstate.patstate = __fjmalloc(std[2],
X					sizeof (int) * fa.patlen,
X					"space for pattern state", JM_RETURN);
X		if (walkstate.patstate == NULL) {
X			ret = geterrno();
X			goto out;
X		}
X	}
X
X	find_timeinit(time(0));
X
X	walkstate.walkflags	= fa.walkflags;
X	walkstate.maxdepth	= fa.maxdepth;
X	walkstate.mindepth	= fa.mindepth;
X	walkstate.lname		= NULL;
X	walkstate.tree		= Tree;
X	walkstate.err		= 0;
X	walkstate.pflags	= 0;
X	walkstate.auxp		= av[2];
X
X	treewalk(av[1], walkfunc, &walkstate);
X
X	find_free(Tree, &fa);
X	ret = walkstate.err;
X
Xout:
X	for (i = 0; i < 3; i++) {
X		fflush(std[i]);
X		if (ferror(std[i]))
X			clearerr(std[i]);
X		file_raise(std[i], oraise[i]);
X	}
X	return (ret);
X}
END-of-star-1.5.2/star_sym/star_sym.c
echo x - star-1.5.2/star_sym/Makefile
sed 's/^X//' >star-1.5.2/star_sym/Makefile << 'END-of-star-1.5.2/star_sym/Makefile'
X#ident @(#)star_sym.mk	1.10 10/05/13 
X###########################################################################
X# Sample makefile for general application programs
X###########################################################################
XSRCROOT=	..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
XINSDIR=		bin
XTARGET=		star_sym
XCPPOPTS +=	-I../star
XCPPOPTS +=	-DSTAR_SYM
XCPPOPTS +=	-D__STAR__ 
XCPPOPTS +=	-DUSE_LARGEFILES
XCPPOPTS +=	-DSCHILY_PRINT
X
XCFILES=		star_sym.c restore.c dumpdate.c
XLIBS=		-lfind -lschily $(LIB_ACL_TEST) $(LIB_INTL)
XXMK_FILE=	star_sym.mk1
X
Xrestore.c dumpdate.c:
X	@echo "	==> MAKING SYMLINKS in ." && sh ./MKLINKS
X$(ALLTARGETS): restore.c dumpdate.c
X
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.cmd
X###########################################################################
X
END-of-star-1.5.2/star_sym/Makefile
echo x - star-1.5.2/star_sym/MKLINKS
sed 's/^X//' >star-1.5.2/star_sym/MKLINKS << 'END-of-star-1.5.2/star_sym/MKLINKS'
X#!/bin/sh
X###########################################################################
X#ident "@(#)MKLINKS	1.3 11/08/04 "
X###########################################################################
X# Written 2008-2011 by J. Schilling
X###########################################################################
X# Copyright (c) 2008-2011 J. Schilling
X###########################################################################
X# The contents of this file are subject to the terms of the
X# Common Development and Distribution License, Version 1.0 only
X# (the "License").  You may not use this file except in compliance
X# with the License.
X#
X# See the file CDDL.Schily.txt in this distribution for details.
X#
X# When distributing Covered Code, include this CDDL HEADER in each
X# file and include the License file CDDL.Schily.txt from this distribution.
X###########################################################################
Xsymlink="ln -s"
XMKLINKS_TEST=${MKLINKS_TEST-:}
Xif [ ".$MKLINKS_COPY" = '.' ]; then
X	rm -f xxzzy.123 xxzzy.345
X	echo test > xxzzy.123
X	$symlink xxzzy.123 xxzzy.345
X	test $? = 0 || symlink=cp
X	test -r xxzzy.345 || symlink=cp
X	${MKLINKS_TEST} -h xxzzy.345 || symlink=cp
X	rm -f xxzzy.123 xxzzy.345
Xelse
X	symlink=cp
Xfi
X###########################################################################
X
X$symlink ../star/restore.c	.
X$symlink ../star/dumpdate.c	.
END-of-star-1.5.2/star_sym/MKLINKS
echo x - star-1.5.2/CDDL.Schily.txt
sed 's/^X//' >star-1.5.2/CDDL.Schily.txt << 'END-of-star-1.5.2/CDDL.Schily.txt'
XCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0
X
X1. Definitions.
X
X    1.1. "Contributor" means each individual or entity that creates
X         or contributes to the creation of Modifications.
X
X    1.2. "Contributor Version" means the combination of the Original
X         Software, prior Modifications used by a Contributor (if any),
X         and the Modifications made by that particular Contributor.
X
X    1.3. "Covered Software" means (a) the Original Software, or (b)
X         Modifications, or (c) the combination of files containing
X         Original Software with files containing Modifications, in
X         each case including portions thereof.
X
X    1.4. "Executable" means the Covered Software in any form other
X         than Source Code.
X
X    1.5. "Initial Developer" means the individual or entity that first
X         makes Original Software available under this License.
X
X    1.6. "Larger Work" means a work which combines Covered Software or
X         portions thereof with code not governed by the terms of this
X         License.
X
X    1.7. "License" means this document.
X
X    1.8. "Licensable" means having the right to grant, to the maximum
X         extent possible, whether at the time of the initial grant or
X         subsequently acquired, any and all of the rights conveyed
X         herein.
X
X    1.9. "Modifications" means the Source Code and Executable form of
X         any of the following:
X
X        A. Any file that results from an addition to, deletion from or
X           modification of the contents of a file containing Original
X           Software or previous Modifications;
X
X        B. Any new file that contains any part of the Original
X           Software or previous Modifications; or
X
X        C. Any new file that is contributed or otherwise made
X           available under the terms of this License.
X
X    1.10. "Original Software" means the Source Code and Executable
X          form of computer software code that is originally released
X          under this License.
X
X    1.11. "Patent Claims" means any patent claim(s), now owned or
X          hereafter acquired, including without limitation, method,
X          process, and apparatus claims, in any patent Licensable by
X          grantor.
X
X    1.12. "Source Code" means (a) the common form of computer software
X          code in which modifications are made and (b) associated
X          documentation included in or with such code.
X
X    1.13. "You" (or "Your") means an individual or a legal entity
X          exercising rights under, and complying with all of the terms
X          of, this License.  For legal entities, "You" includes any
X          entity which controls, is controlled by, or is under common
X          control with You.  For purposes of this definition,
X          "control" means (a) the power, direct or indirect, to cause
X          the direction or management of such entity, whether by
X          contract or otherwise, or (b) ownership of more than fifty
X          percent (50%) of the outstanding shares or beneficial
X          ownership of such entity.
X
X2. License Grants.
X
X    2.1. The Initial Developer Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, the Initial
X    Developer hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Initial Developer, to use,
X            reproduce, modify, display, perform, sublicense and
X            distribute the Original Software (or portions thereof),
X            with or without Modifications, and/or as part of a Larger
X            Work; and
X
X        (b) under Patent Claims infringed by the making, using or
X            selling of Original Software, to make, have made, use,
X            practice, sell, and offer for sale, and/or otherwise
X            dispose of the Original Software (or portions thereof).
X
X        (c) The licenses granted in Sections 2.1(a) and (b) are
X            effective on the date Initial Developer first distributes
X            or otherwise makes the Original Software available to a
X            third party under the terms of this License.
X
X        (d) Notwithstanding Section 2.1(b) above, no patent license is
X            granted: (1) for code that You delete from the Original
X            Software, or (2) for infringements caused by: (i) the
X            modification of the Original Software, or (ii) the
X            combination of the Original Software with other software
X            or devices.
X
X    2.2. Contributor Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, each
X    Contributor hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Contributor to use, reproduce,
X            modify, display, perform, sublicense and distribute the
X            Modifications created by such Contributor (or portions
X            thereof), either on an unmodified basis, with other
X            Modifications, as Covered Software and/or as part of a
X            Larger Work; and
X
X        (b) under Patent Claims infringed by the making, using, or
X            selling of Modifications made by that Contributor either
X            alone and/or in combination with its Contributor Version
X            (or portions of such combination), to make, use, sell,
X            offer for sale, have made, and/or otherwise dispose of:
X            (1) Modifications made by that Contributor (or portions
X            thereof); and (2) the combination of Modifications made by
X            that Contributor with its Contributor Version (or portions
X            of such combination).
X
X        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are
X            effective on the date Contributor first distributes or
X            otherwise makes the Modifications available to a third
X            party.
X
X        (d) Notwithstanding Section 2.2(b) above, no patent license is
X            granted: (1) for any code that Contributor has deleted
X            from the Contributor Version; (2) for infringements caused
X            by: (i) third party modifications of Contributor Version,
X            or (ii) the combination of Modifications made by that
X            Contributor with other software (except as part of the
X            Contributor Version) or other devices; or (3) under Patent
X            Claims infringed by Covered Software in the absence of
X            Modifications made by that Contributor.
X
X3. Distribution Obligations.
X
X    3.1. Availability of Source Code.
X
X    Any Covered Software that You distribute or otherwise make
X    available in Executable form must also be made available in Source
X    Code form and that Source Code form must be distributed only under
X    the terms of this License.  You must include a copy of this
X    License with every copy of the Source Code form of the Covered
X    Software You distribute or otherwise make available.  You must
X    inform recipients of any such Covered Software in Executable form
X    as to how they can obtain such Covered Software in Source Code
X    form in a reasonable manner on or through a medium customarily
X    used for software exchange.
X
X    3.2. Modifications.
X
X    The Modifications that You create or to which You contribute are
X    governed by the terms of this License.  You represent that You
X    believe Your Modifications are Your original creation(s) and/or
X    You have sufficient rights to grant the rights conveyed by this
X    License.
X
X    3.3. Required Notices.
X
X    You must include a notice in each of Your Modifications that
X    identifies You as the Contributor of the Modification.  You may
X    not remove or alter any copyright, patent or trademark notices
X    contained within the Covered Software, or any notices of licensing
X    or any descriptive text giving attribution to any Contributor or
X    the Initial Developer.
X
X    3.4. Application of Additional Terms.
X
X    You may not offer or impose any terms on any Covered Software in
X    Source Code form that alters or restricts the applicable version
X    of this License or the recipients' rights hereunder.  You may
X    choose to offer, and to charge a fee for, warranty, support,
X    indemnity or liability obligations to one or more recipients of
X    Covered Software.  However, you may do so only on Your own behalf,
X    and not on behalf of the Initial Developer or any Contributor.
X    You must make it absolutely clear that any such warranty, support,
X    indemnity or liability obligation is offered by You alone, and You
X    hereby agree to indemnify the Initial Developer and every
X    Contributor for any liability incurred by the Initial Developer or
X    such Contributor as a result of warranty, support, indemnity or
X    liability terms You offer.
X
X    3.5. Distribution of Executable Versions.
X
X    You may distribute the Executable form of the Covered Software
X    under the terms of this License or under the terms of a license of
X    Your choice, which may contain terms different from this License,
X    provided that You are in compliance with the terms of this License
X    and that the license for the Executable form does not attempt to
X    limit or alter the recipient's rights in the Source Code form from
X    the rights set forth in this License.  If You distribute the
X    Covered Software in Executable form under a different license, You
X    must make it absolutely clear that any terms which differ from
X    this License are offered by You alone, not by the Initial
X    Developer or Contributor.  You hereby agree to indemnify the
X    Initial Developer and every Contributor for any liability incurred
X    by the Initial Developer or such Contributor as a result of any
X    such terms You offer.
X
X    3.6. Larger Works.
X
X    You may create a Larger Work by combining Covered Software with
X    other code not governed by the terms of this License and
X    distribute the Larger Work as a single product.  In such a case,
X    You must make sure the requirements of this License are fulfilled
X    for the Covered Software.
X
X4. Versions of the License.
X
X    4.1. New Versions.
X
X    Sun Microsystems, Inc. is the initial license steward and may
X    publish revised and/or new versions of this License from time to
X    time.  Each version will be given a distinguishing version number.
X    Except as provided in Section 4.3, no one other than the license
X    steward has the right to modify this License.
X
X    4.2. Effect of New Versions.
X
X    You may always continue to use, distribute or otherwise make the
X    Covered Software available under the terms of the version of the
X    License under which You originally received the Covered Software.
X    If the Initial Developer includes a notice in the Original
X    Software prohibiting it from being distributed or otherwise made
X    available under any subsequent version of the License, You must
X    distribute and make the Covered Software available under the terms
X    of the version of the License under which You originally received
X    the Covered Software.  Otherwise, You may also choose to use,
X    distribute or otherwise make the Covered Software available under
X    the terms of any subsequent version of the License published by
X    the license steward.
X
X    4.3. Modified Versions.
X
X    When You are an Initial Developer and You want to create a new
X    license for Your Original Software, You may create and use a
X    modified version of this License if You: (a) rename the license
X    and remove any references to the name of the license steward
X    (except to note that the license differs from this License); and
X    (b) otherwise make it clear that the license contains terms which
X    differ from this License.
X
X5. DISCLAIMER OF WARRANTY.
X
X    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
X    BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
X    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
X    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
X    PURPOSE OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND
X    PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.  SHOULD ANY
X    COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
X    INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
X    NECESSARY SERVICING, REPAIR OR CORRECTION.  THIS DISCLAIMER OF
X    WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.  NO USE OF
X    ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
X    DISCLAIMER.
X
X6. TERMINATION.
X
X    6.1. This License and the rights granted hereunder will terminate
X    automatically if You fail to comply with terms herein and fail to
X    cure such breach within 30 days of becoming aware of the breach.
X    Provisions which, by their nature, must remain in effect beyond
X    the termination of this License shall survive.
X
X    6.2. If You assert a patent infringement claim (excluding
X    declaratory judgment actions) against Initial Developer or a
X    Contributor (the Initial Developer or Contributor against whom You
X    assert such claim is referred to as "Participant") alleging that
X    the Participant Software (meaning the Contributor Version where
X    the Participant is a Contributor or the Original Software where
X    the Participant is the Initial Developer) directly or indirectly
X    infringes any patent, then any and all rights granted directly or
X    indirectly to You by such Participant, the Initial Developer (if
X    the Initial Developer is not the Participant) and all Contributors
X    under Sections 2.1 and/or 2.2 of this License shall, upon 60 days
X    notice from Participant terminate prospectively and automatically
X    at the expiration of such 60 day notice period, unless if within
X    such 60 day period You withdraw Your claim with respect to the
X    Participant Software against such Participant either unilaterally
X    or pursuant to a written agreement with Participant.
X
X    6.3. In the event of termination under Sections 6.1 or 6.2 above,
X    all end user licenses that have been validly granted by You or any
X    distributor hereunder prior to termination (excluding licenses
X    granted to You by any distributor) shall survive termination.
X
X7. LIMITATION OF LIABILITY.
X
X    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
X    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
X    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
X    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
X    LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
X    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
X    LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
X    STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
X    COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
X    INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.  THIS LIMITATION OF
X    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
X    INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
X    APPLICABLE LAW PROHIBITS SUCH LIMITATION.  SOME JURISDICTIONS DO
X    NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
X    CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
X    APPLY TO YOU.
X
X8. U.S. GOVERNMENT END USERS.
X
X    The Covered Software is a "commercial item," as that term is
X    defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
X    computer software" (as that term is defined at 48
X    C.F.R. 252.227-7014(a)(1)) and "commercial computer software
X    documentation" as such terms are used in 48 C.F.R. 12.212
X    (Sept. 1995).  Consistent with 48 C.F.R. 12.212 and 48
X    C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
X    U.S. Government End Users acquire Covered Software with only those
X    rights set forth herein.  This U.S. Government Rights clause is in
X    lieu of, and supersedes, any other FAR, DFAR, or other clause or
X    provision that addresses Government rights in computer software
X    under this License.
X
X9. MISCELLANEOUS.
X
X    This License represents the complete agreement concerning subject
X    matter hereof.  If any provision of this License is held to be
X    unenforceable, such provision shall be reformed only to the extent
X    necessary to make it enforceable.  This License shall be governed
X    by the law of the jurisdiction specified in a notice contained
X    within the Original Software (except to the extent applicable law,
X    if any, provides otherwise), excluding such jurisdiction's
X    conflict-of-law provisions.  Any litigation relating to this
X    License shall be subject to the jurisdiction of the courts located
X    in the jurisdiction and venue specified in a notice contained
X    within the Original Software, with the losing party responsible
X    for costs, including, without limitation, court costs and
X    reasonable attorneys' fees and expenses.  The application of the
X    United Nations Convention on Contracts for the International Sale
X    of Goods is expressly excluded.  Any law or regulation which
X    provides that the language of a contract shall be construed
X    against the drafter shall not apply to this License.  You agree
X    that You alone are responsible for compliance with the United
X    States export administration regulations (and the export control
X    laws and regulation of any other countries) when You use,
X    distribute or otherwise make available any Covered Software.
X
X10. RESPONSIBILITY FOR CLAIMS.
X
X    As between Initial Developer and the Contributors, each party is
X    responsible for claims and damages arising, directly or
X    indirectly, out of its utilization of rights under this License
X    and You agree to work with Initial Developer and Contributors to
X    distribute such responsibility on an equitable basis.  Nothing
X    herein is intended or shall be deemed to constitute any admission
X    of liability.
X
X--------------------------------------------------------------------
X
XNOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
XDISTRIBUTION LICENSE (CDDL)
X
XFor Covered Software in this distribution, this License shall
Xbe governed by the laws of Germany (excluding conflict-of-law
Xprovisions).
X
XAny litigation relating to this License shall be subject to the
Xjurisdiction and the courts of Berlin Germany, with venue lying
Xin Berlin Germany.
END-of-star-1.5.2/CDDL.Schily.txt
echo x - star-1.5.2/CDDL.Sun.txt
sed 's/^X//' >star-1.5.2/CDDL.Sun.txt << 'END-of-star-1.5.2/CDDL.Sun.txt'
XCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0
X
X1. Definitions.
X
X    1.1. "Contributor" means each individual or entity that creates
X         or contributes to the creation of Modifications.
X
X    1.2. "Contributor Version" means the combination of the Original
X         Software, prior Modifications used by a Contributor (if any),
X         and the Modifications made by that particular Contributor.
X
X    1.3. "Covered Software" means (a) the Original Software, or (b)
X         Modifications, or (c) the combination of files containing
X         Original Software with files containing Modifications, in
X         each case including portions thereof.
X
X    1.4. "Executable" means the Covered Software in any form other
X         than Source Code.
X
X    1.5. "Initial Developer" means the individual or entity that first
X         makes Original Software available under this License.
X
X    1.6. "Larger Work" means a work which combines Covered Software or
X         portions thereof with code not governed by the terms of this
X         License.
X
X    1.7. "License" means this document.
X
X    1.8. "Licensable" means having the right to grant, to the maximum
X         extent possible, whether at the time of the initial grant or
X         subsequently acquired, any and all of the rights conveyed
X         herein.
X
X    1.9. "Modifications" means the Source Code and Executable form of
X         any of the following:
X
X        A. Any file that results from an addition to, deletion from or
X           modification of the contents of a file containing Original
X           Software or previous Modifications;
X
X        B. Any new file that contains any part of the Original
X           Software or previous Modifications; or
X
X        C. Any new file that is contributed or otherwise made
X           available under the terms of this License.
X
X    1.10. "Original Software" means the Source Code and Executable
X          form of computer software code that is originally released
X          under this License.
X
X    1.11. "Patent Claims" means any patent claim(s), now owned or
X          hereafter acquired, including without limitation, method,
X          process, and apparatus claims, in any patent Licensable by
X          grantor.
X
X    1.12. "Source Code" means (a) the common form of computer software
X          code in which modifications are made and (b) associated
X          documentation included in or with such code.
X
X    1.13. "You" (or "Your") means an individual or a legal entity
X          exercising rights under, and complying with all of the terms
X          of, this License.  For legal entities, "You" includes any
X          entity which controls, is controlled by, or is under common
X          control with You.  For purposes of this definition,
X          "control" means (a) the power, direct or indirect, to cause
X          the direction or management of such entity, whether by
X          contract or otherwise, or (b) ownership of more than fifty
X          percent (50%) of the outstanding shares or beneficial
X          ownership of such entity.
X
X2. License Grants.
X
X    2.1. The Initial Developer Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, the Initial
X    Developer hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Initial Developer, to use,
X            reproduce, modify, display, perform, sublicense and
X            distribute the Original Software (or portions thereof),
X            with or without Modifications, and/or as part of a Larger
X            Work; and
X
X        (b) under Patent Claims infringed by the making, using or
X            selling of Original Software, to make, have made, use,
X            practice, sell, and offer for sale, and/or otherwise
X            dispose of the Original Software (or portions thereof).
X
X        (c) The licenses granted in Sections 2.1(a) and (b) are
X            effective on the date Initial Developer first distributes
X            or otherwise makes the Original Software available to a
X            third party under the terms of this License.
X
X        (d) Notwithstanding Section 2.1(b) above, no patent license is
X            granted: (1) for code that You delete from the Original
X            Software, or (2) for infringements caused by: (i) the
X            modification of the Original Software, or (ii) the
X            combination of the Original Software with other software
X            or devices.
X
X    2.2. Contributor Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, each
X    Contributor hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Contributor to use, reproduce,
X            modify, display, perform, sublicense and distribute the
X            Modifications created by such Contributor (or portions
X            thereof), either on an unmodified basis, with other
X            Modifications, as Covered Software and/or as part of a
X            Larger Work; and
X
X        (b) under Patent Claims infringed by the making, using, or
X            selling of Modifications made by that Contributor either
X            alone and/or in combination with its Contributor Version
X            (or portions of such combination), to make, use, sell,
X            offer for sale, have made, and/or otherwise dispose of:
X            (1) Modifications made by that Contributor (or portions
X            thereof); and (2) the combination of Modifications made by
X            that Contributor with its Contributor Version (or portions
X            of such combination).
X
X        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are
X            effective on the date Contributor first distributes or
X            otherwise makes the Modifications available to a third
X            party.
X
X        (d) Notwithstanding Section 2.2(b) above, no patent license is
X            granted: (1) for any code that Contributor has deleted
X            from the Contributor Version; (2) for infringements caused
X            by: (i) third party modifications of Contributor Version,
X            or (ii) the combination of Modifications made by that
X            Contributor with other software (except as part of the
X            Contributor Version) or other devices; or (3) under Patent
X            Claims infringed by Covered Software in the absence of
X            Modifications made by that Contributor.
X
X3. Distribution Obligations.
X
X    3.1. Availability of Source Code.
X
X    Any Covered Software that You distribute or otherwise make
X    available in Executable form must also be made available in Source
X    Code form and that Source Code form must be distributed only under
X    the terms of this License.  You must include a copy of this
X    License with every copy of the Source Code form of the Covered
X    Software You distribute or otherwise make available.  You must
X    inform recipients of any such Covered Software in Executable form
X    as to how they can obtain such Covered Software in Source Code
X    form in a reasonable manner on or through a medium customarily
X    used for software exchange.
X
X    3.2. Modifications.
X
X    The Modifications that You create or to which You contribute are
X    governed by the terms of this License.  You represent that You
X    believe Your Modifications are Your original creation(s) and/or
X    You have sufficient rights to grant the rights conveyed by this
X    License.
X
X    3.3. Required Notices.
X
X    You must include a notice in each of Your Modifications that
X    identifies You as the Contributor of the Modification.  You may
X    not remove or alter any copyright, patent or trademark notices
X    contained within the Covered Software, or any notices of licensing
X    or any descriptive text giving attribution to any Contributor or
X    the Initial Developer.
X
X    3.4. Application of Additional Terms.
X
X    You may not offer or impose any terms on any Covered Software in
X    Source Code form that alters or restricts the applicable version
X    of this License or the recipients' rights hereunder.  You may
X    choose to offer, and to charge a fee for, warranty, support,
X    indemnity or liability obligations to one or more recipients of
X    Covered Software.  However, you may do so only on Your own behalf,
X    and not on behalf of the Initial Developer or any Contributor.
X    You must make it absolutely clear that any such warranty, support,
X    indemnity or liability obligation is offered by You alone, and You
X    hereby agree to indemnify the Initial Developer and every
X    Contributor for any liability incurred by the Initial Developer or
X    such Contributor as a result of warranty, support, indemnity or
X    liability terms You offer.
X
X    3.5. Distribution of Executable Versions.
X
X    You may distribute the Executable form of the Covered Software
X    under the terms of this License or under the terms of a license of
X    Your choice, which may contain terms different from this License,
X    provided that You are in compliance with the terms of this License
X    and that the license for the Executable form does not attempt to
X    limit or alter the recipient's rights in the Source Code form from
X    the rights set forth in this License.  If You distribute the
X    Covered Software in Executable form under a different license, You
X    must make it absolutely clear that any terms which differ from
X    this License are offered by You alone, not by the Initial
X    Developer or Contributor.  You hereby agree to indemnify the
X    Initial Developer and every Contributor for any liability incurred
X    by the Initial Developer or such Contributor as a result of any
X    such terms You offer.
X
X    3.6. Larger Works.
X
X    You may create a Larger Work by combining Covered Software with
X    other code not governed by the terms of this License and
X    distribute the Larger Work as a single product.  In such a case,
X    You must make sure the requirements of this License are fulfilled
X    for the Covered Software.
X
X4. Versions of the License.
X
X    4.1. New Versions.
X
X    Sun Microsystems, Inc. is the initial license steward and may
X    publish revised and/or new versions of this License from time to
X    time.  Each version will be given a distinguishing version number.
X    Except as provided in Section 4.3, no one other than the license
X    steward has the right to modify this License.
X
X    4.2. Effect of New Versions.
X
X    You may always continue to use, distribute or otherwise make the
X    Covered Software available under the terms of the version of the
X    License under which You originally received the Covered Software.
X    If the Initial Developer includes a notice in the Original
X    Software prohibiting it from being distributed or otherwise made
X    available under any subsequent version of the License, You must
X    distribute and make the Covered Software available under the terms
X    of the version of the License under which You originally received
X    the Covered Software.  Otherwise, You may also choose to use,
X    distribute or otherwise make the Covered Software available under
X    the terms of any subsequent version of the License published by
X    the license steward.
X
X    4.3. Modified Versions.
X
X    When You are an Initial Developer and You want to create a new
X    license for Your Original Software, You may create and use a
X    modified version of this License if You: (a) rename the license
X    and remove any references to the name of the license steward
X    (except to note that the license differs from this License); and
X    (b) otherwise make it clear that the license contains terms which
X    differ from this License.
X
X5. DISCLAIMER OF WARRANTY.
X
X    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
X    BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
X    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
X    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
X    PURPOSE OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND
X    PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.  SHOULD ANY
X    COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
X    INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
X    NECESSARY SERVICING, REPAIR OR CORRECTION.  THIS DISCLAIMER OF
X    WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.  NO USE OF
X    ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
X    DISCLAIMER.
X
X6. TERMINATION.
X
X    6.1. This License and the rights granted hereunder will terminate
X    automatically if You fail to comply with terms herein and fail to
X    cure such breach within 30 days of becoming aware of the breach.
X    Provisions which, by their nature, must remain in effect beyond
X    the termination of this License shall survive.
X
X    6.2. If You assert a patent infringement claim (excluding
X    declaratory judgment actions) against Initial Developer or a
X    Contributor (the Initial Developer or Contributor against whom You
X    assert such claim is referred to as "Participant") alleging that
X    the Participant Software (meaning the Contributor Version where
X    the Participant is a Contributor or the Original Software where
X    the Participant is the Initial Developer) directly or indirectly
X    infringes any patent, then any and all rights granted directly or
X    indirectly to You by such Participant, the Initial Developer (if
X    the Initial Developer is not the Participant) and all Contributors
X    under Sections 2.1 and/or 2.2 of this License shall, upon 60 days
X    notice from Participant terminate prospectively and automatically
X    at the expiration of such 60 day notice period, unless if within
X    such 60 day period You withdraw Your claim with respect to the
X    Participant Software against such Participant either unilaterally
X    or pursuant to a written agreement with Participant.
X
X    6.3. In the event of termination under Sections 6.1 or 6.2 above,
X    all end user licenses that have been validly granted by You or any
X    distributor hereunder prior to termination (excluding licenses
X    granted to You by any distributor) shall survive termination.
X
X7. LIMITATION OF LIABILITY.
X
X    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
X    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
X    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
X    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
X    LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
X    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
X    LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
X    STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
X    COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
X    INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.  THIS LIMITATION OF
X    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
X    INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
X    APPLICABLE LAW PROHIBITS SUCH LIMITATION.  SOME JURISDICTIONS DO
X    NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
X    CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
X    APPLY TO YOU.
X
X8. U.S. GOVERNMENT END USERS.
X
X    The Covered Software is a "commercial item," as that term is
X    defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
X    computer software" (as that term is defined at 48
X    C.F.R. 252.227-7014(a)(1)) and "commercial computer software
X    documentation" as such terms are used in 48 C.F.R. 12.212
X    (Sept. 1995).  Consistent with 48 C.F.R. 12.212 and 48
X    C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
X    U.S. Government End Users acquire Covered Software with only those
X    rights set forth herein.  This U.S. Government Rights clause is in
X    lieu of, and supersedes, any other FAR, DFAR, or other clause or
X    provision that addresses Government rights in computer software
X    under this License.
X
X9. MISCELLANEOUS.
X
X    This License represents the complete agreement concerning subject
X    matter hereof.  If any provision of this License is held to be
X    unenforceable, such provision shall be reformed only to the extent
X    necessary to make it enforceable.  This License shall be governed
X    by the law of the jurisdiction specified in a notice contained
X    within the Original Software (except to the extent applicable law,
X    if any, provides otherwise), excluding such jurisdiction's
X    conflict-of-law provisions.  Any litigation relating to this
X    License shall be subject to the jurisdiction of the courts located
X    in the jurisdiction and venue specified in a notice contained
X    within the Original Software, with the losing party responsible
X    for costs, including, without limitation, court costs and
X    reasonable attorneys' fees and expenses.  The application of the
X    United Nations Convention on Contracts for the International Sale
X    of Goods is expressly excluded.  Any law or regulation which
X    provides that the language of a contract shall be construed
X    against the drafter shall not apply to this License.  You agree
X    that You alone are responsible for compliance with the United
X    States export administration regulations (and the export control
X    laws and regulation of any other countries) when You use,
X    distribute or otherwise make available any Covered Software.
X
X10. RESPONSIBILITY FOR CLAIMS.
X
X    As between Initial Developer and the Contributors, each party is
X    responsible for claims and damages arising, directly or
X    indirectly, out of its utilization of rights under this License
X    and You agree to work with Initial Developer and Contributors to
X    distribute such responsibility on an equitable basis.  Nothing
X    herein is intended or shall be deemed to constitute any admission
X    of liability.
X
X--------------------------------------------------------------------
X
XNOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
XDISTRIBUTION LICENSE (CDDL)
X
XFor Covered Software in this distribution, this License shall
Xbe governed by the laws of the State of California (excluding
Xconflict-of-law provisions).
X
XAny litigation relating to this License shall be subject to the
Xjurisdiction of the Federal Courts of the Northern District of
XCalifornia and the state courts of the State of California, with
Xvenue lying in Santa Clara County, California.
END-of-star-1.5.2/CDDL.Sun.txt
echo x - star-1.5.2/LGPL-2.1.txt
sed 's/^X//' >star-1.5.2/LGPL-2.1.txt << 'END-of-star-1.5.2/LGPL-2.1.txt'
X		  GNU LESSER GENERAL PUBLIC LICENSE
X		       Version 2.1, February 1999
X
X Copyright (C) 1991, 1999 Free Software Foundation, Inc.
X 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
X Everyone is permitted to copy and distribute verbatim copies
X of this license document, but changing it is not allowed.
X
X[This is the first released version of the Lesser GPL.  It also counts
X as the successor of the GNU Library Public License, version 2, hence
X the version number 2.1.]
X
X			    Preamble
X
X  The licenses for most software are designed to take away your
Xfreedom to share and change it.  By contrast, the GNU General Public
XLicenses are intended to guarantee your freedom to share and change
Xfree software--to make sure the software is free for all its users.
X
X  This license, the Lesser General Public License, applies to some
Xspecially designated software packages--typically libraries--of the
XFree Software Foundation and other authors who decide to use it.  You
Xcan use it too, but we suggest you first think carefully about whether
Xthis license or the ordinary General Public License is the better
Xstrategy to use in any particular case, based on the explanations below.
X
X  When we speak of free software, we are referring to freedom of use,
Xnot price.  Our General Public Licenses are designed to make sure that
Xyou have the freedom to distribute copies of free software (and charge
Xfor this service if you wish); that you receive source code or can get
Xit if you want it; that you can change the software and use pieces of
Xit in new free programs; and that you are informed that you can do
Xthese things.
X
X  To protect your rights, we need to make restrictions that forbid
Xdistributors to deny you these rights or to ask you to surrender these
Xrights.  These restrictions translate to certain responsibilities for
Xyou if you distribute copies of the library or if you modify it.
X
X  For example, if you distribute copies of the library, whether gratis
Xor for a fee, you must give the recipients all the rights that we gave
Xyou.  You must make sure that they, too, receive or can get the source
Xcode.  If you link other code with the library, you must provide
Xcomplete object files to the recipients, so that they can relink them
Xwith the library after making changes to the library and recompiling
Xit.  And you must show them these terms so they know their rights.
X
X  We protect your rights with a two-step method: (1) we copyright the
Xlibrary, and (2) we offer you this license, which gives you legal
Xpermission to copy, distribute and/or modify the library.
X
X  To protect each distributor, we want to make it very clear that
Xthere is no warranty for the free library.  Also, if the library is
Xmodified by someone else and passed on, the recipients should know
Xthat what they have is not the original version, so that the original
Xauthor's reputation will not be affected by problems that might be
Xintroduced by others.
X
X  Finally, software patents pose a constant threat to the existence of
Xany free program.  We wish to make sure that a company cannot
Xeffectively restrict the users of a free program by obtaining a
Xrestrictive license from a patent holder.  Therefore, we insist that
Xany patent license obtained for a version of the library must be
Xconsistent with the full freedom of use specified in this license.
X
X  Most GNU software, including some libraries, is covered by the
Xordinary GNU General Public License.  This license, the GNU Lesser
XGeneral Public License, applies to certain designated libraries, and
Xis quite different from the ordinary General Public License.  We use
Xthis license for certain libraries in order to permit linking those
Xlibraries into non-free programs.
X
X  When a program is linked with a library, whether statically or using
Xa shared library, the combination of the two is legally speaking a
Xcombined work, a derivative of the original library.  The ordinary
XGeneral Public License therefore permits such linking only if the
Xentire combination fits its criteria of freedom.  The Lesser General
XPublic License permits more lax criteria for linking other code with
Xthe library.
X
X  We call this license the "Lesser" General Public License because it
Xdoes Less to protect the user's freedom than the ordinary General
XPublic License.  It also provides other free software developers Less
Xof an advantage over competing non-free programs.  These disadvantages
Xare the reason we use the ordinary General Public License for many
Xlibraries.  However, the Lesser license provides advantages in certain
Xspecial circumstances.
X
X  For example, on rare occasions, there may be a special need to
Xencourage the widest possible use of a certain library, so that it becomes
Xa de-facto standard.  To achieve this, non-free programs must be
Xallowed to use the library.  A more frequent case is that a free
Xlibrary does the same job as widely used non-free libraries.  In this
Xcase, there is little to gain by limiting the free library to free
Xsoftware only, so we use the Lesser General Public License.
X
X  In other cases, permission to use a particular library in non-free
Xprograms enables a greater number of people to use a large body of
Xfree software.  For example, permission to use the GNU C Library in
Xnon-free programs enables many more people to use the whole GNU
Xoperating system, as well as its variant, the GNU/Linux operating
Xsystem.
X
X  Although the Lesser General Public License is Less protective of the
Xusers' freedom, it does ensure that the user of a program that is
Xlinked with the Library has the freedom and the wherewithal to run
Xthat program using a modified version of the Library.
X
X  The precise terms and conditions for copying, distribution and
Xmodification follow.  Pay close attention to the difference between a
X"work based on the library" and a "work that uses the library".  The
Xformer contains code derived from the library, whereas the latter must
Xbe combined with the library in order to run.
X
X		  GNU LESSER GENERAL PUBLIC LICENSE
X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
X
X  0. This License Agreement applies to any software library or other
Xprogram which contains a notice placed by the copyright holder or
Xother authorized party saying it may be distributed under the terms of
Xthis Lesser General Public License (also called "this License").
XEach licensee is addressed as "you".
X
X  A "library" means a collection of software functions and/or data
Xprepared so as to be conveniently linked with application programs
X(which use some of those functions and data) to form executables.
X
X  The "Library", below, refers to any such software library or work
Xwhich has been distributed under these terms.  A "work based on the
XLibrary" means either the Library or any derivative work under
Xcopyright law: that is to say, a work containing the Library or a
Xportion of it, either verbatim or with modifications and/or translated
Xstraightforwardly into another language.  (Hereinafter, translation is
Xincluded without limitation in the term "modification".)
X
X  "Source code" for a work means the preferred form of the work for
Xmaking modifications to it.  For a library, complete source code means
Xall the source code for all modules it contains, plus any associated
Xinterface definition files, plus the scripts used to control compilation
Xand installation of the library.
X
X  Activities other than copying, distribution and modification are not
Xcovered by this License; they are outside its scope.  The act of
Xrunning a program using the Library is not restricted, and output from
Xsuch a program is covered only if its contents constitute a work based
Xon the Library (independent of the use of the Library in a tool for
Xwriting it).  Whether that is true depends on what the Library does
Xand what the program that uses the Library does.
X  
X  1. You may copy and distribute verbatim copies of the Library's
Xcomplete source code as you receive it, in any medium, provided that
Xyou conspicuously and appropriately publish on each copy an
Xappropriate copyright notice and disclaimer of warranty; keep intact
Xall the notices that refer to this License and to the absence of any
Xwarranty; and distribute a copy of this License along with the
XLibrary.
X
X  You may charge a fee for the physical act of transferring a copy,
Xand you may at your option offer warranty protection in exchange for a
Xfee.
X
X  2. You may modify your copy or copies of the Library or any portion
Xof it, thus forming a work based on the Library, and copy and
Xdistribute such modifications or work under the terms of Section 1
Xabove, provided that you also meet all of these conditions:
X
X    a) The modified work must itself be a software library.
X
X    b) You must cause the files modified to carry prominent notices
X    stating that you changed the files and the date of any change.
X
X    c) You must cause the whole of the work to be licensed at no
X    charge to all third parties under the terms of this License.
X
X    d) If a facility in the modified Library refers to a function or a
X    table of data to be supplied by an application program that uses
X    the facility, other than as an argument passed when the facility
X    is invoked, then you must make a good faith effort to ensure that,
X    in the event an application does not supply such function or
X    table, the facility still operates, and performs whatever part of
X    its purpose remains meaningful.
X
X    (For example, a function in a library to compute square roots has
X    a purpose that is entirely well-defined independent of the
X    application.  Therefore, Subsection 2d requires that any
X    application-supplied function or table used by this function must
X    be optional: if the application does not supply it, the square
X    root function must still compute square roots.)
X
XThese requirements apply to the modified work as a whole.  If
Xidentifiable sections of that work are not derived from the Library,
Xand can be reasonably considered independent and separate works in
Xthemselves, then this License, and its terms, do not apply to those
Xsections when you distribute them as separate works.  But when you
Xdistribute the same sections as part of a whole which is a work based
Xon the Library, the distribution of the whole must be on the terms of
Xthis License, whose permissions for other licensees extend to the
Xentire whole, and thus to each and every part regardless of who wrote
Xit.
X
XThus, it is not the intent of this section to claim rights or contest
Xyour rights to work written entirely by you; rather, the intent is to
Xexercise the right to control the distribution of derivative or
Xcollective works based on the Library.
X
XIn addition, mere aggregation of another work not based on the Library
Xwith the Library (or with a work based on the Library) on a volume of
Xa storage or distribution medium does not bring the other work under
Xthe scope of this License.
X
X  3. You may opt to apply the terms of the ordinary GNU General Public
XLicense instead of this License to a given copy of the Library.  To do
Xthis, you must alter all the notices that refer to this License, so
Xthat they refer to the ordinary GNU General Public License, version 2,
Xinstead of to this License.  (If a newer version than version 2 of the
Xordinary GNU General Public License has appeared, then you can specify
Xthat version instead if you wish.)  Do not make any other change in
Xthese notices.
X
X  Once this change is made in a given copy, it is irreversible for
Xthat copy, so the ordinary GNU General Public License applies to all
Xsubsequent copies and derivative works made from that copy.
X
X  This option is useful when you wish to copy part of the code of
Xthe Library into a program that is not a library.
X
X  4. You may copy and distribute the Library (or a portion or
Xderivative of it, under Section 2) in object code or executable form
Xunder the terms of Sections 1 and 2 above provided that you accompany
Xit with the complete corresponding machine-readable source code, which
Xmust be distributed under the terms of Sections 1 and 2 above on a
Xmedium customarily used for software interchange.
X
X  If distribution of object code is made by offering access to copy
Xfrom a designated place, then offering equivalent access to copy the
Xsource code from the same place satisfies the requirement to
Xdistribute the source code, even though third parties are not
Xcompelled to copy the source along with the object code.
X
X  5. A program that contains no derivative of any portion of the
XLibrary, but is designed to work with the Library by being compiled or
Xlinked with it, is called a "work that uses the Library".  Such a
Xwork, in isolation, is not a derivative work of the Library, and
Xtherefore falls outside the scope of this License.
X
X  However, linking a "work that uses the Library" with the Library
Xcreates an executable that is a derivative of the Library (because it
Xcontains portions of the Library), rather than a "work that uses the
Xlibrary".  The executable is therefore covered by this License.
XSection 6 states terms for distribution of such executables.
X
X  When a "work that uses the Library" uses material from a header file
Xthat is part of the Library, the object code for the work may be a
Xderivative work of the Library even though the source code is not.
XWhether this is true is especially significant if the work can be
Xlinked without the Library, or if the work is itself a library.  The
Xthreshold for this to be true is not precisely defined by law.
X
X  If such an object file uses only numerical parameters, data
Xstructure layouts and accessors, and small macros and small inline
Xfunctions (ten lines or less in length), then the use of the object
Xfile is unrestricted, regardless of whether it is legally a derivative
Xwork.  (Executables containing this object code plus portions of the
XLibrary will still fall under Section 6.)
X
X  Otherwise, if the work is a derivative of the Library, you may
Xdistribute the object code for the work under the terms of Section 6.
XAny executables containing that work also fall under Section 6,
Xwhether or not they are linked directly with the Library itself.
X
X  6. As an exception to the Sections above, you may also combine or
Xlink a "work that uses the Library" with the Library to produce a
Xwork containing portions of the Library, and distribute that work
Xunder terms of your choice, provided that the terms permit
Xmodification of the work for the customer's own use and reverse
Xengineering for debugging such modifications.
X
X  You must give prominent notice with each copy of the work that the
XLibrary is used in it and that the Library and its use are covered by
Xthis License.  You must supply a copy of this License.  If the work
Xduring execution displays copyright notices, you must include the
Xcopyright notice for the Library among them, as well as a reference
Xdirecting the user to the copy of this License.  Also, you must do one
Xof these things:
X
X    a) Accompany the work with the complete corresponding
X    machine-readable source code for the Library including whatever
X    changes were used in the work (which must be distributed under
X    Sections 1 and 2 above); and, if the work is an executable linked
X    with the Library, with the complete machine-readable "work that
X    uses the Library", as object code and/or source code, so that the
X    user can modify the Library and then relink to produce a modified
X    executable containing the modified Library.  (It is understood
X    that the user who changes the contents of definitions files in the
X    Library will not necessarily be able to recompile the application
X    to use the modified definitions.)
X
X    b) Use a suitable shared library mechanism for linking with the
X    Library.  A suitable mechanism is one that (1) uses at run time a
X    copy of the library already present on the user's computer system,
X    rather than copying library functions into the executable, and (2)
X    will operate properly with a modified version of the library, if
X    the user installs one, as long as the modified version is
X    interface-compatible with the version that the work was made with.
X
X    c) Accompany the work with a written offer, valid for at
X    least three years, to give the same user the materials
X    specified in Subsection 6a, above, for a charge no more
X    than the cost of performing this distribution.
X
X    d) If distribution of the work is made by offering access to copy
X    from a designated place, offer equivalent access to copy the above
X    specified materials from the same place.
X
X    e) Verify that the user has already received a copy of these
X    materials or that you have already sent this user a copy.
X
X  For an executable, the required form of the "work that uses the
XLibrary" must include any data and utility programs needed for
Xreproducing the executable from it.  However, as a special exception,
Xthe materials to be distributed need not include anything that is
Xnormally distributed (in either source or binary form) with the major
Xcomponents (compiler, kernel, and so on) of the operating system on
Xwhich the executable runs, unless that component itself accompanies
Xthe executable.
X
X  It may happen that this requirement contradicts the license
Xrestrictions of other proprietary libraries that do not normally
Xaccompany the operating system.  Such a contradiction means you cannot
Xuse both them and the Library together in an executable that you
Xdistribute.
X
X  7. You may place library facilities that are a work based on the
XLibrary side-by-side in a single library together with other library
Xfacilities not covered by this License, and distribute such a combined
Xlibrary, provided that the separate distribution of the work based on
Xthe Library and of the other library facilities is otherwise
Xpermitted, and provided that you do these two things:
X
X    a) Accompany the combined library with a copy of the same work
X    based on the Library, uncombined with any other library
X    facilities.  This must be distributed under the terms of the
X    Sections above.
X
X    b) Give prominent notice with the combined library of the fact
X    that part of it is a work based on the Library, and explaining
X    where to find the accompanying uncombined form of the same work.
X
X  8. You may not copy, modify, sublicense, link with, or distribute
Xthe Library except as expressly provided under this License.  Any
Xattempt otherwise to copy, modify, sublicense, link with, or
Xdistribute the Library is void, and will automatically terminate your
Xrights under this License.  However, parties who have received copies,
Xor rights, from you under this License will not have their licenses
Xterminated so long as such parties remain in full compliance.
X
X  9. You are not required to accept this License, since you have not
Xsigned it.  However, nothing else grants you permission to modify or
Xdistribute the Library or its derivative works.  These actions are
Xprohibited by law if you do not accept this License.  Therefore, by
Xmodifying or distributing the Library (or any work based on the
XLibrary), you indicate your acceptance of this License to do so, and
Xall its terms and conditions for copying, distributing or modifying
Xthe Library or works based on it.
X
X  10. Each time you redistribute the Library (or any work based on the
XLibrary), the recipient automatically receives a license from the
Xoriginal licensor to copy, distribute, link with or modify the Library
Xsubject to these terms and conditions.  You may not impose any further
Xrestrictions on the recipients' exercise of the rights granted herein.
XYou are not responsible for enforcing compliance by third parties with
Xthis License.
X
X  11. If, as a consequence of a court judgment or allegation of patent
Xinfringement or for any other reason (not limited to patent issues),
Xconditions are imposed on you (whether by court order, agreement or
Xotherwise) that contradict the conditions of this License, they do not
Xexcuse you from the conditions of this License.  If you cannot
Xdistribute so as to satisfy simultaneously your obligations under this
XLicense and any other pertinent obligations, then as a consequence you
Xmay not distribute the Library at all.  For example, if a patent
Xlicense would not permit royalty-free redistribution of the Library by
Xall those who receive copies directly or indirectly through you, then
Xthe only way you could satisfy both it and this License would be to
Xrefrain entirely from distribution of the Library.
X
XIf any portion of this section is held invalid or unenforceable under any
Xparticular circumstance, the balance of the section is intended to apply,
Xand the section as a whole is intended to apply in other circumstances.
X
XIt is not the purpose of this section to induce you to infringe any
Xpatents or other property right claims or to contest validity of any
Xsuch claims; this section has the sole purpose of protecting the
Xintegrity of the free software distribution system which is
Ximplemented by public license practices.  Many people have made
Xgenerous contributions to the wide range of software distributed
Xthrough that system in reliance on consistent application of that
Xsystem; it is up to the author/donor to decide if he or she is willing
Xto distribute software through any other system and a licensee cannot
Ximpose that choice.
X
XThis section is intended to make thoroughly clear what is believed to
Xbe a consequence of the rest of this License.
X
X  12. If the distribution and/or use of the Library is restricted in
Xcertain countries either by patents or by copyrighted interfaces, the
Xoriginal copyright holder who places the Library under this License may add
Xan explicit geographical distribution limitation excluding those countries,
Xso that distribution is permitted only in or among countries not thus
Xexcluded.  In such case, this License incorporates the limitation as if
Xwritten in the body of this License.
X
X  13. The Free Software Foundation may publish revised and/or new
Xversions of the Lesser General Public License from time to time.
XSuch new versions will be similar in spirit to the present version,
Xbut may differ in detail to address new problems or concerns.
X
XEach version is given a distinguishing version number.  If the Library
Xspecifies a version number of this License which applies to it and
X"any later version", you have the option of following the terms and
Xconditions either of that version or of any later version published by
Xthe Free Software Foundation.  If the Library does not specify a
Xlicense version number, you may choose any version ever published by
Xthe Free Software Foundation.
X
X  14. If you wish to incorporate parts of the Library into other free
Xprograms whose distribution conditions are incompatible with these,
Xwrite to the author to ask for permission.  For software which is
Xcopyrighted by the Free Software Foundation, write to the Free
XSoftware Foundation; we sometimes make exceptions for this.  Our
Xdecision will be guided by the two goals of preserving the free status
Xof all derivatives of our free software and of promoting the sharing
Xand reuse of software generally.
X
X			    NO WARRANTY
X
X  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
XWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
XEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
XOTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
XKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
XIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
XPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
XLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
XTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
X
X  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
XWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
XAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
XFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
XCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
XLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
XRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
XFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
XSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
XDAMAGES.
X
X		     END OF TERMS AND CONDITIONS
X
X           How to Apply These Terms to Your New Libraries
X
X  If you develop a new library, and you want it to be of the greatest
Xpossible use to the public, we recommend making it free software that
Xeveryone can redistribute and change.  You can do so by permitting
Xredistribution under these terms (or, alternatively, under the terms of the
Xordinary General Public License).
X
X  To apply these terms, attach the following notices to the library.  It is
Xsafest to attach them to the start of each source file to most effectively
Xconvey the exclusion of warranty; and each file should have at least the
X"copyright" line and a pointer to where the full notice is found.
X
X    <one line to give the library's name and a brief idea of what it does.>
X    Copyright (C) <year>  <name of author>
X
X    This library is free software; you can redistribute it and/or
X    modify it under the terms of the GNU Lesser General Public
X    License as published by the Free Software Foundation; either
X    version 2.1 of the License, or (at your option) any later version.
X
X    This library is distributed in the hope that it will be useful,
X    but WITHOUT ANY WARRANTY; without even the implied warranty of
X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
X    Lesser General Public License for more details.
X
X    You should have received a copy of the GNU Lesser General Public
X    License along with this library; if not, write to the Free Software
X    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
X
XAlso add information on how to contact you by electronic and paper mail.
X
XYou should also get your employer (if you work as a programmer) or your
Xschool, if any, to sign a "copyright disclaimer" for the library, if
Xnecessary.  Here is a sample; alter the names:
X
X  Yoyodyne, Inc., hereby disclaims all copyright interest in the
X  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
X
X  <signature of Ty Coon>, 1 April 1990
X  Ty Coon, President of Vice
X
XThat's all there is to it!
X
X
END-of-star-1.5.2/LGPL-2.1.txt
echo x - star-1.5.2/GPL-2.0.txt
sed 's/^X//' >star-1.5.2/GPL-2.0.txt << 'END-of-star-1.5.2/GPL-2.0.txt'
X		    GNU GENERAL PUBLIC LICENSE
X		       Version 2, June 1991
X
X Copyright (C) 1991, 1999 Free Software Foundation, Inc.
X 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
X Everyone is permitted to copy and distribute verbatim copies
X of this license document, but changing it is not allowed.
X
X			    Preamble
X
X  The licenses for most software are designed to take away your
Xfreedom to share and change it.  By contrast, the GNU General Public
XLicense is intended to guarantee your freedom to share and change free
Xsoftware--to make sure the software is free for all its users.  This
XGeneral Public License applies to most of the Free Software
XFoundation's software and to any other program whose authors commit to
Xusing it.  (Some other Free Software Foundation software is covered by
Xthe GNU Library General Public License instead.)  You can apply it to
Xyour programs, too.
X
X  When we speak of free software, we are referring to freedom, not
Xprice.  Our General Public Licenses are designed to make sure that you
Xhave the freedom to distribute copies of free software (and charge for
Xthis service if you wish), that you receive source code or can get it
Xif you want it, that you can change the software or use pieces of it
Xin new free programs; and that you know you can do these things.
X
X  To protect your rights, we need to make restrictions that forbid
Xanyone to deny you these rights or to ask you to surrender the rights.
XThese restrictions translate to certain responsibilities for you if you
Xdistribute copies of the software, or if you modify it.
X
X  For example, if you distribute copies of such a program, whether
Xgratis or for a fee, you must give the recipients all the rights that
Xyou have.  You must make sure that they, too, receive or can get the
Xsource code.  And you must show them these terms so they know their
Xrights.
X
X  We protect your rights with two steps: (1) copyright the software, and
X(2) offer you this license which gives you legal permission to copy,
Xdistribute and/or modify the software.
X
X  Also, for each author's protection and ours, we want to make certain
Xthat everyone understands that there is no warranty for this free
Xsoftware.  If the software is modified by someone else and passed on, we
Xwant its recipients to know that what they have is not the original, so
Xthat any problems introduced by others will not reflect on the original
Xauthors' reputations.
X
X  Finally, any free program is threatened constantly by software
Xpatents.  We wish to avoid the danger that redistributors of a free
Xprogram will individually obtain patent licenses, in effect making the
Xprogram proprietary.  To prevent this, we have made it clear that any
Xpatent must be licensed for everyone's free use or not licensed at all.
X
X  The precise terms and conditions for copying, distribution and
Xmodification follow.
X
X		    GNU GENERAL PUBLIC LICENSE
X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
X
X  0. This License applies to any program or other work which contains
Xa notice placed by the copyright holder saying it may be distributed
Xunder the terms of this General Public License.  The "Program", below,
Xrefers to any such program or work, and a "work based on the Program"
Xmeans either the Program or any derivative work under copyright law:
Xthat is to say, a work containing the Program or a portion of it,
Xeither verbatim or with modifications and/or translated into another
Xlanguage.  (Hereinafter, translation is included without limitation in
Xthe term "modification".)  Each licensee is addressed as "you".
X
XActivities other than copying, distribution and modification are not
Xcovered by this License; they are outside its scope.  The act of
Xrunning the Program is not restricted, and the output from the Program
Xis covered only if its contents constitute a work based on the
XProgram (independent of having been made by running the Program).
XWhether that is true depends on what the Program does.
X
X  1. You may copy and distribute verbatim copies of the Program's
Xsource code as you receive it, in any medium, provided that you
Xconspicuously and appropriately publish on each copy an appropriate
Xcopyright notice and disclaimer of warranty; keep intact all the
Xnotices that refer to this License and to the absence of any warranty;
Xand give any other recipients of the Program a copy of this License
Xalong with the Program.
X
XYou may charge a fee for the physical act of transferring a copy, and
Xyou may at your option offer warranty protection in exchange for a fee.
X
X  2. You may modify your copy or copies of the Program or any portion
Xof it, thus forming a work based on the Program, and copy and
Xdistribute such modifications or work under the terms of Section 1
Xabove, provided that you also meet all of these conditions:
X
X    a) You must cause the modified files to carry prominent notices
X    stating that you changed the files and the date of any change.
X
X    b) You must cause any work that you distribute or publish, that in
X    whole or in part contains or is derived from the Program or any
X    part thereof, to be licensed as a whole at no charge to all third
X    parties under the terms of this License.
X
X    c) If the modified program normally reads commands interactively
X    when run, you must cause it, when started running for such
X    interactive use in the most ordinary way, to print or display an
X    announcement including an appropriate copyright notice and a
X    notice that there is no warranty (or else, saying that you provide
X    a warranty) and that users may redistribute the program under
X    these conditions, and telling the user how to view a copy of this
X    License.  (Exception: if the Program itself is interactive but
X    does not normally print such an announcement, your work based on
X    the Program is not required to print an announcement.)
X
XThese requirements apply to the modified work as a whole.  If
Xidentifiable sections of that work are not derived from the Program,
Xand can be reasonably considered independent and separate works in
Xthemselves, then this License, and its terms, do not apply to those
Xsections when you distribute them as separate works.  But when you
Xdistribute the same sections as part of a whole which is a work based
Xon the Program, the distribution of the whole must be on the terms of
Xthis License, whose permissions for other licensees extend to the
Xentire whole, and thus to each and every part regardless of who wrote it.
X
XThus, it is not the intent of this section to claim rights or contest
Xyour rights to work written entirely by you; rather, the intent is to
Xexercise the right to control the distribution of derivative or
Xcollective works based on the Program.
X
XIn addition, mere aggregation of another work not based on the Program
Xwith the Program (or with a work based on the Program) on a volume of
Xa storage or distribution medium does not bring the other work under
Xthe scope of this License.
X
X  3. You may copy and distribute the Program (or a work based on it,
Xunder Section 2) in object code or executable form under the terms of
XSections 1 and 2 above provided that you also do one of the following:
X
X    a) Accompany it with the complete corresponding machine-readable
X    source code, which must be distributed under the terms of Sections
X    1 and 2 above on a medium customarily used for software interchange; or,
X
X    b) Accompany it with a written offer, valid for at least three
X    years, to give any third party, for a charge no more than your
X    cost of physically performing source distribution, a complete
X    machine-readable copy of the corresponding source code, to be
X    distributed under the terms of Sections 1 and 2 above on a medium
X    customarily used for software interchange; or,
X
X    c) Accompany it with the information you received as to the offer
X    to distribute corresponding source code.  (This alternative is
X    allowed only for noncommercial distribution and only if you
X    received the program in object code or executable form with such
X    an offer, in accord with Subsection b above.)
X
XThe source code for a work means the preferred form of the work for
Xmaking modifications to it.  For an executable work, complete source
Xcode means all the source code for all modules it contains, plus any
Xassociated interface definition files, plus the scripts used to
Xcontrol compilation and installation of the executable.  However, as a
Xspecial exception, the source code distributed need not include
Xanything that is normally distributed (in either source or binary
Xform) with the major components (compiler, kernel, and so on) of the
Xoperating system on which the executable runs, unless that component
Xitself accompanies the executable.
X
XIf distribution of executable or object code is made by offering
Xaccess to copy from a designated place, then offering equivalent
Xaccess to copy the source code from the same place counts as
Xdistribution of the source code, even though third parties are not
Xcompelled to copy the source along with the object code.
X
X  4. You may not copy, modify, sublicense, or distribute the Program
Xexcept as expressly provided under this License.  Any attempt
Xotherwise to copy, modify, sublicense or distribute the Program is
Xvoid, and will automatically terminate your rights under this License.
XHowever, parties who have received copies, or rights, from you under
Xthis License will not have their licenses terminated so long as such
Xparties remain in full compliance.
X
X  5. You are not required to accept this License, since you have not
Xsigned it.  However, nothing else grants you permission to modify or
Xdistribute the Program or its derivative works.  These actions are
Xprohibited by law if you do not accept this License.  Therefore, by
Xmodifying or distributing the Program (or any work based on the
XProgram), you indicate your acceptance of this License to do so, and
Xall its terms and conditions for copying, distributing or modifying
Xthe Program or works based on it.
X
X  6. Each time you redistribute the Program (or any work based on the
XProgram), the recipient automatically receives a license from the
Xoriginal licensor to copy, distribute or modify the Program subject to
Xthese terms and conditions.  You may not impose any further
Xrestrictions on the recipients' exercise of the rights granted herein.
XYou are not responsible for enforcing compliance by third parties to
Xthis License.
X
X  7. If, as a consequence of a court judgment or allegation of patent
Xinfringement or for any other reason (not limited to patent issues),
Xconditions are imposed on you (whether by court order, agreement or
Xotherwise) that contradict the conditions of this License, they do not
Xexcuse you from the conditions of this License.  If you cannot
Xdistribute so as to satisfy simultaneously your obligations under this
XLicense and any other pertinent obligations, then as a consequence you
Xmay not distribute the Program at all.  For example, if a patent
Xlicense would not permit royalty-free redistribution of the Program by
Xall those who receive copies directly or indirectly through you, then
Xthe only way you could satisfy both it and this License would be to
Xrefrain entirely from distribution of the Program.
X
XIf any portion of this section is held invalid or unenforceable under
Xany particular circumstance, the balance of the section is intended to
Xapply and the section as a whole is intended to apply in other
Xcircumstances.
X
XIt is not the purpose of this section to induce you to infringe any
Xpatents or other property right claims or to contest validity of any
Xsuch claims; this section has the sole purpose of protecting the
Xintegrity of the free software distribution system, which is
Ximplemented by public license practices.  Many people have made
Xgenerous contributions to the wide range of software distributed
Xthrough that system in reliance on consistent application of that
Xsystem; it is up to the author/donor to decide if he or she is willing
Xto distribute software through any other system and a licensee cannot
Ximpose that choice.
X
XThis section is intended to make thoroughly clear what is believed to
Xbe a consequence of the rest of this License.
X
X  8. If the distribution and/or use of the Program is restricted in
Xcertain countries either by patents or by copyrighted interfaces, the
Xoriginal copyright holder who places the Program under this License
Xmay add an explicit geographical distribution limitation excluding
Xthose countries, so that distribution is permitted only in or among
Xcountries not thus excluded.  In such case, this License incorporates
Xthe limitation as if written in the body of this License.
X
X  9. The Free Software Foundation may publish revised and/or new versions
Xof the General Public License from time to time.  Such new versions will
Xbe similar in spirit to the present version, but may differ in detail to
Xaddress new problems or concerns.
X
XEach version is given a distinguishing version number.  If the Program
Xspecifies a version number of this License which applies to it and "any
Xlater version", you have the option of following the terms and conditions
Xeither of that version or of any later version published by the Free
XSoftware Foundation.  If the Program does not specify a version number of
Xthis License, you may choose any version ever published by the Free Software
XFoundation.
X
X  10. If you wish to incorporate parts of the Program into other free
Xprograms whose distribution conditions are different, write to the author
Xto ask for permission.  For software which is copyrighted by the Free
XSoftware Foundation, write to the Free Software Foundation; we sometimes
Xmake exceptions for this.  Our decision will be guided by the two goals
Xof preserving the free status of all derivatives of our free software and
Xof promoting the sharing and reuse of software generally.
X
X			    NO WARRANTY
X
X  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
XREPAIR OR CORRECTION.
X
X  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
XPOSSIBILITY OF SUCH DAMAGES.
X
X		     END OF TERMS AND CONDITIONS
X
X	    How to Apply These Terms to Your New Programs
X
X  If you develop a new program, and you want it to be of the greatest
Xpossible use to the public, the best way to achieve this is to make it
Xfree software which everyone can redistribute and change under these terms.
X
X  To do so, attach the following notices to the program.  It is safest
Xto attach them to the start of each source file to most effectively
Xconvey the exclusion of warranty; and each file should have at least
Xthe "copyright" line and a pointer to where the full notice is found.
X
X    <one line to give the program's name and a brief idea of what it does.>
X    Copyright (C) <year>  <name of author>
X
X    This program is free software; you can redistribute it and/or modify
X    it under the terms of the GNU General Public License version 2
X    as published by the Free Software Foundation.
X
X    This program is distributed in the hope that it will be useful,
X    but WITHOUT ANY WARRANTY; without even the implied warranty of
X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X    GNU General Public License for more details.
X
X    You should have received a copy of the GNU General Public License
X    along with this program; if not, write to the Free Software
X    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
X
X
XAlso add information on how to contact you by electronic and paper mail.
X
XIf the program is interactive, make it output a short notice like this
Xwhen it starts in an interactive mode:
X
X    Gnomovision version 69, Copyright (C) year  name of author
X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
X    This is free software, and you are welcome to redistribute it
X    under certain conditions; type `show c' for details.
X
XThe hypothetical commands `show w' and `show c' should show the appropriate
Xparts of the General Public License.  Of course, the commands you use may
Xbe called something other than `show w' and `show c'; they could even be
Xmouse-clicks or menu items--whatever suits your program.
X
XYou should also get your employer (if you work as a programmer) or your
Xschool, if any, to sign a "copyright disclaimer" for the program, if
Xnecessary.  Here is a sample; alter the names:
X
X  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
X  `Gnomovision' (which makes passes at compilers) written by James Hacker.
X
X  <signature of Ty Coon>, 1 April 1989
X  Ty Coon, President of Vice
X
XThis General Public License does not permit incorporating your program into
Xproprietary programs.  If your program is a subroutine library, you may
Xconsider it more useful to permit linking proprietary applications with the
Xlibrary.  If this is what you want to do, use the GNU Library General
XPublic License instead of this License.
END-of-star-1.5.2/GPL-2.0.txt
echo x - star-1.5.2/CONTRIBUTING
sed 's/^X//' >star-1.5.2/CONTRIBUTING << 'END-of-star-1.5.2/CONTRIBUTING'
X# @(#)CONTRIBUTING	1.3 06/05/30 Copyright 2006 J. Schilling
X
XIf you like to send patches or code to add to the project, you are welcome.
X
XBefore you send code or patches, please make sure that the following
Xrequirements apply to your code:
X
X§1	Your code does not duplicate existing functionality
X
X§2	Integrating your code does not take more time than it would
X	take to write it from scratch
X
X§3	Your code is cleanly written, is byteorder independent and
X	does compile on all supported platforms
X
X§4	Your code does not cause this project to break or otherwise
X	fail on one of the supported platforms
X
X§5	Your code does not rely on a specific compiler
X
X§6	Your code is cleanly indented (matches the coding style 
X	from "Cstyle"). See files:
X
X		ftp://ftp.berlios.de/pub/cdrecord/Cstyle
X	and
X		ftp://ftp.berlios.de/pub/cdrecord/cstyle
X
X§7	You allow me to publish the code under any OSI approved
X	license (see http://www.opensource.org/). If you like to
X	see your code under a specific license and this license
X	grants less freedom than the CDDL, there is little chance
X	to integrate your code.
X
X§8	Include not only the code patches but also include the related
X	extensions to the man pages.
X
X§9	If you like to make a bigger contribution, provide white papers
X	and other documentation that allows to understand your patch
X	within a reasonable amount of time.
X
XPleae note for §7: Licenses may not last forever and it may sometimes
Xbe apropriate to change the license. In case that contributors did
Xinsist in a specific license when contributing and are no longer
Xreachable via mail, this undertaking may be impossible and kill the 
Xfuture of the project. So please help with your contributing to ensure
Xthe future of this project.
X
END-of-star-1.5.2/CONTRIBUTING
echo x - star-1.5.2/Makefile.old
sed 's/^X//' >star-1.5.2/Makefile.old << 'END-of-star-1.5.2/Makefile.old'
X#ident %W% %E% %Q%
X###########################################################################
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#include		Targetdirs.$(M_ARCH)
X
XDIRS=	conf inc lib libdeflt librmt star mt rmt star_sym tartest man
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-star-1.5.2/Makefile.old
echo c - star-1.5.2/pkgdefs
mkdir -p star-1.5.2/pkgdefs > /dev/null 2>&1
echo c - star-1.5.2/pkgdefs/CSW
mkdir -p star-1.5.2/pkgdefs/CSW > /dev/null 2>&1
echo c - star-1.5.2/pkgdefs/CSW/CSWstar
mkdir -p star-1.5.2/pkgdefs/CSW/CSWstar > /dev/null 2>&1
echo x - star-1.5.2/pkgdefs/CSW/CSWstar/Makefile
sed 's/^X//' >star-1.5.2/pkgdefs/CSW/CSWstar/Makefile << 'END-of-star-1.5.2/pkgdefs/CSW/CSWstar/Makefile'
X#ident %W% %E% %Q%
X###########################################################################
X# Sample makefile for creating SVr4 packages
X###########################################################################
XSRCROOT=	../../..
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.csw
X###########################################################################
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.pkg
X###########################################################################
END-of-star-1.5.2/pkgdefs/CSW/CSWstar/Makefile
echo x - star-1.5.2/pkgdefs/CSW/CSWstar/copyright
sed 's/^X//' >star-1.5.2/pkgdefs/CSW/CSWstar/copyright << 'END-of-star-1.5.2/pkgdefs/CSW/CSWstar/copyright'
XCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0
X
X1. Definitions.
X
X    1.1. "Contributor" means each individual or entity that creates
X         or contributes to the creation of Modifications.
X
X    1.2. "Contributor Version" means the combination of the Original
X         Software, prior Modifications used by a Contributor (if any),
X         and the Modifications made by that particular Contributor.
X
X    1.3. "Covered Software" means (a) the Original Software, or (b)
X         Modifications, or (c) the combination of files containing
X         Original Software with files containing Modifications, in
X         each case including portions thereof.
X
X    1.4. "Executable" means the Covered Software in any form other
X         than Source Code.
X
X    1.5. "Initial Developer" means the individual or entity that first
X         makes Original Software available under this License.
X
X    1.6. "Larger Work" means a work which combines Covered Software or
X         portions thereof with code not governed by the terms of this
X         License.
X
X    1.7. "License" means this document.
X
X    1.8. "Licensable" means having the right to grant, to the maximum
X         extent possible, whether at the time of the initial grant or
X         subsequently acquired, any and all of the rights conveyed
X         herein.
X
X    1.9. "Modifications" means the Source Code and Executable form of
X         any of the following:
X
X        A. Any file that results from an addition to, deletion from or
X           modification of the contents of a file containing Original
X           Software or previous Modifications;
X
X        B. Any new file that contains any part of the Original
X           Software or previous Modifications; or
X
X        C. Any new file that is contributed or otherwise made
X           available under the terms of this License.
X
X    1.10. "Original Software" means the Source Code and Executable
X          form of computer software code that is originally released
X          under this License.
X
X    1.11. "Patent Claims" means any patent claim(s), now owned or
X          hereafter acquired, including without limitation, method,
X          process, and apparatus claims, in any patent Licensable by
X          grantor.
X
X    1.12. "Source Code" means (a) the common form of computer software
X          code in which modifications are made and (b) associated
X          documentation included in or with such code.
X
X    1.13. "You" (or "Your") means an individual or a legal entity
X          exercising rights under, and complying with all of the terms
X          of, this License.  For legal entities, "You" includes any
X          entity which controls, is controlled by, or is under common
X          control with You.  For purposes of this definition,
X          "control" means (a) the power, direct or indirect, to cause
X          the direction or management of such entity, whether by
X          contract or otherwise, or (b) ownership of more than fifty
X          percent (50%) of the outstanding shares or beneficial
X          ownership of such entity.
X
X2. License Grants.
X
X    2.1. The Initial Developer Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, the Initial
X    Developer hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Initial Developer, to use,
X            reproduce, modify, display, perform, sublicense and
X            distribute the Original Software (or portions thereof),
X            with or without Modifications, and/or as part of a Larger
X            Work; and
X
X        (b) under Patent Claims infringed by the making, using or
X            selling of Original Software, to make, have made, use,
X            practice, sell, and offer for sale, and/or otherwise
X            dispose of the Original Software (or portions thereof).
X
X        (c) The licenses granted in Sections 2.1(a) and (b) are
X            effective on the date Initial Developer first distributes
X            or otherwise makes the Original Software available to a
X            third party under the terms of this License.
X
X        (d) Notwithstanding Section 2.1(b) above, no patent license is
X            granted: (1) for code that You delete from the Original
X            Software, or (2) for infringements caused by: (i) the
X            modification of the Original Software, or (ii) the
X            combination of the Original Software with other software
X            or devices.
X
X    2.2. Contributor Grant.
X
X    Conditioned upon Your compliance with Section 3.1 below and
X    subject to third party intellectual property claims, each
X    Contributor hereby grants You a world-wide, royalty-free,
X    non-exclusive license:
X
X        (a) under intellectual property rights (other than patent or
X            trademark) Licensable by Contributor to use, reproduce,
X            modify, display, perform, sublicense and distribute the
X            Modifications created by such Contributor (or portions
X            thereof), either on an unmodified basis, with other
X            Modifications, as Covered Software and/or as part of a
X            Larger Work; and
X
X        (b) under Patent Claims infringed by the making, using, or
X            selling of Modifications made by that Contributor either
X            alone and/or in combination with its Contributor Version
X            (or portions of such combination), to make, use, sell,
X            offer for sale, have made, and/or otherwise dispose of:
X            (1) Modifications made by that Contributor (or portions
X            thereof); and (2) the combination of Modifications made by
X            that Contributor with its Contributor Version (or portions
X            of such combination).
X
X        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are
X            effective on the date Contributor first distributes or
X            otherwise makes the Modifications available to a third
X            party.
X
X        (d) Notwithstanding Section 2.2(b) above, no patent license is
X            granted: (1) for any code that Contributor has deleted
X            from the Contributor Version; (2) for infringements caused
X            by: (i) third party modifications of Contributor Version,
X            or (ii) the combination of Modifications made by that
X            Contributor with other software (except as part of the
X            Contributor Version) or other devices; or (3) under Patent
X            Claims infringed by Covered Software in the absence of
X            Modifications made by that Contributor.
X
X3. Distribution Obligations.
X
X    3.1. Availability of Source Code.
X
X    Any Covered Software that You distribute or otherwise make
X    available in Executable form must also be made available in Source
X    Code form and that Source Code form must be distributed only under
X    the terms of this License.  You must include a copy of this
X    License with every copy of the Source Code form of the Covered
X    Software You distribute or otherwise make available.  You must
X    inform recipients of any such Covered Software in Executable form
X    as to how they can obtain such Covered Software in Source Code
X    form in a reasonable manner on or through a medium customarily
X    used for software exchange.
X
X    3.2. Modifications.
X
X    The Modifications that You create or to which You contribute are
X    governed by the terms of this License.  You represent that You
X    believe Your Modifications are Your original creation(s) and/or
X    You have sufficient rights to grant the rights conveyed by this
X    License.
X
X    3.3. Required Notices.
X
X    You must include a notice in each of Your Modifications that
X    identifies You as the Contributor of the Modification.  You may
X    not remove or alter any copyright, patent or trademark notices
X    contained within the Covered Software, or any notices of licensing
X    or any descriptive text giving attribution to any Contributor or
X    the Initial Developer.
X
X    3.4. Application of Additional Terms.
X
X    You may not offer or impose any terms on any Covered Software in
X    Source Code form that alters or restricts the applicable version
X    of this License or the recipients' rights hereunder.  You may
X    choose to offer, and to charge a fee for, warranty, support,
X    indemnity or liability obligations to one or more recipients of
X    Covered Software.  However, you may do so only on Your own behalf,
X    and not on behalf of the Initial Developer or any Contributor.
X    You must make it absolutely clear that any such warranty, support,
X    indemnity or liability obligation is offered by You alone, and You
X    hereby agree to indemnify the Initial Developer and every
X    Contributor for any liability incurred by the Initial Developer or
X    such Contributor as a result of warranty, support, indemnity or
X    liability terms You offer.
X
X    3.5. Distribution of Executable Versions.
X
X    You may distribute the Executable form of the Covered Software
X    under the terms of this License or under the terms of a license of
X    Your choice, which may contain terms different from this License,
X    provided that You are in compliance with the terms of this License
X    and that the license for the Executable form does not attempt to
X    limit or alter the recipient's rights in the Source Code form from
X    the rights set forth in this License.  If You distribute the
X    Covered Software in Executable form under a different license, You
X    must make it absolutely clear that any terms which differ from
X    this License are offered by You alone, not by the Initial
X    Developer or Contributor.  You hereby agree to indemnify the
X    Initial Developer and every Contributor for any liability incurred
X    by the Initial Developer or such Contributor as a result of any
X    such terms You offer.
X
X    3.6. Larger Works.
X
X    You may create a Larger Work by combining Covered Software with
X    other code not governed by the terms of this License and
X    distribute the Larger Work as a single product.  In such a case,
X    You must make sure the requirements of this License are fulfilled
X    for the Covered Software.
X
X4. Versions of the License.
X
X    4.1. New Versions.
X
X    Sun Microsystems, Inc. is the initial license steward and may
X    publish revised and/or new versions of this License from time to
X    time.  Each version will be given a distinguishing version number.
X    Except as provided in Section 4.3, no one other than the license
X    steward has the right to modify this License.
X
X    4.2. Effect of New Versions.
X
X    You may always continue to use, distribute or otherwise make the
X    Covered Software available under the terms of the version of the
X    License under which You originally received the Covered Software.
X    If the Initial Developer includes a notice in the Original
X    Software prohibiting it from being distributed or otherwise made
X    available under any subsequent version of the License, You must
X    distribute and make the Covered Software available under the terms
X    of the version of the License under which You originally received
X    the Covered Software.  Otherwise, You may also choose to use,
X    distribute or otherwise make the Covered Software available under
X    the terms of any subsequent version of the License published by
X    the license steward.
X
X    4.3. Modified Versions.
X
X    When You are an Initial Developer and You want to create a new
X    license for Your Original Software, You may create and use a
X    modified version of this License if You: (a) rename the license
X    and remove any references to the name of the license steward
X    (except to note that the license differs from this License); and
X    (b) otherwise make it clear that the license contains terms which
X    differ from this License.
X
X5. DISCLAIMER OF WARRANTY.
X
X    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
X    BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
X    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
X    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
X    PURPOSE OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND
X    PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.  SHOULD ANY
X    COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
X    INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
X    NECESSARY SERVICING, REPAIR OR CORRECTION.  THIS DISCLAIMER OF
X    WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.  NO USE OF
X    ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
X    DISCLAIMER.
X
X6. TERMINATION.
X
X    6.1. This License and the rights granted hereunder will terminate
X    automatically if You fail to comply with terms herein and fail to
X    cure such breach within 30 days of becoming aware of the breach.
X    Provisions which, by their nature, must remain in effect beyond
X    the termination of this License shall survive.
X
X    6.2. If You assert a patent infringement claim (excluding
X    declaratory judgment actions) against Initial Developer or a
X    Contributor (the Initial Developer or Contributor against whom You
X    assert such claim is referred to as "Participant") alleging that
X    the Participant Software (meaning the Contributor Version where
X    the Participant is a Contributor or the Original Software where
X    the Participant is the Initial Developer) directly or indirectly
X    infringes any patent, then any and all rights granted directly or
X    indirectly to You by such Participant, the Initial Developer (if
X    the Initial Developer is not the Participant) and all Contributors
X    under Sections 2.1 and/or 2.2 of this License shall, upon 60 days
X    notice from Participant terminate prospectively and automatically
X    at the expiration of such 60 day notice period, unless if within
X    such 60 day period You withdraw Your claim with respect to the
X    Participant Software against such Participant either unilaterally
X    or pursuant to a written agreement with Participant.
X
X    6.3. In the event of termination under Sections 6.1 or 6.2 above,
X    all end user licenses that have been validly granted by You or any
X    distributor hereunder prior to termination (excluding licenses
X    granted to You by any distributor) shall survive termination.
X
X7. LIMITATION OF LIABILITY.
X
X    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
X    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
X    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
X    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
X    LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
X    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
X    LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
X    STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
X    COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
X    INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.  THIS LIMITATION OF
X    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
X    INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
X    APPLICABLE LAW PROHIBITS SUCH LIMITATION.  SOME JURISDICTIONS DO
X    NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
X    CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
X    APPLY TO YOU.
X
X8. U.S. GOVERNMENT END USERS.
X
X    The Covered Software is a "commercial item," as that term is
X    defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
X    computer software" (as that term is defined at 48
X    C.F.R. 252.227-7014(a)(1)) and "commercial computer software
X    documentation" as such terms are used in 48 C.F.R. 12.212
X    (Sept. 1995).  Consistent with 48 C.F.R. 12.212 and 48
X    C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
X    U.S. Government End Users acquire Covered Software with only those
X    rights set forth herein.  This U.S. Government Rights clause is in
X    lieu of, and supersedes, any other FAR, DFAR, or other clause or
X    provision that addresses Government rights in computer software
X    under this License.
X
X9. MISCELLANEOUS.
X
X    This License represents the complete agreement concerning subject
X    matter hereof.  If any provision of this License is held to be
X    unenforceable, such provision shall be reformed only to the extent
X    necessary to make it enforceable.  This License shall be governed
X    by the law of the jurisdiction specified in a notice contained
X    within the Original Software (except to the extent applicable law,
X    if any, provides otherwise), excluding such jurisdiction's
X    conflict-of-law provisions.  Any litigation relating to this
X    License shall be subject to the jurisdiction of the courts located
X    in the jurisdiction and venue specified in a notice contained
X    within the Original Software, with the losing party responsible
X    for costs, including, without limitation, court costs and
X    reasonable attorneys' fees and expenses.  The application of the
X    United Nations Convention on Contracts for the International Sale
X    of Goods is expressly excluded.  Any law or regulation which
X    provides that the language of a contract shall be construed
X    against the drafter shall not apply to this License.  You agree
X    that You alone are responsible for compliance with the United
X    States export administration regulations (and the export control
X    laws and regulation of any other countries) when You use,
X    distribute or otherwise make available any Covered Software.
X
X10. RESPONSIBILITY FOR CLAIMS.
X
X    As between Initial Developer and the Contributors, each party is
X    responsible for claims and damages arising, directly or
X    indirectly, out of its utilization of rights under this License
X    and You agree to work with Initial Developer and Contributors to
X    distribute such responsibility on an equitable basis.  Nothing
X    herein is intended or shall be deemed to constitute any admission
X    of liability.
X
X--------------------------------------------------------------------
X
XNOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
XDISTRIBUTION LICENSE (CDDL)
X
XFor Covered Software in this distribution, this License shall
Xbe governed by the laws of Germany (excluding conflict-of-law
Xprovisions).
X
XAny litigation relating to this License shall be subject to the
Xjurisdiction and the courts of Berlin Germany, with venue lying
Xin Berlin Germany.
END-of-star-1.5.2/pkgdefs/CSW/CSWstar/copyright
echo x - star-1.5.2/pkgdefs/CSW/CSWstar/depend
sed 's/^X//' >star-1.5.2/pkgdefs/CSW/CSWstar/depend << 'END-of-star-1.5.2/pkgdefs/CSW/CSWstar/depend'
XP	CSWcommon	common - common files and dirs for CSW packages
XP	CSWschilybase	Basic framework from J. Schilling
XP	CSWschilyutils	A collection of utilities from J. Schilling
XP	SUNWcsl		Core Solaris, (Shared Libs)
XP	SUNWcsr		Core Solaris, (Root)
END-of-star-1.5.2/pkgdefs/CSW/CSWstar/depend
echo x - star-1.5.2/pkgdefs/CSW/CSWstar/pkginfo
sed 's/^X//' >star-1.5.2/pkgdefs/CSW/CSWstar/pkginfo << 'END-of-star-1.5.2/pkgdefs/CSW/CSWstar/pkginfo'
XARCH=i386
XPKG=CSWstar
X#PKG=XXXstar
XNAME=star - Standard TAR (a POSIX compliant TAR and a configurable secure RMT remote tape server)
XVERSION=1.5a81,REV=2006.07.30
XCATEGORY=application
XVENDOR=http://cdrecord.berlios.de/old/private/star.html  packaged for CSW by Jörg Schilling
XHOTLINE=http://www.blastwave.org/bugtrack/
XEMAIL=joerg@blastwave.org
XBASEDIR=/opt/csw
END-of-star-1.5.2/pkgdefs/CSW/CSWstar/pkginfo
echo x - star-1.5.2/pkgdefs/CSW/CSWstar/prototype
sed 's/^X//' >star-1.5.2/pkgdefs/CSW/CSWstar/prototype << 'END-of-star-1.5.2/pkgdefs/CSW/CSWstar/prototype'
Xi pkginfo
Xi depend
Xi copyright
Xd none bin ? ? ?
Xf none bin/star 4711 root bin
Xs none bin/ustar=star
Xs none bin/gnutar=star
Xs none bin/scpio=star
Xs none bin/spax=star
Xs none bin/suntar=star
Xs none bin/tar=star
Xf none bin/star_sym 0755 root bin
Xf none bin/smt 0755 root bin
Xs none bin/mt=smt
Xf none bin/tartest 0755 root bin
Xd none sbin ? ? ?
Xf none sbin/rmt 0755 root bin
Xd none share ? ? ?
Xd none share/man ? ? ?
Xd none share/man/man1 ? ? ?
Xf none share/man/man1/smt.1 0444 root bin
Xf none share/man/man1/star.1 0444 root bin
Xf none share/man/man1/gnutar.1 0444 root bin
Xf none share/man/man1/scpio.1 0444 root bin
Xf none share/man/man1/spax.1 0444 root bin
Xf none share/man/man1/suntar.1 0444 root bin
Xf none share/man/man1/rmt.1 0444 root bin
Xf none share/man/man1/tartest.1 0444 root bin
Xd none share/man/man4 ? ? ?
Xf none share/man/man4/star.4 0444 root bin
Xd none share/doc ? ? ?
Xd none share/doc/rmt 0755 root bin
Xf none share/doc/rmt/default-rmt.sample 0644 root bin
Xd none share/doc/star 0755 root bin
Xd none share/doc/star/testscripts 0755 root bin
Xf none share/doc/star/testscripts/00INDEX 0644 root bin
Xf none share/doc/star/testscripts/100char_longlink.tar 0644 root bin
Xf none share/doc/star/testscripts/100char_longlink.tar-non-compliant 0644 root bin
Xf none share/doc/star/testscripts/README.create-and-remove 0644 root bin
Xf none share/doc/star/testscripts/README.gtarfail 0644 root bin
Xf none share/doc/star/testscripts/README.largefiles 0644 root bin
Xf none share/doc/star/testscripts/README.longnames 0644 root bin
Xf none share/doc/star/testscripts/README.paxbug 0644 root bin
Xf none share/doc/star/testscripts/README.quicktest 0644 root bin
Xf none share/doc/star/testscripts/create-and-remove.tar 0644 root bin
Xf none share/doc/star/testscripts/dirloop.tar 0644 root bin
Xf none share/doc/star/testscripts/g-hdr.pax.gz 0644 root bin
Xf none share/doc/star/testscripts/gtarfail.tar 0644 root bin
Xf none share/doc/star/testscripts/gtarfail2.tar 0644 root bin
Xf none share/doc/star/testscripts/long.ustar.gz 0644 root bin
Xf none share/doc/star/testscripts/mk 0755 root bin
Xf none share/doc/star/testscripts/mk2 0755 root bin
Xf none share/doc/star/testscripts/not_a_tar_file 0644 root bin
Xf none share/doc/star/testscripts/not_a_tar_file2 0644 root bin
Xf none share/doc/star/testscripts/old-file.tar 0644 root bin
Xf none share/doc/star/testscripts/remove.tar 0644 root bin
Xf none share/doc/star/testscripts/pax-big-10g.tar.bz2 0644 root bin
Xf none share/doc/star/testscripts/quicktest.filelist 0644 root bin
Xf none share/doc/star/testscripts/tartest-quicktest.out 0644 root bin
Xf none share/doc/star/testscripts/typescript 0644 root bin
Xf none share/doc/star/testscripts/ustar-all-filetypes.tar 0644 root bin
Xf none share/doc/star/testscripts/ustar-all-quicktest-past-contig.tar 0644 root bin
Xf none share/doc/star/testscripts/ustar-all-quicktest.tar 0644 root bin
Xf none share/doc/star/testscripts/ustar-all-quicktest.tar-without-cont-file 0644 root bin
Xf none share/doc/star/testscripts/ustar-bad-filetypes.tar 0644 root bin
Xf none share/doc/star/testscripts/ustar-bad-signedsum.tar 0644 root bin
Xf none share/doc/star/testscripts/ustar-big-2g.tar.bz2 0644 root bin
Xf none share/doc/star/testscripts/ustar-big-8g.tar.bz2 0644 root bin
Xf none share/doc/star/README 0644 root bin
Xf none share/doc/star/README.ACL 0644 root bin
X#f none share/doc/star/README.SSPM 0644 root bin
X#f none share/doc/star/README.compile 0644 root bin
Xf none share/doc/star/README.crash 0644 root bin
Xf none share/doc/star/README.largefiles 0644 root bin
Xf none share/doc/star/README.mtio 0644 root bin
Xf none share/doc/star/README.otherbugs 0644 root bin
Xf none share/doc/star/README.pattern 0644 root bin
Xf none share/doc/star/README.posix-2001 0644 root bin
X#f none share/doc/star/README.solaris 0644 root bin
X#f none share/doc/star/README.sunos 0644 root bin
Xf none share/doc/star/STARvsGNUTAR 0644 root bin
Xs none man=share/man
END-of-star-1.5.2/pkgdefs/CSW/CSWstar/prototype
echo x - star-1.5.2/Mcsw
sed 's/^X//' >star-1.5.2/Mcsw << 'END-of-star-1.5.2/Mcsw'
X#ident %W% %E% %Q%
X###########################################################################
Xdeftgt:
XSRCROOT=	.
XDIRNAME=	SRCROOT
XRULESDIR=	RULES
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.top
X###########################################################################
X
X#include		$(SRCROOT)/TARGETS/Targetdirs_s
X#DIRS=		lib/.aonly libdeflt libscg libedc
X
XPROJECTNAME=	CSWschily-10.06.2006
XTARGET_AR=	opt-schily-0.99
XINS_BASE=	/opt/csw
XCOPTX="-DSEEK_DATA=3 -DSEEK_HOLE=4 -D_PC_MIN_HOLE_SIZE=21 -DNO_DOIT"
X
Xdeftgt:
X	$(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX)		all
X	$(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX)		all
X	#$(MAKE) -f Mcsw INS_BASE=/	     COPTX=$(COPTX)		pkg1
X	$(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX)		pkg1
X	fakeroot '$(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX)	package PKGTYPE=CSW'
X
XSTRIPLIST=      ./$(INS_BASE)/*bin/* ./$(INS_BASE)/ccs/bin/*
XSTRIPXLIST=      ./$(INS_BASE)/lib/*.so.*
XMCSLIST=	$(STRIPLIST) $(STRIPXLIST)
XMAKE_FILE=	-f Mcsw
XPRE_INST_CMDS=	mkdir -p etc/default
XPOST_INST_CMDS=	mkdir -p usr/bin; \
X		(cd usr/bin; ln -s ../../$(INS_BASE)/bin/* . ; rm -f cut paste label tar mt); \
X		(cd ./$(INS_BASE)/bin; ln -s ../ccs/bin/sccs sccs); \
X		mkdir -p usr/ccs/bin; \
X		mv ./$(INS_BASE)/etc/default/* etc/default
XPOST_STRIP_CMDS=	chmod -f u=rwx,g=x,o=x,u+s \
X		./$(INS_BASE)/bin/readcd ./$(INS_BASE)/bin/cdda2wav \
X		./$(INS_BASE)/bin/smt ./$(INS_BASE)/bin/sdd \
X		./$(INS_BASE)/bin/star ./$(INS_BASE)/bin/cdrecord \
X		./$(INS_BASE)/sbin/rscsi ;\
X		chmod -f u=rx,g=rx,o=rx ./$(INS_BASE)/lib/lib*.so.*
X
X#POST_STRIP_CMDS= chmod u=rx,g=rx,o=rx ./$(INS_BASE)/lib/lib*.so.*
X
X###########################################################################
X# Due to a bug in SunPRO make we need special rules for the root makefile
X#
X#include		$(SRCROOT)/$(RULESDIR)/rules.tpk
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.pkg
Xinclude		$(SRCROOT)/$(RULESDIR)/rules.rdi
X###########################################################################
END-of-star-1.5.2/Mcsw
echo c - star-1.5.2/proto
mkdir -p star-1.5.2/proto > /dev/null 2>&1
echo c - star-1.5.2/packages
mkdir -p star-1.5.2/packages > /dev/null 2>&1
echo x - star-1.5.2/AN-1.5.1
sed 's/^X//' >star-1.5.2/AN-1.5.1 << 'END-of-star-1.5.2/AN-1.5.1'
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximplementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.berlios.de/pub/star
X
XChanges since star-1.5:
X
X/*--------------------------------------------------------------------------*/
XBetween star-1.5 and star-1.5.1, there have been mostly changes that enhance
Xthe portability and stability.
X
X-	New support for ATARI-ST using FreeMiNT
X
X-	New support for Haiku
X
X-	New support for Syllable
X
X-	New support for Cygwin on Vista-64-Bit platforms
X
X-	New support for DragonFly BSD
X
X-	Added support for 64 bit compilation on HP-HX using "cc".
X	Use make CCOM=cc64 as usual to switch to 64 bit compilation.
X
X-	Added support for 64 bit compilation on IRIX using "cc" and "gcc".
X	Use make CCOM=cc64 or CCOM=gcc64 as usual to switch to 64 bit compilation.
X
X-	Enhanced config.guess to support DragonFly BSD and OpenVMS
X
X-	The build exnvironment is cleaned up if the compilation is controlled
X	by smake or gmake (LC_* are set to "C").
X
X-	Added GMAKE_NOWARN=true to allow to disable the gmake warning
X
X-	Now supporting dynamic libraries on Mac OS X
X
X-	Avoid problems with tr(1) when compiling with gmake os SunPro-Make.
X
X-	Avoid simple suffix rules for smake to speed up implicit rule search.
X
X-	Added rules for OpenVMS
X
X-	Enhanced include/schily/priv.h to distinct Solaris and AIX process privileges
X
X-	New file include/schily/math.h
X
X-	New file include/schily/dbgmalloc.h
X
X-	VMS specific devide definitions have been added to include/schily/device.h
X
X-	The file include/schily/wait.h now uses definitions that better deal with 
X	platforms that have both: "union wait" and a POSIX style "int *" wait(2)
X	parameter.
X
X-	Beware in include/schily/utypes.h: VMS on VAX has no long long
X
X-	The file include/schily/vfork.h adds definitions to allow to use vfork()
X	on VMS
X
X-	Schily autoconf now implements a better way to check whether a function
X	is defined in libc and avoids to define -lc for the related library name.
X
X-	Schily autoconf now implements a better check gor bash that includes
X	support for bash-1.x that is still used on OpenVMS.
X
X-	Schily autoconf now checks for struct utsname.arch to support VMS
X
X-	Schily autoconf now implements a better check for opendir() and a related 
X	library name.
X
X-	Schily autoconf now implements a vfork() check that does not hang
X	infinitely on OpenVMS
X
X-	conf/oarch.sh was enhanced to match the code in the make file rules.
X
X-	New align test for long double in incs/align_test.c
X
X-	New "max align" type in incs/align_test.c
X
X-	libschily/*bytes.c now support 64 bit compilation and use a "ssize_t"
X	typed count parameter instead of "int".
X
X-	libschily/fconv.c now contains better support for isinf()/isnan()
X	for several platforms that do not offer a C99 complient base.
X	This includes HP-UX 11.11 and newer AIX versions.
X	There now are local macros as a fallback that work for IEEE compliant 
X	floating point coding.
X
X-	The libshcily/fexec*() functions now use a I/O redirection method
X	that is compatible with the vfork() behavior on OpenVMS.
X
X-	libfind was rewritten to use vfork() instead of fork() to allow to 
X	support OpenVMS.
X
X-	fixed a typo in libfind/idcache.c
X
X-	Added $(LIB_ACL_TEST) to the libs for libfind to allow a shared libfind
X	with ACL support on Linux.
X
X-	fixed a bug in star that caused star to print the list output
X	on stderr if the archive was read from stdin.
X
X-	star -c -dump -acl -find . 
X	now works correctly as it now uses short names for retrieving ACLs.
X-	star H=help now marks the default archive type
X
X-	star does no longer allow to read/write the archive data from/to a
X	terminal
X
X-	tartest and star_sym now include a -version option
X
X-	star_sym no honors the autoconf result HAVE_FCHDIR
X
X-	Fixed a bug in star introduced with the new check for:
X	"Archive cannot be a tty." that could cause star to dump
X	core when in copy mode.
X
X-	star now better checks the parameter for the -s substitute option.
X	This is needed in order to catch typos in arg lists.
X
X-	star check for same filedescriptor on archive and stdout had a typo
X	that caused undfined behavior and sometimes star -tv output did go to
X	stderr.
X
X-	star/checkerr.c now correctly handles the "WARN" directive.
X
X-	star -C missing-dir now correctly sets the exitcode from star
X
X-	star -C missing-dir may now be handled by a new errctl= tag "CHRDIR"
X
X-	star -X is now working correctly, thanks to a Johannes Geiss <jgeiss@arcor.de>
X	who detected a copy/paste error made while -X was copied from list=
X
X-	Correctly abort the FIFO in cdrecord and star on BeOS and Haiku
X	in case that the clone ara cannot be made shared.
X
X-	The directory "testscripts" has been renamed to "star/testscripts"
X
X-	Fixed the debug print code in the sparse file handling code to
X	use %zd instead of just %d for size_t parameters.
X
X-	star/fifo.c rewritten to avoid a core dump from the optimizer program
X	of the SGI IRIX C-compiler.
X
X-	Added autoconf test to distinct Linux ACLs from IRIX ACLs
X
X-	let libfind deal with the differences between Linux ACLs and IRIX ACLs
X
X
X
XTODO: 
X
X	-	Complete the man page for spax
X
X	-	Implement multi volume continuation headers that work for
X		files > 8 GB where the last tar header
X		(a POSIX.1-2001 'x'-header) was split across volumes.
X		In this case, if only POSIX compliant TAR features are allowed,
X		the extracting TAR would not be able to correctly skip the
X		large file as it does not know the content of the POSIX.1-2001
X		'x'-header. For this reason, later star versions need to implement
X		a method to create multi volume continuation (skip) headers that
X		include the size of the split POSIX.1-2001 'x'-header and the
X		size of the following large file.
X
X		Note that even with this method we would need a new method
X		(different from the current bitmap) to deal with multi volume
X		continuation headers for split files in case the FIFO in star
X		may be larger than 8 GB.
X
X	-	Implement a autoconf extension to to deal with Linux with XFS
X		where not all ACL handling is inside -lacl ??? is this still true?
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully functional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix.1-1988) handling added
X1994	Xstar format (extended Posix.1-1988) defined and introduced
X1995	Ported to many platforms
X1999	Support for Win32 (Cygwin)
X1999	base 256 support to overcome limitation with octal fields
X2001	Large file support
X2001	Support for POSIX.1-2001 extended headers
X2001	Support for ACLs in POSIX.1-2001 extended headers
X2002	Support for extended file flags in POSIX.1-2001 extended headers
X2002	Support for extended inode meta data and meta files
X2003	New program tartest allows to verify POSIX.1-1990 tar archive compliance
X2003	Error control added to allow to selectively ignore error contitions
X2003	ED like pattern based file name substitution with -s '/from/to/[gp]'
X2003	Efficient built in -copy mode
X2003	Basic support for incremental dumps (incremental restore not yet ready)
X2003	CPIO archive support
X2003	New command 'pax/spax' for POSIX.1 command line compatibility.
X2003	New command 'cpio/scpio' for SUSv2 command line compatibility.
X2003	New command 'suntar' for Solaris command line compatibility.
X2003	New command 'gnutar' for GNU tar command line compatibility.
X2003	Support for reliable multi-volume archives with media size detection
X2005	Support for full and incremental dumps and restores.
X2005	The find(1) code has been integrated via libfind and allows to use find on archives
X2005	Changed license from GPL to CDDL
X2005	Added support for a reliable sparse file interface in Solaris
X
XSupported platforms:
X
XVirtually any! Known to work:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux,
XHP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD, OpenBSD,
XOSF-1, True-64, QNX, BeOS, Apollo Domain/OS, Next-STep, 
XOS/2, SCO-openserver, SCO-unixware, Caldera OpenUnix,
XCygwin (Win32), Sony NewsOS,  BSDi (BSD/OS), QNX,
XApple Rhapsody, MacOS X, AmigaOS, GNU Hurd
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
X
XStar development started 1982, the first complete implementation has 
Xbeen done in 1985. I never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	remote tape support	- a fast RMT implementation that has no
X				  probems to saturate a 100 Mb/s network.
X
X	accurate sparse files	- star is able to reproduce holes in sparse
X				  files accurately if the OS includes 
X				  the needed support functions. This is
X				  currently true for Solaris-2.3 to
X				  Solaris-2.5.1
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record
X				  long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  With POSIX.1-2001 the times are in nanosecond
X				  granularity.
X				  Star may reset access time after doing
X				  backup. On Solaris this can be done without
X				  changing the ctime.
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star,
X				  POSIX.1-2001 PAX, Sun's Solaris tar.
X
X
X	automatic compression detect - star automatically detects whether the
X				  archive is compressed. If it has been
X				  compressed with a compression program that
X				  is compatible to decompression with "gzip"
X				  or "bzip2", star automatically activates
X				  decompression.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete
X				  description of bugs found in other tar
X				  implementations. Star is the first tar
X				  implementation that supports POSIX.1-2001.
X
X	support for ACLs and file flags - star supports Access Control Lists
X				  and extended file flags (as found on FreeBSD
X				  and Linux). Support to archive and restore
X				  other file properties may be easily added.
X
X	support for all inode metadata - star supports to put all inode
X				  metadata on the archive. This allows future
X				  versions of star to perform true
X				  incremental dumps.
X
X	sophisticated error control - allows to tell star which error types
X				  should be ignored for wich file name pattern.
X				  This allows to write backup scripts that give
X				  no error messages for all problems that are
X				  tolerable (e.g. growing log files).
X
X	ED like filename substitution - star supports automated pattern rule based
X				  file name substitution as documented for 'pax'.
X
X	A fast built in -copy mode - allows to make fast and accurate copies and
X				  directory tree comparisons.
X
X	Integrated find(1) code - allows many interesting new features that would
X				  be possible with a separate find call.
X
XHave a look at the manual page, it is included in the distribution.
X
END-of-star-1.5.2/AN-1.5.1
echo x - star-1.5.2/.links
sed 's/^X//' >star-1.5.2/.links << 'END-of-star-1.5.2/.links'
X./RULES/9000-710-hp-ux-cc.rul
X./RULES/9000-710-hp-ux-cc64.rul
X./RULES/9000-710-hp-ux-gcc.rul
X./RULES/9000-712-hp-ux-cc.rul
X./RULES/9000-712-hp-ux-cc64.rul
X./RULES/9000-712-hp-ux-gcc.rul
X./RULES/9000-715-hp-ux-cc.rul
X./RULES/9000-715-hp-ux-cc64.rul
X./RULES/9000-715-hp-ux-gcc.rul
X./RULES/9000-735-hp-ux-cc.rul
X./RULES/9000-735-hp-ux-cc64.rul
X./RULES/9000-735-hp-ux-gcc.rul
X./RULES/9000-743-hp-ux-cc.rul
X./RULES/9000-743-hp-ux-cc64.rul
X./RULES/9000-743-hp-ux-gcc.rul
X./RULES/9000-755-hp-ux-cc.rul
X./RULES/9000-755-hp-ux-cc64.rul
X./RULES/9000-755-hp-ux-gcc.rul
X./RULES/9000-777-hp-ux-cc.rul
X./RULES/9000-777-hp-ux-cc64.rul
X./RULES/9000-777-hp-ux-gcc.rul
X./RULES/9000-778-hp-ux-cc.rul
X./RULES/9000-778-hp-ux-cc64.rul
X./RULES/9000-778-hp-ux-gcc.rul
X./RULES/9000-780-hp-ux-cc.rul
X./RULES/9000-780-hp-ux-cc64.rul
X./RULES/9000-780-hp-ux-gcc.rul
X./RULES/9000-782-hp-ux-cc.rul
X./RULES/9000-782-hp-ux-cc64.rul
X./RULES/9000-782-hp-ux-gcc.rul
X./RULES/9000-785-hp-ux-cc.rul
X./RULES/9000-785-hp-ux-cc64.rul
X./RULES/9000-785-hp-ux-gcc.rul
X./RULES/9000-800-hp-ux-cc.rul
X./RULES/9000-800-hp-ux-cc64.rul
X./RULES/9000-800-hp-ux-gcc.rul
X./RULES/9000-820-hp-ux-cc.rul
X./RULES/9000-820-hp-ux-cc64.rul
X./RULES/9000-820-hp-ux-gcc.rul
X./RULES/9000-831-hp-ux-cc.rul
X./RULES/9000-831-hp-ux-cc64.rul
X./RULES/9000-831-hp-ux-gcc.rul
X./RULES/9000-899-hp-ux-cc.rul
X./RULES/9000-899-hp-ux-cc64.rul
X./RULES/9000-899-hp-ux-gcc.rul
X./RULES/alpha-linux-cc.rul
X./RULES/alpha-linux-gcc.rul
X./RULES/alpha-netbsd-cc.rul
X./RULES/alpha-netbsd-gcc.rul
X./RULES/alphaserver_ds20_500_mhz-openvms-cc.rul
X./RULES/amd64-netbsd-cc.rul
X./RULES/amd64-netbsd-gcc.rul
X./RULES/amiga-netbsd-cc.rul
X./RULES/amiga-netbsd-gcc.rul
X./RULES/aranym-freemint-gcc.rul
X./RULES/armv4l-linux-cc.rul
X./RULES/armv4l-linux-gcc.rul
X./RULES/armv5teb-linux-cc.rul
X./RULES/armv5teb-linux-gcc.rul
X./RULES/armv5tejl-linux-cc.rul
X./RULES/armv5tejl-linux-gcc.rul
X./RULES/atariclone-freemint-gcc.rul
X./RULES/atariste-freemint-gcc.rul
X./RULES/ataritt-freemint-gcc.rul
X./RULES/bemac-beos-gcc.rul
X./RULES/bemac-haiku-cc.rul
X./RULES/bemac-haiku-gcc.rul
X./RULES/falcon-freemint-gcc.rul
X./RULES/hades-freemint-gcc.rul
X./RULES/i386-cygwin32_nt-cc.rul
X./RULES/i386-cygwin32_nt-cl.rul
X./RULES/i386-cygwin32_nt-gcc.rul
X./RULES/i386-darwin-cc.rul
X./RULES/i386-darwin-cc32.rul
X./RULES/i386-darwin-cc64.rul
X./RULES/i386-darwin-gcc.rul
X./RULES/i386-darwin-gcc32.rul
X./RULES/i386-darwin-gcc64.rul
X./RULES/x86_64-darwin-cc.rul
X./RULES/x86_64-darwin-cc32.rul
X./RULES/x86_64-darwin-cc64.rul
X./RULES/x86_64-darwin-gcc.rul
X./RULES/x86_64-darwin-gcc32.rul
X./RULES/x86_64-darwin-gcc64.rul
X./RULES/i386-dragonfly-cc.rul
X./RULES/i386-dragonfly-gcc.rul
X./RULES/i386-linux-cc.rul
X./RULES/i386-linux-gcc.rul
X./RULES/i386-linux-suncc.rul
X./RULES/i386-nextstep-cc.rul
X./RULES/i386-nextstep-gcc.rul
X./RULES/i486-linux-cc.rul
X./RULES/i486-linux-gcc.rul
X./RULES/i486-linux-suncc.rul
X./RULES/i486-ms-dos-gcc.rul
X./RULES/i486-unixware-cc.rul
X./RULES/i486-unixware-gcc.rul
X./RULES/i586-cygwin32_nt-cc.rul
X./RULES/i586-cygwin32_nt-cl.rul
X./RULES/i586-cygwin32_nt-gcc.rul
X./RULES/i586-ms-dos-gcc.rul
X./RULES/i586-unixware-cc.rul
X./RULES/i586-unixware-gcc.rul
X./RULES/i686-at386-gnu-cc.rul
X./RULES/i686-at386-gnu-gcc.rul
X./RULES/i686-cygwin32_nt-cc.rul
X./RULES/i686-cygwin32_nt-cl.rul
X./RULES/i686-cygwin32_nt-cl64.rul
X./RULES/i686-cygwin32_nt-gcc.rul
X./RULES/i686-cygwin32_wow64-cc.rul
X./RULES/i686-cygwin32_wow64-cc64.rul
X./RULES/i686-cygwin32_wow64-cl.rul
X./RULES/i686-cygwin32_wow64-gcc.rul
X./RULES/i686-cygwin32_wow64-gcc64.rul
X./RULES/i686-linux-cc.rul
X./RULES/i686-linux-gcc.rul
X./RULES/i686-linux-suncc.rul
X./RULES/i686-linux-suncc64.rul
X./RULES/i686-ms-dos-gcc.rul
X./RULES/i786-cygwin32_nt-cc.rul
X./RULES/i786-cygwin32_nt-cl.rul
X./RULES/i786-cygwin32_nt-cl64.rul
X./RULES/i786-cygwin32_nt-gcc.rul
X./RULES/i786-cygwin32_wow64-cc.rul
X./RULES/i786-cygwin32_wow64-cc64.rul
X./RULES/i786-cygwin32_wow64-cl.rul
X./RULES/i786-cygwin32_wow64-gcc.rul
X./RULES/i786-cygwin32_wow64-gcc64.rul
X./RULES/i786-ms-dos-gcc.rul
X./RULES/ia64-hp-ux-cc.rul
X./RULES/ia64-hp-ux-cc64.rul
X./RULES/ia64-hp-ux-gcc.rul
X./RULES/ia64-linux-cc.rul
X./RULES/ia64-linux-gcc.rul
X./RULES/ip17-irix-cc.rul
X./RULES/ip17-irix-cc64.rul
X./RULES/ip17-irix-gcc.rul
X./RULES/ip17-irix-gcc64.rul
X./RULES/ip20-irix-cc.rul
X./RULES/ip20-irix-cc64.rul
X./RULES/ip20-irix-gcc.rul
X./RULES/ip20-irix-gcc64.rul
X./RULES/ip27-irix-cc.rul
X./RULES/ip27-irix-cc64.rul
X./RULES/ip27-irix-gcc.rul
X./RULES/ip27-irix-gcc64.rul
X./RULES/ip28-irix-cc.rul
X./RULES/ip28-irix-cc64.rul
X./RULES/ip28-irix-gcc.rul
X./RULES/ip28-irix-gcc64.rul
X./RULES/ip30-irix-cc.rul
X./RULES/ip30-irix-cc64.rul
X./RULES/ip30-irix-gcc.rul
X./RULES/ip30-irix-gcc64.rul
X./RULES/ip32-irix-cc.rul
X./RULES/ip32-irix-cc64.rul
X./RULES/ip32-irix-gcc.rul
X./RULES/ip32-irix-gcc64.rul
X./RULES/ip35-irix-cc.rul
X./RULES/ip35-irix-cc64.rul
X./RULES/ip35-irix-gcc.rul
X./RULES/ip35-irix-gcc64.rul
X./RULES/ldummy.lnk
X./RULES/m68k-linux-cc.rul
X./RULES/m68k-linux-gcc.rul
X./RULES/m68k-nextstep-cc.rul
X./RULES/m68k-nextstep-gcc.rul
X./RULES/mac68k-netbsd-cc.rul
X./RULES/mac68k-netbsd-gcc.rul
X./RULES/macppc-netbsd-cc.rul
X./RULES/macppc-netbsd-gcc.rul
X./RULES/milan-freemint-gcc.rul
X./RULES/mips-linux-cc.rul
X./RULES/mips-linux-gcc.rul
X./RULES/mips64-linux-cc.rul
X./RULES/mips64-linux-gcc.rul
X./RULES/mips64-linux-gcc32.rul
X./RULES/mipsel-linux-cc.rul
X./RULES/mipsel-linux-gcc.rul
X./RULES/mk-build.id
X./RULES/mk-make.id
X./RULES/os-cygwin_98-4.0.id
X./RULES/os-irix64.id
X./RULES/os-openunix.id
X./RULES/parisc-linux-cc.rul
X./RULES/parisc-linux-gcc.rul
X./RULES/parisc64-linux-cc.rul
X./RULES/parisc64-linux-gcc.rul
X./RULES/parisc64-linux-gcc32.rul
X./RULES/pentium-4-unixware-cc.rul
X./RULES/pentium-4-unixware-gcc.rul
X./RULES/pentium-iii-unixware-cc.rul
X./RULES/pentium-iii-unixware-gcc.rul
X./RULES/pentium-pro-unixware-cc.rul
X./RULES/pentium-pro-unixware-gcc.rul
X./RULES/power-macintosh-mac-os10-cc.rul
X./RULES/power-macintosh-mac-os10-gcc.rul
X./RULES/ppc-linux-cc.rul
X./RULES/ppc-linux-gcc.rul
X./RULES/r-build.dep
X./RULES/r-build.obj
X./RULES/r-build.tag
X./RULES/r-gmake.obj
X./RULES/s390-linux-cc.rul
X./RULES/s390-linux-gcc.rul
X./RULES/sh3-linux-cc.rul
X./RULES/sh3-linux-gcc.rul
X./RULES/sh4-linux-cc.rul
X./RULES/sh4-linux-gcc.rul
X./RULES/sh4a-linux-cc.rul
X./RULES/sh4a-linux-gcc.rul
X./RULES/sparc-bsd-os-cc.rul
X./RULES/sparc-bsd-os-gcc.rul
X./RULES/sparc-bsd-os3-cc.rul
X./RULES/sparc-bsd-os3-gcc.rul
X./RULES/sparc-linux-cc.rul
X./RULES/sparc-linux-gcc.rul
X./RULES/sparc-netbsd-cc.rul
X./RULES/sparc-netbsd-gcc.rul
X./RULES/sparc-nextstep-cc.rul
X./RULES/sparc-nextstep-gcc.rul
X./RULES/amd64-freebsd-cc.rul
X./RULES/amd64-freebsd-gcc.rul
X./RULES/sparc64-freebsd-cc.rul
X./RULES/sparc64-freebsd-gcc.rul
X./RULES/amd64-openbsd-cc.rul
X./RULES/amd64-openbsd-gcc.rul
X./RULES/sparc64-linux-cc.rul
X./RULES/sparc64-linux-gcc.rul
X./RULES/sparc64-linux-gcc32.rul
X./RULES/sun4c-sunos4-cc.rul
X./RULES/sun4c-sunos4-gcc.rul
X./RULES/sun4c-sunos5-cc.rul
X./RULES/sun4c-sunos5-gcc.rul
X./RULES/sun4d-sunos5-cc.rul
X./RULES/sun4d-sunos5-gcc.rul
X./RULES/sun4e-sunos5-cc.rul
X./RULES/sun4e-sunos5-gcc.rul
X./RULES/sun4L-sunos5-cc.rul
X./RULES/sun4L-sunos5-gcc.rul
X./RULES/sun4m-sunos4-cc.rul
X./RULES/sun4m-sunos4-gcc.rul
X./RULES/sun4m-sunos5-cc.rul
X./RULES/sun4m-sunos5-gcc.rul
X./RULES/sun4u-sunos5-cc.rul
X./RULES/sun4u-sunos5-cc64.rul
X./RULES/sun4u-sunos5-gcc.rul
X./RULES/sun4u-sunos5-gcc64.rul
X./RULES/sun4us-sunos5-cc.rul
X./RULES/sun4us-sunos5-cc64.rul
X./RULES/sun4us-sunos5-gcc.rul
X./RULES/sun4us-sunos5-gcc64.rul
X./RULES/sun4v-sunos5-cc.rul
X./RULES/sun4v-sunos5-cc64.rul
X./RULES/sun4v-sunos5-gcc.rul
X./RULES/sun4v-sunos5-gcc64.rul
X./RULES/x86_64-dragonfly-cc.rul
X./RULES/x86_64-dragonfly-gcc.rul
X./RULES/x86_64-linux-cc.rul
X./RULES/x86_64-linux-gcc.rul
X./RULES/x86_64-linux-gcc32.rul
X./RULES/x86_64-linux-suncc.rul
X./RULES/x86_64-linux-suncc64.rul
X./RULES/i386-gnu-kfreebsd-cc.rul
X./RULES/i386-gnu-kfreebsd-gcc.rul
X./RULES/i486-gnu-kfreebsd-cc.rul
X./RULES/i486-gnu-kfreebsd-gcc.rul
X./RULES/i586-gnu-kfreebsd-cc.rul
X./RULES/i586-gnu-kfreebsd-gcc.rul
X./RULES/i686-gnu-kfreebsd-cc.rul
X./RULES/i686-gnu-kfreebsd-gcc.rul
X./RULES/amd64-gnu-kfreebsd-cc.rul
X./RULES/amd64-gnu-kfreebsd-gcc.rul
X./RULES/amd64-gnu-kfreebsd-gcc32.rul
X./RULES/x86_64-gnu-kfreebsd-cc.rul
X./RULES/x86_64-gnu-kfreebsd-gcc.rul
X./RULES/x86_64-gnu-kfreebsd-gcc32.rul
X
X./star_sym/dumpdate.c
X./star_sym/restore.c
END-of-star-1.5.2/.links
echo x - star-1.5.2/AN-1.5.2
sed 's/^X//' >star-1.5.2/AN-1.5.2 << 'END-of-star-1.5.2/AN-1.5.2'
XStar is the fastest tar archiver for UNIX
X
XStar has many improvements compared to other tar 
Ximplementations (including gnu tar). See below for a short description
Xof the highlight of star.
X
XStar is located on:
X
Xftp://ftp.berlios.de/pub/star
X
XSince Summer 2012, star offers more than 30 years of maintained service
X
XNote that this project includes a stripped down version of libschily.
XDo not try to link star dynamically against this library. If you like to link
Xdynamically, get the "schily" project bundle from:
X
Xftp://ftp.berlios.de/pub/schily/
X
Xthat includes a complete libschily.
X
XChanges since star-1.5.1:
X
X/*--------------------------------------------------------------------------*/
X
X-	Try to make star immune against signals that appear while opening a 
X	file from a network filesystem.
X
X-	Let the star FIFO better handle the media change operation at the end of
X	a tape volume in multi volume create mode.
X
X-	Allow star to auto-detect the "EOF" condition on a raw disk when writing
X	in multi volume create mode. ENXIO has been added as an alias for EFBIG
X	and ENOSPC.
X
X-	The star.4 manpage was enhanced.
X
X-	star_sym.c now uses O_SEARCH for opening directories.
X
X-	star/longnames.c adds more workarounds against wrong buffer overflow
X	aborts from gcc.
X
X-	star/extract.c now uses access(name, F_OK) instead of access(name, 0)
X
X-	star now only sets up signal handlers for existing signals to support MSC
X
X-	star fixed a typo in dumpdates.c that hit on WIN-DOS because flock() is 
X	not present
X
X-	star now checks HAVE_FSYNC to support MSC
X
X-	star::findinfo.c now checks whether stat.st_blksize exists
X
X-	star/dumpdates.c works around a problem with LOCK_EX/LOCK_EX/LOCK_UN
X	defined although the flock() call no longer exists.
X
X-	New (previously missing) man pages:
X	bsh/pfbsh.1 sh/bosh.1 sh/jsh.1 sh/pfsh.1 mt/mt.1 scgskeleton/scgskeleton.1 label/label.1
X	star/ustar.1 star_sym/star_sym.1 ved/ved-e.1 ved/ved-w.1
X
X-	star now supports automatic recognition of xz(1) compressed archives
X	and offers a new option -xz
X
X-	star offers new behavior:
X
X	A tar archive created with "star -c -dump -meta ..." does not include
X	the content for plain files but only the meta data. With "star -c -xmeta"
X	these files could be extracted as 0 by sized files in case that this would
X	not overwrite existing files. Star now supports "star -x -xmeta -fore-hole"
X	to extract these files as files of the original size but as sparse files
X	without any data inside. This is sufficient as a reference for wget -mirror.
X
X-	The man page star/spax.1 fixed a typo.
X
X-	star/header.c now uses a new structure "ndbuf" that defines 
X	a namelength of 101 instead of 100 in order to be able to access
X	the 101th element in the arrays without accessing an aray out of
X	bounds.
X
X-	Fixed a typo in star/buffer.c that caused star to dump core
X	on Linux with -c -mulvivol due to the unusual memory layout found
X	on Linux.
X
X-	The star -multivol buffer management now mallocs less memory.
X	Before it malloc()d the same size as the FIFO size, now it only
X	malloc()s 2 * bufsize
X
X-	star -c -find is now interruptable by ^C
X
X-	star -x -U -k now works as well as star -x -U -keep-old
X
X-	Some typo fixes in star.4 man page
X
X-	Star -sparse -force-hole now archives all files as sparse files in case
X	that they at least contain 512 block aligned bytes of nulls.
X	Thanks to markk@clara.co.uk
X
X-	star -find now removes leading "./" in filenames as star does in
X	other cases.
X
X-	star -r/-u now correctly depends on the old archive format type.
X
X-	Star adds a new option -lzip and automated support to recognize lzip
X	compressed archives.
X	Thanks to markk@clara.co.uk
X
X-	star now accepts a command like:
X
X	star -c -onull -find . -ls
X
X	as there is no archive output to stdout that could mix with the -ls
X	output
X
X-	Fixed a bug in libfind/walk.c (calling strcatl() with last parameter 0
X	instead of (char *)0)
X
X-	libfind bumped to version 1.5
X
X-	New file libfind/find_tok.h to separate the token names from the rest of the implementation.
X
X-	Moved token definitions from find.c to find_tok.h
X
X-	The primary -perm now implements a new feature:
X
X	-perm +mode will evaluate as true if any of the bits set in mode are set in the
X	permission bits fro a file.
X
X-	A bug with -exec introduced with using vfork() instead of fork() was fixed.
X	The replacement of the string "{}" now works correctly again even if the location
X	of the path in memory was changed during a realloc().
X
X-	New primary operators:
X		-amin			deprecated - only for GNU find compatibility
X		-cmin			deprecated - only for GNU find compatibility
X		-mmin			deprecated - only for GNU find compatibility
X		-empty			TRUE zero sized plain file or empty directory
X		-execdir program [argument ...] \\;
X		-fls file     		list files similar to 'ls -ilds' into 'file' (always TRUE)
X		-fprint file		print file names line separated into 'file' (always TRUE)
X		-fprint0 file		print file names nul separated into 'file' (always TRUE)
X		-fprintnnl file		print file names space separated into 'file' (always TRUE)
X		-ilname glob		TRUE if symlink name matches shell glob
X		-ilpat pattern		TRUE if symlink name matches pattern
X		-iname glob		TRUE if path component matches shell glob
X		-ipat pattern		TRUE if path component matches pattern
X		-ipath glob		TRUE if full path matches shell glob
X		-ippat pattern		TRUE if full path matches pattern
X		-okdir program [argument ...] \\;
X		-print0			print file names nul separated to stdout (always TRUE)
X		-executable		TRUE if file is executable by real user id of process
X		-readable		TRUE if file is readable by real user id of process
X		-writable		TRUE if file is writable by real user id of process
X
X
X-	libfind no longer exits the process in treewalk() in case that 
X	the path strings could not be allocated.
X
X-	libfind::walkclose() now free()s the internal data structures
X	in case of a user that does not call treewalk() (e.g.  star -x)
X
X-	The function defltcntl() in libdeflt is now working and allows to
X	select a case insensitive mode.
X
X-	New function defltsect() in libdeflt allows to create sub-sections
X	in configuration files. These subsections need to be named:
X	"[section-name]" and the '[' must be at the beginning of a line.
X
X
X-	Support for "pcc" on Solaris x86 was added as a first step.
X	The C-Compiler "pcc" http://pcc.ludd.ltu.se/ is based on the
X	Portable C-Comppiler from AT&T from the late 1970s. It is
X	under BSDl and thus offers compilation with a really free
X	build environment.
X
X	Note that due to a pcc bug, the autoconf results for
X	Large File support are incorrect. Unless you edit the file
X	incs/i386-sunos5-pcc/xconfig.h and manually correct the
X	file to contain this:
X
X#define _FILE_OFFSET_BITS 64    /* # of bits in off_t if settable          */ 
X
X	You will not get working large file support with pcc.
X
X	Support for more Operating system will follow after the issues
X	in the compiler have been resolved.
X
X-	conf/mkdep-aix.sh now calls "cc -M -qsyntaxonly" instead of
X	"cc -M -E" as the IBM C-preprocessor does not like
X	#pragma weak a = b
X	although the compiler supports it.
X
X-	Added support for DragonFly/x86_64
X
X-	New autoconf test for nanosecond time stamps on AIX.
X
X-	conf/mkdep-aix.sh was changed to avoid warnings for #pragma weak a = b
X	as the IBM C-compiler calls a non "#pragma weak" cpp when called with -E
X
X-	include/schily/stat.h now supports nonosecond timestamps in struct stat on AIX.
X
X-	include/schily/stat.h now supports struct stat.st_atime_n
X	for AIX nanosecond support.
X
X-	Trying to add support for 32 bit compilation on newer Mac OS X
X	version via smake CCOM=cc32
X	This only works if 32 Bit development support is installed on Mac OS X.
X
X-	Trying to add support for 32 bit compilation on newer Linux
X	version via smake CCOM=cc32
X	This only works if 32 Bit development support is installed on Linux.
X
X-	New autoconf test checks whether fnmatch() has a working FNM_IGNORECASE
X
X-	New autoconf tests for supporting stateful multibyte locales
X	mbsinit() mbrtowc() wcrtomb()
X
X-	New autoconf tests for wctype_t mbstate_t
X
X-	New autoconf tests for basename() dirname() strndup() wcsndup()
X
X-	include/schily/wchar.h enhanced to support mbrtowc() and wcrtomb()
X
X-	include/schily/regex.h added
X
X-	include/schily/libgen.h added
X
X-	New autoconf test for strlcat() wcslcat()  strnlen() wcsnlen()
X
X-	New autoconf test for strndup() wcsndup()
X
X-	libschily fnmatch() now supports FNM_IGNORECASE
X
X-	libschily fnmatch() now supports multibyte characters
X
X-	libschily: new files strlcat.c wcslcat.c  strnlen.c wcsnlen.c strndup.c wcsndup.c
X			basename.c dirname.c
X
X-	A new algorithm in libschily
X	strncat.c strncmp.c strncpy.c strnlen.c wcsncat.c wcsncmp.c wcsncpy.c wcsnlen.c
X	makes the code faster and smaller.
X
X-	Conf-files in /etc/default are now installed 0644
X
X-	Man pages are now by default installed in $(INS_BASE)/share/man
X	The base directory "share" may be changed by caling 
X
X		smake DEFMANBASE=something
X
X-	README.compile now mentions:
X
X	INS_RBASE=		Set different "root" install path
X	DEFMANBASE=		Set different man base directory
X	STRIPFLAGS=-s		Strip all binaries with "make install"
X	RUNPATH=		Overwrite ELF RUNPATH
X	DEFUMASK=		Set different default permissions for
X				creating directories
X	DEFINSUMASK=		Set different default permissions for
X				creating directories in the install path
X
X-	Man pages are now by default installed in $(INS_BASE)/share/man
X	The base directory "share" may be changed by caling 
X
X-	All Makefile.dfl now detect whether /etc/default/* already exists
X
X-	The macros XARCH_GEN & XARCH_OPT are now in RULES/cc-sunpro*.rul
X
X-	The include file include/schily/ccomdefs.h now allows to disable
X	the printf() format checks for GCC with -DNO_PRINTFLIKE
X	This is needed in order to allow star to compile in the Solaris ON
X	cosolidation as GCC id too dumb for the printf() extensions.
X
X-	libschily/?eterrno.c no longer overwrite the _TS_ERRNO definition
X	in order to pass the compile constrints in the Solaris ON consoliation.
X
X-	Several new global symbols in the mapfile for libschily/libschily-mapvers
X
X-	libschily/wcsndup.c had frgotten code and still did internaly implement
X	strndup()
X
X-	librmt.so now includes libsocked in the NEEDED ELF tag
X
X-	All include files (even those created by autoconf) are now protected
X	against multiple inclusion.
X
X-	New autoconf test for pathconf() and fpathconf()
X
X-	The linker map files are now processed via "cpp" (or $CC -E) and
X	the output is stored in $(ARCHDIR). This allows to have a single
X	linker map file source for all platforms.
X
X-	New autoconf test for a working cpp.
X
X-	New autoconf test for /dev/stdin, /dev/stdout, /dev/stderr,
X	/dev/fd/0, /dev/fd/1, /dev/fd2
X
X-	New autoconf tests for: qecvt() qfcvt() qgcvt()
X	_ldecvt() _ldfcvt() _ldgcvt() _ldecvt_r() _ldfcvt_r() _ldgcvt_r()
X	qeconvert() qfconvert() qgconvert()
X	needed for long double support.
X
X-	All linker map files have been modified to allow platform
X	dependent #ifdef's
X
X-	libschily now by default renames getline(), fgetline() and
X	fexec*() into js_getline(), js_fgetline() and js_fexec*().
X	This was needed because the POSIX standard commitee ignored
X	POSIX basic rules not to define functions that are in conflict
X	with existing published functions. The functions from linschily
X	have been in the public since more than 25 years and the 
X	functions defined by POSIX.1-2008 even violate POSIX naming rules.
X	The POSIX fexec*() functions would e.g. have to be correctly called
X	fdexec*().
X
X	Existing programs can keep the official names getline(), fgetline()
X	and fexec*() as they are by default #defined to the new js_*() names.
X	To disable this convenience, add:
X
X	#define NO_SCHILY_GETLINE	To disable schily getline(), fgetline()
X	#define	NO_SCHILY_FEXEC		To disable schily fexec*()
X	#define	NO_SCHILY_FSPAWN	To disable schily fspawn*()
X
X-	Libschily now has new "long double" support functions:
X	qftoes() and qftofs()
X
X-	Libschily now supports a locale dependend decimal point for printing
X	floating point numbers.
X
X-	Libschily now supports to print long double numbers using the
X	format() based portable printf() implementation. If this does not
X	work for your platform or if this does not work correctly for
X	your platform, please report. This was needed for out new "od" 
X	implementation.
X
X-	The option parsing implementation getargs()/getfiles() from
X	libschily now supports to combine single character boolean
X	flags even in case the option string mentions to call a callback
X	function if a valid option was found. This was needed for out new 
X	"od" implementation.
X
X-	filereopen() from libschily no longer calls open() internally
X	as long as there is no need to create or truncate the file.
X
X-	include/schily/wchar.h now includes a workyround for platforms
X	that do not have wcwidth().
X
X-	libschily's findinpath() now includes a new path parameter
X	to allow to use the function from bsh.
X
X-	fnmatch is now always available as js_fnmatch()
X
X-	New autoconf test for _qecvt() _qfcvt() _qgcvt()
X	and _qecvt_r() _qfcvt_r() _qgcvt_r() on AIX
X
X-	libschily/getexecpath.c new
X
X-	include/schily/nlsdefs.h now includes macros _(s) and __(s) to support
X	gettext() and xgettext(1)
X
X-	Disable Simple suffix rules and Sufffix rules in smake to speedup builds
X
X-	Added a comment in RULES/rules.rdi that this rule is no longer needed.
X	Use RULES/rules.dir in all cases.
X
X-	New configuration files in the Schily makefilesystem for:
X
X	-	*BSD on amd64
X
X	-	MacOS X on amd64
X
X	-	kfreebsd (Debian on a FreeBSD kernel)
X
X	-	Android
X
X-	The Schily makefilesystem now supports CC_COM for all platforms to
X	allow to overwrite the low level command for the C-compiler.
X
X-	The Schily makefilesystem now supports CC++_COM for all platforms to
X	allow to overwrite the low level command for the C++-compiler.
X
X-	Mingw now by default links against -lminwg32 instead of -lmgw32
X
X-	Mac OS X now by default links against -lgcc_s.1 instead of -lgcc
X
X-	Speed up the dependency generation for cl.exe by pooling some
X	sed commands in a single sed call
X
X-	Fixed a bug with the dependency generation for HP-UX
X
X-	The Schily makefilesystem restructuresd some dependencies to allow
X	to run a parallel make.
X
X-	Android is not POSIX (by not defining various functions as functions 
X	in libc as required by POSIX) because it tries to define many 
X	functions that are part of the standard as inline macros in
X	include files only. This breaks autoconf, so we needed to rewrite
X	some tests (e.g for getpagesize, tcgetpgrp, tcsetpgrp)
X
X-	The Schily autoconf system has been enhanced to support cross
X	compilation. Schily autoconf is based on GNU autoconf and
X	GNU autoconf does not support cross compilation because it needs
X	to run scripts on the target system for some of the tests.
X
X	The "configure" script that is delivered with the Schily makefile
X	system runs 718 tests and 68 of them need to be run on the target
X	system.
X
X	The Schily autoconf system now supports a method to run these 65
X	tests natively on a target system. You either need a machine with
X	remote login features or you need an emulator with a method to
X	copy files into the emulated system and to run binaries on the
X	emulated system as e.g. the Android emulator.
X
X	We currently deliver three scripts for "remote" execution of
X	programs on the target system:
X
X	runrmt_ssh		runs the commands remove via ssh
X	runrmt_rsh		runs the commands remove via rsh
X	runrmt_android		runs the commands remove via the debug bridge
X
X	If you need to remotely run programs on a system that is not
X	supported by one of there three scripts, you need to modify one
X	of them to match your needs.
X
X	To enable Cross Compilation use the following environment variables:
X
X	CONFIG_RMTCALL=		Set up to point to a script that does
X				the remote execution, e.g.:
X
X				CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh
X
X	CONFIG_RMTHOST=		Set up to point to your remote host, e.g.:
X
X				CONFIG_RMTHOST=hostname 
X				or
X				CONFIG_RMTHOST=user@hostname
X
X				use a dummy if you like to use something
X				like to the Android emulator.
X
X	CONFIG_RMTDEBUG=	Set to something non-null in order to 
X				let the remote execution script mark
X				remote comands. This will result in
X				configure messages like:
X
X				checking bits in minor device number... REMOTE 8
X
X	Note that smake includes automake features that automatically
X	retrieve system ID information. For this reason, you need to overwrite 
X	related macros from the command line if you like to do a
X	cross compilation.
X
X	Related make macros:
X
X	K_ARCH=			# (sun4v) Kernel ARCH filled from uname -m / arch -k
X	M_ARCH=			# (sun4)  Machine filled from arch
X	P_ARCH=			# (sparc) CPU ARCH filled from uname -p / mach
X	OSNAME=			# sunos, linux, ....
X	OSREL=			# 5.11
X	OSVERSION=		# snv_130
X	CCOM=			# generic compiler name (e.g. "gcc")
X	CC_COM=			# compiler to call (name + basic args)
X
X	ARCH=			overwrites M_ARCH and P_ARCH
X
X	It is usually suffucient to set ARCH and OSNAME.
X
X	In order to use a cross compiler environment instead of a native compiler,
X	set the make macro CC_COM to something different than "cc".
X
X	If you are on Linux and like to compile for Android, do the following:
X
X	1) 	set up CC acording to the instructions from the cross compiler
X		tool chain
X
X	2)	set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.:
X		setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android
X		setenv CONFIG_RMTHOST NONE
X
X	3)	call smake:
X
X		smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC"
X	
X
X-	Several programs no longer test for HAVE_DEV_* but for HAVE__DEV_*
X	as we did switch from hand written tests for /dev/tty, /dev/null 
X	and similar to  AC_CHECK_FILES(/dev/tty /dev/null /dev/zero)
X
X-	Support for Pyro (a Syllable clone) was added.
X	Thanks to Flemming H. Sørensen
X
X-	Better support for Win32 sockets when using cl.exe
X
X-	Avoid problems with the non-standard prototypes for link() unlink()
X	read() and write() from cl.exe
X
X-	Add support for semi-static (preconfigured) include files for Android:
X	include/schily/armv5tejl-linux-gcc/xconfig.h
X
X-	New include files include/schily/err_*.h are used to encapsulate
X	#error CPP statements that would otherwise always prevent compilation
X	with K&R compilers.
X
X-	Added a workaround for a llvm compiler bug that creates code with 
X	endless loops in some cases.
X
X-	Libschily is now linked against $(LIB_INTL) when a shared libschily
X	is created.
X
X-	Avoid warnings from cl.exe for libschily/gettimeofday.c
X
X
X-	The make program specific configuration files for the Schily Makefilesystem
X	RULES/mk-.id (for SunPro make), RULES/mk-smake.id RULES/mk-gmake.id
X	now include definitions for the macros:
X
X	SPACE		A single space character (' ')
X	NUMBER_SIGN	The ASCII number sing ('#')
X
X	Note that the POSIX standard otherwise requires the make program 
X	to be unable to have the '#' appear in non-comment sections of
X	Makefiles.
X
X-	Try to work around an imprudent change in the file windef.h from
X	Cygwin-1.7.17 (Autumn 2012) related to the type BOOL that makes 
X	windefs.h from the recent Cygwin no longer compatible to the 
X	original file from Microsoft. The fix is in include/schily/windows.h
X
X	Thanks to Alain Hoang, Thomas Plank and others for reporting and
X	help with getting a fix for the problem named above
X
X-	Better comment in libschily/comerr.c to help to understand exit() code
X	folding to 8 bits and how it may be avoided.
X
X
X/*--------------------------------------------------------------------------*/
X
X
XTODO: 
X
X	-	Complete the man page for spax
X
X	-	Implement multi volume continuation headers that work for
X		files > 8 GB where the last tar header
X		(a POSIX.1-2001 'x'-header) was split across volumes.
X		In this case, if only POSIX compliant TAR features are allowed,
X		the extracting TAR would not be able to correctly skip the
X		large file as it does not know the content of the POSIX.1-2001
X		'x'-header. For this reason, later star versions need to implement
X		a method to create multi volume continuation (skip) headers that
X		include the size of the split POSIX.1-2001 'x'-header and the
X		size of the following large file.
X
X		Note that even with this method we would need a new method
X		(different from the current bitmap) to deal with multi volume
X		continuation headers for split files in case the FIFO in star
X		may be larger than 8 GB.
X
X	-	Implement a autoconf extension to to deal with Linux with XFS
X		where not all ACL handling is inside -lacl ??? is this still true?
X
XRevision history (short)
X
X1982	First version on UNOS (extract only)
X1985	Port to UNIX (fully functional version)
X1985	Added pre Posix method of handling special files/devices
X1986	First experiments with fifo as external process.
X1993	Remote tape access
X1993	diff option
X1994	Fifo with shared memory integrated into star
X1994	Very long filenames and sparse files
X1994	Gnutar and Ustar(Posix.1-1988) handling added
X1994	Xstar format (extended Posix.1-1988) defined and introduced
X1995	Ported to many platforms
X1999	Support for Win32 (Cygwin)
X1999	base 256 support to overcome limitation with octal fields
X2001	Large file support
X2001	Support for POSIX.1-2001 extended headers
X2001	Support for ACLs in POSIX.1-2001 extended headers
X2002	Support for extended file flags in POSIX.1-2001 extended headers
X2002	Support for extended inode meta data and meta files
X2003	New program tartest allows to verify POSIX.1-1990 tar archive compliance
X2003	Error control added to allow to selectively ignore error contitions
X2003	ED like pattern based file name substitution with -s '/from/to/[gp]'
X2003	Efficient built in -copy mode
X2003	Basic support for incremental dumps (incremental restore not yet ready)
X2003	CPIO archive support
X2003	New command 'pax/spax' for POSIX.1 command line compatibility.
X2003	New command 'cpio/scpio' for SUSv2 command line compatibility.
X2003	New command 'suntar' for Solaris command line compatibility.
X2003	New command 'gnutar' for GNU tar command line compatibility.
X2003	Support for reliable multi-volume archives with media size detection
X2004	Options -copyhardlinks/-copysymlinks/-copydlinks allow to extract links on platforms that do not support links
X2005	Support for full and incremental dumps and restores.
X2005	Support for cumulative incremental dumps and restores.
X2005	The find(1) code has been integrated via libfind and allows to use find on archives
X2005	Changed license from GPL to CDDL
X2005	Added support for a reliable sparse file interface in Solaris using SEEK_HOLE/SEEK_DATA
X2005	Added support for reliable multi volume handling
X2006	Added support for sparse files that end in a hole
X2007	Added new option -install that allows to overwrite live program text (install on a running system)
X2007	Added new option -xmeta to extrace meta data only
X
X
XSupported platforms:
X
XVirtually any! Known to work:
X
XSunOS 4.x, Solaris (SunOS 5.x), Linux,
XHP-UX, DG/UX, IRIX, AIX, FreeBSD, NetBSD, OpenBSD,
XOSF-1, True-64, QNX, BeOS, Apollo Domain/OS, Next-STep, 
XOS/2, SCO-openserver, SCO-unixware, Caldera OpenUnix,
XCygwin (Win32), Sony NewsOS,  BSDi (BSD/OS), QNX,
XApple Rhapsody, MacOS X, AmigaOS, GNU Hurd
X
XJoerg
X
X-------------------------------------------------------------
XStar is the fastest known implementation of a tar archiver.
X
XStar development started 1982, the first complete implementation has 
Xbeen done in 1985. I never did my backups with other tools than star.
X
XIts main advantages over other tar implementations are:
X
X	fifo			- keeps the tape streaming.
X				  This gives you faster backups than
X				  you can achieve with ufsdump, if the
X				  size of the filesystem is > 1 GByte.
X
X	remote tape support	- a fast RMT implementation that has no
X				  probems to saturate a 100 Mb/s network.
X
X	accurate sparse files	- star is able to reproduce holes in sparse
X				  files accurately if the OS includes 
X				  the needed support functions. This is
X				  currently true for Solaris-2.3 to
X				  Solaris-2.5.1
X
X	pattern matcher		- for a convenient user interface
X				  (see manual page for more details).
X				  To archive/extract a subset of files.
X
X	sophisticated diff	- user tailorable interface for comparing
X				  tar archives against file trees
X				  This is one of the most interesting parts
X				  of the star implementation.
X
X	no namelen limitation	- Pathnames up to 1024 Bytes may be archived.
X				  (The same limitation applies to linknames)
X				  This limit may be expanded in future
X				  without changing the method to record
X				  long names.
X
X	deals with all 3 times	- stores/restores all 3 times of a file
X				  (even creation time)
X				  With POSIX.1-2001 the times are in nanosecond
X				  granularity.
X				  Star may reset access time after doing
X				  backup. On Solaris this can be done without
X				  changing the ctime.
X
X	does not clobber files	- more recent copies on disk will not be 
X				  clobbered from tape
X				  This may be the main advantage over other
X				  tar implementations. This allows
X				  automatically repairing of corruptions
X				  after a crash & fsck (Check for differences
X				  after doing this with the diff option).
X
X	automatic byte swap	- star automatically detects swapped archives
X				  and transparently reads them the right way
X
X	automatic format detect	- star automatically detects several common
X				  archive formats and adopts to them.
X				  Supported archive types are:
X				  Old tar, gnu tar, ansi tar, star,
X				  POSIX.1-2001 PAX, Sun's Solaris tar.
X
X
X	automatic compression detect - star automatically detects whether the
X				  archive is compressed. If it has been
X				  compressed with a compression program that
X				  is compatible to decompression with "gzip"
X				  or "bzip2", star automatically activates
X				  decompression.
X
X	fully ansi compatible	- Star is fully ANSI/Posix 1003.1 compatible.
X				  See README.otherbugs for a complete
X				  description of bugs found in other tar
X				  implementations. Star is the first tar
X				  implementation that supports POSIX.1-2001.
X
X	support for ACLs and file flags - star supports Access Control Lists
X				  and extended file flags (as found on FreeBSD
X				  and Linux). Support to archive and restore
X				  other file properties may be easily added.
X
X	support for all inode metadata - star supports to put all inode
X				  metadata on the archive. This allows future
X				  versions of star to perform true
X				  incremental dumps.
X
X	sophisticated error control - allows to tell star which error types
X				  should be ignored for wich file name pattern.
X				  This allows to write backup scripts that give
X				  no error messages for all problems that are
X				  tolerable (e.g. growing log files).
X
X	ED like filename substitution - star supports automated pattern rule based
X				  file name substitution as documented for 'pax'.
X
X	A fast built in -copy mode - allows to make fast and accurate copies and
X				  directory tree comparisons.
X
X	Integrated find(1) code - allows many interesting new features that would
X				  be possible with a separate find call.
X
XHave a look at the manual page, it is included in the distribution.
X
END-of-star-1.5.2/AN-1.5.2
exit