summaryrefslogtreecommitdiff
path: root/source/a/floppy
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/floppy')
-rw-r--r--source/a/floppy/fdutils-5.4-20020222.diff2991
-rw-r--r--source/a/floppy/fdutils-5.5-20081027.diff905
-rwxr-xr-xsource/a/floppy/floppy.SlackBuild41
-rw-r--r--source/a/floppy/slack-desc6
4 files changed, 931 insertions, 3012 deletions
diff --git a/source/a/floppy/fdutils-5.4-20020222.diff b/source/a/floppy/fdutils-5.4-20020222.diff
deleted file mode 100644
index 28a7b040..00000000
--- a/source/a/floppy/fdutils-5.4-20020222.diff
+++ /dev/null
@@ -1,2991 +0,0 @@
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/Changelog fdutils/Changelog
---- fdutils-5.4/Changelog Sat Jun 3 16:29:33 2000
-+++ fdutils/Changelog Sun Feb 3 23:51:42 2002
-@@ -1,3 +1,9 @@
-+020203 Fix fdmount and superformat bugs
-+020203 Create /dev/fd0 before testing for existence of /dev/fd0
-+011002 Fix floppycontrol.c printf conditional on FD_DISK_CHANGED, so that
-+ it works with gcc3 which apparently considers printf as a macro...
-+000612 Explicitly include sysmacros.h, apparently this is needed in
-+ certain environments
- 000603 Released 5.4
- 000527 Fixed a couple of buffer overrun exploits and other cleanup. Made
- fdutils compilable with Linux 2.3/2.4 kernels. Documentation fixes
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/INSTALL fdutils/INSTALL
---- fdutils-5.4/INSTALL Thu Jul 1 19:48:19 1999
-+++ fdutils/INSTALL Mon May 21 00:24:21 2001
-@@ -8,14 +8,17 @@
- 3. Compile the utilities:
- make
-
-- 3. Run the MAKEFLOPPIES script to create the device files:
-+ 4. Install:
-+ make install
-+
-+ 5. Run the MAKEFLOPPIES script to create the device files:
- cd /dev
- MAKEFLOPPIES
-
-- 4. Enjoy!
-+ 6. Enjoy!
- I you have any questions, feel free to ask!
-
-- 5. You might also want to get a recent version of mtools (later than
-+ 7. You might also want to get a recent version of mtools (later than
- 3.0)
-
- A. Knaff
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/config.guess fdutils/config.guess
---- fdutils-5.4/config.guess Tue Jun 17 22:37:13 1997
-+++ fdutils/config.guess Mon May 21 00:24:45 2001
-@@ -1,7 +1,10 @@
- #! /bin/sh
- # Attempt to guess a canonical system name.
--# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
--#
-+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-+# Free Software Foundation, Inc.
-+
-+timestamp='2001-04-20'
-+
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or
-@@ -22,18 +25,92 @@
- # the same distribution terms that you use for the rest of that program.
-
- # Written by Per Bothner <bothner@cygnus.com>.
--# The master version of this file is at the FSF in /home/gd/gnu/lib.
-+# Please send patches to <config-patches@gnu.org>.
- #
- # This script attempts to guess a canonical system name similar to
- # config.sub. If it succeeds, it prints the system name on stdout, and
- # exits with 0. Otherwise, it exits with 1.
- #
- # The plan is that this can be called by configure scripts if you
--# don't specify an explicit system type (host/target name).
--#
--# Only a few systems have been added to this list; please add others
--# (but try to keep the structure clean).
--#
-+# don't specify an explicit build system type.
-+
-+me=`echo "$0" | sed -e 's,.*/,,'`
-+
-+usage="\
-+Usage: $0 [OPTION]
-+
-+Output the configuration name of the system \`$me' is run on.
-+
-+Operation modes:
-+ -h, --help print this help, then exit
-+ -t, --time-stamp print date of last modification, then exit
-+ -v, --version print version number, then exit
-+
-+Report bugs and patches to <config-patches@gnu.org>."
-+
-+version="\
-+GNU config.guess ($timestamp)
-+
-+Originally written by Per Bothner.
-+Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
-+Free Software Foundation, Inc.
-+
-+This is free software; see the source for copying conditions. There is NO
-+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-+
-+help="
-+Try \`$me --help' for more information."
-+
-+# Parse command line
-+while test $# -gt 0 ; do
-+ case $1 in
-+ --time-stamp | --time* | -t )
-+ echo "$timestamp" ; exit 0 ;;
-+ --version | -v )
-+ echo "$version" ; exit 0 ;;
-+ --help | --h* | -h )
-+ echo "$usage"; exit 0 ;;
-+ -- ) # Stop option processing
-+ shift; break ;;
-+ - ) # Use stdin as input.
-+ break ;;
-+ -* )
-+ echo "$me: invalid option $1$help" >&2
-+ exit 1 ;;
-+ * )
-+ break ;;
-+ esac
-+done
-+
-+if test $# != 0; then
-+ echo "$me: too many arguments$help" >&2
-+ exit 1
-+fi
-+
-+
-+dummy=dummy-$$
-+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
-+
-+# CC_FOR_BUILD -- compiler used by this script.
-+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-+# use `HOST_CC' if defined, but it is deprecated.
-+
-+case $CC_FOR_BUILD,$HOST_CC,$CC in
-+ ,,) echo "int dummy(){}" > $dummy.c
-+ for c in cc gcc c89 ; do
-+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
-+ if test $? = 0 ; then
-+ CC_FOR_BUILD="$c"; break
-+ fi
-+ done
-+ rm -f $dummy.c $dummy.o $dummy.rel
-+ if test x"$CC_FOR_BUILD" = x ; then
-+ CC_FOR_BUILD=no_compiler_found
-+ fi
-+ ;;
-+ ,,*) CC_FOR_BUILD=$CC ;;
-+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-+esac
-
- # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
- # (ghazi@noc.rutgers.edu 8/24/94.)
-@@ -43,37 +120,162 @@
-
- UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
- UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
--UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
- UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
--trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
--
- # Note: order is significant - the case branches are not exclusive.
-
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-+ *:NetBSD:*:*)
-+ # Netbsd (nbsd) targets should (where applicable) match one or
-+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
-+ # switched to ELF, *-*-netbsd* would select the old
-+ # object file format. This provides both forward
-+ # compatibility and a consistent mechanism for selecting the
-+ # object file format.
-+ # Determine the machine/vendor (is the vendor relevant).
-+ case "${UNAME_MACHINE}" in
-+ amiga) machine=m68k-unknown ;;
-+ arm32) machine=arm-unknown ;;
-+ atari*) machine=m68k-atari ;;
-+ sun3*) machine=m68k-sun ;;
-+ mac68k) machine=m68k-apple ;;
-+ macppc) machine=powerpc-apple ;;
-+ hp3[0-9][05]) machine=m68k-hp ;;
-+ ibmrt|romp-ibm) machine=romp-ibm ;;
-+ *) machine=${UNAME_MACHINE}-unknown ;;
-+ esac
-+ # The Operating System including object format, if it has switched
-+ # to ELF recently, or will in the future.
-+ case "${UNAME_MACHINE}" in
-+ i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
-+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-+ | grep __ELF__ >/dev/null
-+ then
-+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-+ # Return netbsd for either. FIX?
-+ os=netbsd
-+ else
-+ os=netbsdelf
-+ fi
-+ ;;
-+ *)
-+ os=netbsd
-+ ;;
-+ esac
-+ # The OS release
-+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-+ # contains redundant information, the shorter form:
-+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-+ echo "${machine}-${os}${release}"
-+ exit 0 ;;
- alpha:OSF1:*:*)
-+ if test $UNAME_RELEASE = "V4.0"; then
-+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-+ fi
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
-- echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
-+ cat <<EOF >$dummy.s
-+ .data
-+\$Lformat:
-+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-+
-+ .text
-+ .globl main
-+ .align 4
-+ .ent main
-+main:
-+ .frame \$30,16,\$26,0
-+ ldgp \$29,0(\$27)
-+ .prologue 1
-+ .long 0x47e03d80 # implver \$0
-+ lda \$2,-1
-+ .long 0x47e20c21 # amask \$2,\$1
-+ lda \$16,\$Lformat
-+ mov \$0,\$17
-+ not \$1,\$18
-+ jsr \$26,printf
-+ ldgp \$29,0(\$26)
-+ mov 0,\$16
-+ jsr \$26,exit
-+ .end main
-+EOF
-+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-+ if test "$?" = 0 ; then
-+ case `./$dummy` in
-+ 0-0)
-+ UNAME_MACHINE="alpha"
-+ ;;
-+ 1-0)
-+ UNAME_MACHINE="alphaev5"
-+ ;;
-+ 1-1)
-+ UNAME_MACHINE="alphaev56"
-+ ;;
-+ 1-101)
-+ UNAME_MACHINE="alphapca56"
-+ ;;
-+ 2-303)
-+ UNAME_MACHINE="alphaev6"
-+ ;;
-+ 2-307)
-+ UNAME_MACHINE="alphaev67"
-+ ;;
-+ esac
-+ fi
-+ rm -f $dummy.s $dummy
-+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-+ exit 0 ;;
-+ Alpha\ *:Windows_NT*:*)
-+ # How do we know it's Interix rather than the generic POSIX subsystem?
-+ # Should we change UNAME_MACHINE based on the output of uname instead
-+ # of the specific Alpha model?
-+ echo alpha-pc-interix
- exit 0 ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit 0 ;;
- Amiga*:UNIX_System_V:4.0:*)
-- echo m68k-cbm-sysv4
-+ echo m68k-unknown-sysv4
- exit 0;;
-- amiga:NetBSD:*:*)
-- echo m68k-cbm-netbsd${UNAME_RELEASE}
-- exit 0 ;;
- amiga:OpenBSD:*:*)
-- echo m68k-cbm-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-+ echo m68k-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:[Aa]miga[Oo][Ss]:*:*)
-+ echo ${UNAME_MACHINE}-unknown-amigaos
-+ exit 0 ;;
-+ arc64:OpenBSD:*:*)
-+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ arc:OpenBSD:*:*)
-+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ hkmips:OpenBSD:*:*)
-+ echo mips-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ pmax:OpenBSD:*:*)
-+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ sgi:OpenBSD:*:*)
-+ echo mips-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ wgrisc:OpenBSD:*:*)
-+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:OS/390:*:*)
-+ echo i370-ibm-openedition
-+ exit 0 ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
-- Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
-+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-+ echo hppa1.1-hitachi-hiuxmpp
-+ exit 0;;
-+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
-@@ -81,9 +283,12 @@
- echo pyramid-pyramid-bsd
- fi
- exit 0 ;;
-- NILE:*:*:dcosx)
-+ NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit 0 ;;
-+ sun4H:SunOS:5.*:*)
-+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-+ exit 0 ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
-@@ -108,26 +313,61 @@
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
-+ sun*:*:4.2BSD:*)
-+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-+ case "`/bin/arch`" in
-+ sun3)
-+ echo m68k-sun-sunos${UNAME_RELEASE}
-+ ;;
-+ sun4)
-+ echo sparc-sun-sunos${UNAME_RELEASE}
-+ ;;
-+ esac
-+ exit 0 ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
-- atari*:NetBSD:*:*)
-- echo m68k-atari-netbsd${UNAME_RELEASE}
-- exit 0 ;;
- atari*:OpenBSD:*:*)
-- echo m68k-atari-openbsd${UNAME_RELEASE}
-+ echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
-- sun3*:NetBSD:*:*)
-- echo m68k-sun-netbsd${UNAME_RELEASE}
-+ # The situation for MiNT is a little confusing. The machine name
-+ # can be virtually everything (everything which is not
-+ # "atarist" or "atariste" at least should have a processor
-+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
-+ # to the lowercase version "mint" (or "freemint"). Finally
-+ # the system name "TOS" denotes a system which is actually not
-+ # MiNT. But MiNT is downward compatible to TOS, so this should
-+ # be no problem.
-+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-+ echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
-- sun3*:OpenBSD:*:*)
-- echo m68k-sun-openbsd${UNAME_RELEASE}
-+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-+ echo m68k-atari-mint${UNAME_RELEASE}
-+ exit 0 ;;
-+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-+ echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
-- mac68k:NetBSD:*:*)
-- echo m68k-apple-netbsd${UNAME_RELEASE}
-+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-+ echo m68k-milan-mint${UNAME_RELEASE}
-+ exit 0 ;;
-+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-+ echo m68k-hades-mint${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-+ echo m68k-unknown-mint${UNAME_RELEASE}
-+ exit 0 ;;
-+ sun3*:OpenBSD:*:*)
-+ echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
-- echo m68k-apple-openbsd${UNAME_RELEASE}
-+ echo m68k-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ mvme68k:OpenBSD:*:*)
-+ echo m68k-unknown-openbsd${UNAME_RELEASE}
-+ exit 0 ;;
-+ mvme88k:OpenBSD:*:*)
-+ echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
-@@ -141,9 +381,17 @@
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
-+ 2020:CLIX:*:* | 2430:CLIX:*:*)
-+ echo clipper-intergraph-clix${UNAME_RELEASE}
-+ exit 0 ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
-- sed 's/^ //' << EOF >dummy.c
-- int main (argc, argv) int argc; char **argv; {
-+ sed 's/^ //' << EOF >$dummy.c
-+#ifdef __cplusplus
-+#include <stdio.h> /* for printf() prototype */
-+ int main (int argc, char *argv[]) {
-+#else
-+ int main (argc, argv) int argc; char *argv[]; {
-+#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-@@ -158,12 +406,15 @@
- exit (-1);
- }
- EOF
-- ${CC-cc} dummy.c -o dummy \
-- && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-- && rm dummy.c dummy && exit 0
-- rm -f dummy.c dummy
-+ $CC_FOR_BUILD $dummy.c -o $dummy \
-+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-+ && rm -f $dummy.c $dummy && exit 0
-+ rm -f $dummy.c $dummy
- echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
-+ Motorola:PowerMAX_OS:*:*)
-+ echo powerpc-motorola-powermax
-+ exit 0 ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit 0 ;;
-@@ -179,15 +430,18 @@
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
-- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-- -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
-+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-+ then
-+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-+ [ ${TARGET_BINARY_INTERFACE}x = x ]
-+ then
- echo m88k-dg-dgux${UNAME_RELEASE}
-- else
-+ else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
-+ fi
-+ else
-+ echo i586-dg-dgux${UNAME_RELEASE}
- fi
-- else echo i586-dg-dgux${UNAME_RELEASE}
-- fi
- exit 0 ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
-@@ -208,12 +462,20 @@
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
-- i?86:AIX:*:*)
-+ i*86:AIX:*:*)
- echo i386-ibm-aix
- exit 0 ;;
-+ ia64:AIX:*:*)
-+ if [ -x /usr/bin/oslevel ] ; then
-+ IBM_REV=`/usr/bin/oslevel`
-+ else
-+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-+ fi
-+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-+ exit 0 ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-- sed 's/^ //' << EOF >dummy.c
-+ sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
-@@ -224,8 +486,8 @@
- exit(0);
- }
- EOF
-- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-- rm -f dummy.c dummy
-+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-+ rm -f $dummy.c $dummy
- echo rs6000-ibm-aix3.2.5
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
-@@ -233,8 +495,9 @@
- echo rs6000-ibm-aix3.2
- fi
- exit 0 ;;
-- *:AIX:*:4)
-- if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
-+ *:AIX:*:[45])
-+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
-+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
-@@ -242,7 +505,7 @@
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
-- IBM_REV=4.${UNAME_RELEASE}
-+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
-@@ -252,7 +515,7 @@
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit 0 ;;
-- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
-+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
-@@ -267,18 +530,75 @@
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit 0 ;;
-- 9000/[3478]??:HP-UX:*:*)
-+ 9000/[34678]??:HP-UX:*:*)
-+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
-- 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-- 9000/8?? ) HP_ARCH=hppa1.0 ;;
-+ 9000/[678][0-9][0-9])
-+ case "${HPUX_REV}" in
-+ 11.[0-9][0-9])
-+ if [ -x /usr/bin/getconf ]; then
-+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-+ case "${sc_cpu_version}" in
-+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-+ 532) # CPU_PA_RISC2_0
-+ case "${sc_kernel_bits}" in
-+ 32) HP_ARCH="hppa2.0n" ;;
-+ 64) HP_ARCH="hppa2.0w" ;;
-+ esac ;;
-+ esac
-+ fi ;;
-+ esac
-+ if [ "${HP_ARCH}" = "" ]; then
-+ sed 's/^ //' << EOF >$dummy.c
-+
-+ #define _HPUX_SOURCE
-+ #include <stdlib.h>
-+ #include <unistd.h>
-+
-+ int main ()
-+ {
-+ #if defined(_SC_KERNEL_BITS)
-+ long bits = sysconf(_SC_KERNEL_BITS);
-+ #endif
-+ long cpu = sysconf (_SC_CPU_VERSION);
-+
-+ switch (cpu)
-+ {
-+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-+ case CPU_PA_RISC2_0:
-+ #if defined(_SC_KERNEL_BITS)
-+ switch (bits)
-+ {
-+ case 64: puts ("hppa2.0w"); break;
-+ case 32: puts ("hppa2.0n"); break;
-+ default: puts ("hppa2.0"); break;
-+ } break;
-+ #else /* !defined(_SC_KERNEL_BITS) */
-+ puts ("hppa2.0"); break;
-+ #endif
-+ default: puts ("hppa1.0"); break;
-+ }
-+ exit (0);
-+ }
-+EOF
-+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-+ rm -f $dummy.c $dummy
-+ fi ;;
- esac
-- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
-+ ia64:HP-UX:*:*)
-+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-+ echo ia64-hp-hpux${HPUX_REV}
-+ exit 0 ;;
- 3050*:HI-UX:*:*)
-- sed 's/^ //' << EOF >dummy.c
-+ sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
-@@ -303,8 +623,8 @@
- exit (0);
- }
- EOF
-- ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-- rm -f dummy.c dummy
-+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-+ rm -f $dummy.c $dummy
- echo unknown-hitachi-hiuxwe2
- exit 0 ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-@@ -313,13 +633,16 @@
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit 0 ;;
-+ *9??*:MPE/iX:*:*)
-+ echo hppa1.0-hp-mpeix
-+ exit 0 ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit 0 ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit 0 ;;
-- i?86:OSF1:*:*)
-+ i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
-@@ -329,6 +652,9 @@
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit 0 ;;
-+ hppa*:OpenBSD:*:*)
-+ echo hppa-unknown-openbsd
-+ exit 0 ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit 0 ;;
-@@ -359,104 +685,297 @@
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
- exit 0 ;;
- CRAY*TS:*:*:*)
-- echo t90-cray-unicos${UNAME_RELEASE}
-+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-+ exit 0 ;;
-+ CRAY*T3D:*:*:*)
-+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-+ exit 0 ;;
-+ CRAY*T3E:*:*:*)
-+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-+ exit 0 ;;
-+ CRAY*SV1:*:*:*)
-+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY-2:*:*:*)
- echo cray2-cray-unicos
- exit 0 ;;
-- F300:UNIX_System_V:*:*)
-- FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
-+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
-- F301:UNIX_System_V:*:*)
-- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-- exit 0 ;;
-- hp3[0-9][05]:NetBSD:*:*)
-- echo m68k-hp-netbsd${UNAME_RELEASE}
-+ hp300:OpenBSD:*:*)
-+ echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
-- hp3[0-9][05]:OpenBSD:*:*)
-- echo m68k-hp-openbsd${UNAME_RELEASE}
-- exit 0 ;;
-- i?86:BSD/386:*:* | *:BSD/OS:*:*)
-+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
-+ sparc*:BSD/OS:*:*)
-+ echo sparc-unknown-bsdi${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:BSD/OS:*:*)
-+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-+ exit 0 ;;
- *:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
-- *:NetBSD:*:*)
-- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- exit 0 ;;
- i*:CYGWIN*:*)
-- echo i386-pc-cygwin32
-+ echo ${UNAME_MACHINE}-pc-cygwin
-+ exit 0 ;;
-+ i*:MINGW*:*)
-+ echo ${UNAME_MACHINE}-pc-mingw32
-+ exit 0 ;;
-+ i*:PW*:*)
-+ echo ${UNAME_MACHINE}-pc-pw32
-+ exit 0 ;;
-+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-+ # How do we know it's Interix rather than the generic POSIX subsystem?
-+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-+ # UNAME_MACHINE based on the output of uname instead of i386?
-+ echo i386-pc-interix
-+ exit 0 ;;
-+ i*:UWIN*:*)
-+ echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
- p*:CYGWIN*:*)
-- echo powerpcle-unknown-cygwin32
-+ echo powerpcle-unknown-cygwin
- exit 0 ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- *:GNU:*:*)
-- echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
-- *:Linux:*:*)
-- # The BFD linker knows what the default object file format is, so
-- # first see if it will tell us.
-- ld_help_string=`ld --help 2>&1`
-- if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-- echo "${UNAME_MACHINE}-pc-linux" ; exit 0
-- elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-- echo "${UNAME_MACHINE}-pc-linux-aout" ; exit 0
-- elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-- echo "${UNAME_MACHINE}-pc-linux-coff" ; exit 0
-- elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-- echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
-- elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-- echo "${UNAME_MACHINE}-unknown-linux-aout" ; exit 0
-- elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-- echo "powerpc-unknown-linux" ; exit 0
-- elif test "${UNAME_MACHINE}" = "alpha" ; then
-- echo alpha-unknown-linux ; exit 0
-- elif test "${UNAME_MACHINE}" = "sparc" ; then
-- echo sparc-unknown-linux ; exit 0
-- else
-- # Either a pre-BFD a.out linker (linux-oldld) or one that does not give us
-- # useful --help. Gcc wants to distinguish between linux-oldld and linux-aout.
-- test ! -d /usr/lib/ldscripts/. \
-- && echo "${UNAME_MACHINE}-pc-linux-oldld" && exit 0
-- # Determine whether the default compiler is a.out or elf
-- cat >dummy.c <<EOF
-+ i*86:Minix:*:*)
-+ echo ${UNAME_MACHINE}-pc-minix
-+ exit 0 ;;
-+ arm*:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit 0 ;;
-+ ia64:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux
-+ exit 0 ;;
-+ m68*:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit 0 ;;
-+ mips:Linux:*:*)
-+ cat >$dummy.c <<EOF
-+#ifdef __cplusplus
-+#include <stdio.h> /* for printf() prototype */
-+int main (int argc, char *argv[]) {
-+#else
-+int main (argc, argv) int argc; char *argv[]; {
-+#endif
-+#ifdef __MIPSEB__
-+ printf ("%s-unknown-linux-gnu\n", argv[1]);
-+#endif
-+#ifdef __MIPSEL__
-+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
-+#endif
-+ return 0;
-+}
-+EOF
-+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-+ rm -f $dummy.c $dummy
-+ ;;
-+ ppc:Linux:*:*)
-+ # Determine Lib Version
-+ cat >$dummy.c <<EOF
-+#include <features.h>
-+#if defined(__GLIBC__)
-+extern char __libc_version[];
-+extern char __libc_release[];
-+#endif
- main(argc, argv)
--int argc;
--char *argv[];
-+ int argc;
-+ char *argv[];
- {
-+#if defined(__GLIBC__)
-+ printf("%s %s\n", __libc_version, __libc_release);
-+#else
-+ printf("unknown\n");
-+#endif
-+ return 0;
-+}
-+EOF
-+ LIBC=""
-+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
-+ if test "$?" = 0 ; then
-+ ./$dummy | grep 1\.99 > /dev/null
-+ if test "$?" = 0 ; then LIBC="libc1" ; fi
-+ fi
-+ rm -f $dummy.c $dummy
-+ echo powerpc-unknown-linux-gnu${LIBC}
-+ exit 0 ;;
-+ alpha:Linux:*:*)
-+ cat <<EOF >$dummy.s
-+ .data
-+ \$Lformat:
-+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-+ .text
-+ .globl main
-+ .align 4
-+ .ent main
-+ main:
-+ .frame \$30,16,\$26,0
-+ ldgp \$29,0(\$27)
-+ .prologue 1
-+ .long 0x47e03d80 # implver \$0
-+ lda \$2,-1
-+ .long 0x47e20c21 # amask \$2,\$1
-+ lda \$16,\$Lformat
-+ mov \$0,\$17
-+ not \$1,\$18
-+ jsr \$26,printf
-+ ldgp \$29,0(\$26)
-+ mov 0,\$16
-+ jsr \$26,exit
-+ .end main
-+EOF
-+ LIBC=""
-+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-+ if test "$?" = 0 ; then
-+ case `./$dummy` in
-+ 0-0) UNAME_MACHINE="alpha" ;;
-+ 1-0) UNAME_MACHINE="alphaev5" ;;
-+ 1-1) UNAME_MACHINE="alphaev56" ;;
-+ 1-101) UNAME_MACHINE="alphapca56" ;;
-+ 2-303) UNAME_MACHINE="alphaev6" ;;
-+ 2-307) UNAME_MACHINE="alphaev67" ;;
-+ esac
-+ objdump --private-headers $dummy | \
-+ grep ld.so.1 > /dev/null
-+ if test "$?" = 0 ; then
-+ LIBC="libc1"
-+ fi
-+ fi
-+ rm -f $dummy.s $dummy
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+ exit 0 ;;
-+ parisc:Linux:*:* | hppa:Linux:*:*)
-+ # Look for CPU level
-+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
-+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
-+ *) echo hppa-unknown-linux-gnu ;;
-+ esac
-+ exit 0 ;;
-+ parisc64:Linux:*:* | hppa64:Linux:*:*)
-+ echo hppa64-unknown-linux-gnu
-+ exit 0 ;;
-+ s390:Linux:*:* | s390x:Linux:*:*)
-+ echo ${UNAME_MACHINE}-ibm-linux
-+ exit 0 ;;
-+ sh*:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit 0 ;;
-+ sparc:Linux:*:* | sparc64:Linux:*:*)
-+ echo ${UNAME_MACHINE}-unknown-linux-gnu
-+ exit 0 ;;
-+ x86_64:Linux:*:*)
-+ echo x86_64-unknown-linux-gnu
-+ exit 0 ;;
-+ i*86:Linux:*:*)
-+ # The BFD linker knows what the default object file format is, so
-+ # first see if it will tell us. cd to the root directory to prevent
-+ # problems with other programs or directories called `ld' in the path.
-+ ld_supported_emulations=`cd /; ld --help 2>&1 \
-+ | sed -ne '/supported emulations:/!d
-+ s/[ ][ ]*/ /g
-+ s/.*supported emulations: *//
-+ s/ .*//
-+ p'`
-+ case "$ld_supported_emulations" in
-+ i*86linux)
-+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-+ exit 0
-+ ;;
-+ elf_i*86)
-+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-+ ;;
-+ i*86coff)
-+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-+ exit 0
-+ ;;
-+ esac
-+ # Either a pre-BFD a.out linker (linux-gnuoldld)
-+ # or one that does not give us useful --help.
-+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
-+ # If ld does not provide *any* "supported emulations:"
-+ # that means it is gnuoldld.
-+ test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-+ case "${UNAME_MACHINE}" in
-+ i*86)
-+ VENDOR=pc;
-+ ;;
-+ *)
-+ VENDOR=unknown;
-+ ;;
-+ esac
-+ # Determine whether the default compiler is a.out or elf
-+ cat >$dummy.c <<EOF
-+#include <features.h>
-+#ifdef __cplusplus
-+#include <stdio.h> /* for printf() prototype */
-+ int main (int argc, char *argv[]) {
-+#else
-+ int main (argc, argv) int argc; char *argv[]; {
-+#endif
- #ifdef __ELF__
-- printf ("%s-pc-linux\n", argv[1]);
-+# ifdef __GLIBC__
-+# if __GLIBC__ >= 2
-+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
-+# else
-+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-+# endif
-+# else
-+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-+# endif
- #else
-- printf ("%s-pc-linux-aout\n", argv[1]);
-+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
- #endif
- return 0;
- }
- EOF
-- ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-- rm -f dummy.c dummy
-- fi ;;
-+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-+ rm -f $dummy.c $dummy
-+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-+ ;;
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
- # are messed up and put the nodename in both sysname and nodename.
-- i?86:DYNIX/ptx:4*:*)
-+ i*86:DYNIX/ptx:4*:*)
- echo i386-sequent-sysv4
- exit 0 ;;
-- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
-+ i*86:UNIX_SV:4.2MP:2.*)
-+ # Unixware is an offshoot of SVR4, but it has its own version
-+ # number series starting with 2...
-+ # I am not positive that other SVR4 systems won't match this,
-+ # I just have to hope. -- rms.
-+ # Use sysv4.2uw... so that sysv4* matches it.
-+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-+ exit 0 ;;
-+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
-+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
-- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
-+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit 0 ;;
-- i?86:*:3.2:*)
-+ i*86:*:5:7*)
-+ # Fixed at (any) Pentium or better
-+ UNAME_MACHINE=i586
-+ if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
-+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
-+ else
-+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
-+ fi
-+ exit 0 ;;
-+ i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-@@ -465,11 +984,24 @@
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
-+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
-+ && UNAME_MACHINE=i686
-+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
-+ && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit 0 ;;
-+ i*86:*DOS:*:*)
-+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
-+ exit 0 ;;
-+ pc:*:*:*)
-+ # Left here for compatibility:
-+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
-+ # the processor, so we play safe by assuming i386.
-+ echo i386-pc-msdosdjgpp
-+ exit 0 ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit 0 ;;
-@@ -489,7 +1021,7 @@
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
-+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-@@ -500,24 +1032,30 @@
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
-- m68*:LynxOS:2.*:*)
-+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit 0 ;;
-- i?86:LynxOS:2.*:*)
-+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
-- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
-+ rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
-+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
-+ exit 0 ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
-+ RM*:ReliantUNIX-*:*:*)
-+ echo mips-sni-sysv4
-+ exit 0 ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
-@@ -529,6 +1067,10 @@
- echo ns32k-sni-sysv
- fi
- exit 0 ;;
-+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-+ # says <Richard.M.Bartel@ccMail.Census.GOV>
-+ echo i586-unisys-sysv4
-+ exit 0 ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
-@@ -541,23 +1083,101 @@
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
-- R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
-+ news*:NEWS-OS:6*:*)
-+ echo mips-sony-newsos6
-+ exit 0 ;;
-+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit 0 ;;
-- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-- # says <Richard.M.Bartel@ccMail.Census.GOV>
-- echo i586-unisys-sysv4
-- exit 0 ;;
-+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
-+ echo powerpc-be-beos
-+ exit 0 ;;
-+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
-+ echo powerpc-apple-beos
-+ exit 0 ;;
-+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
-+ echo i586-pc-beos
-+ exit 0 ;;
-+ SX-4:SUPER-UX:*:*)
-+ echo sx4-nec-superux${UNAME_RELEASE}
-+ exit 0 ;;
-+ SX-5:SUPER-UX:*:*)
-+ echo sx5-nec-superux${UNAME_RELEASE}
-+ exit 0 ;;
-+ Power*:Rhapsody:*:*)
-+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:Rhapsody:*:*)
-+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:Darwin:*:*)
-+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
-+ if test "${UNAME_MACHINE}" = "x86pc"; then
-+ UNAME_MACHINE=pc
-+ fi
-+ echo `uname -p`-${UNAME_MACHINE}-nto-qnx
-+ exit 0 ;;
-+ *:QNX:*:4*)
-+ echo i386-pc-qnx
-+ exit 0 ;;
-+ NSR-[KW]:NONSTOP_KERNEL:*:*)
-+ echo nsr-tandem-nsk${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:NonStop-UX:*:*)
-+ echo mips-compaq-nonstopux
-+ exit 0 ;;
-+ BS2000:POSIX*:*:*)
-+ echo bs2000-siemens-sysv
-+ exit 0 ;;
-+ DS/*:UNIX_System_V:*:*)
-+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-+ exit 0 ;;
-+ *:Plan9:*:*)
-+ # "uname -m" is not consistent, so use $cputype instead. 386
-+ # is converted to i386 for consistency with other x86
-+ # operating systems.
-+ if test "$cputype" = "386"; then
-+ UNAME_MACHINE=i386
-+ else
-+ UNAME_MACHINE="$cputype"
-+ fi
-+ echo ${UNAME_MACHINE}-unknown-plan9
-+ exit 0 ;;
-+ i*86:OS/2:*:*)
-+ # If we were able to find `uname', then EMX Unix compatibility
-+ # is probably installed.
-+ echo ${UNAME_MACHINE}-pc-os2-emx
-+ exit 0 ;;
-+ *:TOPS-10:*:*)
-+ echo pdp10-unknown-tops10
-+ exit 0 ;;
-+ *:TENEX:*:*)
-+ echo pdp10-unknown-tenex
-+ exit 0 ;;
-+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-+ echo pdp10-dec-tops20
-+ exit 0 ;;
-+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-+ echo pdp10-xkl-tops20
-+ exit 0 ;;
-+ *:TOPS-20:*:*)
-+ echo pdp10-unknown-tops20
-+ exit 0 ;;
-+ *:ITS:*:*)
-+ echo pdp10-unknown-its
-+ exit 0 ;;
- esac
-
- #echo '(No uname command or uname output not recognized.)' 1>&2
- #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
--cat >dummy.c <<EOF
-+cat >$dummy.c <<EOF
- #ifdef _SEQUENT_
- # include <sys/types.h>
- # include <sys/utsname.h>
-@@ -595,7 +1215,10 @@
- #endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-+ if (version < 4)
-+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-+ else
-+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
- #endif
-
-@@ -640,11 +1263,24 @@
- #endif
-
- #if defined (vax)
--#if !defined (ultrix)
-- printf ("vax-dec-bsd\n"); exit (0);
--#else
-- printf ("vax-dec-ultrix\n"); exit (0);
--#endif
-+# if !defined (ultrix)
-+# include <sys/param.h>
-+# if defined (BSD)
-+# if BSD == 43
-+ printf ("vax-dec-bsd4.3\n"); exit (0);
-+# else
-+# if BSD == 199006
-+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
-+# else
-+ printf ("vax-dec-bsd\n"); exit (0);
-+# endif
-+# endif
-+# else
-+ printf ("vax-dec-bsd\n"); exit (0);
-+# endif
-+# else
-+ printf ("vax-dec-ultrix\n"); exit (0);
-+# endif
- #endif
-
- #if defined (alliant) && defined (i860)
-@@ -655,8 +1291,8 @@
- }
- EOF
-
--${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
--rm -f dummy.c dummy
-+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-+rm -f $dummy.c $dummy
-
- # Apollos put the system type in the environment.
-
-@@ -688,6 +1324,48 @@
- esac
- fi
-
--#echo '(Unable to guess system type)' 1>&2
-+cat >&2 <<EOF
-+$0: unable to guess system type
-+
-+This script, last modified $timestamp, has failed to recognize
-+the operating system you are using. It is advised that you
-+download the most up to date version of the config scripts from
-+
-+ ftp://ftp.gnu.org/pub/gnu/config/
-+
-+If the version you run ($0) is already up to date, please
-+send the following data and any information you think might be
-+pertinent to <config-patches@gnu.org> in order to provide the needed
-+information to handle your system.
-+
-+config.guess timestamp = $timestamp
-+
-+uname -m = `(uname -m) 2>/dev/null || echo unknown`
-+uname -r = `(uname -r) 2>/dev/null || echo unknown`
-+uname -s = `(uname -s) 2>/dev/null || echo unknown`
-+uname -v = `(uname -v) 2>/dev/null || echo unknown`
-+
-+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-+
-+hostinfo = `(hostinfo) 2>/dev/null`
-+/bin/universe = `(/bin/universe) 2>/dev/null`
-+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-+/bin/arch = `(/bin/arch) 2>/dev/null`
-+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-+
-+UNAME_MACHINE = ${UNAME_MACHINE}
-+UNAME_RELEASE = ${UNAME_RELEASE}
-+UNAME_SYSTEM = ${UNAME_SYSTEM}
-+UNAME_VERSION = ${UNAME_VERSION}
-+EOF
-
- exit 1
-+
-+# Local variables:
-+# eval: (add-hook 'write-file-hooks 'time-stamp)
-+# time-stamp-start: "timestamp='"
-+# time-stamp-format: "%:y-%02m-%02d"
-+# time-stamp-end: "'"
-+# End:
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/config.h.in fdutils/config.h.in
---- fdutils-5.4/config.h.in Fri Jul 2 23:37:12 1999
-+++ fdutils/config.h.in Mon May 21 00:24:53 2001
-@@ -14,3 +14,6 @@
-
- /* Define if you have the <linux/xia_fs.h> header file. */
- #undef HAVE_LINUX_XIA_FS_H
-+
-+/* Define if you have the <sys/sysmacros.h> header file. */
-+#undef HAVE_SYS_SYSMACROS_H
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/config.sub fdutils/config.sub
---- fdutils-5.4/config.sub Sun Mar 2 18:43:27 1997
-+++ fdutils/config.sub Mon May 21 00:24:43 2001
-@@ -1,6 +1,10 @@
- #! /bin/sh
--# Configuration validation subroutine script, version 1.1.
--# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
-+# Configuration validation subroutine script.
-+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-+# Free Software Foundation, Inc.
-+
-+timestamp='2001-05-11'
-+
- # This file is (in principle) common to ALL GNU software.
- # The presence of a machine in this file suggests that SOME GNU software
- # can handle that machine. It does not imply ALL GNU software can.
-@@ -25,6 +29,8 @@
- # configuration script generated by Autoconf, you may include it under
- # the same distribution terms that you use for the rest of that program.
-
-+# Please send patches to <config-patches@gnu.org>.
-+#
- # Configuration subroutine to validate and canonicalize a configuration type.
- # Supply the specified configuration type as an argument.
- # If it is invalid, we print an error message on stderr and exit with code 1.
-@@ -45,30 +51,73 @@
- # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
- # It is wrong to echo any other type of specification.
-
--if [ x$1 = x ]
--then
-- echo Configuration name missing. 1>&2
-- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-- echo "or $0 ALIAS" 1>&2
-- echo where ALIAS is a recognized configuration type. 1>&2
-- exit 1
--fi
-+me=`echo "$0" | sed -e 's,.*/,,'`
-
--# First pass through any local machine types.
--case $1 in
-- *local*)
-- echo $1
-- exit 0
-- ;;
-- *)
-- ;;
-+usage="\
-+Usage: $0 [OPTION] CPU-MFR-OPSYS
-+ $0 [OPTION] ALIAS
-+
-+Canonicalize a configuration name.
-+
-+Operation modes:
-+ -h, --help print this help, then exit
-+ -t, --time-stamp print date of last modification, then exit
-+ -v, --version print version number, then exit
-+
-+Report bugs and patches to <config-patches@gnu.org>."
-+
-+version="\
-+GNU config.sub ($timestamp)
-+
-+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-+Free Software Foundation, Inc.
-+
-+This is free software; see the source for copying conditions. There is NO
-+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-+
-+help="
-+Try \`$me --help' for more information."
-+
-+# Parse command line
-+while test $# -gt 0 ; do
-+ case $1 in
-+ --time-stamp | --time* | -t )
-+ echo "$timestamp" ; exit 0 ;;
-+ --version | -v )
-+ echo "$version" ; exit 0 ;;
-+ --help | --h* | -h )
-+ echo "$usage"; exit 0 ;;
-+ -- ) # Stop option processing
-+ shift; break ;;
-+ - ) # Use stdin as input.
-+ break ;;
-+ -* )
-+ echo "$me: invalid option $1$help"
-+ exit 1 ;;
-+
-+ *local*)
-+ # First pass through any local machine types.
-+ echo $1
-+ exit 0;;
-+
-+ * )
-+ break ;;
-+ esac
-+done
-+
-+case $# in
-+ 0) echo "$me: missing argument$help" >&2
-+ exit 1;;
-+ 1) ;;
-+ *) echo "$me: too many arguments$help" >&2
-+ exit 1;;
- esac
-
- # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
-- linux-gnu*)
-+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
-@@ -94,15 +143,25 @@
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-- -apple)
-+ -apple | -axis)
- os=
- basic_machine=$1
- ;;
-+ -sim | -cisco | -oki | -wec | -winbond)
-+ os=
-+ basic_machine=$1
-+ ;;
-+ -scout)
-+ ;;
-+ -wrs)
-+ os=-vxworks
-+ basic_machine=$1
-+ ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco5)
-- os=sco3.2v5
-+ os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
-@@ -121,6 +180,9 @@
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-+ -udk*)
-+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-+ ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-@@ -143,25 +205,50 @@
- -psos*)
- os=-psos
- ;;
-+ -mint | -mint[0-9]*)
-+ basic_machine=m68k-atari
-+ os=-mint
-+ ;;
- esac
-
- # Decode aliases for certain CPU-COMPANY combinations.
- case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
-- tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
-- | arme[lb] | pyramid \
-- | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-- | alpha | we32k | ns16k | clipper | i370 | sh \
-- | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
-- | pdp11 | mips64el | mips64orion | mips64orionel \
-- | sparc | sparclet | sparclite | sparc64)
-+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
-+ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
-+ | pyramid | mn10200 | mn10300 | tron | a29k \
-+ | 580 | i960 | h8300 \
-+ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
-+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-+ | hppa64 \
-+ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
-+ | alphaev6[78] \
-+ | we32k | ns16k | clipper | i370 | sh | sh[34] \
-+ | powerpc | powerpcle \
-+ | 1750a | dsp16xx | pdp10 | pdp11 \
-+ | mips16 | mips64 | mipsel | mips64el \
-+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
-+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-+ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
-+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
-+ | v850 | c4x \
-+ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
-+ | pj | pjl | h8500 | z8k)
- basic_machine=$basic_machine-unknown
- ;;
-+ m6811 | m68hc11 | m6812 | m68hc12)
-+ # Motorola 68HC11/12.
-+ basic_machine=$basic_machine-unknown
-+ os=-none
-+ ;;
-+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65 | z8k)
-+ ;;
-+
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
-- i[3456]86)
-+ i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
-@@ -170,23 +257,52 @@
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
-- vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
-- | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
-- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
-- | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-- | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-- | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-- | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
-- | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
-+ # FIXME: clean up the formatting here.
-+ vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
-+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
-+ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
-+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
-+ | xmp-* | ymp-* \
-+ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
-+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
-+ | hppa2.0n-* | hppa64-* \
-+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
-+ | alphaev6[78]-* \
-+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
-+ | clipper-* | orion-* \
-+ | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \
-+ | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
-+ | mips16-* | mips64-* | mipsel-* \
-+ | mips64el-* | mips64orion-* | mips64orionel-* \
-+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
-+ | mipstx39-* | mipstx39el-* | mcore-* \
-+ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
-+ | [cjt]90-* \
-+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-+ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
-+ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
-+ 386bsd)
-+ basic_machine=i386-unknown
-+ os=-bsd
-+ ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
-+ a29khif)
-+ basic_machine=a29k-amd
-+ os=-udi
-+ ;;
-+ adobe68k)
-+ basic_machine=m68010-adobe
-+ os=-scout
-+ ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
-@@ -202,20 +318,24 @@
- os=-sysv
- ;;
- amiga | amiga-*)
-- basic_machine=m68k-cbm
-+ basic_machine=m68k-unknown
- ;;
-- amigados)
-- basic_machine=m68k-cbm
-- os=-amigados
-+ amigaos | amigados)
-+ basic_machine=m68k-unknown
-+ os=-amigaos
- ;;
- amigaunix | amix)
-- basic_machine=m68k-cbm
-+ basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
-+ apollo68bsd)
-+ basic_machine=m68k-apollo
-+ os=-bsd
-+ ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
-@@ -252,13 +372,16 @@
- basic_machine=cray2-cray
- os=-unicos
- ;;
-- [ctj]90-cray)
-- basic_machine=c90-cray
-+ [cjt]90)
-+ basic_machine=${basic_machine}-cray
- os=-unicos
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
-+ cris | cris-* | etrax*)
-+ basic_machine=cris-axis
-+ ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
-@@ -292,6 +415,10 @@
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
-+ es1800 | OSE68k | ose68k | ose | OSE)
-+ basic_machine=m68k-ericsson
-+ os=-ose
-+ ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
-@@ -302,6 +429,10 @@
- basic_machine=tron-gmicro
- os=-sysv
- ;;
-+ go32)
-+ basic_machine=i386-pc
-+ os=-go32
-+ ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
-@@ -310,6 +441,14 @@
- basic_machine=h8300-hitachi
- os=-hms
- ;;
-+ h8300xray)
-+ basic_machine=h8300-hitachi
-+ os=-xray
-+ ;;
-+ h8500hms)
-+ basic_machine=h8500-hitachi
-+ os=-hms
-+ ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
-@@ -325,13 +464,30 @@
- basic_machine=m68k-hp
- os=-hpux
- ;;
-+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
-+ basic_machine=hppa1.0-hp
-+ ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
-- hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
-+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
-+ basic_machine=hppa1.0-hp
-+ ;;
-+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
-+ basic_machine=hppa1.1-hp
-+ ;;
-+ hp9k78[0-9] | hp78[0-9])
-+ # FIXME: really hppa2.0-hp
-+ basic_machine=hppa1.1-hp
-+ ;;
-+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-+ # FIXME: really hppa2.0-hp
-+ basic_machine=hppa1.1-hp
-+ ;;
-+ hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
-@@ -340,27 +496,42 @@
- hppa-next)
- os=-nextstep3
- ;;
-+ hppaosf)
-+ basic_machine=hppa1.1-hp
-+ os=-osf
-+ ;;
-+ hppro)
-+ basic_machine=hppa1.1-hp
-+ os=-proelf
-+ ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
-- os=-mvs
- ;;
- # I'm not sure what "Sysv32" means. Should this be sysv3.2?
-- i[3456]86v32)
-+ i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
-- i[3456]86v4*)
-+ i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
-- i[3456]86v)
-+ i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
-- i[3456]86sol2)
-+ i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
-+ i386mach)
-+ basic_machine=i386-mach
-+ os=-mach
-+ ;;
-+ i386-vsta | vsta)
-+ basic_machine=i386-unknown
-+ os=-vsta
-+ ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
-@@ -386,19 +557,59 @@
- basic_machine=ns32k-utek
- os=-sysv
- ;;
-+ mingw32)
-+ basic_machine=i386-pc
-+ os=-mingw32
-+ ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
-+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-+ basic_machine=m68k-atari
-+ os=-mint
-+ ;;
-+ mipsel*-linux*)
-+ basic_machine=mipsel-unknown
-+ os=-linux-gnu
-+ ;;
-+ mips*-linux*)
-+ basic_machine=mips-unknown
-+ os=-linux-gnu
-+ ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
-+ mmix*)
-+ basic_machine=mmix-knuth
-+ os=-mmixware
-+ ;;
-+ monitor)
-+ basic_machine=m68k-rom68k
-+ os=-coff
-+ ;;
-+ msdos)
-+ basic_machine=i386-pc
-+ os=-msdos
-+ ;;
-+ mvs)
-+ basic_machine=i370-ibm
-+ os=-mvs
-+ ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
-+ netbsd386)
-+ basic_machine=i386-unknown
-+ os=-netbsd
-+ ;;
-+ netwinder)
-+ basic_machine=armv4l-rebel
-+ os=-linux
-+ ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
-@@ -411,6 +622,10 @@
- basic_machine=mips-sony
- os=-newsos
- ;;
-+ necv70)
-+ basic_machine=v70-nec
-+ os=-sysv
-+ ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
-@@ -436,9 +651,32 @@
- basic_machine=i960-intel
- os=-nindy
- ;;
-+ mon960)
-+ basic_machine=i960-intel
-+ os=-mon960
-+ ;;
-+ nonstopux)
-+ basic_machine=mips-compaq
-+ os=-nonstopux
-+ ;;
- np1)
- basic_machine=np1-gould
- ;;
-+ nsr-tandem)
-+ basic_machine=nsr-tandem
-+ ;;
-+ op50n-* | op60c-*)
-+ basic_machine=hppa1.1-oki
-+ os=-proelf
-+ ;;
-+ OSE68000 | ose68000)
-+ basic_machine=m68000-ericsson
-+ os=-ose
-+ ;;
-+ os68k)
-+ basic_machine=m68k-none
-+ os=-os68k
-+ ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
-@@ -456,30 +694,28 @@
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
-- pentium | p5)
-- basic_machine=i586-intel
-+ pentium | p5 | k5 | k6 | nexgen)
-+ basic_machine=i586-pc
-+ ;;
-+ pentiumpro | p6 | 6x86 | athlon)
-+ basic_machine=i686-pc
- ;;
-- pentiumpro | p6)
-- basic_machine=i686-intel
-+ pentiumii | pentium2)
-+ basic_machine=i686-pc
- ;;
-- pentium-* | p5-*)
-+ pentium-* | p5-* | k5-* | k6-* | nexgen-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
-- pentiumpro-* | p6-*)
-+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
-- k5)
-- # We don't have specific support for AMD's K5 yet, so just call it a Pentium
-- basic_machine=i586-amd
-- ;;
-- nexen)
-- # We don't have specific support for Nexgen yet, so just call it a Pentium
-- basic_machine=i586-nexgen
-+ pentiumii-* | pentium2-*)
-+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
-- power) basic_machine=rs6000-ibm
-+ power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
-@@ -494,12 +730,24 @@
- ps2)
- basic_machine=i386-ibm
- ;;
-+ pw32)
-+ basic_machine=i586-unknown
-+ os=-pw32
-+ ;;
-+ rom68k)
-+ basic_machine=m68k-rom68k
-+ os=-coff
-+ ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
-+ sa29200)
-+ basic_machine=a29k-amd
-+ os=-udi
-+ ;;
- sequent)
- basic_machine=i386-sequent
- ;;
-@@ -507,6 +755,10 @@
- basic_machine=sh-hitachi
- os=-hms
- ;;
-+ sparclite-wrs)
-+ basic_machine=sparclite-wrs
-+ os=-vxworks
-+ ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
-@@ -514,6 +766,13 @@
- spur)
- basic_machine=spur-unknown
- ;;
-+ st2000)
-+ basic_machine=m68k-tandem
-+ ;;
-+ stratus)
-+ basic_machine=i860-stratus
-+ os=-sysv4
-+ ;;
- sun2)
- basic_machine=m68000-sun
- ;;
-@@ -554,10 +813,28 @@
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
-+ sv1)
-+ basic_machine=sv1-cray
-+ os=-unicos
-+ ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
-+ t3e)
-+ basic_machine=t3e-cray
-+ os=-unicos
-+ ;;
-+ tic54x | c54x*)
-+ basic_machine=tic54x-unknown
-+ os=-coff
-+ ;;
-+ tx39)
-+ basic_machine=mipstx39-unknown
-+ ;;
-+ tx39el)
-+ basic_machine=mipstx39el-unknown
-+ ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
-@@ -569,6 +846,10 @@
- basic_machine=a29k-nyu
- os=-sym1
- ;;
-+ v810 | necv810)
-+ basic_machine=v810-nec
-+ os=-none
-+ ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
-@@ -577,7 +858,7 @@
- basic_machine=vax-dec
- os=-vms
- ;;
-- vpp*|vx|vx-*)
-+ vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
-@@ -592,6 +873,14 @@
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
-+ w65*)
-+ basic_machine=w65-wdc
-+ os=-none
-+ ;;
-+ w89k-*)
-+ basic_machine=hppa1.1-winbond
-+ os=-proelf
-+ ;;
- xmp)
- basic_machine=xmp-cray
- os=-unicos
-@@ -599,6 +888,10 @@
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
-+ z8k-*-coff)
-+ basic_machine=z8k-unknown
-+ os=-sim
-+ ;;
- none)
- basic_machine=none-none
- os=-none
-@@ -606,8 +899,21 @@
-
- # Here we handle the default manufacturer of certain CPU types. It is in
- # some cases the only manufacturer, in others, it is the most popular.
-+ w89k)
-+ basic_machine=hppa1.1-winbond
-+ ;;
-+ op50n)
-+ basic_machine=hppa1.1-oki
-+ ;;
-+ op60c)
-+ basic_machine=hppa1.1-oki
-+ ;;
- mips)
-- basic_machine=mips-mips
-+ if [ x$os = x-linux-gnu ]; then
-+ basic_machine=mips-unknown
-+ else
-+ basic_machine=mips-mips
-+ fi
- ;;
- romp)
- basic_machine=romp-ibm
-@@ -618,13 +924,20 @@
- vax)
- basic_machine=vax-dec
- ;;
-+ pdp10)
-+ # there are many clones, so DEC is not a safe bet
-+ basic_machine=pdp10-unknown
-+ ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
-- sparc)
-+ sh3 | sh4)
-+ basic_machine=sh-unknown
-+ ;;
-+ sparc | sparcv9 | sparcv9b)
- basic_machine=sparc-sun
- ;;
- cydra)
-@@ -636,6 +949,19 @@
- orion105)
- basic_machine=clipper-highlevel
- ;;
-+ mac | mpw | mac-mpw)
-+ basic_machine=m68k-apple
-+ ;;
-+ pmac | pmac-mpw)
-+ basic_machine=powerpc-apple
-+ ;;
-+ c4x*)
-+ basic_machine=c4x-none
-+ os=-coff
-+ ;;
-+ *-unknown)
-+ # Make sure to match an already-canonicalized machine name.
-+ ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
-@@ -668,9 +994,12 @@
- -solaris)
- os=-solaris2
- ;;
-- -unixware* | svr4*)
-+ -svr4*)
- os=-sysv4
- ;;
-+ -unixware*)
-+ os=-sysv4.2uw
-+ ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
-@@ -681,19 +1010,42 @@
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-- | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
-+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-+ | -aos* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-- | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-- | -linux-gnu* | -uxpv*)
-+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
-+ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
-+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
-+ -qnx*)
-+ case $basic_machine in
-+ x86-* | i*86-*)
-+ ;;
-+ *)
-+ os=-nto$os
-+ ;;
-+ esac
-+ ;;
-+ -nto*)
-+ os=-nto-qnx
-+ ;;
-+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
-+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-+ ;;
-+ -mac*)
-+ os=`echo $os | sed -e 's|mac|macos|'`
-+ ;;
- -linux*)
-- os=`echo $os | sed -e 's|linux|linux|'`
-+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
-@@ -701,6 +1053,12 @@
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
-+ -opened*)
-+ os=-openedition
-+ ;;
-+ -wince*)
-+ os=-wince
-+ ;;
- -osfrose*)
- os=-osfrose
- ;;
-@@ -716,12 +1074,18 @@
- -acis*)
- os=-aos
- ;;
-+ -386bsd)
-+ os=-bsd
-+ ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -ns2 )
- os=-nextstep2
- ;;
-+ -nsk*)
-+ os=-nsk
-+ ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
-@@ -747,9 +1111,18 @@
- # This must come after -sysvr4.
- -sysv*)
- ;;
-+ -ose*)
-+ os=-ose
-+ ;;
-+ -es1800*)
-+ os=-ose
-+ ;;
- -xenix)
- os=-xenix
- ;;
-+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-+ os=-mint
-+ ;;
- -none)
- ;;
- *)
-@@ -775,9 +1148,15 @@
- *-acorn)
- os=-riscix1.2
- ;;
-+ arm*-rebel)
-+ os=-linux
-+ ;;
- arm*-semi)
- os=-aout
- ;;
-+ pdp10-*)
-+ os=-tops20
-+ ;;
- pdp11-*)
- os=-none
- ;;
-@@ -796,15 +1175,36 @@
- # default.
- # os=-sunos4
- ;;
-+ m68*-cisco)
-+ os=-aout
-+ ;;
-+ mips*-cisco)
-+ os=-elf
-+ ;;
-+ mips*-*)
-+ os=-elf
-+ ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
-+ *-be)
-+ os=-beos
-+ ;;
- *-ibm)
- os=-aix
- ;;
-+ *-wec)
-+ os=-proelf
-+ ;;
-+ *-winbond)
-+ os=-proelf
-+ ;;
-+ *-oki)
-+ os=-proelf
-+ ;;
- *-hp)
- os=-hpux
- ;;
-@@ -815,7 +1215,7 @@
- os=-sysv
- ;;
- *-cbm)
-- os=-amigados
-+ os=-amigaos
- ;;
- *-dg)
- os=-dgux
-@@ -865,9 +1265,21 @@
- *-masscomp)
- os=-rtu
- ;;
-- f301-fujitsu)
-+ f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
-+ *-rom68k)
-+ os=-coff
-+ ;;
-+ *-*bug)
-+ os=-coff
-+ ;;
-+ *-apple)
-+ os=-macos
-+ ;;
-+ *-atari*)
-+ os=-mint
-+ ;;
- *)
- os=-none
- ;;
-@@ -889,9 +1301,15 @@
- -aix*)
- vendor=ibm
- ;;
-+ -beos*)
-+ vendor=be
-+ ;;
- -hpux*)
- vendor=hp
- ;;
-+ -mpeix*)
-+ vendor=hp
-+ ;;
- -hiux*)
- vendor=hitachi
- ;;
-@@ -907,7 +1325,7 @@
- -genix*)
- vendor=ns
- ;;
-- -mvs*)
-+ -mvs* | -opened*)
- vendor=ibm
- ;;
- -ptx*)
-@@ -919,9 +1337,26 @@
- -aux*)
- vendor=apple
- ;;
-+ -hms*)
-+ vendor=hitachi
-+ ;;
-+ -mpw* | -macos*)
-+ vendor=apple
-+ ;;
-+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-+ vendor=atari
-+ ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
- esac
-
- echo $basic_machine$os
-+exit 0
-+
-+# Local variables:
-+# eval: (add-hook 'write-file-hooks 'time-stamp)
-+# time-stamp-start: "timestamp='"
-+# time-stamp-format: "%:y-%02m-%02d"
-+# time-stamp-end: "'"
-+# End:
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/configure fdutils/configure
---- fdutils-5.4/configure Fri Jul 2 23:37:09 1999
-+++ fdutils/configure Mon May 21 00:24:49 2001
-@@ -1250,7 +1250,7 @@
- esac
-
-
--for ac_hdr in linux/ext_fs.h linux/xia_fs.h
-+for ac_hdr in linux/ext_fs.h linux/xia_fs.h sys/sysmacros.h
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/configure.in fdutils/configure.in
---- fdutils-5.4/configure.in Thu Jul 1 19:22:51 1999
-+++ fdutils/configure.in Mon May 21 00:24:21 2001
-@@ -18,7 +18,7 @@
- AC_C_CONST
- AC_C_INLINE
-
--AC_CHECK_HEADERS(linux/ext_fs.h linux/xia_fs.h)
-+AC_CHECK_HEADERS(linux/ext_fs.h linux/xia_fs.h sys/sysmacros.h)
-
- dnl Make fdmount accessible by the floppy group only
- undefine([fdmount-floppy-only])dnl
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/README fdutils/doc/README
---- fdutils-5.4/doc/README Thu Jul 1 19:43:45 1999
-+++ fdutils/doc/README Mon Jun 11 22:26:36 2001
-@@ -171,7 +171,7 @@
- disks and also Commodore 1581 disks. Please get Michael Haardt's
- documentation on floppy drives for a detailed description of those
- formats. This can be ftp'ed from
--ftp://cantor.informatik.rwth-aachen.de/pub/linux/floppy.ps
-+http://www.moria.de/~michael/floppy/floppy.ps
-
- Commodore 1581 disks are not yet described in this documentation.
- Use 'setfdprm /dev/fd0 1600 10 2 80 2 0x2A 0x02 0xDF 0x2E' to use
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/acronyms.texi fdutils/doc/acronyms.texi
---- fdutils-5.4/doc/acronyms.texi Sat May 27 18:37:00 2000
-+++ fdutils/doc/acronyms.texi Mon Jun 11 22:23:31 2001
-@@ -100,7 +100,7 @@
- disks, i.e. virtually all disks that are available today. The PC
- hardware can only read MFM and FM disks. The doc at:
- @example
--ftp://cantor.informatik.rwth-aachen.de/pub/linux/floppy.ps
-+http://www.moria.de/~michael/floppy/floppy.ps
- @end example
- contains more detailed information about FM and MFM encoding.
-
-@@ -108,7 +108,7 @@
- FM is a low level encoding of disk data. It was used for SD disks, and
- is now considered to be obsolete. The doc at:
- @example
--ftp://cantor.informatik.rwth-aachen.de/pub/linux/floppy.ps
-+http://www.moria.de/~michael/floppy/floppy.ps
- @end example
- contains more detailed information about FM and MFM encoding.
-
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/diskd.1 fdutils/doc/diskd.1
---- fdutils-5.4/doc/diskd.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/diskd.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH diskd 1 "02jun00" fdutils-5.4
-+.TH diskd 1 "11Jun01" fdutils-5.4
- .SH Name
- diskd - disk daemon; wait for disk to be inserted
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/diskseekd.1 fdutils/doc/diskseekd.1
---- fdutils-5.4/doc/diskseekd.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/diskseekd.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH diskseekd 1 "02jun00" fdutils-5.4
-+.TH diskseekd 1 "11Jun01" fdutils-5.4
- .SH Name
- diskseek, diskseekd - disk seek daemon; simulates Messy Dos' drive cleaning effect
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/fd.4 fdutils/doc/fd.4
---- fdutils-5.4/doc/fd.4 Fri Jul 2 23:44:15 1999
-+++ fdutils/doc/fd.4 Mon Jun 11 22:23:59 2001
-@@ -1,7 +1,7 @@
- '\" t
- .\"{{{}}}
- .\"{{{ Notes
--.\" Copyright (c) 1993 Michael Haardt (michael@cantor.informatik.rwth-aachen.de)
-+.\" Copyright (c) 1993 Michael Haardt (michael@moria.de)
- .\" and 1994,1995, 1997 Alain Knaff (alain@linux.lu)
- .\"
- .\" This is free documentation; you can redistribute it and/or
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/fdmount.1 fdutils/doc/fdmount.1
---- fdutils-5.4/doc/fdmount.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/fdmount.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH fdmount 1 "02jun00" fdutils-5.4
-+.TH fdmount 1 "11Jun01" fdutils-5.4
- .SH Name
- fdmount - Floppy disk mount utility
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/fdrawcmd.1 fdutils/doc/fdrawcmd.1
---- fdutils-5.4/doc/fdrawcmd.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/fdrawcmd.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH fdrawcmd 1 "02jun00" fdutils-5.4
-+.TH fdrawcmd 1 "11Jun01" fdutils-5.4
- .SH Name
- fdrawcmd - send raw commands to the floppy disk controller
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/floppycontrol.1 fdutils/doc/floppycontrol.1
---- fdutils-5.4/doc/floppycontrol.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/floppycontrol.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH floppycontrol 1 "02jun00" fdutils-5.4
-+.TH floppycontrol 1 "11Jun01" fdutils-5.4
- .SH Name
- floppycontrol - floppy driver configuration utility
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/floppymeter.1 fdutils/doc/floppymeter.1
---- fdutils-5.4/doc/floppymeter.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/floppymeter.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH floppymeter 1 "02jun00" fdutils-5.4
-+.TH floppymeter 1 "11Jun01" fdutils-5.4
- .SH Name
- floppymeter - measure raw capacity and exact rotation speed of floppy drive
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/format2.texi fdutils/doc/format2.texi
---- fdutils-5.4/doc/format2.texi Fri Sep 19 21:01:19 1997
-+++ fdutils/doc/format2.texi Mon Jun 11 21:59:18 2001
-@@ -157,7 +157,7 @@
- on floppy drives for a detailed description of those formats. This can
- be ftp'ed from the following location:
- @example
--ftp://cantor.informatik.rwth-aachen.de/pub/linux/floppy.ps
-+http://www.moria.de/~michael/floppy/
- @end example
-
- Commodore 1581 disks are not yet described in this documentation. Use
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/getfdprm.1 fdutils/doc/getfdprm.1
---- fdutils-5.4/doc/getfdprm.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/getfdprm.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH getfdprm 1 "02jun00" fdutils-5.4
-+.TH getfdprm 1 "11Jun01" fdutils-5.4
- .SH Name
- getfdprm - print the current format information
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/makefloppies.1 fdutils/doc/makefloppies.1
---- fdutils-5.4/doc/makefloppies.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/makefloppies.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH makefloppies 1 "02jun00" fdutils-5.4
-+.TH makefloppies 1 "11Jun01" fdutils-5.4
- .SH Name
- MAKEFLOPPIES - Creates the default floppy device nodes.
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/setfdprm.1 fdutils/doc/setfdprm.1
---- fdutils-5.4/doc/setfdprm.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/setfdprm.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH setfdprm 1 "02jun00" fdutils-5.4
-+.TH setfdprm 1 "11Jun01" fdutils-5.4
- .SH Name
- setfdprm - sets user-provided floppy disk parameters
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/superformat.1 fdutils/doc/superformat.1
---- fdutils-5.4/doc/superformat.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/superformat.1 Mon Jun 11 22:22:46 2001
-@@ -1,4 +1,4 @@
--.TH superformat 1 "02jun00" fdutils-5.4
-+.TH superformat 1 "11Jun01" fdutils-5.4
- .SH Name
- superformat - format floppies
- '\" t
-@@ -258,14 +258,19 @@
- spins, and on how much time is needed to change the head or the track.
- .TP
- \&\fR\&\f(CW--absolute_skew\ \fIabsolute-skew\fR\&\f(CW\fR\
--Set the absolute skew. (The skew value used for the first formatted
--track)
-+.IP
-+Set the absolute skew. This skew value is used for the first formatted
-+track. It is expressed in raw bytes.
- .TP
- \&\fR\&\f(CW--head_skew\ \fIhead-skew\fR\&\f(CW\fR\
--Set the head skew. (The skew added for passing from head 0 to head 1)
-+.IP
-+Set the head skew. This is the skew added for passing from head 0 to
-+head 1. It is expressed in raw bytes.
- .TP
- \&\fR\&\f(CW--track_skew\ \fItrack-skew\fR\&\f(CW\fR\
--Set the track skew. (The skew added for seeking to the next track)
-+.IP
-+Set the track skew. This is the skew added for seeking to the next
-+track. It is expressed in raw bytes.
- .PP
- Example: (absolute skew=3, head skew=1, track skew=2)
- .PP
-@@ -287,6 +292,10 @@
- .lp
-
- \&\fR
-+.PP
-+N.B. For simplicitie's sake, this example expresses skews in units of
-+sectors. In reality, superformat expects the skews to be expressed in
-+raw bytes.
- .PP
- .SH Examples
- In all the examples of this section, we assume that drive 0 is a 3 1/2
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/superformat.texi fdutils/doc/superformat.texi
---- fdutils-5.4/doc/superformat.texi Sat May 27 18:36:51 2000
-+++ fdutils/doc/superformat.texi Mon May 21 00:24:21 2001
-@@ -187,14 +187,20 @@
-
- @table @code
- @item --absolute_skew @var{absolute-skew}
--Set the absolute skew. (The skew value used for the first formatted
--track)
-+
-+Set the absolute skew. This skew value is used for the first formatted
-+track. It is expressed in raw bytes.
-
- @item --head_skew @var{head-skew}
--Set the head skew. (The skew added for passing from head 0 to head 1)
-+
-+Set the head skew. This is the skew added for passing from head 0 to
-+head 1. It is expressed in raw bytes.
-
- @item --track_skew @var{track-skew}
--Set the track skew. (The skew added for seeking to the next track)
-+
-+Set the track skew. This is the skew added for seeking to the next
-+track. It is expressed in raw bytes.
-+
- @end table
-
- Example: (absolute skew=3, head skew=1, track skew=2)
-@@ -209,6 +215,10 @@
- track 2 head 0: 4,5,6,1,2,3 (skew=3)
- track 2 head 1: 3,4,5,6,1,2 (skew=4)
- @end example
-+
-+N.B. For simplicitie's sake, this example expresses skews in units of
-+sectors. In reality, superformat expects the skews to be expressed in
-+raw bytes.
-
- @node Examples, Troubleshooting, Sector skewing options, superformat
- @subsection Examples
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/doc/xdfcopy.1 fdutils/doc/xdfcopy.1
---- fdutils-5.4/doc/xdfcopy.1 Fri Jun 2 22:28:27 2000
-+++ fdutils/doc/xdfcopy.1 Mon Jun 11 22:22:47 2001
-@@ -1,4 +1,4 @@
--.TH xdfcopy 1 "02jun00" fdutils-5.4
-+.TH xdfcopy 1 "11Jun01" fdutils-5.4
- .SH Name
- xdfcopy - Program to copy and format Xdf disks in Linux
- '\" t
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/MAKEFLOPPIES fdutils/src/MAKEFLOPPIES
---- fdutils-5.4/src/MAKEFLOPPIES Wed Aug 21 16:51:25 1996
-+++ fdutils/src/MAKEFLOPPIES Sun Feb 3 20:13:39 2002
-@@ -12,6 +12,9 @@
- set -u
- MAJOR=2
- TMPDEVICE=/dev/tmpfloppy$$
-+if [ ! -b /dev/fd0 ] ; then
-+ mknod /dev/fd0 b $MAJOR 0
-+fi
- if floppycontrol 2>/dev/null; then
- FLOPPYCONTROL=yes
- else
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/diskseekd.c fdutils/src/diskseekd.c
---- fdutils-5.4/src/diskseekd.c Sat May 27 18:50:05 2000
-+++ fdutils/src/diskseekd.c Mon May 21 00:24:21 2001
-@@ -1,4 +1,7 @@
- #include <sys/types.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+# include <sys/sysmacros.h>
-+#endif
- #include <sys/time.h>
- #include <unistd.h>
- #include <stdio.h>
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/driveprm.c fdutils/src/driveprm.c
---- fdutils-5.4/src/driveprm.c Sat May 27 18:49:58 2000
-+++ fdutils/src/driveprm.c Mon May 21 00:24:21 2001
-@@ -1,3 +1,7 @@
-+#include <sys/types.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+# include <sys/sysmacros.h>
-+#endif
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/fdmount.c fdutils/src/fdmount.c
---- fdutils-5.4/src/fdmount.c Sat May 27 18:50:14 2000
-+++ fdutils/src/fdmount.c Sun Feb 3 23:50:06 2002
-@@ -826,14 +826,9 @@
-
- mnt=get_mounted(devname);
- if (!mnt) {
-- if (!force) {
-- errmsg("not mounted");
-- save_unlock_mtab();
-- return -1;
-- }
-- else {
-- msg("not in /etc/mtab, trying to unmount anyway!");
-- }
-+ errmsg("not mounted");
-+ save_unlock_mtab();
-+ return -1;
- }
- else {
- mountpoint=mnt->ms.mnt_dir;
-@@ -860,7 +855,7 @@
- }
- #endif
-
-- e=umount(devname);
-+ e=umount(mountpoint);
- if (e) {
- errmsg("failed to unmount: %s\n",strerror(errno));
- goto err;
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/floppycontrol.c fdutils/src/floppycontrol.c
---- fdutils-5.4/src/floppycontrol.c Sun Apr 2 10:18:15 2000
-+++ fdutils/src/floppycontrol.c Sat Oct 27 13:47:28 2001
-@@ -16,6 +16,11 @@
- #include <getopt.h>
- #include "enh_options.h"
-
-+#ifndef FD_DISK_CHANGED
-+#define FD_DISK_CHANGED 0
-+#endif
-+
-+
- int eioctl(int fd, int command,void * param, char *emsg)
- {
- int r;
-@@ -381,14 +386,17 @@
- eioctl( fd, FDPOLLDRVSTAT, &drivstat,"get drive state");
- else
- eioctl( fd, FDGETDRVSTAT , &drivstat,"get drive state");
-- printf("%s %s %s %s %s\n",
-+
-+#ifndef FD_DCL_SEEN
-+# define FD_DCL_SEEN 0x40
-+#endif
-+ printf("%s %s %s %s %s %s\n",
- drivstat.flags & FD_VERIFY ? "verify" : "",
- drivstat.flags & FD_DISK_NEWCHANGE ? "newchange" : "",
- drivstat.flags & FD_NEED_TWADDLE ? "need_twaddle" : "",
--#ifdef FD_DISK_CHANGED
- drivstat.flags & FD_DISK_CHANGED ? "disk_changed" : "",
--#endif
-- drivstat.flags & FD_DISK_WRITABLE ?"disk_writable" : "");
-+ drivstat.flags & FD_DISK_WRITABLE ?"disk_writable" : "",
-+ drivstat.flags & FD_DCL_SEEN ?"dcl_seen" : "");
- printf("spinup= %ld\n", drivstat.spinup_date);
- printf("select= %ld\n", drivstat.select_date);
- printf("first_read= %ld\n", drivstat.first_read_date);
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/floppymeter.c fdutils/src/floppymeter.c
---- fdutils-5.4/src/floppymeter.c Sat May 27 18:49:58 2000
-+++ fdutils/src/floppymeter.c Mon May 21 00:24:21 2001
-@@ -1,3 +1,7 @@
-+#include <sys/types.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+# include <sys/sysmacros.h>
-+#endif
- #include <unistd.h>
- #include <stdio.h>
- #include <string.h>
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/measure.c fdutils/src/measure.c
---- fdutils-5.4/src/measure.c Sat May 27 18:49:57 2000
-+++ fdutils/src/measure.c Sun Feb 3 22:15:54 2002
-@@ -138,6 +138,23 @@
- perror("format");
- exit(1);
- }
-+
-+ if((raw_cmd.reply[1] & ~0x20) |
-+ (raw_cmd.reply[2] & ~0x20)) {
-+ int i;
-+
-+ if ( raw_cmd.reply[1] & ST1_WP ){
-+ fprintf(stderr,"The disk is write protected\n");
-+ exit(1);
-+ }
-+
-+ fprintf(stderr,
-+ "\nFatal error while measuring raw capacity\n");
-+ for(i=0; i < raw_cmd.reply_count; i++) {
-+ fprintf(stderr, "%d: %02x\n", i, raw_cmd.reply[i]);
-+ }
-+ exit(1);
-+ }
- }
-
-
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/mediaprm.c fdutils/src/mediaprm.c
---- fdutils-5.4/src/mediaprm.c Wed Mar 22 22:16:53 2000
-+++ fdutils/src/mediaprm.c Mon May 21 00:24:21 2001
-@@ -20,6 +20,7 @@
- FE_TPI,
- FE_STRETCH,
- FE_SWAPSIDES,
-+ FE_ZEROBASED,
-
- FE_GAP,
-
-@@ -35,7 +36,8 @@
- FE_DENSITY,
- } field_t;
-
--static int SIZE, SECT, VSECT, HEAD, CYL, TPI, STRETCH, SWAPSIDES, GAP, FM;
-+static int SIZE, SECT, VSECT, HEAD, CYL, TPI, STRETCH, SWAPSIDES, ZEROBASED;
-+static int GAP, FM;
- static int PERP, SSIZE, _2M, DTR, SPEC1, FMT_GAP, DENSITY;
- static int ssize;
-
-@@ -48,6 +50,7 @@
- #define F_TPI FE_TPI,&TPI
- #define F_STRETCH FE_STRETCH,&STRETCH
- #define F_SWAPSIDES FE_SWAPSIDES,&SWAPSIDES
-+#define F_ZEROBASED FE_ZEROBASED,&ZEROBASED
-
- #define F_GAP FE_GAP,&GAP
-
-@@ -77,6 +80,7 @@
- { "stretch", F_STRETCH, 0 },
-
- { "swapsides", F_SWAPSIDES, 1},
-+ { "zerobased", F_ZEROBASED, 1},
-
- { "gap", F_GAP, 0},
-
-@@ -234,7 +238,7 @@
- medprm->sect = VSECT / 512;
- medprm->head = HEAD;
- medprm->track = CYL;
-- medprm->stretch = STRETCH | (SWAPSIDES << 1);
-+ medprm->stretch = STRETCH | (SWAPSIDES << 1) | (ZEROBASED << 2);
- medprm->gap = GAP;
- medprm->rate = (FM<<7) | (PERP<<6) | (ssize<<3) | (_2M<<2) | DTR;
- medprm->spec1 = SPEC1;
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/printfdprm.c fdutils/src/printfdprm.c
---- fdutils-5.4/src/printfdprm.c Mon Jun 9 22:58:15 1997
-+++ fdutils/src/printfdprm.c Mon May 21 00:24:21 2001
-@@ -141,6 +141,12 @@
- print("swapsides",0);
- #endif
-
-+#ifdef FD_ZEROBASED
-+ if(ft->stretch & FD_ZEROBASED)
-+ print("zerobased",0);
-+#endif
-+
-+
- if(ft->rate & FD_2M)
- print("2M",0);
-
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/superformat.c fdutils/src/superformat.c
---- fdutils-5.4/src/superformat.c Sat May 27 18:49:57 2000
-+++ fdutils/src/superformat.c Fri Feb 22 11:55:23 2002
-@@ -26,7 +26,10 @@
- cylinders as happen to work (as in 2m). Currently, if too many cylinders
- are attempted it won't fail until the very end
- */
--
-+#include <sys/types.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+# include <sys/sysmacros.h>
-+#endif
- #include <unistd.h>
- #include <stdio.h>
- #include <string.h>
-@@ -68,6 +71,7 @@
- char floppy_buffer[24 * 512];
- int verbosity = 3;
- static char noverify = 0;
-+static char noformat = 0;
- static char dosverify = 0;
- static char verify_later = 0;
- short stretch;
-@@ -323,7 +327,8 @@
- raw_cmd.length = nssect * sizeof(format_map_t);
- raw_cmd.cmd_count = 6;
- raw_cmd.cmd[0] = FD_FORMAT & ~fm_mode;
-- raw_cmd.cmd[1] = head << 2 | ( fd->drive & 3);
-+ raw_cmd.cmd[1] = (head << 2 | ( fd->drive & 3)) ^
-+ (fd->swapSides ? 4 : 0);
- raw_cmd.cmd[2] = fd->sizecode;
- raw_cmd.cmd[3] = nssect;
- raw_cmd.cmd[4] = fd->fmt_gap;
-@@ -355,7 +360,8 @@
- raw_cmd.data = floppy_buffer;
- raw_cmd.cmd_count = 9;
- raw_cmd.cmd[0] = FD_WRITE & ~fm_mode & ~0x80;
-- raw_cmd.cmd[1] = head << 2 | ( fd->drive & 3);
-+ raw_cmd.cmd[1] = (head << 2 | ( fd->drive & 3)) ^
-+ (fd->swapSides ? 4 : 0);
- raw_cmd.cmd[2] = cylinder;
- raw_cmd.cmd[3] = head;
- raw_cmd.cmd[4] = cur_sector;
-@@ -490,6 +496,7 @@
-
- short retries;
- short zeroBased=0;
-+ short swapSides=0;
- int n,rsize;
- char *verify_buffer = NULL;
- char dosdrive;
-@@ -510,6 +517,11 @@
- (void *) &noverify,
- "skip verification" },
-
-+ { '\0', "print-drive-deviation", 0, EO_TYPE_BYTE, 1, 0,
-+ (void *) &noformat,
-+ "print deviation, do not format " },
-+
-+
- { 'B', "dosverify", 0, EO_TYPE_BYTE, 1, 0,
- (void *) &dosverify,
- "verify disk using mbadblocks" },
-@@ -662,11 +674,6 @@
- exit(1);
- }
-
-- fd[0].zeroBased = zeroBased;
-- if(zeroBased)
-- noverify = 1;
--
--
- /* sanity checking */
- if (sizecode < 0 || sizecode >= MAX_SIZECODE) {
- fprintf(stderr,"Bad sizecode %d\n", sizecode);
-@@ -779,7 +786,16 @@
- break;
- }
- stretch = geometry.stretch & 1;
--
-+#ifdef FD_ZEROBASED
-+ if(geometry.stretch & FD_ZEROBASED) {
-+ zeroBased = 1;
-+ }
-+#endif
-+#ifdef FD_SWAPSIDES
-+ if(geometry.stretch & FD_SWAPSIDES) {
-+ swapSides = 1;
-+ }
-+#endif
- mask |= SET_SECTORS | SET_CYLINDERS |
- SET_SIZECODE | SET_2M | SET_RATE;
- } else {
-@@ -831,6 +847,15 @@
- stretch = 0;
- }
- }
-+
-+ fd[0].zeroBased = zeroBased;
-+#ifndef FD_ZEROBASED
-+ if(zeroBased) {
-+ noverify = 1;
-+ }
-+#endif
-+
-+ fd[0].swapSides = swapSides;
-
- if (cylinders > fd[0].drvprm.tracks) {
- fprintf(stderr,"too many cylinder for this drive\n");
-@@ -900,8 +925,9 @@
- fprintf(stderr,
- "In order to avoid this time consuming "
- "measurement in the future,\n"
-- "add the following line to " DRIVEPRMFILE
-- ":\ndrive%d: deviation=%d\n",
-+ "add the following line to " DRIVEPRMFILE ":\n");
-+ fprintf(stdout,
-+ "drive%d: deviation=%d\n",
- fd[0].drive,
- (fd[0].raw_capacity-old_capacity)*1000000/
- old_capacity);
-@@ -914,6 +940,9 @@
- }
- }
-
-+ if(noformat)
-+ return 0;
-+
- /* FIXME. Why is this needed? */
- fd[0].raw_capacity -= 30;
-
-@@ -971,7 +1000,11 @@
- parameters.head = heads;
- parameters.track = cylinders;
- parameters.size = cylinders * heads * sectors;
-- parameters.stretch = stretch;
-+ parameters.stretch = stretch
-+#ifdef FD_ZEROBASED
-+ | (zeroBased ? 4 : 0)
-+#endif
-+ | (swapSides ? 2 : 0);
- parameters.gap = fd[0].gap;
- if ( !use_2m)
- fd0.rate = fd[0].rate;
-@@ -1054,7 +1087,7 @@
- ioctl(fd[0].fd, FDFLUSH );
- close(fd[0].fd);
-
-- if (! (mask & SET_DOSDRIVE ) && fd[0].drive < 2)
-+ if (! (mask & SET_DOSDRIVE ) && fd[0].drive < 2 && !zeroBased)
- dosdrive = fd[0].drive+'a';
-
- if (dosdrive) {
-@@ -1085,8 +1118,9 @@
- dosverify = 0;
- }
- } else {
-- fprintf(stderr,
-- "\nwarning: mformat not called because DOS drive unknown\n");
-+ if(!zeroBased)
-+ fprintf(stderr,
-+ "\nwarning: mformat not called because DOS drive unknown\n");
- /*exit(1);*/
- dosverify = 0;
- }
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/superformat.h fdutils/src/superformat.h
---- fdutils-5.4/src/superformat.h Sun Apr 2 10:09:28 2000
-+++ fdutils/src/superformat.h Mon May 21 00:24:21 2001
-@@ -84,6 +84,7 @@
- int rotations; /* how many time do we have to go over 0 to read
- * the track */
- int zeroBased; /* 1 if sector numbering starts at zero */
-+ int swapSides; /* if logical side 0 is on physical 1 and vice-versa */
- };
-
-
-diff -ur --new-file --exclude-from=/home/aknaff/floppy/exclude fdutils-5.4/src/xdfcopy.c fdutils/src/xdfcopy.c
---- fdutils-5.4/src/xdfcopy.c Sat May 27 18:49:57 2000
-+++ fdutils/src/xdfcopy.c Mon May 21 00:24:21 2001
-@@ -2,6 +2,10 @@
- * Software patents declared unconstitutional, worldwide
- */
-
-+#include <sys/types.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+# include <sys/sysmacros.h>
-+#endif
- #include <unistd.h>
- #include <stdio.h>
- #include <string.h>
diff --git a/source/a/floppy/fdutils-5.5-20081027.diff b/source/a/floppy/fdutils-5.5-20081027.diff
new file mode 100644
index 00000000..d4033be3
--- /dev/null
+++ b/source/a/floppy/fdutils-5.5-20081027.diff
@@ -0,0 +1,905 @@
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/Changelog fdutils/Changelog
+--- fdutils-5.5/Changelog 2005-03-03 22:41:49.000000000 +0100
++++ fdutils/Changelog 2006-02-27 23:01:38.000000000 +0100
+@@ -1,3 +1,5 @@
++v20060227
++ * Fixed "zero-based" flag
+ v20050303
+ * Fixed instant verification in superformat (now based on
+ FDRAWCMD, rather than VFS' read which is plagued by excessive
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/diskd.1 fdutils/doc/diskd.1
+--- fdutils-5.5/doc/diskd.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/diskd.1 2008-10-27 20:53:44.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH diskd 1 "03Mar05" fdutils-5.5
++.TH diskd 1 "27oct08" fdutils-5.5
+ .SH Name
+ diskd - disk daemon; wait for disk to be inserted
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/diskseekd.1 fdutils/doc/diskseekd.1
+--- fdutils-5.5/doc/diskseekd.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/diskseekd.1 2008-10-27 20:53:44.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH diskseekd 1 "03Mar05" fdutils-5.5
++.TH diskseekd 1 "27oct08" fdutils-5.5
+ .SH Name
+ diskseek, diskseekd - disk seek daemon; simulates Messy Dos' drive cleaning effect
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/fdmount.1 fdutils/doc/fdmount.1
+--- fdutils-5.5/doc/fdmount.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/fdmount.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH fdmount 1 "03Mar05" fdutils-5.5
++.TH fdmount 1 "27oct08" fdutils-5.5
+ .SH Name
+ fdmount - Floppy disk mount utility
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/fdrawcmd.1 fdutils/doc/fdrawcmd.1
+--- fdutils-5.5/doc/fdrawcmd.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/fdrawcmd.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH fdrawcmd 1 "03Mar05" fdutils-5.5
++.TH fdrawcmd 1 "27oct08" fdutils-5.5
+ .SH Name
+ fdrawcmd - send raw commands to the floppy disk controller
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/floppycontrol.1 fdutils/doc/floppycontrol.1
+--- fdutils-5.5/doc/floppycontrol.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/floppycontrol.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH floppycontrol 1 "03Mar05" fdutils-5.5
++.TH floppycontrol 1 "27oct08" fdutils-5.5
+ .SH Name
+ floppycontrol - floppy driver configuration utility
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/floppymeter.1 fdutils/doc/floppymeter.1
+--- fdutils-5.5/doc/floppymeter.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/floppymeter.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH floppymeter 1 "03Mar05" fdutils-5.5
++.TH floppymeter 1 "27oct08" fdutils-5.5
+ .SH Name
+ floppymeter - measure raw capacity and exact rotation speed of floppy drive
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/formatlist.texi fdutils/doc/formatlist.texi
+--- fdutils-5.5/doc/formatlist.texi 2002-05-02 23:03:31.000000000 +0200
++++ fdutils/doc/formatlist.texi 2006-02-27 23:08:50.000000000 +0100
+@@ -221,7 +221,7 @@
+ setfdprm /dev/fd0H1520 1520 19 2 80 0 0x1b 0 0xcf 0x6c
+ @end example
+
+-@strong{Note:} This redefines the geometry for any device node with the
++@strong{NB:} This redefines the geometry for any device node with the
+ same format number, not just the new node.
+
+ The new geometry is only valid until the next reboot (or removal of the
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/getfdprm.1 fdutils/doc/getfdprm.1
+--- fdutils-5.5/doc/getfdprm.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/getfdprm.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH getfdprm 1 "03Mar05" fdutils-5.5
++.TH getfdprm 1 "27oct08" fdutils-5.5
+ .SH Name
+ getfdprm - print the current format information
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/makefloppies.1 fdutils/doc/makefloppies.1
+--- fdutils-5.5/doc/makefloppies.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/makefloppies.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH makefloppies 1 "03Mar05" fdutils-5.5
++.TH makefloppies 1 "27oct08" fdutils-5.5
+ .SH Name
+ MAKEFLOPPIES - Creates the default floppy device nodes.
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/setfdprm.1 fdutils/doc/setfdprm.1
+--- fdutils-5.5/doc/setfdprm.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/setfdprm.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH setfdprm 1 "03Mar05" fdutils-5.5
++.TH setfdprm 1 "27oct08" fdutils-5.5
+ .SH Name
+ setfdprm - sets user-provided floppy disk parameters
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/superformat.1 fdutils/doc/superformat.1
+--- fdutils-5.5/doc/superformat.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/superformat.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH superformat 1 "03Mar05" fdutils-5.5
++.TH superformat 1 "27oct08" fdutils-5.5
+ .SH Name
+ superformat - format floppies
+ '\" t
+@@ -79,7 +79,7 @@
+ .in +0.3i
+ \&\fR\&\f(CWsuperformat [\fR\&\f(CW-D \fIdos-drive\fR\&\f(CW] [\fR\&\f(CW-v \fIverbosity-level\fR\&\f(CW] [\fR\&\f(CW-b \fIbegin-track\fR\&\f(CW]
+ [\fR\&\f(CW-e \fIend-track\fR\&\f(CW] [\fR\&\f(CW--superverify] [\fR\&\f(CW--dosverify]
+-[\fR\&\f(CW--noverify] [\fR\&\f(CW--verify_later] [\fR\&\f(CW--zero-based]
++[\fR\&\f(CW--noverify] [\fR\&\f(CW--verify_later] [\fR\&\f(CW--first-sector-number \fIn\fR\&\f(CW] [\fR\&\f(CW--zero-based]
+ [\fR\&\f(CW-G \fIformat-gap\fR\&\f(CW] [\fR\&\f(CW-F \fIfinal-gap\fR\&\f(CW] [\fR\&\f(CW-i \fIinterleave\fR\&\f(CW] [\fR\&\f(CW-c \fIchunksize\fR\&\f(CW]
+ [\fR\&\f(CW-g \fIgap\fR\&\f(CW] [\fR\&\f(CW--absolute-skew \fIabsolute-skew\fR\&\f(CW] [\fR\&\f(CW--head-skew \fIhead-skew\fR\&\f(CW]
+ [\fR\&\f(CW--track-skew \fItrack-skew\fR\&\f(CW] [\fR\&\f(CW--biggest-last] \fIdrive\fR\&\f(CW [\fImedia-description\fR\&\f(CW]
+@@ -237,13 +237,12 @@
+ For MSS formats, make sure that the biggest sector is last on the track.
+ This makes the format more reliable on drives which are out of spec.
+ .TP
++\&\fR\&\f(CW--first-sector-number\ \fIn\fR\&\f(CW\fR\
++Formats the disk with sector numbers starting at \fIn\fR, rather than
++1. Certain CP/M boxes or Music synthesizers use this format.
++.TP
+ \&\fR\&\f(CW--zero-based\fR\
+-Formats the disk with sector numbers starting at 0, rather than
+-1. Certain CP/M boxes or Music synthesizers use this format. Those disks
+-can currently not be read/written to by the standard Linux read/write
+-API; you have to use fdrawcmd to access them. As disk verifying is done
+-by this API, verifying is automatically switched off when formatting
+-zero-based.
++Shorthand for \fR\&\f(CW--first-sector-number 0\fR
+ .PP
+ .SH Sector\ skewing\ options
+ .PP
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/superformat.texi fdutils/doc/superformat.texi
+--- fdutils-5.5/doc/superformat.texi 2002-11-02 14:35:11.000000000 +0100
++++ fdutils/doc/superformat.texi 2008-10-27 20:53:41.000000000 +0100
+@@ -6,7 +6,7 @@
+ @example
+ @code{superformat} [@code{-D} @var{dos-drive}] [@code{-v} @var{verbosity-level}] [@code{-b} @var{begin-track}]
+ [@code{-e} @var{end-track}] [@code{--superverify}] [@code{--dosverify}]
+-[@code{--noverify}] [@code{--verify_later}] [@code{--zero-based}]
++[@code{--noverify}] [@code{--verify_later}] [@code{--first-sector-number} @var{n}] [@code{--zero-based}]
+ [@code{-G} @var{format-gap}] [@code{-F} @var{final-gap}] [@code{-i} @var{interleave}] [@code{-c} @var{chunksize}]
+ [@code{-g} @var{gap}] [@code{--absolute-skew} @var{absolute-skew}] [@code{--head-skew} @var{head-skew}]
+ [@code{--track-skew} @var{track-skew}] [@code{--biggest-last}] @var{drive} [@var{media-description}]
+@@ -162,13 +162,12 @@
+ For MSS formats, make sure that the biggest sector is last on the track.
+ This makes the format more reliable on drives which are out of spec.
+
++@item --first-sector-number @var{n}
++Formats the disk with sector numbers starting at @var{n}, rather than
++1. Certain CP/M boxes or Music synthesizers use this format.
++
+ @item --zero-based
+-Formats the disk with sector numbers starting at 0, rather than
+-1. Certain CP/M boxes or Music synthesizers use this format. Those disks
+-can currently not be read/written to by the standard Linux read/write
+-API; you have to use fdrawcmd to access them. As disk verifying is done
+-by this API, verifying is automatically switched off when formatting
+-zero-based.
++Shorthand for @code{--first-sector-number 0}
+
+ @end table
+
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/doc/xdfcopy.1 fdutils/doc/xdfcopy.1
+--- fdutils-5.5/doc/xdfcopy.1 2005-03-03 22:55:18.000000000 +0100
++++ fdutils/doc/xdfcopy.1 2008-10-27 20:53:45.000000000 +0100
+@@ -1,4 +1,4 @@
+-.TH xdfcopy 1 "03Mar05" fdutils-5.5
++.TH xdfcopy 1 "27oct08" fdutils-5.5
+ .SH Name
+ xdfcopy - Program to copy and format Xdf disks in Linux
+ '\" t
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/calc-format.c fdutils/src/calc-format.c
+--- fdutils-5.5/src/calc-format.c 2004-02-28 23:00:28.000000000 +0100
++++ fdutils/src/calc-format.c 2008-10-27 20:19:20.000000000 +0100
+@@ -10,8 +10,8 @@
+ #define SSIZE(j) ( (128<<j) + GAPSIZE(j) + header_size)
+
+
+-static inline int chunks_in_sect(struct params *fd, int i,
+- int gap, int chunksize)
++static inline unsigned int chunks_in_sect(struct params *fd, int i,
++ int gap, int chunksize)
+ {
+ return (SSIZE(i)-1) / chunksize + 1;
+ }
+@@ -28,22 +28,22 @@
+ }
+
+
+-static inline int firstSector(struct params *fd, int i)
++static inline unsigned int firstSector(struct params *fd, int i)
+ {
+ if(i>=MAX_SIZECODE-1)
+- return 1;
++ return 0;
+ else
+ return fd->last_sect[i+1];
+ }
+
+-static inline int lastSector(struct params *fd, int i)
++static inline unsigned int lastSector(struct params *fd, int i)
+ {
+ return fd->last_sect[i];
+ }
+
+-static inline int nrSectorsForSize(struct params *fd, int i)
++static inline unsigned int nrSectorsForSize(struct params *fd, int i)
+ {
+- return lastSector(fd, i) - firstSector(fd, i);
++ return lastSector(fd, i) - firstSector(fd, i);
+ }
+
+
+@@ -93,7 +93,7 @@
+ int i;
+ int nr_sectors;
+
+- cur_sector = 1;
++ cur_sector = 0;
+ sizes=0;
+ for (i=MAX_SIZECODE-1; i>=0; --i) {
+ if(i > max_sizecode)
+@@ -107,7 +107,7 @@
+ if(nr_sectors)
+ sizes++;
+ }
+- fd->dsect = cur_sector-1; /* number of data sectors */
++ fd->dsect = cur_sector; /* number of data sectors */
+ if(sizes > 1)
+ fd->need_init = 1;
+
+@@ -264,51 +264,54 @@
+ */
+ static void calc_sequence(struct params *fd, int tailsect)
+ {
+- int sec_id, cur_sector, i;
++ int sec_id, cur_slot, i;
++ int *occupied = SafeNewArray(fd->dsect, int);
++ int last_slot = fd->dsect - 1;
+
+- fd->sequence = SafeNewArray(fd->dsect,struct fparm2);
+- cur_sector = fd->dsect-1;
++ fd->sequence = SafeNewArray(fd->dsect, struct fparm2);
++ cur_slot = last_slot;
+
+- /* construct the sequence while working backwards. cur_sector
++ /* construct the sequence while working backwards. cur_slot
+ * points to the place where the next sector will be placed.
+ * We place it, then move circularily backwards placing more
+ * and more sectors */
+ sec_id = tailsect;
+ fd->rotations = 0;
+ for(i=0; i < fd->dsect;
+- i++, cur_sector -= fd->actual_interleave, sec_id--) {
+- if (sec_id == 0)
+- sec_id = fd->dsect;
+-
+- if ( cur_sector < 0) {
+- cur_sector += fd->dsect;
+- if(sec_id != fd->dsect)
++ i++, cur_slot -= fd->actual_interleave, sec_id--) {
++ if (sec_id < 0)
++ sec_id = last_slot;
++
++ if ( cur_slot < 0) {
++ cur_slot += fd->dsect;
++ if(sec_id != last_slot)
+ fd->rotations++;
+ }
+
+ /* slot occupied, look elsewhere */
+- while(fd->sequence[cur_sector].sect ){
+- cur_sector--;
+- if ( cur_sector < 0 ) {
+- cur_sector += fd->dsect;
+- if(sec_id != fd->dsect)
++ while(occupied[cur_slot]) {
++ cur_slot--;
++ if ( cur_slot < 0 ) {
++ cur_slot += fd->dsect;
++ if(sec_id != last_slot)
+ fd->rotations++;
+ }
+ }
+
+ /* place the sector */
+- fd->sequence[cur_sector].sect = sec_id;
+- fd->sequence[cur_sector].size = sizeOfSector(fd, sec_id);
++ fd->sequence[cur_slot].sect = sec_id;
++ fd->sequence[cur_slot].size = sizeOfSector(fd, sec_id);
++ occupied[cur_slot] = 1;
+ }
+
+ /* handle wrap-around between tailsect and tailsect+1 */
+- if(tailsect != fd->dsect) {
+- /* always add one rotation, because tailsect+1 cannot be
++ if(tailsect != last_slot) {
++ /* always add one rotation, because tailsect cannot be
+ * at the last position, thus is necessarily earlyer */
+ fd->rotations++;
+
+ if(fd->actual_interleave == 2 &&
+- cur_sector + fd->actual_interleave == 1)
++ cur_slot + fd->actual_interleave == 1)
+ /* if we use interleave, and the last sector was
+ * placed at the first last position, add one
+ * extra rotation for tailsect+1 following tailsect
+@@ -333,11 +336,11 @@
+ max_offset = cur_sector;
+
+ /* offset of the starting sector */
+- if ( fd->sequence[i].sect == 1 )
++ if ( fd->sequence[i].sect == 0 )
+ fd->min = cur_sector * fd->chunksize;
+
+ /* offset of the end of the of the highest sector */
+- if (fd->sequence[i].sect == fd->dsect)
++ if (fd->sequence[i].sect == fd->dsect - 1)
+ track_end = cur_sector * fd->chunksize +
+ header_size + index_size +
+ SSIZE(fd->sequence[i].size);
+@@ -509,7 +512,7 @@
+ fd->min = 0;
+
+ for(i=0; i<sectors; i++){
+- fd->sequence[i].sect = i+1;
++ fd->sequence[i].sect = i;
+ fd->sequence[i].size = 2;
+ fd->sequence[i].offset = i;
+ }
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/fdmount.c fdutils/src/fdmount.c
+--- fdutils-5.5/src/fdmount.c 2005-03-03 23:09:16.000000000 +0100
++++ fdutils/src/fdmount.c 2008-10-27 20:45:50.000000000 +0100
+@@ -629,7 +629,7 @@
+ struct mntent ms;
+ struct floppy_drive_struct drivstat;
+ char options[80+MAX_OPT];
+- char super[2048];
++ unsigned char super[2048];
+ char *mountpoint;
+
+ strncpy(curdev,devname, sizeof(curdev));
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/fdutils.h fdutils/src/fdutils.h
+--- fdutils-5.5/src/fdutils.h 2002-05-02 23:03:31.000000000 +0200
++++ fdutils/src/fdutils.h 2008-10-25 22:17:36.000000000 +0200
+@@ -1,4 +1,8 @@
++#ifndef __FDUTILS_H
++#define __FDUTILS_H
++
+ #include <assert.h>
++#include <linux/fd.h>
+ /* This file contains common structures understood by several of the
+ * fdutils
+ */
+@@ -22,3 +26,17 @@
+ #define SafeNew(type) ((type *)(safe_malloc(sizeof(type))))
+ void *safe_malloc(size_t size);
+ void *safe_calloc(size_t nmemb, size_t size);
++
++#ifndef FD_SWAPSIDES
++#define FD_SWAPSIDES 2
++#endif
++
++#ifndef FD_ZEROBASED
++#define FD_ZEROBASED 4
++#endif
++
++#ifndef FD_SECTBASEMASK
++#define FD_SECTBASEMASK 0x3fc
++#endif
++
++#endif
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/floppycontrol.c fdutils/src/floppycontrol.c
+--- fdutils-5.5/src/floppycontrol.c 2002-11-02 14:36:43.000000000 +0100
++++ fdutils/src/floppycontrol.c 2008-10-26 09:27:38.000000000 +0100
+@@ -379,7 +379,7 @@
+ }
+
+ if (mask & SET_RESET)
+- eioctl(fd, FDRESET, (void *)reset_now, "reset");
++ eioctl(fd, FDRESET, (void *)(long)reset_now, "reset");
+
+ if (mask & (PRINTSTATE | POLLSTATE) ){
+ if ( mask & POLLSTATE )
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/mediaprm.c fdutils/src/mediaprm.c
+--- fdutils-5.5/src/mediaprm.c 2005-03-03 21:51:06.000000000 +0100
++++ fdutils/src/mediaprm.c 2008-10-27 20:34:09.000000000 +0100
+@@ -21,6 +21,7 @@
+ FE_STRETCH,
+ FE_SWAPSIDES,
+ FE_ZEROBASED,
++ FE_FIRSTSECTORNUMBER,
+
+ FE_GAP,
+
+@@ -36,7 +37,7 @@
+ FE_DENSITY,
+ } field_t;
+
+-static int SIZE, SECT, VSECT, HEAD, CYL, TPI, STRETCH, SWAPSIDES, ZEROBASED;
++static int SIZE, SECT, VSECT, HEAD, CYL, TPI, STRETCH, SWAPSIDES, ZEROBASED, FIRSTSECTORNUMBER=1;
+ static int GAP, FM;
+ static int PERP, SSIZE, _2M, DTR, SPEC1, FMT_GAP, DENSITY;
+ static int ssize;
+@@ -51,6 +52,7 @@
+ #define F_STRETCH FE_STRETCH,&STRETCH
+ #define F_SWAPSIDES FE_SWAPSIDES,&SWAPSIDES
+ #define F_ZEROBASED FE_ZEROBASED,&ZEROBASED
++#define F_FIRSTSECTORNUMBER FE_FIRSTSECTORNUMBER,&FIRSTSECTORNUMBER
+
+ #define F_GAP FE_GAP,&GAP
+
+@@ -81,6 +83,8 @@
+
+ { "swapsides", F_SWAPSIDES, 1},
+ { "zerobased", F_ZEROBASED, 1},
++ { "zero-based", F_ZEROBASED, 1},
++ { "first-sector-number", F_FIRSTSECTORNUMBER, 0},
+
+ { "gap", F_GAP, 0},
+
+@@ -234,11 +238,25 @@
+ }
+ set_field(F_2M,0);
+
++ if(mask & (1 << FE_ZEROBASED)) {
++ if((mask & (1 << FE_FIRSTSECTORNUMBER)) &&
++ FIRSTSECTORNUMBER != 0) {
++ fprintf(stderr,
++ "Zerobased incompatible with first-sector-number=%d\n",
++ FIRSTSECTORNUMBER);
++ exit(1);
++ } else
++ FIRSTSECTORNUMBER = 0;
++ } else if(! (mask & (1 << FE_FIRSTSECTORNUMBER))) {
++ FIRSTSECTORNUMBER = 1;
++ }
++
+ medprm->size = SIZE;
+ medprm->sect = VSECT / 512;
+ medprm->head = HEAD;
+ medprm->track = CYL;
+- medprm->stretch = STRETCH | (SWAPSIDES << 1) | (ZEROBASED << 2);
++ medprm->stretch = STRETCH | (SWAPSIDES << 1) |
++ ((1^FIRSTSECTORNUMBER) << 2);
+ medprm->gap = GAP;
+ medprm->rate = (FM<<7) | (PERP<<6) | (ssize<<3) | (_2M<<2) | DTR;
+ medprm->spec1 = SPEC1;
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/mediaprm.lex fdutils/src/mediaprm.lex
+--- fdutils-5.5/src/mediaprm.lex 2002-05-02 23:03:31.000000000 +0200
++++ fdutils/src/mediaprm.lex 2006-02-27 22:56:21.000000000 +0100
+@@ -12,7 +12,7 @@
+ %option pointer
+
+ fid [^\"]+
+-vid [A-Za-z_][A-Za-z0-9_]*
++vid [A-Za-z_][A-Za-z0-9_-]*
+ number (0x[a-zA-Z0-9]+|-?[0-9]+)(KB|k|b)?
+
+ %%
+@@ -37,6 +37,8 @@
+ }
+
+ swapsides |
++zerobased |
++zero-based |
+ mss |
+ 2m |
+ 2M |
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/msdos_fs.h fdutils/src/msdos_fs.h
+--- fdutils-5.5/src/msdos_fs.h 2002-05-02 23:03:31.000000000 +0200
++++ fdutils/src/msdos_fs.h 2008-10-26 09:27:07.000000000 +0100
+@@ -6,41 +6,41 @@
+ #define p packed
+
+ struct msdos_boot_sector {
+- char jump[3] p; /* 0 - Boot strap short or near jump */
+- char banner[8] p; /* 3 - Name - can be used to special case
++ char jump[3]; /* 0 - Boot strap short or near jump */
++ char banner[8]; /* 3 - Name - can be used to special case
+ partition manager volumes */
+ unsigned short sector_size p; /* 11 - bytes per logical sector */
+- unsigned char cluster_size p; /* 13 - sectors/cluster */
++ unsigned char cluster_size; /* 13 - sectors/cluster */
+ unsigned short res_sect p; /* 14 - reserved sectors */
+- unsigned char fats p; /* 16 - number of FATs */
++ unsigned char fats; /* 16 - number of FATs */
+ unsigned short dir_entries p; /* 17 - root directory entries */
+ unsigned short sectors p; /* 19 - number of sectors */
+- unsigned char media p; /* 21 - media code (unused) */
++ unsigned char media; /* 21 - media code (unused) */
+ unsigned short fat_length p; /* 22 - sectors/FAT */
+ unsigned short secs_track p; /* 24 - sectors per track */
+ unsigned short heads p; /* 26 - number of heads */
+ unsigned long hidden p; /* 28 - hidden sectors (unused) */
+ unsigned long total_sect p; /* 32 - number of sectors (if sectors == 0) */
+- unsigned char physdrive p; /* 36 physical drive ? */
+- unsigned char _reserved p; /* 37 reserved */
+- unsigned char dos4 p; /* 38 DOS > 4.0 diskette */
++ unsigned char physdrive; /* 36 physical drive ? */
++ unsigned char _reserved; /* 37 reserved */
++ unsigned char dos4; /* 38 DOS > 4.0 diskette */
+ unsigned long serial p; /* 39 serial number */
+- unsigned char label[11] p; /* 43 disk label */
+- unsigned char fat_type[8] p; /* 54 FAT type */
++ unsigned char label[11]; /* 43 disk label */
++ char fat_type[8]; /* 54 FAT type */
+ #ifdef USE_2M
+- unsigned char res_2m p; /* 62 reserved by 2M */
+- unsigned char CheckSum p; /* 63 2M checksum (not used) */
+- unsigned char fmt_2mf p; /* 64 2MF format version */
+- unsigned char wt p; /* 65 1 if write track after format */
+- unsigned char rate_0 p; /* 66 data transfer rate on track 0 */
+- unsigned char rate_any p; /* 67 data transfer rate on track<>0 */
++ unsigned char res_2m; /* 62 reserved by 2M */
++ unsigned char CheckSum; /* 63 2M checksum (not used) */
++ unsigned char fmt_2mf; /* 64 2MF format version */
++ unsigned char wt; /* 65 1 if write track after format */
++ unsigned char rate_0; /* 66 data transfer rate on track 0 */
++ unsigned char rate_any; /* 67 data transfer rate on track<>0 */
+ unsigned short BootP p; /* 68 offset to boot program */
+ unsigned short Infp0 p; /* 70 T1: information for track 0 */
+ unsigned short InfpX p; /* 72 T2: information for track<>0 */
+ unsigned short InfTm p; /* 74 T3: track sectors size table */
+- unsigned char junk[126 - 76] p; /* 76 remaining data */
++ unsigned char junk[126 - 76]; /* 76 remaining data */
+ #else
+- unsigned char junk[126 - 62] p; /* 76 remaining data */
++ unsigned char junk[126 - 62]; /* 76 remaining data */
+ #endif
+ unsigned short bootid p; /* 510 should be 0xAA55 */
+ };
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/printfdprm.c fdutils/src/printfdprm.c
+--- fdutils-5.5/src/printfdprm.c 2004-03-13 11:02:45.000000000 +0100
++++ fdutils/src/printfdprm.c 2008-10-27 00:59:01.000000000 +0100
+@@ -1,5 +1,6 @@
+ #include <stdio.h>
+ #include "printfdprm.h"
++#include "fdutils.h"
+
+
+ void print_params(drivedesc_t *drivedesc,
+@@ -101,9 +102,9 @@
+ print("tpi=48",0);
+ break;
+ default:
+- if(level >= LEV_ALL || ft->stretch)
+- print("stretch=%d", ft->stretch);
+- break;
++ if(level >= LEV_ALL || (ft->stretch & 1))
++ print("stretch=%d", ft->stretch & 1);
++ break;
+ }
+
+ if(level >= LEV_ALL || ft->size != ft->sect * ft->head * ft->track)
+@@ -136,20 +137,20 @@
+ if(level >= LEV_EXPL || (ft->track != 80 && ft->track != 40))
+ print("cyl=%d", ft->track);
+
+-#ifdef FD_SWAPSIDES
+ if(ft->stretch & FD_SWAPSIDES)
+ print("swapsides",0);
+-#endif
+-
+-#ifdef FD_ZEROBASED
+- if(ft->stretch & FD_ZEROBASED)
+- print("zerobased",0);
+-#endif
+
++ if(ft->stretch & FD_SECTBASEMASK) {
++ int firstSectorNumber = ((ft->stretch & FD_SECTBASEMASK)>>2)^1;
++ if(firstSectorNumber > 1)
++ print("first-sector-number=%d",firstSectorNumber);
++ else if(firstSectorNumber==0)
++ print("zero-based",0);
++ }
+
+ if(ft->rate & FD_2M)
+ print("2M",0);
+-
++
+ if(level < LEV_ALL &&
+ ft->sect * 4 < (2 << ssize) && ft->sect * 4 % (1 << ssize))
+ print("mss", 0);
+@@ -163,7 +164,7 @@
+ }
+
+ /* useless stuff */
+- if(level >= LEV_MOST) {
++ if(level >= LEV_MOST) {
+ print("gap=0x%02x", (unsigned char) ft->gap);
+ print("fmt_gap=0x%02x", (unsigned char) ft->fmt_gap);
+ }
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/superformat.c fdutils/src/superformat.c
+--- fdutils-5.5/src/superformat.c 2005-03-03 22:41:05.000000000 +0100
++++ fdutils/src/superformat.c 2008-10-27 20:40:47.000000000 +0100
+@@ -296,7 +296,7 @@
+ fd += findex[cylinder][head];
+ skew = fd->min + lskews[cylinder][head] * fd->chunksize;
+ assert(skew >= fd->min);
+- assert(skew <= fd->max);
++ assert(skew <= fd->max);
+ } else
+ skew = 0;
+
+@@ -305,7 +305,8 @@
+ for (i=0; i<fd->dsect; ++i){
+ offset = fd->sequence[i].offset + lskews[cylinder][head];
+ offset = offset % fd->nssect;
+- data[offset].sector = fd->sequence[i].sect - fd->zeroBased;
++ data[offset].sector =
++ fd->sequence[i].sect + fd->firstSectorNumber;
+ data[offset].size = fd->sequence[i].size;
+ data[offset].cylinder = cylinder;
+ data[offset].head = head;
+@@ -339,7 +340,7 @@
+ raw_cmd.cmd[3] = nssect;
+ raw_cmd.cmd[4] = fd->fmt_gap;
+ raw_cmd.cmd[5] = 0;
+- raw_cmd.flags = FD_RAW_WRITE | FD_RAW_INTR | FD_RAW_SPIN |
++ raw_cmd.flags = FD_RAW_WRITE | FD_RAW_INTR | FD_RAW_SPIN |
+ FD_RAW_NEED_SEEK | FD_RAW_NEED_DISK;
+ raw_cmd.track = cylinder << stretch;
+ raw_cmd.rate = fd->rate & 0x43;
+@@ -363,14 +364,16 @@
+ static int rw_track(struct params *fd, int cylinder, int head, int mode)
+ {
+ int i;
+- int cur_sector;
++ int cur_sector; /* current sector, logical (based on 0) */
+ int retries;
+ struct floppy_raw_cmd raw_cmd;
+
+- cur_sector = 1 - fd->zeroBased;
++ cur_sector = 0;
+
+ for (i=MAX_SIZECODE-1; i>=0; --i) {
+- if ( fd->last_sect[i] <= cur_sector + fd->zeroBased)
++ if ( cur_sector >= fd->last_sect[i] )
++ /* last sector for size reached, move on to next
++ * sizecode */
+ continue;
+ retries=0;
+ retry:
+@@ -383,32 +386,31 @@
+ (fd->swapSides ? 4 : 0);
+ raw_cmd.cmd[2] = cylinder;
+ raw_cmd.cmd[3] = head;
+- raw_cmd.cmd[4] = cur_sector;
++ raw_cmd.cmd[4] = cur_sector + fd->firstSectorNumber;
+ raw_cmd.cmd[5] = i;
+- raw_cmd.cmd[6] = fd->last_sect[i] - 1 - fd->zeroBased;
++ raw_cmd.cmd[6] = fd->last_sect[i] + fd->firstSectorNumber - 1;
+ raw_cmd.cmd[7] = fd->gap;
+ if ( i )
+ raw_cmd.cmd[8] = 0xff;
+ else
+ raw_cmd.cmd[8] = 0xff;
+- raw_cmd.flags = (mode ? FD_RAW_WRITE : FD_RAW_READ) |
++ raw_cmd.flags = (mode ? FD_RAW_WRITE : FD_RAW_READ) |
+ FD_RAW_INTR | FD_RAW_SPIN |
+ FD_RAW_NEED_SEEK | FD_RAW_NEED_DISK;
+ raw_cmd.track = cylinder << stretch;
+ raw_cmd.rate = fd->rate & 0x43;
+
+- raw_cmd.length = (fd->last_sect[i] -
+- fd->zeroBased -
+- cur_sector) * 128 << i;
++ raw_cmd.length = (fd->last_sect[i] - cur_sector) * 128 << i;
+ /* debugging */
+ if (verbosity == 9)
+ printf("%s %ld sectors of size %d starting at %d\n",
+ mode ? "writing" : "reading",
+ raw_cmd.length / 512, i, cur_sector);
+- if(send_cmd(fd->fd, & raw_cmd,
++ if(send_cmd(fd->fd, & raw_cmd,
+ mode ? "format" : "verify")){
+ if ( !retries && mode && (raw_cmd.reply[1] & ST1_ND) ){
+- cur_sector = raw_cmd.reply[5];
++ cur_sector =
++ raw_cmd.reply[5] - fd->firstSectorNumber;
+ retries++;
+ goto retry;
+ }
+@@ -516,6 +518,7 @@
+
+ short retries;
+ short zeroBased=0;
++ short firstSectorNumber=1;
+ short swapSides=0;
+ int n,rsize;
+ char *verify_buffer = NULL;
+@@ -673,6 +676,10 @@
+ (void *) &zeroBased,
+ "Start numbering sectors from 0 instead of 1 (not readable by normal I/O)" },
+
++ { '\0', "first-sector-number", 1, EO_TYPE_SHORT, 1, 0,
++ (void *) &firstSectorNumber,
++ "Number of first sector (by default, 1)" },
++
+ { '\0', 0 }
+ };
+
+@@ -693,6 +700,15 @@
+ exit(1);
+ }
+
++ if(zeroBased) {
++ if(firstSectorNumber == 1)
++ firstSectorNumber = 0;
++ else if(firstSectorNumber > 1) {
++ fprintf(stderr, "Contradiction between zeroBased and firstSectorNumber");
++ exit(1);
++ }
++ }
++
+ /* sanity checking */
+ if (sizecode < 0 || sizecode >= MAX_SIZECODE) {
+ fprintf(stderr,"Bad sizecode %d\n", sizecode);
+@@ -730,7 +746,7 @@
+ while(1) {
+ fd[0].fd = open(fd[0].name, O_RDWR | O_NDELAY | O_EXCL);
+
+- /* we open the disk wronly/rdwr in order to check write
++ /* we open the disk wronly/rdwr in order to check write
+ * protect */
+ if (fd[0].fd < 0) {
+ perror("open");
+@@ -778,7 +794,7 @@
+
+
+ if(have_geom) {
+- if(mask & (SET_SECTORS | SET_CYLINDERS |
++ if(mask & (SET_SECTORS | SET_CYLINDERS |
+ SET_HEADS | SET_SIZECODE | SET_2M | SET_RATE)) {
+ fprintf(stderr,
+ "Cannot mix old style and new style geometry spec\n");
+@@ -805,17 +821,14 @@
+ break;
+ }
+ stretch = geometry.stretch & 1;
+-#ifdef FD_ZEROBASED
+- if(geometry.stretch & FD_ZEROBASED) {
+- zeroBased = 1;
++ if(geometry.stretch & FD_SECTBASEMASK) {
++ firstSectorNumber =
++ ((geometry.stretch & FD_SECTBASEMASK)>>2)^1;
+ }
+-#endif
+-#ifdef FD_SWAPSIDES
+ if(geometry.stretch & FD_SWAPSIDES) {
+ swapSides = 1;
+ }
+-#endif
+- mask |= SET_SECTORS | SET_CYLINDERS |
++ mask |= SET_SECTORS | SET_CYLINDERS |
+ SET_SIZECODE | SET_2M | SET_RATE;
+ } else {
+ /* density */
+@@ -831,7 +844,7 @@
+ density = DRIVE_DEFAULTS.density;
+ if ( mask & SET_RATE ){
+ for (i=0; i< density; ++i) {
+- if(fd[0].rate ==
++ if(fd[0].rate ==
+ DRIVE_DEFAULTS.fmt[i].rate)
+ density=i;
+ }
+@@ -867,13 +880,7 @@
+ }
+ }
+
+- fd[0].zeroBased = zeroBased;
+-#ifndef FD_ZEROBASED
+- if(zeroBased) {
+- noverify = 1;
+- }
+-#endif
+-
++ fd[0].firstSectorNumber = firstSectorNumber;
+ fd[0].swapSides = swapSides;
+
+ if (cylinders > fd[0].drvprm.tracks) {
+@@ -914,7 +921,7 @@
+ header_size = 62;
+
+ if(! (mask & (SET_DEVIATION | SET_MARGIN)) &&
+- (drivedesc.mask & (1 << FE__DEVIATION))) {
++ (drivedesc.mask & (1 << FE__DEVIATION))) {
+ deviation = drivedesc.type.deviation;
+ mask |= SET_DEVIATION;
+ }
+@@ -947,14 +954,14 @@
+ "add the following line to " DRIVEPRMFILE ":\n");
+ fprintf(stdout,
+ "drive%d: deviation=%d\n",
+- fd[0].drive,
++ fd[0].drive,
+ (fd[0].raw_capacity-old_capacity)*1000000/
+ old_capacity);
+ fprintf(stderr,
+ "CAUTION: The line is drive and controller "
+- "specific, so it should be\n"
++ "specific, so it should be\n"
+ "removed before installing a new "
+- "drive %d or floppy controller.\n\n",
++ "drive %d or floppy controller.\n\n",
+ fd[0].drive);
+ }
+ }
+@@ -981,7 +988,7 @@
+ if (verbosity == 9) {
+ for (i=0; i<fd[0].dsect; ++i)
+ printf("s=%2d S=%2d o=%2d\n",
+- fd[0].sequence[i].sect,
++ fd[0].sequence[i].sect + firstSectorNumber,
+ fd[0].sequence[i].size,
+ fd[0].sequence[i].offset);
+
+@@ -1004,9 +1011,10 @@
+ if (verbosity == 9){
+ for (i=0; i< fd0.dsect; i++)
+ printf("s=%2d S=%2d o=%2d\n",
+- fd0.sequence[i].sect,
+- fd0.sequence[i].size,
+- fd0.sequence[i].offset);
++ fd0.sequence[i].sect +
++ fd0.firstSectorNumber,
++ fd0.sequence[i].size,
++ fd0.sequence[i].offset);
+
+ printf("fd[0].sizecode=%d\n", fd0.sizecode);
+ printf("fd[0].fmt_gap=%d\n", fd0.fmt_gap);
+@@ -1019,11 +1027,9 @@
+ parameters.head = heads;
+ parameters.track = cylinders;
+ parameters.size = cylinders * heads * sectors;
+- parameters.stretch = stretch
+-#ifdef FD_ZEROBASED
+- | (zeroBased ? 4 : 0)
+-#endif
+- | (swapSides ? 2 : 0);
++ parameters.stretch = stretch
++ | (swapSides ? 2 : 0)
++ | ((1^firstSectorNumber) << 2);
+ parameters.gap = fd[0].gap;
+ if ( !use_2m)
+ fd0.rate = fd[0].rate;
+@@ -1109,7 +1115,8 @@
+ ioctl(fd[0].fd, FDFLUSH );
+ close(fd[0].fd);
+
+- if (! (mask & SET_DOSDRIVE ) && fd[0].drive < 2 && !zeroBased)
++ if (! (mask & SET_DOSDRIVE ) && fd[0].drive < 2 &&
++ firstSectorNumber == 1)
+ dosdrive = fd[0].drive+'a';
+
+ if (dosdrive) {
+@@ -1133,14 +1140,14 @@
+ setenv("MTOOLS_RATE_ANY", env_buffer,1);
+ if(system(command_buffer)){
+ fprintf(stderr,"\nwarning: mformat error\n");
+- /*exit(1);*/
+- /* Do not fail, if mformat happens to not be
++ /*exit(1);*/
++ /* Do not fail, if mformat happens to not be
+ * installed. The user might have wanted to make
+ * an ext2 disk for instance */
+ dosverify = 0;
+ }
+ } else {
+- if(!zeroBased)
++ if(firstSectorNumber != 1)
+ fprintf(stderr,
+ "\nwarning: mformat not called because DOS drive unknown\n");
+ /*exit(1);*/
+@@ -1173,7 +1180,7 @@
+ n = read(fd[0].fd,verify_buffer,rsize);
+ if ( n < 0){
+ perror("read");
+- fprintf(stderr,
++ fprintf(stderr,
+ "remaining %d\n", n);
+ exit(1);
+ }
+diff -ur --new-file --exclude-from=/home/alain/Projects/Fdutils/exclude fdutils-5.5/src/superformat.h fdutils/src/superformat.h
+--- fdutils-5.5/src/superformat.h 2002-11-02 14:36:45.000000000 +0100
++++ fdutils/src/superformat.h 2008-10-27 20:17:54.000000000 +0100
+@@ -83,7 +83,7 @@
+ int length; /* length of the track */
+ int rotations; /* how many time do we have to go over 0 to read
+ * the track */
+- int zeroBased; /* 1 if sector numbering starts at zero */
++ int firstSectorNumber; /* Number of first sector (1, by default) */
+ int swapSides; /* if logical side 0 is on physical 1 and vice-versa */
+ };
+
diff --git a/source/a/floppy/floppy.SlackBuild b/source/a/floppy/floppy.SlackBuild
index 04966d1c..adc39b46 100755
--- a/source/a/floppy/floppy.SlackBuild
+++ b/source/a/floppy/floppy.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,9 +20,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=5.4
-MTOOLS=3.9.8
-BUILD=${BUILD:-3}
+VERSION=5.5
+MTOOLS=4.0.18
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -50,34 +50,39 @@ rm -rf $PKG $TMP/fdutils-$VERSION $TMP/mtools-$MTOOLS
mkdir -p $TMP $PKG/{etc,usr/{bin,info,man/man{1,4,5}}}
cd $TMP
-tar xzvf $CWD/fdutils-$VERSION.tar.gz
+tar xvf $CWD/fdutils-$VERSION.tar.?z*
cd fdutils-$VERSION
-zcat $CWD/fdutils-5.4-20020222.diff.gz | patch -p1 --verbose --backup --suffix=.orig
-zcat $CWD/fdutils.mediaprm.diff.gz | patch -p1 --verbose --backup --suffix=.orig
+zcat $CWD/fdutils-5.5-20081027.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $CWD/fdutils.mediaprm.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+sed -i 's|<linux/ext2_fs.h>|<ext2fs/ext2_fs.h>|' src/fdmount.c
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
- $ARCH-slackware-linux
-make install prefix=$PKG/usr
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --build=$ARCH-slackware-linux || exit 1
+make || exit 1
+make install prefix=$PKG/usr exec_prefix=$PKG/usr bindir=$PKG/usr/bin \
+ infodir=$PKG/usr/info mandir=$PKG/usr/man sysconfdir=$PKG/etc
mkdir -p $PKG/usr/doc/fdutils-$VERSION
cp -a COPYING CREDITS Changelog INSTALL doc/FAQ.html doc/README \
$PKG/usr/doc/fdutils-$VERSION
chown root:root $PKG/usr/doc/fdutils-$VERSION/*
chmod 644 $PKG/usr/doc/fdutils-$VERSION/*
cd $TMP
-tar xzvf $CWD/mtools-$MTOOLS.tar.gz
+tar xvf $CWD/mtools-$MTOOLS.tar.?z*
cd mtools-$MTOOLS
CFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- $ARCH-slackware-linux
-#make all floppyd floppyd_installtest
-make all
-make install prefix=$PKG/usr sysconfdir=$PKG/etc bindir=$PKG/usr/bin \
- MAN1DIR=$PKG/usr/man/man1 MAN5DIR=$PKG/usr/man/man5
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --sysconfdir=/etc \
+ --build=$ARCH-slackware-linux || exit 1
+make all || exit 1
+make install DESTDIR=$PKG || exit 1
cat $CWD/mtools.conf > $PKG/etc/mtools.conf
cat $CWD/mediaprm > $PKG/etc/mediaprm
mkdir -p $PKG/usr/doc/mtools-$MTOOLS
diff --git a/source/a/floppy/slack-desc b/source/a/floppy/slack-desc
index bb916942..0a60ea47 100644
--- a/source/a/floppy/slack-desc
+++ b/source/a/floppy/slack-desc
@@ -8,9 +8,9 @@
|-----handy-ruler------------------------------------------------------|
floppy: floppy (floppy disk utilities)
floppy:
-floppy: Contains fdutils-5.4, tools to test and format floppy disks; and
-floppy: mtools-3.9.8, a collection of utilities for using DOS/Windows floppy
-floppy: disks with Linux.
+floppy: Contains fdutils, tools to test and format floppy disks; and mtools,
+floppy: a collection of utilities to access FAT disks without mounting them.
+floppy:
floppy:
floppy:
floppy: