]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/patch/patch-2.5.9/2.5.9.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / patch / patch-2.5.9 / 2.5.9.patch
1 diff -urNd -urNd patch-2.5.4/aclocal.m4 patch-2.5.9/aclocal.m4
2 --- patch-2.5.4/aclocal.m4      1999-08-29 09:09:30.000000000 -0400
3 +++ patch-2.5.9/aclocal.m4      2003-05-19 02:30:52.000000000 -0400
4 @@ -1,106 +1,34 @@
5 -# The following is taken from automake 1.4,
6 -# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
7 -# because only the former supports 64-bit integral types on HP-UX 10.20.
8 -
9 -## ----------------------------------------- ##
10 -## ANSIfy the C compiler whenever possible.  ##
11 -## From Franc,ois Pinard                     ##
12 -## ----------------------------------------- ##
13 -
14 -# serial 2
15 +# backupfile.m4 serial 1
16 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
17 +dnl This file is free software, distributed under the terms of the GNU
18 +dnl General Public License.  As a special exception to the GNU General
19 +dnl Public License, this file may be distributed as part of a program
20 +dnl that contains a configuration script generated by Autoconf, under
21 +dnl the same distribution terms as the rest of that program.
22  
23 -# @defmac AC_PROG_CC_STDC
24 -# @maindex PROG_CC_STDC
25 -# @ovindex CC
26 -# If the C compiler in not in ANSI C mode by default, try to add an option
27 -# to output variable @code{CC} to make it so.  This macro tries various
28 -# options that select ANSI C on some system or another.  It considers the
29 -# compiler to be in ANSI C mode if it handles function prototypes correctly.
30 -#
31 -# If you use this macro, you should check after calling it whether the C
32 -# compiler has been set to accept ANSI C; if not, the shell variable
33 -# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
34 -# code in ANSI C, you can make an un-ANSIfied copy of it by using the
35 -# program @code{ansi2knr}, which comes with Ghostscript.
36 -# @end defmac
37 +AC_DEFUN([gl_BACKUPFILE],
38 +[
39 +  dnl Prerequisites of lib/backupfile.c.
40 +  AC_REQUIRE([AC_HEADER_DIRENT])
41 +  AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
42 +  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
43 +  AC_CHECK_DECLS_ONCE(getenv malloc)
44 +  jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
45  
46 -AC_DEFUN(AM_PROG_CC_STDC,
47 -[AC_REQUIRE([AC_PROG_CC])
48 -AC_BEFORE([$0], [AC_C_INLINE])
49 -AC_BEFORE([$0], [AC_C_CONST])
50 -dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
51 -dnl a magic option to avoid problems with ANSI preprocessor commands
52 -dnl like #elif.
53 -dnl FIXME: can't do this because then AC_AIX won't work due to a
54 -dnl circular dependency.
55 -dnl AC_BEFORE([$0], [AC_PROG_CPP])
56 -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
57 -AC_CACHE_VAL(am_cv_prog_cc_stdc,
58 -[am_cv_prog_cc_stdc=no
59 -ac_save_CC="$CC"
60 -# Don't try gcc -ansi; that turns off useful extensions and
61 -# breaks some systems' header files.
62 -# AIX                  -qlanglvl=ansi
63 -# Ultrix and OSF/1     -std1
64 -# HP-UX                        -Aa -D_HPUX_SOURCE
65 -# SVR4                 -Xc -D__EXTENSIONS__
66 -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
67 -do
68 -  CC="$ac_save_CC $ac_arg"
69 -  AC_TRY_COMPILE(
70 -[#include <stdarg.h>
71 -#include <stdio.h>
72 -#include <sys/types.h>
73 -#include <sys/stat.h>
74 -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
75 -struct buf { int x; };
76 -FILE * (*rcsopen) (struct buf *, struct stat *, int);
77 -static char *e (p, i)
78 -     char **p;
79 -     int i;
80 -{
81 -  return p[i];
82 -}
83 -static char *f (char * (*g) (char **, int), char **p, ...)
84 -{
85 -  char *s;
86 -  va_list v;
87 -  va_start (v,p);
88 -  s = g (p, va_arg (v,int));
89 -  va_end (v);
90 -  return s;
91 -}
92 -int test (int i, double x);
93 -struct s1 {int (*f) (int a);};
94 -struct s2 {int (*f) (double a);};
95 -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
96 -int argc;
97 -char **argv;
98 -], [
99 -return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
100 -],
101 -[am_cv_prog_cc_stdc="$ac_arg"; break])
102 -done
103 -CC="$ac_save_CC"
104 -])
105 -if test -z "$am_cv_prog_cc_stdc"; then
106 -  AC_MSG_RESULT([none needed])
107 -else
108 -  AC_MSG_RESULT($am_cv_prog_cc_stdc)
109 -fi
110 -case "x$am_cv_prog_cc_stdc" in
111 -  x|xno) ;;
112 -  *) CC="$CC $am_cv_prog_cc_stdc" ;;
113 -esac
114 +  dnl Prerequisites of lib/addext.c.
115 +  AC_REQUIRE([jm_AC_DOS])
116 +  AC_SYS_LONG_FILE_NAMES
117 +  AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
118 +  AC_CHECK_FUNCS(pathconf)
119  ])
120 -#serial 2
121 +#serial 5
122  
123  dnl From Jim Meyering.
124  dnl
125  dnl Check whether struct dirent has a member named d_ino.
126  dnl
127  
128 -AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
129 +AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
130    [AC_REQUIRE([AC_HEADER_DIRENT])dnl
131     AC_CACHE_CHECK([for d_ino member in directory struct],
132                   jm_cv_struct_dirent_d_ino,
133 @@ -130,244 +58,548 @@
134     )
135     if test $jm_cv_struct_dirent_d_ino = yes; then
136       AC_DEFINE(D_INO_IN_DIRENT, 1,
137 -  [Define if there is a member named d_ino in the struct describing
138 -   directory headers.])
139 +       [Define if there is a member named d_ino in the struct describing
140 +        directory headers.])
141     fi
142    ]
143  )
144 -#serial 3
145 +# dirname.m4 serial 1
146 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
147 +dnl This file is free software, distributed under the terms of the GNU
148 +dnl General Public License.  As a special exception to the GNU General
149 +dnl Public License, this file may be distributed as part of a program
150 +dnl that contains a configuration script generated by Autoconf, under
151 +dnl the same distribution terms as the rest of that program.
152  
153 -dnl From Paul Eggert.
154 +AC_DEFUN([gl_DIRNAME],
155 +[
156 +  dnl Prerequisites of lib/dirname.h.
157 +  AC_REQUIRE([jm_AC_DOS])
158  
159 -# Define HAVE_INTTYPES_H if <inttypes.h> exists,
160 -# doesn't clash with <sys/types.h>, and declares uintmax_t.
161 +  dnl Prerequisites of lib/dirname.c.
162 +  AC_REQUIRE([AC_HEADER_STDC])
163 +  AC_CHECK_HEADERS_ONCE(string.h)
164  
165 -AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
166 -[
167 -  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
168 -  [AC_TRY_COMPILE(
169 -    [#include <sys/types.h>
170 -#include <inttypes.h>],
171 -    [uintmax_t i = (uintmax_t) -1;],
172 -    jm_ac_cv_header_inttypes_h=yes,
173 -    jm_ac_cv_header_inttypes_h=no)])
174 -  if test $jm_ac_cv_header_inttypes_h = yes; then
175 -    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
176 -[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
177 -   and declares uintmax_t. ])
178 -  fi
179 +  dnl Prerequisites of lib/basename.c.
180 +  AC_REQUIRE([AC_HEADER_STDC])
181 +  AC_CHECK_HEADERS_ONCE(string.h)
182 +
183 +  dnl Prerequisites of lib/stripslash.c.
184 +  AC_REQUIRE([AC_HEADER_STDC])
185 +  AC_CHECK_HEADERS_ONCE(string.h)
186  ])
187  #serial 5
188  
189 -dnl By default, many hosts won't let programs access large files;
190 -dnl one must use special compiler options to get large-file access to work.
191 -dnl For more details about this brain damage please see:
192 -dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
193 +# Define some macros required for proper operation of code in lib/*.c
194 +# on MSDOS/Windows systems.
195  
196 -dnl Written by Paul Eggert <eggert@twinsun.com>.
197 +# From Jim Meyering.
198  
199 -dnl Internal subroutine of AC_SYS_LARGEFILE.
200 -dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
201 -AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
202 -  [AC_CACHE_CHECK([for $1 value to request large file support],
203 -     ac_cv_sys_largefile_$1,
204 -     [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
205 -       ac_cv_sys_largefile_$1=no
206 -       ifelse($1, CFLAGS,
207 -         [case "$host_os" in
208 -          # IRIX 6.2 and later require cc -n32.
209 -changequote(, )dnl
210 -          irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
211 -changequote([, ])dnl
212 -            if test "$GCC" != yes; then
213 -              ac_cv_sys_largefile_CFLAGS=-n32
214 -            fi
215 -            ac_save_CC="$CC"
216 -            CC="$CC $ac_cv_sys_largefile_CFLAGS"
217 -            AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
218 -            CC="$ac_save_CC"
219 -          esac])
220 -      }])])
221 +AC_DEFUN([jm_AC_DOS],
222 +  [
223 +    AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
224 +      [
225 +        AC_TRY_COMPILE([],
226 +        [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
227 +neither MSDOS nor Windows
228 +#endif],
229 +        [ac_cv_win_or_dos=yes],
230 +        [ac_cv_win_or_dos=no])
231 +      ])
232  
233 -dnl Internal subroutine of AC_SYS_LARGEFILE.
234 -dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
235 -AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
236 -  [case $2 in
237 -   no) ;;
238 -   ?*)
239 -     case "[$]$1" in
240 -     '') $1=$2 ;;
241 -     *) $1=[$]$1' '$2 ;;
242 -     esac ;;
243 -   esac])
244 +    if test x"$ac_cv_win_or_dos" = xyes; then
245 +      ac_fs_accepts_drive_letter_prefix=1
246 +      ac_fs_backslash_is_file_name_separator=1
247 +    else
248 +      ac_fs_accepts_drive_letter_prefix=0
249 +      ac_fs_backslash_is_file_name_separator=0
250 +    fi
251  
252 -dnl Internal subroutine of AC_SYS_LARGEFILE.
253 -dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
254 -AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
255 -  [AC_CACHE_CHECK([for $1], $2,
256 -     [$2=no
257 -changequote(, )dnl
258 -      $4
259 -      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
260 -       case "$ac_flag" in
261 -       -D$1)
262 -         $2=1 ;;
263 -       -D$1=*)
264 -         $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
265 -       esac
266 -      done
267 -changequote([, ])dnl
268 -      ])
269 -   if test "[$]$2" != no; then
270 -     AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
271 -   fi])
272 +    AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
273 +    [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
274 +# define FILESYSTEM_PREFIX_LEN(Filename) \
275 +  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
276 +#else
277 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
278 +#endif])
279  
280 -AC_DEFUN(AC_SYS_LARGEFILE,
281 -  [AC_REQUIRE([AC_CANONICAL_HOST])
282 -   AC_ARG_ENABLE(largefile,
283 -     [  --disable-largefile     omit support for large files])
284 -   if test "$enable_largefile" != no; then
285 -     AC_CHECK_TOOL(GETCONF, getconf)
286 -     AC_SYS_LARGEFILE_FLAGS(CFLAGS)
287 -     AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
288 -     AC_SYS_LARGEFILE_FLAGS(LIBS)
289 +    AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
290 +      $ac_fs_accepts_drive_letter_prefix,
291 +      [Define on systems for which file names may have a so-called
292 +       `drive letter' prefix, define this to compute the length of that
293 +       prefix, including the colon.])
294  
295 -     for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
296 -       case "$ac_flag" in
297 -       no) ;;
298 -       -D_FILE_OFFSET_BITS=*) ;;
299 -       -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
300 -       -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
301 -       -D?* | -I?*)
302 -        AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
303 -       *)
304 -        AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
305 -       esac
306 -     done
307 -     AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
308 -     AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
309 -     AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
310 -       ac_cv_sys_file_offset_bits,
311 -       [Number of bits in a file offset, on hosts where this is settable.],
312 -       [case "$host_os" in
313 -       # HP-UX 10.20 and later
314 -       hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
315 -         ac_cv_sys_file_offset_bits=64 ;;
316 -       esac])
317 -     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
318 -       ac_cv_sys_largefile_source,
319 -       [Define to make fseeko etc. visible, on some hosts.],
320 -       [case "$host_os" in
321 -       # HP-UX 10.20 and later
322 -       hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
323 -         ac_cv_sys_largefile_source=1 ;;
324 -       esac])
325 -     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
326 -       ac_cv_sys_large_files,
327 -       [Define for large files, on AIX-style hosts.],
328 -       [case "$host_os" in
329 -       # AIX 4.2 and later
330 -       aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
331 -         ac_cv_sys_large_files=1 ;;
332 -       esac])
333 -   fi
334 +    AH_VERBATIM(ISSLASH,
335 +    [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
336 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
337 +#else
338 +# define ISSLASH(C) ((C) == '/')
339 +#endif])
340 +
341 +    AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
342 +      $ac_fs_backslash_is_file_name_separator,
343 +      [Define if the backslash character may also serve as a file name
344 +       component separator.])
345    ])
346 -#serial 3
347 +#serial 7
348 +
349 +AC_DEFUN([gl_ERROR],
350 +[
351 +  AC_FUNC_ERROR_AT_LINE
352 +  dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
353 +  jm_PREREQ_ERROR
354 +])
355 +
356 +# Prerequisites of lib/error.c.
357 +AC_DEFUN([jm_PREREQ_ERROR],
358 +[
359 +  AC_REQUIRE([AC_HEADER_STDC])
360 +  AC_REQUIRE([AC_FUNC_VPRINTF])
361 +  AC_CHECK_FUNCS(strerror)
362 +  AC_CHECK_DECLS([strerror])
363 +  AC_FUNC_STRERROR_R
364 +])
365 +# getopt.m4 serial 1
366 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
367 +dnl This file is free software, distributed under the terms of the GNU
368 +dnl General Public License.  As a special exception to the GNU General
369 +dnl Public License, this file may be distributed as part of a program
370 +dnl that contains a configuration script generated by Autoconf, under
371 +dnl the same distribution terms as the rest of that program.
372 +
373 +AC_DEFUN([gl_GETOPT],
374 +[
375 +  dnl Prerequisites of lib/getopt.c.
376 +  AC_CHECK_HEADERS_ONCE(string.h)
377 +])
378 +# malloc.m4 serial 7
379 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
380 +dnl This file is free software, distributed under the terms of the GNU
381 +dnl General Public License.  As a special exception to the GNU General
382 +dnl Public License, this file may be distributed as part of a program
383 +dnl that contains a configuration script generated by Autoconf, under
384 +dnl the same distribution terms as the rest of that program.
385  
386  dnl From Jim Meyering.
387  dnl Determine whether malloc accepts 0 as its argument.
388  dnl If it doesn't, arrange to use the replacement function.
389 -dnl
390  
391 -AC_DEFUN(jm_FUNC_MALLOC,
392 +AC_DEFUN([jm_FUNC_MALLOC],
393  [
394 - dnl xmalloc.c requires that this symbol be defined so it doesn't
395 - dnl mistakenly use a broken malloc -- as it might if this test were omitted.
396 - AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
397 -                    [Define if the malloc check has been performed. ])
398 +  AC_REQUIRE([AC_FUNC_MALLOC])
399 +  dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
400 +  if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
401 +    gl_PREREQ_MALLOC
402 +  fi
403 +])
404  
405 - AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
406 -  [AC_TRY_RUN([
407 -    char *malloc ();
408 -    int
409 -    main ()
410 -    {
411 -      exit (malloc (0) ? 0 : 1);
412 -    }
413 +# Prerequisites of lib/malloc.c.
414 +AC_DEFUN([gl_PREREQ_MALLOC], [
415 +  :
416 +])
417 +# mbrtowc.m4 serial 5
418 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
419 +dnl This file is free software, distributed under the terms of the GNU
420 +dnl General Public License.  As a special exception to the GNU General
421 +dnl Public License, this file may be distributed as part of a program
422 +dnl that contains a configuration script generated by Autoconf, under
423 +dnl the same distribution terms as the rest of that program.
424 +
425 +dnl From Paul Eggert
426 +
427 +dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
428 +dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
429 +
430 +AC_DEFUN([jm_FUNC_MBRTOWC],
431 +[
432 +  AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
433 +    jm_cv_func_mbrtowc,
434 +    [AC_TRY_LINK(
435 +       [#include <wchar.h>],
436 +       [mbstate_t state; return ! (sizeof state && mbrtowc);],
437 +       jm_cv_func_mbrtowc=yes,
438 +       jm_cv_func_mbrtowc=no)])
439 +  if test $jm_cv_func_mbrtowc = yes; then
440 +    AC_DEFINE(HAVE_MBRTOWC, 1,
441 +      [Define to 1 if mbrtowc and mbstate_t are properly declared.])
442 +  fi
443 +])
444 +# mbstate_t.m4 serial 9
445 +dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
446 +dnl This file is free software, distributed under the terms of the GNU
447 +dnl General Public License.  As a special exception to the GNU General
448 +dnl Public License, this file may be distributed as part of a program
449 +dnl that contains a configuration script generated by Autoconf, under
450 +dnl the same distribution terms as the rest of that program.
451 +
452 +# From Paul Eggert.
453 +
454 +# BeOS 5 has <wchar.h> but does not define mbstate_t,
455 +# so you can't declare an object of that type.
456 +# Check for this incompatibility with Standard C.
457 +
458 +# AC_TYPE_MBSTATE_T
459 +# -----------------
460 +AC_DEFUN([AC_TYPE_MBSTATE_T],
461 +  [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
462 +     [AC_COMPILE_IFELSE(
463 +       [AC_LANG_PROGRAM(
464 +          [AC_INCLUDES_DEFAULT
465 +#          include <wchar.h>],
466 +          [mbstate_t x; return sizeof x;])],
467 +       [ac_cv_type_mbstate_t=yes],
468 +       [ac_cv_type_mbstate_t=no])])
469 +   if test $ac_cv_type_mbstate_t = yes; then
470 +     AC_DEFINE([HAVE_MBSTATE_T], 1,
471 +              [Define to 1 if <wchar.h> declares mbstate_t.])
472 +   else
473 +     AC_DEFINE([mbstate_t], int,
474 +              [Define to a type if <wchar.h> does not define.])
475 +   fi])
476 +# memchr.m4 serial 1
477 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
478 +dnl This file is free software, distributed under the terms of the GNU
479 +dnl General Public License.  As a special exception to the GNU General
480 +dnl Public License, this file may be distributed as part of a program
481 +dnl that contains a configuration script generated by Autoconf, under
482 +dnl the same distribution terms as the rest of that program.
483 +
484 +AC_DEFUN([gl_FUNC_MEMCHR],
485 +[
486 +  AC_REPLACE_FUNCS(memchr)
487 +  if test $ac_cv_func_memchr = no; then
488 +    jm_PREREQ_MEMCHR
489 +  fi
490 +])
491 +
492 +# Prerequisites of lib/memchr.c.
493 +AC_DEFUN([jm_PREREQ_MEMCHR], [
494 +  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
495 +  AC_CHECK_HEADERS(bp-sym.h)
496 +])
497 +#serial 1
498 +
499 +dnl From Mumit Khan and Paul Eggert
500 +dnl Determine whether mkdir accepts only one argument instead of the usual two.
501 +
502 +AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
503 +  [AC_CHECK_FUNCS(mkdir)
504 +   AC_CACHE_CHECK([whether mkdir takes only one argument],
505 +     patch_cv_mkdir_takes_one_arg,
506 +     [patch_cv_mkdir_takes_one_arg=no
507 +      if test $ac_cv_func_mkdir = yes; then
508 +        AC_TRY_COMPILE([
509 +#include <sys/types.h>
510 +#include <sys/stat.h>
511           ],
512 -        jm_cv_func_working_malloc=yes,
513 -        jm_cv_func_working_malloc=no,
514 -        dnl When crosscompiling, assume malloc is broken.
515 -        jm_cv_func_working_malloc=no)
516 +         [mkdir (".", 0);],
517 +         ,
518 +         [AC_TRY_COMPILE([
519 +#include <sys/types.h>
520 +#include <sys/stat.h>
521 +            ],
522 +            [mkdir (".");],
523 +            patch_cv_mkdir_takes_one_arg=yes
524 +         )]
525 +       )
526 +      fi
527 +     ]
528 +   )
529 +   if test $patch_cv_mkdir_takes_one_arg = yes; then
530 +     AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
531 +       [Define if mkdir takes only one argument.])
532 +   fi
533 +  ]
534 +)
535 +# onceonly.m4 serial 3
536 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
537 +dnl This file is free software, distributed under the terms of the GNU
538 +dnl General Public License.  As a special exception to the GNU General
539 +dnl Public License, this file may be distributed as part of a program
540 +dnl that contains a configuration script generated by Autoconf, under
541 +dnl the same distribution terms as the rest of that program.
542 +
543 +dnl This file defines some "once only" variants of standard autoconf macros.
544 +dnl   AC_CHECK_HEADERS_ONCE         like  AC_CHECK_HEADERS
545 +dnl   AC_CHECK_FUNCS_ONCE           like  AC_CHECK_FUNCS
546 +dnl   AC_CHECK_DECLS_ONCE           like  AC_CHECK_DECLS
547 +dnl   AC_REQUIRE([AC_HEADER_STDC])  like  AC_HEADER_STDC
548 +dnl The advantage is that the check for each of the headers/functions/decls
549 +dnl will be put only once into the 'configure' file. It keeps the size of
550 +dnl the 'configure' file down, and avoids redundant output when 'configure'
551 +dnl is run.
552 +dnl The drawback is that the checks cannot be conditionalized. If you write
553 +dnl   if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
554 +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
555 +dnl empty, and the check will be inserted before the body of the AC_DEFUNed
556 +dnl function.
557 +
558 +dnl Autoconf version 2.57 or newer is recommended.
559 +AC_PREREQ(2.54)
560 +
561 +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
562 +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
563 +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
564 +  :
565 +  AC_FOREACH([gl_HEADER_NAME], [$1], [
566 +    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
567 +                                                 [-./], [___])), [
568 +      AC_CHECK_HEADERS(gl_HEADER_NAME)
569 +    ])
570 +    AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
571 +                                                   [-./], [___])))
572    ])
573 -  if test $jm_cv_func_working_malloc = no; then
574 -    AC_SUBST(LIBOBJS)
575 -    LIBOBJS="$LIBOBJS malloc.$ac_objext"
576 -    AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
577 -      [Define to rpl_malloc if the replacement function should be used.])
578 -  fi
579  ])
580 -## ------------------------------- ##
581 -## Check for function prototypes.  ##
582 -## From Franc,ois Pinard           ##
583 -## ------------------------------- ##
584  
585 -# serial 1
586 +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
587 +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
588 +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
589 +  :
590 +  AC_FOREACH([gl_FUNC_NAME], [$1], [
591 +    AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
592 +      AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
593 +    ])
594 +    AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
595 +  ])
596 +])
597  
598 -AC_DEFUN(AM_C_PROTOTYPES,
599 -[AC_REQUIRE([AM_PROG_CC_STDC])
600 -AC_REQUIRE([AC_PROG_CPP])
601 -AC_MSG_CHECKING([for function prototypes])
602 -if test "$am_cv_prog_cc_stdc" != no; then
603 -  AC_MSG_RESULT(yes)
604 -  AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
605 -  U= ANSI2KNR=
606 -else
607 -  AC_MSG_RESULT(no)
608 -  U=_ ANSI2KNR=./ansi2knr
609 -  # Ensure some checks needed by ansi2knr itself.
610 -  AC_HEADER_STDC
611 -  AC_CHECK_HEADERS(string.h)
612 -fi
613 -AC_SUBST(U)dnl
614 -AC_SUBST(ANSI2KNR)dnl
615 +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
616 +# AC_CHECK_DECLS(DECL1, DECL2, ...).
617 +AC_DEFUN([AC_CHECK_DECLS_ONCE], [
618 +  :
619 +  AC_FOREACH([gl_DECL_NAME], [$1], [
620 +    AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
621 +      AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
622 +    ])
623 +    AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
624 +  ])
625  ])
626 -#serial 3
627 +# quote.m4 serial 1
628 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
629 +dnl This file is free software, distributed under the terms of the GNU
630 +dnl General Public License.  As a special exception to the GNU General
631 +dnl Public License, this file may be distributed as part of a program
632 +dnl that contains a configuration script generated by Autoconf, under
633 +dnl the same distribution terms as the rest of that program.
634 +
635 +AC_DEFUN([gl_QUOTE],
636 +[
637 +  dnl Prerequisites of lib/quote.c.
638 +  AC_CHECK_HEADERS_ONCE(stddef.h)
639 +])
640 +# quotearg.m4 serial 1
641 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
642 +dnl This file is free software, distributed under the terms of the GNU
643 +dnl General Public License.  As a special exception to the GNU General
644 +dnl Public License, this file may be distributed as part of a program
645 +dnl that contains a configuration script generated by Autoconf, under
646 +dnl the same distribution terms as the rest of that program.
647 +
648 +AC_DEFUN([gl_QUOTEARG],
649 +[
650 +  dnl Prerequisites of lib/quotearg.c.
651 +  AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
652 +  AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
653 +  AC_TYPE_MBSTATE_T
654 +  jm_FUNC_MBRTOWC
655 +])
656 +# realloc.m4 serial 7
657 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
658 +dnl This file is free software, distributed under the terms of the GNU
659 +dnl General Public License.  As a special exception to the GNU General
660 +dnl Public License, this file may be distributed as part of a program
661 +dnl that contains a configuration script generated by Autoconf, under
662 +dnl the same distribution terms as the rest of that program.
663  
664  dnl From Jim Meyering.
665  dnl Determine whether realloc works when both arguments are 0.
666  dnl If it doesn't, arrange to use the replacement function.
667 -dnl
668  
669 -AC_DEFUN(jm_FUNC_REALLOC,
670 +AC_DEFUN([jm_FUNC_REALLOC],
671  [
672 - dnl xmalloc.c requires that this symbol be defined so it doesn't
673 - dnl mistakenly use a broken realloc -- as it might if this test were omitted.
674 - AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
675 -                    [Define if the realloc check has been performed. ])
676 +  AC_REQUIRE([AC_FUNC_REALLOC])
677 +  dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
678 +  if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
679 +    gl_PREREQ_REALLOC
680 +  fi
681 +])
682  
683 - AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
684 -  [AC_TRY_RUN([
685 -    char *realloc ();
686 -    int
687 -    main ()
688 -    {
689 -      exit (realloc (0, 0) ? 0 : 1);
690 -    }
691 -         ],
692 -        jm_cv_func_working_realloc=yes,
693 -        jm_cv_func_working_realloc=no,
694 -        dnl When crosscompiling, assume realloc is broken.
695 -        jm_cv_func_working_realloc=no)
696 -  ])
697 -  if test $jm_cv_func_working_realloc = no; then
698 -    AC_SUBST(LIBOBJS)
699 -    LIBOBJS="$LIBOBJS realloc.$ac_objext"
700 -    AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
701 -      [Define to rpl_realloc if the replacement function should be used.])
702 +# Prerequisites of lib/realloc.c.
703 +AC_DEFUN([gl_PREREQ_REALLOC], [
704 +  :
705 +])
706 +# rmdir.m4 serial 1
707 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
708 +dnl This file is free software, distributed under the terms of the GNU
709 +dnl General Public License.  As a special exception to the GNU General
710 +dnl Public License, this file may be distributed as part of a program
711 +dnl that contains a configuration script generated by Autoconf, under
712 +dnl the same distribution terms as the rest of that program.
713 +
714 +AC_DEFUN([gl_FUNC_RMDIR],
715 +[
716 +  AC_REPLACE_FUNCS(rmdir)
717 +  if test $ac_cv_func_rmdir = no; then
718 +    gl_PREREQ_RMDIR
719    fi
720  ])
721 -#serial 2
722 +
723 +# Prerequisites of lib/rmdir.c.
724 +AC_DEFUN([gl_PREREQ_RMDIR], [
725 +  AC_REQUIRE([AC_HEADER_STAT])
726 +  :
727 +])
728 +
729 +# Check for setmode, DOS style.
730 +
731 +# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
732 +
733 +# This program is free software; you can redistribute it and/or modify
734 +# it under the terms of the GNU General Public License as published by
735 +# the Free Software Foundation; either version 2, or (at your option)
736 +# any later version.
737 +
738 +# This program is distributed in the hope that it will be useful,
739 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
740 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741 +# GNU General Public License for more details.
742 +
743 +# You should have received a copy of the GNU General Public License
744 +# along with this program; if not, write to the Free Software
745 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746 +# 02111-1307, USA.
747 +
748 +AC_DEFUN([AC_FUNC_SETMODE_DOS],
749 +  [AC_CHECK_HEADERS(fcntl.h unistd.h)
750 +   AC_CACHE_CHECK([for DOS-style setmode],
751 +     [ac_cv_func_setmode_dos],
752 +     [AC_TRY_LINK(
753 +       [#include <io.h>
754 +        #if HAVE_FCNTL_H
755 +        # include <fcntl.h>
756 +        #endif
757 +        #if HAVE_UNISTD_H
758 +        # include <unistd.h>
759 +        #endif],
760 +       [int ret = setmode && setmode (1, O_BINARY);],
761 +       [ac_cv_func_setmode_dos=yes],
762 +       [ac_cv_func_setmode_dos=no])])
763 +   if test $ac_cv_func_setmode_dos = yes; then
764 +     AC_DEFINE(HAVE_SETMODE_DOS, 1,
765 +       [Define to 1 if you have the DOS-style `setmode' function.])
766 +   fi])
767 +# Check for stdbool.h that conforms to C99.
768 +
769 +# Copyright (C) 2002-2003 Free Software Foundation, Inc.
770 +
771 +# This program is free software; you can redistribute it and/or modify
772 +# it under the terms of the GNU General Public License as published by
773 +# the Free Software Foundation; either version 2, or (at your option)
774 +# any later version.
775 +
776 +# This program is distributed in the hope that it will be useful,
777 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
778 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
779 +# GNU General Public License for more details.
780 +
781 +# You should have received a copy of the GNU General Public License
782 +# along with this program; if not, write to the Free Software
783 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
784 +# 02111-1307, USA.
785 +
786 +# Prepare for substituting <stdbool.h> if it is not supported.
787 +
788 +AC_DEFUN([AM_STDBOOL_H],
789 +[
790 +  AC_REQUIRE([AC_HEADER_STDBOOL])
791 +
792 +  # Define two additional variables used in the Makefile substitution.
793 +
794 +  if test "$ac_cv_header_stdbool_h" = yes; then
795 +    STDBOOL_H=''
796 +  else
797 +    STDBOOL_H='stdbool.h'
798 +  fi
799 +  AC_SUBST([STDBOOL_H])
800 +
801 +  if test "$ac_cv_type__Bool" = yes; then
802 +    HAVE__BOOL=1
803 +  else
804 +    HAVE__BOOL=0
805 +  fi
806 +  AC_SUBST([HAVE__BOOL])
807 +])
808 +
809 +# This macro is only needed in autoconf <= 2.54.  Newer versions of autoconf
810 +# have this macro built-in.
811 +
812 +AC_DEFUN([AC_HEADER_STDBOOL],
813 +  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
814 +     [ac_cv_header_stdbool_h],
815 +     [AC_TRY_COMPILE(
816 +       [
817 +         #include <stdbool.h>
818 +         #ifndef bool
819 +          "error: bool is not defined"
820 +         #endif
821 +         #ifndef false
822 +          "error: false is not defined"
823 +         #endif
824 +         #if false
825 +          "error: false is not 0"
826 +         #endif
827 +         #ifndef true
828 +          "error: false is not defined"
829 +         #endif
830 +         #if true != 1
831 +          "error: true is not 1"
832 +         #endif
833 +         #ifndef __bool_true_false_are_defined
834 +          "error: __bool_true_false_are_defined is not defined"
835 +         #endif
836 +
837 +         struct s { _Bool s: 1; _Bool t; } s;
838 +
839 +         char a[true == 1 ? 1 : -1];
840 +         char b[false == 0 ? 1 : -1];
841 +         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
842 +         char d[(bool) -0.5 == true ? 1 : -1];
843 +         bool e = &s;
844 +         char f[(_Bool) -0.0 == false ? 1 : -1];
845 +         char g[true];
846 +         char h[sizeof (_Bool)];
847 +         char i[sizeof s.t];
848 +       ],
849 +       [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
850 +       [ac_cv_header_stdbool_h=yes],
851 +       [ac_cv_header_stdbool_h=no])])
852 +   AC_CHECK_TYPES([_Bool])
853 +   if test $ac_cv_header_stdbool_h = yes; then
854 +     AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
855 +   fi])
856 +#serial 7 -*- autoconf -*-
857 +
858 +dnl From Jim Meyering.
859 +dnl
860 +dnl See if the glibc *_unlocked I/O macros or functions are available.
861 +dnl Use only those *_unlocked macros or functions that are declared
862 +dnl (because some of them were declared in Solaris 2.5.1 but were removed
863 +dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
864 +dnl on Solaris 2.6).
865 +
866 +AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
867 +[
868 +  dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
869 +  dnl etc.
870 +  AC_REQUIRE([AC_GNU_SOURCE])
871 +
872 +  AC_CHECK_DECLS_ONCE(
873 +     [clearerr_unlocked feof_unlocked ferror_unlocked
874 +      fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
875 +      fread_unlocked fwrite_unlocked getc_unlocked
876 +      getchar_unlocked putc_unlocked putchar_unlocked])
877 +])
878 +#serial 5
879  
880  dnl From Jim Meyering
881  
882 @@ -375,9 +607,9 @@
883  dnl usually in <utime.h>.
884  dnl Some systems have utime.h but don't declare the struct anywhere.
885  
886 -AC_DEFUN(jm_STRUCT_UTIMBUF,
887 +AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
888  [
889 -  AC_CHECK_HEADERS(utime.h)
890 +  AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
891    AC_REQUIRE([AC_HEADER_TIME])
892    AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
893      [AC_TRY_COMPILE(
894 @@ -402,8 +634,34 @@
895      ])
896  
897    if test $fu_cv_sys_struct_utimbuf = yes; then
898 -    AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
899 -[Define if struct utimbuf is declared -- usually in <utime.h>.
900 -   Some systems have utime.h but don't declare the struct anywhere. ])
901 +    AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
902 +      [Define if struct utimbuf is declared -- usually in <utime.h>.
903 +       Some systems have utime.h but don't declare the struct anywhere. ])
904    fi
905  ])
906 +# xalloc.m4 serial 1
907 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
908 +dnl This file is free software, distributed under the terms of the GNU
909 +dnl General Public License.  As a special exception to the GNU General
910 +dnl Public License, this file may be distributed as part of a program
911 +dnl that contains a configuration script generated by Autoconf, under
912 +dnl the same distribution terms as the rest of that program.
913 +
914 +AC_DEFUN([gl_XALLOC],
915 +[
916 +  gl_PREREQ_XMALLOC
917 +  gl_PREREQ_XSTRDUP
918 +])
919 +
920 +# Prerequisites of lib/xmalloc.c.
921 +AC_DEFUN([gl_PREREQ_XMALLOC], [
922 +  AC_REQUIRE([AC_HEADER_STDC])
923 +  AC_REQUIRE([jm_FUNC_MALLOC])
924 +  AC_REQUIRE([jm_FUNC_REALLOC])
925 +])
926 +
927 +# Prerequisites of lib/xstrdup.c.
928 +AC_DEFUN([gl_PREREQ_XSTRDUP], [
929 +  AC_REQUIRE([AC_HEADER_STDC])
930 +  AC_CHECK_HEADERS_ONCE(string.h)
931 +])
932 diff -urNd -urNd patch-2.5.4/addext.c patch-2.5.9/addext.c
933 --- patch-2.5.4/addext.c        1999-01-18 12:02:28.000000000 -0500
934 +++ patch-2.5.9/addext.c        2003-05-18 01:30:52.000000000 -0400
935 @@ -1,5 +1,7 @@
936  /* addext.c -- add an extension to a file name
937 -   Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
938 +
939 +   Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
940 +   Foundation, Inc.
941  
942     This program is free software; you can redistribute it and/or modify
943     it under the terms of the GNU General Public License as published by
944 @@ -29,8 +31,6 @@
945  # define HAVE_LONG_FILE_NAMES 0
946  #endif
947  
948 -#include <backupfile.h>
949 -
950  #if HAVE_LIMITS_H
951  # include <limits.h>
952  #endif
953 @@ -49,7 +49,13 @@
954  # include <unistd.h>
955  #endif
956  
957 -char *base_name PARAMS ((char const *));
958 +#include <errno.h>
959 +#ifndef errno
960 +extern int errno;
961 +#endif
962 +
963 +#include "backupfile.h"
964 +#include "dirname.h"
965  
966  /* Append to FILENAME the extension EXT, unless the result would be too long,
967     in which case just append the character E.  */
968 @@ -58,25 +64,34 @@
969  addext (char *filename, char const *ext, int e)
970  {
971    char *s = base_name (filename);
972 -  size_t slen = strlen (s), extlen = strlen (ext);
973 -  long slen_max = -1;
974 +  size_t slen = base_len (s);
975 +  size_t extlen = strlen (ext);
976 +  size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX;
977  
978  #if HAVE_PATHCONF && defined _PC_NAME_MAX
979 -  if (slen + extlen <= _POSIX_NAME_MAX && ! HAVE_DOS_FILE_NAMES)
980 -    /* The file name is so short there's no need to call pathconf.  */
981 -    slen_max = _POSIX_NAME_MAX;
982 -  else if (s == filename)
983 -    slen_max = pathconf (".", _PC_NAME_MAX);
984 -  else
985 +  if (_POSIX_NAME_MAX < slen + extlen || HAVE_DOS_FILE_NAMES)
986      {
987 -      char c = *s;
988 -      *s = 0;
989 -      slen_max = pathconf (filename, _PC_NAME_MAX);
990 -      *s = c;
991 +      /* The new base name is long enough to require a pathconf check.  */
992 +      long name_max;
993 +      errno = 0;
994 +      if (s == filename)
995 +       name_max = pathconf (".", _PC_NAME_MAX);
996 +      else
997 +       {
998 +         char c = *s;
999 +         if (! ISSLASH (c))
1000 +           *s = 0;
1001 +         name_max = pathconf (filename, _PC_NAME_MAX);
1002 +         *s = c;
1003 +       }
1004 +      if (0 <= name_max || errno == 0)
1005 +       {
1006 +         long size = slen_max = name_max;
1007 +         if (name_max != size)
1008 +           slen_max = -1;
1009 +       }
1010      }
1011  #endif
1012 -  if (slen_max < 0)
1013 -    slen_max = HAVE_LONG_FILE_NAMES ? 255 : 14;
1014  
1015    if (HAVE_DOS_FILE_NAMES && slen_max <= 12)
1016      {
1017 diff -urNd -urNd patch-2.5.4/ansi2knr.1 patch-2.5.9/ansi2knr.1
1018 --- patch-2.5.4/ansi2knr.1      1997-07-04 15:39:00.000000000 -0400
1019 +++ patch-2.5.9/ansi2knr.1      1969-12-31 19:00:00.000000000 -0500
1020 @@ -1,36 +0,0 @@
1021 -.TH ANSI2KNR 1 "19 Jan 1996"
1022 -.SH NAME
1023 -ansi2knr \- convert ANSI C to Kernighan & Ritchie C
1024 -.SH SYNOPSIS
1025 -.I ansi2knr
1026 -[--varargs] input_file [output_file]
1027 -.SH DESCRIPTION
1028 -If no output_file is supplied, output goes to stdout.
1029 -.br
1030 -There are no error messages.
1031 -.sp
1032 -.I ansi2knr
1033 -recognizes function definitions by seeing a non-keyword identifier at the left
1034 -margin, followed by a left parenthesis, with a right parenthesis as the last
1035 -character on the line, and with a left brace as the first token on the
1036 -following line (ignoring possible intervening comments).  It will recognize a
1037 -multi-line header provided that no intervening line ends with a left or right
1038 -brace or a semicolon.  These algorithms ignore whitespace and comments, except
1039 -that the function name must be the first thing on the line.
1040 -.sp
1041 -The following constructs will confuse it:
1042 -.br
1043 -     - Any other construct that starts at the left margin and follows the
1044 -above syntax (such as a macro or function call).
1045 -.br
1046 -     - Some macros that tinker with the syntax of the function header.
1047 -.sp
1048 -The --varargs switch is obsolete, and is recognized only for
1049 -backwards compatibility.  The present version of
1050 -.I ansi2knr
1051 -will always attempt to convert a ... argument to va_alist and va_dcl.
1052 -.SH AUTHOR
1053 -L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
1054 -continues to maintain the current version; most of the code in the current
1055 -version is his work.  ansi2knr also includes contributions by Francois
1056 -Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
1057 diff -urNd -urNd patch-2.5.4/ansi2knr.c patch-2.5.9/ansi2knr.c
1058 --- patch-2.5.4/ansi2knr.c      1999-04-13 10:44:41.000000000 -0400
1059 +++ patch-2.5.9/ansi2knr.c      1969-12-31 19:00:00.000000000 -0500
1060 @@ -1,678 +0,0 @@
1061 -/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises.  All rights reserved. */
1062 -
1063 -/*$Id: ansi2knr.c,v 1.14 1999/04/13 14:44:33 meyering Exp $*/
1064 -/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
1065 -
1066 -/*
1067 -ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
1068 -WARRANTY.  No author or distributor accepts responsibility to anyone for the
1069 -consequences of using it or for whether it serves any particular purpose or
1070 -works at all, unless he says so in writing.  Refer to the GNU General Public
1071 -License (the "GPL") for full details.
1072 -
1073 -Everyone is granted permission to copy, modify and redistribute ansi2knr,
1074 -but only under the conditions described in the GPL.  A copy of this license
1075 -is supposed to have been given to you along with ansi2knr so you can know
1076 -your rights and responsibilities.  It should be in a file named COPYLEFT,
1077 -or, if there is no file named COPYLEFT, a file named COPYING.  Among other
1078 -things, the copyright notice and this notice must be preserved on all
1079 -copies.
1080 -
1081 -We explicitly state here what we believe is already implied by the GPL: if
1082 -the ansi2knr program is distributed as a separate set of sources and a
1083 -separate executable file which are aggregated on a storage medium together
1084 -with another program, this in itself does not bring the other program under
1085 -the GPL, nor does the mere fact that such a program or the procedures for
1086 -constructing it invoke the ansi2knr executable bring any other part of the
1087 -program under the GPL.
1088 -*/
1089 -
1090 -/*
1091 - * Usage:
1092 -       ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
1093 - * --filename provides the file name for the #line directive in the output,
1094 - * overriding input_file (if present).
1095 - * If no input_file is supplied, input is read from stdin.
1096 - * If no output_file is supplied, output goes to stdout.
1097 - * There are no error messages.
1098 - *
1099 - * ansi2knr recognizes function definitions by seeing a non-keyword
1100 - * identifier at the left margin, followed by a left parenthesis,
1101 - * with a right parenthesis as the last character on the line,
1102 - * and with a left brace as the first token on the following line
1103 - * (ignoring possible intervening comments), except that a line
1104 - * consisting of only
1105 - *     identifier1(identifier2)
1106 - * will not be considered a function definition unless identifier2 is
1107 - * the word "void", and a line consisting of
1108 - *     identifier1(identifier2, <<arbitrary>>)
1109 - * will not be considered a function definition.
1110 - * ansi2knr will recognize a multi-line header provided
1111 - * that no intervening line ends with a left or right brace or a semicolon.
1112 - * These algorithms ignore whitespace and comments, except that
1113 - * the function name must be the first thing on the line.
1114 - * The following constructs will confuse it:
1115 - *     - Any other construct that starts at the left margin and
1116 - *         follows the above syntax (such as a macro or function call).
1117 - *     - Some macros that tinker with the syntax of function headers.
1118 - */
1119 -
1120 -/*
1121 - * The original and principal author of ansi2knr is L. Peter Deutsch
1122 - * <ghost@aladdin.com>.  Other authors are noted in the change history
1123 - * that follows (in reverse chronological order):
1124 -       lpd 1999-04-12 added minor fixes from Pavel Roskin
1125 -               <pavel_roskin@geocities.com> for clean compilation with
1126 -               gcc -W -Wall
1127 -       lpd 1999-03-22 added hack to recognize lines consisting of
1128 -               identifier1(identifier2, xxx) as *not* being procedures
1129 -       lpd 1999-02-03 made indentation of preprocessor commands consistent
1130 -       lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
1131 -               endless loop; quoted strings within an argument list
1132 -               confused the parser
1133 -       lpd 1999-01-24 added a check for write errors on the output,
1134 -               suggested by Jim Meyering <meyering@ascend.com>
1135 -       lpd 1998-11-09 added further hack to recognize identifier(void)
1136 -               as being a procedure
1137 -       lpd 1998-10-23 added hack to recognize lines consisting of
1138 -               identifier1(identifier2) as *not* being procedures
1139 -       lpd 1997-12-08 made input_file optional; only closes input and/or
1140 -               output file if not stdin or stdout respectively; prints
1141 -               usage message on stderr rather than stdout; adds
1142 -               --filename switch (changes suggested by
1143 -               <ceder@lysator.liu.se>)
1144 -       lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
1145 -               compilers that don't understand void, as suggested by
1146 -               Tom Lane
1147 -       lpd 1996-01-15 changed to require that the first non-comment token
1148 -               on the line following a function header be a left brace,
1149 -               to reduce sensitivity to macros, as suggested by Tom Lane
1150 -               <tgl@sss.pgh.pa.us>
1151 -       lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
1152 -               undefined preprocessor symbols as 0; changed all #ifdefs
1153 -               for configuration symbols to #ifs
1154 -       lpd 1995-04-05 changed copyright notice to make it clear that
1155 -               including ansi2knr in a program does not bring the entire
1156 -               program under the GPL
1157 -       lpd 1994-12-18 added conditionals for systems where ctype macros
1158 -               don't handle 8-bit characters properly, suggested by
1159 -               Francois Pinard <pinard@iro.umontreal.ca>;
1160 -               removed --varargs switch (this is now the default)
1161 -       lpd 1994-10-10 removed CONFIG_BROKETS conditional
1162 -       lpd 1994-07-16 added some conditionals to help GNU `configure',
1163 -               suggested by Francois Pinard <pinard@iro.umontreal.ca>;
1164 -               properly erase prototype args in function parameters,
1165 -               contributed by Jim Avera <jima@netcom.com>;
1166 -               correct error in writeblanks (it shouldn't erase EOLs)
1167 -       lpd 1989-xx-xx original version
1168 - */
1169 -
1170 -/* Most of the conditionals here are to make ansi2knr work with */
1171 -/* or without the GNU configure machinery. */
1172 -
1173 -#if HAVE_CONFIG_H
1174 -# include <config.h>
1175 -#endif
1176 -
1177 -#include <stdio.h>
1178 -#include <ctype.h>
1179 -
1180 -#if HAVE_CONFIG_H
1181 -
1182 -/*
1183 -   For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
1184 -   This will define HAVE_CONFIG_H and so, activate the following lines.
1185 - */
1186 -
1187 -# if STDC_HEADERS || HAVE_STRING_H
1188 -#  include <string.h>
1189 -# else
1190 -#  include <strings.h>
1191 -# endif
1192 -
1193 -#else /* not HAVE_CONFIG_H */
1194 -
1195 -/* Otherwise do it the hard way */
1196 -
1197 -# ifdef BSD
1198 -#  include <strings.h>
1199 -# else
1200 -#  ifdef VMS
1201 -    extern int strlen(), strncmp();
1202 -#  else
1203 -#   include <string.h>
1204 -#  endif
1205 -# endif
1206 -
1207 -#endif /* not HAVE_CONFIG_H */
1208 -
1209 -#if STDC_HEADERS
1210 -# include <stdlib.h>
1211 -#else
1212 -/*
1213 -   malloc and free should be declared in stdlib.h,
1214 -   but if you've got a K&R compiler, they probably aren't.
1215 - */
1216 -# ifdef MSDOS
1217 -#  include <malloc.h>
1218 -# else
1219 -#  ifdef VMS
1220 -     extern char *malloc();
1221 -     extern void free();
1222 -#  else
1223 -     extern char *malloc();
1224 -     extern int free();
1225 -#  endif
1226 -# endif
1227 -
1228 -#endif
1229 -
1230 -/* Define NULL (for *very* old compilers). */
1231 -#ifndef NULL
1232 -# define NULL (0)
1233 -#endif
1234 -
1235 -/*
1236 - * The ctype macros don't always handle 8-bit characters correctly.
1237 - * Compensate for this here.
1238 - */
1239 -#ifdef isascii
1240 -# undef HAVE_ISASCII           /* just in case */
1241 -# define HAVE_ISASCII 1
1242 -#else
1243 -#endif
1244 -#if STDC_HEADERS || !HAVE_ISASCII
1245 -# define is_ascii(c) 1
1246 -#else
1247 -# define is_ascii(c) isascii(c)
1248 -#endif
1249 -
1250 -#define is_space(c) (is_ascii(c) && isspace(c))
1251 -#define is_alpha(c) (is_ascii(c) && isalpha(c))
1252 -#define is_alnum(c) (is_ascii(c) && isalnum(c))
1253 -
1254 -/* Scanning macros */
1255 -#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
1256 -#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
1257 -
1258 -/* Forward references */
1259 -char *skipspace();
1260 -char *scanstring();
1261 -int writeblanks();
1262 -int test1();
1263 -int convert1();
1264 -
1265 -/* The main program */
1266 -int
1267 -main(argc, argv)
1268 -    int argc;
1269 -    char *argv[];
1270 -{      FILE *in = stdin;
1271 -       FILE *out = stdout;
1272 -       char *filename = 0;
1273 -       char *program_name = argv[0];
1274 -       char *output_name = 0;
1275 -#define bufsize 5000                   /* arbitrary size */
1276 -       char *buf;
1277 -       char *line;
1278 -       char *more;
1279 -       char *usage =
1280 -         "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
1281 -       /*
1282 -        * In previous versions, ansi2knr recognized a --varargs switch.
1283 -        * If this switch was supplied, ansi2knr would attempt to convert
1284 -        * a ... argument to va_alist and va_dcl; if this switch was not
1285 -        * supplied, ansi2knr would simply drop any such arguments.
1286 -        * Now, ansi2knr always does this conversion, and we only
1287 -        * check for this switch for backward compatibility.
1288 -        */
1289 -       int convert_varargs = 1;
1290 -       int output_error;
1291 -
1292 -       while ( argc > 1 && argv[1][0] == '-' ) {
1293 -         if ( !strcmp(argv[1], "--varargs") ) {
1294 -           convert_varargs = 1;
1295 -           argc--;
1296 -           argv++;
1297 -           continue;
1298 -         }
1299 -         if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
1300 -           filename = argv[2];
1301 -           argc -= 2;
1302 -           argv += 2;
1303 -           continue;
1304 -         }
1305 -         fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
1306 -                 argv[1]);
1307 -         fprintf(stderr, usage);
1308 -         exit(1);
1309 -       }
1310 -       switch ( argc )
1311 -          {
1312 -       default:
1313 -               fprintf(stderr, usage);
1314 -               exit(0);
1315 -       case 3:
1316 -               output_name = argv[2];
1317 -               out = fopen(output_name, "w");
1318 -               if ( out == NULL ) {
1319 -                 fprintf(stderr, "%s: Cannot open output file %s\n",
1320 -                         program_name, output_name);
1321 -                 exit(1);
1322 -               }
1323 -               /* falls through */
1324 -       case 2:
1325 -               in = fopen(argv[1], "r");
1326 -               if ( in == NULL ) {
1327 -                 fprintf(stderr, "%s: Cannot open input file %s\n",
1328 -                         program_name, argv[1]);
1329 -                 exit(1);
1330 -               }
1331 -               if ( filename == 0 )
1332 -                 filename = argv[1];
1333 -               /* falls through */
1334 -       case 1:
1335 -               break;
1336 -          }
1337 -       if ( filename )
1338 -         fprintf(out, "#line 1 \"%s\"\n", filename);
1339 -       buf = malloc(bufsize);
1340 -       if ( buf == NULL )
1341 -          {
1342 -               fprintf(stderr, "Unable to allocate read buffer!\n");
1343 -               exit(1);
1344 -          }
1345 -       line = buf;
1346 -       while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
1347 -          {
1348 -test:          line += strlen(line);
1349 -               switch ( test1(buf) )
1350 -                  {
1351 -               case 2:                 /* a function header */
1352 -                       convert1(buf, out, 1, convert_varargs);
1353 -                       break;
1354 -               case 1:                 /* a function */
1355 -                       /* Check for a { at the start of the next line. */
1356 -                       more = ++line;
1357 -f:                     if ( line >= buf + (bufsize - 1) ) /* overflow check */
1358 -                         goto wl;
1359 -                       if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
1360 -                         goto wl;
1361 -                       switch ( *skipspace(more, 1) )
1362 -                         {
1363 -                         case '{':
1364 -                           /* Definitely a function header. */
1365 -                           convert1(buf, out, 0, convert_varargs);
1366 -                           fputs(more, out);
1367 -                           break;
1368 -                         case 0:
1369 -                           /* The next line was blank or a comment: */
1370 -                           /* keep scanning for a non-comment. */
1371 -                           line += strlen(line);
1372 -                           goto f;
1373 -                         default:
1374 -                           /* buf isn't a function header, but */
1375 -                           /* more might be. */
1376 -                           fputs(buf, out);
1377 -                           strcpy(buf, more);
1378 -                           line = buf;
1379 -                           goto test;
1380 -                         }
1381 -                       break;
1382 -               case -1:                /* maybe the start of a function */
1383 -                       if ( line != buf + (bufsize - 1) ) /* overflow check */
1384 -                         continue;
1385 -                       /* falls through */
1386 -               default:                /* not a function */
1387 -wl:                    fputs(buf, out);
1388 -                       break;
1389 -                  }
1390 -               line = buf;
1391 -          }
1392 -       if ( line != buf )
1393 -         fputs(buf, out);
1394 -       free(buf);
1395 -       if ( output_name ) {
1396 -         output_error = ferror(out);
1397 -         output_error |= fclose(out);
1398 -       } else {                /* out == stdout */
1399 -         fflush(out);
1400 -         output_error = ferror(out);
1401 -       }
1402 -       if ( output_error ) {
1403 -         fprintf(stderr, "%s: error writing to %s\n", program_name,
1404 -                 (output_name ? output_name : "stdout"));
1405 -         exit(1);
1406 -       }
1407 -       if ( in != stdin )
1408 -         fclose(in);
1409 -       return 0;
1410 -}
1411 -
1412 -/* Skip over whitespace and comments, in either direction. */
1413 -char *
1414 -skipspace(p, dir)
1415 -    register char *p;
1416 -    register int dir;                  /* 1 for forward, -1 for backward */
1417 -{      for ( ; ; )
1418 -          {    while ( is_space(*p) )
1419 -                 p += dir;
1420 -               if ( !(*p == '/' && p[dir] == '*') )
1421 -                 break;
1422 -               p += dir;  p += dir;
1423 -               while ( !(*p == '*' && p[dir] == '/') )
1424 -                  {    if ( *p == 0 )
1425 -                         return p;     /* multi-line comment?? */
1426 -                       p += dir;
1427 -                  }
1428 -               p += dir;  p += dir;
1429 -          }
1430 -       return p;
1431 -}
1432 -
1433 -/* Scan over a quoted string, in either direction. */
1434 -char *
1435 -scanstring(p, dir)
1436 -    register char *p;
1437 -    register int dir;
1438 -{
1439 -    for (p += dir; ; p += dir)
1440 -       if (*p == '"' && p[-dir] != '\\')
1441 -           return p + dir;
1442 -}
1443 -
1444 -/*
1445 - * Write blanks over part of a string.
1446 - * Don't overwrite end-of-line characters.
1447 - */
1448 -int
1449 -writeblanks(start, end)
1450 -    char *start;
1451 -    char *end;
1452 -{      char *p;
1453 -       for ( p = start; p < end; p++ )
1454 -         if ( *p != '\r' && *p != '\n' )
1455 -           *p = ' ';
1456 -       return 0;
1457 -}
1458 -
1459 -/*
1460 - * Test whether the string in buf is a function definition.
1461 - * The string may contain and/or end with a newline.
1462 - * Return as follows:
1463 - *     0 - definitely not a function definition;
1464 - *     1 - definitely a function definition;
1465 - *     2 - definitely a function prototype (NOT USED);
1466 - *     -1 - may be the beginning of a function definition,
1467 - *             append another line and look again.
1468 - * The reason we don't attempt to convert function prototypes is that
1469 - * Ghostscript's declaration-generating macros look too much like
1470 - * prototypes, and confuse the algorithms.
1471 - */
1472 -int
1473 -test1(buf)
1474 -    char *buf;
1475 -{      register char *p = buf;
1476 -       char *bend;
1477 -       char *endfn;
1478 -       int contin;
1479 -
1480 -       if ( !isidfirstchar(*p) )
1481 -         return 0;             /* no name at left margin */
1482 -       bend = skipspace(buf + strlen(buf) - 1, -1);
1483 -       switch ( *bend )
1484 -          {
1485 -          case ';': contin = 0 /*2*/; break;
1486 -          case ')': contin = 1; break;
1487 -          case '{': return 0;          /* not a function */
1488 -          case '}': return 0;          /* not a function */
1489 -          default: contin = -1;
1490 -          }
1491 -       while ( isidchar(*p) )
1492 -         p++;
1493 -       endfn = p;
1494 -       p = skipspace(p, 1);
1495 -       if ( *p++ != '(' )
1496 -         return 0;             /* not a function */
1497 -       p = skipspace(p, 1);
1498 -       if ( *p == ')' )
1499 -         return 0;             /* no parameters */
1500 -       /* Check that the apparent function name isn't a keyword. */
1501 -       /* We only need to check for keywords that could be followed */
1502 -       /* by a left parenthesis (which, unfortunately, is most of them). */
1503 -          {    static char *words[] =
1504 -                  {    "asm", "auto", "case", "char", "const", "double",
1505 -                       "extern", "float", "for", "if", "int", "long",
1506 -                       "register", "return", "short", "signed", "sizeof",
1507 -                       "static", "switch", "typedef", "unsigned",
1508 -                       "void", "volatile", "while", 0
1509 -                  };
1510 -               char **key = words;
1511 -               char *kp;
1512 -               unsigned len = endfn - buf;
1513 -
1514 -               while ( (kp = *key) != 0 )
1515 -                  {    if ( strlen(kp) == len && !strncmp(kp, buf, len) )
1516 -                         return 0;     /* name is a keyword */
1517 -                       key++;
1518 -                  }
1519 -          }
1520 -          {
1521 -              char *id = p;
1522 -              int len;
1523 -              /*
1524 -               * Check for identifier1(identifier2) and not
1525 -               * identifier1(void), or identifier1(identifier2, xxxx).
1526 -               */
1527 -
1528 -              while ( isidchar(*p) )
1529 -                  p++;
1530 -              len = p - id;
1531 -              p = skipspace(p, 1);
1532 -              if (*p == ',' ||
1533 -                  (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
1534 -                  )
1535 -                  return 0;    /* not a function */
1536 -          }
1537 -       /*
1538 -        * If the last significant character was a ), we need to count
1539 -        * parentheses, because it might be part of a formal parameter
1540 -        * that is a procedure.
1541 -        */
1542 -       if (contin > 0) {
1543 -           int level = 0;
1544 -
1545 -           for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
1546 -               level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
1547 -           if (level > 0)
1548 -               contin = -1;
1549 -       }
1550 -       return contin;
1551 -}
1552 -
1553 -/* Convert a recognized function definition or header to K&R syntax. */
1554 -int
1555 -convert1(buf, out, header, convert_varargs)
1556 -    char *buf;
1557 -    FILE *out;
1558 -    int header;                        /* Boolean */
1559 -    int convert_varargs;       /* Boolean */
1560 -{      char *endfn;
1561 -       register char *p;
1562 -       /*
1563 -        * The breaks table contains pointers to the beginning and end
1564 -        * of each argument.
1565 -        */
1566 -       char **breaks;
1567 -       unsigned num_breaks = 2;        /* for testing */
1568 -       char **btop;
1569 -       char **bp;
1570 -       char **ap;
1571 -       char *vararg = 0;
1572 -
1573 -       /* Pre-ANSI implementations don't agree on whether strchr */
1574 -       /* is called strchr or index, so we open-code it here. */
1575 -       for ( endfn = buf; *(endfn++) != '('; )
1576 -         ;
1577 -top:   p = endfn;
1578 -       breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
1579 -       if ( breaks == NULL )
1580 -          {    /* Couldn't allocate break table, give up */
1581 -               fprintf(stderr, "Unable to allocate break table!\n");
1582 -               fputs(buf, out);
1583 -               return -1;
1584 -          }
1585 -       btop = breaks + num_breaks * 2 - 2;
1586 -       bp = breaks;
1587 -       /* Parse the argument list */
1588 -       do
1589 -          {    int level = 0;
1590 -               char *lp = NULL;
1591 -               char *rp = NULL;
1592 -               char *end = NULL;
1593 -
1594 -               if ( bp >= btop )
1595 -                  {    /* Filled up break table. */
1596 -                       /* Allocate a bigger one and start over. */
1597 -                       free((char *)breaks);
1598 -                       num_breaks <<= 1;
1599 -                       goto top;
1600 -                  }
1601 -               *bp++ = p;
1602 -               /* Find the end of the argument */
1603 -               for ( ; end == NULL; p++ )
1604 -                  {    switch(*p)
1605 -                          {
1606 -                          case ',':
1607 -                               if ( !level ) end = p;
1608 -                               break;
1609 -                          case '(':
1610 -                               if ( !level ) lp = p;
1611 -                               level++;
1612 -                               break;
1613 -                          case ')':
1614 -                               if ( --level < 0 ) end = p;
1615 -                               else rp = p;
1616 -                               break;
1617 -                          case '/':
1618 -                               if (p[1] == '*')
1619 -                                   p = skipspace(p, 1) - 1;
1620 -                               break;
1621 -                          case '"':
1622 -                              p = scanstring(p, 1) - 1;
1623 -                              break;
1624 -                          default:
1625 -                               ;
1626 -                          }
1627 -                  }
1628 -               /* Erase any embedded prototype parameters. */
1629 -               if ( lp && rp )
1630 -                 writeblanks(lp + 1, rp);
1631 -               p--;                    /* back up over terminator */
1632 -               /* Find the name being declared. */
1633 -               /* This is complicated because of procedure and */
1634 -               /* array modifiers. */
1635 -               for ( ; ; )
1636 -                  {    p = skipspace(p - 1, -1);
1637 -                       switch ( *p )
1638 -                          {
1639 -                          case ']':    /* skip array dimension(s) */
1640 -                          case ')':    /* skip procedure args OR name */
1641 -                          {    int level = 1;
1642 -                               while ( level )
1643 -                                switch ( *--p )
1644 -                                  {
1645 -                                  case ']': case ')':
1646 -                                      level++;
1647 -                                      break;
1648 -                                  case '[': case '(':
1649 -                                      level--;
1650 -                                      break;
1651 -                                  case '/':
1652 -                                      if (p > buf && p[-1] == '*')
1653 -                                          p = skipspace(p, -1) + 1;
1654 -                                      break;
1655 -                                  case '"':
1656 -                                      p = scanstring(p, -1) + 1;
1657 -                                      break;
1658 -                                  default: ;
1659 -                                  }
1660 -                          }
1661 -                               if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
1662 -                                  {    /* We found the name being declared */
1663 -                                       while ( !isidfirstchar(*p) )
1664 -                                         p = skipspace(p, 1) + 1;
1665 -                                       goto found;
1666 -                                  }
1667 -                               break;
1668 -                          default:
1669 -                               goto found;
1670 -                          }
1671 -                  }
1672 -found:         if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
1673 -                 {     if ( convert_varargs )
1674 -                         {     *bp++ = "va_alist";
1675 -                               vararg = p-2;
1676 -                         }
1677 -                       else
1678 -                         {     p++;
1679 -                               if ( bp == breaks + 1 ) /* sole argument */
1680 -                                 writeblanks(breaks[0], p);
1681 -                               else
1682 -                                 writeblanks(bp[-1] - 1, p);
1683 -                               bp--;
1684 -                         }
1685 -                  }
1686 -               else
1687 -                  {    while ( isidchar(*p) ) p--;
1688 -                       *bp++ = p+1;
1689 -                  }
1690 -               p = end;
1691 -          }
1692 -       while ( *p++ == ',' );
1693 -       *bp = p;
1694 -       /* Make a special check for 'void' arglist */
1695 -       if ( bp == breaks+2 )
1696 -          {    p = skipspace(breaks[0], 1);
1697 -               if ( !strncmp(p, "void", 4) )
1698 -                  {    p = skipspace(p+4, 1);
1699 -                       if ( p == breaks[2] - 1 )
1700 -                          {    bp = breaks;    /* yup, pretend arglist is empty */
1701 -                               writeblanks(breaks[0], p + 1);
1702 -                          }
1703 -                  }
1704 -          }
1705 -       /* Put out the function name and left parenthesis. */
1706 -       p = buf;
1707 -       while ( p != endfn ) putc(*p, out), p++;
1708 -       /* Put out the declaration. */
1709 -       if ( header )
1710 -         {     fputs(");", out);
1711 -               for ( p = breaks[0]; *p; p++ )
1712 -                 if ( *p == '\r' || *p == '\n' )
1713 -                   putc(*p, out);
1714 -         }
1715 -       else
1716 -         {     for ( ap = breaks+1; ap < bp; ap += 2 )
1717 -                 {     p = *ap;
1718 -                       while ( isidchar(*p) )
1719 -                         putc(*p, out), p++;
1720 -                       if ( ap < bp - 1 )
1721 -                         fputs(", ", out);
1722 -                 }
1723 -               fputs(")  ", out);
1724 -               /* Put out the argument declarations */
1725 -               for ( ap = breaks+2; ap <= bp; ap += 2 )
1726 -                 (*ap)[-1] = ';';
1727 -               if ( vararg != 0 )
1728 -                 {     *vararg = 0;
1729 -                       fputs(breaks[0], out);          /* any prior args */
1730 -                       fputs("va_dcl", out);           /* the final arg */
1731 -                       fputs(bp[0], out);
1732 -                 }
1733 -               else
1734 -                 fputs(breaks[0], out);
1735 -         }
1736 -       free((char *)breaks);
1737 -       return 0;
1738 -}
1739 diff -urNd -urNd patch-2.5.4/argmatch.c patch-2.5.9/argmatch.c
1740 --- patch-2.5.4/argmatch.c      1999-08-09 19:09:13.000000000 -0400
1741 +++ patch-2.5.9/argmatch.c      2003-03-10 02:31:50.000000000 -0500
1742 @@ -1,5 +1,7 @@
1743  /* argmatch.c -- find a match for a string in an array
1744 -   Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
1745 +
1746 +   Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003 Free Software
1747 +   Foundation, Inc.
1748  
1749     This program is free software; you can redistribute it and/or modify
1750     it under the terms of the GNU General Public License as published by
1751 @@ -18,26 +20,24 @@
1752  /* Written by David MacKenzie <djm@ai.mit.edu>
1753     Modified by Akim Demaille <demaille@inf.enst.fr> */
1754  
1755 +#if HAVE_CONFIG_H
1756 +# include <config.h>
1757 +#endif
1758 +
1759 +/* Specification.  */
1760  #include "argmatch.h"
1761  
1762  #include <stdio.h>
1763 -#ifdef STDC_HEADERS
1764 -# include <string.h>
1765 -#endif
1766 -
1767 -#if HAVE_LOCALE_H
1768 -# include <locale.h>
1769 -#endif
1770 +#include <stdlib.h>
1771 +#include <string.h>
1772  
1773 -#if ENABLE_NLS
1774 -# include <libintl.h>
1775 -# define _(Text) gettext (Text)
1776 -#else
1777 -# define _(Text) Text
1778 -#endif
1779 +#include "gettext.h"
1780 +#define _(msgid) gettext (msgid)
1781  
1782  #include "error.h"
1783  #include "quotearg.h"
1784 +#include "quote.h"
1785 +#include "unlocked-io.h"
1786  
1787  /* When reporting an invalid argument, show nonprinting characters
1788     by using the quoting style ARGMATCH_QUOTING_STYLE.  Do not use
1789 @@ -46,11 +46,7 @@
1790  # define ARGMATCH_QUOTING_STYLE locale_quoting_style
1791  #endif
1792  
1793 -/* The following test is to work around the gross typo in
1794 -   systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE
1795 -   is defined to 0, not 1.  */
1796 -#if !EXIT_FAILURE
1797 -# undef EXIT_FAILURE
1798 +#ifndef EXIT_FAILURE
1799  # define EXIT_FAILURE 1
1800  #endif
1801  
1802 @@ -78,7 +74,6 @@
1803     null-terminated array ARGLIST, return the index in ARGLIST
1804     of the matched element, else -1 if it does not match any element
1805     or -2 if it is ambiguous (is a prefix of more than one element).
1806 -   If SENSITIVE, comparison is case sensitive.
1807  
1808     If VALLIST is none null, use it to resolve ambiguities limited to
1809     synonyms, i.e., for
1810 @@ -86,10 +81,9 @@
1811       "no", "nope" -> 1
1812     "y" is a valid argument, for `0', and "n" for `1'.  */
1813  
1814 -static int
1815 -__argmatch_internal (const char *arg, const char *const *arglist,
1816 -                    const char *vallist, size_t valsize,
1817 -                    int case_sensitive)
1818 +int
1819 +argmatch (const char *arg, const char *const *arglist,
1820 +         const char *vallist, size_t valsize)
1821  {
1822    int i;                       /* Temporary index in ARGLIST.  */
1823    size_t arglen;               /* Length of ARG.  */
1824 @@ -101,9 +95,7 @@
1825    /* Test all elements for either exact match or abbreviated matches.  */
1826    for (i = 0; arglist[i]; i++)
1827      {
1828 -      if (case_sensitive
1829 -         ? !strncmp (arglist[i], arg, arglen)
1830 -         : !strncasecmp (arglist[i], arg, arglen))
1831 +      if (!strncmp (arglist[i], arg, arglen))
1832         {
1833           if (strlen (arglist[i]) == arglen)
1834             /* Exact match found.  */
1835 @@ -131,22 +123,6 @@
1836      return matchind;
1837  }
1838  
1839 -/* argmatch - case sensitive version */
1840 -int
1841 -argmatch (const char *arg, const char *const *arglist,
1842 -         const char *vallist, size_t valsize)
1843 -{
1844 -  return __argmatch_internal (arg, arglist, vallist, valsize, 1);
1845 -}
1846 -
1847 -/* argcasematch - case insensitive version */
1848 -int
1849 -argcasematch (const char *arg, const char *const *arglist,
1850 -             const char *vallist, size_t valsize)
1851 -{
1852 -  return __argmatch_internal (arg, arglist, vallist, valsize, 0);
1853 -}
1854 -
1855  /* Error reporting for argmatch.
1856     CONTEXT is a description of the type of entity that was being matched.
1857     VALUE is the invalid value that was given.
1858 @@ -156,10 +132,11 @@
1859  argmatch_invalid (const char *context, const char *value, int problem)
1860  {
1861    char const *format = (problem == -1
1862 -                       ? _("invalid argument %s for `%s'")
1863 -                       : _("ambiguous argument %s for `%s'"));
1864 +                       ? _("invalid argument %s for %s")
1865 +                       : _("ambiguous argument %s for %s"));
1866  
1867 -  error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
1868 +  error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
1869 +        quote_n (1, context));
1870  }
1871  
1872  /* List the valid arguments for argmatch.
1873 @@ -200,12 +177,9 @@
1874  __xargmatch_internal (const char *context,
1875                       const char *arg, const char *const *arglist,
1876                       const char *vallist, size_t valsize,
1877 -                     int case_sensitive,
1878                       argmatch_exit_fn exit_fn)
1879  {
1880 -  int res = __argmatch_internal (arg, arglist,
1881 -                                vallist, valsize,
1882 -                                case_sensitive);
1883 +  int res = argmatch (arg, arglist, vallist, valsize);
1884    if (res >= 0)
1885      /* Success. */
1886      return res;
1887 @@ -291,12 +265,12 @@
1888      }
1889  
1890    if ((cp = getenv ("VERSION_CONTROL")))
1891 -    backup_type = XARGCASEMATCH ("$VERSION_CONTROL", cp,
1892 -                                backup_args, backup_vals);
1893 +    backup_type = XARGMATCH ("$VERSION_CONTROL", cp,
1894 +                            backup_args, backup_vals);
1895  
1896    if (argc == 2)
1897 -    backup_type = XARGCASEMATCH (program_name, argv[1],
1898 -                                backup_args, backup_vals);
1899 +    backup_type = XARGMATCH (program_name, argv[1],
1900 +                            backup_args, backup_vals);
1901  
1902    printf ("The version control is `%s'\n",
1903           ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
1904 diff -urNd -urNd patch-2.5.4/argmatch.h patch-2.5.9/argmatch.h
1905 --- patch-2.5.4/argmatch.h      1999-01-25 09:57:22.000000000 -0500
1906 +++ patch-2.5.9/argmatch.h      2002-11-21 15:15:39.000000000 -0500
1907 @@ -1,5 +1,5 @@
1908  /* argmatch.h -- definitions and prototypes for argmatch.c
1909 -   Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
1910 +   Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
1911  
1912     This program is free software; you can redistribute it and/or modify
1913     it under the terms of the GNU General Public License as published by
1914 @@ -21,109 +21,89 @@
1915  #ifndef ARGMATCH_H_
1916  # define ARGMATCH_H_ 1
1917  
1918 -# if HAVE_CONFIG_H
1919 -#  include <config.h>
1920 -# endif
1921 +# include <stddef.h>
1922  
1923 -# include <sys/types.h>
1924 +# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
1925  
1926 -# ifndef PARAMS
1927 -#  if PROTOTYPES || (defined (__STDC__) && __STDC__)
1928 -#   define PARAMS(args) args
1929 -#  else
1930 -#   define PARAMS(args) ()
1931 -#  endif  /* GCC.  */
1932 -# endif  /* Not PARAMS.  */
1933 +# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
1934 +  (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
1935  
1936  /* Assert there are as many real arguments as there are values
1937 -   (argument list ends with a NULL guard).  There is no execution
1938 -   cost, since it will be statically evalauted to `assert (0)' or
1939 -   `assert (1)'.  Unfortunately there is no -Wassert-0. */
1940 +   (argument list ends with a NULL guard).  ARGMATCH_VERIFY is
1941 +   preferred, since it is guaranteed to be checked at compile-time.
1942 +   ARGMATCH_ASSERT is for backward compatibility only.  */
1943  
1944 -# undef ARRAY_CARDINALITY
1945 -# define ARRAY_CARDINALITY(Array) (sizeof ((Array)) / sizeof (*(Array)))
1946 +# define ARGMATCH_VERIFY(Arglist, Vallist)                               \
1947 +  struct argmatch_verify                                                 \
1948 +  {                                                                      \
1949 +    char argmatch_verify[ARGMATCH_CONSTRAINT(Arglist, Vallist) ? 1 : -1]; \
1950 +  }
1951  
1952 -# define ARGMATCH_ASSERT(Arglist, Vallist)      \
1953 -  assert (ARRAY_CARDINALITY ((Arglist)) == ARRAY_CARDINALITY ((Vallist)) + 1)
1954 +# define ARGMATCH_ASSERT(Arglist, Vallist) \
1955 +  assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
1956  
1957  /* Return the index of the element of ARGLIST (NULL terminated) that
1958     matches with ARG.  If VALLIST is not NULL, then use it to resolve
1959     false ambiguities (i.e., different matches of ARG but corresponding
1960     to the same values in VALLIST).  */
1961  
1962 -int argmatch
1963 -  PARAMS ((const char *arg, const char *const *arglist,
1964 -          const char *vallist, size_t valsize));
1965 -int argcasematch
1966 -  PARAMS ((const char *arg, const char *const *arglist,
1967 -          const char *vallist, size_t valsize));
1968 +int argmatch (char const *arg, char const *const *arglist,
1969 +             char const *vallist, size_t valsize);
1970  
1971  # define ARGMATCH(Arg, Arglist, Vallist) \
1972 -  argmatch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
1973 -
1974 -# define ARGCASEMATCH(Arg, Arglist, Vallist) \
1975 -  argcasematch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
1976 +  argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
1977  
1978  /* xargmatch calls this function when it fails.  This function should not
1979     return.  By default, this is a function that calls ARGMATCH_DIE which
1980     in turn defaults to `exit (EXIT_FAILURE)'.  */
1981 -typedef void (*argmatch_exit_fn) PARAMS ((void));
1982 +typedef void (*argmatch_exit_fn) (void);
1983  extern argmatch_exit_fn argmatch_die;
1984  
1985  /* Report on stderr why argmatch failed.  Report correct values. */
1986  
1987 -void argmatch_invalid
1988 -  PARAMS ((const char *context, const char *value, int problem));
1989 +void argmatch_invalid (char const *context, char const *value, int problem);
1990  
1991  /* Left for compatibility with the old name invalid_arg */
1992  
1993  # define invalid_arg(Context, Value, Problem) \
1994 -  argmatch_invalid ((Context), (Value), (Problem))
1995 +  argmatch_invalid (Context, Value, Problem)
1996  
1997  
1998  
1999  /* Report on stderr the list of possible arguments.  */
2000  
2001 -void argmatch_valid
2002 -  PARAMS ((const char *const *arglist,
2003 -          const char *vallist, size_t valsize));
2004 +void argmatch_valid (char const *const *arglist,
2005 +                    char const *vallist, size_t valsize);
2006  
2007  # define ARGMATCH_VALID(Arglist, Vallist) \
2008 -  argmatch_valid (Arglist, (const char *) Vallist, sizeof (*(Vallist)))
2009 +  argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
2010  
2011  
2012  
2013  /* Same as argmatch, but upon failure, reports a explanation on the
2014     failure, and exits using the function EXIT_FN. */
2015  
2016 -int __xargmatch_internal
2017 -  PARAMS ((const char *context,
2018 -          const char *arg, const char *const *arglist,
2019 -          const char *vallist, size_t valsize,
2020 -          int case_sensitive, argmatch_exit_fn exit_fn));
2021 +int __xargmatch_internal (char const *context,
2022 +                         char const *arg, char const *const *arglist,
2023 +                         char const *vallist, size_t valsize,
2024 +                         argmatch_exit_fn exit_fn);
2025  
2026  /* Programmer friendly interface to __xargmatch_internal. */
2027  
2028 -# define XARGMATCH(Context, Arg, Arglist, Vallist)                     \
2029 -  (Vallist [__xargmatch_internal ((Context), (Arg), (Arglist), \
2030 -                                  (const char *) (Vallist),    \
2031 -                                 sizeof (*(Vallist)),          \
2032 -                                 1, argmatch_die)])
2033 -
2034 -# define XARGCASEMATCH(Context, Arg, Arglist, Vallist)         \
2035 -  (Vallist [__xargmatch_internal ((Context), (Arg), (Arglist), \
2036 -                                  (const char *) (Vallist),    \
2037 -                                 sizeof (*(Vallist)),          \
2038 -                                 0, argmatch_die)])
2039 +# define XARGMATCH(Context, Arg, Arglist, Vallist)             \
2040 +  ((Vallist) [__xargmatch_internal (Context, Arg, Arglist,     \
2041 +                                   (char const *) (Vallist),   \
2042 +                                   sizeof *(Vallist),          \
2043 +                                   argmatch_die)])
2044  
2045  /* Convert a value into a corresponding argument. */
2046  
2047 -const char *argmatch_to_argument
2048 -  PARAMS ((char const *value, const char *const *arglist,
2049 -          const char *vallist, size_t valsize));
2050 +char const *argmatch_to_argument (char const *value,
2051 +                                 char const *const *arglist,
2052 +                                 char const *vallist, size_t valsize);
2053  
2054  # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist)                 \
2055 -  argmatch_to_argument ((char const *) &(Value), (Arglist),            \
2056 -                       (const char *) (Vallist), sizeof (*(Vallist)))
2057 +  argmatch_to_argument (Value, Arglist,                                        \
2058 +                       (char const *) (Vallist), sizeof *(Vallist))
2059  
2060  #endif /* ARGMATCH_H_ */
2061 diff -urNd -urNd patch-2.5.4/backupfile.c patch-2.5.9/backupfile.c
2062 --- patch-2.5.4/backupfile.c    1999-01-18 12:02:28.000000000 -0500
2063 +++ patch-2.5.9/backupfile.c    2002-01-16 17:44:24.000000000 -0500
2064 @@ -1,5 +1,6 @@
2065  /* backupfile.c -- make Emacs style backup file names
2066 -   Copyright (C) 1990-1997, 1998, 1999 Free Software Foundation, Inc.
2067 +   Copyright (C) 1990,91,92,93,94,95,96,97,98,99,2000, 2001, 2002 Free Software
2068 +   Foundation, Inc.
2069  
2070     This program is free software; you can redistribute it and/or modify
2071     it under the terms of the GNU General Public License as published by
2072 @@ -23,9 +24,6 @@
2073  # include <config.h>
2074  #endif
2075  
2076 -#include <argmatch.h>
2077 -#include <backupfile.h>
2078 -
2079  #include <stdio.h>
2080  #include <sys/types.h>
2081  #if HAVE_STRING_H
2082 @@ -58,17 +56,23 @@
2083  # define CLOSEDIR(d) closedir (d)
2084  #endif
2085  
2086 -#if STDC_HEADERS
2087 +#if HAVE_STDLIB_H
2088  # include <stdlib.h>
2089 -#else
2090 -char *malloc ();
2091  #endif
2092  
2093  #ifndef HAVE_DECL_GETENV
2094 +"this configure-time declaration test was not run"
2095 +#endif
2096 +#if !HAVE_DECL_GETENV
2097  char *getenv ();
2098  #endif
2099  
2100 -char *base_name PARAMS ((char const *));
2101 +#ifndef HAVE_DECL_MALLOC
2102 +"this configure-time declaration test was not run"
2103 +#endif
2104 +#if !HAVE_DECL_MALLOC
2105 +char *malloc ();
2106 +#endif
2107  
2108  #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
2109  # define HAVE_DIR 1
2110 @@ -91,10 +95,9 @@
2111     - Its arg may be any int or unsigned int; it need not be an unsigned char.
2112     - It's guaranteed to evaluate its argument exactly once.
2113     - It's typically faster.
2114 -   Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
2115 -   only '0' through '9' are digits.  Prefer ISDIGIT to isdigit unless
2116 -   it's important to use the locale's definition of `digit' even when the
2117 -   host does not conform to Posix.  */
2118 +   POSIX says that only '0' through '9' are digits.  Prefer ISDIGIT to
2119 +   ISDIGIT_LOCALE unless it's important to use the locale's definition
2120 +   of `digit' even when the host does not conform to POSIX.  */
2121  #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
2122  
2123  #if D_INO_IN_DIRENT
2124 @@ -103,6 +106,10 @@
2125  # define REAL_DIR_ENTRY(dp) 1
2126  #endif
2127  
2128 +#include "argmatch.h"
2129 +#include "backupfile.h"
2130 +#include "dirname.h"
2131 +
2132  /* The extension added to file names to produce a simple (as opposed
2133     to numbered) backup file name. */
2134  const char *simple_backup_suffix = "~";
2135 @@ -129,29 +136,31 @@
2136    if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
2137      backup_suffix_size_max = numbered_suffix_size_max;
2138  
2139 -  s = malloc (file_len + backup_suffix_size_max + numbered_suffix_size_max);
2140 +  s = malloc (file_len + 1
2141 +             + backup_suffix_size_max + numbered_suffix_size_max);
2142    if (s)
2143      {
2144 -      strcpy (s, file);
2145 -
2146  #if HAVE_DIR
2147        if (backup_type != simple)
2148         {
2149           int highest_backup;
2150 -         size_t dir_len = base_name (s) - s;
2151 +         size_t dirlen = dir_len (file);
2152  
2153 -         strcpy (s + dir_len, ".");
2154 -         highest_backup = max_backup_version (file + dir_len, s);
2155 +         memcpy (s, file, dirlen);
2156 +         if (dirlen == FILESYSTEM_PREFIX_LEN (file))
2157 +           s[dirlen++] = '.';
2158 +         s[dirlen] = '\0';
2159 +         highest_backup = max_backup_version (base_name (file), s);
2160           if (! (backup_type == numbered_existing && highest_backup == 0))
2161             {
2162               char *numbered_suffix = s + (file_len + backup_suffix_size_max);
2163               sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
2164               suffix = numbered_suffix;
2165             }
2166 -         strcpy (s, file);
2167         }
2168  #endif /* HAVE_DIR */
2169  
2170 +      strcpy (s, file);
2171        addext (s, suffix, '~');
2172      }
2173    return s;
2174 @@ -178,7 +187,7 @@
2175      return 0;
2176  
2177    highest_version = 0;
2178 -  file_name_length = strlen (file);
2179 +  file_name_length = base_len (file);
2180  
2181    while ((dp = readdir (dirp)) != 0)
2182      {
2183 diff -urNd -urNd patch-2.5.4/basename.c patch-2.5.9/basename.c
2184 --- patch-2.5.4/basename.c      1999-03-18 11:56:34.000000000 -0500
2185 +++ patch-2.5.9/basename.c      2001-05-12 11:39:45.000000000 -0400
2186 @@ -1,5 +1,5 @@
2187  /* basename.c -- return the last element in a path
2188 -   Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
2189 +   Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
2190  
2191     This program is free software; you can redistribute it and/or modify
2192     it under the terms of the GNU General Public License as published by
2193 @@ -19,37 +19,61 @@
2194  # include <config.h>
2195  #endif
2196  
2197 -#ifndef FILESYSTEM_PREFIX_LEN
2198 -# define FILESYSTEM_PREFIX_LEN(Filename) 0
2199 -#endif
2200 -
2201 -#ifndef ISSLASH
2202 -# define ISSLASH(C) ((C) == '/')
2203 +#if STDC_HEADERS || HAVE_STRING_H
2204 +# include <string.h>
2205  #endif
2206 +#include "dirname.h"
2207  
2208  /* In general, we can't use the builtin `basename' function if available,
2209     since it has different meanings in different environments.
2210     In some environments the builtin `basename' modifies its argument.
2211 -   If NAME is all slashes, be sure to return `/'.  */
2212 +
2213 +   Return the address of the last file name component of NAME.  If
2214 +   NAME has no file name components because it is all slashes, return
2215 +   NAME if it is empty, the address of its last slash otherwise.  */
2216  
2217  char *
2218  base_name (char const *name)
2219  {
2220 -  char const *base = name += FILESYSTEM_PREFIX_LEN (name);
2221 -  int all_slashes = 1;
2222 +  char const *base = name + FILESYSTEM_PREFIX_LEN (name);
2223    char const *p;
2224  
2225 -  for (p = name; *p; p++)
2226 +  for (p = base; *p; p++)
2227      {
2228        if (ISSLASH (*p))
2229 -       base = p + 1;
2230 -      else
2231 -       all_slashes = 0;
2232 -    }
2233 +       {
2234 +         /* Treat multiple adjacent slashes like a single slash.  */
2235 +         do p++;
2236 +         while (ISSLASH (*p));
2237  
2238 -  /* If NAME is all slashes, arrange to return `/'.  */
2239 -  if (*base == '\0' && ISSLASH (*name) && all_slashes)
2240 -    --base;
2241 +         /* If the file name ends in slash, use the trailing slash as
2242 +            the basename if no non-slashes have been found.  */
2243 +         if (! *p)
2244 +           {
2245 +             if (ISSLASH (*base))
2246 +               base = p - 1;
2247 +             break;
2248 +           }
2249 +
2250 +         /* *P is a non-slash preceded by a slash.  */
2251 +         base = p;
2252 +       }
2253 +    }
2254  
2255    return (char *) base;
2256  }
2257 +
2258 +/* Return the length of of the basename NAME.  Typically NAME is the
2259 +   value returned by base_name.  Act like strlen (NAME), except omit
2260 +   redundant trailing slashes.  */
2261 +
2262 +size_t
2263 +base_len (char const *name)
2264 +{
2265 +  size_t len;
2266 +
2267 +  for (len = strlen (name);  1 < len && ISSLASH (name[len - 1]);  len--)
2268 +    continue;
2269 +
2270 +  return len;
2271 +}
2272 diff -urNd -urNd patch-2.5.4/basename.h patch-2.5.9/basename.h
2273 --- patch-2.5.4/basename.h      1999-07-07 14:06:40.000000000 -0400
2274 +++ patch-2.5.9/basename.h      1969-12-31 19:00:00.000000000 -0500
2275 @@ -1,9 +0,0 @@
2276 -#ifndef PARAMS
2277 -# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
2278 -#  define PARAMS(Args) Args
2279 -# else
2280 -#  define PARAMS(Args) ()
2281 -# endif
2282 -#endif
2283 -
2284 -char *base_name PARAMS ((char const *name));
2285 diff -urNd -urNd patch-2.5.4/ChangeLog patch-2.5.9/ChangeLog
2286 --- patch-2.5.4/ChangeLog       1999-08-30 02:38:49.000000000 -0400
2287 +++ patch-2.5.9/ChangeLog       2003-05-20 12:16:31.000000000 -0400
2288 @@ -1,3 +1,359 @@
2289 +2003-05-20  Paul Eggert  <eggert@twinsun.com>
2290 +
2291 +       * NEWS, configure.ac (AC_INIT): Version 2.5.9 released.
2292 +
2293 +       * Makefile.in (HDRS): Add gettext.h.
2294 +
2295 +       Use bool, not int, for booleans.
2296 +
2297 +       * pch.c (pch_says_nonexistent): Returns int, not bool.
2298 +
2299 +       * configure.ac: Add AM_STDBOOL_H.
2300 +
2301 +       * Makefile.in (MISC): Add stdbool.h.in.
2302 +       (stdbool.h): New rule.
2303 +       (ACINCLUDE_INPUTS): Add stdbool.m4.
2304 +       (mostlyclean): Remove stdbool.h.
2305 +       (COMMON): New macro; use it instead of common.h for dependencies.
2306 +
2307 +       * common.h: Include <stdbool.h>.
2308 +       Remove TRUE, FALSE, bool.  All uses changed to standard names.
2309 +
2310 +       * common.h (reverse, set_time, set_utc):
2311 +       Use bool, not int, for booleans.
2312 +       * pch.c (p_strip_trailing_cr, p_pass_comments_through,
2313 +       prefix_components, pget_line, re_patch,
2314 +       there_is_another_patch, intuit_diff_type, scan_linenum,
2315 +       another_hunk, pget_line, pch_timestamp): Likewise.
2316 +       * inp.h (ifetch): Likewise.
2317 +       * util.c (move_file, version_controller, version_get, ok_to_reverse,
2318 +       set_signals): Likewise.
2319 +       * inp.c (report_revision, get_input_file, plan_a, plan_b, ifetch):
2320 +       Likewise.
2321 +       * util.h (ok_to_reverse, version_controller, version_get,
2322 +       move_file, set_signals): Likewise.
2323 +       * pch.h (another_hunk, pch_says_nonexistent, pch_timestamp):
2324 +       Likewise.
2325 +       * patch.c (struct outstate, numeric_string, make_backups,
2326 +       backup_if_mismatch, remove_empty_files,
2327 +       reverse_flag_specified, main, reinitialize_almost_everything,
2328 +       get_some_switches, apply_hunk, init_output, copy_till):
2329 +       Likewise.
2330 +
2331 +2003-05-18  Paul Eggert  <eggert@twinsun.com>
2332 +
2333 +       * pch.c (p_pass_comments_through): New var.
2334 +       (pget_line): Accept new arg for pass_comments_through.
2335 +       All callers changed.
2336 +       (there_is_another_patch): Do not suggest -p for ed diffs.
2337 +       (intuit_diff_type): Check ed command for correct syntax.
2338 +       Do not set p_strip_trailing_cr merely because a -p line contains a CR.
2339 +       (get_ed_command_letter): New function.
2340 +       (do_ed_script): Use it.  Do not treat '#' data lines as comments in ed
2341 +       scripts.
2342 +
2343 +       * util.c (move_file):
2344 +       Don't assume that when 'rename(A,B)' succeeds then A no
2345 +       longer exists.  This is not true of POSIX 1003.1-2001 rename when A
2346 +       and B are links to the same file.
2347 +       (fetchname): Fix test for file names with internal spaces.
2348 +
2349 +       * version.c: Don't include patchlevel.h.
2350 +       (version): Use PACKAGE_NAME and PACKAGE_VERSION instead of obsolete
2351 +       PROGRAM_NAME and PATCH_VERSION.
2352 +       (copyright_string): Bump to 2003.
2353 +
2354 +       * common.h (FILESYSTEM_PREFIX_LEN, ISSLASH):
2355 +       Remove; now done by 'configure'.
2356 +       (PROGRAM_NAME): Remove; now done by 'configure' as PACKAGE_NAME.
2357 +
2358 +       * patch.c: Do not include <exitfail.h>.
2359 +       (main): Set xalloc_exit_failure, not exit_failure.
2360 +       Add "&& !skip_rest_of_patch" when deciding to continue ed scripts.
2361 +       (option_help): Use PACKAGE_BUGREPORT rather than hardcoding.
2362 +
2363 +       * configure.ac (AC_PREREQ): Bump to 2.57.
2364 +       (AC_GNU_SOURCE): Add, early on.
2365 +       (gl_BACKUPFILE, gl_DIRNAME, gl_ERROR, gl_FUNC_MEMCHR, gl_FUNC_RMDIR,
2366 +       gl_GETOPT, gl_PREREQ_XMALLOC, gl_QUOTE, gl_QUOTEARG): Add.
2367 +       (jm_PREREQ_ADDEXT): Add, with definition.
2368 +       (jm_PREREQ_DIRNAME, jm_PREREQ_ERROR, jm_PREREQ_MEMCHR,
2369 +       jm_PREREQ_QUOTEARG): Remove.
2370 +       (AC_REPLACE_FUNCS): Remove memchr, rename, rmdir).
2371 +       (jm_FUNC_GLIBC_UNLOCKED_IO, jm_AC_DOS): Add.
2372 +       (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Do not call directly.
2373 +       (AC_OUTPUT): Use new style, with AC_CONFIG_FILES.
2374 +
2375 +       Update to current CVS gnulib.
2376 +
2377 +       * exitfail.c, exitfail.h, patchlevel.h, rename.c, m4/c-bs-a.m4,
2378 +       m4/jm-glibc-io.m4, m4/prereq.m4: Remove.
2379 +       * m4/backupfile.m4, m4/dirname.m4, m4/dos.m4, m4/getopt.m4,
2380 +       m4/memchr.m4, m4/onceonly.m4, m4/quote.m4, m4/quotearg.m4,
2381 +       m4/rmdir.m4, m4/unlocked-io.m4, m4/xalloc.m4: New files.
2382 +       * Makefile.in (LIBSRCS): Move error.c here from SRCS.
2383 +       Remove rename.c.
2384 +       (OBJS): Remove error.$(OBJEXT).
2385 +       (HDRS): Remove exitfail.h, patchlevel.h.
2386 +       (ACINCLUDE_INPUTS): Remove c-bs-a.m4, jm-glibc-io.m4, prereq.m4.
2387 +       Add backupfile.m4, dirname.m4, dos.m4, getopt.m4, memchr.m4,
2388 +       onceonly.m4, quote.m4, quotearg.m4, rmdir.m4, unlocked-io.m4,
2389 +       xalloc.m4.
2390 +       (patchlevel.h): Remove.  All uses removed.
2391 +       (argmatch.$(OBJEXT), error.$(OBJEXT), quotesys.$(OBJEXT)),
2392 +       xmalloc.$(OBJEXT)): Depend on gettext.h.
2393 +       (dirname.$(OBJEXT), quote.$(OBJEXT), strncasecmp.$(OBJEXT)): New rules.
2394 +       (patch.$(OBJEXT), xmalloc.$(OBJEXT)): Remove exitfail.h.
2395 +       (rename.$(OBJEXT)): Remove.
2396 +       (version.$(OBJEXT)): Remove util.h.
2397 +       (xmalloc.$(OBJEXT)): Add error.h.
2398 +
2399 +2002-11-23  Paul Eggert  <eggert@twinsun.com>
2400 +
2401 +       * patch.c (main): Don't check for zero-sized file after 'ed'
2402 +       when skipping patch.  From Michael Fedrowitz.
2403 +
2404 +2002-06-03  Paul Eggert  <eggert@twinsun.com>
2405 +
2406 +       * configure.ac (AC_OUTPUT): Use new form, with AC_CONFIG_FILES,
2407 +       instead of obsolescent form.  Patch from Art Haas.
2408 +
2409 +       * pch.c (intuit_diff_type): Do not warn about trailing white space
2410 +       after Prereq: word.  Bug reported by Mike Castle.
2411 +
2412 +2002-06-02  Paul Eggert  <eggert@twinsun.com>
2413 +
2414 +       * NEWS, configure.ac (AC_INIT): Version 2.5.8 released.
2415 +
2416 +       * README: POSIX.2 -> POSIX.
2417 +       * inp.c (report_revision): Don't modify 'revision', since
2418 +       it gets freed later.  Bug reported by Mike Castle.
2419 +
2420 +2002-05-30  Paul Eggert  <eggert@twinsun.com>
2421 +
2422 +       * NEWS, configure.ac (AC_INIT): Version 2.5.7 released.
2423 +
2424 +       * Makefile.in (MISC): Remove README-alpha.
2425 +       (patchlevel.h): Depend on configure, not configure.ac.
2426 +
2427 +       * INSTALL: Upgrade to Autoconf 2.53 version.
2428 +
2429 +2002-05-28  Paul Eggert  <eggert@twinsun.com>
2430 +
2431 +       * patch.c (end_defined, apply_hunk): Output #endif without
2432 +       the comment, as POSIX 1003.1-2001 requires.
2433 +
2434 +       * pch.c (there_is_another_patch): Flush stderr after perror.
2435 +
2436 +       * NEWS, configure.ac (AC_INIT): Version 2.5.6 released.
2437 +
2438 +       * strcasecmp.c, strncasecmp.c: New files, taken from fileutils.
2439 +       * config.guess, config.sub: Remove.
2440 +       * Makefile.in (LIBSRCS): Add strcasecmp.c, strncasecmp.c.
2441 +       (MISC): Remove config.guess, config.sub.
2442 +
2443 +       The code already assumes C89 or better, so remove K&R stuff.
2444 +       * common.h (volatile): Remove.
2445 +       (GENERIC_OBJECT): Remove; all uses changed to 'void'.
2446 +       (PARAMS): Remove; all uses changed to prototypes.
2447 +       * configure.ac (AC_PROG_CC_STDC): Add.
2448 +       * util.c (vararg_start): Remove.  All uses changed to va_start.
2449 +       Always include <stdarg.h>.
2450 +       
2451 +       * configure.ac (AC_CANONICAL_HOST): Remove.
2452 +       (AC_REPLACE_FUNCS): Add strncasecmp.
2453 +       (AC_CHECK_DECLS): Add mktemp.
2454 +       
2455 +       * patch.c (main): Remove useless prototype decl.
2456 +       (mktemp): Don't declare if HAVE_DECL_MKTEMP || defined mktemp.
2457 +       (make_temp): Now accepts char, not int.
2458 +       
2459 +2002-05-26  Paul Eggert  <eggert@twinsun.com>
2460 +
2461 +       * patch.c (not_defined): Prepend newline.  All uses changed.
2462 +       (apply_hunk): Fix bug: -D was outputting #ifdef when it should
2463 +       have been outputting #ifndef.  Bug report and partial fix by
2464 +       Jason Short.
2465 +
2466 +       * pch.c (intuit_diff_type): When reading an ed diff, don't use
2467 +       indent and trailing-CR-ness of "." line; instead, use that of the
2468 +       command.  Bug reported by Anthony Towns; partial fix by Michael
2469 +       Fedrowitz.
2470 +       (intuit_diff_type): If the index line exists, don't report a
2471 +       missing header.  Fix by Chip Salzenberg.
2472 +
2473 +2002-05-26  Alessandro Rubini  <rubini@gnu.org>
2474 +
2475 +       * patch.c (locate_hunk): Fixed updating of last_offset.
2476 +
2477 +2002-05-25  Paul Eggert  <eggert@twinsun.com>
2478 +
2479 +       * NEWS, README: Diffutils doc is up to date now.
2480 +       Bug reporting address is now <bug-patch@gnu.org>.
2481 +       * README: Describe '--disable-largefile'.
2482 +
2483 +       * NEWS-alpha, dirname.c, dirname.h, exitfail.c, exitfail.h,
2484 +       quote.c, quote.h, unlocked-io.h: New files, taken from diffutils
2485 +       and fileutils.
2486 +
2487 +       * argmatch.c: [STDC_HEADERS]: Include stdlib.h, for 'exit'.
2488 +
2489 +       * addext.c, argmatch.c, argmatch.h, backupfile.c, basename.c:
2490 +       Update from diffutils and fileutils.
2491 +
2492 +       * ansi2knr.1, ansi2knr.c: Remove.
2493 +
2494 +       * common.h: HAVE_SETMODE && O_BINARY -> HAVE_SETMODE_DOS.
2495 +       * patch.c (usage): Likewise.
2496 +       * pch.c (open_patch_file): Likewise.
2497 +
2498 +       * configure.ac: Renamed from configure.in.  Add copyright notice.
2499 +       (AC_PREREQ): Bump to 2.53.
2500 +       (AC_INIT): Use 2.5x style.
2501 +       (AC_CONFIG_SRCDIR): Add.
2502 +       (PACKAGE, VERSION): Remove.
2503 +       (AC_C_PROTOTYPES): Use this instead of AM_C_PROTOTYPES.
2504 +       (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use this instead of jm_STRUCT_UTIMBUF.
2505 +       (jm_PREREQ_ADDEXT, jm_PREREQ_DIRNAME, jm_PREREQ_ERROR,
2506 +       jm_PREREQ_MEMCHR, jm_PREREQ_QUOTEARG): Add.
2507 +       (AC_CHECK_DECLS): Add free, getenv, malloc.
2508 +       (AC_CHECK_FUNCS): Remove setmode.
2509 +       (AC_FUNC_SETMODE_DOS): Add.
2510 +       (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use this instead of
2511 +       jm_STRUCT_DIRENT_D_INO.
2512 +
2513 +       * Makefile.in (OBJEXT): New var.
2514 +       (PACKAGE_NAME): Renamed from PACKAGE.  All uses changed.
2515 +       (PACKAGE_VERSION): Renamed from VERSION.  All uses changed.
2516 +       (U): Remove.  All uses of "$U.o" changed to ".$(OBJEXT)".
2517 +       (LIBSRCS): REmove getopt.c getopt1.c.  Add mkdir.c, rmdir.c.
2518 +       (SRCS): Add dirname.c, exitfail.c, getopt.c, getopt1.c, quote.c.
2519 +       Remove mkdir.c.
2520 +       (OBJS): Keep in sync with SRCS.
2521 +       (HDRS): Remove basename.h.
2522 +       Add dirname.h, exitfail.h, quote.h, unlocked-io.h.
2523 +       (MISC, configure, config.hin, patchlevel.h):
2524 +       configure.ac renamed from configure.in.
2525 +       (MISC): Add README-alpha. Remove ansi2knr.1, ansi2knr.c.
2526 +       (.c.$(OBJEXT)): Renamed from .c.o.
2527 +       (ACINCLUDE_INPUTS): Add c-bs-a.m4, error.m4, jm-glibc-io.m4,
2528 +       mbstate_t.m4, mkdir.m4, mbrtowc.m4, prereq.m4, setmode.m4.
2529 +       Remove ccstdc.m4, inttypes_h.m4, largefile.m4, protos.m4.
2530 +       (mostlyclean): Don't clean ansi2knr.
2531 +       (ansi2knr.o, ansi2knr): Remove.
2532 +       Redo dependencies.
2533 +
2534 +       * patch.c: Include <exitfail.h>.
2535 +       (main): Initialize exit_failure.
2536 +
2537 +       * patch.man: Update copyright notice.
2538 +
2539 +       * pch.c, util.c: Include <dirname.h>, not <basename.h>.
2540 +
2541 +       * version.c (copyright_string): Update copyright notice.
2542 +
2543 +2002-02-17  Paul Eggert  <eggert@twinsun.com>
2544 +
2545 +       * partime.c (parse_pattern_letter): Don't overrun buffer if it
2546 +       contains only alphanumerics.  Bug reported by Winni
2547 +       <Winni470@gmx.net>.
2548 +
2549 +2001-07-28  Paul Eggert  <eggert@sic.twinsun.com>
2550 +
2551 +       * util.c (fetchname), NEWS:
2552 +       Allow file names with internal spaces, so long as they
2553 +       don't contain tabs.
2554 +
2555 +       * pch.c (intuit_diff_type): Do not allow Prereq with multiple words.
2556 +
2557 +       * configure.in (AC_PREREQ): Bump to 2.50.
2558 +       (AC_CHECK_FUNCS): Remove fseeko.
2559 +       (AC_FUNC_FSEEKO): Add.
2560 +       * Makefile.in (ACINCLUDE_INPUTS):
2561 +       Remove largefile.m4; no longer needed with Autoconf 2.50.
2562 +
2563 +2001-02-07  "Tony E. Bennett" <tbennett@nvidia.com>
2564 +
2565 +       * util.c (PERFORCE_CO): New var.
2566 +       (version_controller): Support Perforce.
2567 +       * patch.man: Document this.
2568 +
2569 +2000-06-30  Paul Eggert  <eggert@sic.twinsun.com>
2570 +
2571 +       * patch.man: Ignore comment lines.
2572 +
2573 +       * NEWS, pch.c: Ignore lines beginning with "#".
2574 +
2575 +1999-10-24  Paul Eggert  <eggert@twinsun.com>
2576 +
2577 +       * pch.c (another_hunk): Report a fatal error if a regular
2578 +       context hunk's pattern has a different number of unchanged
2579 +       lines than the replacement.
2580 +
2581 +1999-10-18  Paul Eggert  <eggert@twinsun.com>
2582 +
2583 +       * patch.c (main): If we skipped an ed patch, exit with nonzero status.
2584 +
2585 +1999-10-17  Paul Eggert  <eggert@twinsun.com>
2586 +
2587 +       * patch.c (main): Apply do_ed_script even if dry_run, because
2588 +       we need to make progress on the patch file.
2589 +       * pch.c (do_ed_script): If skip_rest_of_patch is nonzero,
2590 +       gobble up the patch without any other side effect.
2591 +
2592 +1999-10-12  Paul Eggert  <eggert@twinsun.com>
2593 +
2594 +       * NEWS, README: New bug reporting address.
2595 +       * NEWS: Report change in 2.5.4 that we forgot to document.
2596 +       * README: Document `configure --disable-largefile'.
2597 +
2598 +       * basename.c, COPYING, getopt.c, getopt.h, getopt1.c, m4/largefile.m4:
2599 +       Update to latest version.
2600 +       * Makefile.in (basename$U.o): Depend on basename.h.
2601 +       (config.hin): Depend on $(srcdir)/aclocal.m4.
2602 +
2603 +       * ansi2knr.c, maketime.c, mkinstalldirs, partime.c: Fix $Id.
2604 +
2605 +       FreeBSD has an unrelated setmode function; work around this.
2606 +       * common.h (binary_transput): Don't declare unless O_BINARY.
2607 +       * patch.c (option_help, get_some_switches):
2608 +       Don't use setmode unless O_BINARY.
2609 +       * pch.c (open_patch_file): Don't invoke setmode unless O_BINARY.
2610 +
2611 +       Fix incompatiblities with error.c.
2612 +       * common.h (program_name): Now XTERN char *, for compatibility
2613 +       with error.c.  All uses changed.
2614 +       (PROGRAM_NAME): New macro.
2615 +       (PARAMS): Use ANSI C version only if defined PROTOTYPES
2616 +       || (defined __STDC__ && __STDC__), for compatibilty with error.c.
2617 +       * util.c (vararg_start): Likewise.
2618 +       * patch.c (program_name): Remove.
2619 +       (main): Initialize program_name.
2620 +       * version.c (version): Print PROGRAM_NAME, not program_name.
2621 +
2622 +       Accommodate mingw32 port, which has one-argument mkdir (yuck!)
2623 +       and no geteuid.
2624 +       * m4/mkdir.m4: New file.
2625 +       * Makefile.in (ACINCLUDE_INPUTS): Add $(M4DIR)/mkdir.m4.
2626 +       * configure.in (AC_CHECK_FUNCS): Add geteuid, getuid.
2627 +       (PATCH_FUNC_MKDIR_TAKES_ONE_ARG): Add.
2628 +       * common.h (mkdir): Define if mkdir takes one arg.
2629 +       (geteuid): New macro, if not already defined.
2630 +
2631 +1999-10-11  Christopher R. Gabriel  <cgabriel@tin.it>
2632 +
2633 +       * patch.c (option_help): Updated bug report address
2634 +       * configure.in (VERSION): Version 2.5.5 released.
2635 +
2636 +1999-09-01  Paul Eggert  <eggert@twinsun.com>
2637 +
2638 +       * patch.c (main): Default simple_backup_suffix to ".orig".
2639 +
2640 +1999-10-08  Paul Eggert  <eggert@twinsun.com>
2641 +
2642 +       * patch.man: Make it clear that `patch -o F' should not be
2643 +       used if F is one of the files to be patched.
2644 +
2645  1999-08-30  Paul Eggert  <eggert@twinsun.com>
2646  
2647         Version 2.5.4 fixes a few minor bugs, converts C sources to
2648 @@ -1910,9 +2266,26 @@
2649  
2650  1984-11-09  Larry Wall  <sdcrdcf!lwall>
2651         * patch.c: Initial revision
2652 -\f
2653 -Local Variables:
2654 -mode: indented-text
2655 -left-margin: 8
2656 -version-control: never
2657 -end:
2658 +
2659 +
2660 +Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall.
2661 +
2662 +Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
2663 +2002 Free Software Foundation, Inc.
2664 +
2665 +This file is part of GNU Patch.
2666 +
2667 +This program is free software; you can redistribute it and/or modify
2668 +it under the terms of the GNU General Public License as published by
2669 +the Free Software Foundation; either version 2, or (at your option)
2670 +any later version.
2671 +
2672 +This program is distributed in the hope that they will be useful,
2673 +but WITHOUT ANY WARRANTY; without even the implied warranty of
2674 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2675 +GNU General Public License for more details.
2676 +
2677 +You should have received a copy of the GNU General Public License
2678 +along with this program; see the file COPYING.  If not, write to
2679 +the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2680 +Boston, MA 02111-1307, USA.
2681 diff -urNd -urNd patch-2.5.4/common.h patch-2.5.9/common.h
2682 --- patch-2.5.4/common.h        1999-08-30 02:20:08.000000000 -0400
2683 +++ patch-2.5.9/common.h        2003-05-19 02:57:36.000000000 -0400
2684 @@ -1,9 +1,11 @@
2685  /* common definitions for `patch' */
2686  
2687 -/* $Id: common.h,v 1.20 1999/08/30 06:20:08 eggert Exp $ */
2688 +/* $Id: common.h,v 1.34 2003/05/19 06:57:36 eggert Exp $ */
2689  
2690 -/* Copyright 1986, 1988 Larry Wall
2691 -   Copyright 1990, 1991-1993, 1997-1998, 1999 Free Software Foundation, Inc.
2692 +/* Copyright (C) 1986, 1988 Larry Wall
2693 +
2694 +   Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
2695 +   Free Software Foundation, Inc.
2696  
2697     This program is free software; you can redistribute it and/or modify
2698     it under the terms of the GNU General Public License as published by
2699 @@ -24,17 +26,10 @@
2700  #define DEBUGGING 1
2701  #endif
2702  
2703 -/* We must define `volatile' and `const' first (the latter inside config.h),
2704 -   so that they're used consistently in all system includes.  */
2705 -#ifndef __STDC__
2706 -# ifndef volatile
2707 -# define volatile
2708 -# endif
2709 -#endif
2710 -
2711  #include <config.h>
2712  
2713  #include <assert.h>
2714 +#include <stdbool.h>
2715  #include <stdio.h>
2716  #include <sys/types.h>
2717  #include <time.h>
2718 @@ -73,6 +68,9 @@
2719  #ifndef S_IRUSR
2720  #define S_IRUSR (S_IROTH << 6)
2721  #endif
2722 +#ifdef MKDIR_TAKES_ONE_ARG
2723 +# define mkdir(name, mode) ((mkdir) (name))
2724 +#endif
2725  
2726  #if HAVE_LIMITS_H
2727  # include <limits.h>
2728 @@ -123,27 +121,6 @@
2729  #endif
2730  
2731  
2732 -#ifndef FILESYSTEM_PREFIX_LEN
2733 -#define FILESYSTEM_PREFIX_LEN(f) 0
2734 -#endif
2735 -
2736 -#ifndef ISSLASH
2737 -#define ISSLASH(c) ((c) == '/')
2738 -#endif
2739 -
2740 -
2741 -/* constants */
2742 -
2743 -/* AIX predefines these.  */
2744 -#ifdef TRUE
2745 -#undef TRUE
2746 -#endif
2747 -#ifdef FALSE
2748 -#undef FALSE
2749 -#endif
2750 -#define TRUE 1
2751 -#define FALSE 0
2752 -
2753  /* handy definitions */
2754  
2755  #define strEQ(s1,s2) (!strcmp(s1, s2))
2756 @@ -151,12 +128,11 @@
2757  
2758  /* typedefs */
2759  
2760 -typedef int bool;                      /* must promote to itself */
2761  typedef off_t LINENUM;                 /* must be signed */
2762  
2763  /* globals */
2764  
2765 -extern char const program_name[];
2766 +XTERN char *program_name;      /* The name this program was run with. */
2767  
2768  XTERN char *buf;                       /* general purpose buffer */
2769  XTERN size_t bufsize;                  /* allocated size of buf */
2770 @@ -190,14 +166,14 @@
2771  XTERN bool force;
2772  XTERN bool batch;
2773  XTERN bool noreverse;
2774 -XTERN int reverse;
2775 +XTERN bool reverse;
2776  XTERN enum { DEFAULT_VERBOSITY, SILENT, VERBOSE } verbosity;
2777  XTERN bool skip_rest_of_patch;
2778  XTERN int strippath;
2779  XTERN bool canonicalize;
2780  XTERN int patch_get;
2781 -XTERN int set_time;
2782 -XTERN int set_utc;
2783 +XTERN bool set_time;
2784 +XTERN bool set_utc;
2785  
2786  enum diff
2787    {
2788 @@ -213,25 +189,11 @@
2789  
2790  XTERN char *revision;                  /* prerequisite revision, if any */
2791  
2792 -#ifdef __STDC__
2793 -# define GENERIC_OBJECT void
2794 -#else
2795 -# define GENERIC_OBJECT char
2796 -#endif
2797 -
2798  #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
2799  # define __attribute__(x)
2800  #endif
2801  
2802 -#ifndef PARAMS
2803 -# ifdef __STDC__
2804 -#  define PARAMS(args) args
2805 -# else
2806 -#  define PARAMS(args) ()
2807 -# endif
2808 -#endif
2809 -
2810 -void fatal_exit PARAMS ((int)) __attribute__ ((noreturn));
2811 +void fatal_exit (int) __attribute__ ((noreturn));
2812  
2813  #include <errno.h>
2814  #if !STDC_HEADERS && !defined errno
2815 @@ -244,7 +206,7 @@
2816  # if !HAVE_MEMCHR
2817  #  define memcmp(s1, s2, n) bcmp (s1, s2, n)
2818  #  define memcpy(d, s, n) bcopy (s, d, n)
2819 -GENERIC_OBJECT *memchr ();
2820 +void *memchr ();
2821  # endif
2822  #endif
2823  
2824 @@ -252,8 +214,8 @@
2825  # include <stdlib.h>
2826  #else
2827  char *getenv ();
2828 -GENERIC_OBJECT *malloc ();
2829 -GENERIC_OBJECT *realloc ();
2830 +void *malloc ();
2831 +void *realloc ();
2832  #endif
2833  
2834  #if HAVE_UNISTD_H
2835 @@ -284,6 +246,13 @@
2836  # define file_seek fseek
2837  # define file_tell ftell
2838  #endif
2839 +#if ! (HAVE_GETEUID || defined geteuid)
2840 +# if ! (HAVE_GETUID || defined getuid)
2841 +#  define geteuid() (-1)
2842 +# else
2843 +#  define geteuid() getuid ()
2844 +# endif
2845 +#endif
2846  
2847  #if HAVE_FCNTL_H
2848  # include <fcntl.h>
2849 @@ -313,7 +282,7 @@
2850  #define O_TRUNC 0
2851  #endif
2852  
2853 -#if HAVE_SETMODE
2854 +#if HAVE_SETMODE_DOS
2855    XTERN int binary_transput;   /* O_BINARY if binary i/o is desired */
2856  #else
2857  # define binary_transput 0
2858 diff -urNd -urNd patch-2.5.4/config.guess patch-2.5.9/config.guess
2859 --- patch-2.5.4/config.guess    1999-08-05 08:55:17.000000000 -0400
2860 +++ patch-2.5.9/config.guess    1969-12-31 19:00:00.000000000 -0500
2861 @@ -1,1088 +0,0 @@
2862 -#! /bin/sh
2863 -# Attempt to guess a canonical system name.
2864 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
2865 -#   Free Software Foundation, Inc.
2866 -#
2867 -# This file is free software; you can redistribute it and/or modify it
2868 -# under the terms of the GNU General Public License as published by
2869 -# the Free Software Foundation; either version 2 of the License, or
2870 -# (at your option) any later version.
2871 -#
2872 -# This program is distributed in the hope that it will be useful, but
2873 -# WITHOUT ANY WARRANTY; without even the implied warranty of
2874 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2875 -# General Public License for more details.
2876 -#
2877 -# You should have received a copy of the GNU General Public License
2878 -# along with this program; if not, write to the Free Software
2879 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2880 -#
2881 -# As a special exception to the GNU General Public License, if you
2882 -# distribute this file as part of a program that contains a
2883 -# configuration script generated by Autoconf, you may include it under
2884 -# the same distribution terms that you use for the rest of that program.
2885 -
2886 -# Written by Per Bothner <bothner@cygnus.com>.
2887 -# The master version of this file is at the FSF in /home/gd/gnu/lib.
2888 -# Please send patches to <autoconf-patches@gnu.org>.
2889 -#
2890 -# This script attempts to guess a canonical system name similar to
2891 -# config.sub.  If it succeeds, it prints the system name on stdout, and
2892 -# exits with 0.  Otherwise, it exits with 1.
2893 -#
2894 -# The plan is that this can be called by configure scripts if you
2895 -# don't specify an explicit system type (host/target name).
2896 -#
2897 -# Only a few systems have been added to this list; please add others
2898 -# (but try to keep the structure clean).
2899 -#
2900 -
2901 -# Use $HOST_CC if defined. $CC may point to a cross-compiler
2902 -if test x"$CC_FOR_BUILD" = x; then
2903 -  if test x"$HOST_CC" != x; then
2904 -    CC_FOR_BUILD="$HOST_CC"
2905 -  else
2906 -    if test x"$CC" != x; then
2907 -      CC_FOR_BUILD="$CC"
2908 -    else
2909 -      CC_FOR_BUILD=cc
2910 -    fi
2911 -  fi
2912 -fi
2913 -
2914 -
2915 -# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
2916 -# (ghazi@noc.rutgers.edu 8/24/94.)
2917 -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
2918 -       PATH=$PATH:/.attbin ; export PATH
2919 -fi
2920 -
2921 -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
2922 -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
2923 -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
2924 -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
2925 -
2926 -dummy=dummy-$$
2927 -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
2928 -
2929 -# Note: order is significant - the case branches are not exclusive.
2930 -
2931 -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
2932 -    alpha:OSF1:*:*)
2933 -       if test $UNAME_RELEASE = "V4.0"; then
2934 -               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2935 -       fi
2936 -       # A Vn.n version is a released version.
2937 -       # A Tn.n version is a released field test version.
2938 -       # A Xn.n version is an unreleased experimental baselevel.
2939 -       # 1.2 uses "1.2" for uname -r.
2940 -       cat <<EOF >$dummy.s
2941 -       .globl main
2942 -       .ent main
2943 -main:
2944 -       .frame \$30,0,\$26,0
2945 -       .prologue 0
2946 -       .long 0x47e03d80 # implver $0
2947 -       lda \$2,259
2948 -       .long 0x47e20c21 # amask $2,$1
2949 -       srl \$1,8,\$2
2950 -       sll \$2,2,\$2
2951 -       sll \$0,3,\$0
2952 -       addl \$1,\$0,\$0
2953 -       addl \$2,\$0,\$0
2954 -       ret \$31,(\$26),1
2955 -       .end main
2956 -EOF
2957 -       $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
2958 -       if test "$?" = 0 ; then
2959 -               ./$dummy
2960 -               case "$?" in
2961 -                       7)
2962 -                               UNAME_MACHINE="alpha"
2963 -                               ;;
2964 -                       15)
2965 -                               UNAME_MACHINE="alphaev5"
2966 -                               ;;
2967 -                       14)
2968 -                               UNAME_MACHINE="alphaev56"
2969 -                               ;;
2970 -                       10)
2971 -                               UNAME_MACHINE="alphapca56"
2972 -                               ;;
2973 -                       16)
2974 -                               UNAME_MACHINE="alphaev6"
2975 -                               ;;
2976 -               esac
2977 -       fi
2978 -       rm -f $dummy.s $dummy
2979 -       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
2980 -       exit 0 ;;
2981 -    Alpha\ *:Windows_NT*:*)
2982 -       # How do we know it's Interix rather than the generic POSIX subsystem?
2983 -       # Should we change UNAME_MACHINE based on the output of uname instead
2984 -       # of the specific Alpha model?
2985 -       echo alpha-pc-interix
2986 -       exit 0 ;;
2987 -    21064:Windows_NT:50:3)
2988 -       echo alpha-dec-winnt3.5
2989 -       exit 0 ;;
2990 -    Amiga*:UNIX_System_V:4.0:*)
2991 -       echo m68k-cbm-sysv4
2992 -       exit 0;;
2993 -    amiga:NetBSD:*:*)
2994 -      echo m68k-cbm-netbsd${UNAME_RELEASE}
2995 -      exit 0 ;;
2996 -    amiga:OpenBSD:*:*)
2997 -       echo m68k-unknown-openbsd${UNAME_RELEASE}
2998 -       exit 0 ;;
2999 -    *:[Aa]miga[Oo][Ss]:*:*)
3000 -       echo ${UNAME_MACHINE}-unknown-amigaos
3001 -       exit 0 ;;
3002 -    arc64:OpenBSD:*:*)
3003 -       echo mips64el-unknown-openbsd${UNAME_RELEASE}
3004 -       exit 0 ;;
3005 -    arc:OpenBSD:*:*)
3006 -       echo mipsel-unknown-openbsd${UNAME_RELEASE}
3007 -       exit 0 ;;
3008 -    hkmips:OpenBSD:*:*)
3009 -       echo mips-unknown-openbsd${UNAME_RELEASE}
3010 -       exit 0 ;;
3011 -    pmax:OpenBSD:*:*)
3012 -       echo mipsel-unknown-openbsd${UNAME_RELEASE}
3013 -       exit 0 ;;
3014 -    sgi:OpenBSD:*:*)
3015 -       echo mips-unknown-openbsd${UNAME_RELEASE}
3016 -       exit 0 ;;
3017 -    wgrisc:OpenBSD:*:*)
3018 -       echo mipsel-unknown-openbsd${UNAME_RELEASE}
3019 -       exit 0 ;;
3020 -    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3021 -       echo arm-acorn-riscix${UNAME_RELEASE}
3022 -       exit 0;;
3023 -    arm32:NetBSD:*:*)
3024 -       echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3025 -       exit 0 ;;
3026 -    SR2?01:HI-UX/MPP:*:*)
3027 -       echo hppa1.1-hitachi-hiuxmpp
3028 -       exit 0;;
3029 -    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
3030 -       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
3031 -       if test "`(/bin/universe) 2>/dev/null`" = att ; then
3032 -               echo pyramid-pyramid-sysv3
3033 -       else
3034 -               echo pyramid-pyramid-bsd
3035 -       fi
3036 -       exit 0 ;;
3037 -    NILE*:*:*:dcosx)
3038 -       echo pyramid-pyramid-svr4
3039 -       exit 0 ;;
3040 -    sun4H:SunOS:5.*:*)
3041 -       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3042 -       exit 0 ;;
3043 -    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3044 -       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3045 -       exit 0 ;;
3046 -    i86pc:SunOS:5.*:*)
3047 -       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3048 -       exit 0 ;;
3049 -    sun4*:SunOS:6*:*)
3050 -       # According to config.sub, this is the proper way to canonicalize
3051 -       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
3052 -       # it's likely to be more like Solaris than SunOS4.
3053 -       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3054 -       exit 0 ;;
3055 -    sun4*:SunOS:*:*)
3056 -       case "`/usr/bin/arch -k`" in
3057 -           Series*|S4*)
3058 -               UNAME_RELEASE=`uname -v`
3059 -               ;;
3060 -       esac
3061 -       # Japanese Language versions have a version number like `4.1.3-JL'.
3062 -       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3063 -       exit 0 ;;
3064 -    sun3*:SunOS:*:*)
3065 -       echo m68k-sun-sunos${UNAME_RELEASE}
3066 -       exit 0 ;;
3067 -    sun*:*:4.2BSD:*)
3068 -       UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
3069 -       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
3070 -       case "`/bin/arch`" in
3071 -           sun3)
3072 -               echo m68k-sun-sunos${UNAME_RELEASE}
3073 -               ;;
3074 -           sun4)
3075 -               echo sparc-sun-sunos${UNAME_RELEASE}
3076 -               ;;
3077 -       esac
3078 -       exit 0 ;;
3079 -    aushp:SunOS:*:*)
3080 -       echo sparc-auspex-sunos${UNAME_RELEASE}
3081 -       exit 0 ;;
3082 -    atari*:NetBSD:*:*)
3083 -       echo m68k-atari-netbsd${UNAME_RELEASE}
3084 -       exit 0 ;;
3085 -    atari*:OpenBSD:*:*)
3086 -       echo m68k-unknown-openbsd${UNAME_RELEASE}
3087 -       exit 0 ;;
3088 -    # The situation for MiNT is a little confusing.  The machine name
3089 -    # can be virtually everything (everything which is not
3090 -    # "atarist" or "atariste" at least should have a processor 
3091 -    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
3092 -    # to the lowercase version "mint" (or "freemint").  Finally
3093 -    # the system name "TOS" denotes a system which is actually not
3094 -    # MiNT.  But MiNT is downward compatible to TOS, so this should
3095 -    # be no problem.
3096 -    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3097 -        echo m68k-atari-mint${UNAME_RELEASE}
3098 -       exit 0 ;;
3099 -    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
3100 -       echo m68k-atari-mint${UNAME_RELEASE}
3101 -        exit 0 ;;
3102 -    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
3103 -        echo m68k-atari-mint${UNAME_RELEASE}
3104 -       exit 0 ;;
3105 -    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
3106 -        echo m68k-milan-mint${UNAME_RELEASE}
3107 -        exit 0 ;;
3108 -    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
3109 -        echo m68k-hades-mint${UNAME_RELEASE}
3110 -        exit 0 ;;
3111 -    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
3112 -        echo m68k-unknown-mint${UNAME_RELEASE}
3113 -        exit 0 ;;
3114 -    sun3*:NetBSD:*:*)
3115 -       echo m68k-sun-netbsd${UNAME_RELEASE}
3116 -       exit 0 ;;
3117 -    sun3*:OpenBSD:*:*)
3118 -       echo m68k-unknown-openbsd${UNAME_RELEASE}
3119 -       exit 0 ;;
3120 -    mac68k:NetBSD:*:*)
3121 -       echo m68k-apple-netbsd${UNAME_RELEASE}
3122 -       exit 0 ;;
3123 -    mac68k:OpenBSD:*:*)
3124 -       echo m68k-unknown-openbsd${UNAME_RELEASE}
3125 -       exit 0 ;;
3126 -    mvme68k:OpenBSD:*:*)
3127 -       echo m68k-unknown-openbsd${UNAME_RELEASE}
3128 -       exit 0 ;;
3129 -    mvme88k:OpenBSD:*:*)
3130 -       echo m88k-unknown-openbsd${UNAME_RELEASE}
3131 -       exit 0 ;;
3132 -    powerpc:machten:*:*)
3133 -       echo powerpc-apple-machten${UNAME_RELEASE}
3134 -       exit 0 ;;
3135 -    macppc:NetBSD:*:*)
3136 -        echo powerpc-apple-netbsd${UNAME_RELEASE}
3137 -        exit 0 ;;
3138 -    RISC*:Mach:*:*)
3139 -       echo mips-dec-mach_bsd4.3
3140 -       exit 0 ;;
3141 -    RISC*:ULTRIX:*:*)
3142 -       echo mips-dec-ultrix${UNAME_RELEASE}
3143 -       exit 0 ;;
3144 -    VAX*:ULTRIX*:*:*)
3145 -       echo vax-dec-ultrix${UNAME_RELEASE}
3146 -       exit 0 ;;
3147 -    2020:CLIX:*:* | 2430:CLIX:*:*)
3148 -       echo clipper-intergraph-clix${UNAME_RELEASE}
3149 -       exit 0 ;;
3150 -    mips:*:*:UMIPS | mips:*:*:RISCos)
3151 -       sed 's/^        //' << EOF >$dummy.c
3152 -#ifdef __cplusplus
3153 -       int main (int argc, char *argv[]) {
3154 -#else
3155 -       int main (argc, argv) int argc; char *argv[]; {
3156 -#endif
3157 -       #if defined (host_mips) && defined (MIPSEB)
3158 -       #if defined (SYSTYPE_SYSV)
3159 -         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
3160 -       #endif
3161 -       #if defined (SYSTYPE_SVR4)
3162 -         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
3163 -       #endif
3164 -       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
3165 -         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
3166 -       #endif
3167 -       #endif
3168 -         exit (-1);
3169 -       }
3170 -EOF
3171 -       $CC_FOR_BUILD $dummy.c -o $dummy \
3172 -         && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
3173 -         && rm $dummy.c $dummy && exit 0
3174 -       rm -f $dummy.c $dummy
3175 -       echo mips-mips-riscos${UNAME_RELEASE}
3176 -       exit 0 ;;
3177 -    Night_Hawk:Power_UNIX:*:*)
3178 -       echo powerpc-harris-powerunix
3179 -       exit 0 ;;
3180 -    m88k:CX/UX:7*:*)
3181 -       echo m88k-harris-cxux7
3182 -       exit 0 ;;
3183 -    m88k:*:4*:R4*)
3184 -       echo m88k-motorola-sysv4
3185 -       exit 0 ;;
3186 -    m88k:*:3*:R3*)
3187 -       echo m88k-motorola-sysv3
3188 -       exit 0 ;;
3189 -    AViiON:dgux:*:*)
3190 -        # DG/UX returns AViiON for all architectures
3191 -        UNAME_PROCESSOR=`/usr/bin/uname -p`
3192 -        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
3193 -       if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
3194 -            -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
3195 -               echo m88k-dg-dgux${UNAME_RELEASE}
3196 -       else
3197 -               echo m88k-dg-dguxbcs${UNAME_RELEASE}
3198 -       fi
3199 -        else echo i586-dg-dgux${UNAME_RELEASE}
3200 -        fi
3201 -       exit 0 ;;
3202 -    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
3203 -       echo m88k-dolphin-sysv3
3204 -       exit 0 ;;
3205 -    M88*:*:R3*:*)
3206 -       # Delta 88k system running SVR3
3207 -       echo m88k-motorola-sysv3
3208 -       exit 0 ;;
3209 -    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
3210 -       echo m88k-tektronix-sysv3
3211 -       exit 0 ;;
3212 -    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
3213 -       echo m68k-tektronix-bsd
3214 -       exit 0 ;;
3215 -    *:IRIX*:*:*)
3216 -       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
3217 -       exit 0 ;;
3218 -    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
3219 -       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
3220 -       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
3221 -    i?86:AIX:*:*)
3222 -       echo i386-ibm-aix
3223 -       exit 0 ;;
3224 -    *:AIX:2:3)
3225 -       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
3226 -               sed 's/^                //' << EOF >$dummy.c
3227 -               #include <sys/systemcfg.h>
3228 -
3229 -               main()
3230 -                       {
3231 -                       if (!__power_pc())
3232 -                               exit(1);
3233 -                       puts("powerpc-ibm-aix3.2.5");
3234 -                       exit(0);
3235 -                       }
3236 -EOF
3237 -               $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
3238 -               rm -f $dummy.c $dummy
3239 -               echo rs6000-ibm-aix3.2.5
3240 -       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
3241 -               echo rs6000-ibm-aix3.2.4
3242 -       else
3243 -               echo rs6000-ibm-aix3.2
3244 -       fi
3245 -       exit 0 ;;
3246 -    *:AIX:*:4)
3247 -       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
3248 -       if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
3249 -               IBM_ARCH=rs6000
3250 -       else
3251 -               IBM_ARCH=powerpc
3252 -       fi
3253 -       if [ -x /usr/bin/oslevel ] ; then
3254 -               IBM_REV=`/usr/bin/oslevel`
3255 -       else
3256 -               IBM_REV=4.${UNAME_RELEASE}
3257 -       fi
3258 -       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
3259 -       exit 0 ;;
3260 -    *:AIX:*:*)
3261 -       echo rs6000-ibm-aix
3262 -       exit 0 ;;
3263 -    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
3264 -       echo romp-ibm-bsd4.4
3265 -       exit 0 ;;
3266 -    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
3267 -       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
3268 -       exit 0 ;;                           # report: romp-ibm BSD 4.3
3269 -    *:BOSX:*:*)
3270 -       echo rs6000-bull-bosx
3271 -       exit 0 ;;
3272 -    DPX/2?00:B.O.S.:*:*)
3273 -       echo m68k-bull-sysv3
3274 -       exit 0 ;;
3275 -    9000/[34]??:4.3bsd:1.*:*)
3276 -       echo m68k-hp-bsd
3277 -       exit 0 ;;
3278 -    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
3279 -       echo m68k-hp-bsd4.4
3280 -       exit 0 ;;
3281 -    9000/[34678]??:HP-UX:*:*)
3282 -       case "${UNAME_MACHINE}" in
3283 -           9000/31? )            HP_ARCH=m68000 ;;
3284 -           9000/[34]?? )         HP_ARCH=m68k ;;
3285 -           9000/[678][0-9][0-9])
3286 -              sed 's/^              //' << EOF >$dummy.c
3287 -              #include <stdlib.h>
3288 -              #include <unistd.h>
3289 -
3290 -              int main ()
3291 -              {
3292 -              #if defined(_SC_KERNEL_BITS)
3293 -                  long bits = sysconf(_SC_KERNEL_BITS);
3294 -              #endif
3295 -                  long cpu  = sysconf (_SC_CPU_VERSION);
3296 -
3297 -                  switch (cpu)
3298 -               {
3299 -               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
3300 -               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
3301 -               case CPU_PA_RISC2_0:
3302 -              #if defined(_SC_KERNEL_BITS)
3303 -                   switch (bits)
3304 -                       {
3305 -                       case 64: puts ("hppa2.0w"); break;
3306 -                       case 32: puts ("hppa2.0n"); break;
3307 -                       default: puts ("hppa2.0"); break;
3308 -                       } break;
3309 -              #else  /* !defined(_SC_KERNEL_BITS) */
3310 -                   puts ("hppa2.0"); break;
3311 -              #endif
3312 -               default: puts ("hppa1.0"); break;
3313 -               }
3314 -                  exit (0);
3315 -              }
3316 -EOF
3317 -       ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
3318 -       rm -f $dummy.c $dummy
3319 -       esac
3320 -       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
3321 -       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
3322 -       exit 0 ;;
3323 -    3050*:HI-UX:*:*)
3324 -       sed 's/^        //' << EOF >$dummy.c
3325 -       #include <unistd.h>
3326 -       int
3327 -       main ()
3328 -       {
3329 -         long cpu = sysconf (_SC_CPU_VERSION);
3330 -         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
3331 -            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
3332 -            results, however.  */
3333 -         if (CPU_IS_PA_RISC (cpu))
3334 -           {
3335 -             switch (cpu)
3336 -               {
3337 -                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
3338 -                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
3339 -                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
3340 -                 default: puts ("hppa-hitachi-hiuxwe2"); break;
3341 -               }
3342 -           }
3343 -         else if (CPU_IS_HP_MC68K (cpu))
3344 -           puts ("m68k-hitachi-hiuxwe2");
3345 -         else puts ("unknown-hitachi-hiuxwe2");
3346 -         exit (0);
3347 -       }
3348 -EOF
3349 -       $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
3350 -       rm -f $dummy.c $dummy
3351 -       echo unknown-hitachi-hiuxwe2
3352 -       exit 0 ;;
3353 -    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
3354 -       echo hppa1.1-hp-bsd
3355 -       exit 0 ;;
3356 -    9000/8??:4.3bsd:*:*)
3357 -       echo hppa1.0-hp-bsd
3358 -       exit 0 ;;
3359 -    *9??*:MPE/iX:*:*)
3360 -       echo hppa1.0-hp-mpeix
3361 -       exit 0 ;;
3362 -    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
3363 -       echo hppa1.1-hp-osf
3364 -       exit 0 ;;
3365 -    hp8??:OSF1:*:*)
3366 -       echo hppa1.0-hp-osf
3367 -       exit 0 ;;
3368 -    i?86:OSF1:*:*)
3369 -       if [ -x /usr/sbin/sysversion ] ; then
3370 -           echo ${UNAME_MACHINE}-unknown-osf1mk
3371 -       else
3372 -           echo ${UNAME_MACHINE}-unknown-osf1
3373 -       fi
3374 -       exit 0 ;;
3375 -    parisc*:Lites*:*:*)
3376 -       echo hppa1.1-hp-lites
3377 -       exit 0 ;;
3378 -    hppa*:OpenBSD:*:*)
3379 -       echo hppa-unknown-openbsd
3380 -       exit 0 ;;
3381 -    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
3382 -       echo c1-convex-bsd
3383 -        exit 0 ;;
3384 -    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
3385 -       if getsysinfo -f scalar_acc
3386 -       then echo c32-convex-bsd
3387 -       else echo c2-convex-bsd
3388 -       fi
3389 -        exit 0 ;;
3390 -    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
3391 -       echo c34-convex-bsd
3392 -        exit 0 ;;
3393 -    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
3394 -       echo c38-convex-bsd
3395 -        exit 0 ;;
3396 -    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
3397 -       echo c4-convex-bsd
3398 -        exit 0 ;;
3399 -    CRAY*X-MP:*:*:*)
3400 -       echo xmp-cray-unicos
3401 -        exit 0 ;;
3402 -    CRAY*Y-MP:*:*:*)
3403 -       echo ymp-cray-unicos${UNAME_RELEASE}
3404 -       exit 0 ;;
3405 -    CRAY*[A-Z]90:*:*:*)
3406 -       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
3407 -       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
3408 -             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
3409 -       exit 0 ;;
3410 -    CRAY*TS:*:*:*)
3411 -       echo t90-cray-unicos${UNAME_RELEASE}
3412 -       exit 0 ;;
3413 -    CRAY*T3E:*:*:*)
3414 -       echo alpha-cray-unicosmk${UNAME_RELEASE}
3415 -       exit 0 ;;
3416 -    CRAY-2:*:*:*)
3417 -       echo cray2-cray-unicos
3418 -        exit 0 ;;
3419 -    F300:UNIX_System_V:*:*)
3420 -        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
3421 -        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
3422 -        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
3423 -        exit 0 ;;
3424 -    F301:UNIX_System_V:*:*)
3425 -       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
3426 -       exit 0 ;;
3427 -    hp3[0-9][05]:NetBSD:*:*)
3428 -       echo m68k-hp-netbsd${UNAME_RELEASE}
3429 -       exit 0 ;;
3430 -    hp300:OpenBSD:*:*)
3431 -       echo m68k-unknown-openbsd${UNAME_RELEASE}
3432 -       exit 0 ;;
3433 -    i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
3434 -       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
3435 -       exit 0 ;;
3436 -    sparc*:BSD/OS:*:*)
3437 -       echo sparc-unknown-bsdi${UNAME_RELEASE}
3438 -       exit 0 ;;
3439 -    *:BSD/OS:*:*)
3440 -       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
3441 -       exit 0 ;;
3442 -    *:FreeBSD:*:*)
3443 -       if test -x /usr/bin/objformat; then
3444 -           if test "elf" = "`/usr/bin/objformat`"; then
3445 -               echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
3446 -               exit 0
3447 -           fi
3448 -       fi
3449 -       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
3450 -       exit 0 ;;
3451 -    *:NetBSD:*:*)
3452 -       echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3453 -       exit 0 ;;
3454 -    *:OpenBSD:*:*)
3455 -       echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3456 -       exit 0 ;;
3457 -    i*:CYGWIN*:*)
3458 -       echo ${UNAME_MACHINE}-pc-cygwin
3459 -       exit 0 ;;
3460 -    i*:MINGW*:*)
3461 -       echo ${UNAME_MACHINE}-pc-mingw32
3462 -       exit 0 ;;
3463 -    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
3464 -       # How do we know it's Interix rather than the generic POSIX subsystem?
3465 -       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
3466 -       # UNAME_MACHINE based on the output of uname instead of i386?
3467 -       echo i386-pc-interix
3468 -       exit 0 ;;
3469 -    i*:UWIN*:*)
3470 -       echo ${UNAME_MACHINE}-pc-uwin
3471 -       exit 0 ;;
3472 -    p*:CYGWIN*:*)
3473 -       echo powerpcle-unknown-cygwin
3474 -       exit 0 ;;
3475 -    prep*:SunOS:5.*:*)
3476 -       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3477 -       exit 0 ;;
3478 -    *:GNU:*:*)
3479 -       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
3480 -       exit 0 ;;
3481 -    *:Linux:*:*)
3482 -       # uname on the ARM produces all sorts of strangeness, and we need to
3483 -       # filter it out.
3484 -       case "$UNAME_MACHINE" in
3485 -         armv*)                      UNAME_MACHINE=$UNAME_MACHINE ;;
3486 -         arm* | sa110*)              UNAME_MACHINE="arm" ;;
3487 -       esac
3488 -
3489 -       # The BFD linker knows what the default object file format is, so
3490 -       # first see if it will tell us. cd to the root directory to prevent
3491 -       # problems with other programs or directories called `ld' in the path.
3492 -       ld_help_string=`cd /; ld --help 2>&1`
3493 -       ld_supported_emulations=`echo $ld_help_string \
3494 -                        | sed -ne '/supported emulations:/!d
3495 -                                   s/[         ][      ]*/ /g
3496 -                                   s/.*supported emulations: *//
3497 -                                   s/ .*//
3498 -                                   p'`
3499 -        case "$ld_supported_emulations" in
3500 -         *ia64)      echo "${UNAME_MACHINE}-unknown-linux"         ; exit 0 ;;
3501 -         i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
3502 -         i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
3503 -         sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
3504 -         armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
3505 -         m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
3506 -         elf32ppc | elf32ppclinux)
3507 -               # Determine Lib Version
3508 -               cat >$dummy.c <<EOF
3509 -#include <features.h>
3510 -#if defined(__GLIBC__)
3511 -extern char __libc_version[];
3512 -extern char __libc_release[];
3513 -#endif
3514 -main(argc, argv)
3515 -     int argc;
3516 -     char *argv[];
3517 -{
3518 -#if defined(__GLIBC__)
3519 -  printf("%s %s\n", __libc_version, __libc_release);
3520 -#else
3521 -  printf("unkown\n");
3522 -#endif
3523 -  return 0;
3524 -}
3525 -EOF
3526 -               LIBC=""
3527 -               $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
3528 -               if test "$?" = 0 ; then
3529 -                       ./$dummy | grep 1\.99 > /dev/null
3530 -                       if test "$?" = 0 ; then
3531 -                               LIBC="libc1"
3532 -                       fi
3533 -               fi      
3534 -               rm -f $dummy.c $dummy
3535 -               echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
3536 -       esac
3537 -
3538 -       if test "${UNAME_MACHINE}" = "alpha" ; then
3539 -               sed 's/^        //'  <<EOF >$dummy.s
3540 -               .globl main
3541 -               .ent main
3542 -       main:
3543 -               .frame \$30,0,\$26,0
3544 -               .prologue 0
3545 -               .long 0x47e03d80 # implver $0
3546 -               lda \$2,259
3547 -               .long 0x47e20c21 # amask $2,$1
3548 -               srl \$1,8,\$2
3549 -               sll \$2,2,\$2
3550 -               sll \$0,3,\$0
3551 -               addl \$1,\$0,\$0
3552 -               addl \$2,\$0,\$0
3553 -               ret \$31,(\$26),1
3554 -               .end main
3555 -EOF
3556 -               LIBC=""
3557 -               $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
3558 -               if test "$?" = 0 ; then
3559 -                       ./$dummy
3560 -                       case "$?" in
3561 -                       7)
3562 -                               UNAME_MACHINE="alpha"
3563 -                               ;;
3564 -                       15)
3565 -                               UNAME_MACHINE="alphaev5"
3566 -                               ;;
3567 -                       14)
3568 -                               UNAME_MACHINE="alphaev56"
3569 -                               ;;
3570 -                       10)
3571 -                               UNAME_MACHINE="alphapca56"
3572 -                               ;;
3573 -                       16)
3574 -                               UNAME_MACHINE="alphaev6"
3575 -                               ;;
3576 -                       esac
3577 -
3578 -                       objdump --private-headers $dummy | \
3579 -                         grep ld.so.1 > /dev/null
3580 -                       if test "$?" = 0 ; then
3581 -                               LIBC="libc1"
3582 -                       fi
3583 -               fi
3584 -               rm -f $dummy.s $dummy
3585 -               echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
3586 -       elif test "${UNAME_MACHINE}" = "mips" ; then
3587 -         cat >$dummy.c <<EOF
3588 -#ifdef __cplusplus
3589 -       int main (int argc, char *argv[]) {
3590 -#else
3591 -       int main (argc, argv) int argc; char *argv[]; {
3592 -#endif
3593 -#ifdef __MIPSEB__
3594 -  printf ("%s-unknown-linux-gnu\n", argv[1]);
3595 -#endif
3596 -#ifdef __MIPSEL__
3597 -  printf ("%sel-unknown-linux-gnu\n", argv[1]);
3598 -#endif
3599 -  return 0;
3600 -}
3601 -EOF
3602 -         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
3603 -         rm -f $dummy.c $dummy
3604 -       else
3605 -         # Either a pre-BFD a.out linker (linux-gnuoldld)
3606 -         # or one that does not give us useful --help.
3607 -         # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
3608 -         # If ld does not provide *any* "supported emulations:"
3609 -         # that means it is gnuoldld.
3610 -         echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
3611 -         test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
3612 -
3613 -         case "${UNAME_MACHINE}" in
3614 -         i?86)
3615 -           VENDOR=pc;
3616 -           ;;
3617 -         *)
3618 -           VENDOR=unknown;
3619 -           ;;
3620 -         esac
3621 -         # Determine whether the default compiler is a.out or elf
3622 -         cat >$dummy.c <<EOF
3623 -#include <features.h>
3624 -#ifdef __cplusplus
3625 -       int main (int argc, char *argv[]) {
3626 -#else
3627 -       int main (argc, argv) int argc; char *argv[]; {
3628 -#endif
3629 -#ifdef __ELF__
3630 -# ifdef __GLIBC__
3631 -#  if __GLIBC__ >= 2
3632 -    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
3633 -#  else
3634 -    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
3635 -#  endif
3636 -# else
3637 -   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
3638 -# endif
3639 -#else
3640 -  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
3641 -#endif
3642 -  return 0;
3643 -}
3644 -EOF
3645 -         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
3646 -         rm -f $dummy.c $dummy
3647 -       fi ;;
3648 -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
3649 -# are messed up and put the nodename in both sysname and nodename.
3650 -    i?86:DYNIX/ptx:4*:*)
3651 -       echo i386-sequent-sysv4
3652 -       exit 0 ;;
3653 -    i?86:UNIX_SV:4.2MP:2.*)
3654 -        # Unixware is an offshoot of SVR4, but it has its own version
3655 -        # number series starting with 2...
3656 -        # I am not positive that other SVR4 systems won't match this,
3657 -       # I just have to hope.  -- rms.
3658 -        # Use sysv4.2uw... so that sysv4* matches it.
3659 -       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
3660 -       exit 0 ;;
3661 -    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
3662 -       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
3663 -               echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
3664 -       else
3665 -               echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
3666 -       fi
3667 -       exit 0 ;;
3668 -    i?86:*:5:7*)
3669 -       UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
3670 -       (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
3671 -       (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
3672 -       (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
3673 -       (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
3674 -       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
3675 -       exit 0 ;;
3676 -    i?86:*:3.2:*)
3677 -       if test -f /usr/options/cb.name; then
3678 -               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
3679 -               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
3680 -       elif /bin/uname -X 2>/dev/null >/dev/null ; then
3681 -               UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
3682 -               (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
3683 -               (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
3684 -                       && UNAME_MACHINE=i586
3685 -               (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
3686 -                       && UNAME_MACHINE=i686
3687 -               (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
3688 -                       && UNAME_MACHINE=i686
3689 -               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
3690 -       else
3691 -               echo ${UNAME_MACHINE}-pc-sysv32
3692 -       fi
3693 -       exit 0 ;;
3694 -    pc:*:*:*)
3695 -        # uname -m prints for DJGPP always 'pc', but it prints nothing about
3696 -        # the processor, so we play safe by assuming i386.
3697 -       echo i386-pc-msdosdjgpp
3698 -        exit 0 ;;
3699 -    Intel:Mach:3*:*)
3700 -       echo i386-pc-mach3
3701 -       exit 0 ;;
3702 -    paragon:*:*:*)
3703 -       echo i860-intel-osf1
3704 -       exit 0 ;;
3705 -    i860:*:4.*:*) # i860-SVR4
3706 -       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
3707 -         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
3708 -       else # Add other i860-SVR4 vendors below as they are discovered.
3709 -         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
3710 -       fi
3711 -       exit 0 ;;
3712 -    mini*:CTIX:SYS*5:*)
3713 -       # "miniframe"
3714 -       echo m68010-convergent-sysv
3715 -       exit 0 ;;
3716 -    M68*:*:R3V[567]*:*)
3717 -       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3718 -    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
3719 -       OS_REL=''
3720 -       test -r /etc/.relid \
3721 -       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
3722 -       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
3723 -         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
3724 -       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
3725 -         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3726 -    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
3727 -        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
3728 -          && echo i486-ncr-sysv4 && exit 0 ;;
3729 -    m68*:LynxOS:2.*:*)
3730 -       echo m68k-unknown-lynxos${UNAME_RELEASE}
3731 -       exit 0 ;;
3732 -    mc68030:UNIX_System_V:4.*:*)
3733 -       echo m68k-atari-sysv4
3734 -       exit 0 ;;
3735 -    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
3736 -       echo i386-unknown-lynxos${UNAME_RELEASE}
3737 -       exit 0 ;;
3738 -    TSUNAMI:LynxOS:2.*:*)
3739 -       echo sparc-unknown-lynxos${UNAME_RELEASE}
3740 -       exit 0 ;;
3741 -    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
3742 -       echo rs6000-unknown-lynxos${UNAME_RELEASE}
3743 -       exit 0 ;;
3744 -    SM[BE]S:UNIX_SV:*:*)
3745 -       echo mips-dde-sysv${UNAME_RELEASE}
3746 -       exit 0 ;;
3747 -    RM*:ReliantUNIX-*:*:*)
3748 -       echo mips-sni-sysv4
3749 -       exit 0 ;;
3750 -    RM*:SINIX-*:*:*)
3751 -       echo mips-sni-sysv4
3752 -       exit 0 ;;
3753 -    *:SINIX-*:*:*)
3754 -       if uname -p 2>/dev/null >/dev/null ; then
3755 -               UNAME_MACHINE=`(uname -p) 2>/dev/null`
3756 -               echo ${UNAME_MACHINE}-sni-sysv4
3757 -       else
3758 -               echo ns32k-sni-sysv
3759 -       fi
3760 -       exit 0 ;;
3761 -    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
3762 -                           # says <Richard.M.Bartel@ccMail.Census.GOV>
3763 -        echo i586-unisys-sysv4
3764 -        exit 0 ;;
3765 -    *:UNIX_System_V:4*:FTX*)
3766 -       # From Gerald Hewes <hewes@openmarket.com>.
3767 -       # How about differentiating between stratus architectures? -djm
3768 -       echo hppa1.1-stratus-sysv4
3769 -       exit 0 ;;
3770 -    *:*:*:FTX*)
3771 -       # From seanf@swdc.stratus.com.
3772 -       echo i860-stratus-sysv4
3773 -       exit 0 ;;
3774 -    mc68*:A/UX:*:*)
3775 -       echo m68k-apple-aux${UNAME_RELEASE}
3776 -       exit 0 ;;
3777 -    news*:NEWS-OS:*:6*)
3778 -       echo mips-sony-newsos6
3779 -       exit 0 ;;
3780 -    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
3781 -       if [ -d /usr/nec ]; then
3782 -               echo mips-nec-sysv${UNAME_RELEASE}
3783 -       else
3784 -               echo mips-unknown-sysv${UNAME_RELEASE}
3785 -       fi
3786 -        exit 0 ;;
3787 -    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
3788 -       echo powerpc-be-beos
3789 -       exit 0 ;;
3790 -    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
3791 -       echo powerpc-apple-beos
3792 -       exit 0 ;;
3793 -    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
3794 -       echo i586-pc-beos
3795 -       exit 0 ;;
3796 -    SX-4:SUPER-UX:*:*)
3797 -       echo sx4-nec-superux${UNAME_RELEASE}
3798 -       exit 0 ;;
3799 -    SX-5:SUPER-UX:*:*)
3800 -       echo sx5-nec-superux${UNAME_RELEASE}
3801 -       exit 0 ;;
3802 -    Power*:Rhapsody:*:*)
3803 -       echo powerpc-apple-rhapsody${UNAME_RELEASE}
3804 -       exit 0 ;;
3805 -    *:Rhapsody:*:*)
3806 -       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
3807 -       exit 0 ;;
3808 -esac
3809 -
3810 -#echo '(No uname command or uname output not recognized.)' 1>&2
3811 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
3812 -
3813 -cat >$dummy.c <<EOF
3814 -#ifdef _SEQUENT_
3815 -# include <sys/types.h>
3816 -# include <sys/utsname.h>
3817 -#endif
3818 -main ()
3819 -{
3820 -#if defined (sony)
3821 -#if defined (MIPSEB)
3822 -  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
3823 -     I don't know....  */
3824 -  printf ("mips-sony-bsd\n"); exit (0);
3825 -#else
3826 -#include <sys/param.h>
3827 -  printf ("m68k-sony-newsos%s\n",
3828 -#ifdef NEWSOS4
3829 -          "4"
3830 -#else
3831 -         ""
3832 -#endif
3833 -         ); exit (0);
3834 -#endif
3835 -#endif
3836 -
3837 -#if defined (__arm) && defined (__acorn) && defined (__unix)
3838 -  printf ("arm-acorn-riscix"); exit (0);
3839 -#endif
3840 -
3841 -#if defined (hp300) && !defined (hpux)
3842 -  printf ("m68k-hp-bsd\n"); exit (0);
3843 -#endif
3844 -
3845 -#if defined (NeXT)
3846 -#if !defined (__ARCHITECTURE__)
3847 -#define __ARCHITECTURE__ "m68k"
3848 -#endif
3849 -  int version;
3850 -  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
3851 -  if (version < 4)
3852 -    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
3853 -  else
3854 -    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
3855 -  exit (0);
3856 -#endif
3857 -
3858 -#if defined (MULTIMAX) || defined (n16)
3859 -#if defined (UMAXV)
3860 -  printf ("ns32k-encore-sysv\n"); exit (0);
3861 -#else
3862 -#if defined (CMU)
3863 -  printf ("ns32k-encore-mach\n"); exit (0);
3864 -#else
3865 -  printf ("ns32k-encore-bsd\n"); exit (0);
3866 -#endif
3867 -#endif
3868 -#endif
3869 -
3870 -#if defined (__386BSD__)
3871 -  printf ("i386-pc-bsd\n"); exit (0);
3872 -#endif
3873 -
3874 -#if defined (sequent)
3875 -#if defined (i386)
3876 -  printf ("i386-sequent-dynix\n"); exit (0);
3877 -#endif
3878 -#if defined (ns32000)
3879 -  printf ("ns32k-sequent-dynix\n"); exit (0);
3880 -#endif
3881 -#endif
3882 -
3883 -#if defined (_SEQUENT_)
3884 -    struct utsname un;
3885 -
3886 -    uname(&un);
3887 -
3888 -    if (strncmp(un.version, "V2", 2) == 0) {
3889 -       printf ("i386-sequent-ptx2\n"); exit (0);
3890 -    }
3891 -    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
3892 -       printf ("i386-sequent-ptx1\n"); exit (0);
3893 -    }
3894 -    printf ("i386-sequent-ptx\n"); exit (0);
3895 -
3896 -#endif
3897 -
3898 -#if defined (vax)
3899 -#if !defined (ultrix)
3900 -  printf ("vax-dec-bsd\n"); exit (0);
3901 -#else
3902 -  printf ("vax-dec-ultrix\n"); exit (0);
3903 -#endif
3904 -#endif
3905 -
3906 -#if defined (alliant) && defined (i860)
3907 -  printf ("i860-alliant-bsd\n"); exit (0);
3908 -#endif
3909 -
3910 -  exit (1);
3911 -}
3912 -EOF
3913 -
3914 -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
3915 -rm -f $dummy.c $dummy
3916 -
3917 -# Apollos put the system type in the environment.
3918 -
3919 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
3920 -
3921 -# Convex versions that predate uname can use getsysinfo(1)
3922 -
3923 -if [ -x /usr/convex/getsysinfo ]
3924 -then
3925 -    case `getsysinfo -f cpu_type` in
3926 -    c1*)
3927 -       echo c1-convex-bsd
3928 -       exit 0 ;;
3929 -    c2*)
3930 -       if getsysinfo -f scalar_acc
3931 -       then echo c32-convex-bsd
3932 -       else echo c2-convex-bsd
3933 -       fi
3934 -       exit 0 ;;
3935 -    c34*)
3936 -       echo c34-convex-bsd
3937 -       exit 0 ;;
3938 -    c38*)
3939 -       echo c38-convex-bsd
3940 -       exit 0 ;;
3941 -    c4*)
3942 -       echo c4-convex-bsd
3943 -       exit 0 ;;
3944 -    esac
3945 -fi
3946 -
3947 -#echo '(Unable to guess system type)' 1>&2
3948 -
3949 -exit 1
3950 diff -urNd -urNd patch-2.5.4/config.hin patch-2.5.9/config.hin
3951 --- patch-2.5.4/config.hin      1999-08-30 02:53:17.000000000 -0400
3952 +++ patch-2.5.9/config.hin      2003-05-19 02:50:40.000000000 -0400
3953 @@ -1,169 +1,365 @@
3954 -/* config.hin.  Generated automatically from configure.in by autoheader.  */
3955 +/* config.hin.  Generated from configure.ac by autoheader.  */
3956  
3957 -/* Define if on AIX 3.
3958 -   System headers sometimes define this.
3959 -   We just want to avoid a redefinition error message.  */
3960 -#ifndef _ALL_SOURCE
3961 -#undef _ALL_SOURCE
3962 +/* Define to 1 if the `closedir' function returns void instead of `int'. */
3963 +#undef CLOSEDIR_VOID
3964 +
3965 +/* Define if there is a member named d_ino in the struct describing directory
3966 +   headers. */
3967 +#undef D_INO_IN_DIRENT
3968 +
3969 +/* Define on systems for which file names may have a so-called `drive letter'
3970 +   prefix, define this to compute the length of that prefix, including the
3971 +   colon. */
3972 +#undef FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
3973 +
3974 +/* Define if the backslash character may also serve as a file name component
3975 +   separator. */
3976 +#undef FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
3977 +
3978 +#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
3979 +# define FILESYSTEM_PREFIX_LEN(Filename) \
3980 +  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
3981 +#else
3982 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
3983  #endif
3984  
3985 -/* Define if the closedir function returns void instead of int.  */
3986 -#undef CLOSEDIR_VOID
3987 +/* Define to 1 if you have the <bp-sym.h> header file. */
3988 +#undef HAVE_BP_SYM_H
3989  
3990 -/* Define to empty if the keyword does not work.  */
3991 -#undef const
3992 +/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
3993 +   you don't. */
3994 +#undef HAVE_DECL_CLEARERR_UNLOCKED
3995  
3996 -/* Define if you don't have vprintf but do have _doprnt.  */
3997 -#undef HAVE_DOPRNT
3998 +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
3999 +   don't. */
4000 +#undef HAVE_DECL_FEOF_UNLOCKED
4001  
4002 -/* Define if you support file names longer than 14 characters.  */
4003 -#undef HAVE_LONG_FILE_NAMES
4004 +/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
4005 +   you don't. */
4006 +#undef HAVE_DECL_FERROR_UNLOCKED
4007  
4008 -/* Define if you have the vprintf function.  */
4009 -#undef HAVE_VPRINTF
4010 +/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
4011 +   you don't. */
4012 +#undef HAVE_DECL_FFLUSH_UNLOCKED
4013  
4014 -/* Define if on MINIX.  */
4015 -#undef _MINIX
4016 +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
4017 +   you don't. */
4018 +#undef HAVE_DECL_FGETS_UNLOCKED
4019  
4020 -/* Define to `int' if <sys/types.h> doesn't define.  */
4021 -#undef mode_t
4022 +/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
4023 +   you don't. */
4024 +#undef HAVE_DECL_FPUTC_UNLOCKED
4025  
4026 -/* Define to `long' if <sys/types.h> doesn't define.  */
4027 -#undef off_t
4028 +/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
4029 +   you don't. */
4030 +#undef HAVE_DECL_FPUTS_UNLOCKED
4031  
4032 -/* Define to `int' if <sys/types.h> doesn't define.  */
4033 -#undef pid_t
4034 +/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
4035 +   you don't. */
4036 +#undef HAVE_DECL_FREAD_UNLOCKED
4037  
4038 -/* Define if the system does not provide POSIX.1 features except
4039 -   with this defined.  */
4040 -#undef _POSIX_1_SOURCE
4041 +/* Define to 1 if you have the declaration of `free', and to 0 if you don't.
4042 +   */
4043 +#undef HAVE_DECL_FREE
4044  
4045 -/* Define if you need to in order for stat and other things to work.  */
4046 -#undef _POSIX_SOURCE
4047 +/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
4048 +   you don't. */
4049 +#undef HAVE_DECL_FWRITE_UNLOCKED
4050  
4051 -/* Define as the return type of signal handlers (int or void).  */
4052 -#undef RETSIGTYPE
4053 +/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
4054 +   you don't. */
4055 +#undef HAVE_DECL_GETCHAR_UNLOCKED
4056  
4057 -/* Define to `unsigned' if <sys/types.h> doesn't define.  */
4058 -#undef size_t
4059 +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
4060 +   don't. */
4061 +#undef HAVE_DECL_GETC_UNLOCKED
4062  
4063 -/* Define if you have the ANSI C header files.  */
4064 -#undef STDC_HEADERS
4065 +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
4066 +   */
4067 +#undef HAVE_DECL_GETENV
4068  
4069 -/* Define if you can safely include both <sys/time.h> and <time.h>.  */
4070 -#undef TIME_WITH_SYS_TIME
4071 +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't.
4072 +   */
4073 +#undef HAVE_DECL_MALLOC
4074  
4075 -/* Define if you have the _doprintf function.  */
4076 -#undef HAVE__DOPRINTF
4077 +/* Define to 1 if you have the declaration of `mktemp', and to 0 if you don't.
4078 +   */
4079 +#undef HAVE_DECL_MKTEMP
4080  
4081 -/* Define if you have the fseeko function.  */
4082 +/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
4083 +   you don't. */
4084 +#undef HAVE_DECL_PUTCHAR_UNLOCKED
4085 +
4086 +/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
4087 +   don't. */
4088 +#undef HAVE_DECL_PUTC_UNLOCKED
4089 +
4090 +/* Define to 1 if you have the declaration of `strerror', and to 0 if you
4091 +   don't. */
4092 +#undef HAVE_DECL_STRERROR
4093 +
4094 +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
4095 +   don't. */
4096 +#undef HAVE_DECL_STRERROR_R
4097 +
4098 +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
4099 +   */
4100 +#undef HAVE_DIRENT_H
4101 +
4102 +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
4103 +#undef HAVE_DOPRNT
4104 +
4105 +/* Define to 1 if you have the <fcntl.h> header file. */
4106 +#undef HAVE_FCNTL_H
4107 +
4108 +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
4109  #undef HAVE_FSEEKO
4110  
4111 -/* Define if you have the isascii function.  */
4112 +/* Define to 1 if you have the `geteuid' function. */
4113 +#undef HAVE_GETEUID
4114 +
4115 +/* Define to 1 if you have the `getuid' function. */
4116 +#undef HAVE_GETUID
4117 +
4118 +/* Define to 1 if you have the <inttypes.h> header file. */
4119 +#undef HAVE_INTTYPES_H
4120 +
4121 +/* Define to 1 if you have the `isascii' function. */
4122  #undef HAVE_ISASCII
4123  
4124 -/* Define if you have the memchr function.  */
4125 +/* Define to 1 if you have the `iswprint' function. */
4126 +#undef HAVE_ISWPRINT
4127 +
4128 +/* Define to 1 if you have the <limits.h> header file. */
4129 +#undef HAVE_LIMITS_H
4130 +
4131 +/* Define to 1 if you support file names longer than 14 characters. */
4132 +#undef HAVE_LONG_FILE_NAMES
4133 +
4134 +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
4135 +   to 0 otherwise. */
4136 +#undef HAVE_MALLOC
4137 +
4138 +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
4139 +#undef HAVE_MBRTOWC
4140 +
4141 +/* Define to 1 if you have the `mbsinit' function. */
4142 +#undef HAVE_MBSINIT
4143 +
4144 +/* Define to 1 if <wchar.h> declares mbstate_t. */
4145 +#undef HAVE_MBSTATE_T
4146 +
4147 +/* Define to 1 if you have the `memchr' function. */
4148  #undef HAVE_MEMCHR
4149  
4150 -/* Define if you have the memcmp function.  */
4151 +/* Define to 1 if you have the `memcmp' function. */
4152  #undef HAVE_MEMCMP
4153  
4154 -/* Define if you have the mkdir function.  */
4155 +/* Define to 1 if you have the <memory.h> header file. */
4156 +#undef HAVE_MEMORY_H
4157 +
4158 +/* Define to 1 if you have the `mkdir' function. */
4159  #undef HAVE_MKDIR
4160  
4161 -/* Define if you have the mktemp function.  */
4162 +/* Define to 1 if you have the `mktemp' function. */
4163  #undef HAVE_MKTEMP
4164  
4165 -/* Define if you have the pathconf function.  */
4166 +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
4167 +#undef HAVE_NDIR_H
4168 +
4169 +/* Define to 1 if you have the `pathconf' function. */
4170  #undef HAVE_PATHCONF
4171  
4172 -/* Define if you have the raise function.  */
4173 +/* Define to 1 if you have the `raise' function. */
4174  #undef HAVE_RAISE
4175  
4176 -/* Define if you have the rename function.  */
4177 -#undef HAVE_RENAME
4178 +/* Define to 1 if your system has a GNU libc compatible `realloc' function,
4179 +   and to 0 otherwise. */
4180 +#undef HAVE_REALLOC
4181  
4182 -/* Define if you have the rmdir function.  */
4183 +/* Define to 1 if you have the `rmdir' function. */
4184  #undef HAVE_RMDIR
4185  
4186 -/* Define if you have the setmode function.  */
4187 -#undef HAVE_SETMODE
4188 +/* Define to 1 if you have the DOS-style `setmode' function. */
4189 +#undef HAVE_SETMODE_DOS
4190  
4191 -/* Define if you have the sigaction function.  */
4192 +/* Define to 1 if you have the `sigaction' function. */
4193  #undef HAVE_SIGACTION
4194  
4195 -/* Define if you have the sigprocmask function.  */
4196 +/* Define to 1 if you have the `sigprocmask' function. */
4197  #undef HAVE_SIGPROCMASK
4198  
4199 -/* Define if you have the sigsetmask function.  */
4200 +/* Define to 1 if you have the `sigsetmask' function. */
4201  #undef HAVE_SIGSETMASK
4202  
4203 -/* Define if you have the strerror function.  */
4204 -#undef HAVE_STRERROR
4205 +/* Define to 1 if stdbool.h conforms to C99. */
4206 +#undef HAVE_STDBOOL_H
4207  
4208 -/* Define if you have the <dirent.h> header file.  */
4209 -#undef HAVE_DIRENT_H
4210 +/* Define to 1 if you have the <stddef.h> header file. */
4211 +#undef HAVE_STDDEF_H
4212  
4213 -/* Define if you have the <fcntl.h> header file.  */
4214 -#undef HAVE_FCNTL_H
4215 +/* Define to 1 if you have the <stdint.h> header file. */
4216 +#undef HAVE_STDINT_H
4217  
4218 -/* Define if you have the <limits.h> header file.  */
4219 -#undef HAVE_LIMITS_H
4220 +/* Define to 1 if you have the <stdlib.h> header file. */
4221 +#undef HAVE_STDLIB_H
4222  
4223 -/* Define if you have the <ndir.h> header file.  */
4224 -#undef HAVE_NDIR_H
4225 +/* Define to 1 if you have the `strerror' function. */
4226 +#undef HAVE_STRERROR
4227  
4228 -/* Define if you have the <string.h> header file.  */
4229 +/* Define to 1 if you have the `strerror_r' function. */
4230 +#undef HAVE_STRERROR_R
4231 +
4232 +/* Define to 1 if you have the <strings.h> header file. */
4233 +#undef HAVE_STRINGS_H
4234 +
4235 +/* Define to 1 if you have the <string.h> header file. */
4236  #undef HAVE_STRING_H
4237  
4238 -/* Define if you have the <sys/dir.h> header file.  */
4239 +/* Define to 1 if you have the `strncasecmp' function. */
4240 +#undef HAVE_STRNCASECMP
4241 +
4242 +/* Define if struct utimbuf is declared -- usually in <utime.h>. Some systems
4243 +   have utime.h but don't declare the struct anywhere. */
4244 +#undef HAVE_STRUCT_UTIMBUF
4245 +
4246 +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
4247 +   */
4248  #undef HAVE_SYS_DIR_H
4249  
4250 -/* Define if you have the <sys/ndir.h> header file.  */
4251 +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
4252 +   */
4253  #undef HAVE_SYS_NDIR_H
4254  
4255 -/* Define if you have the <unistd.h> header file.  */
4256 +/* Define to 1 if you have the <sys/stat.h> header file. */
4257 +#undef HAVE_SYS_STAT_H
4258 +
4259 +/* Define to 1 if you have the <sys/time.h> header file. */
4260 +#undef HAVE_SYS_TIME_H
4261 +
4262 +/* Define to 1 if you have the <sys/types.h> header file. */
4263 +#undef HAVE_SYS_TYPES_H
4264 +
4265 +/* Define to 1 if you have the <unistd.h> header file. */
4266  #undef HAVE_UNISTD_H
4267  
4268 -/* Define if you have the <utime.h> header file.  */
4269 +/* Define to 1 if you have the <utime.h> header file. */
4270  #undef HAVE_UTIME_H
4271  
4272 -/* Define if you have the <varargs.h> header file.  */
4273 +/* Define to 1 if you have the <varargs.h> header file. */
4274  #undef HAVE_VARARGS_H
4275  
4276 +/* Define to 1 if you have the `vprintf' function. */
4277 +#undef HAVE_VPRINTF
4278 +
4279 +/* Define to 1 if you have the <wchar.h> header file. */
4280 +#undef HAVE_WCHAR_H
4281 +
4282 +/* Define to 1 if you have the <wctype.h> header file. */
4283 +#undef HAVE_WCTYPE_H
4284 +
4285 +/* Define to 1 if the system has the type `_Bool'. */
4286 +#undef HAVE__BOOL
4287 +
4288 +/* Define to 1 if you have the `_doprintf' function. */
4289 +#undef HAVE__DOPRINTF
4290 +
4291 +#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
4292 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4293 +#else
4294 +# define ISSLASH(C) ((C) == '/')
4295 +#endif
4296 +
4297 +/* Define if mkdir takes only one argument. */
4298 +#undef MKDIR_TAKES_ONE_ARG
4299 +
4300 +/* Define to the address where bug reports for this package should be sent. */
4301 +#undef PACKAGE_BUGREPORT
4302 +
4303 +/* Define to the full name of this package. */
4304 +#undef PACKAGE_NAME
4305 +
4306 +/* Define to the full name and version of this package. */
4307 +#undef PACKAGE_STRING
4308 +
4309 +/* Define to the one symbol short name of this package. */
4310 +#undef PACKAGE_TARNAME
4311 +
4312 +/* Define to the version of this package. */
4313 +#undef PACKAGE_VERSION
4314 +
4315 +/* Define to 1 if the C compiler supports function prototypes. */
4316 +#undef PROTOTYPES
4317 +
4318 +/* Define as the return type of signal handlers (`int' or `void'). */
4319 +#undef RETSIGTYPE
4320 +
4321 +/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
4322 +#undef STAT_MACROS_BROKEN
4323 +
4324 +/* Define to 1 if you have the ANSI C header files. */
4325 +#undef STDC_HEADERS
4326 +
4327 +/* Define to 1 if strerror_r returns char *. */
4328 +#undef STRERROR_R_CHAR_P
4329 +
4330 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
4331 +#undef TIME_WITH_SYS_TIME
4332 +
4333 +/* Define to 1 if on AIX 3.
4334 +   System headers sometimes define this.
4335 +   We just want to avoid a redefinition error message.  */
4336 +#ifndef _ALL_SOURCE
4337 +# undef _ALL_SOURCE
4338 +#endif
4339 +
4340  /* Number of bits in a file offset, on hosts where this is settable. */
4341  #undef _FILE_OFFSET_BITS
4342  
4343 -/* Define to make fseeko etc. visible, on some hosts. */
4344 +/* Enable GNU extensions on systems that have them.  */
4345 +#ifndef _GNU_SOURCE
4346 +# undef _GNU_SOURCE
4347 +#endif
4348 +
4349 +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
4350  #undef _LARGEFILE_SOURCE
4351  
4352  /* Define for large files, on AIX-style hosts. */
4353  #undef _LARGE_FILES
4354  
4355 -/* Define if compiler has function prototypes */
4356 -#undef PROTOTYPES
4357 +/* Define to 1 if on MINIX. */
4358 +#undef _MINIX
4359  
4360 -/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
4361 -   and declares uintmax_t.  */
4362 -#undef HAVE_INTTYPES_H
4363 +/* Define to 2 if the system does not provide POSIX.1 features except with
4364 +   this defined. */
4365 +#undef _POSIX_1_SOURCE
4366  
4367 -/* Define if struct utimbuf is declared -- usually in <utime.h>.
4368 -   Some systems have utime.h but don't declare the struct anywhere.  */
4369 -#undef HAVE_STRUCT_UTIMBUF
4370 +/* Define to 1 if you need to in order for `stat' and other things to work. */
4371 +#undef _POSIX_SOURCE
4372  
4373 -/* Define if the malloc check has been performed.  */
4374 -#undef HAVE_DONE_WORKING_MALLOC_CHECK
4375 +/* Define like PROTOTYPES; this can be used by system headers. */
4376 +#undef __PROTOTYPES
4377 +
4378 +/* Define to empty if `const' does not conform to ANSI C. */
4379 +#undef const
4380  
4381  /* Define to rpl_malloc if the replacement function should be used. */
4382  #undef malloc
4383  
4384 -/* Define if the realloc check has been performed.  */
4385 -#undef HAVE_DONE_WORKING_REALLOC_CHECK
4386 +/* Define to a type if <wchar.h> does not define. */
4387 +#undef mbstate_t
4388 +
4389 +/* Define to `int' if <sys/types.h> does not define. */
4390 +#undef mode_t
4391 +
4392 +/* Define to `long' if <sys/types.h> does not define. */
4393 +#undef off_t
4394 +
4395 +/* Define to `int' if <sys/types.h> does not define. */
4396 +#undef pid_t
4397  
4398  /* Define to rpl_realloc if the replacement function should be used. */
4399  #undef realloc
4400  
4401 -/* Define if there is a member named d_ino in the struct describing
4402 -   directory headers. */
4403 -#undef D_INO_IN_DIRENT
4404 -
4405 +/* Define to `unsigned' if <sys/types.h> does not define. */
4406 +#undef size_t
4407 diff -urNd -urNd patch-2.5.4/config.sub patch-2.5.9/config.sub
4408 --- patch-2.5.4/config.sub      1999-08-05 08:55:20.000000000 -0400
4409 +++ patch-2.5.9/config.sub      1969-12-31 19:00:00.000000000 -0500
4410 @@ -1,1220 +0,0 @@
4411 -#! /bin/sh
4412 -# Configuration validation subroutine script, version 1.1.
4413 -#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
4414 -# This file is (in principle) common to ALL GNU software.
4415 -# The presence of a machine in this file suggests that SOME GNU software
4416 -# can handle that machine.  It does not imply ALL GNU software can.
4417 -#
4418 -# This file is free software; you can redistribute it and/or modify
4419 -# it under the terms of the GNU General Public License as published by
4420 -# the Free Software Foundation; either version 2 of the License, or
4421 -# (at your option) any later version.
4422 -#
4423 -# This program is distributed in the hope that it will be useful,
4424 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
4425 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4426 -# GNU General Public License for more details.
4427 -#
4428 -# You should have received a copy of the GNU General Public License
4429 -# along with this program; if not, write to the Free Software
4430 -# Foundation, Inc., 59 Temple Place - Suite 330,
4431 -# Boston, MA 02111-1307, USA.
4432 -
4433 -# As a special exception to the GNU General Public License, if you
4434 -# distribute this file as part of a program that contains a
4435 -# configuration script generated by Autoconf, you may include it under
4436 -# the same distribution terms that you use for the rest of that program.
4437 -
4438 -# Configuration subroutine to validate and canonicalize a configuration type.
4439 -# Supply the specified configuration type as an argument.
4440 -# If it is invalid, we print an error message on stderr and exit with code 1.
4441 -# Otherwise, we print the canonical config type on stdout and succeed.
4442 -
4443 -# This file is supposed to be the same for all GNU packages
4444 -# and recognize all the CPU types, system types and aliases
4445 -# that are meaningful with *any* GNU software.
4446 -# Each package is responsible for reporting which valid configurations
4447 -# it does not support.  The user should be able to distinguish
4448 -# a failure to support a valid configuration from a meaningless
4449 -# configuration.
4450 -
4451 -# The goal of this file is to map all the various variations of a given
4452 -# machine specification into a single specification in the form:
4453 -#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
4454 -# or in some cases, the newer four-part form:
4455 -#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
4456 -# It is wrong to echo any other type of specification.
4457 -
4458 -if [ x$1 = x ]
4459 -then
4460 -       echo Configuration name missing. 1>&2
4461 -       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
4462 -       echo "or     $0 ALIAS" 1>&2
4463 -       echo where ALIAS is a recognized configuration type. 1>&2
4464 -       exit 1
4465 -fi
4466 -
4467 -# First pass through any local machine types.
4468 -case $1 in
4469 -       *local*)
4470 -               echo $1
4471 -               exit 0
4472 -               ;;
4473 -       *)
4474 -       ;;
4475 -esac
4476 -
4477 -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
4478 -# Here we must recognize all the valid KERNEL-OS combinations.
4479 -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
4480 -case $maybe_os in
4481 -  linux-gnu*)
4482 -    os=-$maybe_os
4483 -    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
4484 -    ;;
4485 -  *)
4486 -    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
4487 -    if [ $basic_machine != $1 ]
4488 -    then os=`echo $1 | sed 's/.*-/-/'`
4489 -    else os=; fi
4490 -    ;;
4491 -esac
4492 -
4493 -### Let's recognize common machines as not being operating systems so
4494 -### that things like config.sub decstation-3100 work.  We also
4495 -### recognize some manufacturers as not being operating systems, so we
4496 -### can provide default operating systems below.
4497 -case $os in
4498 -       -sun*os*)
4499 -               # Prevent following clause from handling this invalid input.
4500 -               ;;
4501 -       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
4502 -       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
4503 -       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
4504 -       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
4505 -       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
4506 -       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
4507 -       -apple)
4508 -               os=
4509 -               basic_machine=$1
4510 -               ;;
4511 -       -sim | -cisco | -oki | -wec | -winbond)
4512 -               os=
4513 -               basic_machine=$1
4514 -               ;;
4515 -       -scout)
4516 -               ;;
4517 -       -wrs)
4518 -               os=-vxworks
4519 -               basic_machine=$1
4520 -               ;;
4521 -       -hiux*)
4522 -               os=-hiuxwe2
4523 -               ;;
4524 -       -sco5)
4525 -               os=-sco3.2v5
4526 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4527 -               ;;
4528 -       -sco4)
4529 -               os=-sco3.2v4
4530 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4531 -               ;;
4532 -       -sco3.2.[4-9]*)
4533 -               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
4534 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4535 -               ;;
4536 -       -sco3.2v[4-9]*)
4537 -               # Don't forget version if it is 3.2v4 or newer.
4538 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4539 -               ;;
4540 -       -sco*)
4541 -               os=-sco3.2v2
4542 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4543 -               ;;
4544 -       -udk*)
4545 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4546 -               ;;
4547 -       -isc)
4548 -               os=-isc2.2
4549 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4550 -               ;;
4551 -       -clix*)
4552 -               basic_machine=clipper-intergraph
4553 -               ;;
4554 -       -isc*)
4555 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4556 -               ;;
4557 -       -lynx*)
4558 -               os=-lynxos
4559 -               ;;
4560 -       -ptx*)
4561 -               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
4562 -               ;;
4563 -       -windowsnt*)
4564 -               os=`echo $os | sed -e 's/windowsnt/winnt/'`
4565 -               ;;
4566 -       -psos*)
4567 -               os=-psos
4568 -               ;;
4569 -       -mint | -mint[0-9]*)
4570 -               basic_machine=m68k-atari
4571 -               os=-mint
4572 -               ;;
4573 -esac
4574 -
4575 -# Decode aliases for certain CPU-COMPANY combinations.
4576 -case $basic_machine in
4577 -       # Recognize the basic CPU types without company name.
4578 -       # Some are omitted here because they have special meanings below.
4579 -       tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
4580 -               | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
4581 -               | 580 | i960 | h8300 \
4582 -               | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
4583 -               | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
4584 -               | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
4585 -               | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
4586 -               | mips64orion | mips64orionel | mipstx39 | mipstx39el \
4587 -               | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
4588 -               | mips64vr5000 | miprs64vr5000el | mcore \
4589 -               | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
4590 -               | thumb | d10v)
4591 -               basic_machine=$basic_machine-unknown
4592 -               ;;
4593 -       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
4594 -               ;;
4595 -
4596 -       # We use `pc' rather than `unknown'
4597 -       # because (1) that's what they normally are, and
4598 -       # (2) the word "unknown" tends to confuse beginning users.
4599 -       i[34567]86)
4600 -         basic_machine=$basic_machine-pc
4601 -         ;;
4602 -       # Object if more than one company name word.
4603 -       *-*-*)
4604 -               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
4605 -               exit 1
4606 -               ;;
4607 -       # Recognize the basic CPU types with company name.
4608 -       # FIXME: clean up the formatting here.
4609 -       vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
4610 -             | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
4611 -             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
4612 -             | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
4613 -             | xmp-* | ymp-* \
4614 -             | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
4615 -             | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
4616 -             | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
4617 -             | clipper-* | orion-* \
4618 -             | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
4619 -             | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
4620 -             | mips64el-* | mips64orion-* | mips64orionel-* \
4621 -             | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
4622 -             | mipstx39-* | mipstx39el-* | mcore-* \
4623 -             | f301-* | armv*-* | t3e-* \
4624 -             | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
4625 -             | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
4626 -               ;;
4627 -       # Recognize the various machine names and aliases which stand
4628 -       # for a CPU type and a company and sometimes even an OS.
4629 -       386bsd)
4630 -               basic_machine=i386-unknown
4631 -               os=-bsd
4632 -               ;;
4633 -       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
4634 -               basic_machine=m68000-att
4635 -               ;;
4636 -       3b*)
4637 -               basic_machine=we32k-att
4638 -               ;;
4639 -       a29khif)
4640 -               basic_machine=a29k-amd
4641 -               os=-udi
4642 -               ;;
4643 -       adobe68k)
4644 -               basic_machine=m68010-adobe
4645 -               os=-scout
4646 -               ;;
4647 -       alliant | fx80)
4648 -               basic_machine=fx80-alliant
4649 -               ;;
4650 -       altos | altos3068)
4651 -               basic_machine=m68k-altos
4652 -               ;;
4653 -       am29k)
4654 -               basic_machine=a29k-none
4655 -               os=-bsd
4656 -               ;;
4657 -       amdahl)
4658 -               basic_machine=580-amdahl
4659 -               os=-sysv
4660 -               ;;
4661 -       amiga | amiga-*)
4662 -               basic_machine=m68k-cbm
4663 -               ;;
4664 -       amigaos | amigados)
4665 -               basic_machine=m68k-cbm
4666 -               os=-amigaos
4667 -               ;;
4668 -       amigaunix | amix)
4669 -               basic_machine=m68k-cbm
4670 -               os=-sysv4
4671 -               ;;
4672 -       apollo68)
4673 -               basic_machine=m68k-apollo
4674 -               os=-sysv
4675 -               ;;
4676 -       apollo68bsd)
4677 -               basic_machine=m68k-apollo
4678 -               os=-bsd
4679 -               ;;
4680 -       aux)
4681 -               basic_machine=m68k-apple
4682 -               os=-aux
4683 -               ;;
4684 -       balance)
4685 -               basic_machine=ns32k-sequent
4686 -               os=-dynix
4687 -               ;;
4688 -       convex-c1)
4689 -               basic_machine=c1-convex
4690 -               os=-bsd
4691 -               ;;
4692 -       convex-c2)
4693 -               basic_machine=c2-convex
4694 -               os=-bsd
4695 -               ;;
4696 -       convex-c32)
4697 -               basic_machine=c32-convex
4698 -               os=-bsd
4699 -               ;;
4700 -       convex-c34)
4701 -               basic_machine=c34-convex
4702 -               os=-bsd
4703 -               ;;
4704 -       convex-c38)
4705 -               basic_machine=c38-convex
4706 -               os=-bsd
4707 -               ;;
4708 -       cray | ymp)
4709 -               basic_machine=ymp-cray
4710 -               os=-unicos
4711 -               ;;
4712 -       cray2)
4713 -               basic_machine=cray2-cray
4714 -               os=-unicos
4715 -               ;;
4716 -       [ctj]90-cray)
4717 -               basic_machine=c90-cray
4718 -               os=-unicos
4719 -               ;;
4720 -       crds | unos)
4721 -               basic_machine=m68k-crds
4722 -               ;;
4723 -       da30 | da30-*)
4724 -               basic_machine=m68k-da30
4725 -               ;;
4726 -       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
4727 -               basic_machine=mips-dec
4728 -               ;;
4729 -       delta | 3300 | motorola-3300 | motorola-delta \
4730 -             | 3300-motorola | delta-motorola)
4731 -               basic_machine=m68k-motorola
4732 -               ;;
4733 -       delta88)
4734 -               basic_machine=m88k-motorola
4735 -               os=-sysv3
4736 -               ;;
4737 -       dpx20 | dpx20-*)
4738 -               basic_machine=rs6000-bull
4739 -               os=-bosx
4740 -               ;;
4741 -       dpx2* | dpx2*-bull)
4742 -               basic_machine=m68k-bull
4743 -               os=-sysv3
4744 -               ;;
4745 -       ebmon29k)
4746 -               basic_machine=a29k-amd
4747 -               os=-ebmon
4748 -               ;;
4749 -       elxsi)
4750 -               basic_machine=elxsi-elxsi
4751 -               os=-bsd
4752 -               ;;
4753 -       encore | umax | mmax)
4754 -               basic_machine=ns32k-encore
4755 -               ;;
4756 -       es1800 | OSE68k | ose68k | ose | OSE)
4757 -               basic_machine=m68k-ericsson
4758 -               os=-ose
4759 -               ;;
4760 -       fx2800)
4761 -               basic_machine=i860-alliant
4762 -               ;;
4763 -       genix)
4764 -               basic_machine=ns32k-ns
4765 -               ;;
4766 -       gmicro)
4767 -               basic_machine=tron-gmicro
4768 -               os=-sysv
4769 -               ;;
4770 -       h3050r* | hiux*)
4771 -               basic_machine=hppa1.1-hitachi
4772 -               os=-hiuxwe2
4773 -               ;;
4774 -       h8300hms)
4775 -               basic_machine=h8300-hitachi
4776 -               os=-hms
4777 -               ;;
4778 -       h8300xray)
4779 -               basic_machine=h8300-hitachi
4780 -               os=-xray
4781 -               ;;
4782 -       h8500hms)
4783 -               basic_machine=h8500-hitachi
4784 -               os=-hms
4785 -               ;;
4786 -       harris)
4787 -               basic_machine=m88k-harris
4788 -               os=-sysv3
4789 -               ;;
4790 -       hp300-*)
4791 -               basic_machine=m68k-hp
4792 -               ;;
4793 -       hp300bsd)
4794 -               basic_machine=m68k-hp
4795 -               os=-bsd
4796 -               ;;
4797 -       hp300hpux)
4798 -               basic_machine=m68k-hp
4799 -               os=-hpux
4800 -               ;;
4801 -       hp3k9[0-9][0-9] | hp9[0-9][0-9])
4802 -               basic_machine=hppa1.0-hp
4803 -               ;;
4804 -       hp9k2[0-9][0-9] | hp9k31[0-9])
4805 -               basic_machine=m68000-hp
4806 -               ;;
4807 -       hp9k3[2-9][0-9])
4808 -               basic_machine=m68k-hp
4809 -               ;;
4810 -       hp9k6[0-9][0-9] | hp6[0-9][0-9])
4811 -               basic_machine=hppa1.0-hp
4812 -               ;;
4813 -       hp9k7[0-79][0-9] | hp7[0-79][0-9])
4814 -               basic_machine=hppa1.1-hp
4815 -               ;;
4816 -       hp9k78[0-9] | hp78[0-9])
4817 -               # FIXME: really hppa2.0-hp
4818 -               basic_machine=hppa1.1-hp
4819 -               ;;
4820 -       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
4821 -               # FIXME: really hppa2.0-hp
4822 -               basic_machine=hppa1.1-hp
4823 -               ;;
4824 -       hp9k8[0-9][13679] | hp8[0-9][13679])
4825 -               basic_machine=hppa1.1-hp
4826 -               ;;
4827 -       hp9k8[0-9][0-9] | hp8[0-9][0-9])
4828 -               basic_machine=hppa1.0-hp
4829 -               ;;
4830 -       hppa-next)
4831 -               os=-nextstep3
4832 -               ;;
4833 -       hppaosf)
4834 -               basic_machine=hppa1.1-hp
4835 -               os=-osf
4836 -               ;;
4837 -       hppro)
4838 -               basic_machine=hppa1.1-hp
4839 -               os=-proelf
4840 -               ;;
4841 -       i370-ibm* | ibm*)
4842 -               basic_machine=i370-ibm
4843 -               os=-mvs
4844 -               ;;
4845 -# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
4846 -       i[34567]86v32)
4847 -               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4848 -               os=-sysv32
4849 -               ;;
4850 -       i[34567]86v4*)
4851 -               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4852 -               os=-sysv4
4853 -               ;;
4854 -       i[34567]86v)
4855 -               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4856 -               os=-sysv
4857 -               ;;
4858 -       i[34567]86sol2)
4859 -               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4860 -               os=-solaris2
4861 -               ;;
4862 -       i386mach)
4863 -               basic_machine=i386-mach
4864 -               os=-mach
4865 -               ;;
4866 -       i386-vsta | vsta)
4867 -               basic_machine=i386-unknown
4868 -               os=-vsta
4869 -               ;;
4870 -       i386-go32 | go32)
4871 -               basic_machine=i386-unknown
4872 -               os=-go32
4873 -               ;;
4874 -       i386-mingw32 | mingw32)
4875 -               basic_machine=i386-unknown
4876 -               os=-mingw32
4877 -               ;;
4878 -       iris | iris4d)
4879 -               basic_machine=mips-sgi
4880 -               case $os in
4881 -                   -irix*)
4882 -                       ;;
4883 -                   *)
4884 -                       os=-irix4
4885 -                       ;;
4886 -               esac
4887 -               ;;
4888 -       isi68 | isi)
4889 -               basic_machine=m68k-isi
4890 -               os=-sysv
4891 -               ;;
4892 -       m88k-omron*)
4893 -               basic_machine=m88k-omron
4894 -               ;;
4895 -       magnum | m3230)
4896 -               basic_machine=mips-mips
4897 -               os=-sysv
4898 -               ;;
4899 -       merlin)
4900 -               basic_machine=ns32k-utek
4901 -               os=-sysv
4902 -               ;;
4903 -       miniframe)
4904 -               basic_machine=m68000-convergent
4905 -               ;;
4906 -       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
4907 -               basic_machine=m68k-atari
4908 -               os=-mint
4909 -               ;;
4910 -       mipsel*-linux*)
4911 -               basic_machine=mipsel-unknown
4912 -               os=-linux-gnu
4913 -               ;;
4914 -       mips*-linux*)
4915 -               basic_machine=mips-unknown
4916 -               os=-linux-gnu
4917 -               ;;
4918 -       mips3*-*)
4919 -               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
4920 -               ;;
4921 -       mips3*)
4922 -               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
4923 -               ;;
4924 -       monitor)
4925 -               basic_machine=m68k-rom68k
4926 -               os=-coff
4927 -               ;;
4928 -       msdos)
4929 -               basic_machine=i386-unknown
4930 -               os=-msdos
4931 -               ;;
4932 -       ncr3000)
4933 -               basic_machine=i486-ncr
4934 -               os=-sysv4
4935 -               ;;
4936 -       netbsd386)
4937 -               basic_machine=i386-unknown
4938 -               os=-netbsd
4939 -               ;;
4940 -       netwinder)
4941 -               basic_machine=armv4l-corel
4942 -               os=-linux
4943 -               ;;
4944 -       news | news700 | news800 | news900)
4945 -               basic_machine=m68k-sony
4946 -               os=-newsos
4947 -               ;;
4948 -       news1000)
4949 -               basic_machine=m68030-sony
4950 -               os=-newsos
4951 -               ;;
4952 -       news-3600 | risc-news)
4953 -               basic_machine=mips-sony
4954 -               os=-newsos
4955 -               ;;
4956 -       necv70)
4957 -               basic_machine=v70-nec
4958 -               os=-sysv
4959 -               ;;
4960 -       next | m*-next )
4961 -               basic_machine=m68k-next
4962 -               case $os in
4963 -                   -nextstep* )
4964 -                       ;;
4965 -                   -ns2*)
4966 -                     os=-nextstep2
4967 -                       ;;
4968 -                   *)
4969 -                     os=-nextstep3
4970 -                       ;;
4971 -               esac
4972 -               ;;
4973 -       nh3000)
4974 -               basic_machine=m68k-harris
4975 -               os=-cxux
4976 -               ;;
4977 -       nh[45]000)
4978 -               basic_machine=m88k-harris
4979 -               os=-cxux
4980 -               ;;
4981 -       nindy960)
4982 -               basic_machine=i960-intel
4983 -               os=-nindy
4984 -               ;;
4985 -       mon960)
4986 -               basic_machine=i960-intel
4987 -               os=-mon960
4988 -               ;;
4989 -       np1)
4990 -               basic_machine=np1-gould
4991 -               ;;
4992 -       op50n-* | op60c-*)
4993 -               basic_machine=hppa1.1-oki
4994 -               os=-proelf
4995 -               ;;
4996 -       OSE68000 | ose68000)
4997 -               basic_machine=m68000-ericsson
4998 -               os=-ose
4999 -               ;;
5000 -       os68k)
5001 -               basic_machine=m68k-none
5002 -               os=-os68k
5003 -               ;;
5004 -       pa-hitachi)
5005 -               basic_machine=hppa1.1-hitachi
5006 -               os=-hiuxwe2
5007 -               ;;
5008 -       paragon)
5009 -               basic_machine=i860-intel
5010 -               os=-osf
5011 -               ;;
5012 -       pbd)
5013 -               basic_machine=sparc-tti
5014 -               ;;
5015 -       pbb)
5016 -               basic_machine=m68k-tti
5017 -               ;;
5018 -        pc532 | pc532-*)
5019 -               basic_machine=ns32k-pc532
5020 -               ;;
5021 -       pentium | p5 | k5 | k6 | nexen)
5022 -               basic_machine=i586-pc
5023 -               ;;
5024 -       pentiumpro | p6 | 6x86)
5025 -               basic_machine=i686-pc
5026 -               ;;
5027 -       pentiumii | pentium2)
5028 -               basic_machine=i786-pc
5029 -               ;;
5030 -       pentium-* | p5-* | k5-* | k6-* | nexen-*)
5031 -               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
5032 -               ;;
5033 -       pentiumpro-* | p6-* | 6x86-*)
5034 -               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
5035 -               ;;
5036 -       pentiumii-* | pentium2-*)
5037 -               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
5038 -               ;;
5039 -       pn)
5040 -               basic_machine=pn-gould
5041 -               ;;
5042 -       power)  basic_machine=rs6000-ibm
5043 -               ;;
5044 -       ppc)    basic_machine=powerpc-unknown
5045 -               ;;
5046 -       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
5047 -               ;;
5048 -       ppcle | powerpclittle | ppc-le | powerpc-little)
5049 -               basic_machine=powerpcle-unknown
5050 -               ;;
5051 -       ppcle-* | powerpclittle-*)
5052 -               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
5053 -               ;;
5054 -       ps2)
5055 -               basic_machine=i386-ibm
5056 -               ;;
5057 -       rom68k)
5058 -               basic_machine=m68k-rom68k
5059 -               os=-coff
5060 -               ;;
5061 -       rm[46]00)
5062 -               basic_machine=mips-siemens
5063 -               ;;
5064 -       rtpc | rtpc-*)
5065 -               basic_machine=romp-ibm
5066 -               ;;
5067 -       sa29200)
5068 -               basic_machine=a29k-amd
5069 -               os=-udi
5070 -               ;;
5071 -       sequent)
5072 -               basic_machine=i386-sequent
5073 -               ;;
5074 -       sh)
5075 -               basic_machine=sh-hitachi
5076 -               os=-hms
5077 -               ;;
5078 -       sparclite-wrs)
5079 -               basic_machine=sparclite-wrs
5080 -               os=-vxworks
5081 -               ;;
5082 -       sps7)
5083 -               basic_machine=m68k-bull
5084 -               os=-sysv2
5085 -               ;;
5086 -       spur)
5087 -               basic_machine=spur-unknown
5088 -               ;;
5089 -       st2000)
5090 -               basic_machine=m68k-tandem
5091 -               ;;
5092 -       stratus)
5093 -               basic_machine=i860-stratus
5094 -               os=-sysv4
5095 -               ;;
5096 -       sun2)
5097 -               basic_machine=m68000-sun
5098 -               ;;
5099 -       sun2os3)
5100 -               basic_machine=m68000-sun
5101 -               os=-sunos3
5102 -               ;;
5103 -       sun2os4)
5104 -               basic_machine=m68000-sun
5105 -               os=-sunos4
5106 -               ;;
5107 -       sun3os3)
5108 -               basic_machine=m68k-sun
5109 -               os=-sunos3
5110 -               ;;
5111 -       sun3os4)
5112 -               basic_machine=m68k-sun
5113 -               os=-sunos4
5114 -               ;;
5115 -       sun4os3)
5116 -               basic_machine=sparc-sun
5117 -               os=-sunos3
5118 -               ;;
5119 -       sun4os4)
5120 -               basic_machine=sparc-sun
5121 -               os=-sunos4
5122 -               ;;
5123 -       sun4sol2)
5124 -               basic_machine=sparc-sun
5125 -               os=-solaris2
5126 -               ;;
5127 -       sun3 | sun3-*)
5128 -               basic_machine=m68k-sun
5129 -               ;;
5130 -       sun4)
5131 -               basic_machine=sparc-sun
5132 -               ;;
5133 -       sun386 | sun386i | roadrunner)
5134 -               basic_machine=i386-sun
5135 -               ;;
5136 -       symmetry)
5137 -               basic_machine=i386-sequent
5138 -               os=-dynix
5139 -               ;;
5140 -       t3e)
5141 -               basic_machine=t3e-cray
5142 -               os=-unicos
5143 -               ;;
5144 -       tx39)
5145 -               basic_machine=mipstx39-unknown
5146 -               ;;
5147 -       tx39el)
5148 -               basic_machine=mipstx39el-unknown
5149 -               ;;
5150 -       tower | tower-32)
5151 -               basic_machine=m68k-ncr
5152 -               ;;
5153 -       udi29k)
5154 -               basic_machine=a29k-amd
5155 -               os=-udi
5156 -               ;;
5157 -       ultra3)
5158 -               basic_machine=a29k-nyu
5159 -               os=-sym1
5160 -               ;;
5161 -       v810 | necv810)
5162 -               basic_machine=v810-nec
5163 -               os=-none
5164 -               ;;
5165 -       vaxv)
5166 -               basic_machine=vax-dec
5167 -               os=-sysv
5168 -               ;;
5169 -       vms)
5170 -               basic_machine=vax-dec
5171 -               os=-vms
5172 -               ;;
5173 -       vpp*|vx|vx-*)
5174 -               basic_machine=f301-fujitsu
5175 -               ;;
5176 -       vxworks960)
5177 -               basic_machine=i960-wrs
5178 -               os=-vxworks
5179 -               ;;
5180 -       vxworks68)
5181 -               basic_machine=m68k-wrs
5182 -               os=-vxworks
5183 -               ;;
5184 -       vxworks29k)
5185 -               basic_machine=a29k-wrs
5186 -               os=-vxworks
5187 -               ;;
5188 -       w65*)
5189 -               basic_machine=w65-wdc
5190 -               os=-none
5191 -               ;;
5192 -       w89k-*)
5193 -               basic_machine=hppa1.1-winbond
5194 -               os=-proelf
5195 -               ;;
5196 -       xmp)
5197 -               basic_machine=xmp-cray
5198 -               os=-unicos
5199 -               ;;
5200 -        xps | xps100)
5201 -               basic_machine=xps100-honeywell
5202 -               ;;
5203 -       z8k-*-coff)
5204 -               basic_machine=z8k-unknown
5205 -               os=-sim
5206 -               ;;
5207 -       none)
5208 -               basic_machine=none-none
5209 -               os=-none
5210 -               ;;
5211 -
5212 -# Here we handle the default manufacturer of certain CPU types.  It is in
5213 -# some cases the only manufacturer, in others, it is the most popular.
5214 -       w89k)
5215 -               basic_machine=hppa1.1-winbond
5216 -               ;;
5217 -       op50n)
5218 -               basic_machine=hppa1.1-oki
5219 -               ;;
5220 -       op60c)
5221 -               basic_machine=hppa1.1-oki
5222 -               ;;
5223 -       mips)
5224 -               if [ x$os = x-linux-gnu ]; then
5225 -                       basic_machine=mips-unknown
5226 -               else
5227 -                       basic_machine=mips-mips
5228 -               fi
5229 -               ;;
5230 -       romp)
5231 -               basic_machine=romp-ibm
5232 -               ;;
5233 -       rs6000)
5234 -               basic_machine=rs6000-ibm
5235 -               ;;
5236 -       vax)
5237 -               basic_machine=vax-dec
5238 -               ;;
5239 -       pdp11)
5240 -               basic_machine=pdp11-dec
5241 -               ;;
5242 -       we32k)
5243 -               basic_machine=we32k-att
5244 -               ;;
5245 -       sparc | sparcv9)
5246 -               basic_machine=sparc-sun
5247 -               ;;
5248 -        cydra)
5249 -               basic_machine=cydra-cydrome
5250 -               ;;
5251 -       orion)
5252 -               basic_machine=orion-highlevel
5253 -               ;;
5254 -       orion105)
5255 -               basic_machine=clipper-highlevel
5256 -               ;;
5257 -       mac | mpw | mac-mpw)
5258 -               basic_machine=m68k-apple
5259 -               ;;
5260 -       pmac | pmac-mpw)
5261 -               basic_machine=powerpc-apple
5262 -               ;;
5263 -       c4x*)
5264 -               basic_machine=c4x-none
5265 -               os=-coff
5266 -               ;;
5267 -       *)
5268 -               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
5269 -               exit 1
5270 -               ;;
5271 -esac
5272 -
5273 -# Here we canonicalize certain aliases for manufacturers.
5274 -case $basic_machine in
5275 -       *-digital*)
5276 -               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
5277 -               ;;
5278 -       *-commodore*)
5279 -               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
5280 -               ;;
5281 -       *)
5282 -               ;;
5283 -esac
5284 -
5285 -# Decode manufacturer-specific aliases for certain operating systems.
5286 -
5287 -if [ x"$os" != x"" ]
5288 -then
5289 -case $os in
5290 -        # First match some system type aliases
5291 -        # that might get confused with valid system types.
5292 -       # -solaris* is a basic system type, with this one exception.
5293 -       -solaris1 | -solaris1.*)
5294 -               os=`echo $os | sed -e 's|solaris1|sunos4|'`
5295 -               ;;
5296 -       -solaris)
5297 -               os=-solaris2
5298 -               ;;
5299 -       -svr4*)
5300 -               os=-sysv4
5301 -               ;;
5302 -       -unixware*)
5303 -               os=-sysv4.2uw
5304 -               ;;
5305 -       -gnu/linux*)
5306 -               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
5307 -               ;;
5308 -       # First accept the basic system types.
5309 -       # The portable systems comes first.
5310 -       # Each alternative MUST END IN A *, to match a version number.
5311 -       # -sysv* is not here because it comes later, after sysvr4.
5312 -       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
5313 -             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
5314 -             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
5315 -             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
5316 -             | -aos* \
5317 -             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
5318 -             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
5319 -             | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
5320 -             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
5321 -             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
5322 -             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
5323 -             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
5324 -             | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
5325 -             | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
5326 -       # Remember, each alternative MUST END IN *, to match a version number.
5327 -               ;;
5328 -       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
5329 -             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
5330 -             | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
5331 -               ;;
5332 -       -mac*)
5333 -               os=`echo $os | sed -e 's|mac|macos|'`
5334 -               ;;
5335 -       -linux*)
5336 -               os=`echo $os | sed -e 's|linux|linux-gnu|'`
5337 -               ;;
5338 -       -sunos5*)
5339 -               os=`echo $os | sed -e 's|sunos5|solaris2|'`
5340 -               ;;
5341 -       -sunos6*)
5342 -               os=`echo $os | sed -e 's|sunos6|solaris3|'`
5343 -               ;;
5344 -       -osfrose*)
5345 -               os=-osfrose
5346 -               ;;
5347 -       -osf*)
5348 -               os=-osf
5349 -               ;;
5350 -       -utek*)
5351 -               os=-bsd
5352 -               ;;
5353 -       -dynix*)
5354 -               os=-bsd
5355 -               ;;
5356 -       -acis*)
5357 -               os=-aos
5358 -               ;;
5359 -       -386bsd)
5360 -               os=-bsd
5361 -               ;;
5362 -       -ctix* | -uts*)
5363 -               os=-sysv
5364 -               ;;
5365 -       -ns2 )
5366 -               os=-nextstep2
5367 -               ;;
5368 -       # Preserve the version number of sinix5.
5369 -       -sinix5.*)
5370 -               os=`echo $os | sed -e 's|sinix|sysv|'`
5371 -               ;;
5372 -       -sinix*)
5373 -               os=-sysv4
5374 -               ;;
5375 -       -triton*)
5376 -               os=-sysv3
5377 -               ;;
5378 -       -oss*)
5379 -               os=-sysv3
5380 -               ;;
5381 -       -svr4)
5382 -               os=-sysv4
5383 -               ;;
5384 -       -svr3)
5385 -               os=-sysv3
5386 -               ;;
5387 -       -sysvr4)
5388 -               os=-sysv4
5389 -               ;;
5390 -       # This must come after -sysvr4.
5391 -       -sysv*)
5392 -               ;;
5393 -       -ose*)
5394 -               os=-ose
5395 -               ;;
5396 -       -es1800*)
5397 -               os=-ose
5398 -               ;;
5399 -       -xenix)
5400 -               os=-xenix
5401 -               ;;
5402 -        -*mint | -*MiNT)
5403 -               os=-mint
5404 -               ;;
5405 -       -none)
5406 -               ;;
5407 -       *)
5408 -               # Get rid of the `-' at the beginning of $os.
5409 -               os=`echo $os | sed 's/[^-]*-//'`
5410 -               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
5411 -               exit 1
5412 -               ;;
5413 -esac
5414 -else
5415 -
5416 -# Here we handle the default operating systems that come with various machines.
5417 -# The value should be what the vendor currently ships out the door with their
5418 -# machine or put another way, the most popular os provided with the machine.
5419 -
5420 -# Note that if you're going to try to match "-MANUFACTURER" here (say,
5421 -# "-sun"), then you have to tell the case statement up towards the top
5422 -# that MANUFACTURER isn't an operating system.  Otherwise, code above
5423 -# will signal an error saying that MANUFACTURER isn't an operating
5424 -# system, and we'll never get to this point.
5425 -
5426 -case $basic_machine in
5427 -       *-acorn)
5428 -               os=-riscix1.2
5429 -               ;;
5430 -       arm*-corel)
5431 -               os=-linux
5432 -               ;;
5433 -       arm*-semi)
5434 -               os=-aout
5435 -               ;;
5436 -        pdp11-*)
5437 -               os=-none
5438 -               ;;
5439 -       *-dec | vax-*)
5440 -               os=-ultrix4.2
5441 -               ;;
5442 -       m68*-apollo)
5443 -               os=-domain
5444 -               ;;
5445 -       i386-sun)
5446 -               os=-sunos4.0.2
5447 -               ;;
5448 -       m68000-sun)
5449 -               os=-sunos3
5450 -               # This also exists in the configure program, but was not the
5451 -               # default.
5452 -               # os=-sunos4
5453 -               ;;
5454 -       m68*-cisco)
5455 -               os=-aout
5456 -               ;;
5457 -       mips*-cisco)
5458 -               os=-elf
5459 -               ;;
5460 -       mips*-*)
5461 -               os=-elf
5462 -               ;;
5463 -       *-tti)  # must be before sparc entry or we get the wrong os.
5464 -               os=-sysv3
5465 -               ;;
5466 -       sparc-* | *-sun)
5467 -               os=-sunos4.1.1
5468 -               ;;
5469 -       *-be)
5470 -               os=-beos
5471 -               ;;
5472 -       *-ibm)
5473 -               os=-aix
5474 -               ;;
5475 -       *-wec)
5476 -               os=-proelf
5477 -               ;;
5478 -       *-winbond)
5479 -               os=-proelf
5480 -               ;;
5481 -       *-oki)
5482 -               os=-proelf
5483 -               ;;
5484 -       *-hp)
5485 -               os=-hpux
5486 -               ;;
5487 -       *-hitachi)
5488 -               os=-hiux
5489 -               ;;
5490 -       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
5491 -               os=-sysv
5492 -               ;;
5493 -       *-cbm)
5494 -               os=-amigaos
5495 -               ;;
5496 -       *-dg)
5497 -               os=-dgux
5498 -               ;;
5499 -       *-dolphin)
5500 -               os=-sysv3
5501 -               ;;
5502 -       m68k-ccur)
5503 -               os=-rtu
5504 -               ;;
5505 -       m88k-omron*)
5506 -               os=-luna
5507 -               ;;
5508 -       *-next )
5509 -               os=-nextstep
5510 -               ;;
5511 -       *-sequent)
5512 -               os=-ptx
5513 -               ;;
5514 -       *-crds)
5515 -               os=-unos
5516 -               ;;
5517 -       *-ns)
5518 -               os=-genix
5519 -               ;;
5520 -       i370-*)
5521 -               os=-mvs
5522 -               ;;
5523 -       *-next)
5524 -               os=-nextstep3
5525 -               ;;
5526 -        *-gould)
5527 -               os=-sysv
5528 -               ;;
5529 -        *-highlevel)
5530 -               os=-bsd
5531 -               ;;
5532 -       *-encore)
5533 -               os=-bsd
5534 -               ;;
5535 -        *-sgi)
5536 -               os=-irix
5537 -               ;;
5538 -        *-siemens)
5539 -               os=-sysv4
5540 -               ;;
5541 -       *-masscomp)
5542 -               os=-rtu
5543 -               ;;
5544 -       f301-fujitsu)
5545 -               os=-uxpv
5546 -               ;;
5547 -       *-rom68k)
5548 -               os=-coff
5549 -               ;;
5550 -       *-*bug)
5551 -               os=-coff
5552 -               ;;
5553 -       *-apple)
5554 -               os=-macos
5555 -               ;;
5556 -       *-atari*)
5557 -               os=-mint
5558 -               ;;
5559 -       *)
5560 -               os=-none
5561 -               ;;
5562 -esac
5563 -fi
5564 -
5565 -# Here we handle the case where we know the os, and the CPU type, but not the
5566 -# manufacturer.  We pick the logical manufacturer.
5567 -vendor=unknown
5568 -case $basic_machine in
5569 -       *-unknown)
5570 -               case $os in
5571 -                       -riscix*)
5572 -                               vendor=acorn
5573 -                               ;;
5574 -                       -sunos*)
5575 -                               vendor=sun
5576 -                               ;;
5577 -                       -aix*)
5578 -                               vendor=ibm
5579 -                               ;;
5580 -                       -beos*)
5581 -                               vendor=be
5582 -                               ;;
5583 -                       -hpux*)
5584 -                               vendor=hp
5585 -                               ;;
5586 -                       -mpeix*)
5587 -                               vendor=hp
5588 -                               ;;
5589 -                       -hiux*)
5590 -                               vendor=hitachi
5591 -                               ;;
5592 -                       -unos*)
5593 -                               vendor=crds
5594 -                               ;;
5595 -                       -dgux*)
5596 -                               vendor=dg
5597 -                               ;;
5598 -                       -luna*)
5599 -                               vendor=omron
5600 -                               ;;
5601 -                       -genix*)
5602 -                               vendor=ns
5603 -                               ;;
5604 -                       -mvs*)
5605 -                               vendor=ibm
5606 -                               ;;
5607 -                       -ptx*)
5608 -                               vendor=sequent
5609 -                               ;;
5610 -                       -vxsim* | -vxworks*)
5611 -                               vendor=wrs
5612 -                               ;;
5613 -                       -aux*)
5614 -                               vendor=apple
5615 -                               ;;
5616 -                       -hms*)
5617 -                               vendor=hitachi
5618 -                               ;;
5619 -                       -mpw* | -macos*)
5620 -                               vendor=apple
5621 -                               ;;
5622 -                       -*mint | -*MiNT)
5623 -                               vendor=atari
5624 -                               ;;
5625 -               esac
5626 -               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
5627 -               ;;
5628 -esac
5629 -
5630 -echo $basic_machine$os
5631 diff -urNd -urNd patch-2.5.4/configure patch-2.5.9/configure
5632 --- patch-2.5.4/configure       1999-08-30 02:44:34.000000000 -0400
5633 +++ patch-2.5.9/configure       2003-05-19 02:50:21.000000000 -0400
5634 @@ -1,28 +1,326 @@
5635  #! /bin/sh
5636 -
5637  # Guess values for system-dependent variables and create Makefiles.
5638 -# Generated automatically using autoconf version 2.13 
5639 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5640 +# Generated by GNU Autoconf 2.57 for patch 2.5.9.
5641  #
5642 +# Report bugs to <bug-patch@gnu.org>.
5643 +#
5644 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
5645 +# Free Software Foundation, Inc.
5646  # This configure script is free software; the Free Software Foundation
5647  # gives unlimited permission to copy, distribute and modify it.
5648 +## --------------------- ##
5649 +## M4sh Initialization.  ##
5650 +## --------------------- ##
5651  
5652 -# Defaults:
5653 -ac_help=
5654 +# Be Bourne compatible
5655 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5656 +  emulate sh
5657 +  NULLCMD=:
5658 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
5659 +  # is contrary to our usage.  Disable this feature.
5660 +  alias -g '${1+"$@"}'='"$@"'
5661 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5662 +  set -o posix
5663 +fi
5664 +
5665 +# Support unset when possible.
5666 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5667 +  as_unset=unset
5668 +else
5669 +  as_unset=false
5670 +fi
5671 +
5672 +
5673 +# Work around bugs in pre-3.0 UWIN ksh.
5674 +$as_unset ENV MAIL MAILPATH
5675 +PS1='$ '
5676 +PS2='> '
5677 +PS4='+ '
5678 +
5679 +# NLS nuisances.
5680 +for as_var in \
5681 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
5682 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
5683 +  LC_TELEPHONE LC_TIME
5684 +do
5685 +  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
5686 +    eval $as_var=C; export $as_var
5687 +  else
5688 +    $as_unset $as_var
5689 +  fi
5690 +done
5691 +
5692 +# Required to use basename.
5693 +if expr a : '\(a\)' >/dev/null 2>&1; then
5694 +  as_expr=expr
5695 +else
5696 +  as_expr=false
5697 +fi
5698 +
5699 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
5700 +  as_basename=basename
5701 +else
5702 +  as_basename=false
5703 +fi
5704 +
5705 +
5706 +# Name of the executable.
5707 +as_me=`$as_basename "$0" ||
5708 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5709 +        X"$0" : 'X\(//\)$' \| \
5710 +        X"$0" : 'X\(/\)$' \| \
5711 +        .     : '\(.\)' 2>/dev/null ||
5712 +echo X/"$0" |
5713 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
5714 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
5715 +         /^X\/\(\/\).*/{ s//\1/; q; }
5716 +         s/.*/./; q'`
5717 +
5718 +
5719 +# PATH needs CR, and LINENO needs CR and PATH.
5720 +# Avoid depending upon Character Ranges.
5721 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5722 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5723 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5724 +as_cr_digits='0123456789'
5725 +as_cr_alnum=$as_cr_Letters$as_cr_digits
5726 +
5727 +# The user is always right.
5728 +if test "${PATH_SEPARATOR+set}" != set; then
5729 +  echo "#! /bin/sh" >conf$$.sh
5730 +  echo  "exit 0"   >>conf$$.sh
5731 +  chmod +x conf$$.sh
5732 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5733 +    PATH_SEPARATOR=';'
5734 +  else
5735 +    PATH_SEPARATOR=:
5736 +  fi
5737 +  rm -f conf$$.sh
5738 +fi
5739 +
5740 +
5741 +  as_lineno_1=$LINENO
5742 +  as_lineno_2=$LINENO
5743 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5744 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
5745 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
5746 +  # Find who we are.  Look in the path if we contain no path at all
5747 +  # relative or not.
5748 +  case $0 in
5749 +    *[\\/]* ) as_myself=$0 ;;
5750 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751 +for as_dir in $PATH
5752 +do
5753 +  IFS=$as_save_IFS
5754 +  test -z "$as_dir" && as_dir=.
5755 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5756 +done
5757 +
5758 +       ;;
5759 +  esac
5760 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
5761 +  # in which case we are not to be found in the path.
5762 +  if test "x$as_myself" = x; then
5763 +    as_myself=$0
5764 +  fi
5765 +  if test ! -f "$as_myself"; then
5766 +    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
5767 +   { (exit 1); exit 1; }; }
5768 +  fi
5769 +  case $CONFIG_SHELL in
5770 +  '')
5771 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
5773 +do
5774 +  IFS=$as_save_IFS
5775 +  test -z "$as_dir" && as_dir=.
5776 +  for as_base in sh bash ksh sh5; do
5777 +        case $as_dir in
5778 +        /*)
5779 +          if ("$as_dir/$as_base" -c '
5780 +  as_lineno_1=$LINENO
5781 +  as_lineno_2=$LINENO
5782 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5783 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
5784 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
5785 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
5786 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
5787 +            CONFIG_SHELL=$as_dir/$as_base
5788 +            export CONFIG_SHELL
5789 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
5790 +          fi;;
5791 +        esac
5792 +       done
5793 +done
5794 +;;
5795 +  esac
5796 +
5797 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
5798 +  # uniformly replaced by the line number.  The first 'sed' inserts a
5799 +  # line-number line before each line; the second 'sed' does the real
5800 +  # work.  The second script uses 'N' to pair each line-number line
5801 +  # with the numbered line, and appends trailing '-' during
5802 +  # substitution so that $LINENO is not a special case at line end.
5803 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
5804 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
5805 +  sed '=' <$as_myself |
5806 +    sed '
5807 +      N
5808 +      s,$,-,
5809 +      : loop
5810 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
5811 +      t loop
5812 +      s,-$,,
5813 +      s,^['$as_cr_digits']*\n,,
5814 +    ' >$as_me.lineno &&
5815 +  chmod +x $as_me.lineno ||
5816 +    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
5817 +   { (exit 1); exit 1; }; }
5818 +
5819 +  # Don't try to exec as it changes $[0], causing all sort of problems
5820 +  # (the dirname of $[0] is not the place where we might find the
5821 +  # original and so on.  Autoconf is especially sensible to this).
5822 +  . ./$as_me.lineno
5823 +  # Exit status is that of the last command.
5824 +  exit
5825 +}
5826 +
5827 +
5828 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
5829 +  *c*,-n*) ECHO_N= ECHO_C='
5830 +' ECHO_T='     ' ;;
5831 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
5832 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
5833 +esac
5834 +
5835 +if expr a : '\(a\)' >/dev/null 2>&1; then
5836 +  as_expr=expr
5837 +else
5838 +  as_expr=false
5839 +fi
5840 +
5841 +rm -f conf$$ conf$$.exe conf$$.file
5842 +echo >conf$$.file
5843 +if ln -s conf$$.file conf$$ 2>/dev/null; then
5844 +  # We could just check for DJGPP; but this test a) works b) is more generic
5845 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5846 +  if test -f conf$$.exe; then
5847 +    # Don't use ln at all; we don't have any links
5848 +    as_ln_s='cp -p'
5849 +  else
5850 +    as_ln_s='ln -s'
5851 +  fi
5852 +elif ln conf$$.file conf$$ 2>/dev/null; then
5853 +  as_ln_s=ln
5854 +else
5855 +  as_ln_s='cp -p'
5856 +fi
5857 +rm -f conf$$ conf$$.exe conf$$.file
5858 +
5859 +if mkdir -p . 2>/dev/null; then
5860 +  as_mkdir_p=:
5861 +else
5862 +  as_mkdir_p=false
5863 +fi
5864 +
5865 +as_executable_p="test -f"
5866 +
5867 +# Sed expression to map a string onto a valid CPP name.
5868 +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
5869 +
5870 +# Sed expression to map a string onto a valid variable name.
5871 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
5872 +
5873 +
5874 +# IFS
5875 +# We need space, tab and new line, in precisely that order.
5876 +as_nl='
5877 +'
5878 +IFS="  $as_nl"
5879 +
5880 +# CDPATH.
5881 +$as_unset CDPATH
5882 +
5883 +
5884 +# Name of the host.
5885 +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
5886 +# so uname gets run too.
5887 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
5888 +
5889 +exec 6>&1
5890 +
5891 +#
5892 +# Initializations.
5893 +#
5894  ac_default_prefix=/usr/local
5895 -# Any additions from configure.in:
5896 -ac_help="$ac_help
5897 -  --disable-largefile     omit support for large files"
5898 +ac_config_libobj_dir=.
5899 +cross_compiling=no
5900 +subdirs=
5901 +MFLAGS=
5902 +MAKEFLAGS=
5903 +SHELL=${CONFIG_SHELL-/bin/sh}
5904 +
5905 +# Maximum number of lines to put in a shell here document.
5906 +# This variable seems obsolete.  It should probably be removed, and
5907 +# only ac_max_sed_lines should be used.
5908 +: ${ac_max_here_lines=38}
5909 +
5910 +# Identity of this package.
5911 +PACKAGE_NAME='patch'
5912 +PACKAGE_TARNAME='patch'
5913 +PACKAGE_VERSION='2.5.9'
5914 +PACKAGE_STRING='patch 2.5.9'
5915 +PACKAGE_BUGREPORT='bug-patch@gnu.org'
5916 +
5917 +ac_unique_file="patch.c"
5918 +# Factoring default headers for most tests.
5919 +ac_includes_default="\
5920 +#include <stdio.h>
5921 +#if HAVE_SYS_TYPES_H
5922 +# include <sys/types.h>
5923 +#endif
5924 +#if HAVE_SYS_STAT_H
5925 +# include <sys/stat.h>
5926 +#endif
5927 +#if STDC_HEADERS
5928 +# include <stdlib.h>
5929 +# include <stddef.h>
5930 +#else
5931 +# if HAVE_STDLIB_H
5932 +#  include <stdlib.h>
5933 +# endif
5934 +#endif
5935 +#if HAVE_STRING_H
5936 +# if !STDC_HEADERS && HAVE_MEMORY_H
5937 +#  include <memory.h>
5938 +# endif
5939 +# include <string.h>
5940 +#endif
5941 +#if HAVE_STRINGS_H
5942 +# include <strings.h>
5943 +#endif
5944 +#if HAVE_INTTYPES_H
5945 +# include <inttypes.h>
5946 +#else
5947 +# if HAVE_STDINT_H
5948 +#  include <stdint.h>
5949 +# endif
5950 +#endif
5951 +#if HAVE_UNISTD_H
5952 +# include <unistd.h>
5953 +#endif"
5954 +
5955 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE ed_PROGRAM EGREP STDBOOL_H HAVE__BOOL LIBOBJS LTLIBOBJS'
5956 +ac_subst_files=''
5957  
5958  # Initialize some variables set by options.
5959 +ac_init_help=
5960 +ac_init_version=false
5961  # The variables have the same names as the options, with
5962  # dashes changed to underlines.
5963 -build=NONE
5964 -cache_file=./config.cache
5965 +cache_file=/dev/null
5966  exec_prefix=NONE
5967 -host=NONE
5968  no_create=
5969 -nonopt=NONE
5970  no_recursion=
5971  prefix=NONE
5972  program_prefix=NONE
5973 @@ -31,10 +329,15 @@
5974  silent=
5975  site=
5976  srcdir=
5977 -target=NONE
5978  verbose=
5979  x_includes=NONE
5980  x_libraries=NONE
5981 +
5982 +# Installation directory options.
5983 +# These are left unexpanded so users can "make install exec_prefix=/foo"
5984 +# and all the variables that are supposed to be based on exec_prefix
5985 +# by default will actually change.
5986 +# Use braces instead of parens because sh, perl, etc. also accept them.
5987  bindir='${exec_prefix}/bin'
5988  sbindir='${exec_prefix}/sbin'
5989  libexecdir='${exec_prefix}/libexec'
5990 @@ -48,17 +351,9 @@
5991  infodir='${prefix}/info'
5992  mandir='${prefix}/man'
5993  
5994 -# Initialize some other variables.
5995 -subdirs=
5996 -MFLAGS= MAKEFLAGS=
5997 -SHELL=${CONFIG_SHELL-/bin/sh}
5998 -# Maximum number of lines to put in a shell here document.
5999 -ac_max_here_lines=12
6000 -
6001  ac_prev=
6002  for ac_option
6003  do
6004 -
6005    # If the previous option needs an argument, assign it.
6006    if test -n "$ac_prev"; then
6007      eval "$ac_prev=\$ac_option"
6008 @@ -66,59 +361,59 @@
6009      continue
6010    fi
6011  
6012 -  case "$ac_option" in
6013 -  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
6014 -  *) ac_optarg= ;;
6015 -  esac
6016 +  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
6017  
6018    # Accept the important Cygnus configure options, so we can diagnose typos.
6019  
6020 -  case "$ac_option" in
6021 +  case $ac_option in
6022  
6023    -bindir | --bindir | --bindi | --bind | --bin | --bi)
6024      ac_prev=bindir ;;
6025    -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6026 -    bindir="$ac_optarg" ;;
6027 +    bindir=$ac_optarg ;;
6028  
6029    -build | --build | --buil | --bui | --bu)
6030 -    ac_prev=build ;;
6031 +    ac_prev=build_alias ;;
6032    -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6033 -    build="$ac_optarg" ;;
6034 +    build_alias=$ac_optarg ;;
6035  
6036    -cache-file | --cache-file | --cache-fil | --cache-fi \
6037    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6038      ac_prev=cache_file ;;
6039    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6040    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6041 -    cache_file="$ac_optarg" ;;
6042 +    cache_file=$ac_optarg ;;
6043 +
6044 +  --config-cache | -C)
6045 +    cache_file=config.cache ;;
6046  
6047    -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
6048      ac_prev=datadir ;;
6049    -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
6050    | --da=*)
6051 -    datadir="$ac_optarg" ;;
6052 +    datadir=$ac_optarg ;;
6053  
6054    -disable-* | --disable-*)
6055 -    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
6056 +    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
6057      # Reject names that are not valid shell variable names.
6058 -    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
6059 -      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
6060 -    fi
6061 -    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
6062 -    eval "enable_${ac_feature}=no" ;;
6063 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6064 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
6065 +   { (exit 1); exit 1; }; }
6066 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
6067 +    eval "enable_$ac_feature=no" ;;
6068  
6069    -enable-* | --enable-*)
6070 -    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
6071 +    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
6072      # Reject names that are not valid shell variable names.
6073 -    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
6074 -      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
6075 -    fi
6076 -    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
6077 -    case "$ac_option" in
6078 -      *=*) ;;
6079 +    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6080 +      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
6081 +   { (exit 1); exit 1; }; }
6082 +    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
6083 +    case $ac_option in
6084 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
6085        *) ac_optarg=yes ;;
6086      esac
6087 -    eval "enable_${ac_feature}='$ac_optarg'" ;;
6088 +    eval "enable_$ac_feature='$ac_optarg'" ;;
6089  
6090    -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
6091    | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
6092 @@ -127,95 +422,47 @@
6093    -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
6094    | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
6095    | --exec=* | --exe=* | --ex=*)
6096 -    exec_prefix="$ac_optarg" ;;
6097 +    exec_prefix=$ac_optarg ;;
6098  
6099    -gas | --gas | --ga | --g)
6100      # Obsolete; use --with-gas.
6101      with_gas=yes ;;
6102  
6103 -  -help | --help | --hel | --he)
6104 -    # Omit some internal or obsolete options to make the list less imposing.
6105 -    # This message is too long to be a string in the A/UX 3.1 sh.
6106 -    cat << EOF
6107 -Usage: configure [options] [host]
6108 -Options: [defaults in brackets after descriptions]
6109 -Configuration:
6110 -  --cache-file=FILE       cache test results in FILE
6111 -  --help                  print this message
6112 -  --no-create             do not create output files
6113 -  --quiet, --silent       do not print \`checking...' messages
6114 -  --version               print the version of autoconf that created configure
6115 -Directory and file names:
6116 -  --prefix=PREFIX         install architecture-independent files in PREFIX
6117 -                          [$ac_default_prefix]
6118 -  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
6119 -                          [same as prefix]
6120 -  --bindir=DIR            user executables in DIR [EPREFIX/bin]
6121 -  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
6122 -  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
6123 -  --datadir=DIR           read-only architecture-independent data in DIR
6124 -                          [PREFIX/share]
6125 -  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
6126 -  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
6127 -                          [PREFIX/com]
6128 -  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
6129 -  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
6130 -  --includedir=DIR        C header files in DIR [PREFIX/include]
6131 -  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
6132 -  --infodir=DIR           info documentation in DIR [PREFIX/info]
6133 -  --mandir=DIR            man documentation in DIR [PREFIX/man]
6134 -  --srcdir=DIR            find the sources in DIR [configure dir or ..]
6135 -  --program-prefix=PREFIX prepend PREFIX to installed program names
6136 -  --program-suffix=SUFFIX append SUFFIX to installed program names
6137 -  --program-transform-name=PROGRAM
6138 -                          run sed PROGRAM on installed program names
6139 -EOF
6140 -    cat << EOF
6141 -Host type:
6142 -  --build=BUILD           configure for building on BUILD [BUILD=HOST]
6143 -  --host=HOST             configure for HOST [guessed]
6144 -  --target=TARGET         configure for TARGET [TARGET=HOST]
6145 -Features and packages:
6146 -  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
6147 -  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
6148 -  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
6149 -  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
6150 -  --x-includes=DIR        X include files are in DIR
6151 -  --x-libraries=DIR       X library files are in DIR
6152 -EOF
6153 -    if test -n "$ac_help"; then
6154 -      echo "--enable and --with options recognized:$ac_help"
6155 -    fi
6156 -    exit 0 ;;
6157 +  -help | --help | --hel | --he | -h)
6158 +    ac_init_help=long ;;
6159 +  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
6160 +    ac_init_help=recursive ;;
6161 +  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
6162 +    ac_init_help=short ;;
6163  
6164    -host | --host | --hos | --ho)
6165 -    ac_prev=host ;;
6166 +    ac_prev=host_alias ;;
6167    -host=* | --host=* | --hos=* | --ho=*)
6168 -    host="$ac_optarg" ;;
6169 +    host_alias=$ac_optarg ;;
6170  
6171    -includedir | --includedir | --includedi | --included | --include \
6172    | --includ | --inclu | --incl | --inc)
6173      ac_prev=includedir ;;
6174    -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
6175    | --includ=* | --inclu=* | --incl=* | --inc=*)
6176 -    includedir="$ac_optarg" ;;
6177 +    includedir=$ac_optarg ;;
6178  
6179    -infodir | --infodir | --infodi | --infod | --info | --inf)
6180      ac_prev=infodir ;;
6181    -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
6182 -    infodir="$ac_optarg" ;;
6183 +    infodir=$ac_optarg ;;
6184  
6185    -libdir | --libdir | --libdi | --libd)
6186      ac_prev=libdir ;;
6187    -libdir=* | --libdir=* | --libdi=* | --libd=*)
6188 -    libdir="$ac_optarg" ;;
6189 +    libdir=$ac_optarg ;;
6190  
6191    -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
6192    | --libexe | --libex | --libe)
6193      ac_prev=libexecdir ;;
6194    -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
6195    | --libexe=* | --libex=* | --libe=*)
6196 -    libexecdir="$ac_optarg" ;;
6197 +    libexecdir=$ac_optarg ;;
6198  
6199    -localstatedir | --localstatedir | --localstatedi | --localstated \
6200    | --localstate | --localstat | --localsta | --localst \
6201 @@ -224,19 +471,19 @@
6202    -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
6203    | --localstate=* | --localstat=* | --localsta=* | --localst=* \
6204    | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
6205 -    localstatedir="$ac_optarg" ;;
6206 +    localstatedir=$ac_optarg ;;
6207  
6208    -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
6209      ac_prev=mandir ;;
6210    -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
6211 -    mandir="$ac_optarg" ;;
6212 +    mandir=$ac_optarg ;;
6213  
6214    -nfp | --nfp | --nf)
6215      # Obsolete; use --without-fp.
6216      with_fp=no ;;
6217  
6218    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
6219 -  | --no-cr | --no-c)
6220 +  | --no-cr | --no-c | -n)
6221      no_create=yes ;;
6222  
6223    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
6224 @@ -250,26 +497,26 @@
6225    -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
6226    | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
6227    | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
6228 -    oldincludedir="$ac_optarg" ;;
6229 +    oldincludedir=$ac_optarg ;;
6230  
6231    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6232      ac_prev=prefix ;;
6233    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6234 -    prefix="$ac_optarg" ;;
6235 +    prefix=$ac_optarg ;;
6236  
6237    -program-prefix | --program-prefix | --program-prefi | --program-pref \
6238    | --program-pre | --program-pr | --program-p)
6239      ac_prev=program_prefix ;;
6240    -program-prefix=* | --program-prefix=* | --program-prefi=* \
6241    | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
6242 -    program_prefix="$ac_optarg" ;;
6243 +    program_prefix=$ac_optarg ;;
6244  
6245    -program-suffix | --program-suffix | --program-suffi | --program-suff \
6246    | --program-suf | --program-su | --program-s)
6247      ac_prev=program_suffix ;;
6248    -program-suffix=* | --program-suffix=* | --program-suffi=* \
6249    | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
6250 -    program_suffix="$ac_optarg" ;;
6251 +    program_suffix=$ac_optarg ;;
6252  
6253    -program-transform-name | --program-transform-name \
6254    | --program-transform-nam | --program-transform-na \
6255 @@ -286,7 +533,7 @@
6256    | --program-transfo=* | --program-transf=* \
6257    | --program-trans=* | --program-tran=* \
6258    | --progr-tra=* | --program-tr=* | --program-t=*)
6259 -    program_transform_name="$ac_optarg" ;;
6260 +    program_transform_name=$ac_optarg ;;
6261  
6262    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6263    | -silent | --silent | --silen | --sile | --sil)
6264 @@ -296,7 +543,7 @@
6265      ac_prev=sbindir ;;
6266    -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
6267    | --sbi=* | --sb=*)
6268 -    sbindir="$ac_optarg" ;;
6269 +    sbindir=$ac_optarg ;;
6270  
6271    -sharedstatedir | --sharedstatedir | --sharedstatedi \
6272    | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
6273 @@ -307,58 +554,57 @@
6274    | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
6275    | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
6276    | --sha=* | --sh=*)
6277 -    sharedstatedir="$ac_optarg" ;;
6278 +    sharedstatedir=$ac_optarg ;;
6279  
6280    -site | --site | --sit)
6281      ac_prev=site ;;
6282    -site=* | --site=* | --sit=*)
6283 -    site="$ac_optarg" ;;
6284 +    site=$ac_optarg ;;
6285  
6286    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6287      ac_prev=srcdir ;;
6288    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6289 -    srcdir="$ac_optarg" ;;
6290 +    srcdir=$ac_optarg ;;
6291  
6292    -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
6293    | --syscon | --sysco | --sysc | --sys | --sy)
6294      ac_prev=sysconfdir ;;
6295    -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
6296    | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
6297 -    sysconfdir="$ac_optarg" ;;
6298 +    sysconfdir=$ac_optarg ;;
6299  
6300    -target | --target | --targe | --targ | --tar | --ta | --t)
6301 -    ac_prev=target ;;
6302 +    ac_prev=target_alias ;;
6303    -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
6304 -    target="$ac_optarg" ;;
6305 +    target_alias=$ac_optarg ;;
6306  
6307    -v | -verbose | --verbose | --verbos | --verbo | --verb)
6308      verbose=yes ;;
6309  
6310 -  -version | --version | --versio | --versi | --vers)
6311 -    echo "configure generated by autoconf version 2.13"
6312 -    exit 0 ;;
6313 +  -version | --version | --versio | --versi | --vers | -V)
6314 +    ac_init_version=: ;;
6315  
6316    -with-* | --with-*)
6317 -    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
6318 +    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
6319      # Reject names that are not valid shell variable names.
6320 -    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
6321 -      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
6322 -    fi
6323 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6324 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
6325 +   { (exit 1); exit 1; }; }
6326      ac_package=`echo $ac_package| sed 's/-/_/g'`
6327 -    case "$ac_option" in
6328 -      *=*) ;;
6329 +    case $ac_option in
6330 +      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
6331        *) ac_optarg=yes ;;
6332      esac
6333 -    eval "with_${ac_package}='$ac_optarg'" ;;
6334 +    eval "with_$ac_package='$ac_optarg'" ;;
6335  
6336    -without-* | --without-*)
6337 -    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
6338 +    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
6339      # Reject names that are not valid shell variable names.
6340 -    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
6341 -      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
6342 -    fi
6343 -    ac_package=`echo $ac_package| sed 's/-/_/g'`
6344 -    eval "with_${ac_package}=no" ;;
6345 +    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
6346 +      { echo "$as_me: error: invalid package name: $ac_package" >&2
6347 +   { (exit 1); exit 1; }; }
6348 +    ac_package=`echo $ac_package | sed 's/-/_/g'`
6349 +    eval "with_$ac_package=no" ;;
6350  
6351    --x)
6352      # Obsolete; use --with-x.
6353 @@ -369,99 +615,110 @@
6354      ac_prev=x_includes ;;
6355    -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
6356    | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
6357 -    x_includes="$ac_optarg" ;;
6358 +    x_includes=$ac_optarg ;;
6359  
6360    -x-libraries | --x-libraries | --x-librarie | --x-librari \
6361    | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
6362      ac_prev=x_libraries ;;
6363    -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
6364    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
6365 -    x_libraries="$ac_optarg" ;;
6366 +    x_libraries=$ac_optarg ;;
6367  
6368 -  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
6369 +  -*) { echo "$as_me: error: unrecognized option: $ac_option
6370 +Try \`$0 --help' for more information." >&2
6371 +   { (exit 1); exit 1; }; }
6372      ;;
6373  
6374 +  *=*)
6375 +    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
6376 +    # Reject names that are not valid shell variable names.
6377 +    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
6378 +      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
6379 +   { (exit 1); exit 1; }; }
6380 +    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
6381 +    eval "$ac_envvar='$ac_optarg'"
6382 +    export $ac_envvar ;;
6383 +
6384    *)
6385 -    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
6386 -      echo "configure: warning: $ac_option: invalid host type" 1>&2
6387 -    fi
6388 -    if test "x$nonopt" != xNONE; then
6389 -      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
6390 -    fi
6391 -    nonopt="$ac_option"
6392 +    # FIXME: should be removed in autoconf 3.0.
6393 +    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
6394 +    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
6395 +      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
6396 +    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
6397      ;;
6398  
6399    esac
6400  done
6401  
6402  if test -n "$ac_prev"; then
6403 -  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
6404 -fi
6405 -
6406 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6407 -
6408 -# File descriptor usage:
6409 -# 0 standard input
6410 -# 1 file creation
6411 -# 2 errors and warnings
6412 -# 3 some systems may open it to /dev/tty
6413 -# 4 used on the Kubota Titan
6414 -# 6 checking for... messages and results
6415 -# 5 compiler messages saved in config.log
6416 -if test "$silent" = yes; then
6417 -  exec 6>/dev/null
6418 -else
6419 -  exec 6>&1
6420 +  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
6421 +  { echo "$as_me: error: missing argument to $ac_option" >&2
6422 +   { (exit 1); exit 1; }; }
6423  fi
6424 -exec 5>./config.log
6425  
6426 -echo "\
6427 -This file contains any messages produced by compilers while
6428 -running configure, to aid debugging if configure makes a mistake.
6429 -" 1>&5
6430 +# Be sure to have absolute paths.
6431 +for ac_var in exec_prefix prefix
6432 +do
6433 +  eval ac_val=$`echo $ac_var`
6434 +  case $ac_val in
6435 +    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
6436 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
6437 +   { (exit 1); exit 1; }; };;
6438 +  esac
6439 +done
6440  
6441 -# Strip out --no-create and --no-recursion so they do not pile up.
6442 -# Also quote any args containing shell metacharacters.
6443 -ac_configure_args=
6444 -for ac_arg
6445 +# Be sure to have absolute paths.
6446 +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
6447 +              localstatedir libdir includedir oldincludedir infodir mandir
6448  do
6449 -  case "$ac_arg" in
6450 -  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
6451 -  | --no-cr | --no-c) ;;
6452 -  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
6453 -  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
6454 -  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
6455 -  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
6456 -  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
6457 +  eval ac_val=$`echo $ac_var`
6458 +  case $ac_val in
6459 +    [\\/$]* | ?:[\\/]* ) ;;
6460 +    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
6461 +   { (exit 1); exit 1; }; };;
6462    esac
6463  done
6464  
6465 -# NLS nuisances.
6466 -# Only set these to C if already set.  These must not be set unconditionally
6467 -# because not all systems understand e.g. LANG=C (notably SCO).
6468 -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
6469 -# Non-C LC_CTYPE values break the ctype check.
6470 -if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
6471 -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
6472 -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
6473 -if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
6474 +# There might be people who depend on the old broken behavior: `$host'
6475 +# used to hold the argument of --host etc.
6476 +# FIXME: To remove some day.
6477 +build=$build_alias
6478 +host=$host_alias
6479 +target=$target_alias
6480  
6481 -# confdefs.h avoids OS command line length limits that DEFS can exceed.
6482 -rm -rf conftest* confdefs.h
6483 -# AIX cpp loses on an empty file, so make sure it contains at least a newline.
6484 -echo > confdefs.h
6485 +# FIXME: To remove some day.
6486 +if test "x$host_alias" != x; then
6487 +  if test "x$build_alias" = x; then
6488 +    cross_compiling=maybe
6489 +    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
6490 +    If a cross compiler is detected then cross compile mode will be used." >&2
6491 +  elif test "x$build_alias" != "x$host_alias"; then
6492 +    cross_compiling=yes
6493 +  fi
6494 +fi
6495 +
6496 +ac_tool_prefix=
6497 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
6498 +
6499 +test "$silent" = yes && exec 6>/dev/null
6500  
6501 -# A filename unique to this package, relative to the directory that
6502 -# configure is in, which we can look for to find out if srcdir is correct.
6503 -ac_unique_file=patch.c
6504  
6505  # Find the source files, if location was not specified.
6506  if test -z "$srcdir"; then
6507    ac_srcdir_defaulted=yes
6508    # Try the directory containing this script, then its parent.
6509 -  ac_prog=$0
6510 -  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
6511 -  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
6512 +  ac_confdir=`(dirname "$0") 2>/dev/null ||
6513 +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6514 +         X"$0" : 'X\(//\)[^/]' \| \
6515 +         X"$0" : 'X\(//\)$' \| \
6516 +         X"$0" : 'X\(/\)' \| \
6517 +         .     : '\(.\)' 2>/dev/null ||
6518 +echo X"$0" |
6519 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6520 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6521 +         /^X\(\/\/\)$/{ s//\1/; q; }
6522 +         /^X\(\/\).*/{ s//\1/; q; }
6523 +         s/.*/./; q'`
6524    srcdir=$ac_confdir
6525    if test ! -r $srcdir/$ac_unique_file; then
6526      srcdir=..
6527 @@ -471,13 +728,437 @@
6528  fi
6529  if test ! -r $srcdir/$ac_unique_file; then
6530    if test "$ac_srcdir_defaulted" = yes; then
6531 -    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
6532 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
6533 +   { (exit 1); exit 1; }; }
6534    else
6535 -    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
6536 +    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
6537 +   { (exit 1); exit 1; }; }
6538    fi
6539  fi
6540 -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
6541 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
6542 +  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
6543 +   { (exit 1); exit 1; }; }
6544 +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
6545 +ac_env_build_alias_set=${build_alias+set}
6546 +ac_env_build_alias_value=$build_alias
6547 +ac_cv_env_build_alias_set=${build_alias+set}
6548 +ac_cv_env_build_alias_value=$build_alias
6549 +ac_env_host_alias_set=${host_alias+set}
6550 +ac_env_host_alias_value=$host_alias
6551 +ac_cv_env_host_alias_set=${host_alias+set}
6552 +ac_cv_env_host_alias_value=$host_alias
6553 +ac_env_target_alias_set=${target_alias+set}
6554 +ac_env_target_alias_value=$target_alias
6555 +ac_cv_env_target_alias_set=${target_alias+set}
6556 +ac_cv_env_target_alias_value=$target_alias
6557 +ac_env_CC_set=${CC+set}
6558 +ac_env_CC_value=$CC
6559 +ac_cv_env_CC_set=${CC+set}
6560 +ac_cv_env_CC_value=$CC
6561 +ac_env_CFLAGS_set=${CFLAGS+set}
6562 +ac_env_CFLAGS_value=$CFLAGS
6563 +ac_cv_env_CFLAGS_set=${CFLAGS+set}
6564 +ac_cv_env_CFLAGS_value=$CFLAGS
6565 +ac_env_LDFLAGS_set=${LDFLAGS+set}
6566 +ac_env_LDFLAGS_value=$LDFLAGS
6567 +ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
6568 +ac_cv_env_LDFLAGS_value=$LDFLAGS
6569 +ac_env_CPPFLAGS_set=${CPPFLAGS+set}
6570 +ac_env_CPPFLAGS_value=$CPPFLAGS
6571 +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
6572 +ac_cv_env_CPPFLAGS_value=$CPPFLAGS
6573 +ac_env_CPP_set=${CPP+set}
6574 +ac_env_CPP_value=$CPP
6575 +ac_cv_env_CPP_set=${CPP+set}
6576 +ac_cv_env_CPP_value=$CPP
6577 +
6578 +#
6579 +# Report the --help message.
6580 +#
6581 +if test "$ac_init_help" = "long"; then
6582 +  # Omit some internal or obsolete options to make the list less imposing.
6583 +  # This message is too long to be a string in the A/UX 3.1 sh.
6584 +  cat <<_ACEOF
6585 +\`configure' configures patch 2.5.9 to adapt to many kinds of systems.
6586 +
6587 +Usage: $0 [OPTION]... [VAR=VALUE]...
6588 +
6589 +To assign environment variables (e.g., CC, CFLAGS...), specify them as
6590 +VAR=VALUE.  See below for descriptions of some of the useful variables.
6591 +
6592 +Defaults for the options are specified in brackets.
6593 +
6594 +Configuration:
6595 +  -h, --help              display this help and exit
6596 +      --help=short        display options specific to this package
6597 +      --help=recursive    display the short help of all the included packages
6598 +  -V, --version           display version information and exit
6599 +  -q, --quiet, --silent   do not print \`checking...' messages
6600 +      --cache-file=FILE   cache test results in FILE [disabled]
6601 +  -C, --config-cache      alias for \`--cache-file=config.cache'
6602 +  -n, --no-create         do not create output files
6603 +      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
6604 +
6605 +_ACEOF
6606 +
6607 +  cat <<_ACEOF
6608 +Installation directories:
6609 +  --prefix=PREFIX         install architecture-independent files in PREFIX
6610 +                          [$ac_default_prefix]
6611 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
6612 +                          [PREFIX]
6613 +
6614 +By default, \`make install' will install all the files in
6615 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
6616 +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
6617 +for instance \`--prefix=\$HOME'.
6618 +
6619 +For better control, use the options below.
6620 +
6621 +Fine tuning of the installation directories:
6622 +  --bindir=DIR           user executables [EPREFIX/bin]
6623 +  --sbindir=DIR          system admin executables [EPREFIX/sbin]
6624 +  --libexecdir=DIR       program executables [EPREFIX/libexec]
6625 +  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
6626 +  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
6627 +  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
6628 +  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
6629 +  --libdir=DIR           object code libraries [EPREFIX/lib]
6630 +  --includedir=DIR       C header files [PREFIX/include]
6631 +  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
6632 +  --infodir=DIR          info documentation [PREFIX/info]
6633 +  --mandir=DIR           man documentation [PREFIX/man]
6634 +_ACEOF
6635 +
6636 +  cat <<\_ACEOF
6637 +
6638 +Program names:
6639 +  --program-prefix=PREFIX            prepend PREFIX to installed program names
6640 +  --program-suffix=SUFFIX            append SUFFIX to installed program names
6641 +  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
6642 +_ACEOF
6643 +fi
6644 +
6645 +if test -n "$ac_init_help"; then
6646 +  case $ac_init_help in
6647 +     short | recursive ) echo "Configuration of patch 2.5.9:";;
6648 +   esac
6649 +  cat <<\_ACEOF
6650 +
6651 +Optional Features:
6652 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
6653 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
6654 +  --disable-largefile     omit support for large files
6655 +
6656 +Some influential environment variables:
6657 +  CC          C compiler command
6658 +  CFLAGS      C compiler flags
6659 +  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
6660 +              nonstandard directory <lib dir>
6661 +  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
6662 +              headers in a nonstandard directory <include dir>
6663 +  CPP         C preprocessor
6664 +
6665 +Use these variables to override the choices made by `configure' or to help
6666 +it to find libraries and programs with nonstandard names/locations.
6667 +
6668 +Report bugs to <bug-patch@gnu.org>.
6669 +_ACEOF
6670 +fi
6671 +
6672 +if test "$ac_init_help" = "recursive"; then
6673 +  # If there are subdirs, report their specific --help.
6674 +  ac_popdir=`pwd`
6675 +  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
6676 +    test -d $ac_dir || continue
6677 +    ac_builddir=.
6678 +
6679 +if test "$ac_dir" != .; then
6680 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
6681 +  # A "../" for each directory in $ac_dir_suffix.
6682 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
6683 +else
6684 +  ac_dir_suffix= ac_top_builddir=
6685 +fi
6686 +
6687 +case $srcdir in
6688 +  .)  # No --srcdir option.  We are building in place.
6689 +    ac_srcdir=.
6690 +    if test -z "$ac_top_builddir"; then
6691 +       ac_top_srcdir=.
6692 +    else
6693 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
6694 +    fi ;;
6695 +  [\\/]* | ?:[\\/]* )  # Absolute path.
6696 +    ac_srcdir=$srcdir$ac_dir_suffix;
6697 +    ac_top_srcdir=$srcdir ;;
6698 +  *) # Relative path.
6699 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
6700 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
6701 +esac
6702 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
6703 +# absolute.
6704 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6705 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
6706 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
6707 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
6708 +
6709 +    cd $ac_dir
6710 +    # Check for guested configure; otherwise get Cygnus style configure.
6711 +    if test -f $ac_srcdir/configure.gnu; then
6712 +      echo
6713 +      $SHELL $ac_srcdir/configure.gnu  --help=recursive
6714 +    elif test -f $ac_srcdir/configure; then
6715 +      echo
6716 +      $SHELL $ac_srcdir/configure  --help=recursive
6717 +    elif test -f $ac_srcdir/configure.ac ||
6718 +           test -f $ac_srcdir/configure.in; then
6719 +      echo
6720 +      $ac_configure --help
6721 +    else
6722 +      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
6723 +    fi
6724 +    cd $ac_popdir
6725 +  done
6726 +fi
6727 +
6728 +test -n "$ac_init_help" && exit 0
6729 +if $ac_init_version; then
6730 +  cat <<\_ACEOF
6731 +patch configure 2.5.9
6732 +generated by GNU Autoconf 2.57
6733 +
6734 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6735 +Free Software Foundation, Inc.
6736 +This configure script is free software; the Free Software Foundation
6737 +gives unlimited permission to copy, distribute and modify it.
6738 +_ACEOF
6739 +  exit 0
6740 +fi
6741 +exec 5>config.log
6742 +cat >&5 <<_ACEOF
6743 +This file contains any messages produced by compilers while
6744 +running configure, to aid debugging if configure makes a mistake.
6745 +
6746 +It was created by patch $as_me 2.5.9, which was
6747 +generated by GNU Autoconf 2.57.  Invocation command line was
6748 +
6749 +  $ $0 $@
6750 +
6751 +_ACEOF
6752 +{
6753 +cat <<_ASUNAME
6754 +## --------- ##
6755 +## Platform. ##
6756 +## --------- ##
6757 +
6758 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
6759 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
6760 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
6761 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
6762 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
6763 +
6764 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
6765 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
6766 +
6767 +/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
6768 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
6769 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
6770 +hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
6771 +/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
6772 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
6773 +/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
6774 +
6775 +_ASUNAME
6776 +
6777 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6778 +for as_dir in $PATH
6779 +do
6780 +  IFS=$as_save_IFS
6781 +  test -z "$as_dir" && as_dir=.
6782 +  echo "PATH: $as_dir"
6783 +done
6784 +
6785 +} >&5
6786 +
6787 +cat >&5 <<_ACEOF
6788 +
6789 +
6790 +## ----------- ##
6791 +## Core tests. ##
6792 +## ----------- ##
6793 +
6794 +_ACEOF
6795 +
6796 +
6797 +# Keep a trace of the command line.
6798 +# Strip out --no-create and --no-recursion so they do not pile up.
6799 +# Strip out --silent because we don't want to record it for future runs.
6800 +# Also quote any args containing shell meta-characters.
6801 +# Make two passes to allow for proper duplicate-argument suppression.
6802 +ac_configure_args=
6803 +ac_configure_args0=
6804 +ac_configure_args1=
6805 +ac_sep=
6806 +ac_must_keep_next=false
6807 +for ac_pass in 1 2
6808 +do
6809 +  for ac_arg
6810 +  do
6811 +    case $ac_arg in
6812 +    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
6813 +    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6814 +    | -silent | --silent | --silen | --sile | --sil)
6815 +      continue ;;
6816 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
6817 +      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6818 +    esac
6819 +    case $ac_pass in
6820 +    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
6821 +    2)
6822 +      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
6823 +      if test $ac_must_keep_next = true; then
6824 +        ac_must_keep_next=false # Got value, back to normal.
6825 +      else
6826 +        case $ac_arg in
6827 +          *=* | --config-cache | -C | -disable-* | --disable-* \
6828 +          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
6829 +          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
6830 +          | -with-* | --with-* | -without-* | --without-* | --x)
6831 +            case "$ac_configure_args0 " in
6832 +              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
6833 +            esac
6834 +            ;;
6835 +          -* ) ac_must_keep_next=true ;;
6836 +        esac
6837 +      fi
6838 +      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
6839 +      # Get rid of the leading space.
6840 +      ac_sep=" "
6841 +      ;;
6842 +    esac
6843 +  done
6844 +done
6845 +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
6846 +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
6847 +
6848 +# When interrupted or exit'd, cleanup temporary files, and complete
6849 +# config.log.  We remove comments because anyway the quotes in there
6850 +# would cause problems or look ugly.
6851 +# WARNING: Be sure not to use single quotes in there, as some shells,
6852 +# such as our DU 5.0 friend, will then `close' the trap.
6853 +trap 'exit_status=$?
6854 +  # Save into config.log some information that might help in debugging.
6855 +  {
6856 +    echo
6857 +
6858 +    cat <<\_ASBOX
6859 +## ---------------- ##
6860 +## Cache variables. ##
6861 +## ---------------- ##
6862 +_ASBOX
6863 +    echo
6864 +    # The following way of writing the cache mishandles newlines in values,
6865 +{
6866 +  (set) 2>&1 |
6867 +    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
6868 +    *ac_space=\ *)
6869 +      sed -n \
6870 +        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
6871 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
6872 +      ;;
6873 +    *)
6874 +      sed -n \
6875 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6876 +      ;;
6877 +    esac;
6878 +}
6879 +    echo
6880 +
6881 +    cat <<\_ASBOX
6882 +## ----------------- ##
6883 +## Output variables. ##
6884 +## ----------------- ##
6885 +_ASBOX
6886 +    echo
6887 +    for ac_var in $ac_subst_vars
6888 +    do
6889 +      eval ac_val=$`echo $ac_var`
6890 +      echo "$ac_var='"'"'$ac_val'"'"'"
6891 +    done | sort
6892 +    echo
6893 +
6894 +    if test -n "$ac_subst_files"; then
6895 +      cat <<\_ASBOX
6896 +## ------------- ##
6897 +## Output files. ##
6898 +## ------------- ##
6899 +_ASBOX
6900 +      echo
6901 +      for ac_var in $ac_subst_files
6902 +      do
6903 +       eval ac_val=$`echo $ac_var`
6904 +        echo "$ac_var='"'"'$ac_val'"'"'"
6905 +      done | sort
6906 +      echo
6907 +    fi
6908 +
6909 +    if test -s confdefs.h; then
6910 +      cat <<\_ASBOX
6911 +## ----------- ##
6912 +## confdefs.h. ##
6913 +## ----------- ##
6914 +_ASBOX
6915 +      echo
6916 +      sed "/^$/d" confdefs.h | sort
6917 +      echo
6918 +    fi
6919 +    test "$ac_signal" != 0 &&
6920 +      echo "$as_me: caught signal $ac_signal"
6921 +    echo "$as_me: exit $exit_status"
6922 +  } >&5
6923 +  rm -f core core.* *.core &&
6924 +  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
6925 +    exit $exit_status
6926 +     ' 0
6927 +for ac_signal in 1 2 13 15; do
6928 +  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
6929 +done
6930 +ac_signal=0
6931 +
6932 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
6933 +rm -rf conftest* confdefs.h
6934 +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
6935 +echo >confdefs.h
6936 +
6937 +# Predefined preprocessor variables.
6938 +
6939 +cat >>confdefs.h <<_ACEOF
6940 +#define PACKAGE_NAME "$PACKAGE_NAME"
6941 +_ACEOF
6942  
6943 +
6944 +cat >>confdefs.h <<_ACEOF
6945 +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
6946 +_ACEOF
6947 +
6948 +
6949 +cat >>confdefs.h <<_ACEOF
6950 +#define PACKAGE_VERSION "$PACKAGE_VERSION"
6951 +_ACEOF
6952 +
6953 +
6954 +cat >>confdefs.h <<_ACEOF
6955 +#define PACKAGE_STRING "$PACKAGE_STRING"
6956 +_ACEOF
6957 +
6958 +
6959 +cat >>confdefs.h <<_ACEOF
6960 +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
6961 +_ACEOF
6962 +
6963 +
6964 +# Let the site file select an alternate cache file if it wants to.
6965  # Prefer explicitly selected file to automatically selected ones.
6966  if test -z "$CONFIG_SITE"; then
6967    if test "x$prefix" != xNONE; then
6968 @@ -488,321 +1169,767 @@
6969  fi
6970  for ac_site_file in $CONFIG_SITE; do
6971    if test -r "$ac_site_file"; then
6972 -    echo "loading site script $ac_site_file"
6973 +    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
6974 +echo "$as_me: loading site script $ac_site_file" >&6;}
6975 +    sed 's/^/| /' "$ac_site_file" >&5
6976      . "$ac_site_file"
6977    fi
6978  done
6979  
6980  if test -r "$cache_file"; then
6981 -  echo "loading cache $cache_file"
6982 -  . $cache_file
6983 +  # Some versions of bash will fail to source /dev/null (special
6984 +  # files actually), so we avoid doing that.
6985 +  if test -f "$cache_file"; then
6986 +    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
6987 +echo "$as_me: loading cache $cache_file" >&6;}
6988 +    case $cache_file in
6989 +      [\\/]* | ?:[\\/]* ) . $cache_file;;
6990 +      *)                      . ./$cache_file;;
6991 +    esac
6992 +  fi
6993  else
6994 -  echo "creating cache $cache_file"
6995 -  > $cache_file
6996 +  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
6997 +echo "$as_me: creating cache $cache_file" >&6;}
6998 +  >$cache_file
6999 +fi
7000 +
7001 +# Check that the precious variables saved in the cache have kept the same
7002 +# value.
7003 +ac_cache_corrupted=false
7004 +for ac_var in `(set) 2>&1 |
7005 +               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
7006 +  eval ac_old_set=\$ac_cv_env_${ac_var}_set
7007 +  eval ac_new_set=\$ac_env_${ac_var}_set
7008 +  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
7009 +  eval ac_new_val="\$ac_env_${ac_var}_value"
7010 +  case $ac_old_set,$ac_new_set in
7011 +    set,)
7012 +      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
7013 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
7014 +      ac_cache_corrupted=: ;;
7015 +    ,set)
7016 +      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
7017 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
7018 +      ac_cache_corrupted=: ;;
7019 +    ,);;
7020 +    *)
7021 +      if test "x$ac_old_val" != "x$ac_new_val"; then
7022 +        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
7023 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
7024 +        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
7025 +echo "$as_me:   former value:  $ac_old_val" >&2;}
7026 +        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
7027 +echo "$as_me:   current value: $ac_new_val" >&2;}
7028 +        ac_cache_corrupted=:
7029 +      fi;;
7030 +  esac
7031 +  # Pass precious variables to config.status.
7032 +  if test "$ac_new_set" = set; then
7033 +    case $ac_new_val in
7034 +    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
7035 +      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
7036 +    *) ac_arg=$ac_var=$ac_new_val ;;
7037 +    esac
7038 +    case " $ac_configure_args " in
7039 +      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
7040 +      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
7041 +    esac
7042 +  fi
7043 +done
7044 +if $ac_cache_corrupted; then
7045 +  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
7046 +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
7047 +  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
7048 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
7049 +   { (exit 1); exit 1; }; }
7050  fi
7051  
7052  ac_ext=c
7053 -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7054  ac_cpp='$CPP $CPPFLAGS'
7055 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7056 -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7057 -cross_compiling=$ac_cv_prog_cc_cross
7058 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7059 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7060 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
7061  
7062 -ac_exeext=
7063 -ac_objext=o
7064 -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
7065 -  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
7066 -  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
7067 -    ac_n= ac_c='
7068 -' ac_t='       '
7069 -  else
7070 -    ac_n=-n ac_c= ac_t=
7071 -  fi
7072 -else
7073 -  ac_n= ac_c='\c' ac_t=
7074 -fi
7075  
7076  
7077  
7078 -if test "$program_transform_name" = s,x,x,; then
7079 -  program_transform_name=
7080 -else
7081 -  # Double any \ or $.  echo might interpret backslashes.
7082 -  cat <<\EOF_SED > conftestsed
7083 -s,\\,\\\\,g; s,\$,$$,g
7084 -EOF_SED
7085 -  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
7086 -  rm -f conftestsed
7087 -fi
7088 -test "$program_prefix" != NONE &&
7089 -  program_transform_name="s,^,${program_prefix},; $program_transform_name"
7090 -# Use a double $ so make ignores it.
7091 -test "$program_suffix" != NONE &&
7092 -  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
7093  
7094 -# sed with no file args requires a program.
7095 -test "$program_transform_name" = "" && program_transform_name="s,x,x,"
7096  
7097 -ac_aux_dir=
7098 -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
7099 -  if test -f $ac_dir/install-sh; then
7100 -    ac_aux_dir=$ac_dir
7101 -    ac_install_sh="$ac_aux_dir/install-sh -c"
7102 -    break
7103 -  elif test -f $ac_dir/install.sh; then
7104 -    ac_aux_dir=$ac_dir
7105 -    ac_install_sh="$ac_aux_dir/install.sh -c"
7106 -    break
7107 -  fi
7108 -done
7109 -if test -z "$ac_aux_dir"; then
7110 -  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
7111 -fi
7112 -ac_config_guess=$ac_aux_dir/config.guess
7113 -ac_config_sub=$ac_aux_dir/config.sub
7114 -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
7115  
7116  
7117 -# Make sure we can run config.sub.
7118 -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
7119 -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
7120 -fi
7121  
7122 -echo $ac_n "checking host system type""... $ac_c" 1>&6
7123 -echo "configure:573: checking host system type" >&5
7124  
7125 -host_alias=$host
7126 -case "$host_alias" in
7127 -NONE)
7128 -  case $nonopt in
7129 -  NONE)
7130 -    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
7131 -    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
7132 -    fi ;;
7133 -  *) host_alias=$nonopt ;;
7134 -  esac ;;
7135 -esac
7136  
7137 -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
7138 -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
7139 -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
7140 -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
7141 -echo "$ac_t""$host" 1>&6
7142  
7143  
7144 -PACKAGE=patch
7145 -VERSION=2.5.4
7146  
7147  
7148  
7149 -# Extract the first word of "gcc", so it can be a program name with args.
7150 +
7151 +
7152 +
7153 +
7154 +
7155 +
7156 +
7157 +
7158 +
7159 +
7160 +
7161 +
7162 +          ac_config_headers="$ac_config_headers config.h:config.hin"
7163 +
7164 +test "$program_prefix" != NONE &&
7165 +  program_transform_name="s,^,$program_prefix,;$program_transform_name"
7166 +# Use a double $ so make ignores it.
7167 +test "$program_suffix" != NONE &&
7168 +  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
7169 +# Double any \ or $.  echo might interpret backslashes.
7170 +# By default was `s,x,x', remove it if useless.
7171 +cat <<\_ACEOF >conftest.sed
7172 +s/[\\$]/&&/g;s/;s,x,x,$//
7173 +_ACEOF
7174 +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
7175 +rm conftest.sed
7176 +
7177 +
7178 +ac_ext=c
7179 +ac_cpp='$CPP $CPPFLAGS'
7180 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7181 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7182 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
7183 +if test -n "$ac_tool_prefix"; then
7184 +  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
7185 +set dummy ${ac_tool_prefix}gcc; ac_word=$2
7186 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7187 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7188 +if test "${ac_cv_prog_CC+set}" = set; then
7189 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7190 +else
7191 +  if test -n "$CC"; then
7192 +  ac_cv_prog_CC="$CC" # Let the user override the test.
7193 +else
7194 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195 +for as_dir in $PATH
7196 +do
7197 +  IFS=$as_save_IFS
7198 +  test -z "$as_dir" && as_dir=.
7199 +  for ac_exec_ext in '' $ac_executable_extensions; do
7200 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7201 +    ac_cv_prog_CC="${ac_tool_prefix}gcc"
7202 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7203 +    break 2
7204 +  fi
7205 +done
7206 +done
7207 +
7208 +fi
7209 +fi
7210 +CC=$ac_cv_prog_CC
7211 +if test -n "$CC"; then
7212 +  echo "$as_me:$LINENO: result: $CC" >&5
7213 +echo "${ECHO_T}$CC" >&6
7214 +else
7215 +  echo "$as_me:$LINENO: result: no" >&5
7216 +echo "${ECHO_T}no" >&6
7217 +fi
7218 +
7219 +fi
7220 +if test -z "$ac_cv_prog_CC"; then
7221 +  ac_ct_CC=$CC
7222 +  # Extract the first word of "gcc", so it can be a program name with args.
7223  set dummy gcc; ac_word=$2
7224 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7225 -echo "configure:602: checking for $ac_word" >&5
7226 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
7227 -  echo $ac_n "(cached) $ac_c" 1>&6
7228 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7229 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7230 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7231 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7232 +else
7233 +  if test -n "$ac_ct_CC"; then
7234 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7235 +else
7236 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7237 +for as_dir in $PATH
7238 +do
7239 +  IFS=$as_save_IFS
7240 +  test -z "$as_dir" && as_dir=.
7241 +  for ac_exec_ext in '' $ac_executable_extensions; do
7242 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7243 +    ac_cv_prog_ac_ct_CC="gcc"
7244 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7245 +    break 2
7246 +  fi
7247 +done
7248 +done
7249 +
7250 +fi
7251 +fi
7252 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
7253 +if test -n "$ac_ct_CC"; then
7254 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7255 +echo "${ECHO_T}$ac_ct_CC" >&6
7256 +else
7257 +  echo "$as_me:$LINENO: result: no" >&5
7258 +echo "${ECHO_T}no" >&6
7259 +fi
7260 +
7261 +  CC=$ac_ct_CC
7262 +else
7263 +  CC="$ac_cv_prog_CC"
7264 +fi
7265 +
7266 +if test -z "$CC"; then
7267 +  if test -n "$ac_tool_prefix"; then
7268 +  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
7269 +set dummy ${ac_tool_prefix}cc; ac_word=$2
7270 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7271 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7272 +if test "${ac_cv_prog_CC+set}" = set; then
7273 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7274  else
7275    if test -n "$CC"; then
7276    ac_cv_prog_CC="$CC" # Let the user override the test.
7277  else
7278 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
7279 -  ac_dummy="$PATH"
7280 -  for ac_dir in $ac_dummy; do
7281 -    test -z "$ac_dir" && ac_dir=.
7282 -    if test -f $ac_dir/$ac_word; then
7283 -      ac_cv_prog_CC="gcc"
7284 -      break
7285 -    fi
7286 -  done
7287 -  IFS="$ac_save_ifs"
7288 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289 +for as_dir in $PATH
7290 +do
7291 +  IFS=$as_save_IFS
7292 +  test -z "$as_dir" && as_dir=.
7293 +  for ac_exec_ext in '' $ac_executable_extensions; do
7294 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295 +    ac_cv_prog_CC="${ac_tool_prefix}cc"
7296 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7297 +    break 2
7298 +  fi
7299 +done
7300 +done
7301 +
7302  fi
7303  fi
7304 -CC="$ac_cv_prog_CC"
7305 +CC=$ac_cv_prog_CC
7306  if test -n "$CC"; then
7307 -  echo "$ac_t""$CC" 1>&6
7308 +  echo "$as_me:$LINENO: result: $CC" >&5
7309 +echo "${ECHO_T}$CC" >&6
7310  else
7311 -  echo "$ac_t""no" 1>&6
7312 +  echo "$as_me:$LINENO: result: no" >&5
7313 +echo "${ECHO_T}no" >&6
7314  fi
7315  
7316 +fi
7317 +if test -z "$ac_cv_prog_CC"; then
7318 +  ac_ct_CC=$CC
7319 +  # Extract the first word of "cc", so it can be a program name with args.
7320 +set dummy cc; ac_word=$2
7321 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7322 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7323 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7324 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7325 +else
7326 +  if test -n "$ac_ct_CC"; then
7327 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7328 +else
7329 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330 +for as_dir in $PATH
7331 +do
7332 +  IFS=$as_save_IFS
7333 +  test -z "$as_dir" && as_dir=.
7334 +  for ac_exec_ext in '' $ac_executable_extensions; do
7335 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7336 +    ac_cv_prog_ac_ct_CC="cc"
7337 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7338 +    break 2
7339 +  fi
7340 +done
7341 +done
7342 +
7343 +fi
7344 +fi
7345 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
7346 +if test -n "$ac_ct_CC"; then
7347 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7348 +echo "${ECHO_T}$ac_ct_CC" >&6
7349 +else
7350 +  echo "$as_me:$LINENO: result: no" >&5
7351 +echo "${ECHO_T}no" >&6
7352 +fi
7353 +
7354 +  CC=$ac_ct_CC
7355 +else
7356 +  CC="$ac_cv_prog_CC"
7357 +fi
7358 +
7359 +fi
7360  if test -z "$CC"; then
7361    # Extract the first word of "cc", so it can be a program name with args.
7362  set dummy cc; ac_word=$2
7363 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7364 -echo "configure:632: checking for $ac_word" >&5
7365 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
7366 -  echo $ac_n "(cached) $ac_c" 1>&6
7367 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7368 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7369 +if test "${ac_cv_prog_CC+set}" = set; then
7370 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7371  else
7372    if test -n "$CC"; then
7373    ac_cv_prog_CC="$CC" # Let the user override the test.
7374  else
7375 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
7376    ac_prog_rejected=no
7377 -  ac_dummy="$PATH"
7378 -  for ac_dir in $ac_dummy; do
7379 -    test -z "$ac_dir" && ac_dir=.
7380 -    if test -f $ac_dir/$ac_word; then
7381 -      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
7382 -        ac_prog_rejected=yes
7383 -       continue
7384 -      fi
7385 -      ac_cv_prog_CC="cc"
7386 -      break
7387 -    fi
7388 -  done
7389 -  IFS="$ac_save_ifs"
7390 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7391 +for as_dir in $PATH
7392 +do
7393 +  IFS=$as_save_IFS
7394 +  test -z "$as_dir" && as_dir=.
7395 +  for ac_exec_ext in '' $ac_executable_extensions; do
7396 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7397 +    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
7398 +       ac_prog_rejected=yes
7399 +       continue
7400 +     fi
7401 +    ac_cv_prog_CC="cc"
7402 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7403 +    break 2
7404 +  fi
7405 +done
7406 +done
7407 +
7408  if test $ac_prog_rejected = yes; then
7409    # We found a bogon in the path, so make sure we never use it.
7410    set dummy $ac_cv_prog_CC
7411    shift
7412 -  if test $# -gt 0; then
7413 +  if test $# != 0; then
7414      # We chose a different compiler from the bogus one.
7415      # However, it has the same basename, so the bogon will be chosen
7416      # first if we set CC to just the basename; use the full file name.
7417      shift
7418 -    set dummy "$ac_dir/$ac_word" "$@"
7419 -    shift
7420 -    ac_cv_prog_CC="$@"
7421 +    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
7422    fi
7423  fi
7424  fi
7425  fi
7426 -CC="$ac_cv_prog_CC"
7427 +CC=$ac_cv_prog_CC
7428  if test -n "$CC"; then
7429 -  echo "$ac_t""$CC" 1>&6
7430 +  echo "$as_me:$LINENO: result: $CC" >&5
7431 +echo "${ECHO_T}$CC" >&6
7432  else
7433 -  echo "$ac_t""no" 1>&6
7434 +  echo "$as_me:$LINENO: result: no" >&5
7435 +echo "${ECHO_T}no" >&6
7436  fi
7437  
7438 -  if test -z "$CC"; then
7439 -    case "`uname -s`" in
7440 -    *win32* | *WIN32*)
7441 -      # Extract the first word of "cl", so it can be a program name with args.
7442 -set dummy cl; ac_word=$2
7443 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7444 -echo "configure:683: checking for $ac_word" >&5
7445 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
7446 -  echo $ac_n "(cached) $ac_c" 1>&6
7447 +fi
7448 +if test -z "$CC"; then
7449 +  if test -n "$ac_tool_prefix"; then
7450 +  for ac_prog in cl
7451 +  do
7452 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7453 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7454 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7455 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7456 +if test "${ac_cv_prog_CC+set}" = set; then
7457 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7458  else
7459    if test -n "$CC"; then
7460    ac_cv_prog_CC="$CC" # Let the user override the test.
7461  else
7462 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
7463 -  ac_dummy="$PATH"
7464 -  for ac_dir in $ac_dummy; do
7465 -    test -z "$ac_dir" && ac_dir=.
7466 -    if test -f $ac_dir/$ac_word; then
7467 -      ac_cv_prog_CC="cl"
7468 -      break
7469 -    fi
7470 -  done
7471 -  IFS="$ac_save_ifs"
7472 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473 +for as_dir in $PATH
7474 +do
7475 +  IFS=$as_save_IFS
7476 +  test -z "$as_dir" && as_dir=.
7477 +  for ac_exec_ext in '' $ac_executable_extensions; do
7478 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479 +    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
7480 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7481 +    break 2
7482 +  fi
7483 +done
7484 +done
7485 +
7486  fi
7487  fi
7488 -CC="$ac_cv_prog_CC"
7489 +CC=$ac_cv_prog_CC
7490  if test -n "$CC"; then
7491 -  echo "$ac_t""$CC" 1>&6
7492 +  echo "$as_me:$LINENO: result: $CC" >&5
7493 +echo "${ECHO_T}$CC" >&6
7494  else
7495 -  echo "$ac_t""no" 1>&6
7496 +  echo "$as_me:$LINENO: result: no" >&5
7497 +echo "${ECHO_T}no" >&6
7498  fi
7499 - ;;
7500 -    esac
7501 +
7502 +    test -n "$CC" && break
7503 +  done
7504 +fi
7505 +if test -z "$CC"; then
7506 +  ac_ct_CC=$CC
7507 +  for ac_prog in cl
7508 +do
7509 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
7510 +set dummy $ac_prog; ac_word=$2
7511 +echo "$as_me:$LINENO: checking for $ac_word" >&5
7512 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7513 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
7514 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7515 +else
7516 +  if test -n "$ac_ct_CC"; then
7517 +  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7518 +else
7519 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7520 +for as_dir in $PATH
7521 +do
7522 +  IFS=$as_save_IFS
7523 +  test -z "$as_dir" && as_dir=.
7524 +  for ac_exec_ext in '' $ac_executable_extensions; do
7525 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7526 +    ac_cv_prog_ac_ct_CC="$ac_prog"
7527 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7528 +    break 2
7529    fi
7530 -  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
7531 +done
7532 +done
7533 +
7534 +fi
7535 +fi
7536 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
7537 +if test -n "$ac_ct_CC"; then
7538 +  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
7539 +echo "${ECHO_T}$ac_ct_CC" >&6
7540 +else
7541 +  echo "$as_me:$LINENO: result: no" >&5
7542 +echo "${ECHO_T}no" >&6
7543  fi
7544  
7545 -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
7546 -echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
7547 +  test -n "$ac_ct_CC" && break
7548 +done
7549  
7550 -ac_ext=c
7551 -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7552 -ac_cpp='$CPP $CPPFLAGS'
7553 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7554 -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7555 -cross_compiling=$ac_cv_prog_cc_cross
7556 +  CC=$ac_ct_CC
7557 +fi
7558  
7559 -cat > conftest.$ac_ext << EOF
7560 +fi
7561  
7562 -#line 726 "configure"
7563 -#include "confdefs.h"
7564  
7565 -main(){return(0);}
7566 -EOF
7567 -if { (eval echo configure:731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7568 -  ac_cv_prog_cc_works=yes
7569 -  # If we can't run a trivial program, we are probably using a cross compiler.
7570 -  if (./conftest; exit) 2>/dev/null; then
7571 -    ac_cv_prog_cc_cross=no
7572 +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
7573 +See \`config.log' for more details." >&5
7574 +echo "$as_me: error: no acceptable C compiler found in \$PATH
7575 +See \`config.log' for more details." >&2;}
7576 +   { (exit 1); exit 1; }; }
7577 +
7578 +# Provide some information about the compiler.
7579 +echo "$as_me:$LINENO:" \
7580 +     "checking for C compiler version" >&5
7581 +ac_compiler=`set X $ac_compile; echo $2`
7582 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
7583 +  (eval $ac_compiler --version </dev/null >&5) 2>&5
7584 +  ac_status=$?
7585 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7586 +  (exit $ac_status); }
7587 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
7588 +  (eval $ac_compiler -v </dev/null >&5) 2>&5
7589 +  ac_status=$?
7590 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591 +  (exit $ac_status); }
7592 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
7593 +  (eval $ac_compiler -V </dev/null >&5) 2>&5
7594 +  ac_status=$?
7595 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596 +  (exit $ac_status); }
7597 +
7598 +cat >conftest.$ac_ext <<_ACEOF
7599 +#line $LINENO "configure"
7600 +/* confdefs.h.  */
7601 +_ACEOF
7602 +cat confdefs.h >>conftest.$ac_ext
7603 +cat >>conftest.$ac_ext <<_ACEOF
7604 +/* end confdefs.h.  */
7605 +
7606 +int
7607 +main ()
7608 +{
7609 +
7610 +  ;
7611 +  return 0;
7612 +}
7613 +_ACEOF
7614 +ac_clean_files_save=$ac_clean_files
7615 +ac_clean_files="$ac_clean_files a.out a.exe b.out"
7616 +# Try to create an executable without -o first, disregard a.out.
7617 +# It will help us diagnose broken compilers, and finding out an intuition
7618 +# of exeext.
7619 +echo "$as_me:$LINENO: checking for C compiler default output" >&5
7620 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
7621 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
7622 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
7623 +  (eval $ac_link_default) 2>&5
7624 +  ac_status=$?
7625 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 +  (exit $ac_status); }; then
7627 +  # Find the output, starting from the most likely.  This scheme is
7628 +# not robust to junk in `.', hence go to wildcards (a.*) only as a last
7629 +# resort.
7630 +
7631 +# Be careful to initialize this variable, since it used to be cached.
7632 +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
7633 +ac_cv_exeext=
7634 +# b.out is created by i960 compilers.
7635 +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
7636 +do
7637 +  test -f "$ac_file" || continue
7638 +  case $ac_file in
7639 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
7640 +        ;;
7641 +    conftest.$ac_ext )
7642 +        # This is the source file.
7643 +        ;;
7644 +    [ab].out )
7645 +        # We found the default executable, but exeext='' is most
7646 +        # certainly right.
7647 +        break;;
7648 +    *.* )
7649 +        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7650 +        # FIXME: I believe we export ac_cv_exeext for Libtool,
7651 +        # but it would be cool to find out if it's true.  Does anybody
7652 +        # maintain Libtool? --akim.
7653 +        export ac_cv_exeext
7654 +        break;;
7655 +    * )
7656 +        break;;
7657 +  esac
7658 +done
7659 +else
7660 +  echo "$as_me: failed program was:" >&5
7661 +sed 's/^/| /' conftest.$ac_ext >&5
7662 +
7663 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
7664 +See \`config.log' for more details." >&5
7665 +echo "$as_me: error: C compiler cannot create executables
7666 +See \`config.log' for more details." >&2;}
7667 +   { (exit 77); exit 77; }; }
7668 +fi
7669 +
7670 +ac_exeext=$ac_cv_exeext
7671 +echo "$as_me:$LINENO: result: $ac_file" >&5
7672 +echo "${ECHO_T}$ac_file" >&6
7673 +
7674 +# Check the compiler produces executables we can run.  If not, either
7675 +# the compiler is broken, or we cross compile.
7676 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5
7677 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
7678 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
7679 +# If not cross compiling, check that we can run a simple program.
7680 +if test "$cross_compiling" != yes; then
7681 +  if { ac_try='./$ac_file'
7682 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7683 +  (eval $ac_try) 2>&5
7684 +  ac_status=$?
7685 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 +  (exit $ac_status); }; }; then
7687 +    cross_compiling=no
7688    else
7689 -    ac_cv_prog_cc_cross=yes
7690 +    if test "$cross_compiling" = maybe; then
7691 +       cross_compiling=yes
7692 +    else
7693 +       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
7694 +If you meant to cross compile, use \`--host'.
7695 +See \`config.log' for more details." >&5
7696 +echo "$as_me: error: cannot run C compiled programs.
7697 +If you meant to cross compile, use \`--host'.
7698 +See \`config.log' for more details." >&2;}
7699 +   { (exit 1); exit 1; }; }
7700 +    fi
7701    fi
7702 -else
7703 -  echo "configure: failed program was:" >&5
7704 -  cat conftest.$ac_ext >&5
7705 -  ac_cv_prog_cc_works=no
7706  fi
7707 -rm -fr conftest*
7708 -ac_ext=c
7709 -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7710 -ac_cpp='$CPP $CPPFLAGS'
7711 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7712 -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7713 -cross_compiling=$ac_cv_prog_cc_cross
7714 +echo "$as_me:$LINENO: result: yes" >&5
7715 +echo "${ECHO_T}yes" >&6
7716  
7717 -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
7718 -if test $ac_cv_prog_cc_works = no; then
7719 -  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
7720 +rm -f a.out a.exe conftest$ac_cv_exeext b.out
7721 +ac_clean_files=$ac_clean_files_save
7722 +# Check the compiler produces executables we can run.  If not, either
7723 +# the compiler is broken, or we cross compile.
7724 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
7725 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
7726 +echo "$as_me:$LINENO: result: $cross_compiling" >&5
7727 +echo "${ECHO_T}$cross_compiling" >&6
7728 +
7729 +echo "$as_me:$LINENO: checking for suffix of executables" >&5
7730 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
7731 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7732 +  (eval $ac_link) 2>&5
7733 +  ac_status=$?
7734 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735 +  (exit $ac_status); }; then
7736 +  # If both `conftest.exe' and `conftest' are `present' (well, observable)
7737 +# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
7738 +# work properly (i.e., refer to `conftest.exe'), while it won't with
7739 +# `rm'.
7740 +for ac_file in conftest.exe conftest conftest.*; do
7741 +  test -f "$ac_file" || continue
7742 +  case $ac_file in
7743 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
7744 +    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7745 +          export ac_cv_exeext
7746 +          break;;
7747 +    * ) break;;
7748 +  esac
7749 +done
7750 +else
7751 +  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
7752 +See \`config.log' for more details." >&5
7753 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
7754 +See \`config.log' for more details." >&2;}
7755 +   { (exit 1); exit 1; }; }
7756  fi
7757 -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
7758 -echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
7759 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
7760 -cross_compiling=$ac_cv_prog_cc_cross
7761  
7762 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
7763 -echo "configure:762: checking whether we are using GNU C" >&5
7764 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
7765 -  echo $ac_n "(cached) $ac_c" 1>&6
7766 +rm -f conftest$ac_cv_exeext
7767 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
7768 +echo "${ECHO_T}$ac_cv_exeext" >&6
7769 +
7770 +rm -f conftest.$ac_ext
7771 +EXEEXT=$ac_cv_exeext
7772 +ac_exeext=$EXEEXT
7773 +echo "$as_me:$LINENO: checking for suffix of object files" >&5
7774 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
7775 +if test "${ac_cv_objext+set}" = set; then
7776 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7777  else
7778 -  cat > conftest.c <<EOF
7779 -#ifdef __GNUC__
7780 -  yes;
7781 -#endif
7782 -EOF
7783 -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
7784 -  ac_cv_prog_gcc=yes
7785 +  cat >conftest.$ac_ext <<_ACEOF
7786 +#line $LINENO "configure"
7787 +/* confdefs.h.  */
7788 +_ACEOF
7789 +cat confdefs.h >>conftest.$ac_ext
7790 +cat >>conftest.$ac_ext <<_ACEOF
7791 +/* end confdefs.h.  */
7792 +
7793 +int
7794 +main ()
7795 +{
7796 +
7797 +  ;
7798 +  return 0;
7799 +}
7800 +_ACEOF
7801 +rm -f conftest.o conftest.obj
7802 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7803 +  (eval $ac_compile) 2>&5
7804 +  ac_status=$?
7805 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 +  (exit $ac_status); }; then
7807 +  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
7808 +  case $ac_file in
7809 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
7810 +    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
7811 +       break;;
7812 +  esac
7813 +done
7814  else
7815 -  ac_cv_prog_gcc=no
7816 +  echo "$as_me: failed program was:" >&5
7817 +sed 's/^/| /' conftest.$ac_ext >&5
7818 +
7819 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
7820 +See \`config.log' for more details." >&5
7821 +echo "$as_me: error: cannot compute suffix of object files: cannot compile
7822 +See \`config.log' for more details." >&2;}
7823 +   { (exit 1); exit 1; }; }
7824  fi
7825 +
7826 +rm -f conftest.$ac_cv_objext conftest.$ac_ext
7827  fi
7828 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
7829 +echo "${ECHO_T}$ac_cv_objext" >&6
7830 +OBJEXT=$ac_cv_objext
7831 +ac_objext=$OBJEXT
7832 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
7833 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
7834 +if test "${ac_cv_c_compiler_gnu+set}" = set; then
7835 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7836 +else
7837 +  cat >conftest.$ac_ext <<_ACEOF
7838 +#line $LINENO "configure"
7839 +/* confdefs.h.  */
7840 +_ACEOF
7841 +cat confdefs.h >>conftest.$ac_ext
7842 +cat >>conftest.$ac_ext <<_ACEOF
7843 +/* end confdefs.h.  */
7844  
7845 -echo "$ac_t""$ac_cv_prog_gcc" 1>&6
7846 +int
7847 +main ()
7848 +{
7849 +#ifndef __GNUC__
7850 +       choke me
7851 +#endif
7852  
7853 -if test $ac_cv_prog_gcc = yes; then
7854 -  GCC=yes
7855 +  ;
7856 +  return 0;
7857 +}
7858 +_ACEOF
7859 +rm -f conftest.$ac_objext
7860 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7861 +  (eval $ac_compile) 2>&5
7862 +  ac_status=$?
7863 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7864 +  (exit $ac_status); } &&
7865 +         { ac_try='test -s conftest.$ac_objext'
7866 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7867 +  (eval $ac_try) 2>&5
7868 +  ac_status=$?
7869 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 +  (exit $ac_status); }; }; then
7871 +  ac_compiler_gnu=yes
7872  else
7873 -  GCC=
7874 +  echo "$as_me: failed program was:" >&5
7875 +sed 's/^/| /' conftest.$ac_ext >&5
7876 +
7877 +ac_compiler_gnu=no
7878  fi
7879 +rm -f conftest.$ac_objext conftest.$ac_ext
7880 +ac_cv_c_compiler_gnu=$ac_compiler_gnu
7881  
7882 -ac_test_CFLAGS="${CFLAGS+set}"
7883 -ac_save_CFLAGS="$CFLAGS"
7884 -CFLAGS=
7885 -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
7886 -echo "configure:790: checking whether ${CC-cc} accepts -g" >&5
7887 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
7888 -  echo $ac_n "(cached) $ac_c" 1>&6
7889 +fi
7890 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
7891 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
7892 +GCC=`test $ac_compiler_gnu = yes && echo yes`
7893 +ac_test_CFLAGS=${CFLAGS+set}
7894 +ac_save_CFLAGS=$CFLAGS
7895 +CFLAGS="-g"
7896 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
7897 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
7898 +if test "${ac_cv_prog_cc_g+set}" = set; then
7899 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7900  else
7901 -  echo 'void f(){}' > conftest.c
7902 -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
7903 +  cat >conftest.$ac_ext <<_ACEOF
7904 +#line $LINENO "configure"
7905 +/* confdefs.h.  */
7906 +_ACEOF
7907 +cat confdefs.h >>conftest.$ac_ext
7908 +cat >>conftest.$ac_ext <<_ACEOF
7909 +/* end confdefs.h.  */
7910 +
7911 +int
7912 +main ()
7913 +{
7914 +
7915 +  ;
7916 +  return 0;
7917 +}
7918 +_ACEOF
7919 +rm -f conftest.$ac_objext
7920 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7921 +  (eval $ac_compile) 2>&5
7922 +  ac_status=$?
7923 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 +  (exit $ac_status); } &&
7925 +         { ac_try='test -s conftest.$ac_objext'
7926 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927 +  (eval $ac_try) 2>&5
7928 +  ac_status=$?
7929 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 +  (exit $ac_status); }; }; then
7931    ac_cv_prog_cc_g=yes
7932  else
7933 -  ac_cv_prog_cc_g=no
7934 -fi
7935 -rm -f conftest*
7936 +  echo "$as_me: failed program was:" >&5
7937 +sed 's/^/| /' conftest.$ac_ext >&5
7938  
7939 +ac_cv_prog_cc_g=no
7940  fi
7941 -
7942 -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
7943 +rm -f conftest.$ac_objext conftest.$ac_ext
7944 +fi
7945 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
7946 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
7947  if test "$ac_test_CFLAGS" = set; then
7948 -  CFLAGS="$ac_save_CFLAGS"
7949 +  CFLAGS=$ac_save_CFLAGS
7950  elif test $ac_cv_prog_cc_g = yes; then
7951    if test "$GCC" = yes; then
7952      CFLAGS="-g -O2"
7953 @@ -816,86 +1943,482 @@
7954      CFLAGS=
7955    fi
7956  fi
7957 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
7958 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
7959 +if test "${ac_cv_prog_cc_stdc+set}" = set; then
7960 +  echo $ECHO_N "(cached) $ECHO_C" >&6
7961 +else
7962 +  ac_cv_prog_cc_stdc=no
7963 +ac_save_CC=$CC
7964 +cat >conftest.$ac_ext <<_ACEOF
7965 +#line $LINENO "configure"
7966 +/* confdefs.h.  */
7967 +_ACEOF
7968 +cat confdefs.h >>conftest.$ac_ext
7969 +cat >>conftest.$ac_ext <<_ACEOF
7970 +/* end confdefs.h.  */
7971 +#include <stdarg.h>
7972 +#include <stdio.h>
7973 +#include <sys/types.h>
7974 +#include <sys/stat.h>
7975 +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7976 +struct buf { int x; };
7977 +FILE * (*rcsopen) (struct buf *, struct stat *, int);
7978 +static char *e (p, i)
7979 +     char **p;
7980 +     int i;
7981 +{
7982 +  return p[i];
7983 +}
7984 +static char *f (char * (*g) (char **, int), char **p, ...)
7985 +{
7986 +  char *s;
7987 +  va_list v;
7988 +  va_start (v,p);
7989 +  s = g (p, va_arg (v,int));
7990 +  va_end (v);
7991 +  return s;
7992 +}
7993 +int test (int i, double x);
7994 +struct s1 {int (*f) (int a);};
7995 +struct s2 {int (*f) (double a);};
7996 +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7997 +int argc;
7998 +char **argv;
7999 +int
8000 +main ()
8001 +{
8002 +return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8003 +  ;
8004 +  return 0;
8005 +}
8006 +_ACEOF
8007 +# Don't try gcc -ansi; that turns off useful extensions and
8008 +# breaks some systems' header files.
8009 +# AIX                  -qlanglvl=ansi
8010 +# Ultrix and OSF/1     -std1
8011 +# HP-UX 10.20 and later        -Ae
8012 +# HP-UX older versions -Aa -D_HPUX_SOURCE
8013 +# SVR4                 -Xc -D__EXTENSIONS__
8014 +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8015 +do
8016 +  CC="$ac_save_CC $ac_arg"
8017 +  rm -f conftest.$ac_objext
8018 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8019 +  (eval $ac_compile) 2>&5
8020 +  ac_status=$?
8021 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 +  (exit $ac_status); } &&
8023 +         { ac_try='test -s conftest.$ac_objext'
8024 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 +  (eval $ac_try) 2>&5
8026 +  ac_status=$?
8027 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 +  (exit $ac_status); }; }; then
8029 +  ac_cv_prog_cc_stdc=$ac_arg
8030 +break
8031 +else
8032 +  echo "$as_me: failed program was:" >&5
8033 +sed 's/^/| /' conftest.$ac_ext >&5
8034  
8035 -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8036 -echo "configure:822: checking how to run the C preprocessor" >&5
8037 +fi
8038 +rm -f conftest.$ac_objext
8039 +done
8040 +rm -f conftest.$ac_ext conftest.$ac_objext
8041 +CC=$ac_save_CC
8042 +
8043 +fi
8044 +
8045 +case "x$ac_cv_prog_cc_stdc" in
8046 +  x|xno)
8047 +    echo "$as_me:$LINENO: result: none needed" >&5
8048 +echo "${ECHO_T}none needed" >&6 ;;
8049 +  *)
8050 +    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
8051 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
8052 +    CC="$CC $ac_cv_prog_cc_stdc" ;;
8053 +esac
8054 +
8055 +# Some people use a C++ compiler to compile C.  Since we use `exit',
8056 +# in C++ we need to declare it.  In case someone uses the same compiler
8057 +# for both compiling C and C++ we need to have the C++ compiler decide
8058 +# the declaration of exit, since it's the most demanding environment.
8059 +cat >conftest.$ac_ext <<_ACEOF
8060 +#ifndef __cplusplus
8061 +  choke me
8062 +#endif
8063 +_ACEOF
8064 +rm -f conftest.$ac_objext
8065 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8066 +  (eval $ac_compile) 2>&5
8067 +  ac_status=$?
8068 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069 +  (exit $ac_status); } &&
8070 +         { ac_try='test -s conftest.$ac_objext'
8071 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8072 +  (eval $ac_try) 2>&5
8073 +  ac_status=$?
8074 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 +  (exit $ac_status); }; }; then
8076 +  for ac_declaration in \
8077 +   ''\
8078 +   '#include <stdlib.h>' \
8079 +   'extern "C" void std::exit (int) throw (); using std::exit;' \
8080 +   'extern "C" void std::exit (int); using std::exit;' \
8081 +   'extern "C" void exit (int) throw ();' \
8082 +   'extern "C" void exit (int);' \
8083 +   'void exit (int);'
8084 +do
8085 +  cat >conftest.$ac_ext <<_ACEOF
8086 +#line $LINENO "configure"
8087 +/* confdefs.h.  */
8088 +_ACEOF
8089 +cat confdefs.h >>conftest.$ac_ext
8090 +cat >>conftest.$ac_ext <<_ACEOF
8091 +/* end confdefs.h.  */
8092 +#include <stdlib.h>
8093 +$ac_declaration
8094 +int
8095 +main ()
8096 +{
8097 +exit (42);
8098 +  ;
8099 +  return 0;
8100 +}
8101 +_ACEOF
8102 +rm -f conftest.$ac_objext
8103 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8104 +  (eval $ac_compile) 2>&5
8105 +  ac_status=$?
8106 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107 +  (exit $ac_status); } &&
8108 +         { ac_try='test -s conftest.$ac_objext'
8109 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8110 +  (eval $ac_try) 2>&5
8111 +  ac_status=$?
8112 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 +  (exit $ac_status); }; }; then
8114 +  :
8115 +else
8116 +  echo "$as_me: failed program was:" >&5
8117 +sed 's/^/| /' conftest.$ac_ext >&5
8118 +
8119 +continue
8120 +fi
8121 +rm -f conftest.$ac_objext conftest.$ac_ext
8122 +  cat >conftest.$ac_ext <<_ACEOF
8123 +#line $LINENO "configure"
8124 +/* confdefs.h.  */
8125 +_ACEOF
8126 +cat confdefs.h >>conftest.$ac_ext
8127 +cat >>conftest.$ac_ext <<_ACEOF
8128 +/* end confdefs.h.  */
8129 +$ac_declaration
8130 +int
8131 +main ()
8132 +{
8133 +exit (42);
8134 +  ;
8135 +  return 0;
8136 +}
8137 +_ACEOF
8138 +rm -f conftest.$ac_objext
8139 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8140 +  (eval $ac_compile) 2>&5
8141 +  ac_status=$?
8142 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143 +  (exit $ac_status); } &&
8144 +         { ac_try='test -s conftest.$ac_objext'
8145 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8146 +  (eval $ac_try) 2>&5
8147 +  ac_status=$?
8148 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 +  (exit $ac_status); }; }; then
8150 +  break
8151 +else
8152 +  echo "$as_me: failed program was:" >&5
8153 +sed 's/^/| /' conftest.$ac_ext >&5
8154 +
8155 +fi
8156 +rm -f conftest.$ac_objext conftest.$ac_ext
8157 +done
8158 +rm -f conftest*
8159 +if test -n "$ac_declaration"; then
8160 +  echo '#ifdef __cplusplus' >>confdefs.h
8161 +  echo $ac_declaration      >>confdefs.h
8162 +  echo '#endif'             >>confdefs.h
8163 +fi
8164 +
8165 +else
8166 +  echo "$as_me: failed program was:" >&5
8167 +sed 's/^/| /' conftest.$ac_ext >&5
8168 +
8169 +fi
8170 +rm -f conftest.$ac_objext conftest.$ac_ext
8171 +ac_ext=c
8172 +ac_cpp='$CPP $CPPFLAGS'
8173 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8174 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8175 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
8176 +
8177 +ac_ext=c
8178 +ac_cpp='$CPP $CPPFLAGS'
8179 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8180 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8181 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
8182 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
8183 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
8184  # On Suns, sometimes $CPP names a directory.
8185  if test -n "$CPP" && test -d "$CPP"; then
8186    CPP=
8187  fi
8188  if test -z "$CPP"; then
8189 -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
8190 -  echo $ac_n "(cached) $ac_c" 1>&6
8191 +  if test "${ac_cv_prog_CPP+set}" = set; then
8192 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8193  else
8194 -    # This must be in double quotes, not single quotes, because CPP may get
8195 -  # substituted into the Makefile and "${CC-cc}" will confuse make.
8196 -  CPP="${CC-cc} -E"
8197 +      # Double quotes because CPP needs to be expanded
8198 +    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8199 +    do
8200 +      ac_preproc_ok=false
8201 +for ac_c_preproc_warn_flag in '' yes
8202 +do
8203 +  # Use a header file that comes with gcc, so configuring glibc
8204 +  # with a fresh cross-compiler works.
8205 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8206 +  # <limits.h> exists even on freestanding compilers.
8207    # On the NeXT, cc -E runs the code through the compiler's parser,
8208 -  # not just through cpp.
8209 -  cat > conftest.$ac_ext <<EOF
8210 -#line 837 "configure"
8211 -#include "confdefs.h"
8212 -#include <assert.h>
8213 -Syntax Error
8214 -EOF
8215 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8216 -{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8217 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8218 -if test -z "$ac_err"; then
8219 -  :
8220 +  # not just through cpp. "Syntax error" is here to catch this case.
8221 +  cat >conftest.$ac_ext <<_ACEOF
8222 +#line $LINENO "configure"
8223 +/* confdefs.h.  */
8224 +_ACEOF
8225 +cat confdefs.h >>conftest.$ac_ext
8226 +cat >>conftest.$ac_ext <<_ACEOF
8227 +/* end confdefs.h.  */
8228 +#ifdef __STDC__
8229 +# include <limits.h>
8230 +#else
8231 +# include <assert.h>
8232 +#endif
8233 +                     Syntax error
8234 +_ACEOF
8235 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8236 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8237 +  ac_status=$?
8238 +  grep -v '^ *+' conftest.er1 >conftest.err
8239 +  rm -f conftest.er1
8240 +  cat conftest.err >&5
8241 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8242 +  (exit $ac_status); } >/dev/null; then
8243 +  if test -s conftest.err; then
8244 +    ac_cpp_err=$ac_c_preproc_warn_flag
8245 +  else
8246 +    ac_cpp_err=
8247 +  fi
8248  else
8249 -  echo "$ac_err" >&5
8250 -  echo "configure: failed program was:" >&5
8251 -  cat conftest.$ac_ext >&5
8252 -  rm -rf conftest*
8253 -  CPP="${CC-cc} -E -traditional-cpp"
8254 -  cat > conftest.$ac_ext <<EOF
8255 -#line 854 "configure"
8256 -#include "confdefs.h"
8257 -#include <assert.h>
8258 -Syntax Error
8259 -EOF
8260 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8261 -{ (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8262 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8263 -if test -z "$ac_err"; then
8264 +  ac_cpp_err=yes
8265 +fi
8266 +if test -z "$ac_cpp_err"; then
8267    :
8268  else
8269 -  echo "$ac_err" >&5
8270 -  echo "configure: failed program was:" >&5
8271 -  cat conftest.$ac_ext >&5
8272 -  rm -rf conftest*
8273 -  CPP="${CC-cc} -nologo -E"
8274 -  cat > conftest.$ac_ext <<EOF
8275 -#line 871 "configure"
8276 -#include "confdefs.h"
8277 -#include <assert.h>
8278 -Syntax Error
8279 -EOF
8280 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8281 -{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8282 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8283 -if test -z "$ac_err"; then
8284 -  :
8285 +  echo "$as_me: failed program was:" >&5
8286 +sed 's/^/| /' conftest.$ac_ext >&5
8287 +
8288 +  # Broken: fails on valid input.
8289 +continue
8290 +fi
8291 +rm -f conftest.err conftest.$ac_ext
8292 +
8293 +  # OK, works on sane cases.  Now check whether non-existent headers
8294 +  # can be detected and how.
8295 +  cat >conftest.$ac_ext <<_ACEOF
8296 +#line $LINENO "configure"
8297 +/* confdefs.h.  */
8298 +_ACEOF
8299 +cat confdefs.h >>conftest.$ac_ext
8300 +cat >>conftest.$ac_ext <<_ACEOF
8301 +/* end confdefs.h.  */
8302 +#include <ac_nonexistent.h>
8303 +_ACEOF
8304 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8305 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8306 +  ac_status=$?
8307 +  grep -v '^ *+' conftest.er1 >conftest.err
8308 +  rm -f conftest.er1
8309 +  cat conftest.err >&5
8310 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 +  (exit $ac_status); } >/dev/null; then
8312 +  if test -s conftest.err; then
8313 +    ac_cpp_err=$ac_c_preproc_warn_flag
8314 +  else
8315 +    ac_cpp_err=
8316 +  fi
8317  else
8318 -  echo "$ac_err" >&5
8319 -  echo "configure: failed program was:" >&5
8320 -  cat conftest.$ac_ext >&5
8321 -  rm -rf conftest*
8322 -  CPP=/lib/cpp
8323 +  ac_cpp_err=yes
8324  fi
8325 -rm -f conftest*
8326 +if test -z "$ac_cpp_err"; then
8327 +  # Broken: success on invalid input.
8328 +continue
8329 +else
8330 +  echo "$as_me: failed program was:" >&5
8331 +sed 's/^/| /' conftest.$ac_ext >&5
8332 +
8333 +  # Passes both tests.
8334 +ac_preproc_ok=:
8335 +break
8336  fi
8337 -rm -f conftest*
8338 +rm -f conftest.err conftest.$ac_ext
8339 +
8340 +done
8341 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8342 +rm -f conftest.err conftest.$ac_ext
8343 +if $ac_preproc_ok; then
8344 +  break
8345  fi
8346 -rm -f conftest*
8347 -  ac_cv_prog_CPP="$CPP"
8348 +
8349 +    done
8350 +    ac_cv_prog_CPP=$CPP
8351 +
8352  fi
8353 -  CPP="$ac_cv_prog_CPP"
8354 +  CPP=$ac_cv_prog_CPP
8355  else
8356 -  ac_cv_prog_CPP="$CPP"
8357 +  ac_cv_prog_CPP=$CPP
8358  fi
8359 -echo "$ac_t""$CPP" 1>&6
8360 +echo "$as_me:$LINENO: result: $CPP" >&5
8361 +echo "${ECHO_T}$CPP" >&6
8362 +ac_preproc_ok=false
8363 +for ac_c_preproc_warn_flag in '' yes
8364 +do
8365 +  # Use a header file that comes with gcc, so configuring glibc
8366 +  # with a fresh cross-compiler works.
8367 +  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8368 +  # <limits.h> exists even on freestanding compilers.
8369 +  # On the NeXT, cc -E runs the code through the compiler's parser,
8370 +  # not just through cpp. "Syntax error" is here to catch this case.
8371 +  cat >conftest.$ac_ext <<_ACEOF
8372 +#line $LINENO "configure"
8373 +/* confdefs.h.  */
8374 +_ACEOF
8375 +cat confdefs.h >>conftest.$ac_ext
8376 +cat >>conftest.$ac_ext <<_ACEOF
8377 +/* end confdefs.h.  */
8378 +#ifdef __STDC__
8379 +# include <limits.h>
8380 +#else
8381 +# include <assert.h>
8382 +#endif
8383 +                     Syntax error
8384 +_ACEOF
8385 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8386 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8387 +  ac_status=$?
8388 +  grep -v '^ *+' conftest.er1 >conftest.err
8389 +  rm -f conftest.er1
8390 +  cat conftest.err >&5
8391 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 +  (exit $ac_status); } >/dev/null; then
8393 +  if test -s conftest.err; then
8394 +    ac_cpp_err=$ac_c_preproc_warn_flag
8395 +  else
8396 +    ac_cpp_err=
8397 +  fi
8398 +else
8399 +  ac_cpp_err=yes
8400 +fi
8401 +if test -z "$ac_cpp_err"; then
8402 +  :
8403 +else
8404 +  echo "$as_me: failed program was:" >&5
8405 +sed 's/^/| /' conftest.$ac_ext >&5
8406 +
8407 +  # Broken: fails on valid input.
8408 +continue
8409 +fi
8410 +rm -f conftest.err conftest.$ac_ext
8411 +
8412 +  # OK, works on sane cases.  Now check whether non-existent headers
8413 +  # can be detected and how.
8414 +  cat >conftest.$ac_ext <<_ACEOF
8415 +#line $LINENO "configure"
8416 +/* confdefs.h.  */
8417 +_ACEOF
8418 +cat confdefs.h >>conftest.$ac_ext
8419 +cat >>conftest.$ac_ext <<_ACEOF
8420 +/* end confdefs.h.  */
8421 +#include <ac_nonexistent.h>
8422 +_ACEOF
8423 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8424 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8425 +  ac_status=$?
8426 +  grep -v '^ *+' conftest.er1 >conftest.err
8427 +  rm -f conftest.er1
8428 +  cat conftest.err >&5
8429 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 +  (exit $ac_status); } >/dev/null; then
8431 +  if test -s conftest.err; then
8432 +    ac_cpp_err=$ac_c_preproc_warn_flag
8433 +  else
8434 +    ac_cpp_err=
8435 +  fi
8436 +else
8437 +  ac_cpp_err=yes
8438 +fi
8439 +if test -z "$ac_cpp_err"; then
8440 +  # Broken: success on invalid input.
8441 +continue
8442 +else
8443 +  echo "$as_me: failed program was:" >&5
8444 +sed 's/^/| /' conftest.$ac_ext >&5
8445 +
8446 +  # Passes both tests.
8447 +ac_preproc_ok=:
8448 +break
8449 +fi
8450 +rm -f conftest.err conftest.$ac_ext
8451 +
8452 +done
8453 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8454 +rm -f conftest.err conftest.$ac_ext
8455 +if $ac_preproc_ok; then
8456 +  :
8457 +else
8458 +  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
8459 +See \`config.log' for more details." >&5
8460 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
8461 +See \`config.log' for more details." >&2;}
8462 +   { (exit 1); exit 1; }; }
8463 +fi
8464 +
8465 +ac_ext=c
8466 +ac_cpp='$CPP $CPPFLAGS'
8467 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8468 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8469 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
8470 +
8471 +ac_aux_dir=
8472 +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
8473 +  if test -f $ac_dir/install-sh; then
8474 +    ac_aux_dir=$ac_dir
8475 +    ac_install_sh="$ac_aux_dir/install-sh -c"
8476 +    break
8477 +  elif test -f $ac_dir/install.sh; then
8478 +    ac_aux_dir=$ac_dir
8479 +    ac_install_sh="$ac_aux_dir/install.sh -c"
8480 +    break
8481 +  elif test -f $ac_dir/shtool; then
8482 +    ac_aux_dir=$ac_dir
8483 +    ac_install_sh="$ac_aux_dir/shtool install -c"
8484 +    break
8485 +  fi
8486 +done
8487 +if test -z "$ac_aux_dir"; then
8488 +  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
8489 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
8490 +   { (exit 1); exit 1; }; }
8491 +fi
8492 +ac_config_guess="$SHELL $ac_aux_dir/config.guess"
8493 +ac_config_sub="$SHELL $ac_aux_dir/config.sub"
8494 +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
8495  
8496  # Find a good install program.  We prefer a C program (faster),
8497  # so one script is as good as another.  But avoid the broken or
8498 @@ -904,87 +2427,102 @@
8499  # SunOS /usr/etc/install
8500  # IRIX /sbin/install
8501  # AIX /bin/install
8502 +# AmigaOS /C/install, which installs bootblocks on floppy discs
8503  # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8504  # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8505  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8506  # ./install, which can be erroneously created by make from ./install.sh.
8507 -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
8508 -echo "configure:913: checking for a BSD compatible install" >&5
8509 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8510 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
8511  if test -z "$INSTALL"; then
8512 -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
8513 -  echo $ac_n "(cached) $ac_c" 1>&6
8514 +if test "${ac_cv_path_install+set}" = set; then
8515 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8516  else
8517 -    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
8518 -  for ac_dir in $PATH; do
8519 -    # Account for people who put trailing slashes in PATH elements.
8520 -    case "$ac_dir/" in
8521 -    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8522 -    *)
8523 -      # OSF1 and SCO ODT 3.0 have their own names for install.
8524 -      # Don't use installbsd from OSF since it installs stuff as root
8525 -      # by default.
8526 -      for ac_prog in ginstall scoinst install; do
8527 -        if test -f $ac_dir/$ac_prog; then
8528 -         if test $ac_prog = install &&
8529 -            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8530 -           # AIX install.  It has an incompatible calling convention.
8531 -           :
8532 -         else
8533 -           ac_cv_path_install="$ac_dir/$ac_prog -c"
8534 -           break 2
8535 -         fi
8536 -       fi
8537 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538 +for as_dir in $PATH
8539 +do
8540 +  IFS=$as_save_IFS
8541 +  test -z "$as_dir" && as_dir=.
8542 +  # Account for people who put trailing slashes in PATH elements.
8543 +case $as_dir/ in
8544 +  ./ | .// | /cC/* | \
8545 +  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8546 +  /usr/ucb/* ) ;;
8547 +  *)
8548 +    # OSF1 and SCO ODT 3.0 have their own names for install.
8549 +    # Don't use installbsd from OSF since it installs stuff as root
8550 +    # by default.
8551 +    for ac_prog in ginstall scoinst install; do
8552 +      for ac_exec_ext in '' $ac_executable_extensions; do
8553 +        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8554 +          if test $ac_prog = install &&
8555 +            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8556 +            # AIX install.  It has an incompatible calling convention.
8557 +            :
8558 +          elif test $ac_prog = install &&
8559 +            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8560 +            # program-specific install script used by HP pwplus--don't use.
8561 +            :
8562 +          else
8563 +            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8564 +            break 3
8565 +          fi
8566 +        fi
8567        done
8568 -      ;;
8569 -    esac
8570 -  done
8571 -  IFS="$ac_save_IFS"
8572 +    done
8573 +    ;;
8574 +esac
8575 +done
8576 +
8577  
8578  fi
8579    if test "${ac_cv_path_install+set}" = set; then
8580 -    INSTALL="$ac_cv_path_install"
8581 +    INSTALL=$ac_cv_path_install
8582    else
8583      # As a last resort, use the slow shell script.  We don't cache a
8584      # path for INSTALL within a source directory, because that will
8585      # break other packages using the cache if that directory is
8586      # removed, or if the path is relative.
8587 -    INSTALL="$ac_install_sh"
8588 +    INSTALL=$ac_install_sh
8589    fi
8590  fi
8591 -echo "$ac_t""$INSTALL" 1>&6
8592 +echo "$as_me:$LINENO: result: $INSTALL" >&5
8593 +echo "${ECHO_T}$INSTALL" >&6
8594  
8595  # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8596  # It thinks the first close brace ends the variable substitution.
8597  test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8598  
8599 -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
8600 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8601  
8602  test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8603  
8604 -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
8605 -echo "configure:966: checking whether ${MAKE-make} sets \${MAKE}" >&5
8606 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
8607 -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
8608 -  echo $ac_n "(cached) $ac_c" 1>&6
8609 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8610 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
8611 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
8612 +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8613 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8614  else
8615 -  cat > conftestmake <<\EOF
8616 +  cat >conftest.make <<\_ACEOF
8617  all:
8618 -       @echo 'ac_maketemp="${MAKE}"'
8619 -EOF
8620 +       @echo 'ac_maketemp="$(MAKE)"'
8621 +_ACEOF
8622  # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8623 -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
8624 +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8625  if test -n "$ac_maketemp"; then
8626    eval ac_cv_prog_make_${ac_make}_set=yes
8627  else
8628    eval ac_cv_prog_make_${ac_make}_set=no
8629  fi
8630 -rm -f conftestmake
8631 +rm -f conftest.make
8632  fi
8633  if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
8634 -  echo "$ac_t""yes" 1>&6
8635 +  echo "$as_me:$LINENO: result: yes" >&5
8636 +echo "${ECHO_T}yes" >&6
8637    SET_MAKE=
8638  else
8639 -  echo "$ac_t""no" 1>&6
8640 +  echo "$as_me:$LINENO: result: no" >&5
8641 +echo "${ECHO_T}no" >&6
8642    SET_MAKE="MAKE=${MAKE-make}"
8643  fi
8644  
8645 @@ -992,625 +2530,1355 @@
8646  # because <errno.h> reserves symbols starting with `E'.
8647  # Extract the first word of "ed", so it can be a program name with args.
8648  set dummy ed; ac_word=$2
8649 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8650 -echo "configure:997: checking for $ac_word" >&5
8651 -if eval "test \"`echo '$''{'ac_cv_path_ed_PROGRAM'+set}'`\" = set"; then
8652 -  echo $ac_n "(cached) $ac_c" 1>&6
8653 +echo "$as_me:$LINENO: checking for $ac_word" >&5
8654 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8655 +if test "${ac_cv_path_ed_PROGRAM+set}" = set; then
8656 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8657  else
8658 -  case "$ed_PROGRAM" in
8659 -  /*)
8660 +  case $ed_PROGRAM in
8661 +  [\\/]* | ?:[\\/]*)
8662    ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a path.
8663    ;;
8664 -  ?:/*)                         
8665 -  ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a dos path.
8666 -  ;;
8667    *)
8668 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
8669 -  ac_dummy="$PATH"
8670 -  for ac_dir in $ac_dummy; do 
8671 -    test -z "$ac_dir" && ac_dir=.
8672 -    if test -f $ac_dir/$ac_word; then
8673 -      ac_cv_path_ed_PROGRAM="$ac_dir/$ac_word"
8674 -      break
8675 -    fi
8676 -  done
8677 -  IFS="$ac_save_ifs"
8678 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679 +for as_dir in $PATH
8680 +do
8681 +  IFS=$as_save_IFS
8682 +  test -z "$as_dir" && as_dir=.
8683 +  for ac_exec_ext in '' $ac_executable_extensions; do
8684 +  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685 +    ac_cv_path_ed_PROGRAM="$as_dir/$ac_word$ac_exec_ext"
8686 +    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8687 +    break 2
8688 +  fi
8689 +done
8690 +done
8691 +
8692    test -z "$ac_cv_path_ed_PROGRAM" && ac_cv_path_ed_PROGRAM="ed"
8693    ;;
8694  esac
8695  fi
8696 -ed_PROGRAM="$ac_cv_path_ed_PROGRAM"
8697 +ed_PROGRAM=$ac_cv_path_ed_PROGRAM
8698 +
8699  if test -n "$ed_PROGRAM"; then
8700 -  echo "$ac_t""$ed_PROGRAM" 1>&6
8701 +  echo "$as_me:$LINENO: result: $ed_PROGRAM" >&5
8702 +echo "${ECHO_T}$ed_PROGRAM" >&6
8703  else
8704 -  echo "$ac_t""no" 1>&6
8705 +  echo "$as_me:$LINENO: result: no" >&5
8706 +echo "${ECHO_T}no" >&6
8707  fi
8708  
8709  
8710 -echo $ac_n "checking build system type""... $ac_c" 1>&6
8711 -echo "configure:1032: checking build system type" >&5
8712  
8713 -build_alias=$build
8714 -case "$build_alias" in
8715 -NONE)
8716 -  case $nonopt in
8717 -  NONE) build_alias=$host_alias ;;
8718 -  *) build_alias=$nonopt ;;
8719 -  esac ;;
8720 -esac
8721 +cat >>confdefs.h <<\_ACEOF
8722 +#define _GNU_SOURCE 1
8723 +_ACEOF
8724  
8725 -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
8726 -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
8727 -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
8728 -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
8729 -echo "$ac_t""$build" 1>&6
8730  
8731 -if test $host != $build; then
8732 -  ac_tool_prefix=${host_alias}-
8733 -else
8734 -  ac_tool_prefix=
8735 -fi
8736  
8737  
8738 -   # Check whether --enable-largefile or --disable-largefile was given.
8739 -if test "${enable_largefile+set}" = set; then
8740 -  enableval="$enable_largefile"
8741 -  :
8742 -fi
8743 -
8744 -   if test "$enable_largefile" != no; then
8745 -     # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
8746 -set dummy ${ac_tool_prefix}getconf; ac_word=$2
8747 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8748 -echo "configure:1066: checking for $ac_word" >&5
8749 -if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
8750 -  echo $ac_n "(cached) $ac_c" 1>&6
8751 -else
8752 -  if test -n "$GETCONF"; then
8753 -  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
8754 +echo "$as_me:$LINENO: checking for egrep" >&5
8755 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6
8756 +if test "${ac_cv_prog_egrep+set}" = set; then
8757 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8758  else
8759 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
8760 -  ac_dummy="$PATH"
8761 -  for ac_dir in $ac_dummy; do
8762 -    test -z "$ac_dir" && ac_dir=.
8763 -    if test -f $ac_dir/$ac_word; then
8764 -      ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
8765 -      break
8766 +  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
8767 +    then ac_cv_prog_egrep='grep -E'
8768 +    else ac_cv_prog_egrep='egrep'
8769      fi
8770 -  done
8771 -  IFS="$ac_save_ifs"
8772 -  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
8773  fi
8774 -fi
8775 -GETCONF="$ac_cv_prog_GETCONF"
8776 -if test -n "$GETCONF"; then
8777 -  echo "$ac_t""$GETCONF" 1>&6
8778 +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
8779 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6
8780 + EGREP=$ac_cv_prog_egrep
8781 +
8782 +
8783 +
8784 +echo "$as_me:$LINENO: checking for AIX" >&5
8785 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6
8786 +cat >conftest.$ac_ext <<_ACEOF
8787 +#line $LINENO "configure"
8788 +/* confdefs.h.  */
8789 +_ACEOF
8790 +cat confdefs.h >>conftest.$ac_ext
8791 +cat >>conftest.$ac_ext <<_ACEOF
8792 +/* end confdefs.h.  */
8793 +#ifdef _AIX
8794 +  yes
8795 +#endif
8796 +
8797 +_ACEOF
8798 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8799 +  $EGREP "yes" >/dev/null 2>&1; then
8800 +  echo "$as_me:$LINENO: result: yes" >&5
8801 +echo "${ECHO_T}yes" >&6
8802 +cat >>confdefs.h <<\_ACEOF
8803 +#define _ALL_SOURCE 1
8804 +_ACEOF
8805 +
8806  else
8807 -  echo "$ac_t""no" 1>&6
8808 +  echo "$as_me:$LINENO: result: no" >&5
8809 +echo "${ECHO_T}no" >&6
8810  fi
8811 +rm -f conftest*
8812  
8813  
8814 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8815 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8816 +if test "${ac_cv_header_stdc+set}" = set; then
8817 +  echo $ECHO_N "(cached) $ECHO_C" >&6
8818 +else
8819 +  cat >conftest.$ac_ext <<_ACEOF
8820 +#line $LINENO "configure"
8821 +/* confdefs.h.  */
8822 +_ACEOF
8823 +cat confdefs.h >>conftest.$ac_ext
8824 +cat >>conftest.$ac_ext <<_ACEOF
8825 +/* end confdefs.h.  */
8826 +#include <stdlib.h>
8827 +#include <stdarg.h>
8828 +#include <string.h>
8829 +#include <float.h>
8830  
8831 -     echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
8832 -echo "configure:1096: checking for CFLAGS value to request large file support" >&5
8833 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
8834 -  echo $ac_n "(cached) $ac_c" 1>&6
8835 +int
8836 +main ()
8837 +{
8838 +
8839 +  ;
8840 +  return 0;
8841 +}
8842 +_ACEOF
8843 +rm -f conftest.$ac_objext
8844 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8845 +  (eval $ac_compile) 2>&5
8846 +  ac_status=$?
8847 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8848 +  (exit $ac_status); } &&
8849 +         { ac_try='test -s conftest.$ac_objext'
8850 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8851 +  (eval $ac_try) 2>&5
8852 +  ac_status=$?
8853 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854 +  (exit $ac_status); }; }; then
8855 +  ac_cv_header_stdc=yes
8856  else
8857 -  ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
8858 -       ac_cv_sys_largefile_CFLAGS=no
8859 -       case "$host_os" in
8860 -          # IRIX 6.2 and later require cc -n32.
8861 -          irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
8862 -            if test "$GCC" != yes; then
8863 -              ac_cv_sys_largefile_CFLAGS=-n32
8864 -            fi
8865 -            ac_save_CC="$CC"
8866 -            CC="$CC $ac_cv_sys_largefile_CFLAGS"
8867 -            cat > conftest.$ac_ext <<EOF
8868 -#line 1111 "configure"
8869 -#include "confdefs.h"
8870 +  echo "$as_me: failed program was:" >&5
8871 +sed 's/^/| /' conftest.$ac_ext >&5
8872  
8873 -int main() {
8874 +ac_cv_header_stdc=no
8875 +fi
8876 +rm -f conftest.$ac_objext conftest.$ac_ext
8877  
8878 -; return 0; }
8879 -EOF
8880 -if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8881 +if test $ac_cv_header_stdc = yes; then
8882 +  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8883 +  cat >conftest.$ac_ext <<_ACEOF
8884 +#line $LINENO "configure"
8885 +/* confdefs.h.  */
8886 +_ACEOF
8887 +cat confdefs.h >>conftest.$ac_ext
8888 +cat >>conftest.$ac_ext <<_ACEOF
8889 +/* end confdefs.h.  */
8890 +#include <string.h>
8891 +
8892 +_ACEOF
8893 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8894 +  $EGREP "memchr" >/dev/null 2>&1; then
8895    :
8896  else
8897 -  echo "configure: failed program was:" >&5
8898 -  cat conftest.$ac_ext >&5
8899 -  rm -rf conftest*
8900 -  ac_cv_sys_largefile_CFLAGS=no
8901 +  ac_cv_header_stdc=no
8902  fi
8903  rm -f conftest*
8904 -            CC="$ac_save_CC"
8905 -          esac
8906 -      }
8907 +
8908  fi
8909  
8910 -echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
8911 -     echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
8912 -echo "configure:1134: checking for LDFLAGS value to request large file support" >&5
8913 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
8914 -  echo $ac_n "(cached) $ac_c" 1>&6
8915 +if test $ac_cv_header_stdc = yes; then
8916 +  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8917 +  cat >conftest.$ac_ext <<_ACEOF
8918 +#line $LINENO "configure"
8919 +/* confdefs.h.  */
8920 +_ACEOF
8921 +cat confdefs.h >>conftest.$ac_ext
8922 +cat >>conftest.$ac_ext <<_ACEOF
8923 +/* end confdefs.h.  */
8924 +#include <stdlib.h>
8925 +
8926 +_ACEOF
8927 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8928 +  $EGREP "free" >/dev/null 2>&1; then
8929 +  :
8930  else
8931 -  ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
8932 -       ac_cv_sys_largefile_LDFLAGS=no
8933 -       
8934 -      }
8935 +  ac_cv_header_stdc=no
8936  fi
8937 +rm -f conftest*
8938  
8939 -echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
8940 -     echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
8941 -echo "configure:1146: checking for LIBS value to request large file support" >&5
8942 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
8943 -  echo $ac_n "(cached) $ac_c" 1>&6
8944 -else
8945 -  ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
8946 -       ac_cv_sys_largefile_LIBS=no
8947 -       
8948 -      }
8949  fi
8950  
8951 -echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
8952 +if test $ac_cv_header_stdc = yes; then
8953 +  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8954 +  if test "$cross_compiling" = yes; then
8955 +  :
8956 +else
8957 +  cat >conftest.$ac_ext <<_ACEOF
8958 +#line $LINENO "configure"
8959 +/* confdefs.h.  */
8960 +_ACEOF
8961 +cat confdefs.h >>conftest.$ac_ext
8962 +cat >>conftest.$ac_ext <<_ACEOF
8963 +/* end confdefs.h.  */
8964 +#include <ctype.h>
8965 +#if ((' ' & 0x0FF) == 0x020)
8966 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8967 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8968 +#else
8969 +# define ISLOWER(c) \
8970 +                   (('a' <= (c) && (c) <= 'i') \
8971 +                     || ('j' <= (c) && (c) <= 'r') \
8972 +                     || ('s' <= (c) && (c) <= 'z'))
8973 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8974 +#endif
8975  
8976 -     for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
8977 -       case "$ac_flag" in
8978 -       no) ;;
8979 -       -D_FILE_OFFSET_BITS=*) ;;
8980 -       -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
8981 -       -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
8982 -       -D?* | -I?*)
8983 -        case "$ac_flag" in
8984 -   no) ;;
8985 -   ?*)
8986 -     case "$CPPFLAGS" in
8987 -     '') CPPFLAGS="$ac_flag" ;;
8988 -     *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
8989 -     esac ;;
8990 -   esac ;;
8991 -       *)
8992 -        case "$ac_flag" in
8993 -   no) ;;
8994 -   ?*)
8995 -     case "$CFLAGS" in
8996 -     '') CFLAGS="$ac_flag" ;;
8997 -     *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
8998 -     esac ;;
8999 -   esac ;;
9000 -       esac
9001 -     done
9002 -     case "$ac_cv_sys_largefile_LDFLAGS" in
9003 -   no) ;;
9004 -   ?*)
9005 -     case "$LDFLAGS" in
9006 -     '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
9007 -     *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
9008 -     esac ;;
9009 -   esac
9010 -     case "$ac_cv_sys_largefile_LIBS" in
9011 -   no) ;;
9012 -   ?*)
9013 -     case "$LIBS" in
9014 -     '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
9015 -     *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
9016 -     esac ;;
9017 -   esac
9018 -     echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
9019 -echo "configure:1201: checking for _FILE_OFFSET_BITS" >&5
9020 -if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
9021 -  echo $ac_n "(cached) $ac_c" 1>&6
9022 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9023 +int
9024 +main ()
9025 +{
9026 +  int i;
9027 +  for (i = 0; i < 256; i++)
9028 +    if (XOR (islower (i), ISLOWER (i))
9029 +        || toupper (i) != TOUPPER (i))
9030 +      exit(2);
9031 +  exit (0);
9032 +}
9033 +_ACEOF
9034 +rm -f conftest$ac_exeext
9035 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9036 +  (eval $ac_link) 2>&5
9037 +  ac_status=$?
9038 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9040 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9041 +  (eval $ac_try) 2>&5
9042 +  ac_status=$?
9043 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044 +  (exit $ac_status); }; }; then
9045 +  :
9046  else
9047 -  ac_cv_sys_file_offset_bits=no
9048 -      case "$host_os" in
9049 -       # HP-UX 10.20 and later
9050 -       hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
9051 -         ac_cv_sys_file_offset_bits=64 ;;
9052 -       esac
9053 -      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9054 -       case "$ac_flag" in
9055 -       -D_FILE_OFFSET_BITS)
9056 -         ac_cv_sys_file_offset_bits=1 ;;
9057 -       -D_FILE_OFFSET_BITS=*)
9058 -         ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
9059 -       esac
9060 -      done
9061 -      
9062 +  echo "$as_me: program exited with status $ac_status" >&5
9063 +echo "$as_me: failed program was:" >&5
9064 +sed 's/^/| /' conftest.$ac_ext >&5
9065 +
9066 +( exit $ac_status )
9067 +ac_cv_header_stdc=no
9068  fi
9069 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9070 +fi
9071 +fi
9072 +fi
9073 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
9074 +echo "${ECHO_T}$ac_cv_header_stdc" >&6
9075 +if test $ac_cv_header_stdc = yes; then
9076  
9077 -echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
9078 -   if test "$ac_cv_sys_file_offset_bits" != no; then
9079 -     cat >> confdefs.h <<EOF
9080 -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9081 -EOF
9082 +cat >>confdefs.h <<\_ACEOF
9083 +#define STDC_HEADERS 1
9084 +_ACEOF
9085  
9086 -   fi
9087 -     echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
9088 -echo "configure:1230: checking for _LARGEFILE_SOURCE" >&5
9089 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
9090 -  echo $ac_n "(cached) $ac_c" 1>&6
9091 -else
9092 -  ac_cv_sys_largefile_source=no
9093 -      case "$host_os" in
9094 -       # HP-UX 10.20 and later
9095 -       hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
9096 -         ac_cv_sys_largefile_source=1 ;;
9097 -       esac
9098 -      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9099 -       case "$ac_flag" in
9100 -       -D_LARGEFILE_SOURCE)
9101 -         ac_cv_sys_largefile_source=1 ;;
9102 -       -D_LARGEFILE_SOURCE=*)
9103 -         ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
9104 -       esac
9105 -      done
9106 -      
9107  fi
9108  
9109 -echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
9110 -   if test "$ac_cv_sys_largefile_source" != no; then
9111 -     cat >> confdefs.h <<EOF
9112 -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9113 -EOF
9114 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
9115 +
9116  
9117 -   fi
9118 -     echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
9119 -echo "configure:1259: checking for _LARGE_FILES" >&5
9120 -if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
9121 -  echo $ac_n "(cached) $ac_c" 1>&6
9122 -else
9123 -  ac_cv_sys_large_files=no
9124 -      case "$host_os" in
9125 -       # AIX 4.2 and later
9126 -       aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
9127 -         ac_cv_sys_large_files=1 ;;
9128 -       esac
9129 -      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9130 -       case "$ac_flag" in
9131 -       -D_LARGE_FILES)
9132 -         ac_cv_sys_large_files=1 ;;
9133 -       -D_LARGE_FILES=*)
9134 -         ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
9135 -       esac
9136 -      done
9137 -      
9138 -fi
9139  
9140 -echo "$ac_t""$ac_cv_sys_large_files" 1>&6
9141 -   if test "$ac_cv_sys_large_files" != no; then
9142 -     cat >> confdefs.h <<EOF
9143 -#define _LARGE_FILES $ac_cv_sys_large_files
9144 -EOF
9145  
9146 -   fi
9147 -   fi
9148 -  
9149  
9150 -echo $ac_n "checking for AIX""... $ac_c" 1>&6
9151 -echo "configure:1291: checking for AIX" >&5
9152 -cat > conftest.$ac_ext <<EOF
9153 -#line 1293 "configure"
9154 -#include "confdefs.h"
9155 -#ifdef _AIX
9156 -  yes
9157 -#endif
9158  
9159 -EOF
9160 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9161 -  egrep "yes" >/dev/null 2>&1; then
9162 -  rm -rf conftest*
9163 -  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
9164 -#define _ALL_SOURCE 1
9165 -EOF
9166  
9167 +
9168 +
9169 +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9170 +                  inttypes.h stdint.h unistd.h
9171 +do
9172 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9173 +echo "$as_me:$LINENO: checking for $ac_header" >&5
9174 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9175 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
9176 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9177  else
9178 -  rm -rf conftest*
9179 -  echo "$ac_t""no" 1>&6
9180 +  cat >conftest.$ac_ext <<_ACEOF
9181 +#line $LINENO "configure"
9182 +/* confdefs.h.  */
9183 +_ACEOF
9184 +cat confdefs.h >>conftest.$ac_ext
9185 +cat >>conftest.$ac_ext <<_ACEOF
9186 +/* end confdefs.h.  */
9187 +$ac_includes_default
9188 +
9189 +#include <$ac_header>
9190 +_ACEOF
9191 +rm -f conftest.$ac_objext
9192 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9193 +  (eval $ac_compile) 2>&5
9194 +  ac_status=$?
9195 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196 +  (exit $ac_status); } &&
9197 +         { ac_try='test -s conftest.$ac_objext'
9198 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9199 +  (eval $ac_try) 2>&5
9200 +  ac_status=$?
9201 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 +  (exit $ac_status); }; }; then
9203 +  eval "$as_ac_Header=yes"
9204 +else
9205 +  echo "$as_me: failed program was:" >&5
9206 +sed 's/^/| /' conftest.$ac_ext >&5
9207 +
9208 +eval "$as_ac_Header=no"
9209  fi
9210 -rm -f conftest*
9211 +rm -f conftest.$ac_objext conftest.$ac_ext
9212 +fi
9213 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9214 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9215 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
9216 +  cat >>confdefs.h <<_ACEOF
9217 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9218 +_ACEOF
9219  
9220 +fi
9221  
9222 -ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
9223 -echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
9224 -echo "configure:1316: checking for minix/config.h" >&5
9225 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9226 -  echo $ac_n "(cached) $ac_c" 1>&6
9227 +done
9228 +
9229 +
9230 +if test "${ac_cv_header_minix_config_h+set}" = set; then
9231 +  echo "$as_me:$LINENO: checking for minix/config.h" >&5
9232 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
9233 +if test "${ac_cv_header_minix_config_h+set}" = set; then
9234 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9235 +fi
9236 +echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
9237 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
9238  else
9239 -  cat > conftest.$ac_ext <<EOF
9240 -#line 1321 "configure"
9241 -#include "confdefs.h"
9242 +  # Is the header compilable?
9243 +echo "$as_me:$LINENO: checking minix/config.h usability" >&5
9244 +echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
9245 +cat >conftest.$ac_ext <<_ACEOF
9246 +#line $LINENO "configure"
9247 +/* confdefs.h.  */
9248 +_ACEOF
9249 +cat confdefs.h >>conftest.$ac_ext
9250 +cat >>conftest.$ac_ext <<_ACEOF
9251 +/* end confdefs.h.  */
9252 +$ac_includes_default
9253  #include <minix/config.h>
9254 -EOF
9255 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9256 -{ (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9257 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9258 -if test -z "$ac_err"; then
9259 -  rm -rf conftest*
9260 -  eval "ac_cv_header_$ac_safe=yes"
9261 +_ACEOF
9262 +rm -f conftest.$ac_objext
9263 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9264 +  (eval $ac_compile) 2>&5
9265 +  ac_status=$?
9266 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267 +  (exit $ac_status); } &&
9268 +         { ac_try='test -s conftest.$ac_objext'
9269 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9270 +  (eval $ac_try) 2>&5
9271 +  ac_status=$?
9272 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273 +  (exit $ac_status); }; }; then
9274 +  ac_header_compiler=yes
9275  else
9276 -  echo "$ac_err" >&5
9277 -  echo "configure: failed program was:" >&5
9278 -  cat conftest.$ac_ext >&5
9279 -  rm -rf conftest*
9280 -  eval "ac_cv_header_$ac_safe=no"
9281 +  echo "$as_me: failed program was:" >&5
9282 +sed 's/^/| /' conftest.$ac_ext >&5
9283 +
9284 +ac_header_compiler=no
9285  fi
9286 -rm -f conftest*
9287 +rm -f conftest.$ac_objext conftest.$ac_ext
9288 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9289 +echo "${ECHO_T}$ac_header_compiler" >&6
9290 +
9291 +# Is the header present?
9292 +echo "$as_me:$LINENO: checking minix/config.h presence" >&5
9293 +echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
9294 +cat >conftest.$ac_ext <<_ACEOF
9295 +#line $LINENO "configure"
9296 +/* confdefs.h.  */
9297 +_ACEOF
9298 +cat confdefs.h >>conftest.$ac_ext
9299 +cat >>conftest.$ac_ext <<_ACEOF
9300 +/* end confdefs.h.  */
9301 +#include <minix/config.h>
9302 +_ACEOF
9303 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9304 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9305 +  ac_status=$?
9306 +  grep -v '^ *+' conftest.er1 >conftest.err
9307 +  rm -f conftest.er1
9308 +  cat conftest.err >&5
9309 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310 +  (exit $ac_status); } >/dev/null; then
9311 +  if test -s conftest.err; then
9312 +    ac_cpp_err=$ac_c_preproc_warn_flag
9313 +  else
9314 +    ac_cpp_err=
9315 +  fi
9316 +else
9317 +  ac_cpp_err=yes
9318  fi
9319 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9320 -  echo "$ac_t""yes" 1>&6
9321 +if test -z "$ac_cpp_err"; then
9322 +  ac_header_preproc=yes
9323 +else
9324 +  echo "$as_me: failed program was:" >&5
9325 +sed 's/^/| /' conftest.$ac_ext >&5
9326 +
9327 +  ac_header_preproc=no
9328 +fi
9329 +rm -f conftest.err conftest.$ac_ext
9330 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9331 +echo "${ECHO_T}$ac_header_preproc" >&6
9332 +
9333 +# So?  What about this header?
9334 +case $ac_header_compiler:$ac_header_preproc in
9335 +  yes:no )
9336 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
9337 +echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9338 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
9339 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
9340 +    (
9341 +      cat <<\_ASBOX
9342 +## ------------------------------------ ##
9343 +## Report this to bug-autoconf@gnu.org. ##
9344 +## ------------------------------------ ##
9345 +_ASBOX
9346 +    ) |
9347 +      sed "s/^/$as_me: WARNING:     /" >&2
9348 +    ;;
9349 +  no:yes )
9350 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
9351 +echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
9352 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
9353 +echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
9354 +    { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
9355 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
9356 +    (
9357 +      cat <<\_ASBOX
9358 +## ------------------------------------ ##
9359 +## Report this to bug-autoconf@gnu.org. ##
9360 +## ------------------------------------ ##
9361 +_ASBOX
9362 +    ) |
9363 +      sed "s/^/$as_me: WARNING:     /" >&2
9364 +    ;;
9365 +esac
9366 +echo "$as_me:$LINENO: checking for minix/config.h" >&5
9367 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
9368 +if test "${ac_cv_header_minix_config_h+set}" = set; then
9369 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9370 +else
9371 +  ac_cv_header_minix_config_h=$ac_header_preproc
9372 +fi
9373 +echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
9374 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
9375 +
9376 +fi
9377 +if test $ac_cv_header_minix_config_h = yes; then
9378    MINIX=yes
9379  else
9380 -  echo "$ac_t""no" 1>&6
9381 -MINIX=
9382 +  MINIX=
9383  fi
9384  
9385 +
9386  if test "$MINIX" = yes; then
9387 -  cat >> confdefs.h <<\EOF
9388 +
9389 +cat >>confdefs.h <<\_ACEOF
9390  #define _POSIX_SOURCE 1
9391 -EOF
9392 +_ACEOF
9393  
9394 -  cat >> confdefs.h <<\EOF
9395 +
9396 +cat >>confdefs.h <<\_ACEOF
9397  #define _POSIX_1_SOURCE 2
9398 -EOF
9399 +_ACEOF
9400  
9401 -  cat >> confdefs.h <<\EOF
9402 +
9403 +cat >>confdefs.h <<\_ACEOF
9404  #define _MINIX 1
9405 -EOF
9406 +_ACEOF
9407  
9408  fi
9409  
9410 -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
9411 -echo "configure:1364: checking for POSIXized ISC" >&5
9412 -if test -d /etc/conf/kconfig.d &&
9413 -  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
9414 -then
9415 -  echo "$ac_t""yes" 1>&6
9416 -  ISC=yes # If later tests want to check for ISC.
9417 -  cat >> confdefs.h <<\EOF
9418 -#define _POSIX_SOURCE 1
9419 -EOF
9420  
9421 -  if test "$GCC" = yes; then
9422 -    CC="$CC -posix"
9423 -  else
9424 -    CC="$CC -Xp"
9425 -  fi
9426 +echo "$as_me:$LINENO: checking for library containing strerror" >&5
9427 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
9428 +if test "${ac_cv_search_strerror+set}" = set; then
9429 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9430  else
9431 -  echo "$ac_t""no" 1>&6
9432 -  ISC=
9433 -fi
9434 +  ac_func_search_save_LIBS=$LIBS
9435 +ac_cv_search_strerror=no
9436 +cat >conftest.$ac_ext <<_ACEOF
9437 +#line $LINENO "configure"
9438 +/* confdefs.h.  */
9439 +_ACEOF
9440 +cat confdefs.h >>conftest.$ac_ext
9441 +cat >>conftest.$ac_ext <<_ACEOF
9442 +/* end confdefs.h.  */
9443  
9444 -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
9445 -echo "configure:1385: checking for Cygwin environment" >&5
9446 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9447 -  echo $ac_n "(cached) $ac_c" 1>&6
9448 +/* Override any gcc2 internal prototype to avoid an error.  */
9449 +#ifdef __cplusplus
9450 +extern "C"
9451 +#endif
9452 +/* We use char because int might match the return type of a gcc2
9453 +   builtin and then its argument prototype would still apply.  */
9454 +char strerror ();
9455 +int
9456 +main ()
9457 +{
9458 +strerror ();
9459 +  ;
9460 +  return 0;
9461 +}
9462 +_ACEOF
9463 +rm -f conftest.$ac_objext conftest$ac_exeext
9464 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9465 +  (eval $ac_link) 2>&5
9466 +  ac_status=$?
9467 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 +  (exit $ac_status); } &&
9469 +         { ac_try='test -s conftest$ac_exeext'
9470 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9471 +  (eval $ac_try) 2>&5
9472 +  ac_status=$?
9473 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9474 +  (exit $ac_status); }; }; then
9475 +  ac_cv_search_strerror="none required"
9476  else
9477 -  cat > conftest.$ac_ext <<EOF
9478 -#line 1390 "configure"
9479 -#include "confdefs.h"
9480 +  echo "$as_me: failed program was:" >&5
9481 +sed 's/^/| /' conftest.$ac_ext >&5
9482  
9483 -int main() {
9484 +fi
9485 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9486 +if test "$ac_cv_search_strerror" = no; then
9487 +  for ac_lib in cposix; do
9488 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9489 +    cat >conftest.$ac_ext <<_ACEOF
9490 +#line $LINENO "configure"
9491 +/* confdefs.h.  */
9492 +_ACEOF
9493 +cat confdefs.h >>conftest.$ac_ext
9494 +cat >>conftest.$ac_ext <<_ACEOF
9495 +/* end confdefs.h.  */
9496  
9497 -#ifndef __CYGWIN__
9498 -#define __CYGWIN__ __CYGWIN32__
9499 +/* Override any gcc2 internal prototype to avoid an error.  */
9500 +#ifdef __cplusplus
9501 +extern "C"
9502  #endif
9503 -return __CYGWIN__;
9504 -; return 0; }
9505 -EOF
9506 -if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9507 -  rm -rf conftest*
9508 -  ac_cv_cygwin=yes
9509 +/* We use char because int might match the return type of a gcc2
9510 +   builtin and then its argument prototype would still apply.  */
9511 +char strerror ();
9512 +int
9513 +main ()
9514 +{
9515 +strerror ();
9516 +  ;
9517 +  return 0;
9518 +}
9519 +_ACEOF
9520 +rm -f conftest.$ac_objext conftest$ac_exeext
9521 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9522 +  (eval $ac_link) 2>&5
9523 +  ac_status=$?
9524 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9525 +  (exit $ac_status); } &&
9526 +         { ac_try='test -s conftest$ac_exeext'
9527 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9528 +  (eval $ac_try) 2>&5
9529 +  ac_status=$?
9530 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 +  (exit $ac_status); }; }; then
9532 +  ac_cv_search_strerror="-l$ac_lib"
9533 +break
9534  else
9535 -  echo "configure: failed program was:" >&5
9536 -  cat conftest.$ac_ext >&5
9537 -  rm -rf conftest*
9538 -  ac_cv_cygwin=no
9539 +  echo "$as_me: failed program was:" >&5
9540 +sed 's/^/| /' conftest.$ac_ext >&5
9541 +
9542  fi
9543 -rm -f conftest*
9544 -rm -f conftest*
9545 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9546 +  done
9547  fi
9548 +LIBS=$ac_func_search_save_LIBS
9549 +fi
9550 +echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
9551 +echo "${ECHO_T}$ac_cv_search_strerror" >&6
9552 +if test "$ac_cv_search_strerror" != no; then
9553 +  test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
9554  
9555 -echo "$ac_t""$ac_cv_cygwin" 1>&6
9556 -CYGWIN=
9557 -test "$ac_cv_cygwin" = yes && CYGWIN=yes
9558 -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
9559 -echo "configure:1418: checking for mingw32 environment" >&5
9560 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
9561 -  echo $ac_n "(cached) $ac_c" 1>&6
9562 +fi
9563 +
9564 +# Check whether --enable-largefile or --disable-largefile was given.
9565 +if test "${enable_largefile+set}" = set; then
9566 +  enableval="$enable_largefile"
9567 +
9568 +fi;
9569 +if test "$enable_largefile" != no; then
9570 +
9571 +  echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
9572 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9573 +if test "${ac_cv_sys_largefile_CC+set}" = set; then
9574 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9575  else
9576 -  cat > conftest.$ac_ext <<EOF
9577 -#line 1423 "configure"
9578 -#include "confdefs.h"
9579 +  ac_cv_sys_largefile_CC=no
9580 +     if test "$GCC" != yes; then
9581 +       ac_save_CC=$CC
9582 +       while :; do
9583 +        # IRIX 6.2 and later do not support large files by default,
9584 +        # so use the C compiler's -n32 option if that helps.
9585 +         cat >conftest.$ac_ext <<_ACEOF
9586 +#line $LINENO "configure"
9587 +/* confdefs.h.  */
9588 +_ACEOF
9589 +cat confdefs.h >>conftest.$ac_ext
9590 +cat >>conftest.$ac_ext <<_ACEOF
9591 +/* end confdefs.h.  */
9592 +#include <sys/types.h>
9593 + /* Check that off_t can represent 2**63 - 1 correctly.
9594 +    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9595 +    since some C++ compilers masquerading as C compilers
9596 +    incorrectly reject 9223372036854775807.  */
9597 +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9598 +  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9599 +                      && LARGE_OFF_T % 2147483647 == 1)
9600 +                     ? 1 : -1];
9601 +int
9602 +main ()
9603 +{
9604  
9605 -int main() {
9606 -return __MINGW32__;
9607 -; return 0; }
9608 -EOF
9609 -if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9610 -  rm -rf conftest*
9611 -  ac_cv_mingw32=yes
9612 +  ;
9613 +  return 0;
9614 +}
9615 +_ACEOF
9616 +        rm -f conftest.$ac_objext
9617 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9618 +  (eval $ac_compile) 2>&5
9619 +  ac_status=$?
9620 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621 +  (exit $ac_status); } &&
9622 +         { ac_try='test -s conftest.$ac_objext'
9623 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9624 +  (eval $ac_try) 2>&5
9625 +  ac_status=$?
9626 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627 +  (exit $ac_status); }; }; then
9628 +  break
9629  else
9630 -  echo "configure: failed program was:" >&5
9631 -  cat conftest.$ac_ext >&5
9632 -  rm -rf conftest*
9633 -  ac_cv_mingw32=no
9634 +  echo "$as_me: failed program was:" >&5
9635 +sed 's/^/| /' conftest.$ac_ext >&5
9636 +
9637 +fi
9638 +rm -f conftest.$ac_objext
9639 +        CC="$CC -n32"
9640 +        rm -f conftest.$ac_objext
9641 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9642 +  (eval $ac_compile) 2>&5
9643 +  ac_status=$?
9644 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9645 +  (exit $ac_status); } &&
9646 +         { ac_try='test -s conftest.$ac_objext'
9647 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9648 +  (eval $ac_try) 2>&5
9649 +  ac_status=$?
9650 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 +  (exit $ac_status); }; }; then
9652 +  ac_cv_sys_largefile_CC=' -n32'; break
9653 +else
9654 +  echo "$as_me: failed program was:" >&5
9655 +sed 's/^/| /' conftest.$ac_ext >&5
9656 +
9657 +fi
9658 +rm -f conftest.$ac_objext
9659 +         break
9660 +       done
9661 +       CC=$ac_save_CC
9662 +       rm -f conftest.$ac_ext
9663 +    fi
9664 +fi
9665 +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
9666 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9667 +  if test "$ac_cv_sys_largefile_CC" != no; then
9668 +    CC=$CC$ac_cv_sys_largefile_CC
9669 +  fi
9670 +
9671 +  echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9672 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9673 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9674 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9675 +else
9676 +  while :; do
9677 +  ac_cv_sys_file_offset_bits=no
9678 +  cat >conftest.$ac_ext <<_ACEOF
9679 +#line $LINENO "configure"
9680 +/* confdefs.h.  */
9681 +_ACEOF
9682 +cat confdefs.h >>conftest.$ac_ext
9683 +cat >>conftest.$ac_ext <<_ACEOF
9684 +/* end confdefs.h.  */
9685 +#include <sys/types.h>
9686 + /* Check that off_t can represent 2**63 - 1 correctly.
9687 +    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9688 +    since some C++ compilers masquerading as C compilers
9689 +    incorrectly reject 9223372036854775807.  */
9690 +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9691 +  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9692 +                      && LARGE_OFF_T % 2147483647 == 1)
9693 +                     ? 1 : -1];
9694 +int
9695 +main ()
9696 +{
9697 +
9698 +  ;
9699 +  return 0;
9700 +}
9701 +_ACEOF
9702 +rm -f conftest.$ac_objext
9703 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9704 +  (eval $ac_compile) 2>&5
9705 +  ac_status=$?
9706 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9707 +  (exit $ac_status); } &&
9708 +         { ac_try='test -s conftest.$ac_objext'
9709 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9710 +  (eval $ac_try) 2>&5
9711 +  ac_status=$?
9712 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713 +  (exit $ac_status); }; }; then
9714 +  break
9715 +else
9716 +  echo "$as_me: failed program was:" >&5
9717 +sed 's/^/| /' conftest.$ac_ext >&5
9718 +
9719 +fi
9720 +rm -f conftest.$ac_objext conftest.$ac_ext
9721 +  cat >conftest.$ac_ext <<_ACEOF
9722 +#line $LINENO "configure"
9723 +/* confdefs.h.  */
9724 +_ACEOF
9725 +cat confdefs.h >>conftest.$ac_ext
9726 +cat >>conftest.$ac_ext <<_ACEOF
9727 +/* end confdefs.h.  */
9728 +#define _FILE_OFFSET_BITS 64
9729 +#include <sys/types.h>
9730 + /* Check that off_t can represent 2**63 - 1 correctly.
9731 +    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9732 +    since some C++ compilers masquerading as C compilers
9733 +    incorrectly reject 9223372036854775807.  */
9734 +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9735 +  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9736 +                      && LARGE_OFF_T % 2147483647 == 1)
9737 +                     ? 1 : -1];
9738 +int
9739 +main ()
9740 +{
9741 +
9742 +  ;
9743 +  return 0;
9744 +}
9745 +_ACEOF
9746 +rm -f conftest.$ac_objext
9747 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9748 +  (eval $ac_compile) 2>&5
9749 +  ac_status=$?
9750 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751 +  (exit $ac_status); } &&
9752 +         { ac_try='test -s conftest.$ac_objext'
9753 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9754 +  (eval $ac_try) 2>&5
9755 +  ac_status=$?
9756 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 +  (exit $ac_status); }; }; then
9758 +  ac_cv_sys_file_offset_bits=64; break
9759 +else
9760 +  echo "$as_me: failed program was:" >&5
9761 +sed 's/^/| /' conftest.$ac_ext >&5
9762 +
9763 +fi
9764 +rm -f conftest.$ac_objext conftest.$ac_ext
9765 +  break
9766 +done
9767 +fi
9768 +echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
9769 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9770 +if test "$ac_cv_sys_file_offset_bits" != no; then
9771 +
9772 +cat >>confdefs.h <<_ACEOF
9773 +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9774 +_ACEOF
9775 +
9776  fi
9777  rm -f conftest*
9778 +  echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
9779 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9780 +if test "${ac_cv_sys_large_files+set}" = set; then
9781 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9782 +else
9783 +  while :; do
9784 +  ac_cv_sys_large_files=no
9785 +  cat >conftest.$ac_ext <<_ACEOF
9786 +#line $LINENO "configure"
9787 +/* confdefs.h.  */
9788 +_ACEOF
9789 +cat confdefs.h >>conftest.$ac_ext
9790 +cat >>conftest.$ac_ext <<_ACEOF
9791 +/* end confdefs.h.  */
9792 +#include <sys/types.h>
9793 + /* Check that off_t can represent 2**63 - 1 correctly.
9794 +    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9795 +    since some C++ compilers masquerading as C compilers
9796 +    incorrectly reject 9223372036854775807.  */
9797 +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9798 +  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9799 +                      && LARGE_OFF_T % 2147483647 == 1)
9800 +                     ? 1 : -1];
9801 +int
9802 +main ()
9803 +{
9804 +
9805 +  ;
9806 +  return 0;
9807 +}
9808 +_ACEOF
9809 +rm -f conftest.$ac_objext
9810 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9811 +  (eval $ac_compile) 2>&5
9812 +  ac_status=$?
9813 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814 +  (exit $ac_status); } &&
9815 +         { ac_try='test -s conftest.$ac_objext'
9816 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9817 +  (eval $ac_try) 2>&5
9818 +  ac_status=$?
9819 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820 +  (exit $ac_status); }; }; then
9821 +  break
9822 +else
9823 +  echo "$as_me: failed program was:" >&5
9824 +sed 's/^/| /' conftest.$ac_ext >&5
9825 +
9826 +fi
9827 +rm -f conftest.$ac_objext conftest.$ac_ext
9828 +  cat >conftest.$ac_ext <<_ACEOF
9829 +#line $LINENO "configure"
9830 +/* confdefs.h.  */
9831 +_ACEOF
9832 +cat confdefs.h >>conftest.$ac_ext
9833 +cat >>conftest.$ac_ext <<_ACEOF
9834 +/* end confdefs.h.  */
9835 +#define _LARGE_FILES 1
9836 +#include <sys/types.h>
9837 + /* Check that off_t can represent 2**63 - 1 correctly.
9838 +    We can't simply define LARGE_OFF_T to be 9223372036854775807,
9839 +    since some C++ compilers masquerading as C compilers
9840 +    incorrectly reject 9223372036854775807.  */
9841 +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9842 +  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9843 +                      && LARGE_OFF_T % 2147483647 == 1)
9844 +                     ? 1 : -1];
9845 +int
9846 +main ()
9847 +{
9848 +
9849 +  ;
9850 +  return 0;
9851 +}
9852 +_ACEOF
9853 +rm -f conftest.$ac_objext
9854 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9855 +  (eval $ac_compile) 2>&5
9856 +  ac_status=$?
9857 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858 +  (exit $ac_status); } &&
9859 +         { ac_try='test -s conftest.$ac_objext'
9860 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9861 +  (eval $ac_try) 2>&5
9862 +  ac_status=$?
9863 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864 +  (exit $ac_status); }; }; then
9865 +  ac_cv_sys_large_files=1; break
9866 +else
9867 +  echo "$as_me: failed program was:" >&5
9868 +sed 's/^/| /' conftest.$ac_ext >&5
9869 +
9870 +fi
9871 +rm -f conftest.$ac_objext conftest.$ac_ext
9872 +  break
9873 +done
9874 +fi
9875 +echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
9876 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9877 +if test "$ac_cv_sys_large_files" != no; then
9878 +
9879 +cat >>confdefs.h <<_ACEOF
9880 +#define _LARGE_FILES $ac_cv_sys_large_files
9881 +_ACEOF
9882 +
9883 +fi
9884  rm -f conftest*
9885  fi
9886  
9887 -echo "$ac_t""$ac_cv_mingw32" 1>&6
9888 -MINGW32=
9889 -test "$ac_cv_mingw32" = yes && MINGW32=yes
9890  
9891  
9892 -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
9893 -echo "configure:1449: checking for executable suffix" >&5
9894 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
9895 -  echo $ac_n "(cached) $ac_c" 1>&6
9896 +echo "$as_me:$LINENO: checking for function prototypes" >&5
9897 +echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
9898 +if test "$ac_cv_prog_cc_stdc" != no; then
9899 +  echo "$as_me:$LINENO: result: yes" >&5
9900 +echo "${ECHO_T}yes" >&6
9901 +
9902 +cat >>confdefs.h <<\_ACEOF
9903 +#define PROTOTYPES 1
9904 +_ACEOF
9905 +
9906 +
9907 +cat >>confdefs.h <<\_ACEOF
9908 +#define __PROTOTYPES 1
9909 +_ACEOF
9910 +
9911  else
9912 -  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
9913 -  ac_cv_exeext=.exe
9914 +  echo "$as_me:$LINENO: result: no" >&5
9915 +echo "${ECHO_T}no" >&6
9916 +fi
9917 +
9918 +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
9919 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
9920 +if test "${ac_cv_c_const+set}" = set; then
9921 +  echo $ECHO_N "(cached) $ECHO_C" >&6
9922  else
9923 -  rm -f conftest*
9924 -  echo 'int main () { return 0; }' > conftest.$ac_ext
9925 -  ac_cv_exeext=
9926 -  if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
9927 -    for file in conftest.*; do
9928 -      case $file in
9929 -      *.c | *.o | *.obj) ;;
9930 -      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
9931 -      esac
9932 -    done
9933 -  else
9934 -    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
9935 -  fi
9936 -  rm -f conftest*
9937 -  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
9938 +  cat >conftest.$ac_ext <<_ACEOF
9939 +#line $LINENO "configure"
9940 +/* confdefs.h.  */
9941 +_ACEOF
9942 +cat confdefs.h >>conftest.$ac_ext
9943 +cat >>conftest.$ac_ext <<_ACEOF
9944 +/* end confdefs.h.  */
9945 +
9946 +int
9947 +main ()
9948 +{
9949 +/* FIXME: Include the comments suggested by Paul. */
9950 +#ifndef __cplusplus
9951 +  /* Ultrix mips cc rejects this.  */
9952 +  typedef int charset[2];
9953 +  const charset x;
9954 +  /* SunOS 4.1.1 cc rejects this.  */
9955 +  char const *const *ccp;
9956 +  char **p;
9957 +  /* NEC SVR4.0.2 mips cc rejects this.  */
9958 +  struct point {int x, y;};
9959 +  static struct point const zero = {0,0};
9960 +  /* AIX XL C 1.02.0.0 rejects this.
9961 +     It does not let you subtract one const X* pointer from another in
9962 +     an arm of an if-expression whose if-part is not a constant
9963 +     expression */
9964 +  const char *g = "string";
9965 +  ccp = &g + (g ? g-g : 0);
9966 +  /* HPUX 7.0 cc rejects these. */
9967 +  ++ccp;
9968 +  p = (char**) ccp;
9969 +  ccp = (char const *const *) p;
9970 +  { /* SCO 3.2v4 cc rejects this.  */
9971 +    char *t;
9972 +    char const *s = 0 ? (char *) 0 : (char const *) 0;
9973 +
9974 +    *t++ = 0;
9975 +  }
9976 +  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9977 +    int x[] = {25, 17};
9978 +    const int *foo = &x[0];
9979 +    ++foo;
9980 +  }
9981 +  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9982 +    typedef const int *iptr;
9983 +    iptr p = 0;
9984 +    ++p;
9985 +  }
9986 +  { /* AIX XL C 1.02.0.0 rejects this saying
9987 +       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9988 +    struct s { int j; const int *ap[3]; };
9989 +    struct s *b; b->j = 5;
9990 +  }
9991 +  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9992 +    const int foo = 10;
9993 +  }
9994 +#endif
9995 +
9996 +  ;
9997 +  return 0;
9998 +}
9999 +_ACEOF
10000 +rm -f conftest.$ac_objext
10001 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10002 +  (eval $ac_compile) 2>&5
10003 +  ac_status=$?
10004 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005 +  (exit $ac_status); } &&
10006 +         { ac_try='test -s conftest.$ac_objext'
10007 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008 +  (eval $ac_try) 2>&5
10009 +  ac_status=$?
10010 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 +  (exit $ac_status); }; }; then
10012 +  ac_cv_c_const=yes
10013 +else
10014 +  echo "$as_me: failed program was:" >&5
10015 +sed 's/^/| /' conftest.$ac_ext >&5
10016 +
10017 +ac_cv_c_const=no
10018  fi
10019 +rm -f conftest.$ac_objext conftest.$ac_ext
10020  fi
10021 +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10022 +echo "${ECHO_T}$ac_cv_c_const" >&6
10023 +if test $ac_cv_c_const = no; then
10024  
10025 -EXEEXT=""
10026 -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10027 -echo "$ac_t""${ac_cv_exeext}" 1>&6
10028 -ac_exeext=$EXEEXT
10029 +cat >>confdefs.h <<\_ACEOF
10030 +#define const
10031 +_ACEOF
10032  
10033 +fi
10034  
10035  
10036  
10037  
10038 -echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
10039 -echo "configure:1484: checking for ${CC-cc} option to accept ANSI C" >&5
10040 -if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
10041 -  echo $ac_n "(cached) $ac_c" 1>&6
10042 +
10043 +
10044 +
10045 +ac_header_dirent=no
10046 +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10047 +  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10048 +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
10049 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10050 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10051 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10052  else
10053 -  am_cv_prog_cc_stdc=no
10054 -ac_save_CC="$CC"
10055 -# Don't try gcc -ansi; that turns off useful extensions and
10056 -# breaks some systems' header files.
10057 -# AIX                  -qlanglvl=ansi
10058 -# Ultrix and OSF/1     -std1
10059 -# HP-UX                        -Aa -D_HPUX_SOURCE
10060 -# SVR4                 -Xc -D__EXTENSIONS__
10061 -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10062 -do
10063 -  CC="$ac_save_CC $ac_arg"
10064 -  cat > conftest.$ac_ext <<EOF
10065 -#line 1500 "configure"
10066 -#include "confdefs.h"
10067 -#include <stdarg.h>
10068 -#include <stdio.h>
10069 +  cat >conftest.$ac_ext <<_ACEOF
10070 +#line $LINENO "configure"
10071 +/* confdefs.h.  */
10072 +_ACEOF
10073 +cat confdefs.h >>conftest.$ac_ext
10074 +cat >>conftest.$ac_ext <<_ACEOF
10075 +/* end confdefs.h.  */
10076  #include <sys/types.h>
10077 -#include <sys/stat.h>
10078 -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10079 -struct buf { int x; };
10080 -FILE * (*rcsopen) (struct buf *, struct stat *, int);
10081 -static char *e (p, i)
10082 -     char **p;
10083 -     int i;
10084 +#include <$ac_hdr>
10085 +
10086 +int
10087 +main ()
10088  {
10089 -  return p[i];
10090 +if ((DIR *) 0)
10091 +return 0;
10092 +  ;
10093 +  return 0;
10094  }
10095 -static char *f (char * (*g) (char **, int), char **p, ...)
10096 +_ACEOF
10097 +rm -f conftest.$ac_objext
10098 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10099 +  (eval $ac_compile) 2>&5
10100 +  ac_status=$?
10101 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102 +  (exit $ac_status); } &&
10103 +         { ac_try='test -s conftest.$ac_objext'
10104 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10105 +  (eval $ac_try) 2>&5
10106 +  ac_status=$?
10107 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10108 +  (exit $ac_status); }; }; then
10109 +  eval "$as_ac_Header=yes"
10110 +else
10111 +  echo "$as_me: failed program was:" >&5
10112 +sed 's/^/| /' conftest.$ac_ext >&5
10113 +
10114 +eval "$as_ac_Header=no"
10115 +fi
10116 +rm -f conftest.$ac_objext conftest.$ac_ext
10117 +fi
10118 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10119 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10120 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
10121 +  cat >>confdefs.h <<_ACEOF
10122 +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10123 +_ACEOF
10124 +
10125 +ac_header_dirent=$ac_hdr; break
10126 +fi
10127 +
10128 +done
10129 +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10130 +if test $ac_header_dirent = dirent.h; then
10131 +  echo "$as_me:$LINENO: checking for library containing opendir" >&5
10132 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10133 +if test "${ac_cv_search_opendir+set}" = set; then
10134 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10135 +else
10136 +  ac_func_search_save_LIBS=$LIBS
10137 +ac_cv_search_opendir=no
10138 +cat >conftest.$ac_ext <<_ACEOF
10139 +#line $LINENO "configure"
10140 +/* confdefs.h.  */
10141 +_ACEOF
10142 +cat confdefs.h >>conftest.$ac_ext
10143 +cat >>conftest.$ac_ext <<_ACEOF
10144 +/* end confdefs.h.  */
10145 +
10146 +/* Override any gcc2 internal prototype to avoid an error.  */
10147 +#ifdef __cplusplus
10148 +extern "C"
10149 +#endif
10150 +/* We use char because int might match the return type of a gcc2
10151 +   builtin and then its argument prototype would still apply.  */
10152 +char opendir ();
10153 +int
10154 +main ()
10155  {
10156 -  char *s;
10157 -  va_list v;
10158 -  va_start (v,p);
10159 -  s = g (p, va_arg (v,int));
10160 -  va_end (v);
10161 -  return s;
10162 +opendir ();
10163 +  ;
10164 +  return 0;
10165  }
10166 -int test (int i, double x);
10167 -struct s1 {int (*f) (int a);};
10168 -struct s2 {int (*f) (double a);};
10169 -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10170 -int argc;
10171 -char **argv;
10172 -
10173 -int main() {
10174 +_ACEOF
10175 +rm -f conftest.$ac_objext conftest$ac_exeext
10176 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10177 +  (eval $ac_link) 2>&5
10178 +  ac_status=$?
10179 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10180 +  (exit $ac_status); } &&
10181 +         { ac_try='test -s conftest$ac_exeext'
10182 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10183 +  (eval $ac_try) 2>&5
10184 +  ac_status=$?
10185 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186 +  (exit $ac_status); }; }; then
10187 +  ac_cv_search_opendir="none required"
10188 +else
10189 +  echo "$as_me: failed program was:" >&5
10190 +sed 's/^/| /' conftest.$ac_ext >&5
10191  
10192 -return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10193 +fi
10194 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10195 +if test "$ac_cv_search_opendir" = no; then
10196 +  for ac_lib in dir; do
10197 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10198 +    cat >conftest.$ac_ext <<_ACEOF
10199 +#line $LINENO "configure"
10200 +/* confdefs.h.  */
10201 +_ACEOF
10202 +cat confdefs.h >>conftest.$ac_ext
10203 +cat >>conftest.$ac_ext <<_ACEOF
10204 +/* end confdefs.h.  */
10205  
10206 -; return 0; }
10207 -EOF
10208 -if { (eval echo configure:1537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10209 -  rm -rf conftest*
10210 -  am_cv_prog_cc_stdc="$ac_arg"; break
10211 +/* Override any gcc2 internal prototype to avoid an error.  */
10212 +#ifdef __cplusplus
10213 +extern "C"
10214 +#endif
10215 +/* We use char because int might match the return type of a gcc2
10216 +   builtin and then its argument prototype would still apply.  */
10217 +char opendir ();
10218 +int
10219 +main ()
10220 +{
10221 +opendir ();
10222 +  ;
10223 +  return 0;
10224 +}
10225 +_ACEOF
10226 +rm -f conftest.$ac_objext conftest$ac_exeext
10227 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10228 +  (eval $ac_link) 2>&5
10229 +  ac_status=$?
10230 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10231 +  (exit $ac_status); } &&
10232 +         { ac_try='test -s conftest$ac_exeext'
10233 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10234 +  (eval $ac_try) 2>&5
10235 +  ac_status=$?
10236 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10237 +  (exit $ac_status); }; }; then
10238 +  ac_cv_search_opendir="-l$ac_lib"
10239 +break
10240  else
10241 -  echo "configure: failed program was:" >&5
10242 -  cat conftest.$ac_ext >&5
10243 +  echo "$as_me: failed program was:" >&5
10244 +sed 's/^/| /' conftest.$ac_ext >&5
10245 +
10246  fi
10247 -rm -f conftest*
10248 -done
10249 -CC="$ac_save_CC"
10250 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10251 +  done
10252 +fi
10253 +LIBS=$ac_func_search_save_LIBS
10254 +fi
10255 +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10256 +echo "${ECHO_T}$ac_cv_search_opendir" >&6
10257 +if test "$ac_cv_search_opendir" != no; then
10258 +  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10259  
10260  fi
10261  
10262 -if test -z "$am_cv_prog_cc_stdc"; then
10263 -  echo "$ac_t""none needed" 1>&6
10264  else
10265 -  echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
10266 +  echo "$as_me:$LINENO: checking for library containing opendir" >&5
10267 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10268 +if test "${ac_cv_search_opendir+set}" = set; then
10269 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10270 +else
10271 +  ac_func_search_save_LIBS=$LIBS
10272 +ac_cv_search_opendir=no
10273 +cat >conftest.$ac_ext <<_ACEOF
10274 +#line $LINENO "configure"
10275 +/* confdefs.h.  */
10276 +_ACEOF
10277 +cat confdefs.h >>conftest.$ac_ext
10278 +cat >>conftest.$ac_ext <<_ACEOF
10279 +/* end confdefs.h.  */
10280 +
10281 +/* Override any gcc2 internal prototype to avoid an error.  */
10282 +#ifdef __cplusplus
10283 +extern "C"
10284 +#endif
10285 +/* We use char because int might match the return type of a gcc2
10286 +   builtin and then its argument prototype would still apply.  */
10287 +char opendir ();
10288 +int
10289 +main ()
10290 +{
10291 +opendir ();
10292 +  ;
10293 +  return 0;
10294 +}
10295 +_ACEOF
10296 +rm -f conftest.$ac_objext conftest$ac_exeext
10297 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10298 +  (eval $ac_link) 2>&5
10299 +  ac_status=$?
10300 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10301 +  (exit $ac_status); } &&
10302 +         { ac_try='test -s conftest$ac_exeext'
10303 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10304 +  (eval $ac_try) 2>&5
10305 +  ac_status=$?
10306 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 +  (exit $ac_status); }; }; then
10308 +  ac_cv_search_opendir="none required"
10309 +else
10310 +  echo "$as_me: failed program was:" >&5
10311 +sed 's/^/| /' conftest.$ac_ext >&5
10312 +
10313  fi
10314 -case "x$am_cv_prog_cc_stdc" in
10315 -  x|xno) ;;
10316 -  *) CC="$CC $am_cv_prog_cc_stdc" ;;
10317 -esac
10318 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10319 +if test "$ac_cv_search_opendir" = no; then
10320 +  for ac_lib in x; do
10321 +    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10322 +    cat >conftest.$ac_ext <<_ACEOF
10323 +#line $LINENO "configure"
10324 +/* confdefs.h.  */
10325 +_ACEOF
10326 +cat confdefs.h >>conftest.$ac_ext
10327 +cat >>conftest.$ac_ext <<_ACEOF
10328 +/* end confdefs.h.  */
10329  
10330 +/* Override any gcc2 internal prototype to avoid an error.  */
10331 +#ifdef __cplusplus
10332 +extern "C"
10333 +#endif
10334 +/* We use char because int might match the return type of a gcc2
10335 +   builtin and then its argument prototype would still apply.  */
10336 +char opendir ();
10337 +int
10338 +main ()
10339 +{
10340 +opendir ();
10341 +  ;
10342 +  return 0;
10343 +}
10344 +_ACEOF
10345 +rm -f conftest.$ac_objext conftest$ac_exeext
10346 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10347 +  (eval $ac_link) 2>&5
10348 +  ac_status=$?
10349 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 +  (exit $ac_status); } &&
10351 +         { ac_try='test -s conftest$ac_exeext'
10352 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10353 +  (eval $ac_try) 2>&5
10354 +  ac_status=$?
10355 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356 +  (exit $ac_status); }; }; then
10357 +  ac_cv_search_opendir="-l$ac_lib"
10358 +break
10359 +else
10360 +  echo "$as_me: failed program was:" >&5
10361 +sed 's/^/| /' conftest.$ac_ext >&5
10362  
10363 +fi
10364 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10365 +  done
10366 +fi
10367 +LIBS=$ac_func_search_save_LIBS
10368 +fi
10369 +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10370 +echo "${ECHO_T}$ac_cv_search_opendir" >&6
10371 +if test "$ac_cv_search_opendir" != no; then
10372 +  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10373  
10374 -echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
10375 -echo "configure:1563: checking for function prototypes" >&5
10376 -if test "$am_cv_prog_cc_stdc" != no; then
10377 -  echo "$ac_t""yes" 1>&6
10378 -  cat >> confdefs.h <<\EOF
10379 -#define PROTOTYPES 1
10380 -EOF
10381 +fi
10382  
10383 -  U= ANSI2KNR=
10384 -else
10385 -  echo "$ac_t""no" 1>&6
10386 -  U=_ ANSI2KNR=./ansi2knr
10387 -  # Ensure some checks needed by ansi2knr itself.
10388 -  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
10389 -echo "configure:1576: checking for ANSI C header files" >&5
10390 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
10391 -  echo $ac_n "(cached) $ac_c" 1>&6
10392 +fi
10393 +
10394 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5
10395 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10396 +if test "${ac_cv_header_stdc+set}" = set; then
10397 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10398  else
10399 -  cat > conftest.$ac_ext <<EOF
10400 -#line 1581 "configure"
10401 -#include "confdefs.h"
10402 +  cat >conftest.$ac_ext <<_ACEOF
10403 +#line $LINENO "configure"
10404 +/* confdefs.h.  */
10405 +_ACEOF
10406 +cat confdefs.h >>conftest.$ac_ext
10407 +cat >>conftest.$ac_ext <<_ACEOF
10408 +/* end confdefs.h.  */
10409  #include <stdlib.h>
10410  #include <stdarg.h>
10411  #include <string.h>
10412  #include <float.h>
10413 -EOF
10414 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10415 -{ (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10416 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10417 -if test -z "$ac_err"; then
10418 -  rm -rf conftest*
10419 +
10420 +int
10421 +main ()
10422 +{
10423 +
10424 +  ;
10425 +  return 0;
10426 +}
10427 +_ACEOF
10428 +rm -f conftest.$ac_objext
10429 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10430 +  (eval $ac_compile) 2>&5
10431 +  ac_status=$?
10432 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10433 +  (exit $ac_status); } &&
10434 +         { ac_try='test -s conftest.$ac_objext'
10435 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10436 +  (eval $ac_try) 2>&5
10437 +  ac_status=$?
10438 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10439 +  (exit $ac_status); }; }; then
10440    ac_cv_header_stdc=yes
10441  else
10442 -  echo "$ac_err" >&5
10443 -  echo "configure: failed program was:" >&5
10444 -  cat conftest.$ac_ext >&5
10445 -  rm -rf conftest*
10446 -  ac_cv_header_stdc=no
10447 +  echo "$as_me: failed program was:" >&5
10448 +sed 's/^/| /' conftest.$ac_ext >&5
10449 +
10450 +ac_cv_header_stdc=no
10451  fi
10452 -rm -f conftest*
10453 +rm -f conftest.$ac_objext conftest.$ac_ext
10454  
10455  if test $ac_cv_header_stdc = yes; then
10456    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10457 -cat > conftest.$ac_ext <<EOF
10458 -#line 1606 "configure"
10459 -#include "confdefs.h"
10460 +  cat >conftest.$ac_ext <<_ACEOF
10461 +#line $LINENO "configure"
10462 +/* confdefs.h.  */
10463 +_ACEOF
10464 +cat confdefs.h >>conftest.$ac_ext
10465 +cat >>conftest.$ac_ext <<_ACEOF
10466 +/* end confdefs.h.  */
10467  #include <string.h>
10468 -EOF
10469 +
10470 +_ACEOF
10471  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10472 -  egrep "memchr" >/dev/null 2>&1; then
10473 +  $EGREP "memchr" >/dev/null 2>&1; then
10474    :
10475  else
10476 -  rm -rf conftest*
10477    ac_cv_header_stdc=no
10478  fi
10479  rm -f conftest*
10480 @@ -1619,16 +3887,20 @@
10481  
10482  if test $ac_cv_header_stdc = yes; then
10483    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10484 -cat > conftest.$ac_ext <<EOF
10485 -#line 1624 "configure"
10486 -#include "confdefs.h"
10487 +  cat >conftest.$ac_ext <<_ACEOF
10488 +#line $LINENO "configure"
10489 +/* confdefs.h.  */
10490 +_ACEOF
10491 +cat confdefs.h >>conftest.$ac_ext
10492 +cat >>conftest.$ac_ext <<_ACEOF
10493 +/* end confdefs.h.  */
10494  #include <stdlib.h>
10495 -EOF
10496 +
10497 +_ACEOF
10498  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10499 -  egrep "free" >/dev/null 2>&1; then
10500 +  $EGREP "free" >/dev/null 2>&1; then
10501    :
10502  else
10503 -  rm -rf conftest*
10504    ac_cv_header_stdc=no
10505  fi
10506  rm -f conftest*
10507 @@ -1637,1179 +3909,6855 @@
10508  
10509  if test $ac_cv_header_stdc = yes; then
10510    # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10511 -if test "$cross_compiling" = yes; then
10512 +  if test "$cross_compiling" = yes; then
10513    :
10514  else
10515 -  cat > conftest.$ac_ext <<EOF
10516 -#line 1645 "configure"
10517 -#include "confdefs.h"
10518 +  cat >conftest.$ac_ext <<_ACEOF
10519 +#line $LINENO "configure"
10520 +/* confdefs.h.  */
10521 +_ACEOF
10522 +cat confdefs.h >>conftest.$ac_ext
10523 +cat >>conftest.$ac_ext <<_ACEOF
10524 +/* end confdefs.h.  */
10525  #include <ctype.h>
10526 -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10527 -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10528 -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10529 -int main () { int i; for (i = 0; i < 256; i++)
10530 -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10531 -exit (0); }
10532 +#if ((' ' & 0x0FF) == 0x020)
10533 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10534 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10535 +#else
10536 +# define ISLOWER(c) \
10537 +                   (('a' <= (c) && (c) <= 'i') \
10538 +                     || ('j' <= (c) && (c) <= 'r') \
10539 +                     || ('s' <= (c) && (c) <= 'z'))
10540 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10541 +#endif
10542  
10543 -EOF
10544 -if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10545 -then
10546 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10547 +int
10548 +main ()
10549 +{
10550 +  int i;
10551 +  for (i = 0; i < 256; i++)
10552 +    if (XOR (islower (i), ISLOWER (i))
10553 +        || toupper (i) != TOUPPER (i))
10554 +      exit(2);
10555 +  exit (0);
10556 +}
10557 +_ACEOF
10558 +rm -f conftest$ac_exeext
10559 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10560 +  (eval $ac_link) 2>&5
10561 +  ac_status=$?
10562 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10563 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10564 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10565 +  (eval $ac_try) 2>&5
10566 +  ac_status=$?
10567 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 +  (exit $ac_status); }; }; then
10569    :
10570  else
10571 -  echo "configure: failed program was:" >&5
10572 -  cat conftest.$ac_ext >&5
10573 -  rm -fr conftest*
10574 -  ac_cv_header_stdc=no
10575 +  echo "$as_me: program exited with status $ac_status" >&5
10576 +echo "$as_me: failed program was:" >&5
10577 +sed 's/^/| /' conftest.$ac_ext >&5
10578 +
10579 +( exit $ac_status )
10580 +ac_cv_header_stdc=no
10581  fi
10582 -rm -fr conftest*
10583 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10584  fi
10585 -
10586  fi
10587  fi
10588 -
10589 -echo "$ac_t""$ac_cv_header_stdc" 1>&6
10590 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
10591 +echo "${ECHO_T}$ac_cv_header_stdc" >&6
10592  if test $ac_cv_header_stdc = yes; then
10593 -  cat >> confdefs.h <<\EOF
10594 +
10595 +cat >>confdefs.h <<\_ACEOF
10596  #define STDC_HEADERS 1
10597 -EOF
10598 +_ACEOF
10599  
10600  fi
10601  
10602 -  for ac_hdr in string.h
10603 +
10604 +
10605 +
10606 +
10607 +
10608 +
10609 +for ac_header in fcntl.h limits.h string.h unistd.h utime.h varargs.h
10610  do
10611 -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10612 -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10613 -echo "configure:1683: checking for $ac_hdr" >&5
10614 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10615 -  echo $ac_n "(cached) $ac_c" 1>&6
10616 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10617 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10618 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
10619 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10620 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10621 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10622 +fi
10623 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10624 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10625  else
10626 -  cat > conftest.$ac_ext <<EOF
10627 -#line 1688 "configure"
10628 -#include "confdefs.h"
10629 -#include <$ac_hdr>
10630 -EOF
10631 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10632 -{ (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10633 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10634 -if test -z "$ac_err"; then
10635 -  rm -rf conftest*
10636 -  eval "ac_cv_header_$ac_safe=yes"
10637 +  # Is the header compilable?
10638 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
10639 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10640 +cat >conftest.$ac_ext <<_ACEOF
10641 +#line $LINENO "configure"
10642 +/* confdefs.h.  */
10643 +_ACEOF
10644 +cat confdefs.h >>conftest.$ac_ext
10645 +cat >>conftest.$ac_ext <<_ACEOF
10646 +/* end confdefs.h.  */
10647 +$ac_includes_default
10648 +#include <$ac_header>
10649 +_ACEOF
10650 +rm -f conftest.$ac_objext
10651 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10652 +  (eval $ac_compile) 2>&5
10653 +  ac_status=$?
10654 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10655 +  (exit $ac_status); } &&
10656 +         { ac_try='test -s conftest.$ac_objext'
10657 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10658 +  (eval $ac_try) 2>&5
10659 +  ac_status=$?
10660 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10661 +  (exit $ac_status); }; }; then
10662 +  ac_header_compiler=yes
10663  else
10664 -  echo "$ac_err" >&5
10665 -  echo "configure: failed program was:" >&5
10666 -  cat conftest.$ac_ext >&5
10667 -  rm -rf conftest*
10668 -  eval "ac_cv_header_$ac_safe=no"
10669 +  echo "$as_me: failed program was:" >&5
10670 +sed 's/^/| /' conftest.$ac_ext >&5
10671 +
10672 +ac_header_compiler=no
10673  fi
10674 -rm -f conftest*
10675 +rm -f conftest.$ac_objext conftest.$ac_ext
10676 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10677 +echo "${ECHO_T}$ac_header_compiler" >&6
10678 +
10679 +# Is the header present?
10680 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
10681 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10682 +cat >conftest.$ac_ext <<_ACEOF
10683 +#line $LINENO "configure"
10684 +/* confdefs.h.  */
10685 +_ACEOF
10686 +cat confdefs.h >>conftest.$ac_ext
10687 +cat >>conftest.$ac_ext <<_ACEOF
10688 +/* end confdefs.h.  */
10689 +#include <$ac_header>
10690 +_ACEOF
10691 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10692 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10693 +  ac_status=$?
10694 +  grep -v '^ *+' conftest.er1 >conftest.err
10695 +  rm -f conftest.er1
10696 +  cat conftest.err >&5
10697 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698 +  (exit $ac_status); } >/dev/null; then
10699 +  if test -s conftest.err; then
10700 +    ac_cpp_err=$ac_c_preproc_warn_flag
10701 +  else
10702 +    ac_cpp_err=
10703 +  fi
10704 +else
10705 +  ac_cpp_err=yes
10706  fi
10707 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10708 -  echo "$ac_t""yes" 1>&6
10709 -    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10710 -  cat >> confdefs.h <<EOF
10711 -#define $ac_tr_hdr 1
10712 -EOF
10713
10714 +if test -z "$ac_cpp_err"; then
10715 +  ac_header_preproc=yes
10716  else
10717 -  echo "$ac_t""no" 1>&6
10718 +  echo "$as_me: failed program was:" >&5
10719 +sed 's/^/| /' conftest.$ac_ext >&5
10720 +
10721 +  ac_header_preproc=no
10722 +fi
10723 +rm -f conftest.err conftest.$ac_ext
10724 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10725 +echo "${ECHO_T}$ac_header_preproc" >&6
10726 +
10727 +# So?  What about this header?
10728 +case $ac_header_compiler:$ac_header_preproc in
10729 +  yes:no )
10730 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10731 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10732 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10733 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10734 +    (
10735 +      cat <<\_ASBOX
10736 +## ------------------------------------ ##
10737 +## Report this to bug-autoconf@gnu.org. ##
10738 +## ------------------------------------ ##
10739 +_ASBOX
10740 +    ) |
10741 +      sed "s/^/$as_me: WARNING:     /" >&2
10742 +    ;;
10743 +  no:yes )
10744 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10745 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10746 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10747 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10748 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10749 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10750 +    (
10751 +      cat <<\_ASBOX
10752 +## ------------------------------------ ##
10753 +## Report this to bug-autoconf@gnu.org. ##
10754 +## ------------------------------------ ##
10755 +_ASBOX
10756 +    ) |
10757 +      sed "s/^/$as_me: WARNING:     /" >&2
10758 +    ;;
10759 +esac
10760 +echo "$as_me:$LINENO: checking for $ac_header" >&5
10761 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10762 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
10763 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10764 +else
10765 +  eval "$as_ac_Header=$ac_header_preproc"
10766 +fi
10767 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10768 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10769 +
10770 +fi
10771 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
10772 +  cat >>confdefs.h <<_ACEOF
10773 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10774 +_ACEOF
10775 +
10776  fi
10777 +
10778  done
10779  
10780 +
10781 +echo "$as_me:$LINENO: checking for mode_t" >&5
10782 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
10783 +if test "${ac_cv_type_mode_t+set}" = set; then
10784 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10785 +else
10786 +  cat >conftest.$ac_ext <<_ACEOF
10787 +#line $LINENO "configure"
10788 +/* confdefs.h.  */
10789 +_ACEOF
10790 +cat confdefs.h >>conftest.$ac_ext
10791 +cat >>conftest.$ac_ext <<_ACEOF
10792 +/* end confdefs.h.  */
10793 +$ac_includes_default
10794 +int
10795 +main ()
10796 +{
10797 +if ((mode_t *) 0)
10798 +  return 0;
10799 +if (sizeof (mode_t))
10800 +  return 0;
10801 +  ;
10802 +  return 0;
10803 +}
10804 +_ACEOF
10805 +rm -f conftest.$ac_objext
10806 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10807 +  (eval $ac_compile) 2>&5
10808 +  ac_status=$?
10809 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 +  (exit $ac_status); } &&
10811 +         { ac_try='test -s conftest.$ac_objext'
10812 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10813 +  (eval $ac_try) 2>&5
10814 +  ac_status=$?
10815 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 +  (exit $ac_status); }; }; then
10817 +  ac_cv_type_mode_t=yes
10818 +else
10819 +  echo "$as_me: failed program was:" >&5
10820 +sed 's/^/| /' conftest.$ac_ext >&5
10821 +
10822 +ac_cv_type_mode_t=no
10823  fi
10824 +rm -f conftest.$ac_objext conftest.$ac_ext
10825 +fi
10826 +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
10827 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6
10828 +if test $ac_cv_type_mode_t = yes; then
10829 +  :
10830 +else
10831  
10832 -echo $ac_n "checking for working const""... $ac_c" 1>&6
10833 -echo "configure:1722: checking for working const" >&5
10834 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
10835 -  echo $ac_n "(cached) $ac_c" 1>&6
10836 +cat >>confdefs.h <<_ACEOF
10837 +#define mode_t int
10838 +_ACEOF
10839 +
10840 +fi
10841 +
10842 +echo "$as_me:$LINENO: checking for off_t" >&5
10843 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6
10844 +if test "${ac_cv_type_off_t+set}" = set; then
10845 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10846  else
10847 -  cat > conftest.$ac_ext <<EOF
10848 -#line 1727 "configure"
10849 -#include "confdefs.h"
10850 +  cat >conftest.$ac_ext <<_ACEOF
10851 +#line $LINENO "configure"
10852 +/* confdefs.h.  */
10853 +_ACEOF
10854 +cat confdefs.h >>conftest.$ac_ext
10855 +cat >>conftest.$ac_ext <<_ACEOF
10856 +/* end confdefs.h.  */
10857 +$ac_includes_default
10858 +int
10859 +main ()
10860 +{
10861 +if ((off_t *) 0)
10862 +  return 0;
10863 +if (sizeof (off_t))
10864 +  return 0;
10865 +  ;
10866 +  return 0;
10867 +}
10868 +_ACEOF
10869 +rm -f conftest.$ac_objext
10870 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10871 +  (eval $ac_compile) 2>&5
10872 +  ac_status=$?
10873 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10874 +  (exit $ac_status); } &&
10875 +         { ac_try='test -s conftest.$ac_objext'
10876 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10877 +  (eval $ac_try) 2>&5
10878 +  ac_status=$?
10879 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880 +  (exit $ac_status); }; }; then
10881 +  ac_cv_type_off_t=yes
10882 +else
10883 +  echo "$as_me: failed program was:" >&5
10884 +sed 's/^/| /' conftest.$ac_ext >&5
10885  
10886 -int main() {
10887 +ac_cv_type_off_t=no
10888 +fi
10889 +rm -f conftest.$ac_objext conftest.$ac_ext
10890 +fi
10891 +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
10892 +echo "${ECHO_T}$ac_cv_type_off_t" >&6
10893 +if test $ac_cv_type_off_t = yes; then
10894 +  :
10895 +else
10896  
10897 -/* Ultrix mips cc rejects this.  */
10898 -typedef int charset[2]; const charset x;
10899 -/* SunOS 4.1.1 cc rejects this.  */
10900 -char const *const *ccp;
10901 -char **p;
10902 -/* NEC SVR4.0.2 mips cc rejects this.  */
10903 -struct point {int x, y;};
10904 -static struct point const zero = {0,0};
10905 -/* AIX XL C 1.02.0.0 rejects this.
10906 -   It does not let you subtract one const X* pointer from another in an arm
10907 -   of an if-expression whose if-part is not a constant expression */
10908 -const char *g = "string";
10909 -ccp = &g + (g ? g-g : 0);
10910 -/* HPUX 7.0 cc rejects these. */
10911 -++ccp;
10912 -p = (char**) ccp;
10913 -ccp = (char const *const *) p;
10914 -{ /* SCO 3.2v4 cc rejects this.  */
10915 -  char *t;
10916 -  char const *s = 0 ? (char *) 0 : (char const *) 0;
10917 +cat >>confdefs.h <<_ACEOF
10918 +#define off_t long
10919 +_ACEOF
10920  
10921 -  *t++ = 0;
10922 +fi
10923 +
10924 +echo "$as_me:$LINENO: checking for pid_t" >&5
10925 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
10926 +if test "${ac_cv_type_pid_t+set}" = set; then
10927 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10928 +else
10929 +  cat >conftest.$ac_ext <<_ACEOF
10930 +#line $LINENO "configure"
10931 +/* confdefs.h.  */
10932 +_ACEOF
10933 +cat confdefs.h >>conftest.$ac_ext
10934 +cat >>conftest.$ac_ext <<_ACEOF
10935 +/* end confdefs.h.  */
10936 +$ac_includes_default
10937 +int
10938 +main ()
10939 +{
10940 +if ((pid_t *) 0)
10941 +  return 0;
10942 +if (sizeof (pid_t))
10943 +  return 0;
10944 +  ;
10945 +  return 0;
10946  }
10947 -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10948 -  int x[] = {25, 17};
10949 -  const int *foo = &x[0];
10950 -  ++foo;
10951 +_ACEOF
10952 +rm -f conftest.$ac_objext
10953 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10954 +  (eval $ac_compile) 2>&5
10955 +  ac_status=$?
10956 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10957 +  (exit $ac_status); } &&
10958 +         { ac_try='test -s conftest.$ac_objext'
10959 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10960 +  (eval $ac_try) 2>&5
10961 +  ac_status=$?
10962 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963 +  (exit $ac_status); }; }; then
10964 +  ac_cv_type_pid_t=yes
10965 +else
10966 +  echo "$as_me: failed program was:" >&5
10967 +sed 's/^/| /' conftest.$ac_ext >&5
10968 +
10969 +ac_cv_type_pid_t=no
10970 +fi
10971 +rm -f conftest.$ac_objext conftest.$ac_ext
10972 +fi
10973 +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10974 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6
10975 +if test $ac_cv_type_pid_t = yes; then
10976 +  :
10977 +else
10978 +
10979 +cat >>confdefs.h <<_ACEOF
10980 +#define pid_t int
10981 +_ACEOF
10982 +
10983 +fi
10984 +
10985 +echo "$as_me:$LINENO: checking return type of signal handlers" >&5
10986 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10987 +if test "${ac_cv_type_signal+set}" = set; then
10988 +  echo $ECHO_N "(cached) $ECHO_C" >&6
10989 +else
10990 +  cat >conftest.$ac_ext <<_ACEOF
10991 +#line $LINENO "configure"
10992 +/* confdefs.h.  */
10993 +_ACEOF
10994 +cat confdefs.h >>conftest.$ac_ext
10995 +cat >>conftest.$ac_ext <<_ACEOF
10996 +/* end confdefs.h.  */
10997 +#include <sys/types.h>
10998 +#include <signal.h>
10999 +#ifdef signal
11000 +# undef signal
11001 +#endif
11002 +#ifdef __cplusplus
11003 +extern "C" void (*signal (int, void (*)(int)))(int);
11004 +#else
11005 +void (*signal ()) ();
11006 +#endif
11007 +
11008 +int
11009 +main ()
11010 +{
11011 +int i;
11012 +  ;
11013 +  return 0;
11014  }
11015 -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11016 -  typedef const int *iptr;
11017 -  iptr p = 0;
11018 -  ++p;
11019 +_ACEOF
11020 +rm -f conftest.$ac_objext
11021 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11022 +  (eval $ac_compile) 2>&5
11023 +  ac_status=$?
11024 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025 +  (exit $ac_status); } &&
11026 +         { ac_try='test -s conftest.$ac_objext'
11027 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11028 +  (eval $ac_try) 2>&5
11029 +  ac_status=$?
11030 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031 +  (exit $ac_status); }; }; then
11032 +  ac_cv_type_signal=void
11033 +else
11034 +  echo "$as_me: failed program was:" >&5
11035 +sed 's/^/| /' conftest.$ac_ext >&5
11036 +
11037 +ac_cv_type_signal=int
11038 +fi
11039 +rm -f conftest.$ac_objext conftest.$ac_ext
11040 +fi
11041 +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
11042 +echo "${ECHO_T}$ac_cv_type_signal" >&6
11043 +
11044 +cat >>confdefs.h <<_ACEOF
11045 +#define RETSIGTYPE $ac_cv_type_signal
11046 +_ACEOF
11047 +
11048 +
11049 +echo "$as_me:$LINENO: checking for size_t" >&5
11050 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6
11051 +if test "${ac_cv_type_size_t+set}" = set; then
11052 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11053 +else
11054 +  cat >conftest.$ac_ext <<_ACEOF
11055 +#line $LINENO "configure"
11056 +/* confdefs.h.  */
11057 +_ACEOF
11058 +cat confdefs.h >>conftest.$ac_ext
11059 +cat >>conftest.$ac_ext <<_ACEOF
11060 +/* end confdefs.h.  */
11061 +$ac_includes_default
11062 +int
11063 +main ()
11064 +{
11065 +if ((size_t *) 0)
11066 +  return 0;
11067 +if (sizeof (size_t))
11068 +  return 0;
11069 +  ;
11070 +  return 0;
11071  }
11072 -{ /* AIX XL C 1.02.0.0 rejects this saying
11073 -     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11074 -  struct s { int j; const int *ap[3]; };
11075 -  struct s *b; b->j = 5;
11076 +_ACEOF
11077 +rm -f conftest.$ac_objext
11078 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11079 +  (eval $ac_compile) 2>&5
11080 +  ac_status=$?
11081 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082 +  (exit $ac_status); } &&
11083 +         { ac_try='test -s conftest.$ac_objext'
11084 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11085 +  (eval $ac_try) 2>&5
11086 +  ac_status=$?
11087 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088 +  (exit $ac_status); }; }; then
11089 +  ac_cv_type_size_t=yes
11090 +else
11091 +  echo "$as_me: failed program was:" >&5
11092 +sed 's/^/| /' conftest.$ac_ext >&5
11093 +
11094 +ac_cv_type_size_t=no
11095 +fi
11096 +rm -f conftest.$ac_objext conftest.$ac_ext
11097 +fi
11098 +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
11099 +echo "${ECHO_T}$ac_cv_type_size_t" >&6
11100 +if test $ac_cv_type_size_t = yes; then
11101 +  :
11102 +else
11103 +
11104 +cat >>confdefs.h <<_ACEOF
11105 +#define size_t unsigned
11106 +_ACEOF
11107 +
11108 +fi
11109 +
11110 +echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
11111 +echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
11112 +if test "${ac_cv_header_stdbool_h+set}" = set; then
11113 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11114 +else
11115 +  cat >conftest.$ac_ext <<_ACEOF
11116 +#line $LINENO "configure"
11117 +/* confdefs.h.  */
11118 +_ACEOF
11119 +cat confdefs.h >>conftest.$ac_ext
11120 +cat >>conftest.$ac_ext <<_ACEOF
11121 +/* end confdefs.h.  */
11122 +
11123 +         #include <stdbool.h>
11124 +         #ifndef bool
11125 +          "error: bool is not defined"
11126 +         #endif
11127 +         #ifndef false
11128 +          "error: false is not defined"
11129 +         #endif
11130 +         #if false
11131 +          "error: false is not 0"
11132 +         #endif
11133 +         #ifndef true
11134 +          "error: false is not defined"
11135 +         #endif
11136 +         #if true != 1
11137 +          "error: true is not 1"
11138 +         #endif
11139 +         #ifndef __bool_true_false_are_defined
11140 +          "error: __bool_true_false_are_defined is not defined"
11141 +         #endif
11142 +
11143 +         struct s { _Bool s: 1; _Bool t; } s;
11144 +
11145 +         char a[true == 1 ? 1 : -1];
11146 +         char b[false == 0 ? 1 : -1];
11147 +         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
11148 +         char d[(bool) -0.5 == true ? 1 : -1];
11149 +         bool e = &s;
11150 +         char f[(_Bool) -0.0 == false ? 1 : -1];
11151 +         char g[true];
11152 +         char h[sizeof (_Bool)];
11153 +         char i[sizeof s.t];
11154 +
11155 +int
11156 +main ()
11157 +{
11158 + return !a + !b + !c + !d + !e + !f + !g + !h + !i;
11159 +  ;
11160 +  return 0;
11161  }
11162 -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11163 -  const int foo = 10;
11164 +_ACEOF
11165 +rm -f conftest.$ac_objext
11166 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11167 +  (eval $ac_compile) 2>&5
11168 +  ac_status=$?
11169 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170 +  (exit $ac_status); } &&
11171 +         { ac_try='test -s conftest.$ac_objext'
11172 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11173 +  (eval $ac_try) 2>&5
11174 +  ac_status=$?
11175 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176 +  (exit $ac_status); }; }; then
11177 +  ac_cv_header_stdbool_h=yes
11178 +else
11179 +  echo "$as_me: failed program was:" >&5
11180 +sed 's/^/| /' conftest.$ac_ext >&5
11181 +
11182 +ac_cv_header_stdbool_h=no
11183 +fi
11184 +rm -f conftest.$ac_objext conftest.$ac_ext
11185 +fi
11186 +echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
11187 +echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
11188 +   echo "$as_me:$LINENO: checking for _Bool" >&5
11189 +echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
11190 +if test "${ac_cv_type__Bool+set}" = set; then
11191 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11192 +else
11193 +  cat >conftest.$ac_ext <<_ACEOF
11194 +#line $LINENO "configure"
11195 +/* confdefs.h.  */
11196 +_ACEOF
11197 +cat confdefs.h >>conftest.$ac_ext
11198 +cat >>conftest.$ac_ext <<_ACEOF
11199 +/* end confdefs.h.  */
11200 +$ac_includes_default
11201 +int
11202 +main ()
11203 +{
11204 +if ((_Bool *) 0)
11205 +  return 0;
11206 +if (sizeof (_Bool))
11207 +  return 0;
11208 +  ;
11209 +  return 0;
11210  }
11211 +_ACEOF
11212 +rm -f conftest.$ac_objext
11213 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11214 +  (eval $ac_compile) 2>&5
11215 +  ac_status=$?
11216 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217 +  (exit $ac_status); } &&
11218 +         { ac_try='test -s conftest.$ac_objext'
11219 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11220 +  (eval $ac_try) 2>&5
11221 +  ac_status=$?
11222 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223 +  (exit $ac_status); }; }; then
11224 +  ac_cv_type__Bool=yes
11225 +else
11226 +  echo "$as_me: failed program was:" >&5
11227 +sed 's/^/| /' conftest.$ac_ext >&5
11228  
11229 -; return 0; }
11230 -EOF
11231 -if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11232 -  rm -rf conftest*
11233 -  ac_cv_c_const=yes
11234 +ac_cv_type__Bool=no
11235 +fi
11236 +rm -f conftest.$ac_objext conftest.$ac_ext
11237 +fi
11238 +echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11239 +echo "${ECHO_T}$ac_cv_type__Bool" >&6
11240 +if test $ac_cv_type__Bool = yes; then
11241 +
11242 +cat >>confdefs.h <<_ACEOF
11243 +#define HAVE__BOOL 1
11244 +_ACEOF
11245 +
11246 +
11247 +fi
11248 +
11249 +   if test $ac_cv_header_stdbool_h = yes; then
11250 +
11251 +cat >>confdefs.h <<\_ACEOF
11252 +#define HAVE_STDBOOL_H 1
11253 +_ACEOF
11254 +
11255 +   fi
11256 +
11257 +
11258 +
11259 +  # Define two additional variables used in the Makefile substitution.
11260 +
11261 +  if test "$ac_cv_header_stdbool_h" = yes; then
11262 +    STDBOOL_H=''
11263 +  else
11264 +    STDBOOL_H='stdbool.h'
11265 +  fi
11266 +
11267 +
11268 +  if test "$ac_cv_type__Bool" = yes; then
11269 +    HAVE__BOOL=1
11270 +  else
11271 +    HAVE__BOOL=0
11272 +  fi
11273 +
11274 +
11275 +
11276 +
11277 +for ac_header in sys/time.h
11278 +do
11279 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11280 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11281 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
11282 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11283 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11284 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11285 +fi
11286 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11287 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11288  else
11289 -  echo "configure: failed program was:" >&5
11290 -  cat conftest.$ac_ext >&5
11291 -  rm -rf conftest*
11292 -  ac_cv_c_const=no
11293 +  # Is the header compilable?
11294 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
11295 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11296 +cat >conftest.$ac_ext <<_ACEOF
11297 +#line $LINENO "configure"
11298 +/* confdefs.h.  */
11299 +_ACEOF
11300 +cat confdefs.h >>conftest.$ac_ext
11301 +cat >>conftest.$ac_ext <<_ACEOF
11302 +/* end confdefs.h.  */
11303 +$ac_includes_default
11304 +#include <$ac_header>
11305 +_ACEOF
11306 +rm -f conftest.$ac_objext
11307 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11308 +  (eval $ac_compile) 2>&5
11309 +  ac_status=$?
11310 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311 +  (exit $ac_status); } &&
11312 +         { ac_try='test -s conftest.$ac_objext'
11313 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11314 +  (eval $ac_try) 2>&5
11315 +  ac_status=$?
11316 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317 +  (exit $ac_status); }; }; then
11318 +  ac_header_compiler=yes
11319 +else
11320 +  echo "$as_me: failed program was:" >&5
11321 +sed 's/^/| /' conftest.$ac_ext >&5
11322 +
11323 +ac_header_compiler=no
11324  fi
11325 -rm -f conftest*
11326 +rm -f conftest.$ac_objext conftest.$ac_ext
11327 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11328 +echo "${ECHO_T}$ac_header_compiler" >&6
11329 +
11330 +# Is the header present?
11331 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
11332 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11333 +cat >conftest.$ac_ext <<_ACEOF
11334 +#line $LINENO "configure"
11335 +/* confdefs.h.  */
11336 +_ACEOF
11337 +cat confdefs.h >>conftest.$ac_ext
11338 +cat >>conftest.$ac_ext <<_ACEOF
11339 +/* end confdefs.h.  */
11340 +#include <$ac_header>
11341 +_ACEOF
11342 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11343 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11344 +  ac_status=$?
11345 +  grep -v '^ *+' conftest.er1 >conftest.err
11346 +  rm -f conftest.er1
11347 +  cat conftest.err >&5
11348 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11349 +  (exit $ac_status); } >/dev/null; then
11350 +  if test -s conftest.err; then
11351 +    ac_cpp_err=$ac_c_preproc_warn_flag
11352 +  else
11353 +    ac_cpp_err=
11354 +  fi
11355 +else
11356 +  ac_cpp_err=yes
11357  fi
11358 +if test -z "$ac_cpp_err"; then
11359 +  ac_header_preproc=yes
11360 +else
11361 +  echo "$as_me: failed program was:" >&5
11362 +sed 's/^/| /' conftest.$ac_ext >&5
11363  
11364 -echo "$ac_t""$ac_cv_c_const" 1>&6
11365 -if test $ac_cv_c_const = no; then
11366 -  cat >> confdefs.h <<\EOF
11367 -#define const 
11368 -EOF
11369 +  ac_header_preproc=no
11370 +fi
11371 +rm -f conftest.err conftest.$ac_ext
11372 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11373 +echo "${ECHO_T}$ac_header_preproc" >&6
11374 +
11375 +# So?  What about this header?
11376 +case $ac_header_compiler:$ac_header_preproc in
11377 +  yes:no )
11378 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11379 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11380 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11381 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11382 +    (
11383 +      cat <<\_ASBOX
11384 +## ------------------------------------ ##
11385 +## Report this to bug-autoconf@gnu.org. ##
11386 +## ------------------------------------ ##
11387 +_ASBOX
11388 +    ) |
11389 +      sed "s/^/$as_me: WARNING:     /" >&2
11390 +    ;;
11391 +  no:yes )
11392 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11393 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11394 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11395 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11396 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11397 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11398 +    (
11399 +      cat <<\_ASBOX
11400 +## ------------------------------------ ##
11401 +## Report this to bug-autoconf@gnu.org. ##
11402 +## ------------------------------------ ##
11403 +_ASBOX
11404 +    ) |
11405 +      sed "s/^/$as_me: WARNING:     /" >&2
11406 +    ;;
11407 +esac
11408 +echo "$as_me:$LINENO: checking for $ac_header" >&5
11409 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11410 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11411 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11412 +else
11413 +  eval "$as_ac_Header=$ac_header_preproc"
11414 +fi
11415 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11416 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11417 +
11418 +fi
11419 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
11420 +  cat >>confdefs.h <<_ACEOF
11421 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11422 +_ACEOF
11423  
11424  fi
11425  
11426 +done
11427  
11428 -ac_header_dirent=no
11429 -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
11430 +
11431 +
11432 +
11433 +for ac_header in utime.h
11434  do
11435 -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11436 -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
11437 -echo "configure:1802: checking for $ac_hdr that defines DIR" >&5
11438 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
11439 -  echo $ac_n "(cached) $ac_c" 1>&6
11440 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11441 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11442 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
11443 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11444 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11445 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11446 +fi
11447 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11448 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11449  else
11450 -  cat > conftest.$ac_ext <<EOF
11451 -#line 1807 "configure"
11452 -#include "confdefs.h"
11453 -#include <sys/types.h>
11454 -#include <$ac_hdr>
11455 -int main() {
11456 -DIR *dirp = 0;
11457 -; return 0; }
11458 -EOF
11459 -if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11460 -  rm -rf conftest*
11461 -  eval "ac_cv_header_dirent_$ac_safe=yes"
11462 +  # Is the header compilable?
11463 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
11464 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11465 +cat >conftest.$ac_ext <<_ACEOF
11466 +#line $LINENO "configure"
11467 +/* confdefs.h.  */
11468 +_ACEOF
11469 +cat confdefs.h >>conftest.$ac_ext
11470 +cat >>conftest.$ac_ext <<_ACEOF
11471 +/* end confdefs.h.  */
11472 +$ac_includes_default
11473 +#include <$ac_header>
11474 +_ACEOF
11475 +rm -f conftest.$ac_objext
11476 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11477 +  (eval $ac_compile) 2>&5
11478 +  ac_status=$?
11479 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480 +  (exit $ac_status); } &&
11481 +         { ac_try='test -s conftest.$ac_objext'
11482 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11483 +  (eval $ac_try) 2>&5
11484 +  ac_status=$?
11485 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 +  (exit $ac_status); }; }; then
11487 +  ac_header_compiler=yes
11488  else
11489 -  echo "configure: failed program was:" >&5
11490 -  cat conftest.$ac_ext >&5
11491 -  rm -rf conftest*
11492 -  eval "ac_cv_header_dirent_$ac_safe=no"
11493 +  echo "$as_me: failed program was:" >&5
11494 +sed 's/^/| /' conftest.$ac_ext >&5
11495 +
11496 +ac_header_compiler=no
11497  fi
11498 -rm -f conftest*
11499 +rm -f conftest.$ac_objext conftest.$ac_ext
11500 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11501 +echo "${ECHO_T}$ac_header_compiler" >&6
11502 +
11503 +# Is the header present?
11504 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
11505 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11506 +cat >conftest.$ac_ext <<_ACEOF
11507 +#line $LINENO "configure"
11508 +/* confdefs.h.  */
11509 +_ACEOF
11510 +cat confdefs.h >>conftest.$ac_ext
11511 +cat >>conftest.$ac_ext <<_ACEOF
11512 +/* end confdefs.h.  */
11513 +#include <$ac_header>
11514 +_ACEOF
11515 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11516 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11517 +  ac_status=$?
11518 +  grep -v '^ *+' conftest.er1 >conftest.err
11519 +  rm -f conftest.er1
11520 +  cat conftest.err >&5
11521 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11522 +  (exit $ac_status); } >/dev/null; then
11523 +  if test -s conftest.err; then
11524 +    ac_cpp_err=$ac_c_preproc_warn_flag
11525 +  else
11526 +    ac_cpp_err=
11527 +  fi
11528 +else
11529 +  ac_cpp_err=yes
11530  fi
11531 -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
11532 -  echo "$ac_t""yes" 1>&6
11533 -    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11534 -  cat >> confdefs.h <<EOF
11535 -#define $ac_tr_hdr 1
11536 -EOF
11537 - ac_header_dirent=$ac_hdr; break
11538 +if test -z "$ac_cpp_err"; then
11539 +  ac_header_preproc=yes
11540  else
11541 -  echo "$ac_t""no" 1>&6
11542 +  echo "$as_me: failed program was:" >&5
11543 +sed 's/^/| /' conftest.$ac_ext >&5
11544 +
11545 +  ac_header_preproc=no
11546 +fi
11547 +rm -f conftest.err conftest.$ac_ext
11548 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11549 +echo "${ECHO_T}$ac_header_preproc" >&6
11550 +
11551 +# So?  What about this header?
11552 +case $ac_header_compiler:$ac_header_preproc in
11553 +  yes:no )
11554 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11555 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11556 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11557 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11558 +    (
11559 +      cat <<\_ASBOX
11560 +## ------------------------------------ ##
11561 +## Report this to bug-autoconf@gnu.org. ##
11562 +## ------------------------------------ ##
11563 +_ASBOX
11564 +    ) |
11565 +      sed "s/^/$as_me: WARNING:     /" >&2
11566 +    ;;
11567 +  no:yes )
11568 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11569 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11570 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11571 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11572 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11573 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11574 +    (
11575 +      cat <<\_ASBOX
11576 +## ------------------------------------ ##
11577 +## Report this to bug-autoconf@gnu.org. ##
11578 +## ------------------------------------ ##
11579 +_ASBOX
11580 +    ) |
11581 +      sed "s/^/$as_me: WARNING:     /" >&2
11582 +    ;;
11583 +esac
11584 +echo "$as_me:$LINENO: checking for $ac_header" >&5
11585 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11586 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11587 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11588 +else
11589 +  eval "$as_ac_Header=$ac_header_preproc"
11590  fi
11591 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11592 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11593 +
11594 +fi
11595 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
11596 +  cat >>confdefs.h <<_ACEOF
11597 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11598 +_ACEOF
11599 +
11600 +fi
11601 +
11602  done
11603 -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11604 -if test $ac_header_dirent = dirent.h; then
11605 -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
11606 -echo "configure:1840: checking for opendir in -ldir" >&5
11607 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
11608 -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11609 -  echo $ac_n "(cached) $ac_c" 1>&6
11610 +
11611 +
11612 +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
11613 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11614 +if test "${ac_cv_header_time+set}" = set; then
11615 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11616  else
11617 -  ac_save_LIBS="$LIBS"
11618 -LIBS="-ldir  $LIBS"
11619 -cat > conftest.$ac_ext <<EOF
11620 -#line 1848 "configure"
11621 -#include "confdefs.h"
11622 -/* Override any gcc2 internal prototype to avoid an error.  */
11623 -/* We use char because int might match the return type of a gcc2
11624 -    builtin and then its argument prototype would still apply.  */
11625 -char opendir();
11626 +  cat >conftest.$ac_ext <<_ACEOF
11627 +#line $LINENO "configure"
11628 +/* confdefs.h.  */
11629 +_ACEOF
11630 +cat confdefs.h >>conftest.$ac_ext
11631 +cat >>conftest.$ac_ext <<_ACEOF
11632 +/* end confdefs.h.  */
11633 +#include <sys/types.h>
11634 +#include <sys/time.h>
11635 +#include <time.h>
11636  
11637 -int main() {
11638 -opendir()
11639 -; return 0; }
11640 -EOF
11641 -if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11642 -  rm -rf conftest*
11643 -  eval "ac_cv_lib_$ac_lib_var=yes"
11644 +int
11645 +main ()
11646 +{
11647 +if ((struct tm *) 0)
11648 +return 0;
11649 +  ;
11650 +  return 0;
11651 +}
11652 +_ACEOF
11653 +rm -f conftest.$ac_objext
11654 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11655 +  (eval $ac_compile) 2>&5
11656 +  ac_status=$?
11657 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 +  (exit $ac_status); } &&
11659 +         { ac_try='test -s conftest.$ac_objext'
11660 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661 +  (eval $ac_try) 2>&5
11662 +  ac_status=$?
11663 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 +  (exit $ac_status); }; }; then
11665 +  ac_cv_header_time=yes
11666  else
11667 -  echo "configure: failed program was:" >&5
11668 -  cat conftest.$ac_ext >&5
11669 -  rm -rf conftest*
11670 -  eval "ac_cv_lib_$ac_lib_var=no"
11671 +  echo "$as_me: failed program was:" >&5
11672 +sed 's/^/| /' conftest.$ac_ext >&5
11673 +
11674 +ac_cv_header_time=no
11675  fi
11676 -rm -f conftest*
11677 -LIBS="$ac_save_LIBS"
11678 +rm -f conftest.$ac_objext conftest.$ac_ext
11679 +fi
11680 +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
11681 +echo "${ECHO_T}$ac_cv_header_time" >&6
11682 +if test $ac_cv_header_time = yes; then
11683 +
11684 +cat >>confdefs.h <<\_ACEOF
11685 +#define TIME_WITH_SYS_TIME 1
11686 +_ACEOF
11687  
11688  fi
11689 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11690 -  echo "$ac_t""yes" 1>&6
11691 -  LIBS="$LIBS -ldir"
11692 +
11693 +
11694 +
11695 +  :
11696 +
11697 +
11698 +
11699 +
11700 +
11701 +
11702 +
11703 +
11704 +
11705 +  echo "$as_me:$LINENO: checking for struct utimbuf" >&5
11706 +echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
11707 +if test "${fu_cv_sys_struct_utimbuf+set}" = set; then
11708 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11709  else
11710 -  echo "$ac_t""no" 1>&6
11711 +  cat >conftest.$ac_ext <<_ACEOF
11712 +#line $LINENO "configure"
11713 +/* confdefs.h.  */
11714 +_ACEOF
11715 +cat confdefs.h >>conftest.$ac_ext
11716 +cat >>conftest.$ac_ext <<_ACEOF
11717 +/* end confdefs.h.  */
11718 +
11719 +#ifdef TIME_WITH_SYS_TIME
11720 +# include <sys/time.h>
11721 +# include <time.h>
11722 +#else
11723 +# ifdef HAVE_SYS_TIME_H
11724 +#  include <sys/time.h>
11725 +# else
11726 +#  include <time.h>
11727 +# endif
11728 +#endif
11729 +#ifdef HAVE_UTIME_H
11730 +# include <utime.h>
11731 +#endif
11732 +
11733 +int
11734 +main ()
11735 +{
11736 +static struct utimbuf x; x.actime = x.modtime;
11737 +  ;
11738 +  return 0;
11739 +}
11740 +_ACEOF
11741 +rm -f conftest.$ac_objext
11742 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11743 +  (eval $ac_compile) 2>&5
11744 +  ac_status=$?
11745 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 +  (exit $ac_status); } &&
11747 +         { ac_try='test -s conftest.$ac_objext'
11748 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11749 +  (eval $ac_try) 2>&5
11750 +  ac_status=$?
11751 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 +  (exit $ac_status); }; }; then
11753 +  fu_cv_sys_struct_utimbuf=yes
11754 +else
11755 +  echo "$as_me: failed program was:" >&5
11756 +sed 's/^/| /' conftest.$ac_ext >&5
11757 +
11758 +fu_cv_sys_struct_utimbuf=no
11759 +fi
11760 +rm -f conftest.$ac_objext conftest.$ac_ext
11761 +
11762  fi
11763 +echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
11764 +echo "${ECHO_T}$fu_cv_sys_struct_utimbuf" >&6
11765  
11766 +  if test $fu_cv_sys_struct_utimbuf = yes; then
11767 +
11768 +cat >>confdefs.h <<\_ACEOF
11769 +#define HAVE_STRUCT_UTIMBUF 1
11770 +_ACEOF
11771 +
11772 +  fi
11773 +
11774 +
11775 +echo "$as_me:$LINENO: checking whether closedir returns void" >&5
11776 +echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
11777 +if test "${ac_cv_func_closedir_void+set}" = set; then
11778 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11779  else
11780 -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
11781 -echo "configure:1881: checking for opendir in -lx" >&5
11782 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
11783 -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11784 -  echo $ac_n "(cached) $ac_c" 1>&6
11785 +  if test "$cross_compiling" = yes; then
11786 +  ac_cv_func_closedir_void=yes
11787  else
11788 -  ac_save_LIBS="$LIBS"
11789 -LIBS="-lx  $LIBS"
11790 -cat > conftest.$ac_ext <<EOF
11791 -#line 1889 "configure"
11792 -#include "confdefs.h"
11793 -/* Override any gcc2 internal prototype to avoid an error.  */
11794 -/* We use char because int might match the return type of a gcc2
11795 -    builtin and then its argument prototype would still apply.  */
11796 -char opendir();
11797 +  cat >conftest.$ac_ext <<_ACEOF
11798 +#line $LINENO "configure"
11799 +/* confdefs.h.  */
11800 +_ACEOF
11801 +cat confdefs.h >>conftest.$ac_ext
11802 +cat >>conftest.$ac_ext <<_ACEOF
11803 +/* end confdefs.h.  */
11804 +$ac_includes_default
11805 +#include <$ac_header_dirent>
11806 +#ifndef __cplusplus
11807 +int closedir ();
11808 +#endif
11809  
11810 -int main() {
11811 -opendir()
11812 -; return 0; }
11813 -EOF
11814 -if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11815 -  rm -rf conftest*
11816 -  eval "ac_cv_lib_$ac_lib_var=yes"
11817 +int
11818 +main ()
11819 +{
11820 +exit (closedir (opendir (".")) != 0);
11821 +  ;
11822 +  return 0;
11823 +}
11824 +_ACEOF
11825 +rm -f conftest$ac_exeext
11826 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11827 +  (eval $ac_link) 2>&5
11828 +  ac_status=$?
11829 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11831 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11832 +  (eval $ac_try) 2>&5
11833 +  ac_status=$?
11834 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835 +  (exit $ac_status); }; }; then
11836 +  ac_cv_func_closedir_void=no
11837  else
11838 -  echo "configure: failed program was:" >&5
11839 -  cat conftest.$ac_ext >&5
11840 -  rm -rf conftest*
11841 -  eval "ac_cv_lib_$ac_lib_var=no"
11842 +  echo "$as_me: program exited with status $ac_status" >&5
11843 +echo "$as_me: failed program was:" >&5
11844 +sed 's/^/| /' conftest.$ac_ext >&5
11845 +
11846 +( exit $ac_status )
11847 +ac_cv_func_closedir_void=yes
11848  fi
11849 -rm -f conftest*
11850 -LIBS="$ac_save_LIBS"
11851 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11852 +fi
11853 +fi
11854 +echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
11855 +echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
11856 +if test $ac_cv_func_closedir_void = yes; then
11857 +
11858 +cat >>confdefs.h <<\_ACEOF
11859 +#define CLOSEDIR_VOID 1
11860 +_ACEOF
11861  
11862  fi
11863 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11864 -  echo "$ac_t""yes" 1>&6
11865 -  LIBS="$LIBS -lx"
11866 +
11867 +
11868 +
11869 +for ac_header in limits.h
11870 +do
11871 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11872 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11873 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
11874 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11875 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11876 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11877 +fi
11878 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11879 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11880  else
11881 -  echo "$ac_t""no" 1>&6
11882 +  # Is the header compilable?
11883 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
11884 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11885 +cat >conftest.$ac_ext <<_ACEOF
11886 +#line $LINENO "configure"
11887 +/* confdefs.h.  */
11888 +_ACEOF
11889 +cat confdefs.h >>conftest.$ac_ext
11890 +cat >>conftest.$ac_ext <<_ACEOF
11891 +/* end confdefs.h.  */
11892 +$ac_includes_default
11893 +#include <$ac_header>
11894 +_ACEOF
11895 +rm -f conftest.$ac_objext
11896 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11897 +  (eval $ac_compile) 2>&5
11898 +  ac_status=$?
11899 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11900 +  (exit $ac_status); } &&
11901 +         { ac_try='test -s conftest.$ac_objext'
11902 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11903 +  (eval $ac_try) 2>&5
11904 +  ac_status=$?
11905 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11906 +  (exit $ac_status); }; }; then
11907 +  ac_header_compiler=yes
11908 +else
11909 +  echo "$as_me: failed program was:" >&5
11910 +sed 's/^/| /' conftest.$ac_ext >&5
11911 +
11912 +ac_header_compiler=no
11913  fi
11914 +rm -f conftest.$ac_objext conftest.$ac_ext
11915 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11916 +echo "${ECHO_T}$ac_header_compiler" >&6
11917 +
11918 +# Is the header present?
11919 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
11920 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11921 +cat >conftest.$ac_ext <<_ACEOF
11922 +#line $LINENO "configure"
11923 +/* confdefs.h.  */
11924 +_ACEOF
11925 +cat confdefs.h >>conftest.$ac_ext
11926 +cat >>conftest.$ac_ext <<_ACEOF
11927 +/* end confdefs.h.  */
11928 +#include <$ac_header>
11929 +_ACEOF
11930 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11931 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11932 +  ac_status=$?
11933 +  grep -v '^ *+' conftest.er1 >conftest.err
11934 +  rm -f conftest.er1
11935 +  cat conftest.err >&5
11936 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937 +  (exit $ac_status); } >/dev/null; then
11938 +  if test -s conftest.err; then
11939 +    ac_cpp_err=$ac_c_preproc_warn_flag
11940 +  else
11941 +    ac_cpp_err=
11942 +  fi
11943 +else
11944 +  ac_cpp_err=yes
11945 +fi
11946 +if test -z "$ac_cpp_err"; then
11947 +  ac_header_preproc=yes
11948 +else
11949 +  echo "$as_me: failed program was:" >&5
11950 +sed 's/^/| /' conftest.$ac_ext >&5
11951  
11952 +  ac_header_preproc=no
11953  fi
11954 +rm -f conftest.err conftest.$ac_ext
11955 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11956 +echo "${ECHO_T}$ac_header_preproc" >&6
11957  
11958 -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
11959 -echo "configure:1923: checking for ANSI C header files" >&5
11960 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
11961 -  echo $ac_n "(cached) $ac_c" 1>&6
11962 +# So?  What about this header?
11963 +case $ac_header_compiler:$ac_header_preproc in
11964 +  yes:no )
11965 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11966 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11967 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11968 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11969 +    (
11970 +      cat <<\_ASBOX
11971 +## ------------------------------------ ##
11972 +## Report this to bug-autoconf@gnu.org. ##
11973 +## ------------------------------------ ##
11974 +_ASBOX
11975 +    ) |
11976 +      sed "s/^/$as_me: WARNING:     /" >&2
11977 +    ;;
11978 +  no:yes )
11979 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11980 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11981 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11982 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11983 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11984 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11985 +    (
11986 +      cat <<\_ASBOX
11987 +## ------------------------------------ ##
11988 +## Report this to bug-autoconf@gnu.org. ##
11989 +## ------------------------------------ ##
11990 +_ASBOX
11991 +    ) |
11992 +      sed "s/^/$as_me: WARNING:     /" >&2
11993 +    ;;
11994 +esac
11995 +echo "$as_me:$LINENO: checking for $ac_header" >&5
11996 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11997 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
11998 +  echo $ECHO_N "(cached) $ECHO_C" >&6
11999  else
12000 -  cat > conftest.$ac_ext <<EOF
12001 -#line 1928 "configure"
12002 -#include "confdefs.h"
12003 -#include <stdlib.h>
12004 -#include <stdarg.h>
12005 -#include <string.h>
12006 -#include <float.h>
12007 -EOF
12008 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12009 -{ (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12010 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12011 -if test -z "$ac_err"; then
12012 -  rm -rf conftest*
12013 -  ac_cv_header_stdc=yes
12014 +  eval "$as_ac_Header=$ac_header_preproc"
12015 +fi
12016 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12017 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12018 +
12019 +fi
12020 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
12021 +  cat >>confdefs.h <<_ACEOF
12022 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12023 +_ACEOF
12024 +
12025 +fi
12026 +
12027 +done
12028 +
12029 +
12030 +
12031 +
12032 +for ac_header in stdlib.h
12033 +do
12034 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12035 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12036 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
12037 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12038 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12039 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12040 +fi
12041 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12042 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12043  else
12044 -  echo "$ac_err" >&5
12045 -  echo "configure: failed program was:" >&5
12046 -  cat conftest.$ac_ext >&5
12047 -  rm -rf conftest*
12048 -  ac_cv_header_stdc=no
12049 +  # Is the header compilable?
12050 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
12051 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12052 +cat >conftest.$ac_ext <<_ACEOF
12053 +#line $LINENO "configure"
12054 +/* confdefs.h.  */
12055 +_ACEOF
12056 +cat confdefs.h >>conftest.$ac_ext
12057 +cat >>conftest.$ac_ext <<_ACEOF
12058 +/* end confdefs.h.  */
12059 +$ac_includes_default
12060 +#include <$ac_header>
12061 +_ACEOF
12062 +rm -f conftest.$ac_objext
12063 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12064 +  (eval $ac_compile) 2>&5
12065 +  ac_status=$?
12066 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12067 +  (exit $ac_status); } &&
12068 +         { ac_try='test -s conftest.$ac_objext'
12069 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12070 +  (eval $ac_try) 2>&5
12071 +  ac_status=$?
12072 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073 +  (exit $ac_status); }; }; then
12074 +  ac_header_compiler=yes
12075 +else
12076 +  echo "$as_me: failed program was:" >&5
12077 +sed 's/^/| /' conftest.$ac_ext >&5
12078 +
12079 +ac_header_compiler=no
12080  fi
12081 -rm -f conftest*
12082 +rm -f conftest.$ac_objext conftest.$ac_ext
12083 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12084 +echo "${ECHO_T}$ac_header_compiler" >&6
12085  
12086 -if test $ac_cv_header_stdc = yes; then
12087 -  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12088 -cat > conftest.$ac_ext <<EOF
12089 -#line 1953 "configure"
12090 -#include "confdefs.h"
12091 -#include <string.h>
12092 -EOF
12093 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12094 -  egrep "memchr" >/dev/null 2>&1; then
12095 -  :
12096 +# Is the header present?
12097 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
12098 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12099 +cat >conftest.$ac_ext <<_ACEOF
12100 +#line $LINENO "configure"
12101 +/* confdefs.h.  */
12102 +_ACEOF
12103 +cat confdefs.h >>conftest.$ac_ext
12104 +cat >>conftest.$ac_ext <<_ACEOF
12105 +/* end confdefs.h.  */
12106 +#include <$ac_header>
12107 +_ACEOF
12108 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12109 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12110 +  ac_status=$?
12111 +  grep -v '^ *+' conftest.er1 >conftest.err
12112 +  rm -f conftest.er1
12113 +  cat conftest.err >&5
12114 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 +  (exit $ac_status); } >/dev/null; then
12116 +  if test -s conftest.err; then
12117 +    ac_cpp_err=$ac_c_preproc_warn_flag
12118 +  else
12119 +    ac_cpp_err=
12120 +  fi
12121  else
12122 -  rm -rf conftest*
12123 -  ac_cv_header_stdc=no
12124 +  ac_cpp_err=yes
12125  fi
12126 -rm -f conftest*
12127 +if test -z "$ac_cpp_err"; then
12128 +  ac_header_preproc=yes
12129 +else
12130 +  echo "$as_me: failed program was:" >&5
12131 +sed 's/^/| /' conftest.$ac_ext >&5
12132  
12133 +  ac_header_preproc=no
12134  fi
12135 +rm -f conftest.err conftest.$ac_ext
12136 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12137 +echo "${ECHO_T}$ac_header_preproc" >&6
12138  
12139 -if test $ac_cv_header_stdc = yes; then
12140 -  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12141 -cat > conftest.$ac_ext <<EOF
12142 -#line 1971 "configure"
12143 -#include "confdefs.h"
12144 -#include <stdlib.h>
12145 -EOF
12146 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12147 -  egrep "free" >/dev/null 2>&1; then
12148 -  :
12149 +# So?  What about this header?
12150 +case $ac_header_compiler:$ac_header_preproc in
12151 +  yes:no )
12152 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12153 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12154 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12155 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12156 +    (
12157 +      cat <<\_ASBOX
12158 +## ------------------------------------ ##
12159 +## Report this to bug-autoconf@gnu.org. ##
12160 +## ------------------------------------ ##
12161 +_ASBOX
12162 +    ) |
12163 +      sed "s/^/$as_me: WARNING:     /" >&2
12164 +    ;;
12165 +  no:yes )
12166 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12167 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12168 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12169 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12170 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12171 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12172 +    (
12173 +      cat <<\_ASBOX
12174 +## ------------------------------------ ##
12175 +## Report this to bug-autoconf@gnu.org. ##
12176 +## ------------------------------------ ##
12177 +_ASBOX
12178 +    ) |
12179 +      sed "s/^/$as_me: WARNING:     /" >&2
12180 +    ;;
12181 +esac
12182 +echo "$as_me:$LINENO: checking for $ac_header" >&5
12183 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12184 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12185 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12186  else
12187 -  rm -rf conftest*
12188 -  ac_cv_header_stdc=no
12189 +  eval "$as_ac_Header=$ac_header_preproc"
12190  fi
12191 -rm -f conftest*
12192 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12193 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12194  
12195  fi
12196 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
12197 +  cat >>confdefs.h <<_ACEOF
12198 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12199 +_ACEOF
12200  
12201 -if test $ac_cv_header_stdc = yes; then
12202 -  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12203 -if test "$cross_compiling" = yes; then
12204 -  :
12205 +fi
12206 +
12207 +done
12208 +
12209 +
12210 +
12211 +
12212 +for ac_header in string.h
12213 +do
12214 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12215 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12216 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
12217 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12218 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12219 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12220 +fi
12221 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12222 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12223  else
12224 -  cat > conftest.$ac_ext <<EOF
12225 -#line 1992 "configure"
12226 -#include "confdefs.h"
12227 -#include <ctype.h>
12228 -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12229 -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12230 -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12231 -int main () { int i; for (i = 0; i < 256; i++)
12232 -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
12233 -exit (0); }
12234 +  # Is the header compilable?
12235 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
12236 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12237 +cat >conftest.$ac_ext <<_ACEOF
12238 +#line $LINENO "configure"
12239 +/* confdefs.h.  */
12240 +_ACEOF
12241 +cat confdefs.h >>conftest.$ac_ext
12242 +cat >>conftest.$ac_ext <<_ACEOF
12243 +/* end confdefs.h.  */
12244 +$ac_includes_default
12245 +#include <$ac_header>
12246 +_ACEOF
12247 +rm -f conftest.$ac_objext
12248 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12249 +  (eval $ac_compile) 2>&5
12250 +  ac_status=$?
12251 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12252 +  (exit $ac_status); } &&
12253 +         { ac_try='test -s conftest.$ac_objext'
12254 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12255 +  (eval $ac_try) 2>&5
12256 +  ac_status=$?
12257 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258 +  (exit $ac_status); }; }; then
12259 +  ac_header_compiler=yes
12260 +else
12261 +  echo "$as_me: failed program was:" >&5
12262 +sed 's/^/| /' conftest.$ac_ext >&5
12263  
12264 -EOF
12265 -if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12266 -then
12267 -  :
12268 +ac_header_compiler=no
12269 +fi
12270 +rm -f conftest.$ac_objext conftest.$ac_ext
12271 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12272 +echo "${ECHO_T}$ac_header_compiler" >&6
12273 +
12274 +# Is the header present?
12275 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
12276 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12277 +cat >conftest.$ac_ext <<_ACEOF
12278 +#line $LINENO "configure"
12279 +/* confdefs.h.  */
12280 +_ACEOF
12281 +cat confdefs.h >>conftest.$ac_ext
12282 +cat >>conftest.$ac_ext <<_ACEOF
12283 +/* end confdefs.h.  */
12284 +#include <$ac_header>
12285 +_ACEOF
12286 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12287 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12288 +  ac_status=$?
12289 +  grep -v '^ *+' conftest.er1 >conftest.err
12290 +  rm -f conftest.er1
12291 +  cat conftest.err >&5
12292 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12293 +  (exit $ac_status); } >/dev/null; then
12294 +  if test -s conftest.err; then
12295 +    ac_cpp_err=$ac_c_preproc_warn_flag
12296 +  else
12297 +    ac_cpp_err=
12298 +  fi
12299  else
12300 -  echo "configure: failed program was:" >&5
12301 -  cat conftest.$ac_ext >&5
12302 -  rm -fr conftest*
12303 -  ac_cv_header_stdc=no
12304 +  ac_cpp_err=yes
12305  fi
12306 -rm -fr conftest*
12307 +if test -z "$ac_cpp_err"; then
12308 +  ac_header_preproc=yes
12309 +else
12310 +  echo "$as_me: failed program was:" >&5
12311 +sed 's/^/| /' conftest.$ac_ext >&5
12312 +
12313 +  ac_header_preproc=no
12314  fi
12315 +rm -f conftest.err conftest.$ac_ext
12316 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12317 +echo "${ECHO_T}$ac_header_preproc" >&6
12318  
12319 +# So?  What about this header?
12320 +case $ac_header_compiler:$ac_header_preproc in
12321 +  yes:no )
12322 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12323 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12324 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12325 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12326 +    (
12327 +      cat <<\_ASBOX
12328 +## ------------------------------------ ##
12329 +## Report this to bug-autoconf@gnu.org. ##
12330 +## ------------------------------------ ##
12331 +_ASBOX
12332 +    ) |
12333 +      sed "s/^/$as_me: WARNING:     /" >&2
12334 +    ;;
12335 +  no:yes )
12336 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12337 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12338 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12339 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12340 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12341 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12342 +    (
12343 +      cat <<\_ASBOX
12344 +## ------------------------------------ ##
12345 +## Report this to bug-autoconf@gnu.org. ##
12346 +## ------------------------------------ ##
12347 +_ASBOX
12348 +    ) |
12349 +      sed "s/^/$as_me: WARNING:     /" >&2
12350 +    ;;
12351 +esac
12352 +echo "$as_me:$LINENO: checking for $ac_header" >&5
12353 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12354 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12355 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12356 +else
12357 +  eval "$as_ac_Header=$ac_header_preproc"
12358  fi
12359 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12360 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12361 +
12362  fi
12363 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
12364 +  cat >>confdefs.h <<_ACEOF
12365 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12366 +_ACEOF
12367 +
12368 +fi
12369 +
12370 +done
12371 +
12372  
12373 -echo "$ac_t""$ac_cv_header_stdc" 1>&6
12374 -if test $ac_cv_header_stdc = yes; then
12375 -  cat >> confdefs.h <<\EOF
12376 -#define STDC_HEADERS 1
12377 -EOF
12378  
12379 +      echo "$as_me:$LINENO: checking whether getenv is declared" >&5
12380 +echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
12381 +if test "${ac_cv_have_decl_getenv+set}" = set; then
12382 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12383 +else
12384 +  cat >conftest.$ac_ext <<_ACEOF
12385 +#line $LINENO "configure"
12386 +/* confdefs.h.  */
12387 +_ACEOF
12388 +cat confdefs.h >>conftest.$ac_ext
12389 +cat >>conftest.$ac_ext <<_ACEOF
12390 +/* end confdefs.h.  */
12391 +$ac_includes_default
12392 +int
12393 +main ()
12394 +{
12395 +#ifndef getenv
12396 +  char *p = (char *) getenv;
12397 +#endif
12398 +
12399 +  ;
12400 +  return 0;
12401 +}
12402 +_ACEOF
12403 +rm -f conftest.$ac_objext
12404 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12405 +  (eval $ac_compile) 2>&5
12406 +  ac_status=$?
12407 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 +  (exit $ac_status); } &&
12409 +         { ac_try='test -s conftest.$ac_objext'
12410 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12411 +  (eval $ac_try) 2>&5
12412 +  ac_status=$?
12413 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12414 +  (exit $ac_status); }; }; then
12415 +  ac_cv_have_decl_getenv=yes
12416 +else
12417 +  echo "$as_me: failed program was:" >&5
12418 +sed 's/^/| /' conftest.$ac_ext >&5
12419 +
12420 +ac_cv_have_decl_getenv=no
12421 +fi
12422 +rm -f conftest.$ac_objext conftest.$ac_ext
12423  fi
12424 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
12425 +echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
12426 +if test $ac_cv_have_decl_getenv = yes; then
12427  
12428 -for ac_hdr in fcntl.h limits.h string.h unistd.h utime.h varargs.h
12429 +cat >>confdefs.h <<_ACEOF
12430 +#define HAVE_DECL_GETENV 1
12431 +_ACEOF
12432 +
12433 +
12434 +else
12435 +  cat >>confdefs.h <<_ACEOF
12436 +#define HAVE_DECL_GETENV 0
12437 +_ACEOF
12438 +
12439 +
12440 +fi
12441 +
12442 +
12443 +
12444 +
12445 +      echo "$as_me:$LINENO: checking whether malloc is declared" >&5
12446 +echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
12447 +if test "${ac_cv_have_decl_malloc+set}" = set; then
12448 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12449 +else
12450 +  cat >conftest.$ac_ext <<_ACEOF
12451 +#line $LINENO "configure"
12452 +/* confdefs.h.  */
12453 +_ACEOF
12454 +cat confdefs.h >>conftest.$ac_ext
12455 +cat >>conftest.$ac_ext <<_ACEOF
12456 +/* end confdefs.h.  */
12457 +$ac_includes_default
12458 +int
12459 +main ()
12460 +{
12461 +#ifndef malloc
12462 +  char *p = (char *) malloc;
12463 +#endif
12464 +
12465 +  ;
12466 +  return 0;
12467 +}
12468 +_ACEOF
12469 +rm -f conftest.$ac_objext
12470 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12471 +  (eval $ac_compile) 2>&5
12472 +  ac_status=$?
12473 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 +  (exit $ac_status); } &&
12475 +         { ac_try='test -s conftest.$ac_objext'
12476 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12477 +  (eval $ac_try) 2>&5
12478 +  ac_status=$?
12479 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480 +  (exit $ac_status); }; }; then
12481 +  ac_cv_have_decl_malloc=yes
12482 +else
12483 +  echo "$as_me: failed program was:" >&5
12484 +sed 's/^/| /' conftest.$ac_ext >&5
12485 +
12486 +ac_cv_have_decl_malloc=no
12487 +fi
12488 +rm -f conftest.$ac_objext conftest.$ac_ext
12489 +fi
12490 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
12491 +echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
12492 +if test $ac_cv_have_decl_malloc = yes; then
12493 +
12494 +cat >>confdefs.h <<_ACEOF
12495 +#define HAVE_DECL_MALLOC 1
12496 +_ACEOF
12497 +
12498 +
12499 +else
12500 +  cat >>confdefs.h <<_ACEOF
12501 +#define HAVE_DECL_MALLOC 0
12502 +_ACEOF
12503 +
12504 +
12505 +fi
12506 +
12507 +
12508 +
12509 +
12510 +    echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
12511 +echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
12512 +if test "${ac_cv_win_or_dos+set}" = set; then
12513 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12514 +else
12515 +
12516 +        cat >conftest.$ac_ext <<_ACEOF
12517 +#line $LINENO "configure"
12518 +/* confdefs.h.  */
12519 +_ACEOF
12520 +cat confdefs.h >>conftest.$ac_ext
12521 +cat >>conftest.$ac_ext <<_ACEOF
12522 +/* end confdefs.h.  */
12523 +
12524 +int
12525 +main ()
12526 +{
12527 +#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
12528 +neither MSDOS nor Windows
12529 +#endif
12530 +  ;
12531 +  return 0;
12532 +}
12533 +_ACEOF
12534 +rm -f conftest.$ac_objext
12535 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12536 +  (eval $ac_compile) 2>&5
12537 +  ac_status=$?
12538 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539 +  (exit $ac_status); } &&
12540 +         { ac_try='test -s conftest.$ac_objext'
12541 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12542 +  (eval $ac_try) 2>&5
12543 +  ac_status=$?
12544 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545 +  (exit $ac_status); }; }; then
12546 +  ac_cv_win_or_dos=yes
12547 +else
12548 +  echo "$as_me: failed program was:" >&5
12549 +sed 's/^/| /' conftest.$ac_ext >&5
12550 +
12551 +ac_cv_win_or_dos=no
12552 +fi
12553 +rm -f conftest.$ac_objext conftest.$ac_ext
12554 +
12555 +fi
12556 +echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
12557 +echo "${ECHO_T}$ac_cv_win_or_dos" >&6
12558 +
12559 +    if test x"$ac_cv_win_or_dos" = xyes; then
12560 +      ac_fs_accepts_drive_letter_prefix=1
12561 +      ac_fs_backslash_is_file_name_separator=1
12562 +    else
12563 +      ac_fs_accepts_drive_letter_prefix=0
12564 +      ac_fs_backslash_is_file_name_separator=0
12565 +    fi
12566 +
12567 +
12568 +
12569 +
12570 +
12571 +cat >>confdefs.h <<_ACEOF
12572 +#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
12573 +_ACEOF
12574 +
12575 +
12576 +
12577 +
12578 +
12579 +
12580 +cat >>confdefs.h <<_ACEOF
12581 +#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
12582 +_ACEOF
12583 +
12584 +
12585 +
12586 +
12587 +for ac_header in unistd.h
12588  do
12589 -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12590 -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12591 -echo "configure:2030: checking for $ac_hdr" >&5
12592 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
12593 -  echo $ac_n "(cached) $ac_c" 1>&6
12594 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12595 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12596 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
12597 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12598 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12599 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12600 +fi
12601 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12602 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12603  else
12604 -  cat > conftest.$ac_ext <<EOF
12605 -#line 2035 "configure"
12606 -#include "confdefs.h"
12607 -#include <$ac_hdr>
12608 -EOF
12609 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12610 -{ (eval echo configure:2040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12611 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12612 -if test -z "$ac_err"; then
12613 -  rm -rf conftest*
12614 -  eval "ac_cv_header_$ac_safe=yes"
12615 +  # Is the header compilable?
12616 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
12617 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12618 +cat >conftest.$ac_ext <<_ACEOF
12619 +#line $LINENO "configure"
12620 +/* confdefs.h.  */
12621 +_ACEOF
12622 +cat confdefs.h >>conftest.$ac_ext
12623 +cat >>conftest.$ac_ext <<_ACEOF
12624 +/* end confdefs.h.  */
12625 +$ac_includes_default
12626 +#include <$ac_header>
12627 +_ACEOF
12628 +rm -f conftest.$ac_objext
12629 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12630 +  (eval $ac_compile) 2>&5
12631 +  ac_status=$?
12632 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 +  (exit $ac_status); } &&
12634 +         { ac_try='test -s conftest.$ac_objext'
12635 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636 +  (eval $ac_try) 2>&5
12637 +  ac_status=$?
12638 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 +  (exit $ac_status); }; }; then
12640 +  ac_header_compiler=yes
12641  else
12642 -  echo "$ac_err" >&5
12643 -  echo "configure: failed program was:" >&5
12644 -  cat conftest.$ac_ext >&5
12645 -  rm -rf conftest*
12646 -  eval "ac_cv_header_$ac_safe=no"
12647 +  echo "$as_me: failed program was:" >&5
12648 +sed 's/^/| /' conftest.$ac_ext >&5
12649 +
12650 +ac_header_compiler=no
12651  fi
12652 -rm -f conftest*
12653 +rm -f conftest.$ac_objext conftest.$ac_ext
12654 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12655 +echo "${ECHO_T}$ac_header_compiler" >&6
12656 +
12657 +# Is the header present?
12658 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
12659 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12660 +cat >conftest.$ac_ext <<_ACEOF
12661 +#line $LINENO "configure"
12662 +/* confdefs.h.  */
12663 +_ACEOF
12664 +cat confdefs.h >>conftest.$ac_ext
12665 +cat >>conftest.$ac_ext <<_ACEOF
12666 +/* end confdefs.h.  */
12667 +#include <$ac_header>
12668 +_ACEOF
12669 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12670 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12671 +  ac_status=$?
12672 +  grep -v '^ *+' conftest.er1 >conftest.err
12673 +  rm -f conftest.er1
12674 +  cat conftest.err >&5
12675 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676 +  (exit $ac_status); } >/dev/null; then
12677 +  if test -s conftest.err; then
12678 +    ac_cpp_err=$ac_c_preproc_warn_flag
12679 +  else
12680 +    ac_cpp_err=
12681 +  fi
12682 +else
12683 +  ac_cpp_err=yes
12684  fi
12685 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12686 -  echo "$ac_t""yes" 1>&6
12687 -    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12688 -  cat >> confdefs.h <<EOF
12689 -#define $ac_tr_hdr 1
12690 -EOF
12691
12692 +if test -z "$ac_cpp_err"; then
12693 +  ac_header_preproc=yes
12694  else
12695 -  echo "$ac_t""no" 1>&6
12696 +  echo "$as_me: failed program was:" >&5
12697 +sed 's/^/| /' conftest.$ac_ext >&5
12698 +
12699 +  ac_header_preproc=no
12700 +fi
12701 +rm -f conftest.err conftest.$ac_ext
12702 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12703 +echo "${ECHO_T}$ac_header_preproc" >&6
12704 +
12705 +# So?  What about this header?
12706 +case $ac_header_compiler:$ac_header_preproc in
12707 +  yes:no )
12708 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12709 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12710 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12711 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12712 +    (
12713 +      cat <<\_ASBOX
12714 +## ------------------------------------ ##
12715 +## Report this to bug-autoconf@gnu.org. ##
12716 +## ------------------------------------ ##
12717 +_ASBOX
12718 +    ) |
12719 +      sed "s/^/$as_me: WARNING:     /" >&2
12720 +    ;;
12721 +  no:yes )
12722 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12723 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12724 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12725 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12726 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12727 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12728 +    (
12729 +      cat <<\_ASBOX
12730 +## ------------------------------------ ##
12731 +## Report this to bug-autoconf@gnu.org. ##
12732 +## ------------------------------------ ##
12733 +_ASBOX
12734 +    ) |
12735 +      sed "s/^/$as_me: WARNING:     /" >&2
12736 +    ;;
12737 +esac
12738 +echo "$as_me:$LINENO: checking for $ac_header" >&5
12739 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12740 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
12741 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12742 +else
12743 +  eval "$as_ac_Header=$ac_header_preproc"
12744 +fi
12745 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12746 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12747 +
12748  fi
12749 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
12750 +  cat >>confdefs.h <<_ACEOF
12751 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12752 +_ACEOF
12753 +
12754 +fi
12755 +
12756  done
12757  
12758  
12759 -  echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
12760 -echo "configure:2068: checking for inttypes.h" >&5
12761 -if eval "test \"`echo '$''{'jm_ac_cv_header_inttypes_h'+set}'`\" = set"; then
12762 -  echo $ac_n "(cached) $ac_c" 1>&6
12763 +
12764 +
12765 +
12766 +
12767 +  :
12768 +
12769 +
12770 +
12771 +
12772 +
12773 +
12774 +
12775 +
12776 +
12777 +
12778 +
12779 +
12780 +  :
12781 +
12782 +
12783 +
12784 +
12785 +
12786 +
12787 +
12788 +
12789 +     echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5
12790 +echo $ECHO_N "checking for d_ino member in directory struct... $ECHO_C" >&6
12791 +if test "${jm_cv_struct_dirent_d_ino+set}" = set; then
12792 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12793  else
12794 -  cat > conftest.$ac_ext <<EOF
12795 -#line 2073 "configure"
12796 -#include "confdefs.h"
12797 +  cat >conftest.$ac_ext <<_ACEOF
12798 +#line $LINENO "configure"
12799 +/* confdefs.h.  */
12800 +_ACEOF
12801 +cat confdefs.h >>conftest.$ac_ext
12802 +cat >>conftest.$ac_ext <<_ACEOF
12803 +/* end confdefs.h.  */
12804 +
12805  #include <sys/types.h>
12806 -#include <inttypes.h>
12807 -int main() {
12808 -uintmax_t i = (uintmax_t) -1;
12809 -; return 0; }
12810 -EOF
12811 -if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12812 -  rm -rf conftest*
12813 -  jm_ac_cv_header_inttypes_h=yes
12814 +#ifdef HAVE_DIRENT_H
12815 +# include <dirent.h>
12816 +#else /* not HAVE_DIRENT_H */
12817 +# define dirent direct
12818 +# ifdef HAVE_SYS_NDIR_H
12819 +#  include <sys/ndir.h>
12820 +# endif /* HAVE_SYS_NDIR_H */
12821 +# ifdef HAVE_SYS_DIR_H
12822 +#  include <sys/dir.h>
12823 +# endif /* HAVE_SYS_DIR_H */
12824 +# ifdef HAVE_NDIR_H
12825 +#  include <ndir.h>
12826 +# endif /* HAVE_NDIR_H */
12827 +#endif /* HAVE_DIRENT_H */
12828 +
12829 +int
12830 +main ()
12831 +{
12832 +struct dirent dp; dp.d_ino = 0;
12833 +  ;
12834 +  return 0;
12835 +}
12836 +_ACEOF
12837 +rm -f conftest.$ac_objext conftest$ac_exeext
12838 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12839 +  (eval $ac_link) 2>&5
12840 +  ac_status=$?
12841 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12842 +  (exit $ac_status); } &&
12843 +         { ac_try='test -s conftest$ac_exeext'
12844 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12845 +  (eval $ac_try) 2>&5
12846 +  ac_status=$?
12847 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12848 +  (exit $ac_status); }; }; then
12849 +  jm_cv_struct_dirent_d_ino=yes
12850  else
12851 -  echo "configure: failed program was:" >&5
12852 -  cat conftest.$ac_ext >&5
12853 -  rm -rf conftest*
12854 -  jm_ac_cv_header_inttypes_h=no
12855 +  echo "$as_me: failed program was:" >&5
12856 +sed 's/^/| /' conftest.$ac_ext >&5
12857 +
12858 +jm_cv_struct_dirent_d_ino=no
12859  fi
12860 -rm -f conftest*
12861 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12862 +
12863 +
12864  fi
12865 +echo "$as_me:$LINENO: result: $jm_cv_struct_dirent_d_ino" >&5
12866 +echo "${ECHO_T}$jm_cv_struct_dirent_d_ino" >&6
12867 +   if test $jm_cv_struct_dirent_d_ino = yes; then
12868  
12869 -echo "$ac_t""$jm_ac_cv_header_inttypes_h" 1>&6
12870 -  if test $jm_ac_cv_header_inttypes_h = yes; then
12871 -    cat >> confdefs.h <<EOF
12872 -#define HAVE_INTTYPES_H 1
12873 -EOF
12874 +cat >>confdefs.h <<\_ACEOF
12875 +#define D_INO_IN_DIRENT 1
12876 +_ACEOF
12877  
12878 +   fi
12879 +
12880 +
12881 +
12882 +
12883 +  echo "$as_me:$LINENO: checking for long file names" >&5
12884 +echo $ECHO_N "checking for long file names... $ECHO_C" >&6
12885 +if test "${ac_cv_sys_long_file_names+set}" = set; then
12886 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12887 +else
12888 +  ac_cv_sys_long_file_names=yes
12889 +# Test for long file names in all the places we know might matter:
12890 +#      .               the current directory, where building will happen
12891 +#      $prefix/lib     where we will be installing things
12892 +#      $exec_prefix/lib        likewise
12893 +# eval it to expand exec_prefix.
12894 +#      $TMPDIR         if set, where it might want to write temporary files
12895 +# if $TMPDIR is not set:
12896 +#      /tmp            where it might want to write temporary files
12897 +#      /var/tmp                likewise
12898 +#      /usr/tmp                likewise
12899 +if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
12900 +  ac_tmpdirs=$TMPDIR
12901 +else
12902 +  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
12903 +fi
12904 +for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
12905 +  test -d $ac_dir || continue
12906 +  test -w $ac_dir || continue # It is less confusing to not echo anything here.
12907 +  ac_xdir=$ac_dir/cf$$
12908 +  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
12909 +  ac_tf1=$ac_xdir/conftest9012345
12910 +  ac_tf2=$ac_xdir/conftest9012346
12911 +  (echo 1 >$ac_tf1) 2>/dev/null
12912 +  (echo 2 >$ac_tf2) 2>/dev/null
12913 +  ac_val=`cat $ac_tf1 2>/dev/null`
12914 +  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
12915 +    ac_cv_sys_long_file_names=no
12916 +    rm -rf $ac_xdir 2>/dev/null
12917 +    break
12918    fi
12919 +  rm -rf $ac_xdir 2>/dev/null
12920 +done
12921 +fi
12922 +echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
12923 +echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
12924 +if test $ac_cv_sys_long_file_names = yes; then
12925  
12926 +cat >>confdefs.h <<\_ACEOF
12927 +#define HAVE_LONG_FILE_NAMES 1
12928 +_ACEOF
12929  
12930 -echo $ac_n "checking for mode_t""... $ac_c" 1>&6
12931 -echo "configure:2103: checking for mode_t" >&5
12932 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
12933 -  echo $ac_n "(cached) $ac_c" 1>&6
12934 +fi
12935 +
12936 +
12937 +  :
12938 +
12939 +
12940 +
12941 +
12942 +
12943 +
12944 +
12945 +
12946 +
12947 +
12948 +
12949 +
12950 +for ac_func in pathconf
12951 +do
12952 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12953 +echo "$as_me:$LINENO: checking for $ac_func" >&5
12954 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12955 +if eval "test \"\${$as_ac_var+set}\" = set"; then
12956 +  echo $ECHO_N "(cached) $ECHO_C" >&6
12957  else
12958 -  cat > conftest.$ac_ext <<EOF
12959 -#line 2108 "configure"
12960 -#include "confdefs.h"
12961 -#include <sys/types.h>
12962 -#if STDC_HEADERS
12963 -#include <stdlib.h>
12964 -#include <stddef.h>
12965 +  cat >conftest.$ac_ext <<_ACEOF
12966 +#line $LINENO "configure"
12967 +/* confdefs.h.  */
12968 +_ACEOF
12969 +cat confdefs.h >>conftest.$ac_ext
12970 +cat >>conftest.$ac_ext <<_ACEOF
12971 +/* end confdefs.h.  */
12972 +/* System header to define __stub macros and hopefully few prototypes,
12973 +    which can conflict with char $ac_func (); below.
12974 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12975 +    <limits.h> exists even on freestanding compilers.  */
12976 +#ifdef __STDC__
12977 +# include <limits.h>
12978 +#else
12979 +# include <assert.h>
12980  #endif
12981 -EOF
12982 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12983 -  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
12984 -  rm -rf conftest*
12985 -  ac_cv_type_mode_t=yes
12986 +/* Override any gcc2 internal prototype to avoid an error.  */
12987 +#ifdef __cplusplus
12988 +extern "C"
12989 +{
12990 +#endif
12991 +/* We use char because int might match the return type of a gcc2
12992 +   builtin and then its argument prototype would still apply.  */
12993 +char $ac_func ();
12994 +/* The GNU C library defines this for functions which it implements
12995 +    to always fail with ENOSYS.  Some functions are actually named
12996 +    something starting with __ and the normal name is an alias.  */
12997 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12998 +choke me
12999 +#else
13000 +char (*f) () = $ac_func;
13001 +#endif
13002 +#ifdef __cplusplus
13003 +}
13004 +#endif
13005 +
13006 +int
13007 +main ()
13008 +{
13009 +return f != $ac_func;
13010 +  ;
13011 +  return 0;
13012 +}
13013 +_ACEOF
13014 +rm -f conftest.$ac_objext conftest$ac_exeext
13015 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13016 +  (eval $ac_link) 2>&5
13017 +  ac_status=$?
13018 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019 +  (exit $ac_status); } &&
13020 +         { ac_try='test -s conftest$ac_exeext'
13021 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13022 +  (eval $ac_try) 2>&5
13023 +  ac_status=$?
13024 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025 +  (exit $ac_status); }; }; then
13026 +  eval "$as_ac_var=yes"
13027  else
13028 -  rm -rf conftest*
13029 -  ac_cv_type_mode_t=no
13030 +  echo "$as_me: failed program was:" >&5
13031 +sed 's/^/| /' conftest.$ac_ext >&5
13032 +
13033 +eval "$as_ac_var=no"
13034  fi
13035 -rm -f conftest*
13036 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13037 +fi
13038 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13039 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13040 +if test `eval echo '${'$as_ac_var'}'` = yes; then
13041 +  cat >>confdefs.h <<_ACEOF
13042 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13043 +_ACEOF
13044  
13045  fi
13046 -echo "$ac_t""$ac_cv_type_mode_t" 1>&6
13047 -if test $ac_cv_type_mode_t = no; then
13048 -  cat >> confdefs.h <<\EOF
13049 -#define mode_t int
13050 -EOF
13051 +done
13052 +
13053 +
13054 +
13055 +
13056 +
13057 +
13058 +
13059 +  :
13060 +
13061 +
13062 +
13063 +
13064 +
13065 +
13066 +
13067 +
13068 +  :
13069 +
13070 +
13071 +
13072 +
13073 +
13074 +
13075 +
13076 +
13077 +  :
13078 +
13079 +
13080 +
13081 +
13082 +
13083 +
13084  
13085 +for ac_func in vprintf
13086 +do
13087 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13088 +echo "$as_me:$LINENO: checking for $ac_func" >&5
13089 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13090 +if eval "test \"\${$as_ac_var+set}\" = set"; then
13091 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13092 +else
13093 +  cat >conftest.$ac_ext <<_ACEOF
13094 +#line $LINENO "configure"
13095 +/* confdefs.h.  */
13096 +_ACEOF
13097 +cat confdefs.h >>conftest.$ac_ext
13098 +cat >>conftest.$ac_ext <<_ACEOF
13099 +/* end confdefs.h.  */
13100 +/* System header to define __stub macros and hopefully few prototypes,
13101 +    which can conflict with char $ac_func (); below.
13102 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13103 +    <limits.h> exists even on freestanding compilers.  */
13104 +#ifdef __STDC__
13105 +# include <limits.h>
13106 +#else
13107 +# include <assert.h>
13108 +#endif
13109 +/* Override any gcc2 internal prototype to avoid an error.  */
13110 +#ifdef __cplusplus
13111 +extern "C"
13112 +{
13113 +#endif
13114 +/* We use char because int might match the return type of a gcc2
13115 +   builtin and then its argument prototype would still apply.  */
13116 +char $ac_func ();
13117 +/* The GNU C library defines this for functions which it implements
13118 +    to always fail with ENOSYS.  Some functions are actually named
13119 +    something starting with __ and the normal name is an alias.  */
13120 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13121 +choke me
13122 +#else
13123 +char (*f) () = $ac_func;
13124 +#endif
13125 +#ifdef __cplusplus
13126 +}
13127 +#endif
13128 +
13129 +int
13130 +main ()
13131 +{
13132 +return f != $ac_func;
13133 +  ;
13134 +  return 0;
13135 +}
13136 +_ACEOF
13137 +rm -f conftest.$ac_objext conftest$ac_exeext
13138 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13139 +  (eval $ac_link) 2>&5
13140 +  ac_status=$?
13141 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142 +  (exit $ac_status); } &&
13143 +         { ac_try='test -s conftest$ac_exeext'
13144 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13145 +  (eval $ac_try) 2>&5
13146 +  ac_status=$?
13147 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13148 +  (exit $ac_status); }; }; then
13149 +  eval "$as_ac_var=yes"
13150 +else
13151 +  echo "$as_me: failed program was:" >&5
13152 +sed 's/^/| /' conftest.$ac_ext >&5
13153 +
13154 +eval "$as_ac_var=no"
13155  fi
13156 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13157 +fi
13158 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13159 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13160 +if test `eval echo '${'$as_ac_var'}'` = yes; then
13161 +  cat >>confdefs.h <<_ACEOF
13162 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13163 +_ACEOF
13164  
13165 -echo $ac_n "checking for off_t""... $ac_c" 1>&6
13166 -echo "configure:2136: checking for off_t" >&5
13167 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
13168 -  echo $ac_n "(cached) $ac_c" 1>&6
13169 +echo "$as_me:$LINENO: checking for _doprnt" >&5
13170 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
13171 +if test "${ac_cv_func__doprnt+set}" = set; then
13172 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13173  else
13174 -  cat > conftest.$ac_ext <<EOF
13175 -#line 2141 "configure"
13176 -#include "confdefs.h"
13177 -#include <sys/types.h>
13178 -#if STDC_HEADERS
13179 -#include <stdlib.h>
13180 -#include <stddef.h>
13181 +  cat >conftest.$ac_ext <<_ACEOF
13182 +#line $LINENO "configure"
13183 +/* confdefs.h.  */
13184 +_ACEOF
13185 +cat confdefs.h >>conftest.$ac_ext
13186 +cat >>conftest.$ac_ext <<_ACEOF
13187 +/* end confdefs.h.  */
13188 +/* System header to define __stub macros and hopefully few prototypes,
13189 +    which can conflict with char _doprnt (); below.
13190 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13191 +    <limits.h> exists even on freestanding compilers.  */
13192 +#ifdef __STDC__
13193 +# include <limits.h>
13194 +#else
13195 +# include <assert.h>
13196  #endif
13197 -EOF
13198 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13199 -  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13200 -  rm -rf conftest*
13201 -  ac_cv_type_off_t=yes
13202 +/* Override any gcc2 internal prototype to avoid an error.  */
13203 +#ifdef __cplusplus
13204 +extern "C"
13205 +{
13206 +#endif
13207 +/* We use char because int might match the return type of a gcc2
13208 +   builtin and then its argument prototype would still apply.  */
13209 +char _doprnt ();
13210 +/* The GNU C library defines this for functions which it implements
13211 +    to always fail with ENOSYS.  Some functions are actually named
13212 +    something starting with __ and the normal name is an alias.  */
13213 +#if defined (__stub__doprnt) || defined (__stub____doprnt)
13214 +choke me
13215 +#else
13216 +char (*f) () = _doprnt;
13217 +#endif
13218 +#ifdef __cplusplus
13219 +}
13220 +#endif
13221 +
13222 +int
13223 +main ()
13224 +{
13225 +return f != _doprnt;
13226 +  ;
13227 +  return 0;
13228 +}
13229 +_ACEOF
13230 +rm -f conftest.$ac_objext conftest$ac_exeext
13231 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13232 +  (eval $ac_link) 2>&5
13233 +  ac_status=$?
13234 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13235 +  (exit $ac_status); } &&
13236 +         { ac_try='test -s conftest$ac_exeext'
13237 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13238 +  (eval $ac_try) 2>&5
13239 +  ac_status=$?
13240 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241 +  (exit $ac_status); }; }; then
13242 +  ac_cv_func__doprnt=yes
13243  else
13244 -  rm -rf conftest*
13245 -  ac_cv_type_off_t=no
13246 +  echo "$as_me: failed program was:" >&5
13247 +sed 's/^/| /' conftest.$ac_ext >&5
13248 +
13249 +ac_cv_func__doprnt=no
13250  fi
13251 -rm -f conftest*
13252 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13253 +fi
13254 +echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
13255 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6
13256 +if test $ac_cv_func__doprnt = yes; then
13257 +
13258 +cat >>confdefs.h <<\_ACEOF
13259 +#define HAVE_DOPRNT 1
13260 +_ACEOF
13261  
13262  fi
13263 -echo "$ac_t""$ac_cv_type_off_t" 1>&6
13264 -if test $ac_cv_type_off_t = no; then
13265 -  cat >> confdefs.h <<\EOF
13266 -#define off_t long
13267 -EOF
13268  
13269  fi
13270 +done
13271  
13272 -echo $ac_n "checking for pid_t""... $ac_c" 1>&6
13273 -echo "configure:2169: checking for pid_t" >&5
13274 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
13275 -  echo $ac_n "(cached) $ac_c" 1>&6
13276 +
13277 +
13278 +  echo "$as_me:$LINENO: checking for error_at_line" >&5
13279 +echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6
13280 +if test "${ac_cv_lib_error_at_line+set}" = set; then
13281 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13282  else
13283 -  cat > conftest.$ac_ext <<EOF
13284 -#line 2174 "configure"
13285 -#include "confdefs.h"
13286 -#include <sys/types.h>
13287 -#if STDC_HEADERS
13288 -#include <stdlib.h>
13289 -#include <stddef.h>
13290 +  cat >conftest.$ac_ext <<_ACEOF
13291 +#line $LINENO "configure"
13292 +/* confdefs.h.  */
13293 +_ACEOF
13294 +cat confdefs.h >>conftest.$ac_ext
13295 +cat >>conftest.$ac_ext <<_ACEOF
13296 +/* end confdefs.h.  */
13297 +
13298 +int
13299 +main ()
13300 +{
13301 +error_at_line (0, 0, "", 0, "");
13302 +  ;
13303 +  return 0;
13304 +}
13305 +_ACEOF
13306 +rm -f conftest.$ac_objext conftest$ac_exeext
13307 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13308 +  (eval $ac_link) 2>&5
13309 +  ac_status=$?
13310 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 +  (exit $ac_status); } &&
13312 +         { ac_try='test -s conftest$ac_exeext'
13313 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13314 +  (eval $ac_try) 2>&5
13315 +  ac_status=$?
13316 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 +  (exit $ac_status); }; }; then
13318 +  ac_cv_lib_error_at_line=yes
13319 +else
13320 +  echo "$as_me: failed program was:" >&5
13321 +sed 's/^/| /' conftest.$ac_ext >&5
13322 +
13323 +ac_cv_lib_error_at_line=no
13324 +fi
13325 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13326 +fi
13327 +echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
13328 +echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
13329 +if test $ac_cv_lib_error_at_line = no; then
13330 +  LIBOBJS="$LIBOBJS error.$ac_objext"
13331 +fi
13332 +
13333 +
13334 +
13335 +
13336 +
13337 +for ac_func in strerror
13338 +do
13339 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13340 +echo "$as_me:$LINENO: checking for $ac_func" >&5
13341 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13342 +if eval "test \"\${$as_ac_var+set}\" = set"; then
13343 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13344 +else
13345 +  cat >conftest.$ac_ext <<_ACEOF
13346 +#line $LINENO "configure"
13347 +/* confdefs.h.  */
13348 +_ACEOF
13349 +cat confdefs.h >>conftest.$ac_ext
13350 +cat >>conftest.$ac_ext <<_ACEOF
13351 +/* end confdefs.h.  */
13352 +/* System header to define __stub macros and hopefully few prototypes,
13353 +    which can conflict with char $ac_func (); below.
13354 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13355 +    <limits.h> exists even on freestanding compilers.  */
13356 +#ifdef __STDC__
13357 +# include <limits.h>
13358 +#else
13359 +# include <assert.h>
13360  #endif
13361 -EOF
13362 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13363 -  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13364 -  rm -rf conftest*
13365 -  ac_cv_type_pid_t=yes
13366 +/* Override any gcc2 internal prototype to avoid an error.  */
13367 +#ifdef __cplusplus
13368 +extern "C"
13369 +{
13370 +#endif
13371 +/* We use char because int might match the return type of a gcc2
13372 +   builtin and then its argument prototype would still apply.  */
13373 +char $ac_func ();
13374 +/* The GNU C library defines this for functions which it implements
13375 +    to always fail with ENOSYS.  Some functions are actually named
13376 +    something starting with __ and the normal name is an alias.  */
13377 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13378 +choke me
13379 +#else
13380 +char (*f) () = $ac_func;
13381 +#endif
13382 +#ifdef __cplusplus
13383 +}
13384 +#endif
13385 +
13386 +int
13387 +main ()
13388 +{
13389 +return f != $ac_func;
13390 +  ;
13391 +  return 0;
13392 +}
13393 +_ACEOF
13394 +rm -f conftest.$ac_objext conftest$ac_exeext
13395 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13396 +  (eval $ac_link) 2>&5
13397 +  ac_status=$?
13398 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 +  (exit $ac_status); } &&
13400 +         { ac_try='test -s conftest$ac_exeext'
13401 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402 +  (eval $ac_try) 2>&5
13403 +  ac_status=$?
13404 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 +  (exit $ac_status); }; }; then
13406 +  eval "$as_ac_var=yes"
13407  else
13408 -  rm -rf conftest*
13409 -  ac_cv_type_pid_t=no
13410 +  echo "$as_me: failed program was:" >&5
13411 +sed 's/^/| /' conftest.$ac_ext >&5
13412 +
13413 +eval "$as_ac_var=no"
13414  fi
13415 -rm -f conftest*
13416 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13417 +fi
13418 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13419 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13420 +if test `eval echo '${'$as_ac_var'}'` = yes; then
13421 +  cat >>confdefs.h <<_ACEOF
13422 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13423 +_ACEOF
13424  
13425  fi
13426 -echo "$ac_t""$ac_cv_type_pid_t" 1>&6
13427 -if test $ac_cv_type_pid_t = no; then
13428 -  cat >> confdefs.h <<\EOF
13429 -#define pid_t int
13430 -EOF
13431 +done
13432  
13433 +  echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13434 +echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13435 +if test "${ac_cv_have_decl_strerror+set}" = set; then
13436 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13437 +else
13438 +  cat >conftest.$ac_ext <<_ACEOF
13439 +#line $LINENO "configure"
13440 +/* confdefs.h.  */
13441 +_ACEOF
13442 +cat confdefs.h >>conftest.$ac_ext
13443 +cat >>conftest.$ac_ext <<_ACEOF
13444 +/* end confdefs.h.  */
13445 +$ac_includes_default
13446 +int
13447 +main ()
13448 +{
13449 +#ifndef strerror
13450 +  char *p = (char *) strerror;
13451 +#endif
13452 +
13453 +  ;
13454 +  return 0;
13455 +}
13456 +_ACEOF
13457 +rm -f conftest.$ac_objext
13458 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13459 +  (eval $ac_compile) 2>&5
13460 +  ac_status=$?
13461 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 +  (exit $ac_status); } &&
13463 +         { ac_try='test -s conftest.$ac_objext'
13464 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465 +  (eval $ac_try) 2>&5
13466 +  ac_status=$?
13467 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 +  (exit $ac_status); }; }; then
13469 +  ac_cv_have_decl_strerror=yes
13470 +else
13471 +  echo "$as_me: failed program was:" >&5
13472 +sed 's/^/| /' conftest.$ac_ext >&5
13473 +
13474 +ac_cv_have_decl_strerror=no
13475  fi
13476 +rm -f conftest.$ac_objext conftest.$ac_ext
13477 +fi
13478 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13479 +echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13480 +if test $ac_cv_have_decl_strerror = yes; then
13481 +
13482 +cat >>confdefs.h <<_ACEOF
13483 +#define HAVE_DECL_STRERROR 1
13484 +_ACEOF
13485 +
13486  
13487 -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
13488 -echo "configure:2202: checking return type of signal handlers" >&5
13489 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
13490 -  echo $ac_n "(cached) $ac_c" 1>&6
13491  else
13492 -  cat > conftest.$ac_ext <<EOF
13493 -#line 2207 "configure"
13494 -#include "confdefs.h"
13495 -#include <sys/types.h>
13496 -#include <signal.h>
13497 -#ifdef signal
13498 -#undef signal
13499 +  cat >>confdefs.h <<_ACEOF
13500 +#define HAVE_DECL_STRERROR 0
13501 +_ACEOF
13502 +
13503 +
13504 +fi
13505 +
13506 +
13507 +  echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
13508 +echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
13509 +if test "${ac_cv_have_decl_strerror_r+set}" = set; then
13510 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13511 +else
13512 +  cat >conftest.$ac_ext <<_ACEOF
13513 +#line $LINENO "configure"
13514 +/* confdefs.h.  */
13515 +_ACEOF
13516 +cat confdefs.h >>conftest.$ac_ext
13517 +cat >>conftest.$ac_ext <<_ACEOF
13518 +/* end confdefs.h.  */
13519 +$ac_includes_default
13520 +int
13521 +main ()
13522 +{
13523 +#ifndef strerror_r
13524 +  char *p = (char *) strerror_r;
13525 +#endif
13526 +
13527 +  ;
13528 +  return 0;
13529 +}
13530 +_ACEOF
13531 +rm -f conftest.$ac_objext
13532 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13533 +  (eval $ac_compile) 2>&5
13534 +  ac_status=$?
13535 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536 +  (exit $ac_status); } &&
13537 +         { ac_try='test -s conftest.$ac_objext'
13538 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13539 +  (eval $ac_try) 2>&5
13540 +  ac_status=$?
13541 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13542 +  (exit $ac_status); }; }; then
13543 +  ac_cv_have_decl_strerror_r=yes
13544 +else
13545 +  echo "$as_me: failed program was:" >&5
13546 +sed 's/^/| /' conftest.$ac_ext >&5
13547 +
13548 +ac_cv_have_decl_strerror_r=no
13549 +fi
13550 +rm -f conftest.$ac_objext conftest.$ac_ext
13551 +fi
13552 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
13553 +echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
13554 +if test $ac_cv_have_decl_strerror_r = yes; then
13555 +
13556 +cat >>confdefs.h <<_ACEOF
13557 +#define HAVE_DECL_STRERROR_R 1
13558 +_ACEOF
13559 +
13560 +
13561 +else
13562 +  cat >>confdefs.h <<_ACEOF
13563 +#define HAVE_DECL_STRERROR_R 0
13564 +_ACEOF
13565 +
13566 +
13567 +fi
13568 +
13569 +
13570 +
13571 +for ac_func in strerror_r
13572 +do
13573 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13574 +echo "$as_me:$LINENO: checking for $ac_func" >&5
13575 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13576 +if eval "test \"\${$as_ac_var+set}\" = set"; then
13577 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13578 +else
13579 +  cat >conftest.$ac_ext <<_ACEOF
13580 +#line $LINENO "configure"
13581 +/* confdefs.h.  */
13582 +_ACEOF
13583 +cat confdefs.h >>conftest.$ac_ext
13584 +cat >>conftest.$ac_ext <<_ACEOF
13585 +/* end confdefs.h.  */
13586 +/* System header to define __stub macros and hopefully few prototypes,
13587 +    which can conflict with char $ac_func (); below.
13588 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13589 +    <limits.h> exists even on freestanding compilers.  */
13590 +#ifdef __STDC__
13591 +# include <limits.h>
13592 +#else
13593 +# include <assert.h>
13594  #endif
13595 +/* Override any gcc2 internal prototype to avoid an error.  */
13596  #ifdef __cplusplus
13597 -extern "C" void (*signal (int, void (*)(int)))(int);
13598 +extern "C"
13599 +{
13600 +#endif
13601 +/* We use char because int might match the return type of a gcc2
13602 +   builtin and then its argument prototype would still apply.  */
13603 +char $ac_func ();
13604 +/* The GNU C library defines this for functions which it implements
13605 +    to always fail with ENOSYS.  Some functions are actually named
13606 +    something starting with __ and the normal name is an alias.  */
13607 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13608 +choke me
13609  #else
13610 -void (*signal ()) ();
13611 +char (*f) () = $ac_func;
13612 +#endif
13613 +#ifdef __cplusplus
13614 +}
13615  #endif
13616  
13617 -int main() {
13618 -int i;
13619 -; return 0; }
13620 -EOF
13621 -if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13622 -  rm -rf conftest*
13623 -  ac_cv_type_signal=void
13624 +int
13625 +main ()
13626 +{
13627 +return f != $ac_func;
13628 +  ;
13629 +  return 0;
13630 +}
13631 +_ACEOF
13632 +rm -f conftest.$ac_objext conftest$ac_exeext
13633 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13634 +  (eval $ac_link) 2>&5
13635 +  ac_status=$?
13636 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13637 +  (exit $ac_status); } &&
13638 +         { ac_try='test -s conftest$ac_exeext'
13639 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13640 +  (eval $ac_try) 2>&5
13641 +  ac_status=$?
13642 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643 +  (exit $ac_status); }; }; then
13644 +  eval "$as_ac_var=yes"
13645  else
13646 -  echo "configure: failed program was:" >&5
13647 -  cat conftest.$ac_ext >&5
13648 -  rm -rf conftest*
13649 -  ac_cv_type_signal=int
13650 +  echo "$as_me: failed program was:" >&5
13651 +sed 's/^/| /' conftest.$ac_ext >&5
13652 +
13653 +eval "$as_ac_var=no"
13654  fi
13655 -rm -f conftest*
13656 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13657  fi
13658 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13659 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13660 +if test `eval echo '${'$as_ac_var'}'` = yes; then
13661 +  cat >>confdefs.h <<_ACEOF
13662 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13663 +_ACEOF
13664  
13665 -echo "$ac_t""$ac_cv_type_signal" 1>&6
13666 -cat >> confdefs.h <<EOF
13667 -#define RETSIGTYPE $ac_cv_type_signal
13668 -EOF
13669 +fi
13670 +done
13671 +
13672 +echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
13673 +echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
13674 +if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
13675 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13676 +else
13677 +
13678 +    ac_cv_func_strerror_r_char_p=no
13679 +    if test $ac_cv_have_decl_strerror_r = yes; then
13680 +      cat >conftest.$ac_ext <<_ACEOF
13681 +#line $LINENO "configure"
13682 +/* confdefs.h.  */
13683 +_ACEOF
13684 +cat confdefs.h >>conftest.$ac_ext
13685 +cat >>conftest.$ac_ext <<_ACEOF
13686 +/* end confdefs.h.  */
13687 +$ac_includes_default
13688 +int
13689 +main ()
13690 +{
13691  
13692 +         char buf[100];
13693 +         char x = *strerror_r (0, buf, sizeof buf);
13694 +         char *p = strerror_r (0, buf, sizeof buf);
13695  
13696 -echo $ac_n "checking for size_t""... $ac_c" 1>&6
13697 -echo "configure:2243: checking for size_t" >&5
13698 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
13699 -  echo $ac_n "(cached) $ac_c" 1>&6
13700 +  ;
13701 +  return 0;
13702 +}
13703 +_ACEOF
13704 +rm -f conftest.$ac_objext
13705 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13706 +  (eval $ac_compile) 2>&5
13707 +  ac_status=$?
13708 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 +  (exit $ac_status); } &&
13710 +         { ac_try='test -s conftest.$ac_objext'
13711 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13712 +  (eval $ac_try) 2>&5
13713 +  ac_status=$?
13714 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715 +  (exit $ac_status); }; }; then
13716 +  ac_cv_func_strerror_r_char_p=yes
13717  else
13718 -  cat > conftest.$ac_ext <<EOF
13719 -#line 2248 "configure"
13720 -#include "confdefs.h"
13721 -#include <sys/types.h>
13722 -#if STDC_HEADERS
13723 -#include <stdlib.h>
13724 -#include <stddef.h>
13725 +  echo "$as_me: failed program was:" >&5
13726 +sed 's/^/| /' conftest.$ac_ext >&5
13727 +
13728 +fi
13729 +rm -f conftest.$ac_objext conftest.$ac_ext
13730 +    else
13731 +      # strerror_r is not declared.  Choose between
13732 +      # systems that have relatively inaccessible declarations for the
13733 +      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
13734 +      # former has a strerror_r that returns char*, while the latter
13735 +      # has a strerror_r that returns `int'.
13736 +      # This test should segfault on the DEC system.
13737 +      if test "$cross_compiling" = yes; then
13738 +  :
13739 +else
13740 +  cat >conftest.$ac_ext <<_ACEOF
13741 +#line $LINENO "configure"
13742 +/* confdefs.h.  */
13743 +_ACEOF
13744 +cat confdefs.h >>conftest.$ac_ext
13745 +cat >>conftest.$ac_ext <<_ACEOF
13746 +/* end confdefs.h.  */
13747 +$ac_includes_default
13748 +       extern char *strerror_r ();
13749 +int
13750 +main ()
13751 +{
13752 +char buf[100];
13753 +         char x = *strerror_r (0, buf, sizeof buf);
13754 +         exit (!isalpha (x));
13755 +  ;
13756 +  return 0;
13757 +}
13758 +_ACEOF
13759 +rm -f conftest$ac_exeext
13760 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13761 +  (eval $ac_link) 2>&5
13762 +  ac_status=$?
13763 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13765 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13766 +  (eval $ac_try) 2>&5
13767 +  ac_status=$?
13768 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769 +  (exit $ac_status); }; }; then
13770 +  ac_cv_func_strerror_r_char_p=yes
13771 +else
13772 +  echo "$as_me: program exited with status $ac_status" >&5
13773 +echo "$as_me: failed program was:" >&5
13774 +sed 's/^/| /' conftest.$ac_ext >&5
13775 +
13776 +fi
13777 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13778 +fi
13779 +    fi
13780 +
13781 +fi
13782 +echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
13783 +echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
13784 +if test $ac_cv_func_strerror_r_char_p = yes; then
13785 +
13786 +cat >>confdefs.h <<\_ACEOF
13787 +#define STRERROR_R_CHAR_P 1
13788 +_ACEOF
13789 +
13790 +fi
13791 +
13792 +
13793 +
13794 +
13795 +
13796 +for ac_func in memchr
13797 +do
13798 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13799 +echo "$as_me:$LINENO: checking for $ac_func" >&5
13800 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13801 +if eval "test \"\${$as_ac_var+set}\" = set"; then
13802 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13803 +else
13804 +  cat >conftest.$ac_ext <<_ACEOF
13805 +#line $LINENO "configure"
13806 +/* confdefs.h.  */
13807 +_ACEOF
13808 +cat confdefs.h >>conftest.$ac_ext
13809 +cat >>conftest.$ac_ext <<_ACEOF
13810 +/* end confdefs.h.  */
13811 +/* System header to define __stub macros and hopefully few prototypes,
13812 +    which can conflict with char $ac_func (); below.
13813 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13814 +    <limits.h> exists even on freestanding compilers.  */
13815 +#ifdef __STDC__
13816 +# include <limits.h>
13817 +#else
13818 +# include <assert.h>
13819  #endif
13820 -EOF
13821 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13822 -  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
13823 -  rm -rf conftest*
13824 -  ac_cv_type_size_t=yes
13825 +/* Override any gcc2 internal prototype to avoid an error.  */
13826 +#ifdef __cplusplus
13827 +extern "C"
13828 +{
13829 +#endif
13830 +/* We use char because int might match the return type of a gcc2
13831 +   builtin and then its argument prototype would still apply.  */
13832 +char $ac_func ();
13833 +/* The GNU C library defines this for functions which it implements
13834 +    to always fail with ENOSYS.  Some functions are actually named
13835 +    something starting with __ and the normal name is an alias.  */
13836 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13837 +choke me
13838 +#else
13839 +char (*f) () = $ac_func;
13840 +#endif
13841 +#ifdef __cplusplus
13842 +}
13843 +#endif
13844 +
13845 +int
13846 +main ()
13847 +{
13848 +return f != $ac_func;
13849 +  ;
13850 +  return 0;
13851 +}
13852 +_ACEOF
13853 +rm -f conftest.$ac_objext conftest$ac_exeext
13854 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13855 +  (eval $ac_link) 2>&5
13856 +  ac_status=$?
13857 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13858 +  (exit $ac_status); } &&
13859 +         { ac_try='test -s conftest$ac_exeext'
13860 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13861 +  (eval $ac_try) 2>&5
13862 +  ac_status=$?
13863 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864 +  (exit $ac_status); }; }; then
13865 +  eval "$as_ac_var=yes"
13866  else
13867 -  rm -rf conftest*
13868 -  ac_cv_type_size_t=no
13869 +  echo "$as_me: failed program was:" >&5
13870 +sed 's/^/| /' conftest.$ac_ext >&5
13871 +
13872 +eval "$as_ac_var=no"
13873  fi
13874 -rm -f conftest*
13875 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13876 +fi
13877 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13878 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13879 +if test `eval echo '${'$as_ac_var'}'` = yes; then
13880 +  cat >>confdefs.h <<_ACEOF
13881 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13882 +_ACEOF
13883  
13884 +else
13885 +  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
13886  fi
13887 -echo "$ac_t""$ac_cv_type_size_t" 1>&6
13888 -if test $ac_cv_type_size_t = no; then
13889 -  cat >> confdefs.h <<\EOF
13890 -#define size_t unsigned
13891 -EOF
13892 +done
13893 +
13894 +
13895 +  if test $ac_cv_func_memchr = no; then
13896 +
13897 +
13898 +  :
13899 +
13900 +
13901 +
13902 +
13903 +
13904 +
13905 +
13906 +
13907 +
13908 +for ac_header in bp-sym.h
13909 +do
13910 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13911 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
13912 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
13913 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13914 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
13915 +  echo $ECHO_N "(cached) $ECHO_C" >&6
13916 +fi
13917 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13918 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13919 +else
13920 +  # Is the header compilable?
13921 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
13922 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13923 +cat >conftest.$ac_ext <<_ACEOF
13924 +#line $LINENO "configure"
13925 +/* confdefs.h.  */
13926 +_ACEOF
13927 +cat confdefs.h >>conftest.$ac_ext
13928 +cat >>conftest.$ac_ext <<_ACEOF
13929 +/* end confdefs.h.  */
13930 +$ac_includes_default
13931 +#include <$ac_header>
13932 +_ACEOF
13933 +rm -f conftest.$ac_objext
13934 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13935 +  (eval $ac_compile) 2>&5
13936 +  ac_status=$?
13937 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 +  (exit $ac_status); } &&
13939 +         { ac_try='test -s conftest.$ac_objext'
13940 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941 +  (eval $ac_try) 2>&5
13942 +  ac_status=$?
13943 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 +  (exit $ac_status); }; }; then
13945 +  ac_header_compiler=yes
13946 +else
13947 +  echo "$as_me: failed program was:" >&5
13948 +sed 's/^/| /' conftest.$ac_ext >&5
13949  
13950 +ac_header_compiler=no
13951  fi
13952 +rm -f conftest.$ac_objext conftest.$ac_ext
13953 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13954 +echo "${ECHO_T}$ac_header_compiler" >&6
13955  
13956 -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
13957 -echo "configure:2276: checking whether time.h and sys/time.h may both be included" >&5
13958 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
13959 -  echo $ac_n "(cached) $ac_c" 1>&6
13960 +# Is the header present?
13961 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
13962 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13963 +cat >conftest.$ac_ext <<_ACEOF
13964 +#line $LINENO "configure"
13965 +/* confdefs.h.  */
13966 +_ACEOF
13967 +cat confdefs.h >>conftest.$ac_ext
13968 +cat >>conftest.$ac_ext <<_ACEOF
13969 +/* end confdefs.h.  */
13970 +#include <$ac_header>
13971 +_ACEOF
13972 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13973 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13974 +  ac_status=$?
13975 +  grep -v '^ *+' conftest.er1 >conftest.err
13976 +  rm -f conftest.er1
13977 +  cat conftest.err >&5
13978 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979 +  (exit $ac_status); } >/dev/null; then
13980 +  if test -s conftest.err; then
13981 +    ac_cpp_err=$ac_c_preproc_warn_flag
13982 +  else
13983 +    ac_cpp_err=
13984 +  fi
13985  else
13986 -  cat > conftest.$ac_ext <<EOF
13987 -#line 2281 "configure"
13988 -#include "confdefs.h"
13989 +  ac_cpp_err=yes
13990 +fi
13991 +if test -z "$ac_cpp_err"; then
13992 +  ac_header_preproc=yes
13993 +else
13994 +  echo "$as_me: failed program was:" >&5
13995 +sed 's/^/| /' conftest.$ac_ext >&5
13996 +
13997 +  ac_header_preproc=no
13998 +fi
13999 +rm -f conftest.err conftest.$ac_ext
14000 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14001 +echo "${ECHO_T}$ac_header_preproc" >&6
14002 +
14003 +# So?  What about this header?
14004 +case $ac_header_compiler:$ac_header_preproc in
14005 +  yes:no )
14006 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14007 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14008 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14009 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14010 +    (
14011 +      cat <<\_ASBOX
14012 +## ------------------------------------ ##
14013 +## Report this to bug-autoconf@gnu.org. ##
14014 +## ------------------------------------ ##
14015 +_ASBOX
14016 +    ) |
14017 +      sed "s/^/$as_me: WARNING:     /" >&2
14018 +    ;;
14019 +  no:yes )
14020 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14021 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14022 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14023 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14024 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14025 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14026 +    (
14027 +      cat <<\_ASBOX
14028 +## ------------------------------------ ##
14029 +## Report this to bug-autoconf@gnu.org. ##
14030 +## ------------------------------------ ##
14031 +_ASBOX
14032 +    ) |
14033 +      sed "s/^/$as_me: WARNING:     /" >&2
14034 +    ;;
14035 +esac
14036 +echo "$as_me:$LINENO: checking for $ac_header" >&5
14037 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14038 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14039 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14040 +else
14041 +  eval "$as_ac_Header=$ac_header_preproc"
14042 +fi
14043 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14044 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14045 +
14046 +fi
14047 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
14048 +  cat >>confdefs.h <<_ACEOF
14049 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14050 +_ACEOF
14051 +
14052 +fi
14053 +
14054 +done
14055 +
14056 +
14057 +  fi
14058 +
14059 +echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
14060 +echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
14061 +if test "${ac_cv_header_stat_broken+set}" = set; then
14062 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14063 +else
14064 +  cat >conftest.$ac_ext <<_ACEOF
14065 +#line $LINENO "configure"
14066 +/* confdefs.h.  */
14067 +_ACEOF
14068 +cat confdefs.h >>conftest.$ac_ext
14069 +cat >>conftest.$ac_ext <<_ACEOF
14070 +/* end confdefs.h.  */
14071  #include <sys/types.h>
14072 -#include <sys/time.h>
14073 -#include <time.h>
14074 -int main() {
14075 -struct tm *tp;
14076 -; return 0; }
14077 -EOF
14078 -if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14079 -  rm -rf conftest*
14080 -  ac_cv_header_time=yes
14081 +#include <sys/stat.h>
14082 +
14083 +#if defined(S_ISBLK) && defined(S_IFDIR)
14084 +# if S_ISBLK (S_IFDIR)
14085 +You lose.
14086 +# endif
14087 +#endif
14088 +
14089 +#if defined(S_ISBLK) && defined(S_IFCHR)
14090 +# if S_ISBLK (S_IFCHR)
14091 +You lose.
14092 +# endif
14093 +#endif
14094 +
14095 +#if defined(S_ISLNK) && defined(S_IFREG)
14096 +# if S_ISLNK (S_IFREG)
14097 +You lose.
14098 +# endif
14099 +#endif
14100 +
14101 +#if defined(S_ISSOCK) && defined(S_IFREG)
14102 +# if S_ISSOCK (S_IFREG)
14103 +You lose.
14104 +# endif
14105 +#endif
14106 +
14107 +_ACEOF
14108 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14109 +  $EGREP "You lose" >/dev/null 2>&1; then
14110 +  ac_cv_header_stat_broken=yes
14111  else
14112 -  echo "configure: failed program was:" >&5
14113 -  cat conftest.$ac_ext >&5
14114 -  rm -rf conftest*
14115 -  ac_cv_header_time=no
14116 +  ac_cv_header_stat_broken=no
14117  fi
14118  rm -f conftest*
14119 +
14120  fi
14121 +echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
14122 +echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
14123 +if test $ac_cv_header_stat_broken = yes; then
14124  
14125 -echo "$ac_t""$ac_cv_header_time" 1>&6
14126 -if test $ac_cv_header_time = yes; then
14127 -  cat >> confdefs.h <<\EOF
14128 -#define TIME_WITH_SYS_TIME 1
14129 -EOF
14130 +cat >>confdefs.h <<\_ACEOF
14131 +#define STAT_MACROS_BROKEN 1
14132 +_ACEOF
14133  
14134  fi
14135  
14136  
14137 -  for ac_hdr in utime.h
14138 +
14139 +for ac_func in rmdir
14140  do
14141 -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14142 -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14143 -echo "configure:2315: checking for $ac_hdr" >&5
14144 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
14145 -  echo $ac_n "(cached) $ac_c" 1>&6
14146 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14147 +echo "$as_me:$LINENO: checking for $ac_func" >&5
14148 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14149 +if eval "test \"\${$as_ac_var+set}\" = set"; then
14150 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14151  else
14152 -  cat > conftest.$ac_ext <<EOF
14153 -#line 2320 "configure"
14154 -#include "confdefs.h"
14155 -#include <$ac_hdr>
14156 -EOF
14157 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14158 -{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14159 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14160 -if test -z "$ac_err"; then
14161 -  rm -rf conftest*
14162 -  eval "ac_cv_header_$ac_safe=yes"
14163 +  cat >conftest.$ac_ext <<_ACEOF
14164 +#line $LINENO "configure"
14165 +/* confdefs.h.  */
14166 +_ACEOF
14167 +cat confdefs.h >>conftest.$ac_ext
14168 +cat >>conftest.$ac_ext <<_ACEOF
14169 +/* end confdefs.h.  */
14170 +/* System header to define __stub macros and hopefully few prototypes,
14171 +    which can conflict with char $ac_func (); below.
14172 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14173 +    <limits.h> exists even on freestanding compilers.  */
14174 +#ifdef __STDC__
14175 +# include <limits.h>
14176 +#else
14177 +# include <assert.h>
14178 +#endif
14179 +/* Override any gcc2 internal prototype to avoid an error.  */
14180 +#ifdef __cplusplus
14181 +extern "C"
14182 +{
14183 +#endif
14184 +/* We use char because int might match the return type of a gcc2
14185 +   builtin and then its argument prototype would still apply.  */
14186 +char $ac_func ();
14187 +/* The GNU C library defines this for functions which it implements
14188 +    to always fail with ENOSYS.  Some functions are actually named
14189 +    something starting with __ and the normal name is an alias.  */
14190 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14191 +choke me
14192 +#else
14193 +char (*f) () = $ac_func;
14194 +#endif
14195 +#ifdef __cplusplus
14196 +}
14197 +#endif
14198 +
14199 +int
14200 +main ()
14201 +{
14202 +return f != $ac_func;
14203 +  ;
14204 +  return 0;
14205 +}
14206 +_ACEOF
14207 +rm -f conftest.$ac_objext conftest$ac_exeext
14208 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14209 +  (eval $ac_link) 2>&5
14210 +  ac_status=$?
14211 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212 +  (exit $ac_status); } &&
14213 +         { ac_try='test -s conftest$ac_exeext'
14214 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215 +  (eval $ac_try) 2>&5
14216 +  ac_status=$?
14217 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 +  (exit $ac_status); }; }; then
14219 +  eval "$as_ac_var=yes"
14220  else
14221 -  echo "$ac_err" >&5
14222 -  echo "configure: failed program was:" >&5
14223 -  cat conftest.$ac_ext >&5
14224 -  rm -rf conftest*
14225 -  eval "ac_cv_header_$ac_safe=no"
14226 +  echo "$as_me: failed program was:" >&5
14227 +sed 's/^/| /' conftest.$ac_ext >&5
14228 +
14229 +eval "$as_ac_var=no"
14230  fi
14231 -rm -f conftest*
14232 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14233  fi
14234 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14235 -  echo "$ac_t""yes" 1>&6
14236 -    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14237 -  cat >> confdefs.h <<EOF
14238 -#define $ac_tr_hdr 1
14239 -EOF
14240
14241 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14242 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14243 +if test `eval echo '${'$as_ac_var'}'` = yes; then
14244 +  cat >>confdefs.h <<_ACEOF
14245 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14246 +_ACEOF
14247 +
14248  else
14249 -  echo "$ac_t""no" 1>&6
14250 +  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
14251  fi
14252  done
14253  
14254 -  
14255 -  echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
14256 -echo "configure:2353: checking for struct utimbuf" >&5
14257 -if eval "test \"`echo '$''{'fu_cv_sys_struct_utimbuf'+set}'`\" = set"; then
14258 -  echo $ac_n "(cached) $ac_c" 1>&6
14259 +
14260 +  if test $ac_cv_func_rmdir = no; then
14261 +
14262 +
14263 +  :
14264 +
14265 +  fi
14266 +
14267 +
14268 +
14269 +  :
14270 +
14271 +
14272 +
14273 +
14274 +
14275 +
14276 +
14277 +for ac_header in stdlib.h
14278 +do
14279 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14280 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14281 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
14282 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14283 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14284 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14285 +fi
14286 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14287 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14288  else
14289 -  cat > conftest.$ac_ext <<EOF
14290 -#line 2358 "configure"
14291 -#include "confdefs.h"
14292 +  # Is the header compilable?
14293 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
14294 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14295 +cat >conftest.$ac_ext <<_ACEOF
14296 +#line $LINENO "configure"
14297 +/* confdefs.h.  */
14298 +_ACEOF
14299 +cat confdefs.h >>conftest.$ac_ext
14300 +cat >>conftest.$ac_ext <<_ACEOF
14301 +/* end confdefs.h.  */
14302 +$ac_includes_default
14303 +#include <$ac_header>
14304 +_ACEOF
14305 +rm -f conftest.$ac_objext
14306 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14307 +  (eval $ac_compile) 2>&5
14308 +  ac_status=$?
14309 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 +  (exit $ac_status); } &&
14311 +         { ac_try='test -s conftest.$ac_objext'
14312 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14313 +  (eval $ac_try) 2>&5
14314 +  ac_status=$?
14315 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316 +  (exit $ac_status); }; }; then
14317 +  ac_header_compiler=yes
14318 +else
14319 +  echo "$as_me: failed program was:" >&5
14320 +sed 's/^/| /' conftest.$ac_ext >&5
14321  
14322 -#ifdef TIME_WITH_SYS_TIME
14323 -# include <sys/time.h>
14324 -# include <time.h>
14325 +ac_header_compiler=no
14326 +fi
14327 +rm -f conftest.$ac_objext conftest.$ac_ext
14328 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14329 +echo "${ECHO_T}$ac_header_compiler" >&6
14330 +
14331 +# Is the header present?
14332 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
14333 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14334 +cat >conftest.$ac_ext <<_ACEOF
14335 +#line $LINENO "configure"
14336 +/* confdefs.h.  */
14337 +_ACEOF
14338 +cat confdefs.h >>conftest.$ac_ext
14339 +cat >>conftest.$ac_ext <<_ACEOF
14340 +/* end confdefs.h.  */
14341 +#include <$ac_header>
14342 +_ACEOF
14343 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14344 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14345 +  ac_status=$?
14346 +  grep -v '^ *+' conftest.er1 >conftest.err
14347 +  rm -f conftest.er1
14348 +  cat conftest.err >&5
14349 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350 +  (exit $ac_status); } >/dev/null; then
14351 +  if test -s conftest.err; then
14352 +    ac_cpp_err=$ac_c_preproc_warn_flag
14353 +  else
14354 +    ac_cpp_err=
14355 +  fi
14356 +else
14357 +  ac_cpp_err=yes
14358 +fi
14359 +if test -z "$ac_cpp_err"; then
14360 +  ac_header_preproc=yes
14361 +else
14362 +  echo "$as_me: failed program was:" >&5
14363 +sed 's/^/| /' conftest.$ac_ext >&5
14364 +
14365 +  ac_header_preproc=no
14366 +fi
14367 +rm -f conftest.err conftest.$ac_ext
14368 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14369 +echo "${ECHO_T}$ac_header_preproc" >&6
14370 +
14371 +# So?  What about this header?
14372 +case $ac_header_compiler:$ac_header_preproc in
14373 +  yes:no )
14374 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14375 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14376 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14377 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14378 +    (
14379 +      cat <<\_ASBOX
14380 +## ------------------------------------ ##
14381 +## Report this to bug-autoconf@gnu.org. ##
14382 +## ------------------------------------ ##
14383 +_ASBOX
14384 +    ) |
14385 +      sed "s/^/$as_me: WARNING:     /" >&2
14386 +    ;;
14387 +  no:yes )
14388 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14389 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14390 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14391 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14392 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14393 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14394 +    (
14395 +      cat <<\_ASBOX
14396 +## ------------------------------------ ##
14397 +## Report this to bug-autoconf@gnu.org. ##
14398 +## ------------------------------------ ##
14399 +_ASBOX
14400 +    ) |
14401 +      sed "s/^/$as_me: WARNING:     /" >&2
14402 +    ;;
14403 +esac
14404 +echo "$as_me:$LINENO: checking for $ac_header" >&5
14405 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14406 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14407 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14408 +else
14409 +  eval "$as_ac_Header=$ac_header_preproc"
14410 +fi
14411 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14412 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14413 +
14414 +fi
14415 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
14416 +  cat >>confdefs.h <<_ACEOF
14417 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14418 +_ACEOF
14419 +
14420 +fi
14421 +
14422 +done
14423 +
14424 +echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
14425 +echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
14426 +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
14427 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14428 +else
14429 +  if test "$cross_compiling" = yes; then
14430 +  ac_cv_func_malloc_0_nonnull=no
14431 +else
14432 +  cat >conftest.$ac_ext <<_ACEOF
14433 +#line $LINENO "configure"
14434 +/* confdefs.h.  */
14435 +_ACEOF
14436 +cat confdefs.h >>conftest.$ac_ext
14437 +cat >>conftest.$ac_ext <<_ACEOF
14438 +/* end confdefs.h.  */
14439 +#if STDC_HEADERS || HAVE_STDLIB_H
14440 +# include <stdlib.h>
14441  #else
14442 -# ifdef HAVE_SYS_TIME_H
14443 -#  include <sys/time.h>
14444 -# else
14445 -#  include <time.h>
14446 -# endif
14447 +char *malloc ();
14448  #endif
14449 -#ifdef HAVE_UTIME_H
14450 -# include <utime.h>
14451 +
14452 +int
14453 +main ()
14454 +{
14455 +exit (malloc (0) ? 0 : 1);
14456 +  ;
14457 +  return 0;
14458 +}
14459 +_ACEOF
14460 +rm -f conftest$ac_exeext
14461 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14462 +  (eval $ac_link) 2>&5
14463 +  ac_status=$?
14464 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14466 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14467 +  (eval $ac_try) 2>&5
14468 +  ac_status=$?
14469 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 +  (exit $ac_status); }; }; then
14471 +  ac_cv_func_malloc_0_nonnull=yes
14472 +else
14473 +  echo "$as_me: program exited with status $ac_status" >&5
14474 +echo "$as_me: failed program was:" >&5
14475 +sed 's/^/| /' conftest.$ac_ext >&5
14476 +
14477 +( exit $ac_status )
14478 +ac_cv_func_malloc_0_nonnull=no
14479 +fi
14480 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14481 +fi
14482 +fi
14483 +echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
14484 +echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
14485 +if test $ac_cv_func_malloc_0_nonnull = yes; then
14486 +
14487 +cat >>confdefs.h <<\_ACEOF
14488 +#define HAVE_MALLOC 1
14489 +_ACEOF
14490 +
14491 +else
14492 +  cat >>confdefs.h <<\_ACEOF
14493 +#define HAVE_MALLOC 0
14494 +_ACEOF
14495 +
14496 +   LIBOBJS="$LIBOBJS malloc.$ac_objext"
14497 +
14498 +cat >>confdefs.h <<\_ACEOF
14499 +#define malloc rpl_malloc
14500 +_ACEOF
14501 +
14502 +fi
14503 +
14504 +
14505 +
14506 +
14507 +
14508 +    if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
14509 +
14510 +  :
14511 +
14512 +  fi
14513 +
14514 +
14515 +for ac_header in stdlib.h
14516 +do
14517 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14518 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14519 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
14520 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14521 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14522 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14523 +fi
14524 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14525 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14526 +else
14527 +  # Is the header compilable?
14528 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
14529 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14530 +cat >conftest.$ac_ext <<_ACEOF
14531 +#line $LINENO "configure"
14532 +/* confdefs.h.  */
14533 +_ACEOF
14534 +cat confdefs.h >>conftest.$ac_ext
14535 +cat >>conftest.$ac_ext <<_ACEOF
14536 +/* end confdefs.h.  */
14537 +$ac_includes_default
14538 +#include <$ac_header>
14539 +_ACEOF
14540 +rm -f conftest.$ac_objext
14541 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14542 +  (eval $ac_compile) 2>&5
14543 +  ac_status=$?
14544 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 +  (exit $ac_status); } &&
14546 +         { ac_try='test -s conftest.$ac_objext'
14547 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14548 +  (eval $ac_try) 2>&5
14549 +  ac_status=$?
14550 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 +  (exit $ac_status); }; }; then
14552 +  ac_header_compiler=yes
14553 +else
14554 +  echo "$as_me: failed program was:" >&5
14555 +sed 's/^/| /' conftest.$ac_ext >&5
14556 +
14557 +ac_header_compiler=no
14558 +fi
14559 +rm -f conftest.$ac_objext conftest.$ac_ext
14560 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14561 +echo "${ECHO_T}$ac_header_compiler" >&6
14562 +
14563 +# Is the header present?
14564 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
14565 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14566 +cat >conftest.$ac_ext <<_ACEOF
14567 +#line $LINENO "configure"
14568 +/* confdefs.h.  */
14569 +_ACEOF
14570 +cat confdefs.h >>conftest.$ac_ext
14571 +cat >>conftest.$ac_ext <<_ACEOF
14572 +/* end confdefs.h.  */
14573 +#include <$ac_header>
14574 +_ACEOF
14575 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14576 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14577 +  ac_status=$?
14578 +  grep -v '^ *+' conftest.er1 >conftest.err
14579 +  rm -f conftest.er1
14580 +  cat conftest.err >&5
14581 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 +  (exit $ac_status); } >/dev/null; then
14583 +  if test -s conftest.err; then
14584 +    ac_cpp_err=$ac_c_preproc_warn_flag
14585 +  else
14586 +    ac_cpp_err=
14587 +  fi
14588 +else
14589 +  ac_cpp_err=yes
14590 +fi
14591 +if test -z "$ac_cpp_err"; then
14592 +  ac_header_preproc=yes
14593 +else
14594 +  echo "$as_me: failed program was:" >&5
14595 +sed 's/^/| /' conftest.$ac_ext >&5
14596 +
14597 +  ac_header_preproc=no
14598 +fi
14599 +rm -f conftest.err conftest.$ac_ext
14600 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14601 +echo "${ECHO_T}$ac_header_preproc" >&6
14602 +
14603 +# So?  What about this header?
14604 +case $ac_header_compiler:$ac_header_preproc in
14605 +  yes:no )
14606 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14607 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14608 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14609 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14610 +    (
14611 +      cat <<\_ASBOX
14612 +## ------------------------------------ ##
14613 +## Report this to bug-autoconf@gnu.org. ##
14614 +## ------------------------------------ ##
14615 +_ASBOX
14616 +    ) |
14617 +      sed "s/^/$as_me: WARNING:     /" >&2
14618 +    ;;
14619 +  no:yes )
14620 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14621 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14622 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14623 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14624 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14625 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14626 +    (
14627 +      cat <<\_ASBOX
14628 +## ------------------------------------ ##
14629 +## Report this to bug-autoconf@gnu.org. ##
14630 +## ------------------------------------ ##
14631 +_ASBOX
14632 +    ) |
14633 +      sed "s/^/$as_me: WARNING:     /" >&2
14634 +    ;;
14635 +esac
14636 +echo "$as_me:$LINENO: checking for $ac_header" >&5
14637 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14638 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14639 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14640 +else
14641 +  eval "$as_ac_Header=$ac_header_preproc"
14642 +fi
14643 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14644 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14645 +
14646 +fi
14647 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
14648 +  cat >>confdefs.h <<_ACEOF
14649 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14650 +_ACEOF
14651 +
14652 +fi
14653 +
14654 +done
14655 +
14656 +echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
14657 +echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6
14658 +if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
14659 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14660 +else
14661 +  if test "$cross_compiling" = yes; then
14662 +  ac_cv_func_realloc_0_nonnull=no
14663 +else
14664 +  cat >conftest.$ac_ext <<_ACEOF
14665 +#line $LINENO "configure"
14666 +/* confdefs.h.  */
14667 +_ACEOF
14668 +cat confdefs.h >>conftest.$ac_ext
14669 +cat >>conftest.$ac_ext <<_ACEOF
14670 +/* end confdefs.h.  */
14671 +#if STDC_HEADERS || HAVE_STDLIB_H
14672 +# include <stdlib.h>
14673 +#else
14674 +char *realloc ();
14675  #endif
14676 -      
14677 -int main() {
14678 -static struct utimbuf x; x.actime = x.modtime;
14679 -; return 0; }
14680 -EOF
14681 -if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14682 -  rm -rf conftest*
14683 -  fu_cv_sys_struct_utimbuf=yes
14684 +
14685 +int
14686 +main ()
14687 +{
14688 +exit (realloc (0, 0) ? 0 : 1);
14689 +  ;
14690 +  return 0;
14691 +}
14692 +_ACEOF
14693 +rm -f conftest$ac_exeext
14694 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14695 +  (eval $ac_link) 2>&5
14696 +  ac_status=$?
14697 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14699 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14700 +  (eval $ac_try) 2>&5
14701 +  ac_status=$?
14702 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14703 +  (exit $ac_status); }; }; then
14704 +  ac_cv_func_realloc_0_nonnull=yes
14705  else
14706 -  echo "configure: failed program was:" >&5
14707 -  cat conftest.$ac_ext >&5
14708 -  rm -rf conftest*
14709 -  fu_cv_sys_struct_utimbuf=no
14710 +  echo "$as_me: program exited with status $ac_status" >&5
14711 +echo "$as_me: failed program was:" >&5
14712 +sed 's/^/| /' conftest.$ac_ext >&5
14713 +
14714 +( exit $ac_status )
14715 +ac_cv_func_realloc_0_nonnull=no
14716  fi
14717 -rm -f conftest*
14718 -    
14719 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14720 +fi
14721 +fi
14722 +echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
14723 +echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6
14724 +if test $ac_cv_func_realloc_0_nonnull = yes; then
14725 +
14726 +cat >>confdefs.h <<\_ACEOF
14727 +#define HAVE_REALLOC 1
14728 +_ACEOF
14729 +
14730 +else
14731 +  cat >>confdefs.h <<\_ACEOF
14732 +#define HAVE_REALLOC 0
14733 +_ACEOF
14734 +
14735 +   LIBOBJS="$LIBOBJS realloc.$ac_objext"
14736 +
14737 +cat >>confdefs.h <<\_ACEOF
14738 +#define realloc rpl_realloc
14739 +_ACEOF
14740 +
14741  fi
14742  
14743 -echo "$ac_t""$fu_cv_sys_struct_utimbuf" 1>&6
14744  
14745 -  if test $fu_cv_sys_struct_utimbuf = yes; then
14746 -    cat >> confdefs.h <<EOF
14747 -#define HAVE_STRUCT_UTIMBUF 1
14748 -EOF
14749 +
14750 +
14751 +
14752 +    if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
14753 +
14754 +  :
14755  
14756    fi
14757  
14758  
14759 -echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
14760 -echo "configure:2403: checking for getopt_long" >&5
14761 -if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
14762 -  echo $ac_n "(cached) $ac_c" 1>&6
14763 +
14764 +
14765 +
14766 +
14767 +
14768 +
14769 +for ac_header in stddef.h
14770 +do
14771 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14772 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14773 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
14774 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14775 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14776 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14777 +fi
14778 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14779 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14780  else
14781 -  cat > conftest.$ac_ext <<EOF
14782 -#line 2408 "configure"
14783 -#include "confdefs.h"
14784 +  # Is the header compilable?
14785 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
14786 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14787 +cat >conftest.$ac_ext <<_ACEOF
14788 +#line $LINENO "configure"
14789 +/* confdefs.h.  */
14790 +_ACEOF
14791 +cat confdefs.h >>conftest.$ac_ext
14792 +cat >>conftest.$ac_ext <<_ACEOF
14793 +/* end confdefs.h.  */
14794 +$ac_includes_default
14795 +#include <$ac_header>
14796 +_ACEOF
14797 +rm -f conftest.$ac_objext
14798 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799 +  (eval $ac_compile) 2>&5
14800 +  ac_status=$?
14801 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 +  (exit $ac_status); } &&
14803 +         { ac_try='test -s conftest.$ac_objext'
14804 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805 +  (eval $ac_try) 2>&5
14806 +  ac_status=$?
14807 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 +  (exit $ac_status); }; }; then
14809 +  ac_header_compiler=yes
14810 +else
14811 +  echo "$as_me: failed program was:" >&5
14812 +sed 's/^/| /' conftest.$ac_ext >&5
14813 +
14814 +ac_header_compiler=no
14815 +fi
14816 +rm -f conftest.$ac_objext conftest.$ac_ext
14817 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14818 +echo "${ECHO_T}$ac_header_compiler" >&6
14819 +
14820 +# Is the header present?
14821 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
14822 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14823 +cat >conftest.$ac_ext <<_ACEOF
14824 +#line $LINENO "configure"
14825 +/* confdefs.h.  */
14826 +_ACEOF
14827 +cat confdefs.h >>conftest.$ac_ext
14828 +cat >>conftest.$ac_ext <<_ACEOF
14829 +/* end confdefs.h.  */
14830 +#include <$ac_header>
14831 +_ACEOF
14832 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14833 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14834 +  ac_status=$?
14835 +  grep -v '^ *+' conftest.er1 >conftest.err
14836 +  rm -f conftest.er1
14837 +  cat conftest.err >&5
14838 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14839 +  (exit $ac_status); } >/dev/null; then
14840 +  if test -s conftest.err; then
14841 +    ac_cpp_err=$ac_c_preproc_warn_flag
14842 +  else
14843 +    ac_cpp_err=
14844 +  fi
14845 +else
14846 +  ac_cpp_err=yes
14847 +fi
14848 +if test -z "$ac_cpp_err"; then
14849 +  ac_header_preproc=yes
14850 +else
14851 +  echo "$as_me: failed program was:" >&5
14852 +sed 's/^/| /' conftest.$ac_ext >&5
14853 +
14854 +  ac_header_preproc=no
14855 +fi
14856 +rm -f conftest.err conftest.$ac_ext
14857 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14858 +echo "${ECHO_T}$ac_header_preproc" >&6
14859 +
14860 +# So?  What about this header?
14861 +case $ac_header_compiler:$ac_header_preproc in
14862 +  yes:no )
14863 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14864 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14865 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14866 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14867 +    (
14868 +      cat <<\_ASBOX
14869 +## ------------------------------------ ##
14870 +## Report this to bug-autoconf@gnu.org. ##
14871 +## ------------------------------------ ##
14872 +_ASBOX
14873 +    ) |
14874 +      sed "s/^/$as_me: WARNING:     /" >&2
14875 +    ;;
14876 +  no:yes )
14877 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14878 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14879 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14880 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14881 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14882 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14883 +    (
14884 +      cat <<\_ASBOX
14885 +## ------------------------------------ ##
14886 +## Report this to bug-autoconf@gnu.org. ##
14887 +## ------------------------------------ ##
14888 +_ASBOX
14889 +    ) |
14890 +      sed "s/^/$as_me: WARNING:     /" >&2
14891 +    ;;
14892 +esac
14893 +echo "$as_me:$LINENO: checking for $ac_header" >&5
14894 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14895 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14896 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14897 +else
14898 +  eval "$as_ac_Header=$ac_header_preproc"
14899 +fi
14900 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14901 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14902 +
14903 +fi
14904 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
14905 +  cat >>confdefs.h <<_ACEOF
14906 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14907 +_ACEOF
14908 +
14909 +fi
14910 +
14911 +done
14912 +
14913 +
14914 +
14915 +
14916 +  :
14917 +
14918 +
14919 +
14920 +
14921 +
14922 +
14923 +
14924 +
14925 +for ac_header in wchar.h
14926 +do
14927 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14928 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14929 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
14930 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14931 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
14932 +  echo $ECHO_N "(cached) $ECHO_C" >&6
14933 +fi
14934 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14935 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14936 +else
14937 +  # Is the header compilable?
14938 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
14939 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14940 +cat >conftest.$ac_ext <<_ACEOF
14941 +#line $LINENO "configure"
14942 +/* confdefs.h.  */
14943 +_ACEOF
14944 +cat confdefs.h >>conftest.$ac_ext
14945 +cat >>conftest.$ac_ext <<_ACEOF
14946 +/* end confdefs.h.  */
14947 +$ac_includes_default
14948 +#include <$ac_header>
14949 +_ACEOF
14950 +rm -f conftest.$ac_objext
14951 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14952 +  (eval $ac_compile) 2>&5
14953 +  ac_status=$?
14954 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14955 +  (exit $ac_status); } &&
14956 +         { ac_try='test -s conftest.$ac_objext'
14957 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14958 +  (eval $ac_try) 2>&5
14959 +  ac_status=$?
14960 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961 +  (exit $ac_status); }; }; then
14962 +  ac_header_compiler=yes
14963 +else
14964 +  echo "$as_me: failed program was:" >&5
14965 +sed 's/^/| /' conftest.$ac_ext >&5
14966 +
14967 +ac_header_compiler=no
14968 +fi
14969 +rm -f conftest.$ac_objext conftest.$ac_ext
14970 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14971 +echo "${ECHO_T}$ac_header_compiler" >&6
14972 +
14973 +# Is the header present?
14974 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
14975 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14976 +cat >conftest.$ac_ext <<_ACEOF
14977 +#line $LINENO "configure"
14978 +/* confdefs.h.  */
14979 +_ACEOF
14980 +cat confdefs.h >>conftest.$ac_ext
14981 +cat >>conftest.$ac_ext <<_ACEOF
14982 +/* end confdefs.h.  */
14983 +#include <$ac_header>
14984 +_ACEOF
14985 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14986 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14987 +  ac_status=$?
14988 +  grep -v '^ *+' conftest.er1 >conftest.err
14989 +  rm -f conftest.er1
14990 +  cat conftest.err >&5
14991 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14992 +  (exit $ac_status); } >/dev/null; then
14993 +  if test -s conftest.err; then
14994 +    ac_cpp_err=$ac_c_preproc_warn_flag
14995 +  else
14996 +    ac_cpp_err=
14997 +  fi
14998 +else
14999 +  ac_cpp_err=yes
15000 +fi
15001 +if test -z "$ac_cpp_err"; then
15002 +  ac_header_preproc=yes
15003 +else
15004 +  echo "$as_me: failed program was:" >&5
15005 +sed 's/^/| /' conftest.$ac_ext >&5
15006 +
15007 +  ac_header_preproc=no
15008 +fi
15009 +rm -f conftest.err conftest.$ac_ext
15010 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15011 +echo "${ECHO_T}$ac_header_preproc" >&6
15012 +
15013 +# So?  What about this header?
15014 +case $ac_header_compiler:$ac_header_preproc in
15015 +  yes:no )
15016 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15017 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15018 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15019 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15020 +    (
15021 +      cat <<\_ASBOX
15022 +## ------------------------------------ ##
15023 +## Report this to bug-autoconf@gnu.org. ##
15024 +## ------------------------------------ ##
15025 +_ASBOX
15026 +    ) |
15027 +      sed "s/^/$as_me: WARNING:     /" >&2
15028 +    ;;
15029 +  no:yes )
15030 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15031 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15032 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15033 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15034 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15035 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15036 +    (
15037 +      cat <<\_ASBOX
15038 +## ------------------------------------ ##
15039 +## Report this to bug-autoconf@gnu.org. ##
15040 +## ------------------------------------ ##
15041 +_ASBOX
15042 +    ) |
15043 +      sed "s/^/$as_me: WARNING:     /" >&2
15044 +    ;;
15045 +esac
15046 +echo "$as_me:$LINENO: checking for $ac_header" >&5
15047 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15048 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15049 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15050 +else
15051 +  eval "$as_ac_Header=$ac_header_preproc"
15052 +fi
15053 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15054 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15055 +
15056 +fi
15057 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
15058 +  cat >>confdefs.h <<_ACEOF
15059 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15060 +_ACEOF
15061 +
15062 +fi
15063 +
15064 +done
15065 +
15066 +
15067 +
15068 +
15069 +for ac_header in wctype.h
15070 +do
15071 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15072 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15073 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
15074 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15075 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15076 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15077 +fi
15078 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15079 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15080 +else
15081 +  # Is the header compilable?
15082 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
15083 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15084 +cat >conftest.$ac_ext <<_ACEOF
15085 +#line $LINENO "configure"
15086 +/* confdefs.h.  */
15087 +_ACEOF
15088 +cat confdefs.h >>conftest.$ac_ext
15089 +cat >>conftest.$ac_ext <<_ACEOF
15090 +/* end confdefs.h.  */
15091 +$ac_includes_default
15092 +#include <$ac_header>
15093 +_ACEOF
15094 +rm -f conftest.$ac_objext
15095 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15096 +  (eval $ac_compile) 2>&5
15097 +  ac_status=$?
15098 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15099 +  (exit $ac_status); } &&
15100 +         { ac_try='test -s conftest.$ac_objext'
15101 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15102 +  (eval $ac_try) 2>&5
15103 +  ac_status=$?
15104 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 +  (exit $ac_status); }; }; then
15106 +  ac_header_compiler=yes
15107 +else
15108 +  echo "$as_me: failed program was:" >&5
15109 +sed 's/^/| /' conftest.$ac_ext >&5
15110 +
15111 +ac_header_compiler=no
15112 +fi
15113 +rm -f conftest.$ac_objext conftest.$ac_ext
15114 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15115 +echo "${ECHO_T}$ac_header_compiler" >&6
15116 +
15117 +# Is the header present?
15118 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
15119 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15120 +cat >conftest.$ac_ext <<_ACEOF
15121 +#line $LINENO "configure"
15122 +/* confdefs.h.  */
15123 +_ACEOF
15124 +cat confdefs.h >>conftest.$ac_ext
15125 +cat >>conftest.$ac_ext <<_ACEOF
15126 +/* end confdefs.h.  */
15127 +#include <$ac_header>
15128 +_ACEOF
15129 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15130 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15131 +  ac_status=$?
15132 +  grep -v '^ *+' conftest.er1 >conftest.err
15133 +  rm -f conftest.er1
15134 +  cat conftest.err >&5
15135 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136 +  (exit $ac_status); } >/dev/null; then
15137 +  if test -s conftest.err; then
15138 +    ac_cpp_err=$ac_c_preproc_warn_flag
15139 +  else
15140 +    ac_cpp_err=
15141 +  fi
15142 +else
15143 +  ac_cpp_err=yes
15144 +fi
15145 +if test -z "$ac_cpp_err"; then
15146 +  ac_header_preproc=yes
15147 +else
15148 +  echo "$as_me: failed program was:" >&5
15149 +sed 's/^/| /' conftest.$ac_ext >&5
15150 +
15151 +  ac_header_preproc=no
15152 +fi
15153 +rm -f conftest.err conftest.$ac_ext
15154 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15155 +echo "${ECHO_T}$ac_header_preproc" >&6
15156 +
15157 +# So?  What about this header?
15158 +case $ac_header_compiler:$ac_header_preproc in
15159 +  yes:no )
15160 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15161 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15162 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15163 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15164 +    (
15165 +      cat <<\_ASBOX
15166 +## ------------------------------------ ##
15167 +## Report this to bug-autoconf@gnu.org. ##
15168 +## ------------------------------------ ##
15169 +_ASBOX
15170 +    ) |
15171 +      sed "s/^/$as_me: WARNING:     /" >&2
15172 +    ;;
15173 +  no:yes )
15174 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15175 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15176 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15177 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15178 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15179 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15180 +    (
15181 +      cat <<\_ASBOX
15182 +## ------------------------------------ ##
15183 +## Report this to bug-autoconf@gnu.org. ##
15184 +## ------------------------------------ ##
15185 +_ASBOX
15186 +    ) |
15187 +      sed "s/^/$as_me: WARNING:     /" >&2
15188 +    ;;
15189 +esac
15190 +echo "$as_me:$LINENO: checking for $ac_header" >&5
15191 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15192 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15193 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15194 +else
15195 +  eval "$as_ac_Header=$ac_header_preproc"
15196 +fi
15197 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15198 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15199 +
15200 +fi
15201 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
15202 +  cat >>confdefs.h <<_ACEOF
15203 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15204 +_ACEOF
15205 +
15206 +fi
15207 +
15208 +done
15209 +
15210 +
15211 +
15212 +
15213 +for ac_func in iswprint
15214 +do
15215 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15216 +echo "$as_me:$LINENO: checking for $ac_func" >&5
15217 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15218 +if eval "test \"\${$as_ac_var+set}\" = set"; then
15219 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15220 +else
15221 +  cat >conftest.$ac_ext <<_ACEOF
15222 +#line $LINENO "configure"
15223 +/* confdefs.h.  */
15224 +_ACEOF
15225 +cat confdefs.h >>conftest.$ac_ext
15226 +cat >>conftest.$ac_ext <<_ACEOF
15227 +/* end confdefs.h.  */
15228  /* System header to define __stub macros and hopefully few prototypes,
15229 -    which can conflict with char getopt_long(); below.  */
15230 -#include <assert.h>
15231 +    which can conflict with char $ac_func (); below.
15232 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15233 +    <limits.h> exists even on freestanding compilers.  */
15234 +#ifdef __STDC__
15235 +# include <limits.h>
15236 +#else
15237 +# include <assert.h>
15238 +#endif
15239  /* Override any gcc2 internal prototype to avoid an error.  */
15240 +#ifdef __cplusplus
15241 +extern "C"
15242 +{
15243 +#endif
15244  /* We use char because int might match the return type of a gcc2
15245 -    builtin and then its argument prototype would still apply.  */
15246 -char getopt_long();
15247 +   builtin and then its argument prototype would still apply.  */
15248 +char $ac_func ();
15249 +/* The GNU C library defines this for functions which it implements
15250 +    to always fail with ENOSYS.  Some functions are actually named
15251 +    something starting with __ and the normal name is an alias.  */
15252 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15253 +choke me
15254 +#else
15255 +char (*f) () = $ac_func;
15256 +#endif
15257 +#ifdef __cplusplus
15258 +}
15259 +#endif
15260  
15261 -int main() {
15262 +int
15263 +main ()
15264 +{
15265 +return f != $ac_func;
15266 +  ;
15267 +  return 0;
15268 +}
15269 +_ACEOF
15270 +rm -f conftest.$ac_objext conftest$ac_exeext
15271 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15272 +  (eval $ac_link) 2>&5
15273 +  ac_status=$?
15274 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15275 +  (exit $ac_status); } &&
15276 +         { ac_try='test -s conftest$ac_exeext'
15277 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15278 +  (eval $ac_try) 2>&5
15279 +  ac_status=$?
15280 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281 +  (exit $ac_status); }; }; then
15282 +  eval "$as_ac_var=yes"
15283 +else
15284 +  echo "$as_me: failed program was:" >&5
15285 +sed 's/^/| /' conftest.$ac_ext >&5
15286  
15287 +eval "$as_ac_var=no"
15288 +fi
15289 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15290 +fi
15291 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15292 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15293 +if test `eval echo '${'$as_ac_var'}'` = yes; then
15294 +  cat >>confdefs.h <<_ACEOF
15295 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15296 +_ACEOF
15297 +
15298 +fi
15299 +done
15300 +
15301 +
15302 +
15303 +
15304 +for ac_func in mbsinit
15305 +do
15306 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15307 +echo "$as_me:$LINENO: checking for $ac_func" >&5
15308 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15309 +if eval "test \"\${$as_ac_var+set}\" = set"; then
15310 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15311 +else
15312 +  cat >conftest.$ac_ext <<_ACEOF
15313 +#line $LINENO "configure"
15314 +/* confdefs.h.  */
15315 +_ACEOF
15316 +cat confdefs.h >>conftest.$ac_ext
15317 +cat >>conftest.$ac_ext <<_ACEOF
15318 +/* end confdefs.h.  */
15319 +/* System header to define __stub macros and hopefully few prototypes,
15320 +    which can conflict with char $ac_func (); below.
15321 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15322 +    <limits.h> exists even on freestanding compilers.  */
15323 +#ifdef __STDC__
15324 +# include <limits.h>
15325 +#else
15326 +# include <assert.h>
15327 +#endif
15328 +/* Override any gcc2 internal prototype to avoid an error.  */
15329 +#ifdef __cplusplus
15330 +extern "C"
15331 +{
15332 +#endif
15333 +/* We use char because int might match the return type of a gcc2
15334 +   builtin and then its argument prototype would still apply.  */
15335 +char $ac_func ();
15336  /* The GNU C library defines this for functions which it implements
15337      to always fail with ENOSYS.  Some functions are actually named
15338      something starting with __ and the normal name is an alias.  */
15339 -#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
15340 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15341  choke me
15342  #else
15343 -getopt_long();
15344 +char (*f) () = $ac_func;
15345 +#endif
15346 +#ifdef __cplusplus
15347 +}
15348  #endif
15349  
15350 -; return 0; }
15351 -EOF
15352 -if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15353 -  rm -rf conftest*
15354 -  eval "ac_cv_func_getopt_long=yes"
15355 +int
15356 +main ()
15357 +{
15358 +return f != $ac_func;
15359 +  ;
15360 +  return 0;
15361 +}
15362 +_ACEOF
15363 +rm -f conftest.$ac_objext conftest$ac_exeext
15364 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15365 +  (eval $ac_link) 2>&5
15366 +  ac_status=$?
15367 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368 +  (exit $ac_status); } &&
15369 +         { ac_try='test -s conftest$ac_exeext'
15370 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15371 +  (eval $ac_try) 2>&5
15372 +  ac_status=$?
15373 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 +  (exit $ac_status); }; }; then
15375 +  eval "$as_ac_var=yes"
15376  else
15377 -  echo "configure: failed program was:" >&5
15378 -  cat conftest.$ac_ext >&5
15379 -  rm -rf conftest*
15380 -  eval "ac_cv_func_getopt_long=no"
15381 +  echo "$as_me: failed program was:" >&5
15382 +sed 's/^/| /' conftest.$ac_ext >&5
15383 +
15384 +eval "$as_ac_var=no"
15385  fi
15386 -rm -f conftest*
15387 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15388  fi
15389 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15390 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15391 +if test `eval echo '${'$as_ac_var'}'` = yes; then
15392 +  cat >>confdefs.h <<_ACEOF
15393 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15394 +_ACEOF
15395 +
15396 +fi
15397 +done
15398 +
15399 +
15400 +
15401 +
15402 +  :
15403 +
15404 +
15405 +
15406 +
15407 +
15408 +
15409 +
15410 +
15411  
15412 -if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
15413 -  echo "$ac_t""yes" 1>&6
15414    :
15415 +
15416 +
15417 +
15418 +
15419 +
15420 +
15421 +
15422 +
15423 +  echo "$as_me:$LINENO: checking for mbstate_t" >&5
15424 +echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
15425 +if test "${ac_cv_type_mbstate_t+set}" = set; then
15426 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15427  else
15428 -  echo "$ac_t""no" 1>&6
15429 -LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"
15430 +  cat >conftest.$ac_ext <<_ACEOF
15431 +#line $LINENO "configure"
15432 +/* confdefs.h.  */
15433 +_ACEOF
15434 +cat confdefs.h >>conftest.$ac_ext
15435 +cat >>conftest.$ac_ext <<_ACEOF
15436 +/* end confdefs.h.  */
15437 +$ac_includes_default
15438 +#          include <wchar.h>
15439 +int
15440 +main ()
15441 +{
15442 +mbstate_t x; return sizeof x;
15443 +  ;
15444 +  return 0;
15445 +}
15446 +_ACEOF
15447 +rm -f conftest.$ac_objext
15448 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15449 +  (eval $ac_compile) 2>&5
15450 +  ac_status=$?
15451 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452 +  (exit $ac_status); } &&
15453 +         { ac_try='test -s conftest.$ac_objext'
15454 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15455 +  (eval $ac_try) 2>&5
15456 +  ac_status=$?
15457 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458 +  (exit $ac_status); }; }; then
15459 +  ac_cv_type_mbstate_t=yes
15460 +else
15461 +  echo "$as_me: failed program was:" >&5
15462 +sed 's/^/| /' conftest.$ac_ext >&5
15463 +
15464 +ac_cv_type_mbstate_t=no
15465 +fi
15466 +rm -f conftest.$ac_objext conftest.$ac_ext
15467  fi
15468 +echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
15469 +echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
15470 +   if test $ac_cv_type_mbstate_t = yes; then
15471 +
15472 +cat >>confdefs.h <<\_ACEOF
15473 +#define HAVE_MBSTATE_T 1
15474 +_ACEOF
15475  
15476 +   else
15477  
15478 -for ac_func in _doprintf isascii fseeko memcmp mktemp \
15479 -  pathconf raise setmode sigaction sigprocmask sigsetmask strerror
15480 +cat >>confdefs.h <<\_ACEOF
15481 +#define mbstate_t int
15482 +_ACEOF
15483 +
15484 +   fi
15485 +
15486 +  echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
15487 +echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
15488 +if test "${jm_cv_func_mbrtowc+set}" = set; then
15489 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15490 +else
15491 +  cat >conftest.$ac_ext <<_ACEOF
15492 +#line $LINENO "configure"
15493 +/* confdefs.h.  */
15494 +_ACEOF
15495 +cat confdefs.h >>conftest.$ac_ext
15496 +cat >>conftest.$ac_ext <<_ACEOF
15497 +/* end confdefs.h.  */
15498 +#include <wchar.h>
15499 +int
15500 +main ()
15501 +{
15502 +mbstate_t state; return ! (sizeof state && mbrtowc);
15503 +  ;
15504 +  return 0;
15505 +}
15506 +_ACEOF
15507 +rm -f conftest.$ac_objext conftest$ac_exeext
15508 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15509 +  (eval $ac_link) 2>&5
15510 +  ac_status=$?
15511 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15512 +  (exit $ac_status); } &&
15513 +         { ac_try='test -s conftest$ac_exeext'
15514 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15515 +  (eval $ac_try) 2>&5
15516 +  ac_status=$?
15517 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 +  (exit $ac_status); }; }; then
15519 +  jm_cv_func_mbrtowc=yes
15520 +else
15521 +  echo "$as_me: failed program was:" >&5
15522 +sed 's/^/| /' conftest.$ac_ext >&5
15523 +
15524 +jm_cv_func_mbrtowc=no
15525 +fi
15526 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15527 +fi
15528 +echo "$as_me:$LINENO: result: $jm_cv_func_mbrtowc" >&5
15529 +echo "${ECHO_T}$jm_cv_func_mbrtowc" >&6
15530 +  if test $jm_cv_func_mbrtowc = yes; then
15531 +
15532 +cat >>confdefs.h <<\_ACEOF
15533 +#define HAVE_MBRTOWC 1
15534 +_ACEOF
15535 +
15536 +  fi
15537 +
15538 +
15539 +
15540 +
15541 +
15542 +
15543 +
15544 +for ac_func in pathconf
15545  do
15546 -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15547 -echo "configure:2456: checking for $ac_func" >&5
15548 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
15549 -  echo $ac_n "(cached) $ac_c" 1>&6
15550 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15551 +echo "$as_me:$LINENO: checking for $ac_func" >&5
15552 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15553 +if eval "test \"\${$as_ac_var+set}\" = set"; then
15554 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15555  else
15556 -  cat > conftest.$ac_ext <<EOF
15557 -#line 2461 "configure"
15558 -#include "confdefs.h"
15559 +  cat >conftest.$ac_ext <<_ACEOF
15560 +#line $LINENO "configure"
15561 +/* confdefs.h.  */
15562 +_ACEOF
15563 +cat confdefs.h >>conftest.$ac_ext
15564 +cat >>conftest.$ac_ext <<_ACEOF
15565 +/* end confdefs.h.  */
15566  /* System header to define __stub macros and hopefully few prototypes,
15567 -    which can conflict with char $ac_func(); below.  */
15568 -#include <assert.h>
15569 +    which can conflict with char $ac_func (); below.
15570 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15571 +    <limits.h> exists even on freestanding compilers.  */
15572 +#ifdef __STDC__
15573 +# include <limits.h>
15574 +#else
15575 +# include <assert.h>
15576 +#endif
15577  /* Override any gcc2 internal prototype to avoid an error.  */
15578 +#ifdef __cplusplus
15579 +extern "C"
15580 +{
15581 +#endif
15582  /* We use char because int might match the return type of a gcc2
15583 -    builtin and then its argument prototype would still apply.  */
15584 -char $ac_func();
15585 -
15586 -int main() {
15587 -
15588 +   builtin and then its argument prototype would still apply.  */
15589 +char $ac_func ();
15590  /* The GNU C library defines this for functions which it implements
15591      to always fail with ENOSYS.  Some functions are actually named
15592      something starting with __ and the normal name is an alias.  */
15593  #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15594  choke me
15595  #else
15596 -$ac_func();
15597 +char (*f) () = $ac_func;
15598 +#endif
15599 +#ifdef __cplusplus
15600 +}
15601  #endif
15602  
15603 -; return 0; }
15604 -EOF
15605 -if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15606 -  rm -rf conftest*
15607 -  eval "ac_cv_func_$ac_func=yes"
15608 +int
15609 +main ()
15610 +{
15611 +return f != $ac_func;
15612 +  ;
15613 +  return 0;
15614 +}
15615 +_ACEOF
15616 +rm -f conftest.$ac_objext conftest$ac_exeext
15617 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15618 +  (eval $ac_link) 2>&5
15619 +  ac_status=$?
15620 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 +  (exit $ac_status); } &&
15622 +         { ac_try='test -s conftest$ac_exeext'
15623 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624 +  (eval $ac_try) 2>&5
15625 +  ac_status=$?
15626 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 +  (exit $ac_status); }; }; then
15628 +  eval "$as_ac_var=yes"
15629  else
15630 -  echo "configure: failed program was:" >&5
15631 -  cat conftest.$ac_ext >&5
15632 -  rm -rf conftest*
15633 -  eval "ac_cv_func_$ac_func=no"
15634 +  echo "$as_me: failed program was:" >&5
15635 +sed 's/^/| /' conftest.$ac_ext >&5
15636 +
15637 +eval "$as_ac_var=no"
15638  fi
15639 -rm -f conftest*
15640 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15641  fi
15642 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15643 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15644 +if test `eval echo '${'$as_ac_var'}'` = yes; then
15645 +  cat >>confdefs.h <<_ACEOF
15646 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15647 +_ACEOF
15648  
15649 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15650 -  echo "$ac_t""yes" 1>&6
15651 -    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15652 -  cat >> confdefs.h <<EOF
15653 -#define $ac_tr_func 1
15654 -EOF
15655
15656 +fi
15657 +done
15658 +
15659 +
15660 +
15661 +
15662 +for ac_header in limits.h string.h unistd.h
15663 +do
15664 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15665 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15666 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
15667 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15668 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15669 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15670 +fi
15671 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15672 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15673  else
15674 -  echo "$ac_t""no" 1>&6
15675 +  # Is the header compilable?
15676 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
15677 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15678 +cat >conftest.$ac_ext <<_ACEOF
15679 +#line $LINENO "configure"
15680 +/* confdefs.h.  */
15681 +_ACEOF
15682 +cat confdefs.h >>conftest.$ac_ext
15683 +cat >>conftest.$ac_ext <<_ACEOF
15684 +/* end confdefs.h.  */
15685 +$ac_includes_default
15686 +#include <$ac_header>
15687 +_ACEOF
15688 +rm -f conftest.$ac_objext
15689 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15690 +  (eval $ac_compile) 2>&5
15691 +  ac_status=$?
15692 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 +  (exit $ac_status); } &&
15694 +         { ac_try='test -s conftest.$ac_objext'
15695 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696 +  (eval $ac_try) 2>&5
15697 +  ac_status=$?
15698 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 +  (exit $ac_status); }; }; then
15700 +  ac_header_compiler=yes
15701 +else
15702 +  echo "$as_me: failed program was:" >&5
15703 +sed 's/^/| /' conftest.$ac_ext >&5
15704 +
15705 +ac_header_compiler=no
15706  fi
15707 +rm -f conftest.$ac_objext conftest.$ac_ext
15708 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15709 +echo "${ECHO_T}$ac_header_compiler" >&6
15710 +
15711 +# Is the header present?
15712 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
15713 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15714 +cat >conftest.$ac_ext <<_ACEOF
15715 +#line $LINENO "configure"
15716 +/* confdefs.h.  */
15717 +_ACEOF
15718 +cat confdefs.h >>conftest.$ac_ext
15719 +cat >>conftest.$ac_ext <<_ACEOF
15720 +/* end confdefs.h.  */
15721 +#include <$ac_header>
15722 +_ACEOF
15723 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15724 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15725 +  ac_status=$?
15726 +  grep -v '^ *+' conftest.er1 >conftest.err
15727 +  rm -f conftest.er1
15728 +  cat conftest.err >&5
15729 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15730 +  (exit $ac_status); } >/dev/null; then
15731 +  if test -s conftest.err; then
15732 +    ac_cpp_err=$ac_c_preproc_warn_flag
15733 +  else
15734 +    ac_cpp_err=
15735 +  fi
15736 +else
15737 +  ac_cpp_err=yes
15738 +fi
15739 +if test -z "$ac_cpp_err"; then
15740 +  ac_header_preproc=yes
15741 +else
15742 +  echo "$as_me: failed program was:" >&5
15743 +sed 's/^/| /' conftest.$ac_ext >&5
15744 +
15745 +  ac_header_preproc=no
15746 +fi
15747 +rm -f conftest.err conftest.$ac_ext
15748 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15749 +echo "${ECHO_T}$ac_header_preproc" >&6
15750 +
15751 +# So?  What about this header?
15752 +case $ac_header_compiler:$ac_header_preproc in
15753 +  yes:no )
15754 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15755 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15756 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15757 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15758 +    (
15759 +      cat <<\_ASBOX
15760 +## ------------------------------------ ##
15761 +## Report this to bug-autoconf@gnu.org. ##
15762 +## ------------------------------------ ##
15763 +_ASBOX
15764 +    ) |
15765 +      sed "s/^/$as_me: WARNING:     /" >&2
15766 +    ;;
15767 +  no:yes )
15768 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15769 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15770 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15771 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15772 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15773 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15774 +    (
15775 +      cat <<\_ASBOX
15776 +## ------------------------------------ ##
15777 +## Report this to bug-autoconf@gnu.org. ##
15778 +## ------------------------------------ ##
15779 +_ASBOX
15780 +    ) |
15781 +      sed "s/^/$as_me: WARNING:     /" >&2
15782 +    ;;
15783 +esac
15784 +echo "$as_me:$LINENO: checking for $ac_header" >&5
15785 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15786 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
15787 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15788 +else
15789 +  eval "$as_ac_Header=$ac_header_preproc"
15790 +fi
15791 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15792 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15793 +
15794 +fi
15795 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
15796 +  cat >>confdefs.h <<_ACEOF
15797 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15798 +_ACEOF
15799 +
15800 +fi
15801 +
15802  done
15803  
15804 -for ac_func in memchr mkdir rename rmdir
15805 +
15806 +
15807 +echo "$as_me:$LINENO: checking whether free is declared" >&5
15808 +echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
15809 +if test "${ac_cv_have_decl_free+set}" = set; then
15810 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15811 +else
15812 +  cat >conftest.$ac_ext <<_ACEOF
15813 +#line $LINENO "configure"
15814 +/* confdefs.h.  */
15815 +_ACEOF
15816 +cat confdefs.h >>conftest.$ac_ext
15817 +cat >>conftest.$ac_ext <<_ACEOF
15818 +/* end confdefs.h.  */
15819 +$ac_includes_default
15820 +int
15821 +main ()
15822 +{
15823 +#ifndef free
15824 +  char *p = (char *) free;
15825 +#endif
15826 +
15827 +  ;
15828 +  return 0;
15829 +}
15830 +_ACEOF
15831 +rm -f conftest.$ac_objext
15832 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15833 +  (eval $ac_compile) 2>&5
15834 +  ac_status=$?
15835 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15836 +  (exit $ac_status); } &&
15837 +         { ac_try='test -s conftest.$ac_objext'
15838 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15839 +  (eval $ac_try) 2>&5
15840 +  ac_status=$?
15841 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842 +  (exit $ac_status); }; }; then
15843 +  ac_cv_have_decl_free=yes
15844 +else
15845 +  echo "$as_me: failed program was:" >&5
15846 +sed 's/^/| /' conftest.$ac_ext >&5
15847 +
15848 +ac_cv_have_decl_free=no
15849 +fi
15850 +rm -f conftest.$ac_objext conftest.$ac_ext
15851 +fi
15852 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
15853 +echo "${ECHO_T}$ac_cv_have_decl_free" >&6
15854 +if test $ac_cv_have_decl_free = yes; then
15855 +
15856 +cat >>confdefs.h <<_ACEOF
15857 +#define HAVE_DECL_FREE 1
15858 +_ACEOF
15859 +
15860 +
15861 +else
15862 +  cat >>confdefs.h <<_ACEOF
15863 +#define HAVE_DECL_FREE 0
15864 +_ACEOF
15865 +
15866 +
15867 +fi
15868 +echo "$as_me:$LINENO: checking whether getenv is declared" >&5
15869 +echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
15870 +if test "${ac_cv_have_decl_getenv+set}" = set; then
15871 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15872 +else
15873 +  cat >conftest.$ac_ext <<_ACEOF
15874 +#line $LINENO "configure"
15875 +/* confdefs.h.  */
15876 +_ACEOF
15877 +cat confdefs.h >>conftest.$ac_ext
15878 +cat >>conftest.$ac_ext <<_ACEOF
15879 +/* end confdefs.h.  */
15880 +$ac_includes_default
15881 +int
15882 +main ()
15883 +{
15884 +#ifndef getenv
15885 +  char *p = (char *) getenv;
15886 +#endif
15887 +
15888 +  ;
15889 +  return 0;
15890 +}
15891 +_ACEOF
15892 +rm -f conftest.$ac_objext
15893 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15894 +  (eval $ac_compile) 2>&5
15895 +  ac_status=$?
15896 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897 +  (exit $ac_status); } &&
15898 +         { ac_try='test -s conftest.$ac_objext'
15899 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15900 +  (eval $ac_try) 2>&5
15901 +  ac_status=$?
15902 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15903 +  (exit $ac_status); }; }; then
15904 +  ac_cv_have_decl_getenv=yes
15905 +else
15906 +  echo "$as_me: failed program was:" >&5
15907 +sed 's/^/| /' conftest.$ac_ext >&5
15908 +
15909 +ac_cv_have_decl_getenv=no
15910 +fi
15911 +rm -f conftest.$ac_objext conftest.$ac_ext
15912 +fi
15913 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
15914 +echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
15915 +if test $ac_cv_have_decl_getenv = yes; then
15916 +
15917 +cat >>confdefs.h <<_ACEOF
15918 +#define HAVE_DECL_GETENV 1
15919 +_ACEOF
15920 +
15921 +
15922 +else
15923 +  cat >>confdefs.h <<_ACEOF
15924 +#define HAVE_DECL_GETENV 0
15925 +_ACEOF
15926 +
15927 +
15928 +fi
15929 +echo "$as_me:$LINENO: checking whether malloc is declared" >&5
15930 +echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
15931 +if test "${ac_cv_have_decl_malloc+set}" = set; then
15932 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15933 +else
15934 +  cat >conftest.$ac_ext <<_ACEOF
15935 +#line $LINENO "configure"
15936 +/* confdefs.h.  */
15937 +_ACEOF
15938 +cat confdefs.h >>conftest.$ac_ext
15939 +cat >>conftest.$ac_ext <<_ACEOF
15940 +/* end confdefs.h.  */
15941 +$ac_includes_default
15942 +int
15943 +main ()
15944 +{
15945 +#ifndef malloc
15946 +  char *p = (char *) malloc;
15947 +#endif
15948 +
15949 +  ;
15950 +  return 0;
15951 +}
15952 +_ACEOF
15953 +rm -f conftest.$ac_objext
15954 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15955 +  (eval $ac_compile) 2>&5
15956 +  ac_status=$?
15957 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958 +  (exit $ac_status); } &&
15959 +         { ac_try='test -s conftest.$ac_objext'
15960 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961 +  (eval $ac_try) 2>&5
15962 +  ac_status=$?
15963 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964 +  (exit $ac_status); }; }; then
15965 +  ac_cv_have_decl_malloc=yes
15966 +else
15967 +  echo "$as_me: failed program was:" >&5
15968 +sed 's/^/| /' conftest.$ac_ext >&5
15969 +
15970 +ac_cv_have_decl_malloc=no
15971 +fi
15972 +rm -f conftest.$ac_objext conftest.$ac_ext
15973 +fi
15974 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
15975 +echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
15976 +if test $ac_cv_have_decl_malloc = yes; then
15977 +
15978 +cat >>confdefs.h <<_ACEOF
15979 +#define HAVE_DECL_MALLOC 1
15980 +_ACEOF
15981 +
15982 +
15983 +else
15984 +  cat >>confdefs.h <<_ACEOF
15985 +#define HAVE_DECL_MALLOC 0
15986 +_ACEOF
15987 +
15988 +
15989 +fi
15990 +echo "$as_me:$LINENO: checking whether mktemp is declared" >&5
15991 +echo $ECHO_N "checking whether mktemp is declared... $ECHO_C" >&6
15992 +if test "${ac_cv_have_decl_mktemp+set}" = set; then
15993 +  echo $ECHO_N "(cached) $ECHO_C" >&6
15994 +else
15995 +  cat >conftest.$ac_ext <<_ACEOF
15996 +#line $LINENO "configure"
15997 +/* confdefs.h.  */
15998 +_ACEOF
15999 +cat confdefs.h >>conftest.$ac_ext
16000 +cat >>conftest.$ac_ext <<_ACEOF
16001 +/* end confdefs.h.  */
16002 +$ac_includes_default
16003 +int
16004 +main ()
16005 +{
16006 +#ifndef mktemp
16007 +  char *p = (char *) mktemp;
16008 +#endif
16009 +
16010 +  ;
16011 +  return 0;
16012 +}
16013 +_ACEOF
16014 +rm -f conftest.$ac_objext
16015 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16016 +  (eval $ac_compile) 2>&5
16017 +  ac_status=$?
16018 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16019 +  (exit $ac_status); } &&
16020 +         { ac_try='test -s conftest.$ac_objext'
16021 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16022 +  (eval $ac_try) 2>&5
16023 +  ac_status=$?
16024 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16025 +  (exit $ac_status); }; }; then
16026 +  ac_cv_have_decl_mktemp=yes
16027 +else
16028 +  echo "$as_me: failed program was:" >&5
16029 +sed 's/^/| /' conftest.$ac_ext >&5
16030 +
16031 +ac_cv_have_decl_mktemp=no
16032 +fi
16033 +rm -f conftest.$ac_objext conftest.$ac_ext
16034 +fi
16035 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_mktemp" >&5
16036 +echo "${ECHO_T}$ac_cv_have_decl_mktemp" >&6
16037 +if test $ac_cv_have_decl_mktemp = yes; then
16038 +
16039 +cat >>confdefs.h <<_ACEOF
16040 +#define HAVE_DECL_MKTEMP 1
16041 +_ACEOF
16042 +
16043 +
16044 +else
16045 +  cat >>confdefs.h <<_ACEOF
16046 +#define HAVE_DECL_MKTEMP 0
16047 +_ACEOF
16048 +
16049 +
16050 +fi
16051 +
16052 +
16053 +
16054 +
16055 +
16056 +
16057 +
16058 +
16059 +
16060 +
16061 +
16062 +
16063 +
16064 +
16065 +for ac_func in _doprintf geteuid getuid isascii memcmp mktemp \
16066 +  pathconf raise sigaction sigprocmask sigsetmask strerror
16067  do
16068 -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16069 -echo "configure:2511: checking for $ac_func" >&5
16070 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
16071 -  echo $ac_n "(cached) $ac_c" 1>&6
16072 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16073 +echo "$as_me:$LINENO: checking for $ac_func" >&5
16074 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16075 +if eval "test \"\${$as_ac_var+set}\" = set"; then
16076 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16077  else
16078 -  cat > conftest.$ac_ext <<EOF
16079 -#line 2516 "configure"
16080 -#include "confdefs.h"
16081 +  cat >conftest.$ac_ext <<_ACEOF
16082 +#line $LINENO "configure"
16083 +/* confdefs.h.  */
16084 +_ACEOF
16085 +cat confdefs.h >>conftest.$ac_ext
16086 +cat >>conftest.$ac_ext <<_ACEOF
16087 +/* end confdefs.h.  */
16088  /* System header to define __stub macros and hopefully few prototypes,
16089 -    which can conflict with char $ac_func(); below.  */
16090 -#include <assert.h>
16091 +    which can conflict with char $ac_func (); below.
16092 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16093 +    <limits.h> exists even on freestanding compilers.  */
16094 +#ifdef __STDC__
16095 +# include <limits.h>
16096 +#else
16097 +# include <assert.h>
16098 +#endif
16099  /* Override any gcc2 internal prototype to avoid an error.  */
16100 +#ifdef __cplusplus
16101 +extern "C"
16102 +{
16103 +#endif
16104  /* We use char because int might match the return type of a gcc2
16105 -    builtin and then its argument prototype would still apply.  */
16106 -char $ac_func();
16107 +   builtin and then its argument prototype would still apply.  */
16108 +char $ac_func ();
16109 +/* The GNU C library defines this for functions which it implements
16110 +    to always fail with ENOSYS.  Some functions are actually named
16111 +    something starting with __ and the normal name is an alias.  */
16112 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16113 +choke me
16114 +#else
16115 +char (*f) () = $ac_func;
16116 +#endif
16117 +#ifdef __cplusplus
16118 +}
16119 +#endif
16120  
16121 -int main() {
16122 +int
16123 +main ()
16124 +{
16125 +return f != $ac_func;
16126 +  ;
16127 +  return 0;
16128 +}
16129 +_ACEOF
16130 +rm -f conftest.$ac_objext conftest$ac_exeext
16131 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16132 +  (eval $ac_link) 2>&5
16133 +  ac_status=$?
16134 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135 +  (exit $ac_status); } &&
16136 +         { ac_try='test -s conftest$ac_exeext'
16137 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16138 +  (eval $ac_try) 2>&5
16139 +  ac_status=$?
16140 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 +  (exit $ac_status); }; }; then
16142 +  eval "$as_ac_var=yes"
16143 +else
16144 +  echo "$as_me: failed program was:" >&5
16145 +sed 's/^/| /' conftest.$ac_ext >&5
16146  
16147 +eval "$as_ac_var=no"
16148 +fi
16149 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16150 +fi
16151 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16152 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16153 +if test `eval echo '${'$as_ac_var'}'` = yes; then
16154 +  cat >>confdefs.h <<_ACEOF
16155 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16156 +_ACEOF
16157 +
16158 +fi
16159 +done
16160 +
16161 +
16162 +
16163 +for ac_func in mkdir strncasecmp
16164 +do
16165 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16166 +echo "$as_me:$LINENO: checking for $ac_func" >&5
16167 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16168 +if eval "test \"\${$as_ac_var+set}\" = set"; then
16169 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16170 +else
16171 +  cat >conftest.$ac_ext <<_ACEOF
16172 +#line $LINENO "configure"
16173 +/* confdefs.h.  */
16174 +_ACEOF
16175 +cat confdefs.h >>conftest.$ac_ext
16176 +cat >>conftest.$ac_ext <<_ACEOF
16177 +/* end confdefs.h.  */
16178 +/* System header to define __stub macros and hopefully few prototypes,
16179 +    which can conflict with char $ac_func (); below.
16180 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16181 +    <limits.h> exists even on freestanding compilers.  */
16182 +#ifdef __STDC__
16183 +# include <limits.h>
16184 +#else
16185 +# include <assert.h>
16186 +#endif
16187 +/* Override any gcc2 internal prototype to avoid an error.  */
16188 +#ifdef __cplusplus
16189 +extern "C"
16190 +{
16191 +#endif
16192 +/* We use char because int might match the return type of a gcc2
16193 +   builtin and then its argument prototype would still apply.  */
16194 +char $ac_func ();
16195  /* The GNU C library defines this for functions which it implements
16196      to always fail with ENOSYS.  Some functions are actually named
16197      something starting with __ and the normal name is an alias.  */
16198  #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16199  choke me
16200  #else
16201 -$ac_func();
16202 +char (*f) () = $ac_func;
16203 +#endif
16204 +#ifdef __cplusplus
16205 +}
16206  #endif
16207  
16208 -; return 0; }
16209 -EOF
16210 -if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16211 -  rm -rf conftest*
16212 -  eval "ac_cv_func_$ac_func=yes"
16213 +int
16214 +main ()
16215 +{
16216 +return f != $ac_func;
16217 +  ;
16218 +  return 0;
16219 +}
16220 +_ACEOF
16221 +rm -f conftest.$ac_objext conftest$ac_exeext
16222 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16223 +  (eval $ac_link) 2>&5
16224 +  ac_status=$?
16225 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16226 +  (exit $ac_status); } &&
16227 +         { ac_try='test -s conftest$ac_exeext'
16228 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16229 +  (eval $ac_try) 2>&5
16230 +  ac_status=$?
16231 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16232 +  (exit $ac_status); }; }; then
16233 +  eval "$as_ac_var=yes"
16234  else
16235 -  echo "configure: failed program was:" >&5
16236 -  cat conftest.$ac_ext >&5
16237 -  rm -rf conftest*
16238 -  eval "ac_cv_func_$ac_func=no"
16239 +  echo "$as_me: failed program was:" >&5
16240 +sed 's/^/| /' conftest.$ac_ext >&5
16241 +
16242 +eval "$as_ac_var=no"
16243  fi
16244 -rm -f conftest*
16245 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16246  fi
16247 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16248 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16249 +if test `eval echo '${'$as_ac_var'}'` = yes; then
16250 +  cat >>confdefs.h <<_ACEOF
16251 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16252 +_ACEOF
16253  
16254 -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16255 -  echo "$ac_t""yes" 1>&6
16256 -    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16257 -  cat >> confdefs.h <<EOF
16258 -#define $ac_tr_func 1
16259 -EOF
16260
16261  else
16262 -  echo "$ac_t""no" 1>&6
16263 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16264 +  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16265  fi
16266  done
16267  
16268  
16269 +echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16270 +echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16271 +if test "${ac_cv_sys_largefile_source+set}" = set; then
16272 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16273 +else
16274 +  while :; do
16275 +  ac_cv_sys_largefile_source=no
16276 +  cat >conftest.$ac_ext <<_ACEOF
16277 +#line $LINENO "configure"
16278 +/* confdefs.h.  */
16279 +_ACEOF
16280 +cat confdefs.h >>conftest.$ac_ext
16281 +cat >>conftest.$ac_ext <<_ACEOF
16282 +/* end confdefs.h.  */
16283 +#include <stdio.h>
16284 +int
16285 +main ()
16286 +{
16287 +return !fseeko;
16288 +  ;
16289 +  return 0;
16290 +}
16291 +_ACEOF
16292 +rm -f conftest.$ac_objext
16293 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16294 +  (eval $ac_compile) 2>&5
16295 +  ac_status=$?
16296 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297 +  (exit $ac_status); } &&
16298 +         { ac_try='test -s conftest.$ac_objext'
16299 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16300 +  (eval $ac_try) 2>&5
16301 +  ac_status=$?
16302 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16303 +  (exit $ac_status); }; }; then
16304 +  break
16305 +else
16306 +  echo "$as_me: failed program was:" >&5
16307 +sed 's/^/| /' conftest.$ac_ext >&5
16308  
16309 -   cat >> confdefs.h <<EOF
16310 -#define HAVE_DONE_WORKING_MALLOC_CHECK 1
16311 -EOF
16312 +fi
16313 +rm -f conftest.$ac_objext conftest.$ac_ext
16314 +  cat >conftest.$ac_ext <<_ACEOF
16315 +#line $LINENO "configure"
16316 +/* confdefs.h.  */
16317 +_ACEOF
16318 +cat confdefs.h >>conftest.$ac_ext
16319 +cat >>conftest.$ac_ext <<_ACEOF
16320 +/* end confdefs.h.  */
16321 +#define _LARGEFILE_SOURCE 1
16322 +#include <stdio.h>
16323 +int
16324 +main ()
16325 +{
16326 +return !fseeko;
16327 +  ;
16328 +  return 0;
16329 +}
16330 +_ACEOF
16331 +rm -f conftest.$ac_objext
16332 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16333 +  (eval $ac_compile) 2>&5
16334 +  ac_status=$?
16335 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16336 +  (exit $ac_status); } &&
16337 +         { ac_try='test -s conftest.$ac_objext'
16338 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16339 +  (eval $ac_try) 2>&5
16340 +  ac_status=$?
16341 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16342 +  (exit $ac_status); }; }; then
16343 +  ac_cv_sys_largefile_source=1; break
16344 +else
16345 +  echo "$as_me: failed program was:" >&5
16346 +sed 's/^/| /' conftest.$ac_ext >&5
16347  
16348 +fi
16349 +rm -f conftest.$ac_objext conftest.$ac_ext
16350 +  break
16351 +done
16352 +fi
16353 +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16354 +echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16355 +if test "$ac_cv_sys_largefile_source" != no; then
16356  
16357 - echo $ac_n "checking for working malloc""... $ac_c" 1>&6
16358 -echo "configure:2572: checking for working malloc" >&5
16359 -if eval "test \"`echo '$''{'jm_cv_func_working_malloc'+set}'`\" = set"; then
16360 -  echo $ac_n "(cached) $ac_c" 1>&6
16361 +cat >>confdefs.h <<_ACEOF
16362 +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16363 +_ACEOF
16364 +
16365 +fi
16366 +rm -f conftest*
16367 +
16368 +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16369 +# in glibc 2.1.3, but that breaks too many other things.
16370 +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16371 +echo "$as_me:$LINENO: checking for fseeko" >&5
16372 +echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16373 +if test "${ac_cv_func_fseeko+set}" = set; then
16374 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16375  else
16376 -  if test "$cross_compiling" = yes; then
16377 -        jm_cv_func_working_malloc=no
16378 +  cat >conftest.$ac_ext <<_ACEOF
16379 +#line $LINENO "configure"
16380 +/* confdefs.h.  */
16381 +_ACEOF
16382 +cat confdefs.h >>conftest.$ac_ext
16383 +cat >>conftest.$ac_ext <<_ACEOF
16384 +/* end confdefs.h.  */
16385 +#include <stdio.h>
16386 +int
16387 +main ()
16388 +{
16389 +return fseeko && fseeko (stdin, 0, 0);
16390 +  ;
16391 +  return 0;
16392 +}
16393 +_ACEOF
16394 +rm -f conftest.$ac_objext conftest$ac_exeext
16395 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16396 +  (eval $ac_link) 2>&5
16397 +  ac_status=$?
16398 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16399 +  (exit $ac_status); } &&
16400 +         { ac_try='test -s conftest$ac_exeext'
16401 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16402 +  (eval $ac_try) 2>&5
16403 +  ac_status=$?
16404 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405 +  (exit $ac_status); }; }; then
16406 +  ac_cv_func_fseeko=yes
16407  else
16408 -  cat > conftest.$ac_ext <<EOF
16409 -#line 2580 "configure"
16410 -#include "confdefs.h"
16411 +  echo "$as_me: failed program was:" >&5
16412 +sed 's/^/| /' conftest.$ac_ext >&5
16413  
16414 -    char *malloc ();
16415 -    int
16416 -    main ()
16417 -    {
16418 -      exit (malloc (0) ? 0 : 1);
16419 -    }
16420 -         
16421 -EOF
16422 -if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16423 -then
16424 -  jm_cv_func_working_malloc=yes
16425 +ac_cv_func_fseeko=no
16426 +fi
16427 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16428 +fi
16429 +echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16430 +echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16431 +if test $ac_cv_func_fseeko = yes; then
16432 +
16433 +cat >>confdefs.h <<\_ACEOF
16434 +#define HAVE_FSEEKO 1
16435 +_ACEOF
16436 +
16437 +fi
16438 +
16439 +
16440 +      echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
16441 +echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6
16442 +if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then
16443 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16444  else
16445 -  echo "configure: failed program was:" >&5
16446 -  cat conftest.$ac_ext >&5
16447 -  rm -fr conftest*
16448 -  jm_cv_func_working_malloc=no
16449 +  cat >conftest.$ac_ext <<_ACEOF
16450 +#line $LINENO "configure"
16451 +/* confdefs.h.  */
16452 +_ACEOF
16453 +cat confdefs.h >>conftest.$ac_ext
16454 +cat >>conftest.$ac_ext <<_ACEOF
16455 +/* end confdefs.h.  */
16456 +$ac_includes_default
16457 +int
16458 +main ()
16459 +{
16460 +#ifndef clearerr_unlocked
16461 +  char *p = (char *) clearerr_unlocked;
16462 +#endif
16463 +
16464 +  ;
16465 +  return 0;
16466 +}
16467 +_ACEOF
16468 +rm -f conftest.$ac_objext
16469 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16470 +  (eval $ac_compile) 2>&5
16471 +  ac_status=$?
16472 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473 +  (exit $ac_status); } &&
16474 +         { ac_try='test -s conftest.$ac_objext'
16475 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16476 +  (eval $ac_try) 2>&5
16477 +  ac_status=$?
16478 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479 +  (exit $ac_status); }; }; then
16480 +  ac_cv_have_decl_clearerr_unlocked=yes
16481 +else
16482 +  echo "$as_me: failed program was:" >&5
16483 +sed 's/^/| /' conftest.$ac_ext >&5
16484 +
16485 +ac_cv_have_decl_clearerr_unlocked=no
16486  fi
16487 -rm -fr conftest*
16488 +rm -f conftest.$ac_objext conftest.$ac_ext
16489  fi
16490 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
16491 +echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
16492 +if test $ac_cv_have_decl_clearerr_unlocked = yes; then
16493 +
16494 +cat >>confdefs.h <<_ACEOF
16495 +#define HAVE_DECL_CLEARERR_UNLOCKED 1
16496 +_ACEOF
16497 +
16498 +
16499 +else
16500 +  cat >>confdefs.h <<_ACEOF
16501 +#define HAVE_DECL_CLEARERR_UNLOCKED 0
16502 +_ACEOF
16503 +
16504  
16505 -  
16506  fi
16507  
16508 -echo "$ac_t""$jm_cv_func_working_malloc" 1>&6
16509 -  if test $jm_cv_func_working_malloc = no; then
16510 -    
16511 -    LIBOBJS="$LIBOBJS malloc.$ac_objext"
16512 -    cat >> confdefs.h <<EOF
16513 -#define malloc rpl_malloc
16514 -EOF
16515  
16516 -  fi
16517  
16518  
16519 -   cat >> confdefs.h <<EOF
16520 -#define HAVE_DONE_WORKING_REALLOC_CHECK 1
16521 -EOF
16522 +      echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
16523 +echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
16524 +if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
16525 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16526 +else
16527 +  cat >conftest.$ac_ext <<_ACEOF
16528 +#line $LINENO "configure"
16529 +/* confdefs.h.  */
16530 +_ACEOF
16531 +cat confdefs.h >>conftest.$ac_ext
16532 +cat >>conftest.$ac_ext <<_ACEOF
16533 +/* end confdefs.h.  */
16534 +$ac_includes_default
16535 +int
16536 +main ()
16537 +{
16538 +#ifndef feof_unlocked
16539 +  char *p = (char *) feof_unlocked;
16540 +#endif
16541 +
16542 +  ;
16543 +  return 0;
16544 +}
16545 +_ACEOF
16546 +rm -f conftest.$ac_objext
16547 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16548 +  (eval $ac_compile) 2>&5
16549 +  ac_status=$?
16550 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551 +  (exit $ac_status); } &&
16552 +         { ac_try='test -s conftest.$ac_objext'
16553 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554 +  (eval $ac_try) 2>&5
16555 +  ac_status=$?
16556 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 +  (exit $ac_status); }; }; then
16558 +  ac_cv_have_decl_feof_unlocked=yes
16559 +else
16560 +  echo "$as_me: failed program was:" >&5
16561 +sed 's/^/| /' conftest.$ac_ext >&5
16562 +
16563 +ac_cv_have_decl_feof_unlocked=no
16564 +fi
16565 +rm -f conftest.$ac_objext conftest.$ac_ext
16566 +fi
16567 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
16568 +echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
16569 +if test $ac_cv_have_decl_feof_unlocked = yes; then
16570 +
16571 +cat >>confdefs.h <<_ACEOF
16572 +#define HAVE_DECL_FEOF_UNLOCKED 1
16573 +_ACEOF
16574  
16575  
16576 - echo $ac_n "checking for working realloc""... $ac_c" 1>&6
16577 -echo "configure:2623: checking for working realloc" >&5
16578 -if eval "test \"`echo '$''{'jm_cv_func_working_realloc'+set}'`\" = set"; then
16579 -  echo $ac_n "(cached) $ac_c" 1>&6
16580  else
16581 -  if test "$cross_compiling" = yes; then
16582 -        jm_cv_func_working_realloc=no
16583 +  cat >>confdefs.h <<_ACEOF
16584 +#define HAVE_DECL_FEOF_UNLOCKED 0
16585 +_ACEOF
16586 +
16587 +
16588 +fi
16589 +
16590 +
16591 +
16592 +
16593 +      echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
16594 +echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6
16595 +if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then
16596 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16597  else
16598 -  cat > conftest.$ac_ext <<EOF
16599 -#line 2631 "configure"
16600 -#include "confdefs.h"
16601 +  cat >conftest.$ac_ext <<_ACEOF
16602 +#line $LINENO "configure"
16603 +/* confdefs.h.  */
16604 +_ACEOF
16605 +cat confdefs.h >>conftest.$ac_ext
16606 +cat >>conftest.$ac_ext <<_ACEOF
16607 +/* end confdefs.h.  */
16608 +$ac_includes_default
16609 +int
16610 +main ()
16611 +{
16612 +#ifndef ferror_unlocked
16613 +  char *p = (char *) ferror_unlocked;
16614 +#endif
16615  
16616 -    char *realloc ();
16617 -    int
16618 -    main ()
16619 -    {
16620 -      exit (realloc (0, 0) ? 0 : 1);
16621 -    }
16622 -         
16623 -EOF
16624 -if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16625 -then
16626 -  jm_cv_func_working_realloc=yes
16627 +  ;
16628 +  return 0;
16629 +}
16630 +_ACEOF
16631 +rm -f conftest.$ac_objext
16632 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16633 +  (eval $ac_compile) 2>&5
16634 +  ac_status=$?
16635 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636 +  (exit $ac_status); } &&
16637 +         { ac_try='test -s conftest.$ac_objext'
16638 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16639 +  (eval $ac_try) 2>&5
16640 +  ac_status=$?
16641 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642 +  (exit $ac_status); }; }; then
16643 +  ac_cv_have_decl_ferror_unlocked=yes
16644  else
16645 -  echo "configure: failed program was:" >&5
16646 -  cat conftest.$ac_ext >&5
16647 -  rm -fr conftest*
16648 -  jm_cv_func_working_realloc=no
16649 +  echo "$as_me: failed program was:" >&5
16650 +sed 's/^/| /' conftest.$ac_ext >&5
16651 +
16652 +ac_cv_have_decl_ferror_unlocked=no
16653  fi
16654 -rm -fr conftest*
16655 +rm -f conftest.$ac_objext conftest.$ac_ext
16656  fi
16657 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
16658 +echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
16659 +if test $ac_cv_have_decl_ferror_unlocked = yes; then
16660 +
16661 +cat >>confdefs.h <<_ACEOF
16662 +#define HAVE_DECL_FERROR_UNLOCKED 1
16663 +_ACEOF
16664 +
16665 +
16666 +else
16667 +  cat >>confdefs.h <<_ACEOF
16668 +#define HAVE_DECL_FERROR_UNLOCKED 0
16669 +_ACEOF
16670 +
16671  
16672 -  
16673  fi
16674  
16675 -echo "$ac_t""$jm_cv_func_working_realloc" 1>&6
16676 -  if test $jm_cv_func_working_realloc = no; then
16677 -    
16678 -    LIBOBJS="$LIBOBJS realloc.$ac_objext"
16679 -    cat >> confdefs.h <<EOF
16680 -#define realloc rpl_realloc
16681 -EOF
16682 +
16683 +
16684 +
16685 +      echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
16686 +echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6
16687 +if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then
16688 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16689 +else
16690 +  cat >conftest.$ac_ext <<_ACEOF
16691 +#line $LINENO "configure"
16692 +/* confdefs.h.  */
16693 +_ACEOF
16694 +cat confdefs.h >>conftest.$ac_ext
16695 +cat >>conftest.$ac_ext <<_ACEOF
16696 +/* end confdefs.h.  */
16697 +$ac_includes_default
16698 +int
16699 +main ()
16700 +{
16701 +#ifndef fflush_unlocked
16702 +  char *p = (char *) fflush_unlocked;
16703 +#endif
16704 +
16705 +  ;
16706 +  return 0;
16707 +}
16708 +_ACEOF
16709 +rm -f conftest.$ac_objext
16710 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16711 +  (eval $ac_compile) 2>&5
16712 +  ac_status=$?
16713 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16714 +  (exit $ac_status); } &&
16715 +         { ac_try='test -s conftest.$ac_objext'
16716 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16717 +  (eval $ac_try) 2>&5
16718 +  ac_status=$?
16719 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16720 +  (exit $ac_status); }; }; then
16721 +  ac_cv_have_decl_fflush_unlocked=yes
16722 +else
16723 +  echo "$as_me: failed program was:" >&5
16724 +sed 's/^/| /' conftest.$ac_ext >&5
16725 +
16726 +ac_cv_have_decl_fflush_unlocked=no
16727 +fi
16728 +rm -f conftest.$ac_objext conftest.$ac_ext
16729 +fi
16730 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
16731 +echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
16732 +if test $ac_cv_have_decl_fflush_unlocked = yes; then
16733 +
16734 +cat >>confdefs.h <<_ACEOF
16735 +#define HAVE_DECL_FFLUSH_UNLOCKED 1
16736 +_ACEOF
16737 +
16738 +
16739 +else
16740 +  cat >>confdefs.h <<_ACEOF
16741 +#define HAVE_DECL_FFLUSH_UNLOCKED 0
16742 +_ACEOF
16743 +
16744 +
16745 +fi
16746 +
16747 +
16748 +
16749 +
16750 +      echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
16751 +echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
16752 +if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
16753 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16754 +else
16755 +  cat >conftest.$ac_ext <<_ACEOF
16756 +#line $LINENO "configure"
16757 +/* confdefs.h.  */
16758 +_ACEOF
16759 +cat confdefs.h >>conftest.$ac_ext
16760 +cat >>conftest.$ac_ext <<_ACEOF
16761 +/* end confdefs.h.  */
16762 +$ac_includes_default
16763 +int
16764 +main ()
16765 +{
16766 +#ifndef fgets_unlocked
16767 +  char *p = (char *) fgets_unlocked;
16768 +#endif
16769 +
16770 +  ;
16771 +  return 0;
16772 +}
16773 +_ACEOF
16774 +rm -f conftest.$ac_objext
16775 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16776 +  (eval $ac_compile) 2>&5
16777 +  ac_status=$?
16778 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779 +  (exit $ac_status); } &&
16780 +         { ac_try='test -s conftest.$ac_objext'
16781 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782 +  (eval $ac_try) 2>&5
16783 +  ac_status=$?
16784 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785 +  (exit $ac_status); }; }; then
16786 +  ac_cv_have_decl_fgets_unlocked=yes
16787 +else
16788 +  echo "$as_me: failed program was:" >&5
16789 +sed 's/^/| /' conftest.$ac_ext >&5
16790 +
16791 +ac_cv_have_decl_fgets_unlocked=no
16792 +fi
16793 +rm -f conftest.$ac_objext conftest.$ac_ext
16794 +fi
16795 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
16796 +echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
16797 +if test $ac_cv_have_decl_fgets_unlocked = yes; then
16798 +
16799 +cat >>confdefs.h <<_ACEOF
16800 +#define HAVE_DECL_FGETS_UNLOCKED 1
16801 +_ACEOF
16802 +
16803 +
16804 +else
16805 +  cat >>confdefs.h <<_ACEOF
16806 +#define HAVE_DECL_FGETS_UNLOCKED 0
16807 +_ACEOF
16808 +
16809 +
16810 +fi
16811 +
16812 +
16813 +
16814 +
16815 +      echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
16816 +echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
16817 +if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
16818 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16819 +else
16820 +  cat >conftest.$ac_ext <<_ACEOF
16821 +#line $LINENO "configure"
16822 +/* confdefs.h.  */
16823 +_ACEOF
16824 +cat confdefs.h >>conftest.$ac_ext
16825 +cat >>conftest.$ac_ext <<_ACEOF
16826 +/* end confdefs.h.  */
16827 +$ac_includes_default
16828 +int
16829 +main ()
16830 +{
16831 +#ifndef fputc_unlocked
16832 +  char *p = (char *) fputc_unlocked;
16833 +#endif
16834 +
16835 +  ;
16836 +  return 0;
16837 +}
16838 +_ACEOF
16839 +rm -f conftest.$ac_objext
16840 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16841 +  (eval $ac_compile) 2>&5
16842 +  ac_status=$?
16843 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 +  (exit $ac_status); } &&
16845 +         { ac_try='test -s conftest.$ac_objext'
16846 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16847 +  (eval $ac_try) 2>&5
16848 +  ac_status=$?
16849 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850 +  (exit $ac_status); }; }; then
16851 +  ac_cv_have_decl_fputc_unlocked=yes
16852 +else
16853 +  echo "$as_me: failed program was:" >&5
16854 +sed 's/^/| /' conftest.$ac_ext >&5
16855 +
16856 +ac_cv_have_decl_fputc_unlocked=no
16857 +fi
16858 +rm -f conftest.$ac_objext conftest.$ac_ext
16859 +fi
16860 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
16861 +echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
16862 +if test $ac_cv_have_decl_fputc_unlocked = yes; then
16863 +
16864 +cat >>confdefs.h <<_ACEOF
16865 +#define HAVE_DECL_FPUTC_UNLOCKED 1
16866 +_ACEOF
16867 +
16868 +
16869 +else
16870 +  cat >>confdefs.h <<_ACEOF
16871 +#define HAVE_DECL_FPUTC_UNLOCKED 0
16872 +_ACEOF
16873 +
16874 +
16875 +fi
16876 +
16877 +
16878 +
16879 +
16880 +      echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
16881 +echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
16882 +if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
16883 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16884 +else
16885 +  cat >conftest.$ac_ext <<_ACEOF
16886 +#line $LINENO "configure"
16887 +/* confdefs.h.  */
16888 +_ACEOF
16889 +cat confdefs.h >>conftest.$ac_ext
16890 +cat >>conftest.$ac_ext <<_ACEOF
16891 +/* end confdefs.h.  */
16892 +$ac_includes_default
16893 +int
16894 +main ()
16895 +{
16896 +#ifndef fputs_unlocked
16897 +  char *p = (char *) fputs_unlocked;
16898 +#endif
16899 +
16900 +  ;
16901 +  return 0;
16902 +}
16903 +_ACEOF
16904 +rm -f conftest.$ac_objext
16905 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16906 +  (eval $ac_compile) 2>&5
16907 +  ac_status=$?
16908 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16909 +  (exit $ac_status); } &&
16910 +         { ac_try='test -s conftest.$ac_objext'
16911 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16912 +  (eval $ac_try) 2>&5
16913 +  ac_status=$?
16914 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16915 +  (exit $ac_status); }; }; then
16916 +  ac_cv_have_decl_fputs_unlocked=yes
16917 +else
16918 +  echo "$as_me: failed program was:" >&5
16919 +sed 's/^/| /' conftest.$ac_ext >&5
16920 +
16921 +ac_cv_have_decl_fputs_unlocked=no
16922 +fi
16923 +rm -f conftest.$ac_objext conftest.$ac_ext
16924 +fi
16925 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
16926 +echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
16927 +if test $ac_cv_have_decl_fputs_unlocked = yes; then
16928 +
16929 +cat >>confdefs.h <<_ACEOF
16930 +#define HAVE_DECL_FPUTS_UNLOCKED 1
16931 +_ACEOF
16932 +
16933 +
16934 +else
16935 +  cat >>confdefs.h <<_ACEOF
16936 +#define HAVE_DECL_FPUTS_UNLOCKED 0
16937 +_ACEOF
16938 +
16939 +
16940 +fi
16941 +
16942 +
16943 +
16944 +
16945 +      echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
16946 +echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6
16947 +if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then
16948 +  echo $ECHO_N "(cached) $ECHO_C" >&6
16949 +else
16950 +  cat >conftest.$ac_ext <<_ACEOF
16951 +#line $LINENO "configure"
16952 +/* confdefs.h.  */
16953 +_ACEOF
16954 +cat confdefs.h >>conftest.$ac_ext
16955 +cat >>conftest.$ac_ext <<_ACEOF
16956 +/* end confdefs.h.  */
16957 +$ac_includes_default
16958 +int
16959 +main ()
16960 +{
16961 +#ifndef fread_unlocked
16962 +  char *p = (char *) fread_unlocked;
16963 +#endif
16964 +
16965 +  ;
16966 +  return 0;
16967 +}
16968 +_ACEOF
16969 +rm -f conftest.$ac_objext
16970 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16971 +  (eval $ac_compile) 2>&5
16972 +  ac_status=$?
16973 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974 +  (exit $ac_status); } &&
16975 +         { ac_try='test -s conftest.$ac_objext'
16976 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16977 +  (eval $ac_try) 2>&5
16978 +  ac_status=$?
16979 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16980 +  (exit $ac_status); }; }; then
16981 +  ac_cv_have_decl_fread_unlocked=yes
16982 +else
16983 +  echo "$as_me: failed program was:" >&5
16984 +sed 's/^/| /' conftest.$ac_ext >&5
16985 +
16986 +ac_cv_have_decl_fread_unlocked=no
16987 +fi
16988 +rm -f conftest.$ac_objext conftest.$ac_ext
16989 +fi
16990 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
16991 +echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
16992 +if test $ac_cv_have_decl_fread_unlocked = yes; then
16993 +
16994 +cat >>confdefs.h <<_ACEOF
16995 +#define HAVE_DECL_FREAD_UNLOCKED 1
16996 +_ACEOF
16997 +
16998 +
16999 +else
17000 +  cat >>confdefs.h <<_ACEOF
17001 +#define HAVE_DECL_FREAD_UNLOCKED 0
17002 +_ACEOF
17003 +
17004 +
17005 +fi
17006 +
17007 +
17008 +
17009 +
17010 +      echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
17011 +echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
17012 +if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
17013 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17014 +else
17015 +  cat >conftest.$ac_ext <<_ACEOF
17016 +#line $LINENO "configure"
17017 +/* confdefs.h.  */
17018 +_ACEOF
17019 +cat confdefs.h >>conftest.$ac_ext
17020 +cat >>conftest.$ac_ext <<_ACEOF
17021 +/* end confdefs.h.  */
17022 +$ac_includes_default
17023 +int
17024 +main ()
17025 +{
17026 +#ifndef fwrite_unlocked
17027 +  char *p = (char *) fwrite_unlocked;
17028 +#endif
17029 +
17030 +  ;
17031 +  return 0;
17032 +}
17033 +_ACEOF
17034 +rm -f conftest.$ac_objext
17035 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17036 +  (eval $ac_compile) 2>&5
17037 +  ac_status=$?
17038 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17039 +  (exit $ac_status); } &&
17040 +         { ac_try='test -s conftest.$ac_objext'
17041 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17042 +  (eval $ac_try) 2>&5
17043 +  ac_status=$?
17044 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045 +  (exit $ac_status); }; }; then
17046 +  ac_cv_have_decl_fwrite_unlocked=yes
17047 +else
17048 +  echo "$as_me: failed program was:" >&5
17049 +sed 's/^/| /' conftest.$ac_ext >&5
17050 +
17051 +ac_cv_have_decl_fwrite_unlocked=no
17052 +fi
17053 +rm -f conftest.$ac_objext conftest.$ac_ext
17054 +fi
17055 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
17056 +echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
17057 +if test $ac_cv_have_decl_fwrite_unlocked = yes; then
17058 +
17059 +cat >>confdefs.h <<_ACEOF
17060 +#define HAVE_DECL_FWRITE_UNLOCKED 1
17061 +_ACEOF
17062 +
17063 +
17064 +else
17065 +  cat >>confdefs.h <<_ACEOF
17066 +#define HAVE_DECL_FWRITE_UNLOCKED 0
17067 +_ACEOF
17068 +
17069 +
17070 +fi
17071 +
17072 +
17073 +
17074 +
17075 +      echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
17076 +echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
17077 +if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
17078 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17079 +else
17080 +  cat >conftest.$ac_ext <<_ACEOF
17081 +#line $LINENO "configure"
17082 +/* confdefs.h.  */
17083 +_ACEOF
17084 +cat confdefs.h >>conftest.$ac_ext
17085 +cat >>conftest.$ac_ext <<_ACEOF
17086 +/* end confdefs.h.  */
17087 +$ac_includes_default
17088 +int
17089 +main ()
17090 +{
17091 +#ifndef getc_unlocked
17092 +  char *p = (char *) getc_unlocked;
17093 +#endif
17094 +
17095 +  ;
17096 +  return 0;
17097 +}
17098 +_ACEOF
17099 +rm -f conftest.$ac_objext
17100 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17101 +  (eval $ac_compile) 2>&5
17102 +  ac_status=$?
17103 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17104 +  (exit $ac_status); } &&
17105 +         { ac_try='test -s conftest.$ac_objext'
17106 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17107 +  (eval $ac_try) 2>&5
17108 +  ac_status=$?
17109 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110 +  (exit $ac_status); }; }; then
17111 +  ac_cv_have_decl_getc_unlocked=yes
17112 +else
17113 +  echo "$as_me: failed program was:" >&5
17114 +sed 's/^/| /' conftest.$ac_ext >&5
17115 +
17116 +ac_cv_have_decl_getc_unlocked=no
17117 +fi
17118 +rm -f conftest.$ac_objext conftest.$ac_ext
17119 +fi
17120 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
17121 +echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
17122 +if test $ac_cv_have_decl_getc_unlocked = yes; then
17123 +
17124 +cat >>confdefs.h <<_ACEOF
17125 +#define HAVE_DECL_GETC_UNLOCKED 1
17126 +_ACEOF
17127 +
17128 +
17129 +else
17130 +  cat >>confdefs.h <<_ACEOF
17131 +#define HAVE_DECL_GETC_UNLOCKED 0
17132 +_ACEOF
17133 +
17134 +
17135 +fi
17136 +
17137 +
17138 +
17139 +
17140 +      echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
17141 +echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6
17142 +if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then
17143 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17144 +else
17145 +  cat >conftest.$ac_ext <<_ACEOF
17146 +#line $LINENO "configure"
17147 +/* confdefs.h.  */
17148 +_ACEOF
17149 +cat confdefs.h >>conftest.$ac_ext
17150 +cat >>conftest.$ac_ext <<_ACEOF
17151 +/* end confdefs.h.  */
17152 +$ac_includes_default
17153 +int
17154 +main ()
17155 +{
17156 +#ifndef getchar_unlocked
17157 +  char *p = (char *) getchar_unlocked;
17158 +#endif
17159 +
17160 +  ;
17161 +  return 0;
17162 +}
17163 +_ACEOF
17164 +rm -f conftest.$ac_objext
17165 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17166 +  (eval $ac_compile) 2>&5
17167 +  ac_status=$?
17168 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17169 +  (exit $ac_status); } &&
17170 +         { ac_try='test -s conftest.$ac_objext'
17171 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17172 +  (eval $ac_try) 2>&5
17173 +  ac_status=$?
17174 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17175 +  (exit $ac_status); }; }; then
17176 +  ac_cv_have_decl_getchar_unlocked=yes
17177 +else
17178 +  echo "$as_me: failed program was:" >&5
17179 +sed 's/^/| /' conftest.$ac_ext >&5
17180 +
17181 +ac_cv_have_decl_getchar_unlocked=no
17182 +fi
17183 +rm -f conftest.$ac_objext conftest.$ac_ext
17184 +fi
17185 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
17186 +echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
17187 +if test $ac_cv_have_decl_getchar_unlocked = yes; then
17188 +
17189 +cat >>confdefs.h <<_ACEOF
17190 +#define HAVE_DECL_GETCHAR_UNLOCKED 1
17191 +_ACEOF
17192 +
17193 +
17194 +else
17195 +  cat >>confdefs.h <<_ACEOF
17196 +#define HAVE_DECL_GETCHAR_UNLOCKED 0
17197 +_ACEOF
17198 +
17199 +
17200 +fi
17201 +
17202 +
17203 +
17204 +
17205 +      echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
17206 +echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
17207 +if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
17208 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17209 +else
17210 +  cat >conftest.$ac_ext <<_ACEOF
17211 +#line $LINENO "configure"
17212 +/* confdefs.h.  */
17213 +_ACEOF
17214 +cat confdefs.h >>conftest.$ac_ext
17215 +cat >>conftest.$ac_ext <<_ACEOF
17216 +/* end confdefs.h.  */
17217 +$ac_includes_default
17218 +int
17219 +main ()
17220 +{
17221 +#ifndef putc_unlocked
17222 +  char *p = (char *) putc_unlocked;
17223 +#endif
17224 +
17225 +  ;
17226 +  return 0;
17227 +}
17228 +_ACEOF
17229 +rm -f conftest.$ac_objext
17230 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17231 +  (eval $ac_compile) 2>&5
17232 +  ac_status=$?
17233 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17234 +  (exit $ac_status); } &&
17235 +         { ac_try='test -s conftest.$ac_objext'
17236 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17237 +  (eval $ac_try) 2>&5
17238 +  ac_status=$?
17239 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240 +  (exit $ac_status); }; }; then
17241 +  ac_cv_have_decl_putc_unlocked=yes
17242 +else
17243 +  echo "$as_me: failed program was:" >&5
17244 +sed 's/^/| /' conftest.$ac_ext >&5
17245 +
17246 +ac_cv_have_decl_putc_unlocked=no
17247 +fi
17248 +rm -f conftest.$ac_objext conftest.$ac_ext
17249 +fi
17250 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
17251 +echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
17252 +if test $ac_cv_have_decl_putc_unlocked = yes; then
17253 +
17254 +cat >>confdefs.h <<_ACEOF
17255 +#define HAVE_DECL_PUTC_UNLOCKED 1
17256 +_ACEOF
17257 +
17258 +
17259 +else
17260 +  cat >>confdefs.h <<_ACEOF
17261 +#define HAVE_DECL_PUTC_UNLOCKED 0
17262 +_ACEOF
17263 +
17264 +
17265 +fi
17266 +
17267 +
17268 +
17269 +
17270 +      echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
17271 +echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6
17272 +if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then
17273 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17274 +else
17275 +  cat >conftest.$ac_ext <<_ACEOF
17276 +#line $LINENO "configure"
17277 +/* confdefs.h.  */
17278 +_ACEOF
17279 +cat confdefs.h >>conftest.$ac_ext
17280 +cat >>conftest.$ac_ext <<_ACEOF
17281 +/* end confdefs.h.  */
17282 +$ac_includes_default
17283 +int
17284 +main ()
17285 +{
17286 +#ifndef putchar_unlocked
17287 +  char *p = (char *) putchar_unlocked;
17288 +#endif
17289 +
17290 +  ;
17291 +  return 0;
17292 +}
17293 +_ACEOF
17294 +rm -f conftest.$ac_objext
17295 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17296 +  (eval $ac_compile) 2>&5
17297 +  ac_status=$?
17298 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299 +  (exit $ac_status); } &&
17300 +         { ac_try='test -s conftest.$ac_objext'
17301 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17302 +  (eval $ac_try) 2>&5
17303 +  ac_status=$?
17304 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17305 +  (exit $ac_status); }; }; then
17306 +  ac_cv_have_decl_putchar_unlocked=yes
17307 +else
17308 +  echo "$as_me: failed program was:" >&5
17309 +sed 's/^/| /' conftest.$ac_ext >&5
17310 +
17311 +ac_cv_have_decl_putchar_unlocked=no
17312 +fi
17313 +rm -f conftest.$ac_objext conftest.$ac_ext
17314 +fi
17315 +echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
17316 +echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
17317 +if test $ac_cv_have_decl_putchar_unlocked = yes; then
17318 +
17319 +cat >>confdefs.h <<_ACEOF
17320 +#define HAVE_DECL_PUTCHAR_UNLOCKED 1
17321 +_ACEOF
17322 +
17323 +
17324 +else
17325 +  cat >>confdefs.h <<_ACEOF
17326 +#define HAVE_DECL_PUTCHAR_UNLOCKED 0
17327 +_ACEOF
17328 +
17329 +
17330 +fi
17331 +
17332 +
17333 +
17334 +
17335 +
17336 +
17337 +
17338 +  :
17339 +
17340 +
17341 +
17342 +
17343 +
17344 +
17345 +
17346 +
17347 +
17348 +
17349 +
17350 +
17351 +
17352 +
17353 +
17354 +
17355 +
17356 +
17357 +
17358 +
17359 +
17360 +
17361 +
17362 +
17363 +
17364 +
17365 +
17366 +
17367 +
17368 +
17369 +
17370 +
17371 +
17372 +
17373 +
17374 +
17375 +
17376 +
17377 +
17378 +
17379 +
17380 +
17381 +
17382 +
17383 +    if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
17384 +
17385 +  :
17386  
17387    fi
17388  
17389 -echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
17390 -echo "configure:2668: checking whether closedir returns void" >&5
17391 -if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
17392 -  echo $ac_n "(cached) $ac_c" 1>&6
17393 +
17394 +
17395 +    if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
17396 +
17397 +  :
17398 +
17399 +  fi
17400 +
17401 +echo "$as_me:$LINENO: checking whether closedir returns void" >&5
17402 +echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
17403 +if test "${ac_cv_func_closedir_void+set}" = set; then
17404 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17405  else
17406    if test "$cross_compiling" = yes; then
17407    ac_cv_func_closedir_void=yes
17408  else
17409 -  cat > conftest.$ac_ext <<EOF
17410 -#line 2676 "configure"
17411 -#include "confdefs.h"
17412 -#include <sys/types.h>
17413 +  cat >conftest.$ac_ext <<_ACEOF
17414 +#line $LINENO "configure"
17415 +/* confdefs.h.  */
17416 +_ACEOF
17417 +cat confdefs.h >>conftest.$ac_ext
17418 +cat >>conftest.$ac_ext <<_ACEOF
17419 +/* end confdefs.h.  */
17420 +$ac_includes_default
17421  #include <$ac_header_dirent>
17422 -int closedir(); main() { exit(closedir(opendir(".")) != 0); }
17423 -EOF
17424 -if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
17425 -then
17426 +#ifndef __cplusplus
17427 +int closedir ();
17428 +#endif
17429 +
17430 +int
17431 +main ()
17432 +{
17433 +exit (closedir (opendir (".")) != 0);
17434 +  ;
17435 +  return 0;
17436 +}
17437 +_ACEOF
17438 +rm -f conftest$ac_exeext
17439 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17440 +  (eval $ac_link) 2>&5
17441 +  ac_status=$?
17442 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17443 +  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17444 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17445 +  (eval $ac_try) 2>&5
17446 +  ac_status=$?
17447 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448 +  (exit $ac_status); }; }; then
17449    ac_cv_func_closedir_void=no
17450  else
17451 -  echo "configure: failed program was:" >&5
17452 -  cat conftest.$ac_ext >&5
17453 -  rm -fr conftest*
17454 -  ac_cv_func_closedir_void=yes
17455 +  echo "$as_me: program exited with status $ac_status" >&5
17456 +echo "$as_me: failed program was:" >&5
17457 +sed 's/^/| /' conftest.$ac_ext >&5
17458 +
17459 +( exit $ac_status )
17460 +ac_cv_func_closedir_void=yes
17461  fi
17462 -rm -fr conftest*
17463 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17464  fi
17465 -
17466  fi
17467 -
17468 -echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
17469 +echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
17470 +echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
17471  if test $ac_cv_func_closedir_void = yes; then
17472 -  cat >> confdefs.h <<\EOF
17473 +
17474 +cat >>confdefs.h <<\_ACEOF
17475  #define CLOSEDIR_VOID 1
17476 -EOF
17477 +_ACEOF
17478  
17479  fi
17480  
17481 -echo $ac_n "checking for vprintf""... $ac_c" 1>&6
17482 -echo "configure:2705: checking for vprintf" >&5
17483 -if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
17484 -  echo $ac_n "(cached) $ac_c" 1>&6
17485 +
17486 +
17487 +for ac_header in fcntl.h unistd.h
17488 +do
17489 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17490 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
17491 +  echo "$as_me:$LINENO: checking for $ac_header" >&5
17492 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17493 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
17494 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17495 +fi
17496 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17497 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17498  else
17499 -  cat > conftest.$ac_ext <<EOF
17500 -#line 2710 "configure"
17501 -#include "confdefs.h"
17502 +  # Is the header compilable?
17503 +echo "$as_me:$LINENO: checking $ac_header usability" >&5
17504 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17505 +cat >conftest.$ac_ext <<_ACEOF
17506 +#line $LINENO "configure"
17507 +/* confdefs.h.  */
17508 +_ACEOF
17509 +cat confdefs.h >>conftest.$ac_ext
17510 +cat >>conftest.$ac_ext <<_ACEOF
17511 +/* end confdefs.h.  */
17512 +$ac_includes_default
17513 +#include <$ac_header>
17514 +_ACEOF
17515 +rm -f conftest.$ac_objext
17516 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17517 +  (eval $ac_compile) 2>&5
17518 +  ac_status=$?
17519 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17520 +  (exit $ac_status); } &&
17521 +         { ac_try='test -s conftest.$ac_objext'
17522 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17523 +  (eval $ac_try) 2>&5
17524 +  ac_status=$?
17525 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526 +  (exit $ac_status); }; }; then
17527 +  ac_header_compiler=yes
17528 +else
17529 +  echo "$as_me: failed program was:" >&5
17530 +sed 's/^/| /' conftest.$ac_ext >&5
17531 +
17532 +ac_header_compiler=no
17533 +fi
17534 +rm -f conftest.$ac_objext conftest.$ac_ext
17535 +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17536 +echo "${ECHO_T}$ac_header_compiler" >&6
17537 +
17538 +# Is the header present?
17539 +echo "$as_me:$LINENO: checking $ac_header presence" >&5
17540 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17541 +cat >conftest.$ac_ext <<_ACEOF
17542 +#line $LINENO "configure"
17543 +/* confdefs.h.  */
17544 +_ACEOF
17545 +cat confdefs.h >>conftest.$ac_ext
17546 +cat >>conftest.$ac_ext <<_ACEOF
17547 +/* end confdefs.h.  */
17548 +#include <$ac_header>
17549 +_ACEOF
17550 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17551 +  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17552 +  ac_status=$?
17553 +  grep -v '^ *+' conftest.er1 >conftest.err
17554 +  rm -f conftest.er1
17555 +  cat conftest.err >&5
17556 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557 +  (exit $ac_status); } >/dev/null; then
17558 +  if test -s conftest.err; then
17559 +    ac_cpp_err=$ac_c_preproc_warn_flag
17560 +  else
17561 +    ac_cpp_err=
17562 +  fi
17563 +else
17564 +  ac_cpp_err=yes
17565 +fi
17566 +if test -z "$ac_cpp_err"; then
17567 +  ac_header_preproc=yes
17568 +else
17569 +  echo "$as_me: failed program was:" >&5
17570 +sed 's/^/| /' conftest.$ac_ext >&5
17571 +
17572 +  ac_header_preproc=no
17573 +fi
17574 +rm -f conftest.err conftest.$ac_ext
17575 +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17576 +echo "${ECHO_T}$ac_header_preproc" >&6
17577 +
17578 +# So?  What about this header?
17579 +case $ac_header_compiler:$ac_header_preproc in
17580 +  yes:no )
17581 +    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17582 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17583 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17584 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17585 +    (
17586 +      cat <<\_ASBOX
17587 +## ------------------------------------ ##
17588 +## Report this to bug-autoconf@gnu.org. ##
17589 +## ------------------------------------ ##
17590 +_ASBOX
17591 +    ) |
17592 +      sed "s/^/$as_me: WARNING:     /" >&2
17593 +    ;;
17594 +  no:yes )
17595 +    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17596 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17597 +    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17598 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17599 +    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17600 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17601 +    (
17602 +      cat <<\_ASBOX
17603 +## ------------------------------------ ##
17604 +## Report this to bug-autoconf@gnu.org. ##
17605 +## ------------------------------------ ##
17606 +_ASBOX
17607 +    ) |
17608 +      sed "s/^/$as_me: WARNING:     /" >&2
17609 +    ;;
17610 +esac
17611 +echo "$as_me:$LINENO: checking for $ac_header" >&5
17612 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17613 +if eval "test \"\${$as_ac_Header+set}\" = set"; then
17614 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17615 +else
17616 +  eval "$as_ac_Header=$ac_header_preproc"
17617 +fi
17618 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17619 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17620 +
17621 +fi
17622 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
17623 +  cat >>confdefs.h <<_ACEOF
17624 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17625 +_ACEOF
17626 +
17627 +fi
17628 +
17629 +done
17630 +
17631 +   echo "$as_me:$LINENO: checking for DOS-style setmode" >&5
17632 +echo $ECHO_N "checking for DOS-style setmode... $ECHO_C" >&6
17633 +if test "${ac_cv_func_setmode_dos+set}" = set; then
17634 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17635 +else
17636 +  cat >conftest.$ac_ext <<_ACEOF
17637 +#line $LINENO "configure"
17638 +/* confdefs.h.  */
17639 +_ACEOF
17640 +cat confdefs.h >>conftest.$ac_ext
17641 +cat >>conftest.$ac_ext <<_ACEOF
17642 +/* end confdefs.h.  */
17643 +#include <io.h>
17644 +        #if HAVE_FCNTL_H
17645 +        # include <fcntl.h>
17646 +        #endif
17647 +        #if HAVE_UNISTD_H
17648 +        # include <unistd.h>
17649 +        #endif
17650 +int
17651 +main ()
17652 +{
17653 +int ret = setmode && setmode (1, O_BINARY);
17654 +  ;
17655 +  return 0;
17656 +}
17657 +_ACEOF
17658 +rm -f conftest.$ac_objext conftest$ac_exeext
17659 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17660 +  (eval $ac_link) 2>&5
17661 +  ac_status=$?
17662 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17663 +  (exit $ac_status); } &&
17664 +         { ac_try='test -s conftest$ac_exeext'
17665 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17666 +  (eval $ac_try) 2>&5
17667 +  ac_status=$?
17668 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17669 +  (exit $ac_status); }; }; then
17670 +  ac_cv_func_setmode_dos=yes
17671 +else
17672 +  echo "$as_me: failed program was:" >&5
17673 +sed 's/^/| /' conftest.$ac_ext >&5
17674 +
17675 +ac_cv_func_setmode_dos=no
17676 +fi
17677 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17678 +fi
17679 +echo "$as_me:$LINENO: result: $ac_cv_func_setmode_dos" >&5
17680 +echo "${ECHO_T}$ac_cv_func_setmode_dos" >&6
17681 +   if test $ac_cv_func_setmode_dos = yes; then
17682 +
17683 +cat >>confdefs.h <<\_ACEOF
17684 +#define HAVE_SETMODE_DOS 1
17685 +_ACEOF
17686 +
17687 +   fi
17688 +
17689 +for ac_func in vprintf
17690 +do
17691 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17692 +echo "$as_me:$LINENO: checking for $ac_func" >&5
17693 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17694 +if eval "test \"\${$as_ac_var+set}\" = set"; then
17695 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17696 +else
17697 +  cat >conftest.$ac_ext <<_ACEOF
17698 +#line $LINENO "configure"
17699 +/* confdefs.h.  */
17700 +_ACEOF
17701 +cat confdefs.h >>conftest.$ac_ext
17702 +cat >>conftest.$ac_ext <<_ACEOF
17703 +/* end confdefs.h.  */
17704  /* System header to define __stub macros and hopefully few prototypes,
17705 -    which can conflict with char vprintf(); below.  */
17706 -#include <assert.h>
17707 +    which can conflict with char $ac_func (); below.
17708 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17709 +    <limits.h> exists even on freestanding compilers.  */
17710 +#ifdef __STDC__
17711 +# include <limits.h>
17712 +#else
17713 +# include <assert.h>
17714 +#endif
17715  /* Override any gcc2 internal prototype to avoid an error.  */
17716 +#ifdef __cplusplus
17717 +extern "C"
17718 +{
17719 +#endif
17720  /* We use char because int might match the return type of a gcc2
17721 -    builtin and then its argument prototype would still apply.  */
17722 -char vprintf();
17723 +   builtin and then its argument prototype would still apply.  */
17724 +char $ac_func ();
17725 +/* The GNU C library defines this for functions which it implements
17726 +    to always fail with ENOSYS.  Some functions are actually named
17727 +    something starting with __ and the normal name is an alias.  */
17728 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17729 +choke me
17730 +#else
17731 +char (*f) () = $ac_func;
17732 +#endif
17733 +#ifdef __cplusplus
17734 +}
17735 +#endif
17736  
17737 -int main() {
17738 +int
17739 +main ()
17740 +{
17741 +return f != $ac_func;
17742 +  ;
17743 +  return 0;
17744 +}
17745 +_ACEOF
17746 +rm -f conftest.$ac_objext conftest$ac_exeext
17747 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17748 +  (eval $ac_link) 2>&5
17749 +  ac_status=$?
17750 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17751 +  (exit $ac_status); } &&
17752 +         { ac_try='test -s conftest$ac_exeext'
17753 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17754 +  (eval $ac_try) 2>&5
17755 +  ac_status=$?
17756 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757 +  (exit $ac_status); }; }; then
17758 +  eval "$as_ac_var=yes"
17759 +else
17760 +  echo "$as_me: failed program was:" >&5
17761 +sed 's/^/| /' conftest.$ac_ext >&5
17762  
17763 +eval "$as_ac_var=no"
17764 +fi
17765 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17766 +fi
17767 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17768 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17769 +if test `eval echo '${'$as_ac_var'}'` = yes; then
17770 +  cat >>confdefs.h <<_ACEOF
17771 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17772 +_ACEOF
17773 +
17774 +echo "$as_me:$LINENO: checking for _doprnt" >&5
17775 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
17776 +if test "${ac_cv_func__doprnt+set}" = set; then
17777 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17778 +else
17779 +  cat >conftest.$ac_ext <<_ACEOF
17780 +#line $LINENO "configure"
17781 +/* confdefs.h.  */
17782 +_ACEOF
17783 +cat confdefs.h >>conftest.$ac_ext
17784 +cat >>conftest.$ac_ext <<_ACEOF
17785 +/* end confdefs.h.  */
17786 +/* System header to define __stub macros and hopefully few prototypes,
17787 +    which can conflict with char _doprnt (); below.
17788 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17789 +    <limits.h> exists even on freestanding compilers.  */
17790 +#ifdef __STDC__
17791 +# include <limits.h>
17792 +#else
17793 +# include <assert.h>
17794 +#endif
17795 +/* Override any gcc2 internal prototype to avoid an error.  */
17796 +#ifdef __cplusplus
17797 +extern "C"
17798 +{
17799 +#endif
17800 +/* We use char because int might match the return type of a gcc2
17801 +   builtin and then its argument prototype would still apply.  */
17802 +char _doprnt ();
17803  /* The GNU C library defines this for functions which it implements
17804      to always fail with ENOSYS.  Some functions are actually named
17805      something starting with __ and the normal name is an alias.  */
17806 -#if defined (__stub_vprintf) || defined (__stub___vprintf)
17807 +#if defined (__stub__doprnt) || defined (__stub____doprnt)
17808  choke me
17809  #else
17810 -vprintf();
17811 +char (*f) () = _doprnt;
17812 +#endif
17813 +#ifdef __cplusplus
17814 +}
17815  #endif
17816  
17817 -; return 0; }
17818 -EOF
17819 -if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17820 -  rm -rf conftest*
17821 -  eval "ac_cv_func_vprintf=yes"
17822 +int
17823 +main ()
17824 +{
17825 +return f != _doprnt;
17826 +  ;
17827 +  return 0;
17828 +}
17829 +_ACEOF
17830 +rm -f conftest.$ac_objext conftest$ac_exeext
17831 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17832 +  (eval $ac_link) 2>&5
17833 +  ac_status=$?
17834 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17835 +  (exit $ac_status); } &&
17836 +         { ac_try='test -s conftest$ac_exeext'
17837 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17838 +  (eval $ac_try) 2>&5
17839 +  ac_status=$?
17840 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17841 +  (exit $ac_status); }; }; then
17842 +  ac_cv_func__doprnt=yes
17843  else
17844 -  echo "configure: failed program was:" >&5
17845 -  cat conftest.$ac_ext >&5
17846 -  rm -rf conftest*
17847 -  eval "ac_cv_func_vprintf=no"
17848 +  echo "$as_me: failed program was:" >&5
17849 +sed 's/^/| /' conftest.$ac_ext >&5
17850 +
17851 +ac_cv_func__doprnt=no
17852  fi
17853 -rm -f conftest*
17854 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17855  fi
17856 +echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
17857 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6
17858 +if test $ac_cv_func__doprnt = yes; then
17859  
17860 -if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
17861 -  echo "$ac_t""yes" 1>&6
17862 -  cat >> confdefs.h <<\EOF
17863 -#define HAVE_VPRINTF 1
17864 -EOF
17865 +cat >>confdefs.h <<\_ACEOF
17866 +#define HAVE_DOPRNT 1
17867 +_ACEOF
17868  
17869 -else
17870 -  echo "$ac_t""no" 1>&6
17871  fi
17872  
17873 -if test "$ac_cv_func_vprintf" != yes; then
17874 -echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
17875 -echo "configure:2757: checking for _doprnt" >&5
17876 -if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
17877 -  echo $ac_n "(cached) $ac_c" 1>&6
17878 +fi
17879 +done
17880 +
17881 +
17882 +
17883 +for ac_func in mkdir
17884 +do
17885 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17886 +echo "$as_me:$LINENO: checking for $ac_func" >&5
17887 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17888 +if eval "test \"\${$as_ac_var+set}\" = set"; then
17889 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17890  else
17891 -  cat > conftest.$ac_ext <<EOF
17892 -#line 2762 "configure"
17893 -#include "confdefs.h"
17894 +  cat >conftest.$ac_ext <<_ACEOF
17895 +#line $LINENO "configure"
17896 +/* confdefs.h.  */
17897 +_ACEOF
17898 +cat confdefs.h >>conftest.$ac_ext
17899 +cat >>conftest.$ac_ext <<_ACEOF
17900 +/* end confdefs.h.  */
17901  /* System header to define __stub macros and hopefully few prototypes,
17902 -    which can conflict with char _doprnt(); below.  */
17903 -#include <assert.h>
17904 +    which can conflict with char $ac_func (); below.
17905 +    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17906 +    <limits.h> exists even on freestanding compilers.  */
17907 +#ifdef __STDC__
17908 +# include <limits.h>
17909 +#else
17910 +# include <assert.h>
17911 +#endif
17912  /* Override any gcc2 internal prototype to avoid an error.  */
17913 +#ifdef __cplusplus
17914 +extern "C"
17915 +{
17916 +#endif
17917  /* We use char because int might match the return type of a gcc2
17918 -    builtin and then its argument prototype would still apply.  */
17919 -char _doprnt();
17920 -
17921 -int main() {
17922 -
17923 +   builtin and then its argument prototype would still apply.  */
17924 +char $ac_func ();
17925  /* The GNU C library defines this for functions which it implements
17926      to always fail with ENOSYS.  Some functions are actually named
17927      something starting with __ and the normal name is an alias.  */
17928 -#if defined (__stub__doprnt) || defined (__stub____doprnt)
17929 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17930  choke me
17931  #else
17932 -_doprnt();
17933 +char (*f) () = $ac_func;
17934 +#endif
17935 +#ifdef __cplusplus
17936 +}
17937  #endif
17938  
17939 -; return 0; }
17940 -EOF
17941 -if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17942 -  rm -rf conftest*
17943 -  eval "ac_cv_func__doprnt=yes"
17944 +int
17945 +main ()
17946 +{
17947 +return f != $ac_func;
17948 +  ;
17949 +  return 0;
17950 +}
17951 +_ACEOF
17952 +rm -f conftest.$ac_objext conftest$ac_exeext
17953 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17954 +  (eval $ac_link) 2>&5
17955 +  ac_status=$?
17956 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17957 +  (exit $ac_status); } &&
17958 +         { ac_try='test -s conftest$ac_exeext'
17959 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17960 +  (eval $ac_try) 2>&5
17961 +  ac_status=$?
17962 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
17963 +  (exit $ac_status); }; }; then
17964 +  eval "$as_ac_var=yes"
17965  else
17966 -  echo "configure: failed program was:" >&5
17967 -  cat conftest.$ac_ext >&5
17968 -  rm -rf conftest*
17969 -  eval "ac_cv_func__doprnt=no"
17970 +  echo "$as_me: failed program was:" >&5
17971 +sed 's/^/| /' conftest.$ac_ext >&5
17972 +
17973 +eval "$as_ac_var=no"
17974  fi
17975 -rm -f conftest*
17976 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17977  fi
17978 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17979 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17980 +if test `eval echo '${'$as_ac_var'}'` = yes; then
17981 +  cat >>confdefs.h <<_ACEOF
17982 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17983 +_ACEOF
17984  
17985 -if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
17986 -  echo "$ac_t""yes" 1>&6
17987 -  cat >> confdefs.h <<\EOF
17988 -#define HAVE_DOPRNT 1
17989 -EOF
17990 +fi
17991 +done
17992  
17993 +   echo "$as_me:$LINENO: checking whether mkdir takes only one argument" >&5
17994 +echo $ECHO_N "checking whether mkdir takes only one argument... $ECHO_C" >&6
17995 +if test "${patch_cv_mkdir_takes_one_arg+set}" = set; then
17996 +  echo $ECHO_N "(cached) $ECHO_C" >&6
17997  else
17998 -  echo "$ac_t""no" 1>&6
17999 +  patch_cv_mkdir_takes_one_arg=no
18000 +      if test $ac_cv_func_mkdir = yes; then
18001 +        cat >conftest.$ac_ext <<_ACEOF
18002 +#line $LINENO "configure"
18003 +/* confdefs.h.  */
18004 +_ACEOF
18005 +cat confdefs.h >>conftest.$ac_ext
18006 +cat >>conftest.$ac_ext <<_ACEOF
18007 +/* end confdefs.h.  */
18008 +
18009 +#include <sys/types.h>
18010 +#include <sys/stat.h>
18011 +
18012 +int
18013 +main ()
18014 +{
18015 +mkdir (".", 0);
18016 +  ;
18017 +  return 0;
18018 +}
18019 +_ACEOF
18020 +rm -f conftest.$ac_objext
18021 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18022 +  (eval $ac_compile) 2>&5
18023 +  ac_status=$?
18024 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025 +  (exit $ac_status); } &&
18026 +         { ac_try='test -s conftest.$ac_objext'
18027 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18028 +  (eval $ac_try) 2>&5
18029 +  ac_status=$?
18030 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031 +  (exit $ac_status); }; }; then
18032 +  :
18033 +else
18034 +  echo "$as_me: failed program was:" >&5
18035 +sed 's/^/| /' conftest.$ac_ext >&5
18036 +
18037 +cat >conftest.$ac_ext <<_ACEOF
18038 +#line $LINENO "configure"
18039 +/* confdefs.h.  */
18040 +_ACEOF
18041 +cat confdefs.h >>conftest.$ac_ext
18042 +cat >>conftest.$ac_ext <<_ACEOF
18043 +/* end confdefs.h.  */
18044 +
18045 +#include <sys/types.h>
18046 +#include <sys/stat.h>
18047 +
18048 +int
18049 +main ()
18050 +{
18051 +mkdir (".");
18052 +  ;
18053 +  return 0;
18054 +}
18055 +_ACEOF
18056 +rm -f conftest.$ac_objext
18057 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18058 +  (eval $ac_compile) 2>&5
18059 +  ac_status=$?
18060 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061 +  (exit $ac_status); } &&
18062 +         { ac_try='test -s conftest.$ac_objext'
18063 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18064 +  (eval $ac_try) 2>&5
18065 +  ac_status=$?
18066 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067 +  (exit $ac_status); }; }; then
18068 +  patch_cv_mkdir_takes_one_arg=yes
18069 +
18070 +else
18071 +  echo "$as_me: failed program was:" >&5
18072 +sed 's/^/| /' conftest.$ac_ext >&5
18073 +
18074  fi
18075 +rm -f conftest.$ac_objext conftest.$ac_ext
18076  
18077  fi
18078 +rm -f conftest.$ac_objext conftest.$ac_ext
18079 +      fi
18080  
18081  
18082 -echo $ac_n "checking for long file names""... $ac_c" 1>&6
18083 -echo "configure:2811: checking for long file names" >&5
18084 -if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
18085 -  echo $ac_n "(cached) $ac_c" 1>&6
18086 +fi
18087 +echo "$as_me:$LINENO: result: $patch_cv_mkdir_takes_one_arg" >&5
18088 +echo "${ECHO_T}$patch_cv_mkdir_takes_one_arg" >&6
18089 +   if test $patch_cv_mkdir_takes_one_arg = yes; then
18090 +
18091 +cat >>confdefs.h <<\_ACEOF
18092 +#define MKDIR_TAKES_ONE_ARG 1
18093 +_ACEOF
18094 +
18095 +   fi
18096 +
18097 +
18098 +
18099 +
18100 +    echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
18101 +echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
18102 +if test "${ac_cv_win_or_dos+set}" = set; then
18103 +  echo $ECHO_N "(cached) $ECHO_C" >&6
18104 +else
18105 +
18106 +        cat >conftest.$ac_ext <<_ACEOF
18107 +#line $LINENO "configure"
18108 +/* confdefs.h.  */
18109 +_ACEOF
18110 +cat confdefs.h >>conftest.$ac_ext
18111 +cat >>conftest.$ac_ext <<_ACEOF
18112 +/* end confdefs.h.  */
18113 +
18114 +int
18115 +main ()
18116 +{
18117 +#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
18118 +neither MSDOS nor Windows
18119 +#endif
18120 +  ;
18121 +  return 0;
18122 +}
18123 +_ACEOF
18124 +rm -f conftest.$ac_objext
18125 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18126 +  (eval $ac_compile) 2>&5
18127 +  ac_status=$?
18128 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18129 +  (exit $ac_status); } &&
18130 +         { ac_try='test -s conftest.$ac_objext'
18131 +  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18132 +  (eval $ac_try) 2>&5
18133 +  ac_status=$?
18134 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18135 +  (exit $ac_status); }; }; then
18136 +  ac_cv_win_or_dos=yes
18137 +else
18138 +  echo "$as_me: failed program was:" >&5
18139 +sed 's/^/| /' conftest.$ac_ext >&5
18140 +
18141 +ac_cv_win_or_dos=no
18142 +fi
18143 +rm -f conftest.$ac_objext conftest.$ac_ext
18144 +
18145 +fi
18146 +echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
18147 +echo "${ECHO_T}$ac_cv_win_or_dos" >&6
18148 +
18149 +    if test x"$ac_cv_win_or_dos" = xyes; then
18150 +      ac_fs_accepts_drive_letter_prefix=1
18151 +      ac_fs_backslash_is_file_name_separator=1
18152 +    else
18153 +      ac_fs_accepts_drive_letter_prefix=0
18154 +      ac_fs_backslash_is_file_name_separator=0
18155 +    fi
18156 +
18157 +
18158 +
18159 +
18160 +
18161 +cat >>confdefs.h <<_ACEOF
18162 +#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
18163 +_ACEOF
18164 +
18165 +
18166 +
18167 +
18168 +
18169 +
18170 +cat >>confdefs.h <<_ACEOF
18171 +#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
18172 +_ACEOF
18173 +
18174 +
18175 +echo "$as_me:$LINENO: checking for long file names" >&5
18176 +echo $ECHO_N "checking for long file names... $ECHO_C" >&6
18177 +if test "${ac_cv_sys_long_file_names+set}" = set; then
18178 +  echo $ECHO_N "(cached) $ECHO_C" >&6
18179  else
18180    ac_cv_sys_long_file_names=yes
18181  # Test for long file names in all the places we know might matter:
18182 @@ -2823,459 +10771,1123 @@
18183  #      /var/tmp                likewise
18184  #      /usr/tmp                likewise
18185  if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
18186 -  ac_tmpdirs="$TMPDIR"
18187 +  ac_tmpdirs=$TMPDIR
18188  else
18189    ac_tmpdirs='/tmp /var/tmp /usr/tmp'
18190  fi
18191  for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
18192    test -d $ac_dir || continue
18193    test -w $ac_dir || continue # It is less confusing to not echo anything here.
18194 -  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
18195 -  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
18196 -  val=`cat $ac_dir/conftest9012345 2>/dev/null`
18197 -  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
18198 +  ac_xdir=$ac_dir/cf$$
18199 +  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
18200 +  ac_tf1=$ac_xdir/conftest9012345
18201 +  ac_tf2=$ac_xdir/conftest9012346
18202 +  (echo 1 >$ac_tf1) 2>/dev/null
18203 +  (echo 2 >$ac_tf2) 2>/dev/null
18204 +  ac_val=`cat $ac_tf1 2>/dev/null`
18205 +  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
18206      ac_cv_sys_long_file_names=no
18207 -    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
18208 +    rm -rf $ac_xdir 2>/dev/null
18209      break
18210    fi
18211 -  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
18212 +  rm -rf $ac_xdir 2>/dev/null
18213  done
18214  fi
18215 -
18216 -echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
18217 +echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
18218 +echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
18219  if test $ac_cv_sys_long_file_names = yes; then
18220 -  cat >> confdefs.h <<\EOF
18221 +
18222 +cat >>confdefs.h <<\_ACEOF
18223  #define HAVE_LONG_FILE_NAMES 1
18224 -EOF
18225 +_ACEOF
18226  
18227  fi
18228  
18229 -   echo $ac_n "checking for d_ino member in directory struct""... $ac_c" 1>&6
18230 -echo "configure:2855: checking for d_ino member in directory struct" >&5
18231 -if eval "test \"`echo '$''{'jm_cv_struct_dirent_d_ino'+set}'`\" = set"; then
18232 -  echo $ac_n "(cached) $ac_c" 1>&6
18233 -else
18234 -  cat > conftest.$ac_ext <<EOF
18235 -#line 2860 "configure"
18236 -#include "confdefs.h"
18237 -       
18238 -#include <sys/types.h>
18239 -#ifdef HAVE_DIRENT_H
18240 -# include <dirent.h>
18241 -#else /* not HAVE_DIRENT_H */
18242 -# define dirent direct
18243 -# ifdef HAVE_SYS_NDIR_H
18244 -#  include <sys/ndir.h>
18245 -# endif /* HAVE_SYS_NDIR_H */
18246 -# ifdef HAVE_SYS_DIR_H
18247 -#  include <sys/dir.h>
18248 -# endif /* HAVE_SYS_DIR_H */
18249 -# ifdef HAVE_NDIR_H
18250 -#  include <ndir.h>
18251 -# endif /* HAVE_NDIR_H */
18252 -#endif /* HAVE_DIRENT_H */
18253 -       
18254 -int main() {
18255 -struct dirent dp; dp.d_ino = 0;
18256 -; return 0; }
18257 -EOF
18258 -if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18259 -  rm -rf conftest*
18260 -  jm_cv_struct_dirent_d_ino=yes
18261 -else
18262 -  echo "configure: failed program was:" >&5
18263 -  cat conftest.$ac_ext >&5
18264 -  rm -rf conftest*
18265 -  jm_cv_struct_dirent_d_ino=no
18266 -fi
18267 -rm -f conftest*
18268 -     
18269 -   
18270 -fi
18271 -
18272 -echo "$ac_t""$jm_cv_struct_dirent_d_ino" 1>&6
18273 -   if test $jm_cv_struct_dirent_d_ino = yes; then
18274 -     cat >> confdefs.h <<\EOF
18275 -#define D_INO_IN_DIRENT 1
18276 -EOF
18277 -
18278 -   fi
18279 -  
18280  
18281 +          ac_config_files="$ac_config_files Makefile"
18282  
18283 -trap '' 1 2 15
18284 -cat > confcache <<\EOF
18285 +cat >confcache <<\_ACEOF
18286  # This file is a shell script that caches the results of configure
18287  # tests run on this system so they can be shared between configure
18288 -# scripts and configure runs.  It is not useful on other systems.
18289 -# If it contains results you don't want to keep, you may remove or edit it.
18290 +# scripts and configure runs, see configure's option --config-cache.
18291 +# It is not useful on other systems.  If it contains results you don't
18292 +# want to keep, you may remove or edit it.
18293  #
18294 -# By default, configure uses ./config.cache as the cache file,
18295 -# creating it if it does not exist already.  You can give configure
18296 -# the --cache-file=FILE option to use a different cache file; that is
18297 -# what configure does when it calls configure scripts in
18298 -# subdirectories, so they share the cache.
18299 -# Giving --cache-file=/dev/null disables caching, for debugging configure.
18300 -# config.status only pays attention to the cache file if you give it the
18301 -# --recheck option to rerun configure.
18302 +# config.status only pays attention to the cache file if you give it
18303 +# the --recheck option to rerun configure.
18304  #
18305 -EOF
18306 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
18307 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
18308 +# following values.
18309 +
18310 +_ACEOF
18311 +
18312  # The following way of writing the cache mishandles newlines in values,
18313  # but we know of no workaround that is simple, portable, and efficient.
18314  # So, don't put newlines in cache variables' values.
18315  # Ultrix sh set writes to stderr and can't be redirected directly,
18316  # and sets the high bit in the cache file unless we assign to the vars.
18317 -(set) 2>&1 |
18318 -  case `(ac_space=' '; set | grep ac_space) 2>&1` in
18319 -  *ac_space=\ *)
18320 -    # `set' does not quote correctly, so add quotes (double-quote substitution
18321 -    # turns \\\\ into \\, and sed turns \\ into \).
18322 -    sed -n \
18323 -      -e "s/'/'\\\\''/g" \
18324 -      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
18325 -    ;;
18326 -  *)
18327 -    # `set' quotes correctly as required by POSIX, so do not add quotes.
18328 -    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
18329 -    ;;
18330 -  esac >> confcache
18331 -if cmp -s $cache_file confcache; then
18332 -  :
18333 -else
18334 +{
18335 +  (set) 2>&1 |
18336 +    case `(ac_space=' '; set | grep ac_space) 2>&1` in
18337 +    *ac_space=\ *)
18338 +      # `set' does not quote correctly, so add quotes (double-quote
18339 +      # substitution turns \\\\ into \\, and sed turns \\ into \).
18340 +      sed -n \
18341 +        "s/'/'\\\\''/g;
18342 +         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18343 +      ;;
18344 +    *)
18345 +      # `set' quotes correctly as required by POSIX, so do not add quotes.
18346 +      sed -n \
18347 +        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18348 +      ;;
18349 +    esac;
18350 +} |
18351 +  sed '
18352 +     t clear
18353 +     : clear
18354 +     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18355 +     t end
18356 +     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18357 +     : end' >>confcache
18358 +if diff $cache_file confcache >/dev/null 2>&1; then :; else
18359    if test -w $cache_file; then
18360 -    echo "updating cache $cache_file"
18361 -    cat confcache > $cache_file
18362 +    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18363 +    cat confcache >$cache_file
18364    else
18365      echo "not updating unwritable cache $cache_file"
18366    fi
18367  fi
18368  rm -f confcache
18369  
18370 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
18371 -
18372  test "x$prefix" = xNONE && prefix=$ac_default_prefix
18373  # Let make expand exec_prefix.
18374  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18375  
18376 -# Any assignment to VPATH causes Sun make to only execute
18377 -# the first set of double-colon rules, so remove it if not needed.
18378 -# If there is a colon in the path, we need to keep it.
18379 +# VPATH may cause trouble with some makes, so we remove $(srcdir),
18380 +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18381 +# trailing colons and then remove the whole line if VPATH becomes empty
18382 +# (actually we leave an empty line to preserve line numbers).
18383  if test "x$srcdir" = x.; then
18384 -  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
18385 +  ac_vpsub='/^[        ]*VPATH[        ]*=/{
18386 +s/:*\$(srcdir):*/:/;
18387 +s/:*\${srcdir}:*/:/;
18388 +s/:*@srcdir@:*/:/;
18389 +s/^\([^=]*=[   ]*\):*/\1/;
18390 +s/:*$//;
18391 +s/^[^=]*=[     ]*$//;
18392 +}'
18393  fi
18394  
18395 -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
18396 -
18397  DEFS=-DHAVE_CONFIG_H
18398  
18399 -# Without the "./", some shells look in PATH for config.status.
18400 -: ${CONFIG_STATUS=./config.status}
18401 +ac_libobjs=
18402 +ac_ltlibobjs=
18403 +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18404 +  # 1. Remove the extension, and $U if already installed.
18405 +  ac_i=`echo "$ac_i" |
18406 +         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18407 +  # 2. Add them.
18408 +  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18409 +  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18410 +done
18411 +LIBOBJS=$ac_libobjs
18412  
18413 -echo creating $CONFIG_STATUS
18414 -rm -f $CONFIG_STATUS
18415 -cat > $CONFIG_STATUS <<EOF
18416 -#! /bin/sh
18417 -# Generated automatically by configure.
18418 +LTLIBOBJS=$ac_ltlibobjs
18419 +
18420 +
18421 +
18422 +: ${CONFIG_STATUS=./config.status}
18423 +ac_clean_files_save=$ac_clean_files
18424 +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18425 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18426 +echo "$as_me: creating $CONFIG_STATUS" >&6;}
18427 +cat >$CONFIG_STATUS <<_ACEOF
18428 +#! $SHELL
18429 +# Generated by $as_me.
18430  # Run this file to recreate the current configuration.
18431 -# This directory was configured as follows,
18432 -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18433 -#
18434 -# $0 $ac_configure_args
18435 -#
18436  # Compiler output produced by configure, useful for debugging
18437 -# configure, is in ./config.log if it exists.
18438 +# configure, is in config.log if it exists.
18439  
18440 -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
18441 -for ac_option
18442 +debug=false
18443 +ac_cs_recheck=false
18444 +ac_cs_silent=false
18445 +SHELL=\${CONFIG_SHELL-$SHELL}
18446 +_ACEOF
18447 +
18448 +cat >>$CONFIG_STATUS <<\_ACEOF
18449 +## --------------------- ##
18450 +## M4sh Initialization.  ##
18451 +## --------------------- ##
18452 +
18453 +# Be Bourne compatible
18454 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18455 +  emulate sh
18456 +  NULLCMD=:
18457 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18458 +  # is contrary to our usage.  Disable this feature.
18459 +  alias -g '${1+"$@"}'='"$@"'
18460 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18461 +  set -o posix
18462 +fi
18463 +
18464 +# Support unset when possible.
18465 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18466 +  as_unset=unset
18467 +else
18468 +  as_unset=false
18469 +fi
18470 +
18471 +
18472 +# Work around bugs in pre-3.0 UWIN ksh.
18473 +$as_unset ENV MAIL MAILPATH
18474 +PS1='$ '
18475 +PS2='> '
18476 +PS4='+ '
18477 +
18478 +# NLS nuisances.
18479 +for as_var in \
18480 +  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18481 +  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18482 +  LC_TELEPHONE LC_TIME
18483  do
18484 -  case "\$ac_option" in
18485 -  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18486 -    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
18487 -    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
18488 -  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
18489 -    echo "$CONFIG_STATUS generated by autoconf version 2.13"
18490 -    exit 0 ;;
18491 -  -help | --help | --hel | --he | --h)
18492 -    echo "\$ac_cs_usage"; exit 0 ;;
18493 -  *) echo "\$ac_cs_usage"; exit 1 ;;
18494 -  esac
18495 +  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18496 +    eval $as_var=C; export $as_var
18497 +  else
18498 +    $as_unset $as_var
18499 +  fi
18500  done
18501  
18502 -ac_given_srcdir=$srcdir
18503 -ac_given_INSTALL="$INSTALL"
18504 +# Required to use basename.
18505 +if expr a : '\(a\)' >/dev/null 2>&1; then
18506 +  as_expr=expr
18507 +else
18508 +  as_expr=false
18509 +fi
18510  
18511 -trap 'rm -fr `echo "Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
18512 -EOF
18513 -cat >> $CONFIG_STATUS <<EOF
18514 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18515 +  as_basename=basename
18516 +else
18517 +  as_basename=false
18518 +fi
18519  
18520 -# Protect against being on the right side of a sed subst in config.status.
18521 -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
18522 - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
18523 -$ac_vpsub
18524 -$extrasub
18525 -s%@SHELL@%$SHELL%g
18526 -s%@CFLAGS@%$CFLAGS%g
18527 -s%@CPPFLAGS@%$CPPFLAGS%g
18528 -s%@CXXFLAGS@%$CXXFLAGS%g
18529 -s%@FFLAGS@%$FFLAGS%g
18530 -s%@DEFS@%$DEFS%g
18531 -s%@LDFLAGS@%$LDFLAGS%g
18532 -s%@LIBS@%$LIBS%g
18533 -s%@exec_prefix@%$exec_prefix%g
18534 -s%@prefix@%$prefix%g
18535 -s%@program_transform_name@%$program_transform_name%g
18536 -s%@bindir@%$bindir%g
18537 -s%@sbindir@%$sbindir%g
18538 -s%@libexecdir@%$libexecdir%g
18539 -s%@datadir@%$datadir%g
18540 -s%@sysconfdir@%$sysconfdir%g
18541 -s%@sharedstatedir@%$sharedstatedir%g
18542 -s%@localstatedir@%$localstatedir%g
18543 -s%@libdir@%$libdir%g
18544 -s%@includedir@%$includedir%g
18545 -s%@oldincludedir@%$oldincludedir%g
18546 -s%@infodir@%$infodir%g
18547 -s%@mandir@%$mandir%g
18548 -s%@host@%$host%g
18549 -s%@host_alias@%$host_alias%g
18550 -s%@host_cpu@%$host_cpu%g
18551 -s%@host_vendor@%$host_vendor%g
18552 -s%@host_os@%$host_os%g
18553 -s%@PACKAGE@%$PACKAGE%g
18554 -s%@VERSION@%$VERSION%g
18555 -s%@CC@%$CC%g
18556 -s%@CPP@%$CPP%g
18557 -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
18558 -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
18559 -s%@INSTALL_DATA@%$INSTALL_DATA%g
18560 -s%@SET_MAKE@%$SET_MAKE%g
18561 -s%@ed_PROGRAM@%$ed_PROGRAM%g
18562 -s%@build@%$build%g
18563 -s%@build_alias@%$build_alias%g
18564 -s%@build_cpu@%$build_cpu%g
18565 -s%@build_vendor@%$build_vendor%g
18566 -s%@build_os@%$build_os%g
18567 -s%@GETCONF@%$GETCONF%g
18568 -s%@EXEEXT@%$EXEEXT%g
18569 -s%@U@%$U%g
18570 -s%@ANSI2KNR@%$ANSI2KNR%g
18571 -s%@LIBOBJS@%$LIBOBJS%g
18572  
18573 -CEOF
18574 -EOF
18575 +# Name of the executable.
18576 +as_me=`$as_basename "$0" ||
18577 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18578 +        X"$0" : 'X\(//\)$' \| \
18579 +        X"$0" : 'X\(/\)$' \| \
18580 +        .     : '\(.\)' 2>/dev/null ||
18581 +echo X/"$0" |
18582 +    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18583 +         /^X\/\(\/\/\)$/{ s//\1/; q; }
18584 +         /^X\/\(\/\).*/{ s//\1/; q; }
18585 +         s/.*/./; q'`
18586  
18587 -cat >> $CONFIG_STATUS <<\EOF
18588  
18589 -# Split the substitutions into bite-sized pieces for seds with
18590 -# small command number limits, like on Digital OSF/1 and HP-UX.
18591 -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
18592 -ac_file=1 # Number of current file.
18593 -ac_beg=1 # First line for current file.
18594 -ac_end=$ac_max_sed_cmds # Line after last line for current file.
18595 -ac_more_lines=:
18596 -ac_sed_cmds=""
18597 -while $ac_more_lines; do
18598 -  if test $ac_beg -gt 1; then
18599 -    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
18600 +# PATH needs CR, and LINENO needs CR and PATH.
18601 +# Avoid depending upon Character Ranges.
18602 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18603 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18604 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18605 +as_cr_digits='0123456789'
18606 +as_cr_alnum=$as_cr_Letters$as_cr_digits
18607 +
18608 +# The user is always right.
18609 +if test "${PATH_SEPARATOR+set}" != set; then
18610 +  echo "#! /bin/sh" >conf$$.sh
18611 +  echo  "exit 0"   >>conf$$.sh
18612 +  chmod +x conf$$.sh
18613 +  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18614 +    PATH_SEPARATOR=';'
18615    else
18616 -    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18617 +    PATH_SEPARATOR=:
18618    fi
18619 -  if test ! -s conftest.s$ac_file; then
18620 -    ac_more_lines=false
18621 -    rm -f conftest.s$ac_file
18622 +  rm -f conf$$.sh
18623 +fi
18624 +
18625 +
18626 +  as_lineno_1=$LINENO
18627 +  as_lineno_2=$LINENO
18628 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18629 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
18630 +  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18631 +  # Find who we are.  Look in the path if we contain no path at all
18632 +  # relative or not.
18633 +  case $0 in
18634 +    *[\\/]* ) as_myself=$0 ;;
18635 +    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18636 +for as_dir in $PATH
18637 +do
18638 +  IFS=$as_save_IFS
18639 +  test -z "$as_dir" && as_dir=.
18640 +  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18641 +done
18642 +
18643 +       ;;
18644 +  esac
18645 +  # We did not find ourselves, most probably we were run as `sh COMMAND'
18646 +  # in which case we are not to be found in the path.
18647 +  if test "x$as_myself" = x; then
18648 +    as_myself=$0
18649 +  fi
18650 +  if test ! -f "$as_myself"; then
18651 +    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18652 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18653 +   { (exit 1); exit 1; }; }
18654 +  fi
18655 +  case $CONFIG_SHELL in
18656 +  '')
18657 +    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18658 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18659 +do
18660 +  IFS=$as_save_IFS
18661 +  test -z "$as_dir" && as_dir=.
18662 +  for as_base in sh bash ksh sh5; do
18663 +        case $as_dir in
18664 +        /*)
18665 +          if ("$as_dir/$as_base" -c '
18666 +  as_lineno_1=$LINENO
18667 +  as_lineno_2=$LINENO
18668 +  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18669 +  test "x$as_lineno_1" != "x$as_lineno_2" &&
18670 +  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18671 +            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18672 +            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18673 +            CONFIG_SHELL=$as_dir/$as_base
18674 +            export CONFIG_SHELL
18675 +            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18676 +          fi;;
18677 +        esac
18678 +       done
18679 +done
18680 +;;
18681 +  esac
18682 +
18683 +  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18684 +  # uniformly replaced by the line number.  The first 'sed' inserts a
18685 +  # line-number line before each line; the second 'sed' does the real
18686 +  # work.  The second script uses 'N' to pair each line-number line
18687 +  # with the numbered line, and appends trailing '-' during
18688 +  # substitution so that $LINENO is not a special case at line end.
18689 +  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18690 +  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18691 +  sed '=' <$as_myself |
18692 +    sed '
18693 +      N
18694 +      s,$,-,
18695 +      : loop
18696 +      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18697 +      t loop
18698 +      s,-$,,
18699 +      s,^['$as_cr_digits']*\n,,
18700 +    ' >$as_me.lineno &&
18701 +  chmod +x $as_me.lineno ||
18702 +    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18703 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18704 +   { (exit 1); exit 1; }; }
18705 +
18706 +  # Don't try to exec as it changes $[0], causing all sort of problems
18707 +  # (the dirname of $[0] is not the place where we might find the
18708 +  # original and so on.  Autoconf is especially sensible to this).
18709 +  . ./$as_me.lineno
18710 +  # Exit status is that of the last command.
18711 +  exit
18712 +}
18713 +
18714 +
18715 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18716 +  *c*,-n*) ECHO_N= ECHO_C='
18717 +' ECHO_T='     ' ;;
18718 +  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18719 +  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18720 +esac
18721 +
18722 +if expr a : '\(a\)' >/dev/null 2>&1; then
18723 +  as_expr=expr
18724 +else
18725 +  as_expr=false
18726 +fi
18727 +
18728 +rm -f conf$$ conf$$.exe conf$$.file
18729 +echo >conf$$.file
18730 +if ln -s conf$$.file conf$$ 2>/dev/null; then
18731 +  # We could just check for DJGPP; but this test a) works b) is more generic
18732 +  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18733 +  if test -f conf$$.exe; then
18734 +    # Don't use ln at all; we don't have any links
18735 +    as_ln_s='cp -p'
18736    else
18737 -    if test -z "$ac_sed_cmds"; then
18738 -      ac_sed_cmds="sed -f conftest.s$ac_file"
18739 -    else
18740 -      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18741 -    fi
18742 -    ac_file=`expr $ac_file + 1`
18743 -    ac_beg=$ac_end
18744 -    ac_end=`expr $ac_end + $ac_max_sed_cmds`
18745 +    as_ln_s='ln -s'
18746    fi
18747 +elif ln conf$$.file conf$$ 2>/dev/null; then
18748 +  as_ln_s=ln
18749 +else
18750 +  as_ln_s='cp -p'
18751 +fi
18752 +rm -f conf$$ conf$$.exe conf$$.file
18753 +
18754 +if mkdir -p . 2>/dev/null; then
18755 +  as_mkdir_p=:
18756 +else
18757 +  as_mkdir_p=false
18758 +fi
18759 +
18760 +as_executable_p="test -f"
18761 +
18762 +# Sed expression to map a string onto a valid CPP name.
18763 +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18764 +
18765 +# Sed expression to map a string onto a valid variable name.
18766 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18767 +
18768 +
18769 +# IFS
18770 +# We need space, tab and new line, in precisely that order.
18771 +as_nl='
18772 +'
18773 +IFS="  $as_nl"
18774 +
18775 +# CDPATH.
18776 +$as_unset CDPATH
18777 +
18778 +exec 6>&1
18779 +
18780 +# Open the log real soon, to keep \$[0] and so on meaningful, and to
18781 +# report actual input values of CONFIG_FILES etc. instead of their
18782 +# values after options handling.  Logging --version etc. is OK.
18783 +exec 5>>config.log
18784 +{
18785 +  echo
18786 +  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18787 +## Running $as_me. ##
18788 +_ASBOX
18789 +} >&5
18790 +cat >&5 <<_CSEOF
18791 +
18792 +This file was extended by patch $as_me 2.5.9, which was
18793 +generated by GNU Autoconf 2.57.  Invocation command line was
18794 +
18795 +  CONFIG_FILES    = $CONFIG_FILES
18796 +  CONFIG_HEADERS  = $CONFIG_HEADERS
18797 +  CONFIG_LINKS    = $CONFIG_LINKS
18798 +  CONFIG_COMMANDS = $CONFIG_COMMANDS
18799 +  $ $0 $@
18800 +
18801 +_CSEOF
18802 +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18803 +echo >&5
18804 +_ACEOF
18805 +
18806 +# Files that config.status was made for.
18807 +if test -n "$ac_config_files"; then
18808 +  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18809 +fi
18810 +
18811 +if test -n "$ac_config_headers"; then
18812 +  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18813 +fi
18814 +
18815 +if test -n "$ac_config_links"; then
18816 +  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18817 +fi
18818 +
18819 +if test -n "$ac_config_commands"; then
18820 +  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18821 +fi
18822 +
18823 +cat >>$CONFIG_STATUS <<\_ACEOF
18824 +
18825 +ac_cs_usage="\
18826 +\`$as_me' instantiates files from templates according to the
18827 +current configuration.
18828 +
18829 +Usage: $0 [OPTIONS] [FILE]...
18830 +
18831 +  -h, --help       print this help, then exit
18832 +  -V, --version    print version number, then exit
18833 +  -q, --quiet      do not print progress messages
18834 +  -d, --debug      don't remove temporary files
18835 +      --recheck    update $as_me by reconfiguring in the same conditions
18836 +  --file=FILE[:TEMPLATE]
18837 +                   instantiate the configuration file FILE
18838 +  --header=FILE[:TEMPLATE]
18839 +                   instantiate the configuration header FILE
18840 +
18841 +Configuration files:
18842 +$config_files
18843 +
18844 +Configuration headers:
18845 +$config_headers
18846 +
18847 +Report bugs to <bug-autoconf@gnu.org>."
18848 +_ACEOF
18849 +
18850 +cat >>$CONFIG_STATUS <<_ACEOF
18851 +ac_cs_version="\\
18852 +patch config.status 2.5.9
18853 +configured by $0, generated by GNU Autoconf 2.57,
18854 +  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18855 +
18856 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18857 +Free Software Foundation, Inc.
18858 +This config.status script is free software; the Free Software Foundation
18859 +gives unlimited permission to copy, distribute and modify it."
18860 +srcdir=$srcdir
18861 +INSTALL="$INSTALL"
18862 +_ACEOF
18863 +
18864 +cat >>$CONFIG_STATUS <<\_ACEOF
18865 +# If no file are specified by the user, then we need to provide default
18866 +# value.  By we need to know if files were specified by the user.
18867 +ac_need_defaults=:
18868 +while test $# != 0
18869 +do
18870 +  case $1 in
18871 +  --*=*)
18872 +    ac_option=`expr "x$1" : 'x\([^=]*\)='`
18873 +    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18874 +    ac_shift=:
18875 +    ;;
18876 +  -*)
18877 +    ac_option=$1
18878 +    ac_optarg=$2
18879 +    ac_shift=shift
18880 +    ;;
18881 +  *) # This is not an option, so the user has probably given explicit
18882 +     # arguments.
18883 +     ac_option=$1
18884 +     ac_need_defaults=false;;
18885 +  esac
18886 +
18887 +  case $ac_option in
18888 +  # Handling of the options.
18889 +_ACEOF
18890 +cat >>$CONFIG_STATUS <<\_ACEOF
18891 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18892 +    ac_cs_recheck=: ;;
18893 +  --version | --vers* | -V )
18894 +    echo "$ac_cs_version"; exit 0 ;;
18895 +  --he | --h)
18896 +    # Conflict between --help and --header
18897 +    { { echo "$as_me:$LINENO: error: ambiguous option: $1
18898 +Try \`$0 --help' for more information." >&5
18899 +echo "$as_me: error: ambiguous option: $1
18900 +Try \`$0 --help' for more information." >&2;}
18901 +   { (exit 1); exit 1; }; };;
18902 +  --help | --hel | -h )
18903 +    echo "$ac_cs_usage"; exit 0 ;;
18904 +  --debug | --d* | -d )
18905 +    debug=: ;;
18906 +  --file | --fil | --fi | --f )
18907 +    $ac_shift
18908 +    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
18909 +    ac_need_defaults=false;;
18910 +  --header | --heade | --head | --hea )
18911 +    $ac_shift
18912 +    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
18913 +    ac_need_defaults=false;;
18914 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18915 +  | -silent | --silent | --silen | --sile | --sil | --si | --s)
18916 +    ac_cs_silent=: ;;
18917 +
18918 +  # This is an error.
18919 +  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18920 +Try \`$0 --help' for more information." >&5
18921 +echo "$as_me: error: unrecognized option: $1
18922 +Try \`$0 --help' for more information." >&2;}
18923 +   { (exit 1); exit 1; }; } ;;
18924 +
18925 +  *) ac_config_targets="$ac_config_targets $1" ;;
18926 +
18927 +  esac
18928 +  shift
18929  done
18930 -if test -z "$ac_sed_cmds"; then
18931 -  ac_sed_cmds=cat
18932 +
18933 +ac_configure_extra_args=
18934 +
18935 +if $ac_cs_silent; then
18936 +  exec 6>/dev/null
18937 +  ac_configure_extra_args="$ac_configure_extra_args --silent"
18938  fi
18939 -EOF
18940  
18941 -cat >> $CONFIG_STATUS <<EOF
18942 +_ACEOF
18943 +cat >>$CONFIG_STATUS <<_ACEOF
18944 +if \$ac_cs_recheck; then
18945 +  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18946 +  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18947 +fi
18948  
18949 -CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
18950 -EOF
18951 -cat >> $CONFIG_STATUS <<\EOF
18952 -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
18953 -  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18954 -  case "$ac_file" in
18955 -  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
18956 -       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
18957 -  *) ac_file_in="${ac_file}.in" ;;
18958 +_ACEOF
18959 +
18960 +
18961 +
18962 +
18963 +
18964 +cat >>$CONFIG_STATUS <<\_ACEOF
18965 +for ac_config_target in $ac_config_targets
18966 +do
18967 +  case "$ac_config_target" in
18968 +  # Handling of arguments.
18969 +  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18970 +  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;;
18971 +  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18972 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18973 +   { (exit 1); exit 1; }; };;
18974    esac
18975 +done
18976  
18977 -  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
18978 +# If the user did not use the arguments to specify the items to instantiate,
18979 +# then the envvar interface is used.  Set only those that are not.
18980 +# We use the long form for the default assignment because of an extremely
18981 +# bizarre bug on SunOS 4.1.3.
18982 +if $ac_need_defaults; then
18983 +  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18984 +  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18985 +fi
18986  
18987 -  # Remove last slash and all that follows it.  Not all systems have dirname.
18988 -  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
18989 -  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18990 -    # The file is in a subdirectory.
18991 -    test ! -d "$ac_dir" && mkdir "$ac_dir"
18992 -    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
18993 -    # A "../" for each directory in $ac_dir_suffix.
18994 -    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
18995 -  else
18996 -    ac_dir_suffix= ac_dots=
18997 +# Have a temporary directory for convenience.  Make it in the build tree
18998 +# simply because there is no reason to put it here, and in addition,
18999 +# creating and moving files from /tmp can sometimes cause problems.
19000 +# Create a temporary directory, and hook for its removal unless debugging.
19001 +$debug ||
19002 +{
19003 +  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19004 +  trap '{ (exit 1); exit 1; }' 1 2 13 15
19005 +}
19006 +
19007 +# Create a (secure) tmp directory for tmp files.
19008 +
19009 +{
19010 +  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19011 +  test -n "$tmp" && test -d "$tmp"
19012 +}  ||
19013 +{
19014 +  tmp=./confstat$$-$RANDOM
19015 +  (umask 077 && mkdir $tmp)
19016 +} ||
19017 +{
19018 +   echo "$me: cannot create a temporary directory in ." >&2
19019 +   { (exit 1); exit 1; }
19020 +}
19021 +
19022 +_ACEOF
19023 +
19024 +cat >>$CONFIG_STATUS <<_ACEOF
19025 +
19026 +#
19027 +# CONFIG_FILES section.
19028 +#
19029 +
19030 +# No need to generate the scripts if there are no CONFIG_FILES.
19031 +# This happens for instance when ./config.status config.h
19032 +if test -n "\$CONFIG_FILES"; then
19033 +  # Protect against being on the right side of a sed subst in config.status.
19034 +  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19035 +   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19036 +s,@SHELL@,$SHELL,;t t
19037 +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19038 +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19039 +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19040 +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19041 +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19042 +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19043 +s,@exec_prefix@,$exec_prefix,;t t
19044 +s,@prefix@,$prefix,;t t
19045 +s,@program_transform_name@,$program_transform_name,;t t
19046 +s,@bindir@,$bindir,;t t
19047 +s,@sbindir@,$sbindir,;t t
19048 +s,@libexecdir@,$libexecdir,;t t
19049 +s,@datadir@,$datadir,;t t
19050 +s,@sysconfdir@,$sysconfdir,;t t
19051 +s,@sharedstatedir@,$sharedstatedir,;t t
19052 +s,@localstatedir@,$localstatedir,;t t
19053 +s,@libdir@,$libdir,;t t
19054 +s,@includedir@,$includedir,;t t
19055 +s,@oldincludedir@,$oldincludedir,;t t
19056 +s,@infodir@,$infodir,;t t
19057 +s,@mandir@,$mandir,;t t
19058 +s,@build_alias@,$build_alias,;t t
19059 +s,@host_alias@,$host_alias,;t t
19060 +s,@target_alias@,$target_alias,;t t
19061 +s,@DEFS@,$DEFS,;t t
19062 +s,@ECHO_C@,$ECHO_C,;t t
19063 +s,@ECHO_N@,$ECHO_N,;t t
19064 +s,@ECHO_T@,$ECHO_T,;t t
19065 +s,@LIBS@,$LIBS,;t t
19066 +s,@CC@,$CC,;t t
19067 +s,@CFLAGS@,$CFLAGS,;t t
19068 +s,@LDFLAGS@,$LDFLAGS,;t t
19069 +s,@CPPFLAGS@,$CPPFLAGS,;t t
19070 +s,@ac_ct_CC@,$ac_ct_CC,;t t
19071 +s,@EXEEXT@,$EXEEXT,;t t
19072 +s,@OBJEXT@,$OBJEXT,;t t
19073 +s,@CPP@,$CPP,;t t
19074 +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19075 +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19076 +s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19077 +s,@SET_MAKE@,$SET_MAKE,;t t
19078 +s,@ed_PROGRAM@,$ed_PROGRAM,;t t
19079 +s,@EGREP@,$EGREP,;t t
19080 +s,@STDBOOL_H@,$STDBOOL_H,;t t
19081 +s,@HAVE__BOOL@,$HAVE__BOOL,;t t
19082 +s,@LIBOBJS@,$LIBOBJS,;t t
19083 +s,@LTLIBOBJS@,$LTLIBOBJS,;t t
19084 +CEOF
19085 +
19086 +_ACEOF
19087 +
19088 +  cat >>$CONFIG_STATUS <<\_ACEOF
19089 +  # Split the substitutions into bite-sized pieces for seds with
19090 +  # small command number limits, like on Digital OSF/1 and HP-UX.
19091 +  ac_max_sed_lines=48
19092 +  ac_sed_frag=1 # Number of current file.
19093 +  ac_beg=1 # First line for current file.
19094 +  ac_end=$ac_max_sed_lines # Line after last line for current file.
19095 +  ac_more_lines=:
19096 +  ac_sed_cmds=
19097 +  while $ac_more_lines; do
19098 +    if test $ac_beg -gt 1; then
19099 +      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19100 +    else
19101 +      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19102 +    fi
19103 +    if test ! -s $tmp/subs.frag; then
19104 +      ac_more_lines=false
19105 +    else
19106 +      # The purpose of the label and of the branching condition is to
19107 +      # speed up the sed processing (if there are no `@' at all, there
19108 +      # is no need to browse any of the substitutions).
19109 +      # These are the two extra sed commands mentioned above.
19110 +      (echo ':t
19111 +  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19112 +      if test -z "$ac_sed_cmds"; then
19113 +       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19114 +      else
19115 +       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19116 +      fi
19117 +      ac_sed_frag=`expr $ac_sed_frag + 1`
19118 +      ac_beg=$ac_end
19119 +      ac_end=`expr $ac_end + $ac_max_sed_lines`
19120 +    fi
19121 +  done
19122 +  if test -z "$ac_sed_cmds"; then
19123 +    ac_sed_cmds=cat
19124    fi
19125 +fi # test -n "$CONFIG_FILES"
19126  
19127 -  case "$ac_given_srcdir" in
19128 -  .)  srcdir=.
19129 -      if test -z "$ac_dots"; then top_srcdir=.
19130 -      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
19131 -  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
19132 -  *) # Relative path.
19133 -    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
19134 -    top_srcdir="$ac_dots$ac_given_srcdir" ;;
19135 +_ACEOF
19136 +cat >>$CONFIG_STATUS <<\_ACEOF
19137 +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19138 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19139 +  case $ac_file in
19140 +  - | *:- | *:-:* ) # input from stdin
19141 +        cat >$tmp/stdin
19142 +        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19143 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19144 +  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19145 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19146 +  * )   ac_file_in=$ac_file.in ;;
19147    esac
19148  
19149 -  case "$ac_given_INSTALL" in
19150 -  [/$]*) INSTALL="$ac_given_INSTALL" ;;
19151 -  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
19152 -  esac
19153 +  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19154 +  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19155 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19156 +         X"$ac_file" : 'X\(//\)[^/]' \| \
19157 +         X"$ac_file" : 'X\(//\)$' \| \
19158 +         X"$ac_file" : 'X\(/\)' \| \
19159 +         .     : '\(.\)' 2>/dev/null ||
19160 +echo X"$ac_file" |
19161 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19162 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19163 +         /^X\(\/\/\)$/{ s//\1/; q; }
19164 +         /^X\(\/\).*/{ s//\1/; q; }
19165 +         s/.*/./; q'`
19166 +  { if $as_mkdir_p; then
19167 +    mkdir -p "$ac_dir"
19168 +  else
19169 +    as_dir="$ac_dir"
19170 +    as_dirs=
19171 +    while test ! -d "$as_dir"; do
19172 +      as_dirs="$as_dir $as_dirs"
19173 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19174 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19175 +         X"$as_dir" : 'X\(//\)[^/]' \| \
19176 +         X"$as_dir" : 'X\(//\)$' \| \
19177 +         X"$as_dir" : 'X\(/\)' \| \
19178 +         .     : '\(.\)' 2>/dev/null ||
19179 +echo X"$as_dir" |
19180 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19181 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19182 +         /^X\(\/\/\)$/{ s//\1/; q; }
19183 +         /^X\(\/\).*/{ s//\1/; q; }
19184 +         s/.*/./; q'`
19185 +    done
19186 +    test ! -n "$as_dirs" || mkdir $as_dirs
19187 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19188 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19189 +   { (exit 1); exit 1; }; }; }
19190  
19191 -  echo creating "$ac_file"
19192 -  rm -f "$ac_file"
19193 -  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
19194 -  case "$ac_file" in
19195 -  *Makefile*) ac_comsub="1i\\
19196 -# $configure_input" ;;
19197 -  *) ac_comsub= ;;
19198 +  ac_builddir=.
19199 +
19200 +if test "$ac_dir" != .; then
19201 +  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19202 +  # A "../" for each directory in $ac_dir_suffix.
19203 +  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19204 +else
19205 +  ac_dir_suffix= ac_top_builddir=
19206 +fi
19207 +
19208 +case $srcdir in
19209 +  .)  # No --srcdir option.  We are building in place.
19210 +    ac_srcdir=.
19211 +    if test -z "$ac_top_builddir"; then
19212 +       ac_top_srcdir=.
19213 +    else
19214 +       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19215 +    fi ;;
19216 +  [\\/]* | ?:[\\/]* )  # Absolute path.
19217 +    ac_srcdir=$srcdir$ac_dir_suffix;
19218 +    ac_top_srcdir=$srcdir ;;
19219 +  *) # Relative path.
19220 +    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19221 +    ac_top_srcdir=$ac_top_builddir$srcdir ;;
19222 +esac
19223 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19224 +# absolute.
19225 +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19226 +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19227 +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19228 +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19229 +
19230 +
19231 +  case $INSTALL in
19232 +  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19233 +  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19234    esac
19235  
19236 -  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
19237 -  sed -e "$ac_comsub
19238 -s%@configure_input@%$configure_input%g
19239 -s%@srcdir@%$srcdir%g
19240 -s%@top_srcdir@%$top_srcdir%g
19241 -s%@INSTALL@%$INSTALL%g
19242 -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
19243 -fi; done
19244 -rm -f conftest.s*
19245 +  if test x"$ac_file" != x-; then
19246 +    { echo "$as_me:$LINENO: creating $ac_file" >&5
19247 +echo "$as_me: creating $ac_file" >&6;}
19248 +    rm -f "$ac_file"
19249 +  fi
19250 +  # Let's still pretend it is `configure' which instantiates (i.e., don't
19251 +  # use $as_me), people would be surprised to read:
19252 +  #    /* config.h.  Generated by config.status.  */
19253 +  if test x"$ac_file" = x-; then
19254 +    configure_input=
19255 +  else
19256 +    configure_input="$ac_file.  "
19257 +  fi
19258 +  configure_input=$configure_input"Generated from `echo $ac_file_in |
19259 +                                     sed 's,.*/,,'` by configure."
19260 +
19261 +  # First look for the input files in the build tree, otherwise in the
19262 +  # src tree.
19263 +  ac_file_inputs=`IFS=:
19264 +    for f in $ac_file_in; do
19265 +      case $f in
19266 +      -) echo $tmp/stdin ;;
19267 +      [\\/$]*)
19268 +         # Absolute (can't be DOS-style, as IFS=:)
19269 +         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19270 +echo "$as_me: error: cannot find input file: $f" >&2;}
19271 +   { (exit 1); exit 1; }; }
19272 +         echo $f;;
19273 +      *) # Relative
19274 +         if test -f "$f"; then
19275 +           # Build tree
19276 +           echo $f
19277 +         elif test -f "$srcdir/$f"; then
19278 +           # Source tree
19279 +           echo $srcdir/$f
19280 +         else
19281 +           # /dev/null tree
19282 +           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19283 +echo "$as_me: error: cannot find input file: $f" >&2;}
19284 +   { (exit 1); exit 1; }; }
19285 +         fi;;
19286 +      esac
19287 +    done` || { (exit 1); exit 1; }
19288 +_ACEOF
19289 +cat >>$CONFIG_STATUS <<_ACEOF
19290 +  sed "$ac_vpsub
19291 +$extrasub
19292 +_ACEOF
19293 +cat >>$CONFIG_STATUS <<\_ACEOF
19294 +:t
19295 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19296 +s,@configure_input@,$configure_input,;t t
19297 +s,@srcdir@,$ac_srcdir,;t t
19298 +s,@abs_srcdir@,$ac_abs_srcdir,;t t
19299 +s,@top_srcdir@,$ac_top_srcdir,;t t
19300 +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19301 +s,@builddir@,$ac_builddir,;t t
19302 +s,@abs_builddir@,$ac_abs_builddir,;t t
19303 +s,@top_builddir@,$ac_top_builddir,;t t
19304 +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19305 +s,@INSTALL@,$ac_INSTALL,;t t
19306 +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19307 +  rm -f $tmp/stdin
19308 +  if test x"$ac_file" != x-; then
19309 +    mv $tmp/out $ac_file
19310 +  else
19311 +    cat $tmp/out
19312 +    rm -f $tmp/out
19313 +  fi
19314 +
19315 +done
19316 +_ACEOF
19317 +cat >>$CONFIG_STATUS <<\_ACEOF
19318 +
19319 +#
19320 +# CONFIG_HEADER section.
19321 +#
19322  
19323  # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19324  # NAME is the cpp macro being defined and VALUE is the value it is being given.
19325  #
19326  # ac_d sets the value in "#define NAME VALUE" lines.
19327 -ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
19328 -ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
19329 -ac_dC='\3'
19330 -ac_dD='%g'
19331 -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19332 -ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19333 -ac_uB='\([     ]\)%\1#\2define\3'
19334 +ac_dA='s,^\([  ]*\)#\([        ]*define[       ][      ]*\)'
19335 +ac_dB='[       ].*$,\1#\2'
19336 +ac_dC=' '
19337 +ac_dD=',;t'
19338 +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19339 +ac_uA='s,^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19340 +ac_uB='$,\1#\2define\3'
19341  ac_uC=' '
19342 -ac_uD='\4%g'
19343 -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19344 -ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19345 -ac_eB='$%\1#\2define\3'
19346 -ac_eC=' '
19347 -ac_eD='%g'
19348 +ac_uD=',;t'
19349  
19350 -if test "${CONFIG_HEADERS+set}" != set; then
19351 -EOF
19352 -cat >> $CONFIG_STATUS <<EOF
19353 -  CONFIG_HEADERS="config.h:config.hin"
19354 -EOF
19355 -cat >> $CONFIG_STATUS <<\EOF
19356 -fi
19357 -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
19358 +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19359    # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19360 -  case "$ac_file" in
19361 -  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
19362 -       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
19363 -  *) ac_file_in="${ac_file}.in" ;;
19364 +  case $ac_file in
19365 +  - | *:- | *:-:* ) # input from stdin
19366 +        cat >$tmp/stdin
19367 +        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19368 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19369 +  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19370 +        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19371 +  * )   ac_file_in=$ac_file.in ;;
19372    esac
19373  
19374 -  echo creating $ac_file
19375 +  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19376 +echo "$as_me: creating $ac_file" >&6;}
19377  
19378 -  rm -f conftest.frag conftest.in conftest.out
19379 -  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
19380 -  cat $ac_file_inputs > conftest.in
19381 +  # First look for the input files in the build tree, otherwise in the
19382 +  # src tree.
19383 +  ac_file_inputs=`IFS=:
19384 +    for f in $ac_file_in; do
19385 +      case $f in
19386 +      -) echo $tmp/stdin ;;
19387 +      [\\/$]*)
19388 +         # Absolute (can't be DOS-style, as IFS=:)
19389 +         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19390 +echo "$as_me: error: cannot find input file: $f" >&2;}
19391 +   { (exit 1); exit 1; }; }
19392 +         echo $f;;
19393 +      *) # Relative
19394 +         if test -f "$f"; then
19395 +           # Build tree
19396 +           echo $f
19397 +         elif test -f "$srcdir/$f"; then
19398 +           # Source tree
19399 +           echo $srcdir/$f
19400 +         else
19401 +           # /dev/null tree
19402 +           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19403 +echo "$as_me: error: cannot find input file: $f" >&2;}
19404 +   { (exit 1); exit 1; }; }
19405 +         fi;;
19406 +      esac
19407 +    done` || { (exit 1); exit 1; }
19408 +  # Remove the trailing spaces.
19409 +  sed 's/[     ]*$//' $ac_file_inputs >$tmp/in
19410  
19411 -EOF
19412 +_ACEOF
19413  
19414 -# Transform confdefs.h into a sed script conftest.vals that substitutes
19415 -# the proper values into config.h.in to produce config.h.  And first:
19416 -# Protect against being on the right side of a sed subst in config.status.
19417 -# Protect against being in an unquoted here document in config.status.
19418 -rm -f conftest.vals
19419 -cat > conftest.hdr <<\EOF
19420 -s/[\\&%]/\\&/g
19421 -s%[\\$`]%\\&%g
19422 -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
19423 -s%ac_d%ac_u%gp
19424 -s%ac_u%ac_e%gp
19425 -EOF
19426 -sed -n -f conftest.hdr confdefs.h > conftest.vals
19427 -rm -f conftest.hdr
19428 +# Transform confdefs.h into two sed scripts, `conftest.defines' and
19429 +# `conftest.undefs', that substitutes the proper values into
19430 +# config.h.in to produce config.h.  The first handles `#define'
19431 +# templates, and the second `#undef' templates.
19432 +# And first: Protect against being on the right side of a sed subst in
19433 +# config.status.  Protect against being in an unquoted here document
19434 +# in config.status.
19435 +rm -f conftest.defines conftest.undefs
19436 +# Using a here document instead of a string reduces the quoting nightmare.
19437 +# Putting comments in sed scripts is not portable.
19438 +#
19439 +# `end' is used to avoid that the second main sed command (meant for
19440 +# 0-ary CPP macros) applies to n-ary macro definitions.
19441 +# See the Autoconf documentation for `clear'.
19442 +cat >confdef2sed.sed <<\_ACEOF
19443 +s/[\\&,]/\\&/g
19444 +s,[\\$`],\\&,g
19445 +t clear
19446 +: clear
19447 +s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19448 +t end
19449 +s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19450 +: end
19451 +_ACEOF
19452 +# If some macros were called several times there might be several times
19453 +# the same #defines, which is useless.  Nevertheless, we may not want to
19454 +# sort them, since we want the *last* AC-DEFINE to be honored.
19455 +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19456 +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19457 +rm -f confdef2sed.sed
19458  
19459  # This sed command replaces #undef with comments.  This is necessary, for
19460  # example, in the case of _POSIX_SOURCE, which is predefined and required
19461  # on some systems where configure will not decide to define it.
19462 -cat >> conftest.vals <<\EOF
19463 -s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
19464 -EOF
19465 +cat >>conftest.undefs <<\_ACEOF
19466 +s,^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19467 +_ACEOF
19468  
19469 -# Break up conftest.vals because some shells have a limit on
19470 -# the size of here documents, and old seds have small limits too.
19471 +# Break up conftest.defines because some shells have a limit on the size
19472 +# of here documents, and old seds have small limits too (100 cmds).
19473 +echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19474 +echo '  if grep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19475 +echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19476 +echo '  :' >>$CONFIG_STATUS
19477 +rm -f conftest.tail
19478 +while grep . conftest.defines >/dev/null
19479 +do
19480 +  # Write a limited-size here document to $tmp/defines.sed.
19481 +  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19482 +  # Speed up: don't consider the non `#define' lines.
19483 +  echo '/^[    ]*#[    ]*define/!b' >>$CONFIG_STATUS
19484 +  # Work around the forget-to-reset-the-flag bug.
19485 +  echo 't clr' >>$CONFIG_STATUS
19486 +  echo ': clr' >>$CONFIG_STATUS
19487 +  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19488 +  echo 'CEOF
19489 +  sed -f $tmp/defines.sed $tmp/in >$tmp/out
19490 +  rm -f $tmp/in
19491 +  mv $tmp/out $tmp/in
19492 +' >>$CONFIG_STATUS
19493 +  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19494 +  rm -f conftest.defines
19495 +  mv conftest.tail conftest.defines
19496 +done
19497 +rm -f conftest.defines
19498 +echo '  fi # grep' >>$CONFIG_STATUS
19499 +echo >>$CONFIG_STATUS
19500  
19501 +# Break up conftest.undefs because some shells have a limit on the size
19502 +# of here documents, and old seds have small limits too (100 cmds).
19503 +echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19504  rm -f conftest.tail
19505 -while :
19506 +while grep . conftest.undefs >/dev/null
19507  do
19508 -  ac_lines=`grep -c . conftest.vals`
19509 -  # grep -c gives empty output for an empty file on some AIX systems.
19510 -  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
19511 -  # Write a limited-size here document to conftest.frag.
19512 -  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
19513 -  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
19514 +  # Write a limited-size here document to $tmp/undefs.sed.
19515 +  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19516 +  # Speed up: don't consider the non `#undef'
19517 +  echo '/^[    ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19518 +  # Work around the forget-to-reset-the-flag bug.
19519 +  echo 't clr' >>$CONFIG_STATUS
19520 +  echo ': clr' >>$CONFIG_STATUS
19521 +  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19522    echo 'CEOF
19523 -  sed -f conftest.frag conftest.in > conftest.out
19524 -  rm -f conftest.in
19525 -  mv conftest.out conftest.in
19526 -' >> $CONFIG_STATUS
19527 -  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19528 -  rm -f conftest.vals
19529 -  mv conftest.tail conftest.vals
19530 +  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19531 +  rm -f $tmp/in
19532 +  mv $tmp/out $tmp/in
19533 +' >>$CONFIG_STATUS
19534 +  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19535 +  rm -f conftest.undefs
19536 +  mv conftest.tail conftest.undefs
19537  done
19538 -rm -f conftest.vals
19539 +rm -f conftest.undefs
19540  
19541 -cat >> $CONFIG_STATUS <<\EOF
19542 -  rm -f conftest.frag conftest.h
19543 -  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
19544 -  cat conftest.in >> conftest.h
19545 -  rm -f conftest.in
19546 -  if cmp -s $ac_file conftest.h 2>/dev/null; then
19547 -    echo "$ac_file is unchanged"
19548 -    rm -f conftest.h
19549 +cat >>$CONFIG_STATUS <<\_ACEOF
19550 +  # Let's still pretend it is `configure' which instantiates (i.e., don't
19551 +  # use $as_me), people would be surprised to read:
19552 +  #    /* config.h.  Generated by config.status.  */
19553 +  if test x"$ac_file" = x-; then
19554 +    echo "/* Generated by configure.  */" >$tmp/config.h
19555    else
19556 -    # Remove last slash and all that follows it.  Not all systems have dirname.
19557 -      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
19558 -      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19559 -      # The file is in a subdirectory.
19560 -      test ! -d "$ac_dir" && mkdir "$ac_dir"
19561 -    fi
19562 -    rm -f $ac_file
19563 -    mv conftest.h $ac_file
19564 +    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19565    fi
19566 -fi; done
19567 +  cat $tmp/in >>$tmp/config.h
19568 +  rm -f $tmp/in
19569 +  if test x"$ac_file" != x-; then
19570 +    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
19571 +      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19572 +echo "$as_me: $ac_file is unchanged" >&6;}
19573 +    else
19574 +      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19575 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19576 +         X"$ac_file" : 'X\(//\)[^/]' \| \
19577 +         X"$ac_file" : 'X\(//\)$' \| \
19578 +         X"$ac_file" : 'X\(/\)' \| \
19579 +         .     : '\(.\)' 2>/dev/null ||
19580 +echo X"$ac_file" |
19581 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19582 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19583 +         /^X\(\/\/\)$/{ s//\1/; q; }
19584 +         /^X\(\/\).*/{ s//\1/; q; }
19585 +         s/.*/./; q'`
19586 +      { if $as_mkdir_p; then
19587 +    mkdir -p "$ac_dir"
19588 +  else
19589 +    as_dir="$ac_dir"
19590 +    as_dirs=
19591 +    while test ! -d "$as_dir"; do
19592 +      as_dirs="$as_dir $as_dirs"
19593 +      as_dir=`(dirname "$as_dir") 2>/dev/null ||
19594 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19595 +         X"$as_dir" : 'X\(//\)[^/]' \| \
19596 +         X"$as_dir" : 'X\(//\)$' \| \
19597 +         X"$as_dir" : 'X\(/\)' \| \
19598 +         .     : '\(.\)' 2>/dev/null ||
19599 +echo X"$as_dir" |
19600 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19601 +         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19602 +         /^X\(\/\/\)$/{ s//\1/; q; }
19603 +         /^X\(\/\).*/{ s//\1/; q; }
19604 +         s/.*/./; q'`
19605 +    done
19606 +    test ! -n "$as_dirs" || mkdir $as_dirs
19607 +  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19608 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19609 +   { (exit 1); exit 1; }; }; }
19610  
19611 -EOF
19612 -cat >> $CONFIG_STATUS <<EOF
19613 +      rm -f $ac_file
19614 +      mv $tmp/config.h $ac_file
19615 +    fi
19616 +  else
19617 +    cat $tmp/config.h
19618 +    rm -f $tmp/config.h
19619 +  fi
19620 +done
19621 +_ACEOF
19622  
19623 -EOF
19624 -cat >> $CONFIG_STATUS <<\EOF
19625 +cat >>$CONFIG_STATUS <<\_ACEOF
19626  
19627 -exit 0
19628 -EOF
19629 +{ (exit 0); exit 0; }
19630 +_ACEOF
19631  chmod +x $CONFIG_STATUS
19632 -rm -fr confdefs* $ac_clean_files
19633 -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
19634 +ac_clean_files=$ac_clean_files_save
19635 +
19636 +
19637 +# configure is writing to config.log, and then calls config.status.
19638 +# config.status does its own redirection, appending to config.log.
19639 +# Unfortunately, on DOS this fails, as config.log is still kept open
19640 +# by configure, so config.status won't be able to write to it; its
19641 +# output is simply discarded.  So we exec the FD to /dev/null,
19642 +# effectively closing config.log, so it can be properly (re)opened and
19643 +# appended to by config.status.  When coming back to configure, we
19644 +# need to make the FD available again.
19645 +if test "$no_create" != yes; then
19646 +  ac_cs_success=:
19647 +  ac_config_status_args=
19648 +  test "$silent" = yes &&
19649 +    ac_config_status_args="$ac_config_status_args --quiet"
19650 +  exec 5>/dev/null
19651 +  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19652 +  exec 5>>config.log
19653 +  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19654 +  # would make configure fail if this is the last instruction.
19655 +  $ac_cs_success || { (exit 1); exit 1; }
19656 +fi
19657  
19658 diff -urNd -urNd patch-2.5.4/configure.ac patch-2.5.9/configure.ac
19659 --- patch-2.5.4/configure.ac    1969-12-31 19:00:00.000000000 -0500
19660 +++ patch-2.5.9/configure.ac    2003-05-19 02:44:57.000000000 -0400
19661 @@ -0,0 +1,95 @@
19662 +# Configure `patch'.
19663 +
19664 +# Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003 Free Software
19665 +# Foundation, Inc.
19666 +
19667 +# This program is free software; you can redistribute it and/or modify
19668 +# it under the terms of the GNU General Public License as published by
19669 +# the Free Software Foundation; either version 2, or (at your option)
19670 +# any later version.
19671 +
19672 +# This program is distributed in the hope that it will be useful,
19673 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
19674 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19675 +# GNU General Public License for more details.
19676 +
19677 +# You should have received a copy of the GNU General Public License
19678 +# along with this program; if not, write to the Free Software
19679 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19680 +# 02111-1307, USA.
19681 +
19682 +AC_PREREQ(2.57)
19683 +AC_INIT(patch, 2.5.9, bug-patch@gnu.org)
19684 +AC_CONFIG_SRCDIR(patch.c)
19685 +AC_CONFIG_HEADER(config.h:config.hin)
19686 +AC_ARG_PROGRAM
19687 +
19688 +AC_PROG_CC
19689 +AC_PROG_CPP
19690 +AC_PROG_INSTALL
19691 +AC_PROG_MAKE_SET
19692 +# Use ed_PROGRAM, not ED_PROGRAM,
19693 +# because <errno.h> reserves symbols starting with `E'.
19694 +AC_PATH_PROG(ed_PROGRAM, ed, ed)
19695 +
19696 +AC_GNU_SOURCE
19697 +AC_AIX
19698 +AC_MINIX
19699 +AC_PROG_CC_STDC
19700 +AC_ISC_POSIX
19701 +AC_SYS_LARGEFILE
19702 +AC_EXEEXT
19703 +
19704 +AC_C_PROTOTYPES
19705 +AC_C_CONST
19706 +
19707 +AC_HEADER_DIRENT
19708 +AC_HEADER_STDC
19709 +AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
19710 +
19711 +AC_TYPE_MODE_T
19712 +AC_TYPE_OFF_T
19713 +AC_TYPE_PID_T
19714 +AC_TYPE_SIGNAL
19715 +AC_TYPE_SIZE_T
19716 +AM_STDBOOL_H
19717 +jm_CHECK_TYPE_STRUCT_UTIMBUF
19718 +
19719 +gl_BACKUPFILE
19720 +gl_DIRNAME
19721 +gl_ERROR
19722 +gl_FUNC_MEMCHR
19723 +gl_FUNC_RMDIR
19724 +gl_GETOPT
19725 +gl_PREREQ_XMALLOC
19726 +gl_QUOTE
19727 +gl_QUOTEARG
19728 +
19729 +dnl This should be in gnulib, but isn't for some reason.
19730 +AC_DEFUN([jm_PREREQ_ADDEXT],
19731 +[
19732 +  dnl For addext.c.
19733 +  AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
19734 +  AC_CHECK_FUNCS(pathconf)
19735 +  AC_CHECK_HEADERS(limits.h string.h unistd.h)
19736 +])
19737 +jm_PREREQ_ADDEXT
19738 +
19739 +AC_CHECK_DECLS([free, getenv, malloc, mktemp])
19740 +AC_CHECK_FUNCS(_doprintf geteuid getuid isascii memcmp mktemp \
19741 +  pathconf raise sigaction sigprocmask sigsetmask strerror)
19742 +AC_REPLACE_FUNCS(mkdir strncasecmp)
19743 +AC_FUNC_FSEEKO
19744 +jm_FUNC_GLIBC_UNLOCKED_IO
19745 +jm_FUNC_MALLOC
19746 +jm_FUNC_REALLOC
19747 +AC_FUNC_CLOSEDIR_VOID
19748 +AC_FUNC_SETMODE_DOS
19749 +AC_FUNC_VPRINTF
19750 +PATCH_FUNC_MKDIR_TAKES_ONE_ARG
19751 +
19752 +jm_AC_DOS
19753 +AC_SYS_LONG_FILE_NAMES
19754 +
19755 +AC_CONFIG_FILES([Makefile])
19756 +AC_OUTPUT
19757 diff -urNd -urNd patch-2.5.4/configure.in patch-2.5.9/configure.in
19758 --- patch-2.5.4/configure.in    1999-08-30 02:20:08.000000000 -0400
19759 +++ patch-2.5.9/configure.in    1969-12-31 19:00:00.000000000 -0500
19760 @@ -1,59 +0,0 @@
19761 -# Configure `patch'.
19762 -# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
19763 -dnl Process this file with autoconf to produce a configure script.
19764 -
19765 -AC_PREREQ(2.12)
19766 -AC_INIT(patch.c)
19767 -AC_CONFIG_HEADER(config.h:config.hin)
19768 -AC_ARG_PROGRAM
19769 -AC_CANONICAL_HOST
19770 -
19771 -PACKAGE=patch
19772 -VERSION=2.5.4
19773 -AC_SUBST(PACKAGE)
19774 -AC_SUBST(VERSION)
19775 -
19776 -AC_PROG_CC
19777 -AC_PROG_CPP
19778 -AC_PROG_INSTALL
19779 -AC_PROG_MAKE_SET
19780 -# Use ed_PROGRAM, not ED_PROGRAM,
19781 -# because <errno.h> reserves symbols starting with `E'.
19782 -AC_PATH_PROG(ed_PROGRAM, ed, ed)
19783 -
19784 -AC_SYS_LARGEFILE
19785 -
19786 -AC_AIX
19787 -AC_MINIX
19788 -AC_ISC_POSIX
19789 -AC_EXEEXT
19790 -
19791 -AM_C_PROTOTYPES
19792 -AC_C_CONST
19793 -
19794 -AC_HEADER_DIRENT
19795 -AC_HEADER_STDC
19796 -AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
19797 -jm_AC_HEADER_INTTYPES_H
19798 -
19799 -AC_TYPE_MODE_T
19800 -AC_TYPE_OFF_T
19801 -AC_TYPE_PID_T
19802 -AC_TYPE_SIGNAL
19803 -AC_TYPE_SIZE_T
19804 -jm_STRUCT_UTIMBUF
19805 -
19806 -AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"])
19807 -AC_SUBST(LIBOBJS)
19808 -AC_CHECK_FUNCS(_doprintf isascii fseeko memcmp mktemp \
19809 -  pathconf raise setmode sigaction sigprocmask sigsetmask strerror)
19810 -AC_REPLACE_FUNCS(memchr mkdir rename rmdir)
19811 -jm_FUNC_MALLOC
19812 -jm_FUNC_REALLOC
19813 -AC_FUNC_CLOSEDIR_VOID
19814 -AC_FUNC_VPRINTF
19815 -
19816 -AC_SYS_LONG_FILE_NAMES
19817 -jm_STRUCT_DIRENT_D_INO
19818 -
19819 -AC_OUTPUT(Makefile)
19820 diff -urNd -urNd patch-2.5.4/COPYING patch-2.5.9/COPYING
19821 --- patch-2.5.4/COPYING 1998-02-28 20:21:09.000000000 -0500
19822 +++ patch-2.5.9/COPYING 1999-02-10 00:47:30.000000000 -0500
19823 @@ -2,7 +2,7 @@
19824                        Version 2, June 1991
19825  
19826   Copyright (C) 1989, 1991 Free Software Foundation, Inc.
19827 -                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19828 +     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19829   Everyone is permitted to copy and distribute verbatim copies
19830   of this license document, but changing it is not allowed.
19831  
19832 @@ -291,7 +291,7 @@
19833  the "copyright" line and a pointer to where the full notice is found.
19834  
19835      <one line to give the program's name and a brief idea of what it does.>
19836 -    Copyright (C) 19yy  <name of author>
19837 +    Copyright (C) <year>  <name of author>
19838  
19839      This program is free software; you can redistribute it and/or modify
19840      it under the terms of the GNU General Public License as published by
19841 @@ -313,7 +313,7 @@
19842  If the program is interactive, make it output a short notice like this
19843  when it starts in an interactive mode:
19844  
19845 -    Gnomovision version 69, Copyright (C) 19yy name of author
19846 +    Gnomovision version 69, Copyright (C) year  name of author
19847      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
19848      This is free software, and you are welcome to redistribute it
19849      under certain conditions; type `show c' for details.
19850 diff -urNd -urNd patch-2.5.4/debian.patch patch-2.5.9/debian.patch
19851 diff -urNd -urNd patch-2.5.4/dirname.c patch-2.5.9/dirname.c
19852 --- patch-2.5.4/dirname.c       1969-12-31 19:00:00.000000000 -0500
19853 +++ patch-2.5.9/dirname.c       2003-04-05 01:49:44.000000000 -0500
19854 @@ -0,0 +1,121 @@
19855 +/* dirname.c -- return all but the last element in a path
19856 +   Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
19857 +
19858 +   This program is free software; you can redistribute it and/or modify
19859 +   it under the terms of the GNU General Public License as published by
19860 +   the Free Software Foundation; either version 2, or (at your option)
19861 +   any later version.
19862 +
19863 +   This program is distributed in the hope that it will be useful,
19864 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
19865 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19866 +   GNU General Public License for more details.
19867 +
19868 +   You should have received a copy of the GNU General Public License
19869 +   along with this program; if not, write to the Free Software Foundation,
19870 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19871 +
19872 +#if HAVE_CONFIG_H
19873 +# include <config.h>
19874 +#endif
19875 +
19876 +#if STDC_HEADERS || HAVE_STRING_H
19877 +# include <string.h>
19878 +#endif
19879 +
19880 +#include "dirname.h"
19881 +#include "xalloc.h"
19882 +
19883 +/* Return the length of `dirname (PATH)', or zero if PATH is
19884 +   in the working directory.  Works properly even if
19885 +   there are trailing slashes (by effectively ignoring them).  */
19886 +size_t
19887 +dir_len (char const *path)
19888 +{
19889 +  size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
19890 +  size_t length;
19891 +
19892 +  /* Strip the basename and any redundant slashes before it.  */
19893 +  for (length = base_name (path) - path;  prefix_length < length;  length--)
19894 +    if (! ISSLASH (path[length - 1]))
19895 +      return length;
19896 +
19897 +  /* But don't strip the only slash from "/".  */
19898 +  return prefix_length + ISSLASH (path[prefix_length]);
19899 +}
19900 +
19901 +/* Return the leading directories part of PATH,
19902 +   allocated with xmalloc.
19903 +   Works properly even if there are trailing slashes
19904 +   (by effectively ignoring them).  */
19905 +
19906 +char *
19907 +dir_name (char const *path)
19908 +{
19909 +  size_t length = dir_len (path);
19910 +  int append_dot = (length == FILESYSTEM_PREFIX_LEN (path));
19911 +  char *newpath = xmalloc (length + append_dot + 1);
19912 +  memcpy (newpath, path, length);
19913 +  if (append_dot)
19914 +    newpath[length++] = '.';
19915 +  newpath[length] = 0;
19916 +  return newpath;
19917 +}
19918 +
19919 +#ifdef TEST_DIRNAME
19920 +/*
19921 +
19922 +Run the test like this (expect no output):
19923 +  gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
19924 +     basename.c dirname.c xmalloc.c error.c
19925 +  sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
19926 +
19927 +If it's been built on a DOS or Windows platforms, run another test like
19928 +this (again, expect no output):
19929 +  sed -n '/^BEGIN-DOS-DATA$/,/^END-DOS-DATA$/p' dirname.c|grep -v DATA|./a.out
19930 +
19931 +BEGIN-DATA
19932 +foo//// .
19933 +bar/foo//// bar
19934 +foo/ .
19935 +/ /
19936 +. .
19937 +a .
19938 +END-DATA
19939 +
19940 +BEGIN-DOS-DATA
19941 +c:///// c:/
19942 +c:/ c:/
19943 +c:/. c:/
19944 +c:foo c:.
19945 +c:foo/bar c:foo
19946 +END-DOS-DATA
19947 +
19948 +*/
19949 +
19950 +# define MAX_BUFF_LEN 1024
19951 +# include <stdio.h>
19952 +
19953 +char *program_name;
19954 +
19955 +int
19956 +main (int argc, char *argv[])
19957 +{
19958 +  char buff[MAX_BUFF_LEN + 1];
19959 +
19960 +  program_name = argv[0];
19961 +
19962 +  buff[MAX_BUFF_LEN] = 0;
19963 +  while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
19964 +    {
19965 +      char path[MAX_BUFF_LEN];
19966 +      char expected_result[MAX_BUFF_LEN];
19967 +      char const *result;
19968 +      sscanf (buff, "%s %s", path, expected_result);
19969 +      result = dir_name (path);
19970 +      if (strcmp (result, expected_result))
19971 +       printf ("%s: got %s, expected %s\n", path, result, expected_result);
19972 +    }
19973 +  return 0;
19974 +}
19975 +#endif
19976 diff -urNd -urNd patch-2.5.4/dirname.h patch-2.5.9/dirname.h
19977 --- patch-2.5.4/dirname.h       1969-12-31 19:00:00.000000000 -0500
19978 +++ patch-2.5.9/dirname.h       2001-05-12 11:46:36.000000000 -0400
19979 @@ -0,0 +1,47 @@
19980 +/*  Copyright (C) 1998, 2001 Free Software Foundation, Inc.
19981 +
19982 +    This program is free software; you can redistribute it and/or modify
19983 +    it under the terms of the GNU General Public License as published by
19984 +    the Free Software Foundation; either version 2, or (at your option)
19985 +    any later version.
19986 +
19987 +    This program is distributed in the hope that it will be useful,
19988 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
19989 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19990 +    GNU General Public License for more details.
19991 +
19992 +    You should have received a copy of the GNU General Public License
19993 +    along with this program; if not, write to the Free Software Foundation,
19994 +    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
19995 +
19996 +#ifndef DIRNAME_H_
19997 +# define DIRNAME_H_ 1
19998 +
19999 +# ifndef PARAMS
20000 +#  if defined PROTOTYPES || (defined __STDC__ && __STDC__)
20001 +#   define PARAMS(Args) Args
20002 +#  else
20003 +#   define PARAMS(Args) ()
20004 +#  endif
20005 +# endif
20006 +
20007 +# ifndef DIRECTORY_SEPARATOR
20008 +#  define DIRECTORY_SEPARATOR '/'
20009 +# endif
20010 +
20011 +# ifndef ISSLASH
20012 +#  define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
20013 +# endif
20014 +
20015 +# ifndef FILESYSTEM_PREFIX_LEN
20016 +#  define FILESYSTEM_PREFIX_LEN(Filename) 0
20017 +# endif
20018 +
20019 +char *base_name PARAMS ((char const *path));
20020 +char *dir_name PARAMS ((char const *path));
20021 +size_t base_len PARAMS ((char const *path));
20022 +size_t dir_len PARAMS ((char const *path));
20023 +
20024 +int strip_trailing_slashes PARAMS ((char *path));
20025 +
20026 +#endif /* not DIRNAME_H_ */
20027 diff -urNd -urNd patch-2.5.4/error.c patch-2.5.9/error.c
20028 --- patch-2.5.4/error.c 1998-11-15 12:35:34.000000000 -0500
20029 +++ patch-2.5.9/error.c 2002-12-06 03:08:13.000000000 -0500
20030 @@ -1,23 +1,18 @@
20031  /* Error handler for noninteractive utilities
20032 -   Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
20033 -
20034 -   This file is part of the GNU C Library.  Its master source is NOT part of
20035 -   the C library, however.  The master source lives in /gd/gnu/lib.
20036 -
20037 -   The GNU C Library is free software; you can redistribute it and/or
20038 -   modify it under the terms of the GNU Library General Public License as
20039 -   published by the Free Software Foundation; either version 2 of the
20040 -   License, or (at your option) any later version.
20041 +   Copyright (C) 1990-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
20042 +   This program is free software; you can redistribute it and/or modify
20043 +   it under the terms of the GNU General Public License as published by
20044 +   the Free Software Foundation; either version 2, or (at your option)
20045 +   any later version.
20046  
20047 -   The GNU C Library is distributed in the hope that it will be useful,
20048 +   This program is distributed in the hope that it will be useful,
20049     but WITHOUT ANY WARRANTY; without even the implied warranty of
20050 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20051 -   Library General Public License for more details.
20052 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20053 +   GNU General Public License for more details.
20054  
20055 -   You should have received a copy of the GNU Library General Public
20056 -   License along with the GNU C Library; see the file COPYING.LIB.  If not,
20057 -   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20058 -   Boston, MA 02111-1307, USA.  */
20059 +   You should have received a copy of the GNU General Public License along
20060 +   with this program; if not, write to the Free Software Foundation,
20061 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20062  
20063  /* Written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
20064  
20065 @@ -27,6 +22,17 @@
20066  
20067  #include <stdio.h>
20068  
20069 +#ifdef _LIBC
20070 +# include <libintl.h>
20071 +#else
20072 +# include "gettext.h"
20073 +#endif
20074 +
20075 +#ifdef _LIBC
20076 +# include <wchar.h>
20077 +# define mbsrtowcs __mbsrtowcs
20078 +#endif
20079 +
20080  #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
20081  # if __STDC__
20082  #  include <stdarg.h>
20083 @@ -49,6 +55,10 @@
20084  
20085  #include "error.h"
20086  
20087 +#if !_LIBC
20088 +# include "unlocked-io.h"
20089 +#endif
20090 +
20091  #ifndef _
20092  # define _(String) String
20093  #endif
20094 @@ -70,29 +80,52 @@
20095  
20096  # define program_name program_invocation_name
20097  # include <errno.h>
20098 +# include <libio/libioP.h>
20099  
20100  /* In GNU libc we want do not want to use the common name `error' directly.
20101     Instead make it a weak alias.  */
20102 +extern void __error (int status, int errnum, const char *message, ...)
20103 +     __attribute__ ((__format__ (__printf__, 3, 4)));
20104 +extern void __error_at_line (int status, int errnum, const char *file_name,
20105 +                            unsigned int line_number, const char *message,
20106 +                            ...)
20107 +     __attribute__ ((__format__ (__printf__, 5, 6)));;
20108  # define error __error
20109  # define error_at_line __error_at_line
20110  
20111 +# ifdef USE_IN_LIBIO
20112 +#  include <libio/iolibio.h>
20113 +#  define fflush(s) INTUSE(_IO_fflush) (s)
20114 +#  undef putc
20115 +#  define putc(c, fp) INTUSE(_IO_putc) (c, fp)
20116 +# endif
20117 +
20118  #else /* not _LIBC */
20119  
20120 +# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
20121 +#  ifndef HAVE_DECL_STRERROR_R
20122 +"this configure-time declaration test was not run"
20123 +#  endif
20124 +char *strerror_r ();
20125 +# endif
20126 +
20127  /* The calling program should define program_name and set it to the
20128     name of the executing program.  */
20129  extern char *program_name;
20130  
20131 -# ifdef HAVE_STRERROR_R
20132 +# if HAVE_STRERROR_R || defined strerror_r
20133  #  define __strerror_r strerror_r
20134  # else
20135  #  if HAVE_STRERROR
20136 -#   ifndef strerror            /* On some systems, strerror is a macro */
20137 +#   ifndef HAVE_DECL_STRERROR
20138 +"this configure-time declaration test was not run"
20139 +#   endif
20140 +#   if !HAVE_DECL_STRERROR
20141  char *strerror ();
20142  #   endif
20143  #  else
20144  static char *
20145 -private_strerror (errnum)
20146 -     int errnum;
20147 +private_strerror (int errnum)
20148  {
20149    extern char *sys_errlist[];
20150    extern int sys_nerr;
20151 @@ -103,15 +136,118 @@
20152  }
20153  #   define strerror private_strerror
20154  #  endif /* HAVE_STRERROR */
20155 -# endif        /* HAVE_STRERROR_R */
20156 +# endif        /* HAVE_STRERROR_R || defined strerror_r */
20157  #endif /* not _LIBC */
20158  
20159 +static void
20160 +print_errno_message (int errnum)
20161 +{
20162 +  char const *s;
20163 +
20164 +#if defined HAVE_STRERROR_R || _LIBC
20165 +  char errbuf[1024];
20166 +# if STRERROR_R_CHAR_P || _LIBC
20167 +  s = __strerror_r (errnum, errbuf, sizeof errbuf);
20168 +# else
20169 +  if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
20170 +    s = errbuf;
20171 +  else
20172 +    s = 0;
20173 +# endif
20174 +#else
20175 +  s = strerror (errnum);
20176 +#endif
20177 +
20178 +#if !_LIBC
20179 +  if (! s)
20180 +    s = _("Unknown system error");
20181 +#endif
20182 +
20183 +#if _LIBC && USE_IN_LIBIO
20184 +  if (_IO_fwide (stderr, 0) > 0)
20185 +    {
20186 +      __fwprintf (stderr, L": %s", s);
20187 +      return;
20188 +    }
20189 +#endif
20190 +
20191 +  fprintf (stderr, ": %s", s);
20192 +}
20193 +
20194 +#ifdef VA_START
20195 +static void
20196 +error_tail (int status, int errnum, const char *message, va_list args)
20197 +{
20198 +# if HAVE_VPRINTF || _LIBC
20199 +#  if _LIBC && USE_IN_LIBIO
20200 +  if (_IO_fwide (stderr, 0) > 0)
20201 +    {
20202 +#   define ALLOCA_LIMIT        2000
20203 +      size_t len = strlen (message) + 1;
20204 +      wchar_t *wmessage = NULL;
20205 +      mbstate_t st;
20206 +      size_t res;
20207 +      const char *tmp;
20208 +
20209 +      do
20210 +       {
20211 +         if (len < ALLOCA_LIMIT)
20212 +           wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
20213 +         else
20214 +           {
20215 +             if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
20216 +               wmessage = NULL;
20217 +
20218 +             wmessage = (wchar_t *) realloc (wmessage,
20219 +                                             len * sizeof (wchar_t));
20220 +
20221 +             if (wmessage == NULL)
20222 +               {
20223 +                 fputws_unlocked (L"out of memory\n", stderr);
20224 +                 return;
20225 +               }
20226 +           }
20227 +
20228 +         memset (&st, '\0', sizeof (st));
20229 +         tmp =message;
20230 +       }
20231 +      while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
20232 +
20233 +      if (res == (size_t) -1)
20234 +       /* The string cannot be converted.  */
20235 +       wmessage = (wchar_t *) L"???";
20236 +
20237 +      __vfwprintf (stderr, wmessage, args);
20238 +    }
20239 +  else
20240 +#  endif
20241 +    vfprintf (stderr, message, args);
20242 +# else
20243 +  _doprnt (message, args, stderr);
20244 +# endif
20245 +  va_end (args);
20246 +
20247 +  ++error_message_count;
20248 +  if (errnum)
20249 +    print_errno_message (errnum);
20250 +# if _LIBC && USE_IN_LIBIO
20251 +  if (_IO_fwide (stderr, 0) > 0)
20252 +    putwc (L'\n', stderr);
20253 +  else
20254 +# endif
20255 +    putc ('\n', stderr);
20256 +  fflush (stderr);
20257 +  if (status)
20258 +    exit (status);
20259 +}
20260 +#endif
20261 +
20262 +
20263  /* Print the program name and error message MESSAGE, which is a printf-style
20264     format string with optional args.
20265     If ERRNUM is nonzero, print its corresponding system error message.
20266     Exit with status STATUS if it is nonzero.  */
20267  /* VARARGS */
20268 -
20269  void
20270  #if defined VA_START && __STDC__
20271  error (int status, int errnum, const char *message, ...)
20272 @@ -127,43 +263,48 @@
20273    va_list args;
20274  #endif
20275  
20276 +  fflush (stdout);
20277 +#ifdef _LIBC
20278 +# ifdef USE_IN_LIBIO
20279 +  _IO_flockfile (stderr);
20280 +# else
20281 +  __flockfile (stderr);
20282 +# endif
20283 +#endif
20284    if (error_print_progname)
20285      (*error_print_progname) ();
20286    else
20287      {
20288 -      fflush (stdout);
20289 -      fprintf (stderr, "%s: ", program_name);
20290 +#if _LIBC && USE_IN_LIBIO
20291 +      if (_IO_fwide (stderr, 0) > 0)
20292 +       __fwprintf (stderr, L"%s: ", program_name);
20293 +      else
20294 +#endif
20295 +       fprintf (stderr, "%s: ", program_name);
20296      }
20297  
20298  #ifdef VA_START
20299    VA_START (args, message);
20300 -# if HAVE_VPRINTF || _LIBC
20301 -  vfprintf (stderr, message, args);
20302 -# else
20303 -  _doprnt (message, args, stderr);
20304 -# endif
20305 -  va_end (args);
20306 +  error_tail (status, errnum, message, args);
20307  #else
20308    fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
20309 -#endif
20310  
20311    ++error_message_count;
20312    if (errnum)
20313 -    {
20314 -#if defined HAVE_STRERROR_R || defined _LIBC
20315 -      char errbuf[1024];
20316 -      /* Don't use __strerror_r's return value because on some systems
20317 -        (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'.  */
20318 -      __strerror_r (errnum, errbuf, sizeof errbuf);
20319 -      fprintf (stderr, ": %s", errbuf);
20320 -#else
20321 -      fprintf (stderr, ": %s", strerror (errnum));
20322 -#endif
20323 -    }
20324 +    print_errno_message (errnum);
20325    putc ('\n', stderr);
20326    fflush (stderr);
20327    if (status)
20328      exit (status);
20329 +#endif
20330 +
20331 +#ifdef _LIBC
20332 +# ifdef USE_IN_LIBIO
20333 +  _IO_funlockfile (stderr);
20334 +# else
20335 +  __funlockfile (stderr);
20336 +# endif
20337 +#endif
20338  }
20339  \f
20340  /* Sometimes we want to have at most one error per line.  This
20341 @@ -193,8 +334,9 @@
20342        static const char *old_file_name;
20343        static unsigned int old_line_number;
20344  
20345 -      if (old_line_number == line_number &&
20346 -         (file_name == old_file_name || !strcmp (old_file_name, file_name)))
20347 +      if (old_line_number == line_number
20348 +         && (file_name == old_file_name
20349 +             || strcmp (old_file_name, file_name) == 0))
20350         /* Simply return and print nothing.  */
20351         return;
20352  
20353 @@ -202,43 +344,58 @@
20354        old_line_number = line_number;
20355      }
20356  
20357 +  fflush (stdout);
20358 +#ifdef _LIBC
20359 +# ifdef USE_IN_LIBIO
20360 +  _IO_flockfile (stderr);
20361 +# else
20362 +  __flockfile (stderr);
20363 +# endif
20364 +#endif
20365    if (error_print_progname)
20366      (*error_print_progname) ();
20367    else
20368      {
20369 -      fflush (stdout);
20370 -      fprintf (stderr, "%s:", program_name);
20371 +#if _LIBC && USE_IN_LIBIO
20372 +      if (_IO_fwide (stderr, 0) > 0)
20373 +       __fwprintf (stderr, L"%s: ", program_name);
20374 +      else
20375 +#endif
20376 +       fprintf (stderr, "%s:", program_name);
20377      }
20378  
20379    if (file_name != NULL)
20380 -    fprintf (stderr, "%s:%d: ", file_name, line_number);
20381 +    {
20382 +#if _LIBC && USE_IN_LIBIO
20383 +      if (_IO_fwide (stderr, 0) > 0)
20384 +       __fwprintf (stderr, L"%s:%d: ", file_name, line_number);
20385 +      else
20386 +#endif
20387 +       fprintf (stderr, "%s:%d: ", file_name, line_number);
20388 +    }
20389  
20390  #ifdef VA_START
20391    VA_START (args, message);
20392 -# if HAVE_VPRINTF || _LIBC
20393 -  vfprintf (stderr, message, args);
20394 -# else
20395 -  _doprnt (message, args, stderr);
20396 -# endif
20397 -  va_end (args);
20398 +  error_tail (status, errnum, message, args);
20399  #else
20400    fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
20401 -#endif
20402  
20403    ++error_message_count;
20404    if (errnum)
20405 -    {
20406 -#if defined HAVE_STRERROR_R || defined _LIBC
20407 -      char errbuf[1024];
20408 -      fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
20409 -#else
20410 -      fprintf (stderr, ": %s", strerror (errnum));
20411 -#endif
20412 -    }
20413 +    print_errno_message (errnum);
20414    putc ('\n', stderr);
20415    fflush (stderr);
20416    if (status)
20417      exit (status);
20418 +#endif
20419 +
20420 +#ifdef _LIBC
20421 +# ifdef USE_IN_LIBIO
20422 +  _IO_funlockfile (stderr);
20423 +# else
20424 +  __funlockfile (stderr);
20425 +# endif
20426 +#endif
20427  }
20428  
20429  #ifdef _LIBC
20430 diff -urNd -urNd patch-2.5.4/error.h patch-2.5.9/error.h
20431 --- patch-2.5.4/error.h 1997-06-21 00:29:28.000000000 -0400
20432 +++ patch-2.5.9/error.h 2001-08-23 13:25:08.000000000 -0400
20433 @@ -25,7 +25,7 @@
20434  
20435  #ifndef __attribute__
20436  /* This feature is available in gcc versions 2.5 and later.  */
20437 -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
20438 +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
20439  #  define __attribute__(Spec) /* empty */
20440  # endif
20441  /* The __-protected variants of `format' and `printf' attributes
20442 diff -urNd -urNd patch-2.5.4/getopt1.c patch-2.5.9/getopt1.c
20443 --- patch-2.5.4/getopt1.c       1999-01-13 00:36:45.000000000 -0500
20444 +++ patch-2.5.9/getopt1.c       2002-11-24 19:17:33.000000000 -0500
20445 @@ -3,26 +3,29 @@
20446       Free Software Foundation, Inc.
20447     This file is part of the GNU C Library.
20448  
20449 -   The GNU C Library is free software; you can redistribute it and/or
20450 -   modify it under the terms of the GNU Library General Public License as
20451 -   published by the Free Software Foundation; either version 2 of the
20452 -   License, or (at your option) any later version.
20453 +   This program is free software; you can redistribute it and/or modify
20454 +   it under the terms of the GNU General Public License as published by
20455 +   the Free Software Foundation; either version 2, or (at your option)
20456 +   any later version.
20457  
20458 -   The GNU C Library is distributed in the hope that it will be useful,
20459 +   This program is distributed in the hope that it will be useful,
20460     but WITHOUT ANY WARRANTY; without even the implied warranty of
20461 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20462 -   Library General Public License for more details.
20463 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20464 +   GNU General Public License for more details.
20465  
20466 -   You should have received a copy of the GNU Library General Public
20467 -   License along with the GNU C Library; see the file COPYING.LIB.  If not,
20468 -   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20469 -   Boston, MA 02111-1307, USA.  */
20470 +   You should have received a copy of the GNU General Public License along
20471 +   with this program; if not, write to the Free Software Foundation,
20472 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20473  \f
20474  #ifdef HAVE_CONFIG_H
20475  #include <config.h>
20476  #endif
20477  
20478 -#include "getopt.h"
20479 +#ifdef _LIBC
20480 +# include <getopt.h>
20481 +#else
20482 +# include "getopt.h"
20483 +#endif
20484  
20485  #if !defined __STDC__ || !__STDC__
20486  /* This is a separate conditional since some stdc systems
20487 @@ -90,6 +93,10 @@
20488    return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
20489  }
20490  
20491 +# ifdef _LIBC
20492 +libc_hidden_def (getopt_long)
20493 +libc_hidden_def (getopt_long_only)
20494 +# endif
20495  
20496  #endif /* Not ELIDE_CODE.  */
20497  \f
20498 diff -urNd -urNd patch-2.5.4/getopt.c patch-2.5.9/getopt.c
20499 --- patch-2.5.4/getopt.c        1999-01-13 00:36:45.000000000 -0500
20500 +++ patch-2.5.9/getopt.c        2002-11-24 19:17:33.000000000 -0500
20501 @@ -2,24 +2,23 @@
20502     NOTE: getopt is now part of the C library, so if you don't know what
20503     "Keep this file name-space clean" means, talk to drepper@gnu.org
20504     before changing it!
20505 -
20506 -   Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
20507 +   Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002
20508         Free Software Foundation, Inc.
20509 +   This file is part of the GNU C Library.
20510  
20511 -   The GNU C Library is free software; you can redistribute it and/or
20512 -   modify it under the terms of the GNU Library General Public License as
20513 -   published by the Free Software Foundation; either version 2 of the
20514 -   License, or (at your option) any later version.
20515 +   This program is free software; you can redistribute it and/or modify
20516 +   it under the terms of the GNU General Public License as published by
20517 +   the Free Software Foundation; either version 2, or (at your option)
20518 +   any later version.
20519  
20520 -   The GNU C Library is distributed in the hope that it will be useful,
20521 +   This program is distributed in the hope that it will be useful,
20522     but WITHOUT ANY WARRANTY; without even the implied warranty of
20523 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20524 -   Library General Public License for more details.
20525 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20526 +   GNU General Public License for more details.
20527  
20528 -   You should have received a copy of the GNU Library General Public
20529 -   License along with the GNU C Library; see the file COPYING.LIB.  If not,
20530 -   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20531 -   Boston, MA 02111-1307, USA.  */
20532 +   You should have received a copy of the GNU General Public License along
20533 +   with this program; if not, write to the Free Software Foundation,
20534 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20535  \f
20536  /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
20537     Ditto for AIX 3.2 and <stdlib.h>.  */
20538 @@ -76,15 +75,20 @@
20539  # endif
20540  #endif
20541  
20542 -#ifndef _
20543 -/* This is for other GNU distributions with internationalized messages.
20544 -   When compiling libc, the _ macro is predefined.  */
20545 -# ifdef HAVE_LIBINTL_H
20546 -#  include <libintl.h>
20547 -#  define _(msgid)     gettext (msgid)
20548 -# else
20549 -#  define _(msgid)     (msgid)
20550 -# endif
20551 +#ifdef _LIBC
20552 +# include <libintl.h>
20553 +#else
20554 +/* This is for other GNU distributions with internationalized messages.  */
20555 +# include "gettext.h"
20556 +#endif
20557 +#define _(msgid) gettext (msgid)
20558 +
20559 +#if defined _LIBC && defined USE_IN_LIBIO
20560 +# include <wchar.h>
20561 +#endif
20562 +
20563 +#ifndef attribute_hidden
20564 +# define attribute_hidden
20565  #endif
20566  
20567  /* This version of `getopt' appears to the caller like standard Unix `getopt'
20568 @@ -109,7 +113,7 @@
20569     Also, when `ordering' is RETURN_IN_ORDER,
20570     each non-option ARGV-element is returned here.  */
20571  
20572 -char *optarg = NULL;
20573 +char *optarg;
20574  
20575  /* Index in ARGV of the next element to be scanned.
20576     This is used for communication to and from the caller
20577 @@ -130,7 +134,7 @@
20578     causes problems with re-calling getopt as programs generally don't
20579     know that. */
20580  
20581 -int __getopt_initialized = 0;
20582 +int __getopt_initialized attribute_hidden;
20583  
20584  /* The next char to be scanned in the option-element
20585     in which the last option character we returned was found.
20586 @@ -249,41 +253,34 @@
20587  static int last_nonopt;
20588  
20589  #ifdef _LIBC
20590 +/* Stored original parameters.
20591 +   XXX This is no good solution.  We should rather copy the args so
20592 +   that we can compare them later.  But we must not use malloc(3).  */
20593 +extern int __libc_argc;
20594 +extern char **__libc_argv;
20595 +
20596  /* Bash 2.0 gives us an environment variable containing flags
20597     indicating ARGV elements that should not be considered arguments.  */
20598  
20599 +# ifdef USE_NONOPTION_FLAGS
20600  /* Defined in getopt_init.c  */
20601  extern char *__getopt_nonoption_flags;
20602  
20603  static int nonoption_flags_max_len;
20604  static int nonoption_flags_len;
20605 +# endif
20606  
20607 -static int original_argc;
20608 -static char *const *original_argv;
20609 -
20610 -/* Make sure the environment variable bash 2.0 puts in the environment
20611 -   is valid for the getopt call we must make sure that the ARGV passed
20612 -   to getopt is that one passed to the process.  */
20613 -static void
20614 -__attribute__ ((unused))
20615 -store_args_and_env (int argc, char *const *argv)
20616 -{
20617 -  /* XXX This is no good solution.  We should rather copy the args so
20618 -     that we can compare them later.  But we must not use malloc(3).  */
20619 -  original_argc = argc;
20620 -  original_argv = argv;
20621 -}
20622 -# ifdef text_set_element
20623 -text_set_element (__libc_subinit, store_args_and_env);
20624 -# endif /* text_set_element */
20625 -
20626 -# define SWAP_FLAGS(ch1, ch2) \
20627 +# ifdef USE_NONOPTION_FLAGS
20628 +#  define SWAP_FLAGS(ch1, ch2) \
20629    if (nonoption_flags_len > 0)                                               \
20630      {                                                                        \
20631        char __tmp = __getopt_nonoption_flags[ch1];                            \
20632        __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];         \
20633        __getopt_nonoption_flags[ch2] = __tmp;                                 \
20634      }
20635 +# else
20636 +#  define SWAP_FLAGS(ch1, ch2)
20637 +# endif
20638  #else  /* !_LIBC */
20639  # define SWAP_FLAGS(ch1, ch2)
20640  #endif /* _LIBC */
20641 @@ -315,7 +312,7 @@
20642       It leaves the longer segment in the right place overall,
20643       but it consists of two parts that need to be swapped next.  */
20644  
20645 -#ifdef _LIBC
20646 +#if defined _LIBC && defined USE_NONOPTION_FLAGS
20647    /* First make sure the handling of the `__getopt_nonoption_flags'
20648       string can work normally.  Our top argument must be in the range
20649       of the string.  */
20650 @@ -419,9 +416,9 @@
20651    else
20652      ordering = PERMUTE;
20653  
20654 -#ifdef _LIBC
20655 +#if defined _LIBC && defined USE_NONOPTION_FLAGS
20656    if (posixly_correct == NULL
20657 -      && argc == original_argc && argv == original_argv)
20658 +      && argc == __libc_argc && argv == __libc_argv)
20659      {
20660        if (nonoption_flags_max_len == 0)
20661         {
20662 @@ -517,6 +514,13 @@
20663       int *longind;
20664       int long_only;
20665  {
20666 +  int print_errors = opterr;
20667 +  if (optstring[0] == ':')
20668 +    print_errors = 0;
20669 +
20670 +  if (argc < 1)
20671 +    return -1;
20672 +
20673    optarg = NULL;
20674  
20675    if (optind == 0 || !__getopt_initialized)
20676 @@ -531,7 +535,7 @@
20677       Either it does not have option syntax, or there is an environment flag
20678       from the shell indicating it is not an option.  The later information
20679       is only used when the used in the GNU libc.  */
20680 -#ifdef _LIBC
20681 +#if defined _LIBC && defined USE_NONOPTION_FLAGS
20682  # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0'              \
20683                       || (optind < nonoption_flags_len                        \
20684                           && __getopt_nonoption_flags[optind] == '1'))
20685 @@ -666,16 +670,37 @@
20686                 pfound = p;
20687                 indfound = option_index;
20688               }
20689 -           else
20690 +           else if (long_only
20691 +                    || pfound->has_arg != p->has_arg
20692 +                    || pfound->flag != p->flag
20693 +                    || pfound->val != p->val)
20694               /* Second or later nonexact match found.  */
20695               ambig = 1;
20696           }
20697  
20698        if (ambig && !exact)
20699         {
20700 -         if (opterr)
20701 -           fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
20702 -                    argv[0], argv[optind]);
20703 +         if (print_errors)
20704 +           {
20705 +#if defined _LIBC && defined USE_IN_LIBIO
20706 +             char *buf;
20707 +
20708 +             if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
20709 +                             argv[0], argv[optind]) >= 0)
20710 +               {
20711 +
20712 +                 if (_IO_fwide (stderr, 0) > 0)
20713 +                   __fwprintf (stderr, L"%s", buf);
20714 +                 else
20715 +                   fputs (buf, stderr);
20716 +
20717 +                 free (buf);
20718 +               }
20719 +#else
20720 +             fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
20721 +                      argv[0], argv[optind]);
20722 +#endif
20723 +           }
20724           nextchar += strlen (nextchar);
20725           optind++;
20726           optopt = 0;
20727 @@ -694,18 +719,52 @@
20728                 optarg = nameend + 1;
20729               else
20730                 {
20731 -                 if (opterr)
20732 +                 if (print_errors)
20733                     {
20734 +#if defined _LIBC && defined USE_IN_LIBIO
20735 +                     char *buf;
20736 +                     int n;
20737 +#endif
20738 +
20739                       if (argv[optind - 1][1] == '-')
20740 -                       /* --option */
20741 -                       fprintf (stderr,
20742 -                                _("%s: option `--%s' doesn't allow an argument\n"),
20743 -                                argv[0], pfound->name);
20744 +                       {
20745 +                         /* --option */
20746 +#if defined _LIBC && defined USE_IN_LIBIO
20747 +                         n = __asprintf (&buf, _("\
20748 +%s: option `--%s' doesn't allow an argument\n"),
20749 +                                         argv[0], pfound->name);
20750 +#else
20751 +                         fprintf (stderr, _("\
20752 +%s: option `--%s' doesn't allow an argument\n"),
20753 +                                  argv[0], pfound->name);
20754 +#endif
20755 +                       }
20756                       else
20757 -                       /* +option or -option */
20758 -                       fprintf (stderr,
20759 -                                _("%s: option `%c%s' doesn't allow an argument\n"),
20760 -                                argv[0], argv[optind - 1][0], pfound->name);
20761 +                       {
20762 +                         /* +option or -option */
20763 +#if defined _LIBC && defined USE_IN_LIBIO
20764 +                         n = __asprintf (&buf, _("\
20765 +%s: option `%c%s' doesn't allow an argument\n"),
20766 +                                         argv[0], argv[optind - 1][0],
20767 +                                         pfound->name);
20768 +#else
20769 +                         fprintf (stderr, _("\
20770 +%s: option `%c%s' doesn't allow an argument\n"),
20771 +                                  argv[0], argv[optind - 1][0], pfound->name);
20772 +#endif
20773 +                       }
20774 +
20775 +#if defined _LIBC && defined USE_IN_LIBIO
20776 +                     if (n >= 0)
20777 +                       {
20778 +                         if (_IO_fwide (stderr, 0) > 0)
20779 +                           __fwprintf (stderr, L"%s", buf);
20780 +                         else
20781 +                           fputs (buf, stderr);
20782 +
20783 +                         free (buf);
20784 +                       }
20785 +#endif
20786                     }
20787  
20788                   nextchar += strlen (nextchar);
20789 @@ -720,10 +779,28 @@
20790                 optarg = argv[optind++];
20791               else
20792                 {
20793 -                 if (opterr)
20794 -                   fprintf (stderr,
20795 -                          _("%s: option `%s' requires an argument\n"),
20796 -                          argv[0], argv[optind - 1]);
20797 +                 if (print_errors)
20798 +                   {
20799 +#if defined _LIBC && defined USE_IN_LIBIO
20800 +                     char *buf;
20801 +
20802 +                     if (__asprintf (&buf, _("\
20803 +%s: option `%s' requires an argument\n"),
20804 +                                     argv[0], argv[optind - 1]) >= 0)
20805 +                       {
20806 +                         if (_IO_fwide (stderr, 0) > 0)
20807 +                           __fwprintf (stderr, L"%s", buf);
20808 +                         else
20809 +                           fputs (buf, stderr);
20810 +
20811 +                         free (buf);
20812 +                       }
20813 +#else
20814 +                     fprintf (stderr,
20815 +                              _("%s: option `%s' requires an argument\n"),
20816 +                              argv[0], argv[optind - 1]);
20817 +#endif
20818 +                   }
20819                   nextchar += strlen (nextchar);
20820                   optopt = pfound->val;
20821                   return optstring[0] == ':' ? ':' : '?';
20822 @@ -747,16 +824,47 @@
20823        if (!long_only || argv[optind][1] == '-'
20824           || my_index (optstring, *nextchar) == NULL)
20825         {
20826 -         if (opterr)
20827 +         if (print_errors)
20828             {
20829 +#if defined _LIBC && defined USE_IN_LIBIO
20830 +             char *buf;
20831 +             int n;
20832 +#endif
20833 +
20834               if (argv[optind][1] == '-')
20835 -               /* --option */
20836 -               fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
20837 -                        argv[0], nextchar);
20838 +               {
20839 +                 /* --option */
20840 +#if defined _LIBC && defined USE_IN_LIBIO
20841 +                 n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
20842 +                                 argv[0], nextchar);
20843 +#else
20844 +                 fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
20845 +                          argv[0], nextchar);
20846 +#endif
20847 +               }
20848               else
20849 -               /* +option or -option */
20850 -               fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
20851 -                        argv[0], argv[optind][0], nextchar);
20852 +               {
20853 +                 /* +option or -option */
20854 +#if defined _LIBC && defined USE_IN_LIBIO
20855 +                 n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
20856 +                                 argv[0], argv[optind][0], nextchar);
20857 +#else
20858 +                 fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
20859 +                          argv[0], argv[optind][0], nextchar);
20860 +#endif
20861 +               }
20862 +
20863 +#if defined _LIBC && defined USE_IN_LIBIO
20864 +             if (n >= 0)
20865 +               {
20866 +                 if (_IO_fwide (stderr, 0) > 0)
20867 +                   __fwprintf (stderr, L"%s", buf);
20868 +                 else
20869 +                   fputs (buf, stderr);
20870 +
20871 +                 free (buf);
20872 +               }
20873 +#endif
20874             }
20875           nextchar = (char *) "";
20876           optind++;
20877 @@ -777,15 +885,44 @@
20878  
20879      if (temp == NULL || c == ':')
20880        {
20881 -       if (opterr)
20882 +       if (print_errors)
20883           {
20884 +#if defined _LIBC && defined USE_IN_LIBIO
20885 +             char *buf;
20886 +             int n;
20887 +#endif
20888 +
20889             if (posixly_correct)
20890 -             /* 1003.2 specifies the format of this message.  */
20891 -             fprintf (stderr, _("%s: illegal option -- %c\n"),
20892 -                      argv[0], c);
20893 +             {
20894 +               /* 1003.2 specifies the format of this message.  */
20895 +#if defined _LIBC && defined USE_IN_LIBIO
20896 +               n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
20897 +                               argv[0], c);
20898 +#else
20899 +               fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
20900 +#endif
20901 +             }
20902             else
20903 -             fprintf (stderr, _("%s: invalid option -- %c\n"),
20904 -                      argv[0], c);
20905 +             {
20906 +#if defined _LIBC && defined USE_IN_LIBIO
20907 +               n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
20908 +                               argv[0], c);
20909 +#else
20910 +               fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
20911 +#endif
20912 +             }
20913 +
20914 +#if defined _LIBC && defined USE_IN_LIBIO
20915 +           if (n >= 0)
20916 +             {
20917 +               if (_IO_fwide (stderr, 0) > 0)
20918 +                 __fwprintf (stderr, L"%s", buf);
20919 +               else
20920 +                 fputs (buf, stderr);
20921 +
20922 +               free (buf);
20923 +             }
20924 +#endif
20925           }
20926         optopt = c;
20927         return '?';
20928 @@ -811,11 +948,27 @@
20929           }
20930         else if (optind == argc)
20931           {
20932 -           if (opterr)
20933 +           if (print_errors)
20934               {
20935                 /* 1003.2 specifies the format of this message.  */
20936 +#if defined _LIBC && defined USE_IN_LIBIO
20937 +               char *buf;
20938 +
20939 +               if (__asprintf (&buf,
20940 +                               _("%s: option requires an argument -- %c\n"),
20941 +                               argv[0], c) >= 0)
20942 +                 {
20943 +                   if (_IO_fwide (stderr, 0) > 0)
20944 +                     __fwprintf (stderr, L"%s", buf);
20945 +                   else
20946 +                     fputs (buf, stderr);
20947 +
20948 +                   free (buf);
20949 +                 }
20950 +#else
20951                 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
20952                          argv[0], c);
20953 +#endif
20954               }
20955             optopt = c;
20956             if (optstring[0] == ':')
20957 @@ -860,9 +1013,26 @@
20958             }
20959         if (ambig && !exact)
20960           {
20961 -           if (opterr)
20962 -             fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
20963 -                      argv[0], argv[optind]);
20964 +           if (print_errors)
20965 +             {
20966 +#if defined _LIBC && defined USE_IN_LIBIO
20967 +               char *buf;
20968 +
20969 +               if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
20970 +                               argv[0], argv[optind]) >= 0)
20971 +                 {
20972 +                   if (_IO_fwide (stderr, 0) > 0)
20973 +                     __fwprintf (stderr, L"%s", buf);
20974 +                   else
20975 +                     fputs (buf, stderr);
20976 +
20977 +                   free (buf);
20978 +                 }
20979 +#else
20980 +               fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
20981 +                        argv[0], argv[optind]);
20982 +#endif
20983 +             }
20984             nextchar += strlen (nextchar);
20985             optind++;
20986             return '?';
20987 @@ -878,10 +1048,28 @@
20988                   optarg = nameend + 1;
20989                 else
20990                   {
20991 -                   if (opterr)
20992 -                     fprintf (stderr, _("\
20993 +                   if (print_errors)
20994 +                     {
20995 +#if defined _LIBC && defined USE_IN_LIBIO
20996 +                       char *buf;
20997 +
20998 +                       if (__asprintf (&buf, _("\
20999  %s: option `-W %s' doesn't allow an argument\n"),
21000 -                              argv[0], pfound->name);
21001 +                                       argv[0], pfound->name) >= 0)
21002 +                         {
21003 +                           if (_IO_fwide (stderr, 0) > 0)
21004 +                             __fwprintf (stderr, L"%s", buf);
21005 +                           else
21006 +                             fputs (buf, stderr);
21007 +
21008 +                           free (buf);
21009 +                         }
21010 +#else
21011 +                       fprintf (stderr, _("\
21012 +%s: option `-W %s' doesn't allow an argument\n"),
21013 +                                argv[0], pfound->name);
21014 +#endif
21015 +                     }
21016  
21017                     nextchar += strlen (nextchar);
21018                     return '?';
21019 @@ -893,10 +1081,28 @@
21020                   optarg = argv[optind++];
21021                 else
21022                   {
21023 -                   if (opterr)
21024 -                     fprintf (stderr,
21025 -                              _("%s: option `%s' requires an argument\n"),
21026 -                              argv[0], argv[optind - 1]);
21027 +                   if (print_errors)
21028 +                     {
21029 +#if defined _LIBC && defined USE_IN_LIBIO
21030 +                       char *buf;
21031 +
21032 +                       if (__asprintf (&buf, _("\
21033 +%s: option `%s' requires an argument\n"),
21034 +                                       argv[0], argv[optind - 1]) >= 0)
21035 +                         {
21036 +                           if (_IO_fwide (stderr, 0) > 0)
21037 +                             __fwprintf (stderr, L"%s", buf);
21038 +                           else
21039 +                             fputs (buf, stderr);
21040 +
21041 +                           free (buf);
21042 +                         }
21043 +#else
21044 +                       fprintf (stderr,
21045 +                                _("%s: option `%s' requires an argument\n"),
21046 +                                argv[0], argv[optind - 1]);
21047 +#endif
21048 +                     }
21049                     nextchar += strlen (nextchar);
21050                     return optstring[0] == ':' ? ':' : '?';
21051                   }
21052 @@ -940,12 +1146,28 @@
21053               }
21054             else if (optind == argc)
21055               {
21056 -               if (opterr)
21057 +               if (print_errors)
21058                   {
21059                     /* 1003.2 specifies the format of this message.  */
21060 +#if defined _LIBC && defined USE_IN_LIBIO
21061 +                   char *buf;
21062 +
21063 +                   if (__asprintf (&buf, _("\
21064 +%s: option requires an argument -- %c\n"),
21065 +                                   argv[0], c) >= 0)
21066 +                     {
21067 +                       if (_IO_fwide (stderr, 0) > 0)
21068 +                         __fwprintf (stderr, L"%s", buf);
21069 +                       else
21070 +                         fputs (buf, stderr);
21071 +
21072 +                       free (buf);
21073 +                     }
21074 +#else
21075                     fprintf (stderr,
21076 -                          _("%s: option requires an argument -- %c\n"),
21077 -                          argv[0], c);
21078 +                            _("%s: option requires an argument -- %c\n"),
21079 +                            argv[0], c);
21080 +#endif
21081                   }
21082                 optopt = c;
21083                 if (optstring[0] == ':')
21084 diff -urNd -urNd patch-2.5.4/getopt.h patch-2.5.9/getopt.h
21085 --- patch-2.5.4/getopt.h        1999-01-13 00:36:45.000000000 -0500
21086 +++ patch-2.5.9/getopt.h        2002-11-24 19:17:33.000000000 -0500
21087 @@ -1,21 +1,20 @@
21088  /* Declarations for getopt.
21089 -   Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
21090 +   Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
21091     This file is part of the GNU C Library.
21092  
21093 -   The GNU C Library is free software; you can redistribute it and/or
21094 -   modify it under the terms of the GNU Library General Public License as
21095 -   published by the Free Software Foundation; either version 2 of the
21096 -   License, or (at your option) any later version.
21097 +   This program is free software; you can redistribute it and/or modify
21098 +   it under the terms of the GNU General Public License as published by
21099 +   the Free Software Foundation; either version 2, or (at your option)
21100 +   any later version.
21101  
21102 -   The GNU C Library is distributed in the hope that it will be useful,
21103 +   This program is distributed in the hope that it will be useful,
21104     but WITHOUT ANY WARRANTY; without even the implied warranty of
21105 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21106 -   Library General Public License for more details.
21107 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21108 +   GNU General Public License for more details.
21109  
21110 -   You should have received a copy of the GNU Library General Public
21111 -   License along with the GNU C Library; see the file COPYING.LIB.  If not,
21112 -   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21113 -   Boston, MA 02111-1307, USA.  */
21114 +   You should have received a copy of the GNU General Public License along
21115 +   with this program; if not, write to the Free Software Foundation,
21116 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
21117  
21118  #ifndef _GETOPT_H
21119  
21120 @@ -23,6 +22,17 @@
21121  # define _GETOPT_H 1
21122  #endif
21123  
21124 +/* If __GNU_LIBRARY__ is not already defined, either we are being used
21125 +   standalone, or this is the first header included in the source file.
21126 +   If we are being used with glibc, we need to include <features.h>, but
21127 +   that does not exist if we are standalone.  So: if __GNU_LIBRARY__ is
21128 +   not defined, include <ctype.h>, which will pull in <features.h> for us
21129 +   if it's from glibc.  (Why ctype.h?  It's guaranteed to exist and it
21130 +   doesn't flood the namespace with stuff the way some other headers do.)  */
21131 +#if !defined __GNU_LIBRARY__
21132 +# include <ctype.h>
21133 +#endif
21134 +
21135  #ifdef __cplusplus
21136  extern "C" {
21137  #endif
21138 @@ -82,7 +92,7 @@
21139  
21140  struct option
21141  {
21142 -# if defined __STDC__ && __STDC__
21143 +# if (defined __STDC__ && __STDC__) || defined __cplusplus
21144    const char *name;
21145  # else
21146    char *name;
21147 @@ -126,25 +136,26 @@
21148     arguments to the option '\0'.  This behavior is specific to the GNU
21149     `getopt'.  */
21150  
21151 -#if defined __STDC__ && __STDC__
21152 +#if (defined __STDC__ && __STDC__) || defined __cplusplus
21153  # ifdef __GNU_LIBRARY__
21154  /* Many other libraries have conflicting prototypes for getopt, with
21155     differences in the consts, in stdlib.h.  To avoid compilation
21156     errors, only prototype getopt for the GNU C library.  */
21157 -extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
21158 +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
21159  # else /* not __GNU_LIBRARY__ */
21160  extern int getopt ();
21161  # endif /* __GNU_LIBRARY__ */
21162  
21163  # ifndef __need_getopt
21164 -extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
21165 +extern int getopt_long (int ___argc, char *const *___argv,
21166 +                       const char *__shortopts,
21167                         const struct option *__longopts, int *__longind);
21168 -extern int getopt_long_only (int __argc, char *const *__argv,
21169 +extern int getopt_long_only (int ___argc, char *const *___argv,
21170                              const char *__shortopts,
21171                              const struct option *__longopts, int *__longind);
21172  
21173  /* Internal only.  Users should not call this directly.  */
21174 -extern int _getopt_internal (int __argc, char *const *__argv,
21175 +extern int _getopt_internal (int ___argc, char *const *___argv,
21176                              const char *__shortopts,
21177                              const struct option *__longopts, int *__longind,
21178                              int __long_only);
21179 diff -urNd -urNd patch-2.5.4/gettext.h patch-2.5.9/gettext.h
21180 --- patch-2.5.4/gettext.h       1969-12-31 19:00:00.000000000 -0500
21181 +++ patch-2.5.9/gettext.h       2002-05-10 07:20:06.000000000 -0400
21182 @@ -0,0 +1,69 @@
21183 +/* Convenience header for conditional use of GNU <libintl.h>.
21184 +   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
21185 +
21186 +   This program is free software; you can redistribute it and/or modify it
21187 +   under the terms of the GNU Library General Public License as published
21188 +   by the Free Software Foundation; either version 2, or (at your option)
21189 +   any later version.
21190 +
21191 +   This program is distributed in the hope that it will be useful,
21192 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
21193 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21194 +   Library General Public License for more details.
21195 +
21196 +   You should have received a copy of the GNU Library General Public
21197 +   License along with this program; if not, write to the Free Software
21198 +   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21199 +   USA.  */
21200 +
21201 +#ifndef _LIBGETTEXT_H
21202 +#define _LIBGETTEXT_H 1
21203 +
21204 +/* NLS can be disabled through the configure --disable-nls option.  */
21205 +#if ENABLE_NLS
21206 +
21207 +/* Get declarations of GNU message catalog functions.  */
21208 +# include <libintl.h>
21209 +
21210 +#else
21211 +
21212 +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
21213 +   chokes if dcgettext is defined as a macro.  So include it now, to make
21214 +   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
21215 +   as well because people using "gettext.h" will not include <libintl.h>,
21216 +   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
21217 +   is OK.  */
21218 +#if defined(__sun)
21219 +# include <locale.h>
21220 +#endif
21221 +
21222 +/* Disabled NLS.
21223 +   The casts to 'const char *' serve the purpose of producing warnings
21224 +   for invalid uses of the value returned from these functions.
21225 +   On pre-ANSI systems without 'const', the config.h file is supposed to
21226 +   contain "#define const".  */
21227 +# define gettext(Msgid) ((const char *) (Msgid))
21228 +# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
21229 +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
21230 +# define ngettext(Msgid1, Msgid2, N) \
21231 +    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
21232 +# define dngettext(Domainname, Msgid1, Msgid2, N) \
21233 +    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
21234 +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
21235 +    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
21236 +# define textdomain(Domainname) ((const char *) (Domainname))
21237 +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
21238 +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
21239 +
21240 +#endif
21241 +
21242 +/* A pseudo function call that serves as a marker for the automated
21243 +   extraction of messages, but does not call gettext().  The run-time
21244 +   translation is done at a different place in the code.
21245 +   The argument, String, should be a literal string.  Concatenated strings
21246 +   and other string expressions won't work.
21247 +   The macro's expansion is not parenthesized, so that it is suitable as
21248 +   initializer for static 'char[]' or 'const char[]' variables.  */
21249 +#define gettext_noop(String) String
21250 +
21251 +#endif /* _LIBGETTEXT_H */
21252 diff -urNd -urNd patch-2.5.4/inp.c patch-2.5.9/inp.c
21253 --- patch-2.5.4/inp.c   1999-08-30 02:20:08.000000000 -0400
21254 +++ patch-2.5.9/inp.c   2003-05-20 09:58:02.000000000 -0400
21255 @@ -1,9 +1,10 @@
21256  /* inputting files to be patched */
21257  
21258 -/* $Id: inp.c,v 1.21 1999/08/30 06:20:08 eggert Exp $ */
21259 +/* $Id: inp.c,v 1.25 2003/05/20 13:58:02 eggert Exp $ */
21260  
21261 -/* Copyright 1986, 1988 Larry Wall
21262 -   Copyright 1991, 1992-1993, 1997-1998, 1999 Free Software Foundation, Inc.
21263 +/* Copyright (C) 1986, 1988 Larry Wall
21264 +   Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003 Free
21265 +   Software Foundation, Inc.
21266  
21267     This program is free software; you can redistribute it and/or modify
21268     it under the terms of the GNU General Public License as published by
21269 @@ -47,10 +48,10 @@
21270  static size_t tireclen;                        /* length of records in tmp file */
21271  static size_t last_line_size;          /* size of last input line */
21272  
21273 -static bool plan_a PARAMS ((char const *));/* yield FALSE if memory runs out */
21274 -static void plan_b PARAMS ((char const *));
21275 -static void report_revision PARAMS ((int));
21276 -static void too_many_lines PARAMS ((char const *)) __attribute__((noreturn));
21277 +static bool plan_a (char const *);     /* yield false if memory runs out */
21278 +static void plan_b (char const *);
21279 +static void report_revision (bool);
21280 +static void too_many_lines (char const *) __attribute__((noreturn));
21281  
21282  /* New patch--prepare to edit another file. */
21283  
21284 @@ -102,28 +103,28 @@
21285  /* Report whether a desired revision was found.  */
21286  
21287  static void
21288 -report_revision (int found_revision)
21289 +report_revision (bool found_revision)
21290  {
21291 -  revision = quotearg (revision);
21292 +  char const *rev = quotearg (revision);
21293  
21294    if (found_revision)
21295      {
21296        if (verbosity == VERBOSE)
21297 -       say ("Good.  This file appears to be the %s version.\n", revision);
21298 +       say ("Good.  This file appears to be the %s version.\n", rev);
21299      }
21300    else if (force)
21301      {
21302        if (verbosity != SILENT)
21303         say ("Warning: this file doesn't appear to be the %s version -- patching anyway.\n",
21304 -            revision);
21305 +            rev);
21306      }
21307    else if (batch)
21308      fatal ("This file doesn't appear to be the %s version -- aborting.",
21309 -          revision);
21310 +          rev);
21311    else
21312      {
21313        ask ("This file doesn't appear to be the %s version -- patch anyway? [n] ",
21314 -          revision);
21315 +          rev);
21316        if (*buf != 'y')
21317         fatal ("aborted");
21318      }
21319 @@ -140,7 +141,7 @@
21320  void
21321  get_input_file (char const *filename, char const *outname)
21322  {
21323 -    int elsewhere = strcmp (filename, outname);
21324 +    bool elsewhere = strcmp (filename, outname) != 0;
21325      char const *cs;
21326      char *diffbuf;
21327      char *getbuf;
21328 @@ -228,7 +229,7 @@
21329       or if storage isn't available.  */
21330    if (! (size == instat.st_size
21331          && (buffer = malloc (size ? size : (size_t) 1))))
21332 -    return FALSE;
21333 +    return false;
21334  
21335    /* Read the input file, but don't bother reading it if it's empty.
21336       When creating files, the files do not actually exist.  */
21337 @@ -254,7 +255,7 @@
21338               /* Perhaps size is too large for this host.  */
21339               close (ifd);
21340               free (buffer);
21341 -             return FALSE;
21342 +             return false;
21343             }
21344           buffered += n;
21345         }
21346 @@ -274,7 +275,7 @@
21347          && (ptr = (char const **) malloc ((size_t) iline * sizeof *ptr))))
21348      {
21349        free (buffer);
21350 -      return FALSE;
21351 +      return false;
21352      }
21353    iline = 0;
21354    for (s = buffer;  ;  s++)
21355 @@ -291,7 +292,7 @@
21356      {
21357        char const *rev = revision;
21358        int rev0 = rev[0];
21359 -      int found_revision = 0;
21360 +      bool found_revision = false;
21361        size_t revlen = strlen (rev);
21362  
21363        if (revlen <= size)
21364 @@ -303,7 +304,7 @@
21365                 && (s == buffer || ISSPACE ((unsigned char) s[-1]))
21366                 && (s + 1 == limrev || ISSPACE ((unsigned char) s[revlen])))
21367               {
21368 -               found_revision = 1;
21369 +               found_revision = true;
21370                 break;
21371               }
21372         }
21373 @@ -314,7 +315,7 @@
21374    /* Plan A will work.  */
21375    i_buffer = buffer;
21376    i_ptr = ptr;
21377 -  return TRUE;
21378 +  return true;
21379  }
21380  
21381  /* Keep (virtually) nothing in memory. */
21382 @@ -326,7 +327,7 @@
21383    register int c;
21384    register size_t len;
21385    register size_t maxlen;
21386 -  register int found_revision;
21387 +  register bool found_revision;
21388    register size_t i;
21389    register char const *rev;
21390    register size_t revlen;
21391 @@ -426,7 +427,7 @@
21392     WHICHBUF is ignored when the file is in memory.  */
21393  
21394  char const *
21395 -ifetch (LINENUM line, int whichbuf, size_t *psize)
21396 +ifetch (LINENUM line, bool whichbuf, size_t *psize)
21397  {
21398      register char const *q;
21399      register char const *p;
21400 @@ -444,9 +445,9 @@
21401         LINENUM baseline = line - offline;
21402  
21403         if (tiline[0] == baseline)
21404 -           whichbuf = 0;
21405 +           whichbuf = false;
21406         else if (tiline[1] == baseline)
21407 -           whichbuf = 1;
21408 +           whichbuf = true;
21409         else {
21410             tiline[whichbuf] = baseline;
21411             if (lseek (tifd, (off_t) (baseline/lines_per_buf * tibufsize),
21412 diff -urNd -urNd patch-2.5.4/inp.h patch-2.5.9/inp.h
21413 --- patch-2.5.4/inp.h   1997-04-06 21:07:00.000000000 -0400
21414 +++ patch-2.5.9/inp.h   2003-05-20 10:05:22.000000000 -0400
21415 @@ -1,10 +1,29 @@
21416  /* inputting files to be patched */
21417  
21418 -/* $Id: inp.h,v 1.4 1997/04/07 01:07:00 eggert Exp $ */
21419 +/* $Id: inp.h,v 1.7 2003/05/20 14:05:22 eggert Exp $ */
21420 +
21421 +/* Copyright (C) 1986, 1988 Larry Wall
21422 +   Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
21423 +   Free Software Foundation, Inc.
21424 +
21425 +   This program is free software; you can redistribute it and/or modify
21426 +   it under the terms of the GNU General Public License as published by
21427 +   the Free Software Foundation; either version 2, or (at your option)
21428 +   any later version.
21429 +
21430 +   This program is distributed in the hope that it will be useful,
21431 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
21432 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21433 +   GNU General Public License for more details.
21434 +
21435 +   You should have received a copy of the GNU General Public License
21436 +   along with this program; see the file COPYING.
21437 +   If not, write to the Free Software Foundation,
21438 +   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
21439  
21440  XTERN LINENUM input_lines;             /* how long is input file in lines */
21441  
21442 -char const *ifetch PARAMS ((LINENUM, int, size_t *));
21443 -void get_input_file PARAMS ((char const *, char const *));
21444 -void re_input PARAMS ((void));
21445 -void scan_input PARAMS ((char *));
21446 +char const *ifetch (LINENUM, bool, size_t *);
21447 +void get_input_file (char const *, char const *);
21448 +void re_input (void);
21449 +void scan_input (char *);
21450 diff -urNd -urNd patch-2.5.4/INSTALL patch-2.5.9/INSTALL
21451 --- patch-2.5.4/INSTALL 1997-06-23 07:40:27.000000000 -0400
21452 +++ patch-2.5.9/INSTALL 2002-03-08 07:48:54.000000000 -0500
21453 @@ -1,3 +1,9 @@
21454 +Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
21455 +Foundation, Inc.
21456 +
21457 +   This file is free documentation; the Free Software Foundation gives
21458 +unlimited permission to copy, distribute and modify it.
21459 +
21460  Basic Installation
21461  ==================
21462  
21463 @@ -8,20 +14,27 @@
21464  those values to create a `Makefile' in each directory of the package.
21465  It may also create one or more `.h' files containing system-dependent
21466  definitions.  Finally, it creates a shell script `config.status' that
21467 -you can run in the future to recreate the current configuration, a file
21468 -`config.cache' that saves the results of its tests to speed up
21469 -reconfiguring, and a file `config.log' containing compiler output
21470 -(useful mainly for debugging `configure').
21471 +you can run in the future to recreate the current configuration, and a
21472 +file `config.log' containing compiler output (useful mainly for
21473 +debugging `configure').
21474 +
21475 +   It can also use an optional file (typically called `config.cache'
21476 +and enabled with `--cache-file=config.cache' or simply `-C') that saves
21477 +the results of its tests to speed up reconfiguring.  (Caching is
21478 +disabled by default to prevent problems with accidental use of stale
21479 +cache files.)
21480  
21481     If you need to do unusual things to compile the package, please try
21482  to figure out how `configure' could check whether to do them, and mail
21483  diffs or instructions to the address given in the `README' so they can
21484 -be considered for the next release.  If at some point `config.cache'
21485 -contains results you don't want to keep, you may remove or edit it.
21486 +be considered for the next release.  If you are using the cache, and at
21487 +some point `config.cache' contains results you don't want to keep, you
21488 +may remove or edit it.
21489  
21490 -   The file `configure.in' is used to create `configure' by a program
21491 -called `autoconf'.  You only need `configure.in' if you want to change
21492 -it or regenerate `configure' using a newer version of `autoconf'.
21493 +   The file `configure.ac' (or `configure.in') is used to create
21494 +`configure' by a program called `autoconf'.  You only need
21495 +`configure.ac' if you want to change it or regenerate `configure' using
21496 +a newer version of `autoconf'.
21497  
21498  The simplest way to compile this package is:
21499  
21500 @@ -55,14 +68,15 @@
21501  =====================
21502  
21503     Some systems require unusual options for compilation or linking that
21504 -the `configure' script does not know about.  You can give `configure'
21505 -initial values for variables by setting them in the environment.  Using
21506 -a Bourne-compatible shell, you can do that on the command line like
21507 -this:
21508 -     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
21509 +the `configure' script does not know about.  Run `./configure --help'
21510 +for details on some of the pertinent environment variables.
21511  
21512 -Or on systems that have the `env' program, you can do it like this:
21513 -     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
21514 +   You can give `configure' initial values for variables by setting
21515 +them in the environment.  You can do that on the command line like this:
21516 +
21517 +     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
21518 +
21519 +   *Note Defining Variables::, for more details.
21520  
21521  Compiling For Multiple Architectures
21522  ====================================
21523 @@ -75,11 +89,11 @@
21524  the `configure' script.  `configure' automatically checks for the
21525  source code in the directory that `configure' is in and in `..'.
21526  
21527 -   If you have to use a `make' that does not supports the `VPATH'
21528 -variable, you have to compile the package for one architecture at a time
21529 -in the source code directory.  After you have installed the package for
21530 -one architecture, use `make distclean' before reconfiguring for another
21531 -architecture.
21532 +   If you have to use a `make' that does not support the `VPATH'
21533 +variable, you have to compile the package for one architecture at a
21534 +time in the source code directory.  After you have installed the
21535 +package for one architecture, use `make distclean' before reconfiguring
21536 +for another architecture.
21537  
21538  Installation Names
21539  ==================
21540 @@ -122,22 +136,32 @@
21541  Specifying the System Type
21542  ==========================
21543  
21544 -   There may be some features `configure' can not figure out
21545 -automatically, but needs to determine by the type of host the package
21546 -will run on.  Usually `configure' can figure that out, but if it prints
21547 -a message saying it can not guess the host type, give it the
21548 -`--host=TYPE' option.  TYPE can either be a short name for the system
21549 -type, such as `sun4', or a canonical name with three fields:
21550 +   There may be some features `configure' cannot figure out
21551 +automatically, but needs to determine by the type of machine the package
21552 +will run on.  Usually, assuming the package is built to be run on the
21553 +_same_ architectures, `configure' can figure that out, but if it prints
21554 +a message saying it cannot guess the machine type, give it the
21555 +`--build=TYPE' option.  TYPE can either be a short name for the system
21556 +type, such as `sun4', or a canonical name which has the form:
21557 +
21558       CPU-COMPANY-SYSTEM
21559  
21560 -See the file `config.sub' for the possible values of each field.  If
21561 +where SYSTEM can have one of these forms:
21562 +
21563 +     OS KERNEL-OS
21564 +
21565 +   See the file `config.sub' for the possible values of each field.  If
21566  `config.sub' isn't included in this package, then this package doesn't
21567 -need to know the host type.
21568 +need to know the machine type.
21569  
21570 -   If you are building compiler tools for cross-compiling, you can also
21571 +   If you are _building_ compiler tools for cross-compiling, you should
21572  use the `--target=TYPE' option to select the type of system they will
21573 -produce code for and the `--build=TYPE' option to select the type of
21574 -system on which you are compiling the package.
21575 +produce code for.
21576 +
21577 +   If you want to _use_ a cross compiler, that generates code for a
21578 +platform different from the build platform, you should specify the
21579 +"host" platform (i.e., that on which the generated programs will
21580 +eventually be run) with `--host=TYPE'.
21581  
21582  Sharing Defaults
21583  ================
21584 @@ -150,20 +174,44 @@
21585  `CONFIG_SITE' environment variable to the location of the site script.
21586  A warning: not all `configure' scripts look for a site script.
21587  
21588 -Operation Controls
21589 +Defining Variables
21590  ==================
21591  
21592 +   Variables not defined in a site shell script can be set in the
21593 +environment passed to `configure'.  However, some packages may run
21594 +configure again during the build, and the customized values of these
21595 +variables may be lost.  In order to avoid this problem, you should set
21596 +them in the `configure' command line, using `VAR=value'.  For example:
21597 +
21598 +     ./configure CC=/usr/local2/bin/gcc
21599 +
21600 +will cause the specified gcc to be used as the C compiler (unless it is
21601 +overridden in the site shell script).
21602 +
21603 +`configure' Invocation
21604 +======================
21605 +
21606     `configure' recognizes the following options to control how it
21607  operates.
21608  
21609 -`--cache-file=FILE'
21610 -     Use and save the results of the tests in FILE instead of
21611 -     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
21612 -     debugging `configure'.
21613 -
21614  `--help'
21615 +`-h'
21616       Print a summary of the options to `configure', and exit.
21617  
21618 +`--version'
21619 +`-V'
21620 +     Print the version of Autoconf used to generate the `configure'
21621 +     script, and exit.
21622 +
21623 +`--cache-file=FILE'
21624 +     Enable the cache: use and save the results of the tests in FILE,
21625 +     traditionally `config.cache'.  FILE defaults to `/dev/null' to
21626 +     disable caching.
21627 +
21628 +`--config-cache'
21629 +`-C'
21630 +     Alias for `--cache-file=config.cache'.
21631 +
21632  `--quiet'
21633  `--silent'
21634  `-q'
21635 @@ -175,8 +223,6 @@
21636       Look for the package's source code in directory DIR.  Usually
21637       `configure' can determine that directory automatically.
21638  
21639 -`--version'
21640 -     Print the version of Autoconf used to generate the `configure'
21641 -     script, and exit.
21642 +`configure' also accepts some other, not widely useful, options.  Run
21643 +`configure --help' for more details.
21644  
21645 -`configure' also accepts some other, not widely useful, options.
21646 diff -urNd -urNd patch-2.5.4/install-sh patch-2.5.9/install-sh
21647 --- patch-2.5.4/install-sh      1999-03-02 08:44:48.000000000 -0500
21648 +++ patch-2.5.9/install-sh      2003-05-09 13:22:21.000000000 -0400
21649 @@ -1,19 +1,37 @@
21650  #!/bin/sh
21651  #
21652  # install - install a program, script, or datafile
21653 -# This comes from X11R5 (mit/util/scripts/install.sh).
21654  #
21655 -# Copyright 1991 by the Massachusetts Institute of Technology
21656 +# This originates from X11R5 (mit/util/scripts/install.sh), which was
21657 +# later released in X11R6 (xc/config/util/install.sh) with the
21658 +# following copyright and license.
21659  #
21660 -# Permission to use, copy, modify, distribute, and sell this software and its
21661 -# documentation for any purpose is hereby granted without fee, provided that
21662 -# the above copyright notice appear in all copies and that both that
21663 -# copyright notice and this permission notice appear in supporting
21664 -# documentation, and that the name of M.I.T. not be used in advertising or
21665 -# publicity pertaining to distribution of the software without specific,
21666 -# written prior permission.  M.I.T. makes no representations about the
21667 -# suitability of this software for any purpose.  It is provided "as is"
21668 -# without express or implied warranty.
21669 +# Copyright (C) 1994 X Consortium
21670 +#
21671 +# Permission is hereby granted, free of charge, to any person obtaining a copy
21672 +# of this software and associated documentation files (the "Software"), to
21673 +# deal in the Software without restriction, including without limitation the
21674 +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
21675 +# sell copies of the Software, and to permit persons to whom the Software is
21676 +# furnished to do so, subject to the following conditions:
21677 +#
21678 +# The above copyright notice and this permission notice shall be included in
21679 +# all copies or substantial portions of the Software.
21680 +#
21681 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21682 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21683 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
21684 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21685 +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
21686 +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21687 +#
21688 +# Except as contained in this notice, the name of the X Consortium shall not
21689 +# be used in advertising or otherwise to promote the sale, use or other deal-
21690 +# ings in this Software without prior written authorization from the X Consor-
21691 +# tium.
21692 +#
21693 +#
21694 +# FSF changes to this file are in the public domain.
21695  #
21696  # Calling this script install-sh is preferred over install.sh, to prevent
21697  # `make' implicit rules from creating a file called install from it
21698 @@ -56,7 +74,7 @@
21699  
21700  while [ x"$1" != x ]; do
21701      case $1 in
21702 -       -c) instcmd="$cpprog"
21703 +       -c) instcmd=$cpprog
21704             shift
21705             continue;;
21706  
21707 @@ -79,7 +97,7 @@
21708             shift
21709             continue;;
21710  
21711 -       -s) stripcmd="$stripprog"
21712 +       -s) stripcmd=$stripprog
21713             shift
21714             continue;;
21715  
21716 @@ -106,17 +124,17 @@
21717  
21718  if [ x"$src" = x ]
21719  then
21720 -       echo "install:  no input file specified"
21721 +       echo "$0: no input file specified" >&2
21722         exit 1
21723  else
21724 -       true
21725 +       :
21726  fi
21727  
21728  if [ x"$dir_arg" != x ]; then
21729         dst=$src
21730         src=""
21731 -       
21732 -       if [ -d $dst ]; then
21733 +
21734 +       if [ -d "$dst" ]; then
21735                 instcmd=:
21736                 chmodcmd=""
21737         else
21738 @@ -125,38 +143,38 @@
21739  else
21740  
21741  # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
21742 -# might cause directories to be created, which would be especially bad 
21743 +# might cause directories to be created, which would be especially bad
21744  # if $src (and thus $dsttmp) contains '*'.
21745  
21746 -       if [ -f $src -o -d $src ]
21747 +       if [ -f "$src" ] || [ -d "$src" ]
21748         then
21749 -               true
21750 +               :
21751         else
21752 -               echo "install:  $src does not exist"
21753 +               echo "$0: $src does not exist" >&2
21754                 exit 1
21755         fi
21756 -       
21757 +
21758         if [ x"$dst" = x ]
21759         then
21760 -               echo "install:  no destination specified"
21761 +               echo "$0: no destination specified" >&2
21762                 exit 1
21763         else
21764 -               true
21765 +               :
21766         fi
21767  
21768  # If destination is a directory, append the input filename; if your system
21769  # does not like double slashes in filenames, you may need to add some logic
21770  
21771 -       if [ -d $dst ]
21772 +       if [ -d "$dst" ]
21773         then
21774 -               dst="$dst"/`basename $src`
21775 +               dst=$dst/`basename "$src"`
21776         else
21777 -               true
21778 +               :
21779         fi
21780  fi
21781  
21782  ## this sed command emulates the dirname command
21783 -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
21784 +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
21785  
21786  # Make sure that the destination directory exists.
21787  #  this part is taken from Noah Friedman's mkinstalldirs script
21788 @@ -165,69 +183,73 @@
21789  if [ ! -d "$dstdir" ]; then
21790  defaultIFS='
21791         '
21792 -IFS="${IFS-${defaultIFS}}"
21793 +IFS="${IFS-$defaultIFS}"
21794  
21795 -oIFS="${IFS}"
21796 +oIFS=$IFS
21797  # Some sh's can't handle IFS=/ for some reason.
21798  IFS='%'
21799 -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
21800 -IFS="${oIFS}"
21801 +set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
21802 +IFS=$oIFS
21803  
21804  pathcomp=''
21805  
21806  while [ $# -ne 0 ] ; do
21807 -       pathcomp="${pathcomp}${1}"
21808 +       pathcomp=$pathcomp$1
21809         shift
21810  
21811 -       if [ ! -d "${pathcomp}" ] ;
21812 +       if [ ! -d "$pathcomp" ] ;
21813          then
21814 -               $mkdirprog "${pathcomp}"
21815 +               $mkdirprog "$pathcomp"
21816         else
21817 -               true
21818 +               :
21819         fi
21820  
21821 -       pathcomp="${pathcomp}/"
21822 +       pathcomp=$pathcomp/
21823  done
21824  fi
21825  
21826  if [ x"$dir_arg" != x ]
21827  then
21828 -       $doit $instcmd $dst &&
21829 +       $doit $instcmd "$dst" &&
21830  
21831 -       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
21832 -       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
21833 -       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
21834 -       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
21835 +       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
21836 +       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
21837 +       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
21838 +       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
21839  else
21840  
21841  # If we're going to rename the final executable, determine the name now.
21842  
21843 -       if [ x"$transformarg" = x ] 
21844 +       if [ x"$transformarg" = x ]
21845         then
21846 -               dstfile=`basename $dst`
21847 +               dstfile=`basename "$dst"`
21848         else
21849 -               dstfile=`basename $dst $transformbasename | 
21850 +               dstfile=`basename "$dst" $transformbasename |
21851                         sed $transformarg`$transformbasename
21852         fi
21853  
21854  # don't allow the sed command to completely eliminate the filename
21855  
21856 -       if [ x"$dstfile" = x ] 
21857 +       if [ x"$dstfile" = x ]
21858         then
21859 -               dstfile=`basename $dst`
21860 +               dstfile=`basename "$dst"`
21861         else
21862 -               true
21863 +               :
21864         fi
21865  
21866 -# Make a temp file name in the proper directory.
21867 +# Make a couple of temp file names in the proper directory.
21868  
21869         dsttmp=$dstdir/#inst.$$#
21870 +       rmtmp=$dstdir/#rm.$$#
21871  
21872 -# Move or copy the file name to the temp name
21873 +# Trap to clean up temp files at exit.
21874  
21875 -       $doit $instcmd $src $dsttmp &&
21876 +       trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
21877 +       trap '(exit $?); exit' 1 2 13 15
21878  
21879 -       trap "rm -f ${dsttmp}" 0 &&
21880 +# Move or copy the file name to the temp name
21881 +
21882 +       $doit $instcmd "$src" "$dsttmp" &&
21883  
21884  # and set any options; do chmod last to preserve setuid bits
21885  
21886 @@ -235,17 +257,38 @@
21887  # ignore errors from any of these, just make sure not to ignore
21888  # errors from the above "$doit $instcmd $src $dsttmp" command.
21889  
21890 -       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
21891 -       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
21892 -       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
21893 -       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
21894 +       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
21895 +       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
21896 +       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
21897 +       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
21898 +
21899 +# Now remove or move aside any old file at destination location.  We try this
21900 +# two ways since rm can't unlink itself on some systems and the destination
21901 +# file might be busy for other reasons.  In this case, the final cleanup
21902 +# might fail but the new file should still install successfully.
21903 +
21904 +{
21905 +       if [ -f "$dstdir/$dstfile" ]
21906 +       then
21907 +               $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
21908 +               $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
21909 +               {
21910 +                 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
21911 +                 (exit 1); exit
21912 +               }
21913 +       else
21914 +               :
21915 +       fi
21916 +} &&
21917  
21918  # Now rename the file to the real destination.
21919  
21920 -       $doit $rmcmd -f $dstdir/$dstfile &&
21921 -       $doit $mvcmd $dsttmp $dstdir/$dstfile 
21922 +       $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
21923  
21924  fi &&
21925  
21926 +# The final little trick to "correctly" pass the exit status to the exit trap.
21927  
21928 -exit 0
21929 +{
21930 +       (exit 0); exit
21931 +}
21932 diff -urNd -urNd patch-2.5.4/m4/backupfile.m4 patch-2.5.9/m4/backupfile.m4
21933 --- patch-2.5.4/m4/backupfile.m4        1969-12-31 19:00:00.000000000 -0500
21934 +++ patch-2.5.9/m4/backupfile.m4        2002-12-31 08:42:06.000000000 -0500
21935 @@ -0,0 +1,23 @@
21936 +# backupfile.m4 serial 1
21937 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
21938 +dnl This file is free software, distributed under the terms of the GNU
21939 +dnl General Public License.  As a special exception to the GNU General
21940 +dnl Public License, this file may be distributed as part of a program
21941 +dnl that contains a configuration script generated by Autoconf, under
21942 +dnl the same distribution terms as the rest of that program.
21943 +
21944 +AC_DEFUN([gl_BACKUPFILE],
21945 +[
21946 +  dnl Prerequisites of lib/backupfile.c.
21947 +  AC_REQUIRE([AC_HEADER_DIRENT])
21948 +  AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
21949 +  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
21950 +  AC_CHECK_DECLS_ONCE(getenv malloc)
21951 +  jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
21952 +
21953 +  dnl Prerequisites of lib/addext.c.
21954 +  AC_REQUIRE([jm_AC_DOS])
21955 +  AC_SYS_LONG_FILE_NAMES
21956 +  AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
21957 +  AC_CHECK_FUNCS(pathconf)
21958 +])
21959 diff -urNd -urNd patch-2.5.4/m4/ccstdc.m4 patch-2.5.9/m4/ccstdc.m4
21960 --- patch-2.5.4/m4/ccstdc.m4    1999-06-16 07:11:07.000000000 -0400
21961 +++ patch-2.5.9/m4/ccstdc.m4    1969-12-31 19:00:00.000000000 -0500
21962 @@ -1,95 +0,0 @@
21963 -# The following is taken from automake 1.4,
21964 -# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
21965 -# because only the former supports 64-bit integral types on HP-UX 10.20.
21966 -
21967 -## ----------------------------------------- ##
21968 -## ANSIfy the C compiler whenever possible.  ##
21969 -## From Franc,ois Pinard                     ##
21970 -## ----------------------------------------- ##
21971 -
21972 -# serial 2
21973 -
21974 -# @defmac AC_PROG_CC_STDC
21975 -# @maindex PROG_CC_STDC
21976 -# @ovindex CC
21977 -# If the C compiler in not in ANSI C mode by default, try to add an option
21978 -# to output variable @code{CC} to make it so.  This macro tries various
21979 -# options that select ANSI C on some system or another.  It considers the
21980 -# compiler to be in ANSI C mode if it handles function prototypes correctly.
21981 -#
21982 -# If you use this macro, you should check after calling it whether the C
21983 -# compiler has been set to accept ANSI C; if not, the shell variable
21984 -# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
21985 -# code in ANSI C, you can make an un-ANSIfied copy of it by using the
21986 -# program @code{ansi2knr}, which comes with Ghostscript.
21987 -# @end defmac
21988 -
21989 -AC_DEFUN(AM_PROG_CC_STDC,
21990 -[AC_REQUIRE([AC_PROG_CC])
21991 -AC_BEFORE([$0], [AC_C_INLINE])
21992 -AC_BEFORE([$0], [AC_C_CONST])
21993 -dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
21994 -dnl a magic option to avoid problems with ANSI preprocessor commands
21995 -dnl like #elif.
21996 -dnl FIXME: can't do this because then AC_AIX won't work due to a
21997 -dnl circular dependency.
21998 -dnl AC_BEFORE([$0], [AC_PROG_CPP])
21999 -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
22000 -AC_CACHE_VAL(am_cv_prog_cc_stdc,
22001 -[am_cv_prog_cc_stdc=no
22002 -ac_save_CC="$CC"
22003 -# Don't try gcc -ansi; that turns off useful extensions and
22004 -# breaks some systems' header files.
22005 -# AIX                  -qlanglvl=ansi
22006 -# Ultrix and OSF/1     -std1
22007 -# HP-UX                        -Aa -D_HPUX_SOURCE
22008 -# SVR4                 -Xc -D__EXTENSIONS__
22009 -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
22010 -do
22011 -  CC="$ac_save_CC $ac_arg"
22012 -  AC_TRY_COMPILE(
22013 -[#include <stdarg.h>
22014 -#include <stdio.h>
22015 -#include <sys/types.h>
22016 -#include <sys/stat.h>
22017 -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
22018 -struct buf { int x; };
22019 -FILE * (*rcsopen) (struct buf *, struct stat *, int);
22020 -static char *e (p, i)
22021 -     char **p;
22022 -     int i;
22023 -{
22024 -  return p[i];
22025 -}
22026 -static char *f (char * (*g) (char **, int), char **p, ...)
22027 -{
22028 -  char *s;
22029 -  va_list v;
22030 -  va_start (v,p);
22031 -  s = g (p, va_arg (v,int));
22032 -  va_end (v);
22033 -  return s;
22034 -}
22035 -int test (int i, double x);
22036 -struct s1 {int (*f) (int a);};
22037 -struct s2 {int (*f) (double a);};
22038 -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
22039 -int argc;
22040 -char **argv;
22041 -], [
22042 -return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
22043 -],
22044 -[am_cv_prog_cc_stdc="$ac_arg"; break])
22045 -done
22046 -CC="$ac_save_CC"
22047 -])
22048 -if test -z "$am_cv_prog_cc_stdc"; then
22049 -  AC_MSG_RESULT([none needed])
22050 -else
22051 -  AC_MSG_RESULT($am_cv_prog_cc_stdc)
22052 -fi
22053 -case "x$am_cv_prog_cc_stdc" in
22054 -  x|xno) ;;
22055 -  *) CC="$CC $am_cv_prog_cc_stdc" ;;
22056 -esac
22057 -])
22058 diff -urNd -urNd patch-2.5.4/m4/d-ino.m4 patch-2.5.9/m4/d-ino.m4
22059 --- patch-2.5.4/m4/d-ino.m4     1999-01-26 23:51:43.000000000 -0500
22060 +++ patch-2.5.9/m4/d-ino.m4     2002-12-31 08:43:06.000000000 -0500
22061 @@ -1,11 +1,11 @@
22062 -#serial 2
22063 +#serial 5
22064  
22065  dnl From Jim Meyering.
22066  dnl
22067  dnl Check whether struct dirent has a member named d_ino.
22068  dnl
22069  
22070 -AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
22071 +AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
22072    [AC_REQUIRE([AC_HEADER_DIRENT])dnl
22073     AC_CACHE_CHECK([for d_ino member in directory struct],
22074                   jm_cv_struct_dirent_d_ino,
22075 @@ -35,8 +35,8 @@
22076     )
22077     if test $jm_cv_struct_dirent_d_ino = yes; then
22078       AC_DEFINE(D_INO_IN_DIRENT, 1,
22079 -  [Define if there is a member named d_ino in the struct describing
22080 -   directory headers.])
22081 +       [Define if there is a member named d_ino in the struct describing
22082 +        directory headers.])
22083     fi
22084    ]
22085  )
22086 diff -urNd -urNd patch-2.5.4/m4/dirname.m4 patch-2.5.9/m4/dirname.m4
22087 --- patch-2.5.4/m4/dirname.m4   1969-12-31 19:00:00.000000000 -0500
22088 +++ patch-2.5.9/m4/dirname.m4   2002-12-31 08:42:06.000000000 -0500
22089 @@ -0,0 +1,25 @@
22090 +# dirname.m4 serial 1
22091 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22092 +dnl This file is free software, distributed under the terms of the GNU
22093 +dnl General Public License.  As a special exception to the GNU General
22094 +dnl Public License, this file may be distributed as part of a program
22095 +dnl that contains a configuration script generated by Autoconf, under
22096 +dnl the same distribution terms as the rest of that program.
22097 +
22098 +AC_DEFUN([gl_DIRNAME],
22099 +[
22100 +  dnl Prerequisites of lib/dirname.h.
22101 +  AC_REQUIRE([jm_AC_DOS])
22102 +
22103 +  dnl Prerequisites of lib/dirname.c.
22104 +  AC_REQUIRE([AC_HEADER_STDC])
22105 +  AC_CHECK_HEADERS_ONCE(string.h)
22106 +
22107 +  dnl Prerequisites of lib/basename.c.
22108 +  AC_REQUIRE([AC_HEADER_STDC])
22109 +  AC_CHECK_HEADERS_ONCE(string.h)
22110 +
22111 +  dnl Prerequisites of lib/stripslash.c.
22112 +  AC_REQUIRE([AC_HEADER_STDC])
22113 +  AC_CHECK_HEADERS_ONCE(string.h)
22114 +])
22115 diff -urNd -urNd patch-2.5.4/m4/dos.m4 patch-2.5.9/m4/dos.m4
22116 --- patch-2.5.4/m4/dos.m4       1969-12-31 19:00:00.000000000 -0500
22117 +++ patch-2.5.9/m4/dos.m4       2001-08-12 09:26:00.000000000 -0400
22118 @@ -0,0 +1,53 @@
22119 +#serial 5
22120 +
22121 +# Define some macros required for proper operation of code in lib/*.c
22122 +# on MSDOS/Windows systems.
22123 +
22124 +# From Jim Meyering.
22125 +
22126 +AC_DEFUN([jm_AC_DOS],
22127 +  [
22128 +    AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
22129 +      [
22130 +        AC_TRY_COMPILE([],
22131 +        [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
22132 +neither MSDOS nor Windows
22133 +#endif],
22134 +        [ac_cv_win_or_dos=yes],
22135 +        [ac_cv_win_or_dos=no])
22136 +      ])
22137 +
22138 +    if test x"$ac_cv_win_or_dos" = xyes; then
22139 +      ac_fs_accepts_drive_letter_prefix=1
22140 +      ac_fs_backslash_is_file_name_separator=1
22141 +    else
22142 +      ac_fs_accepts_drive_letter_prefix=0
22143 +      ac_fs_backslash_is_file_name_separator=0
22144 +    fi
22145 +
22146 +    AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
22147 +    [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
22148 +# define FILESYSTEM_PREFIX_LEN(Filename) \
22149 +  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
22150 +#else
22151 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
22152 +#endif])
22153 +
22154 +    AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
22155 +      $ac_fs_accepts_drive_letter_prefix,
22156 +      [Define on systems for which file names may have a so-called
22157 +       `drive letter' prefix, define this to compute the length of that
22158 +       prefix, including the colon.])
22159 +
22160 +    AH_VERBATIM(ISSLASH,
22161 +    [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
22162 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
22163 +#else
22164 +# define ISSLASH(C) ((C) == '/')
22165 +#endif])
22166 +
22167 +    AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
22168 +      $ac_fs_backslash_is_file_name_separator,
22169 +      [Define if the backslash character may also serve as a file name
22170 +       component separator.])
22171 +  ])
22172 diff -urNd -urNd patch-2.5.4/m4/error.m4 patch-2.5.9/m4/error.m4
22173 --- patch-2.5.4/m4/error.m4     1969-12-31 19:00:00.000000000 -0500
22174 +++ patch-2.5.9/m4/error.m4     2003-04-21 23:28:22.000000000 -0400
22175 @@ -0,0 +1,18 @@
22176 +#serial 7
22177 +
22178 +AC_DEFUN([gl_ERROR],
22179 +[
22180 +  AC_FUNC_ERROR_AT_LINE
22181 +  dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
22182 +  jm_PREREQ_ERROR
22183 +])
22184 +
22185 +# Prerequisites of lib/error.c.
22186 +AC_DEFUN([jm_PREREQ_ERROR],
22187 +[
22188 +  AC_REQUIRE([AC_HEADER_STDC])
22189 +  AC_REQUIRE([AC_FUNC_VPRINTF])
22190 +  AC_CHECK_FUNCS(strerror)
22191 +  AC_CHECK_DECLS([strerror])
22192 +  AC_FUNC_STRERROR_R
22193 +])
22194 diff -urNd -urNd patch-2.5.4/m4/getopt.m4 patch-2.5.9/m4/getopt.m4
22195 --- patch-2.5.4/m4/getopt.m4    1969-12-31 19:00:00.000000000 -0500
22196 +++ patch-2.5.9/m4/getopt.m4    2002-12-31 08:42:06.000000000 -0500
22197 @@ -0,0 +1,13 @@
22198 +# getopt.m4 serial 1
22199 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22200 +dnl This file is free software, distributed under the terms of the GNU
22201 +dnl General Public License.  As a special exception to the GNU General
22202 +dnl Public License, this file may be distributed as part of a program
22203 +dnl that contains a configuration script generated by Autoconf, under
22204 +dnl the same distribution terms as the rest of that program.
22205 +
22206 +AC_DEFUN([gl_GETOPT],
22207 +[
22208 +  dnl Prerequisites of lib/getopt.c.
22209 +  AC_CHECK_HEADERS_ONCE(string.h)
22210 +])
22211 diff -urNd -urNd patch-2.5.4/m4/inttypes_h.m4 patch-2.5.9/m4/inttypes_h.m4
22212 --- patch-2.5.4/m4/inttypes_h.m4        1999-01-10 17:47:01.000000000 -0500
22213 +++ patch-2.5.9/m4/inttypes_h.m4        1969-12-31 19:00:00.000000000 -0500
22214 @@ -1,22 +0,0 @@
22215 -#serial 3
22216 -
22217 -dnl From Paul Eggert.
22218 -
22219 -# Define HAVE_INTTYPES_H if <inttypes.h> exists,
22220 -# doesn't clash with <sys/types.h>, and declares uintmax_t.
22221 -
22222 -AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
22223 -[
22224 -  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
22225 -  [AC_TRY_COMPILE(
22226 -    [#include <sys/types.h>
22227 -#include <inttypes.h>],
22228 -    [uintmax_t i = (uintmax_t) -1;],
22229 -    jm_ac_cv_header_inttypes_h=yes,
22230 -    jm_ac_cv_header_inttypes_h=no)])
22231 -  if test $jm_ac_cv_header_inttypes_h = yes; then
22232 -    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
22233 -[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
22234 -   and declares uintmax_t. ])
22235 -  fi
22236 -])
22237 diff -urNd -urNd patch-2.5.4/m4/largefile.m4 patch-2.5.9/m4/largefile.m4
22238 --- patch-2.5.4/m4/largefile.m4 1999-08-17 15:56:44.000000000 -0400
22239 +++ patch-2.5.9/m4/largefile.m4 1969-12-31 19:00:00.000000000 -0500
22240 @@ -1,115 +0,0 @@
22241 -#serial 5
22242 -
22243 -dnl By default, many hosts won't let programs access large files;
22244 -dnl one must use special compiler options to get large-file access to work.
22245 -dnl For more details about this brain damage please see:
22246 -dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
22247 -
22248 -dnl Written by Paul Eggert <eggert@twinsun.com>.
22249 -
22250 -dnl Internal subroutine of AC_SYS_LARGEFILE.
22251 -dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
22252 -AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
22253 -  [AC_CACHE_CHECK([for $1 value to request large file support],
22254 -     ac_cv_sys_largefile_$1,
22255 -     [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
22256 -       ac_cv_sys_largefile_$1=no
22257 -       ifelse($1, CFLAGS,
22258 -         [case "$host_os" in
22259 -          # IRIX 6.2 and later require cc -n32.
22260 -changequote(, )dnl
22261 -          irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
22262 -changequote([, ])dnl
22263 -            if test "$GCC" != yes; then
22264 -              ac_cv_sys_largefile_CFLAGS=-n32
22265 -            fi
22266 -            ac_save_CC="$CC"
22267 -            CC="$CC $ac_cv_sys_largefile_CFLAGS"
22268 -            AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
22269 -            CC="$ac_save_CC"
22270 -          esac])
22271 -      }])])
22272 -
22273 -dnl Internal subroutine of AC_SYS_LARGEFILE.
22274 -dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
22275 -AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
22276 -  [case $2 in
22277 -   no) ;;
22278 -   ?*)
22279 -     case "[$]$1" in
22280 -     '') $1=$2 ;;
22281 -     *) $1=[$]$1' '$2 ;;
22282 -     esac ;;
22283 -   esac])
22284 -
22285 -dnl Internal subroutine of AC_SYS_LARGEFILE.
22286 -dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
22287 -AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
22288 -  [AC_CACHE_CHECK([for $1], $2,
22289 -     [$2=no
22290 -changequote(, )dnl
22291 -      $4
22292 -      for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
22293 -       case "$ac_flag" in
22294 -       -D$1)
22295 -         $2=1 ;;
22296 -       -D$1=*)
22297 -         $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
22298 -       esac
22299 -      done
22300 -changequote([, ])dnl
22301 -      ])
22302 -   if test "[$]$2" != no; then
22303 -     AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
22304 -   fi])
22305 -
22306 -AC_DEFUN(AC_SYS_LARGEFILE,
22307 -  [AC_REQUIRE([AC_CANONICAL_HOST])
22308 -   AC_ARG_ENABLE(largefile,
22309 -     [  --disable-largefile     omit support for large files])
22310 -   if test "$enable_largefile" != no; then
22311 -     AC_CHECK_TOOL(GETCONF, getconf)
22312 -     AC_SYS_LARGEFILE_FLAGS(CFLAGS)
22313 -     AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
22314 -     AC_SYS_LARGEFILE_FLAGS(LIBS)
22315 -
22316 -     for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
22317 -       case "$ac_flag" in
22318 -       no) ;;
22319 -       -D_FILE_OFFSET_BITS=*) ;;
22320 -       -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
22321 -       -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
22322 -       -D?* | -I?*)
22323 -        AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
22324 -       *)
22325 -        AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
22326 -       esac
22327 -     done
22328 -     AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
22329 -     AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
22330 -     AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
22331 -       ac_cv_sys_file_offset_bits,
22332 -       [Number of bits in a file offset, on hosts where this is settable.],
22333 -       [case "$host_os" in
22334 -       # HP-UX 10.20 and later
22335 -       hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
22336 -         ac_cv_sys_file_offset_bits=64 ;;
22337 -       esac])
22338 -     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
22339 -       ac_cv_sys_largefile_source,
22340 -       [Define to make fseeko etc. visible, on some hosts.],
22341 -       [case "$host_os" in
22342 -       # HP-UX 10.20 and later
22343 -       hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
22344 -         ac_cv_sys_largefile_source=1 ;;
22345 -       esac])
22346 -     AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
22347 -       ac_cv_sys_large_files,
22348 -       [Define for large files, on AIX-style hosts.],
22349 -       [case "$host_os" in
22350 -       # AIX 4.2 and later
22351 -       aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
22352 -         ac_cv_sys_large_files=1 ;;
22353 -       esac])
22354 -   fi
22355 -  ])
22356 diff -urNd -urNd patch-2.5.4/m4/malloc.m4 patch-2.5.9/m4/malloc.m4
22357 --- patch-2.5.4/m4/malloc.m4    1999-02-07 00:35:28.000000000 -0500
22358 +++ patch-2.5.9/m4/malloc.m4    2002-12-31 08:43:06.000000000 -0500
22359 @@ -1,35 +1,25 @@
22360 -#serial 3
22361 +# malloc.m4 serial 7
22362 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22363 +dnl This file is free software, distributed under the terms of the GNU
22364 +dnl General Public License.  As a special exception to the GNU General
22365 +dnl Public License, this file may be distributed as part of a program
22366 +dnl that contains a configuration script generated by Autoconf, under
22367 +dnl the same distribution terms as the rest of that program.
22368  
22369  dnl From Jim Meyering.
22370  dnl Determine whether malloc accepts 0 as its argument.
22371  dnl If it doesn't, arrange to use the replacement function.
22372 -dnl
22373  
22374 -AC_DEFUN(jm_FUNC_MALLOC,
22375 +AC_DEFUN([jm_FUNC_MALLOC],
22376  [
22377 - dnl xmalloc.c requires that this symbol be defined so it doesn't
22378 - dnl mistakenly use a broken malloc -- as it might if this test were omitted.
22379 - AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
22380 -                    [Define if the malloc check has been performed. ])
22381 -
22382 - AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
22383 -  [AC_TRY_RUN([
22384 -    char *malloc ();
22385 -    int
22386 -    main ()
22387 -    {
22388 -      exit (malloc (0) ? 0 : 1);
22389 -    }
22390 -         ],
22391 -        jm_cv_func_working_malloc=yes,
22392 -        jm_cv_func_working_malloc=no,
22393 -        dnl When crosscompiling, assume malloc is broken.
22394 -        jm_cv_func_working_malloc=no)
22395 -  ])
22396 -  if test $jm_cv_func_working_malloc = no; then
22397 -    AC_SUBST(LIBOBJS)
22398 -    LIBOBJS="$LIBOBJS malloc.$ac_objext"
22399 -    AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
22400 -      [Define to rpl_malloc if the replacement function should be used.])
22401 +  AC_REQUIRE([AC_FUNC_MALLOC])
22402 +  dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
22403 +  if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
22404 +    gl_PREREQ_MALLOC
22405    fi
22406  ])
22407 +
22408 +# Prerequisites of lib/malloc.c.
22409 +AC_DEFUN([gl_PREREQ_MALLOC], [
22410 +  :
22411 +])
22412 diff -urNd -urNd patch-2.5.4/m4/mbrtowc.m4 patch-2.5.9/m4/mbrtowc.m4
22413 --- patch-2.5.4/m4/mbrtowc.m4   1969-12-31 19:00:00.000000000 -0500
22414 +++ patch-2.5.9/m4/mbrtowc.m4   2002-12-31 08:43:06.000000000 -0500
22415 @@ -0,0 +1,27 @@
22416 +# mbrtowc.m4 serial 5
22417 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
22418 +dnl This file is free software, distributed under the terms of the GNU
22419 +dnl General Public License.  As a special exception to the GNU General
22420 +dnl Public License, this file may be distributed as part of a program
22421 +dnl that contains a configuration script generated by Autoconf, under
22422 +dnl the same distribution terms as the rest of that program.
22423 +
22424 +dnl From Paul Eggert
22425 +
22426 +dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
22427 +dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
22428 +
22429 +AC_DEFUN([jm_FUNC_MBRTOWC],
22430 +[
22431 +  AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
22432 +    jm_cv_func_mbrtowc,
22433 +    [AC_TRY_LINK(
22434 +       [#include <wchar.h>],
22435 +       [mbstate_t state; return ! (sizeof state && mbrtowc);],
22436 +       jm_cv_func_mbrtowc=yes,
22437 +       jm_cv_func_mbrtowc=no)])
22438 +  if test $jm_cv_func_mbrtowc = yes; then
22439 +    AC_DEFINE(HAVE_MBRTOWC, 1,
22440 +      [Define to 1 if mbrtowc and mbstate_t are properly declared.])
22441 +  fi
22442 +])
22443 diff -urNd -urNd patch-2.5.4/m4/mbstate_t.m4 patch-2.5.9/m4/mbstate_t.m4
22444 --- patch-2.5.4/m4/mbstate_t.m4 1969-12-31 19:00:00.000000000 -0500
22445 +++ patch-2.5.9/m4/mbstate_t.m4 2002-06-21 13:38:30.000000000 -0400
22446 @@ -0,0 +1,32 @@
22447 +# mbstate_t.m4 serial 9
22448 +dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
22449 +dnl This file is free software, distributed under the terms of the GNU
22450 +dnl General Public License.  As a special exception to the GNU General
22451 +dnl Public License, this file may be distributed as part of a program
22452 +dnl that contains a configuration script generated by Autoconf, under
22453 +dnl the same distribution terms as the rest of that program.
22454 +
22455 +# From Paul Eggert.
22456 +
22457 +# BeOS 5 has <wchar.h> but does not define mbstate_t,
22458 +# so you can't declare an object of that type.
22459 +# Check for this incompatibility with Standard C.
22460 +
22461 +# AC_TYPE_MBSTATE_T
22462 +# -----------------
22463 +AC_DEFUN([AC_TYPE_MBSTATE_T],
22464 +  [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
22465 +     [AC_COMPILE_IFELSE(
22466 +       [AC_LANG_PROGRAM(
22467 +          [AC_INCLUDES_DEFAULT
22468 +#          include <wchar.h>],
22469 +          [mbstate_t x; return sizeof x;])],
22470 +       [ac_cv_type_mbstate_t=yes],
22471 +       [ac_cv_type_mbstate_t=no])])
22472 +   if test $ac_cv_type_mbstate_t = yes; then
22473 +     AC_DEFINE([HAVE_MBSTATE_T], 1,
22474 +              [Define to 1 if <wchar.h> declares mbstate_t.])
22475 +   else
22476 +     AC_DEFINE([mbstate_t], int,
22477 +              [Define to a type if <wchar.h> does not define.])
22478 +   fi])
22479 diff -urNd -urNd patch-2.5.4/m4/memchr.m4 patch-2.5.9/m4/memchr.m4
22480 --- patch-2.5.4/m4/memchr.m4    1969-12-31 19:00:00.000000000 -0500
22481 +++ patch-2.5.9/m4/memchr.m4    2002-12-31 08:42:07.000000000 -0500
22482 @@ -0,0 +1,21 @@
22483 +# memchr.m4 serial 1
22484 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22485 +dnl This file is free software, distributed under the terms of the GNU
22486 +dnl General Public License.  As a special exception to the GNU General
22487 +dnl Public License, this file may be distributed as part of a program
22488 +dnl that contains a configuration script generated by Autoconf, under
22489 +dnl the same distribution terms as the rest of that program.
22490 +
22491 +AC_DEFUN([gl_FUNC_MEMCHR],
22492 +[
22493 +  AC_REPLACE_FUNCS(memchr)
22494 +  if test $ac_cv_func_memchr = no; then
22495 +    jm_PREREQ_MEMCHR
22496 +  fi
22497 +])
22498 +
22499 +# Prerequisites of lib/memchr.c.
22500 +AC_DEFUN([jm_PREREQ_MEMCHR], [
22501 +  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
22502 +  AC_CHECK_HEADERS(bp-sym.h)
22503 +])
22504 diff -urNd -urNd patch-2.5.4/m4/mkdir.m4 patch-2.5.9/m4/mkdir.m4
22505 --- patch-2.5.4/m4/mkdir.m4     1969-12-31 19:00:00.000000000 -0500
22506 +++ patch-2.5.9/m4/mkdir.m4     2002-05-24 14:47:37.000000000 -0400
22507 @@ -0,0 +1,34 @@
22508 +#serial 1
22509 +
22510 +dnl From Mumit Khan and Paul Eggert
22511 +dnl Determine whether mkdir accepts only one argument instead of the usual two.
22512 +
22513 +AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
22514 +  [AC_CHECK_FUNCS(mkdir)
22515 +   AC_CACHE_CHECK([whether mkdir takes only one argument],
22516 +     patch_cv_mkdir_takes_one_arg,
22517 +     [patch_cv_mkdir_takes_one_arg=no
22518 +      if test $ac_cv_func_mkdir = yes; then
22519 +        AC_TRY_COMPILE([
22520 +#include <sys/types.h>
22521 +#include <sys/stat.h>
22522 +         ],
22523 +         [mkdir (".", 0);],
22524 +         ,
22525 +         [AC_TRY_COMPILE([
22526 +#include <sys/types.h>
22527 +#include <sys/stat.h>
22528 +            ],
22529 +            [mkdir (".");],
22530 +            patch_cv_mkdir_takes_one_arg=yes
22531 +         )]
22532 +       )
22533 +      fi
22534 +     ]
22535 +   )
22536 +   if test $patch_cv_mkdir_takes_one_arg = yes; then
22537 +     AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
22538 +       [Define if mkdir takes only one argument.])
22539 +   fi
22540 +  ]
22541 +)
22542 diff -urNd -urNd patch-2.5.4/m4/onceonly.m4 patch-2.5.9/m4/onceonly.m4
22543 --- patch-2.5.4/m4/onceonly.m4  1969-12-31 19:00:00.000000000 -0500
22544 +++ patch-2.5.9/m4/onceonly.m4  2003-03-18 05:08:34.000000000 -0500
22545 @@ -0,0 +1,63 @@
22546 +# onceonly.m4 serial 3
22547 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
22548 +dnl This file is free software, distributed under the terms of the GNU
22549 +dnl General Public License.  As a special exception to the GNU General
22550 +dnl Public License, this file may be distributed as part of a program
22551 +dnl that contains a configuration script generated by Autoconf, under
22552 +dnl the same distribution terms as the rest of that program.
22553 +
22554 +dnl This file defines some "once only" variants of standard autoconf macros.
22555 +dnl   AC_CHECK_HEADERS_ONCE         like  AC_CHECK_HEADERS
22556 +dnl   AC_CHECK_FUNCS_ONCE           like  AC_CHECK_FUNCS
22557 +dnl   AC_CHECK_DECLS_ONCE           like  AC_CHECK_DECLS
22558 +dnl   AC_REQUIRE([AC_HEADER_STDC])  like  AC_HEADER_STDC
22559 +dnl The advantage is that the check for each of the headers/functions/decls
22560 +dnl will be put only once into the 'configure' file. It keeps the size of
22561 +dnl the 'configure' file down, and avoids redundant output when 'configure'
22562 +dnl is run.
22563 +dnl The drawback is that the checks cannot be conditionalized. If you write
22564 +dnl   if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
22565 +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
22566 +dnl empty, and the check will be inserted before the body of the AC_DEFUNed
22567 +dnl function.
22568 +
22569 +dnl Autoconf version 2.57 or newer is recommended.
22570 +AC_PREREQ(2.54)
22571 +
22572 +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
22573 +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
22574 +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
22575 +  :
22576 +  AC_FOREACH([gl_HEADER_NAME], [$1], [
22577 +    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
22578 +                                                 [-./], [___])), [
22579 +      AC_CHECK_HEADERS(gl_HEADER_NAME)
22580 +    ])
22581 +    AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
22582 +                                                   [-./], [___])))
22583 +  ])
22584 +])
22585 +
22586 +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
22587 +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
22588 +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
22589 +  :
22590 +  AC_FOREACH([gl_FUNC_NAME], [$1], [
22591 +    AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
22592 +      AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
22593 +    ])
22594 +    AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
22595 +  ])
22596 +])
22597 +
22598 +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
22599 +# AC_CHECK_DECLS(DECL1, DECL2, ...).
22600 +AC_DEFUN([AC_CHECK_DECLS_ONCE], [
22601 +  :
22602 +  AC_FOREACH([gl_DECL_NAME], [$1], [
22603 +    AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
22604 +      AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
22605 +    ])
22606 +    AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
22607 +  ])
22608 +])
22609 diff -urNd -urNd patch-2.5.4/m4/protos.m4 patch-2.5.9/m4/protos.m4
22610 --- patch-2.5.4/m4/protos.m4    1998-10-05 00:29:36.000000000 -0400
22611 +++ patch-2.5.9/m4/protos.m4    1969-12-31 19:00:00.000000000 -0500
22612 @@ -1,25 +0,0 @@
22613 -## ------------------------------- ##
22614 -## Check for function prototypes.  ##
22615 -## From Franc,ois Pinard           ##
22616 -## ------------------------------- ##
22617 -
22618 -# serial 1
22619 -
22620 -AC_DEFUN(AM_C_PROTOTYPES,
22621 -[AC_REQUIRE([AM_PROG_CC_STDC])
22622 -AC_REQUIRE([AC_PROG_CPP])
22623 -AC_MSG_CHECKING([for function prototypes])
22624 -if test "$am_cv_prog_cc_stdc" != no; then
22625 -  AC_MSG_RESULT(yes)
22626 -  AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
22627 -  U= ANSI2KNR=
22628 -else
22629 -  AC_MSG_RESULT(no)
22630 -  U=_ ANSI2KNR=./ansi2knr
22631 -  # Ensure some checks needed by ansi2knr itself.
22632 -  AC_HEADER_STDC
22633 -  AC_CHECK_HEADERS(string.h)
22634 -fi
22635 -AC_SUBST(U)dnl
22636 -AC_SUBST(ANSI2KNR)dnl
22637 -])
22638 diff -urNd -urNd patch-2.5.4/m4/quotearg.m4 patch-2.5.9/m4/quotearg.m4
22639 --- patch-2.5.4/m4/quotearg.m4  1969-12-31 19:00:00.000000000 -0500
22640 +++ patch-2.5.9/m4/quotearg.m4  2002-12-31 08:42:07.000000000 -0500
22641 @@ -0,0 +1,16 @@
22642 +# quotearg.m4 serial 1
22643 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22644 +dnl This file is free software, distributed under the terms of the GNU
22645 +dnl General Public License.  As a special exception to the GNU General
22646 +dnl Public License, this file may be distributed as part of a program
22647 +dnl that contains a configuration script generated by Autoconf, under
22648 +dnl the same distribution terms as the rest of that program.
22649 +
22650 +AC_DEFUN([gl_QUOTEARG],
22651 +[
22652 +  dnl Prerequisites of lib/quotearg.c.
22653 +  AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
22654 +  AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
22655 +  AC_TYPE_MBSTATE_T
22656 +  jm_FUNC_MBRTOWC
22657 +])
22658 diff -urNd -urNd patch-2.5.4/m4/quote.m4 patch-2.5.9/m4/quote.m4
22659 --- patch-2.5.4/m4/quote.m4     1969-12-31 19:00:00.000000000 -0500
22660 +++ patch-2.5.9/m4/quote.m4     2002-12-31 08:42:07.000000000 -0500
22661 @@ -0,0 +1,13 @@
22662 +# quote.m4 serial 1
22663 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22664 +dnl This file is free software, distributed under the terms of the GNU
22665 +dnl General Public License.  As a special exception to the GNU General
22666 +dnl Public License, this file may be distributed as part of a program
22667 +dnl that contains a configuration script generated by Autoconf, under
22668 +dnl the same distribution terms as the rest of that program.
22669 +
22670 +AC_DEFUN([gl_QUOTE],
22671 +[
22672 +  dnl Prerequisites of lib/quote.c.
22673 +  AC_CHECK_HEADERS_ONCE(stddef.h)
22674 +])
22675 diff -urNd -urNd patch-2.5.4/m4/realloc.m4 patch-2.5.9/m4/realloc.m4
22676 --- patch-2.5.4/m4/realloc.m4   1999-02-07 00:36:21.000000000 -0500
22677 +++ patch-2.5.9/m4/realloc.m4   2002-12-31 08:43:06.000000000 -0500
22678 @@ -1,35 +1,25 @@
22679 -#serial 3
22680 +# realloc.m4 serial 7
22681 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22682 +dnl This file is free software, distributed under the terms of the GNU
22683 +dnl General Public License.  As a special exception to the GNU General
22684 +dnl Public License, this file may be distributed as part of a program
22685 +dnl that contains a configuration script generated by Autoconf, under
22686 +dnl the same distribution terms as the rest of that program.
22687  
22688  dnl From Jim Meyering.
22689  dnl Determine whether realloc works when both arguments are 0.
22690  dnl If it doesn't, arrange to use the replacement function.
22691 -dnl
22692  
22693 -AC_DEFUN(jm_FUNC_REALLOC,
22694 +AC_DEFUN([jm_FUNC_REALLOC],
22695  [
22696 - dnl xmalloc.c requires that this symbol be defined so it doesn't
22697 - dnl mistakenly use a broken realloc -- as it might if this test were omitted.
22698 - AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
22699 -                    [Define if the realloc check has been performed. ])
22700 -
22701 - AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
22702 -  [AC_TRY_RUN([
22703 -    char *realloc ();
22704 -    int
22705 -    main ()
22706 -    {
22707 -      exit (realloc (0, 0) ? 0 : 1);
22708 -    }
22709 -         ],
22710 -        jm_cv_func_working_realloc=yes,
22711 -        jm_cv_func_working_realloc=no,
22712 -        dnl When crosscompiling, assume realloc is broken.
22713 -        jm_cv_func_working_realloc=no)
22714 -  ])
22715 -  if test $jm_cv_func_working_realloc = no; then
22716 -    AC_SUBST(LIBOBJS)
22717 -    LIBOBJS="$LIBOBJS realloc.$ac_objext"
22718 -    AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
22719 -      [Define to rpl_realloc if the replacement function should be used.])
22720 +  AC_REQUIRE([AC_FUNC_REALLOC])
22721 +  dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
22722 +  if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
22723 +    gl_PREREQ_REALLOC
22724    fi
22725  ])
22726 +
22727 +# Prerequisites of lib/realloc.c.
22728 +AC_DEFUN([gl_PREREQ_REALLOC], [
22729 +  :
22730 +])
22731 diff -urNd -urNd patch-2.5.4/m4/rmdir.m4 patch-2.5.9/m4/rmdir.m4
22732 --- patch-2.5.4/m4/rmdir.m4     1969-12-31 19:00:00.000000000 -0500
22733 +++ patch-2.5.9/m4/rmdir.m4     2002-12-31 08:42:07.000000000 -0500
22734 @@ -0,0 +1,22 @@
22735 +# rmdir.m4 serial 1
22736 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22737 +dnl This file is free software, distributed under the terms of the GNU
22738 +dnl General Public License.  As a special exception to the GNU General
22739 +dnl Public License, this file may be distributed as part of a program
22740 +dnl that contains a configuration script generated by Autoconf, under
22741 +dnl the same distribution terms as the rest of that program.
22742 +
22743 +AC_DEFUN([gl_FUNC_RMDIR],
22744 +[
22745 +  AC_REPLACE_FUNCS(rmdir)
22746 +  if test $ac_cv_func_rmdir = no; then
22747 +    gl_PREREQ_RMDIR
22748 +  fi
22749 +])
22750 +
22751 +# Prerequisites of lib/rmdir.c.
22752 +AC_DEFUN([gl_PREREQ_RMDIR], [
22753 +  AC_REQUIRE([AC_HEADER_STAT])
22754 +  :
22755 +])
22756 +
22757 diff -urNd -urNd patch-2.5.4/m4/setmode.m4 patch-2.5.9/m4/setmode.m4
22758 --- patch-2.5.4/m4/setmode.m4   1969-12-31 19:00:00.000000000 -0500
22759 +++ patch-2.5.9/m4/setmode.m4   2002-02-27 23:22:13.000000000 -0500
22760 @@ -0,0 +1,38 @@
22761 +# Check for setmode, DOS style.
22762 +
22763 +# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
22764 +
22765 +# This program is free software; you can redistribute it and/or modify
22766 +# it under the terms of the GNU General Public License as published by
22767 +# the Free Software Foundation; either version 2, or (at your option)
22768 +# any later version.
22769 +
22770 +# This program is distributed in the hope that it will be useful,
22771 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
22772 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22773 +# GNU General Public License for more details.
22774 +
22775 +# You should have received a copy of the GNU General Public License
22776 +# along with this program; if not, write to the Free Software
22777 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22778 +# 02111-1307, USA.
22779 +
22780 +AC_DEFUN([AC_FUNC_SETMODE_DOS],
22781 +  [AC_CHECK_HEADERS(fcntl.h unistd.h)
22782 +   AC_CACHE_CHECK([for DOS-style setmode],
22783 +     [ac_cv_func_setmode_dos],
22784 +     [AC_TRY_LINK(
22785 +       [#include <io.h>
22786 +        #if HAVE_FCNTL_H
22787 +        # include <fcntl.h>
22788 +        #endif
22789 +        #if HAVE_UNISTD_H
22790 +        # include <unistd.h>
22791 +        #endif],
22792 +       [int ret = setmode && setmode (1, O_BINARY);],
22793 +       [ac_cv_func_setmode_dos=yes],
22794 +       [ac_cv_func_setmode_dos=no])])
22795 +   if test $ac_cv_func_setmode_dos = yes; then
22796 +     AC_DEFINE(HAVE_SETMODE_DOS, 1,
22797 +       [Define to 1 if you have the DOS-style `setmode' function.])
22798 +   fi])
22799 diff -urNd -urNd patch-2.5.4/m4/stdbool.m4 patch-2.5.9/m4/stdbool.m4
22800 --- patch-2.5.4/m4/stdbool.m4   1969-12-31 19:00:00.000000000 -0500
22801 +++ patch-2.5.9/m4/stdbool.m4   2003-01-09 08:35:14.000000000 -0500
22802 @@ -0,0 +1,89 @@
22803 +# Check for stdbool.h that conforms to C99.
22804 +
22805 +# Copyright (C) 2002-2003 Free Software Foundation, Inc.
22806 +
22807 +# This program is free software; you can redistribute it and/or modify
22808 +# it under the terms of the GNU General Public License as published by
22809 +# the Free Software Foundation; either version 2, or (at your option)
22810 +# any later version.
22811 +
22812 +# This program is distributed in the hope that it will be useful,
22813 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
22814 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22815 +# GNU General Public License for more details.
22816 +
22817 +# You should have received a copy of the GNU General Public License
22818 +# along with this program; if not, write to the Free Software
22819 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22820 +# 02111-1307, USA.
22821 +
22822 +# Prepare for substituting <stdbool.h> if it is not supported.
22823 +
22824 +AC_DEFUN([AM_STDBOOL_H],
22825 +[
22826 +  AC_REQUIRE([AC_HEADER_STDBOOL])
22827 +
22828 +  # Define two additional variables used in the Makefile substitution.
22829 +
22830 +  if test "$ac_cv_header_stdbool_h" = yes; then
22831 +    STDBOOL_H=''
22832 +  else
22833 +    STDBOOL_H='stdbool.h'
22834 +  fi
22835 +  AC_SUBST([STDBOOL_H])
22836 +
22837 +  if test "$ac_cv_type__Bool" = yes; then
22838 +    HAVE__BOOL=1
22839 +  else
22840 +    HAVE__BOOL=0
22841 +  fi
22842 +  AC_SUBST([HAVE__BOOL])
22843 +])
22844 +
22845 +# This macro is only needed in autoconf <= 2.54.  Newer versions of autoconf
22846 +# have this macro built-in.
22847 +
22848 +AC_DEFUN([AC_HEADER_STDBOOL],
22849 +  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
22850 +     [ac_cv_header_stdbool_h],
22851 +     [AC_TRY_COMPILE(
22852 +       [
22853 +         #include <stdbool.h>
22854 +         #ifndef bool
22855 +          "error: bool is not defined"
22856 +         #endif
22857 +         #ifndef false
22858 +          "error: false is not defined"
22859 +         #endif
22860 +         #if false
22861 +          "error: false is not 0"
22862 +         #endif
22863 +         #ifndef true
22864 +          "error: false is not defined"
22865 +         #endif
22866 +         #if true != 1
22867 +          "error: true is not 1"
22868 +         #endif
22869 +         #ifndef __bool_true_false_are_defined
22870 +          "error: __bool_true_false_are_defined is not defined"
22871 +         #endif
22872 +
22873 +         struct s { _Bool s: 1; _Bool t; } s;
22874 +
22875 +         char a[true == 1 ? 1 : -1];
22876 +         char b[false == 0 ? 1 : -1];
22877 +         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
22878 +         char d[(bool) -0.5 == true ? 1 : -1];
22879 +         bool e = &s;
22880 +         char f[(_Bool) -0.0 == false ? 1 : -1];
22881 +         char g[true];
22882 +         char h[sizeof (_Bool)];
22883 +         char i[sizeof s.t];
22884 +       ],
22885 +       [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
22886 +       [ac_cv_header_stdbool_h=yes],
22887 +       [ac_cv_header_stdbool_h=no])])
22888 +   AC_CHECK_TYPES([_Bool])
22889 +   if test $ac_cv_header_stdbool_h = yes; then
22890 +     AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
22891 +   fi])
22892 diff -urNd -urNd patch-2.5.4/m4/unlocked-io.m4 patch-2.5.9/m4/unlocked-io.m4
22893 --- patch-2.5.4/m4/unlocked-io.m4       1969-12-31 19:00:00.000000000 -0500
22894 +++ patch-2.5.9/m4/unlocked-io.m4       2002-12-31 08:42:07.000000000 -0500
22895 @@ -0,0 +1,22 @@
22896 +#serial 7 -*- autoconf -*-
22897 +
22898 +dnl From Jim Meyering.
22899 +dnl
22900 +dnl See if the glibc *_unlocked I/O macros or functions are available.
22901 +dnl Use only those *_unlocked macros or functions that are declared
22902 +dnl (because some of them were declared in Solaris 2.5.1 but were removed
22903 +dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
22904 +dnl on Solaris 2.6).
22905 +
22906 +AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
22907 +[
22908 +  dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
22909 +  dnl etc.
22910 +  AC_REQUIRE([AC_GNU_SOURCE])
22911 +
22912 +  AC_CHECK_DECLS_ONCE(
22913 +     [clearerr_unlocked feof_unlocked ferror_unlocked
22914 +      fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
22915 +      fread_unlocked fwrite_unlocked getc_unlocked
22916 +      getchar_unlocked putc_unlocked putchar_unlocked])
22917 +])
22918 diff -urNd -urNd patch-2.5.4/m4/utimbuf.m4 patch-2.5.9/m4/utimbuf.m4
22919 --- patch-2.5.4/m4/utimbuf.m4   1999-01-10 17:51:01.000000000 -0500
22920 +++ patch-2.5.9/m4/utimbuf.m4   2002-12-31 08:43:06.000000000 -0500
22921 @@ -1,4 +1,4 @@
22922 -#serial 2
22923 +#serial 5
22924  
22925  dnl From Jim Meyering
22926  
22927 @@ -6,9 +6,9 @@
22928  dnl usually in <utime.h>.
22929  dnl Some systems have utime.h but don't declare the struct anywhere.
22930  
22931 -AC_DEFUN(jm_STRUCT_UTIMBUF,
22932 +AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
22933  [
22934 -  AC_CHECK_HEADERS(utime.h)
22935 +  AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
22936    AC_REQUIRE([AC_HEADER_TIME])
22937    AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
22938      [AC_TRY_COMPILE(
22939 @@ -33,8 +33,8 @@
22940      ])
22941  
22942    if test $fu_cv_sys_struct_utimbuf = yes; then
22943 -    AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
22944 -[Define if struct utimbuf is declared -- usually in <utime.h>.
22945 -   Some systems have utime.h but don't declare the struct anywhere. ])
22946 +    AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
22947 +      [Define if struct utimbuf is declared -- usually in <utime.h>.
22948 +       Some systems have utime.h but don't declare the struct anywhere. ])
22949    fi
22950  ])
22951 diff -urNd -urNd patch-2.5.4/m4/xalloc.m4 patch-2.5.9/m4/xalloc.m4
22952 --- patch-2.5.4/m4/xalloc.m4    1969-12-31 19:00:00.000000000 -0500
22953 +++ patch-2.5.9/m4/xalloc.m4    2002-12-31 08:42:07.000000000 -0500
22954 @@ -0,0 +1,26 @@
22955 +# xalloc.m4 serial 1
22956 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
22957 +dnl This file is free software, distributed under the terms of the GNU
22958 +dnl General Public License.  As a special exception to the GNU General
22959 +dnl Public License, this file may be distributed as part of a program
22960 +dnl that contains a configuration script generated by Autoconf, under
22961 +dnl the same distribution terms as the rest of that program.
22962 +
22963 +AC_DEFUN([gl_XALLOC],
22964 +[
22965 +  gl_PREREQ_XMALLOC
22966 +  gl_PREREQ_XSTRDUP
22967 +])
22968 +
22969 +# Prerequisites of lib/xmalloc.c.
22970 +AC_DEFUN([gl_PREREQ_XMALLOC], [
22971 +  AC_REQUIRE([AC_HEADER_STDC])
22972 +  AC_REQUIRE([jm_FUNC_MALLOC])
22973 +  AC_REQUIRE([jm_FUNC_REALLOC])
22974 +])
22975 +
22976 +# Prerequisites of lib/xstrdup.c.
22977 +AC_DEFUN([gl_PREREQ_XSTRDUP], [
22978 +  AC_REQUIRE([AC_HEADER_STDC])
22979 +  AC_CHECK_HEADERS_ONCE(string.h)
22980 +])
22981 diff -urNd -urNd patch-2.5.4/Makefile.in patch-2.5.9/Makefile.in
22982 --- patch-2.5.4/Makefile.in     1999-08-30 02:37:54.000000000 -0400
22983 +++ patch-2.5.9/Makefile.in     2003-05-20 12:15:48.000000000 -0400
22984 @@ -1,5 +1,7 @@
22985  # Makefile for GNU patch.
22986 -# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
22987 +
22988 +# Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
22989 +# Foundation, Inc.
22990  
22991  # This program is free software; you can redistribute it and/or modify
22992  # it under the terms of the GNU General Public License as published by
22993 @@ -37,9 +39,9 @@
22994  LDFLAGS = @LDFLAGS@
22995  LIBOBJS = @LIBOBJS@
22996  LIBS = @LIBS@
22997 -PACKAGE = @PACKAGE@
22998 -U = @U@
22999 -VERSION = @VERSION@
23000 +OBJEXT = @OBJEXT@
23001 +PACKAGE_NAME = @PACKAGE_NAME@
23002 +PACKAGE_VERSION = @PACKAGE_VERSION@
23003  
23004  prefix = @prefix@
23005  exec_prefix = @exec_prefix@
23006 @@ -59,20 +61,33 @@
23007  
23008  SHELL = /bin/sh
23009  
23010 -LIBSRCS = getopt.c getopt1.c malloc.c memchr.c realloc.c rename.c
23011 -SRCS = addext.c argmatch.c backupfile.c basename.c error.c inp.c maketime.c \
23012 -       mkdir.c partime.c patch.c pch.c quotearg.c quotesys.c \
23013 -       rmdir.c util.c version.c xmalloc.c $(LIBSRCS)
23014 -OBJS = addext$U.o argmatch$U.o backupfile$U.o basename$U.o error$U.o inp$U.o \
23015 -       maketime.o partime.o patch$U.o pch$U.o quotearg$U.o quotesys.o \
23016 -       util$U.o version$U.o xmalloc$U.o $(LIBOBJS)
23017 -HDRS = argmatch.h backupfile.h basename.h common.h error.h getopt.h \
23018 -       inp.h maketime.h partime.h patchlevel.h pch.h quotearg.h quotesys.h \
23019 -       util.h version.h xalloc.h
23020 +LIBSRCS = error.c malloc.c memchr.c mkdir.c \
23021 +       realloc.c rmdir.c strcasecmp.c strncasecmp.c
23022 +SRCS = $(LIBSRCS) \
23023 +       addext.c argmatch.c backupfile.c \
23024 +       basename.c dirname.c \
23025 +       getopt.c getopt1.c inp.c \
23026 +       maketime.c partime.c \
23027 +       patch.c pch.c \
23028 +       quote.c quotearg.c quotesys.c \
23029 +       util.c version.c xmalloc.c
23030 +OBJS = $(LIBOBJS) \
23031 +       addext.$(OBJEXT) argmatch.$(OBJEXT) backupfile.$(OBJEXT) \
23032 +       basename.$(OBJEXT) dirname.$(OBJEXT) \
23033 +       getopt.$(OBJEXT) getopt1.$(OBJEXT) inp.$(OBJEXT) \
23034 +       maketime.$(OBJEXT) partime.$(OBJEXT) \
23035 +       patch.$(OBJEXT) pch.$(OBJEXT) \
23036 +       quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
23037 +       util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
23038 +HDRS = argmatch.h backupfile.h common.h dirname.h \
23039 +       error.h getopt.h gettext.h \
23040 +       inp.h maketime.h partime.h pch.h \
23041 +       quote.h quotearg.h quotesys.h \
23042 +       unlocked-io.h util.h version.h xalloc.h
23043  MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
23044 -       aclocal.m4 ansi2knr.1 ansi2knr.c \
23045 -       config.guess config.hin config.sub configure configure.in \
23046 -       install-sh mkinstalldirs patch.man
23047 +       aclocal.m4 \
23048 +       config.hin configure configure.ac \
23049 +       install-sh mkinstalldirs patch.man stdbool.h.in
23050  DISTFILES = $(MISC) $(SRCS) $(HDRS)
23051  DISTFILES_M4 = $(ACINCLUDE_INPUTS)
23052  DISTFILES_PC = pc/chdirsaf.c
23053 @@ -90,7 +105,7 @@
23054  COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -Ded_PROGRAM=\"$(ed_PROGRAM)\" \
23055         -I. -I$(srcdir) $(CFLAGS)
23056  
23057 -.c.o:
23058 +.c.$(OBJEXT):
23059         $(COMPILE) $<
23060  
23061  patch$(EXEEXT): $(OBJS)
23062 @@ -114,27 +129,46 @@
23063         $(SHELL) $(CONFIG_STATUS)
23064  config.status: configure
23065         $(SHELL) $(CONFIG_STATUS) --recheck
23066 -configure: configure.in $(srcdir)/aclocal.m4
23067 +configure: configure.ac $(srcdir)/aclocal.m4
23068         cd $(srcdir) && autoconf
23069 -config.hin: configure.in
23070 +config.hin: configure.ac $(srcdir)/aclocal.m4
23071         cd $(srcdir) && rm -f config.hin && autoheader
23072 +stdbool.h: stdbool.h.in
23073 +       sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' \
23074 +         <$(srcdir)/stdbool.h.in >stdbool.h
23075  
23076  M4DIR = $(srcdir)/m4
23077 -ACINCLUDE_INPUTS = $(M4DIR)/ccstdc.m4 $(M4DIR)/d-ino.m4 \
23078 -  $(M4DIR)/inttypes_h.m4 $(M4DIR)/largefile.m4 $(M4DIR)/malloc.m4 \
23079 -  $(M4DIR)/protos.m4 $(M4DIR)/realloc.m4 $(M4DIR)/utimbuf.m4
23080 +ACINCLUDE_INPUTS = \
23081 +  $(M4DIR)/backupfile.m4 \
23082 +  $(M4DIR)/d-ino.m4 \
23083 +  $(M4DIR)/dirname.m4 \
23084 +  $(M4DIR)/dos.m4 \
23085 +  $(M4DIR)/error.m4 \
23086 +  $(M4DIR)/getopt.m4 \
23087 +  $(M4DIR)/malloc.m4 \
23088 +  $(M4DIR)/mbrtowc.m4 \
23089 +  $(M4DIR)/mbstate_t.m4 \
23090 +  $(M4DIR)/memchr.m4 \
23091 +  $(M4DIR)/mkdir.m4 \
23092 +  $(M4DIR)/onceonly.m4 \
23093 +  $(M4DIR)/quote.m4 \
23094 +  $(M4DIR)/quotearg.m4 \
23095 +  $(M4DIR)/realloc.m4 \
23096 +  $(M4DIR)/rmdir.m4 \
23097 +  $(M4DIR)/setmode.m4 \
23098 +  $(M4DIR)/stdbool.m4 \
23099 +  $(M4DIR)/unlocked-io.m4 \
23100 +  $(M4DIR)/utimbuf.m4 \
23101 +  $(M4DIR)/xalloc.m4
23102  
23103  $(srcdir)/aclocal.m4: $(ACINCLUDE_INPUTS)
23104         cat $(ACINCLUDE_INPUTS) >$(srcdir)/aclocal.m4
23105  
23106 -patchlevel.h: configure.in
23107 -       echo '#define PATCH_VERSION "$(VERSION)"' >patchlevel.h
23108 -
23109 -TAGS: $(HDRS) patchlevel.h $(SRCS)
23110 -       etags $(HDRS) patchlevel.h $(SRCS)
23111 +TAGS: $(HDRS) $(SRCS)
23112 +       etags $(HDRS) $(SRCS)
23113  
23114  mostlyclean::
23115 -       rm -f ansi2knr core* *core *.o *_.c
23116 +       rm -f core* *core *.$(OBJEXT) *_.c stdbool.h
23117  
23118  clean:: mostlyclean
23119         rm -f patch$(EXEEXT)
23120 @@ -148,7 +182,7 @@
23121         $(MAKE) distclean
23122         rm -f TAGS
23123  
23124 -PV = $(PACKAGE)-$(VERSION)
23125 +PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
23126  
23127  dist:: $(DISTFILES) $(DISTFILES_M4) $(DISTFILES_PC) $(DISTFILES_PC_DJGPP)
23128         rm -rf $(PV)
23129 @@ -160,31 +194,28 @@
23130         tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
23131         rm -rf $(PV)
23132  
23133 -ansi2knr.o: config.h
23134 -ansi2knr: ansi2knr.o
23135 -       $(CC) -o $@ $(CFLAGS) $(LDFLAGS) ansi2knr.o $(LIBS)
23136 -addext_.c argmatch_.c backupfile_.c basename_.c error_.c \
23137 -getopt_.c getopt1_.c inp_.c malloc_.c mkdir_.c patch_.c pch_.c quotearg_.c \
23138 -rename_.c util_.c version_.c xmalloc_.c: ansi2knr
23139 -.SUFFIXES: _.c
23140 -.c_.c:
23141 -       ./ansi2knr $< $@
23142 -
23143  $(OBJS): config.h
23144 -addext$U.o: backupfile.h
23145 -argmatch$U.o: argmatch.h error.h quotearg.h
23146 -backupfile$U.o: argmatch.h backupfile.h
23147 -error$U.o: error.h
23148 -getopt$U.o getopt1$U.o: getopt.h
23149 -inp$U.o: backupfile.h common.h inp.h pch.h quotearg.h util.h xalloc.h
23150 -maketime.o: maketime.h partime.h
23151 -partime.o: partime.h
23152 -patch$U.o: argmatch.h backupfile.h common.h getopt.h inp.h \
23153 +COMMON = common.h @STDBOOL_H@
23154 +addext.$(OBJEXT): backupfile.h dirname.h
23155 +argmatch.$(OBJEXT): argmatch.h gettext.h error.h \
23156 +       quote.h quotearg.h unlocked-io.h
23157 +backupfile.$(OBJEXT): argmatch.h backupfile.h dirname.h
23158 +basename.$(OBJEXT): dirname.h
23159 +dirname.$(OBJEXT): dirname.h xalloc.h
23160 +error.$(OBJEXT): error.h gettext.h unlocked-io.h
23161 +getopt.$(OBJEXT) getopt1.$(OBJEXT): getopt.h
23162 +inp.$(OBJEXT): backupfile.h $(COMMON) inp.h pch.h quotearg.h util.h xalloc.h
23163 +maketime.$(OBJEXT): maketime.h partime.h
23164 +mkdir.$(OBJEXT): dirname.h xalloc.h
23165 +partime.$(OBJEXT): partime.h
23166 +patch.$(OBJEXT): argmatch.h backupfile.h $(COMMON) getopt.h inp.h \
23167         pch.h quotearg.h util.h version.h xalloc.h
23168 -pch$U.o: backupfile.h basename.h common.h inp.h pch.h quotearg.h util.h
23169 -quotearg$U.o: quotearg.h xalloc.h
23170 -quotesys.o: quotesys.h
23171 -util$U.o: backupfile.h basename.h common.h maketime.h \
23172 +pch.$(OBJEXT): backupfile.h $(COMMON) dirname.h inp.h pch.h quotearg.h util.h
23173 +quote.$(OBJECT): quote.h quotearg.h
23174 +quotearg.$(OBJEXT): gettext.h quotearg.h xalloc.h
23175 +quotesys.$(OBJEXT): quotesys.h
23176 +strncasecmp.$(OBJEXT): strcasecmp.c
23177 +util.$(OBJEXT): backupfile.h $(COMMON) dirname.h maketime.h \
23178         partime.h quotearg.h quotesys.h util.h version.h xalloc.h
23179 -version$U.o: common.h patchlevel.h util.h version.h
23180 -xmalloc$U.o: xalloc.h
23181 +version.$(OBJEXT): $(COMMON) version.h
23182 +xmalloc.$(OBJEXT): error.h gettext.h xalloc.h
23183 diff -urNd -urNd patch-2.5.4/memchr.c patch-2.5.9/memchr.c
23184 --- patch-2.5.4/memchr.c        1999-07-10 12:44:10.000000000 -0400
23185 +++ patch-2.5.9/memchr.c        2000-10-28 04:22:11.000000000 -0400
23186 @@ -1,4 +1,4 @@
23187 -/* Copyright (C) 1991, 1993, 1997, 1999 Free Software Foundation, Inc.
23188 +/* Copyright (C) 1991,93,96,97,99,2000 Free Software Foundation, Inc.
23189     Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
23190     with help from Dan Sahlin (dan@sics.se) and
23191     commentary by Jim Blandy (jimb@ai.mit.edu);
23192 @@ -34,11 +34,18 @@
23193  # define __ptr_t char *
23194  #endif /* C++ or ANSI C.  */
23195  
23196 -#if defined (_LIBC)
23197 +#if defined _LIBC
23198  # include <string.h>
23199 +# include <memcopy.h>
23200 +#else
23201 +# define reg_char char
23202  #endif
23203  
23204 -#if defined (HAVE_LIMITS_H) || defined (_LIBC)
23205 +#if HAVE_STDLIB_H || defined _LIBC
23206 +# include <stdlib.h>
23207 +#endif
23208 +
23209 +#if HAVE_LIMITS_H || defined _LIBC
23210  # include <limits.h>
23211  #endif
23212  
23213 @@ -49,21 +56,28 @@
23214  #endif
23215  
23216  #include <sys/types.h>
23217 +#if HAVE_BP_SYM_H || defined _LIBC
23218 +# include <bp-sym.h>
23219 +#else
23220 +# define BP_SYM(sym) sym
23221 +#endif
23222  
23223 +#undef memchr
23224 +#undef __memchr
23225  
23226  /* Search no more than N bytes of S for C.  */
23227 -
23228  __ptr_t
23229 -memchr (s, c, n)
23230 +__memchr (s, c_in, n)
23231       const __ptr_t s;
23232 -     int c;
23233 +     int c_in;
23234       size_t n;
23235  {
23236    const unsigned char *char_ptr;
23237    const unsigned long int *longword_ptr;
23238    unsigned long int longword, magic_bits, charmask;
23239 +  unsigned reg_char c;
23240  
23241 -  c = (unsigned char) c;
23242 +  c = (unsigned char) c_in;
23243  
23244    /* Handle the first few characters by reading one character at a time.
23245       Do this until CHAR_PTR is aligned on a longword boundary.  */
23246 @@ -197,3 +211,6 @@
23247  
23248    return 0;
23249  }
23250 +#ifdef weak_alias
23251 +weak_alias (__memchr, BP_SYM (memchr))
23252 +#endif
23253 diff -urNd -urNd patch-2.5.4/mkdir.c patch-2.5.9/mkdir.c
23254 --- patch-2.5.4/mkdir.c 1999-04-26 08:16:14.000000000 -0400
23255 +++ patch-2.5.9/mkdir.c 2001-09-16 08:42:14.000000000 -0400
23256 @@ -1,5 +1,6 @@
23257 -/* BSD compatible make directory function for System V
23258 -   Copyright (C) 1988, 1990, 1998 Free Software Foundation, Inc.
23259 +/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
23260 +   slash.  On those systems, this wrapper removes the trailing slash.
23261 +   Copyright (C) 2001 Free Software Foundation, Inc.
23262  
23263     This program is free software; you can redistribute it and/or modify
23264     it under the terms of the GNU General Public License as published by
23265 @@ -15,94 +16,61 @@
23266     along with this program; if not, write to the Free Software Foundation,
23267     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
23268  
23269 -#if HAVE_CONFIG_H
23270 -# include <config.h>
23271 -#endif
23272 +/* written by Jim Meyering */
23273 +
23274 +#include <config.h>
23275 +
23276 +/* Disable the definition of mkdir to rpl_mkdir (from config.h) in this
23277 +   file.  Otherwise, we'd get conflicting prototypes for rpl_mkdir on
23278 +   most systems.  */
23279 +#undef mkdir
23280  
23281  #include <sys/types.h>
23282  #include <sys/stat.h>
23283 -#include <errno.h>
23284 -#ifndef errno
23285 -extern int errno;
23286 +#include <stdio.h>
23287 +#if HAVE_STDLIB_H
23288 +# include <stdlib.h>
23289  #endif
23290  
23291 -#if STAT_MACROS_BROKEN
23292 -# undef S_ISDIR
23293 +#if HAVE_STRING_H
23294 +# include <string.h>
23295 +#else
23296 +# include <strings.h>
23297  #endif
23298  
23299 -#if !defined(S_ISDIR) && defined(S_IFDIR)
23300 -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
23301 -#endif
23302 +#include "dirname.h"
23303 +#include "xalloc.h"
23304  
23305 -#ifndef S_IRWXU
23306 -# define S_IRWXU 0700
23307 -#endif
23308 -#ifndef S_IRWXG
23309 -# define S_IRWXG 0070
23310 +#ifndef HAVE_DECL_FREE
23311 +"this configure-time declaration test was not run"
23312  #endif
23313 -#ifndef S_IRWXO
23314 -# define S_IRWXO 0007
23315 +#if !HAVE_DECL_FREE
23316 +void free ();
23317  #endif
23318  
23319 -/* mkdir adapted from GNU tar.  */
23320 -
23321 -/* Make directory DPATH, with permission mode DMODE.
23322 -
23323 -   Written by Robert Rother, Mariah Corporation, August 1985
23324 -   (sdcsvax!rmr or rmr@uscd).  If you want it, it's yours.
23325 -
23326 -   Severely hacked over by John Gilmore to make a 4.2BSD compatible
23327 -   subroutine. 11Mar86; hoptoad!gnu
23328 -
23329 -   Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir,
23330 -   subroutine didn't return EEXIST.  It does now.  */
23331 +/* This function is required at least for NetBSD 1.5.2.  */
23332  
23333  int
23334 -mkdir (const char *dpath, mode_t dmode)
23335 +rpl_mkdir (char const *dir, mode_t mode)
23336  {
23337 -  pid_t cpid;
23338 -  mode_t mode;
23339 -  int status;
23340 -  struct stat statbuf;
23341 +  int ret_val;
23342 +  char *tmp_dir;
23343 +  size_t len = strlen (dir);
23344  
23345 -  if (stat (dpath, &statbuf) == 0)
23346 +  if (len && dir[len - 1] == '/')
23347      {
23348 -      errno = EEXIST;          /* stat worked, so it already exists.  */
23349 -      return -1;
23350 +      tmp_dir = xstrdup (dir);
23351 +      strip_trailing_slashes (tmp_dir);
23352      }
23353 -
23354 -  /* If stat fails for a reason other than non-existence, return error.  */
23355 -  if (errno != ENOENT)
23356 -    return -1;
23357 -
23358 -  cpid = fork ();
23359 -  switch (cpid)
23360 +  else
23361      {
23362 -    case -1:                   /* Cannot fork.  */
23363 -      return -1;               /* errno is already set.  */
23364 +      tmp_dir = (char *) dir;
23365 +    }
23366  
23367 -    case 0:                    /* Child process.  */
23368 -      /* Cheap hack to set mode of new directory.  Since this child
23369 -        process is going away anyway, we zap its umask.
23370 -        This won't suffice to set SUID, SGID, etc. on this
23371 -        directory, so the parent process calls chmod afterward.  */
23372 -      mode = umask (0);        /* Get current umask.  */
23373 -      /* Set for mkdir.  */
23374 -      umask (mode | ((S_IRWXU | S_IRWXG | S_IRWXO) & ~dmode));
23375 -      execl ("/bin/mkdir", "mkdir", dpath, (char *) 0);
23376 -      _exit (1);
23377 +  ret_val = mkdir (tmp_dir, mode);
23378  
23379 -    default:                   /* Parent process.  */
23380 -      /* Wait for kid to finish.  */
23381 -      while (wait (&status) != cpid)
23382 -       /* Do nothing.  */ ;
23383 +  if (tmp_dir != dir)
23384 +    free (tmp_dir);
23385  
23386 -      if (status)
23387 -       {
23388 -         /* /bin/mkdir failed.  */
23389 -         errno = EIO;
23390 -         return -1;
23391 -       }
23392 -      return chmod (dpath, dmode);
23393 -    }
23394 +  return ret_val;
23395  }
23396 diff -urNd -urNd patch-2.5.4/mkinstalldirs patch-2.5.9/mkinstalldirs
23397 --- patch-2.5.4/mkinstalldirs   1999-01-05 08:29:06.000000000 -0500
23398 +++ patch-2.5.9/mkinstalldirs   2002-09-02 11:10:52.000000000 -0400
23399 @@ -4,9 +4,53 @@
23400  # Created: 1993-05-16
23401  # Public domain
23402  
23403 -# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $
23404 -
23405  errstatus=0
23406 +dirmode=""
23407 +
23408 +usage="\
23409 +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
23410 +
23411 +# process command line arguments
23412 +while test $# -gt 0 ; do
23413 +   case "${1}" in
23414 +     -h | --help | --h* )                      # -h for help
23415 +       echo "${usage}" 1>&2; exit 0 ;;
23416 +     -m )                                      # -m PERM arg
23417 +       shift
23418 +       test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
23419 +       dirmode="${1}"
23420 +       shift ;;
23421 +     -- ) shift; break ;;                      # stop option processing
23422 +     -* ) echo "${usage}" 1>&2; exit 1 ;;      # unknown option
23423 +     * )  break ;;                             # first non-opt arg
23424 +   esac
23425 +done
23426 +
23427 +for file
23428 +do
23429 +  if test -d "$file"; then
23430 +    shift
23431 +  else
23432 +    break
23433 +  fi
23434 +done
23435 +
23436 +case $# in
23437 +0) exit 0 ;;
23438 +esac
23439 +
23440 +case $dirmode in
23441 +'')
23442 +  if mkdir -p -- . 2>/dev/null; then
23443 +    echo "mkdir -p -- $*"
23444 +    exec mkdir -p -- "$@"
23445 +  fi ;;
23446 +*)
23447 +  if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
23448 +    echo "mkdir -m $dirmode -p -- $*"
23449 +    exec mkdir -m "$dirmode" -p -- "$@"
23450 +  fi ;;
23451 +esac
23452  
23453  for file
23454  do
23455 @@ -22,13 +66,24 @@
23456       esac
23457  
23458       if test ! -d "$pathcomp"; then
23459 -        echo "mkdir $pathcomp"
23460 +       echo "mkdir $pathcomp"
23461  
23462 -        mkdir "$pathcomp" || lasterr=$?
23463 +       mkdir "$pathcomp" || lasterr=$?
23464  
23465 -        if test ! -d "$pathcomp"; then
23466 -         errstatus=$lasterr
23467 -        fi
23468 +       if test ! -d "$pathcomp"; then
23469 +         errstatus=$lasterr
23470 +       else
23471 +         if test ! -z "$dirmode"; then
23472 +            echo "chmod $dirmode $pathcomp"
23473 +
23474 +            lasterr=""
23475 +            chmod "$dirmode" "$pathcomp" || lasterr=$?
23476 +
23477 +            if test ! -z "$lasterr"; then
23478 +              errstatus=$lasterr
23479 +            fi
23480 +         fi
23481 +       fi
23482       fi
23483  
23484       pathcomp="$pathcomp/"
23485 @@ -37,4 +92,8 @@
23486  
23487  exit $errstatus
23488  
23489 +# Local Variables:
23490 +# mode: shell-script
23491 +# sh-indentation: 3
23492 +# End:
23493  # mkinstalldirs ends here
23494 diff -urNd -urNd patch-2.5.4/NEWS patch-2.5.9/NEWS
23495 --- patch-2.5.4/NEWS    1998-03-20 21:51:32.000000000 -0500
23496 +++ patch-2.5.9/NEWS    2003-05-18 04:40:54.000000000 -0400
23497 @@ -1,9 +1,23 @@
23498 -Known problems:
23499 +Changes in versions 2.5.8 and 2.5.9: bug fixes only.
23500  
23501 -* The diffutils 2.7 documentation for `patch' is obsolete; this should be
23502 -  fixed in diffutils 2.8.  Until then, see `patch --help' or `man patch'.
23503 -\f
23504 -Changes since version 2.5:
23505 +Changes in version 2.5.7:
23506 +
23507 +* patch -D now outputs preprocessor lines without comments, as required
23508 +  by POSIX 1003.1-2001.
23509 +
23510 +Changes in version 2.5.6:
23511 +
23512 +* File names in context patches may now contain spaces, so long
23513 +  as the context patch headers use a tab to separate the file name
23514 +  from the time stamp.
23515 +* Perforce is now supported.
23516 +* Patch lines beginning with "#" are comments and are ignored.
23517 +
23518 +Changes in version 2.5.5:
23519 +
23520 +* The bug reporting address is now <bug-patch@gnu.org>.
23521 +
23522 +Changes in version 2.5.4:
23523  
23524  * A security hole has been closed.
23525    It involved race conditions with temporary files.
23526 @@ -19,6 +33,9 @@
23527  * `patch' now ignores trailing carriage returns in lines of context diffs
23528    if the context diff headers end in carriage return.
23529  
23530 +* `patch' now ignores context diff header file names that have fewer slashes
23531 +   than the count specified by the -p or --strip option.
23532 +
23533  * New options:
23534    --posix
23535    --quoting-style=WORD
23536 @@ -196,3 +213,25 @@
23537    being patched.
23538  * Print the system error message when system calls fail.
23539  * Fixed various bugs and portability problems.
23540 +
23541 +\f
23542 +
23543 +Copyright (C) 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003
23544 +Free Software Foundation, Inc.
23545 +
23546 +This file is part of GNU Patch.
23547 +
23548 +This program is free software; you can redistribute it and/or modify
23549 +it under the terms of the GNU General Public License as published by
23550 +the Free Software Foundation; either version 2, or (at your option)
23551 +any later version.
23552 +
23553 +This program is distributed in the hope that they will be useful,
23554 +but WITHOUT ANY WARRANTY; without even the implied warranty of
23555 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23556 +GNU General Public License for more details.
23557 +
23558 +You should have received a copy of the GNU General Public License
23559 +along with this program; see the file COPYING.  If not, write to
23560 +the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23561 +Boston, MA 02111-1307, USA.
23562 diff -urNd -urNd patch-2.5.4/partime.c patch-2.5.9/partime.c
23563 --- patch-2.5.4/partime.c       1998-03-15 10:48:53.000000000 -0500
23564 +++ patch-2.5.9/partime.c       2002-02-18 02:42:58.000000000 -0500
23565 @@ -1,6 +1,6 @@
23566  /* Parse a string, yielding a struct partime that describes it.  */
23567  
23568 -/* Copyright 1993, 1994, 1995, 1997 Paul Eggert
23569 +/* Copyright (C) 1993, 1994, 1995, 1997, 2002 Paul Eggert
23570     Distributed under license by the Free Software Foundation, Inc.
23571  
23572     This file is part of RCS.
23573 @@ -75,7 +75,7 @@
23574  #include <partime.h>
23575  
23576  char const partime_id[] =
23577 -  "$Id: partime.c,v 5.18 1998/03/15 15:48:53 eggert Exp $";
23578 +  "$Id: partime.c,v 1.2 2002/02/18 07:42:58 eggert Exp $";
23579  
23580  
23581  /* Lookup tables for names of months, weekdays, time zones.  */
23582 @@ -791,7 +791,7 @@
23583           return 0;
23584         if (negative)
23585           n = -n;
23586 -       while (!ISALNUM ((unsigned char) *s))
23587 +       while (! ISALNUM ((unsigned char) *s) && *s)
23588           s++;
23589         i = lookup (s, relative_units);
23590         if (!TM_DEFINED (i))
23591 diff -urNd -urNd patch-2.5.4/patch.c patch-2.5.9/patch.c
23592 --- patch-2.5.4/patch.c 1999-08-30 02:20:08.000000000 -0400
23593 +++ patch-2.5.9/patch.c 2003-05-20 09:55:03.000000000 -0400
23594 @@ -1,9 +1,11 @@
23595  /* patch - a program to apply diffs to original files */
23596  
23597 -/* $Id: patch.c,v 1.28 1999/08/30 06:20:08 eggert Exp $ */
23598 +/* $Id: patch.c,v 1.44 2003/05/20 13:55:03 eggert Exp $ */
23599  
23600 -/* Copyright 1984, 1985-1987, 1988 Larry Wall
23601 -   Copyright 1989, 1990-1993, 1997-1998, 1999 Free Software Foundation, Inc.
23602 +/* Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall
23603 +
23604 +   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002,
23605 +   2003 Free Software Foundation, Inc.
23606  
23607     This program is free software; you can redistribute it and/or modify
23608     it under the terms of the GNU General Public License as published by
23609 @@ -50,47 +52,47 @@
23610  struct outstate
23611  {
23612    FILE *ofp;
23613 -  int after_newline;
23614 -  int zero_output;
23615 +  bool after_newline;
23616 +  bool zero_output;
23617  };
23618  
23619  /* procedures */
23620  
23621 -static FILE *create_output_file PARAMS ((char const *, int));
23622 -static LINENUM locate_hunk PARAMS ((LINENUM));
23623 -static bool apply_hunk PARAMS ((struct outstate *, LINENUM));
23624 -static bool copy_till PARAMS ((struct outstate *, LINENUM));
23625 -static bool patch_match PARAMS ((LINENUM, LINENUM, LINENUM, LINENUM));
23626 -static bool similar PARAMS ((char const *, size_t, char const *, size_t));
23627 -static bool spew_output PARAMS ((struct outstate *));
23628 -static char const *make_temp PARAMS ((int));
23629 -static int numeric_string PARAMS ((char const *, int, char const *));
23630 -static void abort_hunk PARAMS ((void));
23631 -static void cleanup PARAMS ((void));
23632 -static void get_some_switches PARAMS ((void));
23633 -static void init_output PARAMS ((char const *, int, struct outstate *));
23634 -static void init_reject PARAMS ((void));
23635 -static void reinitialize_almost_everything PARAMS ((void));
23636 -static void remove_if_needed PARAMS ((char const *, int volatile *));
23637 -static void usage PARAMS ((FILE *, int)) __attribute__((noreturn));
23638 +static FILE *create_output_file (char const *, int);
23639 +static LINENUM locate_hunk (LINENUM);
23640 +static bool apply_hunk (struct outstate *, LINENUM);
23641 +static bool copy_till (struct outstate *, LINENUM);
23642 +static bool patch_match (LINENUM, LINENUM, LINENUM, LINENUM);
23643 +static bool similar (char const *, size_t, char const *, size_t);
23644 +static bool spew_output (struct outstate *);
23645 +static char const *make_temp (char);
23646 +static int numeric_string (char const *, bool, char const *);
23647 +static void abort_hunk (void);
23648 +static void cleanup (void);
23649 +static void get_some_switches (void);
23650 +static void init_output (char const *, int, struct outstate *);
23651 +static void init_reject (void);
23652 +static void reinitialize_almost_everything (void);
23653 +static void remove_if_needed (char const *, int volatile *);
23654 +static void usage (FILE *, int) __attribute__((noreturn));
23655  
23656 -static int make_backups;
23657 -static int backup_if_mismatch;
23658 +static bool make_backups;
23659 +static bool backup_if_mismatch;
23660  static char const *version_control;
23661  static char const *version_control_context;
23662 -static int remove_empty_files;
23663 +static bool remove_empty_files;
23664  
23665 -/* TRUE if -R was specified on command line.  */
23666 -static int reverse_flag_specified;
23667 +/* true if -R was specified on command line.  */
23668 +static bool reverse_flag_specified;
23669  
23670  /* how many input lines have been irretractably output */
23671  static LINENUM last_frozen_line;
23672  
23673  static char const *do_defines; /* symbol to patch using ifdef, ifndef, etc. */
23674  static char const if_defined[] = "\n#ifdef %s\n";
23675 -static char const not_defined[] = "#ifndef %s\n";
23676 +static char const not_defined[] = "\n#ifndef %s\n";
23677  static char const else_defined[] = "\n#else\n";
23678 -static char const end_defined[] = "\n#endif /* %s */\n";
23679 +static char const end_defined[] = "\n#endif\n";
23680  
23681  static int Argc;
23682  static char * const *Argv;
23683 @@ -107,20 +109,18 @@
23684  
23685  static char serrbuf[BUFSIZ];
23686  
23687 -char const program_name[] = "patch";
23688 -
23689  /* Apply a set of diffs as appropriate. */
23690  
23691 -int main PARAMS ((int, char **));
23692 -
23693  int
23694  main (int argc, char **argv)
23695  {
23696      char const *val;
23697 -    bool somefailed = FALSE;
23698 +    bool somefailed = false;
23699      struct outstate outstate;
23700      char numbuf[LINENUM_LENGTH_BOUND + 1];
23701  
23702 +    xalloc_exit_failure = 2;
23703 +    program_name = argv[0];
23704      init_time ();
23705  
23706      setbuf(stderr, serrbuf);
23707 @@ -141,12 +141,11 @@
23708      posixly_correct = getenv ("POSIXLY_CORRECT") != 0;
23709      backup_if_mismatch = ! posixly_correct;
23710      patch_get = ((val = getenv ("PATCH_GET"))
23711 -                ? numeric_string (val, 1, "PATCH_GET value")
23712 +                ? numeric_string (val, true, "PATCH_GET value")
23713                  : posixly_correct - 1);
23714  
23715      val = getenv ("SIMPLE_BACKUP_SUFFIX");
23716 -    if (val && *val)
23717 -      simple_backup_suffix = val;
23718 +    simple_backup_suffix = val && *val ? val : ".orig";
23719  
23720      if ((version_control = getenv ("PATCH_VERSION_CONTROL")))
23721        version_control_context = "$PATCH_VERSION_CONTROL";
23722 @@ -171,7 +170,7 @@
23723      init_output (outfile, 0, &outstate);
23724  
23725      /* Make sure we clean up in case of disaster.  */
23726 -    set_signals(0);
23727 +    set_signals (false);
23728  
23729      for (
23730         open_patch_file (patchname);
23731 @@ -180,28 +179,26 @@
23732      ) {                                        /* for each patch in patch file */
23733        int hunk = 0;
23734        int failed = 0;
23735 -      int mismatch = 0;
23736 +      bool mismatch = false;
23737        char *outname = outfile ? outfile : inname;
23738  
23739        if (!skip_rest_of_patch)
23740         get_input_file (inname, outname);
23741  
23742        if (diff_type == ED_DIFF) {
23743 -       outstate.zero_output = 0;
23744 -       if (! dry_run)
23745 +       outstate.zero_output = false;
23746 +       somefailed |= skip_rest_of_patch;
23747 +       do_ed_script (outstate.ofp);
23748 +       if (! dry_run && ! outfile && ! skip_rest_of_patch)
23749           {
23750 -           do_ed_script (outstate.ofp);
23751 -           if (! outfile)
23752 -             {
23753 -               struct stat statbuf;
23754 -               if (stat (TMPOUTNAME, &statbuf) != 0)
23755 -                 pfatal ("%s", TMPOUTNAME);
23756 -               outstate.zero_output = statbuf.st_size == 0;
23757 -             }
23758 +           struct stat statbuf;
23759 +           if (stat (TMPOUTNAME, &statbuf) != 0)
23760 +             pfatal ("%s", TMPOUTNAME);
23761 +           outstate.zero_output = statbuf.st_size == 0;
23762           }
23763        } else {
23764         int got_hunk;
23765 -       int apply_anyway = 0;
23766 +       bool apply_anyway = false;
23767  
23768         /* initialize the patched file */
23769         if (! skip_rest_of_patch && ! outfile)
23770 @@ -236,7 +233,7 @@
23771                 do {
23772                     where = locate_hunk(fuzz);
23773                     if (! where || fuzz || last_offset)
23774 -                     mismatch = 1;
23775 +                     mismatch = true;
23776                     if (hunk == 1 && ! where && ! (force | apply_anyway)
23777                         && reverse == reverse_flag_specified) {
23778                                                 /* dwim for reversed patch? */
23779 @@ -253,7 +250,7 @@
23780                                  (reverse
23781                                   ? "Unreversed"
23782                                   : "Reversed (or previously applied)"))))
23783 -                         reverse ^= 1;
23784 +                         reverse = ! reverse;
23785                         else
23786                           {
23787                             /* Put it back to normal.  */
23788 @@ -261,7 +258,7 @@
23789                               fatal ("lost hunk on alloc error!");
23790                             if (where)
23791                               {
23792 -                               apply_anyway = 1;
23793 +                               apply_anyway = true;
23794                                 fuzz--; /* Undo `++fuzz' below.  */
23795                                 where = 0;
23796                               }
23797 @@ -344,7 +341,7 @@
23798             if (! spew_output (&outstate))
23799               {
23800                 say ("Skipping patch.\n");
23801 -               skip_rest_of_patch = TRUE;
23802 +               skip_rest_of_patch = true;
23803               }
23804           }
23805        }
23806 @@ -354,7 +351,7 @@
23807        if (! skip_rest_of_patch && ! outfile) {
23808           if (outstate.zero_output
23809               && (remove_empty_files
23810 -                 || (pch_says_nonexistent (reverse ^ 1) == 2
23811 +                 || (pch_says_nonexistent (! reverse) == 2
23812                       && ! posixly_correct)))
23813             {
23814               if (verbosity == VERBOSE)
23815 @@ -371,9 +368,9 @@
23816           else
23817             {
23818               if (! outstate.zero_output
23819 -                 && pch_says_nonexistent (reverse ^ 1))
23820 +                 && pch_says_nonexistent (! reverse))
23821                 {
23822 -                 mismatch = 1;
23823 +                 mismatch = true;
23824                   if (verbosity != SILENT)
23825                     say ("File %s is not empty after patch, as expected\n",
23826                          quotearg (outname));
23827 @@ -389,7 +386,7 @@
23828                               || (backup_if_mismatch && (mismatch | failed))));
23829  
23830                   if ((set_time | set_utc)
23831 -                     && (t = pch_timestamp (reverse ^ 1)) != (time_t) -1)
23832 +                     && (t = pch_timestamp (! reverse)) != (time_t) -1)
23833                     {
23834                       struct utimbuf utimbuf;
23835                       utimbuf.actime = utimbuf.modtime = t;
23836 @@ -418,7 +415,7 @@
23837         if (fclose (rejfp) != 0)
23838             write_fatal ();
23839         if (failed) {
23840 -           somefailed = TRUE;
23841 +           somefailed = true;
23842             say ("%d out of %d hunk%s %s", failed, hunk, "s" + (hunk == 1),
23843                  skip_rest_of_patch ? "ignored" : "FAILED");
23844             if (outname) {
23845 @@ -432,7 +429,7 @@
23846                 if (! dry_run)
23847                   {
23848                     move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
23849 -                              rej, instat.st_mode, FALSE);
23850 +                              rej, instat.st_mode, false);
23851                     if (! inerrno
23852                         && (chmod (rej, (instat.st_mode
23853                                          & ~(S_IXUSR|S_IXGRP|S_IXOTH)))
23854 @@ -446,7 +443,7 @@
23855             say ("\n");
23856         }
23857        }
23858 -      set_signals (1);
23859 +      set_signals (true);
23860      }
23861      if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
23862        write_fatal ();
23863 @@ -482,7 +479,7 @@
23864      }
23865  
23866      reverse = reverse_flag_specified;
23867 -    skip_rest_of_patch = FALSE;
23868 +    skip_rest_of_patch = false;
23869  }
23870  
23871  static char const shortopts[] = "bB:cd:D:eEfF:g:i:lnNo:p:r:RstTuvV:x:Y:z:Z";
23872 @@ -585,7 +582,7 @@
23873  "  --posix  Conform to the POSIX standard.",
23874  "",
23875  "  -d DIR  --directory=DIR  Change the working directory to DIR first.",
23876 -#if HAVE_SETMODE
23877 +#if HAVE_SETMODE_DOS
23878  "  --binary  Read and write data in binary mode.",
23879  #else
23880  "  --binary  Read and write data in binary mode (no effect on this platform).",
23881 @@ -594,7 +591,7 @@
23882  "  -v  --version  Output version info.",
23883  "  --help  Output this help.",
23884  "",
23885 -"Report bugs to <bug-gnu-utils@gnu.org>.",
23886 +"Report bugs to <" PACKAGE_BUGREPORT ">.",
23887  0
23888  };
23889  
23890 @@ -635,7 +632,7 @@
23891            != -1) {
23892         switch (optc) {
23893             case 'b':
23894 -               make_backups = 1;
23895 +               make_backups = true;
23896                  /* Special hack for backward compatibility with CVS 1.9.
23897                     If the last 4 args are `-b SUFFIX ORIGFILE PATCHFILE',
23898                     treat `-b' as if it were `-b -z'.  */
23899 @@ -671,28 +668,28 @@
23900                 diff_type = ED_DIFF;
23901                 break;
23902             case 'E':
23903 -               remove_empty_files = TRUE;
23904 +               remove_empty_files = true;
23905                 break;
23906             case 'f':
23907 -               force = TRUE;
23908 +               force = true;
23909                 break;
23910             case 'F':
23911 -               maxfuzz = numeric_string (optarg, 0, "fuzz factor");
23912 +               maxfuzz = numeric_string (optarg, false, "fuzz factor");
23913                 break;
23914             case 'g':
23915 -               patch_get = numeric_string (optarg, 1, "get option value");
23916 +               patch_get = numeric_string (optarg, true, "get option value");
23917                 break;
23918             case 'i':
23919                 patchname = savestr (optarg);
23920                 break;
23921             case 'l':
23922 -               canonicalize = TRUE;
23923 +               canonicalize = true;
23924                 break;
23925             case 'n':
23926                 diff_type = NORMAL_DIFF;
23927                 break;
23928             case 'N':
23929 -               noreverse = TRUE;
23930 +               noreverse = true;
23931                 break;
23932             case 'o':
23933                 if (strcmp (optarg, "-") == 0)
23934 @@ -700,23 +697,23 @@
23935                 outfile = savestr (optarg);
23936                 break;
23937             case 'p':
23938 -               strippath = numeric_string (optarg, 0, "strip count");
23939 +               strippath = numeric_string (optarg, false, "strip count");
23940                 break;
23941             case 'r':
23942                 rejname = savestr (optarg);
23943                 break;
23944             case 'R':
23945 -               reverse = 1;
23946 -               reverse_flag_specified = 1;
23947 +               reverse = true;
23948 +               reverse_flag_specified = true;
23949                 break;
23950             case 's':
23951                 verbosity = SILENT;
23952                 break;
23953             case 't':
23954 -               batch = TRUE;
23955 +               batch = true;
23956                 break;
23957             case 'T':
23958 -               set_time = 1;
23959 +               set_time = true;
23960                 break;
23961             case 'u':
23962                 diff_type = UNI_DIFF;
23963 @@ -731,7 +728,7 @@
23964                 break;
23965  #if DEBUGGING
23966             case 'x':
23967 -               debug = numeric_string (optarg, 1, "debugging option");
23968 +               debug = numeric_string (optarg, true, "debugging option");
23969                 break;
23970  #endif
23971             case 'Y':
23972 @@ -746,29 +743,29 @@
23973                 simple_backup_suffix = savestr (optarg);
23974                 break;
23975             case 'Z':
23976 -               set_utc = 1;
23977 +               set_utc = true;
23978                 break;
23979             case CHAR_MAX + 1:
23980 -               dry_run = TRUE;
23981 +               dry_run = true;
23982                 break;
23983             case CHAR_MAX + 2:
23984                 verbosity = VERBOSE;
23985                 break;
23986             case CHAR_MAX + 3:
23987 -#if HAVE_SETMODE
23988 +#if HAVE_SETMODE_DOS
23989                 binary_transput = O_BINARY;
23990  #endif
23991                 break;
23992             case CHAR_MAX + 4:
23993                 usage (stdout, 0);
23994             case CHAR_MAX + 5:
23995 -               backup_if_mismatch = 1;
23996 +               backup_if_mismatch = true;
23997                 break;
23998             case CHAR_MAX + 6:
23999 -               backup_if_mismatch = 0;
24000 +               backup_if_mismatch = false;
24001                 break;
24002             case CHAR_MAX + 7:
24003 -               posixly_correct = 1;
24004 +               posixly_correct = true;
24005                 break;
24006             case CHAR_MAX + 8:
24007                 {
24008 @@ -810,7 +807,7 @@
24009     returning the result.  */
24010  static int
24011  numeric_string (char const *string,
24012 -               int negative_allowed,
24013 +               bool negative_allowed,
24014                 char const *argtype_msgid)
24015  {
24016    int value = 0;
24017 @@ -884,7 +881,7 @@
24018             && offset <= max_pos_offset
24019             && patch_match (first_guess, offset, (LINENUM) 0, suffix_fuzz))
24020           {
24021 -           last_offset = offset;
24022 +           last_offset += offset;
24023             return first_guess + offset;
24024           }
24025         else
24026 @@ -898,7 +895,7 @@
24027         if (offset <= max_neg_offset
24028             && patch_match (first_guess, -offset, prefix_fuzz, (LINENUM) 0))
24029           {
24030 -           last_offset = - offset;
24031 +           last_offset -= offset;
24032             return first_guess - offset;
24033           }
24034         else
24035 @@ -913,8 +910,8 @@
24036             if (debug & 1)
24037               say ("Offset changing from %s to %s\n",
24038                    format_linenum (numbuf0, last_offset),
24039 -                  format_linenum (numbuf1, offset));
24040 -           last_offset = offset;
24041 +                  format_linenum (numbuf1, last_offset + offset));
24042 +           last_offset += offset;
24043             return first_guess+offset;
24044         }
24045         if (0 < offset && offset <= max_neg_offset
24046 @@ -922,8 +919,8 @@
24047             if (debug & 1)
24048               say ("Offset changing from %s to %s\n",
24049                    format_linenum (numbuf0, last_offset),
24050 -                  format_linenum (numbuf1, -offset));
24051 -           last_offset = -offset;
24052 +                  format_linenum (numbuf1, last_offset - offset));
24053 +           last_offset -= offset;
24054             return first_guess-offset;
24055         }
24056      }
24057 @@ -1009,10 +1006,10 @@
24058         if (pch_char(old) == '-') {
24059             assert (outstate->after_newline);
24060             if (! copy_till (outstate, where + old - 1))
24061 -               return FALSE;
24062 +               return false;
24063             if (R_do_defines) {
24064                 if (def_state == OUTSIDE) {
24065 -                   fprintf (fp, outstate->after_newline + if_defined,
24066 +                   fprintf (fp, outstate->after_newline + not_defined,
24067                              R_do_defines);
24068                     def_state = IN_IFNDEF;
24069                 }
24070 @@ -1023,7 +1020,7 @@
24071                 if (ferror (fp))
24072                   write_fatal ();
24073                 outstate->after_newline = pch_write_line (old, fp);
24074 -               outstate->zero_output = 0;
24075 +               outstate->zero_output = false;
24076             }
24077             last_frozen_line++;
24078             old++;
24079 @@ -1033,7 +1030,7 @@
24080         }
24081         else if (pch_char(new) == '+') {
24082             if (! copy_till (outstate, where + old - 1))
24083 -               return FALSE;
24084 +               return false;
24085             if (R_do_defines) {
24086                 if (def_state == IN_IFNDEF) {
24087                     fprintf (fp, outstate->after_newline + else_defined);
24088 @@ -1048,7 +1045,7 @@
24089                   write_fatal ();
24090             }
24091             outstate->after_newline = pch_write_line (new, fp);
24092 -           outstate->zero_output = 0;
24093 +           outstate->zero_output = false;
24094             new++;
24095         }
24096         else if (pch_char(new) != pch_char(old)) {
24097 @@ -1064,10 +1061,10 @@
24098         else if (pch_char(new) == '!') {
24099             assert (outstate->after_newline);
24100             if (! copy_till (outstate, where + old - 1))
24101 -               return FALSE;
24102 +               return false;
24103             assert (outstate->after_newline);
24104             if (R_do_defines) {
24105 -              fprintf (fp, not_defined, R_do_defines);
24106 +              fprintf (fp, 1 + not_defined, R_do_defines);
24107                if (ferror (fp))
24108                 write_fatal ();
24109                def_state = IN_IFNDEF;
24110 @@ -1096,25 +1093,24 @@
24111                 new++;
24112               }
24113             while (pch_char (new) == '!');
24114 -           outstate->zero_output = 0;
24115 +           outstate->zero_output = false;
24116         }
24117         else {
24118             assert(pch_char(new) == ' ');
24119             old++;
24120             new++;
24121             if (R_do_defines && def_state != OUTSIDE) {
24122 -               fprintf (fp, outstate->after_newline + end_defined,
24123 -                        R_do_defines);
24124 +               fprintf (fp, outstate->after_newline + end_defined);
24125                 if (ferror (fp))
24126                   write_fatal ();
24127 -               outstate->after_newline = 1;
24128 +               outstate->after_newline = true;
24129                 def_state = OUTSIDE;
24130             }
24131         }
24132      }
24133      if (new <= pat_end && pch_char(new) == '+') {
24134         if (! copy_till (outstate, where + old - 1))
24135 -           return FALSE;
24136 +           return false;
24137         if (R_do_defines) {
24138             if (def_state == OUTSIDE) {
24139                 fprintf (fp, outstate->after_newline + if_defined,
24140 @@ -1127,7 +1123,7 @@
24141             }
24142             if (ferror (fp))
24143               write_fatal ();
24144 -           outstate->zero_output = 0;
24145 +           outstate->zero_output = false;
24146         }
24147  
24148         do
24149 @@ -1135,18 +1131,18 @@
24150             if (! outstate->after_newline  &&  putc ('\n', fp) == EOF)
24151               write_fatal ();
24152             outstate->after_newline = pch_write_line (new, fp);
24153 -           outstate->zero_output = 0;
24154 +           outstate->zero_output = false;
24155             new++;
24156           }
24157         while (new <= pat_end && pch_char (new) == '+');
24158      }
24159      if (R_do_defines && def_state != OUTSIDE) {
24160 -       fprintf (fp, outstate->after_newline + end_defined, R_do_defines);
24161 +       fprintf (fp, outstate->after_newline + end_defined);
24162         if (ferror (fp))
24163           write_fatal ();
24164 -       outstate->after_newline = 1;
24165 +       outstate->after_newline = true;
24166      }
24167 -    return TRUE;
24168 +    return true;
24169  }
24170  
24171  /* Create an output file.  */
24172 @@ -1168,8 +1164,8 @@
24173  init_output (char const *name, int open_flags, struct outstate *outstate)
24174  {
24175    outstate->ofp = name ? create_output_file (name, open_flags) : (FILE *) 0;
24176 -  outstate->after_newline = 1;
24177 -  outstate->zero_output = 1;
24178 +  outstate->after_newline = true;
24179 +  outstate->zero_output = true;
24180  }
24181  
24182  /* Open a file to put hunks we can't locate. */
24183 @@ -1195,22 +1191,22 @@
24184      if (R_last_frozen_line > lastline)
24185        {
24186         say ("misordered hunks! output would be garbled\n");
24187 -       return FALSE;
24188 +       return false;
24189        }
24190      while (R_last_frozen_line < lastline)
24191        {
24192 -       s = ifetch (++R_last_frozen_line, 0, &size);
24193 +       s = ifetch (++R_last_frozen_line, false, &size);
24194         if (size)
24195           {
24196             if ((! outstate->after_newline  &&  putc ('\n', fp) == EOF)
24197                 || ! fwrite (s, sizeof *s, size, fp))
24198               write_fatal ();
24199             outstate->after_newline = s[size - 1] == '\n';
24200 -           outstate->zero_output = 0;
24201 +           outstate->zero_output = false;
24202           }
24203        }
24204      last_frozen_line = R_last_frozen_line;
24205 -    return TRUE;
24206 +    return true;
24207  }
24208  
24209  /* Finish copying the input file to the output file. */
24210 @@ -1229,7 +1225,7 @@
24211  
24212      if (last_frozen_line < input_lines)
24213        if (! copy_till (outstate, input_lines))
24214 -       return FALSE;
24215 +       return false;
24216  
24217      if (outstate->ofp && ! outfile)
24218        {
24219 @@ -1238,7 +1234,7 @@
24220         outstate->ofp = 0;
24221        }
24222  
24223 -    return TRUE;
24224 +    return true;
24225  }
24226  
24227  /* Does the patch pattern match at line base+offset? */
24228 @@ -1259,13 +1255,13 @@
24229             if (!similar(p, size,
24230                          pfetch(pline),
24231                          pch_line_len(pline) ))
24232 -               return FALSE;
24233 +               return false;
24234         }
24235         else if (size != pch_line_len (pline)
24236                  || memcmp (p, pfetch (pline), size) != 0)
24237 -           return FALSE;
24238 +           return false;
24239      }
24240 -    return TRUE;
24241 +    return true;
24242  }
24243  
24244  /* Do two lines match with canonicalized white space? */
24245 @@ -1287,7 +1283,7 @@
24246           if (alen)
24247             {
24248               if (!(*a == ' ' || *a == '\t'))
24249 -               return FALSE;
24250 +               return false;
24251               do a++, alen--;
24252               while (alen && (*a == ' ' || *a == '\t'));
24253             }
24254 @@ -1295,7 +1291,7 @@
24255             return alen == blen;
24256         }
24257        else if (!alen || *a++ != *b++)
24258 -       return FALSE;
24259 +       return false;
24260        else
24261         alen--, blen--;
24262      }
24263 @@ -1303,8 +1299,8 @@
24264  
24265  /* Make a temporary file.  */
24266  
24267 -#if HAVE_MKTEMP
24268 -char *mktemp PARAMS ((char *));
24269 +#if HAVE_MKTEMP && ! HAVE_DECL_MKTEMP && ! defined mktemp
24270 +char *mktemp (char *);
24271  #endif
24272  
24273  #ifndef TMPDIR
24274 @@ -1312,7 +1308,7 @@
24275  #endif
24276  
24277  static char const *
24278 -make_temp (int letter)
24279 +make_temp (char letter)
24280  {
24281    char *r;
24282  #if HAVE_MKTEMP
24283 @@ -1322,7 +1318,14 @@
24284    if (!tmpdir) tmpdir = TMPDIR;
24285    r = xmalloc (strlen (tmpdir) + 10);
24286    sprintf (r, "%s/p%cXXXXXX", tmpdir, letter);
24287 +
24288 +  /* It is OK to use mktemp here, since the rest of the code always
24289 +     opens temp files with O_EXCL.  It might be better to use mkstemp
24290 +     to avoid some DoS problems, but simply substituting mkstemp for
24291 +     mktemp here will not fix the DoS problems; a more extensive
24292 +     change would be needed.  */
24293    mktemp (r);
24294 +
24295    if (!*r)
24296      pfatal ("mktemp");
24297  #else
24298 diff -urNd -urNd patch-2.5.4/patchlevel.h patch-2.5.9/patchlevel.h
24299 --- patch-2.5.4/patchlevel.h    1999-08-30 02:48:14.000000000 -0400
24300 +++ patch-2.5.9/patchlevel.h    1969-12-31 19:00:00.000000000 -0500
24301 @@ -1 +0,0 @@
24302 -#define PATCH_VERSION "2.5.4"
24303 diff -urNd -urNd patch-2.5.4/patch.man patch-2.5.9/patch.man
24304 --- patch-2.5.4/patch.man       1998-03-21 10:48:43.000000000 -0500
24305 +++ patch-2.5.9/patch.man       2002-05-25 06:36:44.000000000 -0400
24306 @@ -2,7 +2,7 @@
24307  .de Id
24308  .ds Dt \\$4
24309  ..
24310 -.Id $Id: patch.man,v 1.26 1998/03/21 15:48:43 eggert Exp $
24311 +.Id $Id: patch.man,v 1.31 2002/05/25 10:36:44 eggert Exp $
24312  .ds = \-\^\-
24313  .de Sp
24314  .if t .sp .3
24315 @@ -70,6 +70,10 @@
24316  or is encapsulated one or more times by prepending
24317  "\fB\- \fP" to lines starting with "\fB\-\fP" as specified by Internet RFC 934,
24318  this is taken into account.
24319 +After removing indenting or encapsulation,
24320 +lines beginning with
24321 +.B #
24322 +are ignored, as they are considered to be comments.
24323  .PP
24324  With context diffs, and to a lesser extent with normal diffs,
24325  .B patch
24326 @@ -185,19 +189,19 @@
24327  .B " \(bu"
24328  If
24329  .B patch
24330 -is not ignoring \s-1RCS\s0, ClearCase, and \s-1SCCS\s0 (see the
24331 +is not ignoring \s-1RCS\s0, ClearCase, Perforce, and \s-1SCCS\s0 (see the
24332  .BI "\-g\ " num
24333  or
24334  .BI \*=get= num
24335  option), and no named files exist
24336 -but an \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master is found,
24337 +but an \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master is found,
24338  .B patch
24339  selects the first named file
24340 -with an \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master.
24341 +with an \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master.
24342  .TP
24343  .B " \(bu"
24344  If no named files exist,
24345 -no \s-1RCS\s0, ClearCase, or \s-1SCCS\s0 master was found,
24346 +no \s-1RCS\s0, ClearCase, Perforce, or \s-1SCCS\s0 master was found,
24347  some names are given,
24348  .B patch
24349  is not conforming to \s-1POSIX\s0,
24350 @@ -362,14 +366,14 @@
24351  .BR patch 's
24352  actions when a file is under \s-1RCS\s0 or \s-1SCCS\s0 control,
24353  and does not exist or is read-only and matches the default version,
24354 -or when a file is under ClearCase control and does not exist.
24355 +or when a file is under ClearCase or Perforce control and does not exist.
24356  If
24357  .I num
24358  is positive,
24359  .B patch
24360  gets (or checks out) the file from the revision control system; if zero,
24361  .B patch
24362 -ignores \s-1RCS\s0, ClearCase, and \s-1SCCS\s0
24363 +ignores \s-1RCS\s0, ClearCase, Perforce, and \s-1SCCS\s0
24364  and does not get the file; and if negative,
24365  .B patch
24366  asks the user whether to get the file.
24367 @@ -411,6 +415,9 @@
24368  Send output to
24369  .I outfile
24370  instead of patching files in place.
24371 +Do not use this option if
24372 +.I outfile
24373 +is one of the files to be patched.
24374  .TP
24375  \fB\-p\fP\fInum\fP  or  \fB\*=strip\fP\fB=\fP\fInum\fP
24376  Strip the smallest prefix containing
24377 @@ -458,7 +465,8 @@
24378  Do not remove files that are empty after patching.
24379  .TP
24380  .B " \(bu"
24381 -Do not ask whether to get files from \s-1RCS\s0, ClearCase, or \s-1SCCS\s0.
24382 +Do not ask whether to get files from \s-1RCS\s0, ClearCase, Perforce,
24383 +or \s-1SCCS\s0.
24384  .TP
24385  .B " \(bu"
24386  Require that all options precede the files in the command line.
24387 @@ -715,7 +723,8 @@
24388  .B PATCH_GET
24389  This specifies whether
24390  .B patch
24391 -gets missing or read-only files from \s-1RCS\s0, ClearCase, or \s-1SCCS\s0
24392 +gets missing or read-only files from \s-1RCS\s0, ClearCase, Perforce,
24393 +or \s-1SCCS\s0
24394  by default; see the
24395  .B \-g
24396  or
24397 @@ -1097,7 +1106,7 @@
24398  .fi
24399  .SH BUGS
24400  Please report bugs via email to
24401 -.BR <bug-gnu-utils@gnu.org> .
24402 +.BR <bug-patch@gnu.org> .
24403  .PP
24404  .B patch
24405  could be smarter about partial matches, excessively deviant offsets and
24406 @@ -1115,13 +1124,15 @@
24407  This could be construed as a feature.
24408  .SH COPYING
24409  Copyright
24410 -.if t \(co
24411 +.ie t \(co
24412 +.el (C)
24413  1984, 1985, 1986, 1988 Larry Wall.
24414  .br
24415  Copyright
24416 -.if t \(co
24417 -1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
24418 -Free Software Foundation, Inc.
24419 +.ie t \(co
24420 +.el (C)
24421 +1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
24422 +2000, 2001, 2002 Free Software Foundation, Inc.
24423  .PP
24424  Permission is granted to make and distribute verbatim copies of
24425  this manual provided the copyright notice and this permission notice
24426 diff -urNd -urNd patch-2.5.4/pch.c patch-2.5.9/pch.c
24427 --- patch-2.5.4/pch.c   1999-08-30 02:20:08.000000000 -0400
24428 +++ patch-2.5.9/pch.c   2003-05-20 10:03:17.000000000 -0400
24429 @@ -1,9 +1,11 @@
24430  /* reading patches */
24431  
24432 -/* $Id: pch.c,v 1.29 1999/08/30 06:20:08 eggert Exp $ */
24433 +/* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
24434  
24435 -/* Copyright 1986, 1987, 1988 Larry Wall
24436 -   Copyright 1990, 1991-1993, 1997-1998, 1999 Free Software Foundation, Inc.
24437 +/* Copyright (C) 1986, 1987, 1988 Larry Wall
24438 +
24439 +   Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
24440 +   2002, 2003 Free Software Foundation, Inc.
24441  
24442     This program is free software; you can redistribute it and/or modify
24443     it under the terms of the GNU General Public License as published by
24444 @@ -23,7 +25,7 @@
24445  #define XTERN extern
24446  #include <common.h>
24447  #include <backupfile.h>
24448 -#include <basename.h>
24449 +#include <dirname.h>
24450  #include <inp.h>
24451  #include <quotearg.h>
24452  #include <util.h>
24453 @@ -57,7 +59,8 @@
24454  static char *p_Char;                   /* +, -, and ! */
24455  static LINENUM hunkmax = INITHUNKMAX;  /* size of above arrays */
24456  static int p_indent;                   /* indent to patch */
24457 -static int p_strip_trailing_cr;                /* nonzero if stripping trailing \r */
24458 +static bool p_strip_trailing_cr;       /* true if stripping trailing \r */
24459 +static bool p_pass_comments_through;   /* true if not ignoring # lines */
24460  static file_offset p_base;             /* where to intuit this time */
24461  static LINENUM p_bline;                        /* line # of p_base */
24462  static file_offset p_start;            /* where intuit found a patch */
24463 @@ -68,17 +71,18 @@
24464  
24465  enum nametype { OLD, NEW, INDEX, NONE };
24466  
24467 -static char *scan_linenum PARAMS ((char *, LINENUM *));
24468 -static enum diff intuit_diff_type PARAMS ((void));
24469 -static enum nametype best_name PARAMS ((char * const *, int const *));
24470 -static int prefix_components PARAMS ((char *, int));
24471 -static size_t pget_line PARAMS ((int, int, int));
24472 -static size_t get_line PARAMS ((void));
24473 -static bool incomplete_line PARAMS ((void));
24474 -static bool grow_hunkmax PARAMS ((void));
24475 -static void malformed PARAMS ((void)) __attribute__ ((noreturn));
24476 -static void next_intuit_at PARAMS ((file_offset, LINENUM));
24477 -static void skip_to PARAMS ((file_offset, LINENUM));
24478 +static char *scan_linenum (char *, LINENUM *);
24479 +static enum diff intuit_diff_type (void);
24480 +static enum nametype best_name (char * const *, int const *);
24481 +static int prefix_components (char *, bool);
24482 +static size_t pget_line (int, int, bool, bool);
24483 +static size_t get_line (void);
24484 +static bool incomplete_line (void);
24485 +static bool grow_hunkmax (void);
24486 +static void malformed (void) __attribute__ ((noreturn));
24487 +static void next_intuit_at (file_offset, LINENUM);
24488 +static void skip_to (file_offset, LINENUM);
24489 +static char get_ed_command_letter (char const *);
24490  
24491  /* Prepare to look for the next patch in the patch file. */
24492  
24493 @@ -92,7 +96,7 @@
24494      p_end = -1;
24495      p_max = 0;
24496      p_indent = 0;
24497 -    p_strip_trailing_cr = 0;
24498 +    p_strip_trailing_cr = false;
24499  }
24500  
24501  /* Open the patch file at the beginning of time. */
24502 @@ -105,7 +109,7 @@
24503      if (!filename || !*filename || strEQ (filename, "-"))
24504        {
24505         file_offset stdin_pos;
24506 -#if HAVE_SETMODE
24507 +#if HAVE_SETMODE_DOS
24508         if (binary_transput)
24509           {
24510             if (isatty (STDIN_FILENO))
24511 @@ -181,14 +185,14 @@
24512      if ((p_line = (char **) realloc (p_line, hunkmax * sizeof (*p_line)))
24513         && (p_len = (size_t *) realloc (p_len, hunkmax * sizeof (*p_len)))
24514         && (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char))))
24515 -      return TRUE;
24516 +      return true;
24517      if (!using_plan_a)
24518        memory_fatal ();
24519      /* Don't free previous values of p_line etc.,
24520         since some broken implementations free them for us.
24521         Whatever is null will be allocated again from within plan_a (),
24522         of all places.  */
24523 -    return FALSE;
24524 +    return false;
24525  }
24526  
24527  /* True if the remainder of the patch file contains a diff of some sort. */
24528 @@ -199,7 +203,7 @@
24529      if (p_base != 0 && p_base >= p_filesize) {
24530         if (verbosity == VERBOSE)
24531             say ("done\n");
24532 -       return FALSE;
24533 +       return false;
24534      }
24535      if (verbosity == VERBOSE)
24536         say ("Hmm...");
24537 @@ -211,13 +215,13 @@
24538                : "  I can't seem to find a patch in there anywhere.\n");
24539         if (! p_base && p_filesize)
24540           fatal ("Only garbage was found in the patch input.");
24541 -       return FALSE;
24542 +       return false;
24543      }
24544      if (skip_rest_of_patch)
24545        {
24546         Fseek (pfp, p_start, SEEK_SET);
24547         p_input_line = p_sline - 1;
24548 -       return TRUE;
24549 +       return true;
24550        }
24551      if (verbosity == VERBOSE)
24552         say ("  %sooks like %s to me...\n",
24553 @@ -239,18 +243,19 @@
24554             char numbuf[LINENUM_LENGTH_BOUND + 1];
24555             say ("can't find file to patch at input line %s\n",
24556                  format_linenum (numbuf, p_sline));
24557 -           say (strippath == -1
24558 -                ? "Perhaps you should have used the -p or --strip option?\n"
24559 -                : "Perhaps you used the wrong -p or --strip option?\n");
24560 +           if (diff_type != ED_DIFF)
24561 +             say (strippath == -1
24562 +                  ? "Perhaps you should have used the -p or --strip option?\n"
24563 +                  : "Perhaps you used the wrong -p or --strip option?\n");
24564           }
24565        }
24566  
24567      skip_to(p_start,p_sline);
24568      while (!inname) {
24569 -       if (force || batch) {
24570 +       if (force | batch) {
24571             say ("No file to patch.  Skipping patch.\n");
24572 -           skip_rest_of_patch = TRUE;
24573 -           return TRUE;
24574 +           skip_rest_of_patch = true;
24575 +           return true;
24576         }
24577         ask ("File to patch: ");
24578         inname = fetchname (buf, 0, (time_t *) 0);
24579 @@ -264,6 +269,7 @@
24580             else
24581               {
24582                 perror (inname);
24583 +               fflush (stderr);
24584                 free (inname);
24585                 inname = 0;
24586               }
24587 @@ -273,12 +279,12 @@
24588             if (*buf != 'n') {
24589                 if (verbosity != SILENT)
24590                     say ("Skipping patch.\n");
24591 -               skip_rest_of_patch = TRUE;
24592 -               return TRUE;
24593 +               skip_rest_of_patch = true;
24594 +               return true;
24595             }
24596         }
24597      }
24598 -    return TRUE;
24599 +    return true;
24600  }
24601  
24602  /* Determine what kind of diff is in the remaining part of the patch file. */
24603 @@ -288,9 +294,10 @@
24604  {
24605      register file_offset this_line = 0;
24606      register file_offset first_command_line = -1;
24607 +    char first_ed_command_letter = 0;
24608      LINENUM fcl_line = 0; /* Pacify `gcc -W'.  */
24609 -    register bool this_is_a_command = FALSE;
24610 -    register bool stars_this_line = FALSE;
24611 +    register bool this_is_a_command = false;
24612 +    register bool stars_this_line = false;
24613      enum nametype i;
24614      char *name[3];
24615      struct stat st[3];
24616 @@ -314,15 +321,16 @@
24617         register bool last_line_was_command = this_is_a_command;
24618         register bool stars_last_line = stars_this_line;
24619         register int indent = 0;
24620 -       int strip_trailing_cr;
24621 +       char ed_command_letter;
24622 +       bool strip_trailing_cr;
24623         size_t chars_read;
24624  
24625         this_line = file_tell (pfp);
24626 -       chars_read = pget_line (0, 0, 0);
24627 +       chars_read = pget_line (0, 0, false, false);
24628         if (chars_read == (size_t) -1)
24629           memory_fatal ();
24630         if (! chars_read) {
24631 -           if (first_command_line >= 0) {
24632 +           if (first_ed_command_letter) {
24633                                         /* nothing but deletes!? */
24634                 p_start = first_command_line;
24635                 p_sline = fcl_line;
24636 @@ -346,8 +354,11 @@
24637           continue;
24638         this_is_a_command = (ISDIGIT (*s) &&
24639           (*t == 'd' || *t == 'c' || *t == 'a') );
24640 -       if (first_command_line < 0 && this_is_a_command) {
24641 +       if (first_command_line < 0
24642 +           && ((ed_command_letter = get_ed_command_letter (s))
24643 +               || this_is_a_command)) {
24644             first_command_line = this_line;
24645 +           first_ed_command_letter = ed_command_letter;
24646             fcl_line = p_input_line;
24647             p_indent = indent;          /* assume this for now */
24648             p_strip_trailing_cr = strip_trailing_cr;
24649 @@ -363,8 +374,20 @@
24650             for (t = s + 7;  ISSPACE ((unsigned char) *t);  t++)
24651               continue;
24652             revision = t;
24653 -           for (t = revision;  *t && !ISSPACE ((unsigned char) *t);  t++)
24654 -             continue;
24655 +           for (t = revision;  *t;  t++)
24656 +             if (ISSPACE ((unsigned char) *t))
24657 +               {
24658 +                 char const *u;
24659 +                 for (u = t + 1;  ISSPACE ((unsigned char) *u);  u++)
24660 +                   continue;
24661 +                 if (*u)
24662 +                   {
24663 +                     char numbuf[LINENUM_LENGTH_BOUND + 1];
24664 +                     say ("Prereq: with multiple words at line %s of patch\n",
24665 +                          format_linenum (numbuf, this_line));
24666 +                   }
24667 +                 break;
24668 +               }
24669             if (t == revision)
24670                 revision = 0;
24671             else {
24672 @@ -391,8 +414,6 @@
24673         if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
24674           first_command_line >= 0 &&
24675           strEQ(s, ".\n") ) {
24676 -           p_indent = indent;
24677 -           p_strip_trailing_cr = strip_trailing_cr;
24678             p_start = first_command_line;
24679             p_sline = fcl_line;
24680             retval = ED_DIFF;
24681 @@ -419,12 +440,12 @@
24682             if (s[0] == '+' && s[1] == '0' && !ISDIGIT (s[2]))
24683               p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
24684             p_indent = indent;
24685 -           p_strip_trailing_cr = strip_trailing_cr;
24686             p_start = this_line;
24687             p_sline = p_input_line;
24688             retval = UNI_DIFF;
24689             if (! ((name[OLD] || ! p_timestamp[OLD])
24690 -                  && (name[NEW] || ! p_timestamp[NEW])))
24691 +                  && (name[NEW] || ! p_timestamp[NEW]))
24692 +               && ! name[INDEX])
24693               {
24694                 char numbuf[LINENUM_LENGTH_BOUND + 1];
24695                 say ("missing header for unified diff at line %s of patch\n",
24696 @@ -457,14 +478,15 @@
24697               LINENUM saved_p_bline = p_bline;
24698               Fseek (pfp, previous_line, SEEK_SET);
24699               p_input_line -= 2;
24700 -             if (another_hunk (retval, 0)
24701 +             if (another_hunk (retval, false)
24702                   && ! p_repl_lines && p_newfirst == 1)
24703                 p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
24704               next_intuit_at (saved_p_base, saved_p_bline);
24705             }
24706  
24707             if (! ((name[OLD] || ! p_timestamp[OLD])
24708 -                  && (name[NEW] || ! p_timestamp[NEW])))
24709 +                  && (name[NEW] || ! p_timestamp[NEW]))
24710 +               && ! name[INDEX])
24711               {
24712                 char numbuf[LINENUM_LENGTH_BOUND + 1];
24713                 say ("missing header for context diff at line %s of patch\n",
24714 @@ -487,7 +509,7 @@
24715    scan_exit:
24716  
24717      /* To intuit `inname', the name of the file to patch,
24718 -       use the algorithm specified by POSIX 1003.2b/D11 section 5.22.7.2
24719 +       use the algorithm specified by POSIX 1003.1-2001 XCU lines 25680-26599
24720         (with some modifications if posixly_correct is zero):
24721  
24722         - Take the old and new names from the context header if present,
24723 @@ -542,7 +564,7 @@
24724  
24725         if (! posixly_correct)
24726           {
24727 -           int is_empty;
24728 +           bool is_empty;
24729  
24730             i = best_name (name, stat_errno);
24731  
24732 @@ -556,7 +578,8 @@
24733                       char const *cs;
24734                       char *getbuf;
24735                       char *diffbuf;
24736 -                     int readonly = outfile && strcmp (outfile, name[i]) != 0;
24737 +                     bool readonly = (outfile
24738 +                                      && strcmp (outfile, name[i]) != 0);
24739  
24740                       if (nope == NONE || strcmp (name[nope], name[i]) != 0)
24741                         {
24742 @@ -566,7 +589,7 @@
24743                           version_controlled[i] = !! cs;
24744                           if (cs)
24745                             {
24746 -                             if (version_get (name[i], cs, 0, readonly,
24747 +                             if (version_get (name[i], cs, false, readonly,
24748                                                getbuf, &st[i]))
24749                                 stat_errno[i] = 0;
24750                               else
24751 @@ -589,7 +612,8 @@
24752             if ((! is_empty) < p_says_nonexistent[reverse ^ is_empty])
24753               {
24754                 assert (i0 != NONE);
24755 -               if (ok_to_reverse
24756 +               reverse ^=
24757 +                 ok_to_reverse
24758                     ("The next patch%s would %s the file %s,\nwhich %s!",
24759                      reverse ? ", when reversed," : "",
24760                      (i == NONE ? "delete"
24761 @@ -598,8 +622,7 @@
24762                      quotearg (name[i == NONE || st[i].st_size == 0 ? i0 : i]),
24763                      (i == NONE ? "does not exist"
24764                       : st[i].st_size == 0 ? "is already empty"
24765 -                     : "already exists")))
24766 -                 reverse ^= 1;
24767 +                     : "already exists"));
24768               }
24769  
24770             if (i == NONE && p_says_nonexistent[reverse])
24771 @@ -611,8 +634,8 @@
24772                 for (i = OLD;  i <= INDEX;  i++)
24773                   if (name[i])
24774                     {
24775 -                     newdirs[i] = (prefix_components (name[i], 0)
24776 -                                   - prefix_components (name[i], 1));
24777 +                     newdirs[i] = (prefix_components (name[i], false)
24778 +                                   - prefix_components (name[i], true));
24779                       if (newdirs[i] < newdirs_min)
24780                         newdirs_min = newdirs[i];
24781                     }
24782 @@ -645,9 +668,9 @@
24783  }
24784  
24785  /* Count the path name components in FILENAME's prefix.
24786 -   If CHECKDIRS is nonzero, count only existing directories.  */
24787 +   If CHECKDIRS is true, count only existing directories.  */
24788  static int
24789 -prefix_components (char *filename, int checkdirs)
24790 +prefix_components (char *filename, bool checkdirs)
24791  {
24792    int count = 0;
24793    struct stat stat_buf;
24794 @@ -691,7 +714,7 @@
24795      if (name[i] && !ignore[i])
24796        {
24797         /* Take the names with the fewest prefix components.  */
24798 -       components[i] = prefix_components (name[i], 0);
24799 +       components[i] = prefix_components (name[i], false);
24800         if (components_min < components[i])
24801           continue;
24802         components_min = components[i];
24803 @@ -779,7 +802,7 @@
24804  {
24805    char *s;
24806    LINENUM n = 0;
24807 -  int overflow = 0;
24808 +  bool overflow = false;
24809    char numbuf[LINENUM_LENGTH_BOUND + 1];
24810  
24811    for (s = s0;  ISDIGIT (*s);  s++)
24812 @@ -788,11 +811,11 @@
24813        overflow |= new_n / 10 != n;
24814        n = new_n;
24815      }
24816 -  
24817 +
24818    if (s == s0)
24819      fatal ("missing line number at line %s: %s",
24820            format_linenum (numbuf, p_input_line), buf);
24821 -  
24822 +
24823    if (overflow)
24824      fatal ("line number %.*s is too large at line %s: %s",
24825            (int) (s - s0), s0, format_linenum (numbuf, p_input_line), buf);
24826 @@ -805,7 +828,7 @@
24827     0 if not; -1 if ran out of memory. */
24828  
24829  int
24830 -another_hunk (enum diff difftype, int rev)
24831 +another_hunk (enum diff difftype, bool rev)
24832  {
24833      register char *s;
24834      register LINENUM context = 0;
24835 @@ -833,10 +856,11 @@
24836         register LINENUM fillcnt = 0;   /* #lines of missing ptrn or repl */
24837         register LINENUM fillsrc;       /* index of first line to copy */
24838         register LINENUM filldst;       /* index of first missing line */
24839 -       bool ptrn_spaces_eaten = FALSE; /* ptrn was slightly misformed */
24840 -       bool some_context = FALSE;      /* (perhaps internal) context seen */
24841 -       register bool repl_could_be_missing = TRUE;
24842 -       bool repl_missing = FALSE;      /* we are now backtracking */
24843 +       bool ptrn_spaces_eaten = false; /* ptrn was slightly misformed */
24844 +       bool some_context = false;      /* (perhaps internal) context seen */
24845 +       register bool repl_could_be_missing = true;
24846 +       bool ptrn_missing = false;      /* The pattern was missing.  */
24847 +       bool repl_missing = false;      /* Likewise for replacement.  */
24848         file_offset repl_backtrack_position = 0;
24849                                         /* file pos of first repl line */
24850         LINENUM repl_patch_line;        /* input line number for same */
24851 @@ -844,8 +868,8 @@
24852         LINENUM ptrn_prefix_context = -1; /* lines in pattern prefix context */
24853         LINENUM ptrn_suffix_context = -1; /* lines in pattern suffix context */
24854         LINENUM repl_prefix_context = -1; /* lines in replac. prefix context */
24855 -       register LINENUM ptrn_copiable = 0;
24856 -                                       /* # of copiable lines in ptrn */
24857 +       LINENUM ptrn_copiable = 0;      /* # of copiable lines in ptrn */
24858 +       LINENUM repl_copiable = 0;      /* Likewise for replacement.  */
24859  
24860         /* Pacify `gcc -Wall'.  */
24861         fillsrc = filldst = repl_patch_line = repl_context = 0;
24862 @@ -864,7 +888,7 @@
24863               return -1;
24864             if (!chars_read) {
24865                 if (repl_beginning && repl_could_be_missing) {
24866 -                   repl_missing = TRUE;
24867 +                   repl_missing = true;
24868                     goto hunk_done;
24869                 }
24870                 if (p_max - p_end < 4) {
24871 @@ -887,7 +911,7 @@
24872             case '*':
24873                 if (strnEQ(buf, "********", 8)) {
24874                     if (repl_beginning && repl_could_be_missing) {
24875 -                       repl_missing = TRUE;
24876 +                       repl_missing = true;
24877                         goto hunk_done;
24878                     }
24879                     else
24880 @@ -896,7 +920,7 @@
24881                 }
24882                 if (p_end != 0) {
24883                     if (repl_beginning && repl_could_be_missing) {
24884 -                       repl_missing = TRUE;
24885 +                       repl_missing = true;
24886                         goto hunk_done;
24887                     }
24888                     fatal ("unexpected `***' at line %s: %s",
24889 @@ -945,6 +969,7 @@
24890                       {
24891                         /* `Old' lines were omitted.  Set up to fill
24892                            them in from `new' context lines.  */
24893 +                       ptrn_missing = true;
24894                         p_end = p_ptrn_lines + 1;
24895                         ptrn_prefix_context = ptrn_suffix_context = -1;
24896                         fillsrc = p_end + 1;
24897 @@ -965,7 +990,7 @@
24898                                              p_hunk_beg + repl_beginning));
24899                     else
24900                       {
24901 -                       repl_missing = TRUE;
24902 +                       repl_missing = true;
24903                         goto hunk_done;
24904                       }
24905                   }
24906 @@ -1009,11 +1034,11 @@
24907                     && (p_prefix_context != 0
24908                         || context != 0
24909                         || p_repl_lines != 1))
24910 -                 repl_could_be_missing = FALSE;
24911 +                 repl_could_be_missing = false;
24912                 context = 0;
24913                 break;
24914             case '+':  case '!':
24915 -               repl_could_be_missing = FALSE;
24916 +               repl_could_be_missing = false;
24917               change_line:
24918                 s = buf + 1;
24919                 chars_read--;
24920 @@ -1025,7 +1050,7 @@
24921                     s++;
24922                     chars_read--;
24923                 } else if (repl_beginning && repl_could_be_missing) {
24924 -                   repl_missing = TRUE;
24925 +                   repl_missing = true;
24926                     goto hunk_done;
24927                 }
24928                 if (! repl_beginning)
24929 @@ -1057,7 +1082,7 @@
24930                 }
24931                 if (repl_beginning && repl_could_be_missing &&
24932                     (!ptrn_spaces_eaten || difftype == NEW_CONTEXT_DIFF) ) {
24933 -                   repl_missing = TRUE;
24934 +                   repl_missing = true;
24935                     goto hunk_done;
24936                 }
24937                 chars_read -=
24938 @@ -1071,9 +1096,11 @@
24939                 }
24940                 if (p_end != p_ptrn_lines + 1) {
24941                     ptrn_spaces_eaten |= (repl_beginning != 0);
24942 -                   some_context = TRUE;
24943 +                   some_context = true;
24944                     context++;
24945 -                   if (!repl_beginning)
24946 +                   if (repl_beginning)
24947 +                       repl_copiable++;
24948 +                   else
24949                         ptrn_copiable++;
24950                     p_Char[p_end] = ' ';
24951                 }
24952 @@ -1089,12 +1116,14 @@
24953                     s++;
24954                     chars_read--;
24955                 } else if (repl_beginning && repl_could_be_missing) {
24956 -                   repl_missing = TRUE;
24957 +                   repl_missing = true;
24958                     goto hunk_done;
24959                 }
24960 -               some_context = TRUE;
24961 +               some_context = true;
24962                 context++;
24963 -               if (!repl_beginning)
24964 +               if (repl_beginning)
24965 +                   repl_copiable++;
24966 +               else
24967                     ptrn_copiable++;
24968                 chars_read -=
24969                   (1 < chars_read
24970 @@ -1108,7 +1137,7 @@
24971                 break;
24972             default:
24973                 if (repl_beginning && repl_could_be_missing) {
24974 -                   repl_missing = TRUE;
24975 +                   repl_missing = true;
24976                     goto hunk_done;
24977                 }
24978                 malformed ();
24979 @@ -1136,6 +1165,9 @@
24980             fillcnt = p_repl_lines;
24981             p_end = p_max;
24982         }
24983 +       else if (! ptrn_missing && ptrn_copiable != repl_copiable)
24984 +         fatal ("context mangled in hunk at line %s",
24985 +                format_linenum (numbuf0, p_hunk_beg));
24986         else if (!some_context && fillcnt == 1) {
24987             /* the first hunk was a null hunk with no context */
24988             /* and we were expecting one line -- fix it up. */
24989 @@ -1499,94 +1531,104 @@
24990  static size_t
24991  get_line (void)
24992  {
24993 -   return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr);
24994 +   return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr,
24995 +                    p_pass_comments_through);
24996  }
24997  
24998  /* Input a line from the patch file, worrying about indentation.
24999     Strip up to INDENT characters' worth of leading indentation.
25000     Then remove up to RFC934_NESTING instances of leading "- ".
25001 -   If STRIP_TRAILING_CR is nonzero, remove any trailing carriage-return.
25002 +   If STRIP_TRAILING_CR is true, remove any trailing carriage-return.
25003 +   Unless PASS_COMMENTS_THROUGH is true, ignore any resulting lines
25004 +   that begin with '#'; they're comments.
25005     Ignore any partial lines at end of input, but warn about them.
25006     Succeed if a line was read; it is terminated by "\n\0" for convenience.
25007     Return the number of characters read, including '\n' but not '\0'.
25008     Return -1 if we ran out of memory.  */
25009  
25010  static size_t
25011 -pget_line (int indent, int rfc934_nesting, int strip_trailing_cr)
25012 +pget_line (int indent, int rfc934_nesting, bool strip_trailing_cr,
25013 +          bool pass_comments_through)
25014  {
25015    register FILE *fp = pfp;
25016    register int c;
25017 -  register int i = 0;
25018 +  register int i;
25019    register char *b;
25020    register size_t s;
25021  
25022 -  for (;;)
25023 +  do
25024      {
25025 -      c = getc (fp);
25026 -      if (c == EOF)
25027 +      i = 0;
25028 +      for (;;)
25029         {
25030 -         if (ferror (fp))
25031 -           read_fatal ();
25032 -         return 0;
25033 +         c = getc (fp);
25034 +         if (c == EOF)
25035 +           {
25036 +             if (ferror (fp))
25037 +               read_fatal ();
25038 +             return 0;
25039 +           }
25040 +         if (indent <= i)
25041 +           break;
25042 +         if (c == ' ' || c == 'X')
25043 +           i++;
25044 +         else if (c == '\t')
25045 +           i = (i + 8) & ~7;
25046 +         else
25047 +           break;
25048         }
25049 -      if (indent <= i)
25050 -       break;
25051 -      if (c == ' ' || c == 'X')
25052 -       i++;
25053 -      else if (c == '\t')
25054 -       i = (i + 8) & ~7;
25055 -      else
25056 -       break;
25057 -    }
25058  
25059 -  i = 0;
25060 -  b = buf;
25061 +      i = 0;
25062 +      b = buf;
25063  
25064 -  while (c == '-' && 0 <= --rfc934_nesting)
25065 -    {
25066 -      c = getc (fp);
25067 -      if (c == EOF)
25068 -       goto patch_ends_in_middle_of_line;
25069 -      if (c != ' ')
25070 +      while (c == '-' && 0 <= --rfc934_nesting)
25071         {
25072 -         i = 1;
25073 -         b[0] = '-';
25074 -         break;
25075 +         c = getc (fp);
25076 +         if (c == EOF)
25077 +           goto patch_ends_in_middle_of_line;
25078 +         if (c != ' ')
25079 +           {
25080 +             i = 1;
25081 +             b[0] = '-';
25082 +             break;
25083 +           }
25084 +         c = getc (fp);
25085 +         if (c == EOF)
25086 +           goto patch_ends_in_middle_of_line;
25087         }
25088 -      c = getc (fp);
25089 -      if (c == EOF)
25090 -       goto patch_ends_in_middle_of_line;
25091 -    }
25092  
25093 -  s = bufsize;
25094 +      s = bufsize;
25095  
25096 -  for (;;)
25097 -    {
25098 -      if (i == s - 1)
25099 +      for (;;)
25100         {
25101 -         s *= 2;
25102 -         b = realloc (b, s);
25103 -         if (!b)
25104 +         if (i == s - 1)
25105             {
25106 -             if (!using_plan_a)
25107 -               memory_fatal ();
25108 -             return (size_t) -1;
25109 +             s *= 2;
25110 +             b = realloc (b, s);
25111 +             if (!b)
25112 +               {
25113 +                 if (!using_plan_a)
25114 +                   memory_fatal ();
25115 +                 return (size_t) -1;
25116 +               }
25117 +             buf = b;
25118 +             bufsize = s;
25119             }
25120 -         buf = b;
25121 -         bufsize = s;
25122 +         b[i++] = c;
25123 +         if (c == '\n')
25124 +           break;
25125 +         c = getc (fp);
25126 +         if (c == EOF)
25127 +           goto patch_ends_in_middle_of_line;
25128         }
25129 -      b[i++] = c;
25130 -      if (c == '\n')
25131 -       break;
25132 -      c = getc (fp);
25133 -      if (c == EOF)
25134 -       goto patch_ends_in_middle_of_line;
25135 +
25136 +      p_input_line++;
25137      }
25138 +  while (*b == '#' && !pass_comments_through);
25139  
25140    if (strip_trailing_cr && 2 <= i && b[i - 2] == '\r')
25141      b[i-- - 2] = '\n';
25142    b[i] = '\0';
25143 -  p_input_line++;
25144    return i;
25145  
25146   patch_ends_in_middle_of_line:
25147 @@ -1607,13 +1649,13 @@
25148      {
25149        while ((c = getc (fp)) != '\n'  &&  c != EOF)
25150         continue;
25151 -      return TRUE;
25152 +      return true;
25153      }
25154    else
25155      {
25156        /* We don't trust ungetc.  */
25157        Fseek (pfp, line_beginning, SEEK_SET);
25158 -      return FALSE;
25159 +      return false;
25160      }
25161  }
25162  
25163 @@ -1627,7 +1669,7 @@
25164      char *tp_char;             /* +, -, and ! */
25165      register LINENUM i;
25166      register LINENUM n;
25167 -    bool blankline = FALSE;
25168 +    bool blankline = false;
25169      register char *s;
25170  
25171      i = p_first;
25172 @@ -1653,14 +1695,14 @@
25173         if (p_Char)
25174           free (p_Char);
25175         p_Char = tp_char;
25176 -       return FALSE;           /* not enough memory to swap hunk! */
25177 +       return false;           /* not enough memory to swap hunk! */
25178      }
25179  
25180      /* now turn the new into the old */
25181  
25182      i = p_ptrn_lines + 1;
25183      if (tp_char[i] == '\n') {          /* account for possible blank line */
25184 -       blankline = TRUE;
25185 +       blankline = true;
25186         i++;
25187      }
25188      if (p_efake >= 0) {                        /* fix non-freeable ptr range */
25189 @@ -1715,23 +1757,23 @@
25190        free (tp_len);
25191      if (tp_char)
25192        free (tp_char);
25193 -    return TRUE;
25194 +    return true;
25195  }
25196  
25197 -/* Return whether file WHICH (0 = old, 1 = new) appears to nonexistent.
25198 +/* Return whether file WHICH (false = old, true = new) appears to nonexistent.
25199     Return 1 for empty, 2 for nonexistent.  */
25200  
25201 -bool
25202 -pch_says_nonexistent (int which)
25203 +int
25204 +pch_says_nonexistent (bool which)
25205  {
25206    return p_says_nonexistent[which];
25207  }
25208  
25209 -/* Return timestamp of patch header for file WHICH (0 = old, 1 = new),
25210 +/* Return timestamp of patch header for file WHICH (false = old, true = new),
25211     or -1 if there was no timestamp or an error in the timestamp.  */
25212  
25213  time_t
25214 -pch_timestamp (int which)
25215 +pch_timestamp (bool which)
25216  {
25217    return p_timestamp[which];
25218  }
25219 @@ -1835,6 +1877,60 @@
25220      return p_hunk_beg;
25221  }
25222  
25223 +/* Is the newline-terminated line a valid `ed' command for patch
25224 +   input?  If so, return the command character; if not, return 0.
25225 +   This accepts accepts just a subset of the valid commands, but it's
25226 +   good enough in practice.  */
25227 +
25228 +static char
25229 +get_ed_command_letter (char const *line)
25230 +{
25231 +  char const *p = line;
25232 +  char letter;
25233 +  bool pair = false;
25234 +  if (! ISDIGIT (*p))
25235 +    return 0;
25236 +  while (ISDIGIT (*++p))
25237 +    continue;
25238 +  if (*p == ',')
25239 +    {
25240 +      if (! ISDIGIT (*++p))
25241 +       return 0;
25242 +      while (ISDIGIT (*++p))
25243 +       continue;
25244 +      pair = true;
25245 +    }
25246 +  letter = *p++;
25247 +
25248 +  switch (letter)
25249 +    {
25250 +    case 'a':
25251 +    case 'i':
25252 +      if (pair)
25253 +       return 0;
25254 +      break;
25255 +
25256 +    case 'c':
25257 +    case 'd':
25258 +      break;
25259 +
25260 +    case 's':
25261 +      if (strncmp (p, "/.//", 4) != 0)
25262 +       return 0;
25263 +      p += 4;
25264 +      break;
25265 +
25266 +    default:
25267 +      return 0;
25268 +    }
25269 +
25270 +  while (*p == ' ' || *p == '\t')
25271 +    p++;
25272 +  if (*p == '\n')
25273 +    return letter;
25274 +  return 0;
25275 +}
25276 +
25277  /* Apply an ed script by feeding ed itself. */
25278  
25279  void
25280 @@ -1842,13 +1938,11 @@
25281  {
25282      static char const ed_program[] = ed_PROGRAM;
25283  
25284 -    register char *t;
25285      register file_offset beginning_of_this_line;
25286 -    register bool this_line_is_command = FALSE;
25287      register FILE *pipefp = 0;
25288      register size_t chars_read;
25289  
25290 -    if (!skip_rest_of_patch) {
25291 +    if (! dry_run && ! skip_rest_of_patch) {
25292         int exclusive = TMPOUTNAME_needs_removal ? 0 : O_EXCL;
25293         assert (! inerrno);
25294         TMPOUTNAME_needs_removal = 1;
25295 @@ -1861,21 +1955,20 @@
25296           pfatal ("Can't open pipe to %s", quotearg (buf));
25297      }
25298      for (;;) {
25299 +       char ed_command_letter;
25300         beginning_of_this_line = file_tell (pfp);
25301         chars_read = get_line ();
25302         if (! chars_read) {
25303             next_intuit_at(beginning_of_this_line,p_input_line);
25304             break;
25305         }
25306 -       for (t = buf;  ISDIGIT (*t) || *t == ',';  t++)
25307 -         continue;
25308 -       this_line_is_command = (ISDIGIT (*buf) &&
25309 -         (*t == 'd' || *t == 'c' || *t == 'a' || *t == 'i' || *t == 's') );
25310 -       if (this_line_is_command) {
25311 +       ed_command_letter = get_ed_command_letter (buf);
25312 +       if (ed_command_letter) {
25313             if (pipefp)
25314                 if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
25315                     write_fatal ();
25316 -           if (*t != 'd' && *t != 's') {
25317 +           if (ed_command_letter != 'd' && ed_command_letter != 's') {
25318 +               p_pass_comments_through = true;
25319                 while ((chars_read = get_line ()) != 0) {
25320                     if (pipefp)
25321                         if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
25322 @@ -1883,6 +1976,7 @@
25323                     if (chars_read == 2  &&  strEQ (buf, ".\n"))
25324                         break;
25325                 }
25326 +               p_pass_comments_through = false;
25327             }
25328         }
25329         else {
25330 diff -urNd -urNd patch-2.5.4/pch.h patch-2.5.9/pch.h
25331 --- patch-2.5.4/pch.h   1997-06-13 02:28:37.000000000 -0400
25332 +++ patch-2.5.9/pch.h   2003-05-20 09:56:02.000000000 -0400
25333 @@ -1,25 +1,45 @@
25334  /* reading patches */
25335  
25336 -/* $Id: pch.h,v 1.8 1997/06/13 06:28:37 eggert Exp $ */
25337 +/* $Id: pch.h,v 1.11 2003/05/20 13:56:03 eggert Exp $ */
25338  
25339 -LINENUM pch_end PARAMS ((void));
25340 -LINENUM pch_first PARAMS ((void));
25341 -LINENUM pch_hunk_beg PARAMS ((void));
25342 -LINENUM pch_newfirst PARAMS ((void));
25343 -LINENUM pch_prefix_context PARAMS ((void));
25344 -LINENUM pch_ptrn_lines PARAMS ((void));
25345 -LINENUM pch_repl_lines PARAMS ((void));
25346 -LINENUM pch_suffix_context PARAMS ((void));
25347 -bool pch_swap PARAMS ((void));
25348 -bool pch_write_line PARAMS ((LINENUM, FILE *));
25349 -bool there_is_another_patch PARAMS ((void));
25350 -char *pfetch PARAMS ((LINENUM));
25351 -char pch_char PARAMS ((LINENUM));
25352 -int another_hunk PARAMS ((enum diff, int));
25353 -int pch_says_nonexistent PARAMS ((int));
25354 -size_t pch_line_len PARAMS ((LINENUM));
25355 -time_t pch_timestamp PARAMS ((int));
25356 -void do_ed_script PARAMS ((FILE *));
25357 -void open_patch_file PARAMS ((char const *));
25358 -void re_patch PARAMS ((void));
25359 -void set_hunkmax PARAMS ((void));
25360 +/* Copyright (C) 1986, 1987, 1988 Larry Wall
25361 +
25362 +   Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
25363 +   2002, 2003 Free Software Foundation, Inc.
25364 +
25365 +   This program is free software; you can redistribute it and/or modify
25366 +   it under the terms of the GNU General Public License as published by
25367 +   the Free Software Foundation; either version 2, or (at your option)
25368 +   any later version.
25369 +
25370 +   This program is distributed in the hope that it will be useful,
25371 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
25372 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25373 +   GNU General Public License for more details.
25374 +
25375 +   You should have received a copy of the GNU General Public License
25376 +   along with this program; see the file COPYING.
25377 +   If not, write to the Free Software Foundation,
25378 +   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
25379 +
25380 +LINENUM pch_end (void);
25381 +LINENUM pch_first (void);
25382 +LINENUM pch_hunk_beg (void);
25383 +LINENUM pch_newfirst (void);
25384 +LINENUM pch_prefix_context (void);
25385 +LINENUM pch_ptrn_lines (void);
25386 +LINENUM pch_repl_lines (void);
25387 +LINENUM pch_suffix_context (void);
25388 +bool pch_swap (void);
25389 +bool pch_write_line (LINENUM, FILE *);
25390 +bool there_is_another_patch (void);
25391 +char *pfetch (LINENUM);
25392 +char pch_char (LINENUM);
25393 +int another_hunk (enum diff, bool);
25394 +int pch_says_nonexistent (bool);
25395 +size_t pch_line_len (LINENUM);
25396 +time_t pch_timestamp (bool);
25397 +void do_ed_script (FILE *);
25398 +void open_patch_file (char const *);
25399 +void re_patch (void);
25400 +void set_hunkmax (void);
25401 diff -urNd -urNd patch-2.5.4/quotearg.c patch-2.5.9/quotearg.c
25402 --- patch-2.5.4/quotearg.c      1999-08-23 05:55:55.000000000 -0400
25403 +++ patch-2.5.9/quotearg.c      2002-11-23 01:45:49.000000000 -0500
25404 @@ -1,5 +1,5 @@
25405  /* quotearg.c - quote arguments for output
25406 -   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
25407 +   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
25408  
25409     This program is free software; you can redistribute it and/or modify
25410     it under the terms of the GNU General Public License as published by
25411 @@ -17,51 +17,59 @@
25412  
25413  /* Written by Paul Eggert <eggert@twinsun.com> */
25414  
25415 -/* FIXME: Multibyte characters are not supported yet.  */
25416 -
25417  #if HAVE_CONFIG_H
25418  # include <config.h>
25419  #endif
25420  
25421 -#include <sys/types.h>
25422 -#include <quotearg.h>
25423 -#include <xalloc.h>
25424 +#include "quotearg.h"
25425 +
25426 +#include "xalloc.h"
25427  
25428  #include <ctype.h>
25429 -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
25430 -# define ISASCII(c) 1
25431 -#else
25432 -# define ISASCII(c) isascii (c)
25433 -#endif
25434 -#ifdef isgraph
25435 -# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
25436 -#else
25437 -# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
25438 -#endif
25439 +#include <errno.h>
25440 +#include <limits.h>
25441 +#include <stdlib.h>
25442 +#include <string.h>
25443  
25444 -#if ENABLE_NLS
25445 -# include <libintl.h>
25446 -# define _(text) gettext (text)
25447 -#else
25448 -# define _(text) text
25449 -#endif
25450 +#include "gettext.h"
25451 +#define _(msgid) gettext (msgid)
25452 +#define N_(msgid) msgid
25453  
25454 -#if HAVE_LIMITS_H
25455 -# include <limits.h>
25456 +#if HAVE_WCHAR_H
25457 +
25458 +/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.  */
25459 +# include <stdio.h>
25460 +# include <time.h>
25461 +
25462 +# include <wchar.h>
25463  #endif
25464 -#ifndef CHAR_BIT
25465 -# define CHAR_BIT 8
25466 +
25467 +#if !HAVE_MBRTOWC
25468 +/* Disable multibyte processing entirely.  Since MB_CUR_MAX is 1, the
25469 +   other macros are defined only for documentation and to satisfy C
25470 +   syntax.  */
25471 +# undef MB_CUR_MAX
25472 +# define MB_CUR_MAX 1
25473 +# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
25474 +# define iswprint(wc) isprint ((unsigned char) (wc))
25475 +# undef HAVE_MBSINIT
25476  #endif
25477 -#ifndef UCHAR_MAX
25478 -# define UCHAR_MAX ((unsigned char) -1)
25479 +
25480 +#if !defined mbsinit && !HAVE_MBSINIT
25481 +# define mbsinit(ps) 1
25482  #endif
25483  
25484 -#if HAVE_STDLIB_H
25485 -# include <stdlib.h>
25486 +#ifndef iswprint
25487 +# if HAVE_WCTYPE_H
25488 +#  include <wctype.h>
25489 +# endif
25490 +# if !defined iswprint && !HAVE_ISWPRINT
25491 +#  define iswprint(wc) 1
25492 +# endif
25493  #endif
25494  
25495 -#if HAVE_STRING_H
25496 -# include <string.h>
25497 +#ifndef SIZE_MAX
25498 +# define SIZE_MAX ((size_t) -1)
25499  #endif
25500  
25501  #define INT_BITS (sizeof (int) * CHAR_BIT)
25502 @@ -73,8 +81,7 @@
25503  
25504    /* Quote the characters indicated by this bit vector even if the
25505       quoting style would not normally require them to be quoted.  */
25506 -  int quote_these_too[((UCHAR_MAX + 1) / INT_BITS
25507 -                      + ((UCHAR_MAX + 1) % INT_BITS != 0))];
25508 +  int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
25509  };
25510  
25511  /* Names of quoting styles.  */
25512 @@ -86,6 +93,7 @@
25513    "c",
25514    "escape",
25515    "locale",
25516 +  "clocale",
25517    0
25518  };
25519  
25520 @@ -97,7 +105,8 @@
25521    shell_always_quoting_style,
25522    c_quoting_style,
25523    escape_quoting_style,
25524 -  locale_quoting_style
25525 +  locale_quoting_style,
25526 +  clocale_quoting_style
25527  };
25528  
25529  /* The default quoting options.  */
25530 @@ -109,9 +118,10 @@
25531  struct quoting_options *
25532  clone_quoting_options (struct quoting_options *o)
25533  {
25534 -  struct quoting_options *p
25535 -    = (struct quoting_options *) xmalloc (sizeof (struct quoting_options));
25536 +  int e = errno;
25537 +  struct quoting_options *p = xmalloc (sizeof *p);
25538    *p = *(o ? o : &default_quoting_options);
25539 +  errno = e;
25540    return p;
25541  }
25542  
25543 @@ -146,77 +156,92 @@
25544    return r;
25545  }
25546  
25547 +/* MSGID approximates a quotation mark.  Return its translation if it
25548 +   has one; otherwise, return either it or "\"", depending on S.  */
25549 +static char const *
25550 +gettext_quote (char const *msgid, enum quoting_style s)
25551 +{
25552 +  char const *translation = _(msgid);
25553 +  if (translation == msgid && s == clocale_quoting_style)
25554 +    translation = "\"";
25555 +  return translation;
25556 +}
25557 +
25558  /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
25559 -   argument ARG (of size ARGSIZE), using O to control quoting.
25560 -   If O is null, use the default.
25561 +   argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
25562 +   non-quoting-style part of O to control quoting.
25563     Terminate the output with a null character, and return the written
25564     size of the output, not counting the terminating null.
25565     If BUFFERSIZE is too small to store the output string, return the
25566     value that would have been returned had BUFFERSIZE been large enough.
25567 -   If ARGSIZE is -1, use the string length of the argument for ARGSIZE.  */
25568 -size_t
25569 -quotearg_buffer (char *buffer, size_t buffersize,
25570 -                char const *arg, size_t argsize,
25571 -                struct quoting_options const *o)
25572 +   If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
25573 +
25574 +   This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
25575 +   ARGSIZE, O), except it uses QUOTING_STYLE instead of the quoting
25576 +   style specified by O, and O may not be null.  */
25577 +
25578 +static size_t
25579 +quotearg_buffer_restyled (char *buffer, size_t buffersize,
25580 +                         char const *arg, size_t argsize,
25581 +                         enum quoting_style quoting_style,
25582 +                         struct quoting_options const *o)
25583  {
25584 -  unsigned char c;
25585    size_t i;
25586    size_t len = 0;
25587 -  char const *quote_string;
25588 -  size_t quote_string_len;
25589 -  struct quoting_options const *p = o ? o : &default_quoting_options;
25590 -  enum quoting_style quoting_style = p->style;
25591 +  char const *quote_string = 0;
25592 +  size_t quote_string_len = 0;
25593 +  int backslash_escapes = 0;
25594 +  int unibyte_locale = MB_CUR_MAX == 1;
25595 +
25596  #define STORE(c) \
25597      do \
25598        { \
25599         if (len < buffersize) \
25600           buffer[len] = (c); \
25601 -         len++; \
25602 +       len++; \
25603        } \
25604      while (0)
25605  
25606    switch (quoting_style)
25607      {
25608 -    case shell_quoting_style:
25609 -      if (! (argsize == (size_t) -1 ? arg[0] == '\0' : argsize == 0))
25610 -       {
25611 -         switch (arg[0])
25612 -           {
25613 -           case '#': case '~':
25614 -             break;
25615 -
25616 -           default:
25617 -             for (i = 0; ; i++)
25618 -               {
25619 -                 if (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize)
25620 -                   goto done;
25621 +    case c_quoting_style:
25622 +      STORE ('"');
25623 +      backslash_escapes = 1;
25624 +      quote_string = "\"";
25625 +      quote_string_len = 1;
25626 +      break;
25627  
25628 -                 c = arg[i];
25629 +    case escape_quoting_style:
25630 +      backslash_escapes = 1;
25631 +      break;
25632  
25633 -                 switch (c)
25634 -                   {
25635 -                   case '\t': case '\n': case ' ':
25636 -                   case '!': /* special in csh */
25637 -                   case '"': case '$': case '&': case '\'':
25638 -                   case '(': case ')': case '*': case ';':
25639 -                   case '<': case '>': case '?': case '[': case '\\':
25640 -                   case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
25641 -                   case '`': case '|':
25642 -                     goto needs_quoting;
25643 -                   }
25644 +    case locale_quoting_style:
25645 +    case clocale_quoting_style:
25646 +      {
25647 +       /* Get translations for open and closing quotation marks.
25648  
25649 -                 if (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
25650 -                   goto needs_quoting;
25651 +          The message catalog should translate "`" to a left
25652 +          quotation mark suitable for the locale, and similarly for
25653 +          "'".  If the catalog has no translation,
25654 +          locale_quoting_style quotes `like this', and
25655 +          clocale_quoting_style quotes "like this".
25656  
25657 -                 STORE (c);
25658 -               }
25659 -           needs_quoting:;
25660 +          For example, an American English Unicode locale should
25661 +          translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
25662 +          should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
25663 +          MARK).  A British English Unicode locale should instead
25664 +          translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
25665 +          U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.  */
25666  
25667 -             len = 0;
25668 -             break;
25669 -           }
25670 -       }
25671 -      /* Fall through.  */
25672 +       char const *left = gettext_quote (N_("`"), quoting_style);
25673 +       char const *right = gettext_quote (N_("'"), quoting_style);
25674 +       for (quote_string = left; *quote_string; quote_string++)
25675 +         STORE (*quote_string);
25676 +       backslash_escapes = 1;
25677 +       quote_string = right;
25678 +       quote_string_len = strlen (quote_string);
25679 +      }
25680 +      break;
25681  
25682      case shell_always_quoting_style:
25683        STORE ('\'');
25684 @@ -224,84 +249,225 @@
25685        quote_string_len = 1;
25686        break;
25687  
25688 -    case c_quoting_style:
25689 -      STORE ('"');
25690 -      quote_string = "\"";
25691 -      quote_string_len = 1;
25692 -      break;
25693 -
25694 -    case locale_quoting_style:
25695 -      for (quote_string = _("`"); *quote_string; quote_string++)
25696 -       STORE (*quote_string);
25697 -      quote_string = _("'");
25698 -      quote_string_len = strlen (quote_string);
25699 -      break;
25700 -
25701      default:
25702 -      quote_string = 0;
25703 -      quote_string_len = 0;
25704        break;
25705      }
25706  
25707 -  for (i = 0;  ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize);  i++)
25708 +  for (i = 0;  ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize);  i++)
25709      {
25710 -      c = arg[i];
25711 +      unsigned char c;
25712 +      unsigned char esc;
25713  
25714 -      switch (quoting_style)
25715 +      if (backslash_escapes
25716 +         && quote_string_len
25717 +         && i + quote_string_len <= argsize
25718 +         && memcmp (arg + i, quote_string, quote_string_len) == 0)
25719 +       STORE ('\\');
25720 +
25721 +      c = arg[i];
25722 +      switch (c)
25723         {
25724 -       case literal_quoting_style:
25725 +       case '\0':
25726 +         if (backslash_escapes)
25727 +           {
25728 +             STORE ('\\');
25729 +             STORE ('0');
25730 +             STORE ('0');
25731 +             c = '0';
25732 +           }
25733           break;
25734  
25735 -       case shell_quoting_style:
25736 -       case shell_always_quoting_style:
25737 -         if (c == '\'')
25738 +       case '?':
25739 +         switch (quoting_style)
25740             {
25741 -             STORE ('\'');
25742 -             STORE ('\\');
25743 -             STORE ('\'');
25744 +           case shell_quoting_style:
25745 +             goto use_shell_always_quoting_style;
25746 +
25747 +           case c_quoting_style:
25748 +             if (i + 2 < argsize && arg[i + 1] == '?')
25749 +               switch (arg[i + 2])
25750 +                 {
25751 +                 case '!': case '\'':
25752 +                 case '(': case ')': case '-': case '/':
25753 +                 case '<': case '=': case '>':
25754 +                   /* Escape the second '?' in what would otherwise be
25755 +                      a trigraph.  */
25756 +                   c = arg[i + 2];
25757 +                   i += 2;
25758 +                   STORE ('?');
25759 +                   STORE ('\\');
25760 +                   STORE ('?');
25761 +                   break;
25762 +                 }
25763 +             break;
25764 +
25765 +           default:
25766 +             break;
25767             }
25768           break;
25769  
25770 -       case c_quoting_style:
25771 -       case escape_quoting_style:
25772 -       case locale_quoting_style:
25773 -         switch (c)
25774 +       case '\a': esc = 'a'; goto c_escape;
25775 +       case '\b': esc = 'b'; goto c_escape;
25776 +       case '\f': esc = 'f'; goto c_escape;
25777 +       case '\n': esc = 'n'; goto c_and_shell_escape;
25778 +       case '\r': esc = 'r'; goto c_and_shell_escape;
25779 +       case '\t': esc = 't'; goto c_and_shell_escape;
25780 +       case '\v': esc = 'v'; goto c_escape;
25781 +       case '\\': esc = c; goto c_and_shell_escape;
25782 +
25783 +       c_and_shell_escape:
25784 +         if (quoting_style == shell_quoting_style)
25785 +           goto use_shell_always_quoting_style;
25786 +       c_escape:
25787 +         if (backslash_escapes)
25788             {
25789 -           case '?': /* Do not generate trigraphs.  */
25790 -           case '\\': goto store_escape;
25791 -             /* Not all C compilers know what \a means.  */
25792 -           case   7 : c = 'a'; goto store_escape;
25793 -           case '\b': c = 'b'; goto store_escape;
25794 -           case '\f': c = 'f'; goto store_escape;
25795 -           case '\n': c = 'n'; goto store_escape;
25796 -           case '\r': c = 'r'; goto store_escape;
25797 -           case '\t': c = 't'; goto store_escape;
25798 -           case '\v': c = 'v'; goto store_escape;
25799 +             c = esc;
25800 +             goto store_escape;
25801 +           }
25802 +         break;
25803  
25804 -           case ' ': break;
25805 +       case '#': case '~':
25806 +         if (i != 0)
25807 +           break;
25808 +         /* Fall through.  */
25809 +       case ' ':
25810 +       case '!': /* special in bash */
25811 +       case '"': case '$': case '&':
25812 +       case '(': case ')': case '*': case ';':
25813 +       case '<': case '>': case '[':
25814 +       case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
25815 +       case '`': case '|':
25816 +         /* A shell special character.  In theory, '$' and '`' could
25817 +            be the first bytes of multibyte characters, which means
25818 +            we should check them with mbrtowc, but in practice this
25819 +            doesn't happen so it's not worth worrying about.  */
25820 +         if (quoting_style == shell_quoting_style)
25821 +           goto use_shell_always_quoting_style;
25822 +         break;
25823 +
25824 +       case '\'':
25825 +         switch (quoting_style)
25826 +           {
25827 +           case shell_quoting_style:
25828 +             goto use_shell_always_quoting_style;
25829 +
25830 +           case shell_always_quoting_style:
25831 +             STORE ('\'');
25832 +             STORE ('\\');
25833 +             STORE ('\'');
25834 +             break;
25835  
25836             default:
25837 -             if (quote_string_len
25838 -                 && strncmp (arg + i, quote_string, quote_string_len) == 0)
25839 -               goto store_escape;
25840 -             if (!ISGRAPH (c))
25841 -               {
25842 -                 STORE ('\\');
25843 -                 STORE ('0' + (c >> 6));
25844 -                 STORE ('0' + ((c >> 3) & 7));
25845 -                 c = '0' + (c & 7);
25846 -                 goto store_c;
25847 -               }
25848               break;
25849             }
25850 +         break;
25851  
25852 -         if (! (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
25853 -           goto store_c;
25854 +       case '%': case '+': case ',': case '-': case '.': case '/':
25855 +       case '0': case '1': case '2': case '3': case '4': case '5':
25856 +       case '6': case '7': case '8': case '9': case ':': case '=':
25857 +       case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
25858 +       case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
25859 +       case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
25860 +       case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
25861 +       case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
25862 +       case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
25863 +       case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
25864 +       case 'o': case 'p': case 'q': case 'r': case 's': case 't':
25865 +       case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
25866 +       case '{': case '}':
25867 +         /* These characters don't cause problems, no matter what the
25868 +            quoting style is.  They cannot start multibyte sequences.  */
25869 +         break;
25870  
25871 -       store_escape:
25872 -         STORE ('\\');
25873 +       default:
25874 +         /* If we have a multibyte sequence, copy it until we reach
25875 +            its end, find an error, or come back to the initial shift
25876 +            state.  For C-like styles, if the sequence has
25877 +            unprintable characters, escape the whole sequence, since
25878 +            we can't easily escape single characters within it.  */
25879 +         {
25880 +           /* Length of multibyte sequence found so far.  */
25881 +           size_t m;
25882 +
25883 +           int printable;
25884 +
25885 +           if (unibyte_locale)
25886 +             {
25887 +               m = 1;
25888 +               printable = isprint (c);
25889 +             }
25890 +           else
25891 +             {
25892 +               mbstate_t mbstate;
25893 +               memset (&mbstate, 0, sizeof mbstate);
25894 +
25895 +               m = 0;
25896 +               printable = 1;
25897 +               if (argsize == SIZE_MAX)
25898 +                 argsize = strlen (arg);
25899 +
25900 +               do
25901 +                 {
25902 +                   wchar_t w;
25903 +                   size_t bytes = mbrtowc (&w, &arg[i + m],
25904 +                                           argsize - (i + m), &mbstate);
25905 +                   if (bytes == 0)
25906 +                     break;
25907 +                   else if (bytes == (size_t) -1)
25908 +                     {
25909 +                       printable = 0;
25910 +                       break;
25911 +                     }
25912 +                   else if (bytes == (size_t) -2)
25913 +                     {
25914 +                       printable = 0;
25915 +                       while (i + m < argsize && arg[i + m])
25916 +                         m++;
25917 +                       break;
25918 +                     }
25919 +                   else
25920 +                     {
25921 +                       if (! iswprint (w))
25922 +                         printable = 0;
25923 +                       m += bytes;
25924 +                     }
25925 +                 }
25926 +               while (! mbsinit (&mbstate));
25927 +             }
25928 +
25929 +           if (1 < m || (backslash_escapes && ! printable))
25930 +             {
25931 +               /* Output a multibyte sequence, or an escaped
25932 +                  unprintable unibyte character.  */
25933 +               size_t ilim = i + m;
25934 +
25935 +               for (;;)
25936 +                 {
25937 +                   if (backslash_escapes && ! printable)
25938 +                     {
25939 +                       STORE ('\\');
25940 +                       STORE ('0' + (c >> 6));
25941 +                       STORE ('0' + ((c >> 3) & 7));
25942 +                       c = '0' + (c & 7);
25943 +                     }
25944 +                   if (ilim <= i + 1)
25945 +                     break;
25946 +                   STORE (c);
25947 +                   c = arg[++i];
25948 +                 }
25949 +
25950 +               goto store_c;
25951 +             }
25952 +         }
25953         }
25954  
25955 +      if (! (backslash_escapes
25956 +            && o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
25957 +       goto store_c;
25958 +
25959 +    store_escape:
25960 +      STORE ('\\');
25961 +
25962      store_c:
25963        STORE (c);
25964      }
25965 @@ -310,60 +476,105 @@
25966      for (; *quote_string; quote_string++)
25967        STORE (*quote_string);
25968  
25969 - done:
25970    if (len < buffersize)
25971      buffer[len] = '\0';
25972    return len;
25973 +
25974 + use_shell_always_quoting_style:
25975 +  return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
25976 +                                  shell_always_quoting_style, o);
25977  }
25978  
25979 -/* Use storage slot N to return a quoted version of the string ARG.
25980 +/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
25981 +   argument ARG (of size ARGSIZE), using O to control quoting.
25982 +   If O is null, use the default.
25983 +   Terminate the output with a null character, and return the written
25984 +   size of the output, not counting the terminating null.
25985 +   If BUFFERSIZE is too small to store the output string, return the
25986 +   value that would have been returned had BUFFERSIZE been large enough.
25987 +   If ARGSIZE is -1, use the string length of the argument for ARGSIZE.  */
25988 +size_t
25989 +quotearg_buffer (char *buffer, size_t buffersize,
25990 +                char const *arg, size_t argsize,
25991 +                struct quoting_options const *o)
25992 +{
25993 +  struct quoting_options const *p = o ? o : &default_quoting_options;
25994 +  int e = errno;
25995 +  size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
25996 +                                      p->style, p);
25997 +  errno = e;
25998 +  return r;
25999 +}
26000 +
26001 +/* Use storage slot N to return a quoted version of argument ARG.
26002 +   ARG is of size ARGSIZE, but if that is -1, ARG is a null-terminated string.
26003     OPTIONS specifies the quoting options.
26004     The returned value points to static storage that can be
26005     reused by the next call to this function with the same value of N.
26006 -   N must be nonnegative.  N is deliberately declared with type `int'
26007 +   N must be nonnegative.  N is deliberately declared with type "int"
26008     to allow for future extensions (using negative values).  */
26009  static char *
26010 -quotearg_n_options (int n, char const *arg,
26011 +quotearg_n_options (int n, char const *arg, size_t argsize,
26012                     struct quoting_options const *options)
26013  {
26014 -  static unsigned int nslots;
26015 -  static struct slotvec
26016 +  int e = errno;
26017 +
26018 +  /* Preallocate a slot 0 buffer, so that the caller can always quote
26019 +     one small component of a "memory exhausted" message in slot 0.  */
26020 +  static char slot0[256];
26021 +  static unsigned int nslots = 1;
26022 +  unsigned int n0 = n;
26023 +  struct slotvec
26024      {
26025        size_t size;
26026        char *val;
26027 -    } *slotvec;
26028 +    };
26029 +  static struct slotvec slotvec0 = {sizeof slot0, slot0};
26030 +  static struct slotvec *slotvec = &slotvec0;
26031  
26032 -  if (nslots <= n)
26033 +  if (n < 0)
26034 +    abort ();
26035 +
26036 +  if (nslots <= n0)
26037      {
26038 -      int n1 = n + 1;
26039 -      size_t s = n1 * sizeof (struct slotvec);
26040 -      if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
26041 -       abort ();
26042 -      slotvec = (struct slotvec *) xrealloc (slotvec, s);
26043 -      memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
26044 -      nslots = n;
26045 +      unsigned int n1 = n0 + 1;
26046 +      size_t s = n1 * sizeof *slotvec;
26047 +
26048 +      if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
26049 +         && n1 != s / sizeof *slotvec)
26050 +       xalloc_die ();
26051 +
26052 +      if (slotvec == &slotvec0)
26053 +       {
26054 +         slotvec = xmalloc (sizeof *slotvec);
26055 +         *slotvec = slotvec0;
26056 +       }
26057 +      slotvec = xrealloc (slotvec, s);
26058 +      memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
26059 +      nslots = n1;
26060      }
26061  
26062    {
26063      size_t size = slotvec[n].size;
26064      char *val = slotvec[n].val;
26065 -    size_t qsize = quotearg_buffer (val, size, arg, (size_t) -1, options);
26066 +    size_t qsize = quotearg_buffer (val, size, arg, argsize, options);
26067  
26068      if (size <= qsize)
26069        {
26070         slotvec[n].size = size = qsize + 1;
26071 -       slotvec[n].val = val = xrealloc (val, size);
26072 -       quotearg_buffer (val, size, arg, (size_t) -1, options);
26073 +       slotvec[n].val = val = xrealloc (val == slot0 ? 0 : val, size);
26074 +       quotearg_buffer (val, size, arg, argsize, options);
26075        }
26076  
26077 +    errno = e;
26078      return val;
26079    }
26080  }
26081  
26082  char *
26083 -quotearg_n (unsigned int n, char const *arg)
26084 +quotearg_n (int n, char const *arg)
26085  {
26086 -  return quotearg_n_options (n, arg, &default_quoting_options);
26087 +  return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
26088  }
26089  
26090  char *
26091 @@ -372,13 +583,29 @@
26092    return quotearg_n (0, arg);
26093  }
26094  
26095 -char *
26096 -quotearg_n_style (unsigned int n, enum quoting_style s, char const *arg)
26097 +/* Return quoting options for STYLE, with no extra quoting.  */
26098 +static struct quoting_options
26099 +quoting_options_from_style (enum quoting_style style)
26100  {
26101    struct quoting_options o;
26102 -  o.style = s;
26103 +  o.style = style;
26104    memset (o.quote_these_too, 0, sizeof o.quote_these_too);
26105 -  return quotearg_n_options (n, arg, &o);
26106 +  return o;
26107 +}
26108 +
26109 +char *
26110 +quotearg_n_style (int n, enum quoting_style s, char const *arg)
26111 +{
26112 +  struct quoting_options const o = quoting_options_from_style (s);
26113 +  return quotearg_n_options (n, arg, SIZE_MAX, &o);
26114 +}
26115 +
26116 +char *
26117 +quotearg_n_style_mem (int n, enum quoting_style s,
26118 +                     char const *arg, size_t argsize)
26119 +{
26120 +  struct quoting_options const o = quoting_options_from_style (s);
26121 +  return quotearg_n_options (n, arg, argsize, &o);
26122  }
26123  
26124  char *
26125 @@ -393,7 +620,7 @@
26126    struct quoting_options options;
26127    options = default_quoting_options;
26128    set_char_quoting (&options, ch, 1);
26129 -  return quotearg_n_options (0, arg, &options);
26130 +  return quotearg_n_options (0, arg, SIZE_MAX, &options);
26131  }
26132  
26133  char *
26134 diff -urNd -urNd patch-2.5.4/quotearg.h patch-2.5.9/quotearg.h
26135 --- patch-2.5.4/quotearg.h      1999-08-09 19:09:13.000000000 -0400
26136 +++ patch-2.5.9/quotearg.h      2002-11-23 01:45:22.000000000 -0500
26137 @@ -1,5 +1,7 @@
26138  /* quotearg.h - quote arguments for output
26139 -   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
26140 +
26141 +   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software
26142 +   Foundation, Inc.
26143  
26144     This program is free software; you can redistribute it and/or modify
26145     it under the terms of the GNU General Public License as published by
26146 @@ -17,6 +19,11 @@
26147  
26148  /* Written by Paul Eggert <eggert@twinsun.com> */
26149  
26150 +#ifndef QUOTEARG_H_
26151 +# define QUOTEARG_H_ 1
26152 +
26153 +# include <stddef.h>
26154 +
26155  /* Basic quoting styles.  */
26156  enum quoting_style
26157    {
26158 @@ -25,13 +32,14 @@
26159      shell_always_quoting_style,        /* --quoting-style=shell-always */
26160      c_quoting_style,           /* --quoting-style=c */
26161      escape_quoting_style,      /* --quoting-style=escape */
26162 -    locale_quoting_style       /* --quoting-style=locale */
26163 +    locale_quoting_style,      /* --quoting-style=locale */
26164 +    clocale_quoting_style      /* --quoting-style=clocale */
26165    };
26166  
26167  /* For now, --quoting-style=literal is the default, but this may change.  */
26168 -#ifndef DEFAULT_QUOTING_STYLE
26169 -# define DEFAULT_QUOTING_STYLE literal_quoting_style
26170 -#endif
26171 +# ifndef DEFAULT_QUOTING_STYLE
26172 +#  define DEFAULT_QUOTING_STYLE literal_quoting_style
26173 +# endif
26174  
26175  /* Names of quoting styles and their corresponding values.  */
26176  extern char const *const quoting_style_args[];
26177 @@ -39,37 +47,27 @@
26178  
26179  struct quoting_options;
26180  
26181 -#ifndef PARAMS
26182 -# if defined PROTOTYPES || defined __STDC__
26183 -#  define PARAMS(Args) Args
26184 -# else
26185 -#  define PARAMS(Args) ()
26186 -# endif
26187 -#endif
26188 -
26189  /* The functions listed below set and use a hidden variable
26190     that contains the default quoting style options.  */
26191  
26192  /* Allocate a new set of quoting options, with contents initially identical
26193     to O if O is not null, or to the default if O is null.
26194     It is the caller's responsibility to free the result.  */
26195 -struct quoting_options *clone_quoting_options
26196 -   PARAMS ((struct quoting_options *o));
26197 +struct quoting_options *clone_quoting_options (struct quoting_options *o);
26198  
26199  /* Get the value of O's quoting style.  If O is null, use the default.  */
26200 -enum quoting_style get_quoting_style PARAMS ((struct quoting_options *o));
26201 +enum quoting_style get_quoting_style (struct quoting_options *o);
26202  
26203  /* In O (or in the default if O is null),
26204     set the value of the quoting style to S.  */
26205 -void set_quoting_style PARAMS ((struct quoting_options *o,
26206 -                               enum quoting_style s));
26207 +void set_quoting_style (struct quoting_options *o, enum quoting_style s);
26208  
26209  /* In O (or in the default if O is null),
26210     set the value of the quoting options for character C to I.
26211     Return the old value.  Currently, the only values defined for I are
26212     0 (the default) and 1 (which means to quote the character even if
26213     it would not otherwise be quoted).  */
26214 -int set_char_quoting PARAMS ((struct quoting_options *o, char c, int i));
26215 +int set_char_quoting (struct quoting_options *o, char c, int i);
26216  
26217  /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
26218     argument ARG (of size ARGSIZE), using O to control quoting.
26219 @@ -79,31 +77,38 @@
26220     If BUFFERSIZE is too small to store the output string, return the
26221     value that would have been returned had BUFFERSIZE been large enough.
26222     If ARGSIZE is -1, use the string length of the argument for ARGSIZE.  */
26223 -size_t quotearg_buffer PARAMS ((char *buffer, size_t buffersize,
26224 -                               char const *arg, size_t argsize,
26225 -                               struct quoting_options const *o));
26226 +size_t quotearg_buffer (char *buffer, size_t buffersize,
26227 +                       char const *arg, size_t argsize,
26228 +                       struct quoting_options const *o);
26229  
26230  /* Use storage slot N to return a quoted version of the string ARG.
26231     Use the default quoting options.
26232     The returned value points to static storage that can be
26233     reused by the next call to this function with the same value of N.
26234     N must be nonnegative.  */
26235 -char *quotearg_n PARAMS ((unsigned int n, char const *arg));
26236 +char *quotearg_n (int n, char const *arg);
26237  
26238  /* Equivalent to quotearg_n (0, ARG).  */
26239 -char *quotearg PARAMS ((char const *arg));
26240 +char *quotearg (char const *arg);
26241  
26242  /* Use style S and storage slot N to return a quoted version of the string ARG.
26243     This is like quotearg_n (N, ARG), except that it uses S with no other
26244     options to specify the quoting method.  */
26245 -char *quotearg_n_style PARAMS ((unsigned int n, enum quoting_style s,
26246 -                               char const *arg));
26247 +char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
26248 +
26249 +/* Use style S and storage slot N to return a quoted version of the
26250 +   argument ARG of size ARGSIZE.  This is like quotearg_n_style
26251 +   (N, S, ARG), except it can quote null bytes.  */
26252 +char *quotearg_n_style_mem (int n, enum quoting_style s,
26253 +                           char const *arg, size_t argsize);
26254  
26255  /* Equivalent to quotearg_n_style (0, S, ARG).  */
26256 -char *quotearg_style PARAMS ((enum quoting_style s, char const *arg));
26257 +char *quotearg_style (enum quoting_style s, char const *arg);
26258  
26259  /* Like quotearg (ARG), except also quote any instances of CH.  */
26260 -char *quotearg_char PARAMS ((char const *arg, char ch));
26261 +char *quotearg_char (char const *arg, char ch);
26262  
26263  /* Equivalent to quotearg_char (ARG, ':').  */
26264 -char *quotearg_colon PARAMS ((char const *arg));
26265 +char *quotearg_colon (char const *arg);
26266 +
26267 +#endif /* !QUOTEARG_H_ */
26268 diff -urNd -urNd patch-2.5.4/quote.c patch-2.5.9/quote.c
26269 --- patch-2.5.4/quote.c 1969-12-31 19:00:00.000000000 -0500
26270 +++ patch-2.5.9/quote.c 2003-03-18 03:50:56.000000000 -0500
26271 @@ -0,0 +1,45 @@
26272 +/* quote.c - quote arguments for output
26273 +   Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
26274 +
26275 +   This program is free software; you can redistribute it and/or modify
26276 +   it under the terms of the GNU General Public License as published by
26277 +   the Free Software Foundation; either version 2, or (at your option)
26278 +   any later version.
26279 +
26280 +   This program is distributed in the hope that it will be useful,
26281 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
26282 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26283 +   GNU General Public License for more details.
26284 +
26285 +   You should have received a copy of the GNU General Public License
26286 +   along with this program; if not, write to the Free Software Foundation,
26287 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
26288 +
26289 +/* Written by Paul Eggert <eggert@twinsun.com> */
26290 +
26291 +#if HAVE_CONFIG_H
26292 +# include <config.h>
26293 +#endif
26294 +
26295 +#if HAVE_STDDEF_H
26296 +# include <stddef.h>  /* For the definition of size_t on windows w/MSVC.  */
26297 +#endif
26298 +#include <sys/types.h>
26299 +#include "quotearg.h"
26300 +#include "quote.h"
26301 +
26302 +/* Return an unambiguous printable representation of NAME,
26303 +   allocated in slot N, suitable for diagnostics.  */
26304 +char const *
26305 +quote_n (int n, char const *name)
26306 +{
26307 +  return quotearg_n_style (n, locale_quoting_style, name);
26308 +}
26309 +
26310 +/* Return an unambiguous printable representation of NAME,
26311 +   suitable for diagnostics.  */
26312 +char const *
26313 +quote (char const *name)
26314 +{
26315 +  return quote_n (0, name);
26316 +}
26317 diff -urNd -urNd patch-2.5.4/quote.h patch-2.5.9/quote.h
26318 --- patch-2.5.4/quote.h 1969-12-31 19:00:00.000000000 -0500
26319 +++ patch-2.5.9/quote.h 2002-11-23 02:23:50.000000000 -0500
26320 @@ -0,0 +1,28 @@
26321 +/* quote.h - prototypes for quote.c
26322 +   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
26323 +
26324 +   This program is free software; you can redistribute it and/or modify
26325 +   it under the terms of the GNU General Public License as published by
26326 +   the Free Software Foundation; either version 2, or (at your option)
26327 +   any later version.
26328 +
26329 +   This program is distributed in the hope that it will be useful,
26330 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
26331 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26332 +   GNU General Public License for more details.
26333 +
26334 +   You should have received a copy of the GNU General Public License
26335 +   along with this program; if not, write to the Free Software Foundation,
26336 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
26337 +
26338 +
26339 +#ifndef PARAMS
26340 +# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
26341 +#  define PARAMS(Args) Args
26342 +# else
26343 +#  define PARAMS(Args) ()
26344 +# endif
26345 +#endif
26346 +
26347 +char const *quote_n PARAMS ((int n, char const *name));
26348 +char const *quote PARAMS ((char const *name));
26349 diff -urNd -urNd patch-2.5.4/README patch-2.5.9/README
26350 --- patch-2.5.4/README  1997-05-26 01:34:43.000000000 -0400
26351 +++ patch-2.5.9/README  2002-06-03 00:51:09.000000000 -0400
26352 @@ -5,16 +5,16 @@
26353   * making GNU Emacs-style backup files
26354   * improved interaction with RCS and SCCS
26355   * the GNU conventions for option parsing and configuring and compilation.
26356 - * better POSIX.2 compliance
26357 + * better POSIX compliance
26358  They also fix some bugs.  See the NEWS and ChangeLog files for details.
26359  
26360  Tutorial-style documentation for patch is included in the GNU
26361 -diffutils package.  Unfortunately, the diffutils 2.7 documentation
26362 -for `patch' is obsolete; this should be fixed in diffutils 2.8.
26363 -In the mean time, see `patch --help', or consult the man page
26364 -in this distribution.
26365 +Diffutils package; get GNU Diffutils 2.8 or later for up-to-date
26366 +documentation for patch.
26367  
26368  For GNU and Unix build and installation instructions, see the file INSTALL.
26369 +Use `configure --disable-largefile' to disable large file support;
26370 +this is reportedly necessary on Red Hat GNU/Linux 6.0 to avoid a C library bug.
26371  For MS-DOS using DJGPP tools, see the file pc/djgpp/README.
26372  For other systems, copy config.hin to config.h and change
26373  #undef statements in it to #define as appropriate for your system,
26374 @@ -22,7 +22,7 @@
26375  enclosed in @ signs as appropriate for your system.
26376  
26377  Please send bug reports for this version of patch to
26378 -bug-gnu-utils@prep.ai.mit.edu.
26379 +<bug-patch@gnu.org>.
26380  
26381  The Free Software Foundation is distributing this version of patch
26382  independently because as of this writing, Larry Wall has not released a
26383 @@ -33,8 +33,10 @@
26384  
26385  ------
26386  
26387 -Copyright 1984, 1985, 1986, 1987, 1988 Larry Wall
26388 -Copyright 1989, 1990, 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
26389 +Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall
26390 +
26391 +Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1999, 2002 Free
26392 +Software Foundation, Inc.
26393  
26394  This program is free software: you can redistribute it and/or modify
26395  it under the terms of the GNU General Public License as published by
26396 diff -urNd -urNd patch-2.5.4/rename.c patch-2.5.9/rename.c
26397 --- patch-2.5.4/rename.c        1999-03-29 18:56:19.000000000 -0500
26398 +++ patch-2.5.9/rename.c        1969-12-31 19:00:00.000000000 -0500
26399 @@ -1,113 +0,0 @@
26400 -/* BSD compatible rename and directory rename function for System V.
26401 -   Copyright (C) 1988, 1990 Free Software Foundation, Inc.
26402 -
26403 -   This program is free software; you can redistribute it and/or modify
26404 -   it under the terms of the GNU General Public License as published by
26405 -   the Free Software Foundation; either version 2, or (at your option)
26406 -   any later version.
26407 -
26408 -   This program is distributed in the hope that it will be useful,
26409 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
26410 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26411 -   GNU General Public License for more details.
26412 -
26413 -   You should have received a copy of the GNU General Public License
26414 -   along with this program; if not, write to the Free Software Foundation,
26415 -   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
26416 -
26417 -#if HAVE_CONFIG_H
26418 -# include <config.h>
26419 -#endif
26420 -
26421 -#include <sys/types.h>
26422 -#include <sys/stat.h>
26423 -#include <errno.h>
26424 -#ifndef errno
26425 -extern int errno;
26426 -#endif
26427 -
26428 -#if STAT_MACROS_BROKEN
26429 -# undef S_ISDIR
26430 -#endif
26431 -
26432 -#if !defined(S_ISDIR) && defined(S_IFDIR)
26433 -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
26434 -#endif
26435 -
26436 -/* Rename file FROM to file TO.
26437 -   Return 0 if successful, -1 if not. */
26438 -
26439 -int
26440 -rename (char *from, char *to)
26441 -{
26442 -  struct stat from_stats, to_stats;
26443 -
26444 -  if (stat (from, &from_stats))
26445 -    return -1;
26446 -
26447 -  /* Be careful not to unlink `from' if it happens to be equal to `to' or
26448 -     (on filesystems that silently truncate filenames after 14 characters)
26449 -     if `from' and `to' share the significant characters. */
26450 -  if (stat (to, &to_stats))
26451 -    {
26452 -      if (errno != ENOENT)
26453 -        return -1;
26454 -    }
26455 -  else
26456 -    {
26457 -      if ((from_stats.st_dev == to_stats.st_dev)
26458 -          && (from_stats.st_ino == to_stats.st_ino))
26459 -        /* `from' and `to' designate the same file on that filesystem. */
26460 -        return 0;
26461 -
26462 -      if (unlink (to) && errno != ENOENT)
26463 -        return -1;
26464 -    }
26465 -
26466 -#ifdef MVDIR
26467 -
26468 -/* If MVDIR is defined, it should be the full filename of a setuid root
26469 -   program able to link and unlink directories.  If MVDIR is not defined,
26470 -   then the capability of renaming directories may be missing.  */
26471 -
26472 -  if (S_ISDIR (from_stats.st_mode))
26473 -    {
26474 -      /* Need a setuid root process to link and unlink directories. */
26475 -      int status;
26476 -      pid_t pid = fork ();
26477 -      switch (pid)
26478 -       {
26479 -       case -1:                /* Error. */
26480 -         return -1;            /* errno already set */
26481 -
26482 -       case 0:                 /* Child. */
26483 -         execl (MVDIR, "mvdir", from, to, (char *) 0);
26484 -         _exit (1);
26485 -
26486 -       default:                /* Parent. */
26487 -         while (wait (&status) != pid)
26488 -           /* Do nothing. */ ;
26489 -
26490 -         if (status)
26491 -           {
26492 -             /* MVDIR failed.  */
26493 -             errno = EIO;
26494 -             return -1;
26495 -           }
26496 -       }
26497 -    }
26498 -  else
26499 -
26500 -#endif /* MVDIR */
26501 -
26502 -    {
26503 -      if (link (from, to))
26504 -       return -1;
26505 -      if (unlink (from) && errno != ENOENT)
26506 -       {
26507 -         unlink (to);
26508 -         return -1;
26509 -       }
26510 -    }
26511 -  return 0;
26512 -}
26513 diff -urNd -urNd patch-2.5.4/stdbool.h.in patch-2.5.9/stdbool.h.in
26514 --- patch-2.5.4/stdbool.h.in    1969-12-31 19:00:00.000000000 -0500
26515 +++ patch-2.5.9/stdbool.h.in    2003-01-09 08:35:14.000000000 -0500
26516 @@ -0,0 +1,47 @@
26517 +/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
26518 +   Written by Bruno Haible <haible@clisp.cons.org>, 2001.
26519 +
26520 +   This program is free software; you can redistribute it and/or modify
26521 +   it under the terms of the GNU General Public License as published by
26522 +   the Free Software Foundation; either version 2, or (at your option)
26523 +   any later version.
26524 +
26525 +   This program is distributed in the hope that it will be useful,
26526 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
26527 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26528 +   GNU General Public License for more details.
26529 +
26530 +   You should have received a copy of the GNU General Public License
26531 +   along with this program; if not, write to the Free Software Foundation,
26532 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
26533 +
26534 +#ifndef _STDBOOL_H
26535 +#define _STDBOOL_H
26536 +
26537 +/* ISO C 99 <stdbool.h> for platforms that lack it.  */
26538 +
26539 +/* 7.16. Boolean type and values */
26540 +
26541 +/* BeOS <sys/socket.h> already #defines false 0, true 1.  We use the same
26542 +   definitions below, but temporarily we have to #undef them.  */
26543 +#ifdef __BEOS__
26544 +# undef false
26545 +# undef true
26546 +#endif
26547 +
26548 +/* For the sake of symbolic names in gdb, define _Bool as an enum type.  */
26549 +#ifndef __cplusplus
26550 +# if !@HAVE__BOOL@
26551 +typedef enum { false = 0, true = 1 } _Bool;
26552 +# endif
26553 +#else
26554 +typedef bool _Bool;
26555 +#endif
26556 +#define bool _Bool
26557 +
26558 +/* The other macros must be usable in preprocessor directives.  */
26559 +#define false 0
26560 +#define true 1
26561 +#define __bool_true_false_are_defined 1
26562 +
26563 +#endif /* _STDBOOL_H */
26564 diff -urNd -urNd patch-2.5.4/strcasecmp.c patch-2.5.9/strcasecmp.c
26565 --- patch-2.5.4/strcasecmp.c    1969-12-31 19:00:00.000000000 -0500
26566 +++ patch-2.5.9/strcasecmp.c    2000-08-07 11:48:18.000000000 -0400
26567 @@ -0,0 +1,66 @@
26568 +/* strcasecmp.c -- case insensitive string comparator
26569 +   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
26570 +
26571 +   This program is free software; you can redistribute it and/or modify
26572 +   it under the terms of the GNU General Public License as published by
26573 +   the Free Software Foundation; either version 2, or (at your option)
26574 +   any later version.
26575 +
26576 +   This program is distributed in the hope that it will be useful,
26577 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
26578 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26579 +   GNU General Public License for more details.
26580 +
26581 +   You should have received a copy of the GNU General Public License
26582 +   along with this program; if not, write to the Free Software Foundation,
26583 +   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
26584 +
26585 +#if HAVE_CONFIG_H
26586 +# include <config.h>
26587 +#endif
26588 +
26589 +#ifdef LENGTH_LIMIT
26590 +# define STRXCASECMP_FUNCTION strncasecmp
26591 +# define STRXCASECMP_DECLARE_N , size_t n
26592 +# define LENGTH_LIMIT_EXPR(Expr) Expr
26593 +#else
26594 +# define STRXCASECMP_FUNCTION strcasecmp
26595 +# define STRXCASECMP_DECLARE_N /* empty */
26596 +# define LENGTH_LIMIT_EXPR(Expr) 0
26597 +#endif
26598 +
26599 +#include <sys/types.h>
26600 +#include <ctype.h>
26601 +
26602 +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
26603 +
26604 +/* Compare {{no more than N characters of }}strings S1 and S2,
26605 +   ignoring case, returning less than, equal to or
26606 +   greater than zero if S1 is lexicographically less
26607 +   than, equal to or greater than S2.  */
26608 +
26609 +int
26610 +STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
26611 +{
26612 +  register const unsigned char *p1 = (const unsigned char *) s1;
26613 +  register const unsigned char *p2 = (const unsigned char *) s2;
26614 +  unsigned char c1, c2;
26615 +
26616 +  if (p1 == p2 || LENGTH_LIMIT_EXPR (n == 0))
26617 +    return 0;
26618 +
26619 +  do
26620 +    {
26621 +      c1 = TOLOWER (*p1);
26622 +      c2 = TOLOWER (*p2);
26623 +
26624 +      if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
26625 +       break;
26626 +
26627 +      ++p1;
26628 +      ++p2;
26629 +    }
26630 +  while (c1 == c2);
26631 +
26632 +  return c1 - c2;
26633 +}
26634 diff -urNd -urNd patch-2.5.4/strncasecmp.c patch-2.5.9/strncasecmp.c
26635 --- patch-2.5.4/strncasecmp.c   1969-12-31 19:00:00.000000000 -0500
26636 +++ patch-2.5.9/strncasecmp.c   1999-01-02 10:55:44.000000000 -0500
26637 @@ -0,0 +1,2 @@
26638 +#define LENGTH_LIMIT
26639 +#include "strcasecmp.c"
26640 diff -urNd -urNd patch-2.5.4/unlocked-io.h patch-2.5.9/unlocked-io.h
26641 --- patch-2.5.4/unlocked-io.h   1969-12-31 19:00:00.000000000 -0500
26642 +++ patch-2.5.9/unlocked-io.h   2002-12-04 15:51:07.000000000 -0500
26643 @@ -0,0 +1,90 @@
26644 +/* Prefer faster, non-thread-safe stdio functions if available.
26645 +
26646 +   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
26647 +
26648 +   This program is free software; you can redistribute it and/or modify it
26649 +   under the terms of the GNU Library General Public License as published
26650 +   by the Free Software Foundation; either version 2, or (at your option)
26651 +   any later version.
26652 +
26653 +   This program is distributed in the hope that it will be useful,
26654 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
26655 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26656 +   Library General Public License for more details.
26657 +
26658 +   You should have received a copy of the GNU Library General Public
26659 +   License along with this program; if not, write to the Free Software
26660 +   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
26661 +   USA.  */
26662 +
26663 +/* Written by Jim Meyering.  */
26664 +
26665 +#ifndef UNLOCKED_IO_H
26666 +# define UNLOCKED_IO_H 1
26667 +
26668 +# ifndef USE_UNLOCKED_IO
26669 +#  define USE_UNLOCKED_IO 1
26670 +# endif
26671 +
26672 +# if USE_UNLOCKED_IO
26673 +
26674 +/* These are wrappers for functions/macros from GNU libc.
26675 +   The standard I/O functions are thread-safe.  These *_unlocked ones are
26676 +   more efficient but not thread-safe.  That they're not thread-safe is
26677 +   fine since all of the applications in this package are single threaded.  */
26678 +
26679 +#  if HAVE_DECL_CLEARERR_UNLOCKED
26680 +#   undef clearerr
26681 +#   define clearerr(x) clearerr_unlocked (x)
26682 +#  endif
26683 +#  if HAVE_DECL_FEOF_UNLOCKED
26684 +#   undef feof
26685 +#   define feof(x) feof_unlocked (x)
26686 +#  endif
26687 +#  if HAVE_DECL_FERROR_UNLOCKED
26688 +#   undef ferror
26689 +#   define ferror(x) ferror_unlocked (x)
26690 +#  endif
26691 +#  if HAVE_DECL_FFLUSH_UNLOCKED
26692 +#   undef fflush
26693 +#   define fflush(x) fflush_unlocked (x)
26694 +#  endif
26695 +#  if HAVE_DECL_FGETS_UNLOCKED
26696 +#   undef fgets
26697 +#   define fgets(x,y,z) fgets_unlocked (x,y,z)
26698 +#  endif
26699 +#  if HAVE_DECL_FPUTC_UNLOCKED
26700 +#   undef fputc
26701 +#   define fputc(x,y) fputc_unlocked (x,y)
26702 +#  endif
26703 +#  if HAVE_DECL_FPUTS_UNLOCKED
26704 +#   undef fputs
26705 +#   define fputs(x,y) fputs_unlocked (x,y)
26706 +#  endif
26707 +#  if HAVE_DECL_FREAD_UNLOCKED
26708 +#   undef fread
26709 +#   define fread(w,x,y,z) fread_unlocked (w,x,y,z)
26710 +#  endif
26711 +#  if HAVE_DECL_FWRITE_UNLOCKED
26712 +#   undef fwrite
26713 +#   define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
26714 +#  endif
26715 +#  if HAVE_DECL_GETC_UNLOCKED
26716 +#   undef getc
26717 +#   define getc(x) getc_unlocked (x)
26718 +#  endif
26719 +#  if HAVE_DECL_GETCHAR_UNLOCKED
26720 +#   undef getchar
26721 +#   define getchar() getchar_unlocked ()
26722 +#  endif
26723 +#  if HAVE_DECL_PUTC_UNLOCKED
26724 +#   undef putc
26725 +#   define putc(x,y) putc_unlocked (x,y)
26726 +#  endif
26727 +#  if HAVE_DECL_PUTCHAR_UNLOCKED
26728 +#   undef putchar
26729 +#   define putchar(x) putchar_unlocked (x)
26730 +#  endif
26731 +
26732 +# endif /* USE_UNLOCKED_IO */
26733 +#endif /* UNLOCKED_IO_H */
26734 diff -urNd -urNd patch-2.5.4/util.c patch-2.5.9/util.c
26735 --- patch-2.5.4/util.c  1999-08-30 02:20:08.000000000 -0400
26736 +++ patch-2.5.9/util.c  2003-05-20 10:04:53.000000000 -0400
26737 @@ -1,9 +1,11 @@
26738  /* utility functions for `patch' */
26739  
26740 -/* $Id: util.c,v 1.27 1999/08/30 06:20:08 eggert Exp $ */
26741 +/* $Id: util.c,v 1.36 2003/05/20 14:04:53 eggert Exp $ */
26742  
26743 -/* Copyright 1986 Larry Wall
26744 -   Copyright 1992, 1993, 1997-1998, 1999 Free Software Foundation, Inc.
26745 +/* Copyright (C) 1986 Larry Wall
26746 +
26747 +   Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
26748 +   Software Foundation, Inc.
26749  
26750     This program is free software; you can redistribute it and/or modify
26751     it under the terms of the GNU General Public License as published by
26752 @@ -23,7 +25,7 @@
26753  #define XTERN extern
26754  #include <common.h>
26755  #include <backupfile.h>
26756 -#include <basename.h>
26757 +#include <dirname.h>
26758  #include <quotearg.h>
26759  #include <quotesys.h>
26760  #include <version.h>
26761 @@ -43,23 +45,9 @@
26762  # define raise(sig) kill (getpid (), sig)
26763  #endif
26764  
26765 -#ifdef __STDC__
26766 -# include <stdarg.h>
26767 -# define vararg_start va_start
26768 -#else
26769 -# define vararg_start(ap,p) va_start (ap)
26770 -# if HAVE_VARARGS_H
26771 -#  include <varargs.h>
26772 -# else
26773 -   typedef char *va_list;
26774 -#  define va_dcl int va_alist;
26775 -#  define va_start(ap) ((ap) = (va_list) &va_alist)
26776 -#  define va_arg(ap, t) (((t *) ((ap) += sizeof (t)))  [-1])
26777 -#  define va_end(ap)
26778 -# endif
26779 -#endif
26780 +#include <stdarg.h>
26781  
26782 -static void makedirs PARAMS ((char *));
26783 +static void makedirs (char *);
26784  
26785  /* Move a file FROM (where *FROM_NEEDS_REMOVAL is nonzero if FROM
26786     needs removal when cleaning up at the end of execution)
26787 @@ -67,11 +55,11 @@
26788     If we must create TO, use MODE to create it.
26789     If FROM is null, remove TO (ignoring FROMSTAT).
26790     FROM_NEEDS_REMOVAL must be nonnull if FROM is nonnull.
26791 -   Back up TO if BACKUP is nonzero.  */
26792 +   Back up TO if BACKUP is true.  */
26793  
26794  void
26795  move_file (char const *from, int volatile *from_needs_removal,
26796 -          char *to, mode_t mode, int backup)
26797 +          char *to, mode_t mode, bool backup)
26798  {
26799    struct stat to_st;
26800    int to_errno = ! backup ? -1 : stat (to, &to_st) == 0 ? 0 : errno;
26801 @@ -152,11 +140,9 @@
26802         say ("Renaming file %s to %s\n",
26803              quotearg_n (0, from), quotearg_n (1, to));
26804  
26805 -      if (rename (from, to) == 0)
26806 -       *from_needs_removal = 0;
26807 -      else
26808 +      if (rename (from, to) != 0)
26809         {
26810 -         int to_dir_known_to_exist = 0;
26811 +         bool to_dir_known_to_exist = false;
26812  
26813           if (errno == ENOENT
26814               && (to_errno == -1 || to_errno == ENOENT))
26815 @@ -164,10 +150,7 @@
26816               makedirs (to);
26817               to_dir_known_to_exist = 1;
26818               if (rename (from, to) == 0)
26819 -               {
26820 -                 *from_needs_removal = 0;
26821 -                 return;
26822 -               }
26823 +               goto rename_succeeded;
26824             }
26825  
26826           if (errno == EXDEV)
26827 @@ -175,7 +158,7 @@
26828               if (! backup)
26829                 {
26830                   if (unlink (to) == 0)
26831 -                   to_dir_known_to_exist = 1;
26832 +                   to_dir_known_to_exist = true;
26833                   else if (errno != ENOENT)
26834                     pfatal ("Can't remove file %s", quotearg (to));
26835                 }
26836 @@ -188,6 +171,14 @@
26837           pfatal ("Can't rename file %s to %s",
26838                   quotearg_n (0, from), quotearg_n (1, to));
26839         }
26840 +
26841 +    rename_succeeded:
26842 +      /* Do not clear *FROM_NEEDS_REMOVAL if it's possible that the
26843 +        rename returned zero because FROM and TO are hard links to
26844 +        the same file.  */
26845 +      if (0 < to_errno
26846 +         || (to_errno == 0 && to_st.st_nlink <= 1))
26847 +       *from_needs_removal = 0;
26848      }
26849    else if (! backup)
26850      {
26851 @@ -255,23 +246,27 @@
26852  
26853  static char const CLEARTOOL_CO[] = "cleartool co -unr -nc ";
26854  
26855 +static char const PERFORCE_CO[] = "p4 edit ";
26856 +
26857  /* Return "RCS" if FILENAME is controlled by RCS,
26858     "SCCS" if it is controlled by SCCS,
26859 -   "ClearCase" if it is controlled by Clearcase, and 0 otherwise.
26860 -   READONLY is nonzero if we desire only readonly access to FILENAME.
26861 +   "ClearCase" if it is controlled by Clearcase,
26862 +   "Perforce" if it is controlled by Perforce,
26863 +   and 0 otherwise.
26864 +   READONLY is true if we desire only readonly access to FILENAME.
26865     FILESTAT describes FILENAME's status or is 0 if FILENAME does not exist.
26866     If successful and if GETBUF is nonzero, set *GETBUF to a command
26867     that gets the file; similarly for DIFFBUF and a command to diff the file
26868     (but set *DIFFBUF to 0 if the diff operation is meaningless).
26869     *GETBUF and *DIFFBUF must be freed by the caller.  */
26870  char const *
26871 -version_controller (char const *filename, int readonly,
26872 +version_controller (char const *filename, bool readonly,
26873                     struct stat const *filestat, char **getbuf, char **diffbuf)
26874  {
26875    struct stat cstat;
26876    char const *filebase = base_name (filename);
26877    char const *dotslash = *filename == '-' ? "./" : "";
26878 -  size_t dir_len = filebase - filename;
26879 +  size_t dirlen = filebase - filename;
26880    size_t filenamelen = strlen (filename);
26881    size_t maxfixlen = sizeof "SCCS/" - 1 + sizeof SCCSPREFIX - 1;
26882    size_t maxtrysize = filenamelen + maxfixlen + 1;
26883 @@ -285,8 +280,8 @@
26884  
26885    strcpy (trybuf, filename);
26886  
26887 -#define try1(f,a1)    (sprintf (trybuf + dir_len, f, a1),    stat (trybuf, &cstat) == 0)
26888 -#define try2(f,a1,a2) (sprintf (trybuf + dir_len, f, a1,a2), stat (trybuf, &cstat) == 0)
26889 +#define try1(f,a1)    (sprintf (trybuf + dirlen, f, a1),    stat (trybuf, &cstat) == 0)
26890 +#define try2(f,a1,a2) (sprintf (trybuf + dirlen, f, a1,a2), stat (trybuf, &cstat) == 0)
26891  
26892    /* Check that RCS file is not working file.
26893       Some hosts don't report file name length errors.  */
26894 @@ -362,6 +357,23 @@
26895         *diffbuf = 0;
26896  
26897        r = "ClearCase";
26898 +     }
26899 +  else if (!readonly && filestat &&
26900 +           (getenv("P4PORT") || getenv("P4USER") || getenv("P4CONFIG")))
26901 +    {
26902 +      if (getbuf)
26903 +       {
26904 +         char *p = *getbuf = xmalloc (maxgetsize);
26905 +         strcpy (p, PERFORCE_CO);
26906 +         p += sizeof PERFORCE_CO - 1;
26907 +         p += quote_system_arg (p, filename);
26908 +         *p = '\0';
26909 +       }
26910 +
26911 +      if (diffbuf)
26912 +       *diffbuf = 0;
26913 +
26914 +      r = "Perforce";
26915      }
26916  
26917    free (trybuf);
26918 @@ -369,12 +381,12 @@
26919  }
26920  
26921  /* Get FILENAME from version control system CS.  The file already exists if
26922 -   EXISTS is nonzero.  Only readonly access is needed if READONLY is nonzero.
26923 +   EXISTS.  Only readonly access is needed if READONLY.
26924     Use the command GETBUF to actually get the named file.
26925     Store the resulting file status into *FILESTAT.
26926 -   Return nonzero if successful.  */
26927 -int
26928 -version_get (char const *filename, char const *cs, int exists, int readonly,
26929 +   Return true if successful.  */
26930 +bool
26931 +version_get (char const *filename, char const *cs, bool exists, bool readonly,
26932              char const *getbuf, struct stat *filestat)
26933  {
26934    if (patch_get < 0)
26935 @@ -460,7 +472,7 @@
26936         *--p = '0' + (int) (n % 10);
26937        while ((n /= 10) != 0);
26938      }
26939 -          
26940 +
26941    return p;
26942  }
26943  
26944 @@ -490,7 +502,7 @@
26945  {
26946    va_list args;
26947    fprintf (stderr, "%s: **** ", program_name);
26948 -  vararg_start (args, format);
26949 +  va_start (args, format);
26950    vfprintf (stderr, format, args);
26951    va_end (args);
26952    putc ('\n', stderr);
26953 @@ -524,7 +536,7 @@
26954    int errnum = errno;
26955    va_list args;
26956    fprintf (stderr, "%s: **** ", program_name);
26957 -  vararg_start (args, format);
26958 +  va_start (args, format);
26959    vfprintf (stderr, format, args);
26960    va_end (args);
26961    fflush (stderr); /* perror bypasses stdio on some hosts.  */
26962 @@ -540,7 +552,7 @@
26963  say (char const *format, ...)
26964  {
26965    va_list args;
26966 -  vararg_start (args, format);
26967 +  va_start (args, format);
26968    vfprintf (stdout, format, args);
26969    va_end (args);
26970    fflush (stdout);
26971 @@ -555,7 +567,7 @@
26972    int r;
26973    va_list args;
26974  
26975 -  vararg_start (args, format);
26976 +  va_start (args, format);
26977    vfprintf (stdout, format, args);
26978    va_end (args);
26979    fflush (stdout);
26980 @@ -566,7 +578,8 @@
26981          since it's unlikely that stdout will be seen by the tty user.
26982          The isatty test also works around a bug in GNU Emacs 19.34 under Linux
26983          which makes a call-process `patch' hang when it reads from /dev/tty.
26984 -        POSIX.2 requires that we read /dev/tty, though.  */
26985 +        POSIX.1-2001 XCU line 26599 requires that we read /dev/tty,
26986 +        though.  */
26987        ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
26988                ? open (TTY_DEVICE, O_RDONLY)
26989                : -1);
26990 @@ -607,15 +620,15 @@
26991  
26992  /* Return nonzero if it OK to reverse a patch.  */
26993  
26994 -int
26995 +bool
26996  ok_to_reverse (char const *format, ...)
26997  {
26998 -  int r = 0;
26999 +  bool r = false;
27000  
27001    if (noreverse || ! (force && verbosity == SILENT))
27002      {
27003        va_list args;
27004 -      vararg_start (args, format);
27005 +      va_start (args, format);
27006        vfprintf (stdout, format, args);
27007        va_end (args);
27008      }
27009 @@ -623,19 +636,17 @@
27010    if (noreverse)
27011      {
27012        printf ("  Skipping patch.\n");
27013 -      skip_rest_of_patch = TRUE;
27014 -      r = 0;
27015 +      skip_rest_of_patch = true;
27016      }
27017    else if (force)
27018      {
27019        if (verbosity != SILENT)
27020         printf ("  Applying it anyway.\n");
27021 -      r = 0;
27022      }
27023    else if (batch)
27024      {
27025        say (reverse ? "  Ignoring -R.\n" : "  Assuming -R.\n");
27026 -      r = 1;
27027 +      r = true;
27028      }
27029    else
27030      {
27031 @@ -648,7 +659,7 @@
27032             {
27033               if (verbosity != SILENT)
27034                 say ("Skipping patch.\n");
27035 -             skip_rest_of_patch = TRUE;
27036 +             skip_rest_of_patch = true;
27037             }
27038         }
27039      }
27040 @@ -711,7 +722,7 @@
27041  static sigset_t signals_to_block;
27042  
27043  #if ! HAVE_SIGACTION
27044 -static RETSIGTYPE fatal_exit_handler PARAMS ((int)) __attribute__ ((noreturn));
27045 +static RETSIGTYPE fatal_exit_handler (int) __attribute__ ((noreturn));
27046  static RETSIGTYPE
27047  fatal_exit_handler (int sig)
27048  {
27049 @@ -721,7 +732,7 @@
27050  #endif
27051  
27052  void
27053 -set_signals (int reset)
27054 +set_signals (bool reset)
27055  {
27056    int i;
27057  #if HAVE_SIGACTION
27058 @@ -743,7 +754,7 @@
27059        sigemptyset (&signals_to_block);
27060        for (i = 0;  i < NUM_SIGS;  i++)
27061         {
27062 -         int ignoring_signal;
27063 +         bool ignoring_signal;
27064  #if HAVE_SIGACTION
27065           if (sigaction (sigs[i], (struct sigaction *) 0, &initial_act) != 0)
27066             continue;
27067 @@ -939,7 +950,13 @@
27068           }
27069         else if (ISSPACE ((unsigned char) *t))
27070           {
27071 +           /* Allow file names with internal spaces,
27072 +              but only if a tab separates the file name from the date.  */
27073             char const *u = t;
27074 +           while (*u != '\t' && ISSPACE ((unsigned char) u[1]))
27075 +             u++;
27076 +           if (*u != '\t' && strchr (u + 1, '\t'))
27077 +             continue;
27078  
27079             if (set_time | set_utc)
27080               stamp = str2time (&u, initial_time,
27081 diff -urNd -urNd patch-2.5.4/util.h patch-2.5.9/util.h
27082 --- patch-2.5.4/util.h  1999-08-30 02:20:08.000000000 -0400
27083 +++ patch-2.5.9/util.h  2003-05-20 09:56:48.000000000 -0400
27084 @@ -1,6 +1,26 @@
27085  /* utility functions for `patch' */
27086  
27087 -/* $Id: util.h,v 1.17 1999/08/30 06:20:08 eggert Exp $ */
27088 +/* $Id: util.h,v 1.20 2003/05/20 13:56:48 eggert Exp $ */
27089 +
27090 +/* Copyright (C) 1986 Larry Wall
27091 +
27092 +   Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
27093 +   Software Foundation, Inc.
27094 +
27095 +   This program is free software; you can redistribute it and/or modify
27096 +   it under the terms of the GNU General Public License as published by
27097 +   the Free Software Foundation; either version 2, or (at your option)
27098 +   any later version.
27099 +
27100 +   This program is distributed in the hope that it will be useful,
27101 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
27102 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27103 +   GNU General Public License for more details.
27104 +
27105 +   You should have received a copy of the GNU General Public License
27106 +   along with this program; see the file COPYING.
27107 +   If not, write to the Free Software Foundation,
27108 +   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
27109  
27110  /* An upper bound on the print length of a signed decimal line number.
27111     Add one for the sign.  */
27112 @@ -8,32 +28,32 @@
27113  
27114  XTERN enum backup_type backup_type;
27115  
27116 -int ok_to_reverse PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
27117 -void ask PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
27118 -void say PARAMS ((char const *, ...)) __attribute__ ((format (printf, 1, 2)));
27119 +bool ok_to_reverse (char const *, ...) __attribute__ ((format (printf, 1, 2)));
27120 +void ask (char const *, ...) __attribute__ ((format (printf, 1, 2)));
27121 +void say (char const *, ...) __attribute__ ((format (printf, 1, 2)));
27122  
27123 -void fatal PARAMS ((char const *, ...))
27124 +void fatal (char const *, ...)
27125         __attribute__ ((noreturn, format (printf, 1, 2)));
27126 -void pfatal PARAMS ((char const *, ...))
27127 +void pfatal (char const *, ...)
27128         __attribute__ ((noreturn, format (printf, 1, 2)));
27129  
27130 -char *fetchname PARAMS ((char *, int, time_t *));
27131 -char *savebuf PARAMS ((char const *, size_t));
27132 -char *savestr PARAMS ((char const *));
27133 -char const *version_controller PARAMS ((char const *, int, struct stat const *, char **, char **));
27134 -int version_get PARAMS ((char const *, char const *, int, int, char const *, struct stat *));
27135 -int create_file PARAMS ((char const *, int, mode_t));
27136 -int systemic PARAMS ((char const *));
27137 -char *format_linenum PARAMS ((char[LINENUM_LENGTH_BOUND + 1], LINENUM));
27138 -void Fseek PARAMS ((FILE *, file_offset, int));
27139 -void copy_file PARAMS ((char const *, char const *, int, mode_t));
27140 -void exit_with_signal PARAMS ((int)) __attribute__ ((noreturn));
27141 -void ignore_signals PARAMS ((void));
27142 -void init_time PARAMS ((void));
27143 -void memory_fatal PARAMS ((void)) __attribute__ ((noreturn));
27144 -void move_file PARAMS ((char const *, int volatile *, char *, mode_t, int));
27145 -void read_fatal PARAMS ((void)) __attribute__ ((noreturn));
27146 -void remove_prefix PARAMS ((char *, size_t));
27147 -void removedirs PARAMS ((char *));
27148 -void set_signals PARAMS ((int));
27149 -void write_fatal PARAMS ((void)) __attribute__ ((noreturn));
27150 +char *fetchname (char *, int, time_t *);
27151 +char *savebuf (char const *, size_t);
27152 +char *savestr (char const *);
27153 +char const *version_controller (char const *, bool, struct stat const *, char **, char **);
27154 +bool version_get (char const *, char const *, bool, bool, char const *, struct stat *);
27155 +int create_file (char const *, int, mode_t);
27156 +int systemic (char const *);
27157 +char *format_linenum (char[LINENUM_LENGTH_BOUND + 1], LINENUM);
27158 +void Fseek (FILE *, file_offset, int);
27159 +void copy_file (char const *, char const *, int, mode_t);
27160 +void exit_with_signal (int) __attribute__ ((noreturn));
27161 +void ignore_signals (void);
27162 +void init_time (void);
27163 +void memory_fatal (void) __attribute__ ((noreturn));
27164 +void move_file (char const *, int volatile *, char *, mode_t, bool);
27165 +void read_fatal (void) __attribute__ ((noreturn));
27166 +void remove_prefix (char *, size_t);
27167 +void removedirs (char *);
27168 +void set_signals (bool);
27169 +void write_fatal (void) __attribute__ ((noreturn));
27170 diff -urNd -urNd patch-2.5.4/version.c patch-2.5.9/version.c
27171 --- patch-2.5.4/version.c       1999-08-30 02:20:08.000000000 -0400
27172 +++ patch-2.5.9/version.c       2003-05-18 04:25:17.000000000 -0400
27173 @@ -1,17 +1,16 @@
27174  /* Print the version number.  */
27175  
27176 -/* $Id: version.c,v 1.7 1999/08/30 06:20:08 eggert Exp $ */
27177 +/* $Id: version.c,v 1.13 2003/05/18 08:25:17 eggert Exp $ */
27178  
27179  #define XTERN extern
27180  #include <common.h>
27181  #undef XTERN
27182  #define XTERN
27183 -#include <patchlevel.h>
27184  #include <version.h>
27185  
27186  static char const copyright_string[] = "\
27187 -Copyright 1984-1988 Larry Wall\n\
27188 -Copyright 1989-1999 Free Software Foundation, Inc.";
27189 +Copyright (C) 1988 Larry Wall\n\
27190 +Copyright (C) 2003 Free Software Foundation, Inc.";
27191  
27192  static char const free_software_msgid[] = "\
27193  This program comes with NO WARRANTY, to the extent permitted by law.\n\
27194 @@ -25,6 +24,6 @@
27195  void
27196  version (void)
27197  {
27198 -  printf ("%s %s\n%s\n\n%s\n\n%s\n", program_name, PATCH_VERSION,
27199 +  printf ("%s %s\n%s\n\n%s\n\n%s\n", PACKAGE_NAME, PACKAGE_VERSION,
27200           copyright_string, free_software_msgid, authorship_msgid);
27201  }
27202 diff -urNd -urNd patch-2.5.4/version.h patch-2.5.9/version.h
27203 --- patch-2.5.4/version.h       1997-04-06 21:07:00.000000000 -0400
27204 +++ patch-2.5.9/version.h       2002-05-28 03:24:05.000000000 -0400
27205 @@ -1,5 +1,5 @@
27206  /* Print the version number.  */
27207  
27208 -/* $Id: version.h,v 1.3 1997/04/07 01:07:00 eggert Exp $ */
27209 +/* $Id: version.h,v 1.5 2002/05/28 07:24:05 eggert Exp $ */
27210  
27211 -void version PARAMS ((void));
27212 +void version (void);
27213 diff -urNd -urNd patch-2.5.4/xalloc.h patch-2.5.9/xalloc.h
27214 --- patch-2.5.4/xalloc.h        1999-01-01 12:36:43.000000000 -0500
27215 +++ patch-2.5.9/xalloc.h        2000-10-31 02:09:56.000000000 -0500
27216 @@ -1,5 +1,5 @@
27217  /* xalloc.h -- malloc with out-of-memory checking
27218 -   Copyright (C) 1990-1998, 1999 Free Software Foundation, Inc.
27219 +   Copyright (C) 1990-1998, 1999, 2000 Free Software Foundation, Inc.
27220  
27221     This program is free software; you can redistribute it and/or modify
27222     it under the terms of the GNU General Public License as published by
27223 @@ -26,6 +26,16 @@
27224  #  endif
27225  # endif
27226  
27227 +# ifndef __attribute__
27228 +#  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
27229 +#   define __attribute__(x)
27230 +#  endif
27231 +# endif
27232 +
27233 +# ifndef ATTRIBUTE_NORETURN
27234 +#  define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
27235 +# endif
27236 +
27237  /* Exit value when the requested amount of memory is not available.
27238     It is initialized to EXIT_FAILURE, but the caller may set it to
27239     some other value.  */
27240 @@ -33,20 +43,45 @@
27241  
27242  /* If this pointer is non-zero, run the specified function upon each
27243     allocation failure.  It is initialized to zero. */
27244 -extern void (*xalloc_fail_func) ();
27245 +extern void (*xalloc_fail_func) PARAMS ((void));
27246  
27247  /* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
27248 -   message must be non-NULL.  It is translated via gettext.
27249 -   The default value is "Memory exhausted".  */
27250 -extern char *const xalloc_msg_memory_exhausted;
27251 +   message is output.  It is translated via gettext.
27252 +   Its value is "memory exhausted".  */
27253 +extern char const xalloc_msg_memory_exhausted[];
27254 +
27255 +/* This function is always triggered when memory is exhausted.  It is
27256 +   in charge of honoring the three previous items.  This is the
27257 +   function to call when one wants the program to die because of a
27258 +   memory allocation failure.  */
27259 +extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
27260  
27261  void *xmalloc PARAMS ((size_t n));
27262  void *xcalloc PARAMS ((size_t n, size_t s));
27263  void *xrealloc PARAMS ((void *p, size_t n));
27264 +char *xstrdup PARAMS ((const char *str));
27265 +
27266 +# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
27267 +# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
27268 +# define XREALLOC(Ptr, Type, N_items) \
27269 +  ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
27270 +
27271 +/* Declare and alloc memory for VAR of type TYPE. */
27272 +# define NEW(Type, Var)  Type *(Var) = XMALLOC (Type, 1)
27273 +
27274 +/* Free VAR only if non NULL. */
27275 +# define XFREE(Var)    \
27276 +   do {                 \
27277 +      if (Var)          \
27278 +        free (Var);     \
27279 +   } while (0)
27280 +
27281 +/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
27282 +# define CCLONE(Src, Num) \
27283 +  (memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
27284 +
27285 +/* Return a malloc'ed copy of SRC. */
27286 +# define CLONE(Src) CCLONE (Src, 1)
27287  
27288 -# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
27289 -# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
27290 -# define XREALLOC(Ptr, Type, N_bytes) \
27291 -  ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
27292  
27293  #endif /* !XALLOC_H_ */
27294 diff -urNd -urNd patch-2.5.4/xmalloc.c patch-2.5.9/xmalloc.c
27295 --- patch-2.5.4/xmalloc.c       1999-04-18 22:43:16.000000000 -0400
27296 +++ patch-2.5.9/xmalloc.c       2002-11-21 14:16:29.000000000 -0500
27297 @@ -1,5 +1,5 @@
27298  /* xmalloc.c -- malloc with out of memory checking
27299 -   Copyright (C) 1990-1997, 98, 99 Free Software Foundation, Inc.
27300 +   Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc.
27301  
27302     This program is free software; you can redistribute it and/or modify
27303     it under the terms of the GNU General Public License as published by
27304 @@ -30,14 +30,9 @@
27305  void free ();
27306  #endif
27307  
27308 -#if ENABLE_NLS
27309 -# include <libintl.h>
27310 -# define _(Text) gettext (Text)
27311 -#else
27312 -# define textdomain(Domain)
27313 -# define _(Text) Text
27314 -#endif
27315 -#define N_(Text) Text
27316 +#include "gettext.h"
27317 +#define _(msgid) gettext (msgid)
27318 +#define N_(msgid) msgid
27319  
27320  #include "error.h"
27321  #include "xalloc.h"
27322 @@ -46,12 +41,14 @@
27323  # define EXIT_FAILURE 1
27324  #endif
27325  
27326 -#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
27327 -you must run the autoconf test for a properly working malloc -- see malloc.m4
27328 +/* The following tests require AC_PREREQ(2.54).  */
27329 +
27330 +#ifndef HAVE_MALLOC
27331 +"you must run the autoconf test for a GNU libc compatible malloc"
27332  #endif
27333  
27334 -#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
27335 -you must run the autoconf test for a properly working realloc -- see realloc.m4
27336 +#ifndef HAVE_REALLOC
27337 +"you must run the autoconf test for a GNU libc compatible realloc"
27338  #endif
27339  
27340  /* Exit value when the requested amount of memory is not available.
27341 @@ -59,18 +56,22 @@
27342  int xalloc_exit_failure = EXIT_FAILURE;
27343  
27344  /* If non NULL, call this function when memory is exhausted. */
27345 -void (*xalloc_fail_func) () = 0;
27346 +void (*xalloc_fail_func) PARAMS ((void)) = 0;
27347  
27348  /* If XALLOC_FAIL_FUNC is NULL, or does return, display this message
27349     before exiting when memory is exhausted.  Goes through gettext. */
27350 -char *const xalloc_msg_memory_exhausted = N_("Memory exhausted");
27351 +char const xalloc_msg_memory_exhausted[] = N_("memory exhausted");
27352  
27353 -static void
27354 -xalloc_fail (void)
27355 +void
27356 +xalloc_die (void)
27357  {
27358    if (xalloc_fail_func)
27359      (*xalloc_fail_func) ();
27360    error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
27361 +  /* The `noreturn' cannot be given to error, since it may return if
27362 +     its first argument is 0.  To help compilers understand the
27363 +     xalloc_die does terminate, call exit. */
27364 +  exit (EXIT_FAILURE);
27365  }
27366  
27367  /* Allocate N bytes of memory dynamically, with error checking.  */
27368 @@ -82,20 +83,19 @@
27369  
27370    p = malloc (n);
27371    if (p == 0)
27372 -    xalloc_fail ();
27373 +    xalloc_die ();
27374    return p;
27375  }
27376  
27377  /* Change the size of an allocated block of memory P to N bytes,
27378 -   with error checking.
27379 -   If P is NULL, run xmalloc.  */
27380 +   with error checking.  */
27381  
27382  void *
27383  xrealloc (void *p, size_t n)
27384  {
27385    p = realloc (p, n);
27386    if (p == 0)
27387 -    xalloc_fail ();
27388 +    xalloc_die ();
27389    return p;
27390  }
27391  
27392 @@ -108,6 +108,6 @@
27393  
27394    p = calloc (n, s);
27395    if (p == 0)
27396 -    xalloc_fail ();
27397 +    xalloc_die ();
27398    return p;
27399  }