Apply by doing:
	cd /usr/src
	patch -p0 < 011_sudo.patch

And then rebuild and install sudo:
	cd usr.bin/sudo
	make -f Makefile.bsd-wrapper obj
	make -f Makefile.bsd-wrapper cleandir
	make -f Makefile.bsd-wrapper
	make -f Makefile.bsd-wrapper install

Index: usr.bin/sudo/BUGS
===================================================================
RCS file: /cvs/src/usr.bin/sudo/BUGS,v
retrieving revision 1.4
diff -u -r1.4 BUGS
--- usr.bin/sudo/BUGS	27 Mar 2000 03:44:37 -0000	1.4
+++ usr.bin/sudo/BUGS	17 Jan 2002 01:05:34 -0000
@@ -1,17 +1,25 @@
-Known bugs in sudo version 1.6.3
+Known bugs in sudo version 1.6.5
 ================================
 
-1) "make install-man" should substitute correct paths into the
-    man pages themselves.
+1) Sudo should have an option to log when removing "dangerous"
+   environment variables.
 
-2) Sudo should log when removing "dangerous" envariables.
+2) On DUNIX in sia mode, hitting return at the prompt does not quit.
 
-3) configure variables that have been cached cannot be overridden
-   in subsequent configure runs, even if other --with-* options are
-   given.  This is a flaw in GNU autoconf.
+3) In parse.lex, '@' should not need to be a special character.
+   However, because lex does greedy matching, {WORD} will match
+   instead of the "^Defaults[:@]?" line.
 
-4) On DUNIX in sia mode, hitting return at the prompt does not quit.
+4) In list mode (sudo -l), characters escaped with a backslash
+   are shown verbatim with the backslash.
 
-5) In parse.lex, '@" should not need to be a special character.
-   For some reason, if it is not excluded from WORD, Defaults@ doesn't
-   match.
+5) Because the parser only does a single pass it is possible to
+   make a sudoers file where the "defaults" options are set after
+   a user's entry has been validated, changing the permissions for
+   the user.  The work-around is to put all 'defaults' entries
+   before the "User privilege specification" section but after all
+   the "alias specifications".  In the future the parser will
+   converted to a two-pass parser.
+
+For a list of things that are not bugs but that I would like to
+add / fix, please see the TODO file.
Index: usr.bin/sudo/CHANGES
===================================================================
RCS file: /cvs/src/usr.bin/sudo/CHANGES,v
retrieving revision 1.9
diff -u -r1.9 CHANGES
--- usr.bin/sudo/CHANGES	2 Mar 2001 14:39:43 -0000	1.9
+++ usr.bin/sudo/CHANGES	17 Jan 2002 16:54:46 -0000
@@ -1322,48 +1322,182 @@
 
 Sudo 1.6.3p5 released.
 
-415) Visudo now checks for the existence of an editor and gives a sensible
+415) Fix word splitting bug that caused a segv for very long command line args.
+
+Sudo 1.6.3p6 released.
+
+416) Fix negation of path-type Defaults entries in a boolean context.
+
+Sudo 1.6.3p7 released.
+
+417) Visudo now checks for the existence of an editor and gives a sensible
      error if it does not exist.
 
-416) The path to the editor for visudo is now a colon-separated list of
+418) The path to the editor for visudo is now a colon-separated list of
      allowable editors.  If the user has $EDITOR set and it matches
      one of the allowed editors that editor will be used.  If not,
      the first editor that actually exists is used.
 
-417) Visudo now does its own fork/exec instead of calling system(3).
+419) Visudo now does its own fork/exec instead of calling system(3).
 
-418) Call clean_env very early in main() for paranoia's sake.  Idea from
-     Marc Esipovich.
-
-419) Allow special characters (including '#') to be embedded in pathnames
+420) Allow special characters (including '#') to be embedded in pathnames
      if quoted by a '\\'.  The quoted chars will be dealt with by fnmatch().
      Unfortunately, 'sudo -l' still prints the '\\'.
 
-420) Added always_set_home option.
+421) Added the always_set_home option.
 
-421) Strip NLSPATH and PATH_LOCALE out from the environment to prevent
-     reading of protected files by a less priviledged user.
+422) Strip NLSPATH and PATH_LOCALE out from the environment to prevent
+     reading of protected files by a less privileged user.
 
-422) Add support for BSD authentication and associated -a flag.
+423) Added support for BSD authentication and associated -a flag.
 
-423) Added check for _innetgr(3) since NCR systems have this instead
+424) Added check for _innetgr(3) since NCR systems have this instead
      of innetgr(3).
 
-424) Added stay_setuid option for systems that have libraries that perform
+425) Added stay_setuid option for systems that have libraries that perform
      extra paranoia checks in system libraries for setuid programs.
 
-425) Environment munging is now done by hand.  We build up a new environment
-     and assign it to "environ".  This means we don't rely on getenv(3),
-     putenv(3), or setenv(3).
-
-426) Added env_reset and env_keep options.  This allows the sysadmin to
-     force commands to run with a clean environment.  Any variable in
-     the env_keep list will not get cleared when the environment is reset
-     *or* purged of dangerous vars (e.g. LD_*).
+426) Environment munging is now done by hand.  The environment is zeroed
+     upon sudo startup and a new environment is built before the command
+     is executed.  This means we don't rely on getenv(3), putenv(3),
+     or setenv(3).
 
 427) Added a class of environment variables that are only cleared if they
      contain '/' or '%' characters.
 
-428) Fix word splitting bug that caused a segv for very long command line args.
+428) Use stashed user_gid when checking against exempt gid since sudo
+     sets its gid to SUDOERS_GID, making getgid() return that, not the
+     real gid.  Fixes problem with setting exempt group == SUDOERS_GID.
+     Fix from Paul Kranenburg.
+
+429) Fixed file locking in visudo on NeXT which has a broken lockf().
+     Patch from twetzel@gwdg.de.
+
+430) Regenerated configure script with autoconf-2.52 (required some
+     tweaking of configure.in and friends).
+
+431) Added mail_badpass option to send mail when the user does not
+     authenticate successfully.
+
+432) Added env_reset Defaults option to reset the environment to
+     a clean slate.  Also implemented env_keep Defaults option
+     to specify variables to be preserved when resetting the
+     environment.
+
+433) Added env_check and env_delete Defaults options to allow the admin
+     to modify the builtin list of environment variables to remove.
+
+434) If timestamp_timeout < 0 then the timestamp never expires.  This
+     allows users to manage their own timestamps and create or delete
+     them via 'sudo -v' and 'sudo -k' respectively.
+
+435) Authentication routines that use sudo's tgetpass() now accept
+     ^C or ^Z at the password prompt and sudo will act appropriately.
+
+436) Added a check-only mode to visudo to check an existing sudoers
+     file for sanity.
+
+437) Visudo can now edit an alternate sudoers file.
+
+438) If sudo is configured with S/Key support and the system has
+     skeyaccess(3) use that to determine whether or not to allow
+     a normal Unix password or just S/Key.
+
+439) Fixed CIDR handling in sudoers.
+
+440) Fixed a segv if the local hostname is not resolvable and
+     the 'fqdn' option is set.
+
+441) "listpw=never" was not having an effect for users who did not
+     appear in sudoers--now it does.
+
+442) The --without-sendmail option now works on systems with
+     a /usr/include/paths.h file that defines _PATH_SENDMAIL.
+
+443) Removed the "secure_path" Defaults option as it does not work and
+     cannot work until the parser is overhauled.
+
+444) Added new -P flag and "preserve_groups" sudoers option to cause
+     sudo to preserve the group vector instead of setting it to that
+     of the target user.  Previously, if the target user was root
+     the group vector was not changed.  Now it is always changed unless
+     the -P flag or "preserve_groups" option was given.
+
+445) If find_path() fails as root, try again as the invoking user (useful
+     for NFS).  Idea from Chip Capelik.
+
+446) Use setpwent()/endpwent() and its shadow equivalents to be sure
+     the passwd/shadow file gets closed.
+
+447) Use getifaddrs(3) to get the list of network interfaces if it is
+     available.
+
+448) Dump list of local IP addresses and environment variables to clear
+     when 'sudo -V' is run as root.
+
+449) Reorganized the lexer a bit and added more states.  Sudo now does a
+     better job of parsing command arguments in the sudoers file.
+
+450) Wrap each call to syslog() with openlog()/closelog() since some
+     things (such as PAM) may call closelog(3) behind sudo's back.
+
+451) The LOGNAME and USER environment variables are now set if the user
+     specified a target uid and that uid exists in the password database.
+
+452) configure will no longer add the -g flag to CFLAGS by default.
+
+453) Now call pam_setcreds() to setup creds for the target user when
+     PAM is in use.  On Linux this often sets resource limits.
+
+454) If "make install" is run by non-root and the destination dir
+     is writable, install things normally but don't set owner and mode.
+
+455) The Makefile now supports installing in a shadow hierarchy
+     specified via the DESTDIR variable.
+
+456) config.h.in is now generated by autoheader.
+
+Sudo 1.6.4 released.
+
+457) Move the call to rebuild_env() until after MODE_RESET_HOME is set.
+     Otherwise, the set_home option has no effect.
+
+458) Fix use of freed memory when the "fqdn" flag is set.  This was
+     introduced by the fix for the "segv when gethostbynam() fails" bug.
+
+459) Add 'continue' statements to optimize the switch statement.
+     From Solar Designer.
+
+Sudo 1.6.4p1 released.
+
+460) Some special characters were not being escaped properly (e..g '\,')
+     in command line arguments and would cause a syntax error instead.
+
+461) "sudo -l" would not work if the always_set_home option was set.
+
+462) Added a configure option to disable use of POSIX saved IDs for
+     operating systems where these are broken.
+
+463) The SHELL environment variable was preserved from the user's environment
+     instead of being reset based on the passwd database even when the
+     "env_reset" option was set.
+
+Sudo 1.6.4p2 released.
+
+464) Added a configure option to cause mail sent by sudo to be run as
+     the invoking user instead of root.  Some people consider this to
+     be safer.
+
+465) If the mailer is being run as root, use a hard-coded environment
+     that is not influenced in any way by the invoking user's environment.
+
+466) Fixed the call to skeyaccess().  Patch from Phillip E. Lobbes.
+
+Sudo 1.6.5 released.
+
+467) Visudo could access memory that was already freed.
+
+468) If the skey.access file denied use of plaintext passwords sudo
+     would exit instead of allowing the user to enter an S/Key.
 
-429) Fix negation of path-type Defaults entries in a boolean context.
+Sudo 1.6.5p1 released.
Index: usr.bin/sudo/HISTORY
===================================================================
RCS file: /cvs/src/usr.bin/sudo/HISTORY,v
retrieving revision 1.2
diff -u -r1.2 HISTORY
--- usr.bin/sudo/HISTORY	10 Dec 1999 06:45:10 -0000	1.2
+++ usr.bin/sudo/HISTORY	16 Jan 2002 19:09:13 -0000
@@ -7,9 +7,9 @@
 Manchek, and Trent Hein.
 
 In 1991, Dave Hieb and Jeff Nieusma wrote a new version of sudo
-with an enhanced sudoers format.  This version was bought by a
-consulting firm called "The Root Group" and released under the GNU
-public license.
+with an enhanced sudoers format under contract to a consulting firm
+called "The Root Group".  This version was later released under the
+GNU public license.
 
 In 1994, after maintaining sudo informally within CU-Boulder for
 some time, Todd Miller made a public release of "CU sudo" (version
Index: usr.bin/sudo/INSTALL
===================================================================
RCS file: /cvs/src/usr.bin/sudo/INSTALL,v
retrieving revision 1.6
diff -u -r1.6 INSTALL
--- usr.bin/sudo/INSTALL	21 Nov 2000 17:58:43 -0000	1.6
+++ usr.bin/sudo/INSTALL	17 Jan 2002 01:05:34 -0000
@@ -1,4 +1,4 @@
-Installation instructions for Sudo 1.6.3
+Installation instructions for Sudo 1.6.5
 ========================================
 
 Sudo uses a `configure' script to probe the capabilities and type
@@ -29,8 +29,7 @@
        building sudo.  Before you actually run configure you
        should read the `Available configure options' section
        to see if there are any special options you may want
-       or need.  Also of interest may be the section on
-       `Mixing password authentication schemes'.
+       or need.
 
     4) Edit the configure-generated Makefile if you wish to
        change any of the default paths (alternately you could
@@ -69,13 +68,16 @@
   --cache-file=FILE
 	Cache test results in FILE
 
-  --help
+  --config-cache, -C
+	Alias for `--cache-file=config.cache'
+
+  --help, -h
 	Print the usage/help info
 
-  --no-create
+  --no-create, -n
 	Do not create output files
 
-  --quiet, --silent
+  --quiet, --silent, -q
 	Do not print `checking...' messages
 
 Directory and file names:
@@ -194,12 +196,26 @@
 	command line.
 
   --with-bsdauth
-	Enable support for BSD authentication on BSD/OS.  This option
-	assumes --with-logincap as well.  It is not possible to mix
-	BSD authentication with other authentication methods (and there
-	really should be no need to do so).  Note that only the newer
-	BSD authentication API is supported.  If you don't have
-	/usr/include/bsd_auth.h then you cannot use this.
+        Enable support for BSD authentication on BSD/OS and OpenBSD.
+        This option assumes --with-logincap as well.  It is not
+        possible to mix BSD authentication with other authentication
+        methods (and there really should be no need to do so).  Note
+        that only the newer BSD authentication API is supported.
+        If you don't have /usr/include/bsd_auth.h then you cannot
+        use this.
+
+  --disable-root-mailer
+        By default sudo will run the mailer as root when tattling
+        on a user so as to prevent that user from killing the mailer.
+        With this option, sudo will run the mailer as the invoking
+        user which some people consider to be safer.
+
+  --disable-saved-ids
+	Disable use of POSIX saved IDs.  Normally, sudo will try to
+	use POSIX saved IDs if they are supported.  However, some
+	implementations are broken.  If sudo aborts with an error like:
+	    "seteuid(0): Operation not permitted"
+	you probably need to disable POSIX saved ID support.
 
   --disable-sia
 	Disable SIA support.  This is the "Security Integration Architecture"
@@ -240,7 +256,7 @@
 	on some SysV-based OS's using STREAMS.
 
   --without-passwd
-	This option authentication via the passwd (or shadow) file.
+	This option excludes authentication via the passwd (or shadow) file.
 	It should only be used when another, alternate, authentication
 	scheme is in use.
 
@@ -258,7 +274,8 @@
   --with-logging=TYPE
 	How you want to do your logging.  You may choose "syslog", "file",
 	or "both".  Setting this to "syslog" is nice because you can keep all
-	of your sudo logs in one place (see the FAQ).  The default is "syslog".
+	of your sudo logs in one place (see the sample.syslog.conf file).
+	The default is "syslog".
 
   --with-logfac=FACILITY
 	Determines which syslog facility to log to.  This requires a 4.3BSD
@@ -385,7 +402,9 @@
 	just like the original sudo(8).  This is off by default.
 
   --with-all-insults
-	Include all the insult sets listed below.
+	Include all the insult sets listed below.  You must either specify
+	--with-insults or enable insults in the sudoers file for this to
+	have any effect.
 
   --with-classic-insults
 	Uses insults from sudo "classic."  If you just specify --with-insults
@@ -400,12 +419,13 @@
 
   --with-hal-insults
 	Uses 2001-like insults when an incorrect password is entered.
-	You must specify --with-insults as well for this to have any effect.
+	You must either specify --with-insults or enable insults in the
+	sudoers file for this to have any effect.
 
   --with-goons-insults
 	Insults the user with lines from the "Goon Show" when an incorrect
-	password is entered.  You must specify --with-insults as well for
-	this to have any effect.
+	password is entered.  You must either specify --with-insults or
+	enable insults in the sudoers file for this to have any effect.
 
   --with-secure-path[=path]
 	Path used for every command run from sudo(8).  If you don't trust the
@@ -420,15 +440,20 @@
 	Don't print the lecture the first time a user runs sudo.
 
   --with-editor=path
-	Specify the default editor used by visudo (and the only editor used
-	unless --with-env-editor is specified).  The default is the path
-	to vi on your system.
+	Specify the default editor path for use by visudo.  This may be
+	a single pathname or a colon-separated list of editors.  In
+	the latter case, visudo will choose the editor that matches
+	the user's USER environment variable or the first editor in
+	the list that exists.  The default is the path to vi on your system.
 
   --with-env-editor
 	Makes visudo consult the EDITOR and VISUAL environment variables before
-	falling back on the default editor.  Note that this may create a
-	security hole as most editors allow a user to get a shell (which would
-	be a root shell and hence, no logging).
+	falling back on the default editor list (as specified by --with-editor).
+	Note that this may create a security hole as it allows the user to
+	run any arbitrary command as root without logging.  A safer alternative
+	is to use a colon-separated list of editors with the --with-env-editor
+	option.  visudo will then only use the EDITOR or VISUAL if they match
+	a value specified via --with-editor.
 
   --disable-authentication
         By default, sudo requires the user to authenticate via a
@@ -575,12 +600,11 @@
     the "#define HAVE_LSEARCH 1" line in config.h and add lsearch.o
     to the LIBOBJS line in the Makefile.
 
-    It is not possible to access the sudoers file via NFS on Linux.
-    This is due to a bug in the Linux client-side NFS implementation.
-    It has been fixed in the developement kernel but, as of Aug 27,
-    1999, the fixes have not made it into the mainstream kernel.
-    There is a workaround on the sudo ftp site, linux_nfs.patch,
-    if you need to NFS-mount sudoers on Linux.
+    If you are using a Linux kernel older than 2.4 it is not possible
+    to access the sudoers file via NFS.  This is due to a bug in
+    the Linux client-side NFS implementation that has since been
+    fixed.  There is a workaround on the sudo ftp site, linux_nfs.patch,
+    if you need to NFS-mount sudoers on older Linux kernels.
 
 Mac OS X:
     It has been reported that for sudo to work on Mac OS X it must
Index: usr.bin/sudo/LICENSE
===================================================================
RCS file: /cvs/src/usr.bin/sudo/LICENSE,v
retrieving revision 1.3
diff -u -r1.3 LICENSE
--- usr.bin/sudo/LICENSE	24 Jan 2000 04:22:52 -0000	1.3
+++ usr.bin/sudo/LICENSE	16 Jan 2002 19:09:13 -0000
@@ -1,6 +1,6 @@
 Sudo is distributed under the following BSD-style license:
 
-   Copyright (c) 1994-1996,1998-2000 Todd C. Miller <Todd.Miller@courtesan.com>
+   Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
    All rights reserved.
 
    Redistribution and use in source and binary forms, with or without
Index: usr.bin/sudo/Makefile.bsd-wrapper
===================================================================
RCS file: /cvs/src/usr.bin/sudo/Makefile.bsd-wrapper,v
retrieving revision 1.10
diff -u -r1.10 Makefile.bsd-wrapper
--- usr.bin/sudo/Makefile.bsd-wrapper	29 May 2001 21:40:49 -0000	1.10
+++ usr.bin/sudo/Makefile.bsd-wrapper	16 Jan 2002 19:09:13 -0000
@@ -1,6 +1,7 @@
-#	$OpenBSD: Makefile.bsd-wrapper,v 1.10 2001/05/29 21:40:49 millert Exp $
+#	$OpenBSD: Makefile.bsd-wrapper,v 1.14 2002/01/16 18:09:13 millert Exp $
 
 MAN=	sudo.8 sudoers.5 visudo.8
+BINOWN=	root
 XCFLAGS=	CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}"
 CONFIGURE_OPTS=	--prefix=/usr --with-devel --with-insults --with-bsdauth \
 		--with-env-editor --disable-path-info --with-logfac=authpriv
@@ -36,16 +37,12 @@
 .endif
 	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
 	CONFIG_FILES="Makefile config.h pathnames.h" \
-	${XCFLAGS} \
-	INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
-	sh ${.CURDIR}/configure ${CONFIGURE_OPTS} ${CF}
+	${XCFLAGS} sh ${.CURDIR}/configure ${CONFIGURE_OPTS} ${CF}
 
 config.status:
 	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
 	CONFIG_FILES="Makefile config.h pathnames.h" \
-	${XCFLAGS} \
-	INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
-	sh ${.CURDIR}/configure ${CONFIGURE_OPTS} ${CF}
+	${XCFLAGS} sh ${.CURDIR}/configure ${CONFIGURE_OPTS} ${CF}
 
 .ifdef NOMAN
 maninstall:
@@ -53,12 +50,14 @@
 .endif
 
 install: maninstall
-	${MAKE} ${XCFLAGS} prefix=${DESTDIR}/usr sysconfdir=${DESTDIR}/etc \
-		bindir=${DESTDIR}/usr/bin INSTALL="${INSTALL} ${INSTALL_COPY}" \
-		install-binaries
+	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 4555 \
+	    sudo ${DESTDIR}/usr/bin/sudo
+	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+	    visudo ${DESTDIR}/usr/sbin/visudo
 
 clean cleandir:
-	 @test ! -e Makefile || ${MAKE} distclean
+	@test ! -e Makefile || ${MAKE} distclean
+	rm -f def_data.c def_data.h
 
 depend:
 	# Nothing here so far...
Index: usr.bin/sudo/Makefile.in
===================================================================
RCS file: /cvs/src/usr.bin/sudo/Makefile.in,v
retrieving revision 1.7
diff -u -r1.7 Makefile.in
--- usr.bin/sudo/Makefile.in	21 Nov 2000 17:58:43 -0000	1.7
+++ usr.bin/sudo/Makefile.in	17 Jan 2002 01:05:34 -0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com>
+# Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
 #
 # @configure_input@
 #
-# $Sudo: Makefile.in,v 1.200 2000/03/27 02:57:52 millert Exp $
+# $Sudo: Makefile.in,v 1.223 2002/01/16 23:37:33 millert Exp $
 #
 
 #### Start of system configuration section. ####
@@ -49,7 +49,7 @@
 YACC = @YACC@
 NROFF = nroff
 
-# Which install program?
+# Our install program supports extra flags...
 INSTALL = $(SHELL) $(srcdir)/install-sh -c
 
 # Libraries
@@ -109,44 +109,45 @@
 
 PROGS = @PROGS@
 
-SRCS = alloc.c alloca.c check.c defaults.c fileops.c find_path.c fnmatch.c \
-       getcwd.c getspwuid.c goodpath.c interfaces.c lex.yy.c lsearch.c \
-       logging.c parse.c parse.lex parse.yacc putenv.c snprintf.c strcasecmp.c \
-       strerror.c sudo.c sudo.tab.c sudo_setenv.c testsudoers.c tgetpass.c \
-       utime.c visudo.c $(AUTH_SRCS)
+SRCS = alloc.c alloca.c check.c def_data.c defaults.c env.c fileops.c \
+       find_path.c fnmatch.c getcwd.c getspwuid.c goodpath.c \
+       interfaces.c lex.yy.c lsearch.c logging.c parse.c parse.lex \
+       parse.yacc set_perms.c sigaction.c snprintf.c strcasecmp.c strerror.c \
+       sudo.c sudo.tab.c testsudoers.c tgetpass.c utime.c visudo.c \
+       $(AUTH_SRCS)
 
 AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \
 	    auth/kerb4.c auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
 	    auth/secureware.c auth/securid.c auth/sia.c auth/sudo_auth.c
 
-HDRS = compat.h defaults.h ins_2001.h ins_classic.h ins_csops.h ins_goons.h \
-       insults.h interfaces.h logging.h parse.h sudo.h sudo.tab.h version.h \
-       auth/sudo_auth.h emul/fnmatch.h emul/search.h emul/utime.h
+HDRS = compat.h def_data.h defaults.h ins_2001.h ins_classic.h ins_csops.h \
+       ins_goons.h insults.h interfaces.h logging.h parse.h sudo.h sudo.tab.h \
+       version.h auth/sudo_auth.h emul/fnmatch.h emul/search.h emul/utime.h
 
 AUTH_OBJS = sudo_auth.o @AUTH_OBJS@
 
 PARSEOBJS = sudo.tab.o lex.yy.o alloc.o defaults.o
 
-SUDOBJS = check.o getspwuid.o goodpath.o fileops.o find_path.o interfaces.o \
-	  logging.o parse.o sudo.o sudo_setenv.o tgetpass.o \
+SUDOBJS = check.o env.o getspwuid.o goodpath.o fileops.o find_path.o \
+	  interfaces.o logging.o parse.o set_perms.o sudo.o tgetpass.o \
 	  $(AUTH_OBJS) $(PARSEOBJS)
 
-VISUDOBJS = visudo.o fileops.o $(PARSEOBJS)
+VISUDOBJS = visudo.o fileops.o goodpath.o find_path.o $(PARSEOBJS)
 
 TESTOBJS = interfaces.o testsudoers.o $(PARSEOBJS)
 
 LIBOBJS = @LIBOBJS@ @ALLOCA@
 
-VERSION = 1.6.3
+VERSION = 1.6.5
 
-DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES FAQ HISTORY INSTALL INSTALL.configure \
+DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES HISTORY INSTALL INSTALL.configure \
 	    LICENSE Makefile.in PORTING README RUNSON TODO TROUBLESHOOTING \
-	    UPGRADE acsite.m4 aixcrypt.exp config.guess config.h.in config.sub \
-	    configure configure.in fnmatch.3 indent.pro install-sh \
-	    mkinstalldirs pathnames.h.in sample.pam sample.syslog.conf \
-	    sample.sudoers sudo.cat sudo.man.in sudo.pod sudoers sudoers.cat \
-	    sudoers.man.in sudoers.pod visudo.cat visudo.man.in visudo.pod \
-	    auth/API
+	    UPGRADE aclocal.m4 aixcrypt.exp config.guess config.h.in \
+            config.sub configure configure.in def_data.in fnmatch.3 indent.pro \
+	    install-sh mkdefaults mkinstalldirs pathnames.h.in sample.pam \
+	    sample.syslog.conf sample.sudoers sudo.cat sudo.man.in sudo.pod \
+	    sudoers sudoers.cat sudoers.man.in sudoers.pod visudo.cat \
+	    visudo.man.in visudo.pod auth/API
 
 BINFILES= BUGS CHANGES HISTORY LICENSE README TODO TROUBLESHOOTING \
 	  UPGRADE install-sh mkinstalldirs sample.syslog.conf sample.sudoers \
@@ -156,7 +157,7 @@
 BINSPECIAL= INSTALL.binary Makefile.binary
 
 SUDODEP = $(srcdir)/sudo.h $(srcdir)/compat.h $(srcdir)/defaults.h \
-	  $(srcdir)/logging.h config.h pathnames.h
+	  $(srcdir)/logging.h config.h def_data.h pathnames.h
 
 AUTHDEP = $(SUDODEP) $(authdir)/sudo_auth.h
 
@@ -196,15 +197,20 @@
 @DEV@	rm -f lex.yy.c
 @DEV@	$(LEX) $(srcdir)/parse.lex
 
+# Uncomment the following if you intend to modify def_data.in
+@DEV@def_data.h def_data.c: def_data.in
+@DEV@	perl $(srcdir)/mkdefaults -o def_data $(srcdir)/def_data.in
+
 # Dependencies (not counting auth functions)
 alloc.o: alloc.c $(SUDODEP)
 check.o: check.c $(SUDODEP)
+env.o: env.c $(SUDODEP)
 fileops.o: fileops.c $(SUDODEP)
 find_path.o: find_path.c $(SUDODEP)
 getspwuid.o: getspwuid.c $(SUDODEP)
 goodpath.o: goodpath.c $(SUDODEP)
 logging.o: logging.c $(SUDODEP)
-sudo_setenv.o: sudo_setenv.c $(SUDODEP)
+set_perms.o: set_perms.c $(SUDODEP)
 tgetpass.o: tgetpass.c $(SUDODEP)
 visudo.o: visudo.c $(SUDODEP) version.h
 sudo.o: sudo.c $(SUDODEP) interfaces.h version.h
@@ -212,12 +218,11 @@
 testsudoers.o: testsudoers.c $(SUDODEP) parse.h interfaces.h
 parse.o: parse.c $(SUDODEP) parse.h interfaces.h
 lex.yy.o: lex.yy.c $(SUDODEP) parse.h sudo.tab.h
-sudo.tab.o: sudo.tab.c $(SUDODEP) parse.h
-defaults.o: defaults.c $(SUDODEP) auth/sudo_auth.h
+sudo.tab.o: sudo.tab.c $(SUDODEP) parse.h sudo.tab.c sudo.tab.h
+defaults.o: defaults.c $(SUDODEP) def_data.c auth/sudo_auth.h
 fnmatch.o: fnmatch.c config.h compat.h emul/fnmatch.h
 getcwd.o: getcwd.c config.h compat.h
 lsearch.o: lsearch.c config.h compat.h emul/search.h
-putenv.o: putenv.c config.h compat.h
 snprintf.o: snprintf.c config.h compat.h
 strcasecmp.o: strcasecmp.c config.h
 strerror.o: strerror.c config.h
@@ -255,7 +260,7 @@
 
 sudo.man.in: $(srcdir)/sudo.pod
 	@rm -f $(srcdir)/$@
-	(cd $(srcdir); pod2man --section=`echo @MANSECTSU@|tr A-Z a-z` --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod > $(srcdir)/$@)
+	( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" > $@ )
 
 sudo.man: sudo.man.in
 	CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
@@ -264,7 +269,7 @@
 
 visudo.man.in: $(srcdir)/visudo.pod
 	@rm -f $(srcdir)/$@
-	(cd $(srcdir); pod2man --section=`echo @MANSECTSU@|tr A-Z a-z` --release=$(VERSION) --center="MAINTENANCE COMMANDS" visudo.pod > $(srcdir)/$@)
+	( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" visudo.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" > $@ )
 
 visudo.man: visudo.man.in
 	CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
@@ -273,7 +278,7 @@
 
 sudoers.man.in: $(srcdir)/sudoers.pod
 	@rm -f $(srcdir)/$@
-	(cd $(srcdir); pod2man --section=`echo @MANSECTFORM@|tr A-Z a-z` --release=$(VERSION) --center="FILE FORMATS" sudoers.pod | sed 's/"\\f(CW""\\fR"/\\f(CW""\\fR/' > $(srcdir)/$@)
+	( cd $(srcdir); mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" sudoers.pod | sed -e "s/(5)/($$mansectform)/" -e "s/(8)/($$mansectsu)/" > $@ )
 
 sudoers.man:: sudoers.man.in
 	CONFIG_FILES=$@ CONFIG_HEADERS= sh ./config.status
@@ -283,27 +288,23 @@
 install: install-dirs install-binaries install-sudoers install-man
 
 install-dirs:
-	$(SHELL) $(srcdir)/mkinstalldirs $(sudodir) $(visudodir) $(sudoersdir) $(mandirsu) $(mandirform)
+	$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)/$(sudodir) \
+	    $(DESTDIR)/$(visudodir) $(DESTDIR)/$(sudoersdir) \
+	    $(DESTDIR)/$(mandirsu) $(DESTDIR)/$(mandirform)
 
 install-binaries: $(PROGS)
-	$(INSTALL) -o $(install_uid) -g $(install_gid) -m 4111 -s sudo $(sudodir)/sudo
-	$(INSTALL) -o $(install_uid) -g $(install_gid) -m 0111 -s visudo $(visudodir)/visudo
+	$(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 -s sudo $(DESTDIR)/$(sudodir)/sudo
+	$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 -s visudo $(DESTDIR)/$(visudodir)/visudo
 
 install-sudoers:
-	@if [ -f $(sudoersdir)/sudoers ]; then \
-	    echo "Setting user/group and mode on existing $(sudoersdir)/sudoers file."; \
-	    chown $(sudoers_uid) $(sudoersdir)/sudoers; \
-	    chgrp $(sudoers_gid) $(sudoersdir)/sudoers; \
-	    chmod $(sudoers_mode) $(sudoersdir)/sudoers; \
-	else \
-	    $(INSTALL) -o $(sudoers_uid) -g $(sudoers_gid) -m $(sudoers_mode) \
-		$(srcdir)/sudoers $(sudoersdir)/sudoers; \
-	fi
+	test -f $(DESTDIR)/$(sudoersdir)/sudoers || \
+	    $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \
+		$(srcdir)/sudoers $(DESTDIR)/$(sudoersdir)/sudoers
 
 install-man:
-	$(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 @mansrcdir@/sudo.$(mantype) $(mandirsu)/sudo.$(mansectsu)
-	$(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 @mansrcdir@/visudo.$(mantype) $(mandirsu)/visudo.$(mansectsu)
-	$(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 @mansrcdir@/sudoers.$(mantype) $(mandirform)/sudoers.$(mansectform)
+	$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)/$(mandirsu)/sudo.$(mansectsu)
+	$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)/$(mandirsu)/visudo.$(mansectsu)
+	$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)/$(mandirform)/sudoers.$(mansectform)
 @MAN_POSTINSTALL@
 
 check:
@@ -343,27 +344,25 @@
 bindist:
 	@mkdir tmp.`arch -l`
 	@mkdir tmp.`arch -l`/sudo-$(VERSION)
-	( cd tmp.`arch -l`/sudo-$(VERSION) ; \
+	( \
+	  tdir=tmp.`arch -l`/sudo-$(VERSION) ; \
 	  for i in $(BINFILES) ; do \
-	    if [ -f ../../$$i ]; then \
-	      cp ../../$$i . ; \
-	    elif [ -f $(srcdir)/$$i ]; then \
-	      cp $(srcdir)/$$i . ; \
-	    else \
-	      cp ../../$(srcdir)/$$i . ; \
-	    fi ; \
-	  done ; \
-	  ln -s TROUBLESHOOTING FAQ ; \
-	  for i in $(BINSPECIAL) ; do \
-	    if [ -f ../../$$i ]; then \
-	      cp ../../$$i `basename $$i .binary` ; \
+	    if [ -f $$i ]; then \
+	      cp $$i $$tdir ; \
 	    elif [ -f $(srcdir)/$$i ]; then \
-	      cp $(srcdir)/$$i `basename $$i .binary` ; \
+	      cp $(srcdir)/$$i $$tdir ; \
 	    else \
-	      cp ../../$(srcdir)/$$i `basename $$i .binary` ; \
+	      echo cannot find $$i ; \
+	      exit 1 ; \
 	    fi ; \
 	  done ; \
-	  cd .. ; tar Ocf ../sudo-$(VERSION)-`arch -l`.tar sudo-$(VERSION) ; \
+	  cp $(srcdir)/INSTALL.binary $$tdir/INSTALL ; \
+	  sed -e 's/@_MANTYPE@/$(mantype)/g' -e 's/@_mansectsu@/$(mansectsu)/g' \
+	      -e 's/@_mansectform@/$(mansectform)/g' $(srcdir)/Makefile.binary \
+	      > $$tdir/Makefile ; \
 	)  
+	strip sudo
+	strip visudo
+	( cd tmp.`arch -l` && tar Ocf ../sudo-$(VERSION)-`arch -l`.tar sudo-$(VERSION) )
 	gzip --best sudo-$(VERSION)-`arch -l`.tar
 	rm -rf tmp.`arch -l`
Index: usr.bin/sudo/PORTING
===================================================================
RCS file: /cvs/src/usr.bin/sudo/PORTING,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PORTING
--- usr.bin/sudo/PORTING	18 Nov 1999 16:29:01 -0000	1.1.1.1
+++ usr.bin/sudo/PORTING	16 Jan 2002 19:09:13 -0000
@@ -4,8 +4,11 @@
 Before trying to port sudo to a new architecture, please join the
 sudo-workers mailing list (see the README file) and ask if anyone
 has a port working or in-progress.  Sudo should be fairly easy to
-port.  Since it uses a configure script, most of the work should
-be done for you.
+port.  Since it uses a configure script, most of the work is often
+done for you.  As long as your operating system is reasonably POSIX
+compliant porting should be easy.  If your operating system has a
+separate library for POSIX compatibility you may need to add it by
+using configure's --with-libraries option.
 
 If your OS is an SVR4 derivative (or some approximation thereof), it may
 be sufficient to tell configure you are runnng SVR4, something like:
@@ -18,11 +21,18 @@
 ulimit(2) or getrlimit(2) can also be used on some OS's.  If all
 else fails you can use the value of NOFILE in <sys/param.h>.
 
-Sudo tries to clear the environment of dangerous envariables like
-LD_* to prevent shared library spoofing.  If you are porting sudo
-to a new OS that has shared libraries you'll want to mask out the
-variables that allow one to change the shared library path.  See
-badenv_table() in sudo.c to see how this is done for various OS's.
+Also, some operating systems have a broken implementation of POSIX
+saved IDs.  If sudo prints the error message "seteuid(0): Operation
+not permitted" this means saved IDs are not implemented properly.
+You should run configure with the "--disable-saved-ids" option and
+rebuild sudo.
+
+Sudo tries to clear the environment of dangerous environment variables
+such as LD_* to prevent shared library spoofing.  If you are porting
+sudo to a new OS that has shared libraries you'll want to mask out
+the variables that allow one to change the shared library path.
+See initial_badenv_table() in env.c to see how this is done for
+various operating systems.
 
 It is possible that on a really weird system, tgetpass() may not
 compile.  (The most common cause for this is that the "fd_set" type
@@ -34,15 +44,43 @@
 contains a broken or unusable crypt() function--try linking with
 -lcrypt if that exists.  Another possibility is that select() is
 not fully functional; running configure with --with-password-timeout=0
-will disable the use of select().
+will disable the use of select().  If sudo prompts you for a
+password but never accepts it, see below.
+
+Sudo detects and recognizes most common shadow password schemes
+automatically.  If you find that sudo is not accepting your password
+and you are sure that it has been typed in correctly there are two
+likely problems.  One possibility is that your C library has a
+broken crypt() function (see above).  The other is that your operating
+system is using shadow passwords and sudo has not detected that
+fact.  Look in config.h to see what, if any, shadow password scheme
+was detected.  The most common are SVR4 (HAVE_GETSPNAM will be
+defined) and SecureWare (HAVE_GETPRPWNAM will be defined).  Check
+the manual pages on your system for "getspnam" and "getprpwnam".
+If one of those exist but the appropriate define does not exist in
+config.h then the problem is most likely that those routines live
+in a library that sudo does not know to link against.  The manual
+page should tell you what library this is.  You can then use the
+--with-libraries option to configure to tell sudo to link with the
+library in question.  For example:
+    --with-libraries='-lgen'
+would cause sudo to link in libgen which contains "getspnam" on SCO
+systems.
 
 If you are trying to port to a system without standard Berkeley
 networking you may find that interfaces.c will not compile.  This
-is most likely on OS's with STREAMS-based networking.  It should be
-possible to make it work by modifying the ISC streams support
+is most likely on OS's with STREAMS-based networking.  It should
+be possible to make it work by modifying the ISC streams support
 (see the _ISC #ifdef's).  However, if you don't care about ip address
 and network address support, you can just run configure with the
---without-interfaces flag to get a do-nothing load_interfaces() stub function.
+--without-interfaces flag to get a do-nothing load_interfaces()
+stub function.
+
+Sudo wants POSIX signals (sigaction and friends).  If your system
+lacks sigaction but has the 4.3BSD sigvec() function, sigvec() will
+be used instead via the wrapper functions in sigaction.c.  It is
+not currently possible to use the old SVR3 and 4.2BSD signals, but
+this is due more to my lack of a test machine than anything else.
 
 If you port sudo to a new architecture, please send the output of
 "configure", the config.log file and your changes to:
Index: usr.bin/sudo/README
===================================================================
RCS file: /cvs/src/usr.bin/sudo/README,v
retrieving revision 1.4
diff -u -r1.4 README
--- usr.bin/sudo/README	27 Mar 2000 03:44:37 -0000	1.4
+++ usr.bin/sudo/README	17 Jan 2002 01:05:35 -0000
@@ -1,4 +1,4 @@
-This is Sudo version 1.6.3
+This is Sudo version 1.6.5
 
 The sudo philosophy
 ===================
@@ -10,7 +10,7 @@
 ==================
 Before you try and build sudo, *please* make sure you have the current
 version.  The latest sudo may always be gotten via anonymous ftp
-from ftp.courtesan.com in the directory /pub/sudo/.
+from ftp.sudo.ws in the directory /pub/sudo/.
 The distribution is sudo-M.m.tar.gz where `M' is the major
 version number and `m' is the minor version number.
 BETA versions of sudo may also be available.  If you join
@@ -23,7 +23,7 @@
 release.
 
 For a complete list of changes, see the CHANGES file.  For a summary,
-see the web page, http://www.courtesan.com/sudo/.
+see the web page, http://www.sudo.ws/sudo/.
 
 If you are upgrading from an earlier version of Sudo, please see
 the UPGRADE file.
@@ -40,20 +40,21 @@
 compiler, and the make utility.
 
 If you wish to modify the parser then you will need flex version
-2.5.2 or later and either bison or byacc (sudo comes with a
-pre-flex'd tokenizer and pre-yacc'd grammar parser).  You'll also
-have to uncomment a few lines from the Makefile.  You can get flex
-via anonymous ftp from ftp://ftp.ee.lbl.gov/pub/flex* as well as
-any GNU mirror.  You can get GNU bison from
-ftp://prep.ai.mit.edu/pub/gnu/bison* or any GNU mirror.
+2.5.2 or later and either bison or byacc (sudo comes with a pre-flex'd
+tokenizer and pre-yacc'd grammar parser).  You'll also have to
+uncomment a few lines from the Makefile or run configure with the
+--with-devel option.  You can get flex via anonymous ftp from
+ftp://ftp.ee.lbl.gov/pub/flex* as well as any GNU mirror.  You can
+get GNU bison from ftp://prep.ai.mit.edu/pub/gnu/bison* or any GNU
+mirror.
 
 Building the release
 ====================
 Please read the installation guide in the `INSTALL' file before
 trying to build sudo.  The `RUNSON' file contains a list of of
 platforms that this version of sudo is known to work on.  If you
-can add to this list, please send mail to sudo@courtesan.com.
-If something goes wrong you may want to refer to the `TROUBLESHOOTING'
+can add to this list, please send mail to sudo@sudo.ws.  If
+something goes wrong you may want to refer to the `TROUBLESHOOTING'
 file.
 
 Copyright
@@ -65,21 +66,25 @@
 =============
 sudo-announce	This list receives announcements whenever a new version
 		of sudo is released.
+		http://www.sudo.ws/mailman/listinfo/sudo-announce
 
 sudo-users	This list is for questions and general discussion about sudo.
+		http://www.sudo.ws/mailman/listinfo/sudo-users
 
 sudo-workers	This list is for people working on and porting sudo.
+		http://www.sudo.ws/mailman/listinfo/sudo-workers
 
-To subscribe to a list, send a mail message to "majordomo@courtesan.com"
-with a line in the message body (_not_ the subject) of "subscribe listname"
-where "listname" is one of sudo-announce, sudo-users, or sudo-workers.
+To subscribe to a list, visit its url (as listed above) and enter
+your email address to subscribe.  Digest versions are available but
+these are fairly low traffic lists so the digest versions are not
+a significant win.
 
-Currently all the lists are fairly low-volume so there hasn't been a
-need for digest versions.
+Mailing list archives are also available.  See the mailing list web sites
+for the appropriate links.
 
 Web page
 ========
-There is a sudo `web page' at http://www.courtesan.com/sudo/
+There is a sudo `web page' at http://www.sudo.ws/sudo/
 that contains an overview of sudo as well as pointers to BETA versions
 and other useful info.
 
@@ -87,7 +92,7 @@
 ===========
 A list of known bugs may be found in the `BUGS' file.  If you have
 found what you believe to be a bug, you can file a bug report with
-the sudo bug database, on at web at http://www.courtesan.com/sudo/bugs/.
+the sudo bug database, on at web at http://www.sudo.ws/bugs/.
 
 Please read over the `TROUBLESHOOTING' file *before* submitting a
 bug report.  When reporting bugs, please be sure to include the
Index: usr.bin/sudo/RUNSON
===================================================================
RCS file: /cvs/src/usr.bin/sudo/RUNSON,v
retrieving revision 1.6
diff -u -r1.6 RUNSON
--- usr.bin/sudo/RUNSON	27 Mar 2000 03:44:37 -0000	1.6
+++ usr.bin/sudo/RUNSON	17 Jan 2002 16:54:46 -0000
@@ -6,10 +6,10 @@
 Name	Rev	Arch	Used		Version	By		 Options
 =======	=======	=======	===============	======= ===============  ===============
 Auspex	1.6.1	sun4	bundled cc	1.3.4	Alek Komarnitsky none
-SunOS	4.1.3	sun4	bundled cc	1.6.3	Todd Miller	 none
-SunOS	4.1.3	sun4	gcc2.9.5.2	1.6.3	Todd Miller	 none
+SunOS	4.1.3	sun4	bundled cc	1.6.5p1	Todd Miller	 none
+SunOS	4.1.3	sun4	gcc2.9.5.2	1.6.5p1	Todd Miller	 none
 SunOS	4.1.3	sun4	gcc2.7.2.1	1.5.3	Todd Miller	 --with-kerb4
-SunOS	4.1.3	sun4	gcc2.9.5.2	1.6.3	Todd Miller	 --with-skey
+SunOS	4.1.3	sun4	gcc2.9.5.2	1.6.5p1	Todd Miller	 --with-skey
 Solaris	2.5.1	sparc	SC4.0		1.5.6p1	Brian Jackson	 none 
 Solaris	2.5.1	sun4u	gcc2.7.2.3	1.5.4	Leon von Stauber none
 Solaris	2.5.1	i386	gcc2.7.2	1.5.4	Leon von Stauber none
@@ -17,25 +17,32 @@
 Solaris	2.6	sparc	gcc2.9.5.2	1.6.3	Todd Miller	 --with-pam
 Solaris	2.6	i386	gcc2.9.5.2	1.6.3	Todd Miller	 none
 Solaris	2.6	i386	gcc2.9.5.2	1.6.3	Todd Miller	 --with-pam
-Solaris	2.6	sparc	unbundled cc	1.5.7	Giff Hammar	 none
+Solaris	2.6	sun4u	Workshop 6.2	1.6.3p7	Donna Dickerson	 none
 Solaris	2.6	i386	unbundled cc	1.5.8p2	Udo Keller	 none
 Solaris	7	i386	gcc 2.8.1	1.6.1	Ido Dubrawsky	 none
 Solaris	7	i386	Workshop 5.0	1.6	Brian Jackson	 none
 Solaris	7	sun4u	egcs 1.1.2	1.5.9p4	Scott Kinnane	 none
-Solaris	5.6	sun4u	egcs 1.1.2	1.5.9p4	Scott Kinnane	 none
+Solaris	7	sparc	SC4.2		1.6.5p1	Todd Miller	 none
+Solaris	7	sun4u	Workshop 6.2	1.6.3p7	Donna Dickerson	 none
+Solaris	7	sparc	2.95.2		1.6.5p1	Todd Miller	 --with-skey
+Solaris	2.6	sun4u	egcs 1.1.2	1.5.9p4	Scott Kinnane	 none
+Solaris	8	sparc	2.95.2		1.6.5p1	Todd Miller	 --with-skey
+Solaris	8	sparc	SC4.2		1.6.5p1	Todd Miller	 none
+Solaris	8	sun4u	Workshop 6.2	1.6.3p7	Donna Dickerson	 none
 ISC	4.0	i386	bundled cc	1.4	Andy Smith	 none
 ISC	4.0	i386	gcc2.7.0	1.4	Andy Smith	 none
 ISC	4.1	i386	bundled cc	1.4	Andy Smith	 none
 ISC	4.1	i386	gcc2.7.0	1.4	Andy Smith	 none
 RISCos	4_52	mips	bundled cc	1.3.7	Andy Smith	 --with-getpass
 SCO	3.2.2	i386	bundled cc	1.3.4	David Meleedy	 --with-getpass
+SCO	5.0.5	i386	gcc 98q2	1.6.3p7	Alan Pittman	 none
 HP-UX	9.05	hp700	gcc2.7.2.1	1.5.3	Todd Miller	 none
 HP-UX	9.05	hp700	gcc2.7.2.1	1.5.3	Todd Miller	 --with-kerb4
 HP-UX	9.07	hp700	unbundled cc	1.5	Alek Komarnitsky --with-C2
 HP-UX	9.05	hp700	unbundled cc	1.4	Todd Miller	 none
-HP-UX	10.10	hp700	unbundled cc	1.6.3	Todd Miller	 --with-skey
-HP-UX	10.20	hp700	gcc2.9.5.2	1.6.3	Todd Miller	 --with-skey
-HP-UX	10.20	hp700	bundled cc	1.6.3	Todd Miller	 none
+HP-UX	10.10	hp700	unbundled cc	1.6.5p1	Todd Miller	 --with-skey
+HP-UX	10.20	hp700	gcc2.9.5.2	1.6.5p1	Todd Miller	 --with-skey
+HP-UX	10.20	hp700	bundled cc	1.6.5p1	Todd Miller	 none
 HP-UX	11.00	hp700	ansi-c		1.5.5b1	Alek Komarnitsky --with-C2
 HP-UX	11.00	hp700	bundled cc	1.5.5p5	Lynn Osburn	 none
 HP-UX	11.00	hp700	HP C compiler	1.6.2	Jeff Earickson 	 --with-pam
@@ -48,8 +55,8 @@
 IRIX	5.3	mips	MipsPro C	1.5.6p1	Brian Jackson	 none 
 IRIX	6.2	mips	MipsPro C	1.5.6p1	Brian Jackson	 none 
 IRIX	6.5	mips	MipsPro C	1.5.6p1	Brian Jackson	 none 
-IRIX	5.3	mips	unbundled cc	1.6.3	Todd Miller	 none
-IRIX	5.3	mips	gcc2.9.5.2	1.6.3	Todd Miller	 --with-skey
+IRIX	5.3	mips	unbundled cc	1.6.5p1	Todd Miller	 none
+IRIX	5.3	mips	gcc2.9.5.2	1.6.5p1	Todd Miller	 --with-skey
 IRIX	5.3	mips	gcc2.7.2.1	1.5.3	Todd Miller	 --with-kerb4
 IRIX	5.3	mips	unbundled cc	1.4	Wallace Winfrey	 --with-C2
 IRIX	6.2	mips	unbundled cc	1.5	Alek Komarnitsky --with-C2
@@ -67,10 +74,11 @@
 NEXTSTEP 3.3	i386	bundled cc	1.4	Jonathan Adams	 none
 NEXTSTEP 3.3	sparc	bundled cc	1.5.3	Mike Kienenberger none
 DEC UNIX 3.2c	alpha	bundled cc	1.5.3	Todd Miller	 none
-DEC UNIX 4.0D	alpha	gcc-2.9.5.2	1.6.3	Todd Miller	 --with-skey
+DEC UNIX 4.0D	alpha	bundled cc	1.6.5p1	Todd Miller	 --with-skey
 DEC UNIX 4.0	alpha	gcc-2.7.2.1	1.5.3	Todd Miller	 --with-kerb4
 DEC UNIX 4.0D	alpha	bundled cc	1.5.3	Randall R. Cable --with-C2
 DEC UNIX 4.0E	alpha	bundled cc	1.5.9p2	Vangelis Haniotakis none
+Tru64	5.1	alpha	bundled cc	1.6.5p1	Todd Miller	 none
 AIX	3.2.X	rs6000	bundled cc	1.4	Todd Miller	 none
 AIX	4.1.3	PowerPC	gcc-2.7.0	1.4	Bob Shair	 none
 AIX	4.1.4	rs6000	gcc-2.8.1	1.6.2p2	Todd Miller	 none
@@ -85,10 +93,8 @@
 ConvexOS 9.1	convex	bundled cc	1.3.6	Todd Miller	 none
 ConvexOS 9.1	convex	gcc2.4.5	1.3.6	Todd Miller	 none
 BSD/OS	4.1	i386	cc		1.6.3	Todd Miller	 --with-skey
-OpenBSD	2.X	i586	gcc-2.95.2	1.6.3	Todd Miller	 none
-OpenBSD	2.X	alpha	gcc-2.95.2	1.6.3	Todd Miller	 none
-OpenBSD	2.X	m68k	gcc-2.95.2	1.6.3	Todd Miller	 none
-OpenBSD	2.X	mvme88k	gcc-2.8.1	1.5.9	Steve Murphree	 none
+OpenBSD	2.X	all	gcc-2.95.2	1.6.5p1	Todd Miller	 none
+OpenBSD	3.0	all	gcc-2.95.3	1.6.5p1	Todd Miller	 none
 FreeBSD	1.1	i386	gcc		1.3.2	Dworkin Muller	 none
 FreeBSD	2.0.5	i386	gcc		1.3.4	Dworkin Muller	 none
 FreeBSD	3.2	i386	gcc 2.7.2.1	1.6	Brian Jackson	 none
@@ -99,6 +105,7 @@
 Linux	2.0.36	i586	gcc-2.7.2.3	1.5.7p4	Nathan Haney	 none
 Linux	2.0.33pl1 m68k	gcc 2.7.2.3	1.5.6	James Troup	 none
 Linux	2.2.12	i586	gcc-2.95.2	1.6.3	Todd Miller	 --with-pam
+Linux	2.4.9	i686	gcc-2.96	1.6.5p1	Todd Miller	 --with-pam
 Linux	2.2.13	alpha	egcs-2.91.66	1.6.3	Todd Miller	 --with-pam
 Linux	2.2.6-15 ppc	egcs-1.1.2	1.5.9p4	Barbara Schelkle none
 Linux	2.0.34	mips	gcc-2.7.2	1.6	Tristan Roddis	 none
@@ -119,6 +126,7 @@
 Unicos  10.0.0.1 J90	bundled cc	1.5.4	Mike Kienenberger none
 DG/UX	R4.11MU03 i686	gcc		1.5.3	Ramesh Vasudevan none
 DG/UX	R4.20MU02 x86	cc		v1.5.6p5 Jared Crapo	 none
+DG/UX	R4.20MU07 x86	gcc		1.6.3p7 Rob Tocher	 none
 NetBSD  1.2[A-G] x86	gcc-2.7.2.{1,2} 1.5.3	Jason R. Thorpe  none
 NetBSD  1.2[A-G] m68k	gcc-2.7.2.{1,2} 1.5.3	Jason R. Thorpe  none
 NetBSD  1.2[A-G] sparc  gcc-2.7.2.{1,2} 1.5.3	Jason R. Thorpe  none
@@ -134,6 +142,7 @@
 HI-UX/MPP 02-03	sr2201	bundled cc	1.5.4	Ben Edgington	 none
 SVR4	4.4	m88k	bundled gcc	1.6rc1	Gerry Belanger	 CFLAGS=
 NonStop-UX B32	CO-1475	cc		1.5.9p3	Andrei Panfilenko none
+MacOS	X	ppc	bundled cc	1.6.3p7	Gary Danko	 none
 
 Systems on which Sudo is expected to run on but hasn't been tested.
 If you can verify any of these, please send mail to sudo@courtesan.com
Index: usr.bin/sudo/TODO
===================================================================
RCS file: /cvs/src/usr.bin/sudo/TODO,v
retrieving revision 1.2
diff -u -r1.2 TODO
--- usr.bin/sudo/TODO	27 Mar 2000 03:44:37 -0000	1.2
+++ usr.bin/sudo/TODO	17 Jan 2002 01:05:35 -0000
@@ -3,84 +3,110 @@
 01) Redo parsing to be more like op(8) with true command aliases where
     can specify uid, gid(s) and part/all of the environment.
 
-02) Add default options to sudoers file (umask, def uid, def gids, dir, PATH).
-    Defaults = option1, option2, ...
-    Defaults@host = option1, option2, ...
-    Defaults!user = option1, option2, ...
-    Defaults%group = option1, option2, ...
-    Defaults+netgroup = option1, option2, ...
+02) Add a SHELLS reserved word that checks against /etc/shells.
 
-03) Add a SHELLS reserved word that checks against /etc/shells.
+03) Make the sudoers file accessible via NIS, Hesiod, and maybe NetInfo.
 
-04) Make the sudoers file accessible via NIS, Hesiod, and maybe NetInfo.
+04) Add a -h (?) flag to sudo for a history mechanism.
 
-05) Add a -h (?) flag to sudo for a history mechanism.
+05) Add an option to set LD_LIBRARY_PATH?
 
-06) Add an option to hard-code LD_LIBRARY_PATH?
+06) Add Prog_Alias facility (Prog_Alias VI = /usr/secure/bin/vi +args).
 
-07) Add Prog_Alias facility (Prog_Alias VI = /usr/secure/bin/vi +args).
+07) check for <net/errno.h> in configure and include it in sudo.c if it exists.
 
-08) check for <net/errno.h> in configure and include it in sudo.c if it exists.
+08) Add generic STREAMS support for getting interfaces and netmasks.
 
-09) Add generic STREAMS support for getting interfaces and netmasks.
-
-10) Add support for "safe scripts" by checking for shell script
+09) Add support for "safe scripts" by checking for shell script
     cookie (first two bytes are "#!") and execing the shell outselves
     after doing the stat to guard against spoofing.  This should avoid
     the race condition caused by going through namei() twice...
 
-11) Overhaul testsudoers to use things from parse.o so we don't reimplement
+10) Overhaul testsudoers to use things from parse.o so we don't reimplement
     things.
 
-12) Make runas_user a struct "runas" with user and group components.
+11) Make runas_user a struct "runas" with user and group components.
     (maybe uid and gid too???)
 
-13) Add -g group/gid option.
+12) Add -g group/gid option.
 
-14) Should be able to mix Cmnd_Alias's and command args.  Ie:
+13) Should be able to mix Cmnd_Alias's and command args.  Ie:
 	pete   ALL=PASSWD [A-z]*,!PASSWD root
     where PASSWD was defined to be /usr/bin/passwd.
     This requires the arg parsing to happen in the yacc grammer.
     At the very least, commands and args have to become separate
     tokens in the lexer.
 
-15) Add a per-tty restriction?  Ie: only can run foo from /dev/console.
-
-16) Add test for how to read ether interfaces in configure script
+14) Add a per-tty restriction?  Ie: only can run foo from /dev/console.
 
-17) Add configure check for $(CC) -R and use it in addition to -L
+15) Add test for how to read ether interfaces in configure script
 
-18) An option to make "sudo -s" use the target user's shell might be nice
-    (and more like su).
+16) Add configure check for $(CC) -R and use it in addition to -L
 
-19) Use getrlimit() in preference to getconf()/getdtablesize().
+17) An option to make "sudo -s" use the target user's shell might be nice
+    (and more like su).  Overlaps with the upcoming -i option.
 
-20) Add configure option to enable old behavior of visudo (O_EXCL)?
+18) Add configure option to enable old behavior of visudo (O_EXCL)?
     --without-sudoers-lock?
 
-21) Profile sudo again (is the yacc grammar optimal?)
+19) Profile sudo again (is the yacc grammar optimal?)
 
-22) Zero out encrypted passwords after use.  Use an Exit function or
+20) Zero out encrypted passwords after use.  Use an Exit function or
     some such (have to hook in to emalloc() and friends).
     Hard (impossible?) to be thorough w/ atexit/on_exit.
 
-23) Make 'sudo -l user' if run as root do a "sudo -l" output for the specified
+21) Make 'sudo -l user' if run as root do a "sudo -l" output for the specified
     user.
 
-24) Use strtol() and strtoul(), not atoi()
+22) Use strtol() and strtoul(), not atoi()
+
+23) In parse.yacc get rid of unneeded '{ ; }'
+
+24) Look into %e, %p, %k in parse.lex
+
+25) Make syslog stuff work on vanilla ultrix
+
+26) Implement date_format and log_format options.
+
+27) Add support for: Default:user@host
+
+28) Do login-style -sh hack for sudo -s? (new option or do it always?)
+
+29) Make visudo rcs-aware
+
+30) Add support for parsing multiple sudoers files.  Basically make
+    _PATH_SUDOERS be a colon-separated list of pathname like EDITOR.
+    Requires _PATH_SUDOERS_TMP chages (perhaps "%s.tmp").
+
+31) Add -i (simulate initial login) option as per 946 +sudo
+    (requires two-pass parser).  Also add "default_path" Defaults option
+    to go with it.  (See MINUS_I.patch)
+
+32) Some people want to be able to specify a special password in sudoers
+    in addition or instead of the normal one.
 
-25) In parse.yacc get rid on unneeded '{ ; }'
+33) Add support for trusted users.  E.g. allow user to run a certain
+    command regardless of what dir it is in if it is owned by the
+    trusted user.
 
-26) Look into %e, %p, %k in parse.lex
+34) Add mechanism to choose logfile based on RunasUser
 
-27) Document Defaults stuff in sudoers.pod
+35) Split the parser into two stages.  The first parse checks for
+    syntax and sets the Defaults options and sets up the
+    data structures to check a user.  The second stage does
+    the actual user check.
 
-28) Make syslog stuff work on vanilla ultrix
+36) Add a flag similar to '-l' but that spits out sudo commands in
+    a format suitable for cut & paste (requires parser overhaul first).
 
-29) Implement date_format and log_format options.
+37) Someone wants a recursive version of the dir specifier.  Ie:
+    SOME_MODIFIER:/usr/local/ to allow anything under /usr/local to be run.
 
-30) Add support for: Default:user@host
+38) An option to set the shell to the target user would make sense.
+    See other target user-related issues above.
 
-31) Do login-style -sh hack for sudo -s?
+39) Add an option (-D) to dump the defaults after the sudoers file
+    has been parsed.  Should only be available to root and should
+    allow a -u user modifier.
 
-32) Make visudo rcs-aware
+40) For sudo 1.7 wipe out the environment by default.
Index: usr.bin/sudo/TROUBLESHOOTING
===================================================================
RCS file: /cvs/src/usr.bin/sudo/TROUBLESHOOTING,v
retrieving revision 1.2
diff -u -r1.2 TROUBLESHOOTING
--- usr.bin/sudo/TROUBLESHOOTING	24 Jan 2000 04:22:52 -0000	1.2
+++ usr.bin/sudo/TROUBLESHOOTING	16 Jan 2002 19:09:13 -0000
@@ -1,6 +1,13 @@
-FAQ and troubleshooting tips for Sudo
+Troubleshooting tips and FAQ for Sudo
 =====================================
 
+Q) When I run configure, it says "C compiler cannot create executables".
+A) This usually means you either don't have a working compiler.  This
+   could be due to the lack of a license or that some component of the
+   compiler suite could not be found.  Check config.log for clues as
+   to why this is happening.  On many systems, compiler components live
+   in /usr/ccs/bin which may not be in your PATH environment variable.
+
 Q) Sudo compiles but when I run it I get "Sorry, sudo must be setuid root."
    and sudo quits.
 A) Sudo must be setuid root to do its work.  You need to do something like
@@ -10,6 +17,12 @@
    your $PATH before the directory containing sudo.  If you are going
    to have '.' in your path you should make sure it is at the end.
 
+Q) Sudo compiles but when I run it I get "seteuid(0): Operation not permitted"
+   and sudo quits.
+A) The operating system you are running probably has broken support for
+   POSIX saved IDs.  You should run configure with the "--disable-saved-ids"
+   option and rebuild sudo.
+
 Q) Sudo never gives me a chance to enter a password using PAM, it just
    says 'Sorry, try again.' three times and quits.
 A) You didn't setup PAM to work with sudo.  On Linux this generally
@@ -70,14 +83,28 @@
      LOCALDOMAIN
      RES_OPTIONS
      HOSTALIASES
+     NLSPATH
+     PATH_LOCALE
+     TERMINFO
+     TERMINFO_DIRS
+     TERMPATH
+     TERMCAP
      ENV
      BASH_ENV
+     LC_ (if it contains a '/' or '%')
+     LANG (if it contains a '/' or '%')
+     LANGUAGE (if it contains a '/' or '%')
      LD_*
      _RLD_*
      SHLIB_PATH (HP-UX only)
-     LIB_PATH (AIX only)
+     LIBPATH (AIX only)
      KRB_CONF (kerb4 only)
+     KRBCONFDIR (kerb4 only)
+     KRBTKFILE (kerb4 only)
      KRB5_CONFIG (kerb5 only)
+     VAR_ACE (SecurID only)
+     USR_ACE (SecurID only)
+     DLC_ACE (SecurID only)
 
 Q) How can I keep sudo from asking for a password?
 A) To specify this on a per-user (and per-command) basis, use the 'NOPASSWD'
@@ -130,6 +157,18 @@
 A) Some SVR4-derived OS's include a /usr/bin/cd command for reasons
    unfathomable.  A "cd" command is totally useless since a child process
    cannot affect the current working directory of the parent (your shell).
+
+Q) When I run sudo it says I am not alllowed to run the command as root
+   but I don't want to run it as root, I want to run it as another user.
+   My sudoers file entry looks like:
+    bob	ALL=(oracle) ALL
+A) The default user sudo tries to run things as is always root, even if
+   the invoking user can only run commands as a single, specific user.
+   This may change in the future but at the present time you have to
+   work around this using the 'runas_default' option in sudoers.
+   For example:
+    Defaults:bob	runas_default=oracle
+   would achieve the desired result ofr the preceding sudoers fragment.
 
 Q) How do you pronounce `sudo'?
 A) soo-doo (for superuser do).
Index: usr.bin/sudo/aclocal.m4
===================================================================
RCS file: usr.bin/sudo/aclocal.m4
diff -N usr.bin/sudo/aclocal.m4
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ usr.bin/sudo/aclocal.m4	16 Jan 2002 19:09:13 -0000
@@ -0,0 +1,346 @@
+dnl Local m4 macors for autoconf (used by sudo)
+dnl
+dnl Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
+dnl
+dnl XXX - should cache values in all cases!!!
+dnl
+dnl checks for programs
+
+dnl
+dnl check for sendmail
+dnl
+AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
+if test -f "/usr/sbin/sendmail"; then
+    AC_MSG_RESULT(/usr/sbin/sendmail)
+    SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/sbin/sendmail")
+elif test -f "/usr/lib/sendmail"; then
+    AC_MSG_RESULT(/usr/lib/sendmail)
+    SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/lib/sendmail")
+elif test -f "/usr/etc/sendmail"; then
+    AC_MSG_RESULT(/usr/etc/sendmail)
+    SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/etc/sendmail")
+elif test -f "/usr/ucblib/sendmail"; then
+    AC_MSG_RESULT(/usr/ucblib/sendmail)
+    SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/ucblib/sendmail")
+elif test -f "/usr/local/lib/sendmail"; then
+    AC_MSG_RESULT(/usr/local/lib/sendmail)
+    SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/local/lib/sendmail")
+elif test -f "/usr/local/bin/sendmail"; then
+    AC_MSG_RESULT(/usr/local/bin/sendmail)
+    SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/local/bin/sendmail")
+else
+    AC_MSG_RESULT(not found)
+fi
+])dnl
+
+dnl
+dnl check for vi
+dnl
+AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(for vi)
+if test -f "/usr/bin/vi"; then
+    AC_MSG_RESULT(/usr/bin/vi)
+    SUDO_DEFINE(_PATH_VI, "/usr/bin/vi")
+elif test -f "/usr/ucb/vi"; then
+    AC_MSG_RESULT(/usr/ucb/vi)
+    SUDO_DEFINE(_PATH_VI, "/usr/ucb/vi")
+elif test -f "/usr/bsd/vi"; then
+    AC_MSG_RESULT(/usr/bsd/vi)
+    SUDO_DEFINE(_PATH_VI, "/usr/bsd/vi")
+elif test -f "/bin/vi"; then
+    AC_MSG_RESULT(/bin/vi)
+    SUDO_DEFINE(_PATH_VI, "/bin/vi")
+elif test -f "/usr/local/bin/vi"; then
+    AC_MSG_RESULT(/usr/local/bin/vi)
+    SUDO_DEFINE(_PATH_VI, "/usr/local/bin/vi")
+else
+    AC_MSG_RESULT(not found)
+fi
+])dnl
+
+dnl
+dnl check for mv
+dnl
+AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
+if test -f "/usr/bin/mv"; then
+    AC_MSG_RESULT(/usr/bin/mv)
+    SUDO_DEFINE(_PATH_MV, "/usr/bin/mv")
+elif test -f "/bin/mv"; then
+    AC_MSG_RESULT(/bin/mv)
+    SUDO_DEFINE(_PATH_MV, "/bin/mv")
+elif test -f "/usr/ucb/mv"; then
+    AC_MSG_RESULT(/usr/ucb/mv)
+    SUDO_DEFINE(_PATH_MV, "/usr/ucb/mv")
+elif test -f "/usr/sbin/mv"; then
+    AC_MSG_RESULT(/usr/sbin/mv)
+    SUDO_DEFINE(_PATH_MV, "/usr/sbin/mv")
+else
+    AC_MSG_RESULT(not found)
+fi
+])dnl
+
+dnl
+dnl check for bourne shell
+dnl
+AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
+if test -f "/bin/sh"; then
+    AC_MSG_RESULT(/bin/sh)
+    SUDO_DEFINE(_PATH_BSHELL, "/bin/sh")
+elif test -f "/usr/bin/sh"; then
+    AC_MSG_RESULT(/usr/bin/sh)
+    SUDO_DEFINE(_PATH_BSHELL, "/usr/bin/sh")
+elif test -f "/sbin/sh"; then
+    AC_MSG_RESULT(/sbin/sh)
+    SUDO_DEFINE(_PATH_BSHELL, "/sbin/sh")
+elif test -f "/usr/sbin/sh"; then
+    AC_MSG_RESULT(/usr/sbin/sh)
+    SUDO_DEFINE(_PATH_BSHELL, "/usr/sbin/sh")
+elif test -f "/bin/ksh"; then
+    AC_MSG_RESULT(/bin/ksh)
+    SUDO_DEFINE(_PATH_BSHELL, "/bin/ksh")
+elif test -f "/usr/bin/ksh"; then
+    AC_MSG_RESULT(/usr/bin/ksh)
+    SUDO_DEFINE(_PATH_BSHELL, "/usr/bin/ksh")
+elif test -f "/bin/bash"; then
+    AC_MSG_RESULT(/bin/bash)
+    SUDO_DEFINE(_PATH_BSHELL, "/bin/bash")
+elif test -f "/usr/bin/bash"; then
+    AC_MSG_RESULT(/usr/bin/bash)
+    SUDO_DEFINE(_PATH_BSHELL, "/usr/bin/bash")
+else
+    AC_MSG_RESULT(not found)
+fi
+])dnl
+
+dnl
+dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
+dnl
+AC_DEFUN(SUDO_LOGFILE, [AC_MSG_CHECKING(for log file location)
+if test -n "$with_logpath"; then
+    AC_MSG_RESULT($with_logpath)
+    SUDO_DEFINE_UNQUOTED(_PATH_SUDO_LOGFILE, "$with_logpath")
+elif test -d "/var/log"; then
+    AC_MSG_RESULT(/var/log/sudo.log)
+    SUDO_DEFINE(_PATH_SUDO_LOGFILE, "/var/log/sudo.log")
+elif test -d "/var/adm"; then
+    AC_MSG_RESULT(/var/adm/sudo.log)
+    SUDO_DEFINE(_PATH_SUDO_LOGFILE, "/var/adm/sudo.log")
+elif test -d "/usr/adm"; then
+    AC_MSG_RESULT(/usr/adm/sudo.log)
+    SUDO_DEFINE(_PATH_SUDO_LOGFILE, "/usr/adm/sudo.log")
+else
+    AC_MSG_RESULT(unknown, you will have to set _PATH_SUDO_LOGFILE by hand)
+fi
+])dnl
+
+dnl
+dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
+dnl
+AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
+if test -n "$with_timedir"; then
+    AC_MSG_RESULT($with_timedir)
+    SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
+    timedir="$with_timedir"
+elif test -d "/var/run"; then
+    AC_MSG_RESULT(/var/run/sudo)
+    SUDO_DEFINE(_PATH_SUDO_TIMEDIR, "/var/run/sudo")
+    timedir="/var/run/sudo"
+else
+    AC_MSG_RESULT(/tmp/.odus)
+    SUDO_DEFINE(_PATH_SUDO_TIMEDIR, "/tmp/.odus")
+    timedir="/tmp/.odus"
+fi
+])dnl
+
+dnl
+dnl check for fullly working void
+dnl
+AC_DEFUN(SUDO_FULL_VOID, [AC_MSG_CHECKING(for full void implementation)
+AC_TRY_COMPILE(, [void *foo;
+foo = (void *)0; (void *)"test";], AC_DEFINE(VOID, void, [Define to "void" if your compiler supports void pointers, else use "char"].)
+AC_MSG_RESULT(yes), AC_DEFINE(VOID, char)
+AC_MSG_RESULT(no))])
+
+dnl
+dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
+dnl XXX - should require the check for unistd.h...
+dnl
+AC_DEFUN(SUDO_CHECK_TYPE,
+[AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(sudo_cv_type_$1,
+[AC_EGREP_CPP($1, [#include <sys/types.h>
+#include <stdio.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif], sudo_cv_type_$1=yes, sudo_cv_type_$1=no)])dnl
+AC_MSG_RESULT($sudo_cv_type_$1)
+if test $sudo_cv_type_$1 = no; then
+  AC_DEFINE($1, $2, [Define if your system lacks the $1 type.])
+fi
+])
+
+dnl
+dnl Check for size_t declation
+dnl
+AC_DEFUN(SUDO_TYPE_SIZE_T,
+[SUDO_CHECK_TYPE(size_t, int)])
+
+dnl
+dnl Check for ssize_t declation
+dnl
+AC_DEFUN(SUDO_TYPE_SSIZE_T,
+[SUDO_CHECK_TYPE(ssize_t, int)])
+
+dnl
+dnl Check for dev_t declation
+dnl
+AC_DEFUN(SUDO_TYPE_DEV_T,
+[SUDO_CHECK_TYPE(dev_t, int)])
+
+dnl
+dnl Check for ino_t declation
+dnl
+AC_DEFUN(SUDO_TYPE_INO_T,
+[SUDO_CHECK_TYPE(ino_t, unsigned int)])
+
+dnl
+dnl check for POSIX utime() using struct utimbuf
+dnl
+AC_DEFUN(SUDO_FUNC_UTIME_POSIX,
+[AC_MSG_CHECKING(for POSIX utime)
+AC_CACHE_VAL(sudo_cv_func_utime_posix,
+[rm -f conftestdata; > conftestdata
+AC_TRY_RUN([#include <sys/types.h>
+#include <sys/time.h>
+#include <utime.h>
+main() {
+struct utimbuf ut;
+ut.actime = ut.modtime = time(0);
+utime("conftestdata", &ut);
+exit(0);
+}], sudo_cv_func_utime_posix=yes, sudo_cv_func_utime_posix=no,
+  sudo_cv_func_utime_posix=no)
+rm -f core core.* *.core])dnl
+AC_MSG_RESULT($sudo_cv_func_utime_posix)
+if test $sudo_cv_func_utime_posix = yes; then
+  AC_DEFINE(HAVE_UTIME_POSIX, 1, [Define if you have a POSIX utime() (uses struct utimbuf).])
+fi
+])
+
+dnl
+dnl check for working fnmatch(3)
+dnl
+AC_DEFUN(SUDO_FUNC_FNMATCH,
+[AC_MSG_CHECKING(for working fnmatch with FNM_CASEFOLD)
+AC_CACHE_VAL(sudo_cv_func_fnmatch,
+[rm -f conftestdata; > conftestdata
+AC_TRY_RUN([#include <fnmatch.h>
+main() { exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", FNM_CASEFOLD)); }
+], sudo_cv_func_fnmatch=yes, sudo_cv_func_fnmatch=no,
+  sudo_cv_func_fnmatch=no)
+rm -f core core.* *.core])dnl
+AC_MSG_RESULT($sudo_cv_func_fnmatch)
+if test $sudo_cv_func_fnmatch = yes; then
+  [$1]
+else
+  [$2]
+fi
+])
+
+dnl
+dnl check for isblank(3)
+dnl
+AC_DEFUN([SUDO_FUNC_ISBLANK],
+  [AC_CACHE_CHECK([for isblank], sudo_cv_func_isblank,
+    [AC_TRY_LINK([#include <ctype.h>], [(void)isblank(1);],
+    sudo_cv_func_isblank=yes, sudo_cv_func_isblank=no)])
+] [
+  if test "$sudo_cv_func_isblank" = "yes"; then
+    AC_DEFINE(HAVE_ISBLANK, 1, [Define if you have isblank(3).])
+  fi
+])
+
+dnl
+dnl check for sa_len field in struct sockaddr
+dnl
+AC_DEFUN(SUDO_SOCK_SA_LEN,
+[AC_MSG_CHECKING(for sa_len field in struct sockaddr)
+AC_CACHE_VAL(sudo_cv_sock_sa_len,
+[AC_TRY_RUN([#include <sys/types.h>
+#include <sys/socket.h>
+main() {
+struct sockaddr s;
+s.sa_len = 0;
+exit(0);
+}], sudo_cv_sock_sa_len=yes, sudo_cv_sock_sa_len=no,
+  sudo_cv_sock_sa_len=no)
+rm -f core core.* *.core])dnl
+AC_MSG_RESULT($sudo_cv_sock_sa_len)
+if test $sudo_cv_sock_sa_len = yes; then
+  AC_DEFINE(HAVE_SA_LEN, 1, [Define if your struct sockadr has an sa_len field.])
+fi
+])
+
+dnl
+dnl check for max length of uid_t in string representation.
+dnl we can't really trust UID_MAX or MAXUID since they may exist
+dnl only for backwards compatibility.
+dnl
+AC_DEFUN(SUDO_UID_T_LEN,
+[AC_REQUIRE([AC_TYPE_UID_T])
+AC_MSG_CHECKING(max length of uid_t)
+AC_CACHE_VAL(sudo_cv_uid_t_len,
+[rm -f conftestdata
+AC_TRY_RUN(
+[#include <stdio.h>
+#include <pwd.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/param.h>
+main() {
+  FILE *f;
+  char b[1024];
+  uid_t u = (uid_t) -1;
+
+  if ((f = fopen("conftestdata", "w")) == NULL)
+    exit(1);
+
+  (void) sprintf(b, "%u", u);
+  (void) fprintf(f, "%d\n", strlen(b));
+  (void) fclose(f);
+  exit(0);
+}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10)
+])
+rm -f conftestdata
+AC_MSG_RESULT($sudo_cv_uid_t_len)
+AC_DEFINE_UNQUOTED(MAX_UID_T_LEN, $sudo_cv_uid_t_len, [Define to the max length of a uid_t in string context (excluding the NUL).])
+])
+
+dnl
+dnl check for "long long"
+dnl XXX hard to cache since it includes 2 tests
+dnl
+AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
+AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])
+[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).]))]
+AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])
+
+dnl
+dnl private versions of AC_DEFINE and AC_DEFINE_UNQUOTED that don't support
+dnl tracing that we use to define paths for pathnames.h so autoheader doesn't
+dnl put them in config.h.in.  An awful hack.
+dnl
+m4_define([SUDO_DEFINE],
+[cat >>confdefs.h <<\EOF
+[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
+EOF
+])
+
+m4_define([SUDO_DEFINE_UNQUOTED],
+[cat >>confdefs.h <<EOF
+[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
+EOF
+])
Index: usr.bin/sudo/acsite.m4
===================================================================
RCS file: usr.bin/sudo/acsite.m4
diff -N usr.bin/sudo/acsite.m4
--- usr.bin/sudo/acsite.m4	27 Mar 2000 03:44:37 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,315 +0,0 @@
-dnl Local m4 macors for autoconf (used by sudo)
-dnl
-dnl Copyright (c) 1994-1996,1998-1999 Todd C. Miller <Todd.Miller@courtesan.com>
-dnl
-dnl XXX - should cache values in all cases!!!
-dnl
-dnl checks for programs
-
-dnl
-dnl check for sendmail
-dnl
-AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
-if test -f "/usr/sbin/sendmail"; then
-    AC_MSG_RESULT(/usr/sbin/sendmail)
-    AC_DEFINE(_PATH_SENDMAIL, "/usr/sbin/sendmail")
-elif test -f "/usr/lib/sendmail"; then
-    AC_MSG_RESULT(/usr/lib/sendmail)
-    AC_DEFINE(_PATH_SENDMAIL, "/usr/lib/sendmail")
-elif test -f "/usr/etc/sendmail"; then
-    AC_MSG_RESULT(/usr/etc/sendmail)
-    AC_DEFINE(_PATH_SENDMAIL, "/usr/etc/sendmail")
-elif test -f "/usr/ucblib/sendmail"; then
-    AC_MSG_RESULT(/usr/ucblib/sendmail)
-    AC_DEFINE(_PATH_SENDMAIL, "/usr/ucblib/sendmail")
-elif test -f "/usr/local/lib/sendmail"; then
-    AC_MSG_RESULT(/usr/local/lib/sendmail)
-    AC_DEFINE(_PATH_SENDMAIL, "/usr/local/lib/sendmail")
-elif test -f "/usr/local/bin/sendmail"; then
-    AC_MSG_RESULT(/usr/local/bin/sendmail)
-    AC_DEFINE(_PATH_SENDMAIL, "/usr/local/bin/sendmail")
-else
-    AC_MSG_RESULT(not found)
-fi
-])dnl
-
-dnl
-dnl check for vi
-dnl
-AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(for vi)
-if test -f "/usr/bin/vi"; then
-    AC_MSG_RESULT(/usr/bin/vi)
-    AC_DEFINE(_PATH_VI, "/usr/bin/vi")
-elif test -f "/usr/ucb/vi"; then
-    AC_MSG_RESULT(/usr/ucb/vi)
-    AC_DEFINE(_PATH_VI, "/usr/ucb/vi")
-elif test -f "/usr/bsd/vi"; then
-    AC_MSG_RESULT(/usr/bsd/vi)
-    AC_DEFINE(_PATH_VI, "/usr/bsd/vi")
-elif test -f "/bin/vi"; then
-    AC_MSG_RESULT(/bin/vi)
-    AC_DEFINE(_PATH_VI, "/bin/vi")
-elif test -f "/usr/local/bin/vi"; then
-    AC_MSG_RESULT(/usr/local/bin/vi)
-    AC_DEFINE(_PATH_VI, "/usr/local/bin/vi")
-else
-    AC_MSG_RESULT(not found)
-fi
-])dnl
-
-dnl
-dnl check for mv
-dnl
-AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
-if test -f "/usr/bin/mv"; then
-    AC_MSG_RESULT(/usr/bin/mv)
-    AC_DEFINE(_PATH_MV, "/usr/bin/mv")
-elif test -f "/bin/mv"; then
-    AC_MSG_RESULT(/bin/mv)
-    AC_DEFINE(_PATH_MV, "/bin/mv")
-elif test -f "/usr/ucb/mv"; then
-    AC_MSG_RESULT(/usr/ucb/mv)
-    AC_DEFINE(_PATH_MV, "/usr/ucb/mv")
-elif test -f "/usr/sbin/mv"; then
-    AC_MSG_RESULT(/usr/sbin/mv)
-    AC_DEFINE(_PATH_MV, "/usr/sbin/mv")
-else
-    AC_MSG_RESULT(not found)
-fi
-])dnl
-
-dnl
-dnl check for bourne shell
-dnl
-AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
-if test -f "/bin/sh"; then
-    AC_MSG_RESULT(/bin/sh)
-    AC_DEFINE(_PATH_BSHELL, "/bin/sh")
-elif test -f "/usr/bin/sh"; then
-    AC_MSG_RESULT(/usr/bin/sh)
-    AC_DEFINE(_PATH_BSHELL, "/usr/bin/sh")
-elif test -f "/sbin/sh"; then
-    AC_MSG_RESULT(/sbin/sh)
-    AC_DEFINE(_PATH_BSHELL, "/sbin/sh")
-elif test -f "/usr/sbin/sh"; then
-    AC_MSG_RESULT(/usr/sbin/sh)
-    AC_DEFINE(_PATH_BSHELL, "/usr/sbin/sh")
-elif test -f "/bin/ksh"; then
-    AC_MSG_RESULT(/bin/ksh)
-    AC_DEFINE(_PATH_BSHELL, "/bin/ksh")
-elif test -f "/usr/bin/ksh"; then
-    AC_MSG_RESULT(/usr/bin/ksh)
-    AC_DEFINE(_PATH_BSHELL, "/usr/bin/ksh")
-elif test -f "/bin/bash"; then
-    AC_MSG_RESULT(/bin/bash)
-    AC_DEFINE(_PATH_BSHELL, "/bin/bash")
-elif test -f "/usr/bin/bash"; then
-    AC_MSG_RESULT(/usr/bin/bash)
-    AC_DEFINE(_PATH_BSHELL, "/usr/bin/bash")
-else
-    AC_MSG_RESULT(not found)
-fi
-])dnl
-
-dnl
-dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
-dnl
-AC_DEFUN(SUDO_LOGFILE, [AC_MSG_CHECKING(for log file location)
-if test -n "$with_logpath"; then
-    AC_MSG_RESULT($with_logpath)
-    AC_DEFINE_UNQUOTED(_PATH_SUDO_LOGFILE, "$with_logpath")
-elif test -d "/var/log"; then
-    AC_MSG_RESULT(/var/log/sudo.log)
-    AC_DEFINE(_PATH_SUDO_LOGFILE, "/var/log/sudo.log")
-elif test -d "/var/adm"; then
-    AC_MSG_RESULT(/var/adm/sudo.log)
-    AC_DEFINE(_PATH_SUDO_LOGFILE, "/var/adm/sudo.log")
-elif test -d "/usr/adm"; then
-    AC_MSG_RESULT(/usr/adm/sudo.log)
-    AC_DEFINE(_PATH_SUDO_LOGFILE, "/usr/adm/sudo.log")
-else
-    AC_MSG_RESULT(unknown, you will have to set _PATH_SUDO_LOGFILE by hand)
-fi
-])dnl
-
-dnl
-dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
-dnl
-AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
-if test -n "$with_timedir"; then
-    AC_MSG_RESULT($with_timedir)
-    AC_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
-    TIMEDIR="$with_timedir"
-elif test -d "/var/run"; then
-    AC_MSG_RESULT(/var/run/sudo)
-    AC_DEFINE(_PATH_SUDO_TIMEDIR, "/var/run/sudo")
-    TIMEDIR="/var/run/sudo"
-else
-    AC_MSG_RESULT(/tmp/.odus)
-    AC_DEFINE(_PATH_SUDO_TIMEDIR, "/tmp/.odus")
-    TIMEDIR="/tmp/.odus"
-fi
-])dnl
-
-dnl
-dnl check for fullly working void
-dnl
-AC_DEFUN(SUDO_FULL_VOID, [AC_MSG_CHECKING(for full void implementation)
-AC_TRY_COMPILE(, [void *foo;
-foo = (void *)0; (void *)"test";], AC_DEFINE(VOID, void)
-AC_MSG_RESULT(yes), AC_DEFINE(VOID, char)
-AC_MSG_RESULT(no))])
-
-dnl
-dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
-dnl XXX - should require the check for unistd.h...
-dnl
-AC_DEFUN(SUDO_CHECK_TYPE,
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(sudo_cv_type_$1,
-[AC_EGREP_CPP($1, [#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif], sudo_cv_type_$1=yes, sudo_cv_type_$1=no)])dnl
-AC_MSG_RESULT($sudo_cv_type_$1)
-if test $sudo_cv_type_$1 = no; then
-  AC_DEFINE($1, $2)
-fi
-])
-
-dnl
-dnl Check for size_t declation
-dnl
-AC_DEFUN(SUDO_TYPE_SIZE_T,
-[SUDO_CHECK_TYPE(size_t, int)])
-
-dnl
-dnl Check for ssize_t declation
-dnl
-AC_DEFUN(SUDO_TYPE_SSIZE_T,
-[SUDO_CHECK_TYPE(ssize_t, int)])
-
-dnl
-dnl Check for dev_t declation
-dnl
-AC_DEFUN(SUDO_TYPE_DEV_T,
-[SUDO_CHECK_TYPE(dev_t, int)])
-
-dnl
-dnl Check for ino_t declation
-dnl
-AC_DEFUN(SUDO_TYPE_INO_T,
-[SUDO_CHECK_TYPE(ino_t, unsigned int)])
-
-dnl
-dnl check for POSIX utime() using struct utimbuf
-dnl
-AC_DEFUN(SUDO_FUNC_UTIME_POSIX,
-[AC_MSG_CHECKING(for POSIX utime)
-AC_CACHE_VAL(sudo_cv_func_utime_posix,
-[rm -f conftestdata; > conftestdata
-AC_TRY_RUN([#include <sys/types.h>
-#include <sys/time.h>
-#include <utime.h>
-main() {
-struct utimbuf ut;
-ut.actime = ut.modtime = time(0);
-utime("conftestdata", &ut);
-exit(0);
-}], sudo_cv_func_utime_posix=yes, sudo_cv_func_utime_posix=no,
-  sudo_cv_func_utime_posix=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($sudo_cv_func_utime_posix)
-if test $sudo_cv_func_utime_posix = yes; then
-  AC_DEFINE(HAVE_UTIME_POSIX)
-fi
-])
-
-dnl
-dnl check for working fnmatch(3)
-dnl
-AC_DEFUN(SUDO_FUNC_FNMATCH,
-[AC_MSG_CHECKING(for working fnmatch with FNM_CASEFOLD)
-AC_CACHE_VAL(sudo_cv_func_fnmatch,
-[rm -f conftestdata; > conftestdata
-AC_TRY_RUN([#include <fnmatch.h>
-main() { exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", FNM_CASEFOLD)); }
-], sudo_cv_func_fnmatch=yes, sudo_cv_func_fnmatch=no,
-  sudo_cv_func_fnmatch=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($sudo_cv_func_fnmatch)
-if test $sudo_cv_func_fnmatch = yes; then
-  [$1]
-else
-  [$2]
-fi
-])
-
-dnl
-dnl check for sa_len field in struct sockaddr
-dnl
-AC_DEFUN(SUDO_SOCK_SA_LEN,
-[AC_MSG_CHECKING(for sa_len field in struct sockaddr)
-AC_CACHE_VAL(sudo_cv_sock_sa_len,
-[AC_TRY_RUN([#include <sys/types.h>
-#include <sys/socket.h>
-main() {
-struct sockaddr s;
-s.sa_len = 0;
-exit(0);
-}], sudo_cv_sock_sa_len=yes, sudo_cv_sock_sa_len=no,
-  sudo_cv_sock_sa_len=no)
-rm -f core core.* *.core])dnl
-AC_MSG_RESULT($sudo_cv_sock_sa_len)
-if test $sudo_cv_sock_sa_len = yes; then
-  AC_DEFINE(HAVE_SA_LEN)
-fi
-])
-
-dnl
-dnl check for max length of uid_t in string representation.
-dnl we can't really trust UID_MAX or MAXUID since they may exist
-dnl only for backwards compatibility.
-dnl
-AC_DEFUN(SUDO_UID_T_LEN,
-[AC_REQUIRE([AC_TYPE_UID_T])
-AC_MSG_CHECKING(max length of uid_t)
-AC_CACHE_VAL(sudo_cv_uid_t_len,
-[rm -f conftestdata
-AC_TRY_RUN(
-[#include <stdio.h>
-#include <pwd.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/param.h>
-main() {
-  FILE *f;
-  char b[1024];
-  uid_t u = (uid_t) -1;
-
-  if ((f = fopen("conftestdata", "w")) == NULL)
-    exit(1);
-
-  (void) sprintf(b, "%u", u);
-  (void) fprintf(f, "%d\n", strlen(b));
-  (void) fclose(f);
-  exit(0);
-}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10)
-])
-rm -f conftestdata
-AC_MSG_RESULT($sudo_cv_uid_t_len)
-AC_DEFINE_UNQUOTED(MAX_UID_T_LEN, $sudo_cv_uid_t_len)
-])
-
-dnl
-dnl check for "long long"
-dnl XXX hard to cache since it includes 2 tests
-dnl
-AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
-AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG)
-[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD))]
-AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])
Index: usr.bin/sudo/alloc.c
===================================================================
RCS file: /cvs/src/usr.bin/sudo/alloc.c,v
retrieving revision 1.2
diff -u -r1.2 alloc.c
--- usr.bin/sudo/alloc.c	5 Jun 2000 14:01:15 -0000	1.2
+++ usr.bin/sudo/alloc.c	16 Jan 2002 19:09:13 -0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2002 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,36 +34,35 @@
 
 #include "config.h"
 
+#include <sys/types.h>
+#include <sys/param.h>
 #include <stdio.h>
 #ifdef STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
 #endif /* STDC_HEADERS */
 #ifdef HAVE_STRING_H
-#include <string.h>
+# include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+#  include <strings.h>
+# endif
 #endif /* HAVE_STRING_H */
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif /* HAVE_STRINGS_H */
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-#include <malloc.h>
+# include <malloc.h>
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
-#include <sys/param.h>
-#include <sys/types.h>
 
 #include "sudo.h"
 
-#ifndef STDC_HEADERS
-#if !defined(__GNUC__) && !defined(HAVE_MALLOC_H)
-extern VOID *malloc	__P((size_t));
-#endif /* !__GNUC__ && !HAVE_MALLOC_H */
-#endif /* !STDC_HEADERS */
-
-extern char **Argv;		/* from sudo.c */
-
 #ifndef lint
-static const char rcsid[] = "$Sudo: alloc.c,v 1.8 1999/07/31 16:19:44 millert Exp $";
+static const char rcsid[] = "$Sudo: alloc.c,v 1.11 2002/01/09 16:56:04 millert Exp $";
 #endif /* lint */
 
+extern char **Argv;		/* from sudo.c */
 
 /*
  * emalloc() calls the system malloc(3) and exits with an error if
@@ -75,7 +74,7 @@
 {
     VOID *ptr;
 
-    if ((ptr = malloc(size)) == NULL) {
+    if ((ptr = (VOID *) malloc(size)) == NULL) {
 	(void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
 	exit(1);
     }
@@ -93,7 +92,8 @@
     size_t size;
 {
 
-    if ((ptr = ptr ? realloc(ptr, size) : malloc(size)) == NULL) {
+    ptr = ptr ? (VOID *) realloc(ptr, size) : (VOID *) malloc(size);
+    if (ptr == NULL) {
 	(void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
 	exit(1);
     }
Index: usr.bin/sudo/check.c
===================================================================
RCS file: /cvs/src/usr.bin/sudo/check.c,v
retrieving revision 1.5
diff -u -r1.5 check.c
--- usr.bin/sudo/check.c	30 Mar 2001 13:56:57 -0000	1.5
+++ usr.bin/sudo/check.c	16 Jan 2002 19:09:13 -0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994-1996,1998-1999 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1993-1996,1998-2001 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,34 +34,40 @@
 
 #include "config.h"
 
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/file.h>
 #include <stdio.h>
 #ifdef STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
 #endif /* STDC_HEADERS */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
 #ifdef HAVE_STRING_H
-#include <string.h>
+# include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+#  include <strings.h>
+# endif
 #endif /* HAVE_STRING_H */
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif /* HAVE_STRINGS_H */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <time.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/file.h>
 #include <pwd.h>
 #include <grp.h>
 
 #include "sudo.h"
 
 #ifndef lint
-static const char rcsid[] = "$Sudo: check.c,v 1.194 2000/02/15 23:36:03 millert Exp $";
+static const char rcsid[] = "$Sudo: check.c,v 1.202 2001/12/14 19:52:47 millert Exp $";
 #endif /* lint */
 
 /* Status codes for timestamp_status() */
@@ -226,10 +232,10 @@
     struct group *grp;
     char **gr_mem;
 
-    if (!def_str(I_EXEMPT_GRP))
+    if (!def_str(I_EXEMPT_GROUP))
 	return(FALSE);
 
-    if (!(grp = getgrnam(def_str(I_EXEMPT_GRP))))
+    if (!(grp = getgrnam(def_str(I_EXEMPT_GROUP))))
 	return(FALSE);
 
     if (user_gid == grp->gr_gid)
@@ -424,24 +430,29 @@
      * If the file/dir exists, check its mtime.
      */
     if (status == TS_OLD) {
-	now = time(NULL);
-	if (def_ival(I_TS_TIMEOUT) && 
-	    now - sb.st_mtime < 60 * def_ival(I_TS_TIMEOUT)) {
-	    /*
-	     * Check for bogus time on the stampfile.  The clock may
-	     * have been set back or someone could be trying to spoof us.
-	     */
-	    if (sb.st_mtime > now + 60 * def_ival(I_TS_TIMEOUT) * 2) {
-		log_error(NO_EXIT,
-		    "timestamp too far in the future: %20.20s",
-		    4 + ctime(&sb.st_mtime));
-		if (timestampfile)
-		    (void) unlink(timestampfile);
-		else
-		    (void) rmdir(timestampdir);
-		status = TS_MISSING;
-	    } else
-		status = TS_CURRENT;
+	/* Negative timeouts only expire manually (sudo -k). */
+	if (def_ival(I_TIMESTAMP_TIMEOUT) < 0 && sb.st_mtime != 0)
+	    status = TS_CURRENT;
+	else {
+	    now = time(NULL);
+	    if (def_ival(I_TIMESTAMP_TIMEOUT) && 
+		now - sb.st_mtime < 60 * def_ival(I_TIMESTAMP_TIMEOUT)) {
+		/*
+		 * Check for bogus time on the stampfile.  The clock may
+		 * have been set back or someone could be trying to spoof us.
+		 */
+		if (sb.st_mtime > now + 60 * def_ival(I_TIMESTAMP_TIMEOUT) * 2) {
+		    log_error(NO_EXIT,
+			"timestamp too far in the future: %20.20s",
+			4 + ctime(&sb.st_mtime));
+		    if (timestampfile)
+			(void) unlink(timestampfile);
+		    else
+			(void) rmdir(timestampdir);
+		    status = TS_MISSING;
+		} else
+		    status = TS_CURRENT;
+	    }
 	}
     }
 
Index: usr.bin/sudo/compat.h
===================================================================
RCS file: /cvs/src/usr.bin/sudo/compat.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 compat.h
--- usr.bin/sudo/compat.h	18 Nov 1999 16:29:01 -0000	1.1.1.1
+++ usr.bin/sudo/compat.h	16 Jan 2002 19:09:13 -0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $Sudo: compat.h,v 1.54 1999/10/08 01:12:49 millert Exp $
+ * $Sudo: compat.h,v 1.62 2002/01/08 15:00:18 millert Exp $
  */
 
 #ifndef _SUDO_COMPAT_H
@@ -145,7 +145,30 @@
 #endif
 
 /*
- * Emulate seteuid() for HP-UX via setresuid(2) and seteuid(2) for others.
+ * Simple isblank() macro for systems without it.
+ */
+#ifndef HAVE_ISBLANK
+# define isblank(_x)	((_x) == ' ' || (_x) == '\t')
+#endif
+
+/*
+ * Old BSD systems lack strchr(), strrchr(), memset() and memcpy()
+ */
+#if !defined(HAVE_STRCHR) && !defined(strchr)
+# define strchr(_s, _c)	index(_s, _c)
+#endif
+#if !defined(HAVE_STRRCHR) && !defined(strrchr)
+# define strrchr(_s, _c)	rindex(_s, _c)
+#endif
+#if !defined(HAVE_MEMCPY) && !defined(memcpy)
+# define memcpy(_d, _s, _n)	(bcopy(_s, _d, _n))
+#endif
+#if !defined(HAVE_MEMSET) && !defined(memset)
+# define memset(_s, _x, _n)	(bzero(_s, _n))
+#endif
+
+/*
+ * Emulate sete[ug]id() via setres[ug]id(2) or setre[ug]id(2)
  */
 #ifndef HAVE_SETEUID
 # ifdef __hpux
@@ -154,6 +177,29 @@
 #  define seteuid(_EUID)	(setreuid((uid_t) -1, _EUID))
 # endif /* __hpux */
 #endif /* HAVE_SETEUID */
+#ifndef HAVE_SETEGID
+# ifdef __hpux
+#  define setegid(_EGID)	(setresgid((gid_t) -1, _EGID, (gid_t) -1))
+# else
+#  define setegid(_EGID)	(setregid((gid_t) -1, _EGID))
+# endif /* __hpux */
+#endif /* HAVE_SETEGID */
+
+/*
+ * Emulate setreuid() for HP-UX via setresuid(2)
+ */
+#if !defined(HAVE_SETREUID) && defined(__hpux)
+# define setreuid(_RUID, _EUID)	(setresuid(_RUID, _EUID, (uid_t) -1))
+# define HAVE_SETREUID
+#endif /* !HAVE_SETEUID && __hpux */
+
+/*
+ * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason.
+ */
+#ifdef HAVE__INNETGR
+# define innetgr(n, h, u, d)	(_innetgr(n, h, u, d))
+# define HAVE_INNETGR 1
+#endif /* HAVE__INNETGR */
 
 /*
  * On POSIX systems, O_NOCTTY is the default so some OS's may lack this define.
@@ -161,5 +207,42 @@
 #ifndef O_NOCTTY
 # define O_NOCTTY	0
 #endif /* O_NOCTTY */
+
+/*
+ * Emulate POSIX signals via sigvec(2)
+ */
+#ifndef HAVE_SIGACTION
+# define SA_ONSTACK	SV_ONSTACK
+# define SA_RESTART	SV_INTERRUPT		/* opposite effect */
+# define SA_RESETHAND	SV_RESETHAND
+# define sa_handler	sv_handler
+# define sa_mask	sv_mask
+# define sa_flags	sv_flags
+typedef struct sigvec sigaction_t;
+typedef int sigset_t;
+int sigaction __P((int sig, const sigaction_t *act, sigaction_t *oact));
+int sigemptyset __P((sigset_t *));
+int sigfillset __P((sigset_t *));
+int sigaddset __P((sigset_t *, int));
+int sigdelset __P((sigset_t *, int));
+int sigismember __P((sigset_t *, int));
+int sigprocmask __P((int, const sigset_t *, sigset_t *));
+#endif
+
+/*
+ * Extra sugar for POSIX signals to deal with the above emulation
+ * as well as the fact that SunOS has a SA_INTERRUPT flag.
+ */
+#ifdef HAVE_SIGACTION
+# ifndef HAVE_SIGACTION_T
+typedef struct sigaction sigaction_t;
+# endif
+# ifndef SA_INTERRUPT 
+#  define SA_INTERRUPT	0
+# endif
+# ifndef SA_RESTART 
+#  define SA_RESTART	0
+# endif
+#endif
 
 #endif /* _SUDO_COMPAT_H */
Index: usr.bin/sudo/config.guess
===================================================================
RCS file: /cvs/src/usr.bin/sudo/config.guess,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 config.guess
--- usr.bin/sudo/config.guess	18 Nov 1999 16:29:01 -0000	1.1.1.1
+++ usr.bin/sudo/config.guess	16 Jan 2002 19:09:13 -0000
@@ -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-07-12'
+
 # 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,58 +25,259 @@
 # 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, 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" >&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.
+
+set_cc_for_build='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.)
+# (ghazi@noc.rutgers.edu 1994-08-24)
 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
 	PATH=$PATH:/.attbin ; export PATH
 fi
 
 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)
+		eval $set_cc_for_build
+		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
+	eval $set_cc_for_build
+	$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 +285,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 +315,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 +383,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 +408,16 @@
 	  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
+	eval $set_cc_for_build
+	$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 +433,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 +465,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 +489,9 @@
 			exit(0);
 			}
 EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
+		eval $set_cc_for_build
+		$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 +499,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 +509,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 +519,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 +534,76 @@
     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
+	eval $set_cc_for_build
+	(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 +628,9 @@
 	  exit (0);
 	}
 EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
+	eval $set_cc_for_build
+	$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 +639,16 @@
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
 	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*: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 +658,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 ;;
@@ -351,112 +683,225 @@
 	echo xmp-cray-unicos
         exit 0 ;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE}
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
 	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}
-	exit 0 ;;
-    hp3[0-9][05]:OpenBSD:*:*)
-	echo m68k-hp-openbsd${UNAME_RELEASE}
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-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 ;;
+    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:*:*)
+	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
+	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
+	esac
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev67 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	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 ;;
-    *:Linux:*:*)
+    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.
-	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-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-	  echo "powerpc-unknown-linux-gnu" ; exit 0
-	elif test "${UNAME_MACHINE}" = "alpha" ; then
-	  echo alpha-unknown-linux-gnu ; exit 0
-	elif test "${UNAME_MACHINE}" = "sparc" ; then
-	  echo sparc-unknown-linux-gnu ; exit 0
-	else
-	  # 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.
-	  test ! -d /usr/lib/ldscripts/. \
-	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-	  # Determine whether the default compiler is a.out or elf
-	  cat >dummy.c <<EOF
-main(argc, argv)
-int argc;
-char *argv[];
-{
+	# 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_targets=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;		
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	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-gnu\n", argv[1]);
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-pc-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+# endif
 #else
   printf ("%s-pc-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 ;;
-# 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*:*)
+	eval $set_cc_for_build
+	$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
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# 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.
 	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:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	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 +910,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 +947,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,25 +958,31 @@
     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*:SINIX-*:*:* | RM*:ReliantUNIX-*:*:*)
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
 	exit 0 ;;
     *:SINIX-*:*:*)
@@ -529,6 +993,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 +1009,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 +1141,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 +1189,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 +1217,9 @@
 }
 EOF
 
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
+eval $set_cc_for_build
+$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 +1251,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:
Index: usr.bin/sudo/config.h.in
===================================================================
RCS file: /cvs/src/usr.bin/sudo/config.h.in,v
retrieving revision 1.5
diff -u -r1.5 config.h.in
--- usr.bin/sudo/config.h.in	21 Nov 2000 17:58:43 -0000	1.5
+++ usr.bin/sudo/config.h.in	17 Jan 2002 01:05:35 -0000
@@ -1,527 +1,532 @@
-/*
- * Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * 4. Products derived from this software may not be called "Sudo" nor
- *    may "Sudo" appear in their names without specific prior written
- *    permission from the author.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Sudo: config.h.in,v 1.144 2000/03/07 04:29:42 millert Exp $
- */
-
-/*
- * config.h -- You shouldn't edit this by hand unless you are
- *             NOT using configure.
- */
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
 
 #ifndef _SUDO_CONFIG_H
 #define _SUDO_CONFIG_H
 
-/* New ANSI-style OS defs.  */
-#if defined(hpux) && !defined(__hpux)
-#  define __hpux	1
-#endif /* hpux */
+/* Define if the `syslog' function returns a non-zero int to denote failure.
+   */
+#undef BROKEN_SYSLOG
 
-#if defined(convex) && !defined(__convex__)
-#  define __convex__	1
-#endif /* convex */
+/* Define if you want the insults from the "classic" version sudo. */
+#undef CLASSIC_INSULTS
 
-/* Define if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
-#ifndef _ALL_SOURCE
-#undef _ALL_SOURCE
-#endif
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
 
-/* Define if on ConvexOs.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
-#ifndef _CONVEX_SOURCE
-#undef _CONVEX_SOURCE
-#endif
+/* Define if you want insults culled from the twisted minds of CSOps. */
+#undef CSOPS