summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/bison/AUTHORS8
-rw-r--r--contrib/bison/ChangeLog.doc101
-rw-r--r--contrib/bison/ChangeLog.src480
-rw-r--r--contrib/bison/FREEBSD-Xlist12
-rw-r--r--contrib/bison/FREEBSD-upgrade41
-rw-r--r--contrib/bison/Makefile.am27
-rw-r--r--contrib/bison/acconfig.h56
-rw-r--r--contrib/bison/acinclude.m460
-rw-r--r--contrib/bison/aclocal.m4682
-rw-r--r--contrib/bison/alloc.h36
-rw-r--r--contrib/bison/config.hin179
-rw-r--r--contrib/bison/stamp-vti3
-rw-r--r--contrib/bison/version.texi3
-rw-r--r--gnu/usr.bin/bison/config.h180
-rw-r--r--lib/libc/sys/aio_cancel.278
-rw-r--r--lib/libc/sys/aio_error.293
-rw-r--r--lib/libc/sys/aio_return.295
-rw-r--r--lib/libc/sys/aio_suspend.290
-rw-r--r--lib/libc/sys/aio_write.2192
-rw-r--r--share/man/man4/man4.i386/ukbd.4168
-rw-r--r--share/man/man4/man4.i386/ums.4123
-rw-r--r--sys/dev/vinum/vinumraid5.c694
-rw-r--r--sys/modules/vinum/.gdbinit.kernel639
-rw-r--r--sys/modules/vinum/.gdbinit.vinum247
24 files changed, 4287 insertions, 0 deletions
diff --git a/contrib/bison/AUTHORS b/contrib/bison/AUTHORS
new file mode 100644
index 000000000000..0a3ca6fd51fd
--- /dev/null
+++ b/contrib/bison/AUTHORS
@@ -0,0 +1,8 @@
+Authors of GNU Bison.
+
+Bison was written primarily by Robert Corbett.
+
+Richard Stallman made it Yacc-compatible.
+
+Wilfred Hansen of Carnegie Mellon University added multicharacter
+string literals and other features.
diff --git a/contrib/bison/ChangeLog.doc b/contrib/bison/ChangeLog.doc
new file mode 100644
index 000000000000..5690ebd5d6d9
--- /dev/null
+++ b/contrib/bison/ChangeLog.doc
@@ -0,0 +1,101 @@
+Tue Jun 8 19:00:57 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.1: Dropped mention of `+' for long-named options.
+
+Sun May 30 13:07:48 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * FAQ, Makefile.am: Added a FAQ list.
+
+Sun Apr 18 16:29:23 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * .cvsignore, Makefile.am:
+ Reorganized: sources in `src', documentation in `doc'.
+
+Thu Jan 14 15:08:17 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.texinfo: Fix formatting glitch.
+
+ * bison.texinfo: Update FSF address.
+
+Wed Dec 30 05:24:00 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.texinfo:
+ Delete comment "consider using @set for edition number, etc..." since
+ we now are doing so.
+
+Sat Nov 28 21:44:16 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.texinfo: Add info dir entry.
+
+ * bison.texinfo: Let automake put version number into documentation.
+
+Thu Nov 26 00:14:37 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.1: Document the BISON_HAIRY and BISON_SIMPLE variables.
+
+Wed Nov 25 22:11:01 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.texinfo: Clean up some formatting.
+
+Tue May 5 22:18:45 1998 Richard Stallman <rms@gnu.org>
+
+ * bison.texinfo: Explain better why to make a pure parser.
+
+Wed Nov 29 01:26:22 1995 Daniel Hagerty <hag@gnu.org>
+
+ * bison.texinfo: Fixed update date
+
+Wed Nov 29 01:22:34 1995 Richard Stallman <rms@gnu.org>
+
+ * bison.texinfo:
+ Describe literal string tokens, %raw, %no_lines, %token_table.
+
+Mon Oct 16 14:12:23 1995 Richard Stallman <rms@gnu.org>
+
+ * bison.1, bison.rnh: Add new options.
+
+Thu Jun 1 13:54:23 1995 Jim Meyering <meyering@gnu.org>
+
+ * bison.texinfo: *** empty log message ***
+
+Wed May 3 15:13:10 1995 Richard Stallman <rms@gnu.org>
+
+ * bison.texinfo: Rewrite "Conditions for Using Bison".
+ Update version to 1.24.
+
+Sun Nov 21 22:03:08 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.texinfo: entered into RCS
+
+ * bison.texinfo: *** empty log message ***
+
+Mon Oct 25 23:45:06 1993 David J. MacKenzie <djm@gnu.org>
+
+ * bison.texinfo: *** empty log message ***
+
+Tue Sep 14 20:43:31 1993 David J. MacKenzie <djm@gnu.org>
+
+ * bison.texinfo: *** empty log message ***
+
+Fri Sep 10 12:02:53 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.1: entered into RCS
+
+Sat Jun 26 20:09:41 1993 David J. MacKenzie <djm@gnu.org>
+
+ * bison.texinfo: *** empty log message ***
+
+ * bison.1: Initial revision
+
+Thu Jun 3 20:24:26 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.texinfo: *** empty log message ***
+
+Wed May 19 03:41:36 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.texinfo: Initial revision
+
+Mon Jun 22 04:07:24 1992 Richard Stallman <rms@gnu.org>
+
+ * bison.rnh: entered into RCS
+
diff --git a/contrib/bison/ChangeLog.src b/contrib/bison/ChangeLog.src
new file mode 100644
index 000000000000..429988b58f68
--- /dev/null
+++ b/contrib/bison/ChangeLog.src
@@ -0,0 +1,480 @@
+Mon Jun 14 22:35:15 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * system.h: Squashed redefinition warning on some systems.
+
+ * Attic/version.c, Makefile.am, getargs.c, reader.c:
+ Have configure build version string instead of relying on ANSI string
+ concatentation.
+
+Sun May 30 13:17:48 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * files.c: Added <unistd.h> for unlink().
+
+ * Makefile.am, system.h: I18n fixes.
+
+Wed May 19 11:24:34 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * Attic/version.c, alloc.h, symtab.h:
+ Protected inclusion of "config.h" with HAVE_CONFIG_H.
+
+Sun Apr 18 16:29:23 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * .cvsignore, Makefile.am:
+ Reorganized: sources in `src', documentation in `doc'.
+
+ * lex.c (literalchar):
+ fixed the code for escaping double quotes (thanks
+ Jonathan Czisny.)
+
+Tue Apr 13 19:53:41 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * allocate.c: Don't declare calloc() and realloc() if not necessary.
+
+Mon Mar 22 16:30:00 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.s1: Fixed #line numbers.
+
+Fri Feb 12 15:18:12 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * files.c, files.h:
+ Defined locations of parser files in config.h instead of Makefile.
+
+Wed Jan 20 22:55:06 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * LR0.c, conflicts.c, output.c, reader.c: Hush a few compiler warnings.
+
+ * files.c: Add tryclose(), which verifies that fclose was successful.
+ Hush a couple of compiler warnings.
+
+Thu Jan 14 14:58:38 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * gram.h, lalr.c, lex.c, lex.h, machine.h, main.c, nullable.c, output.c, print.c, reader.c, reduce.c, state.h, symtab.c, symtab.h, types.h, vmsgetargs.c, warshall.c, LR0.c, alloc.h, allocate.c, bison.s1, closure.c, conflicts.c, derives.c, files.c, files.h, getargs.c, gram.c:
+ Update FSF address.
+
+Fri Jan 8 21:17:26 1999 Jesse Thilo <jthilo@gnu.org>
+
+ * system.h: Don't define PACKAGE here, since config.h defines it.
+
+Wed Dec 30 06:54:16 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * reader.c: Update copyright date.
+
+ * main.c:
+ Ditch sprintf to statically-sized buffers in fatal/warn functions in
+ favor of output directly to stderr (avoids buffer overruns).
+
+ * reader.c: Some checks for premature EOF.
+
+ * LR0.c, alloc.h, allocate.c, closure.c, conflicts.c, derives.c, getargs.c, gram.c, lalr.c, lex.c, main.c, nullable.c, output.c, print.c, reduce.c, symtab.c, symtab.h, warshall.c:
+ Use prototypes if the compiler understands them.
+
+ * files.c: Honor TMPDIR on Unix hosts.
+ Use prototypes if the compiler understands them.
+
+ * reader.c: Fix a couple of buffer overrun bugs.
+ Use prototypes if the compiler understands them.
+
+ * system.h: Include unistd.h and ctype.h.
+ Use #ifdef instead of #if for NLS symbols.
+
+Tue Dec 29 21:54:26 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * Attic/version.c: Use VERSION symbol from automake for version number.
+
+Thu Nov 26 00:44:18 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * bison.cld, build.com, vmshlp.mar:
+ Add non-RCS files from /gd/gnu/bison.
+
+Wed Nov 25 22:21:43 1998 Jesse Thilo <jthilo@gnu.org>
+
+ * Attic/version.c: Build version.c automatically.
+
+ * reader.c: Fix token numbering (used to start at 258, not 257).
+
+ * system.h: Include config.h.
+
+ * getargs.c: Update bug report address.
+
+ * alloca.c, getopt.c, getopt.h, getopt1.c:
+ Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
+
+Mon Jan 5 00:25:39 1998 Richard Stallman <rms@gnu.org>
+
+ * files.c (openfiles): [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
+ find a temporary directory, if possible. Do not unlink files while
+ they are open.
+
+Mon Aug 25 19:40:12 1997 Richard Stallman <rms@gnu.org>
+
+ * reader.c (stack_offset;): Change some warni to warns.
+
+ * lex.c (literalchar): Use warns, not warni.
+
+Sat Jun 28 19:41:24 1997 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Add a Bison version comment.
+
+ * main.c (fatal, warn, berror): Use program_name.
+
+Wed Jun 18 17:09:27 1997 Richard Stallman <rms@gnu.org>
+
+ * main.c (fatal, warn, berror): Make error messages standard.
+ (toomany): Improve error message text.
+
+ * LR0.c, closure.c, conflicts.c, derives.c, files.c, lalr.c, lex.c, nullable.c, output.c, print.c, reader.c, reduce.c, symtab.c:
+ new.h renamed to alloc.h.
+
+Sat May 24 08:04:42 1997 Richard Stallman <rms@gnu.org>
+
+ * lex.c (literalchar): Fix the code for escaping \, " and '.
+
+ (lex): Avoid trouble when there are many chars
+ to discard in a char literal with just several chars in it.
+
+Sat May 17 18:44:24 1997 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Use malloc, if using alloca is troublesome.
+ (YYSTACK_USE_ALLOCA): New flag macro.
+ Define it for some systems and compilers.
+ (YYSTACK_ALLOC): New macro.
+ (yyparse): Use YYSTACK_ALLOC to allocate stack.
+ If it was malloc'd, free it.
+
+Wed Apr 23 18:01:25 1997 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: (alloca) [__hpux]: Always define as __builtin_alloca.
+
+Tue Apr 22 22:23:48 1997 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: [__hpux]: Include alloca.h (right for HPUX 10)
+ instead of declaring alloca (right for HPUX 9).
+
+ * bison.s1 (__yy_memcpy): Declare arg `count' as unsigned int.
+ (yyparse): Cast third arg to __yy_memcpy to unsigned int.
+
+Fri Jan 3 01:24:27 1997 Richard Stallman <rms@gnu.org>
+
+ * allocate.c: [__STDC__ or _MSC_VER]:
+ Declare calloc and realloc to return void *.
+
+Thu Jan 2 07:03:45 1997 Richard Stallman <rms@gnu.org>
+
+ * system.h: [_MSC_VER]: Include stdlib.h and process.h.
+ [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
+
+ * main.c (main): Return FAILURE as a value.
+ (printable_version): Declare arg as int, not char.
+
+Thu Dec 19 08:24:56 1996 Richard Stallman <rms@gnu.org>
+
+ * files.c:
+ [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
+
+Wed Dec 18 02:18:10 1996 Paul Eggert <eggert@gnu.org>
+
+ * bison.s1 (yyparse): If __GNUC__ and YYPARSE_PARAM are both defined,
+ declare yyparse to have a void * argument.
+
+Tue Dec 17 06:20:27 1996 Richard Stallman <rms@gnu.org>
+
+ * reduce.c (nbits): Add some casts.
+
+Mon Aug 12 22:17:15 1996 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Test _MSDOS as well as _MSDOS_.
+
+Wed Jul 31 19:18:57 1996 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: [__sun && __i386]: Include alloca.h.
+
+Tue Jul 30 04:37:37 1996 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Comment change.
+
+ * bison.s1: Test _MSDOS_, not MSDOS.
+
+Sat Jun 1 22:10:15 1996 Richard Stallman <rms@gnu.org>
+
+ * reduce.c, reader.c, print.c, output.c, nullable.c, lex.c, lalr.c, getargs.c, derives.c, conflicts.c, closure.c, allocate.c:
+ Insert `_' macro around many string constants.
+
+ * main.c: Insert `_' macro around many string constants.
+
+ (main): Call setlocale, bindtextdomain and textdomain.
+
+ * system.h: [HAVE_LOCALE_H]: Include locale.h.
+ [! HAVE_LOCALE_H] (setlocale): Define as no-op.
+ [ENABLE_NLS]: Include libintl.h.
+ [ENABLE_NLS] (gettext): Define.
+ [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
+ (N_, PACKAGE, LOCALEDIR): New macros.
+
+Sun May 12 22:17:15 1996 Richard Stallman <rms@gnu.org>
+
+ * bison.s1:
+ (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
+
+Sat May 11 19:19:55 1996 Richard Stallman <rms@gnu.org>
+
+ * bison.s1 (__yy_memcpy):
+ Really reorder the args, as was supposedly done on Feb 14 1995.
+ (yyparse): Calls changed accordingly.
+
+Sat Jan 27 08:26:26 1996 Richard Stallman <rms@gnu.org>
+
+ * output.c (output_rule_data): Test YYERROR_VERBOSE in the conditional
+ around the definition of ttyname.
+
+Fri Dec 29 04:29:18 1995 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Fix line numbers in #line commands.
+
+Wed Dec 27 12:43:49 1995 Richard Stallman <rms@gnu.org>
+
+ * bison.s1 (YYPARSE_PARAM_DECL): In C++, make it always null.
+ (YYPARSE_PARAM_ARG): New macro.
+ (yyparse): Use YYPARSE_PARAM_ARG.
+
+Mon Oct 16 14:12:01 1995 Richard Stallman <rms@gnu.org>
+
+ * Attic/version.c: Version 1.25.
+
+Sun Oct 15 20:22:50 1995 Richard Stallman <rms@gnu.org>
+
+ * vmsgetargs.c, getargs.c: Added -n, -k, and -raw switches.
+ (noparserflag, toknumflag, rawtoknumflag): New variables.
+
+ * symtab.h (SALIAS): New #define for adding aliases to %token.
+ (struct bucket): Added `alias' field.
+
+ * reduce.c (reduce_grammar): Revise error message.
+ (print_notices): Remove final `.' from error message.
+
+ * reader.c (reader_output_yylsp): New function.
+ (readgram): Use `#if 0' around code that accepted %command
+ inside grammar rules: The documentation doesn't allow it,
+ and it will fail since the %command processors scan for the next %.
+ (parse_token_decl): Extended the %token
+ declaration to allow a multi-character symbol as an alias.
+ (parse_thong_decl): New function.
+ (read_declarations): Added %thong declarations.
+ (read_declarations): Handle NOOP to deal with allowing
+ % declarations as another means to specify the flags.
+ (readgram): Allow %prec prior to semantics embedded in a rule.
+ (skip_to_char, read_declarations, copy_definition)
+ (parse_token_decl, parse_start_decl, parse_type_decl)
+ (parse_assoc_decl, parse_union_decl, parse_expect_decl)
+ (get_type_name, copy_guard, copy_action, readgram)
+ (get_type, packsymbols): Revised most error messages.
+ Changed `fatal' to `warnxxx' to avoid aborting for error.
+ Revised and use multiple warnxxx functions to avoid using VARARGS1.
+ (read_declarations): Improve the error message for
+ an invalid character. Do not abort.
+ (read_declarations, copy_guard, copy_action): Use
+ printable_version to avoid unprintable characters in printed output.
+ (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
+ (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
+ Allow the type of a non-terminal can be given
+ more than once, as long as all specifications give the same type.
+
+ * output.c: (output_headers, output_trailers, output, output_gram)
+ (output_rule_data): Implement noparserflag variable.
+ Implement toknumflag variable.
+ (output): Call reader_output_yylsp to output LTYPESTR.
+
+ * main.c (main): If reader sees an error, don't process the grammar.
+ (fatals): Updated to not use VARARGS1.
+ (printable_version, int_to_string, warn, warni, warns, warnss)
+ (warnsss): New error reporting functions. Avoid abort for error.
+
+ * lex.h: Added THONG and NOOP for alias processing.
+ Added SETOPT for the new code that allows setting options with %flags.
+
+ * lex.c: Include getopt.h. Add some extern decls.
+ (safegetc): New function to deal with EOF gracefully.
+ (literalchar); new function to deal with reading \ escapes.
+ (lex): Use literalchar.
+ (lex): Implemented "..." tokens.
+ (literalchar, lex, parse_percent_token): Made tokenbuffer
+ always contain the token. This includes growing the token
+ buffer while reading an integer.
+ (parse_percent_token): Replaced if-else statement with percent_table.
+ (parse_percent_token): Added % declarations as another
+ way to specify the flags -n, -l, and -r. Also added hooks for
+ -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
+ major changes to files.c.
+ (lex) Retain in the incoming stream a character following
+ an incorrect '/'.
+ (skip_white_space, lex): Revised most error messages
+ and changed fatal to warn to avoid aborting.
+ (percent_table): Added %thong declarations.
+
+ * gram.h: Comment changes.
+
+ * files.c (openfiles, open_extra_files, done): Add faction flag
+ and actfile file. Handle noparserflag. Both for -n switch.
+
+ * conflicts.c (resolve_sr_conflict): Remove use of alloca.
+
+Sat May 6 05:35:44 1995 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Comment change.
+
+Wed May 3 14:56:25 1995 Richard Stallman <rms@gnu.org>
+
+ * Attic/version.c: Version now 1.24.
+
+ * bison.s1: Change distribution terms.
+
+ * Attic/version.c: Version now 1.23.
+
+Thu Feb 23 07:43:50 1995 Richard Stallman <rms@gnu.org>
+
+ * files.c: Test __VMS_POSIX as well as VMS.
+
+Tue Feb 14 16:49:32 1995 Jim Meyering <meyering@gnu.org>
+
+ * bison.s1 (__yy_memcpy): Renamed from __yy_bcopy to avoid
+ confusion. Reverse FROM and TO arguments to be consistent with
+ those of memcpy.
+
+Thu Sep 15 21:39:22 1994 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Update copyright notice and GPL version.
+
+Tue Jul 12 20:43:44 1994 Richard Stallman <rms@gnu.org>
+
+ * reduce.c, reader.c: entered into RCS
+
+Sat Mar 26 20:33:04 1994 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: entered into RCS
+
+Fri Mar 25 22:52:41 1994 Richard Stallman <rms@gnu.org>
+
+ * main.c: entered into RCS
+
+Thu Mar 24 22:54:32 1994 Richard Stallman <rms@gnu.org>
+
+ * conflicts.c: entered into RCS
+
+Sun Nov 21 10:25:13 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: *** empty log message ***
+
+Tue Oct 19 03:55:14 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: *** empty log message ***
+
+Thu Oct 14 16:19:10 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: *** empty log message ***
+
+Fri Sep 10 13:41:02 1993 Richard Stallman <rms@gnu.org>
+
+ * conflicts.c: *** empty log message ***
+
+ * system.h: entered into RCS
+
+Mon Sep 6 19:32:26 1993 Noah Friedman <friedman@gnu.org>
+
+ * Attic/version.c: entered into RCS
+
+Sat Jul 24 08:00:44 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: *** empty log message ***
+
+Sun Jul 4 20:07:28 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: *** empty log message ***
+
+Sat Jun 26 20:06:51 1993 David J. MacKenzie <djm@gnu.org>
+
+ * getargs.c: entered into RCS
+
+Fri Jun 25 19:11:46 1993 Richard Stallman <rms@gnu.org>
+
+ * getargs.c: Initial revision
+
+Wed Jun 16 21:02:31 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: *** empty log message ***
+
+Thu Jun 3 17:07:14 1993 Richard Stallman <rms@gnu.org>
+
+ * bison.s1: Initial revision
+
+Wed Apr 28 19:15:14 1993 Noah Friedman <friedman@gnu.org>
+
+ * reader.c: *** empty log message ***
+
+Fri Apr 23 16:29:13 1993 Noah Friedman <friedman@gnu.org>
+
+ * alloc.h: entered into RCS
+
+Tue Apr 20 06:00:53 1993 David J. MacKenzie <djm@gnu.org>
+
+ * Attic/version.c: *** empty log message ***
+
+ * files.c, allocate.c: entered into RCS
+
+ * reader.c: *** empty log message ***
+
+ * lex.c: entered into RCS
+
+ * conflicts.c: Initial revision
+
+ * symtab.c: entered into RCS
+
+ * alloc.h: Initial revision
+
+ * LR0.c: entered into RCS
+
+Sun Apr 18 05:49:49 1993 Noah Friedman <friedman@gnu.org>
+
+ * reader.c: Initial revision
+
+ * Attic/version.c: *** empty log message ***
+
+Thu Apr 15 19:37:53 1993 Richard Stallman <rms@gnu.org>
+
+ * main.c, files.c: Initial revision
+
+Tue Apr 13 18:52:55 1993 Richard Stallman <rms@gnu.org>
+
+ * Attic/version.c: Initial revision
+
+Thu Mar 25 02:45:46 1993 Richard Stallman <rms@gnu.org>
+
+ * output.c: entered into RCS
+
+Mon Jun 22 04:07:22 1992 Richard Stallman <rms@gnu.org>
+
+ * vmsgetargs.c: entered into RCS
+
+Wed Jan 22 04:15:36 1992 Richard Stallman <rms@gnu.org>
+
+ * machine.h: entered into RCS
+
+Sat Dec 21 00:17:44 1991 Richard Stallman <rms@gnu.org>
+
+ * lalr.c, closure.c: entered into RCS
+
+Fri Dec 20 23:55:12 1991 Richard Stallman <rms@gnu.org>
+
+ * state.h: entered into RCS
+
+Wed Dec 18 07:39:50 1991 Richard Stallman <rms@gnu.org>
+
+ * print.c, nullable.c, derives.c: entered into RCS
+
+Sun Nov 3 02:39:18 1991 David J. MacKenzie <djm@gnu.org>
+
+ * warshall.c, types.h, symtab.h, lex.h, gram.c, gram.h, files.h:
+ entered into RCS
+
+Fri Sep 9 01:04:17 1988 Richard Stallman <rms@gnu.org>
+
+ * bison.hairy: entered into RCS
+
diff --git a/contrib/bison/FREEBSD-Xlist b/contrib/bison/FREEBSD-Xlist
new file mode 100644
index 000000000000..c8a261aa0e45
--- /dev/null
+++ b/contrib/bison/FREEBSD-Xlist
@@ -0,0 +1,12 @@
+*po
+*intl
+*ABOUT-NLS
+*ChangeLog.*
+*FAQ
+*OChangeLog*
+*ansi2knr.[1c]
+*bison.info
+*mdate-sh
+*missing
+*stamp-h.in
+*texinfo.tex
diff --git a/contrib/bison/FREEBSD-upgrade b/contrib/bison/FREEBSD-upgrade
new file mode 100644
index 000000000000..de7358cefe24
--- /dev/null
+++ b/contrib/bison/FREEBSD-upgrade
@@ -0,0 +1,41 @@
+# ex:ts=8
+
+GNU Bison 1.28
+
+For the import of Bison several directories and files were removed.
+The stripped down version was created using FreeBSD-Xlist during extraction:
+
+ tar -X FREEBSD-Xlist -xvzf bison-1.28.tar.gz
+
+Bison 1.28 changes the directory structure from previous releases.
+In addition, v1.25 seems to have had a spammed ChangeLog. Bison v1.26 fixed
+this. Thus the reason 1.28's ChangeLog's are hard to corelate with v1.25's.
+
+To reduce the size of import, and to make it so the changes from 1.25 and
+1.28 are easy to determine, the 1.28 directory structure is munged before
+import:
+
+ cd bison-1.28
+ mv src/ChangeLog ChangeLog.src
+ mv src/bison.s1 bison.simple
+ mv src/* .
+ rmdir src
+ mv doc/ChangeLog ChangeLog.doc
+ mv -i doc/* . # answer "no" to all questions
+ rm -rf doc
+
+
+Imported by:
+
+ cvs import -ko -m 'Virgin import of GNU Bison 1.28' \
+ src/contrib/bison FSF v1_28
+
+
+To make local changes to Bison, simply patch and commit to the main
+branch (aka HEAD). Never make local changes on the vendor (FSF) branch.
+
+All local changes should be submitted to the FSF for inclusion in the
+next vendor release.
+
+obrien@NUXI.com
+14-Aug-1999
diff --git a/contrib/bison/Makefile.am b/contrib/bison/Makefile.am
new file mode 100644
index 000000000000..71b8759c6175
--- /dev/null
+++ b/contrib/bison/Makefile.am
@@ -0,0 +1,27 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-
+AUTOMAKE_OPTIONS = 1.4 ansi2knr
+
+bin_PROGRAMS = bison
+
+bison_SOURCES = LR0.c allocate.c closure.c conflicts.c derives.c \
+ files.c getargs.c gram.c lalr.c lex.c main.c nullable.c output.c \
+ print.c reader.c reduce.c symtab.c warshall.c getopt.c getopt1.c
+
+EXTRA_bison_SOURCES = vmsgetargs.c
+
+bison_LDADD = @INTLLIBS@ @ALLOCA@
+INCLUDES = -I../intl -I$(top_srcdir)/intl
+
+noinst_HEADERS = alloc.h files.h gram.h lex.h machine.h state.h \
+ symtab.h system.h types.h getopt.h
+
+data_DATA = bison.simple bison.hairy
+
+EXTRA_DIST = bison.s1 bison.hairy build.com bison.cld vmshlp.mar
+
+bison.simple: bison.s1 Makefile
+ -rm -f $@
+ sed -e "/^#line/ s|bison|$(datadir)/bison|" -e "s/@bison_version@/$(VERSION)/" < $(srcdir)/bison.s1 > $@-tmp
+ mv $@-tmp $@
+
+DISTCLEANFILES = bison.simple
diff --git a/contrib/bison/acconfig.h b/contrib/bison/acconfig.h
new file mode 100644
index 000000000000..0218c127b582
--- /dev/null
+++ b/contrib/bison/acconfig.h
@@ -0,0 +1,56 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+@TOP@
+
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
+/* Version string. */
+#undef VERSION_STRING
+
+/* Define if the compiler understands prototypes. */
+#undef PROTOTYPES
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* The location of the simple parser (bison.simple). */
+#undef XPFILE
+
+/* The location of the semantic parser (bison.hairy). */
+#undef XPFILE1
+
+/* The location of the local directory. */
+#undef LOCALEDIR
+
+/* Define as 1 if realloc must be declared even if <stdlib.h> is
+ included. */
+#undef NEED_DECLARATION_REALLOC
+
+/* Define as 1 if calloc must be declared even if <stdlib.h> is
+ included. */
+#undef NEED_DECLARATION_CALLOC
+@BOTTOM@
+
+#if defined(PROTOTYPES) || defined(__cplusplus)
+# define PARAMS(p) p
+#else
+# define PARAMS(p) ()
+#endif
+
+#endif /* CONFIG_H */
diff --git a/contrib/bison/acinclude.m4 b/contrib/bison/acinclude.m4
new file mode 100644
index 000000000000..8c909d2b9161
--- /dev/null
+++ b/contrib/bison/acinclude.m4
@@ -0,0 +1,60 @@
+dnl BISON_DEFINE_FILE(VARNAME, FILE)
+dnl Defines (with AC_DEFINE) VARNAME to the expansion of the FILE
+dnl variable, expanding ${prefix} and such.
+dnl Example: BISON_DEFINE_FILE(DATADIR, datadir)
+dnl By Alexandre Oliva <oliva@dcc.unicamp.br>
+AC_DEFUN(BISON_DEFINE_FILE, [
+ ac_expanded=`(
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ eval echo \""[$]$2"\"
+ )`
+ AC_DEFINE_UNQUOTED($1, "$ac_expanded")
+])
+
+dnl See whether we need a declaration for a function.
+dnl BISON_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
+AC_DEFUN(BISON_NEED_DECLARATION,
+[AC_MSG_CHECKING([whether $1 must be declared])
+AC_CACHE_VAL(bison_cv_decl_needed_$1,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#define rindex strrchr
+#endif
+#ifndef HAVE_INDEX
+#define index strchr
+#endif
+$2],
+[char *(*pfn) = (char *(*)) $1],
+eval "bison_cv_decl_needed_$1=no", eval "bison_cv_decl_needed_$1=yes")])
+if eval "test \"`echo '$bison_cv_decl_needed_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ bison_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($bison_tr_decl)
+else
+ AC_MSG_RESULT(no)
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl BISON_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
+AC_DEFUN(BISON_NEED_DECLARATIONS,
+[for ac_func in $1
+do
+BISON_NEED_DECLARATION($ac_func, $2)
+done
+])
diff --git a/contrib/bison/aclocal.m4 b/contrib/bison/aclocal.m4
new file mode 100644
index 000000000000..b1a3e91698e1
--- /dev/null
+++ b/contrib/bison/aclocal.m4
@@ -0,0 +1,682 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl BISON_DEFINE_FILE(VARNAME, FILE)
+dnl Defines (with AC_DEFINE) VARNAME to the expansion of the FILE
+dnl variable, expanding ${prefix} and such.
+dnl Example: BISON_DEFINE_FILE(DATADIR, datadir)
+dnl By Alexandre Oliva <oliva@dcc.unicamp.br>
+AC_DEFUN(BISON_DEFINE_FILE, [
+ ac_expanded=`(
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ eval echo \""[$]$2"\"
+ )`
+ AC_DEFINE_UNQUOTED($1, "$ac_expanded")
+])
+
+dnl See whether we need a declaration for a function.
+dnl BISON_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
+AC_DEFUN(BISON_NEED_DECLARATION,
+[AC_MSG_CHECKING([whether $1 must be declared])
+AC_CACHE_VAL(bison_cv_decl_needed_$1,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#define rindex strrchr
+#endif
+#ifndef HAVE_INDEX
+#define index strchr
+#endif
+$2],
+[char *(*pfn) = (char *(*)) $1],
+eval "bison_cv_decl_needed_$1=no", eval "bison_cv_decl_needed_$1=yes")])
+if eval "test \"`echo '$bison_cv_decl_needed_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ bison_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ AC_DEFINE_UNQUOTED($bison_tr_decl)
+else
+ AC_MSG_RESULT(no)
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl BISON_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
+AC_DEFUN(BISON_NEED_DECLARATIONS,
+[for ac_func in $1
+do
+BISON_NEED_DECLARATION($ac_func, $2)
+done
+])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+
+# serial 1
+
+# @defmac AC_PROG_CC_STDC
+# @maindex PROG_CC_STDC
+# @ovindex CC
+# If the C compiler in not in ANSI C mode by default, try to add an option
+# to output variable @code{CC} to make it so. This macro tries various
+# options that select ANSI C on some system or another. It considers the
+# compiler to be in ANSI C mode if it handles function prototypes correctly.
+#
+# If you use this macro, you should check after calling it whether the C
+# compiler has been set to accept ANSI C; if not, the shell variable
+# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+# code in ANSI C, you can make an un-ANSIfied copy of it by using the
+# program @code{ansi2knr}, which comes with Ghostscript.
+# @end defmac
+
+AC_DEFUN(AM_PROG_CC_STDC,
+[AC_REQUIRE([AC_PROG_CC])
+AC_BEFORE([$0], [AC_C_INLINE])
+AC_BEFORE([$0], [AC_C_CONST])
+dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+dnl a magic option to avoid problems with ANSI preprocessor commands
+dnl like #elif.
+dnl FIXME: can't do this because then AC_AIX won't work due to a
+dnl circular dependency.
+dnl AC_BEFORE([$0], [AC_PROG_CPP])
+AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+AC_CACHE_VAL(am_cv_prog_cc_stdc,
+[am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ AC_TRY_COMPILE(
+[#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+], [
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+],
+[am_cv_prog_cc_stdc="$ac_arg"; break])
+done
+CC="$ac_save_CC"
+])
+if test -z "$am_cv_prog_cc_stdc"; then
+ AC_MSG_RESULT([none needed])
+else
+ AC_MSG_RESULT($am_cv_prog_cc_stdc)
+fi
+case "x$am_cv_prog_cc_stdc" in
+ x|xno) ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
+esac
+])
+
+
+# serial 1
+
+AC_DEFUN(AM_C_PROTOTYPES,
+[AC_REQUIRE([AM_PROG_CC_STDC])
+AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([for function prototypes])
+if test "$am_cv_prog_cc_stdc" != no; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
+ U= ANSI2KNR=
+else
+ AC_MSG_RESULT(no)
+ U=_ ANSI2KNR=./ansi2knr
+ # Ensure some checks needed by ansi2knr itself.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(string.h)
+fi
+AC_SUBST(U)dnl
+AC_SUBST(ANSI2KNR)dnl
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 5
+
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS)
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CACHE_CHECK([for gettext in libintl],
+ gt_cv_func_gettext_libintl,
+ [AC_CHECK_LIB(intl, gettext,
+ gt_cv_func_gettext_libintl=yes,
+ gt_cv_func_gettext_libintl=no)],
+ gt_cv_func_gettext_libintl=no)])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$gt_cv_func_gettext_libintl" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT)
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(catgets,
+ [AC_DEFINE(HAVE_CATGETS)
+ INTLOBJS="\$(CATOBJS)"
+ AC_PATH_PROG(GENCAT, gencat, no)dnl
+ if test "$GENCAT" != "no"; then
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi])
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next])
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ AC_CHECK_FUNCS(stpcpy)
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ AC_DEFINE(HAVE_STPCPY)
+ fi
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
+ fi
+ fi])
+
diff --git a/contrib/bison/alloc.h b/contrib/bison/alloc.h
new file mode 100644
index 000000000000..9685122e2e31
--- /dev/null
+++ b/contrib/bison/alloc.h
@@ -0,0 +1,36 @@
+/* Storage allocation interface for bison,
+ Copyright (C) 1984, 1989 Free Software Foundation, Inc.
+
+This file is part of Bison, the GNU Compiler Compiler.
+
+Bison 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, or (at your option)
+any later version.
+
+Bison is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bison; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define NEW(t) ((t *) xmalloc((unsigned) sizeof(t)))
+#define NEW2(n, t) ((t *) xmalloc((unsigned) ((n) * sizeof(t))))
+
+#ifdef __STDC__
+#define FREE(x) (x ? (void) free((char *) (x)) : (void)0)
+#else
+#define FREE(x) ((x) != 0 && (free ((char *) (x)), 0))
+#endif
+
+extern char *xmalloc PARAMS((register unsigned));
+extern char *xrealloc PARAMS((register char *, register unsigned));
diff --git a/contrib/bison/config.hin b/contrib/bison/config.hin
new file mode 100644
index 000000000000..d12df70b53fa
--- /dev/null
+++ b/contrib/bison/config.hin
@@ -0,0 +1,179 @@
+/* config.hin. Generated automatically from configure.in by autoheader. */
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* 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 you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define if on MINIX. */
+#undef _MINIX
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define if the system does not provide POSIX.1 features except
+ with this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version string. */
+#undef VERSION_STRING
+
+/* Define to 1 if NLS is requested. */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* The location of the simple parser (bison.simple). */
+#undef XPFILE
+
+/* The location of the semantic parser (bison.hairy). */
+#undef XPFILE1
+
+/* The location of the local directory. */
+#undef LOCALEDIR
+
+/* Define if you have the __argz_count function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the __argz_next function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the __argz_stringify function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define if you have the dcgettext function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the mkstemp function. */
+#undef HAVE_MKSTEMP
+
+/* Define if you have the munmap function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strdup function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the i library (-li). */
+#undef HAVE_LIBI
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if compiler has function prototypes */
+#undef PROTOTYPES
+
+
+#if defined(PROTOTYPES) || defined(__cplusplus)
+# define PARAMS(p) p
+#else
+# define PARAMS(p) ()
+#endif
+
+#endif /* CONFIG_H */
diff --git a/contrib/bison/stamp-vti b/contrib/bison/stamp-vti
new file mode 100644
index 000000000000..656afa037c12
--- /dev/null
+++ b/contrib/bison/stamp-vti
@@ -0,0 +1,3 @@
+@set UPDATED 14 January 1999
+@set EDITION 1.28
+@set VERSION 1.28
diff --git a/contrib/bison/version.texi b/contrib/bison/version.texi
new file mode 100644
index 000000000000..656afa037c12
--- /dev/null
+++ b/contrib/bison/version.texi
@@ -0,0 +1,3 @@
+@set UPDATED 14 January 1999
+@set EDITION 1.28
+@set VERSION 1.28
diff --git a/gnu/usr.bin/bison/config.h b/gnu/usr.bin/bison/config.h
new file mode 100644
index 000000000000..7567a68757d5
--- /dev/null
+++ b/gnu/usr.bin/bison/config.h
@@ -0,0 +1,180 @@
+/* config.h. Generated automatically by configure. */
+/* config.hin. Generated automatically from configure.in by autoheader. */
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* Define if using alloca.c. */
+/* #undef C_ALLOCA */
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* 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 you have alloca, as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define as __inline if that's what the C compiler calls it. */
+/* #undef inline */
+
+/* Define if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef off_t */
+
+/* Define if the system does not provide POSIX.1 features except
+ with this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define if you need to in order for stat and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef size_t */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+/* #undef STACK_DIRECTION */
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version string. */
+#define VERSION_STRING "GNU Bison version 1.28"
+
+/* Define to 1 if NLS is requested. */
+/* #define ENABLE_NLS 1 */
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext. */
+/* #undef HAVE_CATGETS */
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+/* #undef HAVE_GETTEXT */
+
+/* Define if your locale.h file contains LC_MESSAGES. */
+#define HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the stpcpy function. */
+/* #undef HAVE_STPCPY */
+
+/* The location of the simple parser (bison.simple). */
+/* #define XPFILE "/usr/share/misc/bison.simple" */
+
+/* The location of the semantic parser (bison.hairy). */
+/* #define XPFILE1 "/usr/share/misc/bison.hairy" */
+
+/* The location of the local directory. */
+/* #define LOCALEDIR "/usr/share/locale" */
+
+/* Define if you have the __argz_count function. */
+/* #undef HAVE___ARGZ_COUNT */
+
+/* Define if you have the __argz_next function. */
+/* #undef HAVE___ARGZ_NEXT */
+
+/* Define if you have the __argz_stringify function. */
+/* #undef HAVE___ARGZ_STRINGIFY */
+
+/* Define if you have the dcgettext function. */
+/* #undef HAVE_DCGETTEXT */
+
+/* Define if you have the getcwd function. */
+#define HAVE_GETCWD 1
+
+/* Define if you have the getpagesize function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define if you have the mkstemp function. */
+#define HAVE_MKSTEMP 1
+
+/* Define if you have the munmap function. */
+#define HAVE_MUNMAP 1
+
+/* Define if you have the putenv function. */
+#define HAVE_PUTENV 1
+
+/* Define if you have the setenv function. */
+#define HAVE_SETENV 1
+
+/* Define if you have the setlocale function. */
+#define HAVE_SETLOCALE 1
+
+/* Define if you have the stpcpy function. */
+/* #undef HAVE_STPCPY */
+
+/* Define if you have the strcasecmp function. */
+#define HAVE_STRCASECMP 1
+
+/* Define if you have the strchr function. */
+#define HAVE_STRCHR 1
+
+/* Define if you have the strdup function. */
+#define HAVE_STRDUP 1
+
+/* Define if you have the <argz.h> header file. */
+/* #undef HAVE_ARGZ_H */
+
+/* Define if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define if you have the <malloc.h> header file. */
+/* #undef HAVE_MALLOC_H */
+
+/* Define if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have the <nl_types.h> header file. */
+#define HAVE_NL_TYPES_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the i library (-li). */
+/* #undef HAVE_LIBI */
+
+/* Name of package */
+#define PACKAGE "bison"
+
+/* Version number of package */
+#define VERSION "1.28"
+
+/* Define if compiler has function prototypes */
+#define PROTOTYPES 1
+
+
+#if defined(PROTOTYPES) || defined(__cplusplus)
+# define PARAMS(p) p
+#else
+# define PARAMS(p) ()
+#endif
+
+#endif /* CONFIG_H */
diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2
new file mode 100644
index 000000000000..5adbdb8e949c
--- /dev/null
+++ b/lib/libc/sys/aio_cancel.2
@@ -0,0 +1,78 @@
+.\" Copyright (c) 1999 Softweyr LLC.
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``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 Softweyr LLC OR CONTRIBUTORS 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.
+.\"
+.\" $Id: aio_cancel.2,v 1.3 1999/07/01 21:13:06 mpp Exp $
+.\"
+.Dd June 2, 1999
+.Dt AIO_CANCEL 2
+.Os
+.Sh NAME
+.Nm aio_cancel
+.Nd cancel an outstanding asynchronous I/O operation (REALTIME)
+.Sh SYNOPSIS
+.Fd #include <aio.h>
+.Ft int
+.Fn aio_cancel "int something" "struct aiocb * iocb"
+.Sh DESCRIPTION
+The
+.Fn aio_cancel
+function is supposed to cancel the specified outstanding asynchronous
+I/O request.
+.Fn aio_cancel
+is not implemented at this time, and always fails returning
+.Dv ENOSYS .
+.Sh RETURN VALUES
+When
+.Fn aio_cancel
+inevitably fails, it returns
+.Dv ENOSYS
+to signify it is not supported.
+.Sh SEE ALSO
+.Xr aio_error 2 ,
+.Xr aio_read 2 ,
+.Xr aio_return 2 ,
+.Xr aio_suspend 2 ,
+.Xr aio_write 2 .
+.Sh ERRORS
+The
+.Fn aio_cancel
+function currently always fails, due to:
+.Bl -tag -width Er
+.It Bq Er ENOSYS
+this operation is not implemented at this time.
+.El
+.Sh STANDARDS
+.Nm
+fails to conform to the
+.St -p1003.2
+standard.
+.Sh HISTORY
+The
+.Nm
+function first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Wes Peters Aq wes@softweyr.com .
diff --git a/lib/libc/sys/aio_error.2 b/lib/libc/sys/aio_error.2
new file mode 100644
index 000000000000..cedc5d9ec9f9
--- /dev/null
+++ b/lib/libc/sys/aio_error.2
@@ -0,0 +1,93 @@
+.\" Copyright (c) 1999 Softweyr LLC.
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``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 Softweyr LLC OR CONTRIBUTORS 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.
+.\"
+.\" $Id: aio_error.2,v 1.3 1999/07/01 21:13:06 mpp Exp $
+.\"
+.Dd June 2, 1999
+.Dt AIO_ERROR 2
+.Os
+.Sh NAME
+.Nm aio_error
+.Nd retrieve error status of asynchronous I/O operation (REALTIME)
+.Sh SYNOPSIS
+.Fd #include <aio.h>
+.Ft int
+.Fn aio_error "struct aiocb *iocb"
+.Sh DESCRIPTION
+The
+.Fn aio_error
+function returns the error status of the asynchronous I/O request
+associated with the structure pointed to by
+.Ar iocb .
+.Sh RETURN VALUES
+If the asynchronous I/O request has completed successfully,
+.Fn aio_error
+returns 0. If the request has not yet completed,
+.Dv EINPROGRESS
+is returned. If the request has completed unsuccessfully the error
+status is returned as described in
+.Xr read 2 ,
+.Xr write 2 ,
+or
+.Xr fsync 2
+is returned.
+On failure,
+.Fn aio_error
+returns
+.Dv -1
+and sets
+.Dv errno
+to indicate the error condition.
+.Sh ERRORS
+The
+.Fn aio_error
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Ar iocb
+does not reference an outstanding asynchronous I/O request.
+.El
+.Sh SEE ALSO
+.Xr aio_cancel 2 ,
+.Xr aio_read 2 ,
+.Xr aio_return 2 ,
+.Xr aio_suspend 2 ,
+.Xr aio_write 2 ,
+.Xr fsync 2 ,
+.Xr read 2 ,
+.Xr write 2 .
+.Sh STANDARDS
+.Fn aio_error
+is expected to conform to the
+.St -p1003.2
+standard.
+.Sh HISTORY
+The
+.Nm
+function first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Wes Peters Aq wes@softweyr.com .
diff --git a/lib/libc/sys/aio_return.2 b/lib/libc/sys/aio_return.2
new file mode 100644
index 000000000000..804452f9c3e6
--- /dev/null
+++ b/lib/libc/sys/aio_return.2
@@ -0,0 +1,95 @@
+.\" Copyright (c) 1999 Softweyr LLC.
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``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 Softweyr LLC OR CONTRIBUTORS 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.
+.\"
+.\" $Id: aio_return.2,v 1.3 1999/07/01 21:13:06 mpp Exp $
+.\"
+.Dd June 2, 1999
+.Dt AIO_RETURN 2
+.Os
+.Sh NAME
+.Nm aio_return
+.Nd retrieve return status of asynchronous I/O operation (REALTIME)
+.Sh SYNOPSIS
+.Fd #include <aio.h>
+.Ft int
+.Fn aio_return "struct aiocb *iocb"
+.Sh DESCRIPTION
+The
+.Fn aio_return
+function returns the final status of the asynchronous I/O request
+associated with the structure pointed to by
+.Ar iocb .
+.Pp
+.Fn aio_return
+should only be called once, to obtain the final status of an asynchronous
+I/O operation once
+.Xr aio_error 2
+returns something other than
+.Dv EINPROGRESS .
+.Sh RETURN VALUES
+If the asynchronous I/O request has completed, the status is returned
+as described in
+.Xr read 2 ,
+.Xr write 2 ,
+or
+.Xr fsync 2 .
+On failure,
+.Fn aio_return
+returns
+.Dv -1
+and sets
+.Dv errno
+to indicate the error condition.
+.Sh SEE ALSO
+.Xr aio_cancel 2 ,
+.Xr aio_error 2 ,
+.Xr aio_read 2 ,
+.Xr aio_suspend 2 ,
+.Xr aio_write 2 ,
+.Xr fsync 2 ,
+.Xr read 2 ,
+.Xr write 2 .
+.Sh ERRORS
+The
+.Fn aio_return
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Ar iocb
+does not reference an outstanding asynchronous I/O request.
+.El
+.Sh STANDARDS
+.Fn aio_return
+is expected to conform to the
+.St -p1003.2
+standard.
+.Sh HISTORY
+The
+.Nm
+function first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Wes Peters Aq wes@softweyr.com .
diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libc/sys/aio_suspend.2
new file mode 100644
index 000000000000..5df78b4d8047
--- /dev/null
+++ b/lib/libc/sys/aio_suspend.2
@@ -0,0 +1,90 @@
+.\" Copyright (c) 1999 Softweyr LLC.
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``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 Softweyr LLC OR CONTRIBUTORS 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.
+.\"
+.\" $Id: aio_suspend.2,v 1.3 1999/07/01 21:13:06 mpp Exp $
+.\"
+.Dd June 2, 1999
+.Dt AIO_SUSPEND 2
+.Os
+.Sh NAME
+.Nm aio_suspend
+.Nd suspend until asynchronous I/O operations or timeout complete (REALTIME)
+.Sh SYNOPSIS
+.Fd #include <aio.h>
+.Ft int
+.Fn aio_suspend "const struct aiocb * const iocbs[]" "int niocb" "const struct timespec * timeout"
+.Sh DESCRIPTION
+The
+.Fn aio_suspend
+function suspends the calling process until all of the specified
+asynchronous I/O requests have completed or the
+.Ar timeout
+has passed.
+.Ar iocbs
+is an array of
+.Ar niocb
+pointers to asynchronous I/O requests. Array members containing NULL
+will be silently ignored.
+.Sh RETURN VALUES
+If all of the specified asynchronous I/O requests have completed,
+.Fn aio_suspend
+returns 0. If the
+.Ar timeout
+expired,
+.Dv EAGAIN
+is returned. Other return values indicate an error condition as
+detailed below.
+.Sh SEE ALSO
+.Xr aio_cancel 2 ,
+.Xr aio_error 2 ,
+.Xr aio_read 2 ,
+.Xr aio_suspend 2 ,
+.Xr aio_write 2 .
+.Sh ERRORS
+The
+.Fn aio_suspend
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Ar iocbs
+contains more than
+.Dv AIO_LISTIO_MAX asynchronous I/O requests, or at least one
+of the requests is not valid.
+.It Bq Er EINTR
+the suspend was interrupted by a signal.
+.El
+.Sh STANDARDS
+.Fn aio_suspend
+is expected to conform to the
+.St -p1003.2
+standard.
+.Sh HISTORY
+The
+.Nm
+function first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Wes Peters Aq wes@softweyr.com .
diff --git a/lib/libc/sys/aio_write.2 b/lib/libc/sys/aio_write.2
new file mode 100644
index 000000000000..04ecf201e85a
--- /dev/null
+++ b/lib/libc/sys/aio_write.2
@@ -0,0 +1,192 @@
+.\" Copyright (c) 1999 Softweyr LLC.
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``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 Softweyr LLC OR CONTRIBUTORS 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.
+.\"
+.\" $Id: aio_write.2,v 1.2 1999/07/01 21:09:57 mpp Exp $
+.\"
+.Dd June 2, 1999
+.Dt AIO_WRITE 2
+.Os
+.Sh NAME
+.Nm aio_write
+.Nd asynchronous write to a file (REALTIME)
+.Sh SYNOPSIS
+.Fd #include <aio.h>
+.Ft int
+.Fn aio_write "struct aiocb *iocb"
+.Sh DESCRIPTION
+The
+.Fn aio_write
+function allows the calling process to write
+.Ar iocb->aio_nbytes
+from the buffer pointed to by
+.Ar iocb->aio_buf
+to the descriptor
+.Ar iocb->aio_fildes .
+The call returns immediately after the write request has been enqueued
+to the descriptor; the write may or may not have completed at the time
+the call returns. If the request could not be enqueued, generally due
+to invalid arguments, the call returns without having enqueued the
+request.
+.Pp
+If
+.Dv O_APPEND
+is set for
+.Ar iocb->aio_fildes ,
+.Fn aio_write
+operations append to the file in the same order as the calls were
+made. If
+.Dv O_APPEND
+is not set for the file descriptor, the write operation will occur at
+the absolute position from the beginning of the file plus
+.Ar iocb->aio_offset .
+.Pp
+If
+.Dv _POSIX_PRIORITIZED_IO
+is defined, and the descriptor supports it, then the enqueued
+operation is submitted at a priority equal to that of the calling
+process minus
+.Ar iocb->aio_reqprio .
+.Pp
+The
+.Ar iocb
+pointer may be subsequently used as an argument to
+.Fn aio_return
+and
+.Fn aio_error
+in order to determine return or error status for the enqueued operation
+while it is in progress.
+.Pp
+If the request is successfully enqueued, the value of
+.Ar iocb->aio_offset
+can be modified during the request as context, so this value must not
+be referenced after the request is enqueued.
+.Sh RESTRICTIONS
+The Asynchronous I/O Control Block structure pointed to by
+.Ar iocb
+and the buffer that the
+.Ar iocb->aio_buf
+member of that structure references must remain valid until the
+operation has completed. For this reason, use of auto (stack) variables
+for these objects is discouraged.
+.Pp
+The asynchronous I/O control buffer
+.Ar iocb
+should be zeroed before the
+.Fn aio_read
+call to avoid passing bogus context information to the kernel.
+.Pp
+Modifications of the Asynchronous I/O Control Block structure or the
+buffer contents after the request has been enqueued, but before the
+request has completed, are not allowed.
+.Pp
+If the file offset in
+.Ar iocb->aio_offset
+is past the offset maximum for
+.Ar iocb->aio_fildes ,
+no I/O will occur.
+.Sh RETURN VALUES
+.Rv -std aio_write
+.Sh ERRORS
+The
+.Fn aio_write
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EAGAIN
+The request was not queued because of system resource limitations.
+.It Bq Er ENOSYS
+The
+.Fn aio_write
+call is not supported.
+.El
+.Pp
+The following conditions may be synchronously detected when the
+.Fn aio_write
+call is made, or asynchronously, at any time thereafter. If they
+are detected at call time,
+.Fn aio_write
+returns -1 and sets
+.Ar errno
+appropriately; otherwise the
+.Fn aio_return
+function must be called, and will return -1, and
+.Fn aio_error
+must be called to determine the actual value that would have been
+returned in
+.Ar errno .
+.Pp
+.Bl -tag -width Er
+.It Bq Er EBADF
+.Ar iocb->aio_fildes
+is invalid, or is not opened for writing.
+.It Bq Er EINVAL
+The offset
+.Ar iocb->aio_offset
+is not valid, the priority specified by
+.Ar iocb->aio_reqprio
+is not a valid priority, or the number of bytes specified by
+.Ar iocb->aio_nbytes
+is not valid.
+.El
+.Pp
+If the request is successfully enqueued, but subsequently canceled
+or an error occurs, the value returned by the
+.Fn aio_return
+function is per the
+.Xr write 2
+call, and the value returned by the
+.Fn aio_error
+function is either one of the error returns from the
+.Xr write 2
+call, or one of:
+.Bl -tag -width Er
+.It Bq Er EBADF
+.Ar iocb->aio_fildes
+is invalid for writing.
+.It Bq Er ECANCELED
+The request was explicitly canceled via a call to
+.Fn aio_cancel .
+.It Bq Er EINVAL
+The offset
+.Ar iocb->aio_offset
+would be invalid.
+.El
+.Sh STANDARDS
+.Fn aio_write
+is expected to conform to the
+.St -p1003.2
+standard.
+.Sh HISTORY
+The
+.Nm
+Function first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This manual page was written by
+.An Wes Peters Aq wes@softweyr.com .
+.Sh BUGS
+Asynchronous I/O operations cannot be canceled in this implementation.
+Invalid information in
+.Ar iocb->_aiocb_private
+may confuse the kernel.
+
diff --git a/share/man/man4/man4.i386/ukbd.4 b/share/man/man4/man4.i386/ukbd.4
new file mode 100644
index 000000000000..8fed8cf6ce9a
--- /dev/null
+++ b/share/man/man4/man4.i386/ukbd.4
@@ -0,0 +1,168 @@
+.\" Copyright (c) 1997, 1998
+.\" Nick Hibma <hibma@skylink.it>. 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. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``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 NICK HIBMA OR THE VOICES IN HIS HEAD
+.\" 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.
+.\"
+.\" $FreeBSD$
+.\" $Id: ukbd.4,v 1.5 1999/07/12 21:01:57 nik Exp $
+.\"
+.Dd April 11, 1999
+.Dt UKBD 4 i386
+.Os FreeBSD
+.Sh NAME
+.Nm ukbd
+.Nd USB keyboard driver
+.Sh SYNOPSIS
+.Cd "device ukbd0"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for keyboards that attach to the USB port.
+.Nm usb
+and one of
+.Nm uhci
+or
+.Nm ohci
+must be configured in the kernel as well.
+.Sh CONFIGURATION
+By default the keyboard subsystem does not create the appropriate devices yet.
+Make sure you configure compile the kernel with the following option in the
+kernel config file:
+.Bd -literal -offset indent
+options "KBD_INSTALL_CDEV"
+.Ed
+.Pp
+Go to /dev and make device nodes kbd*:
+.Bd -literal -offset indent
+sh MAKEDEV kbd0 kbd1
+.Ed
+.Pp
+If both an AT keyboard as well as USB keyboards are used at the same time, the
+AT keyboard will appear as kbd0 in /dev. The USB keyboards will be kbd1, kbd2,
+etc. You can see some information about the keyboard with the following command:
+.Bd -literal -offset indent
+kbdcontrol -i < /dev/kbd1
+.Ed
+.Pp
+or load a keymap with
+.Bd -literal -offset indent
+kbdcontrol -l keymaps/pt.iso < /dev/kbd1
+.Ed
+.Pp
+See
+.Nm kbcontrol
+for more possible options.
+.Pp
+You can swap console keyboards by using the command
+.Bd -literal -offset indent
+kbdcontrol -k /dev/kbd1
+.Ed
+.Pp
+From this point on onwards the first USB keyboard will be the keyboard
+to be used as the console.
+.Pp
+If you want to use a USB keyboard as your default and not use an AT keyboard at
+all, you will have to remove the
+.Nm atkbd0
+from the kernel configuration file. Because of the order of the device
+initialisation, the USB keyboard will be detected AFTER the console driver
+initialises itself and you have to explicitly tellthe console
+driver to use the existence of the USB keyboard. This can be done in
+one of the following two ways.
+.Pp
+Run the following command as a part of system initialization:
+.Bd -literal -offset indent
+kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null
+.Ed
+.Pp
+(Note that as the USB keyboard is the only keyboard, it is accessed as
+/dev/kbd0) or otherwise tell the console driver to periodically look for a
+keyboard by setting a flag in the kernel configuration file:
+.Bd -literal -offset indent
+device sc0 at isa? flags 0x100
+.Ed
+.Pp
+With the above flag, the console driver will try to detect any
+keyboard in the system if it didn't detect one while it was
+initialized at boot time.
+.Sh DRIVER CONFIGURATION
+.Bd -literal -offset indent
+options "KBD_INSTALL_CDEV"
+.Ed
+.Pp
+Make the keyboards available through a character device in /dev
+.Bd -literal -offset indent
+options "UKBD_DFLT_KEYMAP"
+makeoptions "UKBD_DFLT_KEYMAP=fr.iso"
+.Ed
+.Pp
+The above lines will put the French ISO keymap in the ukbd driver.
+You can specify any keymap in /usr/share/syscons/keymaps with this
+option.
+.Bd -literal -offset indent
+options "KBD_DISABLE_KEYMAP_LOADING"
+.Ed
+.Pp
+Don't allow the user to change the keymap. Note that this options
+also has effect on the AT keyboard driver `atkbd'.
+.Sh FILES
+.Bl -tag -width /dev/kbd0 -compact
+.It Pa /dev/kbd*
+blocking device nodes
+.Sh EXAMPLE
+.Bd -literal -offset indent
+device ukbd0
+.Ed
+.Pp
+Add the
+.Nm ukbd
+driver to the kernel.
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr ohci 4 ,
+.Xr syscons 4 ,
+.Xr uhci 4 ,
+.Xr usb 4 ,
+.Xr config 8
+.\".Sh HISTORY
+.Sh AUTHORS
+The
+.Nm ukbd
+driver was written by
+.An Lennart Augustsson Aq augustss@cs.chalmers.se
+for
+.Nx
+and was substantially rewritten for
+.Fx
+by
+.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
+.Pp
+This manual page was written by
+.An Nick Hibma Aq hibma@skylink.it
+with a large amount of input from
+.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
diff --git a/share/man/man4/man4.i386/ums.4 b/share/man/man4/man4.i386/ums.4
new file mode 100644
index 000000000000..410612d87775
--- /dev/null
+++ b/share/man/man4/man4.i386/ums.4
@@ -0,0 +1,123 @@
+.\" Copyright (c) 1999
+.\" Nick Hibma <hibma@skylink.it>. 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. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY NICK HIBMA AND CONTRIBUTORS ``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 NICK HIBMA OR THE VOICES IN HIS HEAD
+.\" 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.
+.\"
+.\" $FreeBSD$
+.\" $Id: ums.4,v 1.4 1999/07/12 21:01:58 nik Exp $
+.\"
+.Dd April 11, 1999
+.Dt UMS 4 i386
+.Os FreeBSD
+.Sh NAME
+.Nm ums
+.Nd USB mouse driver
+.Sh SYNOPSIS
+.Cd "device ums0"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for mice that attach to the USB port. Supported are
+mice with any number of buttons and mice with a wheel.
+.Nm usb
+and one of
+.Nm uhci
+or
+.Nm ohci
+must be configured in the kernel as well.
+.Pp
+The /dev/ums device presents the mouse as a
+.Ar sysmouse
+or
+.Ar mousesystems
+type device. See
+.Nm moused
+for an explanation of these mouse types.
+.Sh FILES
+.Bl -tag -width /dev/ums0 -compact
+.It Pa /dev/ums0
+blocking device node
+.Sh EXAMPLE
+.Dl device ums0
+.Pp
+Add the
+.Nm ums
+driver to the kernel.
+.Pp
+.Dl moused -p /dev/ums0 -t auto
+.Pp
+Use the first
+.Nm USB
+mouse on the system as your console mouse.
+.Pp
+Change the "Pointer" section in
+.Nm XF86Config
+to the following
+.Pp
+.Dl Device "/dev/ums0"
+.Dl Protocol "Auto"
+.Pp
+to be able to use the USB mouse under X. When using the XiG accelerated X
+server, change the mouse device to /dev/ums0 and the mouse type to
+"MouseSystems".
+.Pp
+If you want to be able to use the mouse in both virtual consoles as well
+as in X change it to:
+.Pp
+.Dl Device "/dev/sysmouse"
+.Dl Protocol "Auto"
+.Pp
+For XFree86 3.3.1 the entry should be:
+.Pp
+.Dl Device "/dev/sysmouse"
+.Dl Protocol "MouseSystems"
+.Pp
+.Sh SEE ALSO
+.Xr ohci 4 ,
+.Xr sysmouse 4 ,
+.Xr uhci 4 ,
+.Xr usb 4 ,
+.Xr XF86Config 5 ,
+.Xr moused 8
+.\".Sh HISTORY
+.Sh AUTHORS
+The
+.Nm ums
+driver was written by
+.An Lennart Augustsson Aq augustss@cs.chalmers.se
+for
+.Nx
+and was adopted for
+.Fx
+by
+.An MAEKAWA Masahide Aq bishop@rr.iij4u.or.jp .
+.Pp
+This manual page was written by
+.An Nick Hibma Aq hibma@skylink.it
+with input from
+.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
diff --git a/sys/dev/vinum/vinumraid5.c b/sys/dev/vinum/vinumraid5.c
new file mode 100644
index 000000000000..aa5427569054
--- /dev/null
+++ b/sys/dev/vinum/vinumraid5.c
@@ -0,0 +1,694 @@
+/*-
+ * Copyright (c) 1997, 1998
+ * Cybernet Corporation and Nan Yang Computer Services Limited.
+ * All rights reserved.
+ *
+ * This software was developed as part of the NetMAX project.
+ *
+ * Written by Greg Lehey
+ *
+ * This software is distributed under the so-called ``Berkeley
+ * License'':
+ *
+ * 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Cybernet Corporation
+ * and Nan Yang Computer Services Limited
+ * 4. Neither the name of the Companies nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * 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 company or contributors 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.
+ *
+ * $Id: raid5.c,v 1.15 1999/07/07 03:46:01 grog Exp grog $
+ */
+#include <dev/vinum/vinumhdr.h>
+#include <dev/vinum/request.h>
+#include <sys/resourcevar.h>
+
+/*
+ * Parameters which describe the current transfer.
+ * These are only used for calculation, but they
+ * need to be passed to other functions, so it's
+ * tidier to put them in a struct
+ */
+struct metrics {
+ daddr_t stripebase; /* base address of stripe (1st subdisk) */
+ int stripeoffset; /* offset in stripe */
+ int stripesectors; /* total sectors to transfer in this stripe */
+ daddr_t sdbase; /* offset in subdisk of stripe base */
+ int sdcount; /* number of disks involved in this transfer */
+ daddr_t diskstart; /* remember where this transfer starts */
+ int psdno; /* number of parity subdisk */
+ int badsdno; /* number of down subdisk, if there is one */
+ int firstsdno; /* first data subdisk number */
+ /* These correspond to the fields in rqelement, sort of */
+ int useroffset;
+ /*
+ * Initial offset and length values for the first
+ * data block
+ */
+ int initoffset; /* start address of block to transfer */
+ short initlen; /* length in sectors of data transfer */
+ /* Define a normal operation */
+ int dataoffset; /* start address of block to transfer */
+ int datalen; /* length in sectors of data transfer */
+ /* Define a group operation */
+ int groupoffset; /* subdisk offset of group operation */
+ int grouplen; /* length in sectors of group operation */
+ /* Define a normal write operation */
+ int writeoffset; /* subdisk offset of normal write */
+ int writelen; /* length in sectors of write operation */
+ enum xferinfo flags; /* to check what we're doing */
+ int rqcount; /* number of elements in request */
+};
+
+enum requeststatus bre5(struct request *rq,
+ int plexno,
+ daddr_t * diskstart,
+ daddr_t diskend);
+void complete_raid5_write(struct rqelement *);
+enum requeststatus build_rq_buffer(struct rqelement *rqe, struct plex *plex);
+void setrqebounds(struct rqelement *rqe, struct metrics *mp);
+
+/*
+ * define the low-level requests needed to perform
+ * a high-level I/O operation for a specific plex
+ * 'plexno'.
+ *
+ * Return 0 if all subdisks involved in the
+ * request are up, 1 if some subdisks are not up,
+ * and -1 if the request is at least partially
+ * outside the bounds of the subdisks.
+ *
+ * Modify the pointer *diskstart to point to the
+ * end address. On read, return on the first bad
+ * subdisk, so that the caller
+ * (build_read_request) can try alternatives.
+ *
+ * On entry to this routine, the prq structures
+ * are not assigned. The assignment is performed
+ * by expandrq(). Strictly speaking, the elements
+ * rqe->sdno of all entries should be set to -1,
+ * since 0 (from bzero) is a valid subdisk number.
+ * We avoid this problem by initializing the ones
+ * we use, and not looking at the others (index >=
+ * prq->requests).
+ */
+enum requeststatus
+bre5(struct request *rq,
+ int plexno,
+ daddr_t * diskaddr,
+ daddr_t diskend)
+{
+ struct metrics m; /* most of the information */
+ struct sd *sd;
+ struct plex *plex;
+ struct buf *bp; /* user's bp */
+ struct rqgroup *rqg; /* the request group that we will create */
+ struct rqelement *rqe; /* point to this request information */
+ int rsectors; /* sectors remaining in this stripe */
+ int mysdno; /* another sd index in loops */
+ int rqno; /* request number */
+
+ rqg = NULL; /* shut up, damn compiler */
+ m.diskstart = *diskaddr; /* start of transfer */
+ bp = rq->bp; /* buffer pointer */
+ plex = &PLEX[plexno]; /* point to the plex */
+
+
+ while (*diskaddr < diskend) { /* until we get it all sorted out */
+ if (*diskaddr >= plex->length) /* beyond the end of the plex */
+ return REQUEST_EOF; /* can't continue */
+
+ m.badsdno = -1; /* no bad subdisk yet */
+
+ /* Part A: Define the request */
+ /*
+ * First, calculate some sizes:
+ * The offset of the start address from
+ * the start of the stripe.
+ */
+ m.stripeoffset = *diskaddr % (plex->stripesize * (plex->subdisks - 1));
+
+ /*
+ * The plex-relative address of the
+ * start of the stripe.
+ */
+ m.stripebase = *diskaddr - m.stripeoffset;
+
+ /* subdisk containing the parity stripe */
+ m.psdno = plex->subdisks - 1
+ - (*diskaddr / (plex->stripesize * (plex->subdisks - 1)))
+ % plex->subdisks;
+
+ /*
+ * The number of the subdisk in which
+ * the start is located.
+ */
+ m.firstsdno = m.stripeoffset / plex->stripesize;
+ if (m.firstsdno >= m.psdno) /* at or past parity sd */
+ m.firstsdno++; /* increment it */
+
+ /*
+ * The offset from the beginning of
+ * the stripe on this subdisk.
+ */
+ m.initoffset = m.stripeoffset % plex->stripesize;
+
+ /* The offset of the stripe start relative to this subdisk */
+ m.sdbase = m.stripebase / (plex->subdisks - 1);
+
+ m.useroffset = *diskaddr - m.diskstart; /* The offset of the start in the user buffer */
+
+ /*
+ * The number of sectors to transfer in the
+ * current (first) subdisk.
+ */
+ m.initlen = min(diskend - *diskaddr, /* the amount remaining to transfer */
+ plex->stripesize - m.initoffset); /* and the amount left in this block */
+
+ /*
+ * The number of sectors to transfer in this stripe
+ * is the minumum of the amount remaining to transfer
+ * and the amount left in this stripe.
+ */
+ m.stripesectors = min(diskend - *diskaddr,
+ plex->stripesize * (plex->subdisks - 1) - m.stripeoffset);
+
+ /* The number of data subdisks involved in this request */
+ m.sdcount = (m.stripesectors + m.initoffset + plex->stripesize - 1) / plex->stripesize;
+
+ /* Part B: decide what kind of transfer this will be.
+
+ * start and end addresses of the transfer in
+ * the current block.
+ *
+ * There are a number of different kinds of
+ * transfer, each of which relates to a
+ * specific subdisk:
+ *
+ * 1. Normal read. All participating subdisks
+ * are up, and the transfer can be made
+ * directly to the user buffer. The bounds
+ * of the transfer are described by
+ * m.dataoffset and m.datalen. We have
+ * already calculated m.initoffset and
+ * m.initlen, which define the parameters
+ * for the first data block.
+ *
+ * 2. Recovery read. One participating
+ * subdisk is down. To recover data, all
+ * the other subdisks, including the parity
+ * subdisk, must be read. The data is
+ * recovered by exclusive-oring all the
+ * other blocks. The bounds of the
+ * transfer are described by m.groupoffset
+ * and m.grouplen.
+ *
+ * 3. A read request may request reading both
+ * available data (normal read) and
+ * non-available data (recovery read).
+ * This can be a problem if the address
+ * ranges of the two reads do not coincide:
+ * in this case, the normal read needs to
+ * be extended to cover the address range
+ * of the recovery read, and must thus be
+ * performed out of malloced memory.
+ *
+ * 4. Normal write. All the participating
+ * subdisks are up. The bounds of the
+ * transfer are described by m.dataoffset
+ * and m.datalen. Since these values
+ * differ for each block, we calculate the
+ * bounds for the parity block
+ * independently as the maximum of the
+ * individual blocks and store these values
+ * in m.writeoffset and m.writelen. This
+ * write proceeds in four phases:
+ *
+ * i. Read the old contents of each block
+ * and the parity block.
+ * ii. ``Remove'' the old contents from
+ * the parity block with exclusive or.
+ * iii. ``Insert'' the new contents of the
+ * block in the parity block, again
+ * with exclusive or.
+ *
+ * iv. Write the new contents of the data
+ * blocks and the parity block. The data
+ * block transfers can be made directly from
+ * the user buffer.
+ *
+ * 5. Degraded write where the data block is
+ * not available. The bounds of the
+ * transfer are described by m.groupoffset
+ * and m.grouplen. This requires the
+ * following steps:
+ *
+ * i. Read in all the other data blocks,
+ * excluding the parity block.
+ *
+ * ii. Recreate the parity block from the
+ * other data blocks and the data to be
+ * written.
+ *
+ * iii. Write the parity block.
+ *
+ * 6. Parityless write, a write where the
+ * parity block is not available. This is
+ * in fact the simplest: just write the
+ * data blocks. This can proceed directly
+ * from the user buffer. The bounds of the
+ * transfer are described by m.dataoffset
+ * and m.datalen.
+ *
+ * 7. Combination of degraded data block write
+ * and normal write. In this case the
+ * address ranges of the reads may also
+ * need to be extended to cover all
+ * participating blocks.
+ *
+ * All requests in a group transfer transfer
+ * the same address range relative to their
+ * subdisk. The individual transfers may
+ * vary, but since our group of requests is
+ * all in a single slice, we can define a
+ * range in which they all fall.
+ *
+ * In the following code section, we determine
+ * which kind of transfer we will perform. If
+ * there is a group transfer, we also decide
+ * its bounds relative to the subdisks. At
+ * the end, we have the following values:
+ *
+ * m.flags indicates the kinds of transfers
+ * we will perform.
+ * m.initoffset indicates the offset of the
+ * beginning of any data operation relative
+ * to the beginning of the stripe base.
+ * m.initlen specifies the length of any data
+ * operation.
+ * m.dataoffset contains the same value as
+ * m.initoffset.
+ * m.datalen contains the same value as
+ * m.initlen. Initially dataoffset and
+ * datalen describe the parameters for the
+ * first data block; while building the data
+ * block requests, they are updated for each
+ * block.
+ * m.groupoffset indicates the offset of any
+ * group operation relative to the beginning
+ * of the stripe base.
+ * m.grouplen specifies the length of any
+ * group operation.
+ * m.writeoffset indicates the offset of a
+ * normal write relative to the beginning of
+ * the stripe base. This value differs from
+ * m.dataoffset in that it applies to the
+ * entire operation, and not just the first
+ * block.
+ * m.writelen specifies the total span of a
+ * normal write operation. writeoffset and
+ * writelen are used to define the parity
+ * block.
+ */
+ m.groupoffset = 0; /* assume no group... */
+ m.grouplen = 0; /* until we know we have one */
+ m.writeoffset = m.initoffset; /* start offset of transfer */
+ m.writelen = 0; /* nothing to write yet */
+ m.flags = 0; /* no flags yet */
+ rsectors = m.stripesectors; /* remaining sectors to examine */
+ m.dataoffset = m.initoffset; /* start at the beginning of the transfer */
+ m.datalen = m.initlen;
+
+ if (m.sdcount > 1) {
+ plex->multiblock++; /* more than one block for the request */
+ /*
+ * If we have two transfers that don't overlap,
+ * (one at the end of the first block, the other
+ * at the beginning of the second block),
+ * it's cheaper to split them.
+ */
+ if (rsectors < plex->stripesize) {
+ m.sdcount = 1; /* just one subdisk */
+ m.stripesectors = m.initlen; /* and just this many sectors */
+ rsectors = m.initlen; /* and in the loop counter */
+ }
+ }
+ if (SD[plex->sdnos[m.psdno]].state < sd_reborn) /* is our parity subdisk down? */
+ m.badsdno = m.psdno; /* note that it's down */
+ if (bp->b_flags & B_READ) { /* read operation */
+ for (mysdno = m.firstsdno; rsectors > 0; mysdno++) {
+ if (mysdno == m.psdno) /* ignore parity on read */
+ mysdno++;
+ if (mysdno == plex->subdisks) /* wraparound */
+ mysdno = 0;
+ if (mysdno == m.psdno) /* parity, */
+ mysdno++; /* we've given already */
+
+ if (SD[plex->sdnos[mysdno]].state < sd_reborn) { /* got a bad subdisk, */
+ if (m.badsdno >= 0) /* we had one already, */
+ return REQUEST_DOWN; /* we can't take a second */
+ m.badsdno = mysdno; /* got the first */
+ m.groupoffset = m.dataoffset; /* define the bounds */
+ m.grouplen = m.datalen;
+ m.flags |= XFR_RECOVERY_READ; /* we need recovery */
+ plex->recovered_reads++; /* count another one */
+ } else
+ m.flags |= XFR_NORMAL_READ; /* normal read */
+
+ /* Update the pointers for the next block */
+ m.dataoffset = 0; /* back to the start of the stripe */
+ rsectors -= m.datalen; /* remaining sectors to examine */
+ m.datalen = min(rsectors, plex->stripesize); /* amount that will fit in this block */
+ }
+ } else { /* write operation */
+ for (mysdno = m.firstsdno; rsectors > 0; mysdno++) {
+ if (mysdno == m.psdno) /* parity stripe, we've dealt with that */
+ mysdno++;
+ if (mysdno == plex->subdisks) /* wraparound */
+ mysdno = 0;
+ if (mysdno == m.psdno) /* parity, */
+ mysdno++; /* we've given already */
+
+ sd = &SD[plex->sdnos[mysdno]];
+ if (sd->state != sd_up) {
+ enum requeststatus s;
+
+ s = checksdstate(sd, rq, *diskaddr, diskend); /* do we need to change state? */
+ if (s && (m.badsdno >= 0)) { /* second bad disk, */
+ int sdno;
+ /*
+ * If the parity disk is down, there's
+ * no recovery. We make all involved
+ * subdisks stale. Otherwise, we
+ * should be able to recover, but it's
+ * like pulling teeth. Fix it later.
+ */
+ for (sdno = 0; sdno < m.sdcount; sdno++) {
+ struct sd *sd = &SD[plex->sdnos[sdno]];
+ if (sd->state >= sd_reborn) /* sort of up, */
+ set_sd_state(sd->sdno, sd_stale, setstate_force); /* make it stale */
+ }
+ return s; /* and crap out */
+ }
+ m.badsdno = mysdno; /* note which one is bad */
+ m.flags |= XFR_DEGRADED_WRITE; /* we need recovery */
+ plex->degraded_writes++; /* count another one */
+ m.groupoffset = m.dataoffset; /* define the bounds */
+ m.grouplen = m.datalen;
+ } else {
+ m.flags |= XFR_NORMAL_WRITE; /* normal write operation */
+ if (m.writeoffset > m.dataoffset) { /* move write operation lower */
+ m.writelen = max(m.writeoffset + m.writelen,
+ m.dataoffset + m.datalen)
+ - m.dataoffset;
+ m.writeoffset = m.dataoffset;
+ } else
+ m.writelen = max(m.writeoffset + m.writelen,
+ m.dataoffset + m.datalen)
+ - m.writeoffset;
+ }
+
+ /* Update the pointers for the next block */
+ m.dataoffset = 0; /* back to the start of the stripe */
+ rsectors -= m.datalen; /* remaining sectors to examine */
+ m.datalen = min(rsectors, plex->stripesize); /* amount that will fit in this block */
+ }
+ if (m.badsdno == m.psdno) { /* got a bad parity block, */
+ struct sd *psd = &SD[plex->sdnos[m.psdno]];
+
+ if (psd->state == sd_down)
+ set_sd_state(psd->sdno, sd_obsolete, setstate_force); /* it's obsolete now */
+ else if (psd->state == sd_crashed)
+ set_sd_state(psd->sdno, sd_stale, setstate_force); /* it's stale now */
+ m.flags &= ~XFR_NORMAL_WRITE; /* this write isn't normal, */
+ m.flags |= XFR_PARITYLESS_WRITE; /* it's parityless */
+ plex->parityless_writes++; /* count another one */
+ }
+ }
+
+ /* reset the initial transfer values */
+ m.dataoffset = m.initoffset; /* start at the beginning of the transfer */
+ m.datalen = m.initlen;
+
+ /* decide how many requests we need */
+ if (m.flags & (XFR_RECOVERY_READ | XFR_DEGRADED_WRITE))
+ /* doing a recovery read or degraded write, */
+ m.rqcount = plex->subdisks; /* all subdisks */
+ else if (m.flags & XFR_NORMAL_WRITE) /* normal write, */
+ m.rqcount = m.sdcount + 1; /* all data blocks and the parity block */
+ else /* parityless write or normal read */
+ m.rqcount = m.sdcount; /* just the data blocks */
+
+ /* Part C: build the requests */
+ rqg = allocrqg(rq, m.rqcount); /* get a request group */
+ if (rqg == NULL) { /* malloc failed */
+ bp->b_flags |= B_ERROR;
+ bp->b_error = ENOMEM;
+ biodone(bp);
+ return REQUEST_ENOMEM;
+ }
+ rqg->plexno = plexno;
+ rqg->flags = m.flags;
+ rqno = 0; /* index in the request group */
+
+ /* 1: PARITY BLOCK */
+ /*
+ * Are we performing an operation which requires parity? In that case,
+ * work out the parameters and define the parity block.
+ * XFR_PARITYOP is XFR_NORMAL_WRITE | XFR_RECOVERY_READ | XFR_DEGRADED_WRITE
+ */
+ if (m.flags & XFR_PARITYOP) { /* need parity */
+ rqe = &rqg->rqe[rqno]; /* point to element */
+ sd = &SD[plex->sdnos[m.psdno]]; /* the subdisk in question */
+ rqe->rqg = rqg; /* point back to group */
+ rqe->flags = (m.flags | XFR_PARITY_BLOCK | XFR_MALLOCED) /* always malloc parity block */
+ &~(XFR_NORMAL_READ | XFR_PARITYLESS_WRITE); /* transfer flags without data op stuf */
+ setrqebounds(rqe, &m); /* set up the bounds of the transfer */
+ rqe->sdno = sd->sdno; /* subdisk number */
+ rqe->driveno = sd->driveno;
+ if (build_rq_buffer(rqe, plex)) /* build the buffer */
+ return REQUEST_ENOMEM; /* can't do it */
+ rqe->b.b_flags |= B_READ; /* we must read first */
+ m.sdcount++; /* adjust the subdisk count */
+ rqno++; /* and point to the next request */
+ }
+ /*
+ * 2: DATA BLOCKS
+ * Now build up requests for the blocks required
+ * for individual transfers
+ */
+ for (mysdno = m.firstsdno; rqno < m.sdcount; mysdno++, rqno++) {
+ if (mysdno == m.psdno) /* parity, */
+ mysdno++; /* we've given already */
+ if (mysdno == plex->subdisks) /* got to the end, */
+ mysdno = 0; /* wrap around */
+ if (mysdno == m.psdno) /* parity, */
+ mysdno++; /* we've given already */
+
+ rqe = &rqg->rqe[rqno]; /* point to element */
+ sd = &SD[plex->sdnos[mysdno]]; /* the subdisk in question */
+ rqe->rqg = rqg; /* point to group */
+ if (m.flags & XFR_NEEDS_MALLOC) /* we need a malloced buffer first */
+ rqe->flags = m.flags | XFR_DATA_BLOCK | XFR_MALLOCED; /* transfer flags */
+ else
+ rqe->flags = m.flags | XFR_DATA_BLOCK; /* transfer flags */
+ if (mysdno == m.badsdno) { /* this is the bad subdisk */
+ rqg->badsdno = rqno; /* note which one */
+ rqe->flags |= XFR_BAD_SUBDISK; /* note that it's dead */
+ /*
+ * we can't read or write from/to it,
+ * but we don't need to malloc
+ */
+ rqe->flags &= ~(XFR_MALLOCED | XFR_NORMAL_READ | XFR_NORMAL_WRITE);
+ }
+ setrqebounds(rqe, &m); /* set up the bounds of the transfer */
+ rqe->useroffset = m.useroffset; /* offset in user buffer */
+ rqe->sdno = sd->sdno; /* subdisk number */
+ rqe->driveno = sd->driveno;
+ if (build_rq_buffer(rqe, plex)) /* build the buffer */
+ return REQUEST_ENOMEM; /* can't do it */
+ if ((m.flags & XFR_PARITYOP) /* parity operation, */
+ &&((m.flags & XFR_BAD_SUBDISK) == 0)) /* and not the bad subdisk, */
+ rqe->b.b_flags |= B_READ; /* we must read first */
+
+ /* Now update pointers for the next block */
+ *diskaddr += m.datalen; /* skip past what we've done */
+ m.stripesectors -= m.datalen; /* deduct from what's left */
+ m.useroffset += m.datalen; /* and move on in the user buffer */
+ m.datalen = min(m.stripesectors, plex->stripesize); /* and recalculate */
+ m.dataoffset = 0; /* start at the beginning of next block */
+ }
+
+ /*
+ * 3: REMAINING BLOCKS FOR RECOVERY
+ * Finally, if we have a recovery operation, build
+ * up transfers for the other subdisks. Follow the
+ * subdisks around until we get to where we started.
+ * These requests use only the group parameters.
+ */
+ if ((rqno < m.rqcount) /* haven't done them all already */
+ &&(m.flags & (XFR_RECOVERY_READ | XFR_DEGRADED_WRITE))) {
+ for (; rqno < m.rqcount; rqno++, mysdno++) {
+ if (mysdno == m.psdno) /* parity, */
+ mysdno++; /* we've given already */
+ if (mysdno == plex->subdisks) /* got to the end, */
+ mysdno = 0; /* wrap around */
+ if (mysdno == m.psdno) /* parity, */
+ mysdno++; /* we've given already */
+
+ rqe = &rqg->rqe[rqno]; /* point to element */
+ sd = &SD[plex->sdnos[mysdno]]; /* the subdisk in question */
+ rqe->rqg = rqg; /* point to group */
+
+ rqe->sdoffset = m.sdbase + m.groupoffset; /* start of transfer */
+ rqe->dataoffset = 0; /* for tidiness' sake */
+ rqe->groupoffset = 0; /* group starts at the beginining */
+ rqe->datalen = 0;
+ rqe->grouplen = m.grouplen;
+ rqe->buflen = m.grouplen;
+ rqe->flags = (m.flags | XFR_MALLOCED) /* transfer flags without data op stuf */
+ &~XFR_DATAOP;
+ rqe->sdno = sd->sdno; /* subdisk number */
+ rqe->driveno = sd->driveno;
+ if (build_rq_buffer(rqe, plex)) /* build the buffer */
+ return REQUEST_ENOMEM; /* can't do it */
+ rqe->b.b_flags |= B_READ; /* we must read first */
+ }
+ }
+ /*
+ * We need to lock the address range before
+ * doing anything. We don't have to be
+ * performing a recovery operation: somebody
+ * else could be doing so, and the results could
+ * influence us.
+ */
+ rqg->lock = lockrange(m.stripebase, bp, plex); /* lock the stripe */
+ if (*diskaddr < diskend) /* didn't finish the request on this stripe */
+ plex->multistripe++; /* count another one */
+ }
+ return REQUEST_OK;
+}
+
+/*
+ * Helper function for rqe5: adjust the bounds of
+ * the transfers to minimize the buffer
+ * allocation.
+ *
+ * Each request can handle two of three different
+ * data ranges:
+ *
+ * 1. The range described by the parameters
+ * dataoffset and datalen, for normal read or
+ * parityless write.
+ * 2. The range described by the parameters
+ * groupoffset and grouplen, for recovery read
+ * and degraded write.
+ * 3. For normal write, the range depends on the
+ * kind of block. For data blocks, the range
+ * is defined by dataoffset and datalen. For
+ * parity blocks, it is defined by writeoffset
+ * and writelen.
+ *
+ * In order not to allocate more memory than
+ * necessary, this function adjusts the bounds
+ * parameter for each request to cover just the
+ * minimum necessary for the function it performs.
+ * This will normally vary from one request to the
+ * next.
+ *
+ * Things are slightly different for the parity
+ * block. In this case, the bounds defined by
+ * mp->writeoffset and mp->writelen also play a
+ * rôle. Select this case by setting the
+ * parameter forparity != 0
+ */
+void
+setrqebounds(struct rqelement *rqe, struct metrics *mp)
+{
+ /* parity block of a normal write */
+ if ((rqe->flags & (XFR_NORMAL_WRITE | XFR_PARITY_BLOCK))
+ == (XFR_NORMAL_WRITE | XFR_PARITY_BLOCK)) { /* case 3 */
+ if (rqe->flags & XFR_DEGRADED_WRITE) { /* also degraded write */
+ /*
+ * With a combined normal and degraded write, we
+ * will zero out the area of the degraded write
+ * in the second phase, so we don't need to read
+ * it in. Unfortunately, we need a way to tell
+ * build_request_buffer the size of the buffer,
+ * and currently that's the length of the read.
+ * As a result, we read everything, even the stuff
+ * that we're going to nuke.
+ * FIXME XXX
+ */
+ if (mp->groupoffset < mp->writeoffset) { /* group operation starts lower */
+ rqe->sdoffset = mp->sdbase + mp->groupoffset; /* start of transfer */
+ rqe->dataoffset = mp->writeoffset - mp->groupoffset; /* data starts here */
+ rqe->groupoffset = 0; /* and the group at the beginning */
+ } else { /* individual data starts first */
+ rqe->sdoffset = mp->sdbase + mp->writeoffset; /* start of transfer */
+ rqe->dataoffset = 0; /* individual data starts at the beginning */
+ rqe->groupoffset = mp->groupoffset - mp->writeoffset; /* group starts here */
+ }
+ rqe->datalen = mp->writelen;
+ rqe->grouplen = mp->grouplen;
+ } else { /* just normal write (case 3) */
+ rqe->sdoffset = mp->sdbase + mp->writeoffset; /* start of transfer */
+ rqe->dataoffset = 0; /* degradation starts at the beginning */
+ rqe->groupoffset = 0; /* for tidiness' sake */
+ rqe->datalen = mp->writelen;
+ rqe->grouplen = 0;
+ }
+ } else if (rqe->flags & XFR_DATAOP) { /* data operation (case 1 or 3) */
+ if (rqe->flags & XFR_GROUPOP) { /* also a group operation (case 2) */
+ if (mp->groupoffset < mp->dataoffset) { /* group operation starts lower */
+ rqe->sdoffset = mp->sdbase + mp->groupoffset; /* start of transfer */
+ rqe->dataoffset = mp->dataoffset - mp->groupoffset; /* data starts here */
+ rqe->groupoffset = 0; /* and the group at the beginning */
+ } else { /* individual data starts first */
+ rqe->sdoffset = mp->sdbase + mp->dataoffset; /* start of transfer */
+ rqe->dataoffset = 0; /* individual data starts at the beginning */
+ rqe->groupoffset = mp->groupoffset - mp->dataoffset; /* group starts here */
+ }
+ rqe->datalen = mp->datalen;
+ rqe->grouplen = mp->grouplen;
+ } else { /* just data operation (case 1) */
+ rqe->sdoffset = mp->sdbase + mp->dataoffset; /* start of transfer */
+ rqe->dataoffset = 0; /* degradation starts at the beginning */
+ rqe->groupoffset = 0; /* for tidiness' sake */
+ rqe->datalen = mp->datalen;
+ rqe->grouplen = 0;
+ }
+ } else { /* just group operations (case 2) */
+ rqe->sdoffset = mp->sdbase + mp->groupoffset; /* start of transfer */
+ rqe->dataoffset = 0; /* for tidiness' sake */
+ rqe->groupoffset = 0; /* group starts at the beginining */
+ rqe->datalen = 0;
+ rqe->grouplen = mp->grouplen;
+ }
+ rqe->buflen = max(rqe->dataoffset + rqe->datalen, /* total buffer length */
+ rqe->groupoffset + rqe->grouplen);
+}
+/* Local Variables: */
+/* fill-column: 50 */
+/* End: */
diff --git a/sys/modules/vinum/.gdbinit.kernel b/sys/modules/vinum/.gdbinit.kernel
new file mode 100644
index 000000000000..ecef6510e4ef
--- /dev/null
+++ b/sys/modules/vinum/.gdbinit.kernel
@@ -0,0 +1,639 @@
+set remotebaud 38400
+set remotetimeout 1
+set complaints 1
+set print pretty
+define xi
+x/10i $eip
+end
+define xs
+x/12x $esp
+end
+define xb
+x/12x $ebp
+end
+define z
+ni
+x/1i $eip
+end
+define zs
+si
+x/1i $eip
+end
+define xp
+printf " esp: "
+output/x $esp
+echo (
+output (((int)$ebp)-(int)$esp)/4-4
+printf " words on stack)\n ebp: "
+output/x $ebp
+printf "\n eip: "
+x/1i $eip
+printf "Saved ebp: "
+output/x *(int*)$ebp
+printf " (maximum of "
+output ((*(int*)$ebp)-(int)$ebp)/4-4
+printf " parameters possible)\nSaved eip: "
+x/1i *(int*)($ebp+4)
+printf "\nParm 1 at "
+output/x (int) ($ebp+8)
+printf ": "
+output (char*) *(int*)($ebp+8)
+printf "\nParm 2 at "
+output/x (int) ($ebp+12)
+printf ": "
+output (char*) *(int*)($ebp+12)
+printf "\nParm 3 at "
+output/x (int) ($ebp+16)
+printf ": "
+output (char*) *(int*)($ebp+16)
+printf "\nParm 4 at "
+output/x (int) ($ebp+20)
+printf ": "
+output (char*) *(int*)($ebp+20)
+echo \n
+end
+document xp
+Show the register contents and the first four parameter
+words of the current frame.
+end
+define xxp
+printf " esp: "
+output/x $esp
+printf "\n ebp: "
+output/x $ebp
+printf "\n eip: "
+x/1i $eip
+printf "Saved ebp: "
+output/x *(int*)$ebp
+printf " (maximum of "
+output ((*(int*)$ebp)-(int)$ebp)/4-4
+printf " parameters possible)\nSaved eip: "
+x/1i *(int*)($ebp+4)
+printf "\nParm 1 at "
+output/x (int) ($ebp+8)
+printf ": "
+output (char*) *(int*)($ebp+8)
+printf "\nParm 2 at "
+output/x (int) ($ebp+12)
+printf ": "
+output (char*) *(int*)($ebp+12)
+printf "\nParm 3 at "
+output/x (int) ($ebp+16)
+printf ": "
+output (char*) *(int*)($ebp+16)
+printf "\nParm 4 at "
+output/x (int) ($ebp+20)
+printf ": "
+output (char*) *(int*)($ebp+20)
+printf "\nParm 5 at "
+output/x (int) ($ebp+24)
+printf ": "
+output (char*) *(int*)($ebp+24)
+printf "\nParm 6 at "
+output/x (int) ($ebp+28)
+printf ": "
+output (char*) *(int*)($ebp+28)
+printf "\nParm 7 at "
+output/x (int) ($ebp+32)
+printf ": "
+output (char*) *(int*)($ebp+32)
+printf "\nParm 8 at "
+output/x (int) ($ebp+36)
+printf ": "
+output (char*) *(int*)($ebp+36)
+printf "\nParm 9 at "
+output/x (int) ($ebp+40)
+printf ": "
+output (char*) *(int*)($ebp+40)
+printf "\nParm 10 at "
+output/x (int) ($ebp+44)
+printf ": "
+output (char*) *(int*)($ebp+44)
+echo \n
+end
+document xxp
+Show the register contents and the first ten parameter
+words of the current frame.
+end
+define xp0
+x/12x *(int*)$esp
+p *(int*)$esp
+p (char*)*$esp
+end
+define xp1
+x/12x *(int*)($ebp+4)
+p *(int*)($ebp+4)
+p (char**)($ebp+4)
+end
+define xp2
+x/12x *(int*)($ebp+8)
+p *(int*)($ebp+8)
+p *(char**)($ebp+8)
+end
+define xp3
+x/12x *(int*)($ebp+12)
+p *(int*)($ebp+12)
+p (char**)($ebp+12)
+end
+define xp4
+x/12x *(int*)($ebp+16)
+p *(int*)($ebp+16)
+p (char**)($ebp+16)
+end
+document xp0
+Show the first parameter of current stack frame in various formats
+end
+document xp1
+Show the second parameter of current stack frame in various formats
+end
+document xp2
+Show the third parameter of current stack frame in various formats
+end
+document xp3
+Show the fourth parameter of current stack frame in various formats
+end
+document xp4
+Show the fifth parameter of current stack frame in various formats
+end
+define f0
+f 0
+xp
+end
+define f1
+f 1
+xp
+end
+define f2
+f 2
+xp
+end
+define f3
+f 3
+xp
+end
+define f4
+f 4
+xp
+end
+define f5
+f 5
+xp
+end
+document f0
+Select stack frame 0 and show assembler-level details
+end
+document f1
+Select stack frame 1 and show assembler-level details
+end
+document f2
+Select stack frame 2 and show assembler-level details
+end
+document f3
+Select stack frame 3 and show assembler-level details
+end
+document f4
+Select stack frame 4 and show assembler-level details
+end
+document f5
+Select stack frame 5 and show assembler-level details
+end
+document z
+Single step 1 instruction (over calls) and show next instruction.
+end
+document zs
+Single step 1 instruction (through calls) and show next instruction.
+end
+document xi
+List the next 10 instructions from the current IP value
+end
+document xs
+Show the last 12 words on stack in hex
+end
+document xb
+Show 12 words starting at current BP value in hex
+end
+define tr
+target remote /dev/cuaa1
+end
+document tr
+Attach to a remote kernel via /dev/cuaa0
+end
+set output-radix 16
+define pname
+p (char *)curproc->p_comm
+end
+document pname
+Print the command name of the current process
+end
+define bpp
+set $bp = (struct buf *) $arg0
+ if $bp->b_dev
+ printf " Buffer at 0x%x: dev 0x%x data 0x%x bcount 0x%x blkno 0x%x resid 0x%x\n", \
+ $bp, \
+ $bp->b_dev->si_udev, \
+ $bp->b_data, \
+ $bp->b_bcount, \
+ $bp->b_blkno, \
+ $bp->b_resid
+ else
+ printf " Buffer at 0x%x: dev (none) data 0x%x bcount 0x%x blkno 0x%x resid 0x%x\n", \
+ $bp, \
+ $bp->b_data, \
+ $bp->b_bcount, \
+ $bp->b_blkno, \
+ $bp->b_resid
+ end
+ printf " flags 0x%x: ", $bp->b_flags
+ if $bp->b_flags & 0x10
+ printf "busy "
+ end
+ if $bp->b_flags & 0x40
+ printf "call "
+ end
+ if $bp->b_flags & 0x200
+ printf "done "
+ end
+ if $bp->b_flags & 0x800
+ printf "error "
+ end
+ if $bp->b_flags & 0x40000
+ printf "phys "
+ end
+ if $bp->b_flags & 0x100000
+ printf "read "
+ end
+ printf "\n"
+end
+define bpl
+set $bp = (struct buf *) $arg0
+printf "b_proc: "
+output $bp->b_proc
+printf "\nb_flags: "
+output $bp->b_flags
+printf "\nb_qindex: "
+output $bp->b_qindex
+printf "\nb_usecount: "
+output $bp->b_usecount
+printf "\nb_error: "
+output $bp->b_error
+printf "\nb_bufsize: "
+output $bp->b_bufsize
+printf "\nb_bcount: "
+output $bp->b_bcount
+printf "\nb_resid: "
+output $bp->b_resid
+printf "\nb_dev: "
+output $bp->b_dev
+printf "\nb_data: "
+output $bp->b_data
+printf "\nb_kvasize: "
+output $bp->b_kvasize
+printf "\nb_lblkno: "
+output $bp->b_lblkno
+printf "\nb_blkno: "
+output $bp->b_blkno
+printf "\nb_iodone: "
+output $bp->b_iodone
+printf "\nb_vp: "
+output $bp->b_vp
+printf "\nb_dirtyoff: "
+output $bp->b_dirtyoff
+printf "\nb_dirtyend: "
+output $bp->b_dirtyend
+printf "\nb_generation: "
+output $bp->b_generation
+printf "\nb_rcred: "
+output $bp->b_rcred
+printf "\nb_wcred: "
+output $bp->b_wcred
+printf "\nb_validoff: "
+output $bp->b_validoff
+printf "\nb_validend: "
+output $bp->b_validend
+printf "\nb_pblkno: "
+output $bp->b_pblkno
+printf "\nb_saveaddr: "
+output $bp->b_saveaddr
+printf "\nb_savekva: "
+output $bp->b_savekva
+printf "\nb_driver1: "
+output $bp->b_driver1
+printf "\nb_driver2: "
+output $bp->b_driver2
+printf "\nb_spc: "
+output $bp->b_spc
+printf "\nb_npages: "
+output $bp->b_npages
+printf "\n"
+end
+define bp
+bpp bp
+end
+define bpd
+ printf "Buffer data:\n%s", (char *) bp->b_data
+end
+document bpd
+Show the contents (char*) of bp->data in the current frame.
+end
+document bp
+Show information about the buffer header pointed to by the
+variable bp in the current frame.
+end
+document bpp
+Show summary information about the buffer header (struct bp) pointed
+at by the parameter.
+end
+document bpl
+Show detailled information about the buffer header (struct bp) pointed
+at by the parameter.
+end
+document bpl
+Show detailled information about the buffer header (struct bp) pointed
+at by the local variable bp.
+end
+define bx
+printf "\n b_vnbufs "
+output/x bp->b_vnbufs
+printf "\n b_freelist "
+output/x bp->b_freelist
+printf "\n b_act "
+output/x bp->b_act
+printf "\n b_flags "
+output/x bp->b_flags
+printf "\n b_qindex "
+output/x bp->b_qindex
+printf "\n b_usecount "
+output/x bp->b_usecount
+printf "\n b_error "
+output/x bp->b_error
+printf "\n b_bufsize "
+output/x bp->b_bufsize
+printf "\n b_bcount "
+output/x bp->b_bcount
+printf "\n b_resid "
+output/x bp->b_resid
+printf "\n b_dev "
+output/x bp->b_dev
+printf "\n b_data "
+output/x bp->b_data
+printf "\n b_kvasize "
+output/x bp->b_kvasize
+printf "\n b_blkno "
+output/x bp->b_blkno
+printf "\n b_iodone_chain "
+output/x bp->b_iodone_chain
+printf "\n b_vp "
+output/x bp->b_vp
+printf "\n b_dirtyoff "
+output/x bp->b_dirtyoff
+printf "\n b_validoff "
+output/x bp->b_validoff
+echo \n
+end
+define ddb
+set boothowto=0x80000000
+s
+end
+document ddb
+Switch back to ddb.
+end
+define ps
+ set $nproc = nprocs
+ set $aproc = allproc.lh_first
+ set $proc = allproc.lh_first
+ printf " pid proc addr uid ppid pgrp flag stat comm wchan\n"
+ while (--$nproc >= 0)
+ set $pptr = $proc.p_pptr
+ if ($pptr == 0)
+ set $pptr = $proc
+ end
+ if ($proc.p_stat)
+ printf "%5d %08x %08x %4d %5d %5d %06x %d %-10s ", \
+ $proc.p_pid, $aproc, \
+ $proc.p_addr, $proc.p_cred->p_ruid, $pptr->p_pid, \
+ $proc.p_pgrp->pg_id, $proc.p_flag, $proc.p_stat, \
+ &$proc.p_comm[0]
+ if ($proc.p_wchan)
+ if ($proc.p_wmesg)
+ printf "%s ", $proc.p_wmesg
+ end
+ printf "%x", $proc.p_wchan
+ end
+ printf "\n"
+ end
+ set $aproc = $proc.p_list.le_next
+ if ($aproc == 0 && $nproc > 0)
+ set $aproc = zombproc
+ end
+ set $proc = $aproc
+ end
+end
+document ps
+"ps" -- when kernel debugging, type out a ps-like listing of active processes.
+end
+define pcb
+ set $nproc = nprocs
+ set $aproc = allproc.lh_first
+ set $proc = allproc.lh_first
+ while (--$nproc >= 0)
+ set $pptr = $proc.p_pptr
+ if ($proc->p_pid == $arg0)
+ set $pcba = $pptr->p_addr->u_pcb
+ printf "ip: %08x sp: %08x bp: %08x bx: %08x\n", $pcba->pcb_eip, $pcba->pcb_esp, $pcba->pcb_ebp, $pcba->pcb_ebx
+ x/1i $pcba->pcb_eip
+ set $nproc = 0
+ end
+ set $aproc = $proc.p_list.le_next
+ if ($aproc == 0 && $nproc > 0)
+ set $aproc = zombproc
+ end
+ set $proc = $aproc
+ end
+end
+document pcb
+Show some pcb contents of process whose pid is specified.
+end
+define btr
+set $frame = $arg0
+set $fno = 0
+while (*(int *) $frame > 0xc0000000)
+ set $myebp = *(int *) $frame
+ set $myeip = *(int *) ($frame + 4)
+ printf " frame %d at %p: ebp %8x, eip ", $fno, $frame, $myebp
+ x/1i $myeip
+ set $frame = $myebp
+ set $fno = $fno + 1
+end
+end
+document btr
+Show a backtrace from the ebp address specified. This can be used to
+get a backtrace from any stack resident in memory.
+end
+define btp
+ set $nproc = nprocs
+ set $aproc = allproc.lh_first
+ set $proc = allproc.lh_first
+ while (--$nproc >= 0)
+ if ($proc->p_pid == $arg0)
+ btr $proc->p_addr->u_pcb->pcb_ebp
+ set $nproc = 0
+ else
+ set $aproc = $proc.p_list.le_next
+ if ($aproc == 0 && $nproc > 0)
+ set $aproc = zombproc
+ end
+ set $proc = $aproc
+ end
+ end
+end
+document btp
+Show a backtrace for the process whose pid is specified as a parameter.
+end
+define btpa
+ set $nproc = nprocs
+ set $aproc = allproc.lh_first
+ set $proc = allproc.lh_first
+ printf " pid proc addr uid ppid pgrp flag stat comm wchan\n"
+ while (--$nproc >= 0)
+ set $pptr = $proc.p_pptr
+ if ($pptr == 0)
+ set $pptr = $proc
+ end
+ if ($proc.p_stat)
+ printf "%5d %08x %08x %4d %5d %5d %06x %d %-10s ", \
+ $proc.p_pid, $aproc, \
+ $proc.p_addr, $proc.p_cred->p_ruid, $pptr->p_pid, \
+ $proc.p_pgrp->pg_id, $proc.p_flag, $proc.p_stat, \
+ &$proc.p_comm[0]
+ if ($proc.p_wchan)
+ if ($proc.p_wmesg)
+ printf "%s ", $proc.p_wmesg
+ end
+ printf "%x", $proc.p_wchan
+ end
+ printf "\n"
+ if ($proc->p_flag & 4)
+ btr $proc->p_addr->u_pcb->pcb_ebp
+ else
+ echo (not loaded)\n
+ end
+ end
+ set $aproc = $proc.p_list.le_next
+ if ($aproc == 0 && $nproc > 0)
+ set $aproc = zombproc
+ end
+ set $proc = $aproc
+ end
+end
+document btpa
+Show backtraces for all processes in the system.
+end
+define btpp
+ if ($myvectorproc->p_flag & 4)
+ btr $myvectorproc->p_addr->u_pcb->pcb_ebp
+ else
+ echo (not loaded)\n
+ end
+end
+document btpp
+Show a backtrace for the process previously selected with 'defproc'.
+end
+define defproc
+ set $nproc = nprocs
+ set $aproc = allproc.lh_first
+ set $proc = allproc.lh_first
+ while (--$nproc >= 0)
+ if ($proc->p_pid == $arg0)
+ set $pptr = $proc.p_pptr
+ if ($pptr == 0)
+ set $pptr = $proc
+ end
+ set $myvectorproc = $proc
+ if ($proc.p_stat)
+ printf "%5d %08x %08x %4d %5d %5d %06x %d %-10s ", \
+ $proc.p_pid, $aproc, \
+ $proc.p_addr, $proc.p_cred->p_ruid, $pptr->p_pid, \
+ $proc.p_pgrp->pg_id, $proc.p_flag, $proc.p_stat, \
+ &$proc.p_comm[0]
+ if ($proc.p_wchan)
+ if ($proc.p_wmesg)
+ printf "%s ", $proc.p_wmesg
+ end
+ printf "%x", $proc.p_wchan
+ end
+ printf "\n"
+ end
+ btpp
+ set $nproc = 0
+ else
+ set $proc = $proc.p_list.le_next
+ end
+ end
+end
+document defproc
+Specify a process for btpp and fr commands.
+end
+define fr
+set $fno = 0
+set $searching = 1
+if ($myvectorproc->p_flag & 4)
+ set $frame = $myvectorproc->p_addr->u_pcb->pcb_ebp
+ while (($searching == 1) && (*(int *) $frame > 0xc0000000))
+ set $myebp = *(int *) $frame
+ set $myeip = *(int *) ($frame + 4)
+ if ($fno == $arg0)
+ printf " frame %d at %p: ebp %8x, eip ", $fno, $frame, $myebp
+ x/1i $myeip
+ printf "Called from %8x, stack frame at %8x\n", *(int *) ($myebp+4), *(int *) $myebp
+ printf "last 20 local variables:\n"
+ x/20x ($myebp-80)
+ printf "call parameters:\n"
+ x/8x ($myebp+8)
+ set $searching = 0
+ else
+ set $frame = $myebp
+ set $fno = $fno + 1
+ end
+ end
+ if ($searching == 1)
+ echo frame not found\n
+ end
+else
+ printf "process %d is not loaded in memory\n", $myvectorproc->p_pid
+end
+end
+document fr
+Show the frame of the stack of the process previously selected with 'defproc'.
+end
+set height 70
+set width 120
+define vdev
+if (vp->v_type == VBLK)
+ p *vp->v_un.vu_spec.vu_specinfo
+ printf "numoutput: %d\n", vp->v_numoutput
+else
+ echo "Not a block device"
+end
+end
+document vdev
+Show some information of the vnode pointed to by the local variable vp.
+end
+define y
+echo Check your .gdbinit, it contains a y command\n
+end
+define kldstat
+ set $file = files.tqh_first
+ printf "Id Refs Address Size Name\n"
+ while ($file != 0)
+ printf "%2d %4d 0x%8x %8x %s\n", \
+ $file->id, \
+ $file->refs, \
+ $file->address, \
+ $file->size, \
+ $file->filename
+ set $file = $file->link.tqe_next
+ end
+end
+document kldstat
+Equivalent of the kldstat(9) command, without options.
+end
diff --git a/sys/modules/vinum/.gdbinit.vinum b/sys/modules/vinum/.gdbinit.vinum
new file mode 100644
index 000000000000..79838e05e7fc
--- /dev/null
+++ b/sys/modules/vinum/.gdbinit.vinum
@@ -0,0 +1,247 @@
+define rq
+rqq rq
+end
+document rq
+Show information about the request pointed to by the variable
+rq in the current frame.
+end
+define rqq
+set $rq = (struct request *) $arg0
+printf "Request: \n"
+output/x *$rq
+printf "\n"
+bpp $rq->bp
+set $rqg = $rq->rqg
+while ($rqg != 0)
+ printf "\nRequest group at %x:\n", $rqg
+ output/x *$rqg
+ printf "\n"
+ set $rqno = 0
+ while ($rqno < $rqg->count)
+ printf "rqg->rqe [%d]: ", $rqno
+ rrqe &$rqg->rqe[$rqno]
+ set $rqno = $rqno + 1
+ end
+ set $rqg = $rqg->next
+ end
+end
+document rqq
+Show information about the request (struct rq) pointed at by the parameter
+end
+define rqe
+rrqe rqe
+end
+define rrqe
+set $rqe = (struct rqelement *) $arg0
+ printf "sdoffset 0x%x, useroffset 0x%x, dataoffset 0x%x, datalen 0x%x, groupoffset 0x%x, grouplen 0x%x, buflen 0x%x\n", \
+ $rqe->sdoffset, \
+ $rqe->useroffset, \
+ $rqe->dataoffset, \
+ $rqe->datalen, \
+ $rqe->groupoffset, \
+ $rqe->grouplen, \
+ $rqe->buflen
+ printf " Flags 0x%x, Subdisk %d Drive %d\n", \
+ $rqe->flags, \
+ $rqe->sdno, \
+ $rqe->driveno
+ bpp &$rqe->b
+end
+document rqe
+Show information about the request element pointed to by the
+variable rqe in the current frame.
+end
+document rrqe
+Show information about the request element (struct rqe) pointed
+at by the parameter.
+end
+define rqq0
+printf "rq->prq [0].rqe[0].sdno: "
+output/x rq->prq[0].rqe[0].sdno
+printf "\nBuffer: device: "
+output/x rq->prq[0].rqe[0].b.b_dev
+printf " data: "
+output/x rq->prq[0].rqe[0].b.b_data
+printf " length: "
+output/x rq->prq[0].rqe[0].b.b_bcount
+printf " drive offset: "
+output/x rq->prq[0].rqe[0].b.b_blkno
+printf " subdisk offset: "
+output/x rq->prq[0].rqe[0].sdoffset
+printf "\nFlags: "
+if (rq->prq[0].rqe[0].b.b_flags & 0x10)
+printf "busy "
+end
+if (rq->prq[0].rqe[0].b.b_flags & 0x200)
+printf "done "
+end
+if (rq->prq[0].rqe[0].b.b_flags & 0x800)
+printf "error "
+end
+if (rq->prq[0].rqe[0].b.b_flags & 0x100000)
+printf "read "
+end
+output/x rq->prq[0].rqe[0].b.b_flags
+printf "\nrq->prq [0].rqe[1].sdno: "
+output/x rq->prq[0].rqe[1].sdno
+printf "\nBuffer: device: "
+output/x rq->prq[0].rqe[1].b.b_dev
+printf " data: "
+output/x rq->prq[0].rqe[1].b.b_data
+printf " length: "
+output/x rq->prq[0].rqe[1].b.b_bcount
+printf " drive offset: "
+output/x rq->prq[0].rqe[1].b.b_blkno
+printf " subdisk offset: "
+output/x rq->prq[0].rqe[1].sdoffset
+printf "\nFlags: "
+output/x rq->prq[0].rqe[1].b.b_flags
+echo \n
+end
+define rqq1
+printf "\nrq->prq [1].rqe[0].sdno: "
+output/x rq->prq[1].rqe[0].sdno
+printf "\nBuffer: device: "
+output/x rq->prq[1].rqe[0].b.b_dev
+printf " data: "
+output/x rq->prq[1].rqe[0].b.b_data
+printf " length: "
+output/x rq->prq[1].rqe[0].b.b_bcount
+printf " drive offset: "
+output/x rq->prq[1].rqe[0].b.b_blkno
+printf " subdisk offset: "
+output/x rq->prq[1].rqe[0].sdoffset
+printf "\nFlags: "
+output/x rq->prq[1].rqe[0].b.b_flags
+printf "\nrq->prq [1].rqe[1].sdno: "
+output/x rq->prq[1].rqe[1].sdno
+printf "\nBuffer: device: "
+output/x rq->prq[1].rqe[1].b.b_dev
+printf " data: 0x%x length 0x%x drive offset 0x%x sd offset 0x%x\n" rq->prq[1].rqe[1].b.b_data,
+ rq->prq[1].rqe[1].b.b_bcount,
+ rq->prq[1].rqe[1].b.b_blkno,
+ rq->prq[1].rqe[1].sdoffset
+printf "\nFlags: "
+output/x rq->prq[1].rqe[1].b.b_flags
+echo \n
+end
+define xy
+bpp
+echo stripeoffset
+p stripeoffset
+echo stripebase
+p stripebase
+echo sdno
+p sdno
+echo sdoffset
+p sdoffset
+echo rqe->sectors
+p rqe->sectors
+echo rqe->sdoffset
+p rqe->sdoffset
+end
+# kernel equivalent of 'info -V'
+define rqi
+ set $rqipe = rqip
+ set $rqip = $rqipe + 1
+ set $rqend = rqinfo + 128
+ if ($rqip == $rqend)
+ set $rqip = rqinfo
+ end
+ set $done = 0
+ while ($done == 0)
+ if ($rqip->bp != 0)
+ printf "%X:\t%d.%06d\tUBP: %x\t", $rqip, $rqip->timestamp.tv_sec, $rqip->timestamp.tv_usec, $rqip->bp
+ p $rqip->type
+ printf " user "
+ bpp $rqip->bp
+ if ($rqip->type < loginfo_rqe)
+ printf " copied"
+ bpp &$rqip->info
+ else
+ rrqe &$rqip->info
+ end
+ end
+ set $rqip = $rqip + 1
+ if ($rqip == $rqipe)
+ set $done = 1
+ end
+ if ($rqip == $rqend)
+ set $rqip = rqinfo
+ end
+ end
+end
+define rrqi
+ set $rqipe = rqip
+ set $rqip = $rqipe + 1
+ set $rqend = rqinfo + 128
+ if ($rqip == $rqend)
+ set $rqip = rqinfo
+ end
+ set $done = 0
+ while ($done == 0)
+ if ($rqip->bp != 0)
+ printf "%d.%06d\t", $rqip->timestamp.tv_sec, $rqip->timestamp.tv_usec
+ if ($rqip->type == loginfo_user_bp)
+ if ($rqip->info.b.b_flags & 0x00100000)
+ printf "1VS Read"
+ else
+ printf "1VS Write"
+ end
+ printf "\t%p\t%d.%d\t0x%-9x\t%ld\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.b.b_blkno, $rqip->info.b.b_bcount
+ end
+
+ if ($rqip->type == loginfo_user_bpl)
+ if ($rqip->info.b.b_flags & 0x00100000)
+ printf "2LR Read"
+ else
+ printf "2LR Write"
+ end
+ printf "\t%p\t%d.%d\t0x%-9x\t%ld\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.b.b_blkno, $rqip->info.b.b_bcount
+ end
+
+ if ($rqip->type == loginfo_rqe)
+ if ($rqip->info.b.b_flags & 0x00100000)
+ printf "3RQ Read"
+ else
+ printf "3RQ Write"
+ end
+ printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset
+ end
+
+ if ($rqip->type == loginfo_iodone)
+ if ($rqip->info.b.b_flags & 0x00100000)
+ printf "4DN Read"
+ else
+ printf "4DN Write"
+ end
+ printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset
+ end
+
+ if ($rqip->type == loginfo_raid5_data)
+ if ($rqip->info.b.b_flags & 0x00100000)
+ printf "5RD Read"
+ else
+ printf "5RD Write"
+ end
+ printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset
+ end
+
+ if ($rqip->type == loginfo_raid5_parity)
+ if ($rqip->info.b.b_flags & 0x00100000)
+ printf "6RP Read"
+ else
+ printf "6RP Write"
+ end
+ printf "\t%p\t%d.%d\t0x%-9x\t%ld\t%d\t%x\t%x\t%x\n", $rqip->bp, $rqip->devmajor, $rqip->devminor, $rqip->info.rqe.b.b_blkno, $rqip->info.rqe.b.b_bcount, $rqip->info.rqe.sdno, $rqip->info.rqe.sdoffset, $rqip->info.rqe.dataoffset, $rqip->info.rqe.groupoffset
+ end
+ end
+ set $rqip = $rqip + 1
+ if ($rqip == $rqipe)
+ set $done = 1
+ end
+ if ($rqip == $rqend)
+ set $rqip = rqinfo
+ end
+ end
+end