+++ /dev/null
-#! /bin/sh
-# This is a shell archive. Remove anything before this line, then unpack
-# it by saving it into a file and typing "sh file". To overwrite existing
-# files, type "sh file -c". You can also feed this as standard input via
-# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
-# will see the following message at the end:
-# "End of archive 1 (of 3)."
-# Contents: MANIFEST MANIFEST.shar Makefile.SH README config.win95
-# config_h.SH configure di.1 getopt.c hints hints/aix.sh
-# hints/beos.sh hints/dec_osf.sh hints/dynix.sh hints/dynixptx.sh
-# hints/freebsd.sh hints/hpux.sh hints/irix.sh hints/linux.sh
-# hints/openbsd.sh hints/solaris.sh hints/unicos.sh win95.mak
-# Wrapped by root@seer on Thu Feb 24 10:15:51 2000
-PATH=/bin:/usr/bin:/usr/ucb ; export PATH
-if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
-else
-echo shar: Extracting \"'MANIFEST'\" \(470 characters\)
-sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
-Xdi.1 manual page
-Xdi.c main program
-Xgetopt.c getopt() routine
-Xconfig.win95 config.h for win95
-XREADME Read this
-Xwin95.mak pre-built Makefile for win95
-XConfigure Portability tool
-Xconfigure GNU configure-like wrapper
-XMakefile.SH Produces Makefile
-Xconfig_h.SH Produces config.h
-END_OF_FILE
-if test 470 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
-fi
-# end of 'MANIFEST'
-fi
-if test -f 'MANIFEST.shar' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST.shar'\"
-else
-echo shar: Extracting \"'MANIFEST.shar'\" \(1076 characters\)
-sed "s/^X//" >'MANIFEST.shar' <<'END_OF_FILE'
-X File Name Archive # Description
-X-----------------------------------------------------------
-X Configure 3 Configuration script
-X MANIFEST 1 MANIFEST
-X MANIFEST.shar 1 This shipping list
-X Makefile.SH 1 Produces Makefile
-X README 1 Read This
-X config.win95 1 config.h for win95
-X config_h.SH 1 Produces config.h
-X configure 1 gnu-like front-end for Configure
-X di.1 1 di Manual Page
-X di.c 2 di source
-X getopt.c 1 getopt source (from Cnews)
-X hints 1
-X hints/aix.sh 1
-X hints/beos.sh 1
-X hints/dec_osf.sh 1
-X hints/dynix.sh 1
-X hints/dynixptx.sh 1
-X hints/freebsd.sh 1
-X hints/hpux.sh 1
-X hints/irix.sh 1
-X hints/linux.sh 1
-X hints/openbsd.sh 1
-X hints/solaris.sh 1
-X hints/unicos.sh 1
-X win95.mak 1 window95 makefile
-END_OF_FILE
-if test 1076 -ne `wc -c <'MANIFEST.shar'`; then
- echo shar: \"'MANIFEST.shar'\" unpacked with wrong size!
-fi
-# end of 'MANIFEST.shar'
-fi
-if test -f 'Makefile.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.SH'\"
-else
-echo shar: Extracting \"'Makefile.SH'\" \(5386 characters\)
-sed "s/^X//" >'Makefile.SH' <<'END_OF_FILE'
-Xcase $CONFIG in
-X'')
-X if test -f config.sh; then TOP=.;
-X elif test -f ../config.sh; then TOP=..;
-X elif test -f ../../config.sh; then TOP=../..;
-X elif test -f ../../../config.sh; then TOP=../../..;
-X elif test -f ../../../../config.sh; then TOP=../../../..;
-X else
-X echo "Can't find config.sh."; exit 1
-X fi
-X . $TOP/config.sh
-X ;;
-Xesac
-X: This forces SH files to create target in same directory as SH file.
-X: This is so that make depend always knows where to find SH derivatives.
-Xcase "$0" in
-X*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-Xesac
-Xecho "Extracting Makefile (with variable substitutions)"
-X$spitshell >Makefile <<!GROK!THIS!
-X#
-X# di makefile
-X#
-X# Copyright 1995-1999 Brad Lanam
-X#
-X# $Id$
-X# $Source$
-X# @(#)Makefile 1.25
-X#
-X#
-X
-XSHELL = $sh
-XCC = $cc
-XLD = $ld
-X$make_set_make
-XOBJ_EXT = $_o
-XEXE_EXT = $_exe
-X
-X#
-X# additional flags/libraries
-X#
-XCFLAGS = -DPROG=\\"\$(PROG)\\" -DMPROG=\\"\$(MPROG)\\" $ccflags $optimize
-XLDFLAGS = $ldflags
-XLIBS = $libs
-X
-X#
-X# installation options
-X#
-XPREFIX = $prefix
-XINSTDIR = \$(PREFIX)/bin
-XPROG = $di_prog
-XMPROG = mi
-XTARGET = \$(INSTDIR)/\$(PROG)
-XMTARGET = \$(INSTDIR)/\$(MPROG)
-X
-X# if you need permissions other than the default,
-X# edit these, and do a "make installperm".
-XUSER = root
-XGROUP = bin
-X#INSTPERM = 111 # change USER to bin also...
-XINSTPERM = 4111 # install suid if your system has a mount table only root
-X# can read. For SysV.4 and Solaris, the mount command may
-X# reset the permissions of /etc/mnttab.
-X
-X#
-X# simple man page installation
-X#
-XMANDIR = $mansrcexp
-XMANTARGET = "\$(PROG).$manext"
-XMANPERM = 644
-X
-X#
-X# common programs
-X#
-XLN = $ln
-XRM = $rm
-XCP = $cp
-XMV = $mv
-XTEST = $test
-XCHOWN = $chown
-XCHGRP = $chgrp
-XCHMOD = $chmod
-XTOUCH = $touch
-X
-X###
-X
-XOTHEROBJ = $di_otherobj
-X
-X###
-X
-Xall: \$(PROG)\$(EXE_EXT)
-X
-X# This was tested using vc++ 5.0.
-Xwindows:
-X \$(MAKE) CC=cl LD=cl EXE_EXT=".exe" OBJ_EXT=".obj" \\
-X CFLAGS="\$(CFLAGS) -nologo -O2 \\
-X OTHEROBJ="getopt.obj" \\
-X -DI_STDLIB -DI_SYS_TYPES -DI_TIME -DI_WINDOWS \\
-X -DI_GETDISKFREESPACE \\
-X -DDEFAULT_FORMAT=\\\\\\"sMbuvpT\\\\\\"" \\
-X LDFLAGS="-nologo -O2" \$(PROG).exe
-X
-X# This was tested using Cygnus gcc b19
-Xwindows-gcc:
-X \$(MAKE) CC=gcc LD=gcc EXE_EXT=".exe" OBJ_EXT=".o" \\
-X CFLAGS="\$(CFLAGS) -g -O2 \\
-X OTHEROBJ="getopt.o" \\
-X -DI_STDLIB -DI_SYS_TYPES -DI_TIME -DI_WINDOWS \\
-X -DI_GETDISKFREESPACE \\
-X -DDEFAULT_FORMAT=\\\\\\"sMbuvpT\\\\\\"" \\
-X LDFLAGS="-g -O2" \$(PROG).exe
-X
-X####################
-X
-Xall: \$(PROG)\$(EXE_EXT)
-X -\$(LN) -f \$(PROG)\$(EXE_EXT) \$(MPROG)\$(EXE_EXT)
-X
-Xclean:
-X -\$(RM) -rf \$(PROG)\$(EXE_EXT) \$(MPROG)\$(EXE_EXT) *.o *.obj \\
-X UU >/dev/null 2>&1
-X
-Xdistclean:
-X -\$(RM) -rf config.h config.sh Makefile \$(PROG)\$(EXE_EXT) \\
-X \$(MPROG)\$(EXE_EXT) di\$(EXE_EXT) diskinfo\$(EXE_EXT) \\
-X *.o *.obj UU Wanted Obsolete >/dev/null 2>&1
-X
-Xrealclean:
-X \$(MAKE) distclean
-X
-Xinstall: install-prog install-man
-X
-Xinstall-prog:
-X -\$(TEST) -f \$(TARGET) && \$(MV) -f \$(TARGET) \$(TARGET).old
-X \$(CP) -f \$(PROG) \$(TARGET)
-X -\$(LN) -f \$(TARGET) \$(MTARGET)
-X
-Xinstallperms:
-X \$(CHOWN) \$(USER) \$(TARGET)
-X \$(CHGRP) \$(GROUP) \$(TARGET)
-X \$(CHMOD) \$(INSTPERM) \$(TARGET)
-X
-Xinstall-man:
-X \$(CP) -f di.1 \$(MANDIR)/\$(MANTARGET)
-X \$(CHMOD) \$(MANPERM) \$(MANDIR)/\$(MANTARGET)
-X
-X###
-X
-Xtar: MANIFEST README di.1 di.c getopt.c Makefile.SH configure \\
-X Configure config_h.SH hints \\
-X config.win95 win95.mak
-X \$(CP) hints.base/*.sh hints
-X \$(SHELL) mktar.sh \$?
-X
-Xshar: di.shar
-X
-XMANIFEST.shar:
-X echo "" > MANIFEST.shar
-X echo "" >> MANIFEST.shar
-X echo "README 1 Read This" >> MANIFEST.shar
-X echo "MANIFEST 1 MANIFEST" >> MANIFEST.shar
-X echo "di.1 1 di Manual Page" >> MANIFEST.shar
-X echo "di.c 1 di source" >> MANIFEST.shar
-X echo "getopt.c 1 getopt source (from Cnews)" >> MANIFEST.shar
-X echo "Configure 1 Configuration script" >> MANIFEST.shar
-X echo "configure 1 gnu-like front-end for Configure" >> MANIFEST.shar
-X echo "config_h.SH 1 Produces config.h" >> MANIFEST.shar
-X echo "config.win95 1 config.h for win95" >> MANIFEST.shar
-X echo "Makefile.SH 1 Produces Makefile" >> MANIFEST.shar
-X echo "win95.mak 1 window95 makefile" >> MANIFEST.shar
-X echo "hints 1" >> MANIFEST.shar
-X echo "hints/aix.sh 1" >> MANIFEST.shar
-X echo "hints/beos.sh 1" >> MANIFEST.shar
-X echo "hints/dec_osf.sh 1" >> MANIFEST.shar
-X echo "hints/freebsd.sh 1" >> MANIFEST.shar
-X echo "hints/hpux.sh 1" >> MANIFEST.shar
-X echo "hints/linux.sh 1" >> MANIFEST.shar
-X echo "hints/dynix.sh 1" >> MANIFEST.shar
-X echo "hints/dynixptx.sh 1" >> MANIFEST.shar
-X echo "hints/irix.sh 1" >> MANIFEST.shar
-X echo "hints/openbsd.sh 1" >> MANIFEST.shar
-X echo "hints/solaris.sh 1" >> MANIFEST.shar
-X echo "hints/unicos.sh 1" >> MANIFEST.shar
-X
-Xdi.shar: Configure configure config.win95 \\
-X config_h.SH di.1 di.c getopt.c Makefile.SH \\
-X README win95.mak MANIFEST hints
-X \$(CP) hints.base/*.sh hints
-X -\$(RM) -f di.shar Part??
-X \$(MAKE) MANIFEST.shar
-X makekit -i MANIFEST.shar -o MANIFEST.shar -s120k
-X -@\$(RM) -f *.BAK MANIFEST.shar > /dev/null 2>&1
-X \$(SHELL) setname.sh
-X \$(TOUCH) di.shar
-X
-X###
-X
-X\$(PROG)\$(EXE_EXT): di\$(OBJ_EXT) \$(OTHEROBJ)
-X \$(CC) \$(CFLAGS) \$(LDFLAGS) -o \$(PROG)\$(EXE_EXT) di\$(OBJ_EXT) \\
-X \$(OTHEROBJ) \$(LIBS)
-X
-X###
-X
-Xdi\$(OBJ_EXT): di.c config.h
-X \$(CC) -c \$(CFLAGS) di.c
-X
-Xgetopt\$(OBJ_EXT): getopt.c
-X \$(CC) -c \$(CFLAGS) getopt.c
-X
-X
-X!GROK!THIS!
-X
-Xchmod 755 Makefile
-X$eunicefix Makefile
-END_OF_FILE
-if test 5386 -ne `wc -c <'Makefile.SH'`; then
- echo shar: \"'Makefile.SH'\" unpacked with wrong size!
-fi
-chmod +x 'Makefile.SH'
-# end of 'Makefile.SH'
-fi
-if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
-else
-echo shar: Extracting \"'README'\" \(9353 characters\)
-sed "s/^X//" >'README' <<'END_OF_FILE'
-Xdi - disk information utility (version 2.3).
-X
-XDESCRIPTION
-X
-X 'di' is a disk information utility, displaying everything
-X (and more) that your 'df' command does. It features the
-X ability to display your disk usage in whatever format you
-X desire/prefer/are used to. It is designed to be portable
-X across many platforms.
-X
-XINSTALLATION
-X
-X The installation process has been completely revamped
-X beginning with version 2.0. di now uses dist 3.0PL70 to
-X do its configuration.
-X
-X First, run Configure:
-X
-X ./Configure -d -s -e # non-interactive
-X ./Configure -d -s -e -Dcc=gcc # non-interactive, and you want to use gcc
-X ./Configure # interactive
-X
-X Then, do your make:
-X
-X make
-X
-X And install:
-X
-X AIX versions prior to 4.3 had a 'di' command. di is installed
-X as 'diskinfo' instead for these AIX versions.
-X
-X make install
-X
-X Some systems (Sys V variants) only allow root to read the
-X mount table. If this is the case, change the INSTPERM macro
-X in the Makefile should be set to 4111, and the USER macro to root.
-X In SysV.4 and Solaris, the mount command would reset the
-X permissions to be root readable only (fixed in Solaris 7).
-X
-X If this is needed on your system, do:
-X
-X make installperm
-X
-X To install the manual pages:
-X
-X make install.man
-X
-X Windows installation:
-X
-X Cygnus gcc: make -f win95.mak windows-gcc
-X MS VC++: nmake -f win95.mak windows
-X
-XPORTING
-X
-X di 2.3 has been tested on the following platforms:
-X AIX 4.3.2
-X BSD/OS 4.0.1 (gcc 2.7.2.1)
-X FreeBSD 2.1.5 (gcc 2.6.3), 2.2.6 (gcc 2.7.2.1), 2.2.7 (gcc 2.7.2.1),
-X 3.3 (gcc 2.7.2.3), 3.3 (gcc 2.8.1)
-X Solaris 7 (cc 5.0, gcc 2.8.1)
-X Solaris 8 (cc 5.0, gcc 2.8.1)
-X BeOS 4.5.2 intel (g++ 2.9-beos-980929)
-X Linux 2.0.35 (gcc 2.7.2.3), 2.2.12 (gcc 2.91.66)
-X Windows NTsp5 (vc 6.0)
-X
-X di 2.2 has been tested on the following platforms:
-X
-X BSD/OS 4.0.1 (gcc 2.7.2.1)
-X FreeBSD 2.1.5 (gcc 2.6.3), 2.2.6 (gcc 2.7.2.1), 2.2.7 (gcc 2.7.2.1),
-X 3.2 (gcc 2.95.1), 3.3 (gcc 2.7.2.3), 3.3 (gcc 2.8.1)
-X Linux 2.0.35 (gcc 2.7.2.3)
-X Linux 2.0.36 (gcc 2.7.2.3)
-X Solaris 7 (SC3.0.1), 7 (gcc 2.95.1)
-X Compaq Tru64 (Digital Unix, OSF/1) 4.0D, 4.0F
-X
-X di 2.0 has been tested on the following platforms:
-X
-X AIX 4.1.4.0, 4.3.0.0, 4.3.1.0 (egcs-1.1.1.1)
-X BSD/OS 2.1 (gcc 1.42)
-X IRIX 6.2, 6.5
-X NetBSD 1.3.3
-X HP/UX B.10.20
-X UNICOS 10.0.0.3
-X Windows95 (cygnus gcc B19)
-X
-X di has been ported to the following systems in the past:
-X
-X A/UX, AIX, BSDI 1.x & 2.x, Convex, Cray UNICOS 9 & 10,
-X Cray UNICOS/mk, FreeBSD 1.x and 2.x, HP/UX, Linux,
-X NetBSD 1.x, Next 3.x, OSF/1, Pyramid, SCO 3.2.2 & 3.2.4,
-X Sequent Dynix and PT/x, SGI Irix, Solaris, SunOS, Sys V.3,
-X Sys V.4, Ultrix, Windows, Xenix
-X
-X Due to the revamped configuration process, some of these systems
-X may not be properly configured as I don't have access to all of the
-X platforms to test on.
-X
-XBUGS
-X
-X Solaris 2.6 has a bug in the kernel and reports the reserved
-X space incorrectly. There is a kernel patch available (105572-05?).
-X
-X Send bug reports along with the output from 'di -A -x 2' and the
-X output from your standard df command (as verbose as possible) to:
-X
-X bll@gentoo.com
-X
-X If the Configure script doesn't set up the 'config.h' file
-X correctly, please let me know. E-mail me the incorrect (and
-X corrected if possible) config.h file, and any other information
-X as appropriate. The goal is to be able to run Configure in
-X non-interactive mode for any system.
-X
-XCHANGES
-X
-X 2.3
-X Modified hints for solaris to do 64 bit compilation.
-X Removed extra libc setting for linux.
-X Added support for BeOS. This required ansi function headers.
-X 2.2
-X Hints for dec_osf added.
-X Changed HAS_GETMNTINFOFSIZE to be preferred over
-X HAS_GETMNTINFOBSIZE; modified bsdos hints appropriately.
-X Look for <sys/fs_types.h> include file.
-X 2.1
-X Added +DAportable for HP-UX.
-X Hints for openbsd added.
-X Made installperm as separate target in makefile.
-X Modified duplicate checking slightly.
-X Changed MNT_NOWAIT to MNT_WAIT. This will work better
-X on FreeBSD. Hopefully will work w/nfs mounts.
-X 2.0
-X Now uses dist 3.0PL70 for configuration.
-X Duplicate filesystems (automounted) are not displayed.
-X This probably does not work for Digital's advfs.
-X 1.24
-X Added Windows w/gcc.
-X The Solaris 2.6 statvfs() bug has a patch out for it.
-X Patch #105572-05 (?).
-X 1.23
-X Improved Windows.
-X 1.22
-X Added Windows. Don't know the routines to get the number
-X of file slots or the file system type (FAT12/16/32).
-X Changed default to display megabytes.
-X 1.21
-X Fixed AIX typo.
-X Linux 2.x
-X 1.20
-X Added Solaris large file system support. Note that
-X ver 2.6 Beta_Update has a bug in the statvfs() routine,
-X and the non-root available disk space is improperly
-X reported.
-X 1.19
-X Added mount time, mount options. Link di to the mi command.
-X 1.18
-X Fixed some ignore/include list problems. Fixed local mount
-X flag for OSF/1.
-X 1.17
-X Changed block values from unsigned long to doubles so that we
-X can display using different block sizes (-d flag).
-X Added -l flag for local filesystems only.
-X 1.16
-X Added A/UX [ blemoine@atheist.tamu.edu (Brett G. Lemoine) ]
-X Added convex [ "Schilperoort J.W." <J.W.Schilperoort@research.ptt.nl> ]
-X 1.15
-X Fixed bsdi 1.x and bsdi 2.x. Fragments weren't supported.
-X Fixed FreeBSD 1.x and 2.x; same problem.
-X Changed sco_sl makefile entry.
-X 1.14
-X Fixed problem with display widths in conjunction with
-X ignore/include lists.
-X 1.13
-X changed default length of filesystem type field to 7.
-X new debug 'all' format.
-X check for 0 fragment size; replace w/block size if we have it.
-X 1.12
-X sco nfs 'nothing' fix.
-X freebsd 2.x; better freebsd filesystem types.
-X 1.11
-X bsdi
-X 1.10
-X added freebsd.
-X 1.9
-X makefile fixes.
-X 1.8
-X removed mount option junk.
-X added AIX.
-X 1.7
-X cleaned up sgi in the makefile.
-X changed linux to be w/o need_statfs_defs.
-X solaris cdrom returning all sorts of negative values.
-X T format option.
-X mount options.
-X sunOs filesystem type info.
-X 1.6
-X ultrix bug fixes.
-X add dynix to makefile.
-X 1.5
-X sun had f_bfree instead of f_bavail!
-X xenix, linux, sco
-X -w, -W, -B.
-X fixed width for -f M, -f S.
-X usage.
-X Allow other characters in format string.
-X 1.51 (local, pat@rwing)
-X SunOS *does* support filesystem type info. Its all in the
-X mntent structure, but requires a small bit of work (see source).
-X 1.4
-X -f B
-X bcopy.
-X solaris cdrom reports -2 for free blocks.
-X 1.3
-X Command line specification of filenames.
-X sort output.
-X osf/1, ultrix.
-X -F, -f M, -F S.
-X 1.2
-X # of inodes can be -1L
-X return code for getDiskInfo shouldn't be checked.
-X name of mount point must be maxpathlen.
-X error conditions.
-X pyramid.
-X 1.1
-X initial release
-X
-XACKNOWLEDGEMENTS
-X
-X And for their comments and/or source and/or
-X manual pages and/or bug fixes, thanks!
-X
-X jjb@jagware.bcc.com (J.J.Bailey)
-X vogelke@c-17igp.wpafb.af.mil (Contr Karl Vogel)
-X [pyramid]
-X costales@ICSI.Berkeley.EDU (Bryan Costales)
-X Mark Neale <mark@edscom.demon.co.uk>
-X Pat Myrto <pat@rwing.uucp>
-X [sunOS filesystem type stuff]
-X henrikar@utctu1.ct.utwente.nl (Henri Karrenbeld)
-X [sgi]
-X Peter Bray <Peter.Bray@serg.cse.unsw.edu.au>
-X gsipe@pyramid.com (George M. Sipe)
-X [manual page]
-X Jeffrey Mogul <mogul@pa.dec.com>
-X [ultrix, osf/1, manual page, new format options]
-X thomas@idx.kodak.com (Th. Bullinger)
-X [help usage]
-X Seth Theriault <seth@connact.com>
-X [next, tru64]
-X steve@nshore.org (Stephen J. Walick)
-X [SCO]
-X Gerald Rinske <gerald@D012F291.mch.sni.de>
-X [sgi]
-X Mike Grupenhoff <kashmir@snare.dorm.umd.edu>
-X [linux]
-X R.K.Lloyd@csc.liv.ac.uk
-X [hpux]
-X "William Gibbs" <bill@wgc386.MV.COM>
-X [xenix]
-X Randy Thompson <randyt@sequent.com>
-X [sequent]
-X eriko@risc.austin.ibm.com (O'Shaughnessy Erik)
-X [aix]
-X Bill Davidsen <davidsen@tmr.com>
-X [linux, SCO, etc., new format options]
-X fredex@fcshome.stoneham.ma.us (fred smith)
-X [coherent 4.2.05]
-X bag@clipper.cs.kiev.ua (Andrey Blochintsev)
-X [bsdi]
-X ginsbach@spacestar.net (Brian Ginsbach)
-X [netbsd, irix, unicos]
-X
-X et. al.
-X
-XCOPYRIGHT
-X
-X Copyright 1995-1999 Brad Lanam, Walnut Creek, CA, USA
-X bll@gentoo.com
-X http://secure.gentoo.com/di/
-X http://secure.gentoo.com/di/di-2.2.tar.gz
-END_OF_FILE
-if test 9353 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
-fi
-# end of 'README'
-fi
-if test -f 'config.win95' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config.win95'\"
-else
-echo shar: Extracting \"'config.win95'\" \(383 characters\)
-sed "s/^X//" >'config.win95' <<'END_OF_FILE'
-X/* config.h for win95 */
-X/* $Id$ */
-X
-X#ifndef _config_h_
-X#define _config_h_
-X
-X#define _(args) args
-X
-X#define I_MALLOC
-X#define I_MEMORY
-X#define I_STDLIB
-X#define I_STRING
-X#define I_SYS_TYPES
-X#define I_SYS_STAT
-X#define I_TIME
-X#define I_WINDOWS
-X
-X#define HAS_GETDISKFREESPACE
-X#define HAS_MEMCPY
-X#define HAS_MEMSET
-X
-X#endif /* _config_h_ */
-END_OF_FILE
-if test 383 -ne `wc -c <'config.win95'`; then
- echo shar: \"'config.win95'\" unpacked with wrong size!
-fi
-# end of 'config.win95'
-fi
-if test -f 'config_h.SH' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config_h.SH'\"
-else
-echo shar: Extracting \"'config_h.SH'\" \(10815 characters\)
-sed "s/^X//" >'config_h.SH' <<'END_OF_FILE'
-Xcase $CONFIG in
-X'')
-X if test -f config.sh; then TOP=.;
-X elif test -f ../config.sh; then TOP=..;
-X elif test -f ../../config.sh; then TOP=../..;
-X elif test -f ../../../config.sh; then TOP=../../..;
-X elif test -f ../../../../config.sh; then TOP=../../../..;
-X else
-X echo "Can't find config.sh."; exit 1
-X fi
-X . $TOP/config.sh
-X ;;
-Xesac
-Xcase "$0" in
-X*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-Xesac
-Xecho "Extracting config.h (with variable substitutions)"
-Xsed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
-X/*
-X * This file was produced by running the config_h.SH script, which
-X * gets its values from config.sh, which is generally produced by
-X * running Configure.
-X *
-X * Feel free to modify any of this as the need arises. Note, however,
-X * that running config_h.SH again will wipe out any changes you've made.
-X * For a more permanent change edit config.sh and rerun config_h.SH.
-X *
-X * \$Id$
-X */
-X
-X/*
-X * Package name : $package
-X * Source directory : $src
-X * Configuration time: $cf_time
-X * Configured by : $cf_by
-X * Target system : $myuname
-X */
-X
-X#ifndef _config_h_
-X#define _config_h_
-X
-X/* HAS_BCOPY:
-X * This symbol is defined if the bcopy() routine is available to
-X * copy blocks of memory.
-X */
-X#$d_bcopy HAS_BCOPY /**/
-X
-X/* HAS_BZERO:
-X * This symbol is defined if the bzero() routine is available to
-X * set a memory block to 0.
-X */
-X#$d_bzero HAS_BZERO /**/
-X
-X/* HAS_MEMCPY:
-X * This symbol, if defined, indicates that the memcpy routine is available
-X * to copy blocks of memory.
-X */
-X#$d_memcpy HAS_MEMCPY /**/
-X
-X/* HAS_MEMSET:
-X * This symbol, if defined, indicates that the memset routine is available
-X * to set blocks of memory.
-X */
-X#$d_memset HAS_MEMSET /**/
-X
-X/* I_LIMITS:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <limits.h> to get definition of symbols like WORD_BIT or
-X * LONG_MAX, i.e. machine dependant limitations.
-X */
-X#$i_limits I_LIMITS /**/
-X
-X/* I_MALLOC:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <malloc.h>.
-X */
-X#$i_malloc I_MALLOC /**/
-X
-X/* I_MEMORY:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <memory.h>.
-X */
-X#$i_memory I_MEMORY /**/
-X
-X/* I_STDLIB:
-X * This symbol, if defined, indicates that <stdlib.h> exists and should
-X * be included.
-X */
-X#$i_stdlib I_STDLIB /**/
-X
-X/* I_STRING:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <string.h> (USG systems) instead of <strings.h> (BSD systems).
-X */
-X#$i_string I_STRING /**/
-X
-X/* I_SYS_PARAM:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/param.h>.
-X */
-X#$i_sysparam I_SYS_PARAM /**/
-X
-X/* I_SYS_STAT:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/stat.h>.
-X */
-X#$i_sysstat I_SYS_STAT /**/
-X
-X/* I_SYS_TYPES:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/types.h>.
-X */
-X#$i_systypes I_SYS_TYPES /**/
-X
-X/* I_TIME:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <time.h>.
-X */
-X/* I_SYS_TIME:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/time.h>.
-X */
-X#$i_time I_TIME /**/
-X#$i_systime I_SYS_TIME /**/
-X
-X/* I_UNISTD:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <unistd.h>.
-X */
-X#$i_unistd I_UNISTD /**/
-X
-X/* CAN_PROTOTYPE:
-X * If defined, this macro indicates that the C compiler can handle
-X * function prototypes.
-X */
-X/* _:
-X * This macro is used to declare function parameters for folks who want
-X * to make declarations with prototypes using a different style than
-X * the above macros. Use double parentheses. For example:
-X *
-X * int main _((int argc, char *argv[]));
-X */
-X#$prototype CAN_PROTOTYPE /**/
-X#ifdef CAN_PROTOTYPE
-X#define _(args) args
-X#else
-X#define _(args) ()
-X#endif
-X
-X/* VOIDFLAGS:
-X * This symbol indicates how much support of the void type is given by this
-X * compiler. What various bits mean:
-X *
-X * 1 = supports declaration of void
-X * 2 = supports arrays of pointers to functions returning void
-X * 4 = supports comparisons between pointers to void functions and
-X * addresses of void functions
-X * 8 = suports declaration of generic void pointers
-X *
-X * The package designer should define VOIDUSED to indicate the requirements
-X * of the package. This can be done either by #defining VOIDUSED before
-X * including config.h, or by defining defvoidused in Myinit.U. If the
-X * latter approach is taken, only those flags will be tested. If the
-X * level of void support necessary is not present, defines void to int.
-X */
-X#ifndef VOIDUSED
-X#define VOIDUSED $defvoidused
-X#endif
-X#define VOIDFLAGS $voidflags
-X#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-X#define void int /* is void to be avoided? */
-X#define M_VOID /* Xenix strikes again */
-X#endif
-X
-X/* HAS_64BIT_STATFS_FLDS:
-X * This symbol is defined if 64 bit statfs fields are used.
-X */
-X#$d_64bit_statfs_flds HAS_64BIT_STATFS_FLDS /**/
-X
-X/* HAS_ENDMNTENT:
-X * This symbol is defined if the endmntent() routine is available.
-X */
-X#$d_endmntent HAS_ENDMNTENT /**/
-X
-X/* HAS_FS_INFO:
-X * This symbol is defined if the fs_info() routine is available.
-X */
-X#$d_fs_info HAS_FS_INFO /**/
-X
-X/* HAS_GETMNT:
-X * This symbol is defined if the getmnt() routine is available.
-X */
-X#$d_getmnt HAS_GETMNT /**/
-X
-X/* HAS_GETMNTENT:
-X * This symbol is defined if the getmntent() routine is available.
-X */
-X#$d_getmntent HAS_GETMNTENT /**/
-X
-X/* HAS_GETMNTINFO:
-X * This symbol is defined if the getmntinfo() routine is available.
-X */
-X#$d_getmntinfo HAS_GETMNTINFO /**/
-X
-X/* HAS_OPTIND:
-X * This symbol, if defined, indicates that the optind external
-X * variable is defined.
-X */
-X#$d_optind HAS_OPTIND /**/
-X#if ! defined (HAS_OPTIND)
-X extern int optind;
-X extern char *optarg;
-X#endif
-X
-X/* HAS_MNTCTL:
-X * This symbol is defined if the mntctl() routine is available.
-X */
-X#$d_mntctl HAS_MNTCTL /**/
-X
-X/* HAS_MNT_TIME:
-X * This symbol is defined if the mnt_time or vmt_time is available
-X * in the mount table.
-X */
-X#$d_mnttime HAS_MNT_TIME /**/
-X
-X/* HAS_SETMNTENT:
-X * This symbol is defined if the setmntent() routine is available.
-X */
-X/* HAS_SETMNTENT_ONE_ARG:
-X * This symbol is defined if the setmntent() has one argument.
-X */
-X#$d_setmntent HAS_SETMNTENT /**/
-X#$d_setmntent_one_arg HAS_SETMNTENT_ONE_ARG /**/
-X
-X/* HAS_STATFS_BSD:
-X * This symbol is defined if statfs() uses the bsd API.
-X */
-X/* HAS_STATFS_SYSV3:
-X * This symbol is defined if statfs() uses the System V.3 API.
-X */
-X/* Ubsize:
-X * This symbol may be set if statfs() uses the System V.3 API.
-X * It should be set to the appropriate system definition
-X * if the block size is not UBSIZE.
-X */
-X#$d_statfsbsd HAS_STATFS_BSD /**/
-X#$d_statfssysv3 HAS_STATFS_SYSV3 /**/
-X#define Ubsize $ubsize /**/
-X
-X/* HAS_STATVFS:
-X * This symbol is defined if the statvfs() routine is available.
-X */
-X#$d_statvfs HAS_STATVFS /**/
-X
-X/* HAS_SYSFS:
-X * This symbol is defined if the sysfs() routine is available.
-X */
-X#$d_sysfs HAS_SYSFS /**/
-X
-X/* I_FSHELP:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <fshelp.h>.
-X */
-X#$i_fshelp I_FSHELP /**/
-X
-X/* I_KERNFSINFO:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <kernel/fs_info.h>.
-X */
-X#$i_kernfsinfo I_KERNFSINFO /**/
-X
-X/* I_MNTENT:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <mntent.h>.
-X */
-X#$i_mntent I_MNTENT /**/
-X
-X/* I_MNTTAB:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <mnttab.h>.
-X */
-X#$i_mnttab I_MNTTAB /**/
-X
-X/* I_STOR_DIRECTORY:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <storage/Directory.h>.
-X */
-X#$i_stor_directory I_STOR_DIRECTORY /**/
-X
-X/* I_STOR_ENTRY:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <storage/Entry.h>.
-X */
-X#$i_stor_entry I_STOR_ENTRY /**/
-X
-X/* I_STOR_PATH:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <storage/Path.h>.
-X */
-X#$i_stor_path I_STOR_PATH /**/
-X
-X/* I_SYS_FSTYP:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/fstyp.h>.
-X */
-X#$i_sysfstyp I_SYS_FSTYP /**/
-X
-X/* I_SYS_FSTYPES:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/fstypes.h>.
-X */
-X/* I_SYS_FS_TYPES:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/fs_types.h>.
-X */
-X#$i_sysfstypes I_SYS_FSTYPES /**/
-X#$i_sysfs_types I_SYS_FS_TYPES /**/
-X
-X/* I_SYS_MNTCTL:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/mntctl.h>.
-X */
-X#$i_sysmntctl I_SYS_MNTCTL /**/
-X
-X/* I_SYS_MNTENT:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/mntent.h>.
-X */
-X#$i_sysmntent I_SYS_MNTENT /**/
-X
-X/* I_SYS_MNTTAB:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/mnttab.h>.
-X */
-X#$i_sysmnttab I_SYS_MNTTAB /**/
-X
-X/* I_SYS_MOUNT:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/mount.h>.
-X */
-X/* HAS_GETMNTINFO_FSTYPENAME:
-X * This symbol is defined if the f_fstypename field is available.
-X */
-X/* HAS_GETMNTINFO_FSIZE:
-X * This symbol, if defined, indicates that f_fsize should
-X * be used to compute the filesystem block size.
-X */
-X/* HAS_GETMNTINFO_BSIZE:
-X * This symbol, if defined, indicates that f_bsize should
-X * be used to compute the filesystem block size.
-X */
-X#$i_sysmount I_SYS_MOUNT /**/
-X#$d_getmntinfofstype HAS_GETMNTINFO_FSTYPENAME /**/
-X#$d_getmntinfofsize HAS_GETMNTINFO_FSIZE /**/
-X#$d_getmntinfobsize HAS_GETMNTINFO_BSIZE /**/
-X
-X/* I_SYS_STATFS:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/statfs.h>.
-X */
-X/* HAS_STATFS_FRSIZE:
-X * This symbol, if defined, indicates that the f_frsize field is
-X * part of the statfs structure.
-X */
-X#$i_sysstatfs I_SYS_STATFS /**/
-X#$d_statfs_frsize HAS_STATFS_FRSIZE /**/
-X
-X/* I_SYS_STATVFS:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/statvfs.h>.
-X */
-X/* HAS_STATVFS_BASETYPE:
-X * This symbol, if defined, indicates to the C program that the
-X * f_basetyep symbol is available in the statvfs structure.
-X */
-X#$i_sysstatvfs I_SYS_STATVFS /**/
-X#$d_statvfsbasetype HAS_STATVFS_BASETYPE /**/
-X
-X/* I_SYS_VFS:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/vfs.h>.
-X */
-X#$i_sysvfs I_SYS_VFS /**/
-X
-X/* I_SYS_VFSTAB:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/vfstab.h>.
-X */
-X#$i_sysvfstab I_SYS_VFSTAB /**/
-X
-X/* I_SYS_VMOUNT:
-X * This symbol, if defined, indicates to the C program that it should
-X * include <sys/vmount.h>.
-X */
-X#$i_sysvmount I_SYS_VMOUNT /**/
-X
-X#endif
-X!GROK!THIS!
-END_OF_FILE
-if test 10815 -ne `wc -c <'config_h.SH'`; then
- echo shar: \"'config_h.SH'\" unpacked with wrong size!
-fi
-# end of 'config_h.SH'
-fi
-if test -f 'configure' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'configure'\"
-else
-echo shar: Extracting \"'configure'\" \(2855 characters\)
-sed "s/^X//" >'configure' <<'END_OF_FILE'
-X#! /bin/sh
-X#
-X# $Id$
-X#
-X# GNU configure-like front end to metaconfig's Configure.
-X#
-X# Written by Andy Dougherty <doughera@lafcol.lafayette.edu>
-X# Matthew Green <mrg@mame.mu.oz.au> and Tom Tromey <tromey@cygnus.com>.
-X#
-X# Reformatted and modified for inclusion in the dist-3.0 package by
-X# Raphael Manfredi <Raphael_Manfredi@grenoble.hp.com>.
-X#
-X# This script belongs to the public domain and may be freely redistributed.
-X#
-X# The remaining of this leading shell comment may be removed if you
-X# include this script in your own package.
-X#
-X# $Log$
-X# Revision 3.0.1.2 1997/02/28 16:28:49 ram
-X# patch61: added the srcdir support now that we have src.U
-X# patch61: random cleanup for nicer help message
-X#
-X# Revision 3.0.1.1 1995/07/25 14:16:21 ram
-X# patch56: created
-X#
-X
-X(exit $?0) || exec sh $0 $argv:q
-Xopts=''
-Xverbose=''
-Xcreate='-e'
-Xsrcdir=''
-Xwhile test $# -gt 0; do
-X case $1 in
-X --help)
-X cat <<EOM
-XUsage: configure [options]
-XThis is GNU configure-like front end for a metaconfig-generated Configure.
-XIt emulates the following GNU configure options (must be fully spelled out):
-X
-X --help --srcdir=DIRECTORY
-X --no-create --silent
-X --prefix=PREFIX --verbose
-X --quiet --version
-X
-XAnd it honours these environment variables: CC, CFLAGS and DEFS.
-X
-XFurthermore, it ignores the following arguments, when supplied:
-X
-X --cache-file=FILE --target=TARGET
-X --enable-* --with-*
-X --host=HOST
-XEOM
-X exit 0
-X ;;
-X --no-create)
-X create='-E'
-X shift
-X ;;
-X --prefix=*)
-X arg=`echo $1 | sed 's/--prefix=/-Dprefix=/'`
-X opts="$opts $arg"
-X shift
-X ;;
-X --prefix)
-X shift
-X opts="$opts -Dprefix=$1"
-X shift
-X ;;
-X --srcdir=*)
-X arg=`echo $1 | sed 's/--srcdir=//'`
-X srcdir=$arg
-X shift
-X ;;
-X --srcdir)
-X shift
-X srcdir=$1
-X shift
-X ;;
-X --quiet|--silent)
-X exec >/dev/null 2>&1
-X shift
-X ;;
-X --verbose)
-X verbose=true
-X shift
-X ;;
-X --version)
-X copt="$copt -V"
-X shift
-X ;;
-X --host=*|--target=*|--cache-file=*|--enable-*|--with-*)
-X shift
-X ;;
-X --*)
-X opt=`echo $1 | sed 's/=.*//'`
-X echo "This GNU configure front end does not understand $opt"
-X exit 1
-X ;;
-X *)
-X opts="$opts $1"
-X shift
-X ;;
-X esac
-Xdone
-X
-Xcase "$CC" in
-X'') ;;
-X*) opts="$opts -Dcc='$CC'";;
-Xesac
-X
-X# Join DEFS and CFLAGS together.
-Xccflags=''
-Xcase "$DEFS" in
-X'') ;;
-X*) ccflags=$DEFS;;
-Xesac
-Xcase "$CFLAGS" in
-X'') ;;
-X*) ccflags="$ccflags $CFLAGS";;
-Xesac
-Xcase "$ccflags" in
-X'') ;;
-X*) opts="$opts -Dccflags='$ccflags'";;
-Xesac
-X
-X# Don't use -s if they want verbose mode
-Xcase "$verbose" in
-X'') copt="$copt -ds";;
-X*) copt="$copt -d";;
-Xesac
-X
-X# Figure out srcdir if not set already
-Xcase "$srcdir" in
-X'') srcdir=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
-Xesac
-Xcase "$srcdir" in
-X".") ;;
-X*) opts="$opts -Dsrc=$srcdir";;
-Xesac
-X
-Xset X sh $srcdir/Configure $copt $create $opts
-Xshift
-Xecho "$@"
-Xexec "$@"
-END_OF_FILE
-if test 2855 -ne `wc -c <'configure'`; then
- echo shar: \"'configure'\" unpacked with wrong size!
-fi
-chmod +x 'configure'
-# end of 'configure'
-fi
-if test -f 'di.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'di.1'\"
-else
-echo shar: Extracting \"'di.1'\" \(7676 characters\)
-sed "s/^X//" >'di.1' <<'END_OF_FILE'
-X.\"
-X.\" $Id$
-X.\" $Revision$
-X.\"
-X.\" di.1
-X.\"
-X.\" Copyright 1994-1999 Brad Lanam Walnut Creek CA USA
-X.\"
-X.\" bll@gentoo.com
-X.\"
-X.\" for di version 2.0
-X.\"
-X.TH di 1 "7 January 1999"
-X.SH Name
-Xdi \- disk information
-X.SH Synopsis
-X.\" di [-Aahlnt] [-d display-size] [-f format] [-i ignore-fstyp-list]
-X.\" [-I include-fstyp-list] [-s sort-type] [-w block-width]
-X.\" [-W inode-width] [-x level] [file [...]]
-X.B di
-X[\fB-Aahlnt\fR] [\fB-d\fR \fIdisplay-size\fR] [\fB-f\fR \fIformat\fR]
-X[\fB-i\fR \fIignore-fstyp-list\fR] [\fB-I\fR \fIinclude-fstyp-list\fR]
-X[\fB-s\fR \fIsort-type\fR]
-X[\fB-w\fR \fIblock-width\fR] [\fB-W\fR \fIinode-width\fR] [\fB-x\fR \fIlevel\fR]
-X[\fIfile\fR [...]]
-X.PP
-X.B mi
-X.SH Description
-X.NXA "di command" "dumpfs command"
-X.NXA "di command" "df command"
-X.NXR "disk" "displaying free space"
-X.I di
-XDisplays usage information on mounted filesystems. Block values are
-Xreported in megabytes (1024k bytes) by default, but may be changed.
-XIf \fIfile\fR is specified,
-Xthe usage information for the partition on which \fIfile\fR is
-Xlocated is printed.
-X.PP
-XUnless the \-a flag is specified, certain mounted filesystems
-Xwill not normally be displayed.
-X.IP
-XFilesystems that have a total
-Xblock count of 0 will not be displayed.
-X.IP
-XFilesystems that have a mount option of 'ignore' set will not
-Xbe displayed.
-X.IP
-XFilesystems that are automounted, and are duplicates of an
-Xexisting filesystem are not displayed. (May not work on
-Xall systems).
-X.PP
-X.I mi
-XDisplays the mounted filesystem information.
-X.PP
-XSeveral switches may be specified to
-Xcontrol the output of
-X.I di
-Xand
-X.I mi\fR:
-X.TP
-X.B \-A
-XPrint all fields (used for debugging). Mount points and special
-Xdevice names are printed at full width. The \-a flag is set.
-X.TP
-X.B \-a
-XPrints all mounted devices (normally, those with 0 total blocks are not
-Xprinted - e.g. \fB/dev/proc\fR, \fB/dev/fd\fR).
-X.TP
-X.B \-d\ \fIdisplay-size\fR
-XDisplay the blocks in units specified by \fIdisplay-size\fR. \fIdisplay-size\fR
-Xmay be one of: p \- posix (512 bytes), k \- kilobytes,
-Xm \- megabytes, g - gigabytes, or a specific value to use as the block size.
-XBlock display sizes greater than 1024 bytes are displayed with a precision
-Xof one decimal place after the radix.
-X.TP
-X.B \-f\ \fIformat\fR
-XUse the specified format string \fIformat\fR. Format strings are
-Xdescribed below.
-X.TP
-X.B \-h
-XPrint out the usage for
-X.I di
-X.TP
-X.B \-i \fIignore-fstype-list\fR
-XIgnore the file system types listed in \fIignore-fstyp-list\fR.
-XThe list is a comma separated list of file system types. e.g.
-X\-i nfs,rfs
-X.TP
-X.B \-I \fIinclude-fstype-list\fR
-XInclude only the file system types listed in \fIinclude-fstyp-list\fR.
-XThe list is a comma separated list of file system types. e.g.
-X\-I nfs,rfs
-X.TP
-X.B \-l
-XDisplay only local file systems. This option is not fully implemented
-Xfor all systems as of version 1.17.
-X.TP
-X.B \-n
-XDo not print a header line above the list of file systems. Useful when
-Xparsing the output of \fIdi\fR.
-X.TP
-X.B \-s\ \fIsort-type\fR
-XUse \fIsort-type\fR to sort the output.
-XThe output of \fIdi\fR is normally sorted by name. The output may
-Xbe left unsorted (\fB-s\ n\fR command line switch) i.e. as it appears
-Xin the mount table or may be
-Xsorted by the special device name
-X(\fB-s\ s\fR command line switch). If the \fB-s \ r\fR command line
-Xswitch is used, the sort order will be reversed.
-XIf \fIfile\fR is specifed on the
-Xcommand line, no sorting is done.
-X.TP
-X.B \-t
-XPrint a totals line below the list of file systems.
-X.TP
-X.B \-w\ \fIblock-width\fR
-XSet the print width for block values. Default is eight.
-X.TP
-X.B \-W\ \fIinode-width\fR
-XSet the print width for inode values. Default is seven.
-X.TP
-X.B \-x\ \fIlevel\fR
-XSet the program's debugging level to \fIdebug-level\fR.
-X.SH Format strings
-XThe output of \fIdi\fR may be specified via a format string. This
-Xstring may be given either via the \fB-f\fR command line switch or by
-Xthe \fBDIFMT\fR environment variable. The format string may specify the
-Xfollowing columns:
-X.TP
-X.B m
-XPrint the name of the mount point.
-X.TP
-X.B M
-XPrint the name of the mount point, at full length. The mount point
-Xis formatted to the maximum width necessary for the longest mount
-Xpoint name.
-X.TP
-X.B b
-XPrint the total number of Kbytes on the file system.
-XSee also the \-d option.
-X.TP
-X.B B
-XPrint the total number of Kbytes on the file system
-Xavailable for use by normal
-Xusers.
-XSee also the \-d option.
-X.TP
-X.B u
-XPrint the number of Kbytes in use on the file system
-X(actual number of kbytes used = total - free).
-XSee also the \-d option.
-X.TP
-X.B c
-XPrint the number of Kbytes not available for use by normal users
-X(total - available).
-XSee also the \-d option.
-X.TP
-X.B f
-XPrint the number of free (unused) Kbytes on the file system.
-XSee also the \-d option.
-X.TP
-X.B v
-XPrint the number of Kbytes available for use by normal users.
-XSee also the \-d option.
-X.TP
-X.B p
-XPrint the percentage of Kbytes not available for use by normal users
-X(number of
-Xkbytes not available for use / total disk space).
-XSee also the \-d option.
-X.TP
-X.B 1
-XPrint the percentage of total Kbytes in use
-X(actual number of
-Xkbytes used / total disk space).
-XSee also the \-d option.
-X.TP
-X.B 2
-XPrint the percentage of Kbytes in use, BSD-style. Represents the
-Xpercentage of user-available space in use. Note that values over 100%
-Xare possible
-X(actual number of kbytes used / disk
-Xspace available to non-root users).
-XSee also the \-d option.
-X.TP
-X.B i
-XPrint the total number of file slots (inodes) that can be created on the file
-Xsystem.
-X.TP
-X.B U
-XPrint the number of file slots in use.
-X.TP
-X.B F
-XPrint the number of file slots available.
-X.TP
-X.B P
-XPrint the percentage of file slots in use.
-X.TP
-X.B s
-XPrint the file system name (special device or remote mount point).
-X.TP
-X.B S
-XPrint the file system name (special device or remote mount point),
-Xat full length.
-XThe file system name
-Xis formatted to the maximum width necessary for the longest file system
-Xname.
-X.TP
-X.B t
-XPrint the file system type.
-X.TP
-X.B T
-XPrint the file system type at full length. The file system type
-Xis formatted to the maximum width necessary for the longest file system
-Xtype.
-X.TP
-X.B I
-XPrint the time the filesystem was mounted. This column is
-Xnot supported on all systems.
-X.TP
-X.B O
-XPrint the filesystem mount options.
-X.PP
-XThe default format string for \fIdi\fR is \fBsmbuvpT\fR.
-X.PP
-XThe default format string for \fImi\fR is \fBMSTIO\R.
-X.PP
-XThe format string may also contain any other character not listed
-Xabove. The character will be printed as is. e.g. \fBdi -f 'mbuvp|iUFP'\fR
-Xwill print the character '|' between the disk usage and the file slot
-Xusage. The command sequence (Bourne Shell):
-X.RS
-X.br
-X.B di -f 'mbuvp
-X.br
-X.B miUFP'
-X.br
-X.RE
-Xwill print two lines of data for each filesystem.
-X.SH Examples
-XVarious \fIdf\fR
-Xequivalent format strings for System V release 4 are:
-X.PP
-X.RS
-X\fI/usr/bin/df -v\fR di -dp \-f msbuf1
-X.br
-X\fI/usr/bin/df -k\fR di -dk \-f sbcvpm
-X.br
-X\fI/usr/ucb/df\fR di -dk \-f sbuv2m
-X.RE
-X.PP
-XIf you like your numbers to add up/calculate the percentage
-Xcorrectly, try one
-Xof the following format strings:
-X.PP
-X.RS
-X.B di -f SMbuf1T
-X.br
-X.B di -f SMbcvpT
-X.br
-X.B di -f SMBuv2T
-X.RE
-X.SH Note
-XFor filesystems that do not report available blocks (e.g. System V
-Xrelease 3), the number of available blocks is considered to be the
-Xnumber of free blocks.
-X.SH WARNING
-XDo not replace your system's \fIdf\fR command with this program. You
-Xwill in all likelihood break your installation procedures.
-X.SH See Also
-Xdf(1), fstab(5), getmnt(2), getmntinfo(2), mnttab(4), mount(1M)
-Xstatfs(2), statvfs(2)
-X.SH Author
-XThis program is Copyright 1994-1999 by Brad Lanam.
-X.PP
-XBrad Lanam, Walnut Creek, CA (bll@gentoo.com).
-END_OF_FILE
-if test 7676 -ne `wc -c <'di.1'`; then
- echo shar: \"'di.1'\" unpacked with wrong size!
-fi
-# end of 'di.1'
-fi
-if test -f 'getopt.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'getopt.c'\"
-else
-echo shar: Extracting \"'getopt.c'\" \(1664 characters\)
-sed "s/^X//" >'getopt.c' <<'END_OF_FILE'
-X/*
-X *
-X * $Id$
-X *
-X * getopt - get option letter from argv
-X *
-X * from Cnews by Henry Spencer
-X *
-X */
-X
-X#ifndef lint
-Xstatic char getopt_c_rcsid [] =
-X"$Id$";
-Xstatic char getopt_c_source [] =
-X"$Source$";
-X#endif
-X
-X#include <stdio.h>
-X#include <string.h>
-X
-Xchar *optarg; /* Global argument pointer. */
-Xint optind = 0; /* Global argv index. */
-X
-Xstatic char *scan = NULL; /* Private scan pointer. */
-X
-Xint
-Xgetopt(argc, argv, optstring)
-Xint argc;
-Xchar *argv[];
-Xchar *optstring;
-X{
-X char c;
-X char *place;
-X
-X
-X optarg = NULL;
-X
-X if (scan == NULL || *scan == '\0')
-X {
-X if (optind == 0)
-X {
-X optind++;
-X }
-X
-X if (optind >= argc || argv[optind][0] != '-' ||
-X argv[optind][1] == '\0')
-X {
-X return(EOF);
-X }
-X
-X if (strcmp(argv[optind], "--")==0)
-X {
-X optind++;
-X return(EOF);
-X }
-X
-X scan = argv[optind]+1;
-X optind++;
-X }
-X
-X c = *scan++;
-X place = strchr(optstring, c);
-X
-X if (place == NULL || c == ':')
-X {
-X fprintf(stderr, "%s: unknown option -%c\n", argv[0], c);
-X return('?');
-X }
-X
-X place++;
-X if (*place == ':')
-X {
-X if (*scan != '\0')
-X {
-X optarg = scan;
-X scan = NULL;
-X }
-X else if (optind < argc)
-X {
-X optarg = argv[optind];
-X optind++;
-X }
-X else
-X {
-X fprintf(stderr, "%s: -%c argument missing\n", argv[0], c);
-X return('?');
-X }
-X }
-X
-X return(c);
-X}
-END_OF_FILE
-if test 1664 -ne `wc -c <'getopt.c'`; then
- echo shar: \"'getopt.c'\" unpacked with wrong size!
-fi
-# end of 'getopt.c'
-fi
-if test ! -d 'hints' ; then
- echo shar: Creating directory \"'hints'\"
- mkdir 'hints'
-fi
-if test -f 'hints/aix.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/aix.sh'\"
-else
-echo shar: Extracting \"'hints/aix.sh'\" \(186 characters\)
-sed "s/^X//" >'hints/aix.sh' <<'END_OF_FILE'
-X# $Id$
-Xcase ${osvers} in
-X 3*) di_prog="diskinfo" ;;
-X 4.[012]*) di_prog="diskinfo" ;;
-X *) di_prog="di" ;;
-Xesac
-X
-Xnm_opt="-B"
-END_OF_FILE
-if test 186 -ne `wc -c <'hints/aix.sh'`; then
- echo shar: \"'hints/aix.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/aix.sh'
-fi
-if test -f 'hints/beos.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/beos.sh'\"
-else
-echo shar: Extracting \"'hints/beos.sh'\" \(590 characters\)
-sed "s/^X//" >'hints/beos.sh' <<'END_OF_FILE'
-X# $Id$
-X# unfortunately, nm doesn't find 'fs_info'.
-Xd_statvfs="undef"
-Xd_fs_info="define"
-Xcc="c++"
-Xusenm="define"
-Xccflags="-I/boot/develop/headers/posix -I/boot/develop/headers/be"
-Xincpath="/boot/develop/headers/posix:/boot/develop/headers/be"
-Xcase `uname -m` in
-X BePC)
-X libc="/boot/develop/lib/x86/libroot.so"
-X libpth="/boot/develop/lib/x86"
-X libs='-lroot -lbe'
-X ;;
-X *)
-X libc="/boot/develop/lib/ppc/libroot.so" #???
-X libpth="/boot/develop/lib/ppc" #???
-X libs='-lroot -lbe'
-X ;;
-Xesac
-END_OF_FILE
-if test 590 -ne `wc -c <'hints/beos.sh'`; then
- echo shar: \"'hints/beos.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/beos.sh'
-fi
-if test -f 'hints/dec_osf.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/dec_osf.sh'\"
-else
-echo shar: Extracting \"'hints/dec_osf.sh'\" \(75 characters\)
-sed "s/^X//" >'hints/dec_osf.sh' <<'END_OF_FILE'
-X# $Id$
-Xd_statvfs="undef"
-END_OF_FILE
-if test 75 -ne `wc -c <'hints/dec_osf.sh'`; then
- echo shar: \"'hints/dec_osf.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/dec_osf.sh'
-fi
-if test -f 'hints/dynix.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/dynix.sh'\"
-else
-echo shar: Extracting \"'hints/dynix.sh'\" \(68 characters\)
-sed "s/^X//" >'hints/dynix.sh' <<'END_OF_FILE'
-X# $Id$
-Xlibs='-lseq'
-END_OF_FILE
-if test 68 -ne `wc -c <'hints/dynix.sh'`; then
- echo shar: \"'hints/dynix.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/dynix.sh'
-fi
-if test -f 'hints/dynixptx.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/dynixptx.sh'\"
-else
-echo shar: Extracting \"'hints/dynixptx.sh'\" \(71 characters\)
-sed "s/^X//" >'hints/dynixptx.sh' <<'END_OF_FILE'
-X# $Id$
-Xlibs='-lseq'
-END_OF_FILE
-if test 71 -ne `wc -c <'hints/dynixptx.sh'`; then
- echo shar: \"'hints/dynixptx.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/dynixptx.sh'
-fi
-if test -f 'hints/freebsd.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/freebsd.sh'\"
-else
-echo shar: Extracting \"'hints/freebsd.sh'\" \(143 characters\)
-sed "s/^X//" >'hints/freebsd.sh' <<'END_OF_FILE'
-X# $Id$
-Xcase "$osvers" in
-X 1.*)
-X ;;
-X *)
-X i_malloc="undef"
-X ;;
-Xesac
-END_OF_FILE
-if test 143 -ne `wc -c <'hints/freebsd.sh'`; then
- echo shar: \"'hints/freebsd.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/freebsd.sh'
-fi
-if test -f 'hints/hpux.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/hpux.sh'\"
-else
-echo shar: Extracting \"'hints/hpux.sh'\" \(405 characters\)
-sed "s/^X//" >'hints/hpux.sh' <<'END_OF_FILE'
-X# $Id$
-Xccflags="$ccflags -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-Xd_setmntent_one_arg='undef'
-X
-Xcase "$cc" in
-X *gcc*)
-X ccflags="-Wall $ccflags"
-X ;;
-X *)
-X case "$osvers" in
-X B.10.*|B.11.*)
-X ccflags="+DAportable $ccflags"
-X ;;
-X esac
-X
-X ccflags="-Ae $ccflags"
-X ;;
-Xesac
-END_OF_FILE
-if test 405 -ne `wc -c <'hints/hpux.sh'`; then
- echo shar: \"'hints/hpux.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/hpux.sh'
-fi
-if test -f 'hints/irix.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/irix.sh'\"
-else
-echo shar: Extracting \"'hints/irix.sh'\" \(190 characters\)
-sed "s/^X//" >'hints/irix.sh' <<'END_OF_FILE'
-X# $Id$
-X
-Xcase "$osvers" in
-X [45].*)
-X libs="-lsun"
-X ;;
-X *)
-X d_64bit_statfs_flds="define"
-X ;;
-Xesac
-X
-Xnm_opt='-p'
-END_OF_FILE
-if test 190 -ne `wc -c <'hints/irix.sh'`; then
- echo shar: \"'hints/irix.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/irix.sh'
-fi
-if test -f 'hints/linux.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/linux.sh'\"
-else
-echo shar: Extracting \"'hints/linux.sh'\" \(391 characters\)
-sed "s/^X//" >'hints/linux.sh' <<'END_OF_FILE'
-X# $Id$
-Xcase "$osvers" in
-X 1.*)
-X libc="/lib/libc.so.5.0.9"
-X d_statfssysv3="undef"
-X d_statfsbsd="define"
-X ;;
-X 2.0.*)
-X libs=" "
-X ;;
-X *)
-X ccflags="$ccflags `/usr/bin/getconf LFS_CFLAGS`"
-X ldflags="$ldflags `/usr/bin/getconf LFS_LDFLAGS`"
-X libs="$libs `/usr/bin/getconf LFS_LIBS`"
-X ;;
-Xesac
-END_OF_FILE
-if test 391 -ne `wc -c <'hints/linux.sh'`; then
- echo shar: \"'hints/linux.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/linux.sh'
-fi
-if test -f 'hints/openbsd.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/openbsd.sh'\"
-else
-echo shar: Extracting \"'hints/openbsd.sh'\" \(111 characters\)
-sed "s/^X//" >'hints/openbsd.sh' <<'END_OF_FILE'
-X# $Id$
-X# hints/openbsd.sh
-Xi_malloc="undef"
-Xoptimize="-O2 -g"
-END_OF_FILE
-if test 111 -ne `wc -c <'hints/openbsd.sh'`; then
- echo shar: \"'hints/openbsd.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/openbsd.sh'
-fi
-if test -f 'hints/solaris.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/solaris.sh'\"
-else
-echo shar: Extracting \"'hints/solaris.sh'\" \(1007 characters\)
-sed "s/^X//" >'hints/solaris.sh' <<'END_OF_FILE'
-X# $Id$
-X
-Xcase "$osvers" in
-X 2.[6-9]*)
-X ccflags="`/usr/bin/getconf LFS_CFLAGS`"
-X ldflags="`/usr/bin/getconf LFS_LDFLAGS`"
-X libs="$libs `/usr/bin/getconf LFS_LIBS`"
-X ;;
-X 2.*|1*) ;;
-X *)
-X ccflags="`/usr/bin/getconf LFS_CFLAGS`"
-X ldflags="`/usr/bin/getconf LFS_LDFLAGS`"
-X libs="$libs `/usr/bin/getconf LFS_LIBS`"
-X ;;
-Xesac
-X
-Xcase "$cc" in
-X *gcc*) ccflags="-Wall $ccflags"
-X ;;
-X *) ccflags="-Xa -v -fast $ccflags"
-X ldflags="-fast $ldflags"
-X optimize=""
-X case "$osvers" in
-X 2.[7-9]*)
-X if [ -x /usr/bin/isainfo -a \
-X `uname -m` = sun4u -a \
-X `/usr/bin/isainfo -b` = 64 ]
-X then
-X ccflags="${ccflags} -xarch=v9"
-X ldflags="${ldflags} -xarch=v9"
-X fi
-X ;;
-X esac
-X ;;
-Xesac
-X
-END_OF_FILE
-if test 1007 -ne `wc -c <'hints/solaris.sh'`; then
- echo shar: \"'hints/solaris.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/solaris.sh'
-fi
-if test -f 'hints/unicos.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'hints/unicos.sh'\"
-else
-echo shar: Extracting \"'hints/unicos.sh'\" \(173 characters\)
-sed "s/^X//" >'hints/unicos.sh' <<'END_OF_FILE'
-X# $Id$
-Xcase "$osvers" in
-X 9.*)
-X ubsize="BSIZE"
-X ;;
-Xesac
-X
-Xd_getmntinfo="undef"
-Xd_setmntent_one_arg="define"
-END_OF_FILE
-if test 173 -ne `wc -c <'hints/unicos.sh'`; then
- echo shar: \"'hints/unicos.sh'\" unpacked with wrong size!
-fi
-# end of 'hints/unicos.sh'
-fi
-if test -f 'win95.mak' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'win95.mak'\"
-else
-echo shar: Extracting \"'win95.mak'\" \(1267 characters\)
-sed "s/^X//" >'win95.mak' <<'END_OF_FILE'
-X#
-X# di makefile for windows95
-X#
-X# Copyright 1995-1999 Brad Lanam
-X#
-X# $Id$
-X# $Source$
-X#
-X
-XCFLAGS =
-XLDFLAGS =
-XLIBS =
-XPROG = di
-XMPROG = mi
-X
-X###
-X
-Xnone:
-X echo Usage:
-X echo nmake -f win95.mak windows
-X echo or make -f win95.mak windows-gcc
-X
-X# This was tested using vc++ 5.0.
-Xwindows:
-X $(MAKE) -f win95.mak CC=cl LD=cl EXE_EXT=".exe" OBJ_EXT=".obj" \
-X OTHEROBJ="getopt.obj" \
-X CP="copy " \
-X CFLAGS="$(CFLAGS) -nologo -O2 \
-X -DMPROG=\\\"$(MPROG)\\\" \
-X -DDEFAULT_FORMAT=\\\"sMbuvpT\\\"" \
-X LDFLAGS="-nologo -O2" $(PROG).exe
-X
-X# This was tested using Cygnus gcc b19
-Xwindows-gcc:
-X $(MAKE) -f win95.mak CC=gcc LD=gcc EXE_EXT=".exe" OBJ_EXT=".o" \
-X OTHEROBJ="getopt.o" \
-X CP="cp -f" \
-X CFLAGS="$(CFLAGS) -g -O2 \
-X -DI_LIMITS -DI_UNISTD -DI_SYS_PARAM \
-X -DMPROG=\\\"$(MPROG)\\\" \
-X -DDEFAULT_FORMAT=\\\"sMbuvpT\\\"" \
-X LDFLAGS="-g -O2" $(PROG).exe
-X
-X###
-X
-Xconfig.h: config.win95
-X $(CP) config.win95 config.h
-X
-X####################
-X
-X$(PROG)$(EXE_EXT): di$(OBJ_EXT) $(OTHEROBJ)
-X $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG)$(EXE_EXT) di$(OBJ_EXT) \
-X $(OTHEROBJ) $(LIBS)
-X
-X###
-X
-Xdi$(OBJ_EXT): di.c config.h
-X $(CC) -c $(CFLAGS) di.c
-X
-Xgetopt$(OBJ_EXT): getopt.c
-X $(CC) -c $(CFLAGS) getopt.c
-END_OF_FILE
-if test 1267 -ne `wc -c <'win95.mak'`; then
- echo shar: \"'win95.mak'\" unpacked with wrong size!
-fi
-chmod +x 'win95.mak'
-# end of 'win95.mak'
-fi
-echo shar: End of archive 1 \(of 3\).
-cp /dev/null ark1isdone
-MISSING=""
-for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
-done
-if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
-else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
-fi
-## End of shell archive.
-exit 0
-
+++ /dev/null
-#! /bin/sh
-# This is a shell archive. Remove anything before this line, then unpack
-# it by saving it into a file and typing "sh file". To overwrite existing
-# files, type "sh file -c". You can also feed this as standard input via
-# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
-# will see the following message at the end:
-# "End of archive 2 (of 3)."
-# Contents: di.c
-# Wrapped by root@seer on Thu Feb 24 10:15:51 2000
-PATH=/bin:/usr/bin:/usr/ucb ; export PATH
-if test -f 'di.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'di.c'\"
-else
-echo shar: Extracting \"'di.c'\" \(97566 characters\)
-sed "s/^X//" >'di.c' <<'END_OF_FILE'
-X#ifndef lint
-Xstatic char di_c_sccsid [] =
-X"@(#)di.c 1.21";
-Xstatic char di_c_rcsid [] =
-X"$Id$";
-Xstatic char di_c_source [] =
-X"$Source$";
-Xstatic char copyright [] =
-X"Copyright 1994-1999 Brad Lanam, Walnut Creek, CA";
-X#endif
-X
-X/*
-X * di.c
-X *
-X * Copyright 1994-1999 Brad Lanam, Walnut Creek, CA
-X *
-X * Warning: Do not replace your systems 'df' command with this program.
-X * You will in all likelihood break your installation procedures.
-X *
-X * Usage: di -AafntwWx [file [...]]
-X * -A : print all fields (used for debugging)
-X * -a : print all mounted devices; normally, those
-X * with 0 total blocks are not printed. e.g.
-X * /dev/proc, /dev/fd.
-X * -d x : size to print blocks in (p, k, m, g, <n>)
-X * -f x : use format string <x>
-X * -i x : ignore filesystem type(s) x, where x is a comma
-X * separated list.
-X * -I x : include only filesystem type(s) x, where x is a
-X * separated list.
-X * -l : local filesystems only
-X * -n : don't print header
-X * -s t : sort type
-X * -t : print totals
-X * -w n : use <n> for the block print width (default 8).
-X * -W n : use <n> for the inode print width (default 7).
-X * -x n : debug level <n>
-X *
-X * All values are reported in K (1024 bytes).
-X *
-X * Sort types (by name is default):
-X * n - none (mount order)
-X * s - special
-X * r - reverse sort
-X *
-X * Format string values:
-X * m - mount point
-X * M - mount point, full length
-X * b - total kbytes
-X * B - total kbytes available for use by the user.
-X * [ (tot - (free - avail) ]
-X * u - kbytes used (actual number of kbytes used) [ (tot - free) ]
-X * c - calculated number of kbytes used [ (tot - avail) ]
-X * f - kbytes free
-X * v - kbytes available
-X * p - percentage not available for use.
-X * (number of blocks not available for use / total disk space)
-X * [ (tot - avail) / tot ]
-X * 1 - percentage used.
-X * (actual number of blocks used / total disk space)
-X * [ (tot - free) / tot ]
-X * 2 - percentage of user-available space in use (bsd style).
-X * Note that values over 100% are possible.
-X * (actual number of blocks used / disk space available to user)
-X * [ (tot - free) / (tot - (free - avail)) ]
-X * i - total i-nodes (files)
-X * U - used i-nodes
-X * F - free i-nodes
-X * P - percent i-nodes used [ (tot - avail) / tot ]
-X * s - filesystem name (special)
-X * S - filesystem name (special), full length
-X * t - disk partition type
-X * T - disk partition type (full length)
-X * I - mount time
-X * O - mount options.
-X *
-X * System V.4 `/usr/bin/df -v` Has format: msbuf1 (w/-d512 option: 512 byte blocks)
-X * System V.4 `/usr/bin/df -k` Has format: sbcvpm
-X * System V.4 `/usr/ucb/df` Has format: sbuv2m
-X *
-X * The default format string for this program is: smbuvpT
-X *
-X * The environment variable "DIFMT" may be set to the desired format
-X * string.
-X *
-X * Note that for filesystems that do not have (S512K fs) or systems (SysV.3)
-X * that do not report available blocks, the number of available blocks is
-X * equal to the number of free blocks.
-X *
-X * HISTORY:
-X * 24 feb 2000 bll
-X * Updated for BeOS. This required changes to support c++
-X * compilation (ansi style functions). Fixes for linux.
-X * 17 dec 99 bll
-X * Added sys/fs_types.h (Digital Unix (tru64)).
-X * 3 jan 99 bll
-X * Finalize changes for metaconfig.
-X * Always get stat() for disk device.
-X * Remove duplicate disks from display.
-X * Add NetBSD, Unicos, IRIX changes
-X * 8 sep 97 bll
-X * Solaris large file version; AIX typo fix
-X * 15 aug 95 bll
-X * Ignore will check the file system type beforehand if possible.
-X * Fixed local mount stuff for osf1.
-X * 9 aug 95 bll
-X * Changed totals to use double; the totals can now be displayed with
-X * any wanted block size; sizes > one k have a single decimal point.
-X * -d option specifies block size.
-X * -l option for local file systems only.
-X * 7 aug 95 bll
-X * convex fix.
-X * 29 jul 95 bll
-X * Fixed bsdi variants. The fragment size wasn't being supported.
-X * 22 jul 95 bll
-X * fix problem with display widths in conjunction with ignore/include
-X * 20 feb 95 bll
-X * added ignore/include file system type lists.
-X * 8 jan 95 bll
-X * Added FreeBsd 2.x
-X * 6 dec 94 bll
-X * sco nfs 'nothing' fix.
-X * 28 nov 94 bll
-X * bsdi [bag@clipper.cs.kiev.ua (Andrey Blochintsev)]
-X * 24 nov 94 bll
-X * Added FreeBsd - like OSF/1, but w/o nice mount name table.
-X * 1 may 94 bll
-X * removed ill conceived mount options stuff. Added AIX
-X * (Erik O'Shaughnessy eriko@risc.austin.ibm.com).
-X * Added coherent.
-X * 9 apr 94 bll
-X * T format from Bill Davidsen. SunOS file system type.
-X * mount options.
-X * 7 apr 94 bll
-X * cdrom under solaris returning -1 in addition to -2.
-X * Changed the test to test for any negative value.
-X * 5 apr 94 pm
-X * Filesystem type info, and whether its read-write, readonly
-X * etc is in the mntent structure. Added code to support it.
-X * [Pat Myrto <pat@rwing.uucp>]
-X * 25 mar 94 bll
-X * sun had f_bfree instead of f_bavail!
-X * Xenix, linux.
-X * -w, -W options, -B option, fixed width for -f M, -f S.
-X * Usage. Allow other characters in format string.
-X * 4 mar 94 bll
-X * -f B, bug fixes. bcopy.
-X * Solaris cdrom reports total, not free or avail.
-X * Allow command line specification of file names.
-X * 3 mar 94 bll
-X * support for OSF/1 and ULTRIX, -F, -f M, -f S
-X * [mogul@wrl.dec.com (Jeffrey Mogul)]
-X * 3 mar 94 bll
-X * Allow command line specification of filename (s).
-X * Sort output. Test of nonexistent return code removed.
-X * 1 mar 94 bll
-X * # of inodes can be -1L if unreportable.
-X * [jjb@jagware.bcc.com (J.J.Bailey)]
-X * [Mark Neale <mark@edscom.demon.co.uk>]
-X * getDiskInfo () returning garbage
-X * [costales@ICSI.Berkeley.EDU (Bryan Costales)]
-X * [Mark Neale <mark@edscom.demon.co.uk>]
-X * pyramid #ifdefs
-X * [vogelke@c-17igp.wpafb.af.mil (Contr Karl Vogel)]
-X * name must be maxpathlen
-X * [Mark Neale <mark@edscom.demon.co.uk>]
-X * error prints/compile warnings.
-X * [Mark Neale <mark@edscom.demon.co.uk>]
-X *
-X */
-X
-X#include "config.h"
-X
-X#include <stdio.h>
-X#include <ctype.h>
-X#include <errno.h>
-X#if defined (I_STDLIB)
-X# include <stdlib.h>
-X#endif
-X#if defined (I_SYS_TYPES)
-X# include <sys/types.h>
-X#endif
-X#if defined (I_LIMITS)
-X# include <limits.h>
-X#endif
-X#if defined (I_STRING)
-X# include <string.h>
-X#else
-X# include <strings.h>
-X#endif
-X#if defined (I_MEMORY)
-X# include <memory.h>
-X#endif
-X#if defined (I_MALLOC)
-X# include <malloc.h>
-X#endif
-X#if defined (I_UNISTD)
-X# include <unistd.h>
-X#endif
-X#if defined (I_TIME)
-X# include <time.h>
-X#endif
-X#if defined (I_SYS_TIME)
-X# include <sys/time.h>
-X#endif
-X#if defined (I_SYS_STAT)
-X# include <sys/stat.h>
-X#endif
-X#if defined (I_SYS_PARAM)
-X# include <sys/param.h>
-X#endif
-X
-X#if defined (I_SYS_MNTTAB)
-X# include <sys/mnttab.h>
-X#endif
-X#if defined (I_MNTTAB)
-X# include <mnttab.h>
-X#endif
-X#if defined (I_MNTENT)
-X# include <mntent.h>
-X#endif
-X#if defined (I_SYS_MNTENT)
-X# include <sys/mntent.h>
-X#endif
-X#if defined (I_SYS_MOUNT)
-X# include <sys/mount.h>
-X#endif
-X#if defined (I_SYS_FSTYPES)
-X# include <sys/fstypes.h>
-X#endif
-X#if defined (I_SYS_FS_TYPES)
-X# include <sys/fs_types.h>
-X#endif
-X#if defined (I_SYS_MNTCTL)
-X# include <sys/mntctl.h>
-X#endif
-X#if defined (I_SYS_VMOUNT)
-X# include <sys/vmount.h>
-X#endif
-X#if defined (I_SYS_STATFS) && ! defined (I_SYS_STATVFS)
-X# include <sys/statfs.h>
-X#endif
-X#if defined (I_FSHELP)
-X# include <fshelp.h>
-X#endif
-X#if defined (I_SYS_STATVFS)
-X# include <sys/statvfs.h>
-X#endif
-X#if defined (I_SYS_FSTYP)
-X# include <sys/fstyp.h>
-X# define DI_TYPE_LEN FSTYPSZ
-X#endif
-X#if defined (I_SYS_VFS)
-X# include <sys/vfs.h>
-X#endif
-X#if defined (I_SYS_VFSTAB)
-X# include <sys/vfstab.h>
-X# if ! defined (DI_TYPE_LEN)
-X# define DI_TYPE_LEN FSTYPSZ
-X# endif
-X#endif
-X#if defined (I_FSHELP)
-X# include <fshelp.h>
-X#endif
-X
-X#if defined (I_WINDOWS)
-X# include <windows.h> /* windows */
-X#endif
-X#if defined (I_KERNFSINFO)
-X# include <kernel/fs_info.h>
-X#endif
-X#if defined (I_STOR_DIRECTORY)
-X# include <storage/Directory.h>
-X#endif
-X#if defined (I_STOR_ENTRY)
-X# include <storage/Entry.h>
-X#endif
-X/*#if defined (I_STOR_NODE)
-X# include <storage/Node.h>
-X#endif */
-X#if defined (I_STOR_PATH)
-X# include <storage/Path.h>
-X#endif
-X
-X#if ! defined (HAS_MEMCPY) && ! defined (memcpy)
-X# if ! defined (HAS_BCOPY)
-X error No memcpy/bcopy available.
-X# else
-X# define memcpy(dst, src, cnt) (bcopy((src), (dst), (cnt)), dst)
-X# endif
-X#endif
-X
-X#if ! defined (MAXPATHLEN)
-X# if defined (_POSIX_PATH_MAX)
-X# define MAXPATHLEN _POSIX_PATH_MAX
-X# else
-X# if defined (PATH_MAX)
-X# define MAXPATHLEN PATH_MAX
-X# endif
-X# if defined (LPNMAX)
-X# define MAXPATHLEN LPNMAX
-X# endif
-X# endif
-X#endif
-X
-X#if ! defined (DI_TYPE_LEN)
-X# define DI_TYPE_LEN 16
-X#endif
-X
-X#define DI_FSMAGIC 5 /* base AIX configuration has 5 file systems */
-X
-X#if defined (HAS_STATFS_SYSV3) && ! defined (HAS_STATVFS) && \
-X ! defined (HAS_GETMNTINFO) && ! defined (HAS_GETMNT) /* SYSV.3 */
-X# if defined (Ubsize) && Ubsize != ""
-X# define UBSIZE Ubsize
-X# endif
-X# if ! defined (UBSIZE)
-X# define UBSIZE 512
-X# endif
-X#endif
-X
-X#if (defined (HAS_GETMNTENT) || defined (HAS_STATFS_BSD) || \
-X defined (HAS_STATFS_SYSV3)) && ! defined (HAS_GETMNTINFO) && \
-X ! defined (HAS_GETMNT)
-X# if defined (MOUNTED)
-X# define DI_MOUNT_FILE MOUNTED
-X# else
-X# if defined (MNTTAB)
-X# define DI_MOUNT_FILE MNTTAB
-X# else
-X# define DI_MOUNT_FILE "/etc/mnttab"
-X# endif
-X# endif
-X#endif
-X
-X#if ! defined (HAS_MEMSET) && ! defined (memset)
-X# if ! defined (HAS_BZERO)
-X error No memset/bzero available.
-X# else
-X# define memset(s,c,n) (bzero ((s), (n)), s)
-X# endif
-X#endif
-X
-X#if defined (NEED_GETENV_DEF)
-X extern char *getenv _((char *));
-X#endif
-X
-X#if defined (NEED_STATFS_DEFS)
-X extern int statfs _((char *, struct statfs *));
-X#endif
-X
-X#if defined (NEED_ERRNO_DEFS)
-Xextern int errno;
-X#endif
-X
-X#if (defined (_LARGEFILE_SOURCE) || defined (_LARGEFILE64_SOURCE)) && \
-X _FILE_OFFSET_BITS == 64
-X# define HAS_64BIT_STATFS_FLDS 1
-X#endif
-X
-X#if defined (HAS_64BIT_STATFS_FLDS)
-Xtypedef unsigned long long _fs_size_t;
-Xtypedef long long _s_fs_size_t;
-X#else
-Xtypedef unsigned long _fs_size_t;
-Xtypedef long _s_fs_size_t;
-X#endif
-X
-X#if ! defined (HAS_OPTIND)
-X extern int optind;
-X extern char *optarg;
-X#endif
-X
-X/* end of system specific includes/configurations */
-X
-X#if ! defined (TRUE)
-X# define TRUE 1
-X#endif
-X#if ! defined (FALSE)
-X# define FALSE 0
-X#endif
-X
-X#define DI_F_ALL 0x00000001
-X#define DI_F_LOCAL_ONLY 0x00000002
-X#define DI_F_TOTAL 0x00000010
-X#define DI_F_NO_HEADER 0x00000020
-X#define DI_F_DEBUG_HDR 0x00000040
-X
-X /* mount information */
-X#define DI_FMT_MOUNT 'm'
-X#define DI_FMT_MOUNT_FULL 'M'
-X#define DI_FMT_SPECIAL 's'
-X#define DI_FMT_SPECIAL_FULL 'S'
-X#define DI_FMT_TYPE 't'
-X#define DI_FMT_TYPE_FULL 'T'
-X
-X /* disk information */
-X#define DI_FMT_BTOT 'b'
-X#define DI_FMT_BTOT_AVAIL 'B'
-X#define DI_FMT_BUSED 'u'
-X#define DI_FMT_BCUSED 'c'
-X#define DI_FMT_BFREE 'f'
-X#define DI_FMT_BAVAIL 'v'
-X#define DI_FMT_BPERC_AVAIL 'p'
-X#define DI_FMT_BPERC_FREE '1'
-X#define DI_FMT_BPERC_BSD '2'
-X#define DI_FMT_ITOT 'i'
-X#define DI_FMT_IUSED 'U'
-X#define DI_FMT_IFREE 'F'
-X#define DI_FMT_IPERC 'P'
-X#define DI_FMT_MOUNT_TIME 'I'
-X#define DI_FMT_MOUNT_OPTIONS 'O'
-X
-X#define DI_IGNORE 0
-X#define DI_OK 1
-X#define DI_BAD 2
-X
-X#define DI_SORT_NONE 0
-X#define DI_SORT_NAME 1
-X#define DI_SORT_SPECIAL 2
-X
-X#define DI_SORT_ASCENDING 1
-X#define DI_SORT_DESCENDING -1
-X
-X#define DI_UNKNOWN_DEV -1L
-X#define DI_LIST_SEP ","
-X
-X#define DI_ALL_FORMAT "MTS\n\tIO\n\tbuf1\n\tbcvp\n\tBuv2\n\tiUFP"
-X
-X#define DI_HALF_K 512.0
-X#define DI_ONE_K 1024.0
-X#define DI_ONE_MEG 1048576.0
-X#define DI_ONE_GIG 1073241824.0
-X
-X#if ! defined (MAXPATHLEN)
-X# define MAXPATHLEN 255
-X#endif
-X#define DI_SPEC_NAME_LEN MAXPATHLEN
-X#define DI_OPT_LEN MAXPATHLEN
-X#define DI_MNT_TIME_LEN 24
-X
-X#define DI_RETRY_COUNT 5
-X#define DI_MAX_REMOTE_TYPES 20
-X
-X /* you may want to change some of these values. Be sure to change all */
-X /* related entries. */
-X/* #define DI_DEFAULT_FORMAT "mbuvpiUFP" */
-X#if ! defined (DI_DEFAULT_FORMAT)
-X# define DI_DEFAULT_FORMAT "smbuvpT"
-X#endif
-X#if defined (HAS_MNT_TIME)
-X# define DI_DEF_MOUNT_FORMAT "MSTIO"
-X#else
-X# define DI_DEF_MOUNT_FORMAT "MSTO"
-X#endif
-X#define DI_PERC_FMT "%3.0f%% "
-X#define DI_PERC_LBL_FMT "%5s"
-X#define DI_NAME_LEN MAXPATHLEN
-X#define DI_FSTYPE_FMT "%-7.7s"
-X#define DI_MOUNT_FMT "%-15.15s"
-X#define DI_SPEC_FMT "%-18.18s"
-X
-X#define DI_UNKNOWN_FSTYPE "Unknown fstyp %.2d"
-X
-Xtypedef unsigned long _ulong;
-Xtypedef int (*DI_SORT_FUNC) _((char *, char *));
-X
-Xtypedef struct
-X{
-X double totalBlocks;
-X double freeBlocks;
-X double availBlocks;
-X _fs_size_t totalInodes;
-X _fs_size_t freeInodes;
-X _fs_size_t availInodes;
-X _ulong st_dev; /* disk device number */
-X _ulong sp_dev; /* special device number*/
-X _ulong sp_rdev; /* special rdev # */
-X char printFlag; /* do we want to print */
-X /* this entry? */
-X char isLocal; /* is this mount point */
-X /* local? */
-X char name [DI_NAME_LEN + 1]; /* mount point */
-X char special [DI_SPEC_NAME_LEN + 1]; /* special device name */
-X char fsType [DI_TYPE_LEN + 1]; /* type of file system */
-X char options [DI_OPT_LEN + 1];
-X char mountTime [DI_MNT_TIME_LEN + 1];
-X} DiskInfo;
-X
-Xstatic DiskInfo *diskInfo = { (DiskInfo *) NULL };
-Xstatic int diCount = { 0 };
-Xstatic int debug = { 0 };
-Xstatic _ulong flags = { 0 };
-Xstatic int sortType = { DI_SORT_NAME };
-Xstatic int sortOrder = { DI_SORT_ASCENDING };
-Xstatic char *formatString = { DI_DEFAULT_FORMAT };
-Xstatic char mountFormat [20];
-X static char specialFormat [20];
-Xstatic char typeFormat [20];
-Xstatic char optFormat [20];
-Xstatic char mTimeFormat [20];
-Xstatic int width = { 8 };
-Xstatic int inodeWidth = { 7 };
-Xstatic char blockFormat [20];
-Xstatic char blockLabelFormat [20];
-Xstatic char inodeFormat [20];
-Xstatic char inodeLabelFormat [20];
-Xstatic char **ignoreList = { (char **) NULL };
-Xstatic char **includeList = { (char **) NULL };
-Xstatic double dispBlockSize = { DI_ONE_MEG };
-Xstatic int remoteFileSystemCount = { 0 };
-Xstatic char remoteFileSystemTypes [DI_MAX_REMOTE_TYPES][DI_TYPE_LEN];
-X
-X
-Xstatic void cleanup _((void));
-Xstatic void printDiskInfo _((void));
-Xstatic void printInfo _((DiskInfo *));
-Xstatic void addTotals _((DiskInfo *, DiskInfo *));
-Xstatic void printTitle _((void));
-Xstatic void printPerc _((double, double, char *));
-Xstatic char *Realloc _((char *, long));
-Xstatic void sortArray _((char *, int, int, DI_SORT_FUNC));
-Xstatic int diCompare _((char *, char *));
-Xstatic void getDiskStatInfo _((void));
-Xstatic void getDiskSpecialInfo _((void));
-Xstatic void printFileInfo _((int, int, char *[]));
-Xstatic void checkDiskInfo _((void));
-Xstatic void usage _((void));
-Xstatic void processArgs _((int, char *[]));
-Xstatic void parseList _((char ***, char *));
-Xstatic void checkIgnoreList _((DiskInfo *));
-Xstatic void checkIncludeList _((DiskInfo *));
-X
-Xstatic int getDiskEntries _((void));
-Xstatic void getDiskInfo _((void));
-X
-Xint
-X#if defined (CAN_PROTOTYPE)
-Xmain (int argc, char *argv [])
-X#else
-Xmain (argc, argv)
-X int argc;
-X char *argv [];
-X#endif
-X{
-X char *ptr;
-X
-X
-X ptr = argv [0] + strlen (argv [0]) - 2;
-X if (memcmp (ptr, MPROG, 2) == 0)
-X {
-X formatString = DI_DEF_MOUNT_FORMAT;
-X }
-X else /* don't use DIFMT env var if running mi. */
-X {
-X if ((ptr = getenv ("DIFMT")) != (char *) NULL)
-X {
-X formatString = ptr;
-X }
-X }
-X
-X processArgs (argc, argv);
-X if (debug > 0)
-X {
-X printf ("di ver $Revision$\n");
-X }
-X
-X if (getDiskEntries () < 0)
-X {
-X cleanup ();
-X exit (1);
-X }
-X
-X getDiskInfo ();
-X getDiskSpecialInfo ();
-X checkDiskInfo ();
-X if (optind < argc)
-X {
-X getDiskStatInfo ();
-X printFileInfo (optind, argc, argv);
-X }
-X else
-X {
-X printDiskInfo ();
-X }
-X
-X cleanup ();
-X exit (0);
-X}
-X
-X/*
-X * cleanup
-X *
-X * free up allocated memory
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-Xcleanup (void)
-X#else
-Xcleanup ()
-X#endif
-X{
-X char **lptr;
-X
-X
-X if (diskInfo != (DiskInfo *) NULL)
-X {
-X free ((char *) diskInfo);
-X }
-X
-X if (ignoreList != (char **) NULL)
-X {
-X lptr = ignoreList;
-X while (*lptr != (char *) NULL)
-X {
-X free ((char *) *lptr);
-X ++lptr;
-X }
-X free ((char *) ignoreList);
-X }
-X
-X if (includeList != (char **) NULL)
-X {
-X lptr = includeList;
-X while (*lptr != (char *) NULL)
-X {
-X free ((char *) *lptr);
-X ++lptr;
-X }
-X free ((char *) includeList);
-X }
-X}
-X
-X/*
-X * printDiskInfo
-X *
-X * Print out the disk information table.
-X * Loops through all mounted disks, prints and calculates totals.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XprintDiskInfo (void)
-X#else
-XprintDiskInfo ()
-X#endif
-X{
-X int i;
-X DiskInfo totals;
-X
-X
-X memset ((char *) &totals, '\0', sizeof (DiskInfo));
-X strcpy (totals.name, "Total");
-X totals.printFlag = DI_OK;
-X
-X if ((flags & DI_F_NO_HEADER) != DI_F_NO_HEADER)
-X {
-X printTitle ();
-X }
-X
-X if (sortType != DI_SORT_NONE)
-X {
-X sortArray ((char *) diskInfo, sizeof (DiskInfo), diCount, diCompare);
-X }
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X if (( (flags & DI_F_ALL) == DI_F_ALL &&
-X diskInfo [i].printFlag != DI_BAD) ||
-X diskInfo [i].printFlag == DI_OK)
-X {
-X printInfo (&diskInfo [i]);
-X addTotals (&diskInfo [i], &totals);
-X }
-X }
-X
-X if ((flags & DI_F_TOTAL) == DI_F_TOTAL &&
-X (flags & DI_F_NO_HEADER) != DI_F_NO_HEADER)
-X {
-X printInfo (&totals);
-X }
-X}
-X
-X/*
-X * printInfo
-X *
-X * Print the information for a single partition. Loop through the
-X * format string and print the particular items wanted.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XprintInfo (DiskInfo *diskInfo)
-X#else
-XprintInfo (diskInfo)
-X DiskInfo *diskInfo;
-X#endif
-X{
-X double used;
-X double totAvail;
-X char *ptr;
-X int valid;
-X
-X
-X ptr = formatString;
-X while (*ptr)
-X {
-X valid = TRUE;
-X
-X switch (*ptr)
-X {
-X case DI_FMT_MOUNT:
-X {
-X printf (DI_MOUNT_FMT, diskInfo->name);
-X break;
-X }
-X
-X case DI_FMT_MOUNT_FULL:
-X {
-X printf (mountFormat, diskInfo->name);
-X break;
-X }
-X
-X case DI_FMT_BTOT:
-X {
-X printf (blockFormat, diskInfo->totalBlocks);
-X break;
-X }
-X
-X case DI_FMT_BTOT_AVAIL:
-X {
-X printf (blockFormat, diskInfo->totalBlocks -
-X (diskInfo->freeBlocks - diskInfo->availBlocks));
-X break;
-X }
-X
-X case DI_FMT_BUSED:
-X {
-X printf (blockFormat, diskInfo->totalBlocks -
-X diskInfo->freeBlocks);
-X break;
-X }
-X
-X case DI_FMT_BCUSED:
-X {
-X printf (blockFormat, diskInfo->totalBlocks - diskInfo->availBlocks);
-X break;
-X }
-X
-X case DI_FMT_BFREE:
-X {
-X printf (blockFormat, diskInfo->freeBlocks);
-X break;
-X }
-X
-X case DI_FMT_BAVAIL:
-X {
-X printf (blockFormat, diskInfo->availBlocks);
-X break;
-X }
-X
-X case DI_FMT_BPERC_AVAIL:
-X {
-X used = diskInfo->totalBlocks - diskInfo->availBlocks;
-X totAvail = diskInfo->totalBlocks;
-X printPerc (used, totAvail, DI_PERC_FMT);
-X break;
-X }
-X
-X case DI_FMT_BPERC_FREE:
-X {
-X used = diskInfo->totalBlocks - diskInfo->freeBlocks;
-X totAvail = diskInfo->totalBlocks;
-X printPerc (used, totAvail, DI_PERC_FMT);
-X break;
-X }
-X
-X case DI_FMT_BPERC_BSD:
-X {
-X used = diskInfo->totalBlocks - diskInfo->freeBlocks;
-X totAvail = diskInfo->totalBlocks -
-X (diskInfo->freeBlocks - diskInfo->availBlocks);
-X printPerc (used, totAvail, DI_PERC_FMT);
-X break;
-X }
-X
-X case DI_FMT_ITOT:
-X {
-X printf (inodeFormat, diskInfo->totalInodes);
-X break;
-X }
-X
-X case DI_FMT_IUSED:
-X {
-X printf (inodeFormat, diskInfo->totalInodes - diskInfo->freeInodes);
-X break;
-X }
-X
-X case DI_FMT_IFREE:
-X {
-X printf (inodeFormat, diskInfo->freeInodes);
-X break;
-X }
-X
-X case DI_FMT_IPERC:
-X {
-X used = diskInfo->totalInodes - diskInfo->availInodes;
-X totAvail = diskInfo->totalInodes;
-X printPerc (used, totAvail, DI_PERC_FMT);
-X break;
-X }
-X
-X case DI_FMT_SPECIAL:
-X {
-X printf (DI_SPEC_FMT, diskInfo->special);
-X break;
-X }
-X
-X case DI_FMT_SPECIAL_FULL:
-X {
-X printf (specialFormat, diskInfo->special);
-X break;
-X }
-X
-X case DI_FMT_TYPE:
-X {
-X printf (DI_FSTYPE_FMT, diskInfo->fsType);
-X break;
-X }
-X
-X case DI_FMT_TYPE_FULL:
-X {
-X printf (typeFormat, diskInfo->fsType);
-X break;
-X }
-X
-X case DI_FMT_MOUNT_OPTIONS:
-X {
-X printf (optFormat, diskInfo->options);
-X break;
-X }
-X
-X case DI_FMT_MOUNT_TIME:
-X {
-X#if defined (HAS_MNT_TIME)
-X printf (mTimeFormat, diskInfo->mountTime);
-X#endif
-X break;
-X }
-X
-X default:
-X {
-X printf ("%c", *ptr);
-X valid = FALSE;
-X break;
-X }
-X }
-X
-X ++ptr;
-X if (*ptr && valid)
-X {
-X printf (" ");
-X }
-X }
-X
-X printf ("\n");
-X}
-X
-X/*
-X * addTotals
-X *
-X * Add up the totals for the blocks/inodes
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XaddTotals (DiskInfo *diskInfo, DiskInfo *totals)
-X#else
-XaddTotals (diskInfo, totals)
-X DiskInfo *diskInfo;
-X DiskInfo *totals;
-X#endif
-X{
-X totals->totalBlocks += diskInfo->totalBlocks;
-X totals->freeBlocks += diskInfo->freeBlocks;
-X totals->availBlocks += diskInfo->availBlocks;
-X totals->totalInodes += diskInfo->totalInodes;
-X totals->freeInodes += diskInfo->freeInodes;
-X totals->availInodes += diskInfo->availInodes;
-X}
-X
-X/*
-X * printTitle
-X *
-X * Loop through the format string and print the appropriate headings.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XprintTitle (void)
-X#else
-XprintTitle ()
-X#endif
-X{
-X char *ptr;
-X int valid;
-X char tbuff [20];
-X
-X if ((flags & DI_F_DEBUG_HDR) == DI_F_DEBUG_HDR)
-X {
-X printf ("di ver $Revision$ Default Format: %s\n",
-X DI_DEFAULT_FORMAT);
-X }
-X
-X ptr = formatString;
-X
-X while (*ptr)
-X {
-X valid = TRUE;
-X
-X switch (*ptr)
-X {
-X case DI_FMT_MOUNT:
-X {
-X printf (DI_MOUNT_FMT, "Mount");
-X break;
-X }
-X
-X case DI_FMT_MOUNT_FULL:
-X {
-X printf (mountFormat, "Mount");
-X break;
-X }
-X
-X case DI_FMT_BTOT:
-X case DI_FMT_BTOT_AVAIL:
-X {
-X if (dispBlockSize == DI_ONE_K)
-X {
-X printf (blockLabelFormat, "Kbytes");
-X }
-X else if (dispBlockSize == DI_ONE_MEG)
-X {
-X printf (blockLabelFormat, " Megs");
-X }
-X else if (dispBlockSize == DI_ONE_GIG)
-X {
-X printf (blockLabelFormat, " Gigs");
-X }
-X else if (dispBlockSize == DI_HALF_K)
-X {
-X printf (blockLabelFormat, " 512b");
-X }
-X else
-X {
-X sprintf (tbuff, "%6.0f", dispBlockSize);
-X printf (blockLabelFormat, tbuff);
-X }
-X break;
-X }
-X
-X case DI_FMT_BUSED:
-X case DI_FMT_BCUSED:
-X {
-X printf (blockLabelFormat, "Used");
-X break;
-X }
-X
-X case DI_FMT_BFREE:
-X {
-X printf (blockLabelFormat, "Free");
-X break;
-X }
-X
-X case DI_FMT_BAVAIL:
-X {
-X printf (blockLabelFormat, "Avail");
-X break;
-X }
-X
-X case DI_FMT_BPERC_AVAIL:
-X case DI_FMT_BPERC_FREE:
-X case DI_FMT_BPERC_BSD:
-X {
-X printf (DI_PERC_LBL_FMT, "%used");
-X break;
-X }
-X
-X case DI_FMT_ITOT:
-X {
-X printf (inodeLabelFormat, "Inodes");
-X break;
-X }
-X
-X case DI_FMT_IUSED:
-X {
-X printf (inodeLabelFormat, "Used");
-X break;
-X }
-X
-X case DI_FMT_IFREE:
-X {
-X printf (inodeLabelFormat, "Free");
-X break;
-X }
-X
-X case DI_FMT_IPERC:
-X {
-X printf (DI_PERC_LBL_FMT, "%used");
-X break;
-X }
-X
-X case DI_FMT_SPECIAL:
-X {
-X printf (DI_SPEC_FMT, "Filesystem");
-X break;
-X }
-X
-X case DI_FMT_SPECIAL_FULL:
-X {
-X printf (specialFormat, "Filesystem");
-X break;
-X }
-X
-X case DI_FMT_TYPE:
-X {
-X printf (DI_FSTYPE_FMT, "fsType");
-X break;
-X }
-X
-X case DI_FMT_TYPE_FULL:
-X {
-X printf (typeFormat, "fs Type");
-X break;
-X }
-X
-X case DI_FMT_MOUNT_OPTIONS:
-X {
-X printf (optFormat, "Options");
-X break;
-X }
-X
-X case DI_FMT_MOUNT_TIME:
-X {
-X#if defined (HAS_MNT_TIME)
-X printf (mTimeFormat, "Mount Time");
-X#endif
-X break;
-X }
-X
-X default:
-X {
-X printf ("%c", *ptr);
-X valid = FALSE;
-X break;
-X }
-X }
-X
-X ++ptr;
-X if (*ptr && valid)
-X {
-X printf (" ");
-X }
-X }
-X
-X printf ("\n");
-X}
-X
-X/*
-X * printPerc
-X *
-X * Calculate and print a percentage using the values and format passed.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XprintPerc (double used, double totAvail, char *format)
-X#else
-XprintPerc (used, totAvail, format)
-X double used;
-X double totAvail;
-X char *format;
-X#endif
-X{
-X double perc;
-X
-X
-X if (totAvail > 0.0)
-X {
-X perc = used / totAvail;
-X perc *= 100.0;
-X }
-X else
-X {
-X perc = 0.0;
-X }
-X printf (format, perc);
-X}
-X
-X
-X/*
-X * Realloc
-X *
-X * portable realloc
-X *
-X */
-X
-Xstatic char *
-X#if defined (CAN_PROTOTYPE)
-XRealloc (char *ptr, long size)
-X#else
-XRealloc (ptr, size)
-X char *ptr;
-X long size;
-X#endif
-X{
-X if (ptr == (char *) NULL)
-X {
-X ptr = (char *) malloc (size);
-X }
-X else
-X {
-X ptr = (char *) realloc (ptr, size);
-X }
-X
-X return ptr;
-X}
-X
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XprintFileInfo (int optind, int argc, char *argv [])
-X#else
-XprintFileInfo (optind, argc, argv)
-X int optind;
-X int argc;
-X char *argv [];
-X#endif
-X{
-X int i;
-X int j;
-X struct stat statBuf;
-X DiskInfo totals;
-X
-X
-X memset ((char *) &totals, '\0', sizeof (DiskInfo));
-X strcpy (totals.name, "Total");
-X totals.printFlag = DI_OK;
-X
-X if ((flags & DI_F_NO_HEADER) != DI_F_NO_HEADER)
-X {
-X printTitle ();
-X }
-X
-X for (i = optind; i < argc; ++i)
-X {
-X if (stat (argv [i], &statBuf) == 0)
-X {
-X for (j = 0; j < diCount; ++j)
-X {
-X if (diskInfo [j].printFlag != DI_BAD &&
-X diskInfo [j].st_dev != DI_UNKNOWN_DEV &&
-X (_ulong) statBuf.st_dev == diskInfo [j].st_dev)
-X {
-X printInfo (&diskInfo [j]);
-X addTotals (&diskInfo [j], &totals);
-X break; /* out of inner for */
-X }
-X }
-X } /* if stat ok */
-X else
-X {
-X fprintf (stderr, "stat: %s ", argv[i]);
-X perror ("");
-X }
-X } /* for each file specified on command line */
-X
-X if ((flags & DI_F_TOTAL) == DI_F_TOTAL && (flags & DI_F_NO_HEADER) != DI_F_NO_HEADER)
-X {
-X printInfo (&totals);
-X }
-X}
-X
-X/*
-X * sortArray ()
-X *
-X * shellsort!
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XsortArray (char *data, int dataSize, int count, DI_SORT_FUNC compareFunc)
-X#else
-XsortArray (data, dataSize, count, compareFunc)
-X char *data;
-X int dataSize;
-X int count;
-X DI_SORT_FUNC compareFunc;
-X#endif
-X{
-X register int j;
-X char *tempData;
-X int i;
-X int gap;
-X
-X
-X if (count <= 1)
-X {
-X return;
-X }
-X
-X tempData = (char *) malloc ((unsigned) dataSize);
-X if (tempData == (char *) NULL)
-X {
-X fprintf (stderr, "malloc failed in sortArray(). errno %d\n", errno);
-X cleanup ();
-X exit (1);
-X }
-X
-X gap = 1;
-X while (gap < count)
-X {
-X gap = 3 * gap + 1;
-X }
-X
-X for (gap /= 3; gap > 0; gap /= 3)
-X {
-X for (i = gap; i < count; ++i)
-X {
-X memcpy ((char *) tempData, (char *) &(data [i * dataSize]),
-X dataSize);
-X j = i - gap;
-X
-X while (j >= 0 &&
-X compareFunc (&(data [j * dataSize]), tempData) > 0)
-X {
-X memcpy ((char *) &(data [(j + gap) * dataSize]),
-X (char *) &(data [j * dataSize]), dataSize);
-X j -= gap;
-X }
-X
-X j += gap;
-X if (j != i)
-X {
-X memcpy ((char *) &(data [j * dataSize]),
-X (char *) tempData, dataSize);
-X }
-X }
-X }
-X
-X free ((char *) tempData);
-X}
-X
-X
-Xstatic int
-X#if defined (CAN_PROTOTYPE)
-XdiCompare (char *a, char *b)
-X#else
-XdiCompare (a, b)
-X char *a;
-X char *b;
-X#endif
-X{
-X DiskInfo *di1;
-X DiskInfo *di2;
-X
-X
-X di1 = (DiskInfo *) a;
-X di2 = (DiskInfo *) b;
-X
-X
-X switch (sortType)
-X {
-X case DI_SORT_NONE:
-X {
-X break;
-X }
-X
-X case DI_SORT_NAME:
-X {
-X return (strcmp (di1->name, di2->name) * sortOrder);
-X }
-X
-X case DI_SORT_SPECIAL:
-X {
-X return (strcmp (di1->special, di2->special) * sortOrder);
-X }
-X } /* switch on sort type */
-X
-X return 0;
-X}
-X
-X
-X/*
-X * getDiskStatInfo
-X *
-X * gets the disk device number for each entry.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XgetDiskStatInfo (void)
-X#else
-XgetDiskStatInfo ()
-X#endif
-X{
-X int i;
-X struct stat statBuf;
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X diskInfo [i].st_dev = (_ulong) DI_UNKNOWN_DEV;
-X
-X if (stat (diskInfo [i].name, &statBuf) == 0)
-X {
-X diskInfo [i].st_dev = (_ulong) statBuf.st_dev;
-X if (debug > 2)
-X {
-X printf ("dev: %s: %ld\n", diskInfo [i].name,
-X diskInfo [i].st_dev);
-X }
-X }
-X else
-X {
-X fprintf (stderr, "stat: %s ", diskInfo [i].name);
-X perror ("");
-X }
-X }
-X}
-X
-X/*
-X * getDiskSpecialInfo
-X *
-X * gets the disk device number for each entry.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XgetDiskSpecialInfo (void)
-X#else
-XgetDiskSpecialInfo ()
-X#endif
-X{
-X int i;
-X struct stat statBuf;
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X if (stat (diskInfo [i].special, &statBuf) == 0)
-X {
-X diskInfo [i].sp_dev = (_ulong) statBuf.st_dev;
-X diskInfo [i].sp_rdev = (_ulong) statBuf.st_rdev;
-X if (debug > 2)
-X {
-X printf ("special dev: %s: %ld rdev: %ld\n", diskInfo [i].special,
-X diskInfo [i].sp_dev, diskInfo [i].sp_rdev);
-X }
-X }
-X else
-X {
-X diskInfo [i].sp_dev = 0;
-X diskInfo [i].sp_rdev = 0;
-X }
-X }
-X}
-X
-X/*
-X * checkDiskInfo
-X *
-X * checks the disk information returned for various return values.
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XcheckDiskInfo (void)
-X#else
-XcheckDiskInfo ()
-X#endif
-X{
-X int i;
-X int j;
-X int dupCount;
-X int len;
-X int maxMountString;
-X int maxSpecialString;
-X int maxTypeString;
-X int maxOptString;
-X int maxMntTimeString;
-X _fs_size_t temp;
-X _ulong sp_dev;
-X _ulong sp_rdev;
-X
-X
-X maxMountString = (flags & DI_F_NO_HEADER) == DI_F_NO_HEADER ? 0 : 5;
-X maxSpecialString = (flags & DI_F_NO_HEADER) == DI_F_NO_HEADER ? 0 : 10;
-X maxTypeString = (flags & DI_F_NO_HEADER) == DI_F_NO_HEADER ? 0 : 7;
-X maxOptString = (flags & DI_F_NO_HEADER) == DI_F_NO_HEADER ? 0 : 7;
-X maxMntTimeString = (flags & DI_F_NO_HEADER) == DI_F_NO_HEADER ? 0 : 26;
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X /* Solaris reports a cdrom as having no free blocks, */
-X /* no available. Their df doesn't always work right! */
-X /* -1 is returned. */
-X if (debug > 2)
-X {
-X printf ("chk: %s free: %f\n", diskInfo [i].name,
-X diskInfo [i].freeBlocks);
-X }
-X if (diskInfo [i].freeBlocks < 0.0)
-X {
-X diskInfo [i].freeBlocks = 0.0;
-X }
-X if (diskInfo [i].availBlocks < 0.0)
-X {
-X diskInfo [i].availBlocks = 0.0;
-X }
-X
-X temp = ~ 0;
-X if (diskInfo [i].totalInodes == temp)
-X {
-X diskInfo [i].totalInodes = 0;
-X diskInfo [i].freeInodes = 0;
-X diskInfo [i].availInodes = 0;
-X }
-X
-X if (debug > 2)
-X {
-X printf ("chk: %s total: %f\n", diskInfo [i].name,
-X diskInfo [i].totalBlocks);
-X }
-X if (diskInfo [i].totalBlocks <= 0.0 &&
-X diskInfo [i].printFlag != DI_BAD)
-X {
-X diskInfo [i].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("chk: ignore: totalBlocks <= 0: %s\n",
-X diskInfo [i].name);
-X }
-X }
-X
-X checkIgnoreList (&diskInfo [i]);
-X checkIncludeList (&diskInfo [i]);
-X } /* for all disks */
-X
-X /* this loop sets duplicate entries to be ignored. */
-X for (i = 0; i < diCount; ++i)
-X {
-X /* don't need to bother checking real partitions */
-X /* don't bother if already ignored */
-X if (diskInfo [i].sp_rdev != 0 &&
-X (diskInfo [i].printFlag == DI_OK ||
-X ((flags & DI_F_ALL) == DI_F_ALL &&
-X diskInfo [i].printFlag != DI_BAD)))
-X {
-X sp_dev = diskInfo [i].sp_dev;
-X sp_rdev = diskInfo [i].sp_rdev;
-X dupCount = 0;
-X
-X for (j = 0; j < diCount; ++j)
-X {
-X if (diskInfo [j].sp_dev == sp_rdev)
-X {
-X ++dupCount;
-X }
-X }
-X
-X if (debug > 2)
-X {
-X printf ("dup: chk: %s %ld %ld dup: %d\n", diskInfo [i].name,
-X sp_dev, sp_rdev, dupCount);
-X }
-X
-X for (j = 0; dupCount > 0 && j < diCount; ++j)
-X {
-X if (diskInfo [j].sp_rdev == 0 &&
-X diskInfo [j].sp_dev == sp_rdev)
-X {
-X diskInfo [j].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("chk: ignore: duplicate: %s\n",
-X diskInfo [j].name);
-X }
-X }
-X } /* duplicate check for each disk */
-X } /* if this is a printable disk */
-X else
-X {
-X if (debug > 2)
-X {
-X printf ("chk: dup: not checked: %s prnt: %d dev: %ld rdev: %ld\n",
-X diskInfo [i].name, diskInfo [i].printFlag,
-X diskInfo [i].sp_dev, diskInfo [i].sp_rdev);
-X }
-X }
-X } /* for each disk */
-X
-X /* this loop gets the max string lengths */
-X for (i = 0; i < diCount; ++i)
-X {
-X if (diskInfo [i].printFlag == DI_OK || (flags & DI_F_ALL) == DI_F_ALL)
-X {
-X len = strlen (diskInfo [i].name);
-X if (len > maxMountString)
-X {
-X maxMountString = len;
-X }
-X
-X len = strlen (diskInfo [i].special);
-X if (len > maxSpecialString)
-X {
-X maxSpecialString = len;
-X }
-X
-X len = strlen (diskInfo [i].fsType);
-X if (len > maxTypeString)
-X {
-X maxTypeString = len;
-X }
-X
-X len = strlen (diskInfo [i].options);
-X if (len > maxOptString)
-X {
-X maxOptString = len;
-X }
-X
-X len = strlen (diskInfo [i].mountTime);
-X if (len > maxMntTimeString)
-X {
-X maxMntTimeString = len;
-X }
-X } /* if we are printing this item */
-X } /* for all disks */
-X
-X sprintf (mountFormat, "%%-%d.%ds", maxMountString, maxMountString);
-X sprintf (specialFormat, "%%-%d.%ds", maxSpecialString,
-X maxSpecialString);
-X sprintf (typeFormat, "%%-%d.%ds", maxTypeString, maxTypeString);
-X sprintf (optFormat, "%%-%d.%ds", maxOptString, maxOptString);
-X sprintf (mTimeFormat, "%%-%d.%ds", maxMntTimeString, maxMntTimeString);
-X
-X if (dispBlockSize <= DI_ONE_K)
-X {
-X sprintf (blockFormat, "%%%d.0f", width);
-X }
-X else
-X {
-X sprintf (blockFormat, "%%%d.1f", width);
-X }
-X sprintf (blockLabelFormat, "%%%ds", width);
-X#if defined (HAS_64BIT_STATFS_FLDS)
-X sprintf (inodeFormat, "%%%dllu", inodeWidth);
-X#else
-X sprintf (inodeFormat, "%%%dlu", inodeWidth);
-X#endif
-X sprintf (inodeLabelFormat, "%%%ds", inodeWidth);
-X}
-X
-X/*
-X * usage
-X *
-X */
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-Xusage (void)
-X#else
-Xusage ()
-X#endif
-X{
-X printf ("di ver $Revision$ Default Format: %s\n", DI_DEFAULT_FORMAT);
-X /* 12345678901234567890123456789012345678901234567890123456789012345678901234567890 */
-X printf ("Usage: di [-ant] [-f format] [-s sort-type] [-i ignore-fstyp-list]\n");
-X printf (" [-I include-fstyp-list] [-w kbyte-width] [-W inode-width] [file [...]]\n");
-X printf (" -a : print all mounted devices; normally, those with 0 total blocks are\n");
-X printf (" not printed. e.g. /dev/proc, /dev/fd.\n");
-X printf (" -d x : size to print blocks in (p - posix (512), k - kbytes,\n");
-X printf (" m - megabytes, g - gigabytes, <x> - numeric size).\n");
-X printf (" -f x : use format string <x>\n");
-X printf (" -i x : ignore file system types in <x>\n");
-X printf (" -I x : include only file system types in <x>\n");
-X printf (" -l : display local filesystems only\n");
-X printf (" -n : don't print header\n");
-X printf (" -s t : sort type; n - no sort, s - by special device, r - reverse\n");
-X printf (" -t : print totals\n");
-X printf (" -w n : use width <n> for kbytes\n");
-X printf (" -W n : use width <n> for i-nodes\n");
-X printf (" Format string values:\n");
-X printf (" m - mount point M - mount point, full length\n");
-X printf (" b - total kbytes B - kbytes available for use\n");
-X printf (" u - used kbytes c - calculated kbytes in use\n");
-X printf (" f - kbytes free v - kbytes available\n");
-X printf (" p - percentage not avail. for use 1 - percentage used\n");
-X printf (" 2 - percentage of user-available space in use.\n");
-X printf (" i - total file slots (i-nodes) U - used file slots\n");
-X printf (" F - free file slots P - percentage file slots used\n");
-X printf (" s - filesystem name S - filesystem name, full length\n");
-X printf (" t - disk partition type T - partition type, full length\n");
-X}
-X
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XprocessArgs (int argc, char *argv [])
-X#else
-XprocessArgs (argc, argv)
-X int argc;
-X char *argv [];
-X#endif
-X{
-X int ch;
-X
-X
-X while ((ch = getopt (argc, argv, "Aad:f:hi:I:Flns:tw:W:x:")) != -1)
-X {
-X switch (ch)
-X {
-X case 'A':
-X {
-X formatString = DI_ALL_FORMAT;
-X flags |= DI_F_ALL | DI_F_DEBUG_HDR | DI_F_TOTAL;
-X flags &= ~ DI_F_NO_HEADER;
-X width = 10;
-X inodeWidth = 10;
-X break;
-X }
-X
-X case 'a':
-X {
-X flags |= DI_F_ALL;
-X break;
-X }
-X
-X case 'd':
-X {
-X switch (tolower (*optarg))
-X {
-X case 'p':
-X {
-X dispBlockSize = DI_HALF_K;
-X break;
-X }
-X
-X case 'k':
-X {
-X dispBlockSize = DI_ONE_K;
-X break;
-X }
-X
-X case 'm':
-X {
-X dispBlockSize = DI_ONE_MEG;
-X break;
-X }
-X
-X case 'g':
-X {
-X dispBlockSize = DI_ONE_GIG;
-X break;
-X }
-X
-X default:
-X {
-X if (isdigit ((int) (*optarg)))
-X {
-X dispBlockSize = atof (optarg);
-X }
-X break;
-X }
-X }
-X break;
-X }
-X
-X case 'f':
-X {
-X formatString = optarg;
-X break;
-X }
-X
-X case 'h':
-X {
-X usage ();
-X cleanup ();
-X exit (0);
-X }
-X
-X case 'i':
-X {
-X parseList (&ignoreList, optarg);
-X break;
-X }
-X
-X case 'I':
-X {
-X parseList (&includeList, optarg);
-X break;
-X }
-X
-X case 'l':
-X {
-X flags |= DI_F_LOCAL_ONLY;
-X break;
-X }
-X
-X case 'n':
-X {
-X flags |= DI_F_NO_HEADER;
-X break;
-X }
-X
-X case 's':
-X {
-X switch (ch)
-X {
-X case 's':
-X {
-X sortType = DI_SORT_SPECIAL;
-X break;
-X }
-X
-X case 'n':
-X {
-X sortType = DI_SORT_NONE;
-X break;
-X }
-X
-X case 'r':
-X {
-X sortOrder = DI_SORT_DESCENDING;
-X break;
-X }
-X }
-X break;
-X }
-X
-X case 't':
-X {
-X flags |= DI_F_TOTAL;
-X break;
-X }
-X
-X case 'w':
-X {
-X width = atoi (optarg);
-X break;
-X }
-X
-X case 'W':
-X {
-X inodeWidth = atoi (optarg);
-X break;
-X }
-X
-X case 'x':
-X {
-X debug = atoi (optarg);
-X break;
-X }
-X
-X case '?':
-X {
-X usage ();
-X cleanup ();
-X exit (1);
-X }
-X }
-X }
-X}
-X
-X /* list is assumed to be global */
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XparseList (char ***list, char *str)
-X#else
-XparseList (list, str)
-X char ***list;
-X char *str;
-X#endif
-X{
-X char *dstr;
-X char *ptr;
-X char **lptr;
-X int count;
-X int i;
-X int len;
-X
-X i = strlen (str);
-X dstr = (char *) malloc (i + 1);
-X if (dstr == (char *) NULL)
-X {
-X fprintf (stderr, "malloc failed in parseList() (1). errno %d\n", errno);
-X cleanup ();
-X exit (1);
-X }
-X
-X memcpy (dstr, str, i + 1);
-X
-X ptr = strtok (dstr, DI_LIST_SEP);
-X count = 0;
-X while (ptr != (char *) NULL)
-X {
-X ++count;
-X ptr = strtok ((char *) NULL, DI_LIST_SEP);
-X }
-X
-X *list = (char **) malloc ((count + 1) * sizeof (char *));
-X if (*list == (char **) NULL)
-X {
-X fprintf (stderr, "malloc failed in parseList() (2). errno %d\n", errno);
-X cleanup ();
-X exit (1);
-X }
-X
-X ptr = dstr;
-X lptr = *list;
-X for (i = 0; i < count; ++i)
-X {
-X len = strlen (ptr);
-X *lptr = (char *) malloc (len + 1);
-X if (*lptr == (char *) NULL)
-X {
-X fprintf (stderr, "malloc failed in parseList() (3). errno %d\n",
-X errno);
-X cleanup ();
-X exit (1);
-X }
-X strcpy (*lptr, ptr);
-X ptr += len + 1;
-X ++lptr;
-X }
-X
-X *lptr = (char *) NULL;
-X free ((char *) dstr);
-X}
-X
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XcheckIgnoreList (DiskInfo *diskInfo)
-X#else
-XcheckIgnoreList (diskInfo)
-X DiskInfo *diskInfo;
-X#endif
-X{
-X char **ptr;
-X
-X /* if the file system type is in the ignore list, skip it */
-X if (ignoreList != (char **) NULL)
-X {
-X ptr = ignoreList;
-X while (*ptr != (char *) NULL)
-X {
-X if (strcmp (*ptr, diskInfo->fsType) == 0)
-X {
-X diskInfo->printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("chkign: ignore: fstype %s match: %s\n", *ptr,
-X diskInfo->name);
-X }
-X break;
-X }
-X ++ptr;
-X }
-X } /* if an ignore list was specified */
-X}
-X
-Xstatic void
-X#if defined (CAN_PROTOTYPE)
-XcheckIncludeList (DiskInfo *diskInfo)
-X#else
-XcheckIncludeList (diskInfo)
-X DiskInfo *diskInfo;
-X#endif
-X{
-X char **ptr;
-X
-X /* if the file system type is not in the include list, skip it */
-X if (includeList != (char **) NULL)
-X {
-X ptr = includeList;
-X while (*ptr != (char *) NULL)
-X {
-X if (strcmp (*ptr, diskInfo->fsType) == 0)
-X {
-X diskInfo->printFlag = DI_OK;
-X break;
-X }
-X else
-X {
-X diskInfo->printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("chkinc: ! include: fstype %s match: %s\n", *ptr,
-X diskInfo->name);
-X }
-X }
-X ++ptr;
-X }
-X } /* if an include list was specified */
-X}
-X
-X
-X#if defined (HAS_FS_INFO)
-X
-X/*
-X * getDiskEntries
-X *
-X * For BeOS.
-X *
-X */
-X
-Xstatic int
-XgetDiskEntries (void)
-X{
-X status_t stat;
-X int idx;
-X int32 count;
-X dev_t dev;
-X char buff [B_FILE_NAME_LENGTH];
-X fs_info fsinfo;
-X double mult;
-X node_ref nref;
-X BDirectory *dir;
-X BEntry entry;
-X BPath path;
-X
-X count = 0;
-X while ((dev = next_dev (&count)) != B_BAD_VALUE)
-X {
-X if ((stat = fs_stat_dev (dev, &fsinfo)) == B_BAD_VALUE)
-X {
-X break;
-X }
-X
-X idx = diCount;
-X ++diCount;
-X diskInfo = (DiskInfo *) Realloc ((char *) diskInfo,
-X sizeof (DiskInfo) * diCount);
-X memset ((char *) &diskInfo [idx], '\0', sizeof (DiskInfo));
-X diskInfo [idx].printFlag = DI_OK;
-X *buff = '\0';
-X nref.device = dev;
-X nref.node = fsinfo.root;
-X dir = new BDirectory (&nref);
-X stat = dir->GetEntry (&entry);
-X stat = entry.GetPath (&path);
-X strncpy (diskInfo [idx].name, path.Path (), DI_NAME_LEN);
-X strncpy (diskInfo [idx].special, fsinfo.device_name, DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [idx].fsType, fsinfo.fsh_name, DI_TYPE_LEN);
-X diskInfo [idx].isLocal = TRUE;
-X mult = (double) (long) fsinfo.block_size / dispBlockSize;
-X diskInfo [idx].totalBlocks =
-X ((double) (_s_fs_size_t) fsinfo.total_blocks * mult);
-X diskInfo [idx].freeBlocks =
-X ((double) (_s_fs_size_t) fsinfo.free_blocks * mult);
-X diskInfo [idx].availBlocks =
-X ((double) (_s_fs_size_t) fsinfo.free_blocks * mult);
-X diskInfo [idx].totalInodes = fsinfo.total_nodes;
-X diskInfo [idx].freeInodes = fsinfo.free_nodes;
-X diskInfo [idx].availInodes = fsinfo.free_nodes;
-X
-X checkIgnoreList (&diskInfo [idx]);
-X checkIncludeList (&diskInfo [idx]);
-X
-X if (debug > 0)
-X {
-X printf ("mnt:%s - %s\n", diskInfo [idx].name,
-X diskInfo [idx].special);
-X printf ("dev:%d fs:%s\n", dev, diskInfo [idx].fsType);
-X }
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [idx].name, diskInfo [idx].fsType);
-X printf ("\tmult:%f\n", mult);
-X printf ("\tblocks: tot:%ld free:%ld\n",
-X fsinfo.total_blocks, fsinfo.free_blocks);
-X printf ("\tinodes: tot:%ld free:%ld\n",
-X fsinfo.total_nodes, fsinfo.free_nodes);
-X }
-X }
-X return 0;
-X}
-X
-Xstatic void
-XgetDiskInfo (void)
-X{
-X return;
-X}
-X
-X#endif
-X
-X#if defined (HAS_GETMNTENT) && ! defined (HAS_SETMNTENT)
-X
-X# define DFS_FS_TABLE "/etc/dfs/fstypes"
-X
-X/*
-X * getDiskEntries
-X *
-X * For SysV.4, we open the file and call getmntent () repeatedly.
-X *
-X */
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X FILE *f;
-X int idx;
-X int i;
-X struct mnttab mntEntry;
-X char buff [80];
-X time_t mtime;
-X char *devp; /* local ptr to dev entry */
-X
-X
-X if ((flags & DI_F_LOCAL_ONLY) == DI_F_LOCAL_ONLY)
-X {
-X i = remoteFileSystemCount;
-X
-X if ((f = fopen (DFS_FS_TABLE, "r")) != (FILE *) NULL)
-X {
-X fgets (buff, 80, f);
-X if (debug > 1)
-X {
-X printf ("remote file system type: %s\n", buff);
-X }
-X sscanf (buff, "%s", remoteFileSystemTypes [i++]);
-X fclose (f);
-X }
-X
-X remoteFileSystemCount = i;
-X }
-X
-X if ((f = fopen (DI_MOUNT_FILE, "r")) == (FILE *) NULL)
-X {
-X fprintf (stderr, "Unable to open: %s errno %d\n", DI_MOUNT_FILE, errno);
-X return -1;
-X }
-X
-X while (getmntent (f, &mntEntry) == 0)
-X {
-X idx = diCount;
-X ++diCount;
-X diskInfo = (DiskInfo *) Realloc ((char *) diskInfo,
-X sizeof (DiskInfo) * diCount);
-X memset ((char *) &diskInfo [idx], '\0', sizeof (DiskInfo));
-X diskInfo [idx].printFlag = DI_OK;
-X
-X strncpy (diskInfo [idx].special, mntEntry.mnt_special,
-X DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [idx].name, mntEntry.mnt_mountp, DI_NAME_LEN);
-X# if defined (MNTOPT_IGNORE)
-X if (strstr (mntEntry.mnt_mntopts, MNTOPT_IGNORE) != (char *) NULL)
-X# else
-X if (strstr (mntEntry.mnt_mntopts, "ignore") != (char *) NULL)
-X# endif
-X {
-X diskInfo [idx].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: mntopt 'ignore': %s\n",
-X diskInfo [idx].name);
-X }
-X }
-X# if defined (MNTOPT_DEV)
-X sprintf (buff, "%s=", MNTOPT_DEV);
-X if ((devp = strstr (mntEntry.mnt_mntopts, buff)) != (char *) NULL)
-X# else
-X if ((devp = strstr (mntEntry.mnt_mntopts, "dev=")) != (char *) NULL)
-X# endif
-X {
-X if (devp != mntEntry.mnt_mntopts)
-X {
-X --devp;
-X }
-X *devp = 0; /* point to preceeding comma and cut off */
-X }
-X strncpy (diskInfo [idx].options, mntEntry.mnt_mntopts, DI_OPT_LEN);
-X mtime = atol (mntEntry.mnt_time);
-X strncpy (diskInfo [idx].mountTime, ctime (&mtime), DI_MNT_TIME_LEN);
-X
-X /* get the file system type now... */
-X strncpy (diskInfo [idx].fsType, mntEntry.mnt_fstype, DI_TYPE_LEN);
-X
-X diskInfo [idx].isLocal = TRUE;
-X for (i = 0; i < remoteFileSystemCount; ++i)
-X {
-X if (strcmp (diskInfo [idx].fsType, remoteFileSystemTypes [i]) == 0)
-X {
-X diskInfo [idx].isLocal = FALSE;
-X }
-X }
-X
-X checkIgnoreList (&diskInfo [idx]);
-X checkIncludeList (&diskInfo [idx]);
-X
-X if (debug > 0)
-X {
-X printf ("mnt:%s - %s\n", diskInfo [idx].name,
-X diskInfo [idx].special);
-X }
-X }
-X
-X fclose (f);
-X return 0;
-X}
-X
-X#endif /* HAS_GETMNTENT */
-X
-X#if ! defined (HAS_GETMNTENT) && ! defined (HAS_MNTCTL) && \
-X ! defined (HAS_GETMNTINFO) && ! defined (HAS_GETMNT) && \
-X ! defined (HAS_GETDISKFREESPACE) && ! defined (HAS_FS_INFO)
-X
-X/*
-X * getDiskEntries
-X *
-X * For SysV.3 we open the file and read it ourselves.
-X *
-X */
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X FILE *f;
-X int idx;
-X struct mnttab mntEntry;
-X
-X
-X if ((f = fopen (DI_MOUNT_FILE, "r")) == (FILE *) NULL)
-X {
-X fprintf (stderr, "Unable to open: %s errno %d\n", DI_MOUNT_FILE, errno);
-X return -1;
-X }
-X
-X while (fread ((char *) &mntEntry, sizeof (struct mnttab), 1, f) == 1)
-X {
-X /* xenix allows null mount table entries */
-X /* sco nfs background mounts are marked as "nothing" */
-X if (mntEntry.mt_filsys [0] &&
-X strcmp (mntEntry.mt_filsys, "nothing") != 0)
-X {
-X idx = diCount;
-X ++diCount;
-X diskInfo = (DiskInfo *) Realloc ((char *) diskInfo,
-X sizeof (DiskInfo) * diCount);
-X memset ((char *) &diskInfo [idx], '\0', sizeof (DiskInfo));
-X diskInfo [idx].printFlag = DI_OK;
-X diskInfo [idx].isLocal = TRUE;
-X
-X# if defined (COHERENT)
-X /* Coherent seems to have these fields reversed. oh well. */
-X strncpy (diskInfo [idx].name, mntEntry.mt_dev, DI_NAME_LEN);
-X strncpy (diskInfo [idx].special, mntEntry.mt_filsys, DI_SPEC_NAME_LEN);
-X# else
-X strncpy (diskInfo [idx].special, mntEntry.mt_dev, DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [idx].name, mntEntry.mt_filsys, DI_NAME_LEN);
-X# endif
-X strncpy (diskInfo [idx].options, mntEntry.mnt_mntopts, DI_OPT_LEN);
-X strncpy (diskInfo [idx].mountTime, mntEntry.mnt_time,
-X DI_MNT_TIME_LEN);
-X }
-X
-X if (debug > 0)
-X {
-X printf ("mnt:%s - %s\n", diskInfo [idx].name,
-X diskInfo [idx].special);
-X }
-X }
-X
-X fclose (f);
-X return 0;
-X}
-X
-X#endif /* Sys V.3 */
-X
-X#if defined (HAS_GETMNTENT) && defined (HAS_SETMNTENT) && \
-X defined (HAS_ENDMNTENT)
-X
-X/*
-X * getDiskEntries
-X *
-X * SunOS supplies an open and close routine for the mount table.
-X *
-X */
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X FILE *f;
-X int idx;
-X struct mntent *mntEntry;
-X char *devp; /* local ptr to dev entry */
-X
-X
-X#if defined (HAS_SETMNTENT_ONE_ARG)
-X if ((f = setmntent (DI_MOUNT_FILE)) == (FILE *) NULL)
-X#else
-X if ((f = setmntent (DI_MOUNT_FILE, "r")) == (FILE *) NULL)
-X#endif
-X {
-X fprintf (stderr, "Unable to open: %s errno %d\n", DI_MOUNT_FILE, errno);
-X return -1;
-X }
-X
-X while ((mntEntry = getmntent (f)) != (struct mntent *) NULL)
-X {
-X idx = diCount;
-X ++diCount;
-X diskInfo = (DiskInfo *) Realloc ((char *) diskInfo,
-X sizeof (DiskInfo) * diCount);
-X memset ((char *) &diskInfo [idx], '\0', sizeof (DiskInfo));
-X diskInfo [idx].printFlag = DI_OK;
-X diskInfo [idx].isLocal = TRUE;
-X
-X strncpy (diskInfo [idx].special, mntEntry->mnt_fsname, DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [idx].name, mntEntry->mnt_dir, DI_NAME_LEN);
-X strncpy (diskInfo [idx].fsType, mntEntry->mnt_type, DI_TYPE_LEN);
-X
-X if (strcmp (mntEntry->mnt_type, MNTTYPE_IGNORE) == 0)
-X {
-X diskInfo [idx].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: mntopt 'ignore': %s\n",
-X diskInfo [idx].name);
-X }
-X }
-X
-X if ((devp = strstr (mntEntry->mnt_opts, "dev=")) != (char *) NULL)
-X {
-X if (devp != mntEntry->mnt_opts)
-X {
-X --devp;
-X }
-X *devp = 0; /* point to preceeding comma and cut off */
-X }
-X strncpy (diskInfo [idx].options, mntEntry->mnt_opts, DI_OPT_LEN);
-X
-X checkIgnoreList (&diskInfo [idx]);
-X checkIncludeList (&diskInfo [idx]);
-X
-X if (debug > 0)
-X {
-X printf ("mnt:%s - %s : %s\n", diskInfo [idx].name,
-X diskInfo [idx].special, diskInfo [idx].fsType);
-X }
-X }
-X
-X endmntent (f);
-X return 0;
-X}
-X
-X#endif /* HAS_GETMNTENT && HAS_SETMNTENT && HAS_ENDMNTENT */
-X
-X#if defined (HAS_GETMNTINFO)
-X
-X/*
-X * getDiskEntries
-X *
-X * OSF/1 does this with a system call and library routine
-X *
-X * [mogul@wrl.dec.com (Jeffrey Mogul)]
-X */
-X
-X#if defined (INITMOUNTNAMES)
-Xstatic char *mnt_names [] = INITMOUNTNAMES;
-X# define MNT_NUMTYPES (MOUNT_MAXTYPE + 1)
-X#endif
-X
-X /* osf/1 mount flags start w/M_ vs. MNT_ */
-X /* this saves us from lots of duplicate code */
-X#if defined (M_RDONLY)
-X# define MNT_RDONLY M_RDONLY
-X#endif
-X#if defined (M_SYNCHRONOUS)
-X# define MNT_SYNCHRONOUS M_SYNCHRONOUS
-X#endif
-X#if defined (M_NOEXEC)
-X# define MNT_NOEXEC M_NOEXEC
-X#endif
-X#if defined (M_NOSUID)
-X# define MNT_NOSUID M_NOSUID
-X#endif
-X#if defined (M_NODEV)
-X# define MNT_NODEV M_NODEV
-X#endif
-X#if defined (M_GRPID)
-X# define MNT_GRPID M_GRPID
-X#endif
-X#if defined (M_EXPORTED)
-X# define MNT_EXPORTED M_EXPORTED
-X#endif
-X#if defined (M_EXRDONLY)
-X# define MNT_EXRDONLY M_EXRDONLY
-X#endif
-X#if defined (M_EXRDMOSTLY)
-X# define MNT_EXRDMOSTLY M_EXRDMOSTLY
-X#endif
-X#if defined (M_SECURE)
-X# define MNT_SECURE M_SECURE
-X#endif
-X#if defined (M_LOCAL)
-X# define MNT_LOCAL M_LOCAL
-X#endif
-X#if defined (M_QUOTA)
-X# define MNT_QUOTA M_QUOTA
-X#endif
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X int count;
-X int idx;
-X int len;
-X short fstype;
-X struct statfs *mntbufp;
-X double mult;
-X
-X count = getmntinfo (&mntbufp, MNT_WAIT);
-X if (count < 1)
-X {
-X fprintf (stderr, "Unable to do getmntinfo () errno %d\n", errno);
-X return -1;
-X }
-X
-X diCount = count;
-X diskInfo = (DiskInfo *) malloc (sizeof (DiskInfo) * count);
-X if (diskInfo == (DiskInfo *) NULL)
-X {
-X fprintf (stderr, "malloc failed for diskInfo. errno %d\n", errno);
-X return -1;
-X }
-X memset ((char *) diskInfo, '\0', sizeof (DiskInfo) * count);
-X
-X if (debug > 1)
-X {
-X printf ("type_len %d name_len %d spec_name_len %d\n", DI_TYPE_LEN,
-X DI_NAME_LEN, DI_SPEC_NAME_LEN);
-X }
-X
-X for (idx = 0; idx < count; idx++)
-X {
-X diskInfo [idx].printFlag = DI_OK;
-X diskInfo [idx].isLocal = FALSE;
-X#if defined (MNT_LOCAL)
-X if ((mntbufp [idx].f_flags & MNT_LOCAL) == MNT_LOCAL)
-X {
-X diskInfo [idx].isLocal = TRUE;
-X }
-X#endif
-X
-X if (diskInfo [idx].isLocal == FALSE &&
-X (flags & DI_F_LOCAL_ONLY) == DI_F_LOCAL_ONLY)
-X {
-X diskInfo [idx].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: remote: %s\n",
-X diskInfo [idx].name);
-X }
-X }
-X
-X strncpy (diskInfo [idx].special, mntbufp [idx].f_mntfromname,
-X DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [idx].name, mntbufp [idx].f_mntonname, DI_NAME_LEN);
-X
-X mult = 1.0;
-X
-X# if defined (HAS_GETMNTINFO_FSIZE) /* 1.x */
-X mult = (double) mntbufp [idx].f_fsize / dispBlockSize;
-X# endif
-X# if defined (HAS_GETMNTINFO_BSIZE) /* 2.x */
-X mult = (double) mntbufp [idx].f_bsize / dispBlockSize;
-X# endif
-X diskInfo [idx].totalBlocks = ((double) (_s_fs_size_t) mntbufp [idx].f_blocks * mult);
-X diskInfo [idx].freeBlocks = ((double) (_s_fs_size_t) mntbufp [idx].f_bfree * mult);
-X diskInfo [idx].availBlocks = ((double) (_s_fs_size_t) mntbufp [idx].f_bavail * mult);
-X
-X diskInfo [idx].totalInodes = mntbufp [idx].f_files;
-X diskInfo [idx].freeInodes = mntbufp [idx].f_ffree;
-X diskInfo [idx].availInodes = mntbufp [idx].f_ffree;
-X
-X fstype = mntbufp [idx].f_type;
-X# if ! defined (I_SYS_FSTYP) && ! defined (INITMOUNTNAMES) && \
-X ! defined (HAS_GETMNTINFO_FSTYPENAME)
-X if ((fstype >= 0) && (fstype <= MOUNT_MAXTYPE))
-X {
-X switch (fstype)
-X {
-X# if defined (MOUNT_NONE)
-X case MOUNT_NONE: /* No Filesystem */
-X {
-X strncpy (diskInfo [idx].fsType, "none", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_UFS)
-X case MOUNT_UFS: /* UNIX "Fast" Filesystem */
-X {
-X strncpy (diskInfo [idx].fsType, "ufs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_NFS)
-X case MOUNT_NFS: /* Network Filesystem */
-X {
-X strncpy (diskInfo [idx].fsType, "nfs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_MFS)
-X case MOUNT_MFS: /* Memory Filesystem */
-X {
-X strncpy (diskInfo [idx].fsType, "mfs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_MSDOS)
-X case MOUNT_MSDOS: /* MSDOS Filesystem */
-X {
-X strncpy (diskInfo [idx].fsType, "msdos", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_LFS)
-X case MOUNT_LFS:
-X {
-X strncpy (diskInfo [idx].fsType, "lfs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_LOFS)
-X case MOUNT_LOFS:
-X {
-X strncpy (diskInfo [idx].fsType, "lofs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_FDESC)
-X case MOUNT_FDESC:
-X {
-X strncpy (diskInfo [idx].fsType, "fdesc", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_PORTAL)
-X case MOUNT_PORTAL:
-X {
-X strncpy (diskInfo [idx].fsType, "portal", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_NULL)
-X case MOUNT_NULL:
-X {
-X strncpy (diskInfo [idx].fsType, "null", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_UMAP)
-X case MOUNT_UMAP:
-X {
-X strncpy (diskInfo [idx].fsType, "umap", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_KERNFS)
-X case MOUNT_KERNFS:
-X {
-X strncpy (diskInfo [idx].fsType, "kernfs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_PROCFS)
-X case MOUNT_PROCFS: /* proc filesystem */
-X {
-X strncpy (diskInfo [idx].fsType, "pfs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_AFS)
-X case MOUNT_AFS:
-X {
-X strncpy (diskInfo [idx].fsType, "afs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_ISOFS)
-X case MOUNT_ISOFS: /* iso9660 cdrom */
-X {
-X strncpy (diskInfo [idx].fsType, "iso9660fs", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_ISO9660) && ! defined (MOUNT_CD9660)
-X case MOUNT_ISO9660: /* iso9660 cdrom */
-X {
-X strncpy (diskInfo [idx].fsType, "iso9660", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_CD9660)
-X case MOUNT_CD9660: /* iso9660 cdrom */
-X {
-X strncpy (diskInfo [idx].fsType, "cd9660", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X
-X# if defined (MOUNT_UNION)
-X case MOUNT_UNION:
-X {
-X strncpy (diskInfo [idx].fsType, "union", DI_TYPE_LEN);
-X break;
-X }
-X# endif
-X } /* switch on mount type */
-X }
-X# else
-X# if defined (HAS_GETMNTINFO_FSTYPENAME)
-X strncpy (diskInfo [idx].fsType, mntbufp [idx].f_fstypename, DI_TYPE_LEN);
-X# else
-X /* could use getvfsbytype here... */
-X if ((fstype >= 0) && (fstype < MNT_NUMTYPES))
-X {
-X strncpy (diskInfo [idx].fsType, mnt_names [fstype], DI_TYPE_LEN);
-X }
-X else
-X {
-X sprintf (diskInfo [idx].fsType, DI_UNKNOWN_FSTYPE, fstype);
-X }
-X# endif
-X# endif /* has fs_types.h */
-X
-X#if defined (MNT_RDONLY)
-X if ((mntbufp [idx].f_flags & MNT_RDONLY) == MNT_RDONLY)
-X {
-X strcat (diskInfo [idx].options, "ro,");
-X }
-X else
-X {
-X strcat (diskInfo [idx].options, "rw,");
-X }
-X#endif
-X#if defined (MNT_SYNCHRONOUS)
-X if ((mntbufp [idx].f_flags & MNT_SYNCHRONOUS) == MNT_SYNCHRONOUS)
-X {
-X strcat (diskInfo [idx].options, "sync,");
-X }
-X#endif
-X#if defined (MNT_NOEXEC)
-X if ((mntbufp [idx].f_flags & MNT_NOEXEC) == MNT_NOEXEC)
-X {
-X strcat (diskInfo [idx].options, "noexec,");
-X }
-X#endif
-X#if defined (MNT_NOSUID)
-X if ((mntbufp [idx].f_flags & MNT_NOSUID) != MNT_NOSUID)
-X {
-X strcat (diskInfo [idx].options, "suid,");
-X }
-X#endif
-X#if defined (MNT_NODEV)
-X if ((mntbufp [idx].f_flags & MNT_NODEV) == MNT_NODEV)
-X {
-X strcat (diskInfo [idx].options, "nodev,");
-X }
-X#endif
-X#if defined (MNT_GRPID)
-X if ((mntbufp [idx].f_flags & MNT_GRPID) == MNT_GRPID)
-X {
-X strcat (diskInfo [idx].options, "grpid,");
-X }
-X#endif
-X#if defined (MNT_UNION)
-X if ((mntbufp [idx].f_flags & MNT_UNION) == MNT_UNION)
-X {
-X strcat (diskInfo [idx].options, "union,");
-X }
-X#endif
-X#if defined (MNT_ASYNC)
-X if ((mntbufp [idx].f_flags & MNT_ASYNC) == MNT_ASYNC)
-X {
-X strcat (diskInfo [idx].options, "async,");
-X }
-X#endif
-X#if defined (MNT_EXRDONLY)
-X if ((mntbufp [idx].f_flags & MNT_EXRDONLY) == MNT_EXRDONLY)
-X {
-X strcat (diskInfo [idx].options, "exported ro,");
-X }
-X#endif
-X#if defined (MNT_EXPORTED)
-X if ((mntbufp [idx].f_flags & MNT_EXPORTED) == MNT_EXPORTED)
-X {
-X strcat (diskInfo [idx].options, "exported,");
-X }
-X#endif
-X#if defined (MNT_EXRDMOSTLY)
-X if ((mntbufp [idx].f_flags & MNT_EXRDMOSTLY) == MNT_EXRDMOSTLY)
-X {
-X /* what's read-mostly ? */
-X strcat (diskInfo [idx].options, "exported read-mostly,");
-X }
-X#endif
-X#if defined (MNT_DEFEXPORTED)
-X if ((mntbufp [idx].f_flags & MNT_DEFEXPORTED) == MNT_DEFEXPORTED)
-X {
-X /* what's this ? */
-X strcat (diskInfo [idx].options, "exported world,");
-X }
-X#endif
-X#if defined (MNT_EXPORTANON)
-X if ((mntbufp [idx].f_flags & MNT_EXPORTANON) == MNT_EXPORTANON)
-X {
-X strcat (diskInfo [idx].options, "exported anon,");
-X }
-X#endif
-X#if defined (MNT_EXKERB)
-X if ((mntbufp [idx].f_flags & MNT_EXKERB) == MNT_EXKERB)
-X {
-X strcat (diskInfo [idx].options, "exported kerberos,");
-X }
-X#endif
-X#if defined (MNT_LOCAL)
-X if ((mntbufp [idx].f_flags & MNT_LOCAL) == MNT_LOCAL)
-X {
-X strcat (diskInfo [idx].options, "local,");
-X }
-X#endif
-X#if defined (MNT_QUOTA)
-X if ((mntbufp [idx].f_flags & MNT_QUOTA) == MNT_QUOTA)
-X {
-X strcat (diskInfo [idx].options, "quota,");
-X }
-X#endif
-X#if defined (MNT_ROOTFS)
-X if ((mntbufp [idx].f_flags & MNT_ROOTFS) == MNT_ROOTFS)
-X {
-X strcat (diskInfo [idx].options, "root,");
-X }
-X#endif
-X#if defined (MNT_USER)
-X if ((mntbufp [idx].f_flags & MNT_USER) == MNT_USER)
-X {
-X strcat (diskInfo [idx].options, "user,");
-X }
-X#endif
-X#if defined (MNT_SECURE)
-X if ((mntbufp [idx].f_flags & MNT_SECURE) == MNT_SECURE)
-X {
-X strcat (diskInfo [idx].options, "secure,");
-X }
-X#endif
-X
-X len = strlen (diskInfo [idx].options);
-X if (len > 0)
-X {
-X --len;
-X }
-X if (diskInfo [idx].options [len]==',')
-X {
-X diskInfo [idx].options [len] = '\0';
-X }
-X
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [idx].name, diskInfo [idx].fsType);
-X printf ("\tblocks: tot:%ld free:%ld avail:%ld\n",
-X mntbufp [idx].f_blocks, mntbufp [idx].f_bfree,
-X mntbufp [idx].f_bavail);
-X printf ("\tmult: %f\n", mult);
-X# if defined (HAS_GETMNTINFO_FSIZE)
-X printf ("\tfsize:%ld \n", mntbufp [idx].f_fsize);
-X printf ("\tbsize:%ld \n", mntbufp [idx].f_bsize);
-X# endif
-X# if defined (HAS_GETMNTINFO_BSIZE)
-X printf ("\tbsize:%ld \n", mntbufp [idx].f_bsize);
-X printf ("\tiosize:%ld \n", mntbufp [idx].f_iosize);
-X# endif
-X printf ("\tinodes: tot:%ld free:%ld\n",
-X mntbufp [idx].f_files, mntbufp [idx].f_ffree);
-X }
-X }
-X
-X free ((char *) mntbufp); /* man page says this can't be freed. */
-X /* is it ok to try? */
-X return 0;
-X}
-X
-X/* this is a no-op; we have already done all the work */
-Xstatic void
-XgetDiskInfo ()
-X{
-X}
-X
-X#endif /* HAS_GETMNTINFO */
-X
-X#if defined (HAS_GETMNT)
-X
-X/*
-X * getDiskEntries
-X *
-X * ULTRIX does this with a system call. The system call allows one
-X * to retrieve the information in a series of calls, but coding that
-X * looks a little tricky; I just allocate a huge buffer and do it in
-X * one shot.
-X *
-X * [mogul@wrl.dec.com (Jeffrey Mogul)]
-X */
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X int count;
-X int bufsize;
-X int idx;
-X short fstype;
-X struct fs_data *fsdbuf;
-X int start;
-X int len;
-X
-X
-X bufsize = NMOUNT * sizeof (struct fs_data); /* enough for max # mounts */
-X fsdbuf = (struct fs_data *) malloc (bufsize);
-X if (fsdbuf == (struct fs_data *) NULL)
-X {
-X fprintf (stderr, "malloc (%d) for getmnt () failed errno %d\n",
-X bufsize, errno);
-X return -1;
-X }
-X
-X start = 0;
-X count = getmnt (&start, fsdbuf, bufsize, STAT_MANY, 0);
-X if (count < 1)
-X {
-X fprintf (stderr, "Unable to do getmnt () [= %d] errno %d\n",
-X count, errno);
-X free ((char *) fsdbuf);
-X return -1;
-X }
-X
-X diCount = count;
-X diskInfo = (DiskInfo *) malloc (sizeof (DiskInfo) * count);
-X if (diskInfo == (DiskInfo *) NULL)
-X {
-X fprintf (stderr, "malloc failed for diskInfo. errno %d\n", errno);
-X free ((char *) fsdbuf);
-X return -1;
-X }
-X memset ((char *) diskInfo, '\0', sizeof (DiskInfo) * count);
-X
-X for (idx = 0; idx < count; idx++)
-X {
-X diskInfo [idx].printFlag = DI_OK;
-X diskInfo [idx].isLocal = TRUE;
-X
-X if ((fsdbuf [idx].fd_req.flags & M_LOCAL) != M_LOCAL)
-X {
-X diskInfo [idx].isLocal = FALSE;
-X }
-X
-X if (diskInfo [idx].isLocal == FALSE &&
-X (flags & DI_F_LOCAL_ONLY) == DI_F_LOCAL_ONLY)
-X {
-X diskInfo [idx].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: remote: %s\n",
-X diskInfo [idx].name);
-X }
-X }
-X
-X strncpy (diskInfo [idx].special, fsdbuf [idx].fd_devname, DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [idx].name, fsdbuf [idx].fd_path, DI_NAME_LEN);
-X
-X /* ULTRIX keeps these fields in units of 1K byte */
-X diskInfo [idx].totalBlocks = fsdbuf [idx].fd_btot;
-X diskInfo [idx].freeBlocks = fsdbuf [idx].fd_bfree;
-X diskInfo [idx].availBlocks = (int) fsdbuf [idx].fd_bfreen;
-X
-X diskInfo [idx].totalInodes = fsdbuf [idx].fd_gtot;
-X diskInfo [idx].freeInodes = fsdbuf [idx].fd_gfree;
-X diskInfo [idx].availInodes = fsdbuf [idx].fd_gfree;
-X
-X fstype = fsdbuf [idx].fd_fstype;
-X if (fstype == GT_UNKWN)
-X {
-X diskInfo [idx].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: disk type unknown: %s\n",
-X diskInfo [idx].name);
-X }
-X }
-X else if ((fstype > 0) && (fstype < GT_NUMTYPES))
-X {
-X strncpy (diskInfo [idx].fsType, gt_names [fstype], DI_TYPE_LEN);
-X }
-X else
-X {
-X sprintf (diskInfo [idx].fsType, "Unknown fstyp %.2d", fstype);
-X }
-X
-X if ((fsdbuf [idx].fd_req.flags & M_RONLY) == M_RONLY)
-X {
-X strcat (diskInfo [idx].options, "ro,");
-X }
-X else
-X {
-X strcat (diskInfo [idx].options, "rw,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_NOSUID) != M_NOSUID)
-X {
-X strcat (diskInfo [idx].options, "suid,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_QUOTA) == M_QUOTA)
-X {
-X strcat (diskInfo [idx].options, "quota,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_LOCAL) != M_LOCAL)
-X {
-X strcat (diskInfo [idx].options, "remote,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_NODEV) == M_NODEV)
-X {
-X strcat (diskInfo [idx].options, "nodev,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_FORCE) == M_FORCE)
-X {
-X strcat (diskInfo [idx].options, "force,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_SYNC) == M_SYNC)
-X {
-X strcat (diskInfo [idx].options, "sync,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_NOCACHE) == M_NOCACHE)
-X {
-X strcat (diskInfo [idx].options, "nocache,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_EXPORTED) == M_EXPORTED)
-X {
-X strcat (diskInfo [idx].options, "exported," );
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_EXRONLY) == M_EXRONLY)
-X {
-X strcat (diskInfo [idx].options, "exported ro,");
-X }
-X if ((fsdbuf [idx].fd_req.flags & M_NOEXEC) == M_NOEXEC)
-X {
-X strcat (diskInfo [idx].options, "noexec,");
-X }
-X
-X len = strlen (diskInfo [idx].options);
-X if (len > 0)
-X {
-X --len;
-X }
-X if (diskInfo [idx].options [len]==',')
-X {
-X diskInfo [idx].options [len] = '\0';
-X }
-X
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [idx].name, diskInfo [idx].fsType);
-X printf ("\tblocks: tot:%ld free:%ld avail:%ld\n",
-X fsdbuf [idx].fd_btot, fsdbuf [idx].fd_bfree,
-X (int) fsdbuf [idx].fd_bfreen);
-X printf ("\tinodes: tot:%ld free:%ld\n",
-X fsdbuf [idx].fd_gtot, fsdbuf [idx].fd_gfree);
-X }
-X }
-X
-X free ((char *) fsdbuf);
-X return 0;
-X}
-X
-X/* this is a no-op; we have already done all the work */
-Xstatic void
-XgetDiskInfo ()
-X{
-X}
-X
-X#endif /* HAS_GETMNT */
-X
-X
-X#if defined (HAS_MNTCTL)
-X
-X/*
-X * getDiskEntries
-X *
-X * AIX V3.2 uses mntctl to find out about mounted file systems
-X *
-X */
-X
-X# define NUM_AIX_FSTYPES 6
-Xstatic char *AIX_fsType [NUM_AIX_FSTYPES] =
-X { "oaix", "", "nfs", "jfs", "", "cdrom" };
-X
-X/*
-X * from xfsm-1.80:
-X *
-X * MNT_AIX - "aix"
-X * MNT_NFS - "nfs"
-X * MNT_JFS - "jfs"
-X * MNT_CDROM - "cdrom"
-X * other - "user defined"
-X *
-X */
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X int num; /* number of vmount structs returned */
-X char *vmbuf; /* buffer for vmount structs returned */
-X int vmbufsz; /* size in bytes of vmbuf */
-X int i; /* index for looping and stuff */
-X char *bufp; /* pointer into vmbuf */
-X struct vmount *vmtp; /* pointer into vmbuf */
-X struct vfs_ent *ve; /* pointer for file system type entry */
-X int len;
-X
-X
-X i = 0;
-X vmbufsz = sizeof (struct vmount) * DI_FSMAGIC; /* initial vmount buffer */
-X
-X do
-X {
-X if ((vmbuf = (char *) malloc (vmbufsz)) == (char *) NULL)
-X {
-X fprintf (stderr, "malloc (%d) for mntctl() failed errno %d\n",
-X vmbufsz, errno);
-X return -1;
-X }
-X
-X num = mntctl (MCTL_QUERY, vmbufsz, vmbuf);
-X /*
-X * vmbuf is too small, could happen for
-X * following reasons:
-X * - inital buffer is too small
-X * - newly mounted file system
-X */
-X if (num == 0)
-X {
-X memcpy (&vmbufsz, vmbuf, sizeof (vmbufsz)); /* see mntctl(2) */
-X if (debug > 0)
-X {
-X printf ("vmbufsz too small, new size: %d\n", vmbufsz);
-X }
-X free ((char *) vmbuf); /* free this last, it's still being used! */
-X ++i;
-X }
-X } while (num == 0 && i < DI_RETRY_COUNT);
-X
-X if (i >= DI_RETRY_COUNT)
-X {
-X free ((char *) vmbuf);
-X fprintf (stderr, "unable to allocate adequate buffer for mntctl\n");
-X return -1;
-X }
-X
-X switch (num)
-X {
-X /* error happened, probably null vmbuf */
-X case -1:
-X {
-X free ((char *) vmbuf);
-X fprintf (stderr,"%s errno %d\n", strerror (errno), errno);
-X return -1;
-X }
-X
-X /* 'num' vmount structs returned in vmbuf */
-X default:
-X {
-X diCount = num;
-X diskInfo = (DiskInfo *) calloc (sizeof (DiskInfo), diCount);
-X if (diskInfo == (DiskInfo *) NULL)
-X {
-X fprintf (stderr, "malloc failed for diskInfo. errno %d\n", errno);
-X return -1;
-X }
-X
-X bufp = vmbuf;
-X for (i = 0; i < num; i++)
-X {
-X vmtp = (struct vmount *) bufp;
-X diskInfo [i].printFlag = DI_OK;
-X diskInfo [i].isLocal = TRUE;
-X
-X strncpy (diskInfo [i].special,
-X (char *) vmt2dataptr (vmtp, VMT_OBJECT),
-X DI_SPEC_NAME_LEN);
-X strncpy (diskInfo [i].name,
-X (char *) vmt2dataptr (vmtp, VMT_STUB), DI_NAME_LEN);
-X
-X ve = getvfsbytype (vmtp->vmt_gfstype);
-X if (ve == (struct vfs_ent *) NULL || *ve->vfsent_name == '\0')
-X {
-X if (vmtp->vmt_gfstype >= 0 &&
-X (vmtp->vmt_gfstype < NUM_AIX_FSTYPES))
-X {
-X strncpy (diskInfo [i].fsType,
-X AIX_fsType [vmtp->vmt_gfstype], DI_TYPE_LEN);
-X }
-X }
-X else
-X {
-X strncpy (diskInfo [i].fsType, ve->vfsent_name, DI_TYPE_LEN);
-X }
-X
-X if ((vmtp->vmt_flags & MNT_READONLY) == MNT_READONLY)
-X {
-X strcat (diskInfo [i].options, "ro,");
-X }
-X else
-X {
-X strcat (diskInfo [i].options, "rw,");
-X }
-X if ((vmtp->vmt_flags & MNT_NOSUID) != MNT_NOSUID)
-X {
-X strcat (diskInfo [i].options, "suid,");
-X }
-X if ((vmtp->vmt_flags & MNT_REMOVABLE) == MNT_REMOVABLE)
-X {
-X strcat (diskInfo [i].options, "removable,");
-X }
-X if ((vmtp->vmt_flags & MNT_DEVICE) == MNT_DEVICE)
-X {
-X strcat (diskInfo [i].options, "device,");
-X }
-X if ((vmtp->vmt_flags & MNT_REMOTE) == MNT_REMOTE)
-X {
-X strcat (diskInfo [i].options, "remote,");
-X diskInfo [i].isLocal = FALSE;
-X }
-X if ((vmtp->vmt_flags & MNT_UNMOUNTING) == MNT_UNMOUNTING)
-X {
-X strcat (diskInfo [i].options, "unmounting,");
-X }
-X if ((vmtp->vmt_flags & MNT_SYSV_MOUNT) == MNT_SYSV_MOUNT)
-X {
-X strcat (diskInfo [i].options, "sysv mount,");
-X }
-X if ((vmtp->vmt_flags & MNT_NODEV) == MNT_NODEV)
-X {
-X strcat (diskInfo [i].options, "nodev,");
-X }
-X
-X /* remove trailing comma */
-X len = strlen (diskInfo [i].options);
-X if (len > 0)
-X {
-X --len;
-X }
-X if (diskInfo [i].options [len] == ',')
-X {
-X diskInfo [i].options [len] = '\0';
-X }
-X
-X strncpy (diskInfo [i].mountTime, ctime (&vmtp->vmt_time),
-X DI_MNT_TIME_LEN);
-X
-X if (diskInfo [i].isLocal == FALSE &&
-X (flags & DI_F_LOCAL_ONLY) == DI_F_LOCAL_ONLY)
-X {
-X diskInfo [i].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: remote: %s\n",
-X diskInfo [i].name);
-X }
-X }
-X
-X bufp += vmtp->vmt_length;
-X }
-X
-X if (debug > 0)
-X {
-X printf ("mnt:%s - %s : %s\n", diskInfo [i].name,
-X diskInfo [i].special, diskInfo [i].fsType);
-X printf ("\t%s\n", (char *) vmt2dataptr (vmtp, VMT_ARGS));
-X }
-X
-X break;
-X } /* valid value returned */
-X } /* switch on num */
-X}
-X
-X#endif /* HAS_MNTCTL */
-X
-X
-X#if defined (HAS_STATVFS)
-X
-X/*
-X * getDiskInfo
-X *
-X * SysV.4. statvfs () returns both the free and available blocks.
-X *
-X */
-X
-Xstatic void
-XgetDiskInfo ()
-X{
-X int i;
-X double mult;
-X struct statvfs statBuf;
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X if (diskInfo [i].isLocal == FALSE &&
-X (flags & DI_F_LOCAL_ONLY) == DI_F_LOCAL_ONLY)
-X {
-X diskInfo [i].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: remote: %s\n",
-X diskInfo [i].name);
-X }
-X }
-X
-X if (diskInfo [i].printFlag == DI_OK || (flags & DI_F_ALL) == DI_F_ALL)
-X {
-X if (statvfs (diskInfo [i].name, &statBuf) == 0)
-X {
-X /* data general DG/UX 5.4R3.00 sometime returns 0 */
-X /* in the fragment size field. */
-X if (statBuf.f_frsize == 0 && statBuf.f_bsize != 0)
-X {
-X mult = (double) (long) statBuf.f_bsize / dispBlockSize;
-X }
-X else
-X {
-X mult = (double) (long) statBuf.f_frsize / dispBlockSize;
-X }
-X
-X diskInfo [i].totalBlocks = ((double) (_s_fs_size_t) statBuf.f_blocks * mult);
-X diskInfo [i].freeBlocks = ((double) (_s_fs_size_t) statBuf.f_bfree * mult);
-X diskInfo [i].availBlocks = ((double) (_s_fs_size_t) statBuf.f_bavail * mult);
-X
-X diskInfo [i].totalInodes = statBuf.f_files;
-X diskInfo [i].freeInodes = statBuf.f_ffree;
-X diskInfo [i].availInodes = statBuf.f_favail;
-X
-X#if defined (HAS_STATVFS_BASETYPE)
-X strncpy (diskInfo [i].fsType, statBuf.f_basetype, DI_TYPE_LEN);
-X#endif
-X
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [i].name, diskInfo [i].fsType);
-X printf ("\tmult:%f\n", mult);
-X printf ("\tbsize:%ld frsize:%ld\n", statBuf.f_bsize,
-X statBuf.f_frsize);
-X#if defined (HAS_64BIT_STATFS_FLDS)
-X printf ("\tblocks: tot:%llu free:%lld avail:%llu\n",
-X statBuf.f_blocks, statBuf.f_bfree, statBuf.f_bavail);
-X printf ("\tinodes: tot:%llu free:%lld avail:%llu\n",
-X statBuf.f_files, statBuf.f_ffree, statBuf.f_favail);
-X#else
-X printf ("\tblocks: tot:%lu free:%ld avail:%lu\n",
-X statBuf.f_blocks, statBuf.f_bfree, statBuf.f_bavail);
-X printf ("\tinodes: tot:%lu free:%ld avail:%lu\n",
-X statBuf.f_files, statBuf.f_ffree, statBuf.f_favail);
-X#endif
-X }
-X }
-X else
-X {
-X fprintf (stderr, "statvfs: %s ", diskInfo [i].name);
-X perror ("");
-X }
-X }
-X } /* for each entry */
-X}
-X
-X#endif /* HAS_STATVFS */
-X
-X
-X#if defined (HAS_STATFS_BSD) && ! defined (HAS_STATVFS) && \
-X ! defined (HAS_GETMNTINFO) && ! defined (HAS_GETMNT)
-X
-X/*
-X * getDiskInfo
-X *
-X * SunOS/BSD/Pyramid
-X *
-X */
-X
-Xstatic void
-XgetDiskInfo ()
-X{
-X int i;
-X double mult;
-X struct statfs statBuf;
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X if (diskInfo [i].printFlag == DI_OK || (flags & DI_F_ALL) == DI_F_ALL)
-X {
-X if (statfs (diskInfo [i].name, &statBuf) == 0)
-X {
-X mult = (double) statBuf.f_bsize / dispBlockSize;
-X diskInfo [i].totalBlocks = ((double) (_s_fs_size_t) statBuf.f_blocks * mult);
-X diskInfo [i].freeBlocks = ((double) (_s_fs_size_t) statBuf.f_bfree * mult);
-X diskInfo [i].availBlocks = ((double) (_s_fs_size_t) statBuf.f_bavail * mult);
-X
-X diskInfo [i].totalInodes = statBuf.f_files;
-X diskInfo [i].freeInodes = statBuf.f_ffree;
-X diskInfo [i].availInodes = statBuf.f_ffree;
-X# if defined (HAS_SYSFS)
-X sysfs (GETFSTYP, statBuf.f_fstyp, diskInfo [i].fsType);
-X# endif
-X
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [i].name, diskInfo [i].fsType);
-X printf ("\tmult:%f\n", mult);
-X printf ("\tbsize:%ld\n", statBuf.f_bsize);
-X printf ("\tblocks: tot:%ld free:%ld avail:%ld\n",
-X statBuf.f_blocks, statBuf.f_bfree, statBuf.f_bavail);
-X printf ("\tinodes: tot:%ld free:%ld\n",
-X statBuf.f_files, statBuf.f_ffree);
-X }
-X } /* if we got the info */
-X else
-X {
-X fprintf (stderr, "statfs: %s ", diskInfo [i].name);
-X perror ("");
-X }
-X }
-X } /* for each entry */
-X}
-X
-X#endif /* HAS_STATFS_BSD */
-X
-X#if defined (HAS_STATFS_SYSV3) && ! defined (HAS_STATVFS) && \
-X ! defined (HAS_GETMNTINFO) && ! defined (HAS_GETMNT)
-X
-X/*
-X * getDiskInfo
-X *
-X * SysV.3. We don't have available blocks; just set it to free blocks.
-X * The sysfs () call is used to get the disk type name.
-X *
-X */
-X
-Xstatic void
-XgetDiskInfo ()
-X{
-X int i;
-X double mult;
-X struct statfs statBuf;
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X if (diskInfo [i].printFlag == DI_OK || (flags & DI_F_ALL) == DI_F_ALL)
-X {
-X if (statfs (diskInfo [i].name, &statBuf, sizeof (statBuf), 0) == 0)
-X {
-X# if defined (HAS_STATFS_FRSIZE)
-X if (statBuf.f_frsize == 0 && statBuf.f_bsize != 0)
-X {
-X mult = (double) (long) statBuf.f_bsize / dispBlockSize;
-X }
-X else
-X {
-X mult = (double) (long) statBuf.f_frsize / dispBlockSize;
-X }
-X# else
-X mult = (double) UBSIZE / dispBlockSize;
-X# endif
-X diskInfo [i].totalBlocks = ((double) (_s_fs_size_t) statBuf.f_blocks * mult);
-X diskInfo [i].freeBlocks = ((double) (_s_fs_size_t) statBuf.f_bfree * mult);
-X diskInfo [i].availBlocks = ((double) (_s_fs_size_t) statBuf.f_bfree * mult);
-X
-X diskInfo [i].totalInodes = statBuf.f_files;
-X diskInfo [i].freeInodes = statBuf.f_ffree;
-X diskInfo [i].availInodes = statBuf.f_ffree;
-X# if defined (HAS_SYSFS)
-X sysfs (GETFSTYP, statBuf.f_fstyp, diskInfo [i].fsType);
-X# endif
-X
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [i].name, diskInfo [i].fsType);
-X printf ("\tmult:%f\n", mult);
-X# if defined (HAS_STATFS_FRSIZE)
-X printf ("\tbsize:%ld\n", statBuf.f_bsize);
-X printf ("\tfrsize:%ld\n", statBuf.f_frsize);
-X# else
-X printf ("\tUBSIZE:%ld\n", UBSIZE);
-X# endif
-X printf ("\tblocks: tot:%ld free:%ld\n",
-X statBuf.f_blocks, statBuf.f_bfree);
-X printf ("\tinodes: tot:%ld free:%ld\n",
-X statBuf.f_files, statBuf.f_ffree);
-X }
-X } /* if we got the info */
-X else
-X {
-X fprintf (stderr, "statfs: %s ", diskInfo [i].name);
-X perror ("");
-X }
-X }
-X } /* for each entry */
-X}
-X
-X#endif /* HAS_STATFS_SYSV3 */
-X
-X
-X#if defined (HAS_GETDISKFREESPACE)
-X
-X/*
-X * getDiskInfo
-X *
-X * Windows
-X *
-X */
-X
-X# define NUM_MSDOS_FSTYPES 7
-Xstatic char *MSDOS_diskType [NUM_MSDOS_FSTYPES] =
-X { "unknown", "", "removable", "fixed", "remote", "cdrom", "ramdisk" };
-X# define MSDOS_BUFFER_SIZE 128
-X# define BYTES_PER_LOGICAL_DRIVE 4
-X
-Xstatic int
-XgetDiskEntries ()
-X{
-X int i;
-X int diskflag;
-X int rc;
-X char *p;
-X char buff [MSDOS_BUFFER_SIZE];
-X
-X
-X diskflag = DI_IGNORE;
-X rc = GetLogicalDriveStrings (MSDOS_BUFFER_SIZE, buff);
-X diCount = rc / BYTES_PER_LOGICAL_DRIVE;
-X
-X diskInfo = (DiskInfo *) calloc (sizeof (DiskInfo), diCount);
-X if (diskInfo == (DiskInfo *) NULL)
-X {
-X fprintf (stderr, "malloc failed for diskInfo. errno %d\n", errno);
-X return -1;
-X }
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X p = buff + (BYTES_PER_LOGICAL_DRIVE * i);
-X strncpy (diskInfo [i].name, p, DI_NAME_LEN);
-X rc = GetDriveType (p);
-X diskInfo [i].printFlag = DI_OK;
-X
-X if (rc == DRIVE_NO_ROOT_DIR)
-X {
-X diskInfo [i].printFlag = DI_BAD;
-X }
-X
-X /* assume that any removable drives before the */
-X /* first non-removable disk are floppies... */
-X else if (rc == DRIVE_REMOVABLE)
-X {
-X diskInfo [i].printFlag = diskflag;
-X }
-X else
-X {
-X diskflag = DI_OK;
-X }
-X
-X if (rc != DRIVE_REMOTE)
-X {
-X diskInfo [i].isLocal = TRUE;
-X }
-X /* strncpy (diskInfo [i].fsType, MSDOS_diskType [rc], DI_TYPE_LEN); */
-X } /* for each mounted drive */
-X
-X return diCount;
-X}
-X
-X/*
-X * getDiskInfo
-X *
-X * Windows
-X *
-X */
-X
-Xstatic void
-XgetDiskInfo ()
-X{
-X int i;
-X int rc;
-X double mult;
-X unsigned long sectorspercluster;
-X unsigned long bytespersector;
-X unsigned long totalclusters;
-X unsigned long freeclusters;
-X char tbuff [MSDOS_BUFFER_SIZE];
-X char volName [MSDOS_BUFFER_SIZE];
-X char fsName [MSDOS_BUFFER_SIZE];
-X DWORD serialNo;
-X DWORD maxCompLen;
-X DWORD fsFlags;
-X
-X
-X for (i = 0; i < diCount; ++i)
-X {
-X if (diskInfo [i].isLocal == FALSE &&
-X (flags & DI_F_LOCAL_ONLY) == DI_F_LOCAL_ONLY)
-X {
-X diskInfo [i].printFlag = DI_IGNORE;
-X if (debug > 2)
-X {
-X printf ("mnt: ignore: remote: %s\n",
-X diskInfo [i].name);
-X }
-X }
-X
-X if (diskInfo [i].printFlag == DI_OK || (flags & DI_F_ALL) == DI_F_ALL)
-X {
-X rc = GetVolumeInformation (diskInfo [i].name,
-X volName, MSDOS_BUFFER_SIZE, &serialNo, &maxCompLen,
-X &fsFlags, fsName, MSDOS_BUFFER_SIZE);
-X /* strcpy (tbuff, diskInfo [i].fsType); */
-X /* strcat (tbuff, " "); */
-X strncpy (diskInfo [i].fsType, fsName, DI_TYPE_LEN);
-X strncpy (diskInfo [i].special, volName, DI_SPEC_NAME_LEN);
-X
-X rc = GetDiskFreeSpace (diskInfo [i].name,
-X (LPDWORD) §orspercluster, (LPDWORD) &bytespersector,
-X (LPDWORD) &freeclusters, (LPDWORD) &totalclusters);
-X
-X if (rc > 0)
-X {
-X mult = (double) (sectorspercluster *
-X bytespersector) / dispBlockSize;
-X diskInfo [i].totalBlocks = ((double) (_s_fs_size_t) totalclusters * mult);
-X diskInfo [i].freeBlocks = ((double) (_s_fs_size_t) freeclusters * mult);
-X diskInfo [i].availBlocks = ((double) (_s_fs_size_t) freeclusters * mult);
-X
-X diskInfo [i].totalInodes = 0;
-X diskInfo [i].freeInodes = 0;
-X diskInfo [i].availInodes = 0;
-X
-X if (debug > 1)
-X {
-X printf ("%s: %s\n", diskInfo [i].name, diskInfo [i].fsType);
-X printf ("\ts/c:%ld b/s:%ld\n", sectorspercluster,
-X bytespersector);
-X printf ("\tmult:%f\n", mult);
-X printf ("\tclusters: tot:%ld free:%ld\n",
-X totalclusters, freeclusters);
-X }
-X }
-X else
-X {
-X diskInfo [i].printFlag = DI_BAD;
-X if (debug)
-X {
-X printf ("disk %s; could not get disk space\n",
-X diskInfo [i].name);
-X }
-X }
-X } /* if printable drive */
-X } /* for each mounted drive */
-X}
-X
-X#endif /* HAS_GETDISKFREESPACE */
-END_OF_FILE
-if test 97566 -ne `wc -c <'di.c'`; then
- echo shar: \"'di.c'\" unpacked with wrong size!
-fi
-# end of 'di.c'
-fi
-echo shar: End of archive 2 \(of 3\).
-cp /dev/null ark2isdone
-MISSING=""
-for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
-done
-if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
-else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
-fi
-## End of shell archive.
-exit 0
-
+++ /dev/null
-#! /bin/sh
-# This is a shell archive. Remove anything before this line, then unpack
-# it by saving it into a file and typing "sh file". To overwrite existing
-# files, type "sh file -c". You can also feed this as standard input via
-# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
-# will see the following message at the end:
-# "End of archive 3 (of 3)."
-# Contents: Configure
-# Wrapped by root@seer on Thu Feb 24 10:15:51 2000
-PATH=/bin:/usr/bin:/usr/ucb ; export PATH
-if test -f 'Configure' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Configure'\"
-else
-echo shar: Extracting \"'Configure'\" \(106597 characters\)
-sed "s/^X//" >'Configure' <<'END_OF_FILE'
-X#! /bin/sh
-X#
-X# If these # comments don't work, trim them. Don't worry about any other
-X# shell scripts, Configure will trim # comments from them for you.
-X#
-X# (If you are trying to port this package to a machine without sh,
-X# I would suggest you have a look at the prototypical config_h.SH file
-X# and edit it to reflect your system. Some packages may include samples
-X# of config.h for certain machines, so you might look for one of those.)
-X#
-X# Yes, you may rip this off to use in other distribution packages. This
-X# script belongs to the public domain and cannot be copyrighted.
-X#
-X# (Note: this Configure script was generated automatically. Rather than
-X# working with this copy of Configure, you may wish to get metaconfig.
-X# The dist-3.0 package (which contains metaconfig) was posted in
-X# comp.sources.misc and is available on CPAN under authors/id/RAM so
-X# you may fetch it yourself from your nearest archive site.)
-X#
-X
-X# $Id$
-X#
-X# Generated on Sat Feb 12 13:14:26 PST 2000 [metaconfig 3.0 PL70b-1]
-X# (with additional metaconfig patches by bll@gentoo.com)
-X
-Xcat >/tmp/c1$$ <<EOF
-XARGGGHHHH!!!!!
-X
-XSCO csh still thinks true is false. Write to SCO today and tell them that next
-Xyear Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
-X
-X(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
-Xwe'd have to do is go in and swap the && and || tokens, wherever they are.)
-X
-X[End of diatribe. We now return you to your regularly scheduled programming...]
-XEOF
-Xcat >/tmp/c2$$ <<EOF
-X
-XOOPS! You naughty creature! You didn't run Configure with sh!
-XI will attempt to remedy the situation by running sh for you...
-XEOF
-X
-Xtrue || cat /tmp/c1$$ /tmp/c2$$
-Xtrue || exec sh $0 $argv:q
-X
-X(exit $?0) || cat /tmp/c2$$
-X(exit $?0) || exec sh $0 $argv:q
-Xrm -f /tmp/c1$$ /tmp/c2$$
-X
-X: compute my invocation name
-Xme=$0
-Xcase "$0" in
-X*/*)
-X me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
-X test "$me" || me=$0
-X ;;
-Xesac
-X
-X: Proper separator for the PATH environment variable
-Xp_=:
-X: On OS/2 this directory should exist if this is not floppy only system :-]
-Xif test -d c:/. ; then
-X if test -n "$OS2_SHELL"; then
-X p_=\;
-X PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
-X OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
-X elif test -n "$DJGPP"; then
-X p_=\;
-X fi
-Xfi
-X
-X: Proper PATH setting
-Xpaths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
-Xpaths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
-Xpaths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
-Xpaths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
-Xpaths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
-Xpaths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
-Xpaths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
-Xpaths="$paths /sbin /usr/sbin /usr/libexec"
-X
-Xfor p in $paths
-Xdo
-X case "$p_$PATH$p_" in
-X *$p_$p$p_*) ;;
-X *) test -d $p && PATH=$PATH$p_$p ;;
-X esac
-Xdone
-X
-XPATH=.$p_$PATH
-Xexport PATH
-X
-X: shall we be using ksh?
-Xinksh=''
-Xneedksh=''
-Xavoidksh=''
-Xnewsh=/bin/ksh
-Xchangesh=''
-Xif (PATH=.; alias -x) >/dev/null 2>&1; then
-X inksh=true
-Xfi
-Xif test -f /hp-ux -a -f /bin/ksh; then
-X needksh='to avoid sh bug in "here document" expansion'
-Xfi
-Xif test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
-X if test X`/usr/bin/uname -v` = X4; then
-X avoidksh="to avoid AIX 4's /bin/sh"
-X newsh=/usr/bin/bsh
-X fi
-Xfi
-Xcase "$inksh/$needksh" in
-X/[a-z]*)
-X ENV=''
-X changesh=true
-X reason="$needksh"
-X ;;
-Xesac
-Xcase "$inksh/$avoidksh" in
-Xtrue/[a-z]*)
-X changesh=true
-X reason="$avoidksh"
-X ;;
-Xesac
-Xcase "$inksh/$needksh-$avoidksh-" in
-Xtrue/--)
-X cat <<EOM
-X(I see you are using the Korn shell. Some ksh's blow up on $me,
-Xmainly on older exotic systems. If yours does, try the Bourne shell instead.)
-XEOM
-X ;;
-Xesac
-Xcase "$changesh" in
-Xtrue)
-X echo "(Feeding myself to $newsh $reason.)"
-X case "$0" in
-X Configure|*/Configure) exec $newsh $0 "$@";;
-X *) exec $newsh Configure "$@";;
-X esac
-X ;;
-Xesac
-X
-X: if needed set CDPATH to a harmless value that is not chatty
-X: avoid bash 2.02 problems with empty CDPATH.
-Xcase "$CDPATH" in
-X'') ;;
-X*) case "$SHELL" in
-X *bash*) CDPATH='.' ;;
-X *) CDPATH='' ;;
-X esac
-X ;;
-Xesac
-X: Configure runs within the UU subdirectory
-Xtest -d UU || mkdir UU
-Xcd UU && rm -f ./*
-X
-Xdi_otherobj=''
-Xdi_prog=''
-Xd_bsd=''
-Xd_eunice=''
-Xd_xenix=''
-Xeunicefix=''
-XMcc=''
-Xar=''
-Xawk=''
-Xbash=''
-Xbison=''
-Xbyacc=''
-Xcat=''
-Xchgrp=''
-Xchmod=''
-Xchown=''
-Xcomm=''
-Xcompress=''
-Xcp=''
-Xcpio=''
-Xcpp=''
-Xcsh=''
-Xdate=''
-Xecho=''
-Xegrep=''
-Xemacs=''
-Xexpr=''
-Xfind=''
-Xflex=''
-Xgrep=''
-Xgzip=''
-Xinews=''
-Xksh=''
-Xless=''
-Xline=''
-Xlint=''
-Xln=''
-Xlp=''
-Xlpr=''
-Xls=''
-Xmail=''
-Xmailx=''
-Xmake=''
-Xmkdir=''
-Xmore=''
-Xmv=''
-Xnm=''
-Xnroff=''
-Xperl=''
-Xpg=''
-Xpmake=''
-Xpr=''
-Xrm=''
-Xrmail=''
-Xsed=''
-Xsendmail=''
-Xshar=''
-Xsleep=''
-Xsmail=''
-Xsort=''
-Xsubmit=''
-Xtail=''
-Xtar=''
-Xtbl=''
-Xtee=''
-Xtest=''
-Xtouch=''
-Xtr=''
-Xtroff=''
-Xuname=''
-Xuniq=''
-Xuuname=''
-Xvi=''
-Xzcat=''
-Xzip=''
-Xlibswanted=''
-Xhint=''
-Xmyuname=''
-Xosname=''
-Xosvers=''
-XAuthor=''
-XDate=''
-XHeader=''
-XId=''
-XLocker=''
-XLog=''
-XRCSfile=''
-XRevision=''
-XSource=''
-XState=''
-X_a=''
-X_exe=''
-X_o=''
-Xarchobjs=''
-Xexe_ext=''
-Xfirstmakefile=''
-Xlib_ext=''
-Xobj_ext=''
-Xpath_sep=''
-Xafs=''
-Xcc=''
-Xgccversion=''
-Xccflags=''
-Xcppflags=''
-Xldflags=''
-Xlkflags=''
-Xlocincpth=''
-Xoptimize=''
-Xcf_by=''
-Xcf_time=''
-Xcontains=''
-Xcpplast=''
-Xcppminus=''
-Xcpprun=''
-Xcppstdin=''
-Xd_64bit_statfs_flds=''
-Xd_bcopy=''
-Xd_bzero=''
-Xd_endmntent=''
-Xd_fs_info=''
-Xd_getmnt=''
-Xd_getmntent=''
-Xd_getmntinfo=''
-Xd_getopt=''
-Xd_optind=''
-Xd_gnulibc=''
-Xd_memcpy=''
-Xd_memset=''
-Xd_mntctl=''
-Xd_mnttime=''
-Xd_portable=''
-Xd_setmntent=''
-Xd_setmntent_one_arg=''
-Xd_statfs=''
-Xd_statfsbsd=''
-Xd_statfssysv3=''
-Xubsize=''
-Xd_statvfs=''
-Xd_index=''
-Xd_strchr=''
-Xd_sysfs=''
-Xi_fshelp=''
-Xi_kernfsinfo=''
-Xi_limits=''
-Xi_malloc=''
-Xi_memory=''
-Xi_mntent=''
-Xi_mnttab=''
-Xi_stdlib=''
-Xi_stor_directory=''
-Xi_stor_entry=''
-Xi_stor_path=''
-Xi_string=''
-Xstrings=''
-Xi_sysfstyp=''
-Xi_sysfs_types=''
-Xi_sysfstypes=''
-Xi_sysmntctl=''
-Xi_sysmntent=''
-Xi_sysmnttab=''
-Xd_getmntinfobsize=''
-Xd_getmntinfofsize=''
-Xd_getmntinfofstype=''
-Xi_sysmount=''
-Xi_sysparam=''
-Xi_sysstat=''
-Xd_statfs_frsize=''
-Xi_sysstatfs=''
-Xd_statvfsbasetype=''
-Xi_sysstatvfs=''
-Xi_systypes=''
-Xi_sysvfs=''
-Xi_sysvfstab=''
-Xi_sysvmount=''
-Xi_systime=''
-Xi_systimek=''
-Xi_time=''
-Xtimeincl=''
-Xi_unistd=''
-Xlibc=''
-Xglibpth=''
-Xlibpth=''
-Xloclibpth=''
-Xplibpth=''
-Xxlibpth=''
-Xlibs=''
-Xlns=''
-Xmake_set_make=''
-Xinstallmansrc=''
-Xmanext=''
-Xmansrc=''
-Xmansrcexp=''
-Xc=''
-Xn=''
-Xpackage=''
-Xspackage=''
-Xprefix=''
-Xprefixexp=''
-Xprototype=''
-Xsh=''
-Xso=''
-Xsharpbang=''
-Xshsharp=''
-Xspitshell=''
-Xsrc=''
-Xstartsh=''
-Xsysman=''
-Xnm_opt=''
-Xnm_so_opt=''
-Xrunnm=''
-Xusenm=''
-Xincpath=''
-Xmips=''
-Xmips_type=''
-Xusrinc=''
-Xdefvoidused=''
-Xvoidflags=''
-XCONFIG=''
-X
-Xdefine='define'
-Xundef='undef'
-Xsmallmach='pdp11 i8086 z8000 i80286 iAPX286'
-Xrmlist=''
-X
-X: We must find out about Eunice early
-Xeunicefix=':'
-Xif test -f /etc/unixtovms; then
-X eunicefix=/etc/unixtovms
-Xfi
-Xif test -f /etc/unixtovms.exe; then
-X eunicefix=/etc/unixtovms.exe
-Xfi
-X
-X: Trailing extension. Override this in a hint file, if needed.
-X_exe=''
-X: Extra object files, if any, needed on this platform.
-Xarchobjs=''
-Xgccversion=''
-X: Possible local include directories to search.
-X: Set locincpth to "" in a hint file to defeat local include searches.
-Xlocincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-Xlocincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
-X:
-X: no include file wanted by default
-Xinclwanted=''
-X
-Xi_sysselct=''
-X: change the next line if compiling for Xenix/286 on Xenix/386
-Xxlibpth='/usr/lib/386 /lib/386'
-X
-X: Possible local library directories to search.
-Xloclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
-Xloclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
-X
-X: general looking path for locating libraries
-Xglibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
-Xglibpth="$glibpth /lib /usr/lib $xlibpth"
-Xglibpth="$glibpth /lib/large /usr/lib/small /lib/small"
-Xglibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
-X
-X: Private path used by Configure to find libraries. Its value
-X: is prepended to libpth. This variable takes care of special
-X: machines, like the mips. Usually, it should be empty.
-Xplibpth=''
-X
-X: default library list
-Xlibswanted=''
-Xlarge=''
-X: full support for void wanted by default
-Xdefvoidused=15
-X
-X: List of libraries we want.
-X: If anyone needs -lnet, put it in a hint file.
-Xlibswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl'
-Xlibswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
-Xlibswanted="$libswanted ucb bsd BSD PW x"
-X: We probably want to search /usr/shlib before most other libraries.
-X: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
-Xglibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
-Xglibpth="/usr/shlib $glibpth"
-X: Do not use vfork unless overridden by a hint file.
-Xusevfork=false
-X
-X: Find the basic shell for Bourne shell scripts
-Xcase "$sh" in
-X'')
-X case "$SYSTYPE" in
-X *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
-X *) xxx='/bin/sh';;
-X esac
-X if test -f "$xxx"; then
-X sh="$xxx"
-X else
-X : Build up a list and do a single loop so we can 'break' out.
-X pth=`echo $PATH | sed -e "s/$p_/ /g"`
-X for xxx in sh bash ksh pdksh ash; do
-X for p in $pth; do
-X try="$try ${p}/${xxx}"
-X done
-X done
-X for xxx in $try; do
-X if test -f "$xxx"; then
-X sh="$xxx";
-X break
-X elif test -f "$xxx.exe"; then
-X sh="$xxx";
-X break
-X fi
-X done
-X fi
-X ;;
-Xesac
-X
-Xcase "$sh" in
-X'') cat <<EOM >&2
-X$me: Fatal Error: I can't find a Bourne Shell anywhere.
-X
-XUsually it's in /bin/sh. How did you even get this far?
-XPlease contact me (Brad Lanam) at bll@gentoo.com and
-Xwe'll try to straighten this all out.
-XEOM
-X exit 1
-X ;;
-Xesac
-X
-X: see if sh knows # comments
-Xif `$sh -c '#' >/dev/null 2>&1`; then
-X shsharp=true
-X spitshell=cat
-X xcat=/bin/cat
-X test -f $xcat || xcat=/usr/bin/cat
-X echo "#!$xcat" >try
-X $eunicefix try
-X chmod +x try
-X ./try > today
-X if test -s today; then
-X sharpbang='#!'
-X else
-X echo "#! $xcat" > try
-X $eunicefix try
-X chmod +x try
-X ./try > today
-X if test -s today; then
-X sharpbang='#! '
-X else
-X sharpbang=': use '
-X fi
-X fi
-Xelse
-X echo " "
-X echo "Your $sh doesn't grok # comments--I will strip them later on."
-X shsharp=false
-X cd ..
-X echo "exec grep -v '^[ ]*#'" >spitshell
-X chmod +x spitshell
-X $eunicefix spitshell
-X spitshell=`pwd`/spitshell
-X cd UU
-X echo "I presume that if # doesn't work, #! won't work either!"
-X sharpbang=': use '
-Xfi
-Xrm -f try today
-X
-X: figure out how to guarantee sh startup
-Xcase "$startsh" in
-X'') startsh=${sharpbang}${sh} ;;
-X*)
-Xesac
-Xcat >try <<EOSS
-X$startsh
-Xset abc
-Xtest "$?abc" != 1
-XEOSS
-X
-Xchmod +x try
-X$eunicefix try
-Xif ./try; then
-X : echo "Yup, it does."
-Xelse
-X echo "Hmm... '$startsh' does not guarantee sh startup..."
-X echo "You may have to fix up the shell scripts to make sure $sh runs them."
-Xfi
-Xrm -f try
-X
-X
-X: Save command line options in file UU/cmdline.opt for later use in
-X: generating config.sh.
-Xcat > cmdline.opt <<EOSH
-X# Configure command line arguments.
-Xconfig_arg0='$0'
-Xconfig_args='$*'
-Xconfig_argc=$#
-XEOSH
-Xargn=1
-Xfor arg in "$@"; do
-X cat >>cmdline.opt <<EOSH
-Xconfig_arg$argn='$arg'
-XEOSH
-X argn=`expr $argn + 1`
-Xdone
-X
-X: produce awk script to parse command line options
-Xcat >options.awk <<'EOF'
-XBEGIN {
-X optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
-X
-X len = length(optstr);
-X for (i = 1; i <= len; i++) {
-X c = substr(optstr, i, 1);
-X if (i < len) a = substr(optstr, i + 1, 1); else a = "";
-X if (a == ":") {
-X arg[c] = 1;
-X i++;
-X }
-X opt[c] = 1;
-X }
-X}
-X{
-X expect = 0;
-X str = $0;
-X if (substr(str, 1, 1) != "-") {
-X printf("'%s'\n", str);
-X next;
-X }
-X len = length($0);
-X for (i = 2; i <= len; i++) {
-X c = substr(str, i, 1);
-X if (!opt[c]) {
-X printf("-%s\n", substr(str, i));
-X next;
-X }
-X printf("-%s\n", c);
-X if (arg[c]) {
-X if (i < len)
-X printf("'%s'\n", substr(str, i + 1));
-X else
-X expect = 1;
-X next;
-X }
-X }
-X}
-XEND {
-X if (expect)
-X print "?";
-X}
-XEOF
-X
-X: process the command line options
-Xset X `for arg in "$@"; do echo "X$arg"; done |
-X sed -e s/X// | awk -f options.awk`
-Xeval "set $*"
-Xshift
-Xrm -f options.awk
-X
-X: set up default values
-Xfastread=''
-Xreuseval=false
-Xconfig_sh=''
-Xalldone=''
-Xerror=''
-Xsilent=''
-Xextractsh=''
-Xoverride=''
-Xknowitall=''
-Xrm -f optdef.sh
-Xcat >optdef.sh <<EOS
-X$startsh
-XEOS
-X
-X
-X: option parsing
-Xwhile test $# -gt 0; do
-X case "$1" in
-X -d) shift; fastread=yes;;
-X -e) shift; alldone=cont;;
-X -f)
-X shift
-X cd ..
-X if test -r "$1"; then
-X config_sh="$1"
-X else
-X echo "$me: cannot read config file $1." >&2
-X error=true
-X fi
-X cd UU
-X shift;;
-X -h) shift; error=true;;
-X -r) shift; reuseval=true;;
-X -s) shift; silent=true; realsilent=true;;
-X -E) shift; alldone=exit;;
-X -K) shift; knowitall=true;;
-X -O) shift; override=true;;
-X -S) shift; silent=true; extractsh=true;;
-X -D)
-X shift
-X case "$1" in
-X *=)
-X echo "$me: use '-U symbol=', not '-D symbol='." >&2
-X echo "$me: ignoring -D $1" >&2
-X ;;
-X *=*) echo "$1" | \
-X sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
-X *) echo "$1='define'" >> optdef.sh;;
-X esac
-X shift
-X ;;
-X -U)
-X shift
-X case "$1" in
-X *=) echo "$1" >> optdef.sh;;
-X *=*)
-X echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
-X echo "$me: ignoring -U $1" >&2
-X ;;
-X *) echo "$1='undef'" >> optdef.sh;;
-X esac
-X shift
-X ;;
-X -V) echo "$me generated by metaconfig 3.0 PL70b-1." >&2
-X exit 0;;
-X --) break;;
-X -*) echo "$me: unknown option $1" >&2; shift; error=true;;
-X *) break;;
-X esac
-Xdone
-X
-Xcase "$error" in
-Xtrue)
-X cat >&2 <<EOM
-XUsage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
-X [-U symbol] [-U symbol=]
-X -d : use defaults for all answers.
-X -e : go on without questioning past the production of config.sh.
-X -f : specify an alternate default configuration file.
-X -h : print this help message and exit (with an error status).
-X -r : reuse C symbols value if possible (skips costly nm extraction).
-X -s : silent mode, only echoes questions and essential information.
-X -D : define symbol to have some value:
-X -D symbol symbol gets the value 'define'
-X -D symbol=value symbol gets the value 'value'
-X -E : stop at the end of questions, after having produced config.sh.
-X -K : do not use unless you know what you are doing.
-X -O : let -D and -U override definitions from loaded configuration file.
-X -S : perform variable substitutions on all .SH files (can mix with -f)
-X -U : undefine symbol:
-X -U symbol symbol gets the value 'undef'
-X -U symbol= symbol gets completely empty
-X -V : print version number and exit (with a zero status).
-XEOM
-X exit 1
-X ;;
-Xesac
-X
-X: Sanity checks
-Xcase "$fastread$alldone" in
-Xyescont|yesexit) ;;
-X*)
-X if test ! -t 0; then
-X echo "Say 'sh Configure', not 'sh <Configure'"
-X exit 1
-X fi
-X ;;
-Xesac
-X
-Xexec 4>&1
-Xcase "$silent" in
-Xtrue) exec 1>/dev/null;;
-Xesac
-X
-X: run the defines and the undefines, if any, but leave the file out there...
-Xtouch optdef.sh
-X. ./optdef.sh
-X
-X: set package name
-Xpackage=di
-Xfirst=`echo $package | sed -e 's/^\(.\).*/\1/'`
-Xlast=`echo $package | sed -e 's/^.\(.*\)/\1/'`
-Xcase "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
-XABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
-X*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
-Xesac
-X
-X: Some greps do not return status, grrr.
-Xecho "grimblepritz" >grimble
-Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
-X contains=contains
-Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then
-X contains=grep
-Xelse
-X contains=contains
-Xfi
-Xrm -f grimble
-X: the following should work in any shell
-Xcase "$contains" in
-Xcontains*)
-X echo " "
-X echo "AGH! Grep doesn't return a status. Attempting remedial action."
-X cat >contains <<'EOSS'
-Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
-XEOSS
-Xchmod +x contains
-Xesac
-X
-X: Find the path to the source tree
-Xcase "$src" in
-X'') case "$0" in
-X */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
-X *) src='.';;
-X esac;;
-Xesac
-Xcase "$src" in
-X'') src=/
-X rsrc=/
-X ;;
-X/*) rsrc="$src";;
-X*) rsrc="../$src";;
-Xesac
-Xif test -f $rsrc/Configure && \
-X $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
-Xthen
-X : found it, so we are ok.
-Xelse
-X rsrc=''
-X for src in . .. ../.. ../../.. ../../../..; do
-X if test -f ../$src/Configure && \
-X $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
-X then
-X rsrc=../$src
-X break
-X fi
-X done
-Xfi
-Xcase "$rsrc" in
-X'')
-X cat <<EOM >&4
-X
-XSorry, I can't seem to locate the source dir for $package. Please start
-XConfigure with an explicit path -- i.e. /some/path/Configure.
-X
-XEOM
-X exit 1
-X ;;
-X../.) rsrc='..';;
-X*)
-X echo " "
-X echo "Sources for $package found in \"$src\"." >&4
-X ;;
-Xesac
-X
-X: script used to extract .SH files with variable substitutions
-Xcat >extract <<'EOS'
-XCONFIG=true
-Xecho "Doing variable substitutions on .SH files..."
-Xif test -f $src/MANIFEST; then
-X set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
-Xelse
-X echo "(Looking for .SH files under the source directory.)"
-X set x `(cd $src; find . -name "*.SH" -print)`
-Xfi
-Xshift
-Xcase $# in
-X0) set x `(cd $src; echo *.SH)`; shift;;
-Xesac
-Xif test ! -f $src/$1; then
-X shift
-Xfi
-Xmkdir_p='
-Xname=$1;
-Xcreate="";
-Xwhile test $name; do
-X if test ! -d "$name"; then
-X create="$name $create";
-X name=`echo $name | sed -e "s|^[^/]*$||"`;
-X name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
-X else
-X name="";
-X fi;
-Xdone;
-Xfor file in $create; do
-X mkdir $file;
-Xdone
-X'
-Xfor file in $*; do
-X case "$src" in
-X ".")
-X case "$file" in
-X */*)
-X dir=`expr X$file : 'X\(.*\)/'`
-X file=`expr X$file : 'X.*/\(.*\)'`
-X (cd $dir && . ./$file)
-X ;;
-X *)
-X . ./$file
-X ;;
-X esac
-X ;;
-X *)
-X case "$file" in
-X */*)
-X dir=`expr X$file : 'X\(.*\)/'`
-X file=`expr X$file : 'X.*/\(.*\)'`
-X (set x $dir; shift; eval $mkdir_p)
-X sh <$src/$dir/$file
-X ;;
-X *)
-X sh <$src/$file
-X ;;
-X esac
-X ;;
-X esac
-Xdone
-Xif test -f $src/config_h.SH; then
-X if test ! -f config.h; then
-X : oops, they left it out of MANIFEST, probably, so do it anyway.
-X . $src/config_h.SH
-X fi
-Xfi
-XEOS
-X
-X: extract files and exit if asked to do so
-Xcase "$extractsh" in
-Xtrue)
-X case "$realsilent" in
-X true) ;;
-X *) exec 1>&4;;
-X esac
-X case "$config_sh" in
-X '') config_sh='config.sh';;
-X esac
-X echo " "
-X echo "Fetching answers from $config_sh..."
-X cd ..
-X . $config_sh
-X test "$override" && . ./optdef.sh
-X echo " "
-X . UU/extract
-X rm -rf UU
-X echo "Done."
-X exit 0
-X ;;
-Xesac
-X
-X: Eunice requires " " instead of "", can you believe it
-Xecho " "
-X: Here we go...
-Xecho "Beginning of configuration questions for $package."
-X
-Xtrap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
-X
-X: first determine how to suppress newline on echo command
-Xecho " "
-Xecho "Checking echo to see how to suppress newlines..."
-X(echo "hi there\c" ; echo " ") >.echotmp
-Xif $contains c .echotmp >/dev/null 2>&1 ; then
-X echo "...using -n."
-X n='-n'
-X c=''
-Xelse
-X cat <<'EOM'
-X...using \c
-XEOM
-X n=''
-X c='\c'
-Xfi
-Xecho $n "The star should be here-->$c"
-Xecho '*'
-Xrm -f .echotmp
-X
-X: Now test for existence of everything in MANIFEST
-Xecho " "
-Xif test -f $rsrc/MANIFEST; then
-X echo "First let's make sure your kit is complete. Checking..." >&4
-X awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
-X rm -f missing
-X tmppwd=`pwd`
-X for filelist in x??; do
-X (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
-X done
-X if test -s missing; then
-X cat missing >&4
-X cat >&4 <<'EOM'
-X
-XTHIS PACKAGE SEEMS TO BE INCOMPLETE.
-X
-XYou have the option of continuing the configuration process, despite the
-Xdistinct possibility that your kit is damaged, by typing 'y'es. If you
-Xdo, don't blame me if something goes wrong. I advise you to type 'n'o
-Xand contact the author (bll@gentoo.com).
-X
-XEOM
-X echo $n "Continue? [n] $c" >&4
-X read ans
-X case "$ans" in
-X y*)
-X echo "Continuing..." >&4
-X rm -f missing
-X ;;
-X *)
-X echo "ABORTING..." >&4
-X kill $$
-X ;;
-X esac
-X else
-X echo "Looks good..."
-X fi
-Xelse
-X echo "There is no MANIFEST file. I hope your kit is complete !"
-Xfi
-Xrm -f missing x??
-X
-X: compute the number of columns on the terminal for proper question formatting
-Xcase "$COLUMNS" in
-X'') COLUMNS='80';;
-Xesac
-X
-X: set up the echo used in my read
-Xmyecho="case \"\$xxxm\" in
-X'') echo $n \"\$rp $c\" >&4;;
-X*) case \"\$rp\" in
-X '') echo $n \"[\$xxxm] $c\";;
-X *)
-X if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
-X echo \"\$rp\" >&4
-X echo $n \"[\$xxxm] $c\" >&4
-X else
-X echo $n \"\$rp [\$xxxm] $c\" >&4
-X fi
-X ;;
-X esac;;
-Xesac"
-X
-X: now set up to do reads with possible shell escape and default assignment
-Xcat <<EOSC >myread
-X$startsh
-Xxxxm=\$dflt
-X$myecho
-Xans='!'
-Xcase "\$fastread" in
-Xyes) case "\$dflt" in
-X '') ;;
-X *) ans='';
-X case "\$silent-\$rp" in
-X true-) ;;
-X *) echo " " >&4;;
-X esac;;
-X esac;;
-X*) case "\$silent" in
-X true) case "\$rp" in
-X '') ans='';;
-X esac;;
-X esac;;
-Xesac
-Xwhile expr "X\$ans" : "X!" >/dev/null; do
-X read answ
-X set x \$xxxm
-X shift
-X aok=''; eval "ans=\\"\$answ\\"" && aok=y
-X case "\$answ" in
-X "!")
-X sh 1>&4
-X echo " "
-X $myecho
-X ;;
-X !*)
-X set x \`expr "X\$ans" : "X!\(.*\)\$"\`
-X shift
-X sh 1>&4 -c "\$*"
-X echo " "
-X $myecho
-X ;;
-X "\$ans")
-X case "\$ans" in
-X \\&*)
-X set x \`expr "X\$ans" : "X&\(.*\)\$"\`
-X shift
-X case "\$1" in
-X -d)
-X fastread=yes
-X echo "(OK, I'll run with -d after this question.)" >&4
-X ;;
-X -*)
-X echo "*** Sorry, \$1 not supported yet." >&4
-X ;;
-X esac
-X $myecho
-X ans=!
-X ;;
-X esac;;
-X *)
-X case "\$aok" in
-X y)
-X echo "*** Substitution done -- please confirm."
-X xxxm="\$ans"
-X ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
-X xxxm="\$ans"
-X ans=!
-X ;;
-X *)
-X echo "*** Error -- try again."
-X ans=!
-X ;;
-X esac
-X $myecho
-X ;;
-X esac
-X case "\$ans\$xxxm\$nostick" in
-X '')
-X ans=!
-X $myecho
-X ;;
-X esac
-Xdone
-Xcase "\$ans" in
-X'') ans="\$xxxm";;
-Xesac
-XEOSC
-X
-X: create .config dir to save info across Configure sessions
-Xtest -d ../.config || mkdir ../.config
-Xcat >../.config/README <<EOF
-XThis directory created by Configure to save information that should
-Xpersist across sessions for $package.
-X
-XYou may safely delete it if you wish.
-XEOF
-X
-X: general instructions
-Xneedman=true
-Xfirsttime=true
-Xuser=`(logname) 2>/dev/null`
-Xcase "$user" in
-X'') user=`whoami 2>&1`;;
-Xesac
-Xif $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
-X firsttime=false
-X echo " "
-X rp='Would you like to see the instructions?'
-X dflt=n
-X . ./myread
-X case "$ans" in
-X [yY]*) ;;
-X *) needman=false;;
-X esac
-Xfi
-Xif $needman; then
-X cat <<EOH
-X
-XThis installation shell script will examine your system and ask you questions
-Xto determine how the di package should be installed. If you get
-Xstuck on a question, you may use a ! shell escape to start a subshell or
-Xexecute a command. Many of the questions will have default answers in square
-Xbrackets; typing carriage return will give you the default.
-X
-XOn some of the questions which ask for file or directory names you are allowed
-Xto use the ~name construct to specify the login directory belonging to "name",
-Xeven if you don't have a shell which knows about that. Questions where this is
-Xallowed will be marked "(~name ok)".
-X
-XEOH
-X rp=''
-X dflt='Type carriage return to continue'
-X . ./myread
-X cat <<'EOH'
-X
-XThe prompter used in this script allows you to use shell variables and
-Xbackticks in your answers. You may use $1, $2, etc... to refer to the words
-Xin the default answer, as if the default line was a set of arguments given to a
-Xscript shell. This means you may also use $* to repeat the whole default line,
-Xso you do not have to re-type everything to add something to the default.
-X
-XEverytime there is a substitution, you will have to confirm. If there is an
-Xerror (e.g. an unmatched backtick), the default answer will remain unchanged
-Xand you will be prompted again.
-X
-XIf you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
-Xthe questions and use the computed defaults (or the previous answers if there
-Xwas already a config.sh file). Type 'Configure -h' for a list of options.
-XYou may also start interactively and then answer '& -d' at any prompt to turn
-Xon the non-interactive behaviour for the remainder of the execution.
-X
-XEOH
-X . ./myread
-X cat <<EOH
-X
-XMuch effort has been expended to ensure that this shell script will run on any
-XUnix system. If despite that it blows up on yours, your best bet is to edit
-XConfigure and run it again. If you can't run Configure for some reason,
-Xyou'll have to generate a config.sh file by hand. Whatever problems you
-Xhave, let me (bll@gentoo.com) know how I blew it.
-X
-XThis installation script affects things in two ways:
-X
-X1) it may do direct variable substitutions on some of the files included
-X in this kit.
-X2) it builds a config.h file for inclusion in C programs. You may edit
-X any of these files as the need arises after running this script.
-X
-XIf you make a mistake on a question, there is no easy way to back up to it
-Xcurrently. The easiest thing to do is to edit config.sh and rerun all the SH
-Xfiles. Configure will offer to let you do this before it runs the SH files.
-X
-XEOH
-X dflt='Type carriage return to continue'
-X . ./myread
-X case "$firsttime" in
-X true) echo $user >>../.config/instruct;;
-X esac
-Xfi
-X
-X: find out where common programs are
-Xecho " "
-Xecho "Locating common programs..." >&4
-Xcat <<EOSC >loc
-X$startsh
-Xcase \$# in
-X0) exit 1;;
-Xesac
-Xthing=\$1
-Xshift
-Xdflt=\$1
-Xshift
-Xfor dir in \$*; do
-X case "\$thing" in
-X .)
-X if test -d \$dir/\$thing; then
-X echo \$dir
-X exit 0
-X fi
-X ;;
-X *)
-X for thisthing in \$dir/\$thing; do
-X : just loop through to pick last item
-X done
-X if test -f \$thisthing; then
-X echo \$thisthing
-X exit 0
-X elif test -f \$dir/\$thing.exe; then
-X if test -n "$DJGPP"; then
-X echo \$dir/\$thing.exe
-X else
-X : on Eunice apparently
-X echo \$dir/\$thing
-X fi
-X exit 0
-X fi
-X ;;
-X esac
-Xdone
-Xecho \$dflt
-Xexit 1
-XEOSC
-Xchmod +x loc
-X$eunicefix loc
-Xloclist="
-Xawk
-Xcat
-Xchgrp
-Xchmod
-Xchown
-Xcp
-Xecho
-Xexpr
-Xgrep
-Xmake
-Xmv
-Xrm
-Xsed
-Xtouch
-Xtr
-X"
-Xtrylist="
-XMcc
-Xar
-Xcpp
-Xdate
-Xegrep
-Xln
-Xnm
-Xnroff
-Xtest
-Xuname
-X"
-Xpth=`echo $PATH | sed -e "s/$p_/ /g"`
-Xpth="$pth /lib /usr/lib"
-Xfor file in $loclist; do
-X eval xxx=\$$file
-X case "$xxx" in
-X /*|?:[\\/]*)
-X if test -f "$xxx"; then
-X : ok
-X else
-X echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
-X xxx=`./loc $file $file $pth`
-X fi
-X ;;
-X '') xxx=`./loc $file $file $pth`;;
-X *) xxx=`./loc $xxx $xxx $pth`;;
-X esac
-X eval $file=$xxx
-X eval _$file=$xxx
-X case "$xxx" in
-X /*)
-X echo $file is in $xxx.
-X ;;
-X ?:[\\/]*)
-X echo $file is in $xxx.
-X ;;
-X *)
-X echo "I don't know where '$file' is, and my life depends on it." >&4
-X echo "Go find a public domain implementation or fix your PATH setting!" >&4
-X exit 1
-X ;;
-X esac
-Xdone
-Xecho " "
-Xecho "Don't worry if any of the following aren't found..."
-Xsay=offhand
-Xfor file in $trylist; do
-X eval xxx=\$$file
-X case "$xxx" in
-X /*|?:[\\/]*)
-X if test -f "$xxx"; then
-X : ok
-X else
-X echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
-X xxx=`./loc $file $file $pth`
-X fi
-X ;;
-X '') xxx=`./loc $file $file $pth`;;
-X *) xxx=`./loc $xxx $xxx $pth`;;
-X esac
-X eval $file=$xxx
-X eval _$file=$xxx
-X case "$xxx" in
-X /*)
-X echo $file is in $xxx.
-X ;;
-X ?:[\\/]*)
-X echo $file is in $xxx.
-X ;;
-X *)
-X echo "I don't see $file out there, $say."
-X say=either
-X ;;
-X esac
-Xdone
-Xcase "$egrep" in
-Xegrep)
-X echo "Substituting grep for egrep."
-X egrep=$grep
-X ;;
-Xesac
-Xcase "$ln" in
-Xln)
-X echo "Substituting cp for ln."
-X ln=$cp
-X ;;
-Xesac
-Xcase "$test" in
-Xtest)
-X echo "Hopefully test is built into your sh."
-X ;;
-X*)
-X if `sh -c "PATH= test true" >/dev/null 2>&1`; then
-X echo "Using the test built into your sh."
-X test=test
-X _test=test
-X fi
-X ;;
-Xesac
-Xcase "$echo" in
-Xecho)
-X echo "Hopefully echo is built into your sh."
-X ;;
-X'') ;;
-X*)
-X echo " "
-Xecho "Checking compatibility between $echo and builtin echo (if any)..." >&4
-X $echo $n "hi there$c" >foo1
-X echo $n "hi there$c" >foo2
-X if cmp foo1 foo2 >/dev/null 2>&1; then
-X echo "They are compatible. In fact, they may be identical."
-X else
-X case "$n" in
-X '-n') n='' c='\c';;
-X *) n='-n' c='';;
-X esac
-X cat <<FOO
-XThey are not compatible! You are probably running ksh on a non-USG system.
-XI'll have to use $echo instead of the builtin, since Bourne shell doesn't
-Xhave echo built in and we may have to run some Bourne shell scripts. That
-Xmeans I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
-X
-XFOO
-X $echo $n "The star should be here-->$c"
-X $echo "*"
-X fi
-X $rm -f foo1 foo2
-X ;;
-Xesac
-X
-X: determine whether symbolic links are supported
-Xecho " "
-X$touch blurfl
-Xif $ln -s blurfl sym > /dev/null 2>&1 ; then
-X echo "Symbolic links are supported." >&4
-X lns="$ln -s"
-Xelse
-X echo "Symbolic links are NOT supported." >&4
-X lns="$ln"
-Xfi
-X$rm -f blurfl sym
-X
-X: see whether [:lower:] and [:upper:] are supported character classes
-Xecho " "
-Xup='[A-Z]'
-Xlow='[a-z]'
-Xcase "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
-XABYZ)
-X echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
-X up='[:upper:]'
-X low='[:lower:]'
-X ;;
-X*)
-X echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
-X ;;
-Xesac
-X: set up the translation script tr, must be called with ./tr of course
-Xcat >tr <<EOSC
-X$startsh
-Xcase "\$1\$2" in
-X'[A-Z][a-z]') exec $tr '$up' '$low';;
-X'[a-z][A-Z]') exec $tr '$low' '$up';;
-Xesac
-Xexec $tr "\$@"
-XEOSC
-Xchmod +x tr
-X$eunicefix tr
-X
-X: Try to determine whether config.sh was made on this system
-Xcase "$config_sh" in
-X'')
-Xmyuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
-Xmyuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
-X ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
-Xnewmyuname="$myuname"
-Xdflt=n
-Xcase "$knowitall" in
-X'')
-X if test -f ../config.sh; then
-X if $contains myuname= ../config.sh >/dev/null 2>&1; then
-X eval "`grep myuname= ../config.sh`"
-X fi
-X if test "X$myuname" = "X$newmyuname"; then
-X dflt=y
-X fi
-X fi
-X ;;
-X*) dflt=y;;
-Xesac
-X
-X: Get old answers from old config file if Configure was run on the
-X: same system, otherwise use the hints.
-Xhint=default
-Xcd ..
-Xif test -f config.sh; then
-X echo " "
-X rp="I see a config.sh file. Shall I use it to set the defaults?"
-X . UU/myread
-X case "$ans" in
-X n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
-X *) echo "Fetching default answers from your old config.sh file..." >&4
-X tmp_n="$n"
-X tmp_c="$c"
-X tmp_sh="$sh"
-X . ./config.sh
-X cp config.sh UU
-X n="$tmp_n"
-X c="$tmp_c"
-X : Older versions did not always set $sh. Catch re-use of such
-X : an old config.sh.
-X case "$sh" in
-X '') sh="$tmp_sh" ;;
-X esac
-X hint=previous
-X ;;
-X esac
-Xfi
-Xif test ! -f config.sh; then
-X $cat <<EOM
-X
-XFirst time through, eh? I have some defaults handy for some systems
-Xthat need some extra help getting the Configure answers right:
-X
-XEOM
-X (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
-X dflt=''
-X : Half the following guesses are probably wrong... If you have better
-X : tests or hints, please send them to bll@gentoo.com
-X : The metaconfig authors would also appreciate a copy...
-X $test -f /irix && osname=irix
-X $test -f /xenix && osname=sco_xenix
-X $test -f /dynix && osname=dynix
-X $test -f /dnix && osname=dnix
-X $test -f /lynx.os && osname=lynxos
-X $test -f /unicos && osname=unicos && osvers=`$uname -r`
-X $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
-X $test -f /bin/mips && /bin/mips && osname=mips
-X $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
-X $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
-X $test -d /usr/apollo/bin && osname=apollo
-X $test -f /etc/saf/_sactab && osname=svr4
-X $test -d /usr/include/minix && osname=minix
-X if $test -d /MachTen; then
-X osname=machten
-X if $test -x /sbin/version; then
-X osvers=`/sbin/version | $awk '{print $2}' |
-X $sed -e 's/[A-Za-z]$//'`
-X elif $test -x /usr/etc/version; then
-X osvers=`/usr/etc/version | $awk '{print $2}' |
-X $sed -e 's/[A-Za-z]$//'`
-X else
-X osvers="$2.$3"
-X fi
-X fi
-X if $test -f $uname; then
-X set X $myuname
-X shift
-X
-X case "$5" in
-X fps*) osname=fps ;;
-X mips*)
-X case "$4" in
-X umips) osname=umips ;;
-X *) osname=mips ;;
-X esac;;
-X [23]100) osname=mips ;;
-X next*) osname=next ;;
-X i386*)
-X if $test -f /etc/kconfig; then
-X osname=isc
-X if test "$lns" = "ln -s"; then
-X osvers=4
-X elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
-X osvers=3
-X elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
-X osvers=2
-X fi
-X fi
-X ;;
-X pc*)
-X if test -n "$DJGPP"; then
-X osname=dos
-X osvers=djgpp
-X fi
-X ;;
-X esac
-X
-X case "$1" in
-X aix) osname=aix
-X tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
-X case "$tmp" in
-X 'not found') osvers="$4"."$3" ;;
-X '<3240'|'<>3240') osvers=3.2.0 ;;
-X '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
-X '=3250'|'>3250') osvers=3.2.5 ;;
-X *) osvers=$tmp;;
-X esac
-X ;;
-X *dc.osx) osname=dcosx
-X osvers="$3"
-X ;;
-X dnix) osname=dnix
-X osvers="$3"
-X ;;
-X domainos) osname=apollo
-X osvers="$3"
-X ;;
-X dgux) osname=dgux
-X osvers="$3"
-X ;;
-X dynixptx*) osname=dynixptx
-X osvers="$3"
-X ;;
-X freebsd) osname=freebsd
-X osvers="$3" ;;
-X genix) osname=genix ;;
-X hp*) osname=hpux
-X osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
-X ;;
-X irix*) osname=irix
-X case "$3" in
-X 4*) osvers=4 ;;
-X 5*) osvers=5 ;;
-X *) osvers="$3" ;;
-X esac
-X ;;
-X linux) osname=linux
-X case "$3" in
-X *) osvers="$3" ;;
-X esac
-X ;;
-X netbsd*) osname=netbsd
-X osvers="$3"
-X ;;
-X news-os) osvers="$3"
-X case "$3" in
-X 4*) osname=newsos4 ;;
-X *) osname=newsos ;;
-X esac
-X ;;
-X bsd386) osname=bsd386
-X osvers=`$uname -r`
-X ;;
-X powerux | power_ux | powermax_os | powermaxos | \
-X powerunix | power_unix) osname=powerux
-X osvers="$3"
-X ;;
-X next*) osname=next ;;
-X solaris) osname=solaris
-X case "$3" in
-X 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
-X *) osvers="$3" ;;
-X esac
-X ;;
-X sunos) osname=sunos
-X case "$3" in
-X 5*) osname=solaris
-X osvers=`echo $3 | $sed 's/^5/2/g'` ;;
-X *) osvers="$3" ;;
-X esac
-X ;;
-X titanos) osname=titanos
-X case "$3" in
-X 1*) osvers=1 ;;
-X 2*) osvers=2 ;;
-X 3*) osvers=3 ;;
-X 4*) osvers=4 ;;
-X *) osvers="$3" ;;
-X esac
-X ;;
-X ultrix) osname=ultrix
-X osvers="$3"
-X ;;
-X osf1|mls+) case "$5" in
-X alpha)
-X osname=dec_osf
-X osvers=`echo "$3" | sed 's/^[xvt]//'`
-X ;;
-X hp*) osname=hp_osf1 ;;
-X mips) osname=mips_osf1 ;;
-X esac
-X ;;
-X uts) osname=uts
-X osvers="$3"
-X ;;
-X qnx) osname=qnx
-X osvers="$4"
-X ;;
-X beos) osname=beos
-X osvers="$3"
-X ;;
-X $2) case "$osname" in
-X *isc*) ;;
-X *freebsd*) ;;
-X svr*)
-X : svr4.x or possibly later
-X case "svr$3" in
-X ${osname}*)
-X osname=svr$3
-X osvers=$4
-X ;;
-X esac
-X case "$osname" in
-X svr4.0)
-X : Check for ESIX
-X if test -f /stand/boot ; then
-X eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
-X if test -n "$INITPROG" -a -f "$INITPROG"; then
-X isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
-X if test -n "$isesix"; then
-X osname=esix4
-X fi
-X fi
-X fi
-X ;;
-X esac
-X ;;
-X *) if test -f /etc/systemid; then
-X osname=sco
-X set `echo $3 | $sed 's/\./ /g'` $4
-X if $test -f $src/hints/sco_$1_$2_$3.sh; then
-X osvers=$1.$2.$3
-X elif $test -f $src/hints/sco_$1_$2.sh; then
-X osvers=$1.$2
-X elif $test -f $src/hints/sco_$1.sh; then
-X osvers=$1
-X fi
-X else
-X case "$osname" in
-X '') : Still unknown. Probably a generic Sys V.
-X osname="sysv"
-X osvers="$3"
-X ;;
-X esac
-X fi
-X ;;
-X esac
-X ;;
-X *) case "$osname" in
-X '') : Still unknown. Probably a generic BSD.
-X osname="$1"
-X osvers="$3"
-X ;;
-X esac
-X ;;
-X esac
-X else
-X if test -f /vmunix -a -f $src/hints/news_os.sh; then
-X (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
-X if $contains news-os UU/kernel.what >/dev/null 2>&1; then
-X osname=news_os
-X fi
-X $rm -f UU/kernel.what
-X elif test -d c:/.; then
-X set X $myuname
-X osname=os2
-X osvers="$5"
-X fi
-X fi
-X
-X : Now look for a hint file osname_osvers, unless one has been
-X : specified already.
-X case "$hintfile" in
-X ''|' ')
-X file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
-X : Also try without trailing minor version numbers.
-X xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
-X xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
-X xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
-X xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
-X case "$file" in
-X '') dflt=none ;;
-X *) case "$osvers" in
-X '') dflt=$file
-X ;;
-X *) if $test -f $src/hints/$file.sh ; then
-X dflt=$file
-X elif $test -f $src/hints/$xfile.sh ; then
-X dflt=$xfile
-X elif $test -f $src/hints/$xxfile.sh ; then
-X dflt=$xxfile
-X elif $test -f $src/hints/$xxxfile.sh ; then
-X dflt=$xxxfile
-X elif $test -f $src/hints/$xxxxfile.sh ; then
-X dflt=$xxxxfile
-X elif $test -f "$src/hints/${osname}.sh" ; then
-X dflt="${osname}"
-X else
-X dflt=none
-X fi
-X ;;
-X esac
-X ;;
-X esac
-X if $test -f Policy.sh ; then
-X case "$dflt" in
-X *Policy*) ;;
-X none) dflt="Policy" ;;
-X *) dflt="Policy $dflt" ;;
-X esac
-X fi
-X ;;
-X *)
-X dflt=`echo $hintfile | $sed 's/\.sh$//'`
-X ;;
-X esac
-X
-X if $test -f Policy.sh ; then
-X $cat <<EOM
-X
-XThere's also a Policy hint file available, which should make the
-Xsite-specific (policy) questions easier to answer.
-XEOM
-X
-X fi
-X
-X $cat <<EOM
-X
-XYou may give one or more space-separated answers, or "none" if appropriate.
-XA well-behaved OS will have no hints, so answering "none" or just "Policy"
-Xis a good thing. DO NOT give a wrong version.
-X
-XEOM
-X
-X rp="Which of these apply, if any?"
-X . UU/myread
-X tans=$ans
-X for file in $tans; do
-X if $test X$file = XPolicy -a -f Policy.sh; then
-X . Policy.sh
-X $cat Policy.sh >> UU/config.sh
-X elif $test -f $src/hints/$file.sh; then
-X . $src/hints/$file.sh
-X $cat $src/hints/$file.sh >> UU/config.sh
-X elif $test X$tans = X -o X$tans = Xnone ; then
-X : nothing
-X else
-X : Give one chance to correct a possible typo.
-X echo "$file.sh does not exist"
-X dflt=$file
-X rp="hint to use instead?"
-X . UU/myread
-X for file in $ans; do
-X if $test -f "$src/hints/$file.sh"; then
-X . $src/hints/$file.sh
-X $cat $src/hints/$file.sh >> UU/config.sh
-X elif $test X$ans = X -o X$ans = Xnone ; then
-X : nothing
-X else
-X echo "$file.sh does not exist -- ignored."
-X fi
-X done
-X fi
-X done
-X
-X hint=recommended
-X : Remember our hint file for later.
-X if $test -f "$src/hints/$file.sh" ; then
-X hintfile="$file"
-X else
-X hintfile=''
-X fi
-Xfi
-Xcd UU
-X;;
-X*)
-X echo " "
-X echo "Fetching default answers from $config_sh..." >&4
-X tmp_n="$n"
-X tmp_c="$c"
-X cd ..
-X cp $config_sh config.sh 2>/dev/null
-X chmod +w config.sh
-X . ./config.sh
-X cd UU
-X cp ../config.sh .
-X n="$tmp_n"
-X c="$tmp_c"
-X hint=previous
-X ;;
-Xesac
-Xtest "$override" && . ./optdef.sh
-Xmyuname="$newmyuname"
-X
-X: Restore computed paths
-Xfor file in $loclist $trylist; do
-X eval $file="\$_$file"
-Xdone
-X
-Xcat << EOM
-X
-XConfigure uses the operating system name and version to set some defaults.
-XThe default value is probably right if the name rings a bell. Otherwise,
-Xsince spelling matters for me, either accept the default or answer "none"
-Xto leave it blank.
-X
-XEOM
-Xcase "$osname" in
-X ''|' ')
-X case "$hintfile" in
-X ''|' '|none) dflt=none ;;
-X *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
-X esac
-X ;;
-X *) dflt="$osname" ;;
-Xesac
-Xrp="Operating system name?"
-X. ./myread
-Xcase "$ans" in
-Xnone) osname='' ;;
-X*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
-Xesac
-X: who configured the system
-Xcf_time=`LC_ALL=C; export LC_ALL; $date 2>&1`
-Xcf_by=`(logname) 2>/dev/null`
-Xcase "$cf_by" in
-X"")
-X cf_by=`(whoami) 2>/dev/null`
-X case "$cf_by" in
-X "") cf_by=unknown ;;
-X esac ;;
-Xesac
-X
-X: is AFS running?
-Xecho " "
-Xcase "$afs" in
-X$define|true) afs=true ;;
-X$undef|false) afs=false ;;
-X*) if test -d /afs; then
-X afs=true
-X else
-X afs=false
-X fi
-X ;;
-Xesac
-Xif $afs; then
-X echo "AFS may be running... I'll be extra cautious then..." >&4
-Xelse
-X echo "AFS does not seem to be running..." >&4
-Xfi
-X
-X: determine where manual pages are on this system
-Xecho " "
-Xcase "$sysman" in
-X'')
-X syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
-X syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
-X syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
-X syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
-X syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
-X sysman=`./loc . /usr/man/man1 $syspath`
-X ;;
-Xesac
-Xif $test -d "$sysman"; then
-X echo "System manual is in $sysman." >&4
-Xelse
-X echo "Could not find manual pages in source form." >&4
-Xfi
-X
-X: decide how portable to be
-Xcase "$d_portable" in
-X"$define") dflt=y;;
-X*) dflt=n;;
-Xesac
-X$cat <<'EOH'
-X
-XI can set things up so that your shell scripts and binaries are more portable,
-Xat what may be a noticable cost in performance. In particular, if you
-Xask to be portable, the following happens:
-X
-X 1) Shell scripts will rely on the PATH variable rather than using
-X the paths derived above.
-X 2) ~username interpretations will be done at run time rather than
-X by Configure.
-X
-XEOH
-Xrp="Do you expect to run these scripts and binaries on multiple machines?"
-X. ./myread
-Xcase "$ans" in
-X y*) d_portable="$define"
-X ;;
-X *) d_portable="$undef" ;;
-Xesac
-X
-X: set up shell script to do ~ expansion
-Xcat >filexp <<EOSS
-X$startsh
-X: expand filename
-Xcase "\$1" in
-X ~/*|~)
-X echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
-X ;;
-X ~*)
-X if $test -f /bin/csh; then
-X /bin/csh -f -c "glob \$1"
-X failed=\$?
-X echo ""
-X exit \$failed
-X else
-X name=\`$expr x\$1 : '..\([^/]*\)'\`
-X dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
-X if $test ! -d "\$dir"; then
-X me=\`basename \$0\`
-X echo "\$me: can't locate home directory for: \$name" >&2
-X exit 1
-X fi
-X case "\$1" in
-X */*)
-X echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
-X ;;
-X *)
-X echo \$dir
-X ;;
-X esac
-X fi
-X ;;
-X*)
-X echo \$1
-X ;;
-Xesac
-XEOSS
-Xchmod +x filexp
-X$eunicefix filexp
-X
-X: now set up to get a file name
-Xcat <<EOS >getfile
-X$startsh
-XEOS
-Xcat <<'EOSC' >>getfile
-Xtilde=''
-Xfullpath=''
-Xalready=''
-Xskip=''
-Xnone_ok=''
-Xexp_file=''
-Xnopath_ok=''
-Xorig_rp="$rp"
-Xorig_dflt="$dflt"
-X
-Xcase "$fn" in
-X*\(*)
-X expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
-X fn=`echo $fn | sed 's/(.*)//'`
-X ;;
-Xesac
-X
-Xcase "$fn" in
-X*:*)
-X loc_file=`expr $fn : '.*:\(.*\)'`
-X fn=`expr $fn : '\(.*\):.*'`
-X ;;
-Xesac
-X
-Xcase "$fn" in
-X*~*) tilde=true;;
-Xesac
-Xcase "$fn" in
-X*/*) fullpath=true;;
-Xesac
-Xcase "$fn" in
-X*+*) skip=true;;
-Xesac
-Xcase "$fn" in
-X*n*) none_ok=true;;
-Xesac
-Xcase "$fn" in
-X*e*) exp_file=true;;
-Xesac
-Xcase "$fn" in
-X*p*) nopath_ok=true;;
-Xesac
-X
-Xcase "$fn" in
-X*f*) type='File';;
-X*d*) type='Directory';;
-X*l*) type='Locate';;
-Xesac
-X
-Xwhat="$type"
-Xcase "$what" in
-XLocate) what='File';;
-Xesac
-X
-Xcase "$exp_file" in
-X'')
-X case "$d_portable" in
-X "$define") ;;
-X *) exp_file=true;;
-X esac
-X ;;
-Xesac
-X
-Xcd ..
-Xwhile test "$type"; do
-X redo=''
-X rp="$orig_rp"
-X dflt="$orig_dflt"
-X case "$tilde" in
-X true) rp="$rp (~name ok)";;
-X esac
-X . UU/myread
-X if test -f UU/getfile.ok && \
-X $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
-X then
-X value="$ans"
-X ansexp="$ans"
-X break
-X fi
-X case "$ans" in
-X none)
-X value=''
-X ansexp=''
-X case "$none_ok" in
-X true) type='';;
-X esac
-X ;;
-X *)
-X case "$tilde" in
-X '') value="$ans"
-X ansexp="$ans";;
-X *)
-X value=`UU/filexp $ans`
-X case $? in
-X 0)
-X if test "$ans" != "$value"; then
-X echo "(That expands to $value on this system.)"
-X fi
-X ;;
-X *) value="$ans";;
-X esac
-X ansexp="$value"
-X case "$exp_file" in
-X '') value="$ans";;
-X esac
-X ;;
-X esac
-X case "$fullpath" in
-X true)
-X case "$ansexp" in
-X /*) value="$ansexp" ;;
-X *)
-X redo=true
-X case "$already" in
-X true)
-X echo "I shall only accept a full path name, as in /bin/ls." >&4
-X echo "Use a ! shell escape if you wish to check pathnames." >&4
-X ;;
-X *)
-X echo "Please give a full path name, starting with slash." >&4
-X case "$tilde" in
-X true)
-X echo "Note that using ~name is ok provided it expands well." >&4
-X already=true
-X ;;
-X esac
-X esac
-X ;;
-X esac
-X ;;
-X esac
-X case "$redo" in
-X '')
-X case "$type" in
-X File)
-X if test -f "$ansexp"; then
-X type=''
-X elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
-X then
-X echo "($value is not a plain file, but that's ok.)"
-X type=''
-X fi
-X ;;
-X Directory)
-X if test -d "$ansexp"; then
-X type=''
-X fi
-X ;;
-X Locate)
-X if test -d "$ansexp"; then
-X echo "(Looking for $loc_file in directory $value.)"
-X value="$value/$loc_file"
-X ansexp="$ansexp/$loc_file"
-X fi
-X if test -f "$ansexp"; then
-X type=''
-X fi
-X case "$nopath_ok" in
-X true) case "$value" in
-X */*) ;;
-X *) echo "Assuming $value will be in people's path."
-X type=''
-X ;;
-X esac
-X ;;
-X esac
-X ;;
-X esac
-X
-X case "$skip" in
-X true) type='';
-X esac
-X
-X case "$type" in
-X '') ;;
-X *)
-X if test "$fastread" = yes; then
-X dflt=y
-X else
-X dflt=n
-X fi
-X rp="$what $value doesn't exist. Use that name anyway?"
-X . UU/myread
-X dflt=''
-X case "$ans" in
-X y*) type='';;
-X *) echo " ";;
-X esac
-X ;;
-X esac
-X ;;
-X esac
-X ;;
-X esac
-Xdone
-Xcd UU
-Xans="$value"
-Xrp="$orig_rp"
-Xdflt="$orig_dflt"
-Xrm -f getfile.ok
-XEOSC
-X
-X: determine root of directory hierarchy where package will be installed.
-Xcase "$prefix" in
-X'')
-X dflt=`./loc . /usr/local /usr/local /local /opt /usr`
-X ;;
-X*)
-X dflt="$prefix"
-X ;;
-Xesac
-X$cat <<EOM
-X
-XBy default, $package will be installed in $dflt/bin, manual
-Xpages under $dflt/man, etc..., i.e. with $dflt as prefix for
-Xall installation directories. Typically set to /usr/local, but you
-Xmay choose /usr if you wish to install $package among your system
-Xbinaries. If you wish to have binaries under /bin but manual pages
-Xunder /usr/local/man, that's ok: you will be prompted separately
-Xfor each of the installation directories, the prefix being only used
-Xto set the defaults.
-X
-XEOM
-Xfn=d~
-Xrp='Installation prefix to use?'
-X. ./getfile
-Xoldprefix=''
-Xcase "$prefix" in
-X'') ;;
-X*)
-X case "$ans" in
-X "$prefix") ;;
-X *) oldprefix="$prefix";;
-X esac
-X ;;
-Xesac
-Xprefix="$ans"
-Xprefixexp="$ansexp"
-X
-X: set the prefixit variable, to compute a suitable default value
-Xprefixit='case "$3" in
-X""|none)
-X case "$oldprefix" in
-X "") eval "$1=\"\$$2\"";;
-X *)
-X case "$3" in
-X "") eval "$1=";;
-X none)
-X eval "tp=\"\$$2\"";
-X case "$tp" in
-X ""|" ") eval "$1=\"\$$2\"";;
-X *) eval "$1=";;
-X esac;;
-X esac;;
-X esac;;
-X*)
-X eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
-X case "$tp" in
-X --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
-X /*-$oldprefix/*|\~*-$oldprefix/*)
-X eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
-X *) eval "$1=\"\$$2\"";;
-X esac;;
-Xesac'
-X
-X: set the prefixup variable, to restore leading tilda escape
-Xprefixup='case "$prefixexp" in
-X"$prefix") ;;
-X*) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
-Xesac'
-X
-X: determine where manual pages go
-Xset mansrc mansrc none
-Xeval $prefixit
-X$cat <<EOM
-X
-X$spackage has manual pages available in source form.
-XEOM
-Xcase "$nroff" in
-Xnroff)
-X echo "However, you don't have nroff, so they're probably useless to you."
-X case "$mansrc" in
-X '') mansrc="none";;
-X esac;;
-Xesac
-Xecho "If you don't want the manual sources installed, answer 'none'."
-Xcase "$mansrc" in
-X'')
-X lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
-X lookpath="$lookpath $prefixexp/man/l_man/man1"
-X lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
-X lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
-X lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
-X lookpath="$lookpath /usr/man/man.L"
-X mansrc=`./loc . $prefixexp/man/man1 $lookpath`
-X if $test -d "$mansrc"; then
-X dflt="$mansrc"
-X else
-X dflt="$sysman"
-X fi
-X set dflt
-X eval $prefixup
-X ;;
-X' ') dflt=none;;
-X*) dflt="$mansrc"
-X ;;
-Xesac
-Xecho " "
-Xfn=dn~
-Xrp='Where do the manual pages (source) go?'
-X. ./getfile
-Xif test "X$mansrcexp" != "X$ansexp"; then
-X installmansrc=''
-Xfi
-Xmansrc="$ans"
-Xmansrcexp="$ansexp"
-Xcase "$mansrc" in
-X'') mansrc=' '
-X installmansrc='';;
-Xesac
-Xif $afs && $test "$mansrc"; then
-X $cat <<EOM
-X
-XSince you are running AFS, I need to distinguish the directory in which
-Xmanual pages reside from the directory in which they are installed (and from
-Xwhich they are presumably copied to the former directory by occult means).
-X
-XEOM
-X case "$installmansrc" in
-X '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;;
-X *) dflt="$installmansrc";;
-X esac
-X fn=de~
-X rp='Where will man pages be installed?'
-X . ./getfile
-X installmansrc="$ans"
-Xelse
-X installmansrc="$mansrcexp"
-Xfi
-X
-Xcase "$mansrc" in
-X' ') manext='0';;
-X*l) manext=l;;
-X*n) manext=n;;
-X*o) manext=l;;
-X*p) manext=n;;
-X*C) manext=C;;
-X*L) manext=L;;
-X*L1) manext=L1;;
-X*) manext=1;;
-Xesac
-X
-X: set up the script used to warn in case of inconsistency
-Xcat <<EOS >whoa
-X$startsh
-XEOS
-Xcat <<'EOSC' >>whoa
-Xdflt=y
-Xecho " "
-Xecho "*** WHOA THERE!!! ***" >&4
-Xecho " The $hint value for \$$var on this machine was \"$was\"!" >&4
-Xrp=" Keep the $hint value?"
-X. ./myread
-Xcase "$ans" in
-Xy) td=$was; tu=$was;;
-Xesac
-XEOSC
-X
-X: function used to set $1 to $val
-Xsetvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
-Xcase "$val$was" in
-X$define$undef) . ./whoa; eval "$var=\$td";;
-X$undef$define) . ./whoa; eval "$var=\$tu";;
-X*) eval "$var=$val";;
-Xesac'
-X
-X
-Xset valtemp
-Xvaltemp="$d_64bit_statfs_flds"
-Xcase $valtemp in
-X '') valtemp="$undef" ;;
-Xesac
-X
-Xval=$valtemp
-Xset d_64bit_statfs_flds
-Xeval $setvar
-X: make some quick guesses about what we are up against
-Xecho " "
-X$echo $n "Hmm... $c"
-Xecho exit 1 >bsd
-Xecho exit 1 >usg
-Xecho exit 1 >v7
-Xecho exit 1 >osf1
-Xecho exit 1 >eunice
-Xecho exit 1 >xenix
-Xecho exit 1 >venix
-Xecho exit 1 >os2
-Xd_bsd="$undef"
-X$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
-Xif test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
-Xthen
-X echo "Looks kind of like an OSF/1 system, but we'll see..."
-X echo exit 0 >osf1
-Xelif test `echo abc | tr a-z A-Z` = Abc ; then
-X xxx=`./loc addbib blurfl $pth`
-X if $test -f $xxx; then
-X echo "Looks kind of like a USG system with BSD features, but we'll see..."
-X echo exit 0 >bsd
-X echo exit 0 >usg
-X else
-X if $contains SIGTSTP foo >/dev/null 2>&1 ; then
-X echo "Looks kind of like an extended USG system, but we'll see..."
-X else
-X echo "Looks kind of like a USG system, but we'll see..."
-X fi
-X echo exit 0 >usg
-X fi
-Xelif $contains SIGTSTP foo >/dev/null 2>&1 ; then
-X echo "Looks kind of like a BSD system, but we'll see..."
-X d_bsd="$define"
-X echo exit 0 >bsd
-Xelse
-X echo "Looks kind of like a Version 7 system, but we'll see..."
-X echo exit 0 >v7
-Xfi
-Xcase "$eunicefix" in
-X*unixtovms*)
-X $cat <<'EOI'
-XThere is, however, a strange, musty smell in the air that reminds me of
-Xsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
-XEOI
-X echo exit 0 >eunice
-X d_eunice="$define"
-X: it so happens the Eunice I know will not run shell scripts in Unix format
-X ;;
-X*)
-X echo " "
-X echo "Congratulations. You aren't running Eunice."
-X d_eunice="$undef"
-X ;;
-Xesac
-X: Detect OS2. The p_ variable is set above in the Head.U unit.
-Xcase "$p_" in
-X:) ;;
-X*)
-X $cat <<'EOI'
-XI have the feeling something is not exactly right, however...don't tell me...
-Xlemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
-XEOI
-X echo exit 0 >os2
-X ;;
-Xesac
-Xif test -f /xenix; then
-X echo "Actually, this looks more like a XENIX system..."
-X echo exit 0 >xenix
-X d_xenix="$define"
-Xelse
-X echo " "
-X echo "It's not Xenix..."
-X d_xenix="$undef"
-Xfi
-Xchmod +x xenix
-X$eunicefix xenix
-Xif test -f /venix; then
-X echo "Actually, this looks more like a VENIX system..."
-X echo exit 0 >venix
-Xelse
-X echo " "
-X if ./xenix; then
-X : null
-X else
-X echo "Nor is it Venix..."
-X fi
-Xfi
-Xchmod +x bsd usg v7 osf1 eunice xenix venix os2
-X$eunicefix bsd usg v7 osf1 eunice xenix venix os2
-X$rm -f foo
-X
-X: see if we need a special compiler
-Xecho " "
-Xif ./usg; then
-X case "$cc" in
-X '') case "$Mcc" in
-X /*) dflt='Mcc';;
-X *) case "$large" in
-X -M*) dflt='cc';;
-X *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
-X if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
-X dflt='cc'
-X else
-X dflt='cc -M'
-X fi
-X else
-X dflt='cc'
-X fi;;
-X esac;;
-X esac;;
-X *) dflt="$cc";;
-X esac
-X case "$dflt" in
-X *M*) $cat <<'EOM'
-XOn some older systems the default C compiler will not resolve multiple global
-Xreferences that happen to have the same name. On some such systems the "Mcc"
-Xcommand may be used to force these to be resolved. On other systems a "cc -M"
-Xcommand is required. (Note that the -M flag on other systems indicates a
-Xmemory model to use!) If you have the Gnu C compiler, you might wish to use
-Xthat instead.
-X
-XEOM
-X ;;
-X esac
-X rp="Use which C compiler?"
-X . ./myread
-X cc="$ans"
-Xelse
-X case "$cc" in
-X '') dflt=cc;;
-X *) dflt="$cc";;
-X esac
-X rp="Use which C compiler?"
-X . ./myread
-X cc="$ans"
-Xfi
-X: Look for a hint-file generated 'call-back-unit'. Now that the
-X: user has specified the compiler, we may need to set or change some
-X: other defaults.
-Xif $test -f cc.cbu; then
-X . ./cc.cbu
-Xfi
-Xecho " "
-Xecho "Checking for GNU cc in disguise and/or its version number..." >&4
-X$cat >gccvers.c <<EOM
-X#include <stdio.h>
-Xint main() {
-X#ifdef __GNUC__
-X#ifdef __VERSION__
-X printf("%s\n", __VERSION__);
-X#else
-X printf("%s\n", "1");
-X#endif
-X#endif
-X exit(0);
-X}
-XEOM
-Xif $cc -o gccvers gccvers.c >/dev/null 2>&1; then
-X gccversion=`./gccvers`
-X case "$gccversion" in
-X '') echo "You are not using GNU cc." ;;
-X *) echo "You are using GNU cc $gccversion." ;;
-X esac
-Xelse
-X echo " "
-X echo "*** WHOA THERE!!! ***" >&4
-X echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
-X case "$knowitall" in
-X '')
-X echo " You'd better start hunting for one and let me know about it." >&4
-X exit 1
-X ;;
-X esac
-Xfi
-X$rm -f gccvers*
-Xcase "$gccversion" in
-X1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
-Xesac
-X
-X: What should the include directory be ?
-Xecho " "
-X$echo $n "Hmm... $c"
-Xdflt='/usr/include'
-Xincpath=''
-Xmips_type=''
-Xif $test -f /bin/mips && /bin/mips; then
-X echo "Looks like a MIPS system..."
-X $cat >usr.c <<'EOCP'
-X#ifdef SYSTYPE_BSD43
-X/bsd43
-X#endif
-XEOCP
-X if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
-X dflt='/bsd43/usr/include'
-X incpath='/bsd43'
-X mips_type='BSD 4.3'
-X else
-X mips_type='System V'
-X fi
-X $rm -f usr.c usr.out
-X echo "and you're compiling with the $mips_type compiler and libraries."
-X xxx_prompt=y
-X echo "exit 0" >mips
-Xelse
-X echo "Doesn't look like a MIPS system."
-X xxx_prompt=n
-X echo "exit 1" >mips
-Xfi
-Xchmod +x mips
-X$eunicefix mips
-Xcase "$usrinc" in
-X'') ;;
-X*) dflt="$usrinc";;
-Xesac
-Xcase "$xxx_prompt" in
-Xy) fn=d/
-X echo " "
-X rp='Where are the include files you want to use?'
-X . ./getfile
-X usrinc="$ans"
-X ;;
-X*) usrinc="$dflt"
-X ;;
-Xesac
-X
-X: Set private lib path
-Xcase "$plibpth" in
-X'') if ./mips; then
-X plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
-X fi;;
-Xesac
-Xcase "$libpth" in
-X' ') dlist='';;
-X'') dlist="$loclibpth $plibpth $glibpth";;
-X*) dlist="$libpth";;
-Xesac
-X
-X: Now check and see which directories actually exist, avoiding duplicates
-Xlibpth=''
-Xfor xxx in $dlist
-Xdo
-X if $test -d $xxx; then
-X case " $libpth " in
-X *" $xxx "*) ;;
-X *) libpth="$libpth $xxx";;
-X esac
-X fi
-Xdone
-X$cat <<'EOM'
-X
-XSome systems have incompatible or broken versions of libraries. Among
-Xthe directories listed in the question below, please remove any you
-Xknow not to be holding relevant libraries, and add any that are needed.
-XSay "none" for none.
-X
-XEOM
-Xcase "$libpth" in
-X'') dflt='none';;
-X*)
-X set X $libpth
-X shift
-X dflt=${1+"$@"}
-X ;;
-Xesac
-Xrp="Directories to use for library searches?"
-X. ./myread
-Xcase "$ans" in
-Xnone) libpth=' ';;
-X*) libpth="$ans";;
-Xesac
-X
-X: compute shared library extension
-Xcase "$so" in
-X'')
-X if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
-X dflt='sl'
-X else
-X dflt='so'
-X fi
-X ;;
-X*) dflt="$so";;
-Xesac
-X$cat <<EOM
-X
-XOn some systems, shared libraries may be available. Answer 'none' if
-Xyou want to suppress searching of shared libraries for the remaining
-Xof this configuration.
-X
-XEOM
-Xrp='What is the file extension used for shared libraries?'
-X. ./myread
-Xso="$ans"
-X
-X: Define several unixisms.
-X: Hints files or command line option can be used to override them.
-X: The convoluted testing is in case hints files set either the old
-X: or the new name.
-Xcase "$_exe" in
-X'') case "$exe_ext" in
-X '') ;;
-X *) _exe="$exe_ext" ;;
-X esac
-X ;;
-Xesac
-Xcase "$_a" in
-X'') case "$lib_ext" in
-X '') _a='.a';;
-X *) _a="$lib_ext" ;;
-X esac
-X ;;
-Xesac
-Xcase "$_o" in
-X'') case "$obj_ext" in
-X '') _o='.o';;
-X *) _o="$obj_ext";;
-X esac
-X ;;
-Xesac
-Xcase "$p_" in
-X'') case "$path_sep" in
-X '') p_=':';;
-X *) p_="$path_sep";;
-X esac
-X ;;
-Xesac
-Xexe_ext=$_exe
-Xlib_ext=$_a
-Xobj_ext=$_o
-Xpath_sep=$p_
-X
-X: Looking for optional libraries
-Xecho " "
-Xecho "Checking for optional libraries..." >&4
-Xcase "$libs" in
-X' '|'') dflt='';;
-X*) dflt="$libs";;
-Xesac
-Xcase "$libswanted" in
-X'') libswanted='c_s';;
-Xesac
-Xfor thislib in $libswanted; do
-X
-X if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
-X echo "Found -l$thislib (shared)."
-X case " $dflt " in
-X *"-l$thislib "*);;
-X *) dflt="$dflt -l$thislib";;
-X esac
-X elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
-X echo "Found -l$thislib (shared)."
-X case " $dflt " in
-X *"-l$thislib "*);;
-X *) dflt="$dflt -l$thislib";;
-X esac
-X elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
-X echo "Found -l$thislib."
-X case " $dflt " in
-X *"-l$thislib "*);;
-X *) dflt="$dflt -l$thislib";;
-X esac
-X elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
-X echo "Found -l$thislib."
-X case " $dflt " in
-X *"-l$thislib "*);;
-X *) dflt="$dflt -l$thislib";;
-X esac
-X elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
-X echo "Found -l${thislib}_s."
-X case " $dflt " in
-X *"-l$thislib "*);;
-X *) dflt="$dflt -l${thislib}_s";;
-X esac
-X elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
-X echo "Found -l$thislib."
-X case " $dflt " in
-X *"-l$thislib "*);;
-X *) dflt="$dflt -l$thislib";;
-X esac
-X else
-X echo "No -l$thislib."
-X fi
-Xdone
-Xset X $dflt
-Xshift
-Xdflt="$*"
-Xcase "$libs" in
-X'') dflt="$dflt";;
-X*) dflt="$libs";;
-Xesac
-Xcase "$dflt" in
-X' '|'') dflt='none';;
-Xesac
-X
-X$cat <<EOM
-X
-XSome versions of Unix support shared libraries, which make executables smaller
-Xbut make load time slightly longer.
-X
-XOn some systems, mostly System V Release 3's, the shared library is included
-Xby putting the option "-lc_s" as the last thing on the cc command line when
-Xlinking. Other systems use shared libraries by default. There may be other
-Xlibraries needed to compile $package on your machine as well. If your system
-Xneeds the "-lc_s" option, include it here. Include any other special libraries
-Xhere as well. Say "none" for none.
-XEOM
-X
-Xecho " "
-Xrp="Any additional libraries?"
-X. ./myread
-Xcase "$ans" in
-Xnone) libs=' ';;
-X*) libs="$ans";;
-Xesac
-X
-X: see how we invoke the C preprocessor
-Xecho " "
-Xecho "Now, how can we feed standard input to your C preprocessor..." >&4
-Xcat <<'EOT' >testcpp.c
-X#define ABC abc
-X#define XYZ xyz
-XABC.XYZ
-XEOT
-Xcd ..
-Xecho 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
-Xchmod 755 cppstdin
-Xwrapper=`pwd`/cppstdin
-Xok='false'
-Xcd UU
-X
-Xif $test "X$cppstdin" != "X" && \
-X $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-Xthen
-X echo "You used to use $cppstdin $cppminus so we'll use that again."
-X case "$cpprun" in
-X '') echo "But let's see if we can live without a wrapper..." ;;
-X *)
-X if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-X then
-X echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
-X ok='true'
-X else
-X echo "(However, $cpprun $cpplast does not work, let's see...)"
-X fi
-X ;;
-X esac
-Xelse
-X case "$cppstdin" in
-X '') ;;
-X *)
-X echo "Good old $cppstdin $cppminus does not seem to be of any help..."
-X ;;
-X esac
-Xfi
-X
-Xif $ok; then
-X : nothing
-Xelif echo 'Maybe "'"$cc"' -E" will work...'; \
-X $cc -E <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "Yup, it does."
-X x_cpp="$cc -E"
-X x_minus='';
-Xelif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
-X $cc -E - <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "Yup, it does."
-X x_cpp="$cc -E"
-X x_minus='-';
-Xelif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
-X $cc -P <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "Yipee, that works!"
-X x_cpp="$cc -P"
-X x_minus='';
-Xelif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
-X $cc -P - <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "At long last!"
-X x_cpp="$cc -P"
-X x_minus='-';
-Xelif echo 'No such luck, maybe "'$cpp'" will work...'; \
-X $cpp <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "It works!"
-X x_cpp="$cpp"
-X x_minus='';
-Xelif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
-X $cpp - <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "Hooray, it works! I was beginning to wonder."
-X x_cpp="$cpp"
-X x_minus='-';
-Xelif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
-X $wrapper <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X x_cpp="$wrapper"
-X x_minus=''
-X echo "Eureka!"
-Xelse
-X dflt=''
-X rp="No dice. I can't find a C preprocessor. Name one:"
-X . ./myread
-X x_cpp="$ans"
-X x_minus=''
-X $x_cpp <testcpp.c >testcpp.out 2>&1
-X if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-X echo "OK, that will do." >&4
-X else
-Xecho "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
-X exit 1
-X fi
-Xfi
-X
-Xcase "$ok" in
-Xfalse)
-X cppstdin="$x_cpp"
-X cppminus="$x_minus"
-X cpprun="$x_cpp"
-X cpplast="$x_minus"
-X set X $x_cpp
-X shift
-X case "$1" in
-X "$cpp")
-X echo "Perhaps can we force $cc -E using a wrapper..."
-X if $wrapper <testcpp.c >testcpp.out 2>&1; \
-X $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-X then
-X echo "Yup, we can."
-X cppstdin="$wrapper"
-X cppminus='';
-X else
-X echo "Nope, we'll have to live without it..."
-X fi
-X ;;
-X esac
-X case "$cpprun" in
-X "$wrapper")
-X cpprun=''
-X cpplast=''
-X ;;
-X esac
-X ;;
-Xesac
-X
-Xcase "$cppstdin" in
-X"$wrapper") ;;
-X*) $rm -f $wrapper;;
-Xesac
-X$rm -f testcpp.c testcpp.out
-X
-X: determine optimize, if desired, or use for debug flag also
-Xcase "$optimize" in
-X' '|$undef) dflt='none';;
-X'') dflt='-O';;
-X*) dflt="$optimize";;
-Xesac
-X$cat <<EOH
-X
-XSome C compilers have problems with their optimizers. By default, $package
-Xcompiles with the -O flag to use the optimizer. Alternately, you might want
-Xto use the symbolic debugger, which uses the -g flag (on traditional Unix
-Xsystems). Either flag can be specified here. To use neither flag, specify
-Xthe word "none".
-X
-XEOH
-Xrp="What optimizer/debugger flag should be used?"
-X. ./myread
-Xoptimize="$ans"
-Xcase "$optimize" in
-X'none') optimize=" ";;
-Xesac
-X
-Xdflt=''
-X: We will not override a previous value, but we might want to
-X: augment a hint file
-Xcase "$hint" in
-Xnone|recommended)
-X case "$gccversion" in
-X 1*) dflt='-fpcc-struct-return' ;;
-X esac
-X case "$optimize" in
-X *-g*) dflt="$dflt";;
-X esac
-X case "$gccversion" in
-X 2*) if test -d /etc/conf/kconfig.d &&
-X $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
-X then
-X dflt="$dflt -posix"
-X fi
-X ;;
-X esac
-X ;;
-Xesac
-X
-Xcase "$mips_type" in
-X*BSD*|'') inclwanted="$locincpth $usrinc";;
-X*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
-Xesac
-Xfor thisincl in $inclwanted; do
-X if $test -d $thisincl; then
-X if $test x$thisincl != x$usrinc; then
-X case "$dflt" in
-X *$thisincl*);;
-X *) dflt="$dflt -I$thisincl";;
-X esac
-X fi
-X fi
-Xdone
-X
-Xinctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
-X xxx=true;
-Xelif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
-X xxx=true;
-Xelse
-X xxx=false;
-Xfi;
-Xif $xxx; then
-X case "$dflt" in
-X *$2*);;
-X *) dflt="$dflt -D$2";;
-X esac;
-Xfi'
-X
-Xif ./osf1; then
-X set signal.h __LANGUAGE_C__; eval $inctest
-Xelse
-X set signal.h LANGUAGE_C; eval $inctest
-Xfi
-X
-Xcase "$hint" in
-Xnone|recommended) dflt="$ccflags $dflt" ;;
-X*) dflt="$ccflags";;
-Xesac
-X
-Xcase "$dflt" in
-X''|' ') dflt=none;;
-Xesac
-X$cat <<EOH
-X
-XYour C compiler may want other flags. For this question you should include
-X-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
-Xbut you should NOT include libraries or ld flags like -lwhatever. If you
-Xwant $package to honor its debug switch, you should include -DDEBUGGING here.
-XYour C compiler might also need additional flags, such as -D_POSIX_SOURCE.
-X
-XTo use no flags, specify the word "none".
-X
-XEOH
-Xset X $dflt
-Xshift
-Xdflt=${1+"$@"}
-Xrp="Any additional cc flags?"
-X. ./myread
-Xcase "$ans" in
-Xnone) ccflags='';;
-X*) ccflags="$ans";;
-Xesac
-X
-X: the following weeds options from ccflags that are of no interest to cpp
-Xcppflags="$ccflags"
-Xcase "$gccversion" in
-X1*) cppflags="$cppflags -D__GNUC__"
-Xesac
-Xcase "$mips_type" in
-X'');;
-X*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
-Xesac
-Xcase "$cppflags" in
-X'');;
-X*)
-X echo " "
-X echo "Let me guess what the preprocessor flags are..." >&4
-X set X $cppflags
-X shift
-X cppflags=''
-X $cat >cpp.c <<'EOM'
-X#define BLURFL foo
-X
-XBLURFL xx LFRULB
-XEOM
-X previous=''
-X for flag in $*
-X do
-X case "$flag" in
-X -*) ftry="$flag";;
-X *) ftry="$previous $flag";;
-X esac
-X if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
-X >cpp1.out 2>/dev/null && \
-X $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
-X >cpp2.out 2>/dev/null && \
-X $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
-X $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
-X then
-X cppflags="$cppflags $ftry"
-X previous=''
-X else
-X previous="$flag"
-X fi
-X done
-X set X $cppflags
-X shift
-X cppflags=${1+"$@"}
-X case "$cppflags" in
-X *-*) echo "They appear to be: $cppflags";;
-X esac
-X $rm -f cpp.c cpp?.out
-X ;;
-Xesac
-X
-X: flags used in final linking phase
-Xcase "$ldflags" in
-X'') if ./venix; then
-X dflt='-i -z'
-X else
-X dflt=''
-X fi
-X case "$ccflags" in
-X *-posix*) dflt="$dflt -posix" ;;
-X esac
-X ;;
-X*) dflt="$ldflags";;
-Xesac
-X
-X: Try to guess additional flags to pick up local libraries.
-Xfor thislibdir in $libpth; do
-X case " $loclibpth " in
-X *" $thislibdir "*)
-X case "$dflt " in
-X *"-L$thislibdir "*) ;;
-X *) dflt="$dflt -L$thislibdir" ;;
-X esac
-X ;;
-X esac
-Xdone
-X
-Xcase "$dflt" in
-X'') dflt='none' ;;
-Xesac
-X
-X$cat <<EOH
-X
-XYour C linker may need flags. For this question you should
-Xinclude -L/whatever and any other flags used by the C linker, but you
-Xshould NOT include libraries like -lwhatever.
-X
-XMake sure you include the appropriate -L/path flags if your C linker
-Xdoes not normally search all of the directories you specified above,
-Xnamely
-X $libpth
-XTo use no flags, specify the word "none".
-X
-XEOH
-X
-Xrp="Any additional ld flags (NOT including libraries)?"
-X. ./myread
-Xcase "$ans" in
-Xnone) ldflags='';;
-X*) ldflags="$ans";;
-Xesac
-Xrmlist="$rmlist pdp11"
-X
-X: coherency check
-Xecho " "
-Xecho "Checking your choice of C compiler and flags for coherency..." >&4
-Xset X $cc $optimize $ccflags $ldflags -o try try.c $libs
-Xshift
-X$cat >try.msg <<EOM
-XI've tried to compile and run a simple program with:
-X
-X $*
-X ./try
-X
-Xand I got the following output:
-X
-XEOM
-X$cat > try.c <<'EOF'
-X#include <stdio.h>
-Xmain() { printf("Ok\n"); exit(0); }
-XEOF
-Xdflt=y
-Xif sh -c "$cc $optimize $ccflags $ldflags -o try try.c $libs" >>try.msg 2>&1; then
-X if sh -c './try' >>try.msg 2>&1; then
-X xxx=`./try`
-X case "$xxx" in
-X "Ok") dflt=n ;;
-X *) echo 'The program compiled OK, but produced no output.' >> try.msg
-X case " $libs " in
-X *" -lsfio "*)
-X cat >> try.msg <<'EOQS'
-XIf $libs contains -lsfio, and sfio is mis-configured, then it
-Xsometimes (apparently) runs and exits with a 0 status, but with no
-Xoutput! It may have to do with sfio's use of _exit vs. exit.
-X
-XEOQS
-X rp="You have a big problem. Shall I abort Configure"
-X dflt=y
-X ;;
-X esac
-X ;;
-X esac
-X else
-X echo "The program compiled OK, but exited with status $?." >>try.msg
-X rp="You have a problem. Shall I abort Configure"
-X dflt=y
-X fi
-Xelse
-X echo "I can't compile the test program." >>try.msg
-X rp="You have a BIG problem. Shall I abort Configure"
-X dflt=y
-Xfi
-Xcase "$dflt" in
-Xy)
-X $cat try.msg >&4
-X case "$knowitall" in
-X '')
-X echo "(The supplied flags might be incorrect with this C compiler.)"
-X ;;
-X *) dflt=n;;
-X esac
-X echo " "
-X . ./myread
-X case "$ans" in
-X n*|N*) ;;
-X *) echo "Ok. Stopping Configure." >&4
-X exit 1
-X ;;
-X esac
-X ;;
-Xn) echo "OK, that should do.";;
-Xesac
-X$rm -f try try.* core
-X
-X: define a shorthand compile call
-Xcompile='
-Xmc_file=$1;
-Xshift;
-X$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
-X: define a shorthand compile call for compilations that should be ok.
-Xcompile_ok='
-Xmc_file=$1;
-Xshift;
-X$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs;'
-X
-Xecho " "
-Xecho "Checking for GNU C Library..." >&4
-Xcat >gnulibc.c <<EOM
-X#include <stdio.h>
-Xint
-Xmain()
-X{
-X#ifdef __GLIBC__
-X exit(0);
-X#else
-X exit(1);
-X#endif
-X}
-XEOM
-Xset gnulibc
-Xif eval $compile_ok && ./gnulibc; then
-X val="$define"
-X echo "You are using the GNU C Library"
-Xelse
-X val="$undef"
-X echo "You are not using the GNU C Library"
-Xfi
-X$rm -f gnulibc*
-Xset d_gnulibc
-Xeval $setvar
-X
-X: see if nm is to be used to determine whether a symbol is defined or not
-Xcase "$usenm" in
-X'')
-X dflt=''
-X case "$d_gnulibc" in
-X "$define")
-X echo " "
-X echo "nm probably won't work on the GNU C Library." >&4
-X dflt=n
-X ;;
-X esac
-X case "$dflt" in
-X '')
-X if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
-X echo " "
-X echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
-X echo "'nm' won't be sufficient on this sytem." >&4
-X dflt=n
-X fi
-X ;;
-X esac
-X case "$dflt" in
-X '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
-X if $test $dflt -gt 20; then
-X dflt=y
-X else
-X dflt=n
-X fi
-X ;;
-X esac
-X ;;
-X*)
-X case "$usenm" in
-X true|$define) dflt=y;;
-X *) dflt=n;;
-X esac
-X ;;
-Xesac
-X$cat <<EOM
-X
-XI can use $nm to extract the symbols from your C libraries. This
-Xis a time consuming task which may generate huge output on the disk (up
-Xto 3 megabytes) but that should make the symbols extraction faster. The
-Xalternative is to skip the 'nm' extraction part and to compile a small
-Xtest program instead to determine whether each symbol is present. If
-Xyou have a fast C compiler and/or if your 'nm' output cannot be parsed,
-Xthis may be the best solution.
-X
-XYou probably shouldn't let me use 'nm' if you are using the GNU C Library.
-X
-XEOM
-Xrp="Shall I use $nm to extract C symbols from the libraries?"
-X. ./myread
-Xcase "$ans" in
-X[Nn]*) usenm=false;;
-X*) usenm=true;;
-Xesac
-X
-Xrunnm=$usenm
-Xcase "$reuseval" in
-Xtrue) runnm=false;;
-Xesac
-X
-X: nm options which may be necessary
-Xcase "$nm_opt" in
-X'') if $test -f /mach_boot; then
-X nm_opt='' # Mach
-X elif $test -d /usr/ccs/lib; then
-X nm_opt='-p' # Solaris (and SunOS?)
-X elif $test -f /dgux; then
-X nm_opt='-p' # DG-UX
-X elif $test -f /lib64/rld; then
-X nm_opt='-p' # 64-bit Irix
-X else
-X nm_opt=''
-X fi;;
-Xesac
-X
-X: nm options which may be necessary for shared libraries but illegal
-X: for archive libraries. Thank you, Linux.
-Xcase "$nm_so_opt" in
-X'') case "$myuname" in
-X *linux*)
-X if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
-X nm_so_opt='--dynamic'
-X fi
-X ;;
-X esac
-X ;;
-Xesac
-X
-Xcase "$runnm" in
-Xtrue)
-X: get list of predefined functions in a handy place
-Xecho " "
-Xcase "$libc" in
-X'') libc=unknown
-X case "$libs" in
-X *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
-X esac
-X ;;
-Xesac
-Xlibnames='';
-Xcase "$libs" in
-X'') ;;
-X*) for thislib in $libs; do
-X case "$thislib" in
-X -lc|-lc_s)
-X : Handle C library specially below.
-X ;;
-X -l*)
-X thislib=`echo $thislib | $sed -e 's/^-l//'`
-X if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
-X :
-X elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
-X :
-X elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
-X :
-X elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
-X :
-X elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
-X :
-X elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
-X :
-X elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
-X :
-X else
-X try=''
-X fi
-X libnames="$libnames $try"
-X ;;
-X *) libnames="$libnames $thislib" ;;
-X esac
-X done
-X ;;
-Xesac
-Xxxx=normal
-Xcase "$libc" in
-Xunknown)
-X set /lib/libc.$so
-X for xxx in $libpth; do
-X $test -r $1 || set $xxx/libc.$so
-X : The messy sed command sorts on library version numbers.
-X $test -r $1 || \
-X set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
-X tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
-X h
-X s/[0-9][0-9]*/0000&/g
-X s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
-X G
-X s/\n/ /' | \
-X sort | $sed -e 's/^.* //'`
-X eval set \$$#
-X done
-X $test -r $1 || set /usr/ccs/lib/libc.$so
-X $test -r $1 || set /lib/libsys_s$_a
-X ;;
-X*)
-X set blurfl
-X ;;
-Xesac
-Xif $test -r "$1"; then
-X echo "Your (shared) C library seems to be in $1."
-X libc="$1"
-Xelif $test -r /lib/libc && $test -r /lib/clib; then
-X echo "Your C library seems to be in both /lib/clib and /lib/libc."
-X xxx=apollo
-X libc='/lib/clib /lib/libc'
-X if $test -r /lib/syslib; then
-X echo "(Your math library is in /lib/syslib.)"
-X libc="$libc /lib/syslib"
-X fi
-Xelif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
-X echo "Your C library seems to be in $libc, as you said before."
-Xelif $test -r $incpath/usr/lib/libc$_a; then
-X libc=$incpath/usr/lib/libc$_a;
-X echo "Your C library seems to be in $libc. That's fine."
-Xelif $test -r /lib/libc$_a; then
-X libc=/lib/libc$_a;
-X echo "Your C library seems to be in $libc. You're normal."
-Xelse
-X if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
-X :
-X elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
-X libnames="$libnames "`./loc clib blurfl/dyick $libpth`
-X elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
-X :
-X elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
-X :
-X elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
-X :
-X else
-X tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
-X fi
-X if $test -r "$tans"; then
-X echo "Your C library seems to be in $tans, of all places."
-X libc=$tans
-X else
-X libc='blurfl'
-X fi
-Xfi
-Xif $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
-X dflt="$libc"
-X cat <<EOM
-X
-XIf the guess above is wrong (which it might be if you're using a strange
-Xcompiler, or your machine supports multiple models), you can override it here.
-X
-XEOM
-Xelse
-X dflt=''
-X echo $libpth | tr ' ' '\012' | sort | uniq > libpath
-X cat >&4 <<EOM
-XI can't seem to find your C library. I've looked in the following places:
-X
-XEOM
-X $sed 's/^/ /' libpath
-X cat <<EOM
-X
-XNone of these seems to contain your C library. I need to get its name...
-X
-XEOM
-Xfi
-Xfn=f
-Xrp='Where is your C library?'
-X. ./getfile
-Xlibc="$ans"
-X
-Xecho " "
-Xecho $libc $libnames | tr ' ' '\012' | sort | uniq > libnames
-Xset X `cat libnames`
-Xshift
-Xxxx=files
-Xcase $# in 1) xxx=file; esac
-Xecho "Extracting names from the following $xxx for later perusal:" >&4
-Xecho " "
-X$sed 's/^/ /' libnames >&4
-Xecho " "
-X$echo $n "This may take a while...$c" >&4
-X
-Xfor file in $*; do
-X case $file in
-X *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
-X *) $nm $nm_opt $file 2>/dev/null;;
-X esac
-Xdone >libc.tmp
-X
-X$echo $n ".$c"
-X$grep fprintf libc.tmp > libc.ptf
-Xxscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
-Xxrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
-Xxxx='[ADTSIW]'
-Xif com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
-X -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
-X eval $xscan;\
-X $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-X eval $xrun
-Xelse
-X $nm -p $* 2>/dev/null >libc.tmp
-X $grep fprintf libc.tmp > libc.ptf
-X if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
-X eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
-X then
-X nm_opt='-p'
-X eval $xrun
-X else
-X echo " "
-X echo "$nm didn't seem to work right. Trying $ar instead..." >&4
-X com=''
-X if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
-X for thisname in $libnames $libc; do
-X $ar t $thisname >>libc.tmp
-X done
-X $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
-X echo "Ok." >&4
-X elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
-X # Repeat libc to extract forwarders to DLL entries too
-X for thisname in $libnames $libc; do
-X $ar tv $thisname >>libc.tmp
-X # Revision 50 of EMX has bug in $ar.
-X # it will not extract forwarders to DLL entries
-X # Use emximp which will extract exactly them.
-X emximp -o tmp.imp $thisname \
-X 2>/dev/null && \
-X $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
-X < tmp.imp >>libc.tmp
-X $rm tmp.imp
-X done
-X $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
-X echo "Ok." >&4
-X else
-X echo "$ar didn't seem to work right." >&4
-X echo "Maybe this is a Cray...trying bld instead..." >&4
-X if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
-X then
-X for thisname in $libnames; do
-X bld t $libnames | \
-X $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
-X $ar t $thisname >>libc.tmp
-X done
-X echo "Ok." >&4
-X else
-X echo "That didn't work either. Giving up." >&4
-X exit 1
-X fi
-X fi
-X fi
-Xfi
-Xnm_extract="$com"
-Xif $test -f /lib/syscalls.exp; then
-X echo " "
-X echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
-X $sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
-Xfi
-X;;
-Xesac
-X$rm -f libnames libpath
-X
-X: is a C symbol defined?
-Xcsym='tlook=$1;
-Xcase "$3" in
-X-v) tf=libc.tmp; tc=""; tdc="";;
-X-a) tf=libc.tmp; tc="[0]"; tdc="[]";;
-X*) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
-Xesac;
-Xtx=yes;
-Xcase "$reuseval-$4" in
-Xtrue-) ;;
-Xtrue-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
-Xesac;
-Xcase "$tx" in
-Xyes)
-X case "$runnm" in
-X true)
-X if $contains $tlook $tf >/dev/null 2>&1;
-X then tval=true;
-X else tval=false;
-X fi;;
-X *)
-X echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
-X if $cc $optimize $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
-X then tval=true;
-X else tval=false;
-X fi;
-X $rm -f t t.c;;
-X esac;;
-X*)
-X case "$tval" in
-X $define) tval=true;;
-X *) tval=false;;
-X esac;;
-Xesac;
-Xeval "$2=$tval"'
-X
-X: define an is-in-libc? function
-Xinlibc='echo " "; td=$define; tu=$undef;
-Xsym=$1; var=$2; eval "was=\$$2";
-Xtx=yes;
-Xcase "$reuseval$was" in
-Xtrue) ;;
-Xtrue*) tx=no;;
-Xesac;
-Xcase "$tx" in
-Xyes)
-X set $sym tres -f;
-X eval $csym;
-X case "$tres" in
-X true)
-X echo "$sym() found." >&4;
-X case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
-X *)
-X echo "$sym() NOT found." >&4;
-X case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
-X esac;;
-X*)
-X case "$was" in
-X $define) echo "$sym() found." >&4;;
-X *) echo "$sym() NOT found." >&4;;
-X esac;;
-Xesac'
-X
-X: see if bcopy exists
-Xset bcopy d_bcopy
-Xeval $inlibc
-X
-X: see if bzero exists
-Xset bzero d_bzero
-Xeval $inlibc
-X
-X: see if endmntent exists
-Xset endmntent d_endmntent
-Xeval $inlibc
-X
-X: see if fs_info exists
-Xset fs_info d_fs_info
-Xeval $inlibc
-X
-X: see if getmnt exists
-Xset getmnt d_getmnt
-Xeval $inlibc
-X
-X: see if getmntent exists
-Xset getmntent d_getmntent
-Xeval $inlibc
-X
-X: see if getmntinfo exists
-Xset getmntinfo d_getmntinfo
-Xeval $inlibc
-X: determine filename position in cpp output
-Xecho " "
-Xecho "Computing filename position in cpp output for #include directives..." >&4
-Xecho '#include <stdio.h>' > foo.c
-X$cat >fieldn <<EOF
-X$startsh
-X$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
-X$grep '^[ ]*#.*stdio\.h' | \
-Xwhile read cline; do
-X pos=1
-X set \$cline
-X while $test \$# -gt 0; do
-X if $test -r \`echo \$1 | $tr -d '"'\`; then
-X echo "\$pos"
-X exit 0
-X fi
-X shift
-X pos=\`expr \$pos + 1\`
-X done
-Xdone
-XEOF
-Xchmod +x fieldn
-Xfieldn=`./fieldn`
-X$rm -f foo.c fieldn
-Xcase $fieldn in
-X'') pos='???';;
-X1) pos=first;;
-X2) pos=second;;
-X3) pos=third;;
-X*) pos="${fieldn}th";;
-Xesac
-Xecho "Your cpp writes the filename in the $pos field of the line."
-X
-X: locate header file
-X$cat >findhdr <<EOF
-X$startsh
-Xwanted=\$1
-Xname=''
-Xif test -f $usrinc/\$wanted; then
-X echo "$usrinc/\$wanted"
-X exit 0
-Xfi
-Xawkprg='{ print \$$fieldn }'
-Xecho "#include <\$wanted>" > foo\$\$.c
-X$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
-X$grep "^[ ]*#.*\$wanted" | \
-Xwhile read cline; do
-X name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
-X case "\$name" in
-X */\$wanted) echo "\$name"; exit 0;;
-X *) name='';;
-X esac;
-Xdone;
-X$rm -f foo\$\$.c;
-Xcase "\$name" in
-X'') exit 1;;
-Xesac
-XEOF
-Xchmod +x findhdr
-X
-X: define an alternate in-header-list? function
-Xinhdr='echo " "; td=$define; tu=$undef; yyy=$@;
-Xcont=true; xxf="echo \"<\$1> found.\" >&4";
-Xcase $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
-X*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
-Xesac;
-Xcase $# in 4) instead=instead;; *) instead="at last";; esac;
-Xwhile $test "$cont"; do
-X xxx=`./findhdr $1`
-X var=$2; eval "was=\$$2";
-X if $test "$xxx" && $test -r "$xxx";
-X then eval $xxf;
-X eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
-X cont="";
-X else eval $xxnf;
-X eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
-X set $yyy; shift; shift; yyy=$@;
-X case $# in 0) cont="";;
-X 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
-X xxnf="echo \"and I did not find <\$1> either.\" >&4";;
-X *) xxf="echo \"but I found <\$1\> instead.\" >&4";
-X xxnf="echo \"there is no <\$1>, ...\" >&4";;
-X esac;
-Xdone;
-Xwhile $test "$yyy";
-Xdo set $yyy; var=$2; eval "was=\$$2";
-X eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
-X set $yyy; shift; shift; yyy=$@;
-Xdone'
-X
-X: see if this is a sys/mount.h system
-Xset sys/mount.h i_sysmount
-Xeval $inhdr
-X
-Xset xxx valfstype valbsize valfsize
-Xvalfstype="$d_getmntinfofstype"
-Xvalbsize="$d_getmntinfobsize"
-Xvalfsize="$d_getmntinfofsize"
-X
-Xcase $valfstype in
-X '') valfstype="$undef" ;;
-Xesac
-Xcase $valbsize in
-X '') valbsize="$undef" ;;
-Xesac
-Xcase $valfsize in
-X '') valfsize="$undef" ;;
-Xesac
-X
-Xxxx=`./findhdr sys/mount.h`
-Xif $test -f "$xxx";then
-X $cppstdin $cppflags $cppminus < $xxx >$$.h
-X : f_fsize is always more preferable. changed from bsize 17 dec 99
-X if $contains "[^a-zA-Z_]f_fsize[^a-zA-Z_]*;" $$.h > /dev/null 2>&1
-X then
-X valfsize="$define"
-X else
-X if $contains "[^a-zA-Z_]f_bsize[^a-zA-Z_]*;" $$.h > /dev/null 2>&1
-X then
-X valbsize="$define"
-X fi
-X fi
-X if $contains "[^a-zA-Z_]f_fstypename[^a-zA-Z_]*;" $$.h > /dev/null 2>&1
-X then
-X valfstype="$define"
-X fi
-Xfi
-X
-Xval=$valfstype
-Xset d_getmntinfofstype
-Xeval $setvar
-Xval=$valbsize
-Xset d_getmntinfobsize
-Xeval $setvar
-Xval=$valfsize
-Xset d_getmntinfofsize
-Xeval $setvar
-X
-X$rm -f $$.h > /dev/null 2>&1
-Xunset xxx valfstype valbsize valfsize
-X: see if memcpy exists
-Xset memcpy d_memcpy
-Xeval $inlibc
-X
-X: see if memset exists
-Xset memset d_memset
-Xeval $inlibc
-X
-X: see if mntctl exists
-Xset mntctl d_mntctl
-Xeval $inlibc
-X
-X
-Xset x xxx valmtime
-Xvalmtime="$d_mnttime"
-X
-Xcase $valmtime in
-X '') valmtime="$undef" ;;
-Xesac
-X
-Xxxx=`./findhdr sys/mnttab.h`
-Xxxx="$xxx `./findhdr sys/mntctl.h`"
-Xfor x in $xxx
-Xdo
-X if $test -f "$x";then
-X $cppstdin $cppflags $cppminus < $x >$$.h
-X if $contains "[^a-zA-Z_]mnt_time[^a-zA-Z_]*;" $$.h > /dev/null 2>&1
-X then
-X valmtime="$define"
-X fi
-X if $contains "[^a-zA-Z_]vmt_time[^a-zA-Z_]*;" $$.h > /dev/null 2>&1
-X then
-X valmtime="$define"
-X fi
-X fi
-Xdone
-X
-Xval=$valmtime
-Xset d_mnttime
-Xeval $setvar
-X
-X$rm -f $$.h > /dev/null 2>&1
-Xunset x xxx valmtime
-X
-X: see if stdlib is available
-Xset stdlib.h i_stdlib
-Xeval $inhdr
-X
-X: see if this is a unistd.h system
-Xset unistd.h i_unistd
-Xeval $inhdr
-X
-X: see if getopt exists
-Xset getopt d_getopt
-Xeval $inlibc
-X
-Xif $test $i_stdlib = "$define" ; then
-X x1="#include <stdlib.h>"
-Xfi
-Xif $test $i_unistd = "$define" ; then
-X x2="#include <unistd.h>"
-Xfi
-X
-X$echo "#include <stdio.h>" > gotest.c
-X$echo "$x1" >> gotest.c
-X$echo "$x2" >> gotest.c
-X$cat >>gotest.c <<'EOF'
-X
-Xmain() { optind; optarg; }
-X
-XEOF
-X
-Xif $cc $ccflags $ldflags gotest.c -o gotest $libs >/dev/null 2>&1; then
-X val="$define"
-X $echo "optind is defined in stdio.h, stdlib.h or unistd.h."
-Xelse
-X val="$undef"
-X $echo "optind is not defined in stdio.h, stdlib.h or unistd.h."
-Xfi
-X
-Xset d_optind
-Xeval $setvar
-X
-X$rm -f gotest gotest.c > /dev/null 2>&1
-X: see if setmntent exists
-Xset setmntent d_setmntent
-Xeval $inlibc
-X
-Xset x xxx valtemp
-Xvaltemp="$d_setmntent_one_arg"
-Xcase $valtemp in
-X '') valtemp="$undef" ;;
-Xesac
-X
-Xcase "$d_setmntent" in
-X "$define")
-X : We will try the easy way first...
-X : This only works if there are prototypes.
-X : And hope the dual universe machines dont define both!
-X xxx="`./findhdr mntent.h`"
-X xxx="$xxx `./findhdr sys/mount.h`"
-X for x in $xxx
-X do
-X if $test -f "$x"; then
-X $cppstdin $cppflags $cppminus < $x >smtest.h
-X if $contains '[^a-zA-Z_]setmntent.*([^),]+)' smtest.h > /dev/null 2>&1
-X then
-X valtemp="$define"
-X $echo 'You appear to have a single argument setmntent().'
-X fi
-X fi
-X done
-X
-X $rm -f smtest.h > /dev/null 2>&1
-X ;;
-Xesac
-X
-Xval=$valtemp
-Xset d_setmntent_one_arg
-Xeval $setvar
-Xunset x xxx valtemp
-X
-X: see if this is a sys/statfs.h system
-Xset sys/statfs.h i_sysstatfs
-Xeval $inhdr
-X
-Xset xxx valfrsize
-Xvalfrsize="$d_statfs_frsize"
-Xcase $valfrsize in
-X '') valfrsize="$undef" ;;
-Xesac
-X
-Xxxx=`./findhdr sys/statfs.h`
-Xif $test -f "$xxx";then
-X $cppstdin $cppflags $cppminus < $xxx >sftemp.h
-X if $contains "[^a-zA-Z_]f_frsize[^a-zA-Z_]*;" sftemp.h > /dev/null 2>&1
-X then
-X valfrsize="$define"
-X fi
-Xfi
-X
-Xval=$valfrsize
-Xset d_statfs_frsize
-Xeval $setvar
-X
-X$rm -f sftemp.h > /dev/null 2>&1
-Xunset xxx valfrsize
-X: see if statvfs exists
-Xset statvfs d_statvfs
-Xeval $inlibc
-X
-X
-Xif $test "$d_getmnt" = "$define" || \
-X $test "$d_getmntinfo" = "$define" || \
-X $test "$d_statvfs" = "$define"
-Xthen
-X d_statfs="$undef" # we don't care if it's there or not.
-X d_statfsbsd="$undef"
-X d_statfssysv3="$undef"
-X ubsize=""
-Xelse
-X : see if statfs exists
-X set statfs d_statfs
-X eval $inlibc
-X
-X set valbsd xxx valsysv3
-X valbsd="$d_statfsbsd"
-X valsysv3="$d_statfssysv3"
-X
-X case $valbsd in
-X '') valbsd="$undef" ;;
-X esac
-X case $valsysv3 in
-X '') valsysv3="$undef" ;;
-X esac
-X
-X case "$d_statfs" in
-X "$define")
-X : We will try the easy way first...
-X : This only works if there are prototypes.
-X : And hope the dual universe machines dont define both!
-X xxx="`./findhdr sys/statfs.h`"
-X xxx="$xxx `./findhdr sys/mount.h`"
-X xxx="$xxx `./findhdr sys/vfs.h`"
-X for x in $xxx
-X do
-X if $test -f "$x"; then
-X $cppstdin $cppflags $cppminus < $x >sftest.h
-X if $contains '[^a-zA-Z_]statfs.*([^,]*,[^,]*,[^,]*,[^,]*)' sftest.h > /dev/null 2>&1
-X then
-X valsysv3="$define"
-X valbsd="$undef"
-X $echo 'You appear to have the System V.3 style statfs()'
-X fi
-X if $contains '[^a-zA-Z_]statfs.*([^,]*,[^,]*)' sftest.h > /dev/null 2>&1
-X then
-X valsysv3="$undef"
-X valbsd="$define"
-X $echo 'You appear to have the BSD style statfs()'
-X fi
-X
-X if $contains '[^a-zA-Z_]statfs.*([^,]*,[^,]*,[^,]*)' sftest.h > /dev/null 2>&1
-X then
-X valsysv3="$undef"
-X valbsd="$define"
-X $echo 'You appear to have the BSD style of statfs()'
-X fi
-X fi
-X done
-X
-X case "$valbsd" in
-X "$undef")
-X case "$valsysv3" in
-X "$undef")
-X
-X unset dflt
-X rp='How many arguments does your statfs system call accept (2/3/4)?'
-X . ./myread
-X case "$ans" in
-X 2) valbsd="$define"
-X valsysv3="$undef"
-X ;;
-X 3) valbsd="$define"
-X valsysv3="$undef"
-X ;;
-X 4) valbsd="$undef"
-X valsysv3="$define"
-X ;;
-X esac
-X ;;
-X esac
-X ;;
-X esac
-X
-X $rm -f sftest.h > /dev/null 2>&1
-X ;;
-X esac
-X
-X val=$valbsd
-X set d_statfsbsd
-X eval $setvar
-X val=$valsysv3
-X set d_statfssysv3
-X eval $setvar
-X unset x xxx valbsd valsysv3
-X
-X case ${d_statfssysv3} in
-X "$define") ;;
-X *) ubsize="" ;;
-X esac
-Xfi
-X: see if this is a sys/statvfs.h system
-Xset sys/statvfs.h i_sysstatvfs
-Xeval $inhdr
-X
-Xset xxx valbasetype
-Xvalbasetype="$d_statvfsbasetype"
-Xcase $valbasetype in
-X '') valbasetype="$undef" ;;
-Xesac
-Xxxx=`./findhdr sys/statvfs.h`
-Xif $test -f "$xxx";then
-X $cppstdin $cppflags $cppminus < $xxx >$$.h
-X if $contains "[^a-zA-Z_]f_basetype[^a-zA-Z_]*;" $$.h > /dev/null 2>&1
-X then
-X valbasetype="$define"
-X fi
-Xfi
-X
-Xval=$valbasetype
-Xset d_statvfsbasetype
-Xeval $setvar
-X
-X$rm -f $$.h > /dev/null 2>&1
-Xunset xxx valbasetype
-X: see which of string.h or strings.h is needed
-Xecho " "
-Xstrings=`./findhdr string.h`
-Xif $test "$strings" && $test -r "$strings"; then
-X echo "Using <string.h> instead of <strings.h>." >&4
-X val="$define"
-Xelse
-X val="$undef"
-X strings=`./findhdr strings.h`
-X if $test "$strings" && $test -r "$strings"; then
-X echo "Using <strings.h> instead of <string.h>." >&4
-X else
-X echo "No string header found -- You'll surely have problems." >&4
-X fi
-Xfi
-Xset i_string
-Xeval $setvar
-Xcase "$i_string" in
-X"$undef") strings=`./findhdr strings.h`;;
-X*) strings=`./findhdr string.h`;;
-Xesac
-X
-X: index or strchr
-Xecho " "
-Xif set index val -f; eval $csym; $val; then
-X if set strchr val -f d_strchr; eval $csym; $val; then
-X if $contains strchr "$strings" >/dev/null 2>&1 ; then
-X val="$define"
-X vali="$undef"
-X echo "strchr() found." >&4
-X else
-X val="$undef"
-X vali="$define"
-X echo "index() found." >&4
-X fi
-X else
-X val="$undef"
-X vali="$define"
-X echo "index() found." >&4
-X fi
-Xelse
-X if set strchr val -f d_strchr; eval $csym; $val; then
-X val="$define"
-X vali="$undef"
-X echo "strchr() found." >&4
-X else
-X echo "No index() or strchr() found!" >&4
-X val="$undef"
-X vali="$undef"
-X fi
-Xfi
-Xset d_strchr; eval $setvar
-Xval="$vali"
-Xset d_index; eval $setvar
-X
-X: see if sysfs exists
-Xset sysfs d_sysfs
-Xeval $inlibc
-X
-X: preserve RCS keywords in files with variable substitution, grrr
-XId='$Id'
-XSource='$Source'
-X
-X
-Xif $test "$di_prog" = ""; then
-X set di_prog
-X val="di"
-X eval $setvar
-Xfi
-Xif $test "$d_getopt" = "$define";then
-X val=""
-Xelse
-X val="getopt$_o"
-Xfi
-Xset di_otherobj
-Xeval $setvar
-Xecho " "
-Xecho "Checking if your $make program sets \$(MAKE)..." >&4
-Xcase "$make_set_make" in
-X'')
-X $sed 's/^X //' > testmake.mak << 'EOF'
-XXall:
-XX @echo 'maketemp="$(MAKE)"'
-XEOF
-X case "`$make -f testmake.mak 2>/dev/null`" in
-X *maketemp=*) make_set_make='#' ;;
-X *) make_set_make="MAKE=$make" ;;
-X esac
-X $rm -f testmake.mak
-X ;;
-Xesac
-Xcase "$make_set_make" in
-X'#') echo "Yup, it does.";;
-X*) echo "Nope, it doesn't.";;
-Xesac
-X
-X: Cruising for prototypes
-Xecho " "
-Xecho "Checking out function prototypes..." >&4
-X$cat >prototype.c <<'EOCP'
-Xmain(int argc, char *argv[]) {
-X exit(0);}
-XEOCP
-Xif $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
-X echo "Your C compiler appears to support function prototypes."
-X val="$define"
-Xelse
-X echo "Your C compiler doesn't seem to understand function prototypes."
-X val="$undef"
-Xfi
-Xset prototype
-Xeval $setvar
-X$rm -f prototype*
-X
-X: check for void type
-Xecho " "
-Xecho "Checking to see how well your C compiler groks the void type..." >&4
-Xcase "$voidflags" in
-X'')
-X $cat >try.c <<'EOCP'
-X#if TRY & 1
-Xvoid sub() {
-X#else
-Xsub() {
-X#endif
-X extern void moo(); /* function returning void */
-X void (*goo)(); /* ptr to func returning void */
-X#if TRY & 8
-X void *hue; /* generic ptr */
-X#endif
-X#if TRY & 2
-X void (*foo[10])();
-X#endif
-X
-X#if TRY & 4
-X if(goo == moo) {
-X exit(0);
-X }
-X#endif
-X exit(0);
-X}
-Xmain() { sub(); }
-XEOCP
-X if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
-X voidflags=$defvoidused
-X echo "Good. It appears to support void to the level $package wants.">&4
-X if $contains warning .out >/dev/null 2>&1; then
-X echo "However, you might get some warnings that look like this:"
-X $cat .out
-X fi
-X else
-Xecho "Hmm, your compiler has some difficulty with void. Checking further..." >&4
-X if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
-X echo "It supports 1..."
-X if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
-X echo "It also supports 2..."
-X if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
-X voidflags=7
-X echo "And it supports 4 but not 8 definitely."
-X else
-X echo "It doesn't support 4..."
-X if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
-X voidflags=11
-X echo "But it supports 8."
-X else
-X voidflags=3
-X echo "Neither does it support 8."
-X fi
-X fi
-X else
-X echo "It does not support 2..."
-X if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
-X voidflags=13
-X echo "But it supports 4 and 8."
-X else
-X if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
-X voidflags=5
-X echo "And it supports 4 but has not heard about 8."
-X else
-X echo "However it supports 8 but not 4."
-X fi
-X fi
-X fi
-X else
-X echo "There is no support at all for void."
-X voidflags=0
-X fi
-X fi
-Xesac
-Xcase "$voidflags" in
-X"$defvoidused") ;;
-X*) $cat >&4 <<'EOM'
-X Support flag bits are:
-X 1: basic void declarations.
-X 2: arrays of pointers to functions returning void.
-X 4: operations between pointers to and addresses of void functions.
-X 8: generic void pointers.
-XEOM
-X dflt="$voidflags";
-X rp="Your void support flags add up to what?"
-X . ./myread
-X voidflags="$ans"
-X ;;
-Xesac
-X$rm -f try.* .out
-X
-X: see if this is an fshelp.h system
-Xset fshelp.h i_fshelp
-Xeval $inhdr
-X
-X: see if this is an kernel/fs_info.h system
-Xset kernel/fs_info.h i_kernfsinfo
-Xeval $inhdr
-X
-X: see if this is a limits.h system
-Xset limits.h i_limits
-Xeval $inhdr
-X
-X: see if this is a malloc.h system
-Xset malloc.h i_malloc
-Xeval $inhdr
-X
-X: see if memory.h is available.
-Xval=''
-Xset memory.h val
-Xeval $inhdr
-X
-X: See if it conflicts with string.h
-Xcase "$val" in
-X$define)
-X case "$strings" in
-X '') ;;
-X *)
-X $cppstdin $cppflags $cppminus < $strings > mem.h
-X if $contains 'memcpy' mem.h >/dev/null 2>&1; then
-X echo " "
-X echo "We won't be including <memory.h>."
-X val="$undef"
-X fi
-X $rm -f mem.h
-X ;;
-X esac
-Xesac
-Xset i_memory
-Xeval $setvar
-X
-X: see if this is an mntent.h system
-Xset mntent.h i_mntent
-Xeval $inhdr
-X
-X: see if this is an mnttab.h system
-Xset mnttab.h i_mnttab
-Xeval $inhdr
-X: see if this is an storage/Directory.h system
-Xset storage/Directory.h i_stor_directory
-Xeval $inhdr
-X
-X: see if this is an storage/Entry.h system
-Xset storage/Entry.h i_stor_entry
-Xeval $inhdr
-X
-X: see if this is an storage/Path.h system
-Xset storage/Path.h i_stor_path
-Xeval $inhdr
-X
-X: see if this is a sys/fstypes.h system
-Xset sys/fstypes.h i_sysfstypes
-Xeval $inhdr
-Xset sys/fs_types.h i_sysfs_types
-Xeval $inhdr
-X
-X: see if this is a sys/fstyp.h system
-Xset sys/fstyp.h i_sysfstyp
-Xeval $inhdr
-X
-X: see if this is a sys/mntctl.h system
-Xset sys/mntctl.h i_sysmntctl
-Xeval $inhdr
-X
-X: see if this is a sys/mntent.h system
-Xset sys/mntent.h i_sysmntent
-Xeval $inhdr
-X
-X: see if this is a sys/mnttab.h system
-Xset sys/mnttab.h i_sysmnttab
-Xeval $inhdr
-X
-X: see if this is a sys/param system
-Xset sys/param.h i_sysparam
-Xeval $inhdr
-X
-X: see if sys/stat.h is available
-Xset sys/stat.h i_sysstat
-Xeval $inhdr
-X
-X: see if we should include time.h, sys/time.h, or both
-Xecho " "
-Xecho "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
-X$echo $n "I'm now running the test program...$c"
-X$cat >try.c <<'EOCP'
-X#include <sys/types.h>
-X#ifdef I_TIME
-X#include <time.h>
-X#endif
-X#ifdef I_SYSTIME
-X#ifdef SYSTIMEKERNEL
-X#define KERNEL
-X#endif
-X#include <sys/time.h>
-X#endif
-X#ifdef I_SYSSELECT
-X#include <sys/select.h>
-X#endif
-Xmain()
-X{
-X struct tm foo;
-X#ifdef S_TIMEVAL
-X struct timeval bar;
-X#endif
-X#ifdef S_TIMEZONE
-X struct timezone tzp;
-X#endif
-X if (foo.tm_sec == foo.tm_sec)
-X exit(0);
-X#ifdef S_TIMEVAL
-X if (bar.tv_sec == bar.tv_sec)
-X exit(0);
-X#endif
-X exit(1);
-X}
-XEOCP
-Xflags=''
-Xs_timezone=''
-Xsysselect=''
-Xfor s_timeval in '-DS_TIMEVAL' ''; do
-Xfor i_systimek in '' '-DSYSTIMEKERNEL'; do
-Xfor i_time in '' '-DI_TIME'; do
-Xfor i_systime in '-DI_SYSTIME' ''; do
-X case "$flags" in
-X '') $echo $n ".$c"
-X set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
-X if eval $compile; then
-X set X $i_time $i_systime $i_systimek $sysselect $s_timeval
-X shift
-X flags="$*"
-X echo " "
-X $echo $n "Succeeded with $flags$c"
-X fi
-X ;;
-X esac
-Xdone
-Xdone
-Xdone
-Xdone
-Xtimeincl=''
-Xecho " "
-Xcase "$flags" in
-X*SYSTIMEKERNEL*) i_systimek="$define"
-X timeincl=`./findhdr sys/time.h`
-X echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
-X*) i_systimek="$undef";;
-Xesac
-Xcase "$flags" in
-X*I_TIME*) i_time="$define"
-X timeincl=`./findhdr time.h`" $timeincl"
-X echo "We'll include <time.h>." >&4;;
-X*) i_time="$undef";;
-Xesac
-Xcase "$flags" in
-X*I_SYSTIME*) i_systime="$define"
-X timeincl=`./findhdr sys/time.h`" $timeincl"
-X echo "We'll include <sys/time.h>." >&4;;
-X*) i_systime="$undef";;
-Xesac
-X$rm -f try.c try
-X
-X: see if sys/types.h has to be included
-Xset sys/types.h i_systypes
-Xeval $inhdr
-X
-X: see if this is a sys/vfs.h system
-Xset sys/vfs.h i_sysvfs
-Xeval $inhdr
-X
-X: see if this is a sys/vfstab.h system
-Xset sys/vfstab.h i_sysvfstab
-Xeval $inhdr
-X
-X: see if this is a sys/vmount.h system
-Xset sys/vmount.h i_sysvmount
-Xeval $inhdr
-X
-X: end of configuration questions
-Xecho " "
-Xecho "End of configuration questions."
-Xecho " "
-X
-X: back to where it started
-Xif test -d ../UU; then
-X cd ..
-Xfi
-X
-X: configuration may be patched via a 'config.over' file
-Xif $test -f config.over; then
-X echo " "
-X dflt=y
-X rp='I see a config.over file. Do you wish to load it?'
-X . UU/myread
-X case "$ans" in
-X n*) echo "OK, I'll ignore it.";;
-X *) . ./config.over
-X echo "Configuration override changes have been loaded."
-X ;;
-X esac
-Xfi
-X
-X: in case they want portability, strip down executable paths
-Xcase "$d_portable" in
-X"$define")
-X echo " "
-X echo "Stripping down executable paths..." >&4
-X for file in $loclist $trylist; do
-X if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then
-X eval $file="\$file"
-X fi
-X done
-X ;;
-Xesac
-X
-X: create config.sh file
-Xecho " "
-Xecho "Creating config.sh..." >&4
-X$spitshell <<EOT >config.sh
-X$startsh
-X#
-X# This file was produced by running the Configure script. It holds all the
-X# definitions figured out by Configure. Should you modify one of these values,
-X# do not forget to propagate your changes by running "Configure -der". You may
-X# instead choose to run each of the .SH files by yourself, or "Configure -S".
-X#
-X
-X# Package name : $package
-X# Source directory : $src
-X# Configuration time: $cf_time
-X# Configured by : $cf_by
-X# Target system : $myuname
-X
-XAuthor='$Author'
-XDate='$Date'
-XHeader='$Header'
-XId='$Id'
-XLocker='$Locker'
-XLog='$Log'
-XMcc='$Mcc'
-XRCSfile='$RCSfile'
-XRevision='$Revision'
-XSource='$Source'
-XState='$State'
-X_a='$_a'
-X_exe='$_exe'
-X_o='$_o'
-Xafs='$afs'
-Xar='$ar'
-Xarchobjs='$archobjs'
-Xawk='$awk'
-Xbash='$bash'
-Xbison='$bison'
-Xbyacc='$byacc'
-Xc='$c'
-Xcat='$cat'
-Xcc='$cc'
-Xccflags='$ccflags'
-Xcf_by='$cf_by'
-Xcf_time='$cf_time'
-Xchgrp='$chgrp'
-Xchmod='$chmod'
-Xchown='$chown'
-Xcomm='$comm'
-Xcompress='$compress'
-Xcontains='$contains'
-Xcp='$cp'
-Xcpio='$cpio'
-Xcpp='$cpp'
-Xcppflags='$cppflags'
-Xcpplast='$cpplast'
-Xcppminus='$cppminus'
-Xcpprun='$cpprun'
-Xcppstdin='$cppstdin'
-Xcsh='$csh'
-Xd_64bit_statfs_flds='$d_64bit_statfs_flds'
-Xd_bcopy='$d_bcopy'
-Xd_bsd='$d_bsd'
-Xd_bzero='$d_bzero'
-Xd_endmntent='$d_endmntent'
-Xd_eunice='$d_eunice'
-Xd_fs_info='$d_fs_info'
-Xd_getmnt='$d_getmnt'
-Xd_getmntent='$d_getmntent'
-Xd_getmntinfo='$d_getmntinfo'
-Xd_getmntinfobsize='$d_getmntinfobsize'
-Xd_getmntinfofsize='$d_getmntinfofsize'
-Xd_getmntinfofstype='$d_getmntinfofstype'
-Xd_getopt='$d_getopt'
-Xd_gnulibc='$d_gnulibc'
-Xd_index='$d_index'
-Xd_memcpy='$d_memcpy'
-Xd_memset='$d_memset'
-Xd_mntctl='$d_mntctl'
-Xd_mnttime='$d_mnttime'
-Xd_optind='$d_optind'
-Xd_portable='$d_portable'
-Xd_setmntent='$d_setmntent'
-Xd_setmntent_one_arg='$d_setmntent_one_arg'
-Xd_statfs='$d_statfs'
-Xd_statfs_frsize='$d_statfs_frsize'
-Xd_statfsbsd='$d_statfsbsd'
-Xd_statfssysv3='$d_statfssysv3'
-Xd_statvfs='$d_statvfs'
-Xd_statvfsbasetype='$d_statvfsbasetype'
-Xd_strchr='$d_strchr'
-Xd_sysfs='$d_sysfs'
-Xd_xenix='$d_xenix'
-Xdate='$date'
-Xdefvoidused='$defvoidused'
-Xdi_otherobj='$di_otherobj'
-Xdi_prog='$di_prog'
-Xecho='$echo'
-Xegrep='$egrep'
-Xemacs='$emacs'
-Xeunicefix='$eunicefix'
-Xexe_ext='$exe_ext'
-Xexpr='$expr'
-Xfind='$find'
-Xfirstmakefile='$firstmakefile'
-Xflex='$flex'
-Xgccversion='$gccversion'
-Xglibpth='$glibpth'
-Xgrep='$grep'
-Xgzip='$gzip'
-Xhint='$hint'
-Xi_fshelp='$i_fshelp'
-Xi_kernfsinfo='$i_kernfsinfo'
-Xi_limits='$i_limits'
-Xi_malloc='$i_malloc'
-Xi_memory='$i_memory'
-Xi_mntent='$i_mntent'
-Xi_mnttab='$i_mnttab'
-Xi_stdlib='$i_stdlib'
-Xi_stor_directory='$i_stor_directory'
-Xi_stor_entry='$i_stor_entry'
-Xi_stor_path='$i_stor_path'
-Xi_string='$i_string'
-Xi_sysfs_types='$i_sysfs_types'
-Xi_sysfstyp='$i_sysfstyp'
-Xi_sysfstypes='$i_sysfstypes'
-Xi_sysmntctl='$i_sysmntctl'
-Xi_sysmntent='$i_sysmntent'
-Xi_sysmnttab='$i_sysmnttab'
-Xi_sysmount='$i_sysmount'
-Xi_sysparam='$i_sysparam'
-Xi_sysstat='$i_sysstat'
-Xi_sysstatfs='$i_sysstatfs'
-Xi_sysstatvfs='$i_sysstatvfs'
-Xi_systime='$i_systime'
-Xi_systimek='$i_systimek'
-Xi_systypes='$i_systypes'
-Xi_sysvfs='$i_sysvfs'
-Xi_sysvfstab='$i_sysvfstab'
-Xi_sysvmount='$i_sysvmount'
-Xi_time='$i_time'
-Xi_unistd='$i_unistd'
-Xincpath='$incpath'
-Xinews='$inews'
-Xinstallmansrc='$installmansrc'
-Xksh='$ksh'
-Xldflags='$ldflags'
-Xless='$less'
-Xlib_ext='$lib_ext'
-Xlibc='$libc'
-Xlibpth='$libpth'
-Xlibs='$libs'
-Xlibswanted='$libswanted'
-Xline='$line'
-Xlint='$lint'
-Xlkflags='$lkflags'
-Xln='$ln'
-Xlns='$lns'
-Xlocincpth='$locincpth'
-Xloclibpth='$loclibpth'
-Xlp='$lp'
-Xlpr='$lpr'
-Xls='$ls'
-Xmail='$mail'
-Xmailx='$mailx'
-Xmake='$make'
-Xmake_set_make='$make_set_make'
-Xmanext='$manext'
-Xmansrc='$mansrc'
-Xmansrcexp='$mansrcexp'
-Xmips='$mips'
-Xmips_type='$mips_type'
-Xmkdir='$mkdir'
-Xmore='$more'
-Xmv='$mv'
-Xmyuname='$myuname'
-Xn='$n'
-Xnm='$nm'
-Xnm_opt='$nm_opt'
-Xnm_so_opt='$nm_so_opt'
-Xnroff='$nroff'
-Xobj_ext='$obj_ext'
-Xoptimize='$optimize'
-Xosname='$osname'
-Xosvers='$osvers'
-Xpackage='$package'
-Xpath_sep='$path_sep'
-Xperl='$perl'
-Xpg='$pg'
-Xplibpth='$plibpth'
-Xpmake='$pmake'
-Xpr='$pr'
-Xprefix='$prefix'
-Xprefixexp='$prefixexp'
-Xprototype='$prototype'
-Xrm='$rm'
-Xrmail='$rmail'
-Xrunnm='$runnm'
-Xsed='$sed'
-Xsendmail='$sendmail'
-Xsh='$sh'
-Xshar='$shar'
-Xsharpbang='$sharpbang'
-Xshsharp='$shsharp'
-Xsleep='$sleep'
-Xsmail='$smail'
-Xso='$so'
-Xsort='$sort'
-Xspackage='$spackage'
-Xspitshell='$spitshell'
-Xsrc='$src'
-Xstartsh='$startsh'
-Xstrings='$strings'
-Xsubmit='$submit'
-Xsysman='$sysman'
-Xtail='$tail'
-Xtar='$tar'
-Xtbl='$tbl'
-Xtee='$tee'
-Xtest='$test'
-Xtimeincl='$timeincl'
-Xtouch='$touch'
-Xtr='$tr'
-Xtroff='$troff'
-Xubsize='$ubsize'
-Xuname='$uname'
-Xuniq='$uniq'
-Xusenm='$usenm'
-Xusrinc='$usrinc'
-Xuuname='$uuname'
-Xvi='$vi'
-Xvoidflags='$voidflags'
-Xxlibpth='$xlibpth'
-Xzcat='$zcat'
-Xzip='$zip'
-XEOT
-X
-X: Add in command line options if available
-X$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
-X
-X: add special variables
-X$test -f $src/patchlevel.h && \
-Xawk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
-Xecho "CONFIG=true" >>config.sh
-X
-X: propagate old symbols
-Xif $test -f UU/config.sh; then
-X <UU/config.sh sort | uniq >UU/oldconfig.sh
-X sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
-X sort | uniq -u >UU/oldsyms
-X set X `cat UU/oldsyms`
-X shift
-X case $# in
-X 0) ;;
-X *)
-X cat <<EOM
-XHmm...You had some extra variables I don't know about...I'll try to keep 'em...
-XEOM
-X echo "# Variables propagated from previous config.sh file." >>config.sh
-X for sym in `cat UU/oldsyms`; do
-X echo " Propagating $hint variable "'$'"$sym..."
-X eval 'tmp="$'"${sym}"'"'
-X echo "$tmp" | \
-X sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
-X done
-X ;;
-X esac
-Xfi
-X
-X: Finish up by extracting the .SH files
-Xcase "$alldone" in
-Xexit)
-X $rm -rf UU
-X echo "Done."
-X exit 0
-X ;;
-Xcont)
-X ;;
-X'')
-X dflt=''
-X nostick=true
-X $cat <<EOM
-X
-XIf you'd like to make any changes to the config.sh file before I begin
-Xto configure things, do it as a shell escape now (e.g. !vi config.sh).
-X
-XEOM
-X rp="Press return or use a shell escape to edit config.sh:"
-X . UU/myread
-X nostick=''
-X case "$ans" in
-X '') ;;
-X *) : in case they cannot read
-X sh 1>&4 -c "$ans";;
-X esac
-X ;;
-Xesac
-X
-X: if this fails, just run all the .SH files by hand
-X. ./config.sh
-X
-Xecho " "
-Xexec 1>&4
-X. ./UU/extract
-X
-Xif $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
-X dflt=y
-X case "$silent" in
-X true) ;;
-X *)
-X $cat <<EOM
-X
-XNow you need to generate make dependencies by running "make depend".
-XYou might prefer to run it in background: "make depend > makedepend.out &"
-XIt can take a while, so you might not want to run it right now.
-X
-XEOM
-X ;;
-X esac
-X rp="Run make depend now?"
-X . UU/myread
-X case "$ans" in
-X y*)
-X make depend && echo "Now you must run a make."
-X ;;
-X *)
-X echo "You must run 'make depend' then 'make'."
-X ;;
-X esac
-Xelif test -f [Mm]akefile; then
-X echo " "
-X echo "Now you must run a make."
-Xelse
-X echo "Done."
-Xfi
-X
-Xif $test -f Policy.sh; then
-X $cat <<EOM
-X
-XIf you compile $package on a different machine or from a different object
-Xdirectory, copy the Policy.sh file from this object directory to the
-Xnew one before you run Configure -- this will help you with most of
-Xthe policy defaults.
-X
-XEOM
-Xfi
-Xif $test -f config.msg; then
-X echo "Hmm. I also noted the following information while running:"
-X echo " "
-X $cat config.msg >&4
-X $rm -f config.msg
-Xfi
-X$rm -f kit*isdone ark*isdone
-X$rm -rf UU
-X
-X: End of Configure
-X
-END_OF_FILE
-if test 106597 -ne `wc -c <'Configure'`; then
- echo shar: \"'Configure'\" unpacked with wrong size!
-fi
-chmod +x 'Configure'
-# end of 'Configure'
-fi
-echo shar: End of archive 3 \(of 3\).
-cp /dev/null ark3isdone
-MISSING=""
-for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
-done
-if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
-else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
-fi
-## End of shell archive.
-exit 0
-
-