diff --git a/COPYING b/COPYING
index fcab48a..f1c75b4 100644
--- a/COPYING
+++ b/COPYING
@@ -1,10 +1,14 @@
 This interface is distributed under the same license as perl itself, i.e.
 either the Artistic License (COPYING.Artistic) or the GPL (COPYING.GNU).
 
-However, the uulib library itself (see the subdirectory uulib) is ONLY
-distributed under the GENERAL PUBLIC LICENSE (COPYING.GNU). Depending on
-how you use and distribute it, this makes the whole package fall under the
-GPL.
+The uulib library itself (see the subdirectory uulib) is distributed under
+the GENERAL PUBLIC LICENSE (COPYING.GNU). Depending on how you use and
+distribute it, this makes the whole package fall under the GPL.
+
+At least some parts of the uulib library are licensed differently:
+
+uulib/ecb.h	distributed unter GPL, to be in line with uulib.
+uulib/crc32.c	3-clause BSD, adapted from cyrus, see the file for details
 
 If you make modifications, please consider sending them to me,
 Marc Lehmann <schmorp@schmorp.de>
diff --git a/Changes b/Changes
index cd1ec25..660d7b8 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,67 @@
 Revision history for Perl extension Convert::UUlib.
 
+TODO: biggest timesinks: FP_fgets/getc_unlocked overall, UUInsertPartToList dominates large loads due to O(n**2) search
+
+1.8  Thu Dec 17 02:23:53 CET 2020
+	- no bugfixes in this release due to lack of known bugs, but the major changes
+          in this release might have introduced new bugs, so watch out.
+	- update large decoder example to disable OPT_AUTOCHK and use Smerge -1.
+	- some micro-optimisations.
+        - avoid costly string comparisons by comparing hashes when isnerting items,
+          which speeds up insertion by a constant factor.
+        - improve uulist (and other) structure layout and size.
+        - reverse the order of file list items, which heuristically improves
+          match speed with large usenet file lists.
+        - use getc instead of fgetc, which makes no difference on gnu/linux.
+        - clean up _FP symbol names toi not start with an underscore.
+        - use feof_unlocked and ferror_unlocked.
+        - implement a faster ascii-only strnicmp.
+	- misc very minor code improvements.
+        - remove quite a bit of pre-posix/dos/etc. cruft.
+        - use flockfile, if available, for a potential but small
+          speed gain.
+        - speed up inner yenc decoder loop.
+        - kentnl said that this module should no longer claim to be a simple
+          interface to uulib, as the bunndled copy is now better maintained
+          than the original upstream library.
+
+1.71 Tue Mar 17 00:54:06 CET 2020
+	- backport to c89 (patch by Paul Howarth).
+
+1.7  Sat Feb 29 22:07:54 CET 2020
+	- new function: GetFileList.
+	- experimental perlmulticore support (see manpage).
+        - Initialize is now a NOP and CleanUp automatically initializes again.
+        - updated example decoder and documentation a bit.
+	- include ecb.h to deal with compiler builtins and endianness.
+	- some further µ-optimisations in hot code, especially for yEnc.
+        - replace crc32 function by slice-by-16 version by Stephan Brumme,
+          which should speed up yEnc en-/decoding.
+        - yEnc: do not calculate two crcs per part, instead, combine
+          the part crcs together to form the file crc.
+        - yEnc: allow pcrc= in addition to pcrc32= for yenc trailers, as
+          some draft mentions both and it is actually in active use.
+        - yEnc: ignore crc32= on multiparts, except on the last part,
+          which avoids spurious corruption warnings.
+        - be more precise in documenting code licenses in COPYING.
+        - convert constant creation to the method I normally use.
+        - use common::sense.
+
+1.62 Mon Feb 17 23:19:42 CET 2020
+	- major performance improvement by simplifying code in _FP_gets
+          to not use fscanf. This might slow things down on platforms
+          with very slow fgetc.
+
+1.61 Sun Feb  9 18:38:29 CET 2020
+	- lint uulib: fix some format string type mismatches
+          and some other minor issues.
+
+1.6  Thu Oct 24 17:11:54 CEST 2019
+	- fix heap overflow (testcase by Noel Duffy, reported
+          by Robert Scheck). The defense-in-depth mechanism based
+          on mmap should make this unexploitable for other than denial
+          of service, on systems supporting mmap/mprotect.
+
 1.5  Sat Jul 11 03:56:06 CEST 2015
 	- fix a heap overflow (testcase by Krzysztof Wojtaś).
         - on systems that support it (posix + mmap + map_anonymous),
diff --git a/MANIFEST b/MANIFEST
index c62ce2e..0c6e5d6 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -12,6 +12,8 @@ example-decoder
 t/cb.t
 doc/library.pdf
 doc/HISTORY
+perlmulticore.h
+uulib/ecb.h
 uulib/safealloc.c
 uulib/Makefile.in
 uulib/acconfig.h
diff --git a/META.json b/META.json
index def6bda..b16b3bb 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001",
+   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150001",
    "license" : [
       "unknown"
    ],
@@ -32,9 +32,11 @@
          }
       },
       "runtime" : {
-         "requires" : {}
+         "requires" : {
+            "common::sense" : "3.74"
+         }
       }
    },
    "release_status" : "stable",
-   "version" : 1.5
+   "version" : 1.8
 }
diff --git a/META.yml b/META.yml
index a6c29f4..6c58410 100644
--- a/META.yml
+++ b/META.yml
@@ -8,7 +8,7 @@ configure_requires:
   Canary::Stability: '0'
   ExtUtils::MakeMaker: '6.52'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150001'
 license: unknown
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,5 +18,6 @@ no_index:
   directory:
     - t
     - inc
-requires: {}
-version: 1.5
+requires:
+  common::sense: '3.74'
+version: 1.8
diff --git a/Makefile.PL b/Makefile.PL
index 5493dcd..b1cc91a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -35,4 +35,7 @@ WriteMakefile(
        "ExtUtils::MakeMaker" => 6.52,
        "Canary::Stability"   => 0,
     },
+    PREREQ_PM => {
+       "common::sense"       => 3.74,
+    },
 );
diff --git a/README b/README
index 62a4a07..fb83bc4 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 NAME
-    Convert::UUlib - Perl interface to the uulib library (a.k.a.
-    uudeview/uuenview).
+    Convert::UUlib - decode uu/xx/b64/mime/yenc/etc-encoded data from a
+    massive number of files
 
 SYNOPSIS
      use Convert::UUlib ':all';
@@ -8,7 +8,8 @@ SYNOPSIS
      # read all the files named on the commandline and decode them
      # into the CURRENT directory. See below for a longer example.
      LoadFile $_ for @ARGV;
-     for (my $i = 0; my $uu = GetFileListItem $i; $i++) {
+
+     for my $uu (GetFileList) {
         if ($uu->state & FILE_OK) {
           $uu->decode;
           print $uu->filename, "\n";
@@ -16,6 +17,16 @@ SYNOPSIS
      }
 
 DESCRIPTION
+    This module started as an interface to the uulib/uudeview library by
+    Frank Pilhofer that can be used to decode all kinds of usenet (and
+    other) binary messages.
+
+    After upstream abondoned the project, th library was continuously
+    bugfixed and improved in this module, with major focuses on security
+    fixes, correctness and speed (that does not mean that this library is
+    considered safe with untrusted data, but it surely is safer than the
+    poriginal uudeview).
+
     Read the file doc/library.pdf from the distribution for in-depth
     information about the C-library used in this interface, and the rest of
     this document and especially the non-trivial decoder program at the end.
@@ -107,12 +118,9 @@ EXPORTED FUNCTIONS
     On my machine, a fairly complete decode with DBI backend needs about
     10MB RSS to decode 20000 files.
 
-    Initialize
-        Not normally necessary, (re-)initializes the library.
-
     CleanUp
-        Not normally necessary, could be called at the end to release memory
-        before starting a new decoding round.
+        Release memory, file items and clean up files. Should be called
+        after a decoidng run, if you want to start a new one.
 
   Setting and querying options
     $option = GetOption OPT_xxx
@@ -160,8 +168,17 @@ EXPORTED FUNCTIONS
         iterate over all files by starting with zero and incrementing until
         you hit "undef".
 
+        This function has to walk the linear list of fils on each access, so
+        if you want to iterate over all items, it is usually faster to use
+        "GetFileList".
+
+    @items = GetFileList
+        Similar to "GetFileListItem", but returns all files in one go, which
+        is very much faster for large number of items, and has no drawbacks
+        when used for a small number of items.
+
   Decoding files
-    $retval = $item->rename($newname)
+    $retval = $item->rename ($newname)
         Change the ondisk filename where the decoded file will be saved.
 
     $retval = $item->decode_temp
@@ -171,17 +188,17 @@ EXPORTED FUNCTIONS
     $retval = $item->remove_temp
         Remove the temporarily decoded file again.
 
-    $retval = $item->decode([$target_path])
-        Decode the file to it's destination, or the given target path.
+    $retval = $item->decode ([$target_path])
+        Decode the file to its destination, or the given target path.
 
-    $retval = $item->info(callback-function)
+    $retval = $item->info (callback-function)
 
   Querying (and setting) item attributes
     $state = $item->state
-    $mode = $item->mode([newmode])
+    $mode = $item->mode ([newmode])
     $uudet = $item->uudet
     $size = $item->size
-    $filename = $item->filename([newfilename})
+    $filename = $item->filename ([newfilename})
     $subfname = $item->subfname
     $mimeid = $item->mimeid
     $mimetype = $item->mimetype
@@ -207,7 +224,7 @@ EXPORTED FUNCTIONS
         Usually you are interested mostly the "sfname" and possibly the
         "partno" and "filename" members.
 
-  Functions below not documented and not very well tested
+  Functions below are not documented and not very well tested - feedback welcome
       QuickDecode
       EncodeMulti
       EncodePartial
@@ -263,8 +280,16 @@ EXPORTED FUNCTIONS
           }
 
 LARGE EXAMPLE DECODER
-    This is the file "example-decoder" from the distribution, put here
-    instead of more thorough documentation.
+    The general workflow for decoding is like this:
+
+    1. Configure options with "SetOption" or "SetXXXCallback".
+    2. Load all source files with "LoadFile".
+    3. Optionally "Smerge".
+    4. Iterate over all "GetFileList" items (i.e. result files).
+    5. "CleanUp" to delete files and free items.
+
+    What follows is the file "example-decoder" from the distribution that
+    illustrates the above worklfow in a non-trivial example.
 
        #!/usr/bin/perl
 
@@ -293,6 +318,7 @@ LARGE EXAMPLE DECODER
        SetOption OPT_IGNMODE, 1;
        SetOption OPT_IGNMODE, 1;
        SetOption OPT_VERBOSE, 1;
+       SetOption OPT_AUTOCHK, 0;
 
        # show the three ways you can set callback functions. I normally
        # prefer the one with the sub inplace.
@@ -336,44 +362,41 @@ LARGE EXAMPLE DECODER
        };
 
        # now read all files in the directory uusrc/*
-       for(<uusrc/*>) {
+       for (<uusrc/*>) {
           my ($retval, $count) = LoadFile ($_, $_, 1);
           print "file($_), status(", strerror $retval, ") parts($count)\n";
        }
 
+       Smerge -1;
+
        SetOption OPT_SAVEPATH, "uudst/";
 
        # now wade through all files and their source parts
-       $i = 0;
-       while ($uu = GetFileListItem $i) {
-          $i++;
-          print "file nr. $i";
-          print " state ", $uu->state;
-          print " mode ", $uu->mode;
-          print " uudet ", strencoding $uu->uudet;
-          print " size ", $uu->size;
-          print " filename ", $uu->filename;
-          print " subfname ", $uu->subfname;
-          print " mimeid ", $uu->mimeid;
-          print " mimetype ", $uu->mimetype;
-          print "\n";
+       for my $uu (GetFileList) {
+          print "file ", $uu->filename, "\n";
+          print " state ", $uu->state, "\n";
+          print " mode ", $uu->mode, "\n";
+          print " uudet ", strencoding $uu->uudet, "\n";
+          print " size ", $uu->size, "\n";
+          print " subfname ", $uu->subfname, "\n";
+          print " mimeid ", $uu->mimeid, "\n";
+          print " mimetype ", $uu->mimetype, "\n";
 
           # print additional info about all parts
+          print " parts";
           for ($uu->parts) {
-             while (my ($k, $v) = each %$_) {
-                print "$k > $v, ";
+             for my $k (sort keys %$_) {
+                print " $k=$_->{$k}";
              }
              print "\n";
           }
 
-          print $uu->filename;
-
           $uu->remove_temp;
 
-          if (my $err = $uu->decode ()) {
-             print ", ", strerror $err, "\n";
+          if (my $err = $uu->decode) {
+             print " ERROR ", strerror $err, "\n";
           } else {
-             print ", saved as uudst/", $uu->filename, "\n";
+             print " successfully saved as uudst/", $uu->filename, "\n";
           }
        }
 
@@ -381,11 +404,47 @@ LARGE EXAMPLE DECODER
 
        CleanUp;
 
+PERLMULTICORE SUPPORT
+    This module supports the perlmulticore standard (see
+    <http://perlmulticore.schmorp.de/> for more info) for the following
+    functions - generally these are functions accessing the disk and/or
+    using considerable CPU time:
+
+       LoadFile
+       $item->decode
+       $item->decode_temp
+       $item->remove_temp
+       $item->info
+
+    The perl interpreter will be reacquired/released on every callback
+    invocation, so for performance reasons, callbacks should be avoided if
+    that is costly.
+
+    Future versions might enable multicore support for more functions.
+
+BUGS AND LIMITATIONS
+    The original uulib library this module uses was written at a time where
+    main memory of measured in megabytes and buffer overflows as a security
+    thign didn't exist. While a lot of security fixes have been applied over
+    the years (includign some defense in depth mechanism that can shield
+    against a lot of as-of-yet undetected bugs), using this library for
+    security purposes requires care.
+
+    Likewise, file sizes when the uulib library was written were tiny
+    compared to today, so do not expect this library to handle files larger
+    than 2GB.
+
+    Lastly, this module uses a very "C-like" interface, which means it
+    doesn't protect you from invalid points as you might expect from "more
+    perlish" modules - for example, accessing a file item object after
+    callinbg "CleanUp" will likely result in crashes, memory corruption, or
+    worse.
+
 AUTHOR
     Marc Lehmann <schmorp@schmorp.de>, the original uulib library was
     written by Frank Pilhofer <fp@informatik.uni-frankfurt.de>, and later
     heavily bugfixed by Marc Lehmann.
 
 SEE ALSO
-    perl(1), uudeview homepage at http://www.uni-frankfurt.de/~fp/uudeview/.
+    perl(1), uudeview homepage at <http://www.fpx.de/fp/Software/UUDeview/>.
 
diff --git a/UUlib.pm b/UUlib.pm
index 1a817b7..4fc0f31 100644
--- a/UUlib.pm
+++ b/UUlib.pm
@@ -1,14 +1,13 @@
 package Convert::UUlib;
 
-no warnings;
-use strict;
+use common::sense;
 
 use Carp;
 
 require Exporter;
 require DynaLoader;
 
-our $VERSION = 1.5;
+our $VERSION = 1.8;
 
 our @ISA = qw(Exporter DynaLoader);
 
@@ -36,7 +35,7 @@ our @_consts = qw(
 our @_funcs = qw(
         Initialize CleanUp GetOption SetOption strerror SetMsgCallback
         SetBusyCallback SetFileCallback SetFNameFilter SetFileNameCallback
-        FNameFilter LoadFile GetFileListItem RenameFile DecodeToTemp
+        FNameFilter LoadFile GetFileListItem GetFileList RenameFile DecodeToTemp
         RemoveTemp DecodeFile InfoFile Smerge QuickDecode EncodeMulti
         EncodePartial EncodeToStream EncodeToFile E_PrepSingle
         E_PrepPartial
@@ -50,16 +49,8 @@ our %EXPORT_TAGS = (all => [@_consts,@_funcs], constants => \@_consts);
 
 bootstrap Convert::UUlib $VERSION;
 
-Initialize();
-
-# not when < 5.005_6x
-# END { CleanUp() }
-
-for (@_consts) {
-   my $constant = constant($_);
-   no strict 'refs';
-   *$_ = sub () { $constant };
-}
+# dummy function for compatiiblity with pre-1.7 versions
+sub Initialize { }
 
 # action code -> string mapping
 sub straction($) {
@@ -98,7 +89,7 @@ __END__
 
 =head1 NAME
 
-Convert::UUlib - Perl interface to the uulib library (a.k.a. uudeview/uuenview).
+Convert::UUlib - decode uu/xx/b64/mime/yenc/etc-encoded data from a massive number of files
 
 =head1 SYNOPSIS
 
@@ -107,7 +98,8 @@ Convert::UUlib - Perl interface to the uulib library (a.k.a. uudeview/uuenview).
  # read all the files named on the commandline and decode them
  # into the CURRENT directory. See below for a longer example.
  LoadFile $_ for @ARGV;
- for (my $i = 0; my $uu = GetFileListItem $i; $i++) {
+
+ for my $uu (GetFileList) {
     if ($uu->state & FILE_OK) {
       $uu->decode;
       print $uu->filename, "\n";
@@ -116,6 +108,16 @@ Convert::UUlib - Perl interface to the uulib library (a.k.a. uudeview/uuenview).
 
 =head1 DESCRIPTION
 
+This module started as an interface to the uulib/uudeview library by Frank
+Pilhofer that can be used to decode all kinds of usenet (and other)
+binary messages.
+
+After upstream abondoned the project, th library was continuously bugfixed
+and improved in this module, with major focuses on security fixes,
+correctness and speed (that does not mean that this library is considered
+safe with untrusted data, but it surely is safer than the poriginal
+uudeview).
+
 Read the file doc/library.pdf from the distribution for in-depth
 information about the C-library used in this interface, and the rest of
 this document and especially the non-trivial decoder program at the end.
@@ -216,22 +218,18 @@ again.
 On my machine, a fairly complete decode with DBI backend needs about 10MB
 RSS to decode 20000 files.
 
-=over 4
-
-=item Initialize
-
-Not normally necessary, (re-)initializes the library.
+=over
 
 =item CleanUp
 
-Not normally necessary, could be called at the end to release memory
-before starting a new decoding round.
+Release memory, file items and clean up files. Should be called after a
+decoidng run, if you want to start a new one.
 
 =back
 
 =head2 Setting and querying options
 
-=over 4
+=over
 
 =item $option = GetOption OPT_xxx
 
@@ -243,7 +241,7 @@ See the C<OPT_xxx> constants above to see which options exist.
 
 =head2 Setting various callbacks
 
-=over 4
+=over
 
 =item SetMsgCallback [callback-function]
 
@@ -257,7 +255,7 @@ See the C<OPT_xxx> constants above to see which options exist.
 
 =head2 Call the currently selected FNameFilter
 
-=over 4
+=over
 
 =item $file = FNameFilter $file
 
@@ -265,7 +263,7 @@ See the C<OPT_xxx> constants above to see which options exist.
 
 =head2 Loading sourcefiles, optionally fuzzy merge and start decoding
 
-=over 4
+=over
 
 =item ($retval, $count) = LoadFile $fname, [$id, [$delflag, [$partno]]]
 
@@ -300,13 +298,23 @@ The first file has number C<0>, and the series has no holes, so you can
 iterate over all files by starting with zero and incrementing until you
 hit C<undef>.
 
+This function has to walk the linear list of fils on each access, so
+if you want to iterate over all items, it is usually faster to use
+C<GetFileList>.
+
+=item @items = GetFileList
+
+Similar to C<GetFileListItem>, but returns all files in one go, which is
+very much faster for large number of items, and has no drawbacks when used
+for a small number of items.
+
 =back
 
 =head2 Decoding files
 
-=over 4
+=over
 
-=item $retval = $item->rename($newname)
+=item $retval = $item->rename ($newname)
 
 Change the ondisk filename where the decoded file will be saved.
 
@@ -319,27 +327,27 @@ retrieve the temporary filename.
 
 Remove the temporarily decoded file again.
 
-=item $retval = $item->decode([$target_path])
+=item $retval = $item->decode ([$target_path])
 
-Decode the file to it's destination, or the given target path.
+Decode the file to its destination, or the given target path.
 
-=item $retval = $item->info(callback-function)
+=item $retval = $item->info (callback-function)
 
 =back
 
 =head2 Querying (and setting) item attributes
 
-=over 4
+=over
 
 =item $state    = $item->state
 
-=item $mode     = $item->mode([newmode])
+=item $mode     = $item->mode ([newmode])
 
 =item $uudet    = $item->uudet
 
 =item $size     = $item->size
 
-=item $filename = $item->filename([newfilename})
+=item $filename = $item->filename ([newfilename})
 
 =item $subfname = $item->subfname
 
@@ -353,7 +361,7 @@ Decode the file to it's destination, or the given target path.
 
 =head2 Information about source parts
 
-=over 4
+=over
 
 =item $parts = $item->parts
 
@@ -377,7 +385,7 @@ and C<filename> members.
 
 =back
 
-=head2 Functions below not documented and not very well tested
+=head2 Functions below are not documented and not very well tested - feedback welcome
 
   QuickDecode
   EncodeMulti
@@ -391,7 +399,7 @@ and C<filename> members.
 
 Functions found in this module but not documented in the uulib documentation:
 
-=over 4
+=over
 
 =item $msg = straction ACT_xxx
 
@@ -442,8 +450,24 @@ This is a slightly more useful callback:
 
 =head1 LARGE EXAMPLE DECODER
 
-This is the file C<example-decoder> from the distribution, put here
-instead of more thorough documentation.
+The general workflow for decoding is like this:
+
+=over
+
+=item 1. Configure options with C<SetOption> or C<SetXXXCallback>.
+
+=item 2. Load all source files with C<LoadFile>.
+
+=item 3. Optionally C<Smerge>.
+
+=item 4. Iterate over all C<GetFileList> items (i.e. result files).
+
+=item 5. C<CleanUp> to delete files and free items.
+
+=back
+
+What follows is the file C<example-decoder> from the distribution that
+illustrates the above worklfow in a non-trivial example.
 
    #!/usr/bin/perl
 
@@ -472,6 +496,7 @@ instead of more thorough documentation.
    SetOption OPT_IGNMODE, 1;
    SetOption OPT_IGNMODE, 1;
    SetOption OPT_VERBOSE, 1;
+   SetOption OPT_AUTOCHK, 0;
 
    # show the three ways you can set callback functions. I normally
    # prefer the one with the sub inplace.
@@ -515,44 +540,41 @@ instead of more thorough documentation.
    };
 
    # now read all files in the directory uusrc/*
-   for(<uusrc/*>) {
+   for (<uusrc/*>) {
       my ($retval, $count) = LoadFile ($_, $_, 1);
       print "file($_), status(", strerror $retval, ") parts($count)\n";
    }
 
+   Smerge -1;
+
    SetOption OPT_SAVEPATH, "uudst/";
 
    # now wade through all files and their source parts
-   $i = 0;
-   while ($uu = GetFileListItem $i) {
-      $i++;
-      print "file nr. $i";
-      print " state ", $uu->state;
-      print " mode ", $uu->mode;
-      print " uudet ", strencoding $uu->uudet;
-      print " size ", $uu->size;
-      print " filename ", $uu->filename;
-      print " subfname ", $uu->subfname;
-      print " mimeid ", $uu->mimeid;
-      print " mimetype ", $uu->mimetype;
-      print "\n";
+   for my $uu (GetFileList) {
+      print "file ", $uu->filename, "\n";
+      print " state ", $uu->state, "\n";
+      print " mode ", $uu->mode, "\n";
+      print " uudet ", strencoding $uu->uudet, "\n";
+      print " size ", $uu->size, "\n";
+      print " subfname ", $uu->subfname, "\n";
+      print " mimeid ", $uu->mimeid, "\n";
+      print " mimetype ", $uu->mimetype, "\n";
 
       # print additional info about all parts
+      print " parts";
       for ($uu->parts) {
-         while (my ($k, $v) = each %$_) {
-            print "$k > $v, ";
+         for my $k (sort keys %$_) {
+            print " $k=$_->{$k}";
          }
          print "\n";
       }
 
-      print $uu->filename;
-
       $uu->remove_temp;
 
-      if (my $err = $uu->decode ()) {
-         print ", ", strerror $err, "\n";
+      if (my $err = $uu->decode) {
+         print " ERROR ", strerror $err, "\n";
       } else {
-         print ", saved as uudst/", $uu->filename, "\n";
+         print " successfully saved as uudst/", $uu->filename, "\n";
       }
    }
 
@@ -560,6 +582,42 @@ instead of more thorough documentation.
 
    CleanUp;
 
+=head1 PERLMULTICORE SUPPORT
+
+This module supports the perlmulticore standard (see
+L<http://perlmulticore.schmorp.de/> for more info) for the following
+functions - generally these are functions accessing the disk and/or using
+considerable CPU time:
+
+   LoadFile
+   $item->decode
+   $item->decode_temp
+   $item->remove_temp
+   $item->info
+
+The perl interpreter will be reacquired/released on every callback
+invocation, so for performance reasons, callbacks should be avoided if
+that is costly.
+
+Future versions might enable multicore support for more functions.
+
+=head1 BUGS AND LIMITATIONS
+
+The original uulib library this module uses was written at a time where
+main memory of measured in megabytes and buffer overflows as a security
+thign didn't exist. While a lot of security fixes have been applied over
+the years (includign some defense in depth mechanism that can shield
+against a lot of as-of-yet undetected bugs), using this library for
+security purposes requires care.
+
+Likewise, file sizes when the uulib library was written were tiny compared
+to today, so do not expect this library to handle files larger than 2GB.
+
+Lastly, this module uses a very "C-like" interface, which means it doesn't
+protect you from invalid points as you might expect from "more perlish"
+modules - for example, accessing a file item object after callinbg
+C<CleanUp> will likely result in crashes, memory corruption, or worse.
+
 =head1 AUTHOR
 
 Marc Lehmann <schmorp@schmorp.de>, the original uulib library was written
@@ -568,6 +626,7 @@ bugfixed by Marc Lehmann.
 
 =head1 SEE ALSO
 
-perl(1), uudeview homepage at http://www.uni-frankfurt.de/~fp/uudeview/.
+perl(1), uudeview homepage at L<http://www.fpx.de/fp/Software/UUDeview/>.
 
 =cut
+
diff --git a/UUlib.xs b/UUlib.xs
index d44b3e2..9a8f59d 100644
--- a/UUlib.xs
+++ b/UUlib.xs
@@ -2,139 +2,67 @@
 #include "perl.h"
 #include "XSUB.h"
 
+#include "perlmulticore.h"
+
 #include "uulib/fptools.h"
 #include "uulib/uudeview.h"
 #include "uulib/uuint.h"
 
-static int
-not_here (char *s)
-{
-  croak("%s not implemented", s);
-  return -1;
-}
+static int perlinterp_released;
 
-static int
-constant (char *name)
-{
-  errno = 0;
-  switch (*name)
-    {
-      case 'A':
-        if (strEQ(name, "ACT_COPYING")) return UUACT_COPYING;
-        if (strEQ(name, "ACT_DECODING")) return UUACT_DECODING;
-        if (strEQ(name, "ACT_ENCODING")) return UUACT_ENCODING;
-        if (strEQ(name, "ACT_IDLE")) return UUACT_IDLE;
-        if (strEQ(name, "ACT_SCANNING")) return UUACT_SCANNING;
-      case 'F':
-        if (strEQ(name, "FILE_DECODED")) return UUFILE_DECODED;
-        if (strEQ(name, "FILE_ERROR")) return UUFILE_ERROR;
-        if (strEQ(name, "FILE_MISPART")) return UUFILE_MISPART;
-        if (strEQ(name, "FILE_NOBEGIN")) return UUFILE_NOBEGIN;
-        if (strEQ(name, "FILE_NODATA")) return UUFILE_NODATA;
-        if (strEQ(name, "FILE_NOEND")) return UUFILE_NOEND;
-        if (strEQ(name, "FILE_OK")) return UUFILE_OK;
-        if (strEQ(name, "FILE_READ")) return UUFILE_READ;
-        if (strEQ(name, "FILE_TMPFILE")) return UUFILE_TMPFILE;
-        break;
-      case 'M':
-        if (strEQ(name, "MSG_ERROR")) return UUMSG_ERROR;
-        if (strEQ(name, "MSG_FATAL")) return UUMSG_FATAL;
-        if (strEQ(name, "MSG_MESSAGE")) return UUMSG_MESSAGE;
-        if (strEQ(name, "MSG_NOTE")) return UUMSG_NOTE;
-        if (strEQ(name, "MSG_PANIC")) return UUMSG_PANIC;
-        if (strEQ(name, "MSG_WARNING")) return UUMSG_WARNING;
-      case 'O':
-        if (strEQ(name, "OPT_VERSION")) return UUOPT_VERSION;
-        if (strEQ(name, "OPT_FAST")) return UUOPT_FAST;
-        if (strEQ(name, "OPT_DUMBNESS")) return UUOPT_DUMBNESS;
-        if (strEQ(name, "OPT_BRACKPOL")) return UUOPT_BRACKPOL;
-        if (strEQ(name, "OPT_VERBOSE")) return UUOPT_VERBOSE;
-        if (strEQ(name, "OPT_DESPERATE")) return UUOPT_DESPERATE;
-        if (strEQ(name, "OPT_IGNREPLY")) return UUOPT_IGNREPLY;
-        if (strEQ(name, "OPT_OVERWRITE")) return UUOPT_OVERWRITE;
-        if (strEQ(name, "OPT_SAVEPATH")) return UUOPT_SAVEPATH;
-        if (strEQ(name, "OPT_IGNMODE")) return UUOPT_IGNMODE;
-        if (strEQ(name, "OPT_DEBUG")) return UUOPT_DEBUG;
-        if (strEQ(name, "OPT_ERRNO")) return UUOPT_ERRNO;
-        if (strEQ(name, "OPT_PROGRESS")) return UUOPT_PROGRESS;
-        if (strEQ(name, "OPT_USETEXT")) return UUOPT_USETEXT;
-        if (strEQ(name, "OPT_PREAMB")) return UUOPT_PREAMB;
-        if (strEQ(name, "OPT_TINYB64")) return UUOPT_TINYB64;
-        if (strEQ(name, "OPT_ENCEXT")) return UUOPT_ENCEXT;
-        if (strEQ(name, "OPT_REMOVE")) return UUOPT_REMOVE;
-        if (strEQ(name, "OPT_MOREMIME")) return UUOPT_MOREMIME;
-        if (strEQ(name, "OPT_DOTDOT")) return UUOPT_DOTDOT;
-        if (strEQ(name, "OPT_RBUF")) return UUOPT_RBUF;
-        if (strEQ(name, "OPT_WBUF")) return UUOPT_WBUF;
-        if (strEQ(name, "OPT_AUTOCHECK")) return UUOPT_AUTOCHECK;
-      case 'R':
-        if (strEQ(name, "RET_CANCEL")) return UURET_CANCEL;
-        if (strEQ(name, "RET_CONT")) return UURET_CONT;
-        if (strEQ(name, "RET_EXISTS")) return UURET_EXISTS;
-        if (strEQ(name, "RET_ILLVAL")) return UURET_ILLVAL;
-        if (strEQ(name, "RET_IOERR")) return UURET_IOERR;
-        if (strEQ(name, "RET_NODATA")) return UURET_NODATA;
-        if (strEQ(name, "RET_NOEND")) return UURET_NOEND;
-        if (strEQ(name, "RET_NOMEM")) return UURET_NOMEM;
-        if (strEQ(name, "RET_OK")) return UURET_OK;
-        if (strEQ(name, "RET_UNSUP")) return UURET_UNSUP;
-      case 'B':
-        if (strEQ(name, "B64_ENCODED")) return B64ENCODED;
-        if (strEQ(name, "BH_ENCODED")) return BH_ENCODED;
-      case 'P':
-        if (strEQ(name, "PT_ENCODED")) return PT_ENCODED;
-      case 'Q':
-        if (strEQ(name, "QP_ENCODED")) return QP_ENCODED;
-      case 'U':
-        if (strEQ(name, "UU_ENCODED")) return UU_ENCODED;
-      case 'X':
-        if (strEQ(name, "XX_ENCODED")) return XX_ENCODED;
-      case 'Y':
-        if (strEQ(name, "YENC_ENCODED")) return YENC_ENCODED;
-    }
+#define RELEASE do { perlinterp_released = 1; perlinterp_release (); } while (0)
+#define ACQUIRE do { perlinterp_acquire (); perlinterp_released = 0; } while (0)
 
-  errno = EINVAL;
-  return 0;
-}
+#define TEMP_ACQUIRE if (perlinterp_released) perlinterp_acquire ();
+#define TEMP_RELEASE if (perlinterp_released) perlinterp_release ();
 
 static void
 uu_msg_callback (void *cb, char *msg, int level)
 {
-  dSP;
- 
-  ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2);
+  TEMP_ACQUIRE {
+
+    dSP;
+   
+    ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2);
 
-  PUSHs (sv_2mortal (newSVpv (msg, 0)));
-  PUSHs (sv_2mortal (newSViv (level)));
+    PUSHs (sv_2mortal (newSVpv (msg, 0)));
+    PUSHs (sv_2mortal (newSViv (level)));
 
-  PUTBACK; (void) perl_call_sv ((SV *)cb, G_VOID|G_DISCARD); SPAGAIN;
-  PUTBACK; FREETMPS; LEAVE;
+    PUTBACK; (void) perl_call_sv ((SV *)cb, G_VOID|G_DISCARD); SPAGAIN;
+    PUTBACK; FREETMPS; LEAVE;
+
+  } TEMP_RELEASE;
 }
 
 static int
 uu_busy_callback (void *cb, uuprogress *uup)
 {
-  dSP;
-  int count;
   int retval;
- 
-  ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 6);
 
-  PUSHs (sv_2mortal (newSViv (uup->action)));
-  PUSHs (sv_2mortal (newSVpv (uup->curfile, 0)));
-  PUSHs (sv_2mortal (newSViv (uup->partno)));
-  PUSHs (sv_2mortal (newSViv (uup->numparts)));
-  PUSHs (sv_2mortal (newSViv (uup->fsize)));
-  PUSHs (sv_2mortal (newSViv (uup->percent)));
+  TEMP_ACQUIRE {
+
+    dSP;
+    int count;
+   
+    ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 6);
+
+    PUSHs (sv_2mortal (newSViv (uup->action)));
+    PUSHs (sv_2mortal (newSVpv (uup->curfile, 0)));
+    PUSHs (sv_2mortal (newSViv (uup->partno)));
+    PUSHs (sv_2mortal (newSViv (uup->numparts)));
+    PUSHs (sv_2mortal (newSViv (uup->fsize)));
+    PUSHs (sv_2mortal (newSViv (uup->percent)));
 
-  PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
+    PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
 
-  if (count != 1)
-    croak ("busycallback perl callback returned more than one argument");
+    if (count != 1)
+      croak ("busycallback perl callback returned more than one argument");
 
-  retval = POPi;
+    retval = POPi;
 
-  PUTBACK; FREETMPS; LEAVE;
+    PUTBACK; FREETMPS; LEAVE;
+
+  } TEMP_RELEASE;
 
   return retval;
 }
@@ -142,22 +70,27 @@ uu_busy_callback (void *cb, uuprogress *uup)
 static char *
 uu_fnamefilter_callback (void *cb, char *fname)
 {
-  dSP;
-  int count;
   static char *str;
- 
-  ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 1);
 
-  PUSHs (sv_2mortal (newSVpv (fname, 0)));
+  TEMP_ACQUIRE {
+
+    dSP;
+    int count;
+   
+    ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 1);
+
+    PUSHs (sv_2mortal (newSVpv (fname, 0)));
+
+    PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
 
-  PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
+    if (count != 1)
+      croak ("fnamefilter perl callback MUST return a single filename exactly");
 
-  if (count != 1)
-    croak ("fnamefilter perl callback MUST return a single filename exactly");
+    FP_free (str); str = FP_strdup (SvPV_nolen (TOPs));
 
-  _FP_free (str); str = _FP_strdup (SvPV_nolen (TOPs));
+    PUTBACK; FREETMPS; LEAVE;
 
-  PUTBACK; FREETMPS; LEAVE;
+  } TEMP_RELEASE;
 
   return str;
 }
@@ -165,26 +98,31 @@ uu_fnamefilter_callback (void *cb, char *fname)
 static int
 uu_file_callback (void *cb, char *id, char *fname, int retrieve)
 {
-  dSP;
-  int count;
   int retval;
-  SV *xfname = newSVpv ("", 0);
- 
-  ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3);
 
-  PUSHs (sv_2mortal (newSVpv (id, 0)));
-  PUSHs (sv_2mortal (xfname));
-  PUSHs (sv_2mortal (newSViv (retrieve)));
+  TEMP_ACQUIRE {
+
+    dSP;
+    int count;
+    SV *xfname = newSVpv ("", 0);
+   
+    ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3);
+
+    PUSHs (sv_2mortal (newSVpv (id, 0)));
+    PUSHs (sv_2mortal (xfname));
+    PUSHs (sv_2mortal (newSViv (retrieve)));
+
+    PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
 
-  PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
+    if (count != 1)
+      croak ("filecallback perl callback must return a single return status");
 
-  if (count != 1)
-    croak ("filecallback perl callback must return a single return status");
+    strcpy (fname, SvPV_nolen (xfname));
+    retval = POPi;
 
-  strcpy (fname, SvPV_nolen (xfname));
-  retval = POPi;
+    PUTBACK; FREETMPS; LEAVE;
 
-  PUTBACK; FREETMPS; LEAVE;
+  } TEMP_RELEASE;
 
   return retval;
 }
@@ -192,29 +130,33 @@ uu_file_callback (void *cb, char *id, char *fname, int retrieve)
 static char *
 uu_filename_callback (void *cb, char *subject, char *filename)
 {
-  dSP;
-  int count;
- 
-  ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2);
+  TEMP_ACQUIRE {
 
-  PUSHs (sv_2mortal(newSVpv(subject, 0)));
-  PUSHs (filename ? sv_2mortal(newSVpv(filename, 0)) : &PL_sv_undef);
+    dSP;
+    int count;
+   
+    ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2);
 
-  PUTBACK; count = perl_call_sv ((SV *)cb, G_ARRAY); SPAGAIN;
+    PUSHs (sv_2mortal(newSVpv(subject, 0)));
+    PUSHs (filename ? sv_2mortal(newSVpv(filename, 0)) : &PL_sv_undef);
 
-  if (count > 1)
-    croak ("filenamecallback perl callback must return nothing or a single filename");
+    PUTBACK; count = perl_call_sv ((SV *)cb, G_ARRAY); SPAGAIN;
 
-  if (count)
-    {
-      _FP_free (filename);
+    if (count > 1)
+      croak ("filenamecallback perl callback must return nothing or a single filename");
 
-      filename = SvOK (TOPs)
-         ? _FP_strdup (SvPV_nolen (TOPs))
-         : 0;
-    }
+    if (count)
+      {
+        FP_free (filename);
+
+        filename = SvOK (TOPs)
+           ? FP_strdup (SvPV_nolen (TOPs))
+           : 0;
+      }
 
-  PUTBACK; FREETMPS; LEAVE;
+    PUTBACK; FREETMPS; LEAVE;
+
+  } TEMP_RELEASE;
 
   return filename;
 }
@@ -226,22 +168,27 @@ static SV *uu_msg_sv, *uu_busy_sv, *uu_file_sv, *uu_fnamefilter_sv, *uu_filename
 static int
 uu_info_file (void *cb, char *info)
 {
-  dSP;
-  int count;
   int retval;
- 
-  ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP,1);
 
-  PUSHs(sv_2mortal(newSVpv(info,0)));
+  TEMP_ACQUIRE {
+
+    dSP;
+    int count;
+   
+    ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP,1);
+
+    PUSHs(sv_2mortal(newSVpv(info,0)));
 
-  PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
+    PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN;
 
-  if (count != 1)
-    croak ("info_file perl callback returned more than one argument");
+    if (count != 1)
+      croak ("info_file perl callback returned more than one argument");
 
-  retval = POPi;
+    retval = POPi;
 
-  PUTBACK; FREETMPS; LEAVE;
+    PUTBACK; FREETMPS; LEAVE;
+
+  } TEMP_RELEASE;
 
   return retval;
 }
@@ -260,37 +207,24 @@ uu_opt_isstring (int opt)
     }
 }
 
-static int uu_initialized;
+static void
+initialise (void)
+{
+  int retval = UUInitialize ();
+
+  if (retval != UURET_OK)
+    croak ("unable to initialize uudeview library (%s)", UUstrerror (retval));
+}
 
 MODULE = Convert::UUlib		PACKAGE = Convert::UUlib		PREFIX = UU
 
 PROTOTYPES: ENABLE
 
-int
-constant (name)
-	char *		name
-
-
-void
-UUInitialize ()
-	CODE:
-        if (!uu_initialized)
-          {
-            int retval;
-
-            if ((retval = UUInitialize ()) != UURET_OK)
-              croak ("unable to initialize uudeview library (%s)", UUstrerror (retval));
- 
-            uu_initialized = 1;
-          }
-
 void
 UUCleanUp ()
 	CODE:
-	if (uu_initialized)
-          UUCleanUp ();
-
-        uu_initialized = 0;
+        UUCleanUp ();
+        initialise ();
 
 SV *
 UUGetOption (opt)
@@ -378,8 +312,13 @@ UULoadFile (fname, id = 0, delflag = 0, partno = -1)
         PPCODE:
 {
 	int count;
+        IV ret;
+
+        RELEASE;
+        ret = UULoadFileWithPartNo (fname, id, delflag, partno, &count);
+        ACQUIRE;
 
-	XPUSHs (sv_2mortal (newSViv (UULoadFileWithPartNo (fname, id, delflag, partno, &count))));
+	XPUSHs (sv_2mortal (newSViv (ret)));
         if (GIMME_V == G_ARRAY)
           XPUSHs (sv_2mortal (newSViv (count)));
 }
@@ -468,6 +407,16 @@ uulist *
 UUGetFileListItem (num)
 	int	num
 
+void
+GetFileList ()
+	PPCODE:
+{
+	uulist *iter;
+
+        for (iter = UUGlobalFileList; iter; iter = iter->NEXT)
+	  XPUSHs (sv_setref_pv (sv_newmortal (), "Convert::UUlib::Item", iter));
+}
+
 MODULE = Convert::UUlib		PACKAGE = Convert::UUlib::Item
 
 int
@@ -483,7 +432,9 @@ int
 decode_temp (item)
 	uulist *item
         CODE:
+        RELEASE;
         RETVAL = UUDecodeToTemp (item);
+        ACQUIRE;
 	OUTPUT:
         RETVAL
 
@@ -491,7 +442,9 @@ int
 remove_temp (item)
 	uulist *item
         CODE:
+        RELEASE;
         RETVAL = UURemoveTemp (item);
+        ACQUIRE;
 	OUTPUT:
         RETVAL
 
@@ -500,7 +453,9 @@ decode (item, target = 0)
 	uulist *item
 	char *	target
         CODE:
+        RELEASE;
         RETVAL = UUDecodeFile (item, target);
+        ACQUIRE;
 	OUTPUT:
         RETVAL
 
@@ -509,7 +464,9 @@ info (item, func)
 	uulist *item
 	SV *	func
         CODE:
-        UUInfoFile (item,(void *)func, uu_info_file);
+        RELEASE;
+        UUInfoFile (item, (void *)func, uu_info_file);
+        ACQUIRE;
 
 short
 state(li)
@@ -553,8 +510,8 @@ filename (li, newfilename = 0)
         CODE:
         if (newfilename)
 	  {
-            _FP_free (li->filename);
-	    li->filename = _FP_strdup (newfilename);
+            FP_free (li->filename);
+	    li->filename = FP_strdup (newfilename);
           }
         RETVAL = li->filename;
         OUTPUT:
@@ -605,22 +562,14 @@ parts (li)
           {
             HV *pi = newHV ();
 
-            hv_store (pi, "partno"  , 6, newSViv (p->partno)         , 0);
-
-            if (p->filename)
-              hv_store (pi, "filename", 8, newSVpv (p->filename, 0)    , 0);
-            if(p->subfname)
-              hv_store (pi, "subfname", 8, newSVpv (p->subfname, 0)    , 0);
-            if(p->mimeid)
-              hv_store (pi, "mimeid"  , 6, newSVpv (p->mimeid  , 0)    , 0);
-            if(p->mimetype)
-              hv_store (pi, "mimetype", 8, newSVpv (p->mimetype, 0)    , 0);
-            if (p->data->subject)
-              hv_store (pi, "subject" , 7, newSVpv (p->data->subject,0), 0);
-            if (p->data->origin)
-              hv_store (pi, "origin"  , 6, newSVpv (p->data->origin ,0), 0);
-            if (p->data->sfname)
-              hv_store (pi, "sfname"  , 6, newSVpv (p->data->sfname ,0), 0);
+                                  hv_store (pi, "partno"  , 6, newSViv (p->partno)         , 0);
+            if (p->filename     ) hv_store (pi, "filename", 8, newSVpv (p->filename, 0)    , 0);
+            if (p->subfname     ) hv_store (pi, "subfname", 8, newSVpv (p->subfname, 0)    , 0);
+            if (p->mimeid       ) hv_store (pi, "mimeid"  , 6, newSVpv (p->mimeid  , 0)    , 0);
+            if (p->mimetype     ) hv_store (pi, "mimetype", 8, newSVpv (p->mimetype, 0)    , 0);
+            if (p->data->subject) hv_store (pi, "subject" , 7, newSVpv (p->data->subject,0), 0);
+            if (p->data->origin ) hv_store (pi, "origin"  , 6, newSVpv (p->data->origin ,0), 0);
+            if (p->data->sfname ) hv_store (pi, "sfname"  , 6, newSVpv (p->data->sfname ,0), 0);
 
             XPUSHs (sv_2mortal (newRV_noinc ((SV *)pi)));
 
@@ -629,9 +578,85 @@ parts (li)
 }
 
 BOOT:
+{
+  HV *stash = GvSTASH (CvGV (cv));
+
+  static const struct {
+    const char *name;
+    IV iv;
+  } *civ, const_iv[] = {
+#   define const_iv(name, value) { # name, (IV) value },
+    const_iv (ACT_COPYING  , UUACT_COPYING)
+    const_iv (ACT_DECODING , UUACT_DECODING)
+    const_iv (ACT_ENCODING , UUACT_ENCODING)
+    const_iv (ACT_IDLE     , UUACT_IDLE)
+    const_iv (ACT_SCANNING , UUACT_SCANNING)
+    const_iv (FILE_DECODED , UUFILE_DECODED)
+    const_iv (FILE_ERROR   , UUFILE_ERROR)
+    const_iv (FILE_MISPART , UUFILE_MISPART)
+    const_iv (FILE_NOBEGIN , UUFILE_NOBEGIN)
+    const_iv (FILE_NODATA  , UUFILE_NODATA)
+    const_iv (FILE_NOEND   , UUFILE_NOEND)
+    const_iv (FILE_OK      , UUFILE_OK)
+    const_iv (FILE_READ    , UUFILE_READ)
+    const_iv (FILE_TMPFILE , UUFILE_TMPFILE)
+    const_iv (MSG_ERROR    , UUMSG_ERROR)
+    const_iv (MSG_FATAL    , UUMSG_FATAL)
+    const_iv (MSG_MESSAGE  , UUMSG_MESSAGE)
+    const_iv (MSG_NOTE     , UUMSG_NOTE)
+    const_iv (MSG_PANIC    , UUMSG_PANIC)
+    const_iv (MSG_WARNING  , UUMSG_WARNING)
+    const_iv (OPT_VERSION  , UUOPT_VERSION)
+    const_iv (OPT_FAST     , UUOPT_FAST)
+    const_iv (OPT_DUMBNESS , UUOPT_DUMBNESS)
+    const_iv (OPT_BRACKPOL , UUOPT_BRACKPOL)
+    const_iv (OPT_VERBOSE  , UUOPT_VERBOSE)
+    const_iv (OPT_DESPERATE, UUOPT_DESPERATE)
+    const_iv (OPT_IGNREPLY , UUOPT_IGNREPLY)
+    const_iv (OPT_OVERWRITE, UUOPT_OVERWRITE)
+    const_iv (OPT_SAVEPATH , UUOPT_SAVEPATH)
+    const_iv (OPT_IGNMODE  , UUOPT_IGNMODE)
+    const_iv (OPT_DEBUG    , UUOPT_DEBUG)
+    const_iv (OPT_ERRNO    , UUOPT_ERRNO)
+    const_iv (OPT_PROGRESS , UUOPT_PROGRESS)
+    const_iv (OPT_USETEXT  , UUOPT_USETEXT)
+    const_iv (OPT_PREAMB   , UUOPT_PREAMB)
+    const_iv (OPT_TINYB64  , UUOPT_TINYB64)
+    const_iv (OPT_ENCEXT   , UUOPT_ENCEXT)
+    const_iv (OPT_REMOVE   , UUOPT_REMOVE)
+    const_iv (OPT_MOREMIME , UUOPT_MOREMIME)
+    const_iv (OPT_DOTDOT   , UUOPT_DOTDOT)
+    const_iv (OPT_RBUF     , UUOPT_RBUF)
+    const_iv (OPT_WBUF     , UUOPT_WBUF)
+    const_iv (OPT_AUTOCHECK, UUOPT_AUTOCHECK)
+    const_iv (RET_CANCEL   , UURET_CANCEL)
+    const_iv (RET_CONT     , UURET_CONT)
+    const_iv (RET_EXISTS   , UURET_EXISTS)
+    const_iv (RET_ILLVAL   , UURET_ILLVAL)
+    const_iv (RET_IOERR    , UURET_IOERR)
+    const_iv (RET_NODATA   , UURET_NODATA)
+    const_iv (RET_NOEND    , UURET_NOEND)
+    const_iv (RET_NOMEM    , UURET_NOMEM)
+    const_iv (RET_OK       , UURET_OK)
+    const_iv (RET_UNSUP    , UURET_UNSUP)
+    const_iv (B64_ENCODED  , B64ENCODED)
+    const_iv (BH_ENCODED   , BH_ENCODED)
+    const_iv (PT_ENCODED   , PT_ENCODED)
+    const_iv (QP_ENCODED   , QP_ENCODED)
+    const_iv (UU_ENCODED   , UU_ENCODED)
+    const_iv (XX_ENCODED   , XX_ENCODED)
+    const_iv (YENC_ENCODED , YENC_ENCODED)
+  };
+
+  for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
+    newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
+
   uu_msg_sv		= newSVsv (&PL_sv_undef);
   uu_busy_sv		= newSVsv (&PL_sv_undef);
   uu_file_sv		= newSVsv (&PL_sv_undef);
   uu_fnamefilter_sv	= newSVsv (&PL_sv_undef);
   uu_filename_sv	= newSVsv (&PL_sv_undef);
 
+  initialise ();
+}
+
diff --git a/debian/changelog b/debian/changelog
index ad610f8..2b91c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libconvert-uulib-perl (1:1.5-1) UNRELEASED; urgency=medium
+libconvert-uulib-perl (1:1.8-1) UNRELEASED; urgency=medium
 
   [ Damyan Ivanov ]
   * declare conformance with Policy 4.1.3 (no changes needed)
@@ -12,8 +12,9 @@ libconvert-uulib-perl (1:1.5-1) UNRELEASED; urgency=medium
   [ Debian Janitor ]
   * Remove constraints unnecessary since stretch:
     + Build-Depends: Drop versioned constraint on cdbs, debhelper.
+  * New upstream release.
 
- -- Damyan Ivanov <dmn@debian.org>  Sun, 03 Dec 2017 22:43:18 +0000
+ -- Damyan Ivanov <dmn@debian.org>  Sat, 26 Feb 2022 04:15:35 -0000
 
 libconvert-uulib-perl (1:1.5~dfsg-1) unstable; urgency=medium
 
diff --git a/debian/patches/pod-spelling.patch b/debian/patches/pod-spelling.patch
index b9c60f6..a1bd9b7 100644
--- a/debian/patches/pod-spelling.patch
+++ b/debian/patches/pod-spelling.patch
@@ -2,9 +2,11 @@ Description: precendence -> precedence
 Author: Damyan Ivanov <dmn@debian.org>
 Forwarded: no
 
---- a/UUlib.pm
-+++ b/UUlib.pm
-@@ -144,7 +144,7 @@ this document and especially the non-tri
+Index: libconvert-uulib-perl/UUlib.pm
+===================================================================
+--- libconvert-uulib-perl.orig/UUlib.pm
++++ libconvert-uulib-perl/UUlib.pm
+@@ -146,7 +146,7 @@ this document and especially the non-tri
    OPT_VERSION	version number MAJOR.MINORplPATCH (ro)
    OPT_FAST	assumes only one part per file
    OPT_DUMBNESS	switch off the program's intelligence
diff --git a/example-decoder b/example-decoder
index bfadc0b..6f04e76 100644
--- a/example-decoder
+++ b/example-decoder
@@ -3,6 +3,10 @@
 # decode all the files in the directory uusrc/ and copy
 # the resulting files to uudst/
 
+#use Coro::Multicore;
+
+use strict;
+
 use Convert::UUlib ':all';
 
 sub namefilter {
@@ -87,37 +91,31 @@ Smerge -1;
 SetOption OPT_SAVEPATH, "uudst/";
 
 # now wade through all files and their source parts
-$i = 0;
-while ($uu = GetFileListItem $i) {
-   $i++;
-   print "file nr. $i";
-   print " state ", $uu->state;
-   print " mode ", $uu->mode;
-   print " uudet ", strencoding $uu->uudet;
-   print " size ", $uu->size;
-   print " filename ", $uu->filename;
-   print " subfname ", $uu->subfname;
-   print " mimeid ", $uu->mimeid;
-   print " mimetype ", $uu->mimetype;
-   print "\n";
+for my $uu (GetFileList) {
+   print "file ", $uu->filename, "\n";
+   print " state ", $uu->state, "\n";
+   print " mode ", $uu->mode, "\n";
+   print " uudet ", strencoding $uu->uudet, "\n";
+   print " size ", $uu->size, "\n";
+   print " subfname ", $uu->subfname, "\n";
+   print " mimeid ", $uu->mimeid, "\n";
+   print " mimetype ", $uu->mimetype, "\n";
 
    # print additional info about all parts
+   print " parts";
    for ($uu->parts) {
-      while (my ($k, $v) = each %$_) {
-         print "$k > $v, ";
+      for my $k (sort keys %$_) {
+         print " $k=$_->{$k}";
       }
       print "\n";
    }
 
-   print $uu->filename;
-
    $uu->remove_temp;
 
-   print "<s", $uu->state, ">";#d#
    if (my $err = $uu->decode) {
-      print ", ", strerror $err, "\n";
+      print " ERROR ", strerror $err, "\n";
    } else {
-      print ", saved as uudst/", $uu->filename, "\n";
+      print " successfully saved as uudst/", $uu->filename, "\n";
    }
 }
 
diff --git a/perlmulticore.h b/perlmulticore.h
new file mode 100644
index 0000000..7ad38a4
--- /dev/null
+++ b/perlmulticore.h
@@ -0,0 +1,255 @@
+/*
+ * Author: Marc A. Lehmann <xsthreadpool@schmorp.de>
+ * License: public domain, or where this is not possible/at your option,
+ *          CC0 (https://creativecommons.org/publicdomain/zero/1.0/)
+ *
+ * Full documentation can be found at http://perlmulticore.schmorp.de/
+ * The newest version of this header can be downloaded from
+ * http://perlmulticore.schmorp.de/perlmulticore.h
+ */
+
+#ifndef PERL_MULTICORE_H
+#define PERL_MULTICORE_H
+
+/*
+
+=head1 NAME
+
+perlmulticore.h - implements the Perl Multicore Specification
+
+=head1 SYNOPSIS
+
+  #include "perlmulticore.h"
+
+  // in your XS function:
+
+  perlinterp_release ();
+  do_the_C_thing ();
+  perlinterp_acquire ();
+
+  // optional, in BOOT section:
+
+  perlmulticore_support ();
+
+=head1 DESCRIPTION
+
+This documentation is the abridged version of the full documention at
+L<http://perlmulticore.schmorp.de/>. It's recommended to go there instead
+of reading this document.
+
+This header file implements a very low overhead (both in code and runtime)
+mechanism for XS modules to allow re-use of the perl interpreter for other
+threads while doing some lengthy operation, such as cryptography, SQL
+queries, disk I/O and so on.
+
+The newest version of the header file itself, can be downloaded from
+L<http://perlmulticore.schmorp.de/perlmulticore.h>.
+
+=head1 HOW DO I USE THIS IN MY MODULES?
+
+The usage is very simple - you include this header file in your XS module. Then, before you
+do your lengthy operation, you release the perl interpreter:
+
+   perlinterp_release ();
+
+And when you are done with your computation, you acquire it again:
+
+   perlinterp_acquire ();
+
+And that's it. This doesn't load any modules and consists of only a few
+machine instructions when no module to take advantage of it is loaded.
+
+More documentation and examples can be found at the perl multicore site at
+L<http://perlmulticore.schmorp.de>.
+
+=head1 THE HARD AND FAST RULES
+
+As with everything, there are a number of rules to follow.
+
+=over 4
+
+=item I<Never> touch any perl data structures after calling C<perlinterp_release>.
+
+Anything perl is completely off-limits after C<perlinterp_release>, until
+you call C<perlinterp_acquire>, after which you can access perl stuff
+again.
+
+That includes anything in the perl interpreter that you didn't prove to be
+safe, and didn't prove to be safe in older and future versions of perl:
+global variables, local perl scalars, even if you are sure nobody accesses
+them and you only try to "read" their value.
+
+=item I<Always> call C<perlinterp_release> and C<perlinterp_acquire> in pairs.
+
+For each C<perlinterp_release> call there must be a C<perlinterp_acquire>
+call. They don't have to be in the same function, and you can have
+multiple calls to them, as long as every C<perlinterp_release> call is
+followed by exactly one C<perlinterp_acquire> call at runtime.
+
+=item I<Never> nest calls to C<perlinterp_release> and C<perlinterp_acquire>.
+
+That simply means that after calling C<perlinterp_release>, you must
+call C<perlinterp_acquire> before calling C<perlinterp_release>
+again. Likewise, after C<perlinterp_acquire>, you can call
+C<perlinterp_release> but not another C<perlinterp_acquire>.
+
+=item I<Always> call C<perlinterp_release> first.
+
+You I<must not> call C<perlinterp_acquire> without having called
+C<perlinterp_release> before.
+
+=item I<Never> underestimate threads.
+
+While it's easy to add parallel execution ability to your XS module, it
+doesn't mean it is safe. After you release the perl interpreter, it's
+perfectly possible that it will call your XS function in another thread,
+even while your original function still executes. In other words: your C
+code must be thread safe, and if you use any library, that library must be
+thread-safe, too.
+
+Always assume that the code between C<perlinterp_release> and
+C<perlinterp_acquire> is executed in parallel on multiple CPUs at the same
+time.
+
+=back
+
+
+=head1 DISABLING PERL MULTICORE AT COMPILE TIME
+
+You can disable the complete perl multicore API by defining the
+symbol C<PERL_MULTICORE_DISABLE> to C<1> (e.g. by specifying
+F<-DPERL_MULTICORE_DISABLE> as compiler argument).
+
+This could be added to perl's C<CPPFLAGS> when configuring perl on
+platforms that do not support threading at all for example.
+
+
+=head1 ADVERTISING MULTICORE API SUPPORT
+
+To help users find out whether a particular build of your module is, in
+fact, multicore enabled, you can invoke the C<perlmulticore_support>
+macro in your C<BOOT:> section, e.g.:
+
+
+   MODULE = My::Mod    PACKAGE = My::Mod::Pkg
+
+   BOOT:
+      perlmulticore_support ();
+
+What this does is set the C<$My::Mod::PERLMULTICORE_SUPPORT> variable to
+the major API version * 1000 + minor version, for example, version C<1002>
+introduced this feature.
+
+For this to work, the C<cv> parameter passed to C<BOOT:> must still be
+in scope. To ensure this, either invoke the macro early in your C<BOOT:>
+section, or don't declare a local variable called C<cv>, either of which
+should be easy to do.
+
+Note that this is I<optional>, so you don't have to do that.
+
+
+=head1 AUTHOR
+
+   Marc A. Lehmann <perlmulticore@schmorp.de>
+   http://perlmulticore.schmorp.de/
+
+=head1 LICENSE
+
+The F<perlmulticore.h> header file is put into the public
+domain. Where this is legally not possible, or at your
+option, it can be licensed under creativecommons CC0
+license: L<https://creativecommons.org/publicdomain/zero/1.0/>.
+
+=cut
+
+*/
+
+/* version history
+ * 1.1 (1001) 2015-07-03: initial release.
+ * 1.2 (1002) 2019-03-03: introduce optional perlmulticore_support macro.
+ */
+#define PERL_MULTICORE_MAJOR 1 /* bumped on incompatible changes */
+#define PERL_MULTICORE_MINOR 2 /* bumped on every change */
+
+#if PERL_MULTICORE_DISABLE
+
+#define perlinterp_release()    do { } while (0)
+#define perlinterp_acquire()    do { } while (0)
+#define perlmulticore_support() do { } while (0)
+
+#else
+
+START_EXTERN_C
+
+/* this struct is shared between all modules, and currently */
+/* contain only the two function pointers for release/acquire */
+struct perl_multicore_api
+{
+  void (*pmapi_release)(void);
+  void (*pmapi_acquire)(void);
+};
+
+static void perl_multicore_init (void);
+
+static const struct perl_multicore_api perl_multicore_api_init
+   = { perl_multicore_init, 0 };
+
+static struct perl_multicore_api *perl_multicore_api
+   = (struct perl_multicore_api *)&perl_multicore_api_init;
+
+#define perlinterp_release() perl_multicore_api->pmapi_release ()
+#define perlinterp_acquire() perl_multicore_api->pmapi_acquire ()
+
+/* this is the release/acquire implementation used as fallback */
+static void
+perl_multicore_nop (void)
+{
+}
+
+static const char perl_multicore_api_key[] = "perl_multicore_api";
+
+/* this is the initial implementation of "release" - it initialises */
+/* the api and then calls the real release function */
+static void
+perl_multicore_init (void)
+{
+  dTHX;
+
+  /* check for existing API struct in PL_modglobal */
+  SV **api_svp = hv_fetch (PL_modglobal, perl_multicore_api_key,
+                           sizeof (perl_multicore_api_key) - 1, 1);
+
+  if (SvPOKp (*api_svp))
+    perl_multicore_api = (struct perl_multicore_api *)SvPVX (*api_svp); /* we have one, use the existing one */
+  else
+    {
+      /* create a new one with a dummy nop implementation */
+      #ifdef NEWSV
+      SV *api_sv = NEWSV (0, sizeof (*perl_multicore_api));
+      #else
+      SV *api_sv = newSV (   sizeof (*perl_multicore_api));
+      #endif
+      SvCUR_set (api_sv, sizeof (*perl_multicore_api));
+      SvPOK_only (api_sv);
+      perl_multicore_api = (struct perl_multicore_api *)SvPVX (api_sv);
+      perl_multicore_api->pmapi_release =
+      perl_multicore_api->pmapi_acquire = perl_multicore_nop;
+      *api_svp = api_sv;
+    }
+
+  /* call the real (or dummy) implementation now */
+  perlinterp_release ();
+}
+
+#define perlmulticore_support() \
+  sv_setiv (get_sv ( \
+      form ("%s::PERLMULTICORE_SUPPORT", HvNAME (GvSTASH (CvGV (cv)))), \
+      GV_ADD | GV_ADDMULTI), \
+    PERL_MULTICORE_MAJOR * 1000 + PERL_MULTICORE_MINOR); \
+
+END_EXTERN_C
+
+#endif
+
+#endif
+
diff --git a/typemap b/typemap
index 54c50da..93749a3 100644
--- a/typemap
+++ b/typemap
@@ -3,14 +3,14 @@ uulist *			T_UULIST
 INPUT
 
 T_UULIST
-	if (sv_derived_from($arg, \"Convert::UUlib::Item\")) {
-	    IV tmp = SvIV((SV*)SvRV($arg));
-	    $var = ($type) tmp;
+	if (sv_derived_from ($arg, \"Convert::UUlib::Item\")) {
+	    IV tmp = SvIV ((SV*)SvRV ($arg));
+	    $var = ($type)tmp;
 	}
 	else
-	    croak(\"$var is not of type Convert::UUlib::Item\")
+	    croak (\"$var is not of type Convert::UUlib::Item\")
 
 OUTPUT
 
 T_UULIST
-	sv_setref_pv($arg, \"Convert::UUlib::Item\", (void*)$var);
+	sv_setref_pv ($arg, \"Convert::UUlib::Item\", (void*)$var);
diff --git a/uulib/Makefile.in b/uulib/Makefile.in
index 3546d7f..06a820d 100644
--- a/uulib/Makefile.in
+++ b/uulib/Makefile.in
@@ -75,14 +75,15 @@ libuu.a:	$(UULIB_OBJ)
 .c.o:
 	$(CC) -c $(CFLAGS) $(VDEF) $<
 
-uuencode.o:	uuencode.c uudeview.h uuint.h uustring.h fptools.h config.h
-uulib.o:	uulib.c uudeview.h uuint.h uustring.h fptools.h config.h safealloc.c
-uunconc.o:	uunconc.c uudeview.h uuint.h uustring.h fptools.h config.h
-uucheck.o:	uucheck.c uudeview.h uuint.h uustring.h fptools.h config.h
-uuutil.o:	uuutil.c  uudeview.h uuint.h uustring.h fptools.h config.h
-uuscan.o:	uuutil.c  uudeview.h uuint.h uustring.h fptools.h config.h
-uustring.o:	uustring.c uudeview.h uuint.h uustring.h config.h
-fptools.o:	fptools.c fptools.h config.h
+uuencode.o:	uuencode.c uudeview.h uuint.h uustring.h fptools.h config.h ecb.h
+uulib.o:	uulib.c uudeview.h uuint.h uustring.h fptools.h config.h safealloc.c ecb.h
+uunconc.o:	uunconc.c uudeview.h uuint.h uustring.h fptools.h config.h ecb.h
+uucheck.o:	uucheck.c uudeview.h uuint.h uustring.h fptools.h config.h ecb.h
+uuutil.o:	uuutil.c  uudeview.h uuint.h uustring.h fptools.h config.h ecb.h
+uuscan.o:	uuutil.c  uudeview.h uuint.h uustring.h fptools.h config.h ecb.h
+uustring.o:	uustring.c uudeview.h uuint.h uustring.h config.h ecb.h
+fptools.o:	fptools.c fptools.h config.h ecb.h
+crc32.o:	ecb.h
 
 uustring.h:	uustring.c
 	awk -f uustring.awk < uustring.c > uustring.h
diff --git a/uulib/acconfig.h b/uulib/acconfig.h
index c6eb5b5..5dd625a 100644
--- a/uulib/acconfig.h
+++ b/uulib/acconfig.h
@@ -48,28 +48,19 @@
 #undef HAVE_MKSTEMP
 
 /*
- * Replacement functions.
- * #define strerror _FP_strerror
- * #define tempnam  _FP_tempnam
- * if you don't have these functions
- */
-#undef strerror
-#undef tempnam
-
-/* 
  * your mailing program. full path and the necessary parameters.
  * the recepient address is added to the command line (with a leading
  * space) without any further options
  */
 #undef PROG_MAILER
 
-/* 
+/*
  * define if the mailer needs to have the subject set on the command
  * line with -s "Subject". Preferredly, we send the subject as a header.
  */
 #undef MAILER_NEEDS_SUBJECT
 
-/* 
+/*
  * define if posting is enabled. Do not edit.
  */
 #undef HAVE_NEWS
diff --git a/uulib/config.h.in b/uulib/config.h.in
index e4ba058..aeae188 100644
--- a/uulib/config.h.in
+++ b/uulib/config.h.in
@@ -1,13 +1,9 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader 2.13.  */
+/* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#undef TIME_WITH_SYS_TIME
+/*
+ * needed for auto configuration
+ * $Id$
+ */
 
 /*
  * If your system is kinda special
@@ -53,52 +49,122 @@
 #undef HAVE_MKSTEMP
 
 /*
- * Replacement functions.
- * #define strerror _FP_strerror
- * #define tempnam  _FP_tempnam
- * if you don't have these functions
+ * your mailing program. full path and the necessary parameters.
+ * the recepient address is added to the command line (with a leading
+ * space) without any further options
  */
-#undef strerror
-#undef tempnam
+#undef PROG_MAILER
 
-/* Define if you have the fgetc_unlocked function.  */
-#undef HAVE_FGETC_UNLOCKED
+/*
+ * define if the mailer needs to have the subject set on the command
+ * line with -s "Subject". Preferredly, we send the subject as a header.
+ */
+#undef MAILER_NEEDS_SUBJECT
 
-/* Define if you have the gettimeofday function.  */
-#undef HAVE_GETTIMEOFDAY
+/*
+ * define if posting is enabled. Do not edit.
+ */
+#undef HAVE_NEWS
 
-/* Define if you have the strcasecmp function.  */
-#undef HAVE_STRCASECMP
+/*
+ * your local news posting program. full path and parameters, so that
+ * the article and all its headers are read from stdin
+ */
+#undef PROG_INEWS
 
-/* Define if you have the strcasestr function.  */
-#undef HAVE_STRCASESTR
 
-/* Define if you have the strncasecmp function.  */
-#undef HAVE_STRNCASECMP
+/* Define to 1 if you have the `chmod' function. */
+#undef HAVE_CHMOD
 
-/* Define if you have the <errno.h> header file.  */
+/* Define to 1 if you have the <errno.h> header file. */
 #undef HAVE_ERRNO_H
 
-/* Define if you have the <fcntl.h> header file.  */
+/* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define if you have the <io.h> header file.  */
+/* Define to 1 if you have the `feof_unlocked' function. */
+#undef HAVE_FEOF_UNLOCKED
+
+/* Define to 1 if you have the `ferror_unlocked' function. */
+#undef HAVE_FERROR_UNLOCKED
+
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
+/* Define to 1 if you have the `getc_unlocked' function. */
+#undef HAVE_GETC_UNLOCKED
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <io.h> header file. */
 #undef HAVE_IO_H
 
-/* Define if you have the <malloc.h> header file.  */
+/* Define to 1 if you have the <malloc.h> header file. */
 #undef HAVE_MALLOC_H
 
-/* Define if you have the <memory.h> header file.  */
+/* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define if you have the <stdarg.h> header file.  */
-#undef HAVE_STDARG_H
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
 
-/* Define if you have the <sys/time.h> header file.  */
+/* Define to 1 if you have the <sys/time.h> header file. */
 #undef HAVE_SYS_TIME_H
 
-/* Define if you have the <unistd.h> header file.  */
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the `tempnam' function. */
+#undef HAVE_TEMPNAM
+
+/* Define to 1 if you have the `umask' function. */
+#undef HAVE_UMASK
+
+/* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define if you have the <varargs.h> header file.  */
-#undef HAVE_VARARGS_H
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/uulib/configure b/uulib/configure
index d0d6333..1cdecd8 100755
--- a/uulib/configure
+++ b/uulib/configure
@@ -1,30 +1,706 @@
 #! /bin/sh
-
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
 
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-"
-ac_help="$ac_help
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
 "
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="uulib.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+PATCH
+VERSION
+EGREP
+GREP
+RANLIB
+SET_MAKE
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_cc
+with_cflags
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
 
 # Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
 exec_prefix=NONE
-host=NONE
 no_create=
-nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -33,94 +709,133 @@ program_transform_name=s,x,x,
 silent=
 site=
 srcdir=
-target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
-
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case "$ac_option" in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
+    bindir=$ac_optarg ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
+    ac_prev=build_alias ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
+    build_alias=$ac_optarg ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
     esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -129,116 +844,77 @@ do
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
+    exec_prefix=$ac_optarg ;;
 
   -gas | --gas | --ga | --g)
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host ;;
+    ac_prev=host_alias ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
 
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
+    includedir=$ac_optarg ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
+    infodir=$ac_optarg ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
+    libdir=$ac_optarg ;;
 
   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   | --libexe | --libex | --libe)
     ac_prev=libexecdir ;;
   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
+    mandir=$ac_optarg ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
     with_fp=no ;;
 
   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
+  | --no-cr | --no-c | -n)
     no_create=yes ;;
 
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -252,26 +928,26 @@ EOF
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
+    oldincludedir=$ac_optarg ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
+    prefix=$ac_optarg ;;
 
   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   | --program-pre | --program-pr | --program-p)
     ac_prev=program_prefix ;;
   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
+    program_prefix=$ac_optarg ;;
 
   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   | --program-suf | --program-su | --program-s)
     ac_prev=program_suffix ;;
   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
+    program_suffix=$ac_optarg ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -288,17 +964,36 @@ EOF
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
+    sbindir=$ac_optarg ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -309,58 +1004,67 @@ EOF
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
+    sharedstatedir=$ac_optarg ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
+    site=$ac_optarg ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
+    srcdir=$ac_optarg ;;
 
   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   | --syscon | --sysco | --sysc | --sys | --sy)
     ac_prev=sysconfdir ;;
   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
+    sysconfdir=$ac_optarg ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
+    ac_prev=target_alias ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
+    target_alias=$ac_optarg ;;
 
   -v | -verbose | --verbose | --verbos | --verbo | --verb)
     verbose=yes ;;
 
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
     esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -371,1259 +1075,2542 @@ EOF
     ac_prev=x_includes ;;
   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
+    x_includes=$ac_optarg ;;
 
   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
+    x_libraries=$ac_optarg ;;
 
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
   *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
 fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
 
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir runstatedir
 do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
 
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
 
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=uulib.c
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
 fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
 done
 
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
 
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
 fi
 
+if test -n "$ac_init_help"; then
 
+  cat <<\_ACEOF
 
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
 
 
-#
-# package revision
-#
-VERSION=0.5
-PATCH=20
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
 
-# Check whether --with-cc or --without-cc was given.
-if test "${with_cc+set}" = set; then
-  withval="$with_cc"
-  CC=$with_cc
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
 fi
 
-# Check whether --with-cflags or --without-cflags was given.
-if test "${with_cflags+set}" = set; then
-  withval="$with_cflags"
-  CFLAGS=$with_cflags
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
 fi
 
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
 
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:554: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
 fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
 else
-  echo "$ac_t""no" 1>&6
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
 fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:584: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
+  eval "$3=yes"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$ac_t""no" 1>&6
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
 fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:635: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_header_compiler=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
 fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$ac_t""no" 1>&6
+  eval "$3=\$ac_header_compiler"
 fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:667: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 678 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
   fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
 fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:709: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:714: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_gcc=no
-fi
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
 
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
 else
-  GCC=
+  eval "$3=no"
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:742: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
 else
-  ac_cv_prog_cc_g=no
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
-rm -f conftest*
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
 
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
 fi
 
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
   fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+#
+# package revision
+#
+VERSION=0.5
+PATCH=20
+
+
+# Check whether --with-cc was given.
+if test "${with_cc+set}" = set; then :
+  withval=$with_cc; CC=$with_cc
+fi
+
+
+# Check whether --with-cflags was given.
+if test "${with_cflags+set}" = set; then :
+  withval=$with_cflags; CFLAGS=$with_cflags
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-fi
+done
+  done
+IFS=$as_save_IFS
 
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:774: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
 fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 789 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 806 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 823 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  :
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest*
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
 fi
-rm -f conftest*
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
 fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
 fi
-  CPP="$ac_cv_prog_CPP"
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  ac_cv_prog_CPP="$CPP"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-echo "$ac_t""$CPP" 1>&6
-
 
-echo $ac_n "checking if the compiler supports function prototypes""... $ac_c" 1>&6
-echo "configure:855: checking if the compiler supports function prototypes" >&5
-cat > conftest.$ac_ext <<EOF
-#line 857 "configure"
-#include "confdefs.h"
 
-int main() {
-extern void exit(int status);
-; return 0; }
-EOF
-if { (eval echo configure:864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  wi_cv_prototypes=yes
-cat >> confdefs.h <<\EOF
-#define PROTOTYPES 1
-EOF
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  wi_cv_prototypes=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest*
-echo "$ac_t""$wi_cv_prototypes" 1>&6
 
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:881: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  eval ac_cv_prog_make_${ac_make}_set=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
 fi
-rm -f conftestmake
 fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:910: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
   done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+IFS=$as_save_IFS
+
 fi
 fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$ac_t""no" 1>&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-if test "$wi_cv_prototypes" = no ; then
-	echo "configure: warning: Your compiler does not support function prototyping and" 1>&2
-	echo "configure: warning: is not able to properly compile this package. What a pity." 1>&2
-        echo "configure: warning: Get gcc, or any compiler that supports function prototypes." 1>&2
-	exit 1
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 fi
 
-#
-# Checks for header files and library functions
-#
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:950: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 955 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  ac_cv_header_stdc=yes
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 980 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
 else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-rm -f conftest*
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 998 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
 else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
+  ac_compiler_gnu=no
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1019 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-EOF
-if { (eval echo configure:1030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  :
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
 fi
-rm -fr conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+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;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
 fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
 fi
 
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1054: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1059 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
 #endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
 else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
+  # Broken: fails on valid input.
+continue
 fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
+rm -f conftest.err conftest.i conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
 fi
 
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1087: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1092 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:1101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_header_time=yes
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_time=no
+  # Broken: fails on valid input.
+continue
 fi
-rm -f conftest*
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
-  cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
 
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
-for ac_hdr in fcntl.h unistd.h memory.h malloc.h errno.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1130 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
 else
-  echo "$ac_t""no" 1>&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
 fi
-done
 
-for ac_hdr in io.h sys/time.h
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1165: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1170 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
 fi
-rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
-  echo "$ac_t""no" 1>&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-done
 
 
-CFLAGS="$CFLAGS -D_GNU_SOURCE"
-for ac_func in gettimeofday fgetc_unlocked
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1206: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1211 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-; return 0; }
-EOF
-if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
 fi
-rm -f conftest*
 fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
 else
-  echo "$ac_t""no" 1>&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-done
 
-
-echo $ac_n "checking for tempnam""... $ac_c" 1>&6
-echo "configure:1260: checking for tempnam" >&5
-if eval "test \"`echo '$''{'ac_cv_func_tempnam'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1265 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char tempnam(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tempnam();
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
 
-int main() {
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_tempnam) || defined (__stub___tempnam)
-choke me
-#else
-tempnam();
-#endif
+#
+# Checks for header files and library functions
+#
+
 
-; return 0; }
-EOF
-if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_tempnam=yes"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_tempnam=no"
-fi
-rm -f conftest*
-fi
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-if eval "test \"`echo '$ac_cv_func_'tempnam`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
-  echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define tempnam FP_tempnam
-EOF
+  ac_cv_path_GREP=$GREP
+fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
 
 
-echo $ac_n "checking for chmod""... $ac_c" 1>&6
-echo "configure:1313: checking for chmod" >&5
-if eval "test \"`echo '$''{'ac_cv_func_chmod'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1318 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char chmod(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char chmod();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_chmod) || defined (__stub___chmod)
-choke me
-#else
-chmod();
-#endif
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-; return 0; }
-EOF
-if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_chmod=yes"
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_chmod=no"
+  ac_cv_path_EGREP=$EGREP
 fi
-rm -f conftest*
+
+   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
 
-if eval "test \"`echo '$ac_cv_func_'chmod`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_CHMOD 1
-EOF
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$ac_t""no" 1>&6
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-echo $ac_n "checking for umask""... $ac_c" 1>&6
-echo "configure:1364: checking for umask" >&5
-if eval "test \"`echo '$''{'ac_cv_func_umask'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1369 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char umask(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char umask();
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-int main() {
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_umask) || defined (__stub___umask)
-choke me
-#else
-umask();
-#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
 
-; return 0; }
-EOF
-if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_umask=yes"
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_umask=no"
+  ac_cv_header_stdc=no
 fi
 rm -f conftest*
+
 fi
 
-if eval "test \"`echo '$ac_cv_func_'umask`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_UMASK 1
-EOF
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
 
-else
-  echo "$ac_t""no" 1>&6
-fi
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
 
-echo $ac_n "checking for mkstemp""... $ac_c" 1>&6
-echo "configure:1415: checking for mkstemp" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mkstemp'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 1420 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char mkstemp(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char mkstemp();
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
-int main() {
+fi
 
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
-choke me
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 #else
-mkstemp();
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
 #endif
 
-; return 0; }
-EOF
-if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_mkstemp=yes"
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_mkstemp=no"
+  ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-if eval "test \"`echo '$ac_cv_func_'mkstemp`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_MKSTEMP 1
-EOF
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
-else
-  echo "$ac_t""no" 1>&6
 fi
 
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-#
-# strerror might be internally defined. this would cause a
-# CHECK_FUNCS(strerror) to fail because it'd be called with
-# zero arguments. So use our own code.
-#
-echo $ac_n "checking for strerror""... $ac_c" 1>&6
-echo "configure:1472: checking for strerror" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1474 "configure"
-#include "confdefs.h"
+fi
 
-char *blubb() { return (char *) strerror (42); }
+done
 
-int main() {
 
-(void) blubb();
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
 
-; return 0; }
-EOF
-if { (eval echo configure:1485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  have_strerror=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define strerror FP_strerror
-EOF
 
-have_strerror=no
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
 fi
-rm -f conftest*
-echo "$ac_t""$have_strerror" 1>&6
 
-echo $ac_n "checking for stdin""... $ac_c" 1>&6
-echo "configure:1502: checking for stdin" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1504 "configure"
-#include "confdefs.h"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
 
-#include <stdio.h>
-char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_time=yes
+else
+  ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
 
-int main() {
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
-(void) blubb();
+fi
 
-; return 0; }
-EOF
-if { (eval echo configure:1516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  have_stdio=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define HAVE_STDIO 1
-EOF
+for ac_header in fcntl.h unistd.h memory.h malloc.h errno.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-have_stdio=no
 fi
-rm -f conftest*
-echo "$ac_t""$have_stdio" 1>&6
 
-if test "$ac_cv_header_stdc" = "no" ; then
-	for ac_hdr in stdarg.h varargs.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1537: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1542 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
 done
 
-	if test "$ac_cv_header_stdarg_h" = "no" ; then
-	if test "$ac_cv_header_varargs_h" = "no" ; then
-		{ echo "configure: error: neither stdarg.h nor varargs.h present" 1>&2; exit 1; }
-	fi
-	fi
+for ac_header in io.h sys/time.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 fi
 
-#
-# Check whether this is a DOS-Based system. Another bogus test.
-# Don't even bother to print a message. This code is needed so
-# that autoheader includes the #undef into the final config.h
-# and we can change the definition by hand on a really DOS
-# system (where ./configure doesn't work anyway ...)
-#
+done
 
-if false ; then
-	cat >> confdefs.h <<\EOF
-#define SYSTEM_DOS 1
-EOF
 
-	cat >> confdefs.h <<\EOF
-#define SYSTEM_QUICKWIN 1
-EOF
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+for ac_func in tempnam gettimeofday flockfile getc_unlocked feof_unlocked ferror_unlocked
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
 
-	cat >> confdefs.h <<\EOF
-#define SYSTEM_WINDLL 1
-EOF
 
-	cat >> confdefs.h <<\EOF
-#define SYSTEM_OS2 1
-EOF
+for ac_func in chmod umask mkstemp
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
 fi
+done
+
 
 #
 # On some systems (so far, OS2 and WINDOWS), functions that are exported
 # from a DLL must be declared specifically.
 #
 
-cat >> confdefs.h <<EOF
-#define UUEXPORT 
-EOF
+cat >>confdefs.h <<_ACEOF
+#define UUEXPORT /**/
+_ACEOF
 
-cat >> confdefs.h <<EOF
-#define TOOLEXPORT 
-EOF
+cat >>confdefs.h <<_ACEOF
+#define TOOLEXPORT /**/
+_ACEOF
 
 
 #
 # set version number
 #
-echo $ac_n "checking version number""... $ac_c" 1>&6
-echo "configure:1625: checking version number" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version number" >&5
+$as_echo_n "checking version number... " >&6; }
 version_number="$VERSION"pl"$PATCH"
-echo "$ac_t""$version_number" 1>&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_number" >&5
+$as_echo "$version_number" >&6; }
 
 
 
@@ -1631,356 +3618,1278 @@ echo "$ac_t""$version_number" 1>&6
 # done
 #
 
-trap '' 1 2 15
-cat > confcache <<\EOF
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
 #
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
-    echo "not updating unwritable cache $cache_file"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
 
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
+DEFS=-DHAVE_CONFIG_H
 
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
 
-DEFS=-DHAVE_CONFIG_H
+LTLIBOBJS=$ac_ltlibobjs
 
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
 
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
 # Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
 # Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
 
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-ac_given_srcdir=$srcdir
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
-trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
 
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@RANLIB@%$RANLIB%g
-s%@VERSION@%$VERSION%g
-s%@PATCH@%$PATCH%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
 
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
   else
-    ac_dir_suffix= ac_dots=
+    as_ln_s='cp -pR'
   fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
 
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
   esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
 
 
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
   esac
 
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
   esac
+  shift
+done
+
+ac_configure_extra_args=
 
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
 do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
 done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
     fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
-fi; done
+ ;;
 
-EOF
-cat >> $CONFIG_STATUS <<EOF
 
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+  esac
 
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
 
 
diff --git a/uulib/configure.in b/uulib/configure.in
index e0f0482..fa399c5 100644
--- a/uulib/configure.in
+++ b/uulib/configure.in
@@ -21,17 +21,9 @@ AC_ARG_WITH(cflags,,CFLAGS=$with_cflags)
 
 AC_PROG_CC
 AC_PROG_CPP
-wi_PROTOTYPES
 AC_PROG_MAKE_SET
 AC_PROG_RANLIB
 
-if test "$wi_cv_prototypes" = no ; then
-	AC_WARN([Your compiler does not support function prototyping and])
-	AC_WARN([is not able to properly compile this package. What a pity.])
-        AC_WARN([Get gcc, or any compiler that supports function prototypes.])
-	exit 1
-fi
-
 #
 # Checks for header files and library functions
 #
@@ -43,62 +35,10 @@ AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h)
 AC_CHECK_HEADERS(io.h sys/time.h)
 
 CFLAGS="$CFLAGS -D_GNU_SOURCE"
-AC_CHECK_FUNCS(gettimeofday fgetc_unlocked)
+AC_CHECK_FUNCS(tempnam gettimeofday flockfile getc_unlocked feof_unlocked ferror_unlocked)
 dnl AC_CHECK_FUNCS(strcasecmp strncasecmp strcasestr)
 
-AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,FP_tempnam))
-
-AC_CHECK_FUNC(chmod,AC_DEFINE(HAVE_CHMOD))
-AC_CHECK_FUNC(umask,AC_DEFINE(HAVE_UMASK))
-AC_CHECK_FUNC(mkstemp,AC_DEFINE(HAVE_MKSTEMP))
-
-#
-# strerror might be internally defined. this would cause a
-# CHECK_FUNCS(strerror) to fail because it'd be called with
-# zero arguments. So use our own code.
-#
-AC_MSG_CHECKING([for strerror])
-AC_TRY_LINK([
-char *blubb() { return (char *) strerror (42); }
-],[
-(void) blubb();
-],have_strerror=yes,AC_DEFINE(strerror,FP_strerror)
-have_strerror=no)
-AC_MSG_RESULT($have_strerror)
-
-AC_MSG_CHECKING([for stdin])
-AC_TRY_LINK([
-#include <stdio.h>
-char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }
-],[
-(void) blubb();
-],have_stdio=yes,AC_DEFINE(HAVE_STDIO)
-have_stdio=no)
-AC_MSG_RESULT($have_stdio)
-
-if test "$ac_cv_header_stdc" = "no" ; then
-	AC_CHECK_HEADERS(stdarg.h varargs.h)
-	if test "$ac_cv_header_stdarg_h" = "no" ; then
-	if test "$ac_cv_header_varargs_h" = "no" ; then
-		AC_MSG_ERROR([neither stdarg.h nor varargs.h present])
-	fi
-	fi
-fi
-
-#
-# Check whether this is a DOS-Based system. Another bogus test.
-# Don't even bother to print a message. This code is needed so
-# that autoheader includes the #undef into the final config.h
-# and we can change the definition by hand on a really DOS
-# system (where ./configure doesn't work anyway ...)
-#
-
-if false ; then
-	AC_DEFINE(SYSTEM_DOS)
-	AC_DEFINE(SYSTEM_QUICKWIN)
-	AC_DEFINE(SYSTEM_WINDLL)
-	AC_DEFINE(SYSTEM_OS2)
-fi
+AC_CHECK_FUNCS(chmod umask mkstemp)
 
 #
 # On some systems (so far, OS2 and WINDOWS), functions that are exported
diff --git a/uulib/crc32.c b/uulib/crc32.c
index 2dd53ba..4859f9e 100644
--- a/uulib/crc32.c
+++ b/uulib/crc32.c
@@ -1,104 +1,795 @@
-/* crc32.c -- compute the CRC-32 of a data stream
-  Copyright (C) 1995-1998 Mark Adler
+/*
+ * crc32.c
+ *
+ * Copyright (c) 2011-2015 Stephan Brumme. All rights reserved.
+ * Slicing-by-16 contributed by Bulat Ziganshin
+ *
+ * This software is provided 'as-is', without any express or implied warranty.
+ * In no event will the author be held liable for any damages arising from the
+ * of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software.
+ * 2. If you use this software in a product, an acknowledgment in the product
+ *    documentation would be appreciated but is not required.
+ * 3. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ *
+ * Taken from http://create.stephan-brumme.com/crc32/ and adapted for Cyrus
+ * by Robert Norris <robn@fastmail.com>
+ * Adapted for libecb and uulib, added crc32_combine:
+ * Marc Alexander Lehmann <schmorp@schmorp.de>
+ */
 
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
+#include "crc32.h"
 
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
+#include "ecb.h"
 
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
+#define Polynomial 0xedb88320
 
-  Jean-loup Gailly        Mark Adler
-  jloup@gzip.org          madler@alumni.caltech.edu
-*/
+static const uint32_t crc32_lookup[16][256] =
+{
+    /* same algorithm as crc32_bitwise
 
-#include <crc32.h>
+       for (int i = 0; i <= 0xFF; i++)
+       {
+         uint32_t crc = i;
+         for (int j = 0; j < 8; j++)
+           crc = (crc >> 1) ^ ((crc & 1) * Polynomial);
+         crc32_lookup[0][i] = crc;
+       }
 
-/* ========================================================================
- * Table of CRC-32's of all single-byte values (made by make_crc_table)
- */
-static const crc32_t crc_table[256] = {
-  0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
-  0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
-  0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
-  0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
-  0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
-  0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
-  0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
-  0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
-  0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
-  0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
-  0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
-  0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
-  0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
-  0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
-  0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
-  0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
-  0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
-  0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
-  0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
-  0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
-  0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
-  0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
-  0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
-  0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
-  0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
-  0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
-  0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
-  0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
-  0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
-  0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
-  0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
-  0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
-  0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
-  0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
-  0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
-  0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
-  0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
-  0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
-  0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
-  0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
-  0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
-  0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
-  0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
-  0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
-  0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
-  0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
-  0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
-  0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
-  0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
-  0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
-  0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
-  0x2d02ef8dL
+       ... and the following slicing-by-8 algorithm (from Intel):
+       http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf
+       http://sourceforge.net/projects/slicing-by-8/
+       for (int slice = 1; slice < 16; slice++)
+         crc32_lookup[slice][i] = (crc32_lookup[slice - 1][i] >> 8) ^ crc32_lookup[0][crc32_lookup[slice - 1][i] & 0xFF];
+    */
+    {
+        /* note: the first number of every second row corresponds to the half-byte look-up table ! */
+        0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,0x9E6495A3,
+        0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91,
+        0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D385C7,
+        0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5,
+        0x3B6E20C8,0x4C69105E,0xD56041E4,0xA2677172,0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,
+        0x35B5A8FA,0x42B2986C,0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,
+        0x26D930AC,0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F,
+        0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,0x2F6F7C87,0x58684C11,0xC1611DAB,0xB6662D3D,
+        0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,0x9FBFE4A5,0xE8B8D433,
+        0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,0x086D3D2D,0x91646C97,0xE6635C01,
+        0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,
+        0x65B0D9C6,0x12B7E950,0x8BBEB8EA,0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,
+        0x4DB26158,0x3AB551CE,0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB,
+        0x4369E96A,0x346ED9FC,0xAD678846,0xDA60B8D0,0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,
+        0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,0xCE61E49F,
+        0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4,0x59B33D17,0x2EB40D81,0xB7BD5C3B,0xC0BA6CAD,
+        0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,0xEAD54739,0x9DD277AF,0x04DB2615,0x73DC1683,
+        0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8,0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,
+        0xF00F9344,0x8708A3D2,0x1E01F268,0x6906C2FE,0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7,
+        0xFED41B76,0x89D32BE0,0x10DA7A5A,0x67DD4ACC,0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,
+        0xD6D6A3E8,0xA1D1937E,0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,
+        0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,0x316E8EEF,0x4669BE79,
+        0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,0xCC0C7795,0xBB0B4703,0x220216B9,0x5505262F,
+        0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04,0xC2D7FFA7,0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,
+        0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,0x9C0906A9,0xEB0E363F,0x72076785,0x05005713,
+        0x95BF4A82,0xE2B87A14,0x7BB12BAE,0x0CB61B38,0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,
+        0x86D3D2D4,0xF1D4E242,0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,
+        0x88085AE6,0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45,
+        0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,0xA7672661,0xD06016F7,0x4969474D,0x3E6E77DB,
+        0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,0x47B2CF7F,0x30B5FFE9,
+        0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,0xCDD70693,0x54DE5729,0x23D967BF,
+        0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D,
+    },
+
+    /* beyond this point only relevant for Slicing-by-4, Slicing-by-8 and Slicing-by-16 */
+    {
+        0x00000000,0x191B3141,0x32366282,0x2B2D53C3,0x646CC504,0x7D77F445,0x565AA786,0x4F4196C7,
+        0xC8D98A08,0xD1C2BB49,0xFAEFE88A,0xE3F4D9CB,0xACB54F0C,0xB5AE7E4D,0x9E832D8E,0x87981CCF,
+        0x4AC21251,0x53D92310,0x78F470D3,0x61EF4192,0x2EAED755,0x37B5E614,0x1C98B5D7,0x05838496,
+        0x821B9859,0x9B00A918,0xB02DFADB,0xA936CB9A,0xE6775D5D,0xFF6C6C1C,0xD4413FDF,0xCD5A0E9E,
+        0x958424A2,0x8C9F15E3,0xA7B24620,0xBEA97761,0xF1E8E1A6,0xE8F3D0E7,0xC3DE8324,0xDAC5B265,
+        0x5D5DAEAA,0x44469FEB,0x6F6BCC28,0x7670FD69,0x39316BAE,0x202A5AEF,0x0B07092C,0x121C386D,
+        0xDF4636F3,0xC65D07B2,0xED705471,0xF46B6530,0xBB2AF3F7,0xA231C2B6,0x891C9175,0x9007A034,
+        0x179FBCFB,0x0E848DBA,0x25A9DE79,0x3CB2EF38,0x73F379FF,0x6AE848BE,0x41C51B7D,0x58DE2A3C,
+        0xF0794F05,0xE9627E44,0xC24F2D87,0xDB541CC6,0x94158A01,0x8D0EBB40,0xA623E883,0xBF38D9C2,
+        0x38A0C50D,0x21BBF44C,0x0A96A78F,0x138D96CE,0x5CCC0009,0x45D73148,0x6EFA628B,0x77E153CA,
+        0xBABB5D54,0xA3A06C15,0x888D3FD6,0x91960E97,0xDED79850,0xC7CCA911,0xECE1FAD2,0xF5FACB93,
+        0x7262D75C,0x6B79E61D,0x4054B5DE,0x594F849F,0x160E1258,0x0F152319,0x243870DA,0x3D23419B,
+        0x65FD6BA7,0x7CE65AE6,0x57CB0925,0x4ED03864,0x0191AEA3,0x188A9FE2,0x33A7CC21,0x2ABCFD60,
+        0xAD24E1AF,0xB43FD0EE,0x9F12832D,0x8609B26C,0xC94824AB,0xD05315EA,0xFB7E4629,0xE2657768,
+        0x2F3F79F6,0x362448B7,0x1D091B74,0x04122A35,0x4B53BCF2,0x52488DB3,0x7965DE70,0x607EEF31,
+        0xE7E6F3FE,0xFEFDC2BF,0xD5D0917C,0xCCCBA03D,0x838A36FA,0x9A9107BB,0xB1BC5478,0xA8A76539,
+        0x3B83984B,0x2298A90A,0x09B5FAC9,0x10AECB88,0x5FEF5D4F,0x46F46C0E,0x6DD93FCD,0x74C20E8C,
+        0xF35A1243,0xEA412302,0xC16C70C1,0xD8774180,0x9736D747,0x8E2DE606,0xA500B5C5,0xBC1B8484,
+        0x71418A1A,0x685ABB5B,0x4377E898,0x5A6CD9D9,0x152D4F1E,0x0C367E5F,0x271B2D9C,0x3E001CDD,
+        0xB9980012,0xA0833153,0x8BAE6290,0x92B553D1,0xDDF4C516,0xC4EFF457,0xEFC2A794,0xF6D996D5,
+        0xAE07BCE9,0xB71C8DA8,0x9C31DE6B,0x852AEF2A,0xCA6B79ED,0xD37048AC,0xF85D1B6F,0xE1462A2E,
+        0x66DE36E1,0x7FC507A0,0x54E85463,0x4DF36522,0x02B2F3E5,0x1BA9C2A4,0x30849167,0x299FA026,
+        0xE4C5AEB8,0xFDDE9FF9,0xD6F3CC3A,0xCFE8FD7B,0x80A96BBC,0x99B25AFD,0xB29F093E,0xAB84387F,
+        0x2C1C24B0,0x350715F1,0x1E2A4632,0x07317773,0x4870E1B4,0x516BD0F5,0x7A468336,0x635DB277,
+        0xCBFAD74E,0xD2E1E60F,0xF9CCB5CC,0xE0D7848D,0xAF96124A,0xB68D230B,0x9DA070C8,0x84BB4189,
+        0x03235D46,0x1A386C07,0x31153FC4,0x280E0E85,0x674F9842,0x7E54A903,0x5579FAC0,0x4C62CB81,
+        0x8138C51F,0x9823F45E,0xB30EA79D,0xAA1596DC,0xE554001B,0xFC4F315A,0xD7626299,0xCE7953D8,
+        0x49E14F17,0x50FA7E56,0x7BD72D95,0x62CC1CD4,0x2D8D8A13,0x3496BB52,0x1FBBE891,0x06A0D9D0,
+        0x5E7EF3EC,0x4765C2AD,0x6C48916E,0x7553A02F,0x3A1236E8,0x230907A9,0x0824546A,0x113F652B,
+        0x96A779E4,0x8FBC48A5,0xA4911B66,0xBD8A2A27,0xF2CBBCE0,0xEBD08DA1,0xC0FDDE62,0xD9E6EF23,
+        0x14BCE1BD,0x0DA7D0FC,0x268A833F,0x3F91B27E,0x70D024B9,0x69CB15F8,0x42E6463B,0x5BFD777A,
+        0xDC656BB5,0xC57E5AF4,0xEE530937,0xF7483876,0xB809AEB1,0xA1129FF0,0x8A3FCC33,0x9324FD72,
+    },
+
+    {
+        0x00000000,0x01C26A37,0x0384D46E,0x0246BE59,0x0709A8DC,0x06CBC2EB,0x048D7CB2,0x054F1685,
+        0x0E1351B8,0x0FD13B8F,0x0D9785D6,0x0C55EFE1,0x091AF964,0x08D89353,0x0A9E2D0A,0x0B5C473D,
+        0x1C26A370,0x1DE4C947,0x1FA2771E,0x1E601D29,0x1B2F0BAC,0x1AED619B,0x18ABDFC2,0x1969B5F5,
+        0x1235F2C8,0x13F798FF,0x11B126A6,0x10734C91,0x153C5A14,0x14FE3023,0x16B88E7A,0x177AE44D,
+        0x384D46E0,0x398F2CD7,0x3BC9928E,0x3A0BF8B9,0x3F44EE3C,0x3E86840B,0x3CC03A52,0x3D025065,
+        0x365E1758,0x379C7D6F,0x35DAC336,0x3418A901,0x3157BF84,0x3095D5B3,0x32D36BEA,0x331101DD,
+        0x246BE590,0x25A98FA7,0x27EF31FE,0x262D5BC9,0x23624D4C,0x22A0277B,0x20E69922,0x2124F315,
+        0x2A78B428,0x2BBADE1F,0x29FC6046,0x283E0A71,0x2D711CF4,0x2CB376C3,0x2EF5C89A,0x2F37A2AD,
+        0x709A8DC0,0x7158E7F7,0x731E59AE,0x72DC3399,0x7793251C,0x76514F2B,0x7417F172,0x75D59B45,
+        0x7E89DC78,0x7F4BB64F,0x7D0D0816,0x7CCF6221,0x798074A4,0x78421E93,0x7A04A0CA,0x7BC6CAFD,
+        0x6CBC2EB0,0x6D7E4487,0x6F38FADE,0x6EFA90E9,0x6BB5866C,0x6A77EC5B,0x68315202,0x69F33835,
+        0x62AF7F08,0x636D153F,0x612BAB66,0x60E9C151,0x65A6D7D4,0x6464BDE3,0x662203BA,0x67E0698D,
+        0x48D7CB20,0x4915A117,0x4B531F4E,0x4A917579,0x4FDE63FC,0x4E1C09CB,0x4C5AB792,0x4D98DDA5,
+        0x46C49A98,0x4706F0AF,0x45404EF6,0x448224C1,0x41CD3244,0x400F5873,0x4249E62A,0x438B8C1D,
+        0x54F16850,0x55330267,0x5775BC3E,0x56B7D609,0x53F8C08C,0x523AAABB,0x507C14E2,0x51BE7ED5,
+        0x5AE239E8,0x5B2053DF,0x5966ED86,0x58A487B1,0x5DEB9134,0x5C29FB03,0x5E6F455A,0x5FAD2F6D,
+        0xE1351B80,0xE0F771B7,0xE2B1CFEE,0xE373A5D9,0xE63CB35C,0xE7FED96B,0xE5B86732,0xE47A0D05,
+        0xEF264A38,0xEEE4200F,0xECA29E56,0xED60F461,0xE82FE2E4,0xE9ED88D3,0xEBAB368A,0xEA695CBD,
+        0xFD13B8F0,0xFCD1D2C7,0xFE976C9E,0xFF5506A9,0xFA1A102C,0xFBD87A1B,0xF99EC442,0xF85CAE75,
+        0xF300E948,0xF2C2837F,0xF0843D26,0xF1465711,0xF4094194,0xF5CB2BA3,0xF78D95FA,0xF64FFFCD,
+        0xD9785D60,0xD8BA3757,0xDAFC890E,0xDB3EE339,0xDE71F5BC,0xDFB39F8B,0xDDF521D2,0xDC374BE5,
+        0xD76B0CD8,0xD6A966EF,0xD4EFD8B6,0xD52DB281,0xD062A404,0xD1A0CE33,0xD3E6706A,0xD2241A5D,
+        0xC55EFE10,0xC49C9427,0xC6DA2A7E,0xC7184049,0xC25756CC,0xC3953CFB,0xC1D382A2,0xC011E895,
+        0xCB4DAFA8,0xCA8FC59F,0xC8C97BC6,0xC90B11F1,0xCC440774,0xCD866D43,0xCFC0D31A,0xCE02B92D,
+        0x91AF9640,0x906DFC77,0x922B422E,0x93E92819,0x96A63E9C,0x976454AB,0x9522EAF2,0x94E080C5,
+        0x9FBCC7F8,0x9E7EADCF,0x9C381396,0x9DFA79A1,0x98B56F24,0x99770513,0x9B31BB4A,0x9AF3D17D,
+        0x8D893530,0x8C4B5F07,0x8E0DE15E,0x8FCF8B69,0x8A809DEC,0x8B42F7DB,0x89044982,0x88C623B5,
+        0x839A6488,0x82580EBF,0x801EB0E6,0x81DCDAD1,0x8493CC54,0x8551A663,0x8717183A,0x86D5720D,
+        0xA9E2D0A0,0xA820BA97,0xAA6604CE,0xABA46EF9,0xAEEB787C,0xAF29124B,0xAD6FAC12,0xACADC625,
+        0xA7F18118,0xA633EB2F,0xA4755576,0xA5B73F41,0xA0F829C4,0xA13A43F3,0xA37CFDAA,0xA2BE979D,
+        0xB5C473D0,0xB40619E7,0xB640A7BE,0xB782CD89,0xB2CDDB0C,0xB30FB13B,0xB1490F62,0xB08B6555,
+        0xBBD72268,0xBA15485F,0xB853F606,0xB9919C31,0xBCDE8AB4,0xBD1CE083,0xBF5A5EDA,0xBE9834ED,
+    },
+
+    {
+        0x00000000,0xB8BC6765,0xAA09C88B,0x12B5AFEE,0x8F629757,0x37DEF032,0x256B5FDC,0x9DD738B9,
+        0xC5B428EF,0x7D084F8A,0x6FBDE064,0xD7018701,0x4AD6BFB8,0xF26AD8DD,0xE0DF7733,0x58631056,
+        0x5019579F,0xE8A530FA,0xFA109F14,0x42ACF871,0xDF7BC0C8,0x67C7A7AD,0x75720843,0xCDCE6F26,
+        0x95AD7F70,0x2D111815,0x3FA4B7FB,0x8718D09E,0x1ACFE827,0xA2738F42,0xB0C620AC,0x087A47C9,
+        0xA032AF3E,0x188EC85B,0x0A3B67B5,0xB28700D0,0x2F503869,0x97EC5F0C,0x8559F0E2,0x3DE59787,
+        0x658687D1,0xDD3AE0B4,0xCF8F4F5A,0x7733283F,0xEAE41086,0x525877E3,0x40EDD80D,0xF851BF68,
+        0xF02BF8A1,0x48979FC4,0x5A22302A,0xE29E574F,0x7F496FF6,0xC7F50893,0xD540A77D,0x6DFCC018,
+        0x359FD04E,0x8D23B72B,0x9F9618C5,0x272A7FA0,0xBAFD4719,0x0241207C,0x10F48F92,0xA848E8F7,
+        0x9B14583D,0x23A83F58,0x311D90B6,0x89A1F7D3,0x1476CF6A,0xACCAA80F,0xBE7F07E1,0x06C36084,
+        0x5EA070D2,0xE61C17B7,0xF4A9B859,0x4C15DF3C,0xD1C2E785,0x697E80E0,0x7BCB2F0E,0xC377486B,
+        0xCB0D0FA2,0x73B168C7,0x6104C729,0xD9B8A04C,0x446F98F5,0xFCD3FF90,0xEE66507E,0x56DA371B,
+        0x0EB9274D,0xB6054028,0xA4B0EFC6,0x1C0C88A3,0x81DBB01A,0x3967D77F,0x2BD27891,0x936E1FF4,
+        0x3B26F703,0x839A9066,0x912F3F88,0x299358ED,0xB4446054,0x0CF80731,0x1E4DA8DF,0xA6F1CFBA,
+        0xFE92DFEC,0x462EB889,0x549B1767,0xEC277002,0x71F048BB,0xC94C2FDE,0xDBF98030,0x6345E755,
+        0x6B3FA09C,0xD383C7F9,0xC1366817,0x798A0F72,0xE45D37CB,0x5CE150AE,0x4E54FF40,0xF6E89825,
+        0xAE8B8873,0x1637EF16,0x048240F8,0xBC3E279D,0x21E91F24,0x99557841,0x8BE0D7AF,0x335CB0CA,
+        0xED59B63B,0x55E5D15E,0x47507EB0,0xFFEC19D5,0x623B216C,0xDA874609,0xC832E9E7,0x708E8E82,
+        0x28ED9ED4,0x9051F9B1,0x82E4565F,0x3A58313A,0xA78F0983,0x1F336EE6,0x0D86C108,0xB53AA66D,
+        0xBD40E1A4,0x05FC86C1,0x1749292F,0xAFF54E4A,0x322276F3,0x8A9E1196,0x982BBE78,0x2097D91D,
+        0x78F4C94B,0xC048AE2E,0xD2FD01C0,0x6A4166A5,0xF7965E1C,0x4F2A3979,0x5D9F9697,0xE523F1F2,
+        0x4D6B1905,0xF5D77E60,0xE762D18E,0x5FDEB6EB,0xC2098E52,0x7AB5E937,0x680046D9,0xD0BC21BC,
+        0x88DF31EA,0x3063568F,0x22D6F961,0x9A6A9E04,0x07BDA6BD,0xBF01C1D8,0xADB46E36,0x15080953,
+        0x1D724E9A,0xA5CE29FF,0xB77B8611,0x0FC7E174,0x9210D9CD,0x2AACBEA8,0x38191146,0x80A57623,
+        0xD8C66675,0x607A0110,0x72CFAEFE,0xCA73C99B,0x57A4F122,0xEF189647,0xFDAD39A9,0x45115ECC,
+        0x764DEE06,0xCEF18963,0xDC44268D,0x64F841E8,0xF92F7951,0x41931E34,0x5326B1DA,0xEB9AD6BF,
+        0xB3F9C6E9,0x0B45A18C,0x19F00E62,0xA14C6907,0x3C9B51BE,0x842736DB,0x96929935,0x2E2EFE50,
+        0x2654B999,0x9EE8DEFC,0x8C5D7112,0x34E11677,0xA9362ECE,0x118A49AB,0x033FE645,0xBB838120,
+        0xE3E09176,0x5B5CF613,0x49E959FD,0xF1553E98,0x6C820621,0xD43E6144,0xC68BCEAA,0x7E37A9CF,
+        0xD67F4138,0x6EC3265D,0x7C7689B3,0xC4CAEED6,0x591DD66F,0xE1A1B10A,0xF3141EE4,0x4BA87981,
+        0x13CB69D7,0xAB770EB2,0xB9C2A15C,0x017EC639,0x9CA9FE80,0x241599E5,0x36A0360B,0x8E1C516E,
+        0x866616A7,0x3EDA71C2,0x2C6FDE2C,0x94D3B949,0x090481F0,0xB1B8E695,0xA30D497B,0x1BB12E1E,
+        0x43D23E48,0xFB6E592D,0xE9DBF6C3,0x516791A6,0xCCB0A91F,0x740CCE7A,0x66B96194,0xDE0506F1,
+    },
+
+    /* beyond this point only relevant for Slicing-by-8 and Slicing-by-16 */
+    {
+        0x00000000,0x3D6029B0,0x7AC05360,0x47A07AD0,0xF580A6C0,0xC8E08F70,0x8F40F5A0,0xB220DC10,
+        0x30704BC1,0x0D106271,0x4AB018A1,0x77D03111,0xC5F0ED01,0xF890C4B1,0xBF30BE61,0x825097D1,
+        0x60E09782,0x5D80BE32,0x1A20C4E2,0x2740ED52,0x95603142,0xA80018F2,0xEFA06222,0xD2C04B92,
+        0x5090DC43,0x6DF0F5F3,0x2A508F23,0x1730A693,0xA5107A83,0x98705333,0xDFD029E3,0xE2B00053,
+        0xC1C12F04,0xFCA106B4,0xBB017C64,0x866155D4,0x344189C4,0x0921A074,0x4E81DAA4,0x73E1F314,
+        0xF1B164C5,0xCCD14D75,0x8B7137A5,0xB6111E15,0x0431C205,0x3951EBB5,0x7EF19165,0x4391B8D5,
+        0xA121B886,0x9C419136,0xDBE1EBE6,0xE681C256,0x54A11E46,0x69C137F6,0x2E614D26,0x13016496,
+        0x9151F347,0xAC31DAF7,0xEB91A027,0xD6F18997,0x64D15587,0x59B17C37,0x1E1106E7,0x23712F57,
+        0x58F35849,0x659371F9,0x22330B29,0x1F532299,0xAD73FE89,0x9013D739,0xD7B3ADE9,0xEAD38459,
+        0x68831388,0x55E33A38,0x124340E8,0x2F236958,0x9D03B548,0xA0639CF8,0xE7C3E628,0xDAA3CF98,
+        0x3813CFCB,0x0573E67B,0x42D39CAB,0x7FB3B51B,0xCD93690B,0xF0F340BB,0xB7533A6B,0x8A3313DB,
+        0x0863840A,0x3503ADBA,0x72A3D76A,0x4FC3FEDA,0xFDE322CA,0xC0830B7A,0x872371AA,0xBA43581A,
+        0x9932774D,0xA4525EFD,0xE3F2242D,0xDE920D9D,0x6CB2D18D,0x51D2F83D,0x167282ED,0x2B12AB5D,
+        0xA9423C8C,0x9422153C,0xD3826FEC,0xEEE2465C,0x5CC29A4C,0x61A2B3FC,0x2602C92C,0x1B62E09C,
+        0xF9D2E0CF,0xC4B2C97F,0x8312B3AF,0xBE729A1F,0x0C52460F,0x31326FBF,0x7692156F,0x4BF23CDF,
+        0xC9A2AB0E,0xF4C282BE,0xB362F86E,0x8E02D1DE,0x3C220DCE,0x0142247E,0x46E25EAE,0x7B82771E,
+        0xB1E6B092,0x8C869922,0xCB26E3F2,0xF646CA42,0x44661652,0x79063FE2,0x3EA64532,0x03C66C82,
+        0x8196FB53,0xBCF6D2E3,0xFB56A833,0xC6368183,0x74165D93,0x49767423,0x0ED60EF3,0x33B62743,
+        0xD1062710,0xEC660EA0,0xABC67470,0x96A65DC0,0x248681D0,0x19E6A860,0x5E46D2B0,0x6326FB00,
+        0xE1766CD1,0xDC164561,0x9BB63FB1,0xA6D61601,0x14F6CA11,0x2996E3A1,0x6E369971,0x5356B0C1,
+        0x70279F96,0x4D47B626,0x0AE7CCF6,0x3787E546,0x85A73956,0xB8C710E6,0xFF676A36,0xC2074386,
+        0x4057D457,0x7D37FDE7,0x3A978737,0x07F7AE87,0xB5D77297,0x88B75B27,0xCF1721F7,0xF2770847,
+        0x10C70814,0x2DA721A4,0x6A075B74,0x576772C4,0xE547AED4,0xD8278764,0x9F87FDB4,0xA2E7D404,
+        0x20B743D5,0x1DD76A65,0x5A7710B5,0x67173905,0xD537E515,0xE857CCA5,0xAFF7B675,0x92979FC5,
+        0xE915E8DB,0xD475C16B,0x93D5BBBB,0xAEB5920B,0x1C954E1B,0x21F567AB,0x66551D7B,0x5B3534CB,
+        0xD965A31A,0xE4058AAA,0xA3A5F07A,0x9EC5D9CA,0x2CE505DA,0x11852C6A,0x562556BA,0x6B457F0A,
+        0x89F57F59,0xB49556E9,0xF3352C39,0xCE550589,0x7C75D999,0x4115F029,0x06B58AF9,0x3BD5A349,
+        0xB9853498,0x84E51D28,0xC34567F8,0xFE254E48,0x4C059258,0x7165BBE8,0x36C5C138,0x0BA5E888,
+        0x28D4C7DF,0x15B4EE6F,0x521494BF,0x6F74BD0F,0xDD54611F,0xE03448AF,0xA794327F,0x9AF41BCF,
+        0x18A48C1E,0x25C4A5AE,0x6264DF7E,0x5F04F6CE,0xED242ADE,0xD044036E,0x97E479BE,0xAA84500E,
+        0x4834505D,0x755479ED,0x32F4033D,0x0F942A8D,0xBDB4F69D,0x80D4DF2D,0xC774A5FD,0xFA148C4D,
+        0x78441B9C,0x4524322C,0x028448FC,0x3FE4614C,0x8DC4BD5C,0xB0A494EC,0xF704EE3C,0xCA64C78C,
+    },
+
+    {
+        0x00000000,0xCB5CD3A5,0x4DC8A10B,0x869472AE,0x9B914216,0x50CD91B3,0xD659E31D,0x1D0530B8,
+        0xEC53826D,0x270F51C8,0xA19B2366,0x6AC7F0C3,0x77C2C07B,0xBC9E13DE,0x3A0A6170,0xF156B2D5,
+        0x03D6029B,0xC88AD13E,0x4E1EA390,0x85427035,0x9847408D,0x531B9328,0xD58FE186,0x1ED33223,
+        0xEF8580F6,0x24D95353,0xA24D21FD,0x6911F258,0x7414C2E0,0xBF481145,0x39DC63EB,0xF280B04E,
+        0x07AC0536,0xCCF0D693,0x4A64A43D,0x81387798,0x9C3D4720,0x57619485,0xD1F5E62B,0x1AA9358E,
+        0xEBFF875B,0x20A354FE,0xA6372650,0x6D6BF5F5,0x706EC54D,0xBB3216E8,0x3DA66446,0xF6FAB7E3,
+        0x047A07AD,0xCF26D408,0x49B2A6A6,0x82EE7503,0x9FEB45BB,0x54B7961E,0xD223E4B0,0x197F3715,
+        0xE82985C0,0x23755665,0xA5E124CB,0x6EBDF76E,0x73B8C7D6,0xB8E41473,0x3E7066DD,0xF52CB578,
+        0x0F580A6C,0xC404D9C9,0x4290AB67,0x89CC78C2,0x94C9487A,0x5F959BDF,0xD901E971,0x125D3AD4,
+        0xE30B8801,0x28575BA4,0xAEC3290A,0x659FFAAF,0x789ACA17,0xB3C619B2,0x35526B1C,0xFE0EB8B9,
+        0x0C8E08F7,0xC7D2DB52,0x4146A9FC,0x8A1A7A59,0x971F4AE1,0x5C439944,0xDAD7EBEA,0x118B384F,
+        0xE0DD8A9A,0x2B81593F,0xAD152B91,0x6649F834,0x7B4CC88C,0xB0101B29,0x36846987,0xFDD8BA22,
+        0x08F40F5A,0xC3A8DCFF,0x453CAE51,0x8E607DF4,0x93654D4C,0x58399EE9,0xDEADEC47,0x15F13FE2,
+        0xE4A78D37,0x2FFB5E92,0xA96F2C3C,0x6233FF99,0x7F36CF21,0xB46A1C84,0x32FE6E2A,0xF9A2BD8F,
+        0x0B220DC1,0xC07EDE64,0x46EAACCA,0x8DB67F6F,0x90B34FD7,0x5BEF9C72,0xDD7BEEDC,0x16273D79,
+        0xE7718FAC,0x2C2D5C09,0xAAB92EA7,0x61E5FD02,0x7CE0CDBA,0xB7BC1E1F,0x31286CB1,0xFA74BF14,
+        0x1EB014D8,0xD5ECC77D,0x5378B5D3,0x98246676,0x852156CE,0x4E7D856B,0xC8E9F7C5,0x03B52460,
+        0xF2E396B5,0x39BF4510,0xBF2B37BE,0x7477E41B,0x6972D4A3,0xA22E0706,0x24BA75A8,0xEFE6A60D,
+        0x1D661643,0xD63AC5E6,0x50AEB748,0x9BF264ED,0x86F75455,0x4DAB87F0,0xCB3FF55E,0x006326FB,
+        0xF135942E,0x3A69478B,0xBCFD3525,0x77A1E680,0x6AA4D638,0xA1F8059D,0x276C7733,0xEC30A496,
+        0x191C11EE,0xD240C24B,0x54D4B0E5,0x9F886340,0x828D53F8,0x49D1805D,0xCF45F2F3,0x04192156,
+        0xF54F9383,0x3E134026,0xB8873288,0x73DBE12D,0x6EDED195,0xA5820230,0x2316709E,0xE84AA33B,
+        0x1ACA1375,0xD196C0D0,0x5702B27E,0x9C5E61DB,0x815B5163,0x4A0782C6,0xCC93F068,0x07CF23CD,
+        0xF6999118,0x3DC542BD,0xBB513013,0x700DE3B6,0x6D08D30E,0xA65400AB,0x20C07205,0xEB9CA1A0,
+        0x11E81EB4,0xDAB4CD11,0x5C20BFBF,0x977C6C1A,0x8A795CA2,0x41258F07,0xC7B1FDA9,0x0CED2E0C,
+        0xFDBB9CD9,0x36E74F7C,0xB0733DD2,0x7B2FEE77,0x662ADECF,0xAD760D6A,0x2BE27FC4,0xE0BEAC61,
+        0x123E1C2F,0xD962CF8A,0x5FF6BD24,0x94AA6E81,0x89AF5E39,0x42F38D9C,0xC467FF32,0x0F3B2C97,
+        0xFE6D9E42,0x35314DE7,0xB3A53F49,0x78F9ECEC,0x65FCDC54,0xAEA00FF1,0x28347D5F,0xE368AEFA,
+        0x16441B82,0xDD18C827,0x5B8CBA89,0x90D0692C,0x8DD55994,0x46898A31,0xC01DF89F,0x0B412B3A,
+        0xFA1799EF,0x314B4A4A,0xB7DF38E4,0x7C83EB41,0x6186DBF9,0xAADA085C,0x2C4E7AF2,0xE712A957,
+        0x15921919,0xDECECABC,0x585AB812,0x93066BB7,0x8E035B0F,0x455F88AA,0xC3CBFA04,0x089729A1,
+        0xF9C19B74,0x329D48D1,0xB4093A7F,0x7F55E9DA,0x6250D962,0xA90C0AC7,0x2F987869,0xE4C4ABCC,
+    },
+
+    {
+        0x00000000,0xA6770BB4,0x979F1129,0x31E81A9D,0xF44F2413,0x52382FA7,0x63D0353A,0xC5A73E8E,
+        0x33EF4E67,0x959845D3,0xA4705F4E,0x020754FA,0xC7A06A74,0x61D761C0,0x503F7B5D,0xF64870E9,
+        0x67DE9CCE,0xC1A9977A,0xF0418DE7,0x56368653,0x9391B8DD,0x35E6B369,0x040EA9F4,0xA279A240,
+        0x5431D2A9,0xF246D91D,0xC3AEC380,0x65D9C834,0xA07EF6BA,0x0609FD0E,0x37E1E793,0x9196EC27,
+        0xCFBD399C,0x69CA3228,0x582228B5,0xFE552301,0x3BF21D8F,0x9D85163B,0xAC6D0CA6,0x0A1A0712,
+        0xFC5277FB,0x5A257C4F,0x6BCD66D2,0xCDBA6D66,0x081D53E8,0xAE6A585C,0x9F8242C1,0x39F54975,
+        0xA863A552,0x0E14AEE6,0x3FFCB47B,0x998BBFCF,0x5C2C8141,0xFA5B8AF5,0xCBB39068,0x6DC49BDC,
+        0x9B8CEB35,0x3DFBE081,0x0C13FA1C,0xAA64F1A8,0x6FC3CF26,0xC9B4C492,0xF85CDE0F,0x5E2BD5BB,
+        0x440B7579,0xE27C7ECD,0xD3946450,0x75E36FE4,0xB044516A,0x16335ADE,0x27DB4043,0x81AC4BF7,
+        0x77E43B1E,0xD19330AA,0xE07B2A37,0x460C2183,0x83AB1F0D,0x25DC14B9,0x14340E24,0xB2430590,
+        0x23D5E9B7,0x85A2E203,0xB44AF89E,0x123DF32A,0xD79ACDA4,0x71EDC610,0x4005DC8D,0xE672D739,
+        0x103AA7D0,0xB64DAC64,0x87A5B6F9,0x21D2BD4D,0xE47583C3,0x42028877,0x73EA92EA,0xD59D995E,
+        0x8BB64CE5,0x2DC14751,0x1C295DCC,0xBA5E5678,0x7FF968F6,0xD98E6342,0xE86679DF,0x4E11726B,
+        0xB8590282,0x1E2E0936,0x2FC613AB,0x89B1181F,0x4C162691,0xEA612D25,0xDB8937B8,0x7DFE3C0C,
+        0xEC68D02B,0x4A1FDB9F,0x7BF7C102,0xDD80CAB6,0x1827F438,0xBE50FF8C,0x8FB8E511,0x29CFEEA5,
+        0xDF879E4C,0x79F095F8,0x48188F65,0xEE6F84D1,0x2BC8BA5F,0x8DBFB1EB,0xBC57AB76,0x1A20A0C2,
+        0x8816EAF2,0x2E61E146,0x1F89FBDB,0xB9FEF06F,0x7C59CEE1,0xDA2EC555,0xEBC6DFC8,0x4DB1D47C,
+        0xBBF9A495,0x1D8EAF21,0x2C66B5BC,0x8A11BE08,0x4FB68086,0xE9C18B32,0xD82991AF,0x7E5E9A1B,
+        0xEFC8763C,0x49BF7D88,0x78576715,0xDE206CA1,0x1B87522F,0xBDF0599B,0x8C184306,0x2A6F48B2,
+        0xDC27385B,0x7A5033EF,0x4BB82972,0xEDCF22C6,0x28681C48,0x8E1F17FC,0xBFF70D61,0x198006D5,
+        0x47ABD36E,0xE1DCD8DA,0xD034C247,0x7643C9F3,0xB3E4F77D,0x1593FCC9,0x247BE654,0x820CEDE0,
+        0x74449D09,0xD23396BD,0xE3DB8C20,0x45AC8794,0x800BB91A,0x267CB2AE,0x1794A833,0xB1E3A387,
+        0x20754FA0,0x86024414,0xB7EA5E89,0x119D553D,0xD43A6BB3,0x724D6007,0x43A57A9A,0xE5D2712E,
+        0x139A01C7,0xB5ED0A73,0x840510EE,0x22721B5A,0xE7D525D4,0x41A22E60,0x704A34FD,0xD63D3F49,
+        0xCC1D9F8B,0x6A6A943F,0x5B828EA2,0xFDF58516,0x3852BB98,0x9E25B02C,0xAFCDAAB1,0x09BAA105,
+        0xFFF2D1EC,0x5985DA58,0x686DC0C5,0xCE1ACB71,0x0BBDF5FF,0xADCAFE4B,0x9C22E4D6,0x3A55EF62,
+        0xABC30345,0x0DB408F1,0x3C5C126C,0x9A2B19D8,0x5F8C2756,0xF9FB2CE2,0xC813367F,0x6E643DCB,
+        0x982C4D22,0x3E5B4696,0x0FB35C0B,0xA9C457BF,0x6C636931,0xCA146285,0xFBFC7818,0x5D8B73AC,
+        0x03A0A617,0xA5D7ADA3,0x943FB73E,0x3248BC8A,0xF7EF8204,0x519889B0,0x6070932D,0xC6079899,
+        0x304FE870,0x9638E3C4,0xA7D0F959,0x01A7F2ED,0xC400CC63,0x6277C7D7,0x539FDD4A,0xF5E8D6FE,
+        0x647E3AD9,0xC209316D,0xF3E12BF0,0x55962044,0x90311ECA,0x3646157E,0x07AE0FE3,0xA1D90457,
+        0x579174BE,0xF1E67F0A,0xC00E6597,0x66796E23,0xA3DE50AD,0x05A95B19,0x34414184,0x92364A30,
+    },
+
+    {
+        0x00000000,0xCCAA009E,0x4225077D,0x8E8F07E3,0x844A0EFA,0x48E00E64,0xC66F0987,0x0AC50919,
+        0xD3E51BB5,0x1F4F1B2B,0x91C01CC8,0x5D6A1C56,0x57AF154F,0x9B0515D1,0x158A1232,0xD92012AC,
+        0x7CBB312B,0xB01131B5,0x3E9E3656,0xF23436C8,0xF8F13FD1,0x345B3F4F,0xBAD438AC,0x767E3832,
+        0xAF5E2A9E,0x63F42A00,0xED7B2DE3,0x21D12D7D,0x2B142464,0xE7BE24FA,0x69312319,0xA59B2387,
+        0xF9766256,0x35DC62C8,0xBB53652B,0x77F965B5,0x7D3C6CAC,0xB1966C32,0x3F196BD1,0xF3B36B4F,
+        0x2A9379E3,0xE639797D,0x68B67E9E,0xA41C7E00,0xAED97719,0x62737787,0xECFC7064,0x205670FA,
+        0x85CD537D,0x496753E3,0xC7E85400,0x0B42549E,0x01875D87,0xCD2D5D19,0x43A25AFA,0x8F085A64,
+        0x562848C8,0x9A824856,0x140D4FB5,0xD8A74F2B,0xD2624632,0x1EC846AC,0x9047414F,0x5CED41D1,
+        0x299DC2ED,0xE537C273,0x6BB8C590,0xA712C50E,0xADD7CC17,0x617DCC89,0xEFF2CB6A,0x2358CBF4,
+        0xFA78D958,0x36D2D9C6,0xB85DDE25,0x74F7DEBB,0x7E32D7A2,0xB298D73C,0x3C17D0DF,0xF0BDD041,
+        0x5526F3C6,0x998CF358,0x1703F4BB,0xDBA9F425,0xD16CFD3C,0x1DC6FDA2,0x9349FA41,0x5FE3FADF,
+        0x86C3E873,0x4A69E8ED,0xC4E6EF0E,0x084CEF90,0x0289E689,0xCE23E617,0x40ACE1F4,0x8C06E16A,
+        0xD0EBA0BB,0x1C41A025,0x92CEA7C6,0x5E64A758,0x54A1AE41,0x980BAEDF,0x1684A93C,0xDA2EA9A2,
+        0x030EBB0E,0xCFA4BB90,0x412BBC73,0x8D81BCED,0x8744B5F4,0x4BEEB56A,0xC561B289,0x09CBB217,
+        0xAC509190,0x60FA910E,0xEE7596ED,0x22DF9673,0x281A9F6A,0xE4B09FF4,0x6A3F9817,0xA6959889,
+        0x7FB58A25,0xB31F8ABB,0x3D908D58,0xF13A8DC6,0xFBFF84DF,0x37558441,0xB9DA83A2,0x7570833C,
+        0x533B85DA,0x9F918544,0x111E82A7,0xDDB48239,0xD7718B20,0x1BDB8BBE,0x95548C5D,0x59FE8CC3,
+        0x80DE9E6F,0x4C749EF1,0xC2FB9912,0x0E51998C,0x04949095,0xC83E900B,0x46B197E8,0x8A1B9776,
+        0x2F80B4F1,0xE32AB46F,0x6DA5B38C,0xA10FB312,0xABCABA0B,0x6760BA95,0xE9EFBD76,0x2545BDE8,
+        0xFC65AF44,0x30CFAFDA,0xBE40A839,0x72EAA8A7,0x782FA1BE,0xB485A120,0x3A0AA6C3,0xF6A0A65D,
+        0xAA4DE78C,0x66E7E712,0xE868E0F1,0x24C2E06F,0x2E07E976,0xE2ADE9E8,0x6C22EE0B,0xA088EE95,
+        0x79A8FC39,0xB502FCA7,0x3B8DFB44,0xF727FBDA,0xFDE2F2C3,0x3148F25D,0xBFC7F5BE,0x736DF520,
+        0xD6F6D6A7,0x1A5CD639,0x94D3D1DA,0x5879D144,0x52BCD85D,0x9E16D8C3,0x1099DF20,0xDC33DFBE,
+        0x0513CD12,0xC9B9CD8C,0x4736CA6F,0x8B9CCAF1,0x8159C3E8,0x4DF3C376,0xC37CC495,0x0FD6C40B,
+        0x7AA64737,0xB60C47A9,0x3883404A,0xF42940D4,0xFEEC49CD,0x32464953,0xBCC94EB0,0x70634E2E,
+        0xA9435C82,0x65E95C1C,0xEB665BFF,0x27CC5B61,0x2D095278,0xE1A352E6,0x6F2C5505,0xA386559B,
+        0x061D761C,0xCAB77682,0x44387161,0x889271FF,0x825778E6,0x4EFD7878,0xC0727F9B,0x0CD87F05,
+        0xD5F86DA9,0x19526D37,0x97DD6AD4,0x5B776A4A,0x51B26353,0x9D1863CD,0x1397642E,0xDF3D64B0,
+        0x83D02561,0x4F7A25FF,0xC1F5221C,0x0D5F2282,0x079A2B9B,0xCB302B05,0x45BF2CE6,0x89152C78,
+        0x50353ED4,0x9C9F3E4A,0x121039A9,0xDEBA3937,0xD47F302E,0x18D530B0,0x965A3753,0x5AF037CD,
+        0xFF6B144A,0x33C114D4,0xBD4E1337,0x71E413A9,0x7B211AB0,0xB78B1A2E,0x39041DCD,0xF5AE1D53,
+        0x2C8E0FFF,0xE0240F61,0x6EAB0882,0xA201081C,0xA8C40105,0x646E019B,0xEAE10678,0x264B06E6,
+    },
+
+    /*  beyond this point only relevant for Slicing-by-16 */
+    {
+        0x00000000,0x177B1443,0x2EF62886,0x398D3CC5,0x5DEC510C,0x4A97454F,0x731A798A,0x64616DC9,
+        0xBBD8A218,0xACA3B65B,0x952E8A9E,0x82559EDD,0xE634F314,0xF14FE757,0xC8C2DB92,0xDFB9CFD1,
+        0xACC04271,0xBBBB5632,0x82366AF7,0x954D7EB4,0xF12C137D,0xE657073E,0xDFDA3BFB,0xC8A12FB8,
+        0x1718E069,0x0063F42A,0x39EEC8EF,0x2E95DCAC,0x4AF4B165,0x5D8FA526,0x640299E3,0x73798DA0,
+        0x82F182A3,0x958A96E0,0xAC07AA25,0xBB7CBE66,0xDF1DD3AF,0xC866C7EC,0xF1EBFB29,0xE690EF6A,
+        0x392920BB,0x2E5234F8,0x17DF083D,0x00A41C7E,0x64C571B7,0x73BE65F4,0x4A335931,0x5D484D72,
+        0x2E31C0D2,0x394AD491,0x00C7E854,0x17BCFC17,0x73DD91DE,0x64A6859D,0x5D2BB958,0x4A50AD1B,
+        0x95E962CA,0x82927689,0xBB1F4A4C,0xAC645E0F,0xC80533C6,0xDF7E2785,0xE6F31B40,0xF1880F03,
+        0xDE920307,0xC9E91744,0xF0642B81,0xE71F3FC2,0x837E520B,0x94054648,0xAD887A8D,0xBAF36ECE,
+        0x654AA11F,0x7231B55C,0x4BBC8999,0x5CC79DDA,0x38A6F013,0x2FDDE450,0x1650D895,0x012BCCD6,
+        0x72524176,0x65295535,0x5CA469F0,0x4BDF7DB3,0x2FBE107A,0x38C50439,0x014838FC,0x16332CBF,
+        0xC98AE36E,0xDEF1F72D,0xE77CCBE8,0xF007DFAB,0x9466B262,0x831DA621,0xBA909AE4,0xADEB8EA7,
+        0x5C6381A4,0x4B1895E7,0x7295A922,0x65EEBD61,0x018FD0A8,0x16F4C4EB,0x2F79F82E,0x3802EC6D,
+        0xE7BB23BC,0xF0C037FF,0xC94D0B3A,0xDE361F79,0xBA5772B0,0xAD2C66F3,0x94A15A36,0x83DA4E75,
+        0xF0A3C3D5,0xE7D8D796,0xDE55EB53,0xC92EFF10,0xAD4F92D9,0xBA34869A,0x83B9BA5F,0x94C2AE1C,
+        0x4B7B61CD,0x5C00758E,0x658D494B,0x72F65D08,0x169730C1,0x01EC2482,0x38611847,0x2F1A0C04,
+        0x6655004F,0x712E140C,0x48A328C9,0x5FD83C8A,0x3BB95143,0x2CC24500,0x154F79C5,0x02346D86,
+        0xDD8DA257,0xCAF6B614,0xF37B8AD1,0xE4009E92,0x8061F35B,0x971AE718,0xAE97DBDD,0xB9ECCF9E,
+        0xCA95423E,0xDDEE567D,0xE4636AB8,0xF3187EFB,0x97791332,0x80020771,0xB98F3BB4,0xAEF42FF7,
+        0x714DE026,0x6636F465,0x5FBBC8A0,0x48C0DCE3,0x2CA1B12A,0x3BDAA569,0x025799AC,0x152C8DEF,
+        0xE4A482EC,0xF3DF96AF,0xCA52AA6A,0xDD29BE29,0xB948D3E0,0xAE33C7A3,0x97BEFB66,0x80C5EF25,
+        0x5F7C20F4,0x480734B7,0x718A0872,0x66F11C31,0x029071F8,0x15EB65BB,0x2C66597E,0x3B1D4D3D,
+        0x4864C09D,0x5F1FD4DE,0x6692E81B,0x71E9FC58,0x15889191,0x02F385D2,0x3B7EB917,0x2C05AD54,
+        0xF3BC6285,0xE4C776C6,0xDD4A4A03,0xCA315E40,0xAE503389,0xB92B27CA,0x80A61B0F,0x97DD0F4C,
+        0xB8C70348,0xAFBC170B,0x96312BCE,0x814A3F8D,0xE52B5244,0xF2504607,0xCBDD7AC2,0xDCA66E81,
+        0x031FA150,0x1464B513,0x2DE989D6,0x3A929D95,0x5EF3F05C,0x4988E41F,0x7005D8DA,0x677ECC99,
+        0x14074139,0x037C557A,0x3AF169BF,0x2D8A7DFC,0x49EB1035,0x5E900476,0x671D38B3,0x70662CF0,
+        0xAFDFE321,0xB8A4F762,0x8129CBA7,0x9652DFE4,0xF233B22D,0xE548A66E,0xDCC59AAB,0xCBBE8EE8,
+        0x3A3681EB,0x2D4D95A8,0x14C0A96D,0x03BBBD2E,0x67DAD0E7,0x70A1C4A4,0x492CF861,0x5E57EC22,
+        0x81EE23F3,0x969537B0,0xAF180B75,0xB8631F36,0xDC0272FF,0xCB7966BC,0xF2F45A79,0xE58F4E3A,
+        0x96F6C39A,0x818DD7D9,0xB800EB1C,0xAF7BFF5F,0xCB1A9296,0xDC6186D5,0xE5ECBA10,0xF297AE53,
+        0x2D2E6182,0x3A5575C1,0x03D84904,0x14A35D47,0x70C2308E,0x67B924CD,0x5E341808,0x494F0C4B,
+    },
+
+    {
+        0x00000000,0xEFC26B3E,0x04F5D03D,0xEB37BB03,0x09EBA07A,0xE629CB44,0x0D1E7047,0xE2DC1B79,
+        0x13D740F4,0xFC152BCA,0x172290C9,0xF8E0FBF7,0x1A3CE08E,0xF5FE8BB0,0x1EC930B3,0xF10B5B8D,
+        0x27AE81E8,0xC86CEAD6,0x235B51D5,0xCC993AEB,0x2E452192,0xC1874AAC,0x2AB0F1AF,0xC5729A91,
+        0x3479C11C,0xDBBBAA22,0x308C1121,0xDF4E7A1F,0x3D926166,0xD2500A58,0x3967B15B,0xD6A5DA65,
+        0x4F5D03D0,0xA09F68EE,0x4BA8D3ED,0xA46AB8D3,0x46B6A3AA,0xA974C894,0x42437397,0xAD8118A9,
+        0x5C8A4324,0xB348281A,0x587F9319,0xB7BDF827,0x5561E35E,0xBAA38860,0x51943363,0xBE56585D,
+        0x68F38238,0x8731E906,0x6C065205,0x83C4393B,0x61182242,0x8EDA497C,0x65EDF27F,0x8A2F9941,
+        0x7B24C2CC,0x94E6A9F2,0x7FD112F1,0x901379CF,0x72CF62B6,0x9D0D0988,0x763AB28B,0x99F8D9B5,
+        0x9EBA07A0,0x71786C9E,0x9A4FD79D,0x758DBCA3,0x9751A7DA,0x7893CCE4,0x93A477E7,0x7C661CD9,
+        0x8D6D4754,0x62AF2C6A,0x89989769,0x665AFC57,0x8486E72E,0x6B448C10,0x80733713,0x6FB15C2D,
+        0xB9148648,0x56D6ED76,0xBDE15675,0x52233D4B,0xB0FF2632,0x5F3D4D0C,0xB40AF60F,0x5BC89D31,
+        0xAAC3C6BC,0x4501AD82,0xAE361681,0x41F47DBF,0xA32866C6,0x4CEA0DF8,0xA7DDB6FB,0x481FDDC5,
+        0xD1E70470,0x3E256F4E,0xD512D44D,0x3AD0BF73,0xD80CA40A,0x37CECF34,0xDCF97437,0x333B1F09,
+        0xC2304484,0x2DF22FBA,0xC6C594B9,0x2907FF87,0xCBDBE4FE,0x24198FC0,0xCF2E34C3,0x20EC5FFD,
+        0xF6498598,0x198BEEA6,0xF2BC55A5,0x1D7E3E9B,0xFFA225E2,0x10604EDC,0xFB57F5DF,0x14959EE1,
+        0xE59EC56C,0x0A5CAE52,0xE16B1551,0x0EA97E6F,0xEC756516,0x03B70E28,0xE880B52B,0x0742DE15,
+        0xE6050901,0x09C7623F,0xE2F0D93C,0x0D32B202,0xEFEEA97B,0x002CC245,0xEB1B7946,0x04D91278,
+        0xF5D249F5,0x1A1022CB,0xF12799C8,0x1EE5F2F6,0xFC39E98F,0x13FB82B1,0xF8CC39B2,0x170E528C,
+        0xC1AB88E9,0x2E69E3D7,0xC55E58D4,0x2A9C33EA,0xC8402893,0x278243AD,0xCCB5F8AE,0x23779390,
+        0xD27CC81D,0x3DBEA323,0xD6891820,0x394B731E,0xDB976867,0x34550359,0xDF62B85A,0x30A0D364,
+        0xA9580AD1,0x469A61EF,0xADADDAEC,0x426FB1D2,0xA0B3AAAB,0x4F71C195,0xA4467A96,0x4B8411A8,
+        0xBA8F4A25,0x554D211B,0xBE7A9A18,0x51B8F126,0xB364EA5F,0x5CA68161,0xB7913A62,0x5853515C,
+        0x8EF68B39,0x6134E007,0x8A035B04,0x65C1303A,0x871D2B43,0x68DF407D,0x83E8FB7E,0x6C2A9040,
+        0x9D21CBCD,0x72E3A0F3,0x99D41BF0,0x761670CE,0x94CA6BB7,0x7B080089,0x903FBB8A,0x7FFDD0B4,
+        0x78BF0EA1,0x977D659F,0x7C4ADE9C,0x9388B5A2,0x7154AEDB,0x9E96C5E5,0x75A17EE6,0x9A6315D8,
+        0x6B684E55,0x84AA256B,0x6F9D9E68,0x805FF556,0x6283EE2F,0x8D418511,0x66763E12,0x89B4552C,
+        0x5F118F49,0xB0D3E477,0x5BE45F74,0xB426344A,0x56FA2F33,0xB938440D,0x520FFF0E,0xBDCD9430,
+        0x4CC6CFBD,0xA304A483,0x48331F80,0xA7F174BE,0x452D6FC7,0xAAEF04F9,0x41D8BFFA,0xAE1AD4C4,
+        0x37E20D71,0xD820664F,0x3317DD4C,0xDCD5B672,0x3E09AD0B,0xD1CBC635,0x3AFC7D36,0xD53E1608,
+        0x24354D85,0xCBF726BB,0x20C09DB8,0xCF02F686,0x2DDEEDFF,0xC21C86C1,0x292B3DC2,0xC6E956FC,
+        0x104C8C99,0xFF8EE7A7,0x14B95CA4,0xFB7B379A,0x19A72CE3,0xF66547DD,0x1D52FCDE,0xF29097E0,
+        0x039BCC6D,0xEC59A753,0x076E1C50,0xE8AC776E,0x0A706C17,0xE5B20729,0x0E85BC2A,0xE147D714,
+    },
+
+    {
+        0x00000000,0xC18EDFC0,0x586CB9C1,0x99E26601,0xB0D97382,0x7157AC42,0xE8B5CA43,0x293B1583,
+        0xBAC3E145,0x7B4D3E85,0xE2AF5884,0x23218744,0x0A1A92C7,0xCB944D07,0x52762B06,0x93F8F4C6,
+        0xAEF6C4CB,0x6F781B0B,0xF69A7D0A,0x3714A2CA,0x1E2FB749,0xDFA16889,0x46430E88,0x87CDD148,
+        0x1435258E,0xD5BBFA4E,0x4C599C4F,0x8DD7438F,0xA4EC560C,0x656289CC,0xFC80EFCD,0x3D0E300D,
+        0x869C8FD7,0x47125017,0xDEF03616,0x1F7EE9D6,0x3645FC55,0xF7CB2395,0x6E294594,0xAFA79A54,
+        0x3C5F6E92,0xFDD1B152,0x6433D753,0xA5BD0893,0x8C861D10,0x4D08C2D0,0xD4EAA4D1,0x15647B11,
+        0x286A4B1C,0xE9E494DC,0x7006F2DD,0xB1882D1D,0x98B3389E,0x593DE75E,0xC0DF815F,0x01515E9F,
+        0x92A9AA59,0x53277599,0xCAC51398,0x0B4BCC58,0x2270D9DB,0xE3FE061B,0x7A1C601A,0xBB92BFDA,
+        0xD64819EF,0x17C6C62F,0x8E24A02E,0x4FAA7FEE,0x66916A6D,0xA71FB5AD,0x3EFDD3AC,0xFF730C6C,
+        0x6C8BF8AA,0xAD05276A,0x34E7416B,0xF5699EAB,0xDC528B28,0x1DDC54E8,0x843E32E9,0x45B0ED29,
+        0x78BEDD24,0xB93002E4,0x20D264E5,0xE15CBB25,0xC867AEA6,0x09E97166,0x900B1767,0x5185C8A7,
+        0xC27D3C61,0x03F3E3A1,0x9A1185A0,0x5B9F5A60,0x72A44FE3,0xB32A9023,0x2AC8F622,0xEB4629E2,
+        0x50D49638,0x915A49F8,0x08B82FF9,0xC936F039,0xE00DE5BA,0x21833A7A,0xB8615C7B,0x79EF83BB,
+        0xEA17777D,0x2B99A8BD,0xB27BCEBC,0x73F5117C,0x5ACE04FF,0x9B40DB3F,0x02A2BD3E,0xC32C62FE,
+        0xFE2252F3,0x3FAC8D33,0xA64EEB32,0x67C034F2,0x4EFB2171,0x8F75FEB1,0x169798B0,0xD7194770,
+        0x44E1B3B6,0x856F6C76,0x1C8D0A77,0xDD03D5B7,0xF438C034,0x35B61FF4,0xAC5479F5,0x6DDAA635,
+        0x77E1359F,0xB66FEA5F,0x2F8D8C5E,0xEE03539E,0xC738461D,0x06B699DD,0x9F54FFDC,0x5EDA201C,
+        0xCD22D4DA,0x0CAC0B1A,0x954E6D1B,0x54C0B2DB,0x7DFBA758,0xBC757898,0x25971E99,0xE419C159,
+        0xD917F154,0x18992E94,0x817B4895,0x40F59755,0x69CE82D6,0xA8405D16,0x31A23B17,0xF02CE4D7,
+        0x63D41011,0xA25ACFD1,0x3BB8A9D0,0xFA367610,0xD30D6393,0x1283BC53,0x8B61DA52,0x4AEF0592,
+        0xF17DBA48,0x30F36588,0xA9110389,0x689FDC49,0x41A4C9CA,0x802A160A,0x19C8700B,0xD846AFCB,
+        0x4BBE5B0D,0x8A3084CD,0x13D2E2CC,0xD25C3D0C,0xFB67288F,0x3AE9F74F,0xA30B914E,0x62854E8E,
+        0x5F8B7E83,0x9E05A143,0x07E7C742,0xC6691882,0xEF520D01,0x2EDCD2C1,0xB73EB4C0,0x76B06B00,
+        0xE5489FC6,0x24C64006,0xBD242607,0x7CAAF9C7,0x5591EC44,0x941F3384,0x0DFD5585,0xCC738A45,
+        0xA1A92C70,0x6027F3B0,0xF9C595B1,0x384B4A71,0x11705FF2,0xD0FE8032,0x491CE633,0x889239F3,
+        0x1B6ACD35,0xDAE412F5,0x430674F4,0x8288AB34,0xABB3BEB7,0x6A3D6177,0xF3DF0776,0x3251D8B6,
+        0x0F5FE8BB,0xCED1377B,0x5733517A,0x96BD8EBA,0xBF869B39,0x7E0844F9,0xE7EA22F8,0x2664FD38,
+        0xB59C09FE,0x7412D63E,0xEDF0B03F,0x2C7E6FFF,0x05457A7C,0xC4CBA5BC,0x5D29C3BD,0x9CA71C7D,
+        0x2735A3A7,0xE6BB7C67,0x7F591A66,0xBED7C5A6,0x97ECD025,0x56620FE5,0xCF8069E4,0x0E0EB624,
+        0x9DF642E2,0x5C789D22,0xC59AFB23,0x041424E3,0x2D2F3160,0xECA1EEA0,0x754388A1,0xB4CD5761,
+        0x89C3676C,0x484DB8AC,0xD1AFDEAD,0x1021016D,0x391A14EE,0xF894CB2E,0x6176AD2F,0xA0F872EF,
+        0x33008629,0xF28E59E9,0x6B6C3FE8,0xAAE2E028,0x83D9F5AB,0x42572A6B,0xDBB54C6A,0x1A3B93AA,
+    },
+
+    {
+        0x00000000,0x9BA54C6F,0xEC3B9E9F,0x779ED2F0,0x03063B7F,0x98A37710,0xEF3DA5E0,0x7498E98F,
+        0x060C76FE,0x9DA93A91,0xEA37E861,0x7192A40E,0x050A4D81,0x9EAF01EE,0xE931D31E,0x72949F71,
+        0x0C18EDFC,0x97BDA193,0xE0237363,0x7B863F0C,0x0F1ED683,0x94BB9AEC,0xE325481C,0x78800473,
+        0x0A149B02,0x91B1D76D,0xE62F059D,0x7D8A49F2,0x0912A07D,0x92B7EC12,0xE5293EE2,0x7E8C728D,
+        0x1831DBF8,0x83949797,0xF40A4567,0x6FAF0908,0x1B37E087,0x8092ACE8,0xF70C7E18,0x6CA93277,
+        0x1E3DAD06,0x8598E169,0xF2063399,0x69A37FF6,0x1D3B9679,0x869EDA16,0xF10008E6,0x6AA54489,
+        0x14293604,0x8F8C7A6B,0xF812A89B,0x63B7E4F4,0x172F0D7B,0x8C8A4114,0xFB1493E4,0x60B1DF8B,
+        0x122540FA,0x89800C95,0xFE1EDE65,0x65BB920A,0x11237B85,0x8A8637EA,0xFD18E51A,0x66BDA975,
+        0x3063B7F0,0xABC6FB9F,0xDC58296F,0x47FD6500,0x33658C8F,0xA8C0C0E0,0xDF5E1210,0x44FB5E7F,
+        0x366FC10E,0xADCA8D61,0xDA545F91,0x41F113FE,0x3569FA71,0xAECCB61E,0xD95264EE,0x42F72881,
+        0x3C7B5A0C,0xA7DE1663,0xD040C493,0x4BE588FC,0x3F7D6173,0xA4D82D1C,0xD346FFEC,0x48E3B383,
+        0x3A772CF2,0xA1D2609D,0xD64CB26D,0x4DE9FE02,0x3971178D,0xA2D45BE2,0xD54A8912,0x4EEFC57D,
+        0x28526C08,0xB3F72067,0xC469F297,0x5FCCBEF8,0x2B545777,0xB0F11B18,0xC76FC9E8,0x5CCA8587,
+        0x2E5E1AF6,0xB5FB5699,0xC2658469,0x59C0C806,0x2D582189,0xB6FD6DE6,0xC163BF16,0x5AC6F379,
+        0x244A81F4,0xBFEFCD9B,0xC8711F6B,0x53D45304,0x274CBA8B,0xBCE9F6E4,0xCB772414,0x50D2687B,
+        0x2246F70A,0xB9E3BB65,0xCE7D6995,0x55D825FA,0x2140CC75,0xBAE5801A,0xCD7B52EA,0x56DE1E85,
+        0x60C76FE0,0xFB62238F,0x8CFCF17F,0x1759BD10,0x63C1549F,0xF86418F0,0x8FFACA00,0x145F866F,
+        0x66CB191E,0xFD6E5571,0x8AF08781,0x1155CBEE,0x65CD2261,0xFE686E0E,0x89F6BCFE,0x1253F091,
+        0x6CDF821C,0xF77ACE73,0x80E41C83,0x1B4150EC,0x6FD9B963,0xF47CF50C,0x83E227FC,0x18476B93,
+        0x6AD3F4E2,0xF176B88D,0x86E86A7D,0x1D4D2612,0x69D5CF9D,0xF27083F2,0x85EE5102,0x1E4B1D6D,
+        0x78F6B418,0xE353F877,0x94CD2A87,0x0F6866E8,0x7BF08F67,0xE055C308,0x97CB11F8,0x0C6E5D97,
+        0x7EFAC2E6,0xE55F8E89,0x92C15C79,0x09641016,0x7DFCF999,0xE659B5F6,0x91C76706,0x0A622B69,
+        0x74EE59E4,0xEF4B158B,0x98D5C77B,0x03708B14,0x77E8629B,0xEC4D2EF4,0x9BD3FC04,0x0076B06B,
+        0x72E22F1A,0xE9476375,0x9ED9B185,0x057CFDEA,0x71E41465,0xEA41580A,0x9DDF8AFA,0x067AC695,
+        0x50A4D810,0xCB01947F,0xBC9F468F,0x273A0AE0,0x53A2E36F,0xC807AF00,0xBF997DF0,0x243C319F,
+        0x56A8AEEE,0xCD0DE281,0xBA933071,0x21367C1E,0x55AE9591,0xCE0BD9FE,0xB9950B0E,0x22304761,
+        0x5CBC35EC,0xC7197983,0xB087AB73,0x2B22E71C,0x5FBA0E93,0xC41F42FC,0xB381900C,0x2824DC63,
+        0x5AB04312,0xC1150F7D,0xB68BDD8D,0x2D2E91E2,0x59B6786D,0xC2133402,0xB58DE6F2,0x2E28AA9D,
+        0x489503E8,0xD3304F87,0xA4AE9D77,0x3F0BD118,0x4B933897,0xD03674F8,0xA7A8A608,0x3C0DEA67,
+        0x4E997516,0xD53C3979,0xA2A2EB89,0x3907A7E6,0x4D9F4E69,0xD63A0206,0xA1A4D0F6,0x3A019C99,
+        0x448DEE14,0xDF28A27B,0xA8B6708B,0x33133CE4,0x478BD56B,0xDC2E9904,0xABB04BF4,0x3015079B,
+        0x428198EA,0xD924D485,0xAEBA0675,0x351F4A1A,0x4187A395,0xDA22EFFA,0xADBC3D0A,0x36197165,
+    },
+
+    {
+        0x00000000,0xDD96D985,0x605CB54B,0xBDCA6CCE,0xC0B96A96,0x1D2FB313,0xA0E5DFDD,0x7D730658,
+        0x5A03D36D,0x87950AE8,0x3A5F6626,0xE7C9BFA3,0x9ABAB9FB,0x472C607E,0xFAE60CB0,0x2770D535,
+        0xB407A6DA,0x69917F5F,0xD45B1391,0x09CDCA14,0x74BECC4C,0xA92815C9,0x14E27907,0xC974A082,
+        0xEE0475B7,0x3392AC32,0x8E58C0FC,0x53CE1979,0x2EBD1F21,0xF32BC6A4,0x4EE1AA6A,0x937773EF,
+        0xB37E4BF5,0x6EE89270,0xD322FEBE,0x0EB4273B,0x73C72163,0xAE51F8E6,0x139B9428,0xCE0D4DAD,
+        0xE97D9898,0x34EB411D,0x89212DD3,0x54B7F456,0x29C4F20E,0xF4522B8B,0x49984745,0x940E9EC0,
+        0x0779ED2F,0xDAEF34AA,0x67255864,0xBAB381E1,0xC7C087B9,0x1A565E3C,0xA79C32F2,0x7A0AEB77,
+        0x5D7A3E42,0x80ECE7C7,0x3D268B09,0xE0B0528C,0x9DC354D4,0x40558D51,0xFD9FE19F,0x2009381A,
+        0xBD8D91AB,0x601B482E,0xDDD124E0,0x0047FD65,0x7D34FB3D,0xA0A222B8,0x1D684E76,0xC0FE97F3,
+        0xE78E42C6,0x3A189B43,0x87D2F78D,0x5A442E08,0x27372850,0xFAA1F1D5,0x476B9D1B,0x9AFD449E,
+        0x098A3771,0xD41CEEF4,0x69D6823A,0xB4405BBF,0xC9335DE7,0x14A58462,0xA96FE8AC,0x74F93129,
+        0x5389E41C,0x8E1F3D99,0x33D55157,0xEE4388D2,0x93308E8A,0x4EA6570F,0xF36C3BC1,0x2EFAE244,
+        0x0EF3DA5E,0xD36503DB,0x6EAF6F15,0xB339B690,0xCE4AB0C8,0x13DC694D,0xAE160583,0x7380DC06,
+        0x54F00933,0x8966D0B6,0x34ACBC78,0xE93A65FD,0x944963A5,0x49DFBA20,0xF415D6EE,0x29830F6B,
+        0xBAF47C84,0x6762A501,0xDAA8C9CF,0x073E104A,0x7A4D1612,0xA7DBCF97,0x1A11A359,0xC7877ADC,
+        0xE0F7AFE9,0x3D61766C,0x80AB1AA2,0x5D3DC327,0x204EC57F,0xFDD81CFA,0x40127034,0x9D84A9B1,
+        0xA06A2517,0x7DFCFC92,0xC036905C,0x1DA049D9,0x60D34F81,0xBD459604,0x008FFACA,0xDD19234F,
+        0xFA69F67A,0x27FF2FFF,0x9A354331,0x47A39AB4,0x3AD09CEC,0xE7464569,0x5A8C29A7,0x871AF022,
+        0x146D83CD,0xC9FB5A48,0x74313686,0xA9A7EF03,0xD4D4E95B,0x094230DE,0xB4885C10,0x691E8595,
+        0x4E6E50A0,0x93F88925,0x2E32E5EB,0xF3A43C6E,0x8ED73A36,0x5341E3B3,0xEE8B8F7D,0x331D56F8,
+        0x13146EE2,0xCE82B767,0x7348DBA9,0xAEDE022C,0xD3AD0474,0x0E3BDDF1,0xB3F1B13F,0x6E6768BA,
+        0x4917BD8F,0x9481640A,0x294B08C4,0xF4DDD141,0x89AED719,0x54380E9C,0xE9F26252,0x3464BBD7,
+        0xA713C838,0x7A8511BD,0xC74F7D73,0x1AD9A4F6,0x67AAA2AE,0xBA3C7B2B,0x07F617E5,0xDA60CE60,
+        0xFD101B55,0x2086C2D0,0x9D4CAE1E,0x40DA779B,0x3DA971C3,0xE03FA846,0x5DF5C488,0x80631D0D,
+        0x1DE7B4BC,0xC0716D39,0x7DBB01F7,0xA02DD872,0xDD5EDE2A,0x00C807AF,0xBD026B61,0x6094B2E4,
+        0x47E467D1,0x9A72BE54,0x27B8D29A,0xFA2E0B1F,0x875D0D47,0x5ACBD4C2,0xE701B80C,0x3A976189,
+        0xA9E01266,0x7476CBE3,0xC9BCA72D,0x142A7EA8,0x695978F0,0xB4CFA175,0x0905CDBB,0xD493143E,
+        0xF3E3C10B,0x2E75188E,0x93BF7440,0x4E29ADC5,0x335AAB9D,0xEECC7218,0x53061ED6,0x8E90C753,
+        0xAE99FF49,0x730F26CC,0xCEC54A02,0x13539387,0x6E2095DF,0xB3B64C5A,0x0E7C2094,0xD3EAF911,
+        0xF49A2C24,0x290CF5A1,0x94C6996F,0x495040EA,0x342346B2,0xE9B59F37,0x547FF3F9,0x89E92A7C,
+        0x1A9E5993,0xC7088016,0x7AC2ECD8,0xA754355D,0xDA273305,0x07B1EA80,0xBA7B864E,0x67ED5FCB,
+        0x409D8AFE,0x9D0B537B,0x20C13FB5,0xFD57E630,0x8024E068,0x5DB239ED,0xE0785523,0x3DEE8CA6,
+    },
+
+    {
+        0x00000000,0x9D0FE176,0xE16EC4AD,0x7C6125DB,0x19AC8F1B,0x84A36E6D,0xF8C24BB6,0x65CDAAC0,
+        0x33591E36,0xAE56FF40,0xD237DA9B,0x4F383BED,0x2AF5912D,0xB7FA705B,0xCB9B5580,0x5694B4F6,
+        0x66B23C6C,0xFBBDDD1A,0x87DCF8C1,0x1AD319B7,0x7F1EB377,0xE2115201,0x9E7077DA,0x037F96AC,
+        0x55EB225A,0xC8E4C32C,0xB485E6F7,0x298A0781,0x4C47AD41,0xD1484C37,0xAD2969EC,0x3026889A,
+        0xCD6478D8,0x506B99AE,0x2C0ABC75,0xB1055D03,0xD4C8F7C3,0x49C716B5,0x35A6336E,0xA8A9D218,
+        0xFE3D66EE,0x63328798,0x1F53A243,0x825C4335,0xE791E9F5,0x7A9E0883,0x06FF2D58,0x9BF0CC2E,
+        0xABD644B4,0x36D9A5C2,0x4AB88019,0xD7B7616F,0xB27ACBAF,0x2F752AD9,0x53140F02,0xCE1BEE74,
+        0x988F5A82,0x0580BBF4,0x79E19E2F,0xE4EE7F59,0x8123D599,0x1C2C34EF,0x604D1134,0xFD42F042,
+        0x41B9F7F1,0xDCB61687,0xA0D7335C,0x3DD8D22A,0x581578EA,0xC51A999C,0xB97BBC47,0x24745D31,
+        0x72E0E9C7,0xEFEF08B1,0x938E2D6A,0x0E81CC1C,0x6B4C66DC,0xF64387AA,0x8A22A271,0x172D4307,
+        0x270BCB9D,0xBA042AEB,0xC6650F30,0x5B6AEE46,0x3EA74486,0xA3A8A5F0,0xDFC9802B,0x42C6615D,
+        0x1452D5AB,0x895D34DD,0xF53C1106,0x6833F070,0x0DFE5AB0,0x90F1BBC6,0xEC909E1D,0x719F7F6B,
+        0x8CDD8F29,0x11D26E5F,0x6DB34B84,0xF0BCAAF2,0x95710032,0x087EE144,0x741FC49F,0xE91025E9,
+        0xBF84911F,0x228B7069,0x5EEA55B2,0xC3E5B4C4,0xA6281E04,0x3B27FF72,0x4746DAA9,0xDA493BDF,
+        0xEA6FB345,0x77605233,0x0B0177E8,0x960E969E,0xF3C33C5E,0x6ECCDD28,0x12ADF8F3,0x8FA21985,
+        0xD936AD73,0x44394C05,0x385869DE,0xA55788A8,0xC09A2268,0x5D95C31E,0x21F4E6C5,0xBCFB07B3,
+        0x8373EFE2,0x1E7C0E94,0x621D2B4F,0xFF12CA39,0x9ADF60F9,0x07D0818F,0x7BB1A454,0xE6BE4522,
+        0xB02AF1D4,0x2D2510A2,0x51443579,0xCC4BD40F,0xA9867ECF,0x34899FB9,0x48E8BA62,0xD5E75B14,
+        0xE5C1D38E,0x78CE32F8,0x04AF1723,0x99A0F655,0xFC6D5C95,0x6162BDE3,0x1D039838,0x800C794E,
+        0xD698CDB8,0x4B972CCE,0x37F60915,0xAAF9E863,0xCF3442A3,0x523BA3D5,0x2E5A860E,0xB3556778,
+        0x4E17973A,0xD318764C,0xAF795397,0x3276B2E1,0x57BB1821,0xCAB4F957,0xB6D5DC8C,0x2BDA3DFA,
+        0x7D4E890C,0xE041687A,0x9C204DA1,0x012FACD7,0x64E20617,0xF9EDE761,0x858CC2BA,0x188323CC,
+        0x28A5AB56,0xB5AA4A20,0xC9CB6FFB,0x54C48E8D,0x3109244D,0xAC06C53B,0xD067E0E0,0x4D680196,
+        0x1BFCB560,0x86F35416,0xFA9271CD,0x679D90BB,0x02503A7B,0x9F5FDB0D,0xE33EFED6,0x7E311FA0,
+        0xC2CA1813,0x5FC5F965,0x23A4DCBE,0xBEAB3DC8,0xDB669708,0x4669767E,0x3A0853A5,0xA707B2D3,
+        0xF1930625,0x6C9CE753,0x10FDC288,0x8DF223FE,0xE83F893E,0x75306848,0x09514D93,0x945EACE5,
+        0xA478247F,0x3977C509,0x4516E0D2,0xD81901A4,0xBDD4AB64,0x20DB4A12,0x5CBA6FC9,0xC1B58EBF,
+        0x97213A49,0x0A2EDB3F,0x764FFEE4,0xEB401F92,0x8E8DB552,0x13825424,0x6FE371FF,0xF2EC9089,
+        0x0FAE60CB,0x92A181BD,0xEEC0A466,0x73CF4510,0x1602EFD0,0x8B0D0EA6,0xF76C2B7D,0x6A63CA0B,
+        0x3CF77EFD,0xA1F89F8B,0xDD99BA50,0x40965B26,0x255BF1E6,0xB8541090,0xC435354B,0x593AD43D,
+        0x691C5CA7,0xF413BDD1,0x8872980A,0x157D797C,0x70B0D3BC,0xEDBF32CA,0x91DE1711,0x0CD1F667,
+        0x5A454291,0xC74AA3E7,0xBB2B863C,0x2624674A,0x43E9CD8A,0xDEE62CFC,0xA2870927,0x3F88E851,
+    },
+
+    {
+        0x00000000,0xB9FBDBE8,0xA886B191,0x117D6A79,0x8A7C6563,0x3387BE8B,0x22FAD4F2,0x9B010F1A,
+        0xCF89CC87,0x7672176F,0x670F7D16,0xDEF4A6FE,0x45F5A9E4,0xFC0E720C,0xED731875,0x5488C39D,
+        0x44629F4F,0xFD9944A7,0xECE42EDE,0x551FF536,0xCE1EFA2C,0x77E521C4,0x66984BBD,0xDF639055,
+        0x8BEB53C8,0x32108820,0x236DE259,0x9A9639B1,0x019736AB,0xB86CED43,0xA911873A,0x10EA5CD2,
+        0x88C53E9E,0x313EE576,0x20438F0F,0x99B854E7,0x02B95BFD,0xBB428015,0xAA3FEA6C,0x13C43184,
+        0x474CF219,0xFEB729F1,0xEFCA4388,0x56319860,0xCD30977A,0x74CB4C92,0x65B626EB,0xDC4DFD03,
+        0xCCA7A1D1,0x755C7A39,0x64211040,0xDDDACBA8,0x46DBC4B2,0xFF201F5A,0xEE5D7523,0x57A6AECB,
+        0x032E6D56,0xBAD5B6BE,0xABA8DCC7,0x1253072F,0x89520835,0x30A9D3DD,0x21D4B9A4,0x982F624C,
+        0xCAFB7B7D,0x7300A095,0x627DCAEC,0xDB861104,0x40871E1E,0xF97CC5F6,0xE801AF8F,0x51FA7467,
+        0x0572B7FA,0xBC896C12,0xADF4066B,0x140FDD83,0x8F0ED299,0x36F50971,0x27886308,0x9E73B8E0,
+        0x8E99E432,0x37623FDA,0x261F55A3,0x9FE48E4B,0x04E58151,0xBD1E5AB9,0xAC6330C0,0x1598EB28,
+        0x411028B5,0xF8EBF35D,0xE9969924,0x506D42CC,0xCB6C4DD6,0x7297963E,0x63EAFC47,0xDA1127AF,
+        0x423E45E3,0xFBC59E0B,0xEAB8F472,0x53432F9A,0xC8422080,0x71B9FB68,0x60C49111,0xD93F4AF9,
+        0x8DB78964,0x344C528C,0x253138F5,0x9CCAE31D,0x07CBEC07,0xBE3037EF,0xAF4D5D96,0x16B6867E,
+        0x065CDAAC,0xBFA70144,0xAEDA6B3D,0x1721B0D5,0x8C20BFCF,0x35DB6427,0x24A60E5E,0x9D5DD5B6,
+        0xC9D5162B,0x702ECDC3,0x6153A7BA,0xD8A87C52,0x43A97348,0xFA52A8A0,0xEB2FC2D9,0x52D41931,
+        0x4E87F0BB,0xF77C2B53,0xE601412A,0x5FFA9AC2,0xC4FB95D8,0x7D004E30,0x6C7D2449,0xD586FFA1,
+        0x810E3C3C,0x38F5E7D4,0x29888DAD,0x90735645,0x0B72595F,0xB28982B7,0xA3F4E8CE,0x1A0F3326,
+        0x0AE56FF4,0xB31EB41C,0xA263DE65,0x1B98058D,0x80990A97,0x3962D17F,0x281FBB06,0x91E460EE,
+        0xC56CA373,0x7C97789B,0x6DEA12E2,0xD411C90A,0x4F10C610,0xF6EB1DF8,0xE7967781,0x5E6DAC69,
+        0xC642CE25,0x7FB915CD,0x6EC47FB4,0xD73FA45C,0x4C3EAB46,0xF5C570AE,0xE4B81AD7,0x5D43C13F,
+        0x09CB02A2,0xB030D94A,0xA14DB333,0x18B668DB,0x83B767C1,0x3A4CBC29,0x2B31D650,0x92CA0DB8,
+        0x8220516A,0x3BDB8A82,0x2AA6E0FB,0x935D3B13,0x085C3409,0xB1A7EFE1,0xA0DA8598,0x19215E70,
+        0x4DA99DED,0xF4524605,0xE52F2C7C,0x5CD4F794,0xC7D5F88E,0x7E2E2366,0x6F53491F,0xD6A892F7,
+        0x847C8BC6,0x3D87502E,0x2CFA3A57,0x9501E1BF,0x0E00EEA5,0xB7FB354D,0xA6865F34,0x1F7D84DC,
+        0x4BF54741,0xF20E9CA9,0xE373F6D0,0x5A882D38,0xC1892222,0x7872F9CA,0x690F93B3,0xD0F4485B,
+        0xC01E1489,0x79E5CF61,0x6898A518,0xD1637EF0,0x4A6271EA,0xF399AA02,0xE2E4C07B,0x5B1F1B93,
+        0x0F97D80E,0xB66C03E6,0xA711699F,0x1EEAB277,0x85EBBD6D,0x3C106685,0x2D6D0CFC,0x9496D714,
+        0x0CB9B558,0xB5426EB0,0xA43F04C9,0x1DC4DF21,0x86C5D03B,0x3F3E0BD3,0x2E4361AA,0x97B8BA42,
+        0xC33079DF,0x7ACBA237,0x6BB6C84E,0xD24D13A6,0x494C1CBC,0xF0B7C754,0xE1CAAD2D,0x583176C5,
+        0x48DB2A17,0xF120F1FF,0xE05D9B86,0x59A6406E,0xC2A74F74,0x7B5C949C,0x6A21FEE5,0xD3DA250D,
+        0x8752E690,0x3EA93D78,0x2FD45701,0x962F8CE9,0x0D2E83F3,0xB4D5581B,0xA5A83262,0x1C53E98A,
+    },
+
+    {
+        0x00000000,0xAE689191,0x87A02563,0x29C8B4F2,0xD4314C87,0x7A59DD16,0x539169E4,0xFDF9F875,
+        0x73139F4F,0xDD7B0EDE,0xF4B3BA2C,0x5ADB2BBD,0xA722D3C8,0x094A4259,0x2082F6AB,0x8EEA673A,
+        0xE6273E9E,0x484FAF0F,0x61871BFD,0xCFEF8A6C,0x32167219,0x9C7EE388,0xB5B6577A,0x1BDEC6EB,
+        0x9534A1D1,0x3B5C3040,0x129484B2,0xBCFC1523,0x4105ED56,0xEF6D7CC7,0xC6A5C835,0x68CD59A4,
+        0x173F7B7D,0xB957EAEC,0x909F5E1E,0x3EF7CF8F,0xC30E37FA,0x6D66A66B,0x44AE1299,0xEAC68308,
+        0x642CE432,0xCA4475A3,0xE38CC151,0x4DE450C0,0xB01DA8B5,0x1E753924,0x37BD8DD6,0x99D51C47,
+        0xF11845E3,0x5F70D472,0x76B86080,0xD8D0F111,0x25290964,0x8B4198F5,0xA2892C07,0x0CE1BD96,
+        0x820BDAAC,0x2C634B3D,0x05ABFFCF,0xABC36E5E,0x563A962B,0xF85207BA,0xD19AB348,0x7FF222D9,
+        0x2E7EF6FA,0x8016676B,0xA9DED399,0x07B64208,0xFA4FBA7D,0x54272BEC,0x7DEF9F1E,0xD3870E8F,
+        0x5D6D69B5,0xF305F824,0xDACD4CD6,0x74A5DD47,0x895C2532,0x2734B4A3,0x0EFC0051,0xA09491C0,
+        0xC859C864,0x663159F5,0x4FF9ED07,0xE1917C96,0x1C6884E3,0xB2001572,0x9BC8A180,0x35A03011,
+        0xBB4A572B,0x1522C6BA,0x3CEA7248,0x9282E3D9,0x6F7B1BAC,0xC1138A3D,0xE8DB3ECF,0x46B3AF5E,
+        0x39418D87,0x97291C16,0xBEE1A8E4,0x10893975,0xED70C100,0x43185091,0x6AD0E463,0xC4B875F2,
+        0x4A5212C8,0xE43A8359,0xCDF237AB,0x639AA63A,0x9E635E4F,0x300BCFDE,0x19C37B2C,0xB7ABEABD,
+        0xDF66B319,0x710E2288,0x58C6967A,0xF6AE07EB,0x0B57FF9E,0xA53F6E0F,0x8CF7DAFD,0x229F4B6C,
+        0xAC752C56,0x021DBDC7,0x2BD50935,0x85BD98A4,0x784460D1,0xD62CF140,0xFFE445B2,0x518CD423,
+        0x5CFDEDF4,0xF2957C65,0xDB5DC897,0x75355906,0x88CCA173,0x26A430E2,0x0F6C8410,0xA1041581,
+        0x2FEE72BB,0x8186E32A,0xA84E57D8,0x0626C649,0xFBDF3E3C,0x55B7AFAD,0x7C7F1B5F,0xD2178ACE,
+        0xBADAD36A,0x14B242FB,0x3D7AF609,0x93126798,0x6EEB9FED,0xC0830E7C,0xE94BBA8E,0x47232B1F,
+        0xC9C94C25,0x67A1DDB4,0x4E696946,0xE001F8D7,0x1DF800A2,0xB3909133,0x9A5825C1,0x3430B450,
+        0x4BC29689,0xE5AA0718,0xCC62B3EA,0x620A227B,0x9FF3DA0E,0x319B4B9F,0x1853FF6D,0xB63B6EFC,
+        0x38D109C6,0x96B99857,0xBF712CA5,0x1119BD34,0xECE04541,0x4288D4D0,0x6B406022,0xC528F1B3,
+        0xADE5A817,0x038D3986,0x2A458D74,0x842D1CE5,0x79D4E490,0xD7BC7501,0xFE74C1F3,0x501C5062,
+        0xDEF63758,0x709EA6C9,0x5956123B,0xF73E83AA,0x0AC77BDF,0xA4AFEA4E,0x8D675EBC,0x230FCF2D,
+        0x72831B0E,0xDCEB8A9F,0xF5233E6D,0x5B4BAFFC,0xA6B25789,0x08DAC618,0x211272EA,0x8F7AE37B,
+        0x01908441,0xAFF815D0,0x8630A122,0x285830B3,0xD5A1C8C6,0x7BC95957,0x5201EDA5,0xFC697C34,
+        0x94A42590,0x3ACCB401,0x130400F3,0xBD6C9162,0x40956917,0xEEFDF886,0xC7354C74,0x695DDDE5,
+        0xE7B7BADF,0x49DF2B4E,0x60179FBC,0xCE7F0E2D,0x3386F658,0x9DEE67C9,0xB426D33B,0x1A4E42AA,
+        0x65BC6073,0xCBD4F1E2,0xE21C4510,0x4C74D481,0xB18D2CF4,0x1FE5BD65,0x362D0997,0x98459806,
+        0x16AFFF3C,0xB8C76EAD,0x910FDA5F,0x3F674BCE,0xC29EB3BB,0x6CF6222A,0x453E96D8,0xEB560749,
+        0x839B5EED,0x2DF3CF7C,0x043B7B8E,0xAA53EA1F,0x57AA126A,0xF9C283FB,0xD00A3709,0x7E62A698,
+        0xF088C1A2,0x5EE05033,0x7728E4C1,0xD9407550,0x24B98D25,0x8AD11CB4,0xA319A846,0x0D7139D7,
+    }
 };
 
-/* ========================================================================= */
-#define DO1(buf) crc = crc_table[(crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
-#define DO2(buf)  DO1(buf); DO1(buf);
-#define DO4(buf)  DO2(buf); DO2(buf);
-#define DO8(buf)  DO4(buf); DO4(buf);
+/* compute CRC32 (Slicing-by-16 algorithm) */
+crc32_t uu_crc32(crc32_t prev, const void *data, unsigned int len)
+{
+    uint32_t crc = ~prev;
+    const uint32_t* current = (const uint32_t*) data;
+
+    /* enabling optimization (at least -O2) automatically unrolls the inner for-loop */
+    const size_t unroll = 1;
+    const size_t bytes_at_once = 16 * unroll;
+
+    while (len >= bytes_at_once) {
+        size_t unrolling;
+        for (unrolling = 0; unrolling < unroll; unrolling++) {
+          if (ecb_little_endian ())
+            {
+              uint32_t one   = *current++ ^ crc;
+              uint32_t two   = *current++;
+              uint32_t three = *current++;
+              uint32_t four  = *current++;
+              crc = crc32_lookup[ 0][(four  >> 24) & 0xFF] ^
+                    crc32_lookup[ 1][(four  >> 16) & 0xFF] ^
+                    crc32_lookup[ 2][(four  >>  8) & 0xFF] ^
+                    crc32_lookup[ 3][ four         & 0xFF] ^
+                    crc32_lookup[ 4][(three >> 24) & 0xFF] ^
+                    crc32_lookup[ 5][(three >> 16) & 0xFF] ^
+                    crc32_lookup[ 6][(three >>  8) & 0xFF] ^
+                    crc32_lookup[ 7][ three        & 0xFF] ^
+                    crc32_lookup[ 8][(two   >> 24) & 0xFF] ^
+                    crc32_lookup[ 9][(two   >> 16) & 0xFF] ^
+                    crc32_lookup[10][(two   >>  8) & 0xFF] ^
+                    crc32_lookup[11][ two          & 0xFF] ^
+                    crc32_lookup[12][(one   >> 24) & 0xFF] ^
+                    crc32_lookup[13][(one   >> 16) & 0xFF] ^
+                    crc32_lookup[14][(one   >>  8) & 0xFF] ^
+                    crc32_lookup[15][ one          & 0xFF];
+            }
+          else
+            {
+              uint32_t one   = *current++ ^ ecb_bswap32(crc);
+              uint32_t two   = *current++;
+              uint32_t three = *current++;
+              uint32_t four  = *current++;
+              crc = crc32_lookup[ 0][ four         & 0xFF] ^
+                    crc32_lookup[ 1][(four  >>  8) & 0xFF] ^
+                    crc32_lookup[ 2][(four  >> 16) & 0xFF] ^
+                    crc32_lookup[ 3][(four  >> 24) & 0xFF] ^
+                    crc32_lookup[ 4][ three        & 0xFF] ^
+                    crc32_lookup[ 5][(three >>  8) & 0xFF] ^
+                    crc32_lookup[ 6][(three >> 16) & 0xFF] ^
+                    crc32_lookup[ 7][(three >> 24) & 0xFF] ^
+                    crc32_lookup[ 8][ two          & 0xFF] ^
+                    crc32_lookup[ 9][(two   >>  8) & 0xFF] ^
+                    crc32_lookup[10][(two   >> 16) & 0xFF] ^
+                    crc32_lookup[11][(two   >> 24) & 0xFF] ^
+                    crc32_lookup[12][ one          & 0xFF] ^
+                    crc32_lookup[13][(one   >>  8) & 0xFF] ^
+                    crc32_lookup[14][(one   >> 16) & 0xFF] ^
+                    crc32_lookup[15][(one   >> 24) & 0xFF];
+            }
+        }
+
+        len -= bytes_at_once;
+    }
+
+    const uint8_t* current_char = (const uint8_t*) current;
+    /* remaining 1 to 15 bytes (standard algorithm) */
+    while (len-- != 0)
+        crc = (crc >> 8) ^ crc32_lookup[0][(crc & 0xFF) ^ *current_char++];
+
+    return ~crc;
+}
 
-/* ========================================================================= */
-crc32_t crc32(crc32_t crc, const unsigned char *buf, unsigned int len)
+/* merge two CRC32 such that result = crc32(dataB, lengthB, crc32(dataA, lengthA)) */
+uint32_t uu_crc32_combine(uint32_t crcA, uint32_t crcB, size_t lengthB)
 {
-    if (buf == Z_NULL) return 0L;
-    crc = crc ^ 0xffffffffL;
-    while (len >= 8)
+  int i;
+  /*
+   * based on Mark Adler's crc_combine from
+   * https://github.com/madler/pigz/blob/master/pigz.c
+
+   * main idea:
+   * - if you have two equally-sized blocks A and B,
+   *   then you can create a block C = A ^ B
+   *   which has the property crc(C) = crc(A) ^ crc(B)
+   * - if you append length(B) zeros to A and call it A' (think of it as AAAA000)
+   *   and   prepend length(A) zeros to B and call it B' (think of it as 0000BBB)
+   *   then exists a C' = A' ^ B'
+   * - remember: if you XOR someting with zero, it remains unchanged: X ^ 0 = X
+   * - that means C' = A concat B so that crc(A concat B) = crc(C') = crc(A') ^ crc(B')
+   * - the trick is to compute crc(A') based on crc(A)
+   *                       and crc(B') based on crc(B)
+   * - since B' starts with many zeros, the crc of those initial zeros is still zero
+   * - that means crc(B') = crc(B)
+   * - unfortunately the trailing zeros of A' change the crc, so usually crc(A') != crc(A)
+   * - the following code is a fast algorithm to compute crc(A')
+   * - starting with crc(A) and appending length(B) zeros, needing just log2(length(B)) iterations
+   * - the details are explained by the original author at
+   *   https://stackoverflow.com/questions/23122312/crc-calculation-of-a-mostly-static-data-stream/23126768
+   *
+   * notes:
+   * - I squeezed everything into one function to keep global namespace clean (original code two helper functions)
+   * - most original comments are still in place, I added comments where these helper functions where made inline code
+   * - performance-wise there isn't any differenze to the original zlib/pigz code
+   */
+
+  /* degenerated case */
+  if (lengthB == 0)
+    return crcA;
+
+  /* CRC32 => 32 bits */
+  const uint32_t CrcBits = 32;
+
+  uint32_t odd [CrcBits]; /* odd-power-of-two  zeros operator */
+  uint32_t even[CrcBits]; /* even-power-of-two zeros operator */
+
+  /* put operator for one zero bit in odd */
+  odd[0] = Polynomial;
+  for (i = 1; i < CrcBits; i++)
+    odd[i] = 1 << (i - 1);
+
+  /* put operator for two zero bits in even */
+  /* same as gf2_matrix_square(even, odd); */
+  for (i = 0; i < CrcBits; i++)
+  {
+    int j;
+    uint32_t vec = odd[i];
+    even[i] = 0;
+    for (j = 0; vec != 0; j++, vec >>= 1)
+      if (vec & 1)
+        even[i] ^= odd[j];
+  }
+  /* put operator for four zero bits in odd */
+  /* same as gf2_matrix_square(odd, even); */
+  for (i = 0; i < CrcBits; i++)
+  {
+    int j;
+    uint32_t vec = even[i];
+    odd[i] = 0;
+    for (j = 0; vec != 0; j++, vec >>= 1)
+      if (vec & 1)
+        odd[i] ^= even[j];
+  }
+
+  /* the following loop becomes much shorter if I keep swapping even and odd */
+  uint32_t* a = even;
+  uint32_t* b = odd;
+  /* apply secondLength zeros to firstCrc32 */
+  for (; lengthB > 0; lengthB >>= 1)
+  {
+    /* same as gf2_matrix_square(a, b); */
+    for (i = 0; i < CrcBits; i++)
+    {
+      int j;
+      uint32_t vec = b[i];
+      a[i] = 0;
+      for (j = 0; vec != 0; j++, vec >>= 1)
+        if (vec & 1)
+          a[i] ^= b[j];
+    }
+
+    /* apply zeros operator for this bit */
+    if (lengthB & 1)
     {
-      DO8(buf);
-      len -= 8;
+      /* same as firstCrc32 = gf2_matrix_times(a, firstCrc32); */
+      uint32_t sum = 0;
+      for (i = 0; crcA != 0; i++, crcA >>= 1)
+        if (crcA & 1)
+          sum ^= a[i];
+      crcA = sum;
     }
-    if (len) do {
-      DO1(buf);
-    } while (--len);
-    return crc ^ 0xffffffffL;
+
+    /* switch even and odd */
+    uint32_t* t = a; a = b; b = t;
+  }
+
+  /* return combined crc */
+  return crcA ^ crcB;
 }
+
diff --git a/uulib/crc32.h b/uulib/crc32.h
index a14ec0c..d07e1f1 100644
--- a/uulib/crc32.h
+++ b/uulib/crc32.h
@@ -9,16 +9,17 @@
 #endif
 #endif
 
+#include "ecb.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef unsigned int crc32_t;
-#define Z_NULL  0
+typedef uint32_t crc32_t;
 
-#define crc32 uulib_crc32
+#define CRC32_INIT ((crc32_t)0)
 
-crc32_t crc32 _ANSI_ARGS_((crc32_t crc, const unsigned char *buf, unsigned int len));
+crc32_t uu_crc32 _ANSI_ARGS_((crc32_t prev, const void *data, unsigned int len));
 /*
      Update a running crc with the bytes buf[0..len-1] and return the updated
    crc. If buf is NULL, this function returns the required initial value
@@ -26,7 +27,7 @@ crc32_t crc32 _ANSI_ARGS_((crc32_t crc, const unsigned char *buf, unsigned int l
    within this function so it shouldn't be done by the application.
    Usage example:
 
-     uLong crc = crc32(0L, Z_NULL, 0);
+     uLong crc = CRC32_INIT;
 
      while (read_buffer(buffer, length) != EOF) {
        crc = crc32(crc, buffer, length);
@@ -34,6 +35,8 @@ crc32_t crc32 _ANSI_ARGS_((crc32_t crc, const unsigned char *buf, unsigned int l
      if (crc != original_crc) error();
 */
 
+uint32_t uu_crc32_combine(uint32_t crcA, uint32_t crcB, size_t lengthB);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/uulib/ecb.h b/uulib/ecb.h
new file mode 100644
index 0000000..bada063
--- /dev/null
+++ b/uulib/ecb.h
@@ -0,0 +1,1145 @@
+/*
+ * libecb - http://software.schmorp.de/pkg/libecb
+ *
+ * Copyright (©) 2009-2015,2018-2020 Marc Alexander Lehmann <libecb@schmorp.de>
+ * Copyright (©) 2011 Emanuele Giaquinta
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, 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 THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
+ * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
+ * CIAL, 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 OTH-
+ * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * the GNU General Public License ("GPL") version 2 or any later version,
+ * in which case the provisions of the GPL are applicable instead of
+ * the above. If you wish to allow the use of your version of this file
+ * only under the terms of the GPL and not to allow others to use your
+ * version of this file under the BSD license, indicate your decision
+ * by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL. If you do not delete the
+ * provisions above, a recipient may use your version of this file under
+ * either the BSD or the GPL.
+ */
+
+#ifndef ECB_H
+#define ECB_H
+
+/* 16 bits major, 16 bits minor */
+#define ECB_VERSION 0x00010008
+
+#include <string.h> /* for memcpy */
+
+#if defined (_WIN32) && !defined (__MINGW32__)
+  typedef   signed char   int8_t;
+  typedef unsigned char  uint8_t;
+  typedef   signed char   int_fast8_t;
+  typedef unsigned char  uint_fast8_t;
+  typedef   signed short  int16_t;
+  typedef unsigned short uint16_t;
+  typedef   signed int    int_fast16_t;
+  typedef unsigned int   uint_fast16_t;
+  typedef   signed int    int32_t;
+  typedef unsigned int   uint32_t;
+  typedef   signed int    int_fast32_t;
+  typedef unsigned int   uint_fast32_t;
+  #if __GNUC__
+    typedef   signed long long int64_t;
+    typedef unsigned long long uint64_t;
+  #else /* _MSC_VER || __BORLANDC__ */
+    typedef   signed __int64   int64_t;
+    typedef unsigned __int64   uint64_t;
+  #endif
+  typedef  int64_t  int_fast64_t;
+  typedef uint64_t uint_fast64_t;
+  #ifdef _WIN64
+    #define ECB_PTRSIZE 8
+    typedef uint64_t uintptr_t;
+    typedef  int64_t  intptr_t;
+  #else
+    #define ECB_PTRSIZE 4
+    typedef uint32_t uintptr_t;
+    typedef  int32_t  intptr_t;
+  #endif
+#else
+  #include <inttypes.h>
+  #if (defined INTPTR_MAX ? INTPTR_MAX : ULONG_MAX) > 0xffffffffU
+    #define ECB_PTRSIZE 8
+  #else
+    #define ECB_PTRSIZE 4
+  #endif
+#endif
+
+#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
+#define ECB_MSVC_AMD64 (_M_AMD64 || _M_X64)
+
+#ifndef ECB_OPTIMIZE_SIZE
+  #if __OPTIMIZE_SIZE__
+    #define ECB_OPTIMIZE_SIZE 1
+  #else
+    #define ECB_OPTIMIZE_SIZE 0
+  #endif
+#endif
+
+/* work around x32 idiocy by defining proper macros */
+#if ECB_GCC_AMD64 || ECB_MSVC_AMD64
+  #if _ILP32
+    #define ECB_AMD64_X32 1
+  #else
+    #define ECB_AMD64 1
+  #endif
+#endif
+
+/* many compilers define _GNUC_ to some versions but then only implement
+ * what their idiot authors think are the "more important" extensions,
+ * causing enormous grief in return for some better fake benchmark numbers.
+ * or so.
+ * we try to detect these and simply assume they are not gcc - if they have
+ * an issue with that they should have done it right in the first place.
+ */
+#if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__
+  #define ECB_GCC_VERSION(major,minor) 0
+#else
+  #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
+#endif
+
+#define ECB_CLANG_VERSION(major,minor) (__clang_major__ > (major) || (__clang_major__ == (major) && __clang_minor__ >= (minor)))
+
+#if __clang__ && defined __has_builtin
+  #define ECB_CLANG_BUILTIN(x) __has_builtin (x)
+#else
+  #define ECB_CLANG_BUILTIN(x) 0
+#endif
+
+#if __clang__ && defined __has_extension
+  #define ECB_CLANG_EXTENSION(x) __has_extension (x)
+#else
+  #define ECB_CLANG_EXTENSION(x) 0
+#endif
+
+#define ECB_CPP   (__cplusplus+0)
+#define ECB_CPP11 (__cplusplus >= 201103L)
+#define ECB_CPP14 (__cplusplus >= 201402L)
+#define ECB_CPP17 (__cplusplus >= 201703L)
+
+#if ECB_CPP
+  #define ECB_C            0
+  #define ECB_STDC_VERSION 0
+#else
+  #define ECB_C            1
+  #define ECB_STDC_VERSION __STDC_VERSION__
+#endif
+
+#define ECB_C99   (ECB_STDC_VERSION >= 199901L)
+#define ECB_C11   (ECB_STDC_VERSION >= 201112L)
+#define ECB_C17   (ECB_STDC_VERSION >= 201710L)
+
+#if ECB_CPP
+  #define ECB_EXTERN_C extern "C"
+  #define ECB_EXTERN_C_BEG ECB_EXTERN_C {
+  #define ECB_EXTERN_C_END }
+#else
+  #define ECB_EXTERN_C extern
+  #define ECB_EXTERN_C_BEG
+  #define ECB_EXTERN_C_END
+#endif
+
+/*****************************************************************************/
+
+/* ECB_NO_THREADS - ecb is not used by multiple threads, ever */
+/* ECB_NO_SMP     - ecb might be used in multiple threads, but only on a single cpu */
+
+#if ECB_NO_THREADS
+  #define ECB_NO_SMP 1
+#endif
+
+#if ECB_NO_SMP
+  #define ECB_MEMORY_FENCE do { } while (0)
+#endif
+
+/* http://www-01.ibm.com/support/knowledgecenter/SSGH3R_13.1.0/com.ibm.xlcpp131.aix.doc/compiler_ref/compiler_builtins.html */
+#if __xlC__ && ECB_CPP
+  #include <builtins.h>
+#endif
+
+#if 1400 <= _MSC_VER
+  #include <intrin.h> /* fence functions _ReadBarrier, also bit search functions _BitScanReverse */
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
+    #define ECB_MEMORY_FENCE_RELAXED __asm__ __volatile__ ("" : : : "memory")
+    #if __i386 || __i386__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ (""                        : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ (""                        : : : "memory")
+    #elif ECB_GCC_AMD64
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mfence"   : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ (""         : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ (""         : : : "memory")
+    #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("sync"     : : : "memory")
+    #elif defined __ARM_ARCH_2__ \
+      || defined __ARM_ARCH_3__  || defined __ARM_ARCH_3M__  \
+      || defined __ARM_ARCH_4__  || defined __ARM_ARCH_4T__  \
+      || defined __ARM_ARCH_5__  || defined __ARM_ARCH_5E__  \
+      || defined __ARM_ARCH_5T__ || defined __ARM_ARCH_5TE__ \
+      || defined __ARM_ARCH_5TEJ__
+      /* should not need any, unless running old code on newer cpu - arm doesn't support that */
+    #elif defined __ARM_ARCH_6__  || defined __ARM_ARCH_6J__  \
+       || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__ \
+       || defined __ARM_ARCH_6T2__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory")
+    #elif defined __ARM_ARCH_7__  || defined __ARM_ARCH_7A__  \
+       || defined __ARM_ARCH_7R__ || defined __ARM_ARCH_7M__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("dmb"      : : : "memory")
+    #elif __aarch64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("dmb ish"  : : : "memory")
+    #elif (__sparc || __sparc__) && !(__sparc_v8__ || defined __sparcv8)
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory")
+      #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad"                            : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore             | #StoreStore")
+    #elif defined __s390__ || defined __s390x__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("bcr 15,0" : : : "memory")
+    #elif defined __mips__
+      /* GNU/Linux emulates sync on mips1 architectures, so we force its use */
+      /* anybody else who still uses mips1 is supposed to send in their version, with detection code. */
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ (".set mips2; sync; .set mips0" : : : "memory")
+    #elif defined __alpha__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mb"       : : : "memory")
+    #elif defined __hppa__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ (""         : : : "memory")
+      #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
+    #elif defined __ia64__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("mf"       : : : "memory")
+    #elif defined __m68k__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ (""         : : : "memory")
+    #elif defined __m88k__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ ("tb1 0,%%r0,128" : : : "memory")
+    #elif defined __sh__
+      #define ECB_MEMORY_FENCE         __asm__ __volatile__ (""         : : : "memory")
+    #endif
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_GCC_VERSION(4,7)
+    /* see comment below (stdatomic.h) about the C11 memory model. */
+    #define ECB_MEMORY_FENCE         __atomic_thread_fence (__ATOMIC_SEQ_CST)
+    #define ECB_MEMORY_FENCE_ACQUIRE __atomic_thread_fence (__ATOMIC_ACQUIRE)
+    #define ECB_MEMORY_FENCE_RELEASE __atomic_thread_fence (__ATOMIC_RELEASE)
+    #define ECB_MEMORY_FENCE_RELAXED __atomic_thread_fence (__ATOMIC_RELAXED)
+
+  #elif ECB_CLANG_EXTENSION(c_atomic)
+    /* see comment below (stdatomic.h) about the C11 memory model. */
+    #define ECB_MEMORY_FENCE         __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
+    #define ECB_MEMORY_FENCE_ACQUIRE __c11_atomic_thread_fence (__ATOMIC_ACQUIRE)
+    #define ECB_MEMORY_FENCE_RELEASE __c11_atomic_thread_fence (__ATOMIC_RELEASE)
+    #define ECB_MEMORY_FENCE_RELAXED __c11_atomic_thread_fence (__ATOMIC_RELAXED)
+
+  #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__
+    #define ECB_MEMORY_FENCE         __sync_synchronize ()
+  #elif _MSC_VER >= 1500 /* VC++ 2008 */
+    /* apparently, microsoft broke all the memory barrier stuff in Visual Studio 2008... */
+    #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier)
+    #define ECB_MEMORY_FENCE         _ReadWriteBarrier (); MemoryBarrier()
+    #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier (); MemoryBarrier() /* according to msdn, _ReadBarrier is not a load fence */
+    #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier (); MemoryBarrier()
+  #elif _MSC_VER >= 1400 /* VC++ 2005 */
+    #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier)
+    #define ECB_MEMORY_FENCE         _ReadWriteBarrier ()
+    #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */
+    #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier ()
+  #elif defined _WIN32
+    #include <WinNT.h>
+    #define ECB_MEMORY_FENCE         MemoryBarrier () /* actually just xchg on x86... scary */
+  #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
+    #include <mbarrier.h>
+    #define ECB_MEMORY_FENCE         __machine_rw_barrier  ()
+    #define ECB_MEMORY_FENCE_ACQUIRE __machine_acq_barrier ()
+    #define ECB_MEMORY_FENCE_RELEASE __machine_rel_barrier ()
+    #define ECB_MEMORY_FENCE_RELAXED __compiler_barrier ()
+  #elif __xlC__
+    #define ECB_MEMORY_FENCE         __sync ()
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if ECB_C11 && !defined __STDC_NO_ATOMICS__
+    /* we assume that these memory fences work on all variables/all memory accesses, */
+    /* not just C11 atomics and atomic accesses */
+    #include <stdatomic.h>
+    #define ECB_MEMORY_FENCE         atomic_thread_fence (memory_order_seq_cst)
+    #define ECB_MEMORY_FENCE_ACQUIRE atomic_thread_fence (memory_order_acquire)
+    #define ECB_MEMORY_FENCE_RELEASE atomic_thread_fence (memory_order_release)
+  #endif
+#endif
+
+#ifndef ECB_MEMORY_FENCE
+  #if !ECB_AVOID_PTHREADS
+    /*
+     * if you get undefined symbol references to pthread_mutex_lock,
+     * or failure to find pthread.h, then you should implement
+     * the ECB_MEMORY_FENCE operations for your cpu/compiler
+     * OR provide pthread.h and link against the posix thread library
+     * of your system.
+     */
+    #include <pthread.h>
+    #define ECB_NEEDS_PTHREADS 1
+    #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1
+
+    static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER;
+    #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0)
+  #endif
+#endif
+
+#if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE
+  #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE
+#endif
+
+#if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE
+  #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE
+#endif
+
+#if !defined ECB_MEMORY_FENCE_RELAXED && defined ECB_MEMORY_FENCE
+  #define ECB_MEMORY_FENCE_RELAXED ECB_MEMORY_FENCE /* very heavy-handed */
+#endif
+
+/*****************************************************************************/
+
+#if ECB_CPP
+  #define ecb_inline static inline
+#elif ECB_GCC_VERSION(2,5)
+  #define ecb_inline static __inline__
+#elif ECB_C99
+  #define ecb_inline static inline
+#else
+  #define ecb_inline static
+#endif
+
+#if ECB_GCC_VERSION(3,3)
+  #define ecb_restrict __restrict__
+#elif ECB_C99
+  #define ecb_restrict restrict
+#else
+  #define ecb_restrict
+#endif
+
+typedef int ecb_bool;
+
+#define ECB_CONCAT_(a, b) a ## b
+#define ECB_CONCAT(a, b) ECB_CONCAT_(a, b)
+#define ECB_STRINGIFY_(a) # a
+#define ECB_STRINGIFY(a) ECB_STRINGIFY_(a)
+#define ECB_STRINGIFY_EXPR(expr) ((expr), ECB_STRINGIFY_ (expr))
+
+#define ecb_function_ ecb_inline
+
+#if ECB_GCC_VERSION(3,1) || ECB_CLANG_VERSION(2,8)
+  #define ecb_attribute(attrlist)        __attribute__ (attrlist)
+#else
+  #define ecb_attribute(attrlist)
+#endif
+
+#if ECB_GCC_VERSION(3,1) || ECB_CLANG_BUILTIN(__builtin_constant_p)
+  #define ecb_is_constant(expr)          __builtin_constant_p (expr)
+#else
+  /* possible C11 impl for integral types
+  typedef struct ecb_is_constant_struct ecb_is_constant_struct;
+  #define ecb_is_constant(expr)          _Generic ((1 ? (struct ecb_is_constant_struct *)0 : (void *)((expr) - (expr)), ecb_is_constant_struct *: 0, default: 1)) */
+
+  #define ecb_is_constant(expr)          0
+#endif
+
+#if ECB_GCC_VERSION(3,1) || ECB_CLANG_BUILTIN(__builtin_expect)
+  #define ecb_expect(expr,value)         __builtin_expect ((expr),(value))
+#else
+  #define ecb_expect(expr,value)         (expr)
+#endif
+
+#if ECB_GCC_VERSION(3,1) || ECB_CLANG_BUILTIN(__builtin_prefetch)
+  #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality)
+#else
+  #define ecb_prefetch(addr,rw,locality)
+#endif
+
+/* no emulation for ecb_decltype */
+#if ECB_CPP11
+  // older implementations might have problems with decltype(x)::type, work around it
+  template<class T> struct ecb_decltype_t { typedef T type; };
+  #define ecb_decltype(x) ecb_decltype_t<decltype (x)>::type
+#elif ECB_GCC_VERSION(3,0) || ECB_CLANG_VERSION(2,8)
+  #define ecb_decltype(x) __typeof__ (x)
+#endif
+
+#if _MSC_VER >= 1300
+  #define ecb_deprecated __declspec (deprecated)
+#else
+  #define ecb_deprecated ecb_attribute ((__deprecated__))
+#endif
+
+#if _MSC_VER >= 1500
+  #define ecb_deprecated_message(msg) __declspec (deprecated (msg))
+#elif ECB_GCC_VERSION(4,5)
+  #define ecb_deprecated_message(msg) ecb_attribute ((__deprecated__ (msg))
+#else
+  #define ecb_deprecated_message(msg) ecb_deprecated
+#endif
+
+#if _MSC_VER >= 1400
+  #define ecb_noinline __declspec (noinline)
+#else
+  #define ecb_noinline ecb_attribute ((__noinline__))
+#endif
+
+#define ecb_unused     ecb_attribute ((__unused__))
+#define ecb_const      ecb_attribute ((__const__))
+#define ecb_pure       ecb_attribute ((__pure__))
+
+#if ECB_C11 || __IBMC_NORETURN
+  /* http://www-01.ibm.com/support/knowledgecenter/SSGH3R_13.1.0/com.ibm.xlcpp131.aix.doc/language_ref/noreturn.html */
+  #define ecb_noreturn   _Noreturn
+#elif ECB_CPP11
+  #define ecb_noreturn   [[noreturn]]
+#elif _MSC_VER >= 1200
+  /* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx */
+  #define ecb_noreturn   __declspec (noreturn)
+#else
+  #define ecb_noreturn   ecb_attribute ((__noreturn__))
+#endif
+
+#if ECB_GCC_VERSION(4,3)
+  #define ecb_artificial ecb_attribute ((__artificial__))
+  #define ecb_hot        ecb_attribute ((__hot__))
+  #define ecb_cold       ecb_attribute ((__cold__))
+#else
+  #define ecb_artificial
+  #define ecb_hot
+  #define ecb_cold
+#endif
+
+/* put around conditional expressions if you are very sure that the  */
+/* expression is mostly true or mostly false. note that these return */
+/* booleans, not the expression.                                     */
+#define ecb_expect_false(expr) ecb_expect (!!(expr), 0)
+#define ecb_expect_true(expr)  ecb_expect (!!(expr), 1)
+/* for compatibility to the rest of the world */
+#define ecb_likely(expr)   ecb_expect_true  (expr)
+#define ecb_unlikely(expr) ecb_expect_false (expr)
+
+/* count trailing zero bits and count # of one bits */
+#if ECB_GCC_VERSION(3,4) \
+    || (ECB_CLANG_BUILTIN(__builtin_clz) && ECB_CLANG_BUILTIN(__builtin_clzll) \
+        && ECB_CLANG_BUILTIN(__builtin_ctz) && ECB_CLANG_BUILTIN(__builtin_ctzll) \
+        && ECB_CLANG_BUILTIN(__builtin_popcount))
+  /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */
+  #define ecb_ld32(x)      (__builtin_clz      (x) ^ 31)
+  #define ecb_ld64(x)      (__builtin_clzll    (x) ^ 63)
+  #define ecb_ctz32(x)      __builtin_ctz      (x)
+  #define ecb_ctz64(x)      __builtin_ctzll    (x)
+  #define ecb_popcount32(x) __builtin_popcount (x)
+  /* no popcountll */
+#else
+  ecb_function_ ecb_const int ecb_ctz32 (uint32_t x);
+  ecb_function_ ecb_const int
+  ecb_ctz32 (uint32_t x)
+  {
+#if 1400 <= _MSC_VER && (_M_IX86 || _M_X64 || _M_IA64 || _M_ARM)
+    unsigned long r;
+    _BitScanForward (&r, x);
+    return (int)r;
+#else
+    int r = 0;
+
+    x &= ~x + 1; /* this isolates the lowest bit */
+
+#if ECB_branchless_on_i386
+    r += !!(x & 0xaaaaaaaa) << 0;
+    r += !!(x & 0xcccccccc) << 1;
+    r += !!(x & 0xf0f0f0f0) << 2;
+    r += !!(x & 0xff00ff00) << 3;
+    r += !!(x & 0xffff0000) << 4;
+#else
+    if (x & 0xaaaaaaaa) r +=  1;
+    if (x & 0xcccccccc) r +=  2;
+    if (x & 0xf0f0f0f0) r +=  4;
+    if (x & 0xff00ff00) r +=  8;
+    if (x & 0xffff0000) r += 16;
+#endif
+
+    return r;
+#endif
+  }
+
+  ecb_function_ ecb_const int ecb_ctz64 (uint64_t x);
+  ecb_function_ ecb_const int
+  ecb_ctz64 (uint64_t x)
+  {
+#if 1400 <= _MSC_VER && (_M_X64 || _M_IA64 || _M_ARM)
+    unsigned long r;
+    _BitScanForward64 (&r, x);
+    return (int)r;
+#else
+    int shift = x & 0xffffffff ? 0 : 32;
+    return ecb_ctz32 (x >> shift) + shift;
+#endif
+  }
+
+  ecb_function_ ecb_const int ecb_popcount32 (uint32_t x);
+  ecb_function_ ecb_const int
+  ecb_popcount32 (uint32_t x)
+  {
+    x -=  (x >> 1) & 0x55555555;
+    x  = ((x >> 2) & 0x33333333) + (x & 0x33333333);
+    x  = ((x >> 4) + x) & 0x0f0f0f0f;
+    x *= 0x01010101;
+
+    return x >> 24;
+  }
+
+  ecb_function_ ecb_const int ecb_ld32 (uint32_t x);
+  ecb_function_ ecb_const int ecb_ld32 (uint32_t x)
+  {
+#if 1400 <= _MSC_VER && (_M_IX86 || _M_X64 || _M_IA64 || _M_ARM)
+    unsigned long r;
+    _BitScanReverse (&r, x);
+    return (int)r;
+#else
+    int r = 0;
+
+    if (x >> 16) { x >>= 16; r += 16; }
+    if (x >>  8) { x >>=  8; r +=  8; }
+    if (x >>  4) { x >>=  4; r +=  4; }
+    if (x >>  2) { x >>=  2; r +=  2; }
+    if (x >>  1) {           r +=  1; }
+
+    return r;
+#endif
+  }
+
+  ecb_function_ ecb_const int ecb_ld64 (uint64_t x);
+  ecb_function_ ecb_const int ecb_ld64 (uint64_t x)
+  {
+#if 1400 <= _MSC_VER && (_M_X64 || _M_IA64 || _M_ARM)
+    unsigned long r;
+    _BitScanReverse64 (&r, x);
+    return (int)r;
+#else
+    int r = 0;
+
+    if (x >> 32) { x >>= 32; r += 32; }
+
+    return r + ecb_ld32 (x);
+#endif
+  }
+#endif
+
+ecb_function_ ecb_const ecb_bool ecb_is_pot32 (uint32_t x);
+ecb_function_ ecb_const ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); }
+ecb_function_ ecb_const ecb_bool ecb_is_pot64 (uint64_t x);
+ecb_function_ ecb_const ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); }
+
+ecb_function_ ecb_const uint8_t  ecb_bitrev8  (uint8_t  x);
+ecb_function_ ecb_const uint8_t  ecb_bitrev8  (uint8_t  x)
+{
+  return (  (x * 0x0802U & 0x22110U)
+          | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16;
+}
+
+ecb_function_ ecb_const uint16_t ecb_bitrev16 (uint16_t x);
+ecb_function_ ecb_const uint16_t ecb_bitrev16 (uint16_t x)
+{
+  x = ((x >>  1) &     0x5555) | ((x &     0x5555) <<  1);
+  x = ((x >>  2) &     0x3333) | ((x &     0x3333) <<  2);
+  x = ((x >>  4) &     0x0f0f) | ((x &     0x0f0f) <<  4);
+  x = ( x >>  8              ) | ( x               <<  8);
+
+  return x;
+}
+
+ecb_function_ ecb_const uint32_t ecb_bitrev32 (uint32_t x);
+ecb_function_ ecb_const uint32_t ecb_bitrev32 (uint32_t x)
+{
+  x = ((x >>  1) & 0x55555555) | ((x & 0x55555555) <<  1);
+  x = ((x >>  2) & 0x33333333) | ((x & 0x33333333) <<  2);
+  x = ((x >>  4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) <<  4);
+  x = ((x >>  8) & 0x00ff00ff) | ((x & 0x00ff00ff) <<  8);
+  x = ( x >> 16              ) | ( x               << 16);
+
+  return x;
+}
+
+/* popcount64 is only available on 64 bit cpus as gcc builtin */
+/* so for this version we are lazy */
+ecb_function_ ecb_const int ecb_popcount64 (uint64_t x);
+ecb_function_ ecb_const int
+ecb_popcount64 (uint64_t x)
+{
+  return ecb_popcount32 (x) + ecb_popcount32 (x >> 32);
+}
+
+ecb_inline ecb_const uint8_t  ecb_rotl8  (uint8_t  x, unsigned int count);
+ecb_inline ecb_const uint8_t  ecb_rotr8  (uint8_t  x, unsigned int count);
+ecb_inline ecb_const uint16_t ecb_rotl16 (uint16_t x, unsigned int count);
+ecb_inline ecb_const uint16_t ecb_rotr16 (uint16_t x, unsigned int count);
+ecb_inline ecb_const uint32_t ecb_rotl32 (uint32_t x, unsigned int count);
+ecb_inline ecb_const uint32_t ecb_rotr32 (uint32_t x, unsigned int count);
+ecb_inline ecb_const uint64_t ecb_rotl64 (uint64_t x, unsigned int count);
+ecb_inline ecb_const uint64_t ecb_rotr64 (uint64_t x, unsigned int count);
+
+ecb_inline ecb_const uint8_t  ecb_rotl8  (uint8_t  x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); }
+ecb_inline ecb_const uint8_t  ecb_rotr8  (uint8_t  x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); }
+ecb_inline ecb_const uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); }
+ecb_inline ecb_const uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); }
+ecb_inline ecb_const uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); }
+ecb_inline ecb_const uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); }
+ecb_inline ecb_const uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); }
+ecb_inline ecb_const uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); }
+
+#if ECB_CPP
+
+inline uint8_t  ecb_ctz (uint8_t  v) { return ecb_ctz32 (v); }
+inline uint16_t ecb_ctz (uint16_t v) { return ecb_ctz32 (v); }
+inline uint32_t ecb_ctz (uint32_t v) { return ecb_ctz32 (v); }
+inline uint64_t ecb_ctz (uint64_t v) { return ecb_ctz64 (v); }
+
+inline bool ecb_is_pot (uint8_t  v) { return ecb_is_pot32 (v); }
+inline bool ecb_is_pot (uint16_t v) { return ecb_is_pot32 (v); }
+inline bool ecb_is_pot (uint32_t v) { return ecb_is_pot32 (v); }
+inline bool ecb_is_pot (uint64_t v) { return ecb_is_pot64 (v); }
+
+inline int ecb_ld (uint8_t  v) { return ecb_ld32 (v); }
+inline int ecb_ld (uint16_t v) { return ecb_ld32 (v); }
+inline int ecb_ld (uint32_t v) { return ecb_ld32 (v); }
+inline int ecb_ld (uint64_t v) { return ecb_ld64 (v); }
+
+inline int ecb_popcount (uint8_t  v) { return ecb_popcount32 (v); }
+inline int ecb_popcount (uint16_t v) { return ecb_popcount32 (v); }
+inline int ecb_popcount (uint32_t v) { return ecb_popcount32 (v); }
+inline int ecb_popcount (uint64_t v) { return ecb_popcount64 (v); }
+
+inline uint8_t  ecb_bitrev (uint8_t  v) { return ecb_bitrev8  (v); }
+inline uint16_t ecb_bitrev (uint16_t v) { return ecb_bitrev16 (v); }
+inline uint32_t ecb_bitrev (uint32_t v) { return ecb_bitrev32 (v); }
+
+inline uint8_t  ecb_rotl (uint8_t  v, unsigned int count) { return ecb_rotl8  (v, count); }
+inline uint16_t ecb_rotl (uint16_t v, unsigned int count) { return ecb_rotl16 (v, count); }
+inline uint32_t ecb_rotl (uint32_t v, unsigned int count) { return ecb_rotl32 (v, count); }
+inline uint64_t ecb_rotl (uint64_t v, unsigned int count) { return ecb_rotl64 (v, count); }
+
+inline uint8_t  ecb_rotr (uint8_t  v, unsigned int count) { return ecb_rotr8  (v, count); }
+inline uint16_t ecb_rotr (uint16_t v, unsigned int count) { return ecb_rotr16 (v, count); }
+inline uint32_t ecb_rotr (uint32_t v, unsigned int count) { return ecb_rotr32 (v, count); }
+inline uint64_t ecb_rotr (uint64_t v, unsigned int count) { return ecb_rotr64 (v, count); }
+
+#endif
+
+#if ECB_GCC_VERSION(4,3) || (ECB_CLANG_BUILTIN(__builtin_bswap32) && ECB_CLANG_BUILTIN(__builtin_bswap64))
+  #if ECB_GCC_VERSION(4,8) || ECB_CLANG_BUILTIN(__builtin_bswap16)
+  #define ecb_bswap16(x)  __builtin_bswap16 (x)
+  #else
+  #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16)
+  #endif
+  #define ecb_bswap32(x)  __builtin_bswap32 (x)
+  #define ecb_bswap64(x)  __builtin_bswap64 (x)
+#elif _MSC_VER
+  #include <stdlib.h>
+  #define ecb_bswap16(x) ((uint16_t)_byteswap_ushort ((uint16_t)(x)))
+  #define ecb_bswap32(x) ((uint32_t)_byteswap_ulong  ((uint32_t)(x)))
+  #define ecb_bswap64(x) ((uint64_t)_byteswap_uint64 ((uint64_t)(x)))
+#else
+  ecb_function_ ecb_const uint16_t ecb_bswap16 (uint16_t x);
+  ecb_function_ ecb_const uint16_t
+  ecb_bswap16 (uint16_t x)
+  {
+    return ecb_rotl16 (x, 8);
+  }
+
+  ecb_function_ ecb_const uint32_t ecb_bswap32 (uint32_t x);
+  ecb_function_ ecb_const uint32_t
+  ecb_bswap32 (uint32_t x)
+  {
+    return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16);
+  }
+
+  ecb_function_ ecb_const uint64_t ecb_bswap64 (uint64_t x);
+  ecb_function_ ecb_const uint64_t
+  ecb_bswap64 (uint64_t x)
+  {
+    return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32);
+  }
+#endif
+
+#if ECB_GCC_VERSION(4,5) || ECB_CLANG_BUILTIN(__builtin_unreachable)
+  #define ecb_unreachable() __builtin_unreachable ()
+#else
+  /* this seems to work fine, but gcc always emits a warning for it :/ */
+  ecb_inline ecb_noreturn void ecb_unreachable (void);
+  ecb_inline ecb_noreturn void ecb_unreachable (void) { }
+#endif
+
+/* try to tell the compiler that some condition is definitely true */
+#define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0
+
+ecb_inline ecb_const uint32_t ecb_byteorder_helper (void);
+ecb_inline ecb_const uint32_t
+ecb_byteorder_helper (void)
+{
+  /* the union code still generates code under pressure in gcc, */
+  /* but less than using pointers, and always seems to */
+  /* successfully return a constant. */
+  /* the reason why we have this horrible preprocessor mess */
+  /* is to avoid it in all cases, at least on common architectures */
+  /* or when using a recent enough gcc version (>= 4.6) */
+#if (defined __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
+    || ((__i386 || __i386__ || _M_IX86 || ECB_GCC_AMD64 || ECB_MSVC_AMD64) && !__VOS__)
+  #define ECB_LITTLE_ENDIAN 1
+  return 0x44332211;
+#elif (defined __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
+      || ((__AARCH64EB__ || __MIPSEB__ || __ARMEB__) && !__VOS__)
+  #define ECB_BIG_ENDIAN 1
+  return 0x11223344;
+#else
+  union
+  {
+    uint8_t c[4];
+    uint32_t u;
+  } u = { 0x11, 0x22, 0x33, 0x44 };
+  return u.u;
+#endif
+}
+
+ecb_inline ecb_const ecb_bool ecb_big_endian    (void);
+ecb_inline ecb_const ecb_bool ecb_big_endian    (void) { return ecb_byteorder_helper () == 0x11223344; }
+ecb_inline ecb_const ecb_bool ecb_little_endian (void);
+ecb_inline ecb_const ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44332211; }
+
+/*****************************************************************************/
+/* unaligned load/store */
+
+ecb_inline uint_fast16_t ecb_be_u16_to_host (uint_fast16_t v) { return ecb_little_endian () ? ecb_bswap16 (v) : v; }
+ecb_inline uint_fast32_t ecb_be_u32_to_host (uint_fast32_t v) { return ecb_little_endian () ? ecb_bswap32 (v) : v; }
+ecb_inline uint_fast64_t ecb_be_u64_to_host (uint_fast64_t v) { return ecb_little_endian () ? ecb_bswap64 (v) : v; }
+
+ecb_inline uint_fast16_t ecb_le_u16_to_host (uint_fast16_t v) { return ecb_big_endian    () ? ecb_bswap16 (v) : v; }
+ecb_inline uint_fast32_t ecb_le_u32_to_host (uint_fast32_t v) { return ecb_big_endian    () ? ecb_bswap32 (v) : v; }
+ecb_inline uint_fast64_t ecb_le_u64_to_host (uint_fast64_t v) { return ecb_big_endian    () ? ecb_bswap64 (v) : v; }
+
+ecb_inline uint_fast16_t ecb_peek_u16_u (const void *ptr) { uint16_t v; memcpy (&v, ptr, sizeof (v)); return v; }
+ecb_inline uint_fast32_t ecb_peek_u32_u (const void *ptr) { uint32_t v; memcpy (&v, ptr, sizeof (v)); return v; }
+ecb_inline uint_fast64_t ecb_peek_u64_u (const void *ptr) { uint64_t v; memcpy (&v, ptr, sizeof (v)); return v; }
+
+ecb_inline uint_fast16_t ecb_peek_be_u16_u (const void *ptr) { return ecb_be_u16_to_host (ecb_peek_u16_u (ptr)); }
+ecb_inline uint_fast32_t ecb_peek_be_u32_u (const void *ptr) { return ecb_be_u32_to_host (ecb_peek_u32_u (ptr)); }
+ecb_inline uint_fast64_t ecb_peek_be_u64_u (const void *ptr) { return ecb_be_u64_to_host (ecb_peek_u64_u (ptr)); }
+
+ecb_inline uint_fast16_t ecb_peek_le_u16_u (const void *ptr) { return ecb_le_u16_to_host (ecb_peek_u16_u (ptr)); }
+ecb_inline uint_fast32_t ecb_peek_le_u32_u (const void *ptr) { return ecb_le_u32_to_host (ecb_peek_u32_u (ptr)); }
+ecb_inline uint_fast64_t ecb_peek_le_u64_u (const void *ptr) { return ecb_le_u64_to_host (ecb_peek_u64_u (ptr)); }
+
+ecb_inline uint_fast16_t ecb_host_to_be_u16 (uint_fast16_t v) { return ecb_little_endian () ? ecb_bswap16 (v) : v; }
+ecb_inline uint_fast32_t ecb_host_to_be_u32 (uint_fast32_t v) { return ecb_little_endian () ? ecb_bswap32 (v) : v; }
+ecb_inline uint_fast64_t ecb_host_to_be_u64 (uint_fast64_t v) { return ecb_little_endian () ? ecb_bswap64 (v) : v; }
+
+ecb_inline uint_fast16_t ecb_host_to_le_u16 (uint_fast16_t v) { return ecb_big_endian    () ? ecb_bswap16 (v) : v; }
+ecb_inline uint_fast32_t ecb_host_to_le_u32 (uint_fast32_t v) { return ecb_big_endian    () ? ecb_bswap32 (v) : v; }
+ecb_inline uint_fast64_t ecb_host_to_le_u64 (uint_fast64_t v) { return ecb_big_endian    () ? ecb_bswap64 (v) : v; }
+
+ecb_inline void ecb_poke_u16_u (void *ptr, uint16_t v) { memcpy (ptr, &v, sizeof (v)); }
+ecb_inline void ecb_poke_u32_u (void *ptr, uint32_t v) { memcpy (ptr, &v, sizeof (v)); }
+ecb_inline void ecb_poke_u64_u (void *ptr, uint64_t v) { memcpy (ptr, &v, sizeof (v)); }
+
+ecb_inline void ecb_poke_be_u16_u (void *ptr, uint_fast16_t v) { ecb_poke_u16_u (ptr, ecb_host_to_be_u16 (v)); }
+ecb_inline void ecb_poke_be_u32_u (void *ptr, uint_fast32_t v) { ecb_poke_u32_u (ptr, ecb_host_to_be_u32 (v)); }
+ecb_inline void ecb_poke_be_u64_u (void *ptr, uint_fast64_t v) { ecb_poke_u64_u (ptr, ecb_host_to_be_u64 (v)); }
+
+ecb_inline void ecb_poke_le_u16_u (void *ptr, uint_fast16_t v) { ecb_poke_u16_u (ptr, ecb_host_to_le_u16 (v)); }
+ecb_inline void ecb_poke_le_u32_u (void *ptr, uint_fast32_t v) { ecb_poke_u32_u (ptr, ecb_host_to_le_u32 (v)); }
+ecb_inline void ecb_poke_le_u64_u (void *ptr, uint_fast64_t v) { ecb_poke_u64_u (ptr, ecb_host_to_le_u64 (v)); }
+
+#if ECB_CPP
+
+inline uint8_t  ecb_bswap (uint8_t  v) { return v; }
+inline uint16_t ecb_bswap (uint16_t v) { return ecb_bswap16 (v); }
+inline uint32_t ecb_bswap (uint32_t v) { return ecb_bswap32 (v); }
+inline uint64_t ecb_bswap (uint64_t v) { return ecb_bswap64 (v); }
+
+template<typename T> inline T ecb_be_to_host (T v) { return ecb_little_endian () ? ecb_bswap (v) : v; }
+template<typename T> inline T ecb_le_to_host (T v) { return ecb_big_endian    () ? ecb_bswap (v) : v; }
+template<typename T> inline T ecb_peek       (const void *ptr) { return *(const T *)ptr; }
+template<typename T> inline T ecb_peek_be    (const void *ptr) { return ecb_be_to_host (ecb_peek  <T> (ptr)); }
+template<typename T> inline T ecb_peek_le    (const void *ptr) { return ecb_le_to_host (ecb_peek  <T> (ptr)); }
+template<typename T> inline T ecb_peek_u     (const void *ptr) { T v; memcpy (&v, ptr, sizeof (v)); return v; }
+template<typename T> inline T ecb_peek_be_u  (const void *ptr) { return ecb_be_to_host (ecb_peek_u<T> (ptr)); }
+template<typename T> inline T ecb_peek_le_u  (const void *ptr) { return ecb_le_to_host (ecb_peek_u<T> (ptr)); }
+
+template<typename T> inline T ecb_host_to_be (T v) { return ecb_little_endian () ? ecb_bswap (v) : v; }
+template<typename T> inline T ecb_host_to_le (T v) { return ecb_big_endian    () ? ecb_bswap (v) : v; }
+template<typename T> inline void ecb_poke      (void *ptr, T v) { *(T *)ptr = v; }
+template<typename T> inline void ecb_poke_be   (void *ptr, T v) { return ecb_poke  <T> (ptr, ecb_host_to_be (v)); }
+template<typename T> inline void ecb_poke_le   (void *ptr, T v) { return ecb_poke  <T> (ptr, ecb_host_to_le (v)); }
+template<typename T> inline void ecb_poke_u    (void *ptr, T v) { memcpy (ptr, &v, sizeof (v)); }
+template<typename T> inline void ecb_poke_be_u (void *ptr, T v) { return ecb_poke_u<T> (ptr, ecb_host_to_be (v)); }
+template<typename T> inline void ecb_poke_le_u (void *ptr, T v) { return ecb_poke_u<T> (ptr, ecb_host_to_le (v)); }
+
+#endif
+
+/*****************************************************************************/
+
+#if ECB_GCC_VERSION(3,0) || ECB_C99
+  #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0))
+#else
+  #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n)))
+#endif
+
+#if ECB_CPP
+  template<typename T>
+  static inline T ecb_div_rd (T val, T div)
+  {
+    return val < 0 ? - ((-val + div - 1) / div) : (val          ) / div;
+  }
+  template<typename T>
+  static inline T ecb_div_ru (T val, T div)
+  {
+    return val < 0 ? - ((-val          ) / div) : (val + div - 1) / div;
+  }
+#else
+  #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val)            ) / (div))
+  #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val)            ) / (div)) : ((val) + (div) - 1) / (div))
+#endif
+
+#if ecb_cplusplus_does_not_suck
+  /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */
+  template<typename T, int N>
+  static inline int ecb_array_length (const T (&arr)[N])
+  {
+    return N;
+  }
+#else
+  #define ecb_array_length(name) (sizeof (name) / sizeof (name [0]))
+#endif
+
+/*****************************************************************************/
+
+ecb_function_ ecb_const uint32_t ecb_binary16_to_binary32 (uint32_t x);
+ecb_function_ ecb_const uint32_t
+ecb_binary16_to_binary32 (uint32_t x)
+{
+  unsigned int s = (x & 0x8000) << (31 - 15);
+  int          e = (x >> 10) & 0x001f;
+  unsigned int m =  x        & 0x03ff;
+
+  if (ecb_expect_false (e == 31))
+    /* infinity or NaN */
+    e = 255 - (127 - 15);
+  else if (ecb_expect_false (!e))
+    {
+      if (ecb_expect_true (!m))
+        /* zero, handled by code below by forcing e to 0 */
+        e = 0 - (127 - 15);
+      else
+        {
+          /* subnormal, renormalise */
+          unsigned int s = 10 - ecb_ld32 (m);
+
+          m = (m << s) & 0x3ff; /* mask implicit bit */
+          e -= s - 1;
+        }
+    }
+
+  /* e and m now are normalised, or zero, (or inf or nan) */
+  e += 127 - 15;
+
+  return s | (e << 23) | (m << (23 - 10));
+}
+
+ecb_function_ ecb_const uint16_t ecb_binary32_to_binary16 (uint32_t x);
+ecb_function_ ecb_const uint16_t
+ecb_binary32_to_binary16 (uint32_t x)
+{
+  unsigned int s =  (x >> 16) & 0x00008000; /* sign bit, the easy part */
+  unsigned int e = ((x >> 23) & 0x000000ff) - (127 - 15); /* the desired exponent */
+  unsigned int m =   x        & 0x007fffff;
+
+  x &= 0x7fffffff;
+
+  /* if it's within range of binary16 normals, use fast path */
+  if (ecb_expect_true (0x38800000 <= x && x <= 0x477fefff))
+    {
+      /* mantissa round-to-even */
+      m += 0x00000fff + ((m >> (23 - 10)) & 1);
+
+      /* handle overflow */
+      if (ecb_expect_false (m >= 0x00800000))
+        {
+          m >>= 1;
+          e +=  1;
+        }
+
+      return s | (e << 10) | (m >> (23 - 10));
+    }
+
+  /* handle large numbers and infinity */
+  if (ecb_expect_true (0x477fefff < x && x <= 0x7f800000))
+    return s | 0x7c00;
+
+  /* handle zero, subnormals and small numbers */
+  if (ecb_expect_true (x < 0x38800000))
+    {
+      /* zero */
+      if (ecb_expect_true (!x))
+        return s;
+
+      /* handle subnormals */
+
+      /* too small, will be zero */
+      if (e < (14 - 24)) /* might not be sharp, but is good enough */
+        return s;
+
+      m |= 0x00800000; /* make implicit bit explicit */
+
+      /* very tricky - we need to round to the nearest e (+10) bit value */
+      {
+        unsigned int bits = 14 - e;
+        unsigned int half = (1 << (bits - 1)) - 1;
+        unsigned int even = (m >> bits) & 1;
+
+        /* if this overflows, we will end up with a normalised number */
+        m = (m + half + even) >> bits;
+      }
+
+      return s | m;
+    }
+
+  /* handle NaNs, preserve leftmost nan bits, but make sure we don't turn them into infinities */
+  m >>= 13;
+
+  return s | 0x7c00 | m | !m;
+}
+
+/*******************************************************************************/
+/* floating point stuff, can be disabled by defining ECB_NO_LIBM */
+
+/* basically, everything uses "ieee pure-endian" floating point numbers */
+/* the only noteworthy exception is ancient armle, which uses order 43218765 */
+#if 0 \
+    || __i386 || __i386__ \
+    || ECB_GCC_AMD64 \
+    || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
+    || defined __s390__ || defined __s390x__ \
+    || defined __mips__ \
+    || defined __alpha__ \
+    || defined __hppa__ \
+    || defined __ia64__ \
+    || defined __m68k__ \
+    || defined __m88k__ \
+    || defined __sh__ \
+    || defined _M_IX86 || defined ECB_MSVC_AMD64 || defined _M_IA64 \
+    || (defined __arm__ && (defined __ARM_EABI__ || defined __EABI__ || defined __VFP_FP__ || defined _WIN32_WCE || defined __ANDROID__)) \
+    || defined __aarch64__
+  #define ECB_STDFP 1
+#else
+  #define ECB_STDFP 0
+#endif
+
+#ifndef ECB_NO_LIBM
+
+  #include <math.h> /* for frexp*, ldexp*, INFINITY, NAN */
+
+  /* only the oldest of old doesn't have this one. solaris. */
+  #ifdef INFINITY
+    #define ECB_INFINITY INFINITY
+  #else
+    #define ECB_INFINITY HUGE_VAL
+  #endif
+
+  #ifdef NAN
+    #define ECB_NAN NAN
+  #else
+    #define ECB_NAN ECB_INFINITY
+  #endif
+
+  #if ECB_C99 || _XOPEN_VERSION >= 600 || _POSIX_VERSION >= 200112L
+    #define ecb_ldexpf(x,e) ldexpf ((x), (e))
+    #define ecb_frexpf(x,e) frexpf ((x), (e))
+  #else
+    #define ecb_ldexpf(x,e) (float) ldexp ((double) (x), (e))
+    #define ecb_frexpf(x,e) (float) frexp ((double) (x), (e))
+  #endif
+
+  /* convert a float to ieee single/binary32 */
+  ecb_function_ ecb_const uint32_t ecb_float_to_binary32 (float x);
+  ecb_function_ ecb_const uint32_t
+  ecb_float_to_binary32 (float x)
+  {
+    uint32_t r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 4);
+    #else
+      /* slow emulation, works for anything but -0 */
+      uint32_t m;
+      int e;
+
+      if (x == 0e0f                    ) return 0x00000000U;
+      if (x > +3.40282346638528860e+38f) return 0x7f800000U;
+      if (x < -3.40282346638528860e+38f) return 0xff800000U;
+      if (x != x                       ) return 0x7fbfffffU;
+
+      m = ecb_frexpf (x, &e) * 0x1000000U;
+
+      r = m & 0x80000000U;
+
+      if (r)
+        m = -m;
+
+      if (e <= -126)
+        {
+          m &= 0xffffffU;
+          m >>= (-125 - e);
+          e = -126;
+        }
+
+      r |= (e + 126) << 23;
+      r |= m & 0x7fffffU;
+    #endif
+
+    return r;
+  }
+
+  /* converts an ieee single/binary32 to a float */
+  ecb_function_ ecb_const float ecb_binary32_to_float (uint32_t x);
+  ecb_function_ ecb_const float
+  ecb_binary32_to_float (uint32_t x)
+  {
+    float r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 4);
+    #else
+      /* emulation, only works for normals and subnormals and +0 */
+      int neg = x >> 31;
+      int e = (x >> 23) & 0xffU;
+
+      x &= 0x7fffffU;
+
+      if (e)
+        x |= 0x800000U;
+      else
+        e = 1;
+
+      /* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */
+      r = ecb_ldexpf (x * (0.5f / 0x800000U), e - 126);
+
+      r = neg ? -r : r;
+    #endif
+
+    return r;
+  }
+
+  /* convert a double to ieee double/binary64 */
+  ecb_function_ ecb_const uint64_t ecb_double_to_binary64 (double x);
+  ecb_function_ ecb_const uint64_t
+  ecb_double_to_binary64 (double x)
+  {
+    uint64_t r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 8);
+    #else
+      /* slow emulation, works for anything but -0 */
+      uint64_t m;
+      int e;
+
+      if (x == 0e0                     ) return 0x0000000000000000U;
+      if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U;
+      if (x < -1.79769313486231470e+308) return 0xfff0000000000000U;
+      if (x != x                       ) return 0X7ff7ffffffffffffU;
+
+      m = frexp (x, &e) * 0x20000000000000U;
+
+      r = m & 0x8000000000000000;;
+
+      if (r)
+        m = -m;
+
+      if (e <= -1022)
+        {
+          m &= 0x1fffffffffffffU;
+          m >>= (-1021 - e);
+          e = -1022;
+        }
+
+      r |= ((uint64_t)(e + 1022)) << 52;
+      r |= m & 0xfffffffffffffU;
+    #endif
+
+    return r;
+  }
+
+  /* converts an ieee double/binary64 to a double */
+  ecb_function_ ecb_const double ecb_binary64_to_double (uint64_t x);
+  ecb_function_ ecb_const double
+  ecb_binary64_to_double (uint64_t x)
+  {
+    double r;
+
+    #if ECB_STDFP
+      memcpy (&r, &x, 8);
+    #else
+      /* emulation, only works for normals and subnormals and +0 */
+      int neg = x >> 63;
+      int e = (x >> 52) & 0x7ffU;
+
+      x &= 0xfffffffffffffU;
+
+      if (e)
+        x |= 0x10000000000000U;
+      else
+        e = 1;
+
+      /* we distrust ldexp a bit and do the 2**-53 scaling by an extra multiply */
+      r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022);
+
+      r = neg ? -r : r;
+    #endif
+
+    return r;
+  }
+
+  /* convert a float to ieee half/binary16 */
+  ecb_function_ ecb_const uint16_t ecb_float_to_binary16 (float x);
+  ecb_function_ ecb_const uint16_t
+  ecb_float_to_binary16 (float x)
+  {
+    return ecb_binary32_to_binary16 (ecb_float_to_binary32 (x));
+  }
+
+  /* convert an ieee half/binary16 to float */
+  ecb_function_ ecb_const float ecb_binary16_to_float (uint16_t x);
+  ecb_function_ ecb_const float
+  ecb_binary16_to_float (uint16_t x)
+  {
+    return ecb_binary32_to_float (ecb_binary16_to_binary32 (x));
+  }
+
+#endif
+
+#endif
+
diff --git a/uulib/fptools.c b/uulib/fptools.c
index 02602ef..1b382be 100644
--- a/uulib/fptools.c
+++ b/uulib/fptools.c
@@ -22,14 +22,14 @@
  * should behave exactly as their counterparts. There are also extensions
  * that aren't portable at all (like strirstr etc.).
  * The proper behaviour in a configure script is as follows:
- *    AC_CHECK_FUNC(strrchr,AC_DEFINE(strrchr,_FP_strrchr))
+ *    AC_CHECK_FUNC(strrchr,AC_DEFINE(strrchr,FP_strrchr))
  * This way, the (probably less efficient) replacements will only be used
  * where it is not provided by the default libraries. Be aware that this
  * does not work with replacements that just shadow wrong behaviour (like
- * _FP_free) or provide extended functionality (FP_gets).
+ * FP_free) or provide extended functionality (FP_gets).
  * The above is not used in the uuenview/uudeview configuration script,
  * since both only use the replacement functions in non-performance-cri-
- * tical sections (except for _FP_tempnam and FP_strerror, where some
+ * tical sections (except for FP_tempnam and FP_strerror, where some
  * functionality of the original would be lost).
  */
 
@@ -73,7 +73,7 @@ char * fptools_id = "$Id$";
  */
 
 void TOOLEXPORT
-_FP_free (void *ptr)
+FP_free (void *ptr)
 {
   if (ptr) free (ptr);
 }
@@ -83,7 +83,7 @@ _FP_free (void *ptr)
  */
 
 char * TOOLEXPORT
-_FP_strdup (char *string)
+FP_strdup (char *string)
 {
   char *result;
 
@@ -104,7 +104,7 @@ _FP_strdup (char *string)
  */
 
 char * TOOLEXPORT
-_FP_strncpy (char *dest, char *src, int length)
+FP_strncpy (char *dest, char *src, int length)
 {
   char *odest=dest;
   if (src == NULL || dest == NULL || length-- <= 0)
@@ -122,7 +122,7 @@ _FP_strncpy (char *dest, char *src, int length)
  */
 
 void * TOOLEXPORT
-_FP_memdup (void *ptr, int len)
+FP_memdup (const void *ptr, int len)
 {
   void *result;
 
@@ -142,7 +142,7 @@ _FP_memdup (void *ptr, int len)
 
 #ifndef FP_stricmp
 int TOOLEXPORT
-_FP_stricmp (char *str1, char *str2)
+FP_stricmp (const char *str1, const char *str2)
 {
   if (str1==NULL || str2==NULL)
     return -1;
@@ -159,24 +159,51 @@ _FP_stricmp (char *str1, char *str2)
 
 #ifndef FP_strnicmp
 int TOOLEXPORT
-_FP_strnicmp (char *str1, char *str2, int count)
+FP_strnicmp (const char *str1, const char *str2, int count)
 {
-  if (str1==NULL || str2==NULL)
+  int d;
+
+  if (!str1 || !str2)
     return -1;
 
-  while (*str1 && count) {
-    if (tolower(*str1) != tolower(*str2))
-      break;
+  while (count--) {
+    if (!*str1)
+      return -1;
+
+    d = tolower (*str1) - tolower (*str2);
+    if (d)
+      return d;
+
     str1++;
     str2++;
-    count--;
   }
-  return count ? (tolower (*str1) - tolower (*str2)) : 0;
+
+  return 0;
 }
 #endif
 
+int TOOLEXPORT
+FP_strnicmp_fast (const char *str1, const char *str2, int count)
+{
+  if (!str1 || !str2)
+    return -1;
+
+  while (count--) {
+    if (!*str1)
+      return -1;
+
+    if ((*str1 ^ *str2) & 0xdf)
+      return (*str1 & 0xdf) - (*str2 & 0xdf);
+
+    str1++;
+    str2++;
+  }
+
+  return 0;
+}
+
 char * TOOLEXPORT
-_FP_strpbrk (char *str, char *accept)
+FP_strpbrk (char *str, char *accept)
 {
   char *ptr;
 
@@ -198,7 +225,7 @@ _FP_strpbrk (char *str, char *accept)
  */
 
 char * TOOLEXPORT
-_FP_strtok (char *str1, char *str2)
+FP_strtok (char *str1, char *str2)
 {
   static char *optr;
   char *ptr;
@@ -236,7 +263,7 @@ _FP_strtok (char *str1, char *str2)
 
 #ifndef FP_stristr
 char * TOOLEXPORT
-_FP_stristr (char *str1, char *str2)
+FP_stristr (char *str1, char *str2)
 {
   char *ptr1, *ptr2;
 
@@ -264,25 +291,26 @@ _FP_stristr (char *str1, char *str2)
  */
 
 char * TOOLEXPORT
-_FP_strrstr (char *ptr, char *str)
+FP_strrstr (const char *ptr, const char *str)
 {
-  char *found=NULL, *new, *iter=ptr;
+  const char *found=NULL, *new, *iter=ptr;
 
   if (ptr==NULL || str==NULL)
     return NULL;
 
   if (*str == '\0')
-    return ptr;
+    return (char *)ptr;
 
-  while ((new = _FP_strstr (iter, str)) != NULL) {
+  while ((new = FP_strstr (iter, str)) != NULL) {
     found = new;
     iter  = new + 1;
   }
-  return found;
+
+  return (char *)found;
 }
 
 char * TOOLEXPORT
-_FP_strirstr (char *ptr, char *str)
+FP_strirstr (char *ptr, char *str)
 {
   char *found=NULL, *iter=ptr, *new;
 
@@ -291,7 +319,7 @@ _FP_strirstr (char *ptr, char *str)
   if (*str == '\0')
     return ptr;
 
-  while ((new = _FP_stristr (iter, str)) != NULL) {
+  while ((new = FP_stristr (iter, str)) != NULL) {
     found = new;
     iter  = new + 1;
   }
@@ -303,7 +331,7 @@ _FP_strirstr (char *ptr, char *str)
  */
 
 char * TOOLEXPORT
-_FP_stoupper (char *input)
+FP_stoupper (char *input)
 {
   char *iter = input;
 
@@ -318,7 +346,7 @@ _FP_stoupper (char *input)
 }
 
 char * TOOLEXPORT
-_FP_stolower (char *input)
+FP_stolower (char *input)
 {
   char *iter = input;
 
@@ -337,7 +365,7 @@ _FP_stolower (char *input)
  */
 
 int TOOLEXPORT
-_FP_strmatch (char *string, char *pattern)
+FP_strmatch (char *string, char *pattern)
 {
   char *p1 = string, *p2 = pattern;
 
@@ -367,9 +395,9 @@ _FP_strmatch (char *string, char *pattern)
 }
 
 char * TOOLEXPORT
-_FP_strrchr (char *string, int tc)
+FP_strrchr (const char *string, int tc)
 {
-  char *ptr;
+  const char *ptr;
 
   if (string == NULL || !*string)
     return NULL;
@@ -380,7 +408,7 @@ _FP_strrchr (char *string, int tc)
     ptr--;
 
   if (*ptr == tc)
-    return ptr;
+    return (char *)ptr;
 
   return NULL;
 }
@@ -391,16 +419,16 @@ _FP_strrchr (char *string, int tc)
  */
 
 char * TOOLEXPORT
-_FP_cutdir (char *filename)
+FP_cutdir (char *filename)
 {
   char *ptr;
 
   if (filename == NULL)
     return NULL;
 
-  if ((ptr = _FP_strrchr (filename, '/')) != NULL)
+  if ((ptr = FP_strrchr (filename, '/')) != NULL)
     ptr++;
-  else if ((ptr = _FP_strrchr (filename, '\\')) != NULL)
+  else if ((ptr = FP_strrchr (filename, '\\')) != NULL)
     ptr++;
   else
     ptr = filename;
@@ -413,74 +441,50 @@ _FP_cutdir (char *filename)
  * properly: LF (Unix), CRLF (DOS) and CR (Mac).
  */
 /* (schmorp) the buffer is always written to, and no LF is stored at the end */
-char * TOOLEXPORT
-_FP_fgets (char *buf, int n, FILE *stream)
+/* also, if the buffer is too short, the remaining line is skipped */
+ecb_hot char * TOOLEXPORT
+FP_fgets (char *buf, int n, FILE *stream)
 {
-  static char format[64];
-  static int format_n = 0;
-  char *cp = buf;
-  int res;
-  int c;
+  char *ptr = buf;
+  char *end = buf + n - 1;
 
   /* shield against buffer overflows caused by "255 - bytes_left"-kind of bugs when bytes_left > 255 */
   if (n <= 0)
-    return NULL;
-
-  if (format_n != n)
-    {
-      sprintf (format, "%%%d[^\015\012]", n - 1);
-      format_n = n;
-    }
-
-  *buf = 0; /* fscanf return s0 on empty lines */
-  res = fscanf (stream, format, buf);
-
-  if (res == EOF)
-    return 0; /* an error occured */
+    return 0;
 
-  /* skip line endings */
   for (;;)
     {
-      c = _FP_fgetc (stream);
+      int c = FP_getc (stream);
 
-      if (c == '\012') /* LF */
-        return buf;
-      else if (c == '\015') /* CR */
+      if (ecb_expect_false (c <= '\015')) /* EOF is < 0x20, too */
         {
-          c = _FP_fgetc (stream);
-          if (c != '\012') /* CR LF? */
-            ungetc (c, stream);
-
-          return buf;
+          /* ctlchar */
+
+          if (c == '\012')
+            /* LF, nothing following */
+            break;
+          else if (c == '\015')
+            {
+              /* CR, possibly CRLF, skip following LF */
+              c = FP_getc (stream);
+
+              if (c != '\012') /* CR LF? */
+                ungetc (c, stream);
+
+              break;
+            }
+          else if (c == EOF)
+            {
+              *ptr = 0;
+              return 0;
+            }
         }
-      else if (c == EOF)
-        return 0; /* error */
 
-      /* skip remaining line */
+      *ptr = c;
+      ptr += ptr < end; /* this is hopefully branch-free, and fast */
     }
-}
 
-/*
- * A replacement strerror function that just returns the error code
- */
-
-char * TOOLEXPORT
-_FP_strerror (int errcode)
-{
-  static char number[8];
-
-  sprintf (number, "%03d", errcode);
-
-  return number;
+  *ptr = 0;
+  return buf;
 }
-#ifndef HAVE_MKSTEMP
-/*
- * tempnam is not ANSI, but tmpnam is. Ignore the prefix here.
- */
 
-char * TOOLEXPORT
-_FP_tempnam (char *dir, char *pfx)
-{
-  return _FP_strdup (tmpnam (NULL));
-}
-#endif /* HAVE_MKSTEMP */
diff --git a/uulib/fptools.h b/uulib/fptools.h
index 3895087..b776845 100644
--- a/uulib/fptools.h
+++ b/uulib/fptools.h
@@ -17,10 +17,13 @@
 #define FPTOOLS_H__
 
 #include <string.h>
+#include <stdint.h>
 
 typedef signed char schar;
 typedef unsigned char uchar;
 
+#include "ecb.h"
+
 #ifndef TOOLEXPORT
 #define TOOLEXPORT
 #endif
@@ -29,57 +32,54 @@ typedef unsigned char uchar;
 extern "C" {
 #endif
 
-#define _FP_free	FP_free
-#define _FP_strdup	FP_strdup
-#define _FP_strncpy	FP_strncpy
-#define _FP_memdup	FP_memdup
-#define _FP_stricmp	FP_stricmp
-#define _FP_strnicmp	FP_strnicmp
-#define _FP_strrstr	FP_strrstr
-#define _FP_stoupper	FP_stoupper
-#define _FP_stolower	FP_stolower
-#define _FP_strmatch	FP_strmatch
-#define _FP_strstr	FP_strstr
-#define _FP_stristr	FP_stristr
-#define _FP_strirstr	FP_strirstr
-#define _FP_strrchr	FP_strrchr
-#define _FP_fgets	FP_fgets
-#define _FP_strpbrk	FP_strpbrk
-#define _FP_strtok	FP_strtok
-#define _FP_cutdir	FP_cutdir
-#define _FP_strerror	FP_strerror
-#define _FP_tempnam	FP_tempnam
-#define _FP_fgetc	FP_fgetc
-
-#if HAVE_FGETC_UNLOCKED
-# define FP_fgetc(s) fgetc_unlocked (s)
+#if HAVE_GETC_UNLOCKED
+# define FP_getc(s) getc_unlocked (s)
+#else
+# define FP_getc(s) getc (s)
+#endif
+
+#if HAVE_FEOF_UNLOCKED
+# define FP_feof(s) feof_unlocked (s)
 #else
-# define FP_fgetc(s) fgetc (s)
+# define FP_feof(s) feof (s)
+#endif
+
+#if HAVE_FERROR_UNLOCKED
+# define FP_ferror(s) ferror_unlocked (s)
+#else
+# define FP_ferror(s) ferror (s)
+#endif
+
+#if HAVE_FLOCKFILE
+# define FP_flockfile(s) flockfile (s)
+#else
+# define FP_flockfile(s) ((void *)0)
 #endif
 
 #define FP_strstr(a,b) strstr (a, b)
+#define FP_strerror(a) strerror (a)
 
-void	TOOLEXPORT	_FP_free	(void *);
-char *	TOOLEXPORT	_FP_strdup	(char *);
-char *	TOOLEXPORT	_FP_strncpy	(char *, char *, int);
-void *	TOOLEXPORT	_FP_memdup	(void *, int);
-int 	TOOLEXPORT	_FP_stricmp	(char *, char *);
-int 	TOOLEXPORT	_FP_strnicmp	(char *, char *, int);
-char *	TOOLEXPORT	_FP_strrstr	(char *, char *);
-char *	TOOLEXPORT	_FP_stoupper	(char *);
-char *	TOOLEXPORT	_FP_stolower	(char *);
-int 	TOOLEXPORT	_FP_strmatch	(char *, char *);
-char *	TOOLEXPORT	_FP_stristr	(char *, char *);
-char *	TOOLEXPORT	_FP_strirstr	(char *, char *);
-char *	TOOLEXPORT	_FP_strrchr	(char *, int);
-char *	TOOLEXPORT	_FP_fgets	(char *, int, FILE *);
-char *	TOOLEXPORT	_FP_strpbrk	(char *, char *);
-char *	TOOLEXPORT	_FP_strtok	(char *, char *);
-char *	TOOLEXPORT	_FP_cutdir	(char *);
-char *	TOOLEXPORT	_FP_strerror	(int);
-#ifndef HAVE_MKSTEMP
-char *	TOOLEXPORT	_FP_tempnam	(char *, char *);
-#endif /* HAVE_MKSTEMP */
+void	TOOLEXPORT	FP_free		(void *);
+char *	TOOLEXPORT	FP_strdup	(char *);
+char *	TOOLEXPORT	FP_strncpy	(char *, char *, int);
+void *	TOOLEXPORT	FP_memdup	(const void *, int);
+int	TOOLEXPORT	FP_stricmp	(const char *, const char *);
+int	TOOLEXPORT	FP_strnicmp	(const char *, const char *, int);
+char *	TOOLEXPORT	FP_strrstr	(const char *, const char *);
+char *	TOOLEXPORT	FP_stoupper	(char *);
+char *	TOOLEXPORT	FP_stolower	(char *);
+int	TOOLEXPORT	FP_strmatch	(char *, char *);
+char *	TOOLEXPORT	FP_stristr	(char *, char *);
+char *	TOOLEXPORT	FP_strirstr	(char *, char *);
+char *	TOOLEXPORT	FP_strrchr	(const char *, int);
+char *	TOOLEXPORT	FP_fgets	(char *, int, FILE *);
+char *	TOOLEXPORT	FP_strpbrk	(char *, char *);
+char *	TOOLEXPORT	FP_strtok	(char *, char *);
+char *	TOOLEXPORT	FP_cutdir	(char *);
+
+/* like stgricmp, but only works when one of the strings is printable ascii */
+/* not containing any of these characters: @`[\]^:_{|}~ */
+int	TOOLEXPORT	FP_strnicmp_fast (const char *, const char *, int);
 
 #if 0 /* API differs too much between systems to make those replacements */
 #if HAVE_STRCASECMP
@@ -95,6 +95,25 @@ char *	TOOLEXPORT	_FP_tempnam	(char *, char *);
 #endif
 #endif
 
+/* this hashes in the final 0 octet to avoid a branch - might or might not be worth it */
+/* this also means that this function distinguishes between NULL and "" */
+static uint32_t
+fnv1a (const char *str)
+{
+  uint32_t hash = 0x811C9DC5, c;
+
+  if (str)
+    for (;;)
+      {
+        c = *str++;
+        hash = (hash ^ c) * 16777619;
+        if (!c)
+          break;
+      }
+
+  return hash;
+}
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/uulib/uucheck.c b/uulib/uucheck.c
index a9b7d45..b596f26 100644
--- a/uulib/uucheck.c
+++ b/uulib/uucheck.c
@@ -97,7 +97,7 @@ static char *brackchr[] = {
 
 /*
  * Extract a filename from the subject line. We need anything to identify
- * the name of the program for sorting. If a nice filename cannot be found, 
+ * the name of the program for sorting. If a nice filename cannot be found,
  * the subject line itself is used
  * ptonum is, if not NULL, a pointer to the part number in the subject line,
  * so that it won't be used as filename.
@@ -133,14 +133,14 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
  * a file named "Repost" :-)
  **/
 
-  if (_FP_strnicmp (subject, "repost", 6) == 0)
+  if (FP_strnicmp (subject, "repost", 6) == 0)
     subject += 6;
-  if (_FP_strnicmp (subject, "re:", 3) == 0)
+  if (FP_strnicmp (subject, "re:", 3) == 0)
     subject += 3;
 
   while (*subject == ' ' || *subject == ':') subject++;
 
-  part = _FP_stristr (subject, "part");
+  part = FP_stristr (subject, "part");
   if (part == subject) {
     subject += 4;
     while (*subject == ' ') subject++;
@@ -162,7 +162,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
     while (isspace (*iter))
       iter++;
     count = length = alflag = 0;
-    while (iter[count] && 
+    while (iter[count] &&
 	   (isalnum (iter[count]) || strchr (fnchars, iter[count])!=NULL)) {
       if (isalpha (iter[count]))
 	alflag++;
@@ -222,19 +222,19 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
     while (*ptr && *ptr != 0x0a && *ptr != 0x0d) {
       iter  = ptr;
       count = length = alflag = 0;
-      
-      if (_FP_strnicmp (ptr, "ftp", 3) == 0) {
+
+      if (FP_strnicmp (ptr, "ftp", 3) == 0) {
 	/* hey, that's an ftp address */
 	while (isalpha (*ptr) || isdigit (*ptr) || *ptr == '.')
 	  ptr++;
 	continue;
       }
-      
+
       while ((isalnum(*iter)||strchr(fnchars, *iter)!=NULL||
 	      *iter=='/') && *iter && iter != ptonum && *iter != '.') {
 	if (isalpha (*iter))
 	  alflag = 1;
-	
+
 	count++; iter++;
       }
       if (*iter == '\0' || iter == ptonum) {
@@ -262,8 +262,8 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
 	continue;
       }
 
-      if (_FP_strnicmp (iter, "edu", 3) == 0 || 
-	  _FP_strnicmp (iter, "gov", 3) == 0) {
+      if (FP_strnicmp (iter, "edu", 3) == 0 ||
+	  FP_strnicmp (iter, "gov", 3) == 0) {
 	/* hey, that's an ftp address */
 	while (isalpha (*iter) || isdigit (*iter) || *iter == '.')
 	  iter++;
@@ -271,21 +271,21 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
 	length = 0;
 	continue;
       }
-      
+
       length += count + 1;
       count   = 0;
-      
+
       while ((isalnum(iter[count])||strchr(fnchars, iter[count])!=NULL||
 	      iter[count]=='/') && iter[count] && iter[count] != '.')
 	count++;
-      
+
       if (iter[count]==':' && iter[count+1]=='/') {
 	/* looks like stuff from a mail server */
 	ptr = iter + 1;
 	length = 0;
 	continue;
       }
-      
+
       if (count > 8 || iter == ptonum) {
 	ptr    = iter;
 	length = 0;
@@ -296,19 +296,19 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
 	length += count;
 	break;
       }
-      
+
       while (iter[count] &&
 	     (isalnum(iter[count])||strchr(fnchars, iter[count])!=NULL||
 	      iter[count]=='/'))
 	count++;
-      
+
       if (iter[count]==':' && iter[count+1]=='/') {
 	/* looks like stuff from a mail server */
 	ptr = iter + 1;
 	length = 0;
 	continue;
       }
-      
+
       if (count < 12 && iter != ptonum) {
 	length += count;
 	break;
@@ -326,7 +326,7 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
       ptr++;
 
     while ((isalnum(ptr[length])||strchr(fnchars,ptr[length])!=NULL||
-	    ptr[length] == '/') && 
+	    ptr[length] == '/') &&
 	   ptr[length] && ptr+length!=part && ptr+length!=ptonum)
       length++;
 
@@ -363,10 +363,10 @@ UUGetFileName (char *subject, char *ptonum, char *ptonend)
 	       uustring (S_OUT_OF_MEMORY), length+1);
     return NULL;
   }
-    
+
   memcpy (result, ptr, length);
   result[length] = '\0';
-    
+
   return uu_FileNameCallback ? uu_FileNameCallback(uu_FNCBArg, subject, result) : result;
 }
 
@@ -426,7 +426,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
       }
       while (isdigit (iter[count]))
 	count++;
-      
+
       if (iter[count] == '\0') {
 	iter += count;
 	break;
@@ -444,14 +444,14 @@ UUGetPartNo (char *subject, char **where, char **whend)
 
       while (iter[count] == ' ' || iter[count] == '#' ||
 	     iter[count] == '/' || iter[count] == '\\')  count++;
-      
-      if (_FP_strnicmp (iter + count, "of", 2) == 0)
+
+      if (FP_strnicmp (iter + count, "of", 2) == 0)
 	count += 2;
-      
+
       while (iter[count] == ' ')    count++;
       while (isdigit (iter[count])) count++;
       while (iter[count] == ' ')    count++;
-      
+
       if (iter[count] == brackchr[uu_bracket_policy][bpc+1]) {
 	*where  = iter;
 	bdel[0] = brackchr[uu_bracket_policy][bpc+1];
@@ -472,7 +472,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
    */
 
   if (length == 0) {
-    if ((iter = _FP_stristr (subject, "part ")) != NULL) {
+    if ((iter = FP_stristr (subject, "part ")) != NULL) {
       iter += 5;
 
       while (isspace (*iter) || *iter == '.' || *iter == '-')
@@ -482,16 +482,16 @@ UUGetPartNo (char *subject, char **where, char **whend)
         length++;
 
       if (length == 0) {
-	if (_FP_strnicmp (iter, "one", 3) == 0)        length = 1;
-	else if (_FP_strnicmp (iter, "two", 3) == 0)   length = 2;
-	else if (_FP_strnicmp (iter, "three", 5) == 0) length = 3;
-	else if (_FP_strnicmp (iter, "four",  4) == 0) length = 4;
-	else if (_FP_strnicmp (iter, "five",  4) == 0) length = 5;
-	else if (_FP_strnicmp (iter, "six",   3) == 0) length = 6;
-	else if (_FP_strnicmp (iter, "seven", 5) == 0) length = 7;
-	else if (_FP_strnicmp (iter, "eight", 5) == 0) length = 8;
-	else if (_FP_strnicmp (iter, "nine",  4) == 0) length = 9;
-	else if (_FP_strnicmp (iter, "ten",   3) == 0) length = 10;
+	if (FP_strnicmp (iter, "one", 3) == 0)        length = 1;
+	else if (FP_strnicmp (iter, "two", 3) == 0)   length = 2;
+	else if (FP_strnicmp (iter, "three", 5) == 0) length = 3;
+	else if (FP_strnicmp (iter, "four",  4) == 0) length = 4;
+	else if (FP_strnicmp (iter, "five",  4) == 0) length = 5;
+	else if (FP_strnicmp (iter, "six",   3) == 0) length = 6;
+	else if (FP_strnicmp (iter, "seven", 5) == 0) length = 7;
+	else if (FP_strnicmp (iter, "eight", 5) == 0) length = 8;
+	else if (FP_strnicmp (iter, "nine",  4) == 0) length = 9;
+	else if (FP_strnicmp (iter, "ten",   3) == 0) length = 10;
 
 	if (length && (*whend = strchr (iter, ' '))) {
 	  *where = iter;
@@ -512,7 +512,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
    */
 
   if (length == 0) {
-    if ((iter = _FP_stristr (subject, "part")) != NULL) {
+    if ((iter = FP_stristr (subject, "part")) != NULL) {
       iter += 4;
 
       while (isspace (*iter) || *iter == '.' || *iter == '-')
@@ -522,16 +522,16 @@ UUGetPartNo (char *subject, char **where, char **whend)
         length++;
 
       if (length == 0) {
-	if (_FP_strnicmp (iter, "one", 3) == 0)        length = 1;
-	else if (_FP_strnicmp (iter, "two", 3) == 0)   length = 2;
-	else if (_FP_strnicmp (iter, "three", 5) == 0) length = 3;
-	else if (_FP_strnicmp (iter, "four",  4) == 0) length = 4;
-	else if (_FP_strnicmp (iter, "five",  4) == 0) length = 5;
-	else if (_FP_strnicmp (iter, "six",   3) == 0) length = 6;
-	else if (_FP_strnicmp (iter, "seven", 5) == 0) length = 7;
-	else if (_FP_strnicmp (iter, "eight", 5) == 0) length = 8;
-	else if (_FP_strnicmp (iter, "nine",  4) == 0) length = 9;
-	else if (_FP_strnicmp (iter, "ten",   3) == 0) length = 10;
+	if (FP_strnicmp (iter, "one", 3) == 0)        length = 1;
+	else if (FP_strnicmp (iter, "two", 3) == 0)   length = 2;
+	else if (FP_strnicmp (iter, "three", 5) == 0) length = 3;
+	else if (FP_strnicmp (iter, "four",  4) == 0) length = 4;
+	else if (FP_strnicmp (iter, "five",  4) == 0) length = 5;
+	else if (FP_strnicmp (iter, "six",   3) == 0) length = 6;
+	else if (FP_strnicmp (iter, "seven", 5) == 0) length = 7;
+	else if (FP_strnicmp (iter, "eight", 5) == 0) length = 8;
+	else if (FP_strnicmp (iter, "nine",  4) == 0) length = 9;
+	else if (FP_strnicmp (iter, "ten",   3) == 0) length = 10;
 
 	if (length && (*whend = strchr (iter, ' '))) {
 	  *where = iter;
@@ -552,7 +552,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
    */
 
   if (length == 0) {
-    if ((iter = _FP_strirstr (subject, "of")) != NULL) {
+    if ((iter = FP_strirstr (subject, "of")) != NULL) {
       while (iter>subject && isspace (*(iter-1)))
 	iter--;
       if (isdigit(*(iter-1))) {
@@ -610,7 +610,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
   if (length == 0) {
     count = strlen(subject) - 1;
     ptr   = subject;
- 
+
     while (count > 0) {
       if (!isdigit(ptr[count])||isalpha(ptr[count+1])||ptr[count+1] == '.') {
 	count--;
@@ -621,10 +621,10 @@ UUGetPartNo (char *subject, char **where, char **whend)
       while (count >= 0 && isdigit (ptr[count])) {
 	count--; length++;
       }
-      if (count>=0 && ((isalpha (ptr[count]) && 
+      if (count>=0 && ((isalpha (ptr[count]) &&
 			(ptr[count] != 's' || ptr[count+1] != 't') &&
-			(ptr[count] != 'n' || ptr[count+1] != 'd')) || 
-		       ptr[count] == '/' || ptr[count] == '.' || 
+			(ptr[count] != 'n' || ptr[count+1] != 'd')) ||
+		       ptr[count] == '/' || ptr[count] == '.' ||
 		       ptr[count] == '-' || ptr[count] == '_')) {
         length = 0;
         continue;
@@ -651,19 +651,19 @@ UUGetPartNo (char *subject, char **where, char **whend)
     /*
      * some people use the strangest things, including spelling mistakes :-)
      */
-    if ((iter = _FP_stristr (subject, "first")) != NULL)        length = 1;
-    else if ((iter = _FP_stristr (subject, "second")) != NULL)  length = 2;
-    else if ((iter = _FP_stristr (subject, "third")) != NULL)   length = 3;
-    else if ((iter = _FP_stristr (subject, "forth")) != NULL)   length = 4;
-    else if ((iter = _FP_stristr (subject, "fourth")) != NULL)  length = 4;
-    else if ((iter = _FP_stristr (subject, "fifth")) != NULL)   length = 5;
-    else if ((iter = _FP_stristr (subject, "sixth")) != NULL)   length = 6;
-    else if ((iter = _FP_stristr (subject, "seventh")) != NULL) length = 7;
-    else if ((iter = _FP_stristr (subject, "eigth")) != NULL)   length = 8;
-    else if ((iter = _FP_stristr (subject, "eighth")) != NULL)  length = 8;
-    else if ((iter = _FP_stristr (subject, "nineth")) != NULL)  length = 9;
-    else if ((iter = _FP_stristr (subject, "ninth")) != NULL)   length = 9;
-    else if ((iter = _FP_stristr (subject, "tenth")) != NULL)   length = 10;
+    if ((iter = FP_stristr (subject, "first")) != NULL)        length = 1;
+    else if ((iter = FP_stristr (subject, "second")) != NULL)  length = 2;
+    else if ((iter = FP_stristr (subject, "third")) != NULL)   length = 3;
+    else if ((iter = FP_stristr (subject, "forth")) != NULL)   length = 4;
+    else if ((iter = FP_stristr (subject, "fourth")) != NULL)  length = 4;
+    else if ((iter = FP_stristr (subject, "fifth")) != NULL)   length = 5;
+    else if ((iter = FP_stristr (subject, "sixth")) != NULL)   length = 6;
+    else if ((iter = FP_stristr (subject, "seventh")) != NULL) length = 7;
+    else if ((iter = FP_stristr (subject, "eigth")) != NULL)   length = 8;
+    else if ((iter = FP_stristr (subject, "eighth")) != NULL)  length = 8;
+    else if ((iter = FP_stristr (subject, "nineth")) != NULL)  length = 9;
+    else if ((iter = FP_stristr (subject, "ninth")) != NULL)   length = 9;
+    else if ((iter = FP_stristr (subject, "tenth")) != NULL)   length = 10;
     else iter = NULL;
 
     if (length && iter && (*whend = strchr (iter, ' '))) {
@@ -680,7 +680,7 @@ UUGetPartNo (char *subject, char **where, char **whend)
   *where = iter;
 
   if (delim && delim[0]) {
-    if ((*whend=_FP_stristr (iter, delim)) != NULL && (*whend - *where) < 12) {
+    if ((*whend=FP_stristr (iter, delim)) != NULL && (*whend - *where) < 12) {
       ptr = (*whend += strlen (delim));
 
       while (*ptr == ' ')
@@ -736,7 +736,7 @@ UUPreProcessPart (fileread *data, int *ret)
   }
 
   if (data->filename != NULL) {
-    if ((result->filename = _FP_strdup (data->filename)) == NULL) {
+    if ((result->filename = FP_strdup (data->filename)) == NULL) {
       UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_OUT_OF_MEMORY),
 		 strlen (data->filename)+1);
@@ -754,10 +754,10 @@ UUPreProcessPart (fileread *data, int *ret)
     result->subfname = NULL;
 
   result->yefilesize = data->yefilesize;
-  result->mimeid     = _FP_strdup (data->mimeid);
-  result->mimetype   = _FP_strdup (data->mimetype);
+  result->mimeid     = FP_strdup (data->mimeid);
+  result->mimetype   = FP_strdup (data->mimetype);
 
-  if (result->partno == -1 && 
+  if (result->partno == -1 &&
       (data->uudet == PT_ENCODED || data->uudet == QP_ENCODED))
     result->partno = 1;
 
@@ -767,12 +767,12 @@ UUPreProcessPart (fileread *data, int *ret)
      */
     if (result->filename == NULL) {
       sprintf (temp, "%s.%03d", nofname, ++nofnum);
-      result->filename = _FP_strdup (temp);
+      result->filename = FP_strdup (temp);
     }
     if (result->subfname == NULL)
-      result->subfname = _FP_strdup (result->filename);
+      result->subfname = FP_strdup (result->filename);
 
-    if (result->filename == NULL || 
+    if (result->filename == NULL ||
 	result->subfname == NULL) {
       UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_OUT_OF_MEMORY),
@@ -786,8 +786,8 @@ UUPreProcessPart (fileread *data, int *ret)
       result->partno = 1;
   }
   else if (result->subfname == NULL && data->uudet &&
-      (data->begin || result->partno == 1 || 
-       (!uu_dumbness && result->partno == -1 && 
+      (data->begin || result->partno == 1 ||
+       (!uu_dumbness && result->partno == -1 &&
 	(data->subject != NULL || result->filename != NULL)))) {
     /*
      * If it's the first part of something and has some valid data, but
@@ -797,10 +797,10 @@ UUPreProcessPart (fileread *data, int *ret)
      * in this case, it really _should_ have a filename somewhere
      */
     if (result->filename != NULL && *result->filename)
-      result->subfname = _FP_strdup (result->filename);
+      result->subfname = FP_strdup (result->filename);
     else { /* if not, escape to UNKNOWN. We need to fill subfname */
       sprintf (temp, "%s.%03d", nofname, ++nofnum);
-      result->subfname = _FP_strdup (temp);
+      result->subfname = FP_strdup (temp);
     }
     /*
      * in case the strdup failed
@@ -825,7 +825,7 @@ UUPreProcessPart (fileread *data, int *ret)
       lastvalid = 1;
       lastenc   = data->uudet;
       lastpart  = result->partno = 1;
-      _FP_strncpy (uucheck_lastname, result->subfname, 256);
+      FP_strncpy (uucheck_lastname, result->subfname, 256);
     }
     else
       result->partno = 1;
@@ -837,9 +837,9 @@ UUPreProcessPart (fileread *data, int *ret)
      * under the same id.
      */
     if (result->filename)
-      result->subfname = _FP_strdup (result->filename);
+      result->subfname = FP_strdup (result->filename);
     else
-      result->subfname = _FP_strdup (result->mimeid);
+      result->subfname = FP_strdup (result->mimeid);
   }
   else if (result->subfname == NULL && data->uudet) {
     /*
@@ -851,10 +851,10 @@ UUPreProcessPart (fileread *data, int *ret)
        * Assume it's the first part. I wonder why it's got no part number?
        */
       if (result->filename != NULL && *result->filename)
-        result->subfname = _FP_strdup (result->filename);
+        result->subfname = FP_strdup (result->filename);
       else { /* if not, escape to UNKNOWN. We need to fill subfname */
         sprintf (temp, "%s.%03d", nofname, ++nofnum);
-        result->subfname = _FP_strdup (temp);
+        result->subfname = FP_strdup (temp);
       }
       if (result->subfname == NULL) {
 	UUMessage (uucheck_id, __LINE__, UUMSG_ERROR,
@@ -868,7 +868,7 @@ UUPreProcessPart (fileread *data, int *ret)
       lastvalid = 0;
     }
     else if (lastvalid && data->uudet == lastenc && result->partno == -1) {
-      result->subfname = _FP_strdup (uucheck_lastname);
+      result->subfname = FP_strdup (uucheck_lastname);
       result->partno   = ++lastpart;
 
       /*
@@ -878,10 +878,10 @@ UUPreProcessPart (fileread *data, int *ret)
 	lastvalid = 0;
     }
     else if (data->partno != -1 && result->filename) {
-      result->subfname = _FP_strdup (result->filename);
+      result->subfname = FP_strdup (result->filename);
     }
-    else { 
-      /* 
+    else {
+      /*
        * it's got no info, it's got no begin, and we don't know anything
        * about this part. Let's forget all about it.
        */
@@ -917,11 +917,11 @@ UUPreProcessPart (fileread *data, int *ret)
 
   if (result->partno == -1 && data->begin) {
     /*
-     * hmm, this is reason enough to initialize lastvalid, at least 
+     * hmm, this is reason enough to initialize lastvalid, at least
      * if we have no end
      */
     if (!data->end) {
-      _FP_strncpy (uucheck_lastname, result->subfname, 256);
+      FP_strncpy (uucheck_lastname, result->subfname, 256);
       result->partno = lastpart = 1;
       lastenc = data->uudet;
       lastvalid = 1;
@@ -930,7 +930,7 @@ UUPreProcessPart (fileread *data, int *ret)
       result->partno = 1;
   }
   else if (result->partno == -1 && data->uudet) {
-    if (lastvalid && _FP_stricmp (uucheck_lastname, result->subfname) == 0) {
+    if (lastvalid && FP_stricmp (uucheck_lastname, result->subfname) == 0) {
       /*
        * if the subject filename is the same as last time, use part no
        * of lastvalid. If at end, invalidate lastvalid
@@ -970,9 +970,9 @@ UUPreProcessPart (fileread *data, int *ret)
  skipcheck:
 
   if (result->filename) {
-    if (*(ptr = _FP_cutdir (result->filename))) {
-      p2 = _FP_strdup (ptr);
-      _FP_free (result->filename);
+    if (*(ptr = FP_cutdir (result->filename))) {
+      p2 = FP_strdup (ptr);
+      FP_free (result->filename);
       result->filename = p2;
     }
   }
@@ -989,46 +989,59 @@ UUPreProcessPart (fileread *data, int *ret)
  * Insert one part of a file into the global list
  **/
 
-int
+ecb_hot int
 UUInsertPartToList (uufile *data)
 {
   uulist *iter = UUGlobalFileList, *unew;
   uufile *fiter, *last;
 
+  uint32_t mimeid_hash   = fnv1a (data->mimeid);
+  uint32_t filename_hash = fnv1a (data->filename);
+
+  /* cache locally so the compiler has it easier to reason */
+  fileread *data_data = data->data;
+
   /*
-   * Part belongs together, if
-   * (1) The MIME-IDs match, or
-   * (2) The file name received from the subject lines match, and
+   * Part belongs together, if either
+   * (1) The file name received from the subject lines match, and
    *     (a) Not both parts have a begin line
    *     (b) Not both parts have an end line
    *     (c) Both parts don't have different MIME-IDs
    *     (d) Both parts don't encode different files
    *     (e) The other part wants to stay alone (FL_SINGLE)
    *     (g) The yencode file size matches.
+   * (2) The MIME-IDs match
    */
 
+  /* TODO: use two hash tables, keyed on filename and mimeid */
+  /* unfortunately, its not so easy, as lots of code inserts in interesting ways, */
+  /* so I tried to conventionally speed up the search by replacing strcmp with */
+  /* hash comparisons, reordering and prefetching struct members and so on */
+
   /*
    * check if this part wants to be left alone. If so, don't bother
    * to do all the checks
    */
+  if (data_data->flags & FL_SINGLE)
+    goto newpart;
 
   while (iter) {
-    if (data->data->flags & FL_SINGLE) {
-      /* this space intentionally left blank */
-    }
-    else if ((data->mimeid && iter->mimeid && strcmp (data->mimeid, iter->mimeid) == 0)
-             ||
-	     (
-              1
-	      && !(iter->thisfile && iter->thisfile->yefilesize != data->yefilesize)
-	      && !(iter->begin && data->data->begin)
-	      && !(iter->end   && data->data->end)
-	      && !(iter->flags & FL_SINGLE)
-	      && !(data->filename && iter->filename && strcmp (data->filename, iter->filename) != 0)
-              && _FP_stricmp (data->subfname, iter->subfname) == 0
-	      && !(data->mimeid   && iter->mimeid   && strcmp (data->mimeid,   iter->mimeid)   != 0)
-             )
-            ) {
+    ecb_prefetch (iter->NEXT, 0, 1);
+    if (
+	(
+          1
+          && filename_hash == iter->filename_hash
+             && (data->filename && iter->filename && strcmp (data->filename, iter->filename) == 0)
+	  && !(iter->begin && data_data->begin)
+	  && !(iter->end   && data_data->end)
+	  && !(iter->flags & FL_SINGLE)
+	  && !(iter->thisfile && iter->thisfile->yefilesize != data->yefilesize)
+          && FP_stricmp (data->subfname, iter->subfname) == 0
+          && mimeid_hash == iter->mimeid_hash
+             && !(data->mimeid && iter->mimeid && strcmp (data->mimeid, iter->mimeid) != 0)
+        )
+        || (mimeid_hash == iter->mimeid_hash && data->mimeid && iter->mimeid && strcmp (data->mimeid, iter->mimeid) == 0)
+       ) {
 
       /*
        * Don't insert a part that is already there.
@@ -1048,7 +1061,7 @@ UUInsertPartToList (uufile *data)
       }
 
       if (iter->filename == NULL && data->filename != NULL) {
-        if ((iter->filename = _FP_strdup (data->filename)) == NULL)
+        if ((iter->filename = FP_strdup (data->filename)) == NULL)
 	  return UURET_NOMEM;
       }
 
@@ -1057,11 +1070,11 @@ UUInsertPartToList (uufile *data)
        * file was really XX
        */
 
-      if (data->data->uudet == B64ENCODED && 
+      if (data_data->uudet == B64ENCODED &&
 	  iter->uudet == XX_ENCODED && iter->begin) {
-	data->data->uudet = XX_ENCODED;
+	data_data->uudet = XX_ENCODED;
       }
-      else if (data->data->uudet == XX_ENCODED && data->data->begin &&
+      else if (data_data->uudet == XX_ENCODED && data_data->begin &&
 	       iter->uudet == B64ENCODED) {
 	iter->uudet = XX_ENCODED;
 
@@ -1076,25 +1089,26 @@ UUInsertPartToList (uufile *data)
        * If this is from a Message/Partial, we believe only the
        * iter->uudet from the first part
        */
-      if (data->data->flags & FL_PARTIAL) {
+      if (data_data->flags & FL_PARTIAL) {
 	if (data->partno == 1) {
-	  iter->uudet = data->data->uudet;
-	  iter->flags = data->data->flags;
+	  iter->uudet = data_data->uudet;
+	  iter->flags = data_data->flags;
 	}
       }
       else {
-	if (data->data->uudet) iter->uudet = data->data->uudet;
-	if (data->data->flags) iter->flags = data->data->flags;
+	if (data_data->uudet) iter->uudet = data_data->uudet;
+	if (data_data->flags) iter->flags = data_data->flags;
       }
 
-      if (iter->mode == 0 && data->data->mode != 0)
-        iter->mode = data->data->mode;
-      if (data->data->begin) iter->begin = (data->partno)?data->partno:1;
-      if (data->data->end)   iter->end   = (data->partno)?data->partno:1;
+      if (iter->mode == 0 && data_data->mode != 0)
+        iter->mode = data_data->mode;
+
+      if (data_data->begin) iter->begin = data->partno ? data->partno : 1;
+      if (data_data->end)   iter->end   = data->partno ? data->partno : 1;
 
       if (data->mimetype) {
-	_FP_free (iter->mimetype);
-	iter->mimetype = _FP_strdup (data->mimetype);
+	FP_free (iter->mimetype);
+	iter->mimetype = FP_strdup (data->mimetype);
       }
 
       /*
@@ -1123,10 +1137,10 @@ UUInsertPartToList (uufile *data)
 	if (data->partno == fiter->partno) {
           if (fiter->data->subject == NULL)
             return UURET_NODATA;
-	  else if (_FP_stristr (fiter->data->subject, "repost") != NULL &&
-		   _FP_stristr (data->data->subject,  "repost") == NULL)
+	  else if (FP_stristr (fiter->data->subject, "repost") != NULL &&
+		   FP_stristr (data_data->subject,  "repost") == NULL)
 	    return UURET_NODATA;
-          else if (fiter->data->uudet && !data->data->uudet)
+          else if (fiter->data->uudet && !data_data->uudet)
             return UURET_NODATA;
           else {
 	    /*
@@ -1149,7 +1163,7 @@ UUInsertPartToList (uufile *data)
 	 * if at the end of the part list, add it
 	 */
 
-	if (fiter->NEXT == NULL || 
+	if (fiter->NEXT == NULL ||
 	    (data->partno != -1 && data->partno < fiter->NEXT->partno)) {
 	  data->NEXT  = fiter->NEXT;
 	  fiter->NEXT = data;
@@ -1159,21 +1173,22 @@ UUInsertPartToList (uufile *data)
 
 	  return UURET_OK;
 	}
+
         last  = fiter;
 	fiter = fiter->NEXT;
       }
-      
+
       return UURET_OK; /* Shouldn't get here */
     }
-  goahead:
-    /*
-     * we need iter below
-     */
-    if (iter->NEXT == NULL) 
-      break;
 
+  goahead:
     iter = iter->NEXT;
+
+    if (!iter)
+      break;
   }
+
+newpart:
   /*
    * handle new entry
    */
@@ -1185,41 +1200,43 @@ UUInsertPartToList (uufile *data)
      * had a 'begin', it'd have got a part number assigned by
      * UUPreProcessPart().
      */
-    if (data->data->uudet == B64ENCODED || data->data->uudet == BH_ENCODED)
+    if (data_data->uudet == B64ENCODED || data_data->uudet == BH_ENCODED)
       data->partno = 1;
     else
       return UURET_NODATA;
   }
 
-  if ((unew = (uulist *) malloc (sizeof (uulist))) == NULL) {
+  if ((unew = (uulist *)malloc (sizeof (uulist))) == NULL) {
     return UURET_NOMEM;
   }
 
   {
-    static uulist uulist_new;
+    const uulist uulist_new = { 0 };
     *unew = uulist_new; /* zero-initialise the structure */
   }
 
-  if ((unew->subfname = _FP_strdup (data->subfname)) == NULL) {
-    _FP_free (unew);
+  if ((unew->subfname = FP_strdup (data->subfname)) == NULL) {
+    FP_free (unew);
     return UURET_NOMEM;
   }
 
+  unew->filename_hash = filename_hash;
   if (data->filename != NULL) {
-    if ((unew->filename = _FP_strdup (data->filename)) == NULL) {
-      _FP_free (unew->subfname);
-      _FP_free (unew);
+    if ((unew->filename = FP_strdup (data->filename)) == NULL) {
+      FP_free (unew->subfname);
+      FP_free (unew);
       return UURET_NOMEM;
     }
   }
   else
     unew->filename = NULL;
 
+  unew->mimeid_hash = mimeid_hash;
   if (data->mimeid != NULL) {
-    if ((unew->mimeid = _FP_strdup (data->mimeid)) == NULL) {
-      _FP_free (unew->subfname);
-      _FP_free (unew->filename);
-      _FP_free (unew);
+    if ((unew->mimeid = FP_strdup (data->mimeid)) == NULL) {
+      FP_free (unew->subfname);
+      FP_free (unew->filename);
+      FP_free (unew);
       return UURET_NOMEM;
     }
   }
@@ -1227,11 +1244,11 @@ UUInsertPartToList (uufile *data)
     unew->mimeid = NULL;
 
   if (data->mimetype != NULL) {
-    if ((unew->mimetype = _FP_strdup (data->mimetype)) == NULL) {
-      _FP_free (unew->mimeid);
-      _FP_free (unew->subfname);
-      _FP_free (unew->filename);
-      _FP_free (unew);
+    if ((unew->mimetype = FP_strdup (data->mimetype)) == NULL) {
+      FP_free (unew->mimeid);
+      FP_free (unew->subfname);
+      FP_free (unew->filename);
+      FP_free (unew);
       return UURET_NOMEM;
     }
   }
@@ -1240,16 +1257,15 @@ UUInsertPartToList (uufile *data)
 
   unew->state     = UUFILE_READ;
   unew->thisfile  = data;
-  unew->mode      = data->data->mode;
-  unew->uudet     = data->data->uudet;
-  unew->flags     = data->data->flags;
-  unew->begin     = data->data->begin ? (data->partno ? data->partno : 1) : 0;
-  unew->end       = data->data->end   ? (data->partno ? data->partno : 1) : 0;
-
-  if (iter == NULL)
-    UUGlobalFileList = unew;
-  else
-    iter->NEXT = unew;
+  unew->mode      = data_data->mode;
+  unew->uudet     = data_data->uudet;
+  unew->flags     = data_data->flags;
+  unew->begin     = data_data->begin ? (data->partno ? data->partno : 1) : 0;
+  unew->end       = data_data->end   ? (data->partno ? data->partno : 1) : 0;
+
+  /* insert at the beginning, as parts often show up in bursts */
+  unew->NEXT = UUGlobalFileList;
+  UUGlobalFileList = unew;
 
   return UURET_OK;
 }
@@ -1277,7 +1293,7 @@ UUCheckGlobalList (void)
       continue;
     }
     else if ((liter->uudet == QP_ENCODED ||
-	      liter->uudet == PT_ENCODED) && 
+	      liter->uudet == PT_ENCODED) &&
 	     (liter->flags & FL_SINGLE)) {
       if ((liter->flags&FL_PROPER)==0)
 	liter->size = -1;
@@ -1348,7 +1364,7 @@ UUCheckGlobalList (void)
 
     if (fiter->data->begin) flag |= 1;
     if (fiter->data->end)   flag |= 2;
-    if (fiter->data->uudet) flag |= 4; 
+    if (fiter->data->uudet) flag |= 4;
 
     /*
      * guess size of part
@@ -1369,7 +1385,7 @@ UUCheckGlobalList (void)
       thesize += fiter->data->length;
       break;
     }
-      
+
     fiter = fiter->NEXT;
 
     while (fiter != NULL) {
@@ -1377,7 +1393,7 @@ UUCheckGlobalList (void)
 	misparts[miscount++] = count;
 
       part = fiter->partno;
-      
+
       if (havecount < MAXPLIST)
 	haveparts[havecount++] = part;
 
@@ -1403,7 +1419,7 @@ UUCheckGlobalList (void)
 
       if (fiter->data->end)
 	break;
-	
+
       fiter = fiter->NEXT;
     }
 
@@ -1412,7 +1428,7 @@ UUCheckGlobalList (void)
      * encoded, there's a begin line and encoded data, assume it's
      * there.
      */
-    
+
     if (uu_fast_scanning && (flag & 0x01) && (flag & 0x04) &&
 	(liter->uudet == UU_ENCODED || liter->uudet == XX_ENCODED))
       flag |= 2;
@@ -1421,19 +1437,19 @@ UUCheckGlobalList (void)
      * Set the parts we have and/or missing
      */
 
-    _FP_free (liter->haveparts);
-    _FP_free (liter->misparts);
+    FP_free (liter->haveparts);
+    FP_free (liter->misparts);
 
     liter->haveparts = NULL;
     liter->misparts  = NULL;
-    
+
     if (havecount) {
       if ((liter->haveparts=(int*)malloc((havecount+1)*sizeof(int)))!=NULL) {
 	memcpy (liter->haveparts, haveparts, havecount*sizeof(int));
 	liter->haveparts[havecount] = 0;
       }
     }
-    
+
     if (miscount) {
       if ((liter->misparts=(int*)malloc((miscount+1)*sizeof(int)))!=NULL) {
 	memcpy (liter->misparts, misparts, miscount*sizeof(int));
@@ -1449,7 +1465,7 @@ UUCheckGlobalList (void)
     if ((flag & 1) == 0) liter->state |= UUFILE_NOBEGIN;
     if ((flag & 2) == 0) liter->state |= UUFILE_NOEND;
     if ((flag & 4) == 0) liter->state |= UUFILE_NODATA;
-    
+
     if ((flag & 7) == 7 && miscount==0) {
       liter->state = UUFILE_OK;
     }
@@ -1459,18 +1475,18 @@ UUCheckGlobalList (void)
     else
       liter->size = thesize;
 
-    if (liter->state==UUFILE_OK && 
+    if (liter->state==UUFILE_OK &&
         (liter->filename==NULL || liter->filename[0]=='\0')) {
       /*
        * Emergency backup if the file does not have a filename
        */
-      _FP_free (liter->filename);
+      FP_free (liter->filename);
       if (liter->subfname && liter->subfname[0] &&
-          _FP_strpbrk (liter->subfname, "()[];: ") == NULL)
-        liter->filename = _FP_strdup (liter->subfname);
+          FP_strpbrk (liter->subfname, "()[];: ") == NULL)
+        liter->filename = FP_strdup (liter->subfname);
       else {
         sprintf (uucheck_tempname, "%s.%03d", nofname, ++nofnum);
-        liter->filename = _FP_strdup (uucheck_tempname);
+        liter->filename = FP_strdup (uucheck_tempname);
       }
     }
     liter = liter->NEXT;
diff --git a/uulib/uudeview.h b/uulib/uudeview.h
index b9e82c9..774d6e5 100644
--- a/uulib/uudeview.h
+++ b/uulib/uudeview.h
@@ -17,6 +17,8 @@
 #ifndef __UUDEVIEW_H__
 #define __UUDEVIEW_H__
 
+#include <stdint.h>
+
 /*
  * This include file features all the definitions that should
  * be externally visible. This isn't much.
@@ -136,30 +138,32 @@ struct _uufile;
  */
 
 typedef struct _uulist {
-  short    state;		/* Status as described by the macros above */
-  short    mode;		/* file mode as found on begin line        */
+  struct _uulist *NEXT;		/* next item of the list                   */
+  struct _uulist *PREV;		/* previous item of the list               */
+
+  uint8_t  state;		/* Status as described by the macros above */
+  uint8_t  flags;		/* flags, especially for single-part files */
+  uint8_t  uudet;		/* Encoding type (see macros above)        */
 
   int      begin;		/* part number where begin was detected    */
   int      end;			/* part number where end was detected      */
 
-  short    uudet;		/* Encoding type (see macros above)        */
-  int      flags;		/* flags, especially for single-part files */
+  uint32_t filename_hash;       /* hash of filename for faster comparisons */
+  uint32_t mimeid_hash;         /* hash of filename for faster comparisons */
+  uint16_t mode;		/* file mode as found on begin line        */
 
-  long     size;		/* approximate size of resulting file      */
   char    *filename;		/* malloc'ed file name                     */
   char    *subfname;		/* malloc'ed ID from subject line          */
   char    *mimeid;		/* malloc'ed MIME-ID, if available         */
   char    *mimetype;		/* malloc'ed Content-Type, if available    */
 
   char    *binfile;		/* name of temp file, if already decoded   */
+  long     size;		/* approximate size of resulting file      */
 
   struct _uufile *thisfile;	/* linked list of this file's parts        */
 
   int     *haveparts;		/* the parts we have (max. 256 are listed) */
   int     *misparts;		/* list of missing parts (max. 256)        */
-
-  struct _uulist *NEXT;		/* next item of the list                   */
-  struct _uulist *PREV;		/* previous item of the list               */
 } uulist;
 
 /*
@@ -176,7 +180,7 @@ typedef struct {
   long foffset;			/* file offset -- internal use only        */
   long totsize;			/* file total size -- internal use only    */
 } uuprogress;
-  
+
 
 /*
  * Externally visible Functions
@@ -195,7 +199,7 @@ int	UUEXPORT UUGetOption		_ANSI_ARGS_((int, int *, char *, int));
 int	UUEXPORT UUSetOption		_ANSI_ARGS_((int, int, char *));
 char *	UUEXPORT UUstrerror		_ANSI_ARGS_((int));
 int	UUEXPORT UUSetMsgCallback	_ANSI_ARGS_((void *,
-						     void (*) (void *, 
+						     void (*) (void *,
 							       char *,
 							       int)));
 int	UUEXPORT UUSetBusyCallback	_ANSI_ARGS_((void *,
@@ -220,7 +224,7 @@ int	UUEXPORT UUDecodeToTemp		_ANSI_ARGS_((uulist *));
 int	UUEXPORT UURemoveTemp		_ANSI_ARGS_((uulist *));
 int	UUEXPORT UUDecodeFile		_ANSI_ARGS_((uulist *, char *));
 int	UUEXPORT UUInfoFile		_ANSI_ARGS_((uulist *, void *,
-						     int (*) (void *, 
+						     int (*) (void *,
 							      char *)));
 int	UUEXPORT UUSmerge		_ANSI_ARGS_((int));
 int	UUEXPORT UUCleanUp		_ANSI_ARGS_((void));
diff --git a/uulib/uuencode.c b/uulib/uuencode.c
index dedbf54..098112b 100644
--- a/uulib/uuencode.c
+++ b/uulib/uuencode.c
@@ -135,7 +135,7 @@ unsigned char UUEncodeTable[64] = {
   'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
   'X', 'Y', 'Z', '[', '\\',']', '^', '_'
 };
-  
+
 
 unsigned char B64EncodeTable[64] = {
   'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
@@ -162,11 +162,11 @@ unsigned char XXEncodeTable[64] = {
 unsigned char BHEncodeTable[64] = {
   '!', '"', '#', '$', '%', '&', '\'', '(',
   ')', '*', '+', ',', '-', '0', '1', '2',
-  '3', '4', '5', '6', '8', '9', '@', 'A', 
-  'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 
-  'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 
-  'S', 'T', 'U', 'V', 'X', 'Y', 'Z', '[', 
-  '`', 'a', 'b', 'c', 'd', 'e', 'f', 'h', 
+  '3', '4', '5', '6', '8', '9', '@', 'A',
+  'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
+  'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R',
+  'S', 'T', 'U', 'V', 'X', 'Y', 'Z', '[',
+  '`', 'a', 'b', 'c', 'd', 'e', 'f', 'h',
   'i', 'j', 'k', 'l', 'm', 'p', 'q', 'r'
 };
 
@@ -242,7 +242,7 @@ char *uuestr_otemp;
  * Encode one part of the data stream
  */
 
-static int 
+static int
 UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc32_t *crc, crc32_t *pcrc)
 {
   uchar *itemp = (uchar *) uuestr_itemp;
@@ -266,8 +266,8 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
    */
 
   if (encoding == PT_ENCODED || encoding == QP_ENCODED) {
-    while (!feof (infile) && (linperfile <= 0 || line < linperfile)) {
-      if (_FP_fgets (itemp, 255, infile) == NULL) {
+    while (!FP_feof (infile) && (linperfile <= 0 || line < linperfile)) {
+      if (FP_fgets (itemp, 255, infile) == NULL) {
 	break;
       }
 
@@ -280,7 +280,7 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
       /*
        * Busy Callback
        */
-      
+
       if (UUBUSYPOLL(ftell(infile)-progress.foffset,progress.fsize)) {
 	UUMessage (uuencode_id, __LINE__, UUMSG_NOTE,
 		   uustring (S_ENCODE_CANCEL));
@@ -386,13 +386,13 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
 
 	    *optr++ = '=';
 	    llen++;
-	    
+
 	    if (fwrite (otemp, 1, llen, outfile) != llen ||
 		fwrite ((char *) eolstring, 1,
 			strlen(eolstring), outfile) != strlen (eolstring)) {
 	      return UURET_IOERR;
 	    }
-	    
+
 	    optr = otemp;
 	    llen = 0;
 	  }
@@ -413,7 +413,7 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
     llen = 0;
     optr = otemp;
 
-    while (!feof (infile) && (linperfile <= 0 || line < linperfile)) {
+    while (!FP_feof (infile) && (linperfile <= 0 || line < linperfile)) {
       if ((count = fread (itemp, 1, 128, infile)) != 128) {
 	if (count == 0) {
 	  break;
@@ -424,16 +424,16 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
       }
 
       if (pcrc)
-	*pcrc = crc32(*pcrc, itemp, count);
+	*pcrc = uu_crc32(*pcrc, itemp, count);
       if (crc)
-	*crc = crc32(*crc, itemp, count);
+	*crc = uu_crc32(*crc, itemp, count);
 
       line++;
 
       /*
        * Busy Callback
        */
-      
+
       if (UUBUSYPOLL(ftell(infile)-progress.foffset,progress.fsize)) {
 	UUMessage (uuencode_id, __LINE__, UUMSG_NOTE,
 		   uustring (S_ENCODE_CANCEL));
@@ -514,7 +514,7 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
     return UURET_ILLVAL;
   }
 
-  while (!feof (infile) && (linperfile <= 0 || line < linperfile)) {
+  while (!FP_feof (infile) && (linperfile <= 0 || line < linperfile)) {
     if ((count = fread (itemp, 1, bpl[encoding], infile)) != bpl[encoding]) {
       if (count == 0)
 	break;
@@ -563,7 +563,7 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
       if (encoding == B64ENCODED) {
 	if (count - index == 2) {
 	  *optr++ = table[itemp[index] >> 2];
-	  *optr++ = table[((itemp[index  ] & 0x03) << 4) | 
+	  *optr++ = table[((itemp[index  ] & 0x03) << 4) |
 			  ((itemp[index+1] & 0xf0) >> 4)];
 	  *optr++ = table[((itemp[index+1] & 0x0f) << 2)];
 	  *optr++ = '=';
@@ -579,7 +579,7 @@ UUEncodeStream (FILE *outfile, FILE *infile, int encoding, long linperfile, crc3
       else if (encoding == UU_ENCODED || encoding == XX_ENCODED) {
 	if (count - index == 2) {
 	  *optr++ = table[itemp[index] >> 2];
-	  *optr++ = table[((itemp[index  ] & 0x03) << 4) | 
+	  *optr++ = table[((itemp[index  ] & 0x03) << 4) |
 			  ( itemp[index+1] >> 4)];
 	  *optr++ = table[((itemp[index+1] & 0x0f) << 2)];
 	  *optr++ = table[0];
@@ -630,7 +630,7 @@ UUEncodeMulti (FILE *outfile, FILE *infile, char *infname, int encoding,
   crc32_t crc;
   crc32_t *crcptr=NULL;
 
-  if (outfile==NULL || 
+  if (outfile==NULL ||
       (infile == NULL && infname==NULL) ||
       (outfname==NULL && infname==NULL) ||
       (encoding!=UU_ENCODED&&encoding!=XX_ENCODED&&encoding!=B64ENCODED&&
@@ -673,7 +673,7 @@ UUEncodeMulti (FILE *outfile, FILE *infile, char *infname, int encoding,
   if (progress.fsize < 0)
     progress.fsize = -1;
 
-  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+  FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
 
   progress.partno   = 1;
   progress.numparts = 1;
@@ -688,8 +688,8 @@ UUEncodeMulti (FILE *outfile, FILE *infile, char *infname, int encoding,
    */
 
   if (mimetype == NULL) {
-    if ((ptr = _FP_strrchr ((outfname)?outfname:infname, '.'))) {
-      while (miter->extension && _FP_stricmp (ptr+1, miter->extension) != 0)
+    if ((ptr = FP_strrchr ((outfname)?outfname:infname, '.'))) {
+      while (miter->extension && FP_stricmp (ptr+1, miter->extension) != 0)
 	miter++;
       mimetype = miter->mimetype;
     }
@@ -717,21 +717,21 @@ UUEncodeMulti (FILE *outfile, FILE *infile, char *infname, int encoding,
   if (encoding == UU_ENCODED || encoding == XX_ENCODED) {
     fprintf (outfile, "begin %o %s%s",
 	     (themode) ? themode : 0644,
-	     UUFNameFilter ((outfname)?outfname:infname), 
+	     UUFNameFilter ((outfname)?outfname:infname),
 	     eolstring);
   }
   else if (encoding == YENC_ENCODED) {
-    crc = crc32(0L, Z_NULL, 0);
+    crc = CRC32_INIT;
     crcptr = &crc;
     if (progress.fsize == -1) {
       fprintf (outfile, "=ybegin line=128 name=%s%s",
-	       UUFNameFilter ((outfname)?outfname:infname), 
+	       UUFNameFilter ((outfname)?outfname:infname),
 	       eolstring);
     }
     else {
       fprintf (outfile, "=ybegin line=128 size=%ld name=%s%s",
 	       progress.fsize,
-	       UUFNameFilter ((outfname)?outfname:infname), 
+	       UUFNameFilter ((outfname)?outfname:infname),
 	       eolstring);
     }
   }
@@ -748,21 +748,21 @@ UUEncodeMulti (FILE *outfile, FILE *infile, char *infname, int encoding,
   }
 
   if (encoding == UU_ENCODED || encoding == XX_ENCODED) {
-    fprintf (outfile, "%c%s",    
-	     (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0], 
+    fprintf (outfile, "%c%s",
+	     (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0],
 	     eolstring);
     fprintf (outfile, "end%s", eolstring);
   }
   else if (encoding == YENC_ENCODED) {
     if (progress.fsize == -1) {
       fprintf (outfile, "=yend crc32=%08lx%s",
-	       crc,
+	       (long)crc,
 	       eolstring);
     }
     else {
       fprintf (outfile, "=yend size=%ld crc32=%08lx%s",
 	       progress.fsize,
-	       crc,
+	       (long)crc,
 	       eolstring);
     }
   }
@@ -832,7 +832,7 @@ UUEncodePartial (FILE *outfile, FILE *infile,
       }
       if (linperfile <= 0)
 	numparts = 1;
-      else 
+      else
 	numparts = (int) (((long)finfo.st_size+(linperfile*bpl[encoding]-1))/
 			  (linperfile*bpl[encoding]));
 
@@ -860,7 +860,7 @@ UUEncodePartial (FILE *outfile, FILE *infile,
       theifile = infile;
     }
 
-    _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+    FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
 
     progress.totsize  = (thesize>=0) ? thesize : -1;
     progress.partno   = 1;
@@ -875,8 +875,8 @@ UUEncodePartial (FILE *outfile, FILE *infile,
      */
 
     if (mimetype == NULL) {
-      if ((ptr = _FP_strrchr ((outfname)?outfname:infname, '.'))) {
-	while (miter->extension && _FP_stricmp (ptr+1, miter->extension) != 0)
+      if ((ptr = FP_strrchr ((outfname)?outfname:infname, '.'))) {
+	while (miter->extension && FP_stricmp (ptr+1, miter->extension) != 0)
 	  miter++;
 	mimetype = miter->mimetype;
       }
@@ -902,7 +902,7 @@ UUEncodePartial (FILE *outfile, FILE *infile,
     }
 
     fprintf (outfile, "%s", eolstring);
-    
+
     /*
      * for the first part of UU or XX messages, print a begin line
      */
@@ -914,20 +914,20 @@ UUEncodePartial (FILE *outfile, FILE *infile,
     }
   }
   if (encoding == YENC_ENCODED) {
-    pcrc = crc32(0L, Z_NULL, 0);
+    pcrc = CRC32_INIT;
     pcrcptr = &pcrc;
     if (numparts != 1) {
       if (progress.totsize == -1) {
 	fprintf (outfile, "=ybegin part=%d line=128 name=%s%s",
 		 partno,
-		 UUFNameFilter ((outfname)?outfname:infname), 
+		 UUFNameFilter ((outfname)?outfname:infname),
 		 eolstring);
       }
       else {
 	fprintf (outfile, "=ybegin part=%d line=128 size=%ld name=%s%s",
 		 partno,
 		 progress.totsize,
-		 UUFNameFilter ((outfname)?outfname:infname), 
+		 UUFNameFilter ((outfname)?outfname:infname),
 		 eolstring);
       }
 
@@ -941,13 +941,13 @@ UUEncodePartial (FILE *outfile, FILE *infile,
     else {
       if (progress.totsize == -1) {
 	fprintf (outfile, "=ybegin line=128 name=%s%s",
-		 UUFNameFilter ((outfname)?outfname:infname), 
+		 UUFNameFilter ((outfname)?outfname:infname),
 		 eolstring);
       }
       else {
 	fprintf (outfile, "=ybegin line=128 size=%ld name=%s%s",
 		 progress.totsize,
-		 UUFNameFilter ((outfname)?outfname:infname), 
+		 UUFNameFilter ((outfname)?outfname:infname),
 		 eolstring);
       }
     }
@@ -989,10 +989,10 @@ UUEncodePartial (FILE *outfile, FILE *infile,
    * print end line
    */
 
-  if (feof (theifile) &&
+  if (FP_feof (theifile) &&
       (encoding == UU_ENCODED || encoding == XX_ENCODED)) {
-    fprintf (outfile, "%c%s",    
-	     (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0], 
+    fprintf (outfile, "%c%s",
+	     (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0],
 	     eolstring);
     fprintf (outfile, "end%s", eolstring);
   }
@@ -1003,14 +1003,14 @@ UUEncodePartial (FILE *outfile, FILE *infile,
                   ? linperfile * 128
                   : (progress.totsize - (partno - 1) * linperfile * 128),
 	       partno,
-	       pcrc);
+	       (long)pcrc);
     }
     else {
       fprintf (outfile, "=yend size=%ld",
 	       progress.totsize);
     }
-    if (feof (theifile))
-      fprintf (outfile, " crc32=%08lx", *crcptr);
+    if (FP_feof (theifile))
+      fprintf (outfile, " crc32=%08lx", (long)*crcptr);
     fprintf (outfile, "%s", eolstring);
   }
 
@@ -1028,7 +1028,7 @@ UUEncodePartial (FILE *outfile, FILE *infile,
       fclose (theifile);
       return res;
     }
-    if (feof (theifile)) {
+    if (FP_feof (theifile)) {
       progress.action = 0;
       fclose (theifile);
       return UURET_OK;
@@ -1103,7 +1103,7 @@ UUEncodeToStream (FILE *outfile, FILE *infile,
   if (progress.fsize < 0)
     progress.fsize = -1;
 
-  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+  FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
 
   progress.partno   = 1;
   progress.numparts = 1;
@@ -1114,21 +1114,21 @@ UUEncodeToStream (FILE *outfile, FILE *infile,
   if (encoding == UU_ENCODED || encoding == XX_ENCODED) {
     fprintf (outfile, "begin %o %s%s",
 	     (themode) ? themode : 0644,
-	     UUFNameFilter ((outfname)?outfname:infname), 
+	     UUFNameFilter ((outfname)?outfname:infname),
 	     eolstring);
   }
   else if (encoding == YENC_ENCODED) {
-    crc = crc32(0L, Z_NULL, 0);
+    crc = CRC32_INIT;
     crcptr = &crc;
     if (progress.fsize == -1) {
       fprintf (outfile, "=ybegin line=128 name=%s%s",
-	       UUFNameFilter ((outfname)?outfname:infname), 
+	       UUFNameFilter ((outfname)?outfname:infname),
 	       eolstring);
     }
     else {
       fprintf (outfile, "=ybegin line=128 size=%ld name=%s%s",
 	       progress.fsize,
-	       UUFNameFilter ((outfname)?outfname:infname), 
+	       UUFNameFilter ((outfname)?outfname:infname),
 	       eolstring);
     }
   }
@@ -1137,7 +1137,7 @@ UUEncodeToStream (FILE *outfile, FILE *infile,
     if (res != UURET_CANCEL) {
       UUMessage (uuencode_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_ERR_ENCODING),
-		 UUFNameFilter ((infname)?infname:outfname), 
+		 UUFNameFilter ((infname)?infname:outfname),
 		 (res==UURET_IOERR)?strerror(uu_errno):UUstrerror (res));
     }
     progress.action = 0;
@@ -1145,21 +1145,21 @@ UUEncodeToStream (FILE *outfile, FILE *infile,
   }
 
   if (encoding == UU_ENCODED || encoding == XX_ENCODED) {
-    fprintf (outfile, "%c%s",    
-	     (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0], 
+    fprintf (outfile, "%c%s",
+	     (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0],
 	     eolstring);
     fprintf (outfile, "end%s", eolstring);
   }
   else if (encoding == YENC_ENCODED) {
     if (progress.fsize == -1) {
       fprintf (outfile, "=yend crc32=%08lx%s",
-	       crc,
+	       (long)crc,
 	       eolstring);
     }
     else {
       fprintf (outfile, "=yend size=%ld crc32=%08lx%s",
 	       progress.fsize,
-	       crc,
+	       (long)crc,
 	       eolstring);
     }
   }
@@ -1214,7 +1214,7 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
       sprintf (oname, "%s", diskname);
     }
     else {
-      len = ((uusavepath)?strlen(uusavepath):0) + strlen (diskname) 
+      len = ((uusavepath)?strlen(uusavepath):0) + strlen (diskname)
 	+ ((uuencodeext)?strlen(uuencodeext):0) + 5;
 
       if ((oname = malloc (len)) == NULL) {
@@ -1226,7 +1226,7 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
     }
   }
   else {
-    len = ((uusavepath) ? strlen (uusavepath) : 0) + 
+    len = ((uusavepath) ? strlen (uusavepath) : 0) +
       strlen(UUFNameFilter(infname)) +
 	((uuencodeext)?strlen(uuencodeext):0) + 5;
 
@@ -1236,7 +1236,7 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
       return UURET_NOMEM;
     }
     optr = UUFNameFilter (infname);
-    sprintf (oname, "%s%s", 
+    sprintf (oname, "%s%s",
 	     (uusavepath)?uusavepath:"",
 	     (*optr=='.')?optr+1:optr);
   }
@@ -1246,7 +1246,7 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
    * there.
    */
 
-  optr = _FP_strrchr (oname, '.');
+  optr = FP_strrchr (oname, '.');
   if (optr==NULL || strchr (optr, '/')!=NULL || strchr (optr, '\\')!=NULL) {
     optr = oname + strlen (oname);
     *optr++ = '.';
@@ -1265,19 +1265,19 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
       UUMessage (uuencode_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_NOT_STAT_FILE),
 		 infname, strerror (uu_errno=errno));
-      _FP_free (oname);
+      FP_free (oname);
       return UURET_IOERR;
     }
     if ((theifile = fopen (infname, "rb")) == NULL) {
       UUMessage (uuencode_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_NOT_OPEN_FILE),
 		 infname, strerror (uu_errno=errno));
-      _FP_free (oname);
+      FP_free (oname);
       return UURET_IOERR;
     }
     if (linperfile <= 0)
       numparts = 1;
-    else 
+    else
       numparts = (int) (((long)finfo.st_size + (linperfile*bpl[encoding]-1)) /
 			(linperfile*bpl[encoding]));
 
@@ -1304,18 +1304,18 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
     theifile = infile;
   }
 
-  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+  FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
 
   progress.totsize  = (progress.totsize<0) ? -1 : progress.totsize;
   progress.numparts = numparts;
 
-  for (part=1; !feof (theifile); part++) {
+  for (part=1; !FP_feof (theifile); part++) {
     /*
      * Attach extension
      */
     if (progress.numparts==1 && progress.totsize!=-1 && uuencodeext!=NULL)
       strcpy  (optr, uuencodeext);
-    else 
+    else
       sprintf (optr, "%03d", part);
 
     /*
@@ -1382,47 +1382,47 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
     if (part==1 && (encoding == UU_ENCODED || encoding == XX_ENCODED)) {
       fprintf (outfile, "begin %o %s%s",
 	       (filemode)?filemode : 0644,
-	       UUFNameFilter ((outfname)?outfname:infname), 
+	       UUFNameFilter ((outfname)?outfname:infname),
 	       eolstring);
     }
     else if (encoding == YENC_ENCODED) {
       if (!crcptr) {
-        crc = crc32(0L, Z_NULL, 0);
+        crc = CRC32_INIT;
         crcptr = &crc;
       }
-      pcrc = crc32(0L, Z_NULL, 0);
+      pcrc = CRC32_INIT;
       pcrcptr = &pcrc;
       if (numparts != 1) {
 	if (progress.totsize == -1) {
 	  fprintf (outfile, "=ybegin part=%d line=128 name=%s%s",
 		   part,
-		   UUFNameFilter ((outfname)?outfname:infname), 
+		   UUFNameFilter ((outfname)?outfname:infname),
 		   eolstring);
 	}
 	else {
 	  fprintf (outfile, "=ybegin part=%d line=128 size=%ld name=%s%s",
 		   part,
 		   progress.totsize,
-		   UUFNameFilter ((outfname)?outfname:infname), 
+		   UUFNameFilter ((outfname)?outfname:infname),
 		   eolstring);
 	}
 
 	fprintf (outfile, "=ypart begin=%ld end=%ld%s",
 		 (part-1)*linperfile*128+1,
-		 (part*linperfile*128) < progress.totsize ? 
+		 (part*linperfile*128) < progress.totsize ?
 		 (part*linperfile*128) : progress.totsize,
 		 eolstring);
       }
       else {
 	if (progress.totsize == -1) {
 	  fprintf (outfile, "=ybegin line=128 name=%s%s",
-		   UUFNameFilter ((outfname)?outfname:infname), 
+		   UUFNameFilter ((outfname)?outfname:infname),
 		   eolstring);
 	}
 	else {
 	  fprintf (outfile, "=ybegin line=128 size=%ld name=%s%s",
 		   progress.totsize,
-		   UUFNameFilter ((outfname)?outfname:infname), 
+		   UUFNameFilter ((outfname)?outfname:infname),
 		   eolstring);
 	}
       }
@@ -1433,38 +1433,38 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
       if (res != UURET_CANCEL) {
 	UUMessage (uuencode_id, __LINE__, UUMSG_ERROR,
 		   uustring (S_ERR_ENCODING),
-		   UUFNameFilter ((infname)?infname:outfname),	 
+		   UUFNameFilter ((infname)?infname:outfname),
 		   (res==UURET_IOERR)?strerror(uu_errno):UUstrerror (res));
       }
       if (infile==NULL) fclose (theifile);
       progress.action = 0;
       fclose (outfile);
       unlink (oname);
-      _FP_free (oname);
+      FP_free (oname);
       return res;
     }
 
-    if (feof (theifile) &&
+    if (FP_feof (theifile) &&
 	(encoding == UU_ENCODED || encoding == XX_ENCODED)) {
-      fprintf (outfile, "%c%s",    
-	       (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0], 
+      fprintf (outfile, "%c%s",
+	       (encoding==UU_ENCODED) ? UUEncodeTable[0] : XXEncodeTable[0],
 	       eolstring);
       fprintf (outfile, "end%s", eolstring);
     }
     else if (encoding == YENC_ENCODED) {
       if (numparts != 1) {
 	fprintf (outfile, "=yend size=%ld part=%d pcrc32=%08lx",
-		 (part*linperfile*128) < progress.totsize ? 
+		 (part*linperfile*128) < progress.totsize ?
 		 linperfile*128 : (progress.totsize-(part-1)*linperfile*128),
 		 part,
-		 pcrc);
+		 (long)pcrc);
       }
       else {
 	fprintf (outfile, "=yend size=%ld",
 		 progress.totsize);
       }
-      if (feof (theifile))
-	fprintf (outfile, " crc32=%08lx", crc); 
+      if (FP_feof (theifile))
+	fprintf (outfile, " crc32=%08lx", (long)crc);
       fprintf (outfile, "%s", eolstring);
     }
 
@@ -1478,7 +1478,7 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
 
   if (infile==NULL) fclose (theifile);
   progress.action = 0;
-  _FP_free (oname);
+  FP_free (oname);
   return UURET_OK;
 }
 
@@ -1527,8 +1527,8 @@ UUE_PrepSingleExt (FILE *outfile, FILE *infile,
   oname = UUFNameFilter ((outfname)?outfname:infname);
   len   = ((subject)?strlen(subject):0) + strlen(oname) + 40;
 
-  if ((ptr = _FP_strrchr (oname, '.'))) {
-    while (miter->extension && _FP_stricmp (ptr+1, miter->extension) != 0)
+  if ((ptr = FP_strrchr (oname, '.'))) {
+    while (miter->extension && FP_stricmp (ptr+1, miter->extension) != 0)
       miter++;
     mimetype = miter->mimetype;
   }
@@ -1587,8 +1587,8 @@ UUE_PrepSingleExt (FILE *outfile, FILE *infile,
 
   res = UUEncodeToStream (outfile, infile, infname, encoding,
 			  outfname, filemode);
-  
-  _FP_free (subline);
+
+  FP_free (subline);
   return res;
 }
 
@@ -1659,7 +1659,7 @@ UUE_PrepPartialExt (FILE *outfile, FILE *infile,
       }
       if (linperfile <= 0)
 	numparts = 1;
-      else 
+      else
 	numparts = (int) (((long)finfo.st_size+(linperfile*bpl[encoding]-1))/
 			  (linperfile*bpl[encoding]));
 
@@ -1729,7 +1729,7 @@ UUE_PrepPartialExt (FILE *outfile, FILE *infile,
 
   if (encoding == YENC_ENCODED) {
     if (partno == 1)
-      crc = crc32(0L, Z_NULL, 0);
+      crc = CRC32_INIT;
     crcptr = &crc;
     if (subject)
       sprintf (subline, "- %s - %s (%03d/%03d)", oname, subject,
@@ -1740,7 +1740,7 @@ UUE_PrepPartialExt (FILE *outfile, FILE *infile,
   }
   else {
     if (subject)
-      sprintf (subline, "%s (%03d/%03d) - [ %s ]", 
+      sprintf (subline, "%s (%03d/%03d) - [ %s ]",
 	       subject, partno, numparts, oname);
     else
       sprintf (subline, "[ %s ] (%03d/%03d)",
@@ -1770,7 +1770,7 @@ UUE_PrepPartialExt (FILE *outfile, FILE *infile,
     fprintf (outfile, "\tid=\"%s\"%s",
 	     mimeid, eolstring);
   }
-    
+
   fprintf (outfile, "%s", eolstring);
 
   res = UUEncodePartial (outfile, theifile,
@@ -1778,14 +1778,14 @@ UUE_PrepPartialExt (FILE *outfile, FILE *infile,
 			 (outfname)?outfname:infname, NULL,
 			 themode, partno, linperfile, crcptr);
 
-  _FP_free (subline);
+  FP_free (subline);
 
   if (infile==NULL) {
     if (res != UURET_OK) {
       fclose (theifile);
       return res;
     }
-    if (feof (theifile)) {
+    if (FP_feof (theifile)) {
       fclose (theifile);
       return UURET_OK;
     }
diff --git a/uulib/uuint.h b/uulib/uuint.h
index b7bfa99..95c6c78 100644
--- a/uulib/uuint.h
+++ b/uulib/uuint.h
@@ -69,7 +69,7 @@
 
 #define UUPERCENT(a,b)	((int) ((unsigned long)(a) / \
 				(((unsigned long)(b)/100)+1)))
-     
+
 /*
  * Make the Busy Callback easier. The macro returns true if the BusyCallback
  * wants us to terminate.
@@ -142,13 +142,13 @@ typedef struct _fileread {
   char *origin;		/* Whole 'From:' line */
   char *mimeid;		/* the ID for Mime-encoded files */
   char *mimetype;	/* Content-Type */
-  int   mode;		/* Mode of File (from 'begin') */
   int   begin;		/* begin detected */
   int   end;		/* end detected */
-  int   flags;		/* associated flags */
   long  yefilesize;     /* the yencode file size, or 0 */
 
-  int   uudet;		/* valid encoded data. value indicates encoding */
+  uint16_t mode;	/* Mode of File (from 'begin') */
+  uint8_t flags;	/* associated flags */
+  uint8_t uudet;	/* valid encoded data. value indicates encoding */
   int   partno;		/* Mime-files have a part number within */
   int   maxpno;		/* ... plus the total number of parts   */
 
@@ -165,14 +165,14 @@ typedef struct _fileread {
  **/
 
 typedef struct _uufile {
+  struct _uufile *NEXT;
   char     *filename;
   char     *subfname;
   char     *mimeid;
   char     *mimetype;
-  int       partno;
   fileread *data;
   long      yefilesize;
-  struct _uufile *NEXT;
+  int       partno;
 } uufile;
 
 extern void *uu_MsgCBArg;
@@ -302,7 +302,7 @@ fileread *	ScanPart 		(FILE *, char *, int *);
 
 int		UUbhdecomp		(char *, char *,
 				         char *, int *,
-				         size_t, size_t, 
+				         size_t, size_t,
 				         size_t *);
 size_t		UUbhwrite		(char *, size_t, size_t, FILE *);
 
diff --git a/uulib/uulib.c b/uulib/uulib.c
index e95fa51..d0c405d 100644
--- a/uulib/uulib.c
+++ b/uulib/uulib.c
@@ -86,7 +86,7 @@
 char * uulib_id = "$Id$";
 
 #ifdef SYSTEM_WINDLL
-BOOL _export WINAPI 
+BOOL _export WINAPI
 DllEntryPoint (HINSTANCE hInstance, DWORD seginfo,
 	       LPVOID lpCmdLine)
 {
@@ -438,7 +438,7 @@ UUGetOption (int option, int *ivalue, char *cvalue, int clength)
     result = 0;
     break;
   case UUOPT_VERSION:
-    _FP_strncpy (cvalue, uulibversion, clength);
+    FP_strncpy (cvalue, uulibversion, clength);
     result = 0;
     break;
   case UUOPT_FAST:
@@ -478,7 +478,7 @@ UUGetOption (int option, int *ivalue, char *cvalue, int clength)
     result = uu_overwrite;
     break;
   case UUOPT_SAVEPATH:
-    _FP_strncpy (cvalue, uusavepath, clength);
+    FP_strncpy (cvalue, uusavepath, clength);
     result = 0;
     break;
   case UUOPT_PROGRESS:
@@ -506,7 +506,7 @@ UUGetOption (int option, int *ivalue, char *cvalue, int clength)
     result = uu_tinyb64;
     break;
   case UUOPT_ENCEXT:
-    _FP_strncpy (cvalue, uuencodeext, clength);
+    FP_strncpy (cvalue, uuencodeext, clength);
     result = 0;
     break;
   case UUOPT_REMOVE:
@@ -566,8 +566,8 @@ UUSetOption (int option, int ivalue, char *cvalue)
     uu_overwrite      = ivalue;
     break;
   case UUOPT_SAVEPATH:
-    _FP_free (uusavepath);
-    uusavepath = _FP_strdup (cvalue);
+    FP_free (uusavepath);
+    uusavepath = FP_strdup (cvalue);
     break;
   case UUOPT_IGNMODE:
     uu_ignmode = ivalue;
@@ -582,8 +582,8 @@ UUSetOption (int option, int ivalue, char *cvalue)
     uu_tinyb64 = ivalue;
     break;
   case UUOPT_ENCEXT:
-    _FP_free (uuencodeext);
-    uuencodeext = _FP_strdup (cvalue);
+    FP_free (uuencodeext);
+    uuencodeext = FP_strdup (cvalue);
     break;
   case UUOPT_REMOVE:
     uu_remove_input = ivalue;
@@ -614,7 +614,7 @@ UUstrerror (int code)
  */
 
 int UUEXPORT
-UUSetMsgCallback (void *opaque, 
+UUSetMsgCallback (void *opaque,
 		  void (*func) (void *, char *, int))
 {
   uu_MsgCallback = func;
@@ -722,7 +722,7 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
   int _count;
   if (!partcount)
     partcount = &_count;
-  
+
   *partcount = 0;
 
   if ((datei = fopen (filename, "rb")) == NULL) {
@@ -732,6 +732,7 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
     return UURET_IOERR;
   }
   UUSETBUF (datei, datei_buf, uu_rbuf);
+  FP_flockfile (datei);
 
   if (fstat (fileno(datei), &finfo) == -1) {
     UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
@@ -751,10 +752,10 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
       UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
 		 uustring (S_OUT_OF_MEMORY), sizeof (itbd));
     }
-    else if ((killem->fname = _FP_strdup (filename)) == NULL) {
+    else if ((killem->fname = FP_strdup (filename)) == NULL) {
       UUMessage (uulib_id, __LINE__, UUMSG_WARNING,
 		 uustring (S_OUT_OF_MEMORY), strlen(filename)+1);
-      _FP_free (killem);
+      FP_free (killem);
     }
     else {
       killem->NEXT = ftodel;
@@ -768,7 +769,7 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
   progress.fsize    = (long) ((finfo.st_size>0)?finfo.st_size:-1);
   progress.percent  = 0;
   progress.foffset  = 0;
-  _FP_strncpy (progress.curfile,
+  FP_strncpy (progress.curfile,
 	       (strlen(filename)>255)?
 	       (filename+strlen(filename)-255):filename,
 	       256);
@@ -777,16 +778,16 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
   if (fileid == NULL)
     fileid = filename;
 
-  while (!feof (datei) && !ferror (datei)) {
-    /* 
+  while (!FP_feof (datei) && !ferror (datei)) {
+    /*
      * Peek file, or some systems won't detect EOF
      */
-    res = _FP_fgetc (datei);
-    if (feof (datei) || ferror (datei))
+    res = FP_getc (datei);
+    if (FP_feof (datei) || ferror (datei))
       break;
     else
       ungetc (res, datei);
-    
+
     if ((loaded = ScanPart (datei, fileid, &sr)) == NULL) {
       if (sr != UURET_NODATA && sr != UURET_OK && sr != UURET_CONT) {
 	UUkillfread (loaded);
@@ -839,7 +840,7 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
       if (uu_fast_scanning && sr != UURET_CONT) break;
       continue;
     }
-    
+
     if ((fload = UUPreProcessPart (loaded, &res)) == NULL) {
       /*
        * no useful data found
@@ -869,7 +870,7 @@ UULoadFileWithPartNo (char *filename, char *fileid, int delflag, int partno, int
 		 (loaded->end)      ? "end"   : "",
 		 codenames[loaded->uudet]);
     }
-    
+
     if ((res = UUInsertPartToList (fload))) {
       /*
        * couldn't use the data
@@ -968,6 +969,7 @@ UUDecodeFile (uulist *thefile, char *destname)
     return UURET_IOERR;
   }
   UUSETBUF (source, source_buf, uu_rbuf);
+  FP_flockfile (source);
 
   /*
    * for system security, strip setuid/setgid bits from mode
@@ -982,7 +984,7 @@ UUDecodeFile (uulist *thefile, char *destname)
 
   /*
    * Determine the name of the target file according to the rules:
-   * 
+   *
    * IF (destname!=NULL) THEN filename=destname;
    * ELSE
    *   filename = thefile->filename
@@ -1039,7 +1041,7 @@ UUDecodeFile (uulist *thefile, char *destname)
     }
 
   progress.action   = 0;
-  _FP_strncpy (progress.curfile,
+  FP_strncpy (progress.curfile,
 	       (strlen(uugen_fnbuffer)>255)?
 	       (uugen_fnbuffer+strlen(uugen_fnbuffer)-255):uugen_fnbuffer,
 	       256);
@@ -1073,8 +1075,9 @@ UUDecodeFile (uulist *thefile, char *destname)
     return UURET_IOERR;
   }
   UUSETBUF (target, target_buf, uu_wbuf);
+  FP_flockfile (target);
 
-  while (!feof (source)) {
+  while (!FP_feof (source)) {
 
     if (UUBUSYPOLL(ftell(source),progress.fsize)) {
       UUMessage (uulib_id, __LINE__, UUMSG_NOTE,
@@ -1089,7 +1092,7 @@ UUDecodeFile (uulist *thefile, char *destname)
 
     bytes = fread (uugen_inbuffer, 1, 1024, source);
 
-    if (ferror (source) || (bytes == 0 && !feof (source))) {
+    if (ferror (source) || (bytes == 0 && !FP_feof (source))) {
       progress.action = 0;
       UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_READ_ERROR),
@@ -1139,7 +1142,7 @@ UUDecodeFile (uulist *thefile, char *destname)
   }
 
 skip_copy:
-  _FP_free (thefile->binfile);
+  FP_free (thefile->binfile);
   thefile->binfile = NULL;
   thefile->state  &= ~UUFILE_TMPFILE;
   thefile->state  |=  UUFILE_DECODED;
@@ -1166,7 +1169,7 @@ UUInfoFile (uulist *thefile, void *opaque,
    */
 
   if (uu_FileCallback) {
-    if ((res = (*uu_FileCallback) (uu_FileCBArg, 
+    if ((res = (*uu_FileCallback) (uu_FileCBArg,
 				   thefile->thisfile->data->sfname,
 				   uugen_fnbuffer,
 				   1)) != UURET_OK)
@@ -1183,12 +1186,12 @@ UUInfoFile (uulist *thefile, void *opaque,
   else {
     if ((inpfile = fopen (thefile->thisfile->data->sfname, "rb")) == NULL) {
       UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
-		 uustring (S_NOT_OPEN_FILE), 
+		 uustring (S_NOT_OPEN_FILE),
 		 thefile->thisfile->data->sfname,
 		 strerror (uu_errno=errno));
       return UURET_IOERR;
     }
-    _FP_strncpy (uugen_fnbuffer, thefile->thisfile->data->sfname, 1024);
+    FP_strncpy (uugen_fnbuffer, thefile->thisfile->data->sfname, 1024);
   }
 
   /*
@@ -1198,9 +1201,9 @@ UUInfoFile (uulist *thefile, void *opaque,
   fseek (inpfile, thefile->thisfile->data->startpos, SEEK_SET);
   maxpos = thefile->thisfile->data->startpos + thefile->thisfile->data->length;
 
-  while (!feof (inpfile) && 
+  while (!FP_feof (inpfile) &&
 	 (uu_fast_scanning || ftell(inpfile) < maxpos)) {
-    if (_FP_fgets (uugen_inbuffer, 511, inpfile) == NULL)
+    if (FP_fgets (uugen_inbuffer, 511, inpfile) == NULL)
       break;
     uugen_inbuffer[511] = '\0';
 
@@ -1234,7 +1237,7 @@ UUInfoFile (uulist *thefile, void *opaque,
   fclose (inpfile);
 
   if (uu_FileCallback)
-    (*uu_FileCallback) (uu_FileCBArg, 
+    (*uu_FileCallback) (uu_FileCBArg,
 			thefile->thisfile->data->sfname,
 			uugen_fnbuffer, 0);
 
@@ -1243,7 +1246,7 @@ UUInfoFile (uulist *thefile, void *opaque,
 
   return UURET_OK;
 }
-	    
+
 int UUEXPORT
 UURenameFile (uulist *thefile, char *newname)
 {
@@ -1254,14 +1257,14 @@ UURenameFile (uulist *thefile, char *newname)
 
   oldname = thefile->filename;
 
-  if ((thefile->filename = _FP_strdup (newname)) == NULL) {
+  if ((thefile->filename = FP_strdup (newname)) == NULL) {
     UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
 	       uustring (S_NOT_RENAME),
 	       oldname, newname);
     thefile->filename = oldname;
     return UURET_NOMEM;
   }
-  _FP_free (oldname);
+  FP_free (oldname);
   return UURET_OK;
 }
 
@@ -1278,7 +1281,7 @@ UURemoveTemp (uulist *thefile)
 		 thefile->binfile,
 		 strerror (uu_errno = errno));
     }
-    _FP_free (thefile->binfile);
+    FP_free (thefile->binfile);
     thefile->binfile = NULL;
     thefile->state  &= ~UUFILE_TMPFILE;
   }
@@ -1303,10 +1306,10 @@ UUCleanUp (void)
 		 uustring (S_TMP_NOT_REMOVED),
 		 iter->fname, strerror (uu_errno = errno));
     }
-    _FP_free (iter->fname);
+    FP_free (iter->fname);
     ptr  = iter;
     iter = iter->NEXT;
-    _FP_free (ptr);
+    FP_free (ptr);
   }
 
   ftodel = NULL;
@@ -1338,9 +1341,9 @@ UUCleanUp (void)
   UUkilllist (UUGlobalFileList);
   UUGlobalFileList = NULL;
 
-  _FP_free (uusavepath);
-  _FP_free (uuencodeext);
-  _FP_free (sstate.source);
+  FP_free (uusavepath);
+  FP_free (uuencodeext);
+  FP_free (sstate.source);
 
   uusavepath  = NULL;
   uuencodeext = NULL;
@@ -1353,7 +1356,7 @@ UUCleanUp (void)
   while (mssdepth) {
     mssdepth--;
     UUkillheaders (&(multistack[mssdepth].envelope));
-    _FP_free (multistack[mssdepth].source);
+    FP_free (multistack[mssdepth].source);
   }
 
   /*
diff --git a/uulib/uunconc.c b/uulib/uunconc.c
index b4823f5..0fca256 100644
--- a/uulib/uunconc.c
+++ b/uulib/uunconc.c
@@ -196,8 +196,8 @@ UUBrokenByNetscape (char *string)
   if (string==NULL || (len=strlen(string))<3)
     return 0;
 
-  if ((ptr = _FP_stristr (string, "<a href=")) != NULL) {
-    if (_FP_stristr (string, "</a>") > ptr)
+  if ((ptr = FP_stristr (string, "<a href=")) != NULL) {
+    if (FP_stristr (string, "</a>") > ptr)
       return 2;
   }
 
@@ -207,7 +207,7 @@ UUBrokenByNetscape (char *string)
   if (*--ptr == ' ') ptr--;
   ptr--;
 
-  if (_FP_strnicmp (ptr, "<a", 2) == 0)
+  if (FP_strnicmp (ptr, "<a", 2) == 0)
     return 1;
 
   return 0;
@@ -217,7 +217,7 @@ UUBrokenByNetscape (char *string)
  * Try to repair a Netscape-corrupted line of data.
  * This must only be called on corrupted lines, since non-Netscape
  * data may even _get_ corrupted by this procedure.
- * 
+ *
  * Some checks are included multiply to speed up the procedure. For
  * example: (*p1!='<' || strnicmp(p1,"</a>",4)). If the first expression
  * becomes true, the costly function isn't called :-)
@@ -241,9 +241,9 @@ UUNetscapeCollapse (char *string)
    */
   while (*p1) {
     if (*p1 == '&') {
-      if      (_FP_strnicmp (p1, "&amp;", 5) == 0) { p1+=5; *p2++='&'; res=1; }
-      else if (_FP_strnicmp (p1, "&lt;",  4) == 0) { p1+=4; *p2++='<'; res=1; }
-      else if (_FP_strnicmp (p1, "&gt;",  4) == 0) { p1+=4; *p2++='>'; res=1; }
+      if      (FP_strnicmp (p1, "&amp;", 5) == 0) { p1+=5; *p2++='&'; res=1; }
+      else if (FP_strnicmp (p1, "&lt;",  4) == 0) { p1+=4; *p2++='<'; res=1; }
+      else if (FP_strnicmp (p1, "&gt;",  4) == 0) { p1+=4; *p2++='>'; res=1; }
       else *p2++ = *p1++;
       res = 1;
     }
@@ -257,16 +257,16 @@ UUNetscapeCollapse (char *string)
 
   while (*p1) {
     if (*p1 == '<') {
-      if ((_FP_strnicmp (p1, "<ahref=", 7) == 0 ||
-	   _FP_strnicmp (p1, "<a href=",8) == 0) && 
-	  (_FP_strstr (p1, "</a>") != 0 || _FP_strstr (p1, "</A>") != 0)) {
+      if ((FP_strnicmp (p1, "<ahref=", 7) == 0 ||
+	   FP_strnicmp (p1, "<a href=",8) == 0) &&
+	  (FP_strstr (p1, "</a>") != 0 || FP_strstr (p1, "</A>") != 0)) {
 	while (*p1 && *p1!='>')        p1++;
 	if (*p1=='\0' || *(p1+1)!='<') return 0;
 	p1++;
-	while (*p1 && (*p1!='<' || _FP_strnicmp(p1,"</a>",4)!=0)) {
+	while (*p1 && (*p1!='<' || FP_strnicmp(p1,"</a>",4)!=0)) {
 	  *p2++ = *p1++;
 	}
-	if (_FP_strnicmp(p1,"</a>",4) != 0)
+	if (FP_strnicmp(p1,"</a>",4) != 0)
 	  return 0;
 	p1+=4;
 	res=1;
@@ -300,14 +300,10 @@ UUValidData (char *ptr, int encoding, int *bhflag)
     return 0;              /* bad string */
   }
 
-  while (*s) {
-    s++;
-    len++;
-    i++;
-  }
+  if (encoding == YENC_ENCODED)
+    return YENC_ENCODED;
 
-  if (i == 0)
-    return 0;
+  i = strlen (s);
 
   switch (encoding) {
   case UU_ENCODED:
@@ -318,8 +314,6 @@ UUValidData (char *ptr, int encoding, int *bhflag)
     goto _t_B64;
   case BH_ENCODED:
     goto _t_Binhex;
-  case YENC_ENCODED:
-    return YENC_ENCODED;
   }
 
  _t_Binhex:                 /* Binhex Test */
@@ -542,7 +536,7 @@ UURepairData (FILE *datei, char *line, int encoding, int *bhflag)
       if (strlen (line) > 250)
 	break;
       ptr = line + strlen (line);
-      if (_FP_fgets (ptr, 299-(ptr-line), datei) == NULL)
+      if (FP_fgets (ptr, 299-(ptr-line), datei) == NULL)
 	break;
     }
     else {			/* don't need next line to repair */
@@ -609,7 +603,25 @@ UUDecodeLine (char *s, char *d, int method)
    */
   z1 = z2 = z3 = z4 = 0;
 
-  if (method == UU_ENCODED || method == XX_ENCODED) {
+  if (method == YENC_ENCODED) {
+    while (*s) {
+      if (ecb_expect_false (*s == '=')) {
+	if (*++s != '\0') {
+	  d[count++] = (char) ((int) *s - 64 - 42);
+	  s++;
+	}
+      }
+      #if 0 /* FP_fgets never leaves CR or LF in the buffer, so skip this */
+      else if (ecb_expect_false (*s == '\n' || *s == '\r')) {
+	s++; /* ignore */
+      }
+      #endif
+      else {
+	d[count++] = (char) ((int) *s++ - 42);
+      }
+    }
+  }
+  else if (method == UU_ENCODED || method == XX_ENCODED) {
     if (method == UU_ENCODED)
       table = UUxlat;
     else
@@ -625,20 +637,20 @@ UUDecodeLine (char *s, char *d, int method)
 
       if(i-- > 0)
 	d[count++] = c;
-      
+
       cc <<= 4;
       c    = table[ACAST(*s++)];
       cc  |= (c >> 2);
-      
+
       if(i-- > 0)
 	d[count++] = cc;
-      
+
       c <<= 6;
       c |= table[ACAST(*s++)];
-      
+
       if(i-- > 0)
 	d[count++] = c;
-      
+
       j -= 4;
     }
   }
@@ -706,22 +718,6 @@ UUDecodeLine (char *s, char *d, int method)
     while (BHxlat[ACAST(*s)] != -1)
       uuncdl_fulline[leftover++] = *s++;
   }
-  else if (method == YENC_ENCODED) {
-    while (*s) {
-      if (*s == '=') {
-	if (*++s != '\0') {
-	  d[count++] = (char) ((int) *s - 64 - 42);
-	  s++;
-	}
-      }
-      else if (*s == '\n' || *s == '\r') {
-	s++; /* ignore */
-      }
-      else {
-	d[count++] = (char) ((int) *s++ - 42);
-      }
-    }
-  }
 
   return count;
 }
@@ -740,10 +736,10 @@ UUDecodeQP (FILE *datain, FILE *dataout, int *state,
 
   uulboundary = -1;
 
-  while (!feof (datain) && 
+  while (!FP_feof (datain) &&
 	 (ftell(datain)<maxpos || flags&FL_TOEND ||
 	  (!(flags&FL_PROPER) && uu_fast_scanning))) {
-    if (_FP_fgets (line, 1023, datain) == NULL)
+    if (FP_fgets (line, 1023, datain) == NULL)
       break;
     if (ferror (datain)) {
       UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
@@ -815,7 +811,7 @@ UUDecodeQP (FILE *datain, FILE *dataout, int *state,
      * So if the part ends here, don't print a line break"
      */
     /* something is broken here now, but it was broken before */
-    if (!feof (datain) && 
+    if (!FP_feof (datain) &&
 	(ftell(datain)<maxpos || flags&FL_TOEND ||
 	 (!(flags&FL_PROPER) && uu_fast_scanning)))
       fprintf (dataout, "%s\n", p1);
@@ -840,10 +836,10 @@ UUDecodePT (FILE *datain, FILE *dataout, int *state,
 
   uulboundary = -1;
 
-  while (!feof (datain) && 
+  while (!FP_feof (datain) &&
 	 (ftell(datain)<maxpos || flags&FL_TOEND ||
 	  (!(flags&FL_PROPER) && uu_fast_scanning))) {
-    if (_FP_fgets (line, 1023, datain) == NULL)
+    if (FP_fgets (line, 1023, datain) == NULL)
       break;
     if (ferror (datain)) {
       UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
@@ -961,15 +957,15 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
   int warning=0, vlc=0, lc[2], hadct=0;
   int tc=0, tf=0, vflag, haddata=0, haddh=0;
   long yefilesize=0, yepartends=0, yenotlastpart=0;
-  crc32_t yepartcrc=crc32(0L, Z_NULL, 0);
-  static crc32_t yefilecrc=0;
+  crc32_t yepartcrc=CRC32_INIT;
+  static crc32_t yefilecrc;
   static int bhflag=0;
   size_t count=0;
   size_t yepartsize=0;
   char *ptr;
 
   if (datain == NULL || dataout == NULL) {
-    yefilecrc = crc32(0L, Z_NULL, 0);
+    yefilecrc = CRC32_INIT;
     bhflag = 0;
     return UURET_OK;
   }
@@ -994,10 +990,10 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
     *state = BEGIN;
   }
 
-  while (!feof (datain) && *state != DONE && 
+  while (!FP_feof (datain) && *state != DONE &&
 	 (ftell(datain)<maxpos || flags&FL_TOEND || maxpos==-1 ||
 	  (!(flags&FL_PROPER) && uu_fast_scanning))) {
-    if (_FP_fgets ((line = uugen_fnbuffer), 1200 - 5, datain) == NULL)
+    if (FP_fgets ((line = uugen_fnbuffer), 1200 - 5, datain) == NULL)
       break;
 
     /* optionally skip .. */
@@ -1028,7 +1024,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
       vlc = 0;
       continue;
     }
-    
+
     /*
      * Busy Polls
      */
@@ -1061,7 +1057,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 
     if ((flags&FL_PROPER) == 0) {
       if (strncmp (line, "BEGIN", 5) == 0 &&
-	  _FP_strstr  (line, "CUT HERE")  && !tf) { /* I hate these lines */
+	  FP_strstr  (line, "CUT HERE")  && !tf) { /* I hate these lines */
 	tc = tf = vlc = 0;
 	continue;
       }
@@ -1077,14 +1073,14 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 	haddh = 1;
 	continue;
       }
-      if (_FP_strnicmp (line, "Content-Type", 12) == 0)
+      if (FP_strnicmp (line, "Content-Type", 12) == 0)
 	hadct = 1;
     }
 
     if (*state == BEGIN) {
       if ((method == UU_ENCODED || method == XX_ENCODED) &&
 	  (strncmp      (line, "begin ",       6) == 0 ||
-	   _FP_strnicmp (line, "<pre>begin ", 11) == 0)) { /* for LYNX */
+	   FP_strnicmp (line, "<pre>begin ", 11) == 0)) { /* for LYNX */
 	*state = DATA;
 	continue;
       }
@@ -1098,10 +1094,10 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
       }
       else if (method == YENC_ENCODED &&
 	       strncmp (line, "=ybegin ", 8) == 0 &&
-	       _FP_strstr (line, " name=") != NULL) {
+	       FP_strstr (line, " name=") != NULL) {
 	*state = DATA;
 
-	if ((ptr = _FP_strstr (line, " size=")) != NULL) {
+	if ((ptr = FP_strstr (line, " size=")) != NULL) {
 	  ptr += 6;
 	  yefilesize = atoi (ptr);
 	}
@@ -1109,17 +1105,17 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 	  yefilesize = -1;
 	}
 
-	if ((ptr =_FP_strstr (line, " part="))) {
+	if ((ptr =FP_strstr (line, " part="))) {
           int partno = atoi (ptr + 6);
-       
-	  if ((ptr = _FP_strstr (line, " total=")))
+
+	  if ((ptr = FP_strstr (line, " total=")))
             yenotlastpart = atoi (ptr + 7) != partno;
 
-	  if (_FP_fgets (line, 1200 - 5, datain) == NULL) {
+	  if (FP_fgets (line, 1200 - 5, datain) == NULL) {
 	    break;
 	  }
 
-	  if ((ptr = _FP_strstr (line, " end=")) == NULL) {
+	  if ((ptr = FP_strstr (line, " end=")) == NULL) {
 	    break;
 	  }
 
@@ -1131,7 +1127,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
       else {
 	continue;
       }
-      
+
       tc = tf = vlc = 0;
       lc[0] = lc[1] = 0;
     }
@@ -1145,14 +1141,22 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 
     if (*state == DATA && method == YENC_ENCODED &&
 	strncmp (line, "=yend ", 6) == 0) {
-      if ((ptr = _FP_strstr (line, " pcrc32=")) != NULL) {
+      int lastpart = !yenotlastpart && (yepartends == 0 || yepartends >= yefilesize);
+      yefilecrc = uu_crc32_combine(yefilecrc, yepartcrc, yepartsize);
+      if ((ptr = FP_strstr (line, " pcrc32=")) != NULL) {
 	crc32_t pcrc32 = strtoul (ptr + 8, NULL, 16);
 	if (pcrc32 != yepartcrc) {
 	  UUMessage (uunconc_id, __LINE__, UUMSG_WARNING,
 		     uustring (S_PCRC_MISMATCH), progress.curfile, progress.partno);
 	}
+      } else if ((ptr = FP_strstr (line, " pcrc=")) != NULL) {
+	crc32_t pcrc32 = strtoul (ptr + 6, NULL, 16);
+	if (pcrc32 != yepartcrc) {
+	  UUMessage (uunconc_id, __LINE__, UUMSG_WARNING,
+		     uustring (S_PCRC_MISMATCH), progress.curfile, progress.partno);
+	}
       }
-      if ((ptr = _FP_strstr (line, " crc32=")) != NULL)
+      if (lastpart && (ptr = FP_strstr (line, " crc32=")) != NULL)
       {
 	crc32_t fcrc32 = strtoul (ptr + 7, NULL, 16);
 	if (fcrc32 != yefilecrc) {
@@ -1160,7 +1164,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 		     uustring (S_CRC_MISMATCH), progress.curfile);
 	}
       }
-      if ((ptr = _FP_strstr (line, " size=")) != NULL)
+      if ((ptr = FP_strstr (line, " size=")) != NULL)
       {
 	size_t size = atol(ptr + 6);
 	if (size != yepartsize && yefilesize != -1) {
@@ -1174,7 +1178,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 		       yepartsize, size);
 	}
       }
-      if (!yenotlastpart && (yepartends == 0 || yepartends >= yefilesize)) {
+      if (lastpart) {
 	*state = DONE;
       }
       break;
@@ -1202,8 +1206,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 	if (tf) {
 	  count  = UUDecodeLine (line, oline, method);
 	  if (method == YENC_ENCODED) {
-	    yepartcrc = crc32(yepartcrc, oline, count);
-	    yefilecrc = crc32(yefilecrc, oline, count);
+	    yepartcrc = uu_crc32(yepartcrc, oline, count);
 	    yepartsize += count;
 	  }
 	  vlc++; lc[1]++;
@@ -1231,7 +1234,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
 	  lc[1] = 3;
 	}
 	else {
-	  _FP_strncpy (save[tc++], line, 1200);
+	  FP_strncpy (save[tc++], line, 1200);
 	}
 
 	if (method == UU_ENCODED)
@@ -1276,7 +1279,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
   if (*state  == DONE ||
       (*state == DATA && method == B64ENCODED &&
        vflag == B64ENCODED && (flags&FL_PROPER || haddh))) {
-    for (tf=0; tf<tc; tf++) 
+    for (tf=0; tf<tc; tf++)
       count += UUDecodeLine (save[tf], oline + count, method);
     if (count) {
       if (method == BH_ENCODED) {
@@ -1348,7 +1351,7 @@ UUDecode (uulist *data)
 
   if (!data->binfile) {
 #else
-  if ((data->binfile = tempnam (NULL, "uu")) == NULL) {
+  if ((data->binfile = tmpnam (NULL)) == NULL) {
 #endif /* HAVE_MKSTEMP */
     UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
 	       uustring (S_NO_TEMP_NAME));
@@ -1360,7 +1363,7 @@ UUDecode (uulist *data)
   strcat(data->binfile, "/");
   strcat(data->binfile, tmpprefix);
 
-  if ((tmpfd = mkstemp(data->binfile)) == -1 || 
+  if ((tmpfd = mkstemp(data->binfile)) == -1 ||
 	  (dataout = fdopen(tmpfd, mode)) == NULL) {
 #else
   if ((dataout = fopen (data->binfile, mode)) == NULL) {
@@ -1378,12 +1381,13 @@ UUDecode (uulist *data)
 		close(tmpfd);
     }
 #endif /* HAVE_MKSTEMP */
-    _FP_free (data->binfile);
+    FP_free (data->binfile);
     data->binfile = NULL;
     uu_errno = errno;
     return UURET_IOERR;
   }
   UUSETBUF (dataout, dataout_buf, uu_wbuf);
+  FP_flockfile (dataout);
 
   /*
    * we don't have begin lines in Base64 or plain text files.
@@ -1409,13 +1413,13 @@ UUDecode (uulist *data)
    */
   progress.action = 0;
   if (data->filename != NULL) {
-    _FP_strncpy (progress.curfile,
+    FP_strncpy (progress.curfile,
 		 (strlen(data->filename)>255)?
 		 (data->filename+strlen(data->filename)-255):data->filename,
 		 256);
   }
   else {
-    _FP_strncpy (progress.curfile,
+    FP_strncpy (progress.curfile,
 		 (strlen(data->binfile)>255)?
 		 (data->binfile+strlen(data->binfile)-255):data->binfile,
 		 256);
@@ -1431,7 +1435,7 @@ UUDecode (uulist *data)
     progress.numparts = (iter->partno)?iter->partno:1;
     iter = iter->NEXT;
   }
-  
+
   /*
    * let's rock!
    */
@@ -1474,9 +1478,10 @@ UUDecode (uulist *data)
 	res = UURET_IOERR;
 	break;
       }
-      _FP_strncpy (uugen_fnbuffer, iter->data->sfname, 1024);
+      FP_strncpy (uugen_fnbuffer, iter->data->sfname, 1024);
     }
     UUSETBUF (datain, datain_buf, uu_rbuf);
+    FP_flockfile (datain);
 
     progress.partno  = part;
     progress.fsize   = (iter->data->length)?iter->data->length:-1;
@@ -1499,7 +1504,7 @@ UUDecode (uulist *data)
     iter = iter->NEXT;
   }
 
-  if (state == DATA && 
+  if (state == DATA &&
       (data->uudet == B64ENCODED || data->uudet == QP_ENCODED ||
        data->uudet == PT_ENCODED))
     state = DONE; /* assume we're done */
@@ -1514,7 +1519,7 @@ UUDecode (uulist *data)
 
   if (res != UURET_OK || (state != DONE && !uu_desperate)) {
     unlink (data->binfile);
-    _FP_free (data->binfile);
+    FP_free (data->binfile);
     data->binfile = NULL;
     data->state  &= ~UUFILE_TMPFILE;
     data->state  |=  UUFILE_ERROR;
@@ -1537,12 +1542,11 @@ UUDecode (uulist *data)
 
   if (data->uudet == BH_ENCODED && data->binfile) {
 #ifdef HAVE_MKSTEMP
-	  ntmp = malloc(strlen(tmpdir)+strlen(tmpprefix)+2);
-	  
-	  if (ntmp == NULL) {
+    ntmp = malloc(strlen(tmpdir)+strlen(tmpprefix)+2);
 #else
-    if ((ntmp = tempnam (NULL, "uu")) == NULL) {
+    ntmp = tempnam (NULL);
 #endif /* HAVE_MKSTEMP */
+    if (ntmp == NULL) {
       UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
 		 uustring (S_NO_TEMP_NAME));
       progress.action = 0;
@@ -1557,11 +1561,12 @@ UUDecode (uulist *data)
       return UURET_IOERR;
     }
     UUSETBUF (datain, datain_buf, uu_rbuf);
+    FP_flockfile (datain);
 
 #ifdef HAVE_MKSTEMP
     strcpy(ntmp, tmpdir);
     strcat(ntmp, "/");
-    strcat(ntmp, tmpprefix); 
+    strcat(ntmp, tmpprefix);
     if ((tmpfd = mkstemp(ntmp)) == -1 ||
 		(dataout = fdopen(tmpfd, "wb")) == NULL) {
 #else
@@ -1583,11 +1588,12 @@ UUDecode (uulist *data)
       return UURET_IOERR;
     }
     UUSETBUF (dataout, dataout_buf, uu_wbuf);
+    FP_flockfile (dataout);
 
     /*
      * read fork lengths. remember they're in Motorola format
      */
-    r[0] = _FP_fgetc (datain);
+    r[0] = FP_getc (datain);
     hb   = (int) r[0] + 22;
     fseek (datain, (int) r[0] + 12, SEEK_SET);
     fread (r, 1, 8, datain);
@@ -1633,7 +1639,7 @@ UUDecode (uulist *data)
      * copy the chosen fork
      */
 
-    while (!feof (datain) && numbytes) {
+    while (!FP_feof (datain) && numbytes) {
       if (UUBUSYPOLL(ftell(datain)-progress.foffset,progress.fsize)) {
 	UUMessage (uunconc_id, __LINE__, UUMSG_NOTE,
 		   uustring (S_DECODE_CANCEL));
@@ -1649,7 +1655,7 @@ UUDecode (uulist *data)
       bytes = fread (uugen_inbuffer, 1,
 		     (size_t) ((numbytes>1024)?1024:numbytes), datain);
 
-      if (ferror (datain) || (bytes == 0 && !feof (datain))) {
+      if (ferror (datain) || (bytes == 0 && !FP_feof (datain))) {
 	progress.action = 0;
 	UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
 		   uustring (S_SOURCE_READ_ERR),
@@ -1735,13 +1741,13 @@ UUQuickDecode (FILE *datain, FILE *dataout, char *boundary, long maxpos)
   memset (&myenv, 0, sizeof (headers));
   UUScanHeader (datain, &myenv);
 
-  if (_FP_stristr (myenv.ctenc, "uu") != NULL)
+  if (FP_stristr (myenv.ctenc, "uu") != NULL)
     encoding = UU_ENCODED;
-  else if (_FP_stristr (myenv.ctenc, "xx") != NULL)
+  else if (FP_stristr (myenv.ctenc, "xx") != NULL)
     encoding = XX_ENCODED;
-  else if (_FP_stricmp (myenv.ctenc, "base64") == 0)
+  else if (FP_stricmp (myenv.ctenc, "base64") == 0)
     encoding = B64ENCODED;
-  else if (_FP_stricmp (myenv.ctenc, "quoted-printable") == 0)
+  else if (FP_stricmp (myenv.ctenc, "quoted-printable") == 0)
     encoding = QP_ENCODED;
   else
     encoding = PT_ENCODED;
diff --git a/uulib/uuscan.c b/uulib/uuscan.c
index a6bc40f..7e7dedd 100644
--- a/uulib/uuscan.c
+++ b/uulib/uuscan.c
@@ -17,7 +17,7 @@
 /*
  * These are very central functions of UUDeview. Here, we scan a file
  * and decide whether it contains encoded data or not. ScanPart() must
- * be called repeatedly on the same file until feof(file). Each time,
+ * be called repeatedly on the same file until FP_feof(file). Each time,
  * it returns information about the next part found within.
  */
 
@@ -67,16 +67,16 @@ char * uuscan_id = "$Id$";
  * to scan the bodies from partial multipart messages.
  */
 
-#define LSTR(s) { sizeof (s) - 1, s }
+#define LSTR(s) { (s), sizeof (s) - 1 }
 
 struct lstr {
-  int len;
   const char *str;
+  int len;
 };
 
 #define MAX_KNOWNHEADERLEN 28 /* max. length of a known header */
 
-static struct lstr knownheaders[] = {
+static const struct lstr knownheaders[] = {
   /* "From " handled in IsKnownHeader */
 
   /* knownmsgheaders */
@@ -86,16 +86,16 @@ static struct lstr knownheaders[] = {
   LSTR ("Resent-To"), LSTR ("Cc"), LSTR ("Bcc"), LSTR ("Resent-bcc"),
   LSTR ("Message-ID"), LSTR ("Resent-Message-Id"), LSTR ("In-Reply-To"),
   LSTR ("References"), LSTR ("Keywords"), LSTR ("Subject"), LSTR ("Comments"),
-  
+
   LSTR ("Delivery-Date"), LSTR ("Posted-Date"), LSTR ("Received-Date"),
-  LSTR ("Precedence"), 
+  LSTR ("Precedence"),
 
   LSTR ("Path"), LSTR ("Newsgroups"), LSTR ("Organization"), LSTR ("Lines"),
   LSTR ("NNTP-Posting-Host"),
 
   /* knownminehaders */
   LSTR ("Mime-Version"),  LSTR ("Content-Transfer-Encoding"),
-  LSTR ("Content-Type"), LSTR ("Content-Disposition"), 
+  LSTR ("Content-Type"), LSTR ("Content-Disposition"),
   LSTR ("Content-Description"), LSTR ("Content-Length")
 };
 
@@ -182,17 +182,17 @@ static char *
 ScanHeaderLine (FILE *datei, char *initial)
 {
   char *ptr=uuscan_shlline;
-  char *ptr2, *p1, *p2, *p3;
+  char *ptr2, *p2, *p3;
   int llength, c;
   long curpos;
 
   if (initial) {
-    _FP_strncpy (uuscan_shlline, initial, 1024);
+    FP_strncpy (uuscan_shlline, initial, 1024);
   } else {
     /* read first line */
-    if (feof (datei) || ferror (datei))
+    if (FP_feof (datei) || ferror (datei))
       return NULL;
-    if (_FP_fgets (uuscan_shlline, 1024, datei) == NULL)
+    if (FP_fgets (uuscan_shlline, 1024, datei) == NULL)
       return NULL;
   }
 
@@ -206,8 +206,8 @@ ScanHeaderLine (FILE *datei, char *initial)
   if (llength == 0)
     return uuscan_shlline;
 
-  while (!feof (datei)) {
-    c = _FP_fgetc (datei);
+  while (!FP_feof (datei)) {
+    c = FP_getc (datei);
     if (c == EOF)
       break;
 
@@ -217,17 +217,17 @@ ScanHeaderLine (FILE *datei, char *initial)
         break;
       }
 
-    while (!feof (datei) && (c == ' ' || c == '\t'))
-      c = _FP_fgetc (datei);
+    while (!FP_feof (datei) && (c == ' ' || c == '\t'))
+      c = FP_getc (datei);
 
-    if (!feof (datei))
+    if (!FP_feof (datei))
       ungetc (c, datei);	/* push back for fgets() */
     else
       break;
 
     /* read next line */
     curpos = ftell (datei);
-    if (_FP_fgets (uugen_inbuffer, 1024, datei) == NULL)
+    if (FP_fgets (uugen_inbuffer, 1024, datei) == NULL)
       break;
 
     if (IsLineEmpty (uugen_inbuffer)) { /* oops */
@@ -235,7 +235,7 @@ ScanHeaderLine (FILE *datei, char *initial)
       break;
     }
 
-    _FP_strncpy (ptr, uugen_inbuffer, 1024-llength);
+    FP_strncpy (ptr, uugen_inbuffer, 1024-llength);
 
     c = strlen (ptr);
 
@@ -269,10 +269,10 @@ ScanHeaderLine (FILE *datei, char *initial)
 
     if (*ptr == '=' && *(ptr+1) == '?') {
       /*
-       * Let p1 point to the charset, look for next question mark
+       * Let p2 point to the charset, look for next question mark
        */
 
-      p1 = p2 = ptr+2;
+      p2 = ptr+2;
 
       while (*p2 && *p2 != '?') {
 	p2++;
@@ -410,88 +410,88 @@ ParseHeader (headers *theheaders, char *line)
   if (line == NULL)
     return theheaders;
 
-  if (_FP_strnicmp (line, "From:", 5) == 0) {
+  if (FP_strnicmp_fast (line, "From:", 5) == 0) {
     if (theheaders->from) return theheaders;
     variable = &theheaders->from;
     value    = line+5;
     delimit  = 0;
   }
-  else if (_FP_strnicmp (line, "Subject:", 8) == 0) {
+  else if (FP_strnicmp_fast (line, "Subject:", 8) == 0) {
     if (theheaders->subject) return theheaders;
     variable = &theheaders->subject;
     value    = line+8;
     delimit  = 0;
   }
-  else if (_FP_strnicmp (line, "To:", 3) == 0) {
+  else if (FP_strnicmp_fast (line, "To:", 3) == 0) {
     if (theheaders->rcpt) return theheaders;
     variable = &theheaders->rcpt;
     value    = line+3;
     delimit  = 0;
   }
-  else if (_FP_strnicmp (line, "Date:", 5) == 0) {
+  else if (FP_strnicmp_fast (line, "Date:", 5) == 0) {
     if (theheaders->date) return theheaders;
     variable = &theheaders->date;
     value    = line+5;
     delimit  = 0;
   }
-  else if (_FP_strnicmp (line, "Mime-Version:", 13) == 0) {
+  else if (FP_strnicmp_fast (line, "Mime-Version:", 13) == 0) {
     if (theheaders->mimevers) return theheaders;
     variable = &theheaders->mimevers;
     value    = line+13;
     delimit  = 0;
   }
-  else if (_FP_strnicmp (line, "Content-Type:", 13) == 0) {
+  else if (FP_strnicmp_fast (line, "Content-Type:", 13) == 0) {
     if (theheaders->ctype) return theheaders;
     variable = &theheaders->ctype;
     value    = line+13;
     delimit  = ';';
 
     /* we can probably extract more information */
-    if ((ptr = _FP_stristr (line, "boundary")) != NULL) {
+    if ((ptr = FP_stristr (line, "boundary")) != NULL) {
       if ((thenew = ParseValue (ptr))) {
 	if (theheaders->boundary) free (theheaders->boundary);
-	theheaders->boundary = _FP_strdup (thenew);
+	theheaders->boundary = FP_strdup (thenew);
       }
     }
-    if ((ptr = _FP_stristr (line, "name")) != NULL) {
+    if ((ptr = FP_stristr (line, "name")) != NULL) {
       if ((thenew = ParseValue (ptr))) {
 	if (theheaders->fname) free (theheaders->fname);
-	theheaders->fname = _FP_strdup (thenew);
+	theheaders->fname = FP_strdup (thenew);
       }
     }
-    if ((ptr = _FP_stristr (line, "id")) != NULL) {
+    if ((ptr = FP_stristr (line, "id")) != NULL) {
       if ((thenew = ParseValue (ptr))) {
 	if (theheaders->mimeid) free (theheaders->mimeid);
-	theheaders->mimeid = _FP_strdup (thenew);
+	theheaders->mimeid = FP_strdup (thenew);
       }
     }
-    if ((ptr = _FP_stristr (line, "number")) != NULL) {
+    if ((ptr = FP_stristr (line, "number")) != NULL) {
       if ((thenew = ParseValue (ptr))) {
 	theheaders->partno = atoi (thenew);
       }
     }
-    if ((ptr = _FP_stristr (line, "total")) != NULL) {
+    if ((ptr = FP_stristr (line, "total")) != NULL) {
       if ((thenew = ParseValue (ptr))) {
 	theheaders->numparts = atoi (thenew);
       }
     }
   }
-  else if (_FP_strnicmp (line, "Content-Transfer-Encoding:", 26) == 0) {
+  else if (FP_strnicmp_fast (line, "Content-Transfer-Encoding:", 26) == 0) {
     if (theheaders->ctenc) return theheaders;
     variable = &theheaders->ctenc;
     value    = line+26;
     delimit  = ';';
   }
-  else if (_FP_strnicmp (line, "Content-Disposition:", 20) == 0) {
+  else if (FP_strnicmp_fast (line, "Content-Disposition:", 20) == 0) {
     /*
      * Some encoders mention the original filename as parameter to
      * Content-Type, others as parameter to Content-Disposition. We
      * do prefer the first solution, but accept this situation, too.
      * TODO: Read RFC1806
      */
-    if ((ptr = _FP_stristr (line, "name")) != NULL) {
+    if ((ptr = FP_stristr (line, "name")) != NULL) {
       if (theheaders->fname == NULL && (thenew=ParseValue(ptr)) != NULL) {
-	theheaders->fname = _FP_strdup (thenew);
+	theheaders->fname = FP_strdup (thenew);
       }
     }
     variable = NULL;
@@ -522,7 +522,7 @@ ParseHeader (headers *theheaders, char *line)
     }
     *ptr = '\0';
 
-    if ((*variable = _FP_strdup (uuscan_phtext)) == NULL)
+    if ((*variable = FP_strdup (uuscan_phtext)) == NULL)
       return NULL;
   }
 
@@ -554,7 +554,7 @@ IsKnownHeader (char *line)
   len = sep - line; /* length of part before ':' */
 
   for (i = 0; i < sizeof (knownheaders) / sizeof (knownheaders [0]); ++i)
-    if (len == knownheaders [i].len && _FP_strnicmp (line, knownheaders [i].str, len) == 0)
+    if (len == knownheaders [i].len && FP_strnicmp_fast (line, knownheaders [i].str, len) == 0)
       return 1;
 
   return 0;
@@ -569,7 +569,7 @@ UUScanHeader (FILE *datei, headers *envelope)
 {
   char *ptr;
 
-  while (!feof (datei)) {
+  while (!FP_feof (datei)) {
     if ((ptr = ScanHeaderLine (datei, NULL)) == NULL)
       break;
     if (*ptr == '\0')
@@ -592,7 +592,7 @@ UUScanHeader (FILE *datei, headers *envelope)
  * MIME handling.
  */
 
-static int
+ecb_hot static int
 ScanData (FILE *datei, char *fname, int *errcode,
 	  char *boundary, int ismime, int checkheaders,
 	  fileread *result)
@@ -613,7 +613,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
   (void) UUDecodeLine (NULL, NULL, 0);          /* init */
   bhdsp = bhds2;
 
-  if (datei == NULL || feof (datei))
+  if (datei == NULL || FP_feof (datei))
     return -1;
 
   result->startpos = ftell (datei);
@@ -629,9 +629,9 @@ ScanData (FILE *datei, char *fname, int *errcode,
   if (boundary)
     blen = strlen (boundary);
 
-  while (!feof (datei)) {
+  while (!FP_feof (datei)) {
     oldposition = ftell (datei);
-    if (_FP_fgets (line, 1024, datei) == NULL)
+    if (FP_fgets (line, 1024, datei) == NULL)
       break;
     if (ferror (datei))
       break;
@@ -697,16 +697,16 @@ ScanData (FILE *datei, char *fname, int *errcode,
       dontcare=0;
     }
 
-    if (boundary != NULL && 
+    if (boundary != NULL &&
 	line[0] == '-' && line[1] == '-' &&
 	strncmp (line+2, boundary, blen) == 0) {
       fseek (datei, oldposition, SEEK_SET);
       break;
     }
     if (boundary != NULL && line[0] == 'C' && line[1] == 'o' &&
-	_FP_strnicmp (line, "Content-Type:", 13) == 0) {
+	FP_strnicmp_fast (line, "Content-Type:", 13) == 0) {
       ptr = ScanHeaderLine (datei, line);
-      p2  = (ptr)?_FP_stristr(ptr,"boundary"):NULL;
+      p2  = (ptr)?FP_stristr(ptr,"boundary"):NULL;
       p3  = (p2)?ParseValue(p2):NULL;
 
       if (p3 && strcmp (p3, boundary) == 0) {
@@ -718,30 +718,30 @@ ScanData (FILE *datei, char *fname, int *errcode,
       }
     }
 
-    if (strncmp      (line, "begin ",       6) == 0 ||
-	_FP_strnicmp (line, "<pre>begin ", 11) == 0) {
+    if (strncmp (line, "begin ", 6) == 0 ||
+	FP_strnicmp_fast (line, "<pre>begin ", 11) == 0) {
       if ((result->begin || result->end ||
 	   result->uudet == B64ENCODED ||
 	   result->uudet == BH_ENCODED) && !uu_more_mime) {
 	fseek (datei, oldposition, SEEK_SET);
 	break;
       }
-      
+
       if (*line == '<')
 	ptr = line + 10;
       else
 	ptr = line + 5;
 
       while (*ptr == ' ') ptr++;
-      while (isdigit (*ptr)) 
+      while (isdigit (*ptr))
 	result->mode = result->mode * 8 + *ptr++ - '0';
       while (*ptr == ' ') ptr++;
 
       /*
        * We may have picked up a filename from a uuenview-style header
        */
-      _FP_free (result->filename);
-      result->filename = _FP_strdup (ptr);
+      FP_free (result->filename);
+      result->filename = FP_strdup (ptr);
       result->begin    = 1;
 
       while (isspace (result->filename[strlen(result->filename)-1]))
@@ -770,30 +770,30 @@ ScanData (FILE *datei, char *fname, int *errcode,
      * Detect a UUDeview-Style header
      */
 
-    if (_FP_strnicmp (line, "_=_ Part ", 9) == 0 &&
+    if (FP_strnicmp_fast (line, "_=_ Part ", 9) == 0 &&
 	result->uudet != YENC_ENCODED) {
       if (result->uudet) {
 	fseek (datei, oldposition, SEEK_SET);
 	break;
       }
       result->partno = atoi (line + 8);
-      if ((ptr = _FP_stristr (line, "of file ")) != NULL) {
+      if ((ptr = FP_stristr (line, "of file ")) != NULL) {
 	ptr += 8;
 	while (isspace (*ptr)) ptr++;
 	p2 = ptr;
-	while (isalnum(*p2) || 
+	while (isalnum(*p2) ||
 	       *p2 == '.' || *p2=='_' || *p2 == '-' ||
 	       *p2 == '!' || *p2=='@' || *p2 == '$')
 	  p2++;
 	c = *p2; *p2 = '\0';
 	if (p2 != ptr && result->filename == NULL)
-	  result->filename = _FP_strdup (ptr);
+	  result->filename = FP_strdup (ptr);
 	else if (p2 - ptr > 5 && strchr (ptr, '.') != NULL) {
 	  /*
 	   * This file name looks good, too. Let's use it
 	   */
-	  _FP_free (result->filename);
-	  result->filename = _FP_strdup (ptr);
+	  FP_free (result->filename);
+	  result->filename = FP_strdup (ptr);
 	}
 	*p2 = c;
       }
@@ -805,8 +805,8 @@ ScanData (FILE *datei, char *fname, int *errcode,
      */
     if (boundary == NULL && !ismime && !uu_more_mime &&
 	result->uudet != YENC_ENCODED) {
-      if (_FP_strnicmp (line, "Content-Type", 12) == 0 ||
-	  _FP_strnicmp (line, "X-Orcl-Content-Type", 19) == 0) {
+      if (FP_strnicmp_fast (line, "Content-Type", 12) == 0 ||
+	  FP_strnicmp_fast (line, "X-Orcl-Content-Type", 19) == 0) {
 	/*
 	 * We use Content-Type to mark a new attachment and split the file.
 	 * However, we do not split if we haven't found anything encoded yet.
@@ -817,61 +817,62 @@ ScanData (FILE *datei, char *fname, int *errcode,
 	}
 	if ((ptr = strchr (line, ':')) != NULL) {
 	  ptr++;
-	  while (isspace (*ptr)) ptr++; p2 = ptr;
-	  while (!isspace (*p2) && *p2 != ';') p2++;
+	  while (isspace (*ptr)) ptr++;
+          p2 = ptr;
+	  while (*p2 && !isspace (*p2) && *p2 != ';') p2++;
 	  c = *p2; *p2 = '\0';
 	  if (p2 != ptr) {
-	    _FP_free (result->mimetype);
-	    result->mimetype = _FP_strdup (ptr);
+	    FP_free (result->mimetype);
+	    result->mimetype = FP_strdup (ptr);
 	  }
 	  *p2 = c;
 	}
 	ctline=0;
 	hadct=1;
       }
-      if ((ptr = _FP_stristr (line, "number=")) && ctline<4) {
+      if ((ptr = FP_stristr (line, "number=")) && ctline<4) {
 	ptr += 7; if (*ptr == '"') ptr++;
 	result->partno = atoi (ptr);
       }
-      if ((ptr = _FP_stristr (line, "total=")) && ctline<4) {
+      if ((ptr = FP_stristr (line, "total=")) && ctline<4) {
 	ptr += 6; if (*ptr == '"') ptr++;
 	result->maxpno = atoi (ptr);
       }
-      if ((ptr = _FP_stristr (line, "name=")) && ctline<4) {
+      if ((ptr = FP_stristr (line, "name=")) && ctline<4) {
 	ptr += 5;
 	while (isspace (*ptr)) ptr++;
 	if (*ptr == '"' && *(ptr+1) && (p2 = strchr (ptr+2, '"')) != NULL) {
 	  c = *p2; *p2 = '\0';
-	  _FP_free (result->filename);
-	  result->filename = _FP_strdup (ptr+1);
+	  FP_free (result->filename);
+	  result->filename = FP_strdup (ptr+1);
 	  *p2 = c;
 	}
 	else if (*ptr=='\''&&*(ptr+1)&&(p2 = strchr(ptr+2, '\'')) != NULL) {
 	  c = *p2; *p2 = '\0';
-	  _FP_free (result->filename);
-	  result->filename = _FP_strdup (ptr+1);
+	  FP_free (result->filename);
+	  result->filename = FP_strdup (ptr+1);
 	  *p2 = c;
 	}
 	else {
 	  p2 = ptr;
-	  while (isalnum(*p2) || 
+	  while (isalnum(*p2) ||
 		 *p2 == '.' || *p2=='_' || *p2 == '-' ||
 		 *p2 == '!' || *p2=='@' || *p2 == '$')
 	    p2++;
 	  c = *p2; *p2 = '\0';
 	  if (p2 != ptr && result->filename == NULL)
-	    result->filename = _FP_strdup (ptr);
+	    result->filename = FP_strdup (ptr);
 	  else if (p2 - ptr > 5 && strchr (ptr, '.') != NULL) {
 	    /*
 	     * This file name looks good, too. Let's use it
 	     */
-	    _FP_free (result->filename);
-	    result->filename = _FP_strdup (ptr);
+	    FP_free (result->filename);
+	    result->filename = FP_strdup (ptr);
 	  }
 	  *p2 = c;
 	}
       }
-      if ((ptr = _FP_stristr (line, "id=")) && ctline<4) {
+      if ((ptr = FP_stristr (line, "id=")) && ctline<4) {
 	p2 = ptr += 3;
 	if (*p2 == '"') {
 	  p2 = strchr (++ptr, '"');
@@ -883,13 +884,13 @@ ScanData (FILE *datei, char *fname, int *errcode,
 	if (p2 && *p2 && p2!=ptr) {
 	  c = *p2; *p2 = '\0';
 	  if (result->mimeid)
-	    _FP_free (result->mimeid);
-	  result->mimeid = _FP_strdup (ptr);
+	    FP_free (result->mimeid);
+	  result->mimeid = FP_strdup (ptr);
 	  *p2 = c;
 	}
       }
-      
-      /* 
+
+      /*
        * Handling for very short Base64 files.
        */
       if (uu_tinyb64 && !ismime && !uu_more_mime) {
@@ -915,16 +916,16 @@ ScanData (FILE *datei, char *fname, int *errcode,
 
     if (boundary == NULL && !ismime && !uu_more_mime && dflag <= 1 &&
 	line[0] == '-' && line[1] == '-' && strlen(line+2)>10 &&
-	(((ptr = _FP_strrstr (line+2, "--")) == NULL) ||
+	(((ptr = FP_strrstr (line+2, "--")) == NULL) ||
 	 ptr[2]) &&
-	_FP_strstr (line+2, "_=_") != NULL) {
+	FP_strstr (line+2, "_=_") != NULL) {
 
       long oldposition = ftell (datei); /* refresh oldpositition so the comment below becomes true */
-     
-      if (_FP_fgets (line, 1024, datei) == NULL) {
+
+      if (FP_fgets (line, 1024, datei) == NULL) {
 	break;
       }
-      if (_FP_strnicmp (line, "Content-", 8) == 0) {
+      if (FP_strnicmp_fast (line, "Content-", 8) == 0) {
 	/*
 	 * Okay, let's do it. This breaks out of ScanData. ScanPart will
 	 * recognize the boundary on the next call and use it.
@@ -939,7 +940,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
      */
 
     if (strncmp (line, "=ybegin ", 8) == 0 &&
-	_FP_strstr (line, " name=") != NULL) {
+	FP_strstr (line, " name=") != NULL) {
       if ((result->begin || result->end || result->uudet) && !uu_more_mime) {
 	fseek (datei, oldposition, SEEK_SET);
 	break;
@@ -948,15 +949,15 @@ ScanData (FILE *datei, char *fname, int *errcode,
       /*
        * name continues to the end of the line
        */
-      
-      ptr = _FP_strstr (line, " name=") + 6;
+
+      ptr = FP_strstr (line, " name=") + 6;
 
       /* newsbin pro 5.0 (at least) is braindamaged enough to put (null) here */
       /* create something sensible, trust a windows program to fuck it up */
       if (strncmp (ptr, "(null)", 6))
         {
-          _FP_free (result->filename);
-          result->filename = _FP_strdup (ptr);
+          FP_free (result->filename);
+          result->filename = FP_strdup (ptr);
 
           while (isspace (result->filename[strlen(result->filename)-1]))
             result->filename[strlen(result->filename)-1] = '\0';
@@ -966,7 +967,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
        * Determine size
        */
 
-      if ((ptr = _FP_strstr (line, " size=")) != NULL) {
+      if ((ptr = FP_strstr (line, " size=")) != NULL) {
 	ptr += 6;
 	result->yefilesize = atoi (ptr);
       }
@@ -978,17 +979,17 @@ ScanData (FILE *datei, char *fname, int *errcode,
        * check for multipart file and read =ypart line
        */
 
-      if ((ptr = _FP_strstr (line, " part=")) != NULL) {
+      if ((ptr = FP_strstr (line, " part=")) != NULL) {
 	result->partno = atoi (ptr + 6);
 
 	if (result->partno == 1) {
 	  result->begin = 1;
 	}
 
-        if ((ptr = _FP_strstr (line, " total=")))
+        if ((ptr = FP_strstr (line, " total=")))
 	  result->maxpno = atoi (ptr + 7);
 
-	if (_FP_fgets (line, 1024, datei) == NULL) {
+	if (FP_fgets (line, 1024, datei) == NULL) {
 	  break;
 	}
 
@@ -996,10 +997,10 @@ ScanData (FILE *datei, char *fname, int *errcode,
 	  break;
 	}
 
-	if ((ptr = _FP_strstr (line, " end=")) == NULL) {
+	if ((ptr = FP_strstr (line, " end=")) == NULL) {
 	  break;
 	}
-       
+
 	yepartends = atoi (ptr + 5);
       }
       else {
@@ -1112,13 +1113,13 @@ ScanData (FILE *datei, char *fname, int *errcode,
 	      result->filename==NULL) {
 	    memcpy (bhds1, bhds2+1, (int) bhds2[0]);
 	    bhds1[(int)bhds2[0]]='\0';
-	    result->filename = _FP_strdup (bhds1);
+	    result->filename = FP_strdup (bhds1);
 	    bhnf             = 1;
 	  }
 	  else if (bhdsp-bhds2 >= 256 && bhds2[0]>0) {
 	    memcpy (bhds1, bhds2+1, 255);
 	    bhds1[255]       = '\0';
-	    result->filename = _FP_strdup (bhds1);
+	    result->filename = FP_strdup (bhds1);
 	    bhnf             = 1;
 	  }
 	  else if (bhds2[0] <= 0)
@@ -1197,7 +1198,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
 
 	  hcount = lcount = 0;
 
-	  while (!feof (datei)) {
+	  while (!FP_feof (datei)) {
 	    /*
 	     * Make Busy Polls
 	     */
@@ -1209,7 +1210,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
 	    }
 
 	    oldposition = ftell (datei);
-	    if (_FP_fgets (line, 1024, datei) == NULL)
+	    if (FP_fgets (line, 1024, datei) == NULL)
 	      break;
 	    if (ferror (datei))
 	      break;
@@ -1296,7 +1297,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
 
 	  continue;
 	}
-	
+
 	/*
 	 * Select the encoding with the best "history"
 	 */
@@ -1375,9 +1376,9 @@ ScanData (FILE *datei, char *fname, int *errcode,
     /*
      * End of scanning loop
      */
-  } /* while (!feof (datei)) */
+  } /* while (!FP_feof (datei)) */
 
-  if (feof (datei))
+  if (FP_feof (datei))
     oldposition = ftell (datei);
 
   if (dflag && encoding == B64ENCODED && haddh)
@@ -1446,7 +1447,7 @@ ScanData (FILE *datei, char *fname, int *errcode,
     return 2;
   else if (boundary && p3 &&
 	   line[0] == 'C' && line[1] == 'o' &&
-	   _FP_strnicmp (line, "Content-Type:", 13) == 0 &&
+	   FP_strnicmp_fast (line, "Content-Type:", 13) == 0 &&
 	   strcmp (p3, boundary) == 0)
     return 2;
   else if (IsKnownHeader (line))
@@ -1470,7 +1471,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
   char *ptr1, *ptr2;
 
   (void) UUDecodeLine (NULL, NULL, 0);          /* init */
-  if (datei == NULL || feof (datei)) {
+  if (datei == NULL || FP_feof (datei)) {
     *errcode = UURET_OK;
     return NULL;
   }
@@ -1496,24 +1497,24 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     while (mssdepth) {
       mssdepth--;
       UUkillheaders (&(multistack[mssdepth].envelope));
-      _FP_free (multistack[mssdepth].source);
+      FP_free (multistack[mssdepth].source);
     }
 
     UUkillheaders (&sstate.envelope);
     memset (&sstate.envelope, 0, sizeof (headers));
 
-    _FP_free (sstate.source);
-    if ((sstate.source = _FP_strdup (fname)) == NULL) {
+    FP_free (sstate.source);
+    if ((sstate.source = FP_strdup (fname)) == NULL) {
       *errcode = UURET_NOMEM;
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
 
     /* ignore empty lines at the beginning of a file */
     preheaders = ftell (datei);
-    while (!feof (datei)) {
+    while (!FP_feof (datei)) {
       if (UUBUSYPOLL(preheaders,progress.fsize)) SPCANCEL();
-      if (_FP_fgets (line, 1024, datei) == NULL)
+      if (FP_fgets (line, 1024, datei) == NULL)
 	break;
       if (!IsLineEmpty (line)) {
 	fseek (datei, preheaders, SEEK_SET);
@@ -1523,8 +1524,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     }
   }
 
-  if (ferror(datei) || feof(datei)) {
-    _FP_free (result);
+  if (ferror(datei) || FP_feof(datei)) {
+    FP_free (result);
     return NULL;
   }
 
@@ -1546,12 +1547,12 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     while (mssdepth) {
       mssdepth--;
       UUkillheaders (&(multistack[mssdepth].envelope));
-      _FP_free (multistack[mssdepth].source);
+      FP_free (multistack[mssdepth].source);
     }
 
     prevpos = ftell (datei);
-    if (_FP_fgets (line, 1024, datei) == NULL) {
-      _FP_free (result);
+    if (FP_fgets (line, 1024, datei) == NULL) {
+      FP_free (result);
       return NULL;
     }
 
@@ -1563,15 +1564,15 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * false detection errors
      */
 
-    if (!feof (datei) && line[0] == '-' && line[1] == '-' && line[2]) {
+    if (!FP_feof (datei) && line[0] == '-' && line[1] == '-' && line[2]) {
       sstate.ismime            = 1;
-      sstate.envelope.mimevers = _FP_strdup ("1.0");
-      sstate.envelope.boundary = _FP_strdup (line+2);
-      sstate.envelope.ctype    = _FP_strdup ("multipart/mixed");
+      sstate.envelope.mimevers = FP_strdup ("1.0");
+      sstate.envelope.boundary = FP_strdup (line+2);
+      sstate.envelope.ctype    = FP_strdup ("multipart/mixed");
       sstate.mimestate         = MS_SUBPART;
 
       *errcode = UURET_CONT;
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
 
@@ -1579,7 +1580,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * Normal behavior: look for a RFC 822 header
      */
 
-    while (!feof (datei) && !IsLineEmpty (line)) {
+    while (!FP_feof (datei) && !IsLineEmpty (line)) {
       if (IsKnownHeader (line))
 	hcount++;
       if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
@@ -1587,7 +1588,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	ptr1 = ScanHeaderLine (datei, line);
 	if (ParseHeader (&sstate.envelope, ptr1) == NULL) {
 	  *errcode = UURET_NOMEM;
-	  _FP_free (result);
+	  FP_free (result);
 	  return NULL;
 	}
       }
@@ -1602,7 +1603,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	break;
       }
 
-      if (_FP_fgets (line, 1024, datei) == NULL) {
+      if (FP_fgets (line, 1024, datei) == NULL) {
         /* If we are at eof without finding headers, there probably isn't */
         if (hcount < hlcount.afternl)
           fseek (datei, prevpos, SEEK_SET);
@@ -1613,8 +1614,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     /* skip empty lines */
     prevpos = ftell (datei);
     if (IsLineEmpty (line)) {
-      while (!feof (datei)) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+      while (!FP_feof (datei)) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	if (!IsLineEmpty (line)) {
@@ -1638,26 +1639,26 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       /*
        * see above
        */
-      _FP_fgets (line, 1024, datei);
+      FP_fgets (line, 1024, datei);
 
-      while (!feof (datei) && !IsLineEmpty (line)) {
+      while (!FP_feof (datei) && !IsLineEmpty (line)) {
 	if (IsKnownHeader (line))
 	  hcount++;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	ptr1 = ScanHeaderLine (datei, line);
 	if (ParseHeader (&sstate.envelope, ptr1) == NULL) {
 	  *errcode = UURET_NOMEM;
-	  _FP_free (result);
+	  FP_free (result);
 	  return NULL;
 	}
 
-	if (_FP_fgets (line, 1024, datei) == NULL)
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
       }
       /* skip empty lines */
       prevpos = ftell (datei);
-      while (!feof (datei)) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+      while (!FP_feof (datei)) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	if (!IsLineEmpty (line)) {
@@ -1676,27 +1677,27 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * headers, don't be too picky about it.
      */
     if (sstate.envelope.ctype && sstate.envelope.mimevers==NULL  &&
-	_FP_stristr (sstate.envelope.ctype, "multipart") != NULL &&
+	FP_stristr (sstate.envelope.ctype, "multipart") != NULL &&
 	sstate.envelope.boundary != NULL) {
-      sstate.envelope.mimevers = _FP_strdup ("1.0");
+      sstate.envelope.mimevers = FP_strdup ("1.0");
       hcount = hlcount.afternl;
     }
     else if (sstate.envelope.mimevers==NULL && sstate.envelope.ctype &&
 	     sstate.envelope.fname && sstate.envelope.ctenc) {
-      sstate.envelope.mimevers = _FP_strdup ("1.0");
+      sstate.envelope.mimevers = FP_strdup ("1.0");
       hcount = hlcount.afternl;
     }
 
     if (sstate.envelope.mimevers != NULL) {
       /* this is a MIME file. check the Content-Type */
       sstate.ismime = 1;
-      if (_FP_stristr (sstate.envelope.ctype, "multipart") != NULL) {
+      if (FP_stristr (sstate.envelope.ctype, "multipart") != NULL) {
 	if (sstate.envelope.boundary == NULL) {
 	  UUMessage (uuscan_id, __LINE__, UUMSG_WARNING,
 		     uustring (S_MIME_NO_BOUNDARY));
 	  sstate.mimestate = MS_BODY;
-	  _FP_free (sstate.envelope.ctype);
-	  sstate.envelope.ctype = _FP_strdup ("text/plain");
+	  FP_free (sstate.envelope.ctype);
+	  sstate.envelope.ctype = FP_strdup ("text/plain");
 	}
 	else {
 	  sstate.mimestate = MS_PREAMBLE;
@@ -1714,8 +1715,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     }
   }
 
-  if (feof (datei) || ferror (datei)) { /* oops */
-    _FP_free (result);
+  if (FP_feof (datei) || ferror (datei)) { /* oops */
+    FP_free (result);
     return NULL;
   }
 
@@ -1735,9 +1736,9 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
     blen   = strlen (sstate.envelope.boundary);
     lcount = 0;
-    
-    while (!feof (datei)) {
-      if (_FP_fgets (line, 1024, datei) == NULL)
+
+    while (!FP_feof (datei)) {
+      if (FP_fgets (line, 1024, datei) == NULL)
 	break;
       if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
       if (line[0] == '-' && line[1] == '-' &&
@@ -1748,7 +1749,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
       prevpos = ftell (datei);
     }
-    if (feof (datei) || ferror (datei)) {
+    if (FP_feof (datei) || ferror (datei)) {
       UUMessage (uuscan_id, __LINE__, UUMSG_WARNING,
 		 uustring (S_MIME_B_NOT_FOUND));
       /*
@@ -1762,7 +1763,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	*errcode = UURET_CONT;
 	fseek (datei, preheaders, SEEK_SET);
       }
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
     if (line[0] == '-' && line[1] == '-' &&
@@ -1790,20 +1791,20 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	*errcode = UURET_CONT;
 	fseek (datei, preheaders, SEEK_SET);
       }
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
     /* produce result if uu_usepreamble is set */
     if (uu_usepreamble && lcount) {
       sprintf (line, "%04d.txt", ++mimseqno);
-      result->subject  = _FP_strdup (sstate.envelope.subject);
-      result->filename = _FP_strdup (line);
-      result->origin   = _FP_strdup (sstate.envelope.from);
-      result->mimeid   = _FP_strdup (sstate.envelope.mimeid);
-      result->mimetype = _FP_strdup ("text/plain");
+      result->subject  = FP_strdup (sstate.envelope.subject);
+      result->filename = FP_strdup (line);
+      result->origin   = FP_strdup (sstate.envelope.from);
+      result->mimeid   = FP_strdup (sstate.envelope.mimeid);
+      result->mimetype = FP_strdup ("text/plain");
       result->mode     = 0644;
       result->uudet    = PT_ENCODED;	/* plain text */
-      result->sfname   = _FP_strdup (fname);
+      result->sfname   = FP_strdup (fname);
       result->flags    = FL_SINGLE | FL_PROPER;
       /* result->startpos set from above */
       result->length   = prevpos - result->startpos;
@@ -1824,7 +1825,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       *errcode = UURET_CONT;
 
     /* otherwise, just return NULL */
-    _FP_free (result);
+    FP_free (result);
     return NULL;
   }
 
@@ -1860,8 +1861,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       /*
        * check if the epilogue is empty
        */
-      while (!feof (datei) && !ferror (datei) && lcount<10 && res==0) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+      while (!FP_feof (datei) && !ferror (datei) && lcount<10 && res==0) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (!IsLineEmpty (line))
 	  res++;
@@ -1869,14 +1870,14 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       }
       if (uu_usepreamble && res) {
 	sprintf (line, "%04d.txt", ++mimseqno);
-	result->subject  = _FP_strdup (sstate.envelope.subject);
-	result->filename = _FP_strdup (line);
-	result->origin   = _FP_strdup (sstate.envelope.from);
-	result->mimeid   = _FP_strdup (sstate.envelope.mimeid);
-	result->mimetype = _FP_strdup ("text/plain");
+	result->subject  = FP_strdup (sstate.envelope.subject);
+	result->filename = FP_strdup (line);
+	result->origin   = FP_strdup (sstate.envelope.from);
+	result->mimeid   = FP_strdup (sstate.envelope.mimeid);
+	result->mimetype = FP_strdup ("text/plain");
 	result->mode     = 0644;
 	result->uudet    = PT_ENCODED;	/* plain text */
-	result->sfname   = _FP_strdup (fname);
+	result->sfname   = FP_strdup (fname);
 	result->flags    = FL_SINGLE | FL_PROPER | FL_TOEND;
 	result->partno   = 1;
 	/* result->startpos set from above */
@@ -1889,15 +1890,15 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
 	return result;
       }
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
 
     if (mssdepth > 0)
       blen = strlen (multistack[mssdepth-1].envelope.boundary);
 
-    while (!feof (datei)) {
-      if (_FP_fgets (line, 1024, datei) == NULL)
+    while (!FP_feof (datei)) {
+      if (FP_fgets (line, 1024, datei) == NULL)
 	break;
       if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
       /* check for parent boundary */
@@ -1913,7 +1914,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	  preheaders = prevpos;
 	  lcount     = 0;
 	}
-	hcount++; 
+	hcount++;
 	lcount++;
 
 	if (hcount >= hlcount.restart) {
@@ -1934,8 +1935,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
       /* check for begin and encoded data only at outermost level */
       if (mssdepth == 0 && !uu_more_mime) {
-	if (strncmp      (line, "begin ",       6) == 0 ||
-	    _FP_strnicmp (line, "<pre>begin ", 11) == 0) {
+	if (strncmp (line, "begin ", 6) == 0 ||
+	    FP_strnicmp_fast (line, "<pre>begin ", 11) == 0) {
 	  preenc  = prevpos;
 	  begflag = 1;
 	}
@@ -1977,7 +1978,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       /* restore previous state */
       mssdepth--;
       UUkillheaders (&sstate.envelope);
-      _FP_free  (sstate.source);
+      FP_free  (sstate.source);
       memcpy (&sstate, &(multistack[mssdepth]), sizeof (scanstate));
 
       ptr1 = line + 2 + strlen (sstate.envelope.boundary);
@@ -2004,14 +2005,14 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       while (mssdepth) {
 	mssdepth--;
 	UUkillheaders (&(multistack[mssdepth].envelope));
-	_FP_free (multistack[mssdepth].source);
+	FP_free (multistack[mssdepth].source);
       }
 
       if (!uu_fast_scanning) {
 	*errcode = UURET_CONT;
 	fseek (datei, preheaders, SEEK_SET);
       }
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
     else if (IsKnownHeader (line)) {
@@ -2034,14 +2035,14 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     /* produce result if uu_usepreamble is set */
     if (uu_usepreamble && res) {
       sprintf (line, "%04d.txt", ++mimseqno);
-      result->subject  = _FP_strdup (sstate.envelope.subject);
-      result->filename = _FP_strdup (line);
-      result->origin   = _FP_strdup (sstate.envelope.from);
-      result->mimeid   = _FP_strdup (sstate.envelope.mimeid);
-      result->mimetype = _FP_strdup ("text/plain");
+      result->subject  = FP_strdup (sstate.envelope.subject);
+      result->filename = FP_strdup (line);
+      result->origin   = FP_strdup (sstate.envelope.from);
+      result->mimeid   = FP_strdup (sstate.envelope.mimeid);
+      result->mimetype = FP_strdup ("text/plain");
       result->mode     = 0644;
       result->uudet    = PT_ENCODED;	/* plain text */
-      result->sfname   = _FP_strdup (fname);
+      result->sfname   = FP_strdup (fname);
       result->flags    = FL_SINGLE | FL_PROPER;
       result->partno   = 1;
       /* result->startpos set from above */
@@ -2055,7 +2056,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       return result;
     }
     /* otherwise, just return NULL */
-    _FP_free (result);
+    FP_free (result);
     return NULL;
   }
 
@@ -2067,7 +2068,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
    * stack and dive into the new environment, starting with another
    * preamble.
    */
-			   
+
   if (sstate.ismime && sstate.mimestate == MS_SUBPART) {
     memset (&localenv, 0, sizeof (headers));
     result->startpos = ftell (datei);
@@ -2079,11 +2080,11 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * Duplicate some data from outer envelope
      */
 
-    localenv.mimevers = _FP_strdup (sstate.envelope.mimevers);
-    localenv.from     = _FP_strdup (sstate.envelope.from);
-    localenv.subject  = _FP_strdup (sstate.envelope.subject);
-    localenv.rcpt     = _FP_strdup (sstate.envelope.rcpt);
-    localenv.date     = _FP_strdup (sstate.envelope.date);
+    localenv.mimevers = FP_strdup (sstate.envelope.mimevers);
+    localenv.from     = FP_strdup (sstate.envelope.from);
+    localenv.subject  = FP_strdup (sstate.envelope.subject);
+    localenv.rcpt     = FP_strdup (sstate.envelope.rcpt);
+    localenv.date     = FP_strdup (sstate.envelope.date);
 
     if ((sstate.envelope.mimevers != NULL && localenv.mimevers == NULL) ||
 	(sstate.envelope.from     != NULL && localenv.from     == NULL) ||
@@ -2094,36 +2095,36 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       while (mssdepth) {
 	mssdepth--;
 	UUkillheaders (&(multistack[mssdepth].envelope));
-	_FP_free (multistack[mssdepth].source);
+	FP_free (multistack[mssdepth].source);
       }
       sstate.isfolder = 0;
       sstate.ismime   = 0;
-      
+
       UUkillheaders (&localenv);
       *errcode = UURET_NOMEM;
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
-    
+
     /* Scan subheader. But what if there is no subheader? */
     hcount = 0;
     lcount = 0;
     preheaders = prevpos;
-    
-    if (_FP_fgets (line, 1024, datei) == NULL) {
+
+    if (FP_fgets (line, 1024, datei) == NULL) {
       sstate.isfolder = 0;
       sstate.ismime   = 0;
       while (mssdepth) {
 	mssdepth--;
 	UUkillheaders (&(multistack[mssdepth].envelope));
-	_FP_free (multistack[mssdepth].source);
+	FP_free (multistack[mssdepth].source);
       }
       UUkillheaders (&localenv);
-      _FP_free (result);
+      FP_free (result);
       return NULL;
     }
 
-    while (!feof (datei) && !IsLineEmpty (line)) {
+    while (!FP_feof (datei) && !IsLineEmpty (line)) {
       if (IsKnownHeader (line))
 	hcount++;
       if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
@@ -2141,7 +2142,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
       prevpos = ftell (datei);
 
-      if (_FP_fgets (line, 1024, datei) == NULL)
+      if (FP_fgets (line, 1024, datei) == NULL)
 	break;
       lcount++;
     }
@@ -2154,7 +2155,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       fseek (datei, prevpos, SEEK_SET);
     }
 
-    if (_FP_stristr (localenv.ctype, "multipart") != NULL) {
+    if (FP_stristr (localenv.ctype, "multipart") != NULL) {
       /* oh no, not again */
       if (mssdepth >= MSMAXDEPTH) {
 	/* Argh, what an isane message. Treat as plain text */
@@ -2170,7 +2171,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	memcpy (&sstate.envelope,    &localenv, sizeof (headers));
 	memset (&localenv, 0, sizeof (headers));
 	sstate.mimestate = MS_PREAMBLE;
-	if ((sstate.source = _FP_strdup (sstate.source)) == NULL)
+	if ((sstate.source = FP_strdup (sstate.source)) == NULL)
 	  *errcode = UURET_NOMEM;
 
 	if (*errcode == UURET_OK)
@@ -2178,7 +2179,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
 	mssdepth++;
 	/* need a restart */
-	_FP_free (result);
+	FP_free (result);
 	return NULL;
       }
     }
@@ -2196,23 +2197,23 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * would then be correctly typed as `text/plain'.
      */
 
-    if (_FP_stristr (localenv.ctenc, "base64") != NULL)
+    if (FP_stristr (localenv.ctenc, "base64") != NULL)
       result->uudet = B64ENCODED;
-    else if (_FP_stristr (localenv.ctenc, "x-uue") != NULL) {
+    else if (FP_stristr (localenv.ctenc, "x-uue") != NULL) {
       result->uudet = UU_ENCODED;
       result->begin = result->end = 1;
     }
-    else if (_FP_stristr (localenv.ctenc, "x-yenc") != NULL) {
+    else if (FP_stristr (localenv.ctenc, "x-yenc") != NULL) {
       result->uudet = YENC_ENCODED;
       result->begin = result->end = 1;
     }
-    else if (_FP_stristr (localenv.ctenc, "quoted-printable") != NULL)
+    else if (FP_stristr (localenv.ctenc, "quoted-printable") != NULL)
       result->uudet = QP_ENCODED;
-    else if (_FP_stristr (localenv.ctenc, "7bit") != NULL ||
-	     _FP_stristr (localenv.ctenc, "8bit") != NULL)
+    else if (FP_stristr (localenv.ctenc, "7bit") != NULL ||
+	     FP_stristr (localenv.ctenc, "8bit") != NULL)
       result->uudet = PT_ENCODED;
-    else if (_FP_stristr (localenv.ctype, "multipart") != NULL ||
-	     _FP_stristr (localenv.ctype, "message")   != NULL)
+    else if (FP_stristr (localenv.ctype, "multipart") != NULL ||
+	     FP_stristr (localenv.ctype, "message")   != NULL)
       result->uudet = PT_ENCODED;
 
     /*
@@ -2231,9 +2232,9 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       prevpos          = ftell (datei);
       blen = strlen (sstate.envelope.boundary);
       lcount = 0;
-      
-      while (!feof (datei)) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+
+      while (!FP_feof (datei)) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	line[255] = '\0';
@@ -2250,9 +2251,9 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	 * Content-Type: multipart/... boundary="same-boundary"
 	 */
 	if (line[0] == 'C' && line[1] == 'o' &&
-	    _FP_strnicmp (line, "Content-Type:", 13) == 0) {
+	    FP_strnicmp_fast (line, "Content-Type:", 13) == 0) {
 	  ptr1 = ScanHeaderLine (datei, line);
-	  ptr2 = (ptr1)?_FP_stristr(ptr1,"boundary"):NULL;
+	  ptr2 = (ptr1)?FP_stristr(ptr1,"boundary"):NULL;
 	  ptr1 = (ptr2)?ParseValue(ptr2):NULL;
 	  if (ptr1 && strcmp (ptr1, sstate.envelope.boundary) == 0)
 	    break;
@@ -2281,7 +2282,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	while (mssdepth) {
 	  mssdepth--;
 	  UUkillheaders (&(multistack[mssdepth].envelope));
-	  _FP_free (multistack[mssdepth].source);
+	  FP_free (multistack[mssdepth].source);
 	}
 	/*
 	 * Don't retry if uu_fast_scanning
@@ -2292,7 +2293,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	  sstate.isfolder  = 0;
 	  sstate.ismime    = 0;
 	  sstate.mimestate = MS_BODY;
-	  _FP_free (result);
+	  FP_free (result);
 	  return NULL;
 	}
 
@@ -2336,22 +2337,22 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       /* or if the file is explicitely named */
       if (result->uudet == B64ENCODED || lcount) {
 	if (localenv.fname) {
-	  _FP_free (result->filename);
-	  if ((result->filename = _FP_strdup (localenv.fname)) == NULL)
+	  FP_free (result->filename);
+	  if ((result->filename = FP_strdup (localenv.fname)) == NULL)
 	    *errcode = UURET_NOMEM;
 	}
 	else if ((result->uudet==QP_ENCODED||result->uudet==PT_ENCODED) &&
 		 result->filename == NULL && uu_handletext) {
 	  sprintf (line, "%04d.txt", ++mimseqno);
-	  if ((result->filename = _FP_strdup (line)) == NULL)
+	  if ((result->filename = FP_strdup (line)) == NULL)
 	    *errcode = UURET_NOMEM;
 	}
-	result->subject  = _FP_strdup (localenv.subject);
-	result->origin   = _FP_strdup (localenv.from);
-	result->mimeid   = _FP_strdup (localenv.mimeid);
-	result->mimetype = _FP_strdup (localenv.ctype);
+	result->subject  = FP_strdup (localenv.subject);
+	result->origin   = FP_strdup (localenv.from);
+	result->mimeid   = FP_strdup (localenv.mimeid);
+	result->mimetype = FP_strdup (localenv.ctype);
 	result->mode     = 0644;
-	result->sfname   = _FP_strdup (fname);
+	result->sfname   = FP_strdup (fname);
 	result->flags    = FL_SINGLE | FL_PROPER;
 	result->partno   = 1;
 	/* result->uudet determined above */
@@ -2365,7 +2366,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       }
       else {
 	/* don't produce a result */
-	_FP_free (result);
+	FP_free (result);
 	result = NULL;
       }
       if (*errcode == UURET_OK)
@@ -2399,17 +2400,17 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     blen    = strlen (sstate.envelope.boundary);
     prevpos = ftell  (datei);
 
-    while (!feof (datei)) {
-      if (_FP_fgets (line, 1024, datei) == NULL)
+    while (!FP_feof (datei)) {
+      if (FP_fgets (line, 1024, datei) == NULL)
 	break;
       if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
       if (line[0] == '-' && line[1] == '-' &&
 	  strncmp (line+2, sstate.envelope.boundary, blen) == 0)
 	break;
       if (line[0] == 'C' && line[1] == 'o' &&
-	  _FP_strnicmp (line, "Content-Type:", 13) == 0) {
+	  FP_strnicmp_fast (line, "Content-Type:", 13) == 0) {
 	ptr1 = ScanHeaderLine (datei, line);
-	ptr2 = (ptr1)?_FP_stristr(ptr1,"boundary"):NULL;
+	ptr2 = (ptr1)?FP_stristr(ptr1,"boundary"):NULL;
 	ptr1 = (ptr2)?ParseValue(ptr2):NULL;
 	if (ptr1 && strcmp (ptr1, sstate.envelope.boundary) == 0)
 	  break;
@@ -2430,11 +2431,11 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     else {
       UUMessage (uuscan_id, __LINE__, UUMSG_WARNING,
 		 uustring (S_MIME_B_NOT_FOUND));
-      
+
       while (mssdepth) {
 	mssdepth--;
 	UUkillheaders (&(multistack[mssdepth].envelope));
-	_FP_free (multistack[mssdepth].source);
+	FP_free (multistack[mssdepth].source);
       }
 
       if (uu_fast_scanning) {
@@ -2442,7 +2443,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	sstate.isfolder  = 0;
 	sstate.ismime    = 0;
 	sstate.mimestate = MS_BODY;
-	_FP_free (result);
+	FP_free (result);
 	return NULL;
       }
 
@@ -2450,7 +2451,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
        * Retry, listening to headers this time
        */
       fseek (datei, result->startpos, SEEK_SET);
-      
+
       UUkillfread (result);
       if ((result = (fileread *) malloc (sizeof (fileread))) == NULL) {
 	*errcode = UURET_NOMEM;
@@ -2491,7 +2492,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
     if (sstate.ismime && sstate.mimestate == MS_SUBPART &&
         strcmp (localenv.mimevers, "1.0") == 0 &&
-	_FP_stristr (localenv.ctype, "text") != NULL &&
+	FP_stristr (localenv.ctype, "text") != NULL &&
 	!uu_desperate) {
       if (result->uudet == UU_ENCODED && !(result->begin || result->end)) {
 	result->uudet = 0;
@@ -2507,35 +2508,35 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     }
 
     if (localenv.fname) {
-      _FP_free (result->filename);
-      if ((result->filename = _FP_strdup (localenv.fname)) == NULL)
+      FP_free (result->filename);
+      if ((result->filename = FP_strdup (localenv.fname)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else if ((result->uudet==QP_ENCODED || result->uudet==PT_ENCODED) &&
 	     result->filename==NULL && uu_handletext) {
       sprintf (line, "%04d.txt", ++mimseqno);
-      if ((result->filename = _FP_strdup (line)) == NULL)
+      if ((result->filename = FP_strdup (line)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else {
       /* assign a filename lateron */
     }
-    if (result->mimetype) _FP_free (result->mimetype);
+    if (result->mimetype) FP_free (result->mimetype);
     if (result->uudet) {
-      if (_FP_stristr (localenv.ctype, "text") != NULL &&
+      if (FP_stristr (localenv.ctype, "text") != NULL &&
 	  result->uudet != QP_ENCODED && result->uudet != PT_ENCODED)
 	result->mimetype = NULL; /* better don't set it */
       else
-	result->mimetype = _FP_strdup (localenv.ctype);
+	result->mimetype = FP_strdup (localenv.ctype);
     }
-    if (result->origin) _FP_free  (result->origin);
-    result->origin  = _FP_strdup  (localenv.from);
+    if (result->origin) FP_free  (result->origin);
+    result->origin  = FP_strdup  (localenv.from);
 
-    if (result->subject) _FP_free (result->subject);
-    result->subject = _FP_strdup  (localenv.subject);
+    if (result->subject) FP_free (result->subject);
+    result->subject = FP_strdup  (localenv.subject);
 
     if (result->sfname == NULL)
-      if ((result->sfname = _FP_strdup (fname)) == NULL)
+      if ((result->sfname = FP_strdup (fname)) == NULL)
 	*errcode = UURET_NOMEM;
 
     result->length = prevpos - result->startpos;
@@ -2556,7 +2557,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * kill local envelope
      */
     UUkillheaders (&localenv);
-    
+
     return result;
   }
 
@@ -2567,8 +2568,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
    */
 
   if (sstate.isfolder && sstate.ismime && sstate.mimestate == MS_BODY &&
-      _FP_stristr (sstate.envelope.ctype, "message") != NULL &&
-      _FP_stristr (sstate.envelope.ctype, "partial") != NULL) {
+      FP_stristr (sstate.envelope.ctype, "message") != NULL &&
+      FP_stristr (sstate.envelope.ctype, "partial") != NULL) {
 
     result->startpos = ftell (datei);
 
@@ -2579,8 +2580,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
       /* skip over blank lines first */
       prevpos = ftell (datei);
-      while (!feof (datei)) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+      while (!FP_feof (datei)) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	if (!IsLineEmpty (line))
@@ -2592,7 +2593,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       lcount = 0;
       preheaders = prevpos;
 
-      while (!feof (datei) && !IsLineEmpty (line)) {
+      while (!FP_feof (datei) && !IsLineEmpty (line)) {
 	if (IsKnownHeader (line))
 	  hcount++;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
@@ -2604,7 +2605,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	if (ParseHeader (&localenv, ptr1) == NULL)
 	  *errcode = UURET_NOMEM;
 
-	if (_FP_fgets (line, 1024, datei) == NULL)
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	lcount++;
       }
@@ -2613,42 +2614,42 @@ ScanPart (FILE *datei, char *fname, int *errcode)
        * Examine local header. We're mostly interested in the Content-Type
        * and the Content-Transfer-Encoding.
        */
-      if (_FP_stristr (localenv.ctype, "multipart") != NULL) {
+      if (FP_stristr (localenv.ctype, "multipart") != NULL) {
 	UUMessage (uuscan_id, __LINE__, UUMSG_WARNING,
 		   uustring (S_MIME_PART_MULTI));
       }
       if (localenv.subject)
-	result->subject  = _FP_strdup (localenv.subject);
+	result->subject  = FP_strdup (localenv.subject);
       else
-	result->subject  = _FP_strdup (sstate.envelope.subject);
+	result->subject  = FP_strdup (sstate.envelope.subject);
 
       if (localenv.from)
-	result->origin   = _FP_strdup (localenv.from);
+	result->origin   = FP_strdup (localenv.from);
       else
-	result->origin   = _FP_strdup (sstate.envelope.from);
+	result->origin   = FP_strdup (sstate.envelope.from);
 
       if (localenv.ctype)
-	result->mimetype = _FP_strdup (localenv.ctype);
+	result->mimetype = FP_strdup (localenv.ctype);
       else
-	result->mimetype = _FP_strdup ("text/plain");
+	result->mimetype = FP_strdup ("text/plain");
 
-      if (_FP_stristr (localenv.ctenc, "quoted-printable") != NULL)
+      if (FP_stristr (localenv.ctenc, "quoted-printable") != NULL)
 	result->uudet = QP_ENCODED;
-      else if (_FP_stristr (localenv.ctenc, "base64") != NULL)
+      else if (FP_stristr (localenv.ctenc, "base64") != NULL)
 	result->uudet = B64ENCODED;
-      else if (_FP_stristr (localenv.ctenc, "x-uue") != NULL) {
+      else if (FP_stristr (localenv.ctenc, "x-uue") != NULL) {
 	result->uudet = UU_ENCODED;
 	result->begin = result->end = 1;
       }
-      else if (_FP_stristr (localenv.ctenc, "x-yenc") != NULL) {
+      else if (FP_stristr (localenv.ctenc, "x-yenc") != NULL) {
 	result->uudet = YENC_ENCODED;
 	result->begin = result->end = 1;
       }
-      else if (_FP_stristr (localenv.ctenc, "7bit") != NULL ||
-	       _FP_stristr (localenv.ctenc, "8bit") != NULL)
+      else if (FP_stristr (localenv.ctenc, "7bit") != NULL ||
+	       FP_stristr (localenv.ctenc, "8bit") != NULL)
 	result->uudet = PT_ENCODED;
-      else if (_FP_stristr (localenv.ctype, "multipart") != NULL ||
-	       _FP_stristr (localenv.ctype, "message")   != NULL)
+      else if (FP_stristr (localenv.ctype, "multipart") != NULL ||
+	       FP_stristr (localenv.ctype, "message")   != NULL)
 	result->uudet = PT_ENCODED;
 
       /*
@@ -2685,28 +2686,28 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       hcount = lcount = 0;
       prevpos = ftell (datei);
 
-      if (_FP_stristr (localenv.ctype, "message") != NULL &&
-	  _FP_stristr (localenv.ctype, "rfc822")  != NULL) {
+      if (FP_stristr (localenv.ctype, "message") != NULL &&
+	  FP_stristr (localenv.ctype, "rfc822")  != NULL) {
 	/*
 	 * skip over empty lines and local header
 	 */
 	preheaders = ftell (datei);
-	while (!feof (datei)) {
-	  if (_FP_fgets (line, 1024, datei) == NULL)
+	while (!FP_feof (datei)) {
+	  if (FP_fgets (line, 1024, datei) == NULL)
 	    break;
 	  if (!IsLineEmpty (line)) {
 	    break;
 	  }
 	}
 
-	while (!feof (datei) && !IsLineEmpty (line)) { 
+	while (!FP_feof (datei) && !IsLineEmpty (line)) {
 	  if (IsKnownHeader (line))
 	    hcount++;
 	  lcount++;
 	  if (lcount > WAITHEADER && hcount < hlcount.afternl)
 	    break;
 
-	  if (_FP_fgets (line, 1024, datei) == NULL)
+	  if (FP_fgets (line, 1024, datei) == NULL)
 	    break;
 	}
 	if (hcount < hlcount.afternl)
@@ -2718,8 +2719,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
        * look for next header
        */
 
-      while (!feof (datei)) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+      while (!FP_feof (datei)) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	if (ferror (datei))
@@ -2776,19 +2777,19 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * produce result
      */
     if (localenv.fname) {
-      _FP_free (result->filename);
-      if ((result->filename = _FP_strdup (localenv.fname)) == NULL)
+      FP_free (result->filename);
+      if ((result->filename = FP_strdup (localenv.fname)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else if (sstate.envelope.fname) {
-      _FP_free (result->filename);
-      if ((result->filename = _FP_strdup (sstate.envelope.fname)) == NULL)
+      FP_free (result->filename);
+      if ((result->filename = FP_strdup (sstate.envelope.fname)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else if ((result->uudet==QP_ENCODED || result->uudet==PT_ENCODED) &&
 	     result->filename == NULL) {
       sprintf (line, "%04d.txt", ++mimseqno);
-      if ((result->filename = _FP_strdup (line)) == NULL)
+      if ((result->filename = FP_strdup (line)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else {
@@ -2796,14 +2797,14 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     }
     if (result->subject == NULL) {
       if (sstate.envelope.subject)
-	result->subject = _FP_strdup (sstate.envelope.subject);
+	result->subject = FP_strdup (sstate.envelope.subject);
     }
     result->partno = sstate.envelope.partno;
     result->maxpno = sstate.envelope.numparts;
-    result->flags  = FL_PARTIAL | 
+    result->flags  = FL_PARTIAL |
       ((res==1 || uu_fast_scanning) ? FL_PROPER : 0) |
 	((uu_fast_scanning) ? FL_TOEND : 0);
-    result->mimeid = _FP_strdup (sstate.envelope.mimeid);
+    result->mimeid = FP_strdup (sstate.envelope.mimeid);
     if (result->partno == 1)
       result->begin = 1;
 
@@ -2813,7 +2814,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       result->length = prevpos - result->startpos;
 
     if (result->sfname == NULL)
-      result->sfname = _FP_strdup (fname);
+      result->sfname = FP_strdup (fname);
 
     if (result->mode == 0)
       result->mode = 0644;
@@ -2829,7 +2830,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       sstate.isfolder  = 1;
       sstate.ismime    = 0;
       sstate.mimestate = MS_HEADERS;
-      
+
       UUkillheaders (&sstate.envelope);
       memset (&sstate.envelope, 0, sizeof (headers));
     }
@@ -2857,39 +2858,39 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
   if (sstate.isfolder && sstate.ismime &&
       sstate.mimestate == MS_BODY &&
-      (_FP_stristr (sstate.envelope.ctenc, "quoted-printable") != NULL ||
-       _FP_stristr (sstate.envelope.ctenc, "base64")           != NULL ||
-       _FP_stristr (sstate.envelope.ctenc, "x-uue")            != NULL ||
-       _FP_stristr (sstate.envelope.ctenc, "x-yenc")           != NULL ||
-       _FP_stristr (sstate.envelope.ctype, "message")          != NULL ||
+      (FP_stristr (sstate.envelope.ctenc, "quoted-printable") != NULL ||
+       FP_stristr (sstate.envelope.ctenc, "base64")           != NULL ||
+       FP_stristr (sstate.envelope.ctenc, "x-uue")            != NULL ||
+       FP_stristr (sstate.envelope.ctenc, "x-yenc")           != NULL ||
+       FP_stristr (sstate.envelope.ctype, "message")          != NULL ||
        sstate.envelope.fname != NULL)) {
 
     if (sstate.envelope.subject)
-      result->subject = _FP_strdup (sstate.envelope.subject);
+      result->subject = FP_strdup (sstate.envelope.subject);
     if (sstate.envelope.from)
-      result->origin  = _FP_strdup (sstate.envelope.from);
+      result->origin  = FP_strdup (sstate.envelope.from);
 
     if (sstate.envelope.ctype)
-      result->mimetype = _FP_strdup (sstate.envelope.ctype);
+      result->mimetype = FP_strdup (sstate.envelope.ctype);
     else
-      result->mimetype = _FP_strdup ("text/plain");
+      result->mimetype = FP_strdup ("text/plain");
 
-    if (_FP_stristr (sstate.envelope.ctenc, "quoted-printable") != NULL)
+    if (FP_stristr (sstate.envelope.ctenc, "quoted-printable") != NULL)
       result->uudet = QP_ENCODED;
-    else if (_FP_stristr (sstate.envelope.ctenc, "base64") != NULL)
+    else if (FP_stristr (sstate.envelope.ctenc, "base64") != NULL)
       result->uudet = B64ENCODED;
-    else if (_FP_stristr (sstate.envelope.ctenc, "x-uue") != NULL) {
+    else if (FP_stristr (sstate.envelope.ctenc, "x-uue") != NULL) {
       result->uudet = UU_ENCODED;
       result->begin = result->end = 1;
     }
-    else if (_FP_stristr (sstate.envelope.ctenc, "x-yenc") != NULL) {
+    else if (FP_stristr (sstate.envelope.ctenc, "x-yenc") != NULL) {
       result->uudet = YENC_ENCODED;
     }
-    else if (_FP_stristr (sstate.envelope.ctenc, "7bit") != NULL ||
-	     _FP_stristr (sstate.envelope.ctenc, "8bit") != NULL)
+    else if (FP_stristr (sstate.envelope.ctenc, "7bit") != NULL ||
+	     FP_stristr (sstate.envelope.ctenc, "8bit") != NULL)
       result->uudet = PT_ENCODED;
-    else if (_FP_stristr (sstate.envelope.ctype, "multipart") != NULL ||
-	     _FP_stristr (sstate.envelope.ctype, "message")   != NULL ||
+    else if (FP_stristr (sstate.envelope.ctype, "multipart") != NULL ||
+	     FP_stristr (sstate.envelope.ctype, "message")   != NULL ||
 	     sstate.envelope.fname != NULL)
       result->uudet = PT_ENCODED;
 
@@ -2918,28 +2919,28 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       hcount = lcount = 0;
       prevpos = ftell (datei);
 
-      if (_FP_stristr (sstate.envelope.ctype, "message") != NULL &&
-	  _FP_stristr (sstate.envelope.ctype, "rfc822")  != NULL) {
+      if (FP_stristr (sstate.envelope.ctype, "message") != NULL &&
+	  FP_stristr (sstate.envelope.ctype, "rfc822")  != NULL) {
 	/*
 	 * skip over empty lines and local header
 	 */
 	preheaders = ftell (datei);
-	while (!feof (datei)) {
-	  if (_FP_fgets (line, 1024, datei) == NULL)
+	while (!FP_feof (datei)) {
+	  if (FP_fgets (line, 1024, datei) == NULL)
 	    break;
 	  if (!IsLineEmpty (line)) {
 	    break;
 	  }
 	}
 
-	while (!feof (datei) && !IsLineEmpty (line)) { 
+	while (!FP_feof (datei) && !IsLineEmpty (line)) {
 	  if (IsKnownHeader (line))
 	    hcount++;
 	  lcount++;
 	  if (lcount > WAITHEADER && hcount < hlcount.afternl)
 	    break;
 
-	  if (_FP_fgets (line, 1024, datei) == NULL)
+	  if (FP_fgets (line, 1024, datei) == NULL)
 	    break;
 	}
 	if (hcount < hlcount.afternl)
@@ -2951,8 +2952,8 @@ ScanPart (FILE *datei, char *fname, int *errcode)
        * look for next header
        */
 
-      while (!feof (datei)) {
-	if (_FP_fgets (line, 1024, datei) == NULL)
+      while (!FP_feof (datei)) {
+	if (FP_fgets (line, 1024, datei) == NULL)
 	  break;
 	if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
 	if (ferror (datei))
@@ -3007,14 +3008,14 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      * produce result
      */
     if (sstate.envelope.fname) {
-      _FP_free (result->filename);
-      if ((result->filename = _FP_strdup (sstate.envelope.fname)) == NULL)
+      FP_free (result->filename);
+      if ((result->filename = FP_strdup (sstate.envelope.fname)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else if ((result->uudet==QP_ENCODED||result->uudet==PT_ENCODED) &&
 	     result->filename == NULL) {
       sprintf (line, "%04d.txt", ++mimseqno);
-      if ((result->filename = _FP_strdup (line)) == NULL)
+      if ((result->filename = FP_strdup (line)) == NULL)
 	*errcode = UURET_NOMEM;
     }
     else {
@@ -3022,11 +3023,11 @@ ScanPart (FILE *datei, char *fname, int *errcode)
     }
     if (result->subject == NULL) {
       if (sstate.envelope.subject)
-	result->subject = _FP_strdup (sstate.envelope.subject);
+	result->subject = FP_strdup (sstate.envelope.subject);
     }
     result->flags  = ((res==1||uu_fast_scanning)?FL_PROPER:0) |
       ((uu_fast_scanning) ? FL_TOEND : 0);
-    result->mimeid = _FP_strdup (sstate.envelope.mimeid);
+    result->mimeid = FP_strdup (sstate.envelope.mimeid);
 
     if (uu_fast_scanning)
       result->length = progress.fsize - result->startpos;
@@ -3034,7 +3035,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
       result->length = prevpos - result->startpos;
 
     if (result->sfname == NULL)
-      result->sfname = _FP_strdup (fname);
+      result->sfname = FP_strdup (fname);
 
     if (result->mode == 0)
       result->mode = 0644;
@@ -3077,22 +3078,22 @@ ScanPart (FILE *datei, char *fname, int *errcode)
    * be here!
    */
 
-  if ((!sstate.envelope.ctype || _FP_stristr (sstate.envelope.ctype, "multipart"))
+  if ((!sstate.envelope.ctype || FP_stristr (sstate.envelope.ctype, "multipart"))
       && !uu_more_mime) {
     prevpos = ftell (datei);
-    while (!feof (datei)) {
-      if (_FP_fgets (line, 1024, datei) == NULL)
+    while (!FP_feof (datei)) {
+      if (FP_fgets (line, 1024, datei) == NULL)
 	break;
       if (UUBUSYPOLL(ftell(datei),progress.fsize)) SPCANCEL();
       if (!IsLineEmpty (line))
 	break;
     }
     if (line[0] == '-' && line[1] == '-' &&
-	!IsLineEmpty (line+2) && !feof (datei)) {
-      ptr1 = _FP_strrstr (line+2, "--");
+	!IsLineEmpty (line+2) && !FP_feof (datei)) {
+      ptr1 = FP_strrstr (line+2, "--");
       ptr2 = ScanHeaderLine (datei, NULL);
       if ((ptr1 == NULL || ptr1[2]) &&
-	  ptr2 && _FP_strnicmp (ptr2, "Content-", 8) == 0) {
+	  ptr2 && FP_strnicmp_fast (ptr2, "Content-", 8) == 0) {
 	/*
 	 * hmm, okay, let's do it!
 	 */
@@ -3107,16 +3108,16 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 	  ptr1++;
 	*ptr1 = '\0';
 
-	sstate.envelope.mimevers = _FP_strdup ("1.0");
-	sstate.envelope.boundary = _FP_strdup (line+2);
-	
+	sstate.envelope.mimevers = FP_strdup ("1.0");
+	sstate.envelope.boundary = FP_strdup (line+2);
+
 	/*
 	 * need restart
 	 */
-	
+
 	fseek (datei, prevpos, SEEK_SET);
-	
-	_FP_free (result);
+
+	FP_free (result);
 	return NULL;
       }
     }
@@ -3130,15 +3131,15 @@ ScanPart (FILE *datei, char *fname, int *errcode)
    */
 
   if (sstate.envelope.subject)
-    result->subject = _FP_strdup (sstate.envelope.subject);
+    result->subject = FP_strdup (sstate.envelope.subject);
 
   if (sstate.envelope.from)
-    result->origin  = _FP_strdup (sstate.envelope.from);
+    result->origin  = FP_strdup (sstate.envelope.from);
 
   if (sstate.envelope.ctype)
-    result->mimetype = _FP_strdup (sstate.envelope.ctype);
-  
-  if ((res=ScanData (datei, fname, errcode, NULL, 
+    result->mimetype = FP_strdup (sstate.envelope.ctype);
+
+  if ((res=ScanData (datei, fname, errcode, NULL,
 		     sstate.ismime, 1, result))==-1) {
     /* oops, something went wrong */
     sstate.isfolder = 0;
@@ -3163,14 +3164,14 @@ ScanPart (FILE *datei, char *fname, int *errcode)
      */
   }
   else if (sstate.envelope.fname) {
-    _FP_free (result->filename);
-    if ((result->filename = _FP_strdup (sstate.envelope.fname)) == NULL)
+    FP_free (result->filename);
+    if ((result->filename = FP_strdup (sstate.envelope.fname)) == NULL)
       *errcode = UURET_NOMEM;
   }
   else if ((result->uudet==QP_ENCODED||result->uudet==PT_ENCODED) &&
 	   result->filename == NULL) {
     sprintf (line, "%04d.txt", ++mimseqno);
-    if ((result->filename = _FP_strdup (line)) == NULL)
+    if ((result->filename = FP_strdup (line)) == NULL)
       *errcode = UURET_NOMEM;
   }
   else {
@@ -3179,18 +3180,18 @@ ScanPart (FILE *datei, char *fname, int *errcode)
 
   if (result->subject == NULL) {
     if (sstate.envelope.subject)
-      result->subject = _FP_strdup (sstate.envelope.subject);
+      result->subject = FP_strdup (sstate.envelope.subject);
   }
 
   result->flags  = (result->uudet==PT_ENCODED)?FL_SINGLE:0;
-  result->mimeid = _FP_strdup (sstate.envelope.mimeid);
+  result->mimeid = FP_strdup (sstate.envelope.mimeid);
   result->length = ftell (datei) - result->startpos;
 
   if (result->mode == 0)
     result->mode = 0644;
 
   if (result->sfname == NULL)
-    result->sfname = _FP_strdup (fname);
+    result->sfname = FP_strdup (fname);
 
   if (res == 1) {
     /*
@@ -3223,7 +3224,7 @@ ScanPart (FILE *datei, char *fname, int *errcode)
   while (mssdepth) {
     mssdepth--;
     UUkillheaders (&(multistack[mssdepth].envelope));
-    _FP_free (multistack[mssdepth].source);
+    FP_free (multistack[mssdepth].source);
   }
 
   return NULL;
diff --git a/uulib/uustring.c b/uulib/uustring.c
index 38b6c20..ae3ec4f 100644
--- a/uulib/uustring.c
+++ b/uulib/uustring.c
@@ -101,7 +101,7 @@ static stringmap messages[] = {
   { S_BINHEX_SIZES,     "BinHex file: data/resource fork sizes %ld/%ld" },
   { S_BINHEX_BOTH,      "BinHex file: both forks non-empty, decoding data fork" },
   { S_SMERGE_MERGED,    "Parts of '%s' merged with parts of '%s' (%d)" },
-  
+
   /* MIME-related messages */
   { S_MIME_NO_BOUNDARY, "Multipart message without boundary ignored" },
   { S_MIME_B_NOT_FOUND, "Boundary expected on Multipart message but found EOF" },
diff --git a/uulib/uuutil.c b/uulib/uuutil.c
index 4aae5a7..eff5968 100644
--- a/uulib/uuutil.c
+++ b/uulib/uuutil.c
@@ -90,13 +90,13 @@ void
 UUkillfread (fileread *data)
 {
   if (data != NULL) {
-    _FP_free (data->subject);
-    _FP_free (data->filename);
-    _FP_free (data->origin);
-    _FP_free (data->mimeid);
-    _FP_free (data->mimetype);
-    _FP_free (data->sfname);
-    _FP_free (data);
+    FP_free (data->subject);
+    FP_free (data->filename);
+    FP_free (data->origin);
+    FP_free (data->mimeid);
+    FP_free (data->mimetype);
+    FP_free (data->sfname);
+    FP_free (data);
   }
 }
 
@@ -106,14 +106,14 @@ UUkillfile (uufile *data)
   uufile *next;
 
   while (data) {
-    _FP_free    (data->filename);
-    _FP_free    (data->subfname);
-    _FP_free    (data->mimeid);
-    _FP_free    (data->mimetype);
+    FP_free    (data->filename);
+    FP_free    (data->subfname);
+    FP_free    (data->mimeid);
+    FP_free    (data->mimetype);
     UUkillfread (data->data);
 
     next = data->NEXT;
-    _FP_free  (data);
+    FP_free  (data);
     data = next;
   }
 }
@@ -130,17 +130,17 @@ UUkilllist (uulist *data)
 		   uustring (S_TMP_NOT_REMOVED),
 		   data->binfile, strerror (errno));
 
-    _FP_free   (data->filename);
-    _FP_free   (data->subfname);
-    _FP_free   (data->mimeid);
-    _FP_free   (data->mimetype);
-    _FP_free   (data->binfile);
+    FP_free   (data->filename);
+    FP_free   (data->subfname);
+    FP_free   (data->mimeid);
+    FP_free   (data->mimetype);
+    FP_free   (data->binfile);
     UUkillfile (data->thisfile);
-    _FP_free   (data->haveparts);
-    _FP_free   (data->misparts);
+    FP_free   (data->haveparts);
+    FP_free   (data->misparts);
 
     next = data->NEXT;
-    _FP_free (data);
+    FP_free (data);
     data = next;
   }
 }
@@ -153,16 +153,16 @@ void
 UUkillheaders (headers *data)
 {
   if (data != NULL) {
-    _FP_free (data->from);
-    _FP_free (data->subject);
-    _FP_free (data->rcpt);
-    _FP_free (data->date);
-    _FP_free (data->mimevers);
-    _FP_free (data->ctype);
-    _FP_free (data->ctenc);
-    _FP_free (data->fname);
-    _FP_free (data->boundary);
-    _FP_free (data->mimeid);
+    FP_free (data->from);
+    FP_free (data->subject);
+    FP_free (data->rcpt);
+    FP_free (data->date);
+    FP_free (data->mimevers);
+    FP_free (data->ctype);
+    FP_free (data->ctenc);
+    FP_free (data->fname);
+    FP_free (data->boundary);
+    FP_free (data->mimeid);
     memset   (data, 0, sizeof (headers));
   }
 }
@@ -175,7 +175,7 @@ UUkillheaders (headers *data)
 static int
 UUSMPKnownExt (char *filename)
 {
-  char **eiter = knownexts, *ptr=_FP_strrchr(filename, '.');
+  char **eiter = knownexts, *ptr=FP_strrchr(filename, '.');
   int count=0, where=0;
 
   if (ptr == NULL)
@@ -183,7 +183,7 @@ UUSMPKnownExt (char *filename)
   ptr++;
 
   while (*eiter) {
-    if (_FP_stricmp (ptr, (**eiter=='@')?*eiter+1:*eiter) == 0)
+    if (FP_stricmp (ptr, (**eiter=='@')?*eiter+1:*eiter) == 0)
       return where;
     else
       eiter++;
@@ -215,7 +215,7 @@ UUSMPKnownExt (char *filename)
  */
 
 int
-UUbhdecomp (char *in, char *out, char *last, int *rpc, 
+UUbhdecomp (char *in, char *out, char *last, int *rpc,
 	    size_t inc, size_t max, size_t *opc)
 {
   size_t count, used=0, dummy;
@@ -383,7 +383,7 @@ UU_smparts_r (uulist *addit, int pass)
     fiter = addit->thisfile;
 
     if (iter->filename == NULL && addit->filename != NULL)
-      iter->filename = _FP_strdup (addit->filename);
+      iter->filename = FP_strdup (addit->filename);
 
     if (addit->begin) iter->begin = 1;
     if (addit->end)   iter->end   = 1;
@@ -448,7 +448,7 @@ UUSmerge (int pass)
 		     uustring (S_SMERGE_MERGED),
 		     (iter->subfname) ? iter->subfname : "",
 		     (res->subfname)  ? res->subfname  : "", pass);
-     
+
           temp       = iter->NEXT;
           iter->NEXT = NULL;
           UUkilllist (iter);