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
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.
9 -## ----------------------------------------- ##
10 -## ANSIfy the C compiler whenever possible. ##
11 -## From Franc,ois Pinard ##
12 -## ----------------------------------------- ##
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.
23 -# @defmac AC_PROG_CC_STDC
24 -# @maindex PROG_CC_STDC
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.
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.
37 +AC_DEFUN([gl_BACKUPFILE],
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
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
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
60 -# Don't try gcc -ansi; that turns off useful extensions and
61 -# breaks some systems' header files.
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__"
68 - CC="$ac_save_CC $ac_arg"
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)
83 -static char *f (char * (*g) (char **, int), char **p, ...)
88 - s = g (p, va_arg (v,int));
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);
99 -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
101 -[am_cv_prog_cc_stdc="$ac_arg"; break])
105 -if test -z "$am_cv_prog_cc_stdc"; then
106 - AC_MSG_RESULT([none needed])
108 - AC_MSG_RESULT($am_cv_prog_cc_stdc)
110 -case "x$am_cv_prog_cc_stdc" in
112 - *) CC="$CC $am_cv_prog_cc_stdc" ;;
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)
123 dnl From Jim Meyering.
125 dnl Check whether struct dirent has a member named d_ino.
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 @@
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.])
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.
153 -dnl From Paul Eggert.
154 +AC_DEFUN([gl_DIRNAME],
156 + dnl Prerequisites of lib/dirname.h.
157 + AC_REQUIRE([jm_AC_DOS])
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)
165 -AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
167 - AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
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. ])
179 + dnl Prerequisites of lib/basename.c.
180 + AC_REQUIRE([AC_HEADER_STDC])
181 + AC_CHECK_HEADERS_ONCE(string.h)
183 + dnl Prerequisites of lib/stripslash.c.
184 + AC_REQUIRE([AC_HEADER_STDC])
185 + AC_CHECK_HEADERS_ONCE(string.h)
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.
196 -dnl Written by Paul Eggert <eggert@twinsun.com>.
197 +# From Jim Meyering.
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
207 - [case "$host_os" in
208 - # IRIX 6.2 and later require cc -n32.
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
216 - CC="$CC $ac_cv_sys_largefile_CFLAGS"
217 - AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
221 +AC_DEFUN([jm_AC_DOS],
223 + AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
226 + [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
227 +neither MSDOS nor Windows
229 + [ac_cv_win_or_dos=yes],
230 + [ac_cv_win_or_dos=no])
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,
241 - *) $1=[$]$1' '$2 ;;
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
248 + ac_fs_accepts_drive_letter_prefix=0
249 + ac_fs_backslash_is_file_name_separator=0
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,
259 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
264 - $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
267 -changequote([, ])dnl
269 - if test "[$]$2" != no; then
270 - AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
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)
277 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
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.])
295 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
298 - -D_FILE_OFFSET_BITS=*) ;;
299 - -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
300 - -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
302 - AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
304 - AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
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 ;;
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 ;;
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 ;;
334 + AH_VERBATIM(ISSLASH,
335 + [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
336 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
338 +# define ISSLASH(C) ((C) == '/')
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.])
349 +AC_DEFUN([gl_ERROR],
351 + AC_FUNC_ERROR_AT_LINE
352 + dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
356 +# Prerequisites of lib/error.c.
357 +AC_DEFUN([jm_PREREQ_ERROR],
359 + AC_REQUIRE([AC_HEADER_STDC])
360 + AC_REQUIRE([AC_FUNC_VPRINTF])
361 + AC_CHECK_FUNCS(strerror)
362 + AC_CHECK_DECLS([strerror])
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.
373 +AC_DEFUN([gl_GETOPT],
375 + dnl Prerequisites of lib/getopt.c.
376 + AC_CHECK_HEADERS_ONCE(string.h)
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.
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.
391 -AC_DEFUN(jm_FUNC_MALLOC,
392 +AC_DEFUN([jm_FUNC_MALLOC],
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
405 - AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
411 - exit (malloc (0) ? 0 : 1);
413 +# Prerequisites of lib/malloc.c.
414 +AC_DEFUN([gl_PREREQ_MALLOC], [
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.
425 +dnl From Paul Eggert
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.
430 +AC_DEFUN([jm_FUNC_MBRTOWC],
432 + AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
433 + jm_cv_func_mbrtowc,
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.])
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.
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.
460 +AC_DEFUN([AC_TYPE_MBSTATE_T],
461 + [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
462 + [AC_COMPILE_IFELSE(
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.])
473 + AC_DEFINE([mbstate_t], int,
474 + [Define to a type if <wchar.h> does not define.])
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.
484 +AC_DEFUN([gl_FUNC_MEMCHR],
486 + AC_REPLACE_FUNCS(memchr)
487 + if test $ac_cv_func_memchr = no; then
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)
499 +dnl From Mumit Khan and Paul Eggert
500 +dnl Determine whether mkdir accepts only one argument instead of the usual two.
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
509 +#include <sys/types.h>
510 +#include <sys/stat.h>
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)
519 +#include <sys/types.h>
520 +#include <sys/stat.h>
523 + patch_cv_mkdir_takes_one_arg=yes
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.])
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.
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'
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
558 +dnl Autoconf version 2.57 or newer is recommended.
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], [
565 + AC_FOREACH([gl_HEADER_NAME], [$1], [
566 + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
568 + AC_CHECK_HEADERS(gl_HEADER_NAME)
570 + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
573 - if test $jm_cv_func_working_malloc = no; then
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.])
580 -## ------------------------------- ##
581 -## Check for function prototypes. ##
582 -## From Franc,ois Pinard ##
583 -## ------------------------------- ##
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], [
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]))
594 + AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
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
604 - AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
608 - U=_ ANSI2KNR=./ansi2knr
609 - # Ensure some checks needed by ansi2knr itself.
611 - AC_CHECK_HEADERS(string.h)
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], [
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]))
623 + AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
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.
635 +AC_DEFUN([gl_QUOTE],
637 + dnl Prerequisites of lib/quote.c.
638 + AC_CHECK_HEADERS_ONCE(stddef.h)
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.
648 +AC_DEFUN([gl_QUOTEARG],
650 + dnl Prerequisites of lib/quotearg.c.
651 + AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
652 + AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
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.
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.
669 -AC_DEFUN(jm_FUNC_REALLOC,
670 +AC_DEFUN([jm_FUNC_REALLOC],
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
683 - AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
689 - exit (realloc (0, 0) ? 0 : 1);
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)
697 - if test $jm_cv_func_working_realloc = no; then
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], [
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.
714 +AC_DEFUN([gl_FUNC_RMDIR],
716 + AC_REPLACE_FUNCS(rmdir)
717 + if test $ac_cv_func_rmdir = no; then
723 +# Prerequisites of lib/rmdir.c.
724 +AC_DEFUN([gl_PREREQ_RMDIR], [
725 + AC_REQUIRE([AC_HEADER_STAT])
729 +# Check for setmode, DOS style.
731 +# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
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.
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.
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
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],
755 + # include <fcntl.h>
758 + # include <unistd.h>
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.])
767 +# Check for stdbool.h that conforms to C99.
769 +# Copyright (C) 2002-2003 Free Software Foundation, Inc.
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.
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.
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
786 +# Prepare for substituting <stdbool.h> if it is not supported.
788 +AC_DEFUN([AM_STDBOOL_H],
790 + AC_REQUIRE([AC_HEADER_STDBOOL])
792 + # Define two additional variables used in the Makefile substitution.
794 + if test "$ac_cv_header_stdbool_h" = yes; then
797 + STDBOOL_H='stdbool.h'
799 + AC_SUBST([STDBOOL_H])
801 + if test "$ac_cv_type__Bool" = yes; then
806 + AC_SUBST([HAVE__BOOL])
809 +# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
810 +# have this macro built-in.
812 +AC_DEFUN([AC_HEADER_STDBOOL],
813 + [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
814 + [ac_cv_header_stdbool_h],
817 + #include <stdbool.h>
819 + "error: bool is not defined"
822 + "error: false is not defined"
825 + "error: false is not 0"
828 + "error: false is not defined"
831 + "error: true is not 1"
833 + #ifndef __bool_true_false_are_defined
834 + "error: __bool_true_false_are_defined is not defined"
837 + struct s { _Bool s: 1; _Bool t; } s;
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];
844 + char f[(_Bool) -0.0 == false ? 1 : -1];
846 + char h[sizeof (_Bool)];
847 + char i[sizeof s.t];
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.])
856 +#serial 7 -*- autoconf -*-
858 +dnl From Jim Meyering.
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).
866 +AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
868 + dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
870 + AC_REQUIRE([AC_GNU_SOURCE])
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])
880 dnl From Jim Meyering
883 dnl usually in <utime.h>.
884 dnl Some systems have utime.h but don't declare the struct anywhere.
886 -AC_DEFUN(jm_STRUCT_UTIMBUF,
887 +AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
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,
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. ])
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.
914 +AC_DEFUN([gl_XALLOC],
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])
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)
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
936 /* addext.c -- add an extension to a file name
937 - Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
939 + Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
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
945 # define HAVE_LONG_FILE_NAMES 0
948 -#include <backupfile.h>
957 -char *base_name PARAMS ((char const *));
963 +#include "backupfile.h"
964 +#include "dirname.h"
966 /* Append to FILENAME the extension EXT, unless the result would be too long,
967 in which case just append the character E. */
969 addext (char *filename, char const *ext, int e)
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;
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);
985 + if (_POSIX_NAME_MAX < slen + extlen || HAVE_DOS_FILE_NAMES)
989 - slen_max = pathconf (filename, _PC_NAME_MAX);
991 + /* The new base name is long enough to require a pathconf check. */
995 + name_max = pathconf (".", _PC_NAME_MAX);
1001 + name_max = pathconf (filename, _PC_NAME_MAX);
1004 + if (0 <= name_max || errno == 0)
1006 + long size = slen_max = name_max;
1007 + if (name_max != size)
1013 - slen_max = HAVE_LONG_FILE_NAMES ? 255 : 14;
1015 if (HAVE_DOS_FILE_NAMES && slen_max <= 12)
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
1021 -.TH ANSI2KNR 1 "19 Jan 1996"
1023 -ansi2knr \- convert ANSI C to Kernighan & Ritchie C
1026 -[--varargs] input_file [output_file]
1028 -If no output_file is supplied, output goes to stdout.
1030 -There are no error messages.
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.
1041 -The following constructs will confuse it:
1043 - - Any other construct that starts at the left margin and follows the
1044 -above syntax (such as a macro or function call).
1046 - - Some macros that tinker with the syntax of the function header.
1048 -The --varargs switch is obsolete, and is recognized only for
1049 -backwards compatibility. The present version of
1051 -will always attempt to convert a ... argument to va_alist and va_dcl.
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
1061 -/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */
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 */
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.
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
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.
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.
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.
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
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
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
1170 -/* Most of the conditionals here are to make ansi2knr work with */
1171 -/* or without the GNU configure machinery. */
1174 -# include <config.h>
1183 - For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
1184 - This will define HAVE_CONFIG_H and so, activate the following lines.
1187 -# if STDC_HEADERS || HAVE_STRING_H
1188 -# include <string.h>
1190 -# include <strings.h>
1193 -#else /* not HAVE_CONFIG_H */
1195 -/* Otherwise do it the hard way */
1198 -# include <strings.h>
1201 - extern int strlen(), strncmp();
1203 -# include <string.h>
1207 -#endif /* not HAVE_CONFIG_H */
1210 -# include <stdlib.h>
1213 - malloc and free should be declared in stdlib.h,
1214 - but if you've got a K&R compiler, they probably aren't.
1217 -# include <malloc.h>
1220 - extern char *malloc();
1221 - extern void free();
1223 - extern char *malloc();
1224 - extern int free();
1230 -/* Define NULL (for *very* old compilers). */
1236 - * The ctype macros don't always handle 8-bit characters correctly.
1237 - * Compensate for this here.
1240 -# undef HAVE_ISASCII /* just in case */
1241 -# define HAVE_ISASCII 1
1244 -#if STDC_HEADERS || !HAVE_ISASCII
1245 -# define is_ascii(c) 1
1247 -# define is_ascii(c) isascii(c)
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))
1254 -/* Scanning macros */
1255 -#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
1256 -#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
1258 -/* Forward references */
1260 -char *scanstring();
1265 -/* The main program */
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 */
1280 - "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
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.
1289 - int convert_varargs = 1;
1292 - while ( argc > 1 && argv[1][0] == '-' ) {
1293 - if ( !strcmp(argv[1], "--varargs") ) {
1294 - convert_varargs = 1;
1299 - if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
1300 - filename = argv[2];
1305 - fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
1307 - fprintf(stderr, usage);
1313 - fprintf(stderr, usage);
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);
1323 - /* falls through */
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]);
1331 - if ( filename == 0 )
1332 - filename = argv[1];
1333 - /* falls through */
1338 - fprintf(out, "#line 1 \"%s\"\n", filename);
1339 - buf = malloc(bufsize);
1340 - if ( buf == NULL )
1342 - fprintf(stderr, "Unable to allocate read buffer!\n");
1346 - while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
1348 -test: line += strlen(line);
1349 - switch ( test1(buf) )
1351 - case 2: /* a function header */
1352 - convert1(buf, out, 1, convert_varargs);
1354 - case 1: /* a function */
1355 - /* Check for a { at the start of the next line. */
1357 -f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
1359 - if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
1361 - switch ( *skipspace(more, 1) )
1364 - /* Definitely a function header. */
1365 - convert1(buf, out, 0, convert_varargs);
1369 - /* The next line was blank or a comment: */
1370 - /* keep scanning for a non-comment. */
1371 - line += strlen(line);
1374 - /* buf isn't a function header, but */
1375 - /* more might be. */
1377 - strcpy(buf, more);
1382 - case -1: /* maybe the start of a function */
1383 - if ( line != buf + (bufsize - 1) ) /* overflow check */
1385 - /* falls through */
1386 - default: /* not a function */
1387 -wl: fputs(buf, out);
1392 - if ( line != buf )
1395 - if ( output_name ) {
1396 - output_error = ferror(out);
1397 - output_error |= fclose(out);
1398 - } else { /* out == stdout */
1400 - output_error = ferror(out);
1402 - if ( output_error ) {
1403 - fprintf(stderr, "%s: error writing to %s\n", program_name,
1404 - (output_name ? output_name : "stdout"));
1407 - if ( in != stdin )
1412 -/* Skip over whitespace and comments, in either direction. */
1416 - register int dir; /* 1 for forward, -1 for backward */
1418 - { while ( is_space(*p) )
1420 - if ( !(*p == '/' && p[dir] == '*') )
1422 - p += dir; p += dir;
1423 - while ( !(*p == '*' && p[dir] == '/') )
1425 - return p; /* multi-line comment?? */
1428 - p += dir; p += dir;
1433 -/* Scan over a quoted string, in either direction. */
1439 - for (p += dir; ; p += dir)
1440 - if (*p == '"' && p[-dir] != '\\')
1445 - * Write blanks over part of a string.
1446 - * Don't overwrite end-of-line characters.
1449 -writeblanks(start, end)
1453 - for ( p = start; p < end; p++ )
1454 - if ( *p != '\r' && *p != '\n' )
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.
1475 -{ register char *p = buf;
1480 - if ( !isidfirstchar(*p) )
1481 - return 0; /* no name at left margin */
1482 - bend = skipspace(buf + strlen(buf) - 1, -1);
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;
1491 - while ( isidchar(*p) )
1494 - p = skipspace(p, 1);
1495 - if ( *p++ != '(' )
1496 - return 0; /* not a function */
1497 - p = skipspace(p, 1);
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
1510 - char **key = words;
1512 - unsigned len = endfn - buf;
1514 - while ( (kp = *key) != 0 )
1515 - { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
1516 - return 0; /* name is a keyword */
1524 - * Check for identifier1(identifier2) and not
1525 - * identifier1(void), or identifier1(identifier2, xxxx).
1528 - while ( isidchar(*p) )
1531 - p = skipspace(p, 1);
1533 - (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
1535 - return 0; /* not a function */
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.
1545 - for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
1546 - level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
1553 -/* Convert a recognized function definition or header to K&R syntax. */
1555 -convert1(buf, out, header, convert_varargs)
1558 - int header; /* Boolean */
1559 - int convert_varargs; /* Boolean */
1563 - * The breaks table contains pointers to the beginning and end
1564 - * of each argument.
1567 - unsigned num_breaks = 2; /* for testing */
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++) != '('; )
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");
1585 - btop = breaks + num_breaks * 2 - 2;
1587 - /* Parse the argument list */
1595 - { /* Filled up break table. */
1596 - /* Allocate a bigger one and start over. */
1597 - free((char *)breaks);
1602 - /* Find the end of the argument */
1603 - for ( ; end == NULL; p++ )
1607 - if ( !level ) end = p;
1610 - if ( !level ) lp = p;
1614 - if ( --level < 0 ) end = p;
1619 - p = skipspace(p, 1) - 1;
1622 - p = scanstring(p, 1) - 1;
1628 - /* Erase any embedded prototype parameters. */
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. */
1636 - { p = skipspace(p - 1, -1);
1639 - case ']': /* skip array dimension(s) */
1640 - case ')': /* skip procedure args OR name */
1645 - case ']': case ')':
1648 - case '[': case '(':
1652 - if (p > buf && p[-1] == '*')
1653 - p = skipspace(p, -1) + 1;
1656 - p = scanstring(p, -1) + 1;
1661 - if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
1662 - { /* We found the name being declared */
1663 - while ( !isidfirstchar(*p) )
1664 - p = skipspace(p, 1) + 1;
1672 -found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
1673 - { if ( convert_varargs )
1674 - { *bp++ = "va_alist";
1679 - if ( bp == breaks + 1 ) /* sole argument */
1680 - writeblanks(breaks[0], p);
1682 - writeblanks(bp[-1] - 1, p);
1687 - { while ( isidchar(*p) ) p--;
1692 - while ( *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);
1705 - /* Put out the function name and left parenthesis. */
1707 - while ( p != endfn ) putc(*p, out), p++;
1708 - /* Put out the declaration. */
1710 - { fputs(");", out);
1711 - for ( p = breaks[0]; *p; p++ )
1712 - if ( *p == '\r' || *p == '\n' )
1716 - { for ( ap = breaks+1; ap < bp; ap += 2 )
1718 - while ( isidchar(*p) )
1719 - putc(*p, out), p++;
1720 - if ( ap < bp - 1 )
1724 - /* Put out the argument declarations */
1725 - for ( ap = breaks+2; ap <= bp; ap += 2 )
1727 - if ( vararg != 0 )
1729 - fputs(breaks[0], out); /* any prior args */
1730 - fputs("va_dcl", out); /* the final arg */
1731 - fputs(bp[0], out);
1734 - fputs(breaks[0], out);
1736 - free((char *)breaks);
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
1743 /* argmatch.c -- find a match for a string in an array
1744 - Copyright (C) 1990, 1998, 1999 Free Software Foundation, Inc.
1746 + Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003 Free Software
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
1752 /* Written by David MacKenzie <djm@ai.mit.edu>
1753 Modified by Akim Demaille <demaille@inf.enst.fr> */
1756 +# include <config.h>
1759 +/* Specification. */
1760 #include "argmatch.h"
1763 -#ifdef STDC_HEADERS
1764 -# include <string.h>
1768 -# include <locale.h>
1770 +#include <stdlib.h>
1771 +#include <string.h>
1774 -# include <libintl.h>
1775 -# define _(Text) gettext (Text)
1777 -# define _(Text) Text
1779 +#include "gettext.h"
1780 +#define _(msgid) gettext (msgid)
1783 #include "quotearg.h"
1785 +#include "unlocked-io.h"
1787 /* When reporting an invalid argument, show nonprinting characters
1788 by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
1790 # define ARGMATCH_QUOTING_STYLE locale_quoting_style
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. */
1797 -# undef EXIT_FAILURE
1798 +#ifndef EXIT_FAILURE
1799 # define EXIT_FAILURE 1
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.
1808 If VALLIST is none null, use it to resolve ambiguities limited to
1812 "y" is a valid argument, for `0', and "n" for `1'. */
1815 -__argmatch_internal (const char *arg, const char *const *arglist,
1816 - const char *vallist, size_t valsize,
1817 - int case_sensitive)
1819 +argmatch (const char *arg, const char *const *arglist,
1820 + const char *vallist, size_t valsize)
1822 int i; /* Temporary index in ARGLIST. */
1823 size_t arglen; /* Length of ARG. */
1825 /* Test all elements for either exact match or abbreviated matches. */
1826 for (i = 0; arglist[i]; i++)
1828 - if (case_sensitive
1829 - ? !strncmp (arglist[i], arg, arglen)
1830 - : !strncasecmp (arglist[i], arg, arglen))
1831 + if (!strncmp (arglist[i], arg, arglen))
1833 if (strlen (arglist[i]) == arglen)
1834 /* Exact match found. */
1835 @@ -131,22 +123,6 @@
1839 -/* argmatch - case sensitive version */
1841 -argmatch (const char *arg, const char *const *arglist,
1842 - const char *vallist, size_t valsize)
1844 - return __argmatch_internal (arg, arglist, vallist, valsize, 1);
1847 -/* argcasematch - case insensitive version */
1849 -argcasematch (const char *arg, const char *const *arglist,
1850 - const char *vallist, size_t valsize)
1852 - return __argmatch_internal (arg, arglist, vallist, valsize, 0);
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)
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"));
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));
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)
1880 - int res = __argmatch_internal (arg, arglist,
1883 + int res = argmatch (arg, arglist, vallist, valsize);
1887 @@ -291,12 +265,12 @@
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);
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);
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
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.
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 @@
1916 # define ARGMATCH_H_ 1
1919 -# include <config.h>
1921 +# include <stddef.h>
1923 -# include <sys/types.h>
1924 +# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
1927 -# if PROTOTYPES || (defined (__STDC__) && __STDC__)
1928 -# define PARAMS(args) args
1930 -# define PARAMS(args) ()
1932 -# endif /* Not PARAMS. */
1933 +# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
1934 + (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
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. */
1944 -# undef ARRAY_CARDINALITY
1945 -# define ARRAY_CARDINALITY(Array) (sizeof ((Array)) / sizeof (*(Array)))
1946 +# define ARGMATCH_VERIFY(Arglist, Vallist) \
1947 + struct argmatch_verify \
1949 + char argmatch_verify[ARGMATCH_CONSTRAINT(Arglist, Vallist) ? 1 : -1]; \
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))
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). */
1963 - PARAMS ((const char *arg, const char *const *arglist,
1964 - const char *vallist, size_t valsize));
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);
1971 # define ARGMATCH(Arg, Arglist, Vallist) \
1972 - argmatch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
1974 -# define ARGCASEMATCH(Arg, Arglist, Vallist) \
1975 - argcasematch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
1976 + argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
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;
1985 /* Report on stderr why argmatch failed. Report correct values. */
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);
1991 /* Left for compatibility with the old name invalid_arg */
1993 # define invalid_arg(Context, Value, Problem) \
1994 - argmatch_invalid ((Context), (Value), (Problem))
1995 + argmatch_invalid (Context, Value, Problem)
1999 /* Report on stderr the list of possible arguments. */
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);
2007 # define ARGMATCH_VALID(Arglist, Vallist) \
2008 - argmatch_valid (Arglist, (const char *) Vallist, sizeof (*(Vallist)))
2009 + argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
2013 /* Same as argmatch, but upon failure, reports a explanation on the
2014 failure, and exits using the function EXIT_FN. */
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);
2026 /* Programmer friendly interface to __xargmatch_internal. */
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)])
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), \
2045 /* Convert a value into a corresponding argument. */
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);
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))
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
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
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
2073 # include <config.h>
2076 -#include <argmatch.h>
2077 -#include <backupfile.h>
2080 #include <sys/types.h>
2083 # define CLOSEDIR(d) closedir (d)
2088 # include <stdlib.h>
2093 #ifndef HAVE_DECL_GETENV
2094 +"this configure-time declaration test was not run"
2096 +#if !HAVE_DECL_GETENV
2100 -char *base_name PARAMS ((char const *));
2101 +#ifndef HAVE_DECL_MALLOC
2102 +"this configure-time declaration test was not run"
2104 +#if !HAVE_DECL_MALLOC
2108 #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
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)
2124 @@ -103,6 +106,10 @@
2125 # define REAL_DIR_ENTRY(dp) 1
2128 +#include "argmatch.h"
2129 +#include "backupfile.h"
2130 +#include "dirname.h"
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;
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);
2147 if (backup_type != simple)
2150 - size_t dir_len = base_name (s) - s;
2151 + size_t dirlen = dir_len (file);
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++] = '.';
2159 + highest_backup = max_backup_version (base_name (file), s);
2160 if (! (backup_type == numbered_existing && highest_backup == 0))
2162 char *numbered_suffix = s + (file_len + backup_suffix_size_max);
2163 sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
2164 suffix = numbered_suffix;
2168 #endif /* HAVE_DIR */
2171 addext (s, suffix, '~');
2177 highest_version = 0;
2178 - file_name_length = strlen (file);
2179 + file_name_length = base_len (file);
2181 while ((dp = readdir (dirp)) != 0)
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
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.
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
2194 # include <config.h>
2197 -#ifndef FILESYSTEM_PREFIX_LEN
2198 -# define FILESYSTEM_PREFIX_LEN(Filename) 0
2202 -# define ISSLASH(C) ((C) == '/')
2203 +#if STDC_HEADERS || HAVE_STRING_H
2204 +# include <string.h>
2206 +#include "dirname.h"
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 `/'. */
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. */
2218 base_name (char const *name)
2220 - char const *base = name += FILESYSTEM_PREFIX_LEN (name);
2221 - int all_slashes = 1;
2222 + char const *base = name + FILESYSTEM_PREFIX_LEN (name);
2225 - for (p = name; *p; p++)
2226 + for (p = base; *p; p++)
2234 + /* Treat multiple adjacent slashes like a single slash. */
2236 + while (ISSLASH (*p));
2238 - /* If NAME is all slashes, arrange to return `/'. */
2239 - if (*base == '\0' && ISSLASH (*name) && all_slashes)
2241 + /* If the file name ends in slash, use the trailing slash as
2242 + the basename if no non-slashes have been found. */
2245 + if (ISSLASH (*base))
2250 + /* *P is a non-slash preceded by a slash. */
2255 return (char *) base;
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. */
2263 +base_len (char const *name)
2267 + for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
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
2277 -# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
2278 -# define PARAMS(Args) Args
2280 -# define PARAMS(Args) ()
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
2289 +2003-05-20 Paul Eggert <eggert@twinsun.com>
2291 + * NEWS, configure.ac (AC_INIT): Version 2.5.9 released.
2293 + * Makefile.in (HDRS): Add gettext.h.
2295 + Use bool, not int, for booleans.
2297 + * pch.c (pch_says_nonexistent): Returns int, not bool.
2299 + * configure.ac: Add AM_STDBOOL_H.
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.
2307 + * common.h: Include <stdbool.h>.
2308 + Remove TRUE, FALSE, bool. All uses changed to standard names.
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):
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):
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):
2331 +2003-05-18 Paul Eggert <eggert@twinsun.com>
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
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.
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.
2354 + * common.h (FILESYSTEM_PREFIX_LEN, ISSLASH):
2355 + Remove; now done by 'configure'.
2356 + (PROGRAM_NAME): Remove; now done by 'configure' as PACKAGE_NAME.
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.
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.
2375 + Update to current CVS gnulib.
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.
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,
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.
2399 +2002-11-23 Paul Eggert <eggert@twinsun.com>
2401 + * patch.c (main): Don't check for zero-sized file after 'ed'
2402 + when skipping patch. From Michael Fedrowitz.
2404 +2002-06-03 Paul Eggert <eggert@twinsun.com>
2406 + * configure.ac (AC_OUTPUT): Use new form, with AC_CONFIG_FILES,
2407 + instead of obsolescent form. Patch from Art Haas.
2409 + * pch.c (intuit_diff_type): Do not warn about trailing white space
2410 + after Prereq: word. Bug reported by Mike Castle.
2412 +2002-06-02 Paul Eggert <eggert@twinsun.com>
2414 + * NEWS, configure.ac (AC_INIT): Version 2.5.8 released.
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.
2420 +2002-05-30 Paul Eggert <eggert@twinsun.com>
2422 + * NEWS, configure.ac (AC_INIT): Version 2.5.7 released.
2424 + * Makefile.in (MISC): Remove README-alpha.
2425 + (patchlevel.h): Depend on configure, not configure.ac.
2427 + * INSTALL: Upgrade to Autoconf 2.53 version.
2429 +2002-05-28 Paul Eggert <eggert@twinsun.com>
2431 + * patch.c (end_defined, apply_hunk): Output #endif without
2432 + the comment, as POSIX 1003.1-2001 requires.
2434 + * pch.c (there_is_another_patch): Flush stderr after perror.
2436 + * NEWS, configure.ac (AC_INIT): Version 2.5.6 released.
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.
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>.
2451 + * configure.ac (AC_CANONICAL_HOST): Remove.
2452 + (AC_REPLACE_FUNCS): Add strncasecmp.
2453 + (AC_CHECK_DECLS): Add mktemp.
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.
2459 +2002-05-26 Paul Eggert <eggert@twinsun.com>
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
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
2470 + (intuit_diff_type): If the index line exists, don't report a
2471 + missing header. Fix by Chip Salzenberg.
2473 +2002-05-26 Alessandro Rubini <rubini@gnu.org>
2475 + * patch.c (locate_hunk): Fixed updating of last_offset.
2477 +2002-05-25 Paul Eggert <eggert@twinsun.com>
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'.
2483 + * NEWS-alpha, dirname.c, dirname.h, exitfail.c, exitfail.h,
2484 + quote.c, quote.h, unlocked-io.h: New files, taken from diffutils
2487 + * argmatch.c: [STDC_HEADERS]: Include stdlib.h, for 'exit'.
2489 + * addext.c, argmatch.c, argmatch.h, backupfile.c, basename.c:
2490 + Update from diffutils and fileutils.
2492 + * ansi2knr.1, ansi2knr.c: Remove.
2494 + * common.h: HAVE_SETMODE && O_BINARY -> HAVE_SETMODE_DOS.
2495 + * patch.c (usage): Likewise.
2496 + * pch.c (open_patch_file): Likewise.
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.
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.
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.
2534 + * patch.c: Include <exitfail.h>.
2535 + (main): Initialize exit_failure.
2537 + * patch.man: Update copyright notice.
2539 + * pch.c, util.c: Include <dirname.h>, not <basename.h>.
2541 + * version.c (copyright_string): Update copyright notice.
2543 +2002-02-17 Paul Eggert <eggert@twinsun.com>
2545 + * partime.c (parse_pattern_letter): Don't overrun buffer if it
2546 + contains only alphanumerics. Bug reported by Winni
2547 + <Winni470@gmx.net>.
2549 +2001-07-28 Paul Eggert <eggert@sic.twinsun.com>
2551 + * util.c (fetchname), NEWS:
2552 + Allow file names with internal spaces, so long as they
2553 + don't contain tabs.
2555 + * pch.c (intuit_diff_type): Do not allow Prereq with multiple words.
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.
2563 +2001-02-07 "Tony E. Bennett" <tbennett@nvidia.com>
2565 + * util.c (PERFORCE_CO): New var.
2566 + (version_controller): Support Perforce.
2567 + * patch.man: Document this.
2569 +2000-06-30 Paul Eggert <eggert@sic.twinsun.com>
2571 + * patch.man: Ignore comment lines.
2573 + * NEWS, pch.c: Ignore lines beginning with "#".
2575 +1999-10-24 Paul Eggert <eggert@twinsun.com>
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.
2581 +1999-10-18 Paul Eggert <eggert@twinsun.com>
2583 + * patch.c (main): If we skipped an ed patch, exit with nonzero status.
2585 +1999-10-17 Paul Eggert <eggert@twinsun.com>
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.
2592 +1999-10-12 Paul Eggert <eggert@twinsun.com>
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'.
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.
2603 + * ansi2knr.c, maketime.c, mkinstalldirs, partime.c: Fix $Id.
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.
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.
2622 + Accommodate mingw32 port, which has one-argument mkdir (yuck!)
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.
2631 +1999-10-11 Christopher R. Gabriel <cgabriel@tin.it>
2633 + * patch.c (option_help): Updated bug report address
2634 + * configure.in (VERSION): Version 2.5.5 released.
2636 +1999-09-01 Paul Eggert <eggert@twinsun.com>
2638 + * patch.c (main): Default simple_backup_suffix to ".orig".
2640 +1999-10-08 Paul Eggert <eggert@twinsun.com>
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.
2645 1999-08-30 Paul Eggert <eggert@twinsun.com>
2647 Version 2.5.4 fixes a few minor bugs, converts C sources to
2648 @@ -1910,9 +2266,26 @@
2650 1984-11-09 Larry Wall <sdcrdcf!lwall>
2651 * patch.c: Initial revision
2654 -mode: indented-text
2656 -version-control: never
2660 +Copyright (C) 1984, 1985, 1986, 1987, 1988 Larry Wall.
2662 +Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
2663 +2002 Free Software Foundation, Inc.
2665 +This file is part of GNU Patch.
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)
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.
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
2685 /* common definitions for `patch' */
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 $ */
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
2694 + Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
2695 + Free Software Foundation, Inc.
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
2703 -/* We must define `volatile' and `const' first (the latter inside config.h),
2704 - so that they're used consistently in all system includes. */
2714 +#include <stdbool.h>
2716 #include <sys/types.h>
2720 #define S_IRUSR (S_IROTH << 6)
2722 +#ifdef MKDIR_TAKES_ONE_ARG
2723 +# define mkdir(name, mode) ((mkdir) (name))
2727 # include <limits.h>
2728 @@ -123,27 +121,6 @@
2732 -#ifndef FILESYSTEM_PREFIX_LEN
2733 -#define FILESYSTEM_PREFIX_LEN(f) 0
2737 -#define ISSLASH(c) ((c) == '/')
2743 -/* AIX predefines these. */
2753 /* handy definitions */
2755 #define strEQ(s1,s2) (!strcmp(s1, s2))
2756 @@ -151,12 +128,11 @@
2760 -typedef int bool; /* must promote to itself */
2761 typedef off_t LINENUM; /* must be signed */
2765 -extern char const program_name[];
2766 +XTERN char *program_name; /* The name this program was run with. */
2768 XTERN char *buf; /* general purpose buffer */
2769 XTERN size_t bufsize; /* allocated size of buf */
2770 @@ -190,14 +166,14 @@
2773 XTERN bool noreverse;
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;
2783 +XTERN bool set_time;
2784 +XTERN bool set_utc;
2788 @@ -213,25 +189,11 @@
2790 XTERN char *revision; /* prerequisite revision, if any */
2793 -# define GENERIC_OBJECT void
2795 -# define GENERIC_OBJECT char
2798 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
2799 # define __attribute__(x)
2804 -# define PARAMS(args) args
2806 -# define PARAMS(args) ()
2810 -void fatal_exit PARAMS ((int)) __attribute__ ((noreturn));
2811 +void fatal_exit (int) __attribute__ ((noreturn));
2814 #if !STDC_HEADERS && !defined errno
2817 # define memcmp(s1, s2, n) bcmp (s1, s2, n)
2818 # define memcpy(d, s, n) bcopy (s, d, n)
2819 -GENERIC_OBJECT *memchr ();
2825 # include <stdlib.h>
2828 -GENERIC_OBJECT *malloc ();
2829 -GENERIC_OBJECT *realloc ();
2835 @@ -284,6 +246,13 @@
2836 # define file_seek fseek
2837 # define file_tell ftell
2839 +#if ! (HAVE_GETEUID || defined geteuid)
2840 +# if ! (HAVE_GETUID || defined getuid)
2841 +# define geteuid() (-1)
2843 +# define geteuid() getuid ()
2854 +#if HAVE_SETMODE_DOS
2855 XTERN int binary_transput; /* O_BINARY if binary i/o is desired */
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
2863 -# Attempt to guess a canonical system name.
2864 -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
2865 -# Free Software Foundation, Inc.
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.
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.
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.
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.
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>.
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.
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).
2897 -# Only a few systems have been added to this list; please add others
2898 -# (but try to keep the structure clean).
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"
2906 - if test x"$CC" != x; then
2907 - CC_FOR_BUILD="$CC"
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
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
2927 -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
2929 -# Note: order is significant - the case branches are not exclusive.
2931 -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
2933 - if test $UNAME_RELEASE = "V4.0"; then
2934 - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
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
2944 - .frame \$30,0,\$26,0
2946 - .long 0x47e03d80 # implver $0
2948 - .long 0x47e20c21 # amask $2,$1
2957 - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
2958 - if test "$?" = 0 ; then
2962 - UNAME_MACHINE="alpha"
2965 - UNAME_MACHINE="alphaev5"
2968 - UNAME_MACHINE="alphaev56"
2971 - UNAME_MACHINE="alphapca56"
2974 - UNAME_MACHINE="alphaev6"
2978 - rm -f $dummy.s $dummy
2979 - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
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
2987 - 21064:Windows_NT:50:3)
2988 - echo alpha-dec-winnt3.5
2990 - Amiga*:UNIX_System_V:4.0:*)
2991 - echo m68k-cbm-sysv4
2994 - echo m68k-cbm-netbsd${UNAME_RELEASE}
2996 - amiga:OpenBSD:*:*)
2997 - echo m68k-unknown-openbsd${UNAME_RELEASE}
2999 - *:[Aa]miga[Oo][Ss]:*:*)
3000 - echo ${UNAME_MACHINE}-unknown-amigaos
3002 - arc64:OpenBSD:*:*)
3003 - echo mips64el-unknown-openbsd${UNAME_RELEASE}
3006 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
3008 - hkmips:OpenBSD:*:*)
3009 - echo mips-unknown-openbsd${UNAME_RELEASE}
3012 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
3015 - echo mips-unknown-openbsd${UNAME_RELEASE}
3017 - wgrisc:OpenBSD:*:*)
3018 - echo mipsel-unknown-openbsd${UNAME_RELEASE}
3020 - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3021 - echo arm-acorn-riscix${UNAME_RELEASE}
3024 - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3026 - SR2?01:HI-UX/MPP:*:*)
3027 - echo hppa1.1-hitachi-hiuxmpp
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
3034 - echo pyramid-pyramid-bsd
3038 - echo pyramid-pyramid-svr4
3040 - sun4H:SunOS:5.*:*)
3041 - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3043 - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3044 - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3046 - i86pc:SunOS:5.*:*)
3047 - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
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/[^.]*//'`
3056 - case "`/usr/bin/arch -k`" in
3058 - UNAME_RELEASE=`uname -v`
3061 - # Japanese Language versions have a version number like `4.1.3-JL'.
3062 - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3065 - echo m68k-sun-sunos${UNAME_RELEASE}
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
3072 - echo m68k-sun-sunos${UNAME_RELEASE}
3075 - echo sparc-sun-sunos${UNAME_RELEASE}
3080 - echo sparc-auspex-sunos${UNAME_RELEASE}
3082 - atari*:NetBSD:*:*)
3083 - echo m68k-atari-netbsd${UNAME_RELEASE}
3085 - atari*:OpenBSD:*:*)
3086 - echo m68k-unknown-openbsd${UNAME_RELEASE}
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
3096 - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3097 - echo m68k-atari-mint${UNAME_RELEASE}
3099 - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
3100 - echo m68k-atari-mint${UNAME_RELEASE}
3102 - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
3103 - echo m68k-atari-mint${UNAME_RELEASE}
3105 - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
3106 - echo m68k-milan-mint${UNAME_RELEASE}
3108 - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
3109 - echo m68k-hades-mint${UNAME_RELEASE}
3111 - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
3112 - echo m68k-unknown-mint${UNAME_RELEASE}
3115 - echo m68k-sun-netbsd${UNAME_RELEASE}
3117 - sun3*:OpenBSD:*:*)
3118 - echo m68k-unknown-openbsd${UNAME_RELEASE}
3120 - mac68k:NetBSD:*:*)
3121 - echo m68k-apple-netbsd${UNAME_RELEASE}
3123 - mac68k:OpenBSD:*:*)
3124 - echo m68k-unknown-openbsd${UNAME_RELEASE}
3126 - mvme68k:OpenBSD:*:*)
3127 - echo m68k-unknown-openbsd${UNAME_RELEASE}
3129 - mvme88k:OpenBSD:*:*)
3130 - echo m88k-unknown-openbsd${UNAME_RELEASE}
3132 - powerpc:machten:*:*)
3133 - echo powerpc-apple-machten${UNAME_RELEASE}
3135 - macppc:NetBSD:*:*)
3136 - echo powerpc-apple-netbsd${UNAME_RELEASE}
3139 - echo mips-dec-mach_bsd4.3
3142 - echo mips-dec-ultrix${UNAME_RELEASE}
3145 - echo vax-dec-ultrix${UNAME_RELEASE}
3147 - 2020:CLIX:*:* | 2430:CLIX:*:*)
3148 - echo clipper-intergraph-clix${UNAME_RELEASE}
3150 - mips:*:*:UMIPS | mips:*:*:RISCos)
3151 - sed 's/^ //' << EOF >$dummy.c
3153 - int main (int argc, char *argv[]) {
3155 - int main (argc, argv) int argc; char *argv[]; {
3157 - #if defined (host_mips) && defined (MIPSEB)
3158 - #if defined (SYSTYPE_SYSV)
3159 - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
3161 - #if defined (SYSTYPE_SVR4)
3162 - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
3164 - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
3165 - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
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}
3177 - Night_Hawk:Power_UNIX:*:*)
3178 - echo powerpc-harris-powerunix
3181 - echo m88k-harris-cxux7
3184 - echo m88k-motorola-sysv4
3187 - echo m88k-motorola-sysv3
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}
3197 - echo m88k-dg-dguxbcs${UNAME_RELEASE}
3199 - else echo i586-dg-dgux${UNAME_RELEASE}
3202 - M88*:DolphinOS:*:*) # DolphinOS (SVR3)
3203 - echo m88k-dolphin-sysv3
3206 - # Delta 88k system running SVR3
3207 - echo m88k-motorola-sysv3
3209 - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
3210 - echo m88k-tektronix-sysv3
3212 - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
3213 - echo m68k-tektronix-bsd
3216 - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
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 '
3225 - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
3226 - sed 's/^ //' << EOF >$dummy.c
3227 - #include <sys/systemcfg.h>
3231 - if (!__power_pc())
3233 - puts("powerpc-ibm-aix3.2.5");
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
3243 - echo rs6000-ibm-aix3.2
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
3253 - if [ -x /usr/bin/oslevel ] ; then
3254 - IBM_REV=`/usr/bin/oslevel`
3256 - IBM_REV=4.${UNAME_RELEASE}
3258 - echo ${IBM_ARCH}-ibm-aix${IBM_REV}
3261 - echo rs6000-ibm-aix
3263 - ibmrt:4.4BSD:*|romp-ibm:BSD:*)
3264 - echo romp-ibm-bsd4.4
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
3270 - echo rs6000-bull-bosx
3272 - DPX/2?00:B.O.S.:*:*)
3273 - echo m68k-bull-sysv3
3275 - 9000/[34]??:4.3bsd:1.*:*)
3278 - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
3279 - echo m68k-hp-bsd4.4
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>
3292 - #if defined(_SC_KERNEL_BITS)
3293 - long bits = sysconf(_SC_KERNEL_BITS);
3295 - long cpu = sysconf (_SC_CPU_VERSION);
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)
3305 - case 64: puts ("hppa2.0w"); break;
3306 - case 32: puts ("hppa2.0n"); break;
3307 - default: puts ("hppa2.0"); break;
3309 - #else /* !defined(_SC_KERNEL_BITS) */
3310 - puts ("hppa2.0"); break;
3312 - default: puts ("hppa1.0"); break;
3317 - ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
3318 - rm -f $dummy.c $dummy
3320 - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
3321 - echo ${HP_ARCH}-hp-hpux${HPUX_REV}
3324 - sed 's/^ //' << EOF >$dummy.c
3325 - #include <unistd.h>
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))
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;
3343 - else if (CPU_IS_HP_MC68K (cpu))
3344 - puts ("m68k-hitachi-hiuxwe2");
3345 - else puts ("unknown-hitachi-hiuxwe2");
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
3353 - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
3354 - echo hppa1.1-hp-bsd
3356 - 9000/8??:4.3bsd:*:*)
3357 - echo hppa1.0-hp-bsd
3360 - echo hppa1.0-hp-mpeix
3362 - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
3363 - echo hppa1.1-hp-osf
3366 - echo hppa1.0-hp-osf
3369 - if [ -x /usr/sbin/sysversion ] ; then
3370 - echo ${UNAME_MACHINE}-unknown-osf1mk
3372 - echo ${UNAME_MACHINE}-unknown-osf1
3375 - parisc*:Lites*:*:*)
3376 - echo hppa1.1-hp-lites
3378 - hppa*:OpenBSD:*:*)
3379 - echo hppa-unknown-openbsd
3381 - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
3382 - echo c1-convex-bsd
3384 - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
3385 - if getsysinfo -f scalar_acc
3386 - then echo c32-convex-bsd
3387 - else echo c2-convex-bsd
3390 - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
3391 - echo c34-convex-bsd
3393 - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
3394 - echo c38-convex-bsd
3396 - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
3397 - echo c4-convex-bsd
3400 - echo xmp-cray-unicos
3403 - echo ymp-cray-unicos${UNAME_RELEASE}
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/
3411 - echo t90-cray-unicos${UNAME_RELEASE}
3414 - echo alpha-cray-unicosmk${UNAME_RELEASE}
3417 - echo cray2-cray-unicos
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}"
3424 - F301:UNIX_System_V:*:*)
3425 - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
3427 - hp3[0-9][05]:NetBSD:*:*)
3428 - echo m68k-hp-netbsd${UNAME_RELEASE}
3430 - hp300:OpenBSD:*:*)
3431 - echo m68k-unknown-openbsd${UNAME_RELEASE}
3433 - i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
3434 - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
3436 - sparc*:BSD/OS:*:*)
3437 - echo sparc-unknown-bsdi${UNAME_RELEASE}
3440 - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
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/[-_].*//'`
3449 - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
3452 - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3455 - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
3458 - echo ${UNAME_MACHINE}-pc-cygwin
3461 - echo ${UNAME_MACHINE}-pc-mingw32
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
3470 - echo ${UNAME_MACHINE}-pc-uwin
3473 - echo powerpcle-unknown-cygwin
3475 - prep*:SunOS:5.*:*)
3476 - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3479 - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
3482 - # uname on the ARM produces all sorts of strangeness, and we need to
3484 - case "$UNAME_MACHINE" in
3485 - armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
3486 - arm* | sa110*) UNAME_MACHINE="arm" ;;
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
3496 - s/.*supported emulations: *//
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[];
3518 -#if defined(__GLIBC__)
3519 - printf("%s %s\n", __libc_version, __libc_release);
3521 - printf("unkown\n");
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
3534 - rm -f $dummy.c $dummy
3535 - echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
3538 - if test "${UNAME_MACHINE}" = "alpha" ; then
3539 - sed 's/^ //' <<EOF >$dummy.s
3543 - .frame \$30,0,\$26,0
3545 - .long 0x47e03d80 # implver $0
3547 - .long 0x47e20c21 # amask $2,$1
3557 - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
3558 - if test "$?" = 0 ; then
3562 - UNAME_MACHINE="alpha"
3565 - UNAME_MACHINE="alphaev5"
3568 - UNAME_MACHINE="alphaev56"
3571 - UNAME_MACHINE="alphapca56"
3574 - UNAME_MACHINE="alphaev6"
3578 - objdump --private-headers $dummy | \
3579 - grep ld.so.1 > /dev/null
3580 - if test "$?" = 0 ; then
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
3589 - int main (int argc, char *argv[]) {
3591 - int main (argc, argv) int argc; char *argv[]; {
3594 - printf ("%s-unknown-linux-gnu\n", argv[1]);
3597 - printf ("%sel-unknown-linux-gnu\n", argv[1]);
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
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
3613 - case "${UNAME_MACHINE}" in
3621 - # Determine whether the default compiler is a.out or elf
3622 - cat >$dummy.c <<EOF
3623 -#include <features.h>
3625 - int main (int argc, char *argv[]) {
3627 - int main (argc, argv) int argc; char *argv[]; {
3631 -# if __GLIBC__ >= 2
3632 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
3634 - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
3637 - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
3640 - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
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
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
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}
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}
3665 - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
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}
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
3691 - echo ${UNAME_MACHINE}-pc-sysv32
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
3700 - echo i386-pc-mach3
3703 - echo i860-intel-osf1
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
3712 - mini*:CTIX:SYS*5:*)
3714 - echo m68010-convergent-sysv
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)
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}
3732 - mc68030:UNIX_System_V:4.*:*)
3733 - echo m68k-atari-sysv4
3735 - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
3736 - echo i386-unknown-lynxos${UNAME_RELEASE}
3738 - TSUNAMI:LynxOS:2.*:*)
3739 - echo sparc-unknown-lynxos${UNAME_RELEASE}
3741 - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
3742 - echo rs6000-unknown-lynxos${UNAME_RELEASE}
3744 - SM[BE]S:UNIX_SV:*:*)
3745 - echo mips-dde-sysv${UNAME_RELEASE}
3747 - RM*:ReliantUNIX-*:*:*)
3748 - echo mips-sni-sysv4
3751 - echo mips-sni-sysv4
3754 - if uname -p 2>/dev/null >/dev/null ; then
3755 - UNAME_MACHINE=`(uname -p) 2>/dev/null`
3756 - echo ${UNAME_MACHINE}-sni-sysv4
3758 - echo ns32k-sni-sysv
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
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
3771 - # From seanf@swdc.stratus.com.
3772 - echo i860-stratus-sysv4
3775 - echo m68k-apple-aux${UNAME_RELEASE}
3777 - news*:NEWS-OS:*:6*)
3778 - echo mips-sony-newsos6
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}
3784 - echo mips-unknown-sysv${UNAME_RELEASE}
3787 - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
3788 - echo powerpc-be-beos
3790 - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
3791 - echo powerpc-apple-beos
3793 - BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
3796 - SX-4:SUPER-UX:*:*)
3797 - echo sx4-nec-superux${UNAME_RELEASE}
3799 - SX-5:SUPER-UX:*:*)
3800 - echo sx5-nec-superux${UNAME_RELEASE}
3802 - Power*:Rhapsody:*:*)
3803 - echo powerpc-apple-rhapsody${UNAME_RELEASE}
3806 - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
3810 -#echo '(No uname command or uname output not recognized.)' 1>&2
3811 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
3813 -cat >$dummy.c <<EOF
3815 -# include <sys/types.h>
3816 -# include <sys/utsname.h>
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);
3826 -#include <sys/param.h>
3827 - printf ("m68k-sony-newsos%s\n",
3837 -#if defined (__arm) && defined (__acorn) && defined (__unix)
3838 - printf ("arm-acorn-riscix"); exit (0);
3841 -#if defined (hp300) && !defined (hpux)
3842 - printf ("m68k-hp-bsd\n"); exit (0);
3846 -#if !defined (__ARCHITECTURE__)
3847 -#define __ARCHITECTURE__ "m68k"
3850 - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
3852 - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
3854 - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
3858 -#if defined (MULTIMAX) || defined (n16)
3859 -#if defined (UMAXV)
3860 - printf ("ns32k-encore-sysv\n"); exit (0);
3863 - printf ("ns32k-encore-mach\n"); exit (0);
3865 - printf ("ns32k-encore-bsd\n"); exit (0);
3870 -#if defined (__386BSD__)
3871 - printf ("i386-pc-bsd\n"); exit (0);
3874 -#if defined (sequent)
3876 - printf ("i386-sequent-dynix\n"); exit (0);
3878 -#if defined (ns32000)
3879 - printf ("ns32k-sequent-dynix\n"); exit (0);
3883 -#if defined (_SEQUENT_)
3884 - struct utsname un;
3888 - if (strncmp(un.version, "V2", 2) == 0) {
3889 - printf ("i386-sequent-ptx2\n"); exit (0);
3891 - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
3892 - printf ("i386-sequent-ptx1\n"); exit (0);
3894 - printf ("i386-sequent-ptx\n"); exit (0);
3899 -#if !defined (ultrix)
3900 - printf ("vax-dec-bsd\n"); exit (0);
3902 - printf ("vax-dec-ultrix\n"); exit (0);
3906 -#if defined (alliant) && defined (i860)
3907 - printf ("i860-alliant-bsd\n"); exit (0);
3914 -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
3915 -rm -f $dummy.c $dummy
3917 -# Apollos put the system type in the environment.
3919 -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
3921 -# Convex versions that predate uname can use getsysinfo(1)
3923 -if [ -x /usr/convex/getsysinfo ]
3925 - case `getsysinfo -f cpu_type` in
3927 - echo c1-convex-bsd
3930 - if getsysinfo -f scalar_acc
3931 - then echo c32-convex-bsd
3932 - else echo c2-convex-bsd
3936 - echo c34-convex-bsd
3939 - echo c38-convex-bsd
3942 - echo c4-convex-bsd
3947 -#echo '(Unable to guess system type)' 1>&2
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
3954 -/* config.hin. Generated automatically from configure.in by autoheader. */
3955 +/* config.hin. Generated from configure.ac by autoheader. */
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
3962 +/* Define to 1 if the `closedir' function returns void instead of `int'. */
3963 +#undef CLOSEDIR_VOID
3965 +/* Define if there is a member named d_ino in the struct describing directory
3967 +#undef D_INO_IN_DIRENT
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
3972 +#undef FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
3974 +/* Define if the backslash character may also serve as a file name component
3976 +#undef FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
3978 +#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
3979 +# define FILESYSTEM_PREFIX_LEN(Filename) \
3980 + ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
3982 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
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
3990 -/* Define to empty if the keyword does not work. */
3992 +/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
3994 +#undef HAVE_DECL_CLEARERR_UNLOCKED
3996 -/* Define if you don't have vprintf but do have _doprnt. */
3998 +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
4000 +#undef HAVE_DECL_FEOF_UNLOCKED
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
4006 +#undef HAVE_DECL_FERROR_UNLOCKED
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
4012 +#undef HAVE_DECL_FFLUSH_UNLOCKED
4014 -/* Define if on MINIX. */
4016 +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
4018 +#undef HAVE_DECL_FGETS_UNLOCKED
4020 -/* Define to `int' if <sys/types.h> doesn't define. */
4022 +/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
4024 +#undef HAVE_DECL_FPUTC_UNLOCKED
4026 -/* Define to `long' if <sys/types.h> doesn't define. */
4028 +/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
4030 +#undef HAVE_DECL_FPUTS_UNLOCKED
4032 -/* Define to `int' if <sys/types.h> doesn't define. */
4034 +/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
4036 +#undef HAVE_DECL_FREAD_UNLOCKED
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.
4043 +#undef HAVE_DECL_FREE
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
4049 +#undef HAVE_DECL_FWRITE_UNLOCKED
4051 -/* Define as the return type of signal handlers (int or void). */
4053 +/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
4055 +#undef HAVE_DECL_GETCHAR_UNLOCKED
4057 -/* Define to `unsigned' if <sys/types.h> doesn't define. */
4059 +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
4061 +#undef HAVE_DECL_GETC_UNLOCKED
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.
4067 +#undef HAVE_DECL_GETENV
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.
4073 +#undef HAVE_DECL_MALLOC
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.
4079 +#undef HAVE_DECL_MKTEMP
4081 -/* Define if you have the fseeko function. */
4082 +/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
4084 +#undef HAVE_DECL_PUTCHAR_UNLOCKED
4086 +/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
4088 +#undef HAVE_DECL_PUTC_UNLOCKED
4090 +/* Define to 1 if you have the declaration of `strerror', and to 0 if you
4092 +#undef HAVE_DECL_STRERROR
4094 +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
4096 +#undef HAVE_DECL_STRERROR_R
4098 +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
4100 +#undef HAVE_DIRENT_H
4102 +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
4105 +/* Define to 1 if you have the <fcntl.h> header file. */
4106 +#undef HAVE_FCNTL_H
4108 +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
4111 -/* Define if you have the isascii function. */
4112 +/* Define to 1 if you have the `geteuid' function. */
4113 +#undef HAVE_GETEUID
4115 +/* Define to 1 if you have the `getuid' function. */
4118 +/* Define to 1 if you have the <inttypes.h> header file. */
4119 +#undef HAVE_INTTYPES_H
4121 +/* Define to 1 if you have the `isascii' function. */
4124 -/* Define if you have the memchr function. */
4125 +/* Define to 1 if you have the `iswprint' function. */
4126 +#undef HAVE_ISWPRINT
4128 +/* Define to 1 if you have the <limits.h> header file. */
4129 +#undef HAVE_LIMITS_H
4131 +/* Define to 1 if you support file names longer than 14 characters. */
4132 +#undef HAVE_LONG_FILE_NAMES
4134 +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
4135 + to 0 otherwise. */
4138 +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
4139 +#undef HAVE_MBRTOWC
4141 +/* Define to 1 if you have the `mbsinit' function. */
4142 +#undef HAVE_MBSINIT
4144 +/* Define to 1 if <wchar.h> declares mbstate_t. */
4145 +#undef HAVE_MBSTATE_T
4147 +/* Define to 1 if you have the `memchr' function. */
4150 -/* Define if you have the memcmp function. */
4151 +/* Define to 1 if you have the `memcmp' function. */
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
4158 +/* Define to 1 if you have the `mkdir' function. */
4161 -/* Define if you have the mktemp function. */
4162 +/* Define to 1 if you have the `mktemp' function. */
4165 -/* Define if you have the pathconf function. */
4166 +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
4169 +/* Define to 1 if you have the `pathconf' function. */
4170 #undef HAVE_PATHCONF
4172 -/* Define if you have the raise function. */
4173 +/* Define to 1 if you have the `raise' function. */
4176 -/* Define if you have the rename function. */
4178 +/* Define to 1 if your system has a GNU libc compatible `realloc' function,
4179 + and to 0 otherwise. */
4180 +#undef HAVE_REALLOC
4182 -/* Define if you have the rmdir function. */
4183 +/* Define to 1 if you have the `rmdir' function. */
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
4191 -/* Define if you have the sigaction function. */
4192 +/* Define to 1 if you have the `sigaction' function. */
4193 #undef HAVE_SIGACTION
4195 -/* Define if you have the sigprocmask function. */
4196 +/* Define to 1 if you have the `sigprocmask' function. */
4197 #undef HAVE_SIGPROCMASK
4199 -/* Define if you have the sigsetmask function. */
4200 +/* Define to 1 if you have the `sigsetmask' function. */
4201 #undef HAVE_SIGSETMASK
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
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
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
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
4223 -/* Define if you have the <ndir.h> header file. */
4225 +/* Define to 1 if you have the `strerror' function. */
4226 +#undef HAVE_STRERROR
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
4232 +/* Define to 1 if you have the <strings.h> header file. */
4233 +#undef HAVE_STRINGS_H
4235 +/* Define to 1 if you have the <string.h> header file. */
4236 #undef HAVE_STRING_H
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
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
4246 +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
4248 #undef HAVE_SYS_DIR_H
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'.
4253 #undef HAVE_SYS_NDIR_H
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
4259 +/* Define to 1 if you have the <sys/time.h> header file. */
4260 +#undef HAVE_SYS_TIME_H
4262 +/* Define to 1 if you have the <sys/types.h> header file. */
4263 +#undef HAVE_SYS_TYPES_H
4265 +/* Define to 1 if you have the <unistd.h> header file. */
4266 #undef HAVE_UNISTD_H
4268 -/* Define if you have the <utime.h> header file. */
4269 +/* Define to 1 if you have the <utime.h> header file. */
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
4276 +/* Define to 1 if you have the `vprintf' function. */
4277 +#undef HAVE_VPRINTF
4279 +/* Define to 1 if you have the <wchar.h> header file. */
4280 +#undef HAVE_WCHAR_H
4282 +/* Define to 1 if you have the <wctype.h> header file. */
4283 +#undef HAVE_WCTYPE_H
4285 +/* Define to 1 if the system has the type `_Bool'. */
4288 +/* Define to 1 if you have the `_doprintf' function. */
4289 +#undef HAVE__DOPRINTF
4291 +#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
4292 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4294 +# define ISSLASH(C) ((C) == '/')
4297 +/* Define if mkdir takes only one argument. */
4298 +#undef MKDIR_TAKES_ONE_ARG
4300 +/* Define to the address where bug reports for this package should be sent. */
4301 +#undef PACKAGE_BUGREPORT
4303 +/* Define to the full name of this package. */
4304 +#undef PACKAGE_NAME
4306 +/* Define to the full name and version of this package. */
4307 +#undef PACKAGE_STRING
4309 +/* Define to the one symbol short name of this package. */
4310 +#undef PACKAGE_TARNAME
4312 +/* Define to the version of this package. */
4313 +#undef PACKAGE_VERSION
4315 +/* Define to 1 if the C compiler supports function prototypes. */
4318 +/* Define as the return type of signal handlers (`int' or `void'). */
4321 +/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
4322 +#undef STAT_MACROS_BROKEN
4324 +/* Define to 1 if you have the ANSI C header files. */
4325 +#undef STDC_HEADERS
4327 +/* Define to 1 if strerror_r returns char *. */
4328 +#undef STRERROR_R_CHAR_P
4330 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
4331 +#undef TIME_WITH_SYS_TIME
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
4340 /* Number of bits in a file offset, on hosts where this is settable. */
4341 #undef _FILE_OFFSET_BITS
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
4349 +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
4350 #undef _LARGEFILE_SOURCE
4352 /* Define for large files, on AIX-style hosts. */
4355 -/* Define if compiler has function prototypes */
4357 +/* Define to 1 if on MINIX. */
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
4365 +#undef _POSIX_1_SOURCE
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
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
4378 +/* Define to empty if `const' does not conform to ANSI C. */
4381 /* Define to rpl_malloc if the replacement function should be used. */
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. */
4389 +/* Define to `int' if <sys/types.h> does not define. */
4392 +/* Define to `long' if <sys/types.h> does not define. */
4395 +/* Define to `int' if <sys/types.h> does not define. */
4398 /* Define to rpl_realloc if the replacement function should be used. */
4401 -/* Define if there is a member named d_ino in the struct describing
4402 - directory headers. */
4403 -#undef D_INO_IN_DIRENT
4405 +/* Define to `unsigned' if <sys/types.h> does not define. */
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
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.
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.
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.
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.
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.
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.
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
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.
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
4467 -# First pass through any local machine types.
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/'`
4483 - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
4486 - basic_machine=`echo $1 | sed 's/-[^-]*$//'`
4487 - if [ $basic_machine != $1 ]
4488 - then os=`echo $1 | sed 's/.*-/-/'`
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.
4499 - # Prevent following clause from handling this invalid input.
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 | \
4511 - -sim | -cisco | -oki | -wec | -winbond)
4526 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4530 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4533 - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
4534 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4537 - # Don't forget version if it is 3.2v4 or newer.
4538 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4542 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4545 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4549 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4552 - basic_machine=clipper-intergraph
4555 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
4561 - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
4564 - os=`echo $os | sed -e 's/windowsnt/winnt/'`
4569 - -mint | -mint[0-9]*)
4570 - basic_machine=m68k-atari
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 \
4591 - basic_machine=$basic_machine-unknown
4593 - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
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.
4600 - basic_machine=$basic_machine-pc
4602 - # Object if more than one company name word.
4604 - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
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-* \
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-* )
4627 - # Recognize the various machine names and aliases which stand
4628 - # for a CPU type and a company and sometimes even an OS.
4630 - basic_machine=i386-unknown
4633 - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
4634 - basic_machine=m68000-att
4637 - basic_machine=we32k-att
4640 - basic_machine=a29k-amd
4644 - basic_machine=m68010-adobe
4648 - basic_machine=fx80-alliant
4650 - altos | altos3068)
4651 - basic_machine=m68k-altos
4654 - basic_machine=a29k-none
4658 - basic_machine=580-amdahl
4662 - basic_machine=m68k-cbm
4664 - amigaos | amigados)
4665 - basic_machine=m68k-cbm
4669 - basic_machine=m68k-cbm
4673 - basic_machine=m68k-apollo
4677 - basic_machine=m68k-apollo
4681 - basic_machine=m68k-apple
4685 - basic_machine=ns32k-sequent
4689 - basic_machine=c1-convex
4693 - basic_machine=c2-convex
4697 - basic_machine=c32-convex
4701 - basic_machine=c34-convex
4705 - basic_machine=c38-convex
4709 - basic_machine=ymp-cray
4713 - basic_machine=cray2-cray
4717 - basic_machine=c90-cray
4721 - basic_machine=m68k-crds
4724 - basic_machine=m68k-da30
4726 - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
4727 - basic_machine=mips-dec
4729 - delta | 3300 | motorola-3300 | motorola-delta \
4730 - | 3300-motorola | delta-motorola)
4731 - basic_machine=m68k-motorola
4734 - basic_machine=m88k-motorola
4738 - basic_machine=rs6000-bull
4741 - dpx2* | dpx2*-bull)
4742 - basic_machine=m68k-bull
4746 - basic_machine=a29k-amd
4750 - basic_machine=elxsi-elxsi
4753 - encore | umax | mmax)
4754 - basic_machine=ns32k-encore
4756 - es1800 | OSE68k | ose68k | ose | OSE)
4757 - basic_machine=m68k-ericsson
4761 - basic_machine=i860-alliant
4764 - basic_machine=ns32k-ns
4767 - basic_machine=tron-gmicro
4771 - basic_machine=hppa1.1-hitachi
4775 - basic_machine=h8300-hitachi
4779 - basic_machine=h8300-hitachi
4783 - basic_machine=h8500-hitachi
4787 - basic_machine=m88k-harris
4791 - basic_machine=m68k-hp
4794 - basic_machine=m68k-hp
4798 - basic_machine=m68k-hp
4801 - hp3k9[0-9][0-9] | hp9[0-9][0-9])
4802 - basic_machine=hppa1.0-hp
4804 - hp9k2[0-9][0-9] | hp9k31[0-9])
4805 - basic_machine=m68000-hp
4808 - basic_machine=m68k-hp
4810 - hp9k6[0-9][0-9] | hp6[0-9][0-9])
4811 - basic_machine=hppa1.0-hp
4813 - hp9k7[0-79][0-9] | hp7[0-79][0-9])
4814 - basic_machine=hppa1.1-hp
4816 - hp9k78[0-9] | hp78[0-9])
4817 - # FIXME: really hppa2.0-hp
4818 - basic_machine=hppa1.1-hp
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
4824 - hp9k8[0-9][13679] | hp8[0-9][13679])
4825 - basic_machine=hppa1.1-hp
4827 - hp9k8[0-9][0-9] | hp8[0-9][0-9])
4828 - basic_machine=hppa1.0-hp
4834 - basic_machine=hppa1.1-hp
4838 - basic_machine=hppa1.1-hp
4842 - basic_machine=i370-ibm
4845 -# I'm not sure what "Sysv32" means. Should this be sysv3.2?
4847 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4851 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4855 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4859 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
4863 - basic_machine=i386-mach
4867 - basic_machine=i386-unknown
4871 - basic_machine=i386-unknown
4874 - i386-mingw32 | mingw32)
4875 - basic_machine=i386-unknown
4879 - basic_machine=mips-sgi
4889 - basic_machine=m68k-isi
4893 - basic_machine=m88k-omron
4896 - basic_machine=mips-mips
4900 - basic_machine=ns32k-utek
4904 - basic_machine=m68000-convergent
4906 - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
4907 - basic_machine=m68k-atari
4911 - basic_machine=mipsel-unknown
4915 - basic_machine=mips-unknown
4919 - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
4922 - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
4925 - basic_machine=m68k-rom68k
4929 - basic_machine=i386-unknown
4933 - basic_machine=i486-ncr
4937 - basic_machine=i386-unknown
4941 - basic_machine=armv4l-corel
4944 - news | news700 | news800 | news900)
4945 - basic_machine=m68k-sony
4949 - basic_machine=m68030-sony
4952 - news-3600 | risc-news)
4953 - basic_machine=mips-sony
4957 - basic_machine=v70-nec
4961 - basic_machine=m68k-next
4974 - basic_machine=m68k-harris
4978 - basic_machine=m88k-harris
4982 - basic_machine=i960-intel
4986 - basic_machine=i960-intel
4990 - basic_machine=np1-gould
4992 - op50n-* | op60c-*)
4993 - basic_machine=hppa1.1-oki
4996 - OSE68000 | ose68000)
4997 - basic_machine=m68000-ericsson
5001 - basic_machine=m68k-none
5005 - basic_machine=hppa1.1-hitachi
5009 - basic_machine=i860-intel
5013 - basic_machine=sparc-tti
5016 - basic_machine=m68k-tti
5019 - basic_machine=ns32k-pc532
5021 - pentium | p5 | k5 | k6 | nexen)
5022 - basic_machine=i586-pc
5024 - pentiumpro | p6 | 6x86)
5025 - basic_machine=i686-pc
5027 - pentiumii | pentium2)
5028 - basic_machine=i786-pc
5030 - pentium-* | p5-* | k5-* | k6-* | nexen-*)
5031 - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
5033 - pentiumpro-* | p6-* | 6x86-*)
5034 - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
5036 - pentiumii-* | pentium2-*)
5037 - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
5040 - basic_machine=pn-gould
5042 - power) basic_machine=rs6000-ibm
5044 - ppc) basic_machine=powerpc-unknown
5046 - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
5048 - ppcle | powerpclittle | ppc-le | powerpc-little)
5049 - basic_machine=powerpcle-unknown
5051 - ppcle-* | powerpclittle-*)
5052 - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
5055 - basic_machine=i386-ibm
5058 - basic_machine=m68k-rom68k
5062 - basic_machine=mips-siemens
5065 - basic_machine=romp-ibm
5068 - basic_machine=a29k-amd
5072 - basic_machine=i386-sequent
5075 - basic_machine=sh-hitachi
5079 - basic_machine=sparclite-wrs
5083 - basic_machine=m68k-bull
5087 - basic_machine=spur-unknown
5090 - basic_machine=m68k-tandem
5093 - basic_machine=i860-stratus
5097 - basic_machine=m68000-sun
5100 - basic_machine=m68000-sun
5104 - basic_machine=m68000-sun
5108 - basic_machine=m68k-sun
5112 - basic_machine=m68k-sun
5116 - basic_machine=sparc-sun
5120 - basic_machine=sparc-sun
5124 - basic_machine=sparc-sun
5128 - basic_machine=m68k-sun
5131 - basic_machine=sparc-sun
5133 - sun386 | sun386i | roadrunner)
5134 - basic_machine=i386-sun
5137 - basic_machine=i386-sequent
5141 - basic_machine=t3e-cray
5145 - basic_machine=mipstx39-unknown
5148 - basic_machine=mipstx39el-unknown
5151 - basic_machine=m68k-ncr
5154 - basic_machine=a29k-amd
5158 - basic_machine=a29k-nyu
5162 - basic_machine=v810-nec
5166 - basic_machine=vax-dec
5170 - basic_machine=vax-dec
5174 - basic_machine=f301-fujitsu
5177 - basic_machine=i960-wrs
5181 - basic_machine=m68k-wrs
5185 - basic_machine=a29k-wrs
5189 - basic_machine=w65-wdc
5193 - basic_machine=hppa1.1-winbond
5197 - basic_machine=xmp-cray
5201 - basic_machine=xps100-honeywell
5204 - basic_machine=z8k-unknown
5208 - basic_machine=none-none
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.
5215 - basic_machine=hppa1.1-winbond
5218 - basic_machine=hppa1.1-oki
5221 - basic_machine=hppa1.1-oki
5224 - if [ x$os = x-linux-gnu ]; then
5225 - basic_machine=mips-unknown
5227 - basic_machine=mips-mips
5231 - basic_machine=romp-ibm
5234 - basic_machine=rs6000-ibm
5237 - basic_machine=vax-dec
5240 - basic_machine=pdp11-dec
5243 - basic_machine=we32k-att
5246 - basic_machine=sparc-sun
5249 - basic_machine=cydra-cydrome
5252 - basic_machine=orion-highlevel
5255 - basic_machine=clipper-highlevel
5257 - mac | mpw | mac-mpw)
5258 - basic_machine=m68k-apple
5261 - basic_machine=powerpc-apple
5264 - basic_machine=c4x-none
5268 - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
5273 -# Here we canonicalize certain aliases for manufacturers.
5274 -case $basic_machine in
5276 - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
5279 - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
5285 -# Decode manufacturer-specific aliases for certain operating systems.
5287 -if [ x"$os" != x"" ]
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|'`
5306 - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
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* \
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.
5328 - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
5329 - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
5330 - | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
5333 - os=`echo $os | sed -e 's|mac|macos|'`
5336 - os=`echo $os | sed -e 's|linux|linux-gnu|'`
5339 - os=`echo $os | sed -e 's|sunos5|solaris2|'`
5342 - os=`echo $os | sed -e 's|sunos6|solaris3|'`
5368 - # Preserve the version number of sinix5.
5370 - os=`echo $os | sed -e 's|sinix|sysv|'`
5390 - # This must come after -sysvr4.
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
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.
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.
5426 -case $basic_machine in
5450 - # This also exists in the configure program, but was not the
5463 - *-tti) # must be before sparc entry or we get the wrong os.
5490 - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
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.
5568 -case $basic_machine in
5610 - -vxsim* | -vxworks*)
5626 - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
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
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.
5642 +# Report bugs to <bug-patch@gnu.org>.
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 +## --------------------- ##
5654 +# Be Bourne compatible
5655 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
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
5665 +# Support unset when possible.
5666 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5673 +# Work around bugs in pre-3.0 UWIN ksh.
5674 +$as_unset ENV MAIL MAILPATH
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
5685 + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
5686 + eval $as_var=C; export $as_var
5692 +# Required to use basename.
5693 +if expr a : '\(a\)' >/dev/null 2>&1; then
5699 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
5700 + as_basename=basename
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 ||
5713 + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
5714 + /^X\/\(\/\/\)$/{ s//\1/; q; }
5715 + /^X\/\(\/\).*/{ s//\1/; q; }
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
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=';'
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.
5749 + *[\\/]* ) as_myself=$0 ;;
5750 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751 +for as_dir in $PATH
5754 + test -z "$as_dir" && as_dir=.
5755 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
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
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; }; }
5769 + case $CONFIG_SHELL in
5771 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
5775 + test -z "$as_dir" && as_dir=.
5776 + for as_base in sh bash ksh sh5; do
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+"$@"}
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 |
5810 + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
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; }; }
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).
5823 + # Exit status is that of the last command.
5828 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
5829 + *c*,-n*) ECHO_N= ECHO_C='
5831 + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
5832 + *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
5835 +if expr a : '\(a\)' >/dev/null 2>&1; then
5841 +rm -f conf$$ conf$$.exe 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
5852 +elif ln conf$$.file conf$$ 2>/dev/null; then
5857 +rm -f conf$$ conf$$.exe conf$$.file
5859 +if mkdir -p . 2>/dev/null; then
5865 +as_executable_p="test -f"
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"
5870 +# Sed expression to map a string onto a valid variable name.
5871 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
5875 +# We need space, tab and new line, in precisely that order.
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`
5894 ac_default_prefix=/usr/local
5895 -# Any additions from configure.in:
5897 - --disable-largefile omit support for large files"
5898 +ac_config_libobj_dir=.
5903 +SHELL=${CONFIG_SHELL-/bin/sh}
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}
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'
5917 +ac_unique_file="patch.c"
5918 +# Factoring default headers for most tests.
5919 +ac_includes_default="\
5921 +#if HAVE_SYS_TYPES_H
5922 +# include <sys/types.h>
5924 +#if HAVE_SYS_STAT_H
5925 +# include <sys/stat.h>
5928 +# include <stdlib.h>
5929 +# include <stddef.h>
5932 +# include <stdlib.h>
5936 +# if !STDC_HEADERS && HAVE_MEMORY_H
5937 +# include <memory.h>
5939 +# include <string.h>
5942 +# include <strings.h>
5944 +#if HAVE_INTTYPES_H
5945 +# include <inttypes.h>
5948 +# include <stdint.h>
5952 +# include <unistd.h>
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'
5958 # Initialize some variables set by options.
5960 +ac_init_version=false
5961 # The variables have the same names as the options, with
5962 # dashes changed to underlines.
5964 -cache_file=./config.cache
5965 +cache_file=/dev/null
5973 @@ -31,10 +329,15 @@
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'
5991 infodir='${prefix}/info'
5992 mandir='${prefix}/man'
5994 -# Initialize some other variables.
5997 -SHELL=${CONFIG_SHELL-/bin/sh}
5998 -# Maximum number of lines to put in a shell here document.
5999 -ac_max_here_lines=12
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 @@
6012 - case "$ac_option" in
6013 - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
6016 + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
6018 # Accept the important Cygnus configure options, so we can diagnose typos.
6020 - case "$ac_option" in
6021 + case $ac_option in
6023 -bindir | --bindir | --bindi | --bind | --bin | --bi)
6025 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6026 - bindir="$ac_optarg" ;;
6027 + bindir=$ac_optarg ;;
6029 -build | --build | --buil | --bui | --bu)
6031 + ac_prev=build_alias ;;
6032 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6033 - build="$ac_optarg" ;;
6034 + build_alias=$ac_optarg ;;
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 ;;
6044 + --config-cache | -C)
6045 + cache_file=config.cache ;;
6047 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
6049 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
6051 - datadir="$ac_optarg" ;;
6052 + datadir=$ac_optarg ;;
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; }
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" ;;
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; }
6076 - ac_feature=`echo $ac_feature| sed 's/-/_/g'`
6077 - case "$ac_option" in
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"`;;
6087 - eval "enable_${ac_feature}='$ac_optarg'" ;;
6088 + eval "enable_$ac_feature='$ac_optarg'" ;;
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 ;;
6099 -gas | --gas | --ga | --g)
6100 # Obsolete; use --with-gas.
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.
6107 -Usage: configure [options] [host]
6108 -Options: [defaults in brackets after descriptions]
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
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
6125 - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
6126 - --sharedstatedir=DIR modifiable architecture-independent data in DIR
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
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
6153 - if test -n "$ac_help"; then
6154 - echo "--enable and --with options recognized:$ac_help"
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 ;;
6164 -host | --host | --hos | --ho)
6166 + ac_prev=host_alias ;;
6167 -host=* | --host=* | --hos=* | --ho=*)
6168 - host="$ac_optarg" ;;
6169 + host_alias=$ac_optarg ;;
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 ;;
6179 -infodir | --infodir | --infodi | --infod | --info | --inf)
6181 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
6182 - infodir="$ac_optarg" ;;
6183 + infodir=$ac_optarg ;;
6185 -libdir | --libdir | --libdi | --libd)
6187 -libdir=* | --libdir=* | --libdi=* | --libd=*)
6188 - libdir="$ac_optarg" ;;
6189 + libdir=$ac_optarg ;;
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 ;;
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 ;;
6208 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
6210 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
6211 - mandir="$ac_optarg" ;;
6212 + mandir=$ac_optarg ;;
6214 -nfp | --nfp | --nf)
6215 # Obsolete; use --without-fp.
6218 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
6219 - | --no-cr | --no-c)
6220 + | --no-cr | --no-c | -n)
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 ;;
6231 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6233 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6234 - prefix="$ac_optarg" ;;
6235 + prefix=$ac_optarg ;;
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 ;;
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 ;;
6253 -program-transform-name | --program-transform-name \
6254 | --program-transform-nam | --program-transform-na \
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 ;;
6262 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6263 | -silent | --silent | --silen | --sile | --sil)
6266 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
6268 - sbindir="$ac_optarg" ;;
6269 + sbindir=$ac_optarg ;;
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=* \
6277 - sharedstatedir="$ac_optarg" ;;
6278 + sharedstatedir=$ac_optarg ;;
6280 -site | --site | --sit)
6282 -site=* | --site=* | --sit=*)
6283 - site="$ac_optarg" ;;
6284 + site=$ac_optarg ;;
6286 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6288 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6289 - srcdir="$ac_optarg" ;;
6290 + srcdir=$ac_optarg ;;
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 ;;
6300 -target | --target | --targe | --targ | --tar | --ta | --t)
6302 + ac_prev=target_alias ;;
6303 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
6304 - target="$ac_optarg" ;;
6305 + target_alias=$ac_optarg ;;
6307 -v | -verbose | --verbose | --verbos | --verbo | --verb)
6310 - -version | --version | --versio | --versi | --vers)
6311 - echo "configure generated by autoconf version 2.13"
6313 + -version | --version | --versio | --versi | --vers | -V)
6314 + ac_init_version=: ;;
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; }
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
6329 + case $ac_option in
6330 + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
6333 - eval "with_${ac_package}='$ac_optarg'" ;;
6334 + eval "with_$ac_package='$ac_optarg'" ;;
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; }
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" ;;
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 ;;
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 ;;
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; }; }
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 ;;
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
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; }
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}
6402 if test -n "$ac_prev"; then
6403 - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
6406 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6408 -# File descriptor usage:
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
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; }; }
6424 -exec 5>./config.log
6427 -This file contains any messages produced by compilers while
6428 -running configure, to aid debugging if configure makes a mistake.
6430 +# Be sure to have absolute paths.
6431 +for ac_var in exec_prefix prefix
6433 + eval ac_val=$`echo $ac_var`
6435 + [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
6436 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
6437 + { (exit 1); exit 1; }; };;
6441 -# Strip out --no-create and --no-recursion so they do not pile up.
6442 -# Also quote any args containing shell metacharacters.
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
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`
6459 + [\\/$]* | ?:[\\/]* ) ;;
6460 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
6461 + { (exit 1); exit 1; }; };;
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.
6479 +target=$target_alias
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.
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
6497 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
6499 +test "$silent" = yes && exec 6>/dev/null
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
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.
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 ||
6519 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6520 + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6521 + /^X\(\/\/\)$/{ s//\1/; q; }
6522 + /^X\(\/\).*/{ s//\1/; q; }
6525 if test ! -r $srcdir/$ac_unique_file; then
6527 @@ -471,13 +728,437 @@
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; }; }
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; }; }
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
6579 +# Report the --help message.
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.
6585 +\`configure' configures patch 2.5.9 to adapt to many kinds of systems.
6587 +Usage: $0 [OPTION]... [VAR=VALUE]...
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.
6592 +Defaults for the options are specified in brackets.
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 \`..']
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
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'.
6619 +For better control, use the options below.
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]
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
6645 +if test -n "$ac_init_help"; then
6646 + case $ac_init_help in
6647 + short | recursive ) echo "Configuration of patch 2.5.9:";;
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
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
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.
6668 +Report bugs to <bug-patch@gnu.org>.
6672 +if test "$ac_init_help" = "recursive"; then
6673 + # If there are subdirs, report their specific --help.
6675 + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
6676 + test -d $ac_dir || continue
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'`
6684 + ac_dir_suffix= ac_top_builddir=
6688 + .) # No --srcdir option. We are building in place.
6690 + if test -z "$ac_top_builddir"; then
6693 + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
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 ;;
6702 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
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`
6710 + # Check for guested configure; otherwise get Cygnus style configure.
6711 + if test -f $ac_srcdir/configure.gnu; then
6713 + $SHELL $ac_srcdir/configure.gnu --help=recursive
6714 + elif test -f $ac_srcdir/configure; then
6716 + $SHELL $ac_srcdir/configure --help=recursive
6717 + elif test -f $ac_srcdir/configure.ac ||
6718 + test -f $ac_srcdir/configure.in; then
6720 + $ac_configure --help
6722 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
6728 +test -n "$ac_init_help" && exit 0
6729 +if $ac_init_version; then
6731 +patch configure 2.5.9
6732 +generated by GNU Autoconf 2.57
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.
6743 +This file contains any messages produced by compilers while
6744 +running configure, to aid debugging if configure makes a mistake.
6746 +It was created by patch $as_me 2.5.9, which was
6747 +generated by GNU Autoconf 2.57. Invocation command line was
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`
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`
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`
6777 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6778 +for as_dir in $PATH
6781 + test -z "$as_dir" && as_dir=.
6782 + echo "PATH: $as_dir"
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.
6803 +ac_configure_args0=
6804 +ac_configure_args1=
6806 +ac_must_keep_next=false
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)
6816 + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
6817 + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6820 + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
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.
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 ;;
6835 + -* ) ac_must_keep_next=true ;;
6838 + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
6839 + # Get rid of the leading space.
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; }
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.
6859 +## ---------------- ##
6860 +## Cache variables. ##
6861 +## ---------------- ##
6864 + # The following way of writing the cache mishandles newlines in values,
6867 + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
6870 + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
6871 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
6875 + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6882 +## ----------------- ##
6883 +## Output variables. ##
6884 +## ----------------- ##
6887 + for ac_var in $ac_subst_vars
6889 + eval ac_val=$`echo $ac_var`
6890 + echo "$ac_var='"'"'$ac_val'"'"'"
6894 + if test -n "$ac_subst_files"; then
6896 +## ------------- ##
6897 +## Output files. ##
6898 +## ------------- ##
6901 + for ac_var in $ac_subst_files
6903 + eval ac_val=$`echo $ac_var`
6904 + echo "$ac_var='"'"'$ac_val'"'"'"
6909 + if test -s confdefs.h; then
6916 + sed "/^$/d" confdefs.h | sort
6919 + test "$ac_signal" != 0 &&
6920 + echo "$as_me: caught signal $ac_signal"
6921 + echo "$as_me: exit $exit_status"
6923 + rm -f core core.* *.core &&
6924 + rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
6927 +for ac_signal in 1 2 13 15; do
6928 + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
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.
6937 +# Predefined preprocessor variables.
6939 +cat >>confdefs.h <<_ACEOF
6940 +#define PACKAGE_NAME "$PACKAGE_NAME"
6944 +cat >>confdefs.h <<_ACEOF
6945 +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
6949 +cat >>confdefs.h <<_ACEOF
6950 +#define PACKAGE_VERSION "$PACKAGE_VERSION"
6954 +cat >>confdefs.h <<_ACEOF
6955 +#define PACKAGE_STRING "$PACKAGE_STRING"
6959 +cat >>confdefs.h <<_ACEOF
6960 +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
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 @@
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
6980 if test -r "$cache_file"; then
6981 - echo "loading cache $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;;
6994 - echo "creating cache $cache_file"
6996 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5
6997 +echo "$as_me: creating cache $cache_file" >&6;}
7001 +# Check that the precious variables saved in the cache have kept the same
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
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=: ;;
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=: ;;
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=:
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 ;;
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'" ;;
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; }; }
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
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
7070 - ac_n=-n ac_c= ac_t=
7073 - ac_n= ac_c='\c' ac_t=
7078 -if test "$program_transform_name" = s,x,x,; then
7079 - program_transform_name=
7081 - # Double any \ or $. echo might interpret backslashes.
7082 - cat <<\EOF_SED > conftestsed
7083 -s,\\,\\\\,g; s,\$,$$,g
7085 - program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
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"
7094 -# sed with no file args requires a program.
7095 -test "$program_transform_name" = "" && program_transform_name="s,x,x,"
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"
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"
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; }
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.
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; }
7122 -echo $ac_n "checking host system type""... $ac_c" 1>&6
7123 -echo "configure:573: checking host system type" >&5
7126 -case "$host_alias" in
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; }
7133 - *) host_alias=$nonopt ;;
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
7149 -# Extract the first word of "gcc", so it can be a program name with args.
7162 + ac_config_headers="$ac_config_headers config.h:config.hin"
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,$//
7174 +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
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
7191 + if test -n "$CC"; then
7192 + ac_cv_prog_CC="$CC" # Let the user override the test.
7194 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195 +for as_dir in $PATH
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
7211 +if test -n "$CC"; then
7212 + echo "$as_me:$LINENO: result: $CC" >&5
7213 +echo "${ECHO_T}$CC" >&6
7215 + echo "$as_me:$LINENO: result: no" >&5
7216 +echo "${ECHO_T}no" >&6
7220 +if test -z "$ac_cv_prog_CC"; then
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
7233 + if test -n "$ac_ct_CC"; then
7234 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7236 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7237 +for as_dir in $PATH
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
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
7257 + echo "$as_me:$LINENO: result: no" >&5
7258 +echo "${ECHO_T}no" >&6
7263 + CC="$ac_cv_prog_CC"
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
7275 if test -n "$CC"; then
7276 ac_cv_prog_CC="$CC" # Let the user override the test.
7278 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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"
7287 - IFS="$ac_save_ifs"
7288 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289 +for as_dir in $PATH
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
7304 -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
7311 - echo "$ac_t""no" 1>&6
7312 + echo "$as_me:$LINENO: result: no" >&5
7313 +echo "${ECHO_T}no" >&6
7317 +if test -z "$ac_cv_prog_CC"; then
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
7326 + if test -n "$ac_ct_CC"; then
7327 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7329 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7330 +for as_dir in $PATH
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
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
7350 + echo "$as_me:$LINENO: result: no" >&5
7351 +echo "${ECHO_T}no" >&6
7356 + CC="$ac_cv_prog_CC"
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
7372 if test -n "$CC"; then
7373 ac_cv_prog_CC="$CC" # Let the user override the test.
7375 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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
7385 - ac_cv_prog_CC="cc"
7389 - IFS="$ac_save_ifs"
7390 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7391 +for as_dir in $PATH
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
7401 + ac_cv_prog_CC="cc"
7402 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
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
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.
7418 - set dummy "$ac_dir/$ac_word" "$@"
7420 - ac_cv_prog_CC="$@"
7421 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
7426 -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
7433 - echo "$ac_t""no" 1>&6
7434 + echo "$as_me:$LINENO: result: no" >&5
7435 +echo "${ECHO_T}no" >&6
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
7448 +if test -z "$CC"; then
7449 + if test -n "$ac_tool_prefix"; then
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
7459 if test -n "$CC"; then
7460 ac_cv_prog_CC="$CC" # Let the user override the test.
7462 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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"
7471 - IFS="$ac_save_ifs"
7472 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473 +for as_dir in $PATH
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
7488 -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
7495 - echo "$ac_t""no" 1>&6
7496 + echo "$as_me:$LINENO: result: no" >&5
7497 +echo "${ECHO_T}no" >&6
7502 + test -n "$CC" && break
7505 +if test -z "$CC"; then
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
7516 + if test -n "$ac_ct_CC"; then
7517 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7519 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7520 +for as_dir in $PATH
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
7530 - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
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
7541 + echo "$as_me:$LINENO: result: no" >&5
7542 +echo "${ECHO_T}no" >&6
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
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
7559 -cat > conftest.$ac_ext << EOF
7562 -#line 726 "configure"
7563 -#include "confdefs.h"
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; }; }
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
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
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
7595 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596 + (exit $ac_status); }
7598 +cat >conftest.$ac_ext <<_ACEOF
7599 +#line $LINENO "configure"
7602 +cat confdefs.h >>conftest.$ac_ext
7603 +cat >>conftest.$ac_ext <<_ACEOF
7604 +/* end confdefs.h. */
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
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
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
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.
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
7637 + test -f "$ac_file" || continue
7639 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
7641 + conftest.$ac_ext )
7642 + # This is the source file.
7645 + # We found the default executable, but exeext='' is most
7646 + # certainly right.
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
7660 + echo "$as_me: failed program was:" >&5
7661 +sed 's/^/| /' conftest.$ac_ext >&5
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; }; }
7670 +ac_exeext=$ac_cv_exeext
7671 +echo "$as_me:$LINENO: result: $ac_file" >&5
7672 +echo "${ECHO_T}$ac_file" >&6
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
7685 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 + (exit $ac_status); }; }; then
7687 + cross_compiling=no
7689 - ac_cv_prog_cc_cross=yes
7690 + if test "$cross_compiling" = maybe; then
7691 + cross_compiling=yes
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; }; }
7703 - echo "configure: failed program was:" >&5
7704 - cat conftest.$ac_ext >&5
7705 - ac_cv_prog_cc_works=no
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
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
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
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
7740 +for ac_file in conftest.exe conftest conftest.*; do
7741 + test -f "$ac_file" || continue
7743 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
7744 + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
7745 + export ac_cv_exeext
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; }; }
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
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
7770 +rm -f conftest.$ac_ext
7771 +EXEEXT=$ac_cv_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
7778 - cat > conftest.c <<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"
7789 +cat confdefs.h >>conftest.$ac_ext
7790 +cat >>conftest.$ac_ext <<_ACEOF
7791 +/* end confdefs.h. */
7801 +rm -f conftest.o conftest.obj
7802 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7803 + (eval $ac_compile) 2>&5
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
7809 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
7810 + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
7816 + echo "$as_me: failed program was:" >&5
7817 +sed 's/^/| /' conftest.$ac_ext >&5
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; }; }
7826 +rm -f conftest.$ac_cv_objext conftest.$ac_ext
7828 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
7829 +echo "${ECHO_T}$ac_cv_objext" >&6
7830 +OBJEXT=$ac_cv_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
7837 + cat >conftest.$ac_ext <<_ACEOF
7838 +#line $LINENO "configure"
7841 +cat confdefs.h >>conftest.$ac_ext
7842 +cat >>conftest.$ac_ext <<_ACEOF
7843 +/* end confdefs.h. */
7845 -echo "$ac_t""$ac_cv_prog_gcc" 1>&6
7853 -if test $ac_cv_prog_gcc = yes; then
7859 +rm -f conftest.$ac_objext
7860 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7861 + (eval $ac_compile) 2>&5
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
7869 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 + (exit $ac_status); }; }; then
7871 + ac_compiler_gnu=yes
7874 + echo "$as_me: failed program was:" >&5
7875 +sed 's/^/| /' conftest.$ac_ext >&5
7879 +rm -f conftest.$ac_objext conftest.$ac_ext
7880 +ac_cv_c_compiler_gnu=$ac_compiler_gnu
7882 -ac_test_CFLAGS="${CFLAGS+set}"
7883 -ac_save_CFLAGS="$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
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
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
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"
7907 +cat confdefs.h >>conftest.$ac_ext
7908 +cat >>conftest.$ac_ext <<_ACEOF
7909 +/* end confdefs.h. */
7919 +rm -f conftest.$ac_objext
7920 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7921 + (eval $ac_compile) 2>&5
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
7929 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 + (exit $ac_status); }; }; then
7933 - ac_cv_prog_cc_g=no
7936 + echo "$as_me: failed program was:" >&5
7937 +sed 's/^/| /' conftest.$ac_ext >&5
7942 -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
7943 +rm -f conftest.$ac_objext conftest.$ac_ext
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
7953 @@ -816,86 +1943,482 @@
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
7962 + ac_cv_prog_cc_stdc=no
7964 +cat >conftest.$ac_ext <<_ACEOF
7965 +#line $LINENO "configure"
7968 +cat confdefs.h >>conftest.$ac_ext
7969 +cat >>conftest.$ac_ext <<_ACEOF
7970 +/* end confdefs.h. */
7971 +#include <stdarg.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)
7984 +static char *f (char * (*g) (char **, int), char **p, ...)
7989 + s = g (p, va_arg (v,int));
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);
8002 +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
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__"
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
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
8027 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 + (exit $ac_status); }; }; then
8029 + ac_cv_prog_cc_stdc=$ac_arg
8032 + echo "$as_me: failed program was:" >&5
8033 +sed 's/^/| /' conftest.$ac_ext >&5
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
8038 +rm -f conftest.$ac_objext
8040 +rm -f conftest.$ac_ext conftest.$ac_objext
8045 +case "x$ac_cv_prog_cc_stdc" in
8047 + echo "$as_me:$LINENO: result: none needed" >&5
8048 +echo "${ECHO_T}none needed" >&6 ;;
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" ;;
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
8064 +rm -f conftest.$ac_objext
8065 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8066 + (eval $ac_compile) 2>&5
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
8074 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 + (exit $ac_status); }; }; then
8076 + for ac_declaration in \
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);'
8085 + cat >conftest.$ac_ext <<_ACEOF
8086 +#line $LINENO "configure"
8089 +cat confdefs.h >>conftest.$ac_ext
8090 +cat >>conftest.$ac_ext <<_ACEOF
8091 +/* end confdefs.h. */
8092 +#include <stdlib.h>
8102 +rm -f conftest.$ac_objext
8103 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8104 + (eval $ac_compile) 2>&5
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
8112 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 + (exit $ac_status); }; }; then
8116 + echo "$as_me: failed program was:" >&5
8117 +sed 's/^/| /' conftest.$ac_ext >&5
8121 +rm -f conftest.$ac_objext conftest.$ac_ext
8122 + cat >conftest.$ac_ext <<_ACEOF
8123 +#line $LINENO "configure"
8126 +cat confdefs.h >>conftest.$ac_ext
8127 +cat >>conftest.$ac_ext <<_ACEOF
8128 +/* end confdefs.h. */
8138 +rm -f conftest.$ac_objext
8139 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8140 + (eval $ac_compile) 2>&5
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
8148 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 + (exit $ac_status); }; }; then
8152 + echo "$as_me: failed program was:" >&5
8153 +sed 's/^/| /' conftest.$ac_ext >&5
8156 +rm -f conftest.$ac_objext conftest.$ac_ext
8159 +if test -n "$ac_declaration"; then
8160 + echo '#ifdef __cplusplus' >>confdefs.h
8161 + echo $ac_declaration >>confdefs.h
8162 + echo '#endif' >>confdefs.h
8166 + echo "$as_me: failed program was:" >&5
8167 +sed 's/^/| /' conftest.$ac_ext >&5
8170 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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
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
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.
8197 + # Double quotes because CPP needs to be expanded
8198 + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8200 + ac_preproc_ok=false
8201 +for ac_c_preproc_warn_flag in '' yes
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>
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
8220 + # not just through cpp. "Syntax error" is here to catch this case.
8221 + cat >conftest.$ac_ext <<_ACEOF
8222 +#line $LINENO "configure"
8225 +cat confdefs.h >>conftest.$ac_ext
8226 +cat >>conftest.$ac_ext <<_ACEOF
8227 +/* end confdefs.h. */
8229 +# include <limits.h>
8231 +# include <assert.h>
8235 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8236 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
8249 - echo "$ac_err" >&5
8250 - echo "configure: failed program was:" >&5
8251 - cat conftest.$ac_ext >&5
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>
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
8266 +if test -z "$ac_cpp_err"; then
8269 - echo "$ac_err" >&5
8270 - echo "configure: failed program was:" >&5
8271 - cat conftest.$ac_ext >&5
8273 - CPP="${CC-cc} -nologo -E"
8274 - cat > conftest.$ac_ext <<EOF
8275 -#line 871 "configure"
8276 -#include "confdefs.h"
8277 -#include <assert.h>
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
8285 + echo "$as_me: failed program was:" >&5
8286 +sed 's/^/| /' conftest.$ac_ext >&5
8288 + # Broken: fails on valid input.
8291 +rm -f conftest.err conftest.$ac_ext
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"
8299 +cat confdefs.h >>conftest.$ac_ext
8300 +cat >>conftest.$ac_ext <<_ACEOF
8301 +/* end confdefs.h. */
8302 +#include <ac_nonexistent.h>
8304 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8305 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
8318 - echo "$ac_err" >&5
8319 - echo "configure: failed program was:" >&5
8320 - cat conftest.$ac_ext >&5
8326 +if test -z "$ac_cpp_err"; then
8327 + # Broken: success on invalid input.
8330 + echo "$as_me: failed program was:" >&5
8331 +sed 's/^/| /' conftest.$ac_ext >&5
8333 + # Passes both tests.
8338 +rm -f conftest.err conftest.$ac_ext
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
8347 - ac_cv_prog_CPP="$CPP"
8350 + ac_cv_prog_CPP=$CPP
8353 - CPP="$ac_cv_prog_CPP"
8354 + CPP=$ac_cv_prog_CPP
8356 - ac_cv_prog_CPP="$CPP"
8357 + ac_cv_prog_CPP=$CPP
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
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"
8375 +cat confdefs.h >>conftest.$ac_ext
8376 +cat >>conftest.$ac_ext <<_ACEOF
8377 +/* end confdefs.h. */
8379 +# include <limits.h>
8381 +# include <assert.h>
8385 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8386 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
8401 +if test -z "$ac_cpp_err"; then
8404 + echo "$as_me: failed program was:" >&5
8405 +sed 's/^/| /' conftest.$ac_ext >&5
8407 + # Broken: fails on valid input.
8410 +rm -f conftest.err conftest.$ac_ext
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"
8418 +cat confdefs.h >>conftest.$ac_ext
8419 +cat >>conftest.$ac_ext <<_ACEOF
8420 +/* end confdefs.h. */
8421 +#include <ac_nonexistent.h>
8423 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8424 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
8439 +if test -z "$ac_cpp_err"; then
8440 + # Broken: success on invalid input.
8443 + echo "$as_me: failed program was:" >&5
8444 +sed 's/^/| /' conftest.$ac_ext >&5
8446 + # Passes both tests.
8450 +rm -f conftest.err conftest.$ac_ext
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
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; }; }
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
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"
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"
8481 + elif test -f $ac_dir/shtool; then
8482 + ac_aux_dir=$ac_dir
8483 + ac_install_sh="$ac_aux_dir/shtool install -c"
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; }; }
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.
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
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
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/*) ;;
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
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.
8533 - ac_cv_path_install="$ac_dir/$ac_prog -c"
8537 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538 +for as_dir in $PATH
8541 + test -z "$as_dir" && as_dir=.
8542 + # Account for people who put trailing slashes in PATH elements.
8544 + ./ | .// | /cC/* | \
8545 + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
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
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.
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.
8563 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8571 - IFS="$ac_save_IFS"
8579 if test "${ac_cv_path_install+set}" = set; then
8580 - INSTALL="$ac_cv_path_install"
8581 + INSTALL=$ac_cv_path_install
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
8591 -echo "$ac_t""$INSTALL" 1>&6
8592 +echo "$as_me:$LINENO: result: $INSTALL" >&5
8593 +echo "${ECHO_T}$INSTALL" >&6
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}'
8599 -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
8600 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8602 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
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
8615 - cat > conftestmake <<\EOF
8616 + cat >conftest.make <<\_ACEOF
8618 - @echo 'ac_maketemp="${MAKE}"'
8620 + @echo 'ac_maketemp="$(MAKE)"'
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
8628 eval ac_cv_prog_make_${ac_make}_set=no
8631 +rm -f conftest.make
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
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}"
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
8658 - case "$ed_PROGRAM" in
8660 + case $ed_PROGRAM in
8661 + [\\/]* | ?:[\\/]*)
8662 ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a path.
8665 - ac_cv_path_ed_PROGRAM="$ed_PROGRAM" # Let the user override the test with a dos path.
8668 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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"
8677 - IFS="$ac_save_ifs"
8678 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679 +for as_dir in $PATH
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
8692 test -z "$ac_cv_path_ed_PROGRAM" && ac_cv_path_ed_PROGRAM="ed"
8696 -ed_PROGRAM="$ac_cv_path_ed_PROGRAM"
8697 +ed_PROGRAM=$ac_cv_path_ed_PROGRAM
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
8704 - echo "$ac_t""no" 1>&6
8705 + echo "$as_me:$LINENO: result: no" >&5
8706 +echo "${ECHO_T}no" >&6
8710 -echo $ac_n "checking build system type""... $ac_c" 1>&6
8711 -echo "configure:1032: checking build system type" >&5
8714 -case "$build_alias" in
8717 - NONE) build_alias=$host_alias ;;
8718 - *) build_alias=$nonopt ;;
8721 +cat >>confdefs.h <<\_ACEOF
8722 +#define _GNU_SOURCE 1
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
8731 -if test $host != $build; then
8732 - ac_tool_prefix=${host_alias}-
8738 - # Check whether --enable-largefile or --disable-largefile was given.
8739 -if test "${enable_largefile+set}" = set; then
8740 - enableval="$enable_largefile"
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
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
8759 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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"
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'
8771 - IFS="$ac_save_ifs"
8772 - test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
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
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"
8790 +cat confdefs.h >>conftest.$ac_ext
8791 +cat >>conftest.$ac_ext <<_ACEOF
8792 +/* end confdefs.h. */
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
8807 - echo "$ac_t""no" 1>&6
8808 + echo "$as_me:$LINENO: result: no" >&5
8809 +echo "${ECHO_T}no" >&6
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
8819 + cat >conftest.$ac_ext <<_ACEOF
8820 +#line $LINENO "configure"
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>
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
8843 +rm -f conftest.$ac_objext
8844 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8845 + (eval $ac_compile) 2>&5
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
8853 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854 + (exit $ac_status); }; }; then
8855 + ac_cv_header_stdc=yes
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
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
8874 +ac_cv_header_stdc=no
8876 +rm -f conftest.$ac_objext conftest.$ac_ext
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"
8887 +cat confdefs.h >>conftest.$ac_ext
8888 +cat >>conftest.$ac_ext <<_ACEOF
8889 +/* end confdefs.h. */
8890 +#include <string.h>
8893 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8894 + $EGREP "memchr" >/dev/null 2>&1; then
8897 - echo "configure: failed program was:" >&5
8898 - cat conftest.$ac_ext >&5
8900 - ac_cv_sys_largefile_CFLAGS=no
8901 + ac_cv_header_stdc=no
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"
8921 +cat confdefs.h >>conftest.$ac_ext
8922 +cat >>conftest.$ac_ext <<_ACEOF
8923 +/* end confdefs.h. */
8924 +#include <stdlib.h>
8927 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8928 + $EGREP "free" >/dev/null 2>&1; then
8931 - ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
8932 - ac_cv_sys_largefile_LDFLAGS=no
8935 + ac_cv_header_stdc=no
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
8945 - ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
8946 - ac_cv_sys_largefile_LIBS=no
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
8957 + cat >conftest.$ac_ext <<_ACEOF
8958 +#line $LINENO "configure"
8961 +cat confdefs.h >>conftest.$ac_ext
8962 +cat >>conftest.$ac_ext <<_ACEOF
8963 +/* end confdefs.h. */
8965 +#if ((' ' & 0x0FF) == 0x020)
8966 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8967 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
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))
8976 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
8977 - case "$ac_flag" in
8979 - -D_FILE_OFFSET_BITS=*) ;;
8980 - -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
8981 - -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
8983 - case "$ac_flag" in
8986 - case "$CPPFLAGS" in
8987 - '') CPPFLAGS="$ac_flag" ;;
8988 - *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
8992 - case "$ac_flag" in
8996 - '') CFLAGS="$ac_flag" ;;
8997 - *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
9002 - case "$ac_cv_sys_largefile_LDFLAGS" in
9005 - case "$LDFLAGS" in
9006 - '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
9007 - *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
9010 - case "$ac_cv_sys_largefile_LIBS" in
9014 - '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
9015 - *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
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)))
9027 + for (i = 0; i < 256; i++)
9028 + if (XOR (islower (i), ISLOWER (i))
9029 + || toupper (i) != TOUPPER (i))
9034 +rm -f conftest$ac_exeext
9035 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9036 + (eval $ac_link) 2>&5
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
9043 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044 + (exit $ac_status); }; }; then
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 ;;
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" : '[^=]*=\(.*\)'` ;;
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
9066 +( exit $ac_status )
9067 +ac_cv_header_stdc=no
9069 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
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
9082 +cat >>confdefs.h <<\_ACEOF
9083 +#define STDC_HEADERS 1
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
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 ;;
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" : '[^=]*=\(.*\)'` ;;
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
9114 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
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
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 ;;
9129 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
9130 - case "$ac_flag" in
9132 - ac_cv_sys_large_files=1 ;;
9134 - ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
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
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"
9160 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9161 - egrep "yes" >/dev/null 2>&1; then
9163 - echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
9164 -#define _ALL_SOURCE 1
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
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
9179 - echo "$ac_t""no" 1>&6
9180 + cat >conftest.$ac_ext <<_ACEOF
9181 +#line $LINENO "configure"
9184 +cat confdefs.h >>conftest.$ac_ext
9185 +cat >>conftest.$ac_ext <<_ACEOF
9186 +/* end confdefs.h. */
9187 +$ac_includes_default
9189 +#include <$ac_header>
9191 +rm -f conftest.$ac_objext
9192 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9193 + (eval $ac_compile) 2>&5
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
9201 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 + (exit $ac_status); }; }; then
9203 + eval "$as_ac_Header=yes"
9205 + echo "$as_me: failed program was:" >&5
9206 +sed 's/^/| /' conftest.$ac_ext >&5
9208 +eval "$as_ac_Header=no"
9211 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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
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
9236 +echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
9237 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
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"
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>
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
9260 - eval "ac_cv_header_$ac_safe=yes"
9262 +rm -f conftest.$ac_objext
9263 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9264 + (eval $ac_compile) 2>&5
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
9272 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273 + (exit $ac_status); }; }; then
9274 + ac_header_compiler=yes
9276 - echo "$ac_err" >&5
9277 - echo "configure: failed program was:" >&5
9278 - cat conftest.$ac_ext >&5
9280 - eval "ac_cv_header_$ac_safe=no"
9281 + echo "$as_me: failed program was:" >&5
9282 +sed 's/^/| /' conftest.$ac_ext >&5
9284 +ac_header_compiler=no
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
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"
9298 +cat confdefs.h >>conftest.$ac_ext
9299 +cat >>conftest.$ac_ext <<_ACEOF
9300 +/* end confdefs.h. */
9301 +#include <minix/config.h>
9303 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9304 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
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
9324 + echo "$as_me: failed program was:" >&5
9325 +sed 's/^/| /' conftest.$ac_ext >&5
9327 + ac_header_preproc=no
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
9333 +# So? What about this header?
9334 +case $ac_header_compiler:$ac_header_preproc in
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;}
9342 +## ------------------------------------ ##
9343 +## Report this to bug-autoconf@gnu.org. ##
9344 +## ------------------------------------ ##
9347 + sed "s/^/$as_me: WARNING: /" >&2
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;}
9358 +## ------------------------------------ ##
9359 +## Report this to bug-autoconf@gnu.org. ##
9360 +## ------------------------------------ ##
9363 + sed "s/^/$as_me: WARNING: /" >&2
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
9371 + ac_cv_header_minix_config_h=$ac_header_preproc
9373 +echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
9374 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
9377 +if test $ac_cv_header_minix_config_h = yes; then
9380 - echo "$ac_t""no" 1>&6
9386 if test "$MINIX" = yes; then
9387 - cat >> confdefs.h <<\EOF
9389 +cat >>confdefs.h <<\_ACEOF
9390 #define _POSIX_SOURCE 1
9394 - cat >> confdefs.h <<\EOF
9396 +cat >>confdefs.h <<\_ACEOF
9397 #define _POSIX_1_SOURCE 2
9401 - cat >> confdefs.h <<\EOF
9403 +cat >>confdefs.h <<\_ACEOF
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
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
9421 - if test "$GCC" = yes; then
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
9431 - echo "$ac_t""no" 1>&6
9434 + ac_func_search_save_LIBS=$LIBS
9435 +ac_cv_search_strerror=no
9436 +cat >conftest.$ac_ext <<_ACEOF
9437 +#line $LINENO "configure"
9440 +cat confdefs.h >>conftest.$ac_ext
9441 +cat >>conftest.$ac_ext <<_ACEOF
9442 +/* end confdefs.h. */
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. */
9452 +/* We use char because int might match the return type of a gcc2
9453 + builtin and then its argument prototype would still apply. */
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
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
9473 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9474 + (exit $ac_status); }; }; then
9475 + ac_cv_search_strerror="none required"
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
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"
9493 +cat confdefs.h >>conftest.$ac_ext
9494 +cat >>conftest.$ac_ext <<_ACEOF
9495 +/* end confdefs.h. */
9498 -#define __CYGWIN__ __CYGWIN32__
9499 +/* Override any gcc2 internal prototype to avoid an error. */
9506 -if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9509 +/* We use char because int might match the return type of a gcc2
9510 + builtin and then its argument prototype would still apply. */
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
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
9530 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9531 + (exit $ac_status); }; }; then
9532 + ac_cv_search_strerror="-l$ac_lib"
9535 - echo "configure: failed program was:" >&5
9536 - cat conftest.$ac_ext >&5
9539 + echo "$as_me: failed program was:" >&5
9540 +sed 's/^/| /' conftest.$ac_ext >&5
9545 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9548 +LIBS=$ac_func_search_save_LIBS
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"
9555 -echo "$ac_t""$ac_cv_cygwin" 1>&6
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
9564 +# Check whether --enable-largefile or --disable-largefile was given.
9565 +if test "${enable_largefile+set}" = set; then
9566 + enableval="$enable_largefile"
9569 +if test "$enable_largefile" != no; then
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
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
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"
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)
9606 -return __MINGW32__;
9609 -if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9616 + rm -f conftest.$ac_objext
9617 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9618 + (eval $ac_compile) 2>&5
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
9626 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627 + (exit $ac_status); }; }; then
9630 - echo "configure: failed program was:" >&5
9631 - cat conftest.$ac_ext >&5
9634 + echo "$as_me: failed program was:" >&5
9635 +sed 's/^/| /' conftest.$ac_ext >&5
9638 +rm -f conftest.$ac_objext
9640 + rm -f conftest.$ac_objext
9641 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9642 + (eval $ac_compile) 2>&5
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
9650 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 + (exit $ac_status); }; }; then
9652 + ac_cv_sys_largefile_CC=' -n32'; break
9654 + echo "$as_me: failed program was:" >&5
9655 +sed 's/^/| /' conftest.$ac_ext >&5
9658 +rm -f conftest.$ac_objext
9662 + rm -f conftest.$ac_ext
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
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
9677 + ac_cv_sys_file_offset_bits=no
9678 + cat >conftest.$ac_ext <<_ACEOF
9679 +#line $LINENO "configure"
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)
9702 +rm -f conftest.$ac_objext
9703 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9704 + (eval $ac_compile) 2>&5
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
9712 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713 + (exit $ac_status); }; }; then
9716 + echo "$as_me: failed program was:" >&5
9717 +sed 's/^/| /' conftest.$ac_ext >&5
9720 +rm -f conftest.$ac_objext conftest.$ac_ext
9721 + cat >conftest.$ac_ext <<_ACEOF
9722 +#line $LINENO "configure"
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)
9746 +rm -f conftest.$ac_objext
9747 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9748 + (eval $ac_compile) 2>&5
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
9756 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 + (exit $ac_status); }; }; then
9758 + ac_cv_sys_file_offset_bits=64; break
9760 + echo "$as_me: failed program was:" >&5
9761 +sed 's/^/| /' conftest.$ac_ext >&5
9764 +rm -f conftest.$ac_objext conftest.$ac_ext
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
9772 +cat >>confdefs.h <<_ACEOF
9773 +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
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
9784 + ac_cv_sys_large_files=no
9785 + cat >conftest.$ac_ext <<_ACEOF
9786 +#line $LINENO "configure"
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)
9809 +rm -f conftest.$ac_objext
9810 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9811 + (eval $ac_compile) 2>&5
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
9819 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820 + (exit $ac_status); }; }; then
9823 + echo "$as_me: failed program was:" >&5
9824 +sed 's/^/| /' conftest.$ac_ext >&5
9827 +rm -f conftest.$ac_objext conftest.$ac_ext
9828 + cat >conftest.$ac_ext <<_ACEOF
9829 +#line $LINENO "configure"
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)
9853 +rm -f conftest.$ac_objext
9854 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9855 + (eval $ac_compile) 2>&5
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
9863 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864 + (exit $ac_status); }; }; then
9865 + ac_cv_sys_large_files=1; break
9867 + echo "$as_me: failed program was:" >&5
9868 +sed 's/^/| /' conftest.$ac_ext >&5
9871 +rm -f conftest.$ac_objext conftest.$ac_ext
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
9879 +cat >>confdefs.h <<_ACEOF
9880 +#define _LARGE_FILES $ac_cv_sys_large_files
9887 -echo "$ac_t""$ac_cv_mingw32" 1>&6
9889 -test "$ac_cv_mingw32" = yes && MINGW32=yes
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
9902 +cat >>confdefs.h <<\_ACEOF
9903 +#define PROTOTYPES 1
9907 +cat >>confdefs.h <<\_ACEOF
9908 +#define __PROTOTYPES 1
9912 - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
9914 + echo "$as_me:$LINENO: result: no" >&5
9915 +echo "${ECHO_T}no" >&6
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
9924 - echo 'int main () { return 0; }' > conftest.$ac_ext
9926 - if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
9927 - for file in conftest.*; do
9929 - *.c | *.o | *.obj) ;;
9930 - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
9934 - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
9937 - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
9938 + cat >conftest.$ac_ext <<_ACEOF
9939 +#line $LINENO "configure"
9942 +cat confdefs.h >>conftest.$ac_ext
9943 +cat >>conftest.$ac_ext <<_ACEOF
9944 +/* end confdefs.h. */
9949 +/* FIXME: Include the comments suggested by Paul. */
9950 +#ifndef __cplusplus
9951 + /* Ultrix mips cc rejects this. */
9952 + typedef int charset[2];
9954 + /* SunOS 4.1.1 cc rejects this. */
9955 + char const *const *ccp;
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
9964 + const char *g = "string";
9965 + ccp = &g + (g ? g-g : 0);
9966 + /* HPUX 7.0 cc rejects these. */
9969 + ccp = (char const *const *) p;
9970 + { /* SCO 3.2v4 cc rejects this. */
9972 + char const *s = 0 ? (char *) 0 : (char const *) 0;
9976 + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9977 + int x[] = {25, 17};
9978 + const int *foo = &x[0];
9981 + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9982 + typedef const int *iptr;
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;
9991 + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9992 + const int foo = 10;
10000 +rm -f conftest.$ac_objext
10001 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10002 + (eval $ac_compile) 2>&5
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
10010 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 + (exit $ac_status); }; }; then
10012 + ac_cv_c_const=yes
10014 + echo "$as_me: failed program was:" >&5
10015 +sed 's/^/| /' conftest.$ac_ext >&5
10019 +rm -f conftest.$ac_objext conftest.$ac_ext
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
10026 -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10027 -echo "$ac_t""${ac_cv_exeext}" 1>&6
10029 +cat >>confdefs.h <<\_ACEOF
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
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
10053 - am_cv_prog_cc_stdc=no
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__"
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"
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)
10084 +#include <$ac_hdr>
10095 -static char *f (char * (*g) (char **, int), char **p, ...)
10097 +rm -f conftest.$ac_objext
10098 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10099 + (eval $ac_compile) 2>&5
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
10107 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10108 + (exit $ac_status); }; }; then
10109 + eval "$as_ac_Header=yes"
10111 + echo "$as_me: failed program was:" >&5
10112 +sed 's/^/| /' conftest.$ac_ext >&5
10114 +eval "$as_ac_Header=no"
10116 +rm -f conftest.$ac_objext conftest.$ac_ext
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
10125 +ac_header_dirent=$ac_hdr; break
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
10136 + ac_func_search_save_LIBS=$LIBS
10137 +ac_cv_search_opendir=no
10138 +cat >conftest.$ac_ext <<_ACEOF
10139 +#line $LINENO "configure"
10142 +cat confdefs.h >>conftest.$ac_ext
10143 +cat >>conftest.$ac_ext <<_ACEOF
10144 +/* end confdefs.h. */
10146 +/* Override any gcc2 internal prototype to avoid an error. */
10147 +#ifdef __cplusplus
10150 +/* We use char because int might match the return type of a gcc2
10151 + builtin and then its argument prototype would still apply. */
10159 - s = g (p, va_arg (v,int));
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);
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
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
10185 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186 + (exit $ac_status); }; }; then
10187 + ac_cv_search_opendir="none required"
10189 + echo "$as_me: failed program was:" >&5
10190 +sed 's/^/| /' conftest.$ac_ext >&5
10192 -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
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"
10202 +cat confdefs.h >>conftest.$ac_ext
10203 +cat >>conftest.$ac_ext <<_ACEOF
10204 +/* end confdefs.h. */
10208 -if { (eval echo configure:1537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10210 - am_cv_prog_cc_stdc="$ac_arg"; break
10211 +/* Override any gcc2 internal prototype to avoid an error. */
10212 +#ifdef __cplusplus
10215 +/* We use char because int might match the return type of a gcc2
10216 + builtin and then its argument prototype would still apply. */
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
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
10236 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10237 + (exit $ac_status); }; }; then
10238 + ac_cv_search_opendir="-l$ac_lib"
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
10250 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10253 +LIBS=$ac_func_search_save_LIBS
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"
10262 -if test -z "$am_cv_prog_cc_stdc"; then
10263 - echo "$ac_t""none needed" 1>&6
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
10271 + ac_func_search_save_LIBS=$LIBS
10272 +ac_cv_search_opendir=no
10273 +cat >conftest.$ac_ext <<_ACEOF
10274 +#line $LINENO "configure"
10277 +cat confdefs.h >>conftest.$ac_ext
10278 +cat >>conftest.$ac_ext <<_ACEOF
10279 +/* end confdefs.h. */
10281 +/* Override any gcc2 internal prototype to avoid an error. */
10282 +#ifdef __cplusplus
10285 +/* We use char because int might match the return type of a gcc2
10286 + builtin and then its argument prototype would still apply. */
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
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
10306 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 + (exit $ac_status); }; }; then
10308 + ac_cv_search_opendir="none required"
10310 + echo "$as_me: failed program was:" >&5
10311 +sed 's/^/| /' conftest.$ac_ext >&5
10314 -case "x$am_cv_prog_cc_stdc" in
10316 - *) CC="$CC $am_cv_prog_cc_stdc" ;;
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"
10326 +cat confdefs.h >>conftest.$ac_ext
10327 +cat >>conftest.$ac_ext <<_ACEOF
10328 +/* end confdefs.h. */
10330 +/* Override any gcc2 internal prototype to avoid an error. */
10331 +#ifdef __cplusplus
10334 +/* We use char because int might match the return type of a gcc2
10335 + builtin and then its argument prototype would still apply. */
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
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
10355 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356 + (exit $ac_status); }; }; then
10357 + ac_cv_search_opendir="-l$ac_lib"
10360 + echo "$as_me: failed program was:" >&5
10361 +sed 's/^/| /' conftest.$ac_ext >&5
10364 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10367 +LIBS=$ac_func_search_save_LIBS
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"
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
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
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
10399 - cat > conftest.$ac_ext <<EOF
10400 -#line 1581 "configure"
10401 -#include "confdefs.h"
10402 + cat >conftest.$ac_ext <<_ACEOF
10403 +#line $LINENO "configure"
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>
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
10428 +rm -f conftest.$ac_objext
10429 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10430 + (eval $ac_compile) 2>&5
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
10438 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10439 + (exit $ac_status); }; }; then
10440 ac_cv_header_stdc=yes
10442 - echo "$ac_err" >&5
10443 - echo "configure: failed program was:" >&5
10444 - cat conftest.$ac_ext >&5
10446 - ac_cv_header_stdc=no
10447 + echo "$as_me: failed program was:" >&5
10448 +sed 's/^/| /' conftest.$ac_ext >&5
10450 +ac_cv_header_stdc=no
10453 +rm -f conftest.$ac_objext conftest.$ac_ext
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"
10464 +cat confdefs.h >>conftest.$ac_ext
10465 +cat >>conftest.$ac_ext <<_ACEOF
10466 +/* end confdefs.h. */
10467 #include <string.h>
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
10477 ac_cv_header_stdc=no
10480 @@ -1619,16 +3887,20 @@
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"
10491 +cat confdefs.h >>conftest.$ac_ext
10492 +cat >>conftest.$ac_ext <<_ACEOF
10493 +/* end confdefs.h. */
10494 #include <stdlib.h>
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
10504 ac_cv_header_stdc=no
10507 @@ -1637,1179 +3909,6855 @@
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
10515 - cat > conftest.$ac_ext <<EOF
10516 -#line 1645 "configure"
10517 -#include "confdefs.h"
10518 + cat >conftest.$ac_ext <<_ACEOF
10519 +#line $LINENO "configure"
10522 +cat confdefs.h >>conftest.$ac_ext
10523 +cat >>conftest.$ac_ext <<_ACEOF
10524 +/* end confdefs.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);
10532 +#if ((' ' & 0x0FF) == 0x020)
10533 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10534 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
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))
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
10546 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10551 + for (i = 0; i < 256; i++)
10552 + if (XOR (islower (i), ISLOWER (i))
10553 + || toupper (i) != TOUPPER (i))
10558 +rm -f conftest$ac_exeext
10559 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10560 + (eval $ac_link) 2>&5
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
10567 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 + (exit $ac_status); }; }; then
10571 - echo "configure: failed program was:" >&5
10572 - cat conftest.$ac_ext >&5
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
10579 +( exit $ac_status )
10580 +ac_cv_header_stdc=no
10583 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
10595 +cat >>confdefs.h <<\_ACEOF
10596 #define STDC_HEADERS 1
10602 - for ac_hdr in string.h
10609 +for ac_header in fcntl.h limits.h string.h unistd.h utime.h varargs.h
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
10623 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10624 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10626 - cat > conftest.$ac_ext <<EOF
10627 -#line 1688 "configure"
10628 -#include "confdefs.h"
10629 -#include <$ac_hdr>
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
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"
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>
10650 +rm -f conftest.$ac_objext
10651 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10652 + (eval $ac_compile) 2>&5
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
10660 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10661 + (exit $ac_status); }; }; then
10662 + ac_header_compiler=yes
10664 - echo "$ac_err" >&5
10665 - echo "configure: failed program was:" >&5
10666 - cat conftest.$ac_ext >&5
10668 - eval "ac_cv_header_$ac_safe=no"
10669 + echo "$as_me: failed program was:" >&5
10670 +sed 's/^/| /' conftest.$ac_ext >&5
10672 +ac_header_compiler=no
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
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"
10686 +cat confdefs.h >>conftest.$ac_ext
10687 +cat >>conftest.$ac_ext <<_ACEOF
10688 +/* end confdefs.h. */
10689 +#include <$ac_header>
10691 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10692 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
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
10714 +if test -z "$ac_cpp_err"; then
10715 + ac_header_preproc=yes
10717 - echo "$ac_t""no" 1>&6
10718 + echo "$as_me: failed program was:" >&5
10719 +sed 's/^/| /' conftest.$ac_ext >&5
10721 + ac_header_preproc=no
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
10727 +# So? What about this header?
10728 +case $ac_header_compiler:$ac_header_preproc in
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;}
10736 +## ------------------------------------ ##
10737 +## Report this to bug-autoconf@gnu.org. ##
10738 +## ------------------------------------ ##
10741 + sed "s/^/$as_me: WARNING: /" >&2
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;}
10752 +## ------------------------------------ ##
10753 +## Report this to bug-autoconf@gnu.org. ##
10754 +## ------------------------------------ ##
10757 + sed "s/^/$as_me: WARNING: /" >&2
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
10765 + eval "$as_ac_Header=$ac_header_preproc"
10767 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10768 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
10786 + cat >conftest.$ac_ext <<_ACEOF
10787 +#line $LINENO "configure"
10790 +cat confdefs.h >>conftest.$ac_ext
10791 +cat >>conftest.$ac_ext <<_ACEOF
10792 +/* end confdefs.h. */
10793 +$ac_includes_default
10799 +if (sizeof (mode_t))
10805 +rm -f conftest.$ac_objext
10806 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10807 + (eval $ac_compile) 2>&5
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
10815 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 + (exit $ac_status); }; }; then
10817 + ac_cv_type_mode_t=yes
10819 + echo "$as_me: failed program was:" >&5
10820 +sed 's/^/| /' conftest.$ac_ext >&5
10822 +ac_cv_type_mode_t=no
10824 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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
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
10847 - cat > conftest.$ac_ext <<EOF
10848 -#line 1727 "configure"
10849 -#include "confdefs.h"
10850 + cat >conftest.$ac_ext <<_ACEOF
10851 +#line $LINENO "configure"
10854 +cat confdefs.h >>conftest.$ac_ext
10855 +cat >>conftest.$ac_ext <<_ACEOF
10856 +/* end confdefs.h. */
10857 +$ac_includes_default
10863 +if (sizeof (off_t))
10869 +rm -f conftest.$ac_objext
10870 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10871 + (eval $ac_compile) 2>&5
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
10879 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880 + (exit $ac_status); }; }; then
10881 + ac_cv_type_off_t=yes
10883 + echo "$as_me: failed program was:" >&5
10884 +sed 's/^/| /' conftest.$ac_ext >&5
10887 +ac_cv_type_off_t=no
10889 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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;
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. */
10913 -ccp = (char const *const *) p;
10914 -{ /* SCO 3.2v4 cc rejects this. */
10916 - char const *s = 0 ? (char *) 0 : (char const *) 0;
10917 +cat >>confdefs.h <<_ACEOF
10918 +#define off_t long
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
10929 + cat >conftest.$ac_ext <<_ACEOF
10930 +#line $LINENO "configure"
10933 +cat confdefs.h >>conftest.$ac_ext
10934 +cat >>conftest.$ac_ext <<_ACEOF
10935 +/* end confdefs.h. */
10936 +$ac_includes_default
10942 +if (sizeof (pid_t))
10947 -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10948 - int x[] = {25, 17};
10949 - const int *foo = &x[0];
10952 +rm -f conftest.$ac_objext
10953 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10954 + (eval $ac_compile) 2>&5
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
10962 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963 + (exit $ac_status); }; }; then
10964 + ac_cv_type_pid_t=yes
10966 + echo "$as_me: failed program was:" >&5
10967 +sed 's/^/| /' conftest.$ac_ext >&5
10969 +ac_cv_type_pid_t=no
10971 +rm -f conftest.$ac_objext conftest.$ac_ext
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
10979 +cat >>confdefs.h <<_ACEOF
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
10990 + cat >conftest.$ac_ext <<_ACEOF
10991 +#line $LINENO "configure"
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>
11002 +#ifdef __cplusplus
11003 +extern "C" void (*signal (int, void (*)(int)))(int);
11005 +void (*signal ()) ();
11015 -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11016 - typedef const int *iptr;
11020 +rm -f conftest.$ac_objext
11021 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11022 + (eval $ac_compile) 2>&5
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
11030 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031 + (exit $ac_status); }; }; then
11032 + ac_cv_type_signal=void
11034 + echo "$as_me: failed program was:" >&5
11035 +sed 's/^/| /' conftest.$ac_ext >&5
11037 +ac_cv_type_signal=int
11039 +rm -f conftest.$ac_objext conftest.$ac_ext
11041 +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
11042 +echo "${ECHO_T}$ac_cv_type_signal" >&6
11044 +cat >>confdefs.h <<_ACEOF
11045 +#define RETSIGTYPE $ac_cv_type_signal
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
11054 + cat >conftest.$ac_ext <<_ACEOF
11055 +#line $LINENO "configure"
11058 +cat confdefs.h >>conftest.$ac_ext
11059 +cat >>conftest.$ac_ext <<_ACEOF
11060 +/* end confdefs.h. */
11061 +$ac_includes_default
11067 +if (sizeof (size_t))
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;
11077 +rm -f conftest.$ac_objext
11078 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11079 + (eval $ac_compile) 2>&5
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
11087 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088 + (exit $ac_status); }; }; then
11089 + ac_cv_type_size_t=yes
11091 + echo "$as_me: failed program was:" >&5
11092 +sed 's/^/| /' conftest.$ac_ext >&5
11094 +ac_cv_type_size_t=no
11096 +rm -f conftest.$ac_objext conftest.$ac_ext
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
11104 +cat >>confdefs.h <<_ACEOF
11105 +#define size_t unsigned
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
11115 + cat >conftest.$ac_ext <<_ACEOF
11116 +#line $LINENO "configure"
11119 +cat confdefs.h >>conftest.$ac_ext
11120 +cat >>conftest.$ac_ext <<_ACEOF
11121 +/* end confdefs.h. */
11123 + #include <stdbool.h>
11125 + "error: bool is not defined"
11128 + "error: false is not defined"
11131 + "error: false is not 0"
11134 + "error: false is not defined"
11137 + "error: true is not 1"
11139 + #ifndef __bool_true_false_are_defined
11140 + "error: __bool_true_false_are_defined is not defined"
11143 + struct s { _Bool s: 1; _Bool t; } s;
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];
11150 + char f[(_Bool) -0.0 == false ? 1 : -1];
11152 + char h[sizeof (_Bool)];
11153 + char i[sizeof s.t];
11158 + return !a + !b + !c + !d + !e + !f + !g + !h + !i;
11162 -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11163 - const int foo = 10;
11165 +rm -f conftest.$ac_objext
11166 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11167 + (eval $ac_compile) 2>&5
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
11175 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176 + (exit $ac_status); }; }; then
11177 + ac_cv_header_stdbool_h=yes
11179 + echo "$as_me: failed program was:" >&5
11180 +sed 's/^/| /' conftest.$ac_ext >&5
11182 +ac_cv_header_stdbool_h=no
11184 +rm -f conftest.$ac_objext conftest.$ac_ext
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
11193 + cat >conftest.$ac_ext <<_ACEOF
11194 +#line $LINENO "configure"
11197 +cat confdefs.h >>conftest.$ac_ext
11198 +cat >>conftest.$ac_ext <<_ACEOF
11199 +/* end confdefs.h. */
11200 +$ac_includes_default
11206 +if (sizeof (_Bool))
11212 +rm -f conftest.$ac_objext
11213 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11214 + (eval $ac_compile) 2>&5
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
11222 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223 + (exit $ac_status); }; }; then
11224 + ac_cv_type__Bool=yes
11226 + echo "$as_me: failed program was:" >&5
11227 +sed 's/^/| /' conftest.$ac_ext >&5
11231 -if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11233 - ac_cv_c_const=yes
11234 +ac_cv_type__Bool=no
11236 +rm -f conftest.$ac_objext conftest.$ac_ext
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
11242 +cat >>confdefs.h <<_ACEOF
11243 +#define HAVE__BOOL 1
11249 + if test $ac_cv_header_stdbool_h = yes; then
11251 +cat >>confdefs.h <<\_ACEOF
11252 +#define HAVE_STDBOOL_H 1
11259 + # Define two additional variables used in the Makefile substitution.
11261 + if test "$ac_cv_header_stdbool_h" = yes; then
11264 + STDBOOL_H='stdbool.h'
11268 + if test "$ac_cv_type__Bool" = yes; then
11277 +for ac_header in sys/time.h
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
11286 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11287 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11289 - echo "configure: failed program was:" >&5
11290 - cat conftest.$ac_ext >&5
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"
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>
11306 +rm -f conftest.$ac_objext
11307 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11308 + (eval $ac_compile) 2>&5
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
11316 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317 + (exit $ac_status); }; }; then
11318 + ac_header_compiler=yes
11320 + echo "$as_me: failed program was:" >&5
11321 +sed 's/^/| /' conftest.$ac_ext >&5
11323 +ac_header_compiler=no
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
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"
11337 +cat confdefs.h >>conftest.$ac_ext
11338 +cat >>conftest.$ac_ext <<_ACEOF
11339 +/* end confdefs.h. */
11340 +#include <$ac_header>
11342 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11343 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
11358 +if test -z "$ac_cpp_err"; then
11359 + ac_header_preproc=yes
11361 + echo "$as_me: failed program was:" >&5
11362 +sed 's/^/| /' conftest.$ac_ext >&5
11364 -echo "$ac_t""$ac_cv_c_const" 1>&6
11365 -if test $ac_cv_c_const = no; then
11366 - cat >> confdefs.h <<\EOF
11369 + ac_header_preproc=no
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
11375 +# So? What about this header?
11376 +case $ac_header_compiler:$ac_header_preproc in
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;}
11384 +## ------------------------------------ ##
11385 +## Report this to bug-autoconf@gnu.org. ##
11386 +## ------------------------------------ ##
11389 + sed "s/^/$as_me: WARNING: /" >&2
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;}
11400 +## ------------------------------------ ##
11401 +## Report this to bug-autoconf@gnu.org. ##
11402 +## ------------------------------------ ##
11405 + sed "s/^/$as_me: WARNING: /" >&2
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
11413 + eval "$as_ac_Header=$ac_header_preproc"
11415 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11416 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
11428 -ac_header_dirent=no
11429 -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
11433 +for ac_header in utime.h
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
11447 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11448 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11450 - cat > conftest.$ac_ext <<EOF
11451 -#line 1807 "configure"
11452 -#include "confdefs.h"
11453 -#include <sys/types.h>
11454 -#include <$ac_hdr>
11459 -if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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"
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>
11475 +rm -f conftest.$ac_objext
11476 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11477 + (eval $ac_compile) 2>&5
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
11485 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 + (exit $ac_status); }; }; then
11487 + ac_header_compiler=yes
11489 - echo "configure: failed program was:" >&5
11490 - cat conftest.$ac_ext >&5
11492 - eval "ac_cv_header_dirent_$ac_safe=no"
11493 + echo "$as_me: failed program was:" >&5
11494 +sed 's/^/| /' conftest.$ac_ext >&5
11496 +ac_header_compiler=no
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
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"
11510 +cat confdefs.h >>conftest.$ac_ext
11511 +cat >>conftest.$ac_ext <<_ACEOF
11512 +/* end confdefs.h. */
11513 +#include <$ac_header>
11515 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11516 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
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
11537 - ac_header_dirent=$ac_hdr; break
11538 +if test -z "$ac_cpp_err"; then
11539 + ac_header_preproc=yes
11541 - echo "$ac_t""no" 1>&6
11542 + echo "$as_me: failed program was:" >&5
11543 +sed 's/^/| /' conftest.$ac_ext >&5
11545 + ac_header_preproc=no
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
11551 +# So? What about this header?
11552 +case $ac_header_compiler:$ac_header_preproc in
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;}
11560 +## ------------------------------------ ##
11561 +## Report this to bug-autoconf@gnu.org. ##
11562 +## ------------------------------------ ##
11565 + sed "s/^/$as_me: WARNING: /" >&2
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;}
11576 +## ------------------------------------ ##
11577 +## Report this to bug-autoconf@gnu.org. ##
11578 +## ------------------------------------ ##
11581 + sed "s/^/$as_me: WARNING: /" >&2
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
11589 + eval "$as_ac_Header=$ac_header_preproc"
11591 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11592 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
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
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. */
11626 + cat >conftest.$ac_ext <<_ACEOF
11627 +#line $LINENO "configure"
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>
11641 -if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11643 - eval "ac_cv_lib_$ac_lib_var=yes"
11647 +if ((struct tm *) 0)
11653 +rm -f conftest.$ac_objext
11654 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11655 + (eval $ac_compile) 2>&5
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
11663 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 + (exit $ac_status); }; }; then
11665 + ac_cv_header_time=yes
11667 - echo "configure: failed program was:" >&5
11668 - cat conftest.$ac_ext >&5
11670 - eval "ac_cv_lib_$ac_lib_var=no"
11671 + echo "$as_me: failed program was:" >&5
11672 +sed 's/^/| /' conftest.$ac_ext >&5
11674 +ac_cv_header_time=no
11677 -LIBS="$ac_save_LIBS"
11678 +rm -f conftest.$ac_objext conftest.$ac_ext
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
11684 +cat >>confdefs.h <<\_ACEOF
11685 +#define TIME_WITH_SYS_TIME 1
11689 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11690 - echo "$ac_t""yes" 1>&6
11691 - LIBS="$LIBS -ldir"
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
11710 - echo "$ac_t""no" 1>&6
11711 + cat >conftest.$ac_ext <<_ACEOF
11712 +#line $LINENO "configure"
11715 +cat confdefs.h >>conftest.$ac_ext
11716 +cat >>conftest.$ac_ext <<_ACEOF
11717 +/* end confdefs.h. */
11719 +#ifdef TIME_WITH_SYS_TIME
11720 +# include <sys/time.h>
11721 +# include <time.h>
11723 +# ifdef HAVE_SYS_TIME_H
11724 +# include <sys/time.h>
11726 +# include <time.h>
11729 +#ifdef HAVE_UTIME_H
11730 +# include <utime.h>
11736 +static struct utimbuf x; x.actime = x.modtime;
11741 +rm -f conftest.$ac_objext
11742 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11743 + (eval $ac_compile) 2>&5
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
11751 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 + (exit $ac_status); }; }; then
11753 + fu_cv_sys_struct_utimbuf=yes
11755 + echo "$as_me: failed program was:" >&5
11756 +sed 's/^/| /' conftest.$ac_ext >&5
11758 +fu_cv_sys_struct_utimbuf=no
11760 +rm -f conftest.$ac_objext conftest.$ac_ext
11763 +echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
11764 +echo "${ECHO_T}$fu_cv_sys_struct_utimbuf" >&6
11766 + if test $fu_cv_sys_struct_utimbuf = yes; then
11768 +cat >>confdefs.h <<\_ACEOF
11769 +#define HAVE_STRUCT_UTIMBUF 1
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
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
11788 - ac_save_LIBS="$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. */
11797 + cat >conftest.$ac_ext <<_ACEOF
11798 +#line $LINENO "configure"
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
11814 -if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11816 - eval "ac_cv_lib_$ac_lib_var=yes"
11820 +exit (closedir (opendir (".")) != 0);
11825 +rm -f conftest$ac_exeext
11826 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11827 + (eval $ac_link) 2>&5
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
11834 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835 + (exit $ac_status); }; }; then
11836 + ac_cv_func_closedir_void=no
11838 - echo "configure: failed program was:" >&5
11839 - cat conftest.$ac_ext >&5
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
11846 +( exit $ac_status )
11847 +ac_cv_func_closedir_void=yes
11850 -LIBS="$ac_save_LIBS"
11851 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
11858 +cat >>confdefs.h <<\_ACEOF
11859 +#define CLOSEDIR_VOID 1
11863 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11864 - echo "$ac_t""yes" 1>&6
11869 +for ac_header in limits.h
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
11878 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11879 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
11895 +rm -f conftest.$ac_objext
11896 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11897 + (eval $ac_compile) 2>&5
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
11905 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
11906 + (exit $ac_status); }; }; then
11907 + ac_header_compiler=yes
11909 + echo "$as_me: failed program was:" >&5
11910 +sed 's/^/| /' conftest.$ac_ext >&5
11912 +ac_header_compiler=no
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
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"
11925 +cat confdefs.h >>conftest.$ac_ext
11926 +cat >>conftest.$ac_ext <<_ACEOF
11927 +/* end confdefs.h. */
11928 +#include <$ac_header>
11930 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11931 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
11946 +if test -z "$ac_cpp_err"; then
11947 + ac_header_preproc=yes
11949 + echo "$as_me: failed program was:" >&5
11950 +sed 's/^/| /' conftest.$ac_ext >&5
11952 + ac_header_preproc=no
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
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
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;}
11971 +## ------------------------------------ ##
11972 +## Report this to bug-autoconf@gnu.org. ##
11973 +## ------------------------------------ ##
11976 + sed "s/^/$as_me: WARNING: /" >&2
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;}
11987 +## ------------------------------------ ##
11988 +## Report this to bug-autoconf@gnu.org. ##
11989 +## ------------------------------------ ##
11992 + sed "s/^/$as_me: WARNING: /" >&2
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
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>
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
12013 - ac_cv_header_stdc=yes
12014 + eval "$as_ac_Header=$ac_header_preproc"
12016 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12017 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
12032 +for ac_header in stdlib.h
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
12041 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12042 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12044 - echo "$ac_err" >&5
12045 - echo "configure: failed program was:" >&5
12046 - cat conftest.$ac_ext >&5
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"
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>
12062 +rm -f conftest.$ac_objext
12063 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12064 + (eval $ac_compile) 2>&5
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
12072 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073 + (exit $ac_status); }; }; then
12074 + ac_header_compiler=yes
12076 + echo "$as_me: failed program was:" >&5
12077 +sed 's/^/| /' conftest.$ac_ext >&5
12079 +ac_header_compiler=no
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
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>
12093 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12094 - egrep "memchr" >/dev/null 2>&1; then
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"
12103 +cat confdefs.h >>conftest.$ac_ext
12104 +cat >>conftest.$ac_ext <<_ACEOF
12105 +/* end confdefs.h. */
12106 +#include <$ac_header>
12108 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12109 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
12123 - ac_cv_header_stdc=no
12127 +if test -z "$ac_cpp_err"; then
12128 + ac_header_preproc=yes
12130 + echo "$as_me: failed program was:" >&5
12131 +sed 's/^/| /' conftest.$ac_ext >&5
12133 + ac_header_preproc=no
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
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>
12146 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12147 - egrep "free" >/dev/null 2>&1; then
12149 +# So? What about this header?
12150 +case $ac_header_compiler:$ac_header_preproc in
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;}
12158 +## ------------------------------------ ##
12159 +## Report this to bug-autoconf@gnu.org. ##
12160 +## ------------------------------------ ##
12163 + sed "s/^/$as_me: WARNING: /" >&2
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;}
12174 +## ------------------------------------ ##
12175 +## Report this to bug-autoconf@gnu.org. ##
12176 +## ------------------------------------ ##
12179 + sed "s/^/$as_me: WARNING: /" >&2
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
12188 - ac_cv_header_stdc=no
12189 + eval "$as_ac_Header=$ac_header_preproc"
12192 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12193 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
12212 +for ac_header in string.h
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
12221 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12222 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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);
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"
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>
12247 +rm -f conftest.$ac_objext
12248 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12249 + (eval $ac_compile) 2>&5
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
12257 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258 + (exit $ac_status); }; }; then
12259 + ac_header_compiler=yes
12261 + echo "$as_me: failed program was:" >&5
12262 +sed 's/^/| /' conftest.$ac_ext >&5
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
12268 +ac_header_compiler=no
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
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"
12281 +cat confdefs.h >>conftest.$ac_ext
12282 +cat >>conftest.$ac_ext <<_ACEOF
12283 +/* end confdefs.h. */
12284 +#include <$ac_header>
12286 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12287 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
12300 - echo "configure: failed program was:" >&5
12301 - cat conftest.$ac_ext >&5
12303 - ac_cv_header_stdc=no
12307 +if test -z "$ac_cpp_err"; then
12308 + ac_header_preproc=yes
12310 + echo "$as_me: failed program was:" >&5
12311 +sed 's/^/| /' conftest.$ac_ext >&5
12313 + ac_header_preproc=no
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
12319 +# So? What about this header?
12320 +case $ac_header_compiler:$ac_header_preproc in
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;}
12328 +## ------------------------------------ ##
12329 +## Report this to bug-autoconf@gnu.org. ##
12330 +## ------------------------------------ ##
12333 + sed "s/^/$as_me: WARNING: /" >&2
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;}
12344 +## ------------------------------------ ##
12345 +## Report this to bug-autoconf@gnu.org. ##
12346 +## ------------------------------------ ##
12349 + sed "s/^/$as_me: WARNING: /" >&2
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
12357 + eval "$as_ac_Header=$ac_header_preproc"
12359 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12360 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
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
12384 + cat >conftest.$ac_ext <<_ACEOF
12385 +#line $LINENO "configure"
12388 +cat confdefs.h >>conftest.$ac_ext
12389 +cat >>conftest.$ac_ext <<_ACEOF
12390 +/* end confdefs.h. */
12391 +$ac_includes_default
12396 + char *p = (char *) getenv;
12403 +rm -f conftest.$ac_objext
12404 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12405 + (eval $ac_compile) 2>&5
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
12413 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12414 + (exit $ac_status); }; }; then
12415 + ac_cv_have_decl_getenv=yes
12417 + echo "$as_me: failed program was:" >&5
12418 +sed 's/^/| /' conftest.$ac_ext >&5
12420 +ac_cv_have_decl_getenv=no
12422 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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
12435 + cat >>confdefs.h <<_ACEOF
12436 +#define HAVE_DECL_GETENV 0
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
12450 + cat >conftest.$ac_ext <<_ACEOF
12451 +#line $LINENO "configure"
12454 +cat confdefs.h >>conftest.$ac_ext
12455 +cat >>conftest.$ac_ext <<_ACEOF
12456 +/* end confdefs.h. */
12457 +$ac_includes_default
12462 + char *p = (char *) malloc;
12469 +rm -f conftest.$ac_objext
12470 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12471 + (eval $ac_compile) 2>&5
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
12479 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480 + (exit $ac_status); }; }; then
12481 + ac_cv_have_decl_malloc=yes
12483 + echo "$as_me: failed program was:" >&5
12484 +sed 's/^/| /' conftest.$ac_ext >&5
12486 +ac_cv_have_decl_malloc=no
12488 +rm -f conftest.$ac_objext conftest.$ac_ext
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
12494 +cat >>confdefs.h <<_ACEOF
12495 +#define HAVE_DECL_MALLOC 1
12500 + cat >>confdefs.h <<_ACEOF
12501 +#define HAVE_DECL_MALLOC 0
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
12516 + cat >conftest.$ac_ext <<_ACEOF
12517 +#line $LINENO "configure"
12520 +cat confdefs.h >>conftest.$ac_ext
12521 +cat >>conftest.$ac_ext <<_ACEOF
12522 +/* end confdefs.h. */
12527 +#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
12528 +neither MSDOS nor Windows
12534 +rm -f conftest.$ac_objext
12535 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12536 + (eval $ac_compile) 2>&5
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
12544 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545 + (exit $ac_status); }; }; then
12546 + ac_cv_win_or_dos=yes
12548 + echo "$as_me: failed program was:" >&5
12549 +sed 's/^/| /' conftest.$ac_ext >&5
12551 +ac_cv_win_or_dos=no
12553 +rm -f conftest.$ac_objext conftest.$ac_ext
12556 +echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
12557 +echo "${ECHO_T}$ac_cv_win_or_dos" >&6
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
12563 + ac_fs_accepts_drive_letter_prefix=0
12564 + ac_fs_backslash_is_file_name_separator=0
12571 +cat >>confdefs.h <<_ACEOF
12572 +#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
12580 +cat >>confdefs.h <<_ACEOF
12581 +#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
12587 +for ac_header in unistd.h
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
12601 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12602 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12604 - cat > conftest.$ac_ext <<EOF
12605 -#line 2035 "configure"
12606 -#include "confdefs.h"
12607 -#include <$ac_hdr>
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
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"
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>
12628 +rm -f conftest.$ac_objext
12629 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12630 + (eval $ac_compile) 2>&5
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
12638 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 + (exit $ac_status); }; }; then
12640 + ac_header_compiler=yes
12642 - echo "$ac_err" >&5
12643 - echo "configure: failed program was:" >&5
12644 - cat conftest.$ac_ext >&5
12646 - eval "ac_cv_header_$ac_safe=no"
12647 + echo "$as_me: failed program was:" >&5
12648 +sed 's/^/| /' conftest.$ac_ext >&5
12650 +ac_header_compiler=no
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
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"
12664 +cat confdefs.h >>conftest.$ac_ext
12665 +cat >>conftest.$ac_ext <<_ACEOF
12666 +/* end confdefs.h. */
12667 +#include <$ac_header>
12669 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12670 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
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
12692 +if test -z "$ac_cpp_err"; then
12693 + ac_header_preproc=yes
12695 - echo "$ac_t""no" 1>&6
12696 + echo "$as_me: failed program was:" >&5
12697 +sed 's/^/| /' conftest.$ac_ext >&5
12699 + ac_header_preproc=no
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
12705 +# So? What about this header?
12706 +case $ac_header_compiler:$ac_header_preproc in
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;}
12714 +## ------------------------------------ ##
12715 +## Report this to bug-autoconf@gnu.org. ##
12716 +## ------------------------------------ ##
12719 + sed "s/^/$as_me: WARNING: /" >&2
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;}
12730 +## ------------------------------------ ##
12731 +## Report this to bug-autoconf@gnu.org. ##
12732 +## ------------------------------------ ##
12735 + sed "s/^/$as_me: WARNING: /" >&2
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
12743 + eval "$as_ac_Header=$ac_header_preproc"
12745 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12746 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
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
12794 - cat > conftest.$ac_ext <<EOF
12795 -#line 2073 "configure"
12796 -#include "confdefs.h"
12797 + cat >conftest.$ac_ext <<_ACEOF
12798 +#line $LINENO "configure"
12801 +cat confdefs.h >>conftest.$ac_ext
12802 +cat >>conftest.$ac_ext <<_ACEOF
12803 +/* end confdefs.h. */
12805 #include <sys/types.h>
12806 -#include <inttypes.h>
12808 -uintmax_t i = (uintmax_t) -1;
12811 -if { (eval echo configure:2081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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 */
12832 +struct dirent dp; dp.d_ino = 0;
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
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
12847 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
12848 + (exit $ac_status); }; }; then
12849 + jm_cv_struct_dirent_d_ino=yes
12851 - echo "configure: failed program was:" >&5
12852 - cat conftest.$ac_ext >&5
12854 - jm_ac_cv_header_inttypes_h=no
12855 + echo "$as_me: failed program was:" >&5
12856 +sed 's/^/| /' conftest.$ac_ext >&5
12858 +jm_cv_struct_dirent_d_ino=no
12861 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
12874 +cat >>confdefs.h <<\_ACEOF
12875 +#define D_INO_IN_DIRENT 1
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
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
12902 + ac_tmpdirs='/tmp /var/tmp /usr/tmp'
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
12919 + rm -rf $ac_xdir 2>/dev/null
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
12926 +cat >>confdefs.h <<\_ACEOF
12927 +#define HAVE_LONG_FILE_NAMES 1
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
12950 +for ac_func in pathconf
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
12958 - cat > conftest.$ac_ext <<EOF
12959 -#line 2108 "configure"
12960 -#include "confdefs.h"
12961 -#include <sys/types.h>
12963 -#include <stdlib.h>
12964 -#include <stddef.h>
12965 + cat >conftest.$ac_ext <<_ACEOF
12966 +#line $LINENO "configure"
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. */
12977 +# include <limits.h>
12979 +# include <assert.h>
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
12985 - ac_cv_type_mode_t=yes
12986 +/* Override any gcc2 internal prototype to avoid an error. */
12987 +#ifdef __cplusplus
12991 +/* We use char because int might match the return type of a gcc2
12992 + builtin and then its argument prototype would still apply. */
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)
13000 +char (*f) () = $ac_func;
13002 +#ifdef __cplusplus
13009 +return f != $ac_func;
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
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
13024 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025 + (exit $ac_status); }; }; then
13026 + eval "$as_ac_var=yes"
13029 - ac_cv_type_mode_t=no
13030 + echo "$as_me: failed program was:" >&5
13031 +sed 's/^/| /' conftest.$ac_ext >&5
13033 +eval "$as_ac_var=no"
13036 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
13085 +for ac_func in vprintf
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
13093 + cat >conftest.$ac_ext <<_ACEOF
13094 +#line $LINENO "configure"
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. */
13105 +# include <limits.h>
13107 +# include <assert.h>
13109 +/* Override any gcc2 internal prototype to avoid an error. */
13110 +#ifdef __cplusplus
13114 +/* We use char because int might match the return type of a gcc2
13115 + builtin and then its argument prototype would still apply. */
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)
13123 +char (*f) () = $ac_func;
13125 +#ifdef __cplusplus
13132 +return f != $ac_func;
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
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
13147 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13148 + (exit $ac_status); }; }; then
13149 + eval "$as_ac_var=yes"
13151 + echo "$as_me: failed program was:" >&5
13152 +sed 's/^/| /' conftest.$ac_ext >&5
13154 +eval "$as_ac_var=no"
13156 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
13174 - cat > conftest.$ac_ext <<EOF
13175 -#line 2141 "configure"
13176 -#include "confdefs.h"
13177 -#include <sys/types.h>
13179 -#include <stdlib.h>
13180 -#include <stddef.h>
13181 + cat >conftest.$ac_ext <<_ACEOF
13182 +#line $LINENO "configure"
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. */
13193 +# include <limits.h>
13195 +# include <assert.h>
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
13201 - ac_cv_type_off_t=yes
13202 +/* Override any gcc2 internal prototype to avoid an error. */
13203 +#ifdef __cplusplus
13207 +/* We use char because int might match the return type of a gcc2
13208 + builtin and then its argument prototype would still apply. */
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)
13216 +char (*f) () = _doprnt;
13218 +#ifdef __cplusplus
13225 +return f != _doprnt;
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
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
13240 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241 + (exit $ac_status); }; }; then
13242 + ac_cv_func__doprnt=yes
13245 - ac_cv_type_off_t=no
13246 + echo "$as_me: failed program was:" >&5
13247 +sed 's/^/| /' conftest.$ac_ext >&5
13249 +ac_cv_func__doprnt=no
13252 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
13258 +cat >>confdefs.h <<\_ACEOF
13259 +#define HAVE_DOPRNT 1
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
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
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
13283 - cat > conftest.$ac_ext <<EOF
13284 -#line 2174 "configure"
13285 -#include "confdefs.h"
13286 -#include <sys/types.h>
13288 -#include <stdlib.h>
13289 -#include <stddef.h>
13290 + cat >conftest.$ac_ext <<_ACEOF
13291 +#line $LINENO "configure"
13294 +cat confdefs.h >>conftest.$ac_ext
13295 +cat >>conftest.$ac_ext <<_ACEOF
13296 +/* end confdefs.h. */
13301 +error_at_line (0, 0, "", 0, "");
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
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
13316 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 + (exit $ac_status); }; }; then
13318 + ac_cv_lib_error_at_line=yes
13320 + echo "$as_me: failed program was:" >&5
13321 +sed 's/^/| /' conftest.$ac_ext >&5
13323 +ac_cv_lib_error_at_line=no
13325 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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"
13337 +for ac_func in strerror
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
13345 + cat >conftest.$ac_ext <<_ACEOF
13346 +#line $LINENO "configure"
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. */
13357 +# include <limits.h>
13359 +# include <assert.h>
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
13365 - ac_cv_type_pid_t=yes
13366 +/* Override any gcc2 internal prototype to avoid an error. */
13367 +#ifdef __cplusplus
13371 +/* We use char because int might match the return type of a gcc2
13372 + builtin and then its argument prototype would still apply. */
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)
13380 +char (*f) () = $ac_func;
13382 +#ifdef __cplusplus
13389 +return f != $ac_func;
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
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
13404 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 + (exit $ac_status); }; }; then
13406 + eval "$as_ac_var=yes"
13409 - ac_cv_type_pid_t=no
13410 + echo "$as_me: failed program was:" >&5
13411 +sed 's/^/| /' conftest.$ac_ext >&5
13413 +eval "$as_ac_var=no"
13416 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
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
13438 + cat >conftest.$ac_ext <<_ACEOF
13439 +#line $LINENO "configure"
13442 +cat confdefs.h >>conftest.$ac_ext
13443 +cat >>conftest.$ac_ext <<_ACEOF
13444 +/* end confdefs.h. */
13445 +$ac_includes_default
13450 + char *p = (char *) strerror;
13457 +rm -f conftest.$ac_objext
13458 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13459 + (eval $ac_compile) 2>&5
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
13467 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 + (exit $ac_status); }; }; then
13469 + ac_cv_have_decl_strerror=yes
13471 + echo "$as_me: failed program was:" >&5
13472 +sed 's/^/| /' conftest.$ac_ext >&5
13474 +ac_cv_have_decl_strerror=no
13476 +rm -f conftest.$ac_objext conftest.$ac_ext
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
13482 +cat >>confdefs.h <<_ACEOF
13483 +#define HAVE_DECL_STRERROR 1
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
13492 - cat > conftest.$ac_ext <<EOF
13493 -#line 2207 "configure"
13494 -#include "confdefs.h"
13495 -#include <sys/types.h>
13496 -#include <signal.h>
13499 + cat >>confdefs.h <<_ACEOF
13500 +#define HAVE_DECL_STRERROR 0
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
13512 + cat >conftest.$ac_ext <<_ACEOF
13513 +#line $LINENO "configure"
13516 +cat confdefs.h >>conftest.$ac_ext
13517 +cat >>conftest.$ac_ext <<_ACEOF
13518 +/* end confdefs.h. */
13519 +$ac_includes_default
13523 +#ifndef strerror_r
13524 + char *p = (char *) strerror_r;
13531 +rm -f conftest.$ac_objext
13532 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13533 + (eval $ac_compile) 2>&5
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
13541 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13542 + (exit $ac_status); }; }; then
13543 + ac_cv_have_decl_strerror_r=yes
13545 + echo "$as_me: failed program was:" >&5
13546 +sed 's/^/| /' conftest.$ac_ext >&5
13548 +ac_cv_have_decl_strerror_r=no
13550 +rm -f conftest.$ac_objext conftest.$ac_ext
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
13556 +cat >>confdefs.h <<_ACEOF
13557 +#define HAVE_DECL_STRERROR_R 1
13562 + cat >>confdefs.h <<_ACEOF
13563 +#define HAVE_DECL_STRERROR_R 0
13571 +for ac_func in strerror_r
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
13579 + cat >conftest.$ac_ext <<_ACEOF
13580 +#line $LINENO "configure"
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. */
13591 +# include <limits.h>
13593 +# include <assert.h>
13595 +/* Override any gcc2 internal prototype to avoid an error. */
13597 -extern "C" void (*signal (int, void (*)(int)))(int);
13601 +/* We use char because int might match the return type of a gcc2
13602 + builtin and then its argument prototype would still apply. */
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)
13610 -void (*signal ()) ();
13611 +char (*f) () = $ac_func;
13613 +#ifdef __cplusplus
13621 -if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13623 - ac_cv_type_signal=void
13627 +return f != $ac_func;
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
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
13642 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643 + (exit $ac_status); }; }; then
13644 + eval "$as_ac_var=yes"
13646 - echo "configure: failed program was:" >&5
13647 - cat conftest.$ac_ext >&5
13649 - ac_cv_type_signal=int
13650 + echo "$as_me: failed program was:" >&5
13651 +sed 's/^/| /' conftest.$ac_ext >&5
13653 +eval "$as_ac_var=no"
13656 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
13665 -echo "$ac_t""$ac_cv_type_signal" 1>&6
13666 -cat >> confdefs.h <<EOF
13667 -#define RETSIGTYPE $ac_cv_type_signal
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
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"
13684 +cat confdefs.h >>conftest.$ac_ext
13685 +cat >>conftest.$ac_ext <<_ACEOF
13686 +/* end confdefs.h. */
13687 +$ac_includes_default
13693 + char x = *strerror_r (0, buf, sizeof buf);
13694 + char *p = strerror_r (0, buf, sizeof buf);
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
13704 +rm -f conftest.$ac_objext
13705 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13706 + (eval $ac_compile) 2>&5
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
13714 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715 + (exit $ac_status); }; }; then
13716 + ac_cv_func_strerror_r_char_p=yes
13718 - cat > conftest.$ac_ext <<EOF
13719 -#line 2248 "configure"
13720 -#include "confdefs.h"
13721 -#include <sys/types.h>
13723 -#include <stdlib.h>
13724 -#include <stddef.h>
13725 + echo "$as_me: failed program was:" >&5
13726 +sed 's/^/| /' conftest.$ac_ext >&5
13729 +rm -f conftest.$ac_objext conftest.$ac_ext
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
13740 + cat >conftest.$ac_ext <<_ACEOF
13741 +#line $LINENO "configure"
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 ();
13753 + char x = *strerror_r (0, buf, sizeof buf);
13754 + exit (!isalpha (x));
13759 +rm -f conftest$ac_exeext
13760 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13761 + (eval $ac_link) 2>&5
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
13768 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769 + (exit $ac_status); }; }; then
13770 + ac_cv_func_strerror_r_char_p=yes
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
13777 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
13786 +cat >>confdefs.h <<\_ACEOF
13787 +#define STRERROR_R_CHAR_P 1
13796 +for ac_func in memchr
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
13804 + cat >conftest.$ac_ext <<_ACEOF
13805 +#line $LINENO "configure"
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. */
13816 +# include <limits.h>
13818 +# include <assert.h>
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
13824 - ac_cv_type_size_t=yes
13825 +/* Override any gcc2 internal prototype to avoid an error. */
13826 +#ifdef __cplusplus
13830 +/* We use char because int might match the return type of a gcc2
13831 + builtin and then its argument prototype would still apply. */
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)
13839 +char (*f) () = $ac_func;
13841 +#ifdef __cplusplus
13848 +return f != $ac_func;
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
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
13863 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864 + (exit $ac_status); }; }; then
13865 + eval "$as_ac_var=yes"
13868 - ac_cv_type_size_t=no
13869 + echo "$as_me: failed program was:" >&5
13870 +sed 's/^/| /' conftest.$ac_ext >&5
13872 +eval "$as_ac_var=no"
13875 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
13885 + LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
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
13895 + if test $ac_cv_func_memchr = no; then
13908 +for ac_header in bp-sym.h
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
13917 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13918 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
13933 +rm -f conftest.$ac_objext
13934 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13935 + (eval $ac_compile) 2>&5
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
13943 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 + (exit $ac_status); }; }; then
13945 + ac_header_compiler=yes
13947 + echo "$as_me: failed program was:" >&5
13948 +sed 's/^/| /' conftest.$ac_ext >&5
13950 +ac_header_compiler=no
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
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"
13967 +cat confdefs.h >>conftest.$ac_ext
13968 +cat >>conftest.$ac_ext <<_ACEOF
13969 +/* end confdefs.h. */
13970 +#include <$ac_header>
13972 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13973 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
13986 - cat > conftest.$ac_ext <<EOF
13987 -#line 2281 "configure"
13988 -#include "confdefs.h"
13991 +if test -z "$ac_cpp_err"; then
13992 + ac_header_preproc=yes
13994 + echo "$as_me: failed program was:" >&5
13995 +sed 's/^/| /' conftest.$ac_ext >&5
13997 + ac_header_preproc=no
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
14003 +# So? What about this header?
14004 +case $ac_header_compiler:$ac_header_preproc in
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;}
14012 +## ------------------------------------ ##
14013 +## Report this to bug-autoconf@gnu.org. ##
14014 +## ------------------------------------ ##
14017 + sed "s/^/$as_me: WARNING: /" >&2
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;}
14028 +## ------------------------------------ ##
14029 +## Report this to bug-autoconf@gnu.org. ##
14030 +## ------------------------------------ ##
14033 + sed "s/^/$as_me: WARNING: /" >&2
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
14041 + eval "$as_ac_Header=$ac_header_preproc"
14043 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14044 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
14064 + cat >conftest.$ac_ext <<_ACEOF
14065 +#line $LINENO "configure"
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>
14078 -if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14080 - ac_cv_header_time=yes
14081 +#include <sys/stat.h>
14083 +#if defined(S_ISBLK) && defined(S_IFDIR)
14084 +# if S_ISBLK (S_IFDIR)
14089 +#if defined(S_ISBLK) && defined(S_IFCHR)
14090 +# if S_ISBLK (S_IFCHR)
14095 +#if defined(S_ISLNK) && defined(S_IFREG)
14096 +# if S_ISLNK (S_IFREG)
14101 +#if defined(S_ISSOCK) && defined(S_IFREG)
14102 +# if S_ISSOCK (S_IFREG)
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
14112 - echo "configure: failed program was:" >&5
14113 - cat conftest.$ac_ext >&5
14115 - ac_cv_header_time=no
14116 + ac_cv_header_stat_broken=no
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
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
14130 +cat >>confdefs.h <<\_ACEOF
14131 +#define STAT_MACROS_BROKEN 1
14137 - for ac_hdr in utime.h
14139 +for ac_func in rmdir
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
14152 - cat > conftest.$ac_ext <<EOF
14153 -#line 2320 "configure"
14154 -#include "confdefs.h"
14155 -#include <$ac_hdr>
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
14162 - eval "ac_cv_header_$ac_safe=yes"
14163 + cat >conftest.$ac_ext <<_ACEOF
14164 +#line $LINENO "configure"
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. */
14175 +# include <limits.h>
14177 +# include <assert.h>
14179 +/* Override any gcc2 internal prototype to avoid an error. */
14180 +#ifdef __cplusplus
14184 +/* We use char because int might match the return type of a gcc2
14185 + builtin and then its argument prototype would still apply. */
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)
14193 +char (*f) () = $ac_func;
14195 +#ifdef __cplusplus
14202 +return f != $ac_func;
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
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
14217 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 + (exit $ac_status); }; }; then
14219 + eval "$as_ac_var=yes"
14221 - echo "$ac_err" >&5
14222 - echo "configure: failed program was:" >&5
14223 - cat conftest.$ac_ext >&5
14225 - eval "ac_cv_header_$ac_safe=no"
14226 + echo "$as_me: failed program was:" >&5
14227 +sed 's/^/| /' conftest.$ac_ext >&5
14229 +eval "$as_ac_var=no"
14232 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
14249 - echo "$ac_t""no" 1>&6
14250 + LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
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
14260 + if test $ac_cv_func_rmdir = no; then
14277 +for ac_header in stdlib.h
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
14286 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14287 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
14305 +rm -f conftest.$ac_objext
14306 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14307 + (eval $ac_compile) 2>&5
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
14315 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316 + (exit $ac_status); }; }; then
14317 + ac_header_compiler=yes
14319 + echo "$as_me: failed program was:" >&5
14320 +sed 's/^/| /' conftest.$ac_ext >&5
14322 -#ifdef TIME_WITH_SYS_TIME
14323 -# include <sys/time.h>
14324 -# include <time.h>
14325 +ac_header_compiler=no
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
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"
14338 +cat confdefs.h >>conftest.$ac_ext
14339 +cat >>conftest.$ac_ext <<_ACEOF
14340 +/* end confdefs.h. */
14341 +#include <$ac_header>
14343 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14344 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
14359 +if test -z "$ac_cpp_err"; then
14360 + ac_header_preproc=yes
14362 + echo "$as_me: failed program was:" >&5
14363 +sed 's/^/| /' conftest.$ac_ext >&5
14365 + ac_header_preproc=no
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
14371 +# So? What about this header?
14372 +case $ac_header_compiler:$ac_header_preproc in
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;}
14380 +## ------------------------------------ ##
14381 +## Report this to bug-autoconf@gnu.org. ##
14382 +## ------------------------------------ ##
14385 + sed "s/^/$as_me: WARNING: /" >&2
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;}
14396 +## ------------------------------------ ##
14397 +## Report this to bug-autoconf@gnu.org. ##
14398 +## ------------------------------------ ##
14401 + sed "s/^/$as_me: WARNING: /" >&2
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
14409 + eval "$as_ac_Header=$ac_header_preproc"
14411 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14412 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
14429 + if test "$cross_compiling" = yes; then
14430 + ac_cv_func_malloc_0_nonnull=no
14432 + cat >conftest.$ac_ext <<_ACEOF
14433 +#line $LINENO "configure"
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>
14442 -# ifdef HAVE_SYS_TIME_H
14443 -# include <sys/time.h>
14445 -# include <time.h>
14449 -#ifdef HAVE_UTIME_H
14450 -# include <utime.h>
14455 +exit (malloc (0) ? 0 : 1);
14460 +rm -f conftest$ac_exeext
14461 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14462 + (eval $ac_link) 2>&5
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
14469 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 + (exit $ac_status); }; }; then
14471 + ac_cv_func_malloc_0_nonnull=yes
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
14477 +( exit $ac_status )
14478 +ac_cv_func_malloc_0_nonnull=no
14480 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
14487 +cat >>confdefs.h <<\_ACEOF
14488 +#define HAVE_MALLOC 1
14492 + cat >>confdefs.h <<\_ACEOF
14493 +#define HAVE_MALLOC 0
14496 + LIBOBJS="$LIBOBJS malloc.$ac_objext"
14498 +cat >>confdefs.h <<\_ACEOF
14499 +#define malloc rpl_malloc
14508 + if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
14515 +for ac_header in stdlib.h
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
14524 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14525 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
14540 +rm -f conftest.$ac_objext
14541 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14542 + (eval $ac_compile) 2>&5
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
14550 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 + (exit $ac_status); }; }; then
14552 + ac_header_compiler=yes
14554 + echo "$as_me: failed program was:" >&5
14555 +sed 's/^/| /' conftest.$ac_ext >&5
14557 +ac_header_compiler=no
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
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"
14570 +cat confdefs.h >>conftest.$ac_ext
14571 +cat >>conftest.$ac_ext <<_ACEOF
14572 +/* end confdefs.h. */
14573 +#include <$ac_header>
14575 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14576 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
14591 +if test -z "$ac_cpp_err"; then
14592 + ac_header_preproc=yes
14594 + echo "$as_me: failed program was:" >&5
14595 +sed 's/^/| /' conftest.$ac_ext >&5
14597 + ac_header_preproc=no
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
14603 +# So? What about this header?
14604 +case $ac_header_compiler:$ac_header_preproc in
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;}
14612 +## ------------------------------------ ##
14613 +## Report this to bug-autoconf@gnu.org. ##
14614 +## ------------------------------------ ##
14617 + sed "s/^/$as_me: WARNING: /" >&2
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;}
14628 +## ------------------------------------ ##
14629 +## Report this to bug-autoconf@gnu.org. ##
14630 +## ------------------------------------ ##
14633 + sed "s/^/$as_me: WARNING: /" >&2
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
14641 + eval "$as_ac_Header=$ac_header_preproc"
14643 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14644 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
14661 + if test "$cross_compiling" = yes; then
14662 + ac_cv_func_realloc_0_nonnull=no
14664 + cat >conftest.$ac_ext <<_ACEOF
14665 +#line $LINENO "configure"
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>
14678 -static struct utimbuf x; x.actime = x.modtime;
14681 -if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14683 - fu_cv_sys_struct_utimbuf=yes
14688 +exit (realloc (0, 0) ? 0 : 1);
14693 +rm -f conftest$ac_exeext
14694 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14695 + (eval $ac_link) 2>&5
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
14702 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14703 + (exit $ac_status); }; }; then
14704 + ac_cv_func_realloc_0_nonnull=yes
14706 - echo "configure: failed program was:" >&5
14707 - cat conftest.$ac_ext >&5
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
14714 +( exit $ac_status )
14715 +ac_cv_func_realloc_0_nonnull=no
14719 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
14726 +cat >>confdefs.h <<\_ACEOF
14727 +#define HAVE_REALLOC 1
14731 + cat >>confdefs.h <<\_ACEOF
14732 +#define HAVE_REALLOC 0
14735 + LIBOBJS="$LIBOBJS realloc.$ac_objext"
14737 +cat >>confdefs.h <<\_ACEOF
14738 +#define realloc rpl_realloc
14743 -echo "$ac_t""$fu_cv_sys_struct_utimbuf" 1>&6
14745 - if test $fu_cv_sys_struct_utimbuf = yes; then
14746 - cat >> confdefs.h <<EOF
14747 -#define HAVE_STRUCT_UTIMBUF 1
14752 + if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
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
14769 +for ac_header in stddef.h
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
14778 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14779 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
14797 +rm -f conftest.$ac_objext
14798 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799 + (eval $ac_compile) 2>&5
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
14807 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 + (exit $ac_status); }; }; then
14809 + ac_header_compiler=yes
14811 + echo "$as_me: failed program was:" >&5
14812 +sed 's/^/| /' conftest.$ac_ext >&5
14814 +ac_header_compiler=no
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
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"
14827 +cat confdefs.h >>conftest.$ac_ext
14828 +cat >>conftest.$ac_ext <<_ACEOF
14829 +/* end confdefs.h. */
14830 +#include <$ac_header>
14832 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14833 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
14848 +if test -z "$ac_cpp_err"; then
14849 + ac_header_preproc=yes
14851 + echo "$as_me: failed program was:" >&5
14852 +sed 's/^/| /' conftest.$ac_ext >&5
14854 + ac_header_preproc=no
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
14860 +# So? What about this header?
14861 +case $ac_header_compiler:$ac_header_preproc in
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;}
14869 +## ------------------------------------ ##
14870 +## Report this to bug-autoconf@gnu.org. ##
14871 +## ------------------------------------ ##
14874 + sed "s/^/$as_me: WARNING: /" >&2
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;}
14885 +## ------------------------------------ ##
14886 +## Report this to bug-autoconf@gnu.org. ##
14887 +## ------------------------------------ ##
14890 + sed "s/^/$as_me: WARNING: /" >&2
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
14898 + eval "$as_ac_Header=$ac_header_preproc"
14900 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14901 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
14925 +for ac_header in wchar.h
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
14934 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14935 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
14950 +rm -f conftest.$ac_objext
14951 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14952 + (eval $ac_compile) 2>&5
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
14960 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961 + (exit $ac_status); }; }; then
14962 + ac_header_compiler=yes
14964 + echo "$as_me: failed program was:" >&5
14965 +sed 's/^/| /' conftest.$ac_ext >&5
14967 +ac_header_compiler=no
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
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"
14980 +cat confdefs.h >>conftest.$ac_ext
14981 +cat >>conftest.$ac_ext <<_ACEOF
14982 +/* end confdefs.h. */
14983 +#include <$ac_header>
14985 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14986 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
15001 +if test -z "$ac_cpp_err"; then
15002 + ac_header_preproc=yes
15004 + echo "$as_me: failed program was:" >&5
15005 +sed 's/^/| /' conftest.$ac_ext >&5
15007 + ac_header_preproc=no
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
15013 +# So? What about this header?
15014 +case $ac_header_compiler:$ac_header_preproc in
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;}
15022 +## ------------------------------------ ##
15023 +## Report this to bug-autoconf@gnu.org. ##
15024 +## ------------------------------------ ##
15027 + sed "s/^/$as_me: WARNING: /" >&2
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;}
15038 +## ------------------------------------ ##
15039 +## Report this to bug-autoconf@gnu.org. ##
15040 +## ------------------------------------ ##
15043 + sed "s/^/$as_me: WARNING: /" >&2
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
15051 + eval "$as_ac_Header=$ac_header_preproc"
15053 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15054 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
15069 +for ac_header in wctype.h
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
15078 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15079 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
15094 +rm -f conftest.$ac_objext
15095 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15096 + (eval $ac_compile) 2>&5
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
15104 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 + (exit $ac_status); }; }; then
15106 + ac_header_compiler=yes
15108 + echo "$as_me: failed program was:" >&5
15109 +sed 's/^/| /' conftest.$ac_ext >&5
15111 +ac_header_compiler=no
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
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"
15124 +cat confdefs.h >>conftest.$ac_ext
15125 +cat >>conftest.$ac_ext <<_ACEOF
15126 +/* end confdefs.h. */
15127 +#include <$ac_header>
15129 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15130 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
15145 +if test -z "$ac_cpp_err"; then
15146 + ac_header_preproc=yes
15148 + echo "$as_me: failed program was:" >&5
15149 +sed 's/^/| /' conftest.$ac_ext >&5
15151 + ac_header_preproc=no
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
15157 +# So? What about this header?
15158 +case $ac_header_compiler:$ac_header_preproc in
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;}
15166 +## ------------------------------------ ##
15167 +## Report this to bug-autoconf@gnu.org. ##
15168 +## ------------------------------------ ##
15171 + sed "s/^/$as_me: WARNING: /" >&2
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;}
15182 +## ------------------------------------ ##
15183 +## Report this to bug-autoconf@gnu.org. ##
15184 +## ------------------------------------ ##
15187 + sed "s/^/$as_me: WARNING: /" >&2
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
15195 + eval "$as_ac_Header=$ac_header_preproc"
15197 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15198 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
15213 +for ac_func in iswprint
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
15221 + cat >conftest.$ac_ext <<_ACEOF
15222 +#line $LINENO "configure"
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. */
15235 +# include <limits.h>
15237 +# include <assert.h>
15239 /* Override any gcc2 internal prototype to avoid an error. */
15240 +#ifdef __cplusplus
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. */
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)
15255 +char (*f) () = $ac_func;
15257 +#ifdef __cplusplus
15265 +return f != $ac_func;
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
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
15280 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281 + (exit $ac_status); }; }; then
15282 + eval "$as_ac_var=yes"
15284 + echo "$as_me: failed program was:" >&5
15285 +sed 's/^/| /' conftest.$ac_ext >&5
15287 +eval "$as_ac_var=no"
15289 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
15304 +for ac_func in mbsinit
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
15312 + cat >conftest.$ac_ext <<_ACEOF
15313 +#line $LINENO "configure"
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. */
15324 +# include <limits.h>
15326 +# include <assert.h>
15328 +/* Override any gcc2 internal prototype to avoid an error. */
15329 +#ifdef __cplusplus
15333 +/* We use char because int might match the return type of a gcc2
15334 + builtin and then its argument prototype would still apply. */
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)
15344 +char (*f) () = $ac_func;
15346 +#ifdef __cplusplus
15352 -if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15354 - eval "ac_cv_func_getopt_long=yes"
15358 +return f != $ac_func;
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
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
15373 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 + (exit $ac_status); }; }; then
15375 + eval "$as_ac_var=yes"
15377 - echo "configure: failed program was:" >&5
15378 - cat conftest.$ac_ext >&5
15380 - eval "ac_cv_func_getopt_long=no"
15381 + echo "$as_me: failed program was:" >&5
15382 +sed 's/^/| /' conftest.$ac_ext >&5
15384 +eval "$as_ac_var=no"
15387 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
15412 -if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
15413 - echo "$ac_t""yes" 1>&6
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
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"
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>
15442 +mbstate_t x; return sizeof x;
15447 +rm -f conftest.$ac_objext
15448 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15449 + (eval $ac_compile) 2>&5
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
15457 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458 + (exit $ac_status); }; }; then
15459 + ac_cv_type_mbstate_t=yes
15461 + echo "$as_me: failed program was:" >&5
15462 +sed 's/^/| /' conftest.$ac_ext >&5
15464 +ac_cv_type_mbstate_t=no
15466 +rm -f conftest.$ac_objext conftest.$ac_ext
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
15472 +cat >>confdefs.h <<\_ACEOF
15473 +#define HAVE_MBSTATE_T 1
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
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
15491 + cat >conftest.$ac_ext <<_ACEOF
15492 +#line $LINENO "configure"
15495 +cat confdefs.h >>conftest.$ac_ext
15496 +cat >>conftest.$ac_ext <<_ACEOF
15497 +/* end confdefs.h. */
15498 +#include <wchar.h>
15502 +mbstate_t state; return ! (sizeof state && mbrtowc);
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
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
15517 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 + (exit $ac_status); }; }; then
15519 + jm_cv_func_mbrtowc=yes
15521 + echo "$as_me: failed program was:" >&5
15522 +sed 's/^/| /' conftest.$ac_ext >&5
15524 +jm_cv_func_mbrtowc=no
15526 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
15532 +cat >>confdefs.h <<\_ACEOF
15533 +#define HAVE_MBRTOWC 1
15544 +for ac_func in pathconf
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
15556 - cat > conftest.$ac_ext <<EOF
15557 -#line 2461 "configure"
15558 -#include "confdefs.h"
15559 + cat >conftest.$ac_ext <<_ACEOF
15560 +#line $LINENO "configure"
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. */
15573 +# include <limits.h>
15575 +# include <assert.h>
15577 /* Override any gcc2 internal prototype to avoid an error. */
15578 +#ifdef __cplusplus
15582 /* We use char because int might match the return type of a gcc2
15583 - builtin and then its argument prototype would still apply. */
15588 + builtin and then its argument prototype would still apply. */
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)
15597 +char (*f) () = $ac_func;
15599 +#ifdef __cplusplus
15605 -if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15607 - eval "ac_cv_func_$ac_func=yes"
15611 +return f != $ac_func;
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
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
15626 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 + (exit $ac_status); }; }; then
15628 + eval "$as_ac_var=yes"
15630 - echo "configure: failed program was:" >&5
15631 - cat conftest.$ac_ext >&5
15633 - eval "ac_cv_func_$ac_func=no"
15634 + echo "$as_me: failed program was:" >&5
15635 +sed 's/^/| /' conftest.$ac_ext >&5
15637 +eval "$as_ac_var=no"
15640 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
15662 +for ac_header in limits.h string.h unistd.h
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
15671 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15672 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
15688 +rm -f conftest.$ac_objext
15689 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15690 + (eval $ac_compile) 2>&5
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
15698 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 + (exit $ac_status); }; }; then
15700 + ac_header_compiler=yes
15702 + echo "$as_me: failed program was:" >&5
15703 +sed 's/^/| /' conftest.$ac_ext >&5
15705 +ac_header_compiler=no
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
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"
15718 +cat confdefs.h >>conftest.$ac_ext
15719 +cat >>conftest.$ac_ext <<_ACEOF
15720 +/* end confdefs.h. */
15721 +#include <$ac_header>
15723 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15724 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
15739 +if test -z "$ac_cpp_err"; then
15740 + ac_header_preproc=yes
15742 + echo "$as_me: failed program was:" >&5
15743 +sed 's/^/| /' conftest.$ac_ext >&5
15745 + ac_header_preproc=no
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
15751 +# So? What about this header?
15752 +case $ac_header_compiler:$ac_header_preproc in
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;}
15760 +## ------------------------------------ ##
15761 +## Report this to bug-autoconf@gnu.org. ##
15762 +## ------------------------------------ ##
15765 + sed "s/^/$as_me: WARNING: /" >&2
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;}
15776 +## ------------------------------------ ##
15777 +## Report this to bug-autoconf@gnu.org. ##
15778 +## ------------------------------------ ##
15781 + sed "s/^/$as_me: WARNING: /" >&2
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
15789 + eval "$as_ac_Header=$ac_header_preproc"
15791 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15792 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
15804 -for ac_func in memchr mkdir rename rmdir
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
15812 + cat >conftest.$ac_ext <<_ACEOF
15813 +#line $LINENO "configure"
15816 +cat confdefs.h >>conftest.$ac_ext
15817 +cat >>conftest.$ac_ext <<_ACEOF
15818 +/* end confdefs.h. */
15819 +$ac_includes_default
15824 + char *p = (char *) free;
15831 +rm -f conftest.$ac_objext
15832 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15833 + (eval $ac_compile) 2>&5
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
15841 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842 + (exit $ac_status); }; }; then
15843 + ac_cv_have_decl_free=yes
15845 + echo "$as_me: failed program was:" >&5
15846 +sed 's/^/| /' conftest.$ac_ext >&5
15848 +ac_cv_have_decl_free=no
15850 +rm -f conftest.$ac_objext conftest.$ac_ext
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
15856 +cat >>confdefs.h <<_ACEOF
15857 +#define HAVE_DECL_FREE 1
15862 + cat >>confdefs.h <<_ACEOF
15863 +#define HAVE_DECL_FREE 0
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
15873 + cat >conftest.$ac_ext <<_ACEOF
15874 +#line $LINENO "configure"
15877 +cat confdefs.h >>conftest.$ac_ext
15878 +cat >>conftest.$ac_ext <<_ACEOF
15879 +/* end confdefs.h. */
15880 +$ac_includes_default
15885 + char *p = (char *) getenv;
15892 +rm -f conftest.$ac_objext
15893 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15894 + (eval $ac_compile) 2>&5
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
15902 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15903 + (exit $ac_status); }; }; then
15904 + ac_cv_have_decl_getenv=yes
15906 + echo "$as_me: failed program was:" >&5
15907 +sed 's/^/| /' conftest.$ac_ext >&5
15909 +ac_cv_have_decl_getenv=no
15911 +rm -f conftest.$ac_objext conftest.$ac_ext
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
15917 +cat >>confdefs.h <<_ACEOF
15918 +#define HAVE_DECL_GETENV 1
15923 + cat >>confdefs.h <<_ACEOF
15924 +#define HAVE_DECL_GETENV 0
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
15934 + cat >conftest.$ac_ext <<_ACEOF
15935 +#line $LINENO "configure"
15938 +cat confdefs.h >>conftest.$ac_ext
15939 +cat >>conftest.$ac_ext <<_ACEOF
15940 +/* end confdefs.h. */
15941 +$ac_includes_default
15946 + char *p = (char *) malloc;
15953 +rm -f conftest.$ac_objext
15954 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15955 + (eval $ac_compile) 2>&5
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
15963 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964 + (exit $ac_status); }; }; then
15965 + ac_cv_have_decl_malloc=yes
15967 + echo "$as_me: failed program was:" >&5
15968 +sed 's/^/| /' conftest.$ac_ext >&5
15970 +ac_cv_have_decl_malloc=no
15972 +rm -f conftest.$ac_objext conftest.$ac_ext
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
15978 +cat >>confdefs.h <<_ACEOF
15979 +#define HAVE_DECL_MALLOC 1
15984 + cat >>confdefs.h <<_ACEOF
15985 +#define HAVE_DECL_MALLOC 0
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
15995 + cat >conftest.$ac_ext <<_ACEOF
15996 +#line $LINENO "configure"
15999 +cat confdefs.h >>conftest.$ac_ext
16000 +cat >>conftest.$ac_ext <<_ACEOF
16001 +/* end confdefs.h. */
16002 +$ac_includes_default
16007 + char *p = (char *) mktemp;
16014 +rm -f conftest.$ac_objext
16015 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16016 + (eval $ac_compile) 2>&5
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
16024 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16025 + (exit $ac_status); }; }; then
16026 + ac_cv_have_decl_mktemp=yes
16028 + echo "$as_me: failed program was:" >&5
16029 +sed 's/^/| /' conftest.$ac_ext >&5
16031 +ac_cv_have_decl_mktemp=no
16033 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16039 +cat >>confdefs.h <<_ACEOF
16040 +#define HAVE_DECL_MKTEMP 1
16045 + cat >>confdefs.h <<_ACEOF
16046 +#define HAVE_DECL_MKTEMP 0
16065 +for ac_func in _doprintf geteuid getuid isascii memcmp mktemp \
16066 + pathconf raise sigaction sigprocmask sigsetmask strerror
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
16078 - cat > conftest.$ac_ext <<EOF
16079 -#line 2516 "configure"
16080 -#include "confdefs.h"
16081 + cat >conftest.$ac_ext <<_ACEOF
16082 +#line $LINENO "configure"
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. */
16095 +# include <limits.h>
16097 +# include <assert.h>
16099 /* Override any gcc2 internal prototype to avoid an error. */
16100 +#ifdef __cplusplus
16104 /* We use char because int might match the return type of a gcc2
16105 - builtin and then its argument prototype would still apply. */
16107 + builtin and then its argument prototype would still apply. */
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)
16115 +char (*f) () = $ac_func;
16117 +#ifdef __cplusplus
16125 +return f != $ac_func;
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
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
16140 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 + (exit $ac_status); }; }; then
16142 + eval "$as_ac_var=yes"
16144 + echo "$as_me: failed program was:" >&5
16145 +sed 's/^/| /' conftest.$ac_ext >&5
16147 +eval "$as_ac_var=no"
16149 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
16163 +for ac_func in mkdir strncasecmp
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
16171 + cat >conftest.$ac_ext <<_ACEOF
16172 +#line $LINENO "configure"
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. */
16183 +# include <limits.h>
16185 +# include <assert.h>
16187 +/* Override any gcc2 internal prototype to avoid an error. */
16188 +#ifdef __cplusplus
16192 +/* We use char because int might match the return type of a gcc2
16193 + builtin and then its argument prototype would still apply. */
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)
16202 +char (*f) () = $ac_func;
16204 +#ifdef __cplusplus
16210 -if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16212 - eval "ac_cv_func_$ac_func=yes"
16216 +return f != $ac_func;
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
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
16231 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16232 + (exit $ac_status); }; }; then
16233 + eval "$as_ac_var=yes"
16235 - echo "configure: failed program was:" >&5
16236 - cat conftest.$ac_ext >&5
16238 - eval "ac_cv_func_$ac_func=no"
16239 + echo "$as_me: failed program was:" >&5
16240 +sed 's/^/| /' conftest.$ac_ext >&5
16242 +eval "$as_ac_var=no"
16245 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
16262 - echo "$ac_t""no" 1>&6
16263 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
16264 + LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
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
16275 + ac_cv_sys_largefile_source=no
16276 + cat >conftest.$ac_ext <<_ACEOF
16277 +#line $LINENO "configure"
16280 +cat confdefs.h >>conftest.$ac_ext
16281 +cat >>conftest.$ac_ext <<_ACEOF
16282 +/* end confdefs.h. */
16283 +#include <stdio.h>
16292 +rm -f conftest.$ac_objext
16293 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16294 + (eval $ac_compile) 2>&5
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
16302 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16303 + (exit $ac_status); }; }; then
16306 + echo "$as_me: failed program was:" >&5
16307 +sed 's/^/| /' conftest.$ac_ext >&5
16309 - cat >> confdefs.h <<EOF
16310 -#define HAVE_DONE_WORKING_MALLOC_CHECK 1
16313 +rm -f conftest.$ac_objext conftest.$ac_ext
16314 + cat >conftest.$ac_ext <<_ACEOF
16315 +#line $LINENO "configure"
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>
16331 +rm -f conftest.$ac_objext
16332 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16333 + (eval $ac_compile) 2>&5
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
16341 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16342 + (exit $ac_status); }; }; then
16343 + ac_cv_sys_largefile_source=1; break
16345 + echo "$as_me: failed program was:" >&5
16346 +sed 's/^/| /' conftest.$ac_ext >&5
16349 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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
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
16376 - if test "$cross_compiling" = yes; then
16377 - jm_cv_func_working_malloc=no
16378 + cat >conftest.$ac_ext <<_ACEOF
16379 +#line $LINENO "configure"
16382 +cat confdefs.h >>conftest.$ac_ext
16383 +cat >>conftest.$ac_ext <<_ACEOF
16384 +/* end confdefs.h. */
16385 +#include <stdio.h>
16389 +return fseeko && fseeko (stdin, 0, 0);
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
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
16404 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405 + (exit $ac_status); }; }; then
16406 + ac_cv_func_fseeko=yes
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
16418 - exit (malloc (0) ? 0 : 1);
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
16424 - jm_cv_func_working_malloc=yes
16425 +ac_cv_func_fseeko=no
16427 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
16433 +cat >>confdefs.h <<\_ACEOF
16434 +#define HAVE_FSEEKO 1
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
16445 - echo "configure: failed program was:" >&5
16446 - cat conftest.$ac_ext >&5
16448 - jm_cv_func_working_malloc=no
16449 + cat >conftest.$ac_ext <<_ACEOF
16450 +#line $LINENO "configure"
16453 +cat confdefs.h >>conftest.$ac_ext
16454 +cat >>conftest.$ac_ext <<_ACEOF
16455 +/* end confdefs.h. */
16456 +$ac_includes_default
16460 +#ifndef clearerr_unlocked
16461 + char *p = (char *) clearerr_unlocked;
16468 +rm -f conftest.$ac_objext
16469 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16470 + (eval $ac_compile) 2>&5
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
16478 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479 + (exit $ac_status); }; }; then
16480 + ac_cv_have_decl_clearerr_unlocked=yes
16482 + echo "$as_me: failed program was:" >&5
16483 +sed 's/^/| /' conftest.$ac_ext >&5
16485 +ac_cv_have_decl_clearerr_unlocked=no
16488 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16494 +cat >>confdefs.h <<_ACEOF
16495 +#define HAVE_DECL_CLEARERR_UNLOCKED 1
16500 + cat >>confdefs.h <<_ACEOF
16501 +#define HAVE_DECL_CLEARERR_UNLOCKED 0
16508 -echo "$ac_t""$jm_cv_func_working_malloc" 1>&6
16509 - if test $jm_cv_func_working_malloc = no; then
16511 - LIBOBJS="$LIBOBJS malloc.$ac_objext"
16512 - cat >> confdefs.h <<EOF
16513 -#define malloc rpl_malloc
16519 - cat >> confdefs.h <<EOF
16520 -#define HAVE_DONE_WORKING_REALLOC_CHECK 1
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
16527 + cat >conftest.$ac_ext <<_ACEOF
16528 +#line $LINENO "configure"
16531 +cat confdefs.h >>conftest.$ac_ext
16532 +cat >>conftest.$ac_ext <<_ACEOF
16533 +/* end confdefs.h. */
16534 +$ac_includes_default
16538 +#ifndef feof_unlocked
16539 + char *p = (char *) feof_unlocked;
16546 +rm -f conftest.$ac_objext
16547 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16548 + (eval $ac_compile) 2>&5
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
16556 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 + (exit $ac_status); }; }; then
16558 + ac_cv_have_decl_feof_unlocked=yes
16560 + echo "$as_me: failed program was:" >&5
16561 +sed 's/^/| /' conftest.$ac_ext >&5
16563 +ac_cv_have_decl_feof_unlocked=no
16565 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16571 +cat >>confdefs.h <<_ACEOF
16572 +#define HAVE_DECL_FEOF_UNLOCKED 1
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
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
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
16598 - cat > conftest.$ac_ext <<EOF
16599 -#line 2631 "configure"
16600 -#include "confdefs.h"
16601 + cat >conftest.$ac_ext <<_ACEOF
16602 +#line $LINENO "configure"
16605 +cat confdefs.h >>conftest.$ac_ext
16606 +cat >>conftest.$ac_ext <<_ACEOF
16607 +/* end confdefs.h. */
16608 +$ac_includes_default
16612 +#ifndef ferror_unlocked
16613 + char *p = (char *) ferror_unlocked;
16616 - char *realloc ();
16620 - exit (realloc (0, 0) ? 0 : 1);
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
16626 - jm_cv_func_working_realloc=yes
16631 +rm -f conftest.$ac_objext
16632 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16633 + (eval $ac_compile) 2>&5
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
16641 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642 + (exit $ac_status); }; }; then
16643 + ac_cv_have_decl_ferror_unlocked=yes
16645 - echo "configure: failed program was:" >&5
16646 - cat conftest.$ac_ext >&5
16648 - jm_cv_func_working_realloc=no
16649 + echo "$as_me: failed program was:" >&5
16650 +sed 's/^/| /' conftest.$ac_ext >&5
16652 +ac_cv_have_decl_ferror_unlocked=no
16655 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16661 +cat >>confdefs.h <<_ACEOF
16662 +#define HAVE_DECL_FERROR_UNLOCKED 1
16667 + cat >>confdefs.h <<_ACEOF
16668 +#define HAVE_DECL_FERROR_UNLOCKED 0
16675 -echo "$ac_t""$jm_cv_func_working_realloc" 1>&6
16676 - if test $jm_cv_func_working_realloc = no; then
16678 - LIBOBJS="$LIBOBJS realloc.$ac_objext"
16679 - cat >> confdefs.h <<EOF
16680 -#define realloc rpl_realloc
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
16690 + cat >conftest.$ac_ext <<_ACEOF
16691 +#line $LINENO "configure"
16694 +cat confdefs.h >>conftest.$ac_ext
16695 +cat >>conftest.$ac_ext <<_ACEOF
16696 +/* end confdefs.h. */
16697 +$ac_includes_default
16701 +#ifndef fflush_unlocked
16702 + char *p = (char *) fflush_unlocked;
16709 +rm -f conftest.$ac_objext
16710 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16711 + (eval $ac_compile) 2>&5
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
16719 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16720 + (exit $ac_status); }; }; then
16721 + ac_cv_have_decl_fflush_unlocked=yes
16723 + echo "$as_me: failed program was:" >&5
16724 +sed 's/^/| /' conftest.$ac_ext >&5
16726 +ac_cv_have_decl_fflush_unlocked=no
16728 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16734 +cat >>confdefs.h <<_ACEOF
16735 +#define HAVE_DECL_FFLUSH_UNLOCKED 1
16740 + cat >>confdefs.h <<_ACEOF
16741 +#define HAVE_DECL_FFLUSH_UNLOCKED 0
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
16755 + cat >conftest.$ac_ext <<_ACEOF
16756 +#line $LINENO "configure"
16759 +cat confdefs.h >>conftest.$ac_ext
16760 +cat >>conftest.$ac_ext <<_ACEOF
16761 +/* end confdefs.h. */
16762 +$ac_includes_default
16766 +#ifndef fgets_unlocked
16767 + char *p = (char *) fgets_unlocked;
16774 +rm -f conftest.$ac_objext
16775 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16776 + (eval $ac_compile) 2>&5
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
16784 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785 + (exit $ac_status); }; }; then
16786 + ac_cv_have_decl_fgets_unlocked=yes
16788 + echo "$as_me: failed program was:" >&5
16789 +sed 's/^/| /' conftest.$ac_ext >&5
16791 +ac_cv_have_decl_fgets_unlocked=no
16793 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16799 +cat >>confdefs.h <<_ACEOF
16800 +#define HAVE_DECL_FGETS_UNLOCKED 1
16805 + cat >>confdefs.h <<_ACEOF
16806 +#define HAVE_DECL_FGETS_UNLOCKED 0
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
16820 + cat >conftest.$ac_ext <<_ACEOF
16821 +#line $LINENO "configure"
16824 +cat confdefs.h >>conftest.$ac_ext
16825 +cat >>conftest.$ac_ext <<_ACEOF
16826 +/* end confdefs.h. */
16827 +$ac_includes_default
16831 +#ifndef fputc_unlocked
16832 + char *p = (char *) fputc_unlocked;
16839 +rm -f conftest.$ac_objext
16840 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16841 + (eval $ac_compile) 2>&5
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
16849 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850 + (exit $ac_status); }; }; then
16851 + ac_cv_have_decl_fputc_unlocked=yes
16853 + echo "$as_me: failed program was:" >&5
16854 +sed 's/^/| /' conftest.$ac_ext >&5
16856 +ac_cv_have_decl_fputc_unlocked=no
16858 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16864 +cat >>confdefs.h <<_ACEOF
16865 +#define HAVE_DECL_FPUTC_UNLOCKED 1
16870 + cat >>confdefs.h <<_ACEOF
16871 +#define HAVE_DECL_FPUTC_UNLOCKED 0
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
16885 + cat >conftest.$ac_ext <<_ACEOF
16886 +#line $LINENO "configure"
16889 +cat confdefs.h >>conftest.$ac_ext
16890 +cat >>conftest.$ac_ext <<_ACEOF
16891 +/* end confdefs.h. */
16892 +$ac_includes_default
16896 +#ifndef fputs_unlocked
16897 + char *p = (char *) fputs_unlocked;
16904 +rm -f conftest.$ac_objext
16905 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16906 + (eval $ac_compile) 2>&5
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
16914 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16915 + (exit $ac_status); }; }; then
16916 + ac_cv_have_decl_fputs_unlocked=yes
16918 + echo "$as_me: failed program was:" >&5
16919 +sed 's/^/| /' conftest.$ac_ext >&5
16921 +ac_cv_have_decl_fputs_unlocked=no
16923 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16929 +cat >>confdefs.h <<_ACEOF
16930 +#define HAVE_DECL_FPUTS_UNLOCKED 1
16935 + cat >>confdefs.h <<_ACEOF
16936 +#define HAVE_DECL_FPUTS_UNLOCKED 0
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
16950 + cat >conftest.$ac_ext <<_ACEOF
16951 +#line $LINENO "configure"
16954 +cat confdefs.h >>conftest.$ac_ext
16955 +cat >>conftest.$ac_ext <<_ACEOF
16956 +/* end confdefs.h. */
16957 +$ac_includes_default
16961 +#ifndef fread_unlocked
16962 + char *p = (char *) fread_unlocked;
16969 +rm -f conftest.$ac_objext
16970 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16971 + (eval $ac_compile) 2>&5
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
16979 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16980 + (exit $ac_status); }; }; then
16981 + ac_cv_have_decl_fread_unlocked=yes
16983 + echo "$as_me: failed program was:" >&5
16984 +sed 's/^/| /' conftest.$ac_ext >&5
16986 +ac_cv_have_decl_fread_unlocked=no
16988 +rm -f conftest.$ac_objext conftest.$ac_ext
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
16994 +cat >>confdefs.h <<_ACEOF
16995 +#define HAVE_DECL_FREAD_UNLOCKED 1
17000 + cat >>confdefs.h <<_ACEOF
17001 +#define HAVE_DECL_FREAD_UNLOCKED 0
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
17015 + cat >conftest.$ac_ext <<_ACEOF
17016 +#line $LINENO "configure"
17019 +cat confdefs.h >>conftest.$ac_ext
17020 +cat >>conftest.$ac_ext <<_ACEOF
17021 +/* end confdefs.h. */
17022 +$ac_includes_default
17026 +#ifndef fwrite_unlocked
17027 + char *p = (char *) fwrite_unlocked;
17034 +rm -f conftest.$ac_objext
17035 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17036 + (eval $ac_compile) 2>&5
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
17044 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17045 + (exit $ac_status); }; }; then
17046 + ac_cv_have_decl_fwrite_unlocked=yes
17048 + echo "$as_me: failed program was:" >&5
17049 +sed 's/^/| /' conftest.$ac_ext >&5
17051 +ac_cv_have_decl_fwrite_unlocked=no
17053 +rm -f conftest.$ac_objext conftest.$ac_ext
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
17059 +cat >>confdefs.h <<_ACEOF
17060 +#define HAVE_DECL_FWRITE_UNLOCKED 1
17065 + cat >>confdefs.h <<_ACEOF
17066 +#define HAVE_DECL_FWRITE_UNLOCKED 0
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
17080 + cat >conftest.$ac_ext <<_ACEOF
17081 +#line $LINENO "configure"
17084 +cat confdefs.h >>conftest.$ac_ext
17085 +cat >>conftest.$ac_ext <<_ACEOF
17086 +/* end confdefs.h. */
17087 +$ac_includes_default
17091 +#ifndef getc_unlocked
17092 + char *p = (char *) getc_unlocked;
17099 +rm -f conftest.$ac_objext
17100 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17101 + (eval $ac_compile) 2>&5
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
17109 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110 + (exit $ac_status); }; }; then
17111 + ac_cv_have_decl_getc_unlocked=yes
17113 + echo "$as_me: failed program was:" >&5
17114 +sed 's/^/| /' conftest.$ac_ext >&5
17116 +ac_cv_have_decl_getc_unlocked=no
17118 +rm -f conftest.$ac_objext conftest.$ac_ext
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
17124 +cat >>confdefs.h <<_ACEOF
17125 +#define HAVE_DECL_GETC_UNLOCKED 1
17130 + cat >>confdefs.h <<_ACEOF
17131 +#define HAVE_DECL_GETC_UNLOCKED 0
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
17145 + cat >conftest.$ac_ext <<_ACEOF
17146 +#line $LINENO "configure"
17149 +cat confdefs.h >>conftest.$ac_ext
17150 +cat >>conftest.$ac_ext <<_ACEOF
17151 +/* end confdefs.h. */
17152 +$ac_includes_default
17156 +#ifndef getchar_unlocked
17157 + char *p = (char *) getchar_unlocked;
17164 +rm -f conftest.$ac_objext
17165 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17166 + (eval $ac_compile) 2>&5
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
17174 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17175 + (exit $ac_status); }; }; then
17176 + ac_cv_have_decl_getchar_unlocked=yes
17178 + echo "$as_me: failed program was:" >&5
17179 +sed 's/^/| /' conftest.$ac_ext >&5
17181 +ac_cv_have_decl_getchar_unlocked=no
17183 +rm -f conftest.$ac_objext conftest.$ac_ext
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
17189 +cat >>confdefs.h <<_ACEOF
17190 +#define HAVE_DECL_GETCHAR_UNLOCKED 1
17195 + cat >>confdefs.h <<_ACEOF
17196 +#define HAVE_DECL_GETCHAR_UNLOCKED 0
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
17210 + cat >conftest.$ac_ext <<_ACEOF
17211 +#line $LINENO "configure"
17214 +cat confdefs.h >>conftest.$ac_ext
17215 +cat >>conftest.$ac_ext <<_ACEOF
17216 +/* end confdefs.h. */
17217 +$ac_includes_default
17221 +#ifndef putc_unlocked
17222 + char *p = (char *) putc_unlocked;
17229 +rm -f conftest.$ac_objext
17230 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17231 + (eval $ac_compile) 2>&5
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
17239 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240 + (exit $ac_status); }; }; then
17241 + ac_cv_have_decl_putc_unlocked=yes
17243 + echo "$as_me: failed program was:" >&5
17244 +sed 's/^/| /' conftest.$ac_ext >&5
17246 +ac_cv_have_decl_putc_unlocked=no
17248 +rm -f conftest.$ac_objext conftest.$ac_ext
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
17254 +cat >>confdefs.h <<_ACEOF
17255 +#define HAVE_DECL_PUTC_UNLOCKED 1
17260 + cat >>confdefs.h <<_ACEOF
17261 +#define HAVE_DECL_PUTC_UNLOCKED 0
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
17275 + cat >conftest.$ac_ext <<_ACEOF
17276 +#line $LINENO "configure"
17279 +cat confdefs.h >>conftest.$ac_ext
17280 +cat >>conftest.$ac_ext <<_ACEOF
17281 +/* end confdefs.h. */
17282 +$ac_includes_default
17286 +#ifndef putchar_unlocked
17287 + char *p = (char *) putchar_unlocked;
17294 +rm -f conftest.$ac_objext
17295 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17296 + (eval $ac_compile) 2>&5
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
17304 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17305 + (exit $ac_status); }; }; then
17306 + ac_cv_have_decl_putchar_unlocked=yes
17308 + echo "$as_me: failed program was:" >&5
17309 +sed 's/^/| /' conftest.$ac_ext >&5
17311 +ac_cv_have_decl_putchar_unlocked=no
17313 +rm -f conftest.$ac_objext conftest.$ac_ext
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
17319 +cat >>confdefs.h <<_ACEOF
17320 +#define HAVE_DECL_PUTCHAR_UNLOCKED 1
17325 + cat >>confdefs.h <<_ACEOF
17326 +#define HAVE_DECL_PUTCHAR_UNLOCKED 0
17383 + if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
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
17395 + if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
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
17406 if test "$cross_compiling" = yes; then
17407 ac_cv_func_closedir_void=yes
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"
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); }
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
17426 +#ifndef __cplusplus
17433 +exit (closedir (opendir (".")) != 0);
17438 +rm -f conftest$ac_exeext
17439 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17440 + (eval $ac_link) 2>&5
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
17447 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17448 + (exit $ac_status); }; }; then
17449 ac_cv_func_closedir_void=no
17451 - echo "configure: failed program was:" >&5
17452 - cat conftest.$ac_ext >&5
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
17459 +( exit $ac_status )
17460 +ac_cv_func_closedir_void=yes
17463 +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
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
17474 +cat >>confdefs.h <<\_ACEOF
17475 #define CLOSEDIR_VOID 1
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
17487 +for ac_header in fcntl.h unistd.h
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
17496 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17497 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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"
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>
17515 +rm -f conftest.$ac_objext
17516 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17517 + (eval $ac_compile) 2>&5
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
17525 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526 + (exit $ac_status); }; }; then
17527 + ac_header_compiler=yes
17529 + echo "$as_me: failed program was:" >&5
17530 +sed 's/^/| /' conftest.$ac_ext >&5
17532 +ac_header_compiler=no
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
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"
17545 +cat confdefs.h >>conftest.$ac_ext
17546 +cat >>conftest.$ac_ext <<_ACEOF
17547 +/* end confdefs.h. */
17548 +#include <$ac_header>
17550 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17551 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
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
17566 +if test -z "$ac_cpp_err"; then
17567 + ac_header_preproc=yes
17569 + echo "$as_me: failed program was:" >&5
17570 +sed 's/^/| /' conftest.$ac_ext >&5
17572 + ac_header_preproc=no
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
17578 +# So? What about this header?
17579 +case $ac_header_compiler:$ac_header_preproc in
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;}
17587 +## ------------------------------------ ##
17588 +## Report this to bug-autoconf@gnu.org. ##
17589 +## ------------------------------------ ##
17592 + sed "s/^/$as_me: WARNING: /" >&2
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;}
17603 +## ------------------------------------ ##
17604 +## Report this to bug-autoconf@gnu.org. ##
17605 +## ------------------------------------ ##
17608 + sed "s/^/$as_me: WARNING: /" >&2
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
17616 + eval "$as_ac_Header=$ac_header_preproc"
17618 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17619 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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
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
17636 + cat >conftest.$ac_ext <<_ACEOF
17637 +#line $LINENO "configure"
17640 +cat confdefs.h >>conftest.$ac_ext
17641 +cat >>conftest.$ac_ext <<_ACEOF
17642 +/* end confdefs.h. */
17645 + # include <fcntl.h>
17647 + #if HAVE_UNISTD_H
17648 + # include <unistd.h>
17653 +int ret = setmode && setmode (1, O_BINARY);
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
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
17668 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17669 + (exit $ac_status); }; }; then
17670 + ac_cv_func_setmode_dos=yes
17672 + echo "$as_me: failed program was:" >&5
17673 +sed 's/^/| /' conftest.$ac_ext >&5
17675 +ac_cv_func_setmode_dos=no
17677 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
17683 +cat >>confdefs.h <<\_ACEOF
17684 +#define HAVE_SETMODE_DOS 1
17689 +for ac_func in vprintf
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
17697 + cat >conftest.$ac_ext <<_ACEOF
17698 +#line $LINENO "configure"
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. */
17711 +# include <limits.h>
17713 +# include <assert.h>
17715 /* Override any gcc2 internal prototype to avoid an error. */
17716 +#ifdef __cplusplus
17720 /* We use char because int might match the return type of a gcc2
17721 - builtin and then its argument prototype would still apply. */
17723 + builtin and then its argument prototype would still apply. */
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)
17731 +char (*f) () = $ac_func;
17733 +#ifdef __cplusplus
17741 +return f != $ac_func;
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
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
17756 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757 + (exit $ac_status); }; }; then
17758 + eval "$as_ac_var=yes"
17760 + echo "$as_me: failed program was:" >&5
17761 +sed 's/^/| /' conftest.$ac_ext >&5
17763 +eval "$as_ac_var=no"
17765 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
17779 + cat >conftest.$ac_ext <<_ACEOF
17780 +#line $LINENO "configure"
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. */
17791 +# include <limits.h>
17793 +# include <assert.h>
17795 +/* Override any gcc2 internal prototype to avoid an error. */
17796 +#ifdef __cplusplus
17800 +/* We use char because int might match the return type of a gcc2
17801 + builtin and then its argument prototype would still apply. */
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)
17811 +char (*f) () = _doprnt;
17813 +#ifdef __cplusplus
17819 -if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17821 - eval "ac_cv_func_vprintf=yes"
17825 +return f != _doprnt;
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
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
17840 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17841 + (exit $ac_status); }; }; then
17842 + ac_cv_func__doprnt=yes
17844 - echo "configure: failed program was:" >&5
17845 - cat conftest.$ac_ext >&5
17847 - eval "ac_cv_func_vprintf=no"
17848 + echo "$as_me: failed program was:" >&5
17849 +sed 's/^/| /' conftest.$ac_ext >&5
17851 +ac_cv_func__doprnt=no
17854 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
17865 +cat >>confdefs.h <<\_ACEOF
17866 +#define HAVE_DOPRNT 1
17870 - echo "$ac_t""no" 1>&6
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
17883 +for ac_func in mkdir
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
17891 - cat > conftest.$ac_ext <<EOF
17892 -#line 2762 "configure"
17893 -#include "confdefs.h"
17894 + cat >conftest.$ac_ext <<_ACEOF
17895 +#line $LINENO "configure"
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. */
17908 +# include <limits.h>
17910 +# include <assert.h>
17912 /* Override any gcc2 internal prototype to avoid an error. */
17913 +#ifdef __cplusplus
17917 /* We use char because int might match the return type of a gcc2
17918 - builtin and then its argument prototype would still apply. */
17923 + builtin and then its argument prototype would still apply. */
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)
17933 +char (*f) () = $ac_func;
17935 +#ifdef __cplusplus
17941 -if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17943 - eval "ac_cv_func__doprnt=yes"
17947 +return f != $ac_func;
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
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
17962 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17963 + (exit $ac_status); }; }; then
17964 + eval "$as_ac_var=yes"
17966 - echo "configure: failed program was:" >&5
17967 - cat conftest.$ac_ext >&5
17969 - eval "ac_cv_func__doprnt=no"
17970 + echo "$as_me: failed program was:" >&5
17971 +sed 's/^/| /' conftest.$ac_ext >&5
17973 +eval "$as_ac_var=no"
17976 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
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
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
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
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"
18005 +cat confdefs.h >>conftest.$ac_ext
18006 +cat >>conftest.$ac_ext <<_ACEOF
18007 +/* end confdefs.h. */
18009 +#include <sys/types.h>
18010 +#include <sys/stat.h>
18020 +rm -f conftest.$ac_objext
18021 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18022 + (eval $ac_compile) 2>&5
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
18030 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031 + (exit $ac_status); }; }; then
18034 + echo "$as_me: failed program was:" >&5
18035 +sed 's/^/| /' conftest.$ac_ext >&5
18037 +cat >conftest.$ac_ext <<_ACEOF
18038 +#line $LINENO "configure"
18041 +cat confdefs.h >>conftest.$ac_ext
18042 +cat >>conftest.$ac_ext <<_ACEOF
18043 +/* end confdefs.h. */
18045 +#include <sys/types.h>
18046 +#include <sys/stat.h>
18056 +rm -f conftest.$ac_objext
18057 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18058 + (eval $ac_compile) 2>&5
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
18066 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067 + (exit $ac_status); }; }; then
18068 + patch_cv_mkdir_takes_one_arg=yes
18071 + echo "$as_me: failed program was:" >&5
18072 +sed 's/^/| /' conftest.$ac_ext >&5
18075 +rm -f conftest.$ac_objext conftest.$ac_ext
18078 +rm -f conftest.$ac_objext conftest.$ac_ext
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
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
18091 +cat >>confdefs.h <<\_ACEOF
18092 +#define MKDIR_TAKES_ONE_ARG 1
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
18106 + cat >conftest.$ac_ext <<_ACEOF
18107 +#line $LINENO "configure"
18110 +cat confdefs.h >>conftest.$ac_ext
18111 +cat >>conftest.$ac_ext <<_ACEOF
18112 +/* end confdefs.h. */
18117 +#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
18118 +neither MSDOS nor Windows
18124 +rm -f conftest.$ac_objext
18125 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18126 + (eval $ac_compile) 2>&5
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
18134 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18135 + (exit $ac_status); }; }; then
18136 + ac_cv_win_or_dos=yes
18138 + echo "$as_me: failed program was:" >&5
18139 +sed 's/^/| /' conftest.$ac_ext >&5
18141 +ac_cv_win_or_dos=no
18143 +rm -f conftest.$ac_objext conftest.$ac_ext
18146 +echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
18147 +echo "${ECHO_T}$ac_cv_win_or_dos" >&6
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
18153 + ac_fs_accepts_drive_letter_prefix=0
18154 + ac_fs_backslash_is_file_name_separator=0
18161 +cat >>confdefs.h <<_ACEOF
18162 +#define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
18170 +cat >>confdefs.h <<_ACEOF
18171 +#define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
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
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
18189 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
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
18211 - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
18212 + rm -rf $ac_xdir 2>/dev/null
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
18222 +cat >>confdefs.h <<\_ACEOF
18223 #define HAVE_LONG_FILE_NAMES 1
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
18234 - cat > conftest.$ac_ext <<EOF
18235 -#line 2860 "configure"
18236 -#include "confdefs.h"
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 */
18255 -struct dirent dp; dp.d_ino = 0;
18258 -if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18260 - jm_cv_struct_dirent_d_ino=yes
18262 - echo "configure: failed program was:" >&5
18263 - cat conftest.$ac_ext >&5
18265 - jm_cv_struct_dirent_d_ino=no
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
18281 + ac_config_files="$ac_config_files Makefile"
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.
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.
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.
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.
18318 - case `(ac_space=' '; set | grep ac_space) 2>&1` in
18320 - # `set' does not quote correctly, so add quotes (double-quote substitution
18321 - # turns \\\\ into \\, and sed turns \\ into \).
18323 - -e "s/'/'\\\\''/g" \
18324 - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
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'
18330 - esac >> confcache
18331 -if cmp -s $cache_file confcache; then
18336 + case `(ac_space=' '; set | grep ac_space) 2>&1` in
18338 + # `set' does not quote correctly, so add quotes (double-quote
18339 + # substitution turns \\\\ into \\, and sed turns \\ into \).
18342 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18345 + # `set' quotes correctly as required by POSIX, so do not add quotes.
18347 + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18354 + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
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
18365 echo "not updating unwritable cache $cache_file"
18370 -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
18372 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18373 # Let make expand exec_prefix.
18374 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
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/;
18395 -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
18397 DEFS=-DHAVE_CONFIG_H
18399 -# Without the "./", some shells look in PATH for config.status.
18400 -: ${CONFIG_STATUS=./config.status}
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$//'`
18408 + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18409 + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18411 +LIBOBJS=$ac_libobjs
18413 -echo creating $CONFIG_STATUS
18414 -rm -f $CONFIG_STATUS
18415 -cat > $CONFIG_STATUS <<EOF
18417 -# Generated automatically by configure.
18418 +LTLIBOBJS=$ac_ltlibobjs
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
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`:
18434 -# $0 $ac_configure_args
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.
18440 -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
18443 +ac_cs_recheck=false
18444 +ac_cs_silent=false
18445 +SHELL=\${CONFIG_SHELL-$SHELL}
18448 +cat >>$CONFIG_STATUS <<\_ACEOF
18449 +## --------------------- ##
18450 +## M4sh Initialization. ##
18451 +## --------------------- ##
18453 +# Be Bourne compatible
18454 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
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
18464 +# Support unset when possible.
18465 +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18472 +# Work around bugs in pre-3.0 UWIN ksh.
18473 +$as_unset ENV MAIL MAILPATH
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
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"
18491 - -help | --help | --hel | --he | --h)
18492 - echo "\$ac_cs_usage"; exit 0 ;;
18493 - *) echo "\$ac_cs_usage"; exit 1 ;;
18495 + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18496 + eval $as_var=C; export $as_var
18498 + $as_unset $as_var
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
18511 -trap 'rm -fr `echo "Makefile config.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
18513 -cat >> $CONFIG_STATUS <<EOF
18514 +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18515 + as_basename=basename
18517 + as_basename=false
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
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
18531 -s%@LDFLAGS@%$LDFLAGS%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
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
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
18570 -s%@ANSI2KNR@%$ANSI2KNR%g
18571 -s%@LIBOBJS@%$LIBOBJS%g
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 ||
18582 + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18583 + /^X\/\(\/\/\)$/{ s//\1/; q; }
18584 + /^X\/\(\/\).*/{ s//\1/; q; }
18587 -cat >> $CONFIG_STATUS <<\EOF
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.
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
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=';'
18616 - sed "${ac_end}q" conftest.subs > conftest.s$ac_file
18619 - if test ! -s conftest.s$ac_file; then
18620 - ac_more_lines=false
18621 - rm -f conftest.s$ac_file
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.
18634 + *[\\/]* ) as_myself=$0 ;;
18635 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18636 +for as_dir in $PATH
18639 + test -z "$as_dir" && as_dir=.
18640 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
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
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; }; }
18655 + case $CONFIG_SHELL in
18657 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18658 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18661 + test -z "$as_dir" && as_dir=.
18662 + for as_base in sh bash ksh sh5; do
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+"$@"}
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 |
18696 + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
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; }; }
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.
18715 +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18716 + *c*,-n*) ECHO_N= ECHO_C='
18718 + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18719 + *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18722 +if expr a : '\(a\)' >/dev/null 2>&1; then
18728 +rm -f conf$$ conf$$.exe 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
18737 - if test -z "$ac_sed_cmds"; then
18738 - ac_sed_cmds="sed -f conftest.s$ac_file"
18740 - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
18742 - ac_file=`expr $ac_file + 1`
18744 - ac_end=`expr $ac_end + $ac_max_sed_cmds`
18747 +elif ln conf$$.file conf$$ 2>/dev/null; then
18752 +rm -f conf$$ conf$$.exe conf$$.file
18754 +if mkdir -p . 2>/dev/null; then
18760 +as_executable_p="test -f"
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"
18765 +# Sed expression to map a string onto a valid variable name.
18766 +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18770 +# We need space, tab and new line, in precisely that order.
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
18786 + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18787 +## Running $as_me. ##
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
18795 + CONFIG_FILES = $CONFIG_FILES
18796 + CONFIG_HEADERS = $CONFIG_HEADERS
18797 + CONFIG_LINKS = $CONFIG_LINKS
18798 + CONFIG_COMMANDS = $CONFIG_COMMANDS
18802 +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
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
18811 +if test -n "$ac_config_headers"; then
18812 + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18815 +if test -n "$ac_config_links"; then
18816 + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18819 +if test -n "$ac_config_commands"; then
18820 + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18823 +cat >>$CONFIG_STATUS <<\_ACEOF
18826 +\`$as_me' instantiates files from templates according to the
18827 +current configuration.
18829 +Usage: $0 [OPTIONS] [FILE]...
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
18841 +Configuration files:
18844 +Configuration headers:
18847 +Report bugs to <bug-autoconf@gnu.org>."
18850 +cat >>$CONFIG_STATUS <<_ACEOF
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'`\\"
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."
18861 +INSTALL="$INSTALL"
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
18872 + ac_option=`expr "x$1" : 'x\([^=]*\)='`
18873 + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18881 + *) # This is not an option, so the user has probably given explicit
18884 + ac_need_defaults=false;;
18887 + case $ac_option in
18888 + # Handling of the options.
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 ;;
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 )
18906 + --file | --fil | --fi | --f )
18908 + CONFIG_FILES="$CONFIG_FILES $ac_optarg"
18909 + ac_need_defaults=false;;
18910 + --header | --heade | --head | --hea )
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=: ;;
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; }; } ;;
18925 + *) ac_config_targets="$ac_config_targets $1" ;;
18930 -if test -z "$ac_sed_cmds"; then
18933 +ac_configure_extra_args=
18935 +if $ac_cs_silent; then
18937 + ac_configure_extra_args="$ac_configure_extra_args --silent"
18941 -cat >> $CONFIG_STATUS <<EOF
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
18949 -CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
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" ;;
18964 +cat >>$CONFIG_STATUS <<\_ACEOF
18965 +for ac_config_target in $ac_config_targets
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; }; };;
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
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'`
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.
19003 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19004 + trap '{ (exit 1); exit 1; }' 1 2 13 15
19007 +# Create a (secure) tmp directory for tmp files.
19010 + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19011 + test -n "$tmp" && test -d "$tmp"
19014 + tmp=./confstat$$-$RANDOM
19015 + (umask 077 && mkdir $tmp)
19018 + echo "$me: cannot create a temporary directory in ." >&2
19019 + { (exit 1); exit 1; }
19024 +cat >>$CONFIG_STATUS <<_ACEOF
19027 +# CONFIG_FILES section.
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
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
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
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.
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
19101 + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19103 + if test ! -s $tmp/subs.frag; then
19104 + ac_more_lines=false
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.
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"
19115 + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19117 + ac_sed_frag=`expr $ac_sed_frag + 1`
19119 + ac_end=`expr $ac_end + $ac_max_sed_lines`
19122 + if test -z "$ac_sed_cmds"; then
19125 +fi # test -n "$CONFIG_FILES"
19127 - case "$ac_given_srcdir" in
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" ;;
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".
19140 + - | *:- | *:-:* ) # input from 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 ;;
19149 - case "$ac_given_INSTALL" in
19150 - [/$]*) INSTALL="$ac_given_INSTALL" ;;
19151 - *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
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; }
19166 + { if $as_mkdir_p; then
19167 + mkdir -p "$ac_dir"
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 ||
19180 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19181 + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19182 + /^X\(\/\/\)$/{ s//\1/; q; }
19183 + /^X\(\/\).*/{ s//\1/; q; }
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; }; }; }
19191 - echo creating "$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" ;;
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'`
19205 + ac_dir_suffix= ac_top_builddir=
19209 + .) # No --srcdir option. We are building in place.
19211 + if test -z "$ac_top_builddir"; then
19214 + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
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 ;;
19223 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
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`
19232 + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19233 + *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
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
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;}
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
19256 + configure_input="$ac_file. "
19258 + configure_input=$configure_input"Generated from `echo $ac_file_in |
19259 + sed 's,.*/,,'` by configure."
19261 + # First look for the input files in the build tree, otherwise in the
19263 + ac_file_inputs=`IFS=:
19264 + for f in $ac_file_in; do
19266 + -) echo $tmp/stdin ;;
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; }; }
19274 + if test -f "$f"; then
19277 + elif test -f "$srcdir/$f"; then
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; }; }
19287 + done` || { (exit 1); exit 1; }
19289 +cat >>$CONFIG_STATUS <<_ACEOF
19293 +cat >>$CONFIG_STATUS <<\_ACEOF
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
19308 + if test x"$ac_file" != x-; then
19309 + mv $tmp/out $ac_file
19317 +cat >>$CONFIG_STATUS <<\_ACEOF
19320 +# CONFIG_HEADER section.
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.
19326 # ac_d sets the value in "#define NAME VALUE" lines.
19327 -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19328 -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
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'
19338 +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19339 +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19340 +ac_uB='$,\1#\2define\3'
19343 -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19344 -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19345 -ac_eB='$%\1#\2define\3'
19350 -if test "${CONFIG_HEADERS+set}" != set; then
19352 -cat >> $CONFIG_STATUS <<EOF
19353 - CONFIG_HEADERS="config.h:config.hin"
19355 -cat >> $CONFIG_STATUS <<\EOF
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" ;;
19365 + - | *:- | *:-:* ) # input from 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 ;;
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;}
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
19383 + ac_file_inputs=`IFS=:
19384 + for f in $ac_file_in; do
19386 + -) echo $tmp/stdin ;;
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; }; }
19394 + if test -f "$f"; then
19397 + elif test -f "$srcdir/$f"; then
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; }; }
19407 + done` || { (exit 1); exit 1; }
19408 + # Remove the trailing spaces.
19409 + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
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
19422 -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
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.
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
19447 +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19449 +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
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
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]*%/* & */%
19465 +cat >>conftest.undefs <<\_ACEOF
19466 +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
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
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
19489 + sed -f $tmp/defines.sed $tmp/in >$tmp/out
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
19497 +rm -f conftest.defines
19498 +echo ' fi # grep' >>$CONFIG_STATUS
19499 +echo >>$CONFIG_STATUS
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
19506 +while grep . conftest.undefs >/dev/null
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
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
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
19538 -rm -f conftest.vals
19539 +rm -f conftest.undefs
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"
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
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"
19563 - mv conftest.h $ac_file
19564 + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
19567 + cat $tmp/in >>$tmp/config.h
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;}
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; }
19586 + { if $as_mkdir_p; then
19587 + mkdir -p "$ac_dir"
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 ||
19600 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19601 + /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19602 + /^X\(\/\/\)$/{ s//\1/; q; }
19603 + /^X\(\/\).*/{ s//\1/; q; }
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; }; }; }
19612 -cat >> $CONFIG_STATUS <<EOF
19614 + mv $tmp/config.h $ac_file
19617 + cat $tmp/config.h
19618 + rm -f $tmp/config.h
19624 -cat >> $CONFIG_STATUS <<\EOF
19625 +cat >>$CONFIG_STATUS <<\_ACEOF
19629 +{ (exit 0); exit 0; }
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
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
19647 + ac_config_status_args=
19648 + test "$silent" = yes &&
19649 + ac_config_status_args="$ac_config_status_args --quiet"
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; }
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
19662 +# Configure `patch'.
19664 +# Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003 Free Software
19665 +# Foundation, Inc.
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.
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.
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.
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)
19692 +# Use ed_PROGRAM, not ED_PROGRAM,
19693 +# because <errno.h> reserves symbols starting with `E'.
19694 +AC_PATH_PROG(ed_PROGRAM, ed, ed)
19709 +AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
19717 +jm_CHECK_TYPE_STRUCT_UTIMBUF
19729 +dnl This should be in gnulib, but isn't for some reason.
19730 +AC_DEFUN([jm_PREREQ_ADDEXT],
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)
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)
19744 +jm_FUNC_GLIBC_UNLOCKED_IO
19747 +AC_FUNC_CLOSEDIR_VOID
19748 +AC_FUNC_SETMODE_DOS
19750 +PATCH_FUNC_MKDIR_TAKES_ONE_ARG
19753 +AC_SYS_LONG_FILE_NAMES
19755 +AC_CONFIG_FILES([Makefile])
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
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.
19767 -AC_CONFIG_HEADER(config.h:config.hin)
19780 -# Use ed_PROGRAM, not ED_PROGRAM,
19781 -# because <errno.h> reserves symbols starting with `E'.
19782 -AC_PATH_PROG(ed_PROGRAM, ed, ed)
19796 -AC_CHECK_HEADERS(fcntl.h limits.h string.h unistd.h utime.h varargs.h)
19797 -jm_AC_HEADER_INTTYPES_H
19806 -AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1\$U.o getopt\$U.o"])
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)
19813 -AC_FUNC_CLOSEDIR_VOID
19816 -AC_SYS_LONG_FILE_NAMES
19817 -jm_STRUCT_DIRENT_D_INO
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
19824 Version 2, June 1991
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.
19832 @@ -291,7 +291,7 @@
19833 the "copyright" line and a pointer to where the full notice is found.
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>
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:
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
19855 +/* dirname.c -- return all but the last element in a path
19856 + Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
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.
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.
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. */
19873 +# include <config.h>
19876 +#if STDC_HEADERS || HAVE_STRING_H
19877 +# include <string.h>
19880 +#include "dirname.h"
19881 +#include "xalloc.h"
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). */
19887 +dir_len (char const *path)
19889 + size_t prefix_length = FILESYSTEM_PREFIX_LEN (path);
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]))
19897 + /* But don't strip the only slash from "/". */
19898 + return prefix_length + ISSLASH (path[prefix_length]);
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). */
19907 +dir_name (char const *path)
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);
19914 + newpath[length++] = '.';
19915 + newpath[length] = 0;
19919 +#ifdef TEST_DIRNAME
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
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
19950 +# define MAX_BUFF_LEN 1024
19951 +# include <stdio.h>
19953 +char *program_name;
19956 +main (int argc, char *argv[])
19958 + char buff[MAX_BUFF_LEN + 1];
19960 + program_name = argv[0];
19962 + buff[MAX_BUFF_LEN] = 0;
19963 + while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
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);
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
19980 +/* Copyright (C) 1998, 2001 Free Software Foundation, Inc.
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.
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.
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. */
19996 +#ifndef DIRNAME_H_
19997 +# define DIRNAME_H_ 1
20000 +# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
20001 +# define PARAMS(Args) Args
20003 +# define PARAMS(Args) ()
20007 +# ifndef DIRECTORY_SEPARATOR
20008 +# define DIRECTORY_SEPARATOR '/'
20012 +# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
20015 +# ifndef FILESYSTEM_PREFIX_LEN
20016 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
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));
20024 +int strip_trailing_slashes PARAMS ((char *path));
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
20031 /* Error handler for noninteractive utilities
20032 - Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
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.
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.
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.
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. */
20063 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
20070 +# include <libintl.h>
20072 +# include "gettext.h"
20076 +# include <wchar.h>
20077 +# define mbsrtowcs __mbsrtowcs
20080 #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
20082 # include <stdarg.h>
20088 +# include "unlocked-io.h"
20092 # define _(String) String
20094 @@ -70,29 +80,52 @@
20096 # define program_name program_invocation_name
20097 # include <errno.h>
20098 +# include <libio/libioP.h>
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,
20107 + __attribute__ ((__format__ (__printf__, 5, 6)));;
20108 # define error __error
20109 # define error_at_line __error_at_line
20111 +# ifdef USE_IN_LIBIO
20112 +# include <libio/iolibio.h>
20113 +# define fflush(s) INTUSE(_IO_fflush) (s)
20115 +# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
20118 #else /* not _LIBC */
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"
20124 +char *strerror_r ();
20127 /* The calling program should define program_name and set it to the
20128 name of the executing program. */
20129 extern char *program_name;
20131 -# ifdef HAVE_STRERROR_R
20132 +# if HAVE_STRERROR_R || defined strerror_r
20133 # define __strerror_r strerror_r
20136 -# ifndef strerror /* On some systems, strerror is a macro */
20137 +# ifndef HAVE_DECL_STRERROR
20138 +"this configure-time declaration test was not run"
20140 +# if !HAVE_DECL_STRERROR
20145 -private_strerror (errnum)
20147 +private_strerror (int errnum)
20149 extern char *sys_errlist[];
20150 extern int sys_nerr;
20151 @@ -103,15 +136,118 @@
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 */
20160 +print_errno_message (int errnum)
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);
20169 + if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
20175 + s = strerror (errnum);
20180 + s = _("Unknown system error");
20183 +#if _LIBC && USE_IN_LIBIO
20184 + if (_IO_fwide (stderr, 0) > 0)
20186 + __fwprintf (stderr, L": %s", s);
20191 + fprintf (stderr, ": %s", s);
20196 +error_tail (int status, int errnum, const char *message, va_list args)
20198 +# if HAVE_VPRINTF || _LIBC
20199 +# if _LIBC && USE_IN_LIBIO
20200 + if (_IO_fwide (stderr, 0) > 0)
20202 +# define ALLOCA_LIMIT 2000
20203 + size_t len = strlen (message) + 1;
20204 + wchar_t *wmessage = NULL;
20211 + if (len < ALLOCA_LIMIT)
20212 + wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
20215 + if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
20218 + wmessage = (wchar_t *) realloc (wmessage,
20219 + len * sizeof (wchar_t));
20221 + if (wmessage == NULL)
20223 + fputws_unlocked (L"out of memory\n", stderr);
20228 + memset (&st, '\0', sizeof (st));
20231 + while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
20233 + if (res == (size_t) -1)
20234 + /* The string cannot be converted. */
20235 + wmessage = (wchar_t *) L"???";
20237 + __vfwprintf (stderr, wmessage, args);
20241 + vfprintf (stderr, message, args);
20243 + _doprnt (message, args, stderr);
20247 + ++error_message_count;
20249 + print_errno_message (errnum);
20250 +# if _LIBC && USE_IN_LIBIO
20251 + if (_IO_fwide (stderr, 0) > 0)
20252 + putwc (L'\n', stderr);
20255 + putc ('\n', stderr);
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. */
20270 #if defined VA_START && __STDC__
20271 error (int status, int errnum, const char *message, ...)
20272 @@ -127,43 +263,48 @@
20278 +# ifdef USE_IN_LIBIO
20279 + _IO_flockfile (stderr);
20281 + __flockfile (stderr);
20284 if (error_print_progname)
20285 (*error_print_progname) ();
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);
20295 + fprintf (stderr, "%s: ", program_name);
20299 VA_START (args, message);
20300 -# if HAVE_VPRINTF || _LIBC
20301 - vfprintf (stderr, message, args);
20303 - _doprnt (message, args, stderr);
20306 + error_tail (status, errnum, message, args);
20308 fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
20311 ++error_message_count;
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);
20321 - fprintf (stderr, ": %s", strerror (errnum));
20324 + print_errno_message (errnum);
20325 putc ('\n', stderr);
20332 +# ifdef USE_IN_LIBIO
20333 + _IO_funlockfile (stderr);
20335 + __funlockfile (stderr);
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;
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. */
20353 @@ -202,43 +344,58 @@
20354 old_line_number = line_number;
20359 +# ifdef USE_IN_LIBIO
20360 + _IO_flockfile (stderr);
20362 + __flockfile (stderr);
20365 if (error_print_progname)
20366 (*error_print_progname) ();
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);
20376 + fprintf (stderr, "%s:", program_name);
20379 if (file_name != NULL)
20380 - fprintf (stderr, "%s:%d: ", file_name, line_number);
20382 +#if _LIBC && USE_IN_LIBIO
20383 + if (_IO_fwide (stderr, 0) > 0)
20384 + __fwprintf (stderr, L"%s:%d: ", file_name, line_number);
20387 + fprintf (stderr, "%s:%d: ", file_name, line_number);
20391 VA_START (args, message);
20392 -# if HAVE_VPRINTF || _LIBC
20393 - vfprintf (stderr, message, args);
20395 - _doprnt (message, args, stderr);
20398 + error_tail (status, errnum, message, args);
20400 fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
20403 ++error_message_count;
20406 -#if defined HAVE_STRERROR_R || defined _LIBC
20407 - char errbuf[1024];
20408 - fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
20410 - fprintf (stderr, ": %s", strerror (errnum));
20413 + print_errno_message (errnum);
20414 putc ('\n', stderr);
20421 +# ifdef USE_IN_LIBIO
20422 + _IO_funlockfile (stderr);
20424 + __funlockfile (stderr);
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
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 */
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
20446 Free Software Foundation, Inc.
20447 This file is part of the GNU C Library.
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.
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.
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. */
20474 #ifdef HAVE_CONFIG_H
20475 #include <config.h>
20478 -#include "getopt.h"
20480 +# include <getopt.h>
20482 +# include "getopt.h"
20485 #if !defined __STDC__ || !__STDC__
20486 /* This is a separate conditional since some stdc systems
20488 return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
20492 +libc_hidden_def (getopt_long)
20493 +libc_hidden_def (getopt_long_only)
20496 #endif /* Not ELIDE_CODE. */
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
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!
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.
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.
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.
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. */
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 @@
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)
20549 -# define _(msgid) (msgid)
20552 +# include <libintl.h>
20554 +/* This is for other GNU distributions with internationalized messages. */
20555 +# include "gettext.h"
20557 +#define _(msgid) gettext (msgid)
20559 +#if defined _LIBC && defined USE_IN_LIBIO
20560 +# include <wchar.h>
20563 +#ifndef attribute_hidden
20564 +# define attribute_hidden
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. */
20572 -char *optarg = NULL;
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
20581 -int __getopt_initialized = 0;
20582 +int __getopt_initialized attribute_hidden;
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;
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;
20596 /* Bash 2.0 gives us an environment variable containing flags
20597 indicating ARGV elements that should not be considered arguments. */
20599 +# ifdef USE_NONOPTION_FLAGS
20600 /* Defined in getopt_init.c */
20601 extern char *__getopt_nonoption_flags;
20603 static int nonoption_flags_max_len;
20604 static int nonoption_flags_len;
20607 -static int original_argc;
20608 -static char *const *original_argv;
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. */
20614 -__attribute__ ((unused))
20615 -store_args_and_env (int argc, char *const *argv)
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;
20622 -# ifdef text_set_element
20623 -text_set_element (__libc_subinit, store_args_and_env);
20624 -# endif /* text_set_element */
20626 -# define SWAP_FLAGS(ch1, ch2) \
20627 +# ifdef USE_NONOPTION_FLAGS
20628 +# define SWAP_FLAGS(ch1, ch2) \
20629 if (nonoption_flags_len > 0) \
20631 char __tmp = __getopt_nonoption_flags[ch1]; \
20632 __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
20633 __getopt_nonoption_flags[ch2] = __tmp; \
20636 +# define SWAP_FLAGS(ch1, ch2)
20639 # define SWAP_FLAGS(ch1, ch2)
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. */
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
20650 @@ -419,9 +416,9 @@
20652 ordering = PERMUTE;
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)
20660 if (nonoption_flags_max_len == 0)
20662 @@ -517,6 +514,13 @@
20666 + int print_errors = opterr;
20667 + if (optstring[0] == ':')
20668 + print_errors = 0;
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. */
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 @@
20687 indfound = option_index;
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. */
20698 if (ambig && !exact)
20701 - fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
20702 - argv[0], argv[optind]);
20703 + if (print_errors)
20705 +#if defined _LIBC && defined USE_IN_LIBIO
20708 + if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
20709 + argv[0], argv[optind]) >= 0)
20712 + if (_IO_fwide (stderr, 0) > 0)
20713 + __fwprintf (stderr, L"%s", buf);
20715 + fputs (buf, stderr);
20720 + fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
20721 + argv[0], argv[optind]);
20724 nextchar += strlen (nextchar);
20727 @@ -694,18 +719,52 @@
20728 optarg = nameend + 1;
20732 + if (print_errors)
20734 +#if defined _LIBC && defined USE_IN_LIBIO
20739 if (argv[optind - 1][1] == '-')
20742 - _("%s: option `--%s' doesn't allow an argument\n"),
20743 - argv[0], pfound->name);
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);
20751 + fprintf (stderr, _("\
20752 +%s: option `--%s' doesn't allow an argument\n"),
20753 + argv[0], pfound->name);
20757 - /* +option or -option */
20759 - _("%s: option `%c%s' doesn't allow an argument\n"),
20760 - argv[0], argv[optind - 1][0], pfound->name);
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],
20769 + fprintf (stderr, _("\
20770 +%s: option `%c%s' doesn't allow an argument\n"),
20771 + argv[0], argv[optind - 1][0], pfound->name);
20775 +#if defined _LIBC && defined USE_IN_LIBIO
20778 + if (_IO_fwide (stderr, 0) > 0)
20779 + __fwprintf (stderr, L"%s", buf);
20781 + fputs (buf, stderr);
20788 nextchar += strlen (nextchar);
20789 @@ -720,10 +779,28 @@
20790 optarg = argv[optind++];
20795 - _("%s: option `%s' requires an argument\n"),
20796 - argv[0], argv[optind - 1]);
20797 + if (print_errors)
20799 +#if defined _LIBC && defined USE_IN_LIBIO
20802 + if (__asprintf (&buf, _("\
20803 +%s: option `%s' requires an argument\n"),
20804 + argv[0], argv[optind - 1]) >= 0)
20806 + if (_IO_fwide (stderr, 0) > 0)
20807 + __fwprintf (stderr, L"%s", buf);
20809 + fputs (buf, stderr);
20815 + _("%s: option `%s' requires an argument\n"),
20816 + argv[0], argv[optind - 1]);
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)
20827 + if (print_errors)
20829 +#if defined _LIBC && defined USE_IN_LIBIO
20834 if (argv[optind][1] == '-')
20836 - fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
20837 - argv[0], nextchar);
20840 +#if defined _LIBC && defined USE_IN_LIBIO
20841 + n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
20842 + argv[0], nextchar);
20844 + fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
20845 + argv[0], nextchar);
20849 - /* +option or -option */
20850 - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
20851 - argv[0], argv[optind][0], nextchar);
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);
20858 + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
20859 + argv[0], argv[optind][0], nextchar);
20863 +#if defined _LIBC && defined USE_IN_LIBIO
20866 + if (_IO_fwide (stderr, 0) > 0)
20867 + __fwprintf (stderr, L"%s", buf);
20869 + fputs (buf, stderr);
20875 nextchar = (char *) "";
20877 @@ -777,15 +885,44 @@
20879 if (temp == NULL || c == ':')
20882 + if (print_errors)
20884 +#if defined _LIBC && defined USE_IN_LIBIO
20889 if (posixly_correct)
20890 - /* 1003.2 specifies the format of this message. */
20891 - fprintf (stderr, _("%s: illegal option -- %c\n"),
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"),
20899 + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
20903 - fprintf (stderr, _("%s: invalid option -- %c\n"),
20906 +#if defined _LIBC && defined USE_IN_LIBIO
20907 + n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
20910 + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
20914 +#if defined _LIBC && defined USE_IN_LIBIO
20917 + if (_IO_fwide (stderr, 0) > 0)
20918 + __fwprintf (stderr, L"%s", buf);
20920 + fputs (buf, stderr);
20928 @@ -811,11 +948,27 @@
20930 else if (optind == argc)
20933 + if (print_errors)
20935 /* 1003.2 specifies the format of this message. */
20936 +#if defined _LIBC && defined USE_IN_LIBIO
20939 + if (__asprintf (&buf,
20940 + _("%s: option requires an argument -- %c\n"),
20941 + argv[0], c) >= 0)
20943 + if (_IO_fwide (stderr, 0) > 0)
20944 + __fwprintf (stderr, L"%s", buf);
20946 + fputs (buf, stderr);
20951 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
20956 if (optstring[0] == ':')
20957 @@ -860,9 +1013,26 @@
20959 if (ambig && !exact)
20962 - fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
20963 - argv[0], argv[optind]);
20964 + if (print_errors)
20966 +#if defined _LIBC && defined USE_IN_LIBIO
20969 + if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
20970 + argv[0], argv[optind]) >= 0)
20972 + if (_IO_fwide (stderr, 0) > 0)
20973 + __fwprintf (stderr, L"%s", buf);
20975 + fputs (buf, stderr);
20980 + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
20981 + argv[0], argv[optind]);
20984 nextchar += strlen (nextchar);
20987 @@ -878,10 +1048,28 @@
20988 optarg = nameend + 1;
20992 - fprintf (stderr, _("\
20993 + if (print_errors)
20995 +#if defined _LIBC && defined USE_IN_LIBIO
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)
21003 + if (_IO_fwide (stderr, 0) > 0)
21004 + __fwprintf (stderr, L"%s", buf);
21006 + fputs (buf, stderr);
21011 + fprintf (stderr, _("\
21012 +%s: option `-W %s' doesn't allow an argument\n"),
21013 + argv[0], pfound->name);
21017 nextchar += strlen (nextchar);
21019 @@ -893,10 +1081,28 @@
21020 optarg = argv[optind++];
21025 - _("%s: option `%s' requires an argument\n"),
21026 - argv[0], argv[optind - 1]);
21027 + if (print_errors)
21029 +#if defined _LIBC && defined USE_IN_LIBIO
21032 + if (__asprintf (&buf, _("\
21033 +%s: option `%s' requires an argument\n"),
21034 + argv[0], argv[optind - 1]) >= 0)
21036 + if (_IO_fwide (stderr, 0) > 0)
21037 + __fwprintf (stderr, L"%s", buf);
21039 + fputs (buf, stderr);
21045 + _("%s: option `%s' requires an argument\n"),
21046 + argv[0], argv[optind - 1]);
21049 nextchar += strlen (nextchar);
21050 return optstring[0] == ':' ? ':' : '?';
21052 @@ -940,12 +1146,28 @@
21054 else if (optind == argc)
21057 + if (print_errors)
21059 /* 1003.2 specifies the format of this message. */
21060 +#if defined _LIBC && defined USE_IN_LIBIO
21063 + if (__asprintf (&buf, _("\
21064 +%s: option requires an argument -- %c\n"),
21065 + argv[0], c) >= 0)
21067 + if (_IO_fwide (stderr, 0) > 0)
21068 + __fwprintf (stderr, L"%s", buf);
21070 + fputs (buf, stderr);
21076 - _("%s: option requires an argument -- %c\n"),
21078 + _("%s: option requires an argument -- %c\n"),
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
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.
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.
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.
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. */
21121 # define _GETOPT_H 1
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>
21142 -# if defined __STDC__ && __STDC__
21143 +# if (defined __STDC__ && __STDC__) || defined __cplusplus
21147 @@ -126,25 +136,26 @@
21148 arguments to the option '\0'. This behavior is specific to the GNU
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__ */
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);
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,
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
21183 +/* Convenience header for conditional use of GNU <libintl.h>.
21184 + Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
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.
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.
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,
21201 +#ifndef _LIBGETTEXT_H
21202 +#define _LIBGETTEXT_H 1
21204 +/* NLS can be disabled through the configure --disable-nls option. */
21207 +/* Get declarations of GNU message catalog functions. */
21208 +# include <libintl.h>
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>
21218 +#if defined(__sun)
21219 +# include <locale.h>
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))
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
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
21256 /* inputting files to be patched */
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 $ */
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.
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 */
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));
21282 /* New patch--prepare to edit another file. */
21284 @@ -102,28 +103,28 @@
21285 /* Report whether a desired revision was found. */
21288 -report_revision (int found_revision)
21289 +report_revision (bool found_revision)
21291 - revision = quotearg (revision);
21292 + char const *rev = quotearg (revision);
21294 if (found_revision)
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);
21302 if (verbosity != SILENT)
21303 say ("Warning: this file doesn't appear to be the %s version -- patching anyway.\n",
21308 fatal ("This file doesn't appear to be the %s version -- aborting.",
21313 ask ("This file doesn't appear to be the %s version -- patch anyway? [n] ",
21319 @@ -140,7 +141,7 @@
21321 get_input_file (char const *filename, char const *outname)
21323 - int elsewhere = strcmp (filename, outname);
21324 + bool elsewhere = strcmp (filename, outname) != 0;
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))))
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. */
21346 @@ -274,7 +275,7 @@
21347 && (ptr = (char const **) malloc ((size_t) iline * sizeof *ptr))))
21354 for (s = buffer; ; s++)
21355 @@ -291,7 +292,7 @@
21357 char const *rev = revision;
21359 - int found_revision = 0;
21360 + bool found_revision = false;
21361 size_t revlen = strlen (rev);
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])))
21368 - found_revision = 1;
21369 + found_revision = true;
21373 @@ -314,7 +315,7 @@
21374 /* Plan A will work. */
21381 /* Keep (virtually) nothing in memory. */
21382 @@ -326,7 +327,7 @@
21384 register size_t len;
21385 register size_t maxlen;
21386 - register int found_revision;
21387 + register bool found_revision;
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. */
21395 -ifetch (LINENUM line, int whichbuf, size_t *psize)
21396 +ifetch (LINENUM line, bool whichbuf, size_t *psize)
21398 register char const *q;
21399 register char const *p;
21400 @@ -444,9 +445,9 @@
21401 LINENUM baseline = line - offline;
21403 if (tiline[0] == baseline)
21405 + whichbuf = false;
21406 else if (tiline[1] == baseline)
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
21416 /* inputting files to be patched */
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 $ */
21421 +/* Copyright (C) 1986, 1988 Larry Wall
21422 + Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999, 2002, 2003
21423 + Free Software Foundation, Inc.
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.
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.
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. */
21440 XTERN LINENUM input_lines; /* how long is input file in lines */
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
21454 +Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
21457 + This file is free documentation; the Free Software Foundation gives
21458 +unlimited permission to copy, distribute and modify it.
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').
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
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.
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'.
21498 The simplest way to compile this package is:
21500 @@ -55,14 +68,15 @@
21501 =====================
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
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.
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:
21517 + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
21519 + *Note Defining Variables::, for more details.
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 `..'.
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
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.
21540 @@ -122,22 +136,32 @@
21541 Specifying the System Type
21542 ==========================
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:
21560 -See the file `config.sub' for the possible values of each field. If
21561 +where SYSTEM can have one of these forms:
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.
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.
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'.
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.
21588 -Operation Controls
21589 +Defining Variables
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:
21598 + ./configure CC=/usr/local2/bin/gcc
21600 +will cause the specified gcc to be used as the C compiler (unless it is
21601 +overridden in the site shell script).
21603 +`configure' Invocation
21604 +======================
21606 `configure' recognizes the following options to control how it
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'.
21616 Print a summary of the options to `configure', and exit.
21620 + Print the version of Autoconf used to generate the `configure'
21621 + script, and exit.
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
21630 + Alias for `--cache-file=config.cache'.
21635 @@ -175,8 +223,6 @@
21636 Look for the package's source code in directory DIR. Usually
21637 `configure' can determine that directory automatically.
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.
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
21652 # install - install a program, script, or datafile
21653 -# This comes from X11R5 (mit/util/scripts/install.sh).
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.
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
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:
21678 +# The above copyright notice and this permission notice shall be included in
21679 +# all copies or substantial portions of the Software.
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.
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-
21694 +# FSF changes to this file are in the public domain.
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
21700 while [ x"$1" != x ]; do
21702 - -c) instcmd="$cpprog"
21703 + -c) instcmd=$cpprog
21711 - -s) stripcmd="$stripprog"
21712 + -s) stripcmd=$stripprog
21716 @@ -106,17 +124,17 @@
21720 - echo "install: no input file specified"
21721 + echo "$0: no input file specified" >&2
21728 if [ x"$dir_arg" != x ]; then
21732 - if [ -d $dst ]; then
21734 + if [ -d "$dst" ]; then
21738 @@ -125,38 +143,38 @@
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 '*'.
21746 - if [ -f $src -o -d $src ]
21747 + if [ -f "$src" ] || [ -d "$src" ]
21752 - echo "install: $src does not exist"
21753 + echo "$0: $src does not exist" >&2
21760 - echo "install: no destination specified"
21761 + echo "$0: no destination specified" >&2
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
21774 - dst="$dst"/`basename $src`
21775 + dst=$dst/`basename "$src"`
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,^$,.,'`
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
21792 -IFS="${IFS-${defaultIFS}}"
21793 +IFS="${IFS-$defaultIFS}"
21797 # Some sh's can't handle IFS=/ for some reason.
21799 -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
21801 +set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
21806 while [ $# -ne 0 ] ; do
21807 - pathcomp="${pathcomp}${1}"
21808 + pathcomp=$pathcomp$1
21811 - if [ ! -d "${pathcomp}" ] ;
21812 + if [ ! -d "$pathcomp" ] ;
21814 - $mkdirprog "${pathcomp}"
21815 + $mkdirprog "$pathcomp"
21821 - pathcomp="${pathcomp}/"
21822 + pathcomp=$pathcomp/
21826 if [ x"$dir_arg" != x ]
21828 - $doit $instcmd $dst &&
21829 + $doit $instcmd "$dst" &&
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
21841 # If we're going to rename the final executable, determine the name now.
21843 - if [ x"$transformarg" = x ]
21844 + if [ x"$transformarg" = x ]
21846 - dstfile=`basename $dst`
21847 + dstfile=`basename "$dst"`
21849 - dstfile=`basename $dst $transformbasename |
21850 + dstfile=`basename "$dst" $transformbasename |
21851 sed $transformarg`$transformbasename
21854 # don't allow the sed command to completely eliminate the filename
21856 - if [ x"$dstfile" = x ]
21857 + if [ x"$dstfile" = x ]
21859 - dstfile=`basename $dst`
21860 + dstfile=`basename "$dst"`
21866 -# Make a temp file name in the proper directory.
21867 +# Make a couple of temp file names in the proper directory.
21869 dsttmp=$dstdir/#inst.$$#
21870 + rmtmp=$dstdir/#rm.$$#
21872 -# Move or copy the file name to the temp name
21873 +# Trap to clean up temp files at exit.
21875 - $doit $instcmd $src $dsttmp &&
21876 + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
21877 + trap '(exit $?); exit' 1 2 13 15
21879 - trap "rm -f ${dsttmp}" 0 &&
21880 +# Move or copy the file name to the temp name
21882 + $doit $instcmd "$src" "$dsttmp" &&
21884 # and set any options; do chmod last to preserve setuid bits
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.
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 &&
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.
21905 + if [ -f "$dstdir/$dstfile" ]
21907 + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
21908 + $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
21910 + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
21918 # Now rename the file to the real destination.
21920 - $doit $rmcmd -f $dstdir/$dstfile &&
21921 - $doit $mvcmd $dsttmp $dstdir/$dstfile
21922 + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
21926 +# The final little trick to "correctly" pass the exit status to the exit trap.
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
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.
21944 +AC_DEFUN([gl_BACKUPFILE],
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
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)
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
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.
21967 -## ----------------------------------------- ##
21968 -## ANSIfy the C compiler whenever possible. ##
21969 -## From Franc,ois Pinard ##
21970 -## ----------------------------------------- ##
21974 -# @defmac AC_PROG_CC_STDC
21975 -# @maindex PROG_CC_STDC
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.
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.
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
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
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__"
22011 - CC="$ac_save_CC $ac_arg"
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)
22026 -static char *f (char * (*g) (char **, int), char **p, ...)
22031 - s = g (p, va_arg (v,int));
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);
22042 -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
22044 -[am_cv_prog_cc_stdc="$ac_arg"; break])
22048 -if test -z "$am_cv_prog_cc_stdc"; then
22049 - AC_MSG_RESULT([none needed])
22051 - AC_MSG_RESULT($am_cv_prog_cc_stdc)
22053 -case "x$am_cv_prog_cc_stdc" in
22055 - *) CC="$CC $am_cv_prog_cc_stdc" ;;
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
22065 dnl From Jim Meyering.
22067 dnl Check whether struct dirent has a member named d_ino.
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,
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.])
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
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.
22098 +AC_DEFUN([gl_DIRNAME],
22100 + dnl Prerequisites of lib/dirname.h.
22101 + AC_REQUIRE([jm_AC_DOS])
22103 + dnl Prerequisites of lib/dirname.c.
22104 + AC_REQUIRE([AC_HEADER_STDC])
22105 + AC_CHECK_HEADERS_ONCE(string.h)
22107 + dnl Prerequisites of lib/basename.c.
22108 + AC_REQUIRE([AC_HEADER_STDC])
22109 + AC_CHECK_HEADERS_ONCE(string.h)
22111 + dnl Prerequisites of lib/stripslash.c.
22112 + AC_REQUIRE([AC_HEADER_STDC])
22113 + AC_CHECK_HEADERS_ONCE(string.h)
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
22121 +# Define some macros required for proper operation of code in lib/*.c
22122 +# on MSDOS/Windows systems.
22124 +# From Jim Meyering.
22126 +AC_DEFUN([jm_AC_DOS],
22128 + AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
22130 + AC_TRY_COMPILE([],
22131 + [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
22132 +neither MSDOS nor Windows
22134 + [ac_cv_win_or_dos=yes],
22135 + [ac_cv_win_or_dos=no])
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
22142 + ac_fs_accepts_drive_letter_prefix=0
22143 + ac_fs_backslash_is_file_name_separator=0
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)
22151 +# define FILESYSTEM_PREFIX_LEN(Filename) 0
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.])
22160 + AH_VERBATIM(ISSLASH,
22161 + [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
22162 +# define ISSLASH(C) ((C) == '/' || (C) == '\\')
22164 +# define ISSLASH(C) ((C) == '/')
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.])
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
22178 +AC_DEFUN([gl_ERROR],
22180 + AC_FUNC_ERROR_AT_LINE
22181 + dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
22185 +# Prerequisites of lib/error.c.
22186 +AC_DEFUN([jm_PREREQ_ERROR],
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
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
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.
22206 +AC_DEFUN([gl_GETOPT],
22208 + dnl Prerequisites of lib/getopt.c.
22209 + AC_CHECK_HEADERS_ONCE(string.h)
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
22217 -dnl From Paul Eggert.
22219 -# Define HAVE_INTTYPES_H if <inttypes.h> exists,
22220 -# doesn't clash with <sys/types.h>, and declares uintmax_t.
22222 -AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
22224 - AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
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. ])
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
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
22248 -dnl Written by Paul Eggert <eggert@twinsun.com>.
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
22267 - CC="$CC $ac_cv_sys_largefile_CFLAGS"
22268 - AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
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,
22281 - *) $1=[$]$1' '$2 ;;
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,
22290 -changequote(, )dnl
22292 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
22293 - case "$ac_flag" in
22297 - $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
22300 -changequote([, ])dnl
22302 - if test "[$]$2" != no; then
22303 - AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
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)
22316 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
22317 - case "$ac_flag" in
22319 - -D_FILE_OFFSET_BITS=*) ;;
22320 - -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
22321 - -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
22323 - AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
22325 - AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
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 ;;
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 ;;
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 ;;
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
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.
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.
22374 -AC_DEFUN(jm_FUNC_MALLOC,
22375 +AC_DEFUN([jm_FUNC_MALLOC],
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. ])
22382 - AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
22388 - exit (malloc (0) ? 0 : 1);
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)
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
22408 +# Prerequisites of lib/malloc.c.
22409 +AC_DEFUN([gl_PREREQ_MALLOC], [
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
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.
22424 +dnl From Paul Eggert
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.
22429 +AC_DEFUN([jm_FUNC_MBRTOWC],
22431 + AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
22432 + jm_cv_func_mbrtowc,
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.])
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
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.
22455 +# From Paul Eggert.
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.
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.])
22476 + AC_DEFINE([mbstate_t], int,
22477 + [Define to a type if <wchar.h> does not define.])
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
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.
22491 +AC_DEFUN([gl_FUNC_MEMCHR],
22493 + AC_REPLACE_FUNCS(memchr)
22494 + if test $ac_cv_func_memchr = no; then
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)
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
22510 +dnl From Mumit Khan and Paul Eggert
22511 +dnl Determine whether mkdir accepts only one argument instead of the usual two.
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
22520 +#include <sys/types.h>
22521 +#include <sys/stat.h>
22523 + [mkdir (".", 0);],
22525 + [AC_TRY_COMPILE([
22526 +#include <sys/types.h>
22527 +#include <sys/stat.h>
22530 + patch_cv_mkdir_takes_one_arg=yes
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.])
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
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.
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'
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
22569 +dnl Autoconf version 2.57 or newer is recommended.
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], [
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)
22581 + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
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], [
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]))
22594 + AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
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], [
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]))
22606 + AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
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
22613 -## ------------------------------- ##
22614 -## Check for function prototypes. ##
22615 -## From Franc,ois Pinard ##
22616 -## ------------------------------- ##
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])
22629 - AC_MSG_RESULT(no)
22630 - U=_ ANSI2KNR=./ansi2knr
22631 - # Ensure some checks needed by ansi2knr itself.
22633 - AC_CHECK_HEADERS(string.h)
22636 -AC_SUBST(ANSI2KNR)dnl
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
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.
22650 +AC_DEFUN([gl_QUOTEARG],
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
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
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.
22670 +AC_DEFUN([gl_QUOTE],
22672 + dnl Prerequisites of lib/quote.c.
22673 + AC_CHECK_HEADERS_ONCE(stddef.h)
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
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.
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.
22693 -AC_DEFUN(jm_FUNC_REALLOC,
22694 +AC_DEFUN([jm_FUNC_REALLOC],
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. ])
22701 - AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
22703 - char *realloc ();
22707 - exit (realloc (0, 0) ? 0 : 1);
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)
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
22727 +# Prerequisites of lib/realloc.c.
22728 +AC_DEFUN([gl_PREREQ_REALLOC], [
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
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.
22743 +AC_DEFUN([gl_FUNC_RMDIR],
22745 + AC_REPLACE_FUNCS(rmdir)
22746 + if test $ac_cv_func_rmdir = no; then
22751 +# Prerequisites of lib/rmdir.c.
22752 +AC_DEFUN([gl_PREREQ_RMDIR], [
22753 + AC_REQUIRE([AC_HEADER_STAT])
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
22761 +# Check for setmode, DOS style.
22763 +# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
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.
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.
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.
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],
22787 + # include <fcntl.h>
22789 + #if HAVE_UNISTD_H
22790 + # include <unistd.h>
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.])
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
22803 +# Check for stdbool.h that conforms to C99.
22805 +# Copyright (C) 2002-2003 Free Software Foundation, Inc.
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.
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.
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.
22822 +# Prepare for substituting <stdbool.h> if it is not supported.
22824 +AC_DEFUN([AM_STDBOOL_H],
22826 + AC_REQUIRE([AC_HEADER_STDBOOL])
22828 + # Define two additional variables used in the Makefile substitution.
22830 + if test "$ac_cv_header_stdbool_h" = yes; then
22833 + STDBOOL_H='stdbool.h'
22835 + AC_SUBST([STDBOOL_H])
22837 + if test "$ac_cv_type__Bool" = yes; then
22842 + AC_SUBST([HAVE__BOOL])
22845 +# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
22846 +# have this macro built-in.
22848 +AC_DEFUN([AC_HEADER_STDBOOL],
22849 + [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
22850 + [ac_cv_header_stdbool_h],
22853 + #include <stdbool.h>
22855 + "error: bool is not defined"
22858 + "error: false is not defined"
22861 + "error: false is not 0"
22864 + "error: false is not defined"
22867 + "error: true is not 1"
22869 + #ifndef __bool_true_false_are_defined
22870 + "error: __bool_true_false_are_defined is not defined"
22873 + struct s { _Bool s: 1; _Bool t; } s;
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];
22880 + char f[(_Bool) -0.0 == false ? 1 : -1];
22882 + char h[sizeof (_Bool)];
22883 + char i[sizeof s.t];
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.])
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
22896 +#serial 7 -*- autoconf -*-
22898 +dnl From Jim Meyering.
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).
22906 +AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
22908 + dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
22910 + AC_REQUIRE([AC_GNU_SOURCE])
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])
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
22925 dnl From Jim Meyering
22928 dnl usually in <utime.h>.
22929 dnl Some systems have utime.h but don't declare the struct anywhere.
22931 -AC_DEFUN(jm_STRUCT_UTIMBUF,
22932 +AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
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,
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. ])
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
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.
22963 +AC_DEFUN([gl_XALLOC],
22965 + gl_PREREQ_XMALLOC
22966 + gl_PREREQ_XSTRDUP
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])
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)
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
22985 # Makefile for GNU patch.
22986 -# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
22988 +# Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
22989 +# Foundation, Inc.
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
22994 LDFLAGS = @LDFLAGS@
22995 LIBOBJS = @LIBOBJS@
22997 -PACKAGE = @PACKAGE@
22999 -VERSION = @VERSION@
23001 +PACKAGE_NAME = @PACKAGE_NAME@
23002 +PACKAGE_VERSION = @PACKAGE_VERSION@
23005 exec_prefix = @exec_prefix@
23006 @@ -59,20 +61,33 @@
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 \
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
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
23054 COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -Ded_PROGRAM=\"$(ed_PROGRAM)\" \
23055 -I. -I$(srcdir) $(CFLAGS)
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
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
23103 $(srcdir)/aclocal.m4: $(ACINCLUDE_INPUTS)
23104 cat $(ACINCLUDE_INPUTS) >$(srcdir)/aclocal.m4
23106 -patchlevel.h: configure.in
23107 - echo '#define PATCH_VERSION "$(VERSION)"' >patchlevel.h
23109 -TAGS: $(HDRS) patchlevel.h $(SRCS)
23110 - etags $(HDRS) patchlevel.h $(SRCS)
23111 +TAGS: $(HDRS) $(SRCS)
23112 + etags $(HDRS) $(SRCS)
23115 - rm -f ansi2knr core* *core *.o *_.c
23116 + rm -f core* *core *.$(OBJEXT) *_.c stdbool.h
23118 clean:: mostlyclean
23119 rm -f patch$(EXEEXT)
23120 @@ -148,7 +182,7 @@
23124 -PV = $(PACKAGE)-$(VERSION)
23125 +PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
23127 dist:: $(DISTFILES) $(DISTFILES_M4) $(DISTFILES_PC) $(DISTFILES_PC_DJGPP)
23129 @@ -160,31 +194,28 @@
23130 tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
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
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
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. */
23196 -#if defined (_LIBC)
23198 # include <string.h>
23199 +# include <memcopy.h>
23201 +# define reg_char char
23204 -#if defined (HAVE_LIMITS_H) || defined (_LIBC)
23205 +#if HAVE_STDLIB_H || defined _LIBC
23206 +# include <stdlib.h>
23209 +#if HAVE_LIMITS_H || defined _LIBC
23210 # include <limits.h>
23213 @@ -49,21 +56,28 @@
23216 #include <sys/types.h>
23217 +#if HAVE_BP_SYM_H || defined _LIBC
23218 +# include <bp-sym.h>
23220 +# define BP_SYM(sym) sym
23226 /* Search no more than N bytes of S for C. */
23230 +__memchr (s, c_in, n)
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;
23241 - c = (unsigned char) c;
23242 + c = (unsigned char) c_in;
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 @@
23251 +weak_alias (__memchr, BP_SYM (memchr))
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
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.
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. */
23270 -# include <config.h>
23272 +/* written by Jim Meyering */
23274 +#include <config.h>
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
23281 #include <sys/types.h>
23282 #include <sys/stat.h>
23283 -#include <errno.h>
23286 +#include <stdio.h>
23288 +# include <stdlib.h>
23291 -#if STAT_MACROS_BROKEN
23294 +# include <string.h>
23296 +# include <strings.h>
23299 -#if !defined(S_ISDIR) && defined(S_IFDIR)
23300 -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
23302 +#include "dirname.h"
23303 +#include "xalloc.h"
23306 -# define S_IRWXU 0700
23309 -# define S_IRWXG 0070
23310 +#ifndef HAVE_DECL_FREE
23311 +"this configure-time declaration test was not run"
23314 -# define S_IRWXO 0007
23315 +#if !HAVE_DECL_FREE
23319 -/* mkdir adapted from GNU tar. */
23321 -/* Make directory DPATH, with permission mode DMODE.
23323 - Written by Robert Rother, Mariah Corporation, August 1985
23324 - (sdcsvax!rmr or rmr@uscd). If you want it, it's yours.
23326 - Severely hacked over by John Gilmore to make a 4.2BSD compatible
23327 - subroutine. 11Mar86; hoptoad!gnu
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. */
23334 -mkdir (const char *dpath, mode_t dmode)
23335 +rpl_mkdir (char const *dir, mode_t mode)
23340 - struct stat statbuf;
23343 + size_t len = strlen (dir);
23345 - if (stat (dpath, &statbuf) == 0)
23346 + if (len && dir[len - 1] == '/')
23348 - errno = EEXIST; /* stat worked, so it already exists. */
23350 + tmp_dir = xstrdup (dir);
23351 + strip_trailing_slashes (tmp_dir);
23354 - /* If stat fails for a reason other than non-existence, return error. */
23355 - if (errno != ENOENT)
23362 - case -1: /* Cannot fork. */
23363 - return -1; /* errno is already set. */
23364 + tmp_dir = (char *) dir;
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);
23377 + ret_val = mkdir (tmp_dir, mode);
23379 - default: /* Parent process. */
23380 - /* Wait for kid to finish. */
23381 - while (wait (&status) != cpid)
23382 - /* Do nothing. */ ;
23383 + if (tmp_dir != dir)
23388 - /* /bin/mkdir failed. */
23392 - return chmod (dpath, dmode);
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
23400 # Created: 1993-05-16
23403 -# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $
23409 +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
23411 +# process command line arguments
23412 +while test $# -gt 0 ; do
23414 + -h | --help | --h* ) # -h for help
23415 + echo "${usage}" 1>&2; exit 0 ;;
23416 + -m ) # -m PERM arg
23418 + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
23421 + -- ) shift; break ;; # stop option processing
23422 + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
23423 + * ) break ;; # first non-opt arg
23429 + if test -d "$file"; then
23442 + if mkdir -p -- . 2>/dev/null; then
23443 + echo "mkdir -p -- $*"
23444 + exec mkdir -p -- "$@"
23447 + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
23448 + echo "mkdir -m $dirmode -p -- $*"
23449 + exec mkdir -m "$dirmode" -p -- "$@"
23455 @@ -22,13 +66,24 @@
23458 if test ! -d "$pathcomp"; then
23459 - echo "mkdir $pathcomp"
23460 + echo "mkdir $pathcomp"
23462 - mkdir "$pathcomp" || lasterr=$?
23463 + mkdir "$pathcomp" || lasterr=$?
23465 - if test ! -d "$pathcomp"; then
23466 - errstatus=$lasterr
23468 + if test ! -d "$pathcomp"; then
23469 + errstatus=$lasterr
23471 + if test ! -z "$dirmode"; then
23472 + echo "chmod $dirmode $pathcomp"
23475 + chmod "$dirmode" "$pathcomp" || lasterr=$?
23477 + if test ! -z "$lasterr"; then
23478 + errstatus=$lasterr
23484 pathcomp="$pathcomp/"
23489 +# Local Variables:
23490 +# mode: shell-script
23491 +# sh-indentation: 3
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
23499 +Changes in versions 2.5.8 and 2.5.9: bug fixes only.
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'.
23504 -Changes since version 2.5:
23505 +Changes in version 2.5.7:
23507 +* patch -D now outputs preprocessor lines without comments, as required
23508 + by POSIX 1003.1-2001.
23510 +Changes in version 2.5.6:
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.
23518 +Changes in version 2.5.5:
23520 +* The bug reporting address is now <bug-patch@gnu.org>.
23522 +Changes in version 2.5.4:
23524 * A security hole has been closed.
23525 It involved race conditions with temporary files.
23527 * `patch' now ignores trailing carriage returns in lines of context diffs
23528 if the context diff headers end in carriage return.
23530 +* `patch' now ignores context diff header file names that have fewer slashes
23531 + than the count specified by the -p or --strip option.
23535 --quoting-style=WORD
23536 @@ -196,3 +213,25 @@
23538 * Print the system error message when system calls fail.
23539 * Fixed various bugs and portability problems.
23543 +Copyright (C) 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003
23544 +Free Software Foundation, Inc.
23546 +This file is part of GNU Patch.
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.
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.
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
23566 /* Parse a string, yielding a struct partime that describes it. */
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.
23572 This file is part of RCS.
23574 #include <partime.h>
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 $";
23581 /* Lookup tables for names of months, weekdays, time zones. */
23582 @@ -791,7 +791,7 @@
23586 - while (!ISALNUM ((unsigned char) *s))
23587 + while (! ISALNUM ((unsigned char) *s) && *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
23595 /* patch - a program to apply diffs to original files */
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 $ */
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
23604 + Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2002,
23605 + 2003 Free Software Foundation, Inc.
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 @@
23613 - int after_newline;
23615 + bool after_newline;
23616 + bool zero_output;
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));
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;
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;
23670 /* how many input lines have been irretractably output */
23671 static LINENUM last_frozen_line;
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";
23682 static char * const *Argv;
23683 @@ -107,20 +109,18 @@
23685 static char serrbuf[BUFSIZ];
23687 -char const program_name[] = "patch";
23689 /* Apply a set of diffs as appropriate. */
23691 -int main PARAMS ((int, char **));
23694 main (int argc, char **argv)
23697 - bool somefailed = FALSE;
23698 + bool somefailed = false;
23699 struct outstate outstate;
23700 char numbuf[LINENUM_LENGTH_BOUND + 1];
23702 + xalloc_exit_failure = 2;
23703 + program_name = argv[0];
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);
23715 val = getenv ("SIMPLE_BACKUP_SUFFIX");
23717 - simple_backup_suffix = val;
23718 + simple_backup_suffix = val && *val ? val : ".orig";
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);
23725 /* Make sure we clean up in case of disaster. */
23727 + set_signals (false);
23730 open_patch_file (patchname);
23731 @@ -180,28 +179,26 @@
23732 ) { /* for each patch in patch file */
23735 - int mismatch = 0;
23736 + bool mismatch = false;
23737 char *outname = outfile ? outfile : inname;
23739 if (!skip_rest_of_patch)
23740 get_input_file (inname, outname);
23742 if (diff_type == ED_DIFF) {
23743 - outstate.zero_output = 0;
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)
23750 - do_ed_script (outstate.ofp);
23753 - struct stat statbuf;
23754 - if (stat (TMPOUTNAME, &statbuf) != 0)
23755 - pfatal ("%s", TMPOUTNAME);
23756 - outstate.zero_output = statbuf.st_size == 0;
23758 + struct stat statbuf;
23759 + if (stat (TMPOUTNAME, &statbuf) != 0)
23760 + pfatal ("%s", TMPOUTNAME);
23761 + outstate.zero_output = statbuf.st_size == 0;
23765 - int apply_anyway = 0;
23766 + bool apply_anyway = false;
23768 /* initialize the patched file */
23769 if (! skip_rest_of_patch && ! outfile)
23770 @@ -236,7 +233,7 @@
23772 where = locate_hunk(fuzz);
23773 if (! where || fuzz || last_offset)
23776 if (hunk == 1 && ! where && ! (force | apply_anyway)
23777 && reverse == reverse_flag_specified) {
23778 /* dwim for reversed patch? */
23779 @@ -253,7 +250,7 @@
23782 : "Reversed (or previously applied)"))))
23784 + reverse = ! reverse;
23787 /* Put it back to normal. */
23788 @@ -261,7 +258,7 @@
23789 fatal ("lost hunk on alloc error!");
23792 - apply_anyway = 1;
23793 + apply_anyway = true;
23794 fuzz--; /* Undo `++fuzz' below. */
23797 @@ -344,7 +341,7 @@
23798 if (! spew_output (&outstate))
23800 say ("Skipping patch.\n");
23801 - skip_rest_of_patch = TRUE;
23802 + skip_rest_of_patch = true;
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)))
23814 if (verbosity == VERBOSE)
23815 @@ -371,9 +368,9 @@
23818 if (! outstate.zero_output
23819 - && pch_says_nonexistent (reverse ^ 1))
23820 + && pch_says_nonexistent (! reverse))
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))));
23830 if ((set_time | set_utc)
23831 - && (t = pch_timestamp (reverse ^ 1)) != (time_t) -1)
23832 + && (t = pch_timestamp (! reverse)) != (time_t) -1)
23834 struct utimbuf utimbuf;
23835 utimbuf.actime = utimbuf.modtime = t;
23836 @@ -418,7 +415,7 @@
23837 if (fclose (rejfp) != 0)
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");
23845 @@ -432,7 +429,7 @@
23848 move_file (TMPREJNAME, &TMPREJNAME_needs_removal,
23849 - rej, instat.st_mode, FALSE);
23850 + rej, instat.st_mode, false);
23852 && (chmod (rej, (instat.st_mode
23853 & ~(S_IXUSR|S_IXGRP|S_IXOTH)))
23854 @@ -446,7 +443,7 @@
23859 + set_signals (true);
23861 if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
23863 @@ -482,7 +479,7 @@
23866 reverse = reverse_flag_specified;
23867 - skip_rest_of_patch = FALSE;
23868 + skip_rest_of_patch = false;
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.",
23875 " -d DIR --directory=DIR Change the working directory to DIR first.",
23877 +#if HAVE_SETMODE_DOS
23878 " --binary Read and write data in binary mode.",
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.",
23885 -"Report bugs to <bug-gnu-utils@gnu.org>.",
23886 +"Report bugs to <" PACKAGE_BUGREPORT ">.",
23890 @@ -635,7 +632,7 @@
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;
23903 - remove_empty_files = TRUE;
23904 + remove_empty_files = true;
23911 - maxfuzz = numeric_string (optarg, 0, "fuzz factor");
23912 + maxfuzz = numeric_string (optarg, false, "fuzz factor");
23915 - patch_get = numeric_string (optarg, 1, "get option value");
23916 + patch_get = numeric_string (optarg, true, "get option value");
23919 patchname = savestr (optarg);
23922 - canonicalize = TRUE;
23923 + canonicalize = true;
23926 diff_type = NORMAL_DIFF;
23929 - noreverse = TRUE;
23930 + noreverse = true;
23933 if (strcmp (optarg, "-") == 0)
23934 @@ -700,23 +697,23 @@
23935 outfile = savestr (optarg);
23938 - strippath = numeric_string (optarg, 0, "strip count");
23939 + strippath = numeric_string (optarg, false, "strip count");
23942 rejname = savestr (optarg);
23946 - reverse_flag_specified = 1;
23948 + reverse_flag_specified = true;
23951 verbosity = SILENT;
23962 diff_type = UNI_DIFF;
23963 @@ -731,7 +728,7 @@
23967 - debug = numeric_string (optarg, 1, "debugging option");
23968 + debug = numeric_string (optarg, true, "debugging option");
23972 @@ -746,29 +743,29 @@
23973 simple_backup_suffix = savestr (optarg);
23984 verbosity = VERBOSE;
23988 +#if HAVE_SETMODE_DOS
23989 binary_transput = O_BINARY;
23995 - backup_if_mismatch = 1;
23996 + backup_if_mismatch = true;
23999 - backup_if_mismatch = 0;
24000 + backup_if_mismatch = false;
24003 - posixly_correct = 1;
24004 + posixly_correct = true;
24008 @@ -810,7 +807,7 @@
24009 returning the result. */
24011 numeric_string (char const *string,
24012 - int negative_allowed,
24013 + bool negative_allowed,
24014 char const *argtype_msgid)
24017 @@ -884,7 +881,7 @@
24018 && offset <= max_pos_offset
24019 && patch_match (first_guess, offset, (LINENUM) 0, suffix_fuzz))
24021 - last_offset = offset;
24022 + last_offset += offset;
24023 return first_guess + offset;
24026 @@ -898,7 +895,7 @@
24027 if (offset <= max_neg_offset
24028 && patch_match (first_guess, -offset, prefix_fuzz, (LINENUM) 0))
24030 - last_offset = - offset;
24031 + last_offset -= offset;
24032 return first_guess - offset;
24035 @@ -913,8 +910,8 @@
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;
24045 if (0 < offset && offset <= max_neg_offset
24046 @@ -922,8 +919,8 @@
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;
24057 @@ -1009,10 +1006,10 @@
24058 if (pch_char(old) == '-') {
24059 assert (outstate->after_newline);
24060 if (! copy_till (outstate, where + old - 1))
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,
24068 def_state = IN_IFNDEF;
24070 @@ -1023,7 +1020,7 @@
24073 outstate->after_newline = pch_write_line (old, fp);
24074 - outstate->zero_output = 0;
24075 + outstate->zero_output = false;
24077 last_frozen_line++;
24079 @@ -1033,7 +1030,7 @@
24081 else if (pch_char(new) == '+') {
24082 if (! copy_till (outstate, where + old - 1))
24085 if (R_do_defines) {
24086 if (def_state == IN_IFNDEF) {
24087 fprintf (fp, outstate->after_newline + else_defined);
24088 @@ -1048,7 +1045,7 @@
24091 outstate->after_newline = pch_write_line (new, fp);
24092 - outstate->zero_output = 0;
24093 + outstate->zero_output = false;
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))
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);
24109 def_state = IN_IFNDEF;
24110 @@ -1096,25 +1093,24 @@
24113 while (pch_char (new) == '!');
24114 - outstate->zero_output = 0;
24115 + outstate->zero_output = false;
24118 assert(pch_char(new) == ' ');
24121 if (R_do_defines && def_state != OUTSIDE) {
24122 - fprintf (fp, outstate->after_newline + end_defined,
24124 + fprintf (fp, outstate->after_newline + end_defined);
24127 - outstate->after_newline = 1;
24128 + outstate->after_newline = true;
24129 def_state = OUTSIDE;
24133 if (new <= pat_end && pch_char(new) == '+') {
24134 if (! copy_till (outstate, where + old - 1))
24137 if (R_do_defines) {
24138 if (def_state == OUTSIDE) {
24139 fprintf (fp, outstate->after_newline + if_defined,
24140 @@ -1127,7 +1123,7 @@
24144 - outstate->zero_output = 0;
24145 + outstate->zero_output = false;
24149 @@ -1135,18 +1131,18 @@
24150 if (! outstate->after_newline && putc ('\n', fp) == EOF)
24152 outstate->after_newline = pch_write_line (new, fp);
24153 - outstate->zero_output = 0;
24154 + outstate->zero_output = false;
24157 while (new <= pat_end && pch_char (new) == '+');
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);
24164 - outstate->after_newline = 1;
24165 + outstate->after_newline = true;
24171 /* Create an output file. */
24172 @@ -1168,8 +1164,8 @@
24173 init_output (char const *name, int open_flags, struct outstate *outstate)
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;
24182 /* Open a file to put hunks we can't locate. */
24183 @@ -1195,22 +1191,22 @@
24184 if (R_last_frozen_line > lastline)
24186 say ("misordered hunks! output would be garbled\n");
24190 while (R_last_frozen_line < lastline)
24192 - s = ifetch (++R_last_frozen_line, 0, &size);
24193 + s = ifetch (++R_last_frozen_line, false, &size);
24196 if ((! outstate->after_newline && putc ('\n', fp) == EOF)
24197 || ! fwrite (s, sizeof *s, size, fp))
24199 outstate->after_newline = s[size - 1] == '\n';
24200 - outstate->zero_output = 0;
24201 + outstate->zero_output = false;
24204 last_frozen_line = R_last_frozen_line;
24209 /* Finish copying the input file to the output file. */
24210 @@ -1229,7 +1225,7 @@
24212 if (last_frozen_line < input_lines)
24213 if (! copy_till (outstate, input_lines))
24217 if (outstate->ofp && ! outfile)
24219 @@ -1238,7 +1234,7 @@
24227 /* Does the patch pattern match at line base+offset? */
24228 @@ -1259,13 +1255,13 @@
24229 if (!similar(p, size,
24231 pch_line_len(pline) ))
24235 else if (size != pch_line_len (pline)
24236 || memcmp (p, pfetch (pline), size) != 0)
24244 /* Do two lines match with canonicalized white space? */
24245 @@ -1287,7 +1283,7 @@
24248 if (!(*a == ' ' || *a == '\t'))
24252 while (alen && (*a == ' ' || *a == '\t'));
24254 @@ -1295,7 +1291,7 @@
24255 return alen == blen;
24257 else if (!alen || *a++ != *b++)
24263 @@ -1303,8 +1299,8 @@
24265 /* Make a temporary file. */
24268 -char *mktemp PARAMS ((char *));
24269 +#if HAVE_MKTEMP && ! HAVE_DECL_MKTEMP && ! defined mktemp
24270 +char *mktemp (char *);
24274 @@ -1312,7 +1308,7 @@
24277 static char const *
24278 -make_temp (int letter)
24279 +make_temp (char letter)
24283 @@ -1322,7 +1318,14 @@
24284 if (!tmpdir) tmpdir = TMPDIR;
24285 r = xmalloc (strlen (tmpdir) + 10);
24286 sprintf (r, "%s/p%cXXXXXX", tmpdir, letter);
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. */
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
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
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 $
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
24322 +are ignored, as they are considered to be comments.
24324 With context diffs, and to a lesser extent with normal diffs,
24326 @@ -185,19 +189,19 @@
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
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,
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.
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,
24349 is not conforming to \s-1POSIX\s0,
24350 @@ -362,14 +366,14 @@
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.
24360 gets (or checks out) the file from the revision control system; if zero,
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,
24366 asks the user whether to get the file.
24367 @@ -411,6 +415,9 @@
24370 instead of patching files in place.
24371 +Do not use this option if
24373 +is one of the files to be patched.
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.
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,
24386 Require that all options precede the files in the command line.
24387 @@ -715,7 +723,8 @@
24389 This specifies whether
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,
24394 by default; see the
24397 @@ -1097,7 +1106,7 @@
24400 Please report bugs via email to
24401 -.BR <bug-gnu-utils@gnu.org> .
24402 +.BR <bug-patch@gnu.org> .
24405 could be smarter about partial matches, excessively deviant offsets and
24406 @@ -1115,13 +1124,15 @@
24407 This could be construed as a feature.
24413 1984, 1985, 1986, 1988 Larry Wall.
24417 -1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
24418 -Free Software Foundation, Inc.
24421 +1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
24422 +2000, 2001, 2002 Free Software Foundation, Inc.
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
24430 /* reading patches */
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 $ */
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
24439 + Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
24440 + 2002, 2003 Free Software Foundation, Inc.
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
24445 #define XTERN extern
24446 #include <common.h>
24447 #include <backupfile.h>
24448 -#include <basename.h>
24449 +#include <dirname.h>
24451 #include <quotearg.h>
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 @@
24465 enum nametype { OLD, NEW, INDEX, NONE };
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 *);
24491 /* Prepare to look for the next patch in the patch file. */
24497 - p_strip_trailing_cr = 0;
24498 + p_strip_trailing_cr = false;
24501 /* Open the patch file at the beginning of time. */
24502 @@ -105,7 +109,7 @@
24503 if (!filename || !*filename || strEQ (filename, "-"))
24505 file_offset stdin_pos;
24507 +#if HAVE_SETMODE_DOS
24508 if (binary_transput)
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))))
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 (),
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)
24535 if (verbosity == VERBOSE)
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.");
24544 if (skip_rest_of_patch)
24546 Fseek (pfp, p_start, SEEK_SET);
24547 p_input_line = p_sline - 1;
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");
24567 skip_to(p_start,p_sline);
24569 - if (force || batch) {
24570 + if (force | batch) {
24571 say ("No file to patch. Skipping patch.\n");
24572 - skip_rest_of_patch = TRUE;
24574 + skip_rest_of_patch = true;
24577 ask ("File to patch: ");
24578 inname = fetchname (buf, 0, (time_t *) 0);
24579 @@ -264,6 +269,7 @@
24587 @@ -273,12 +279,12 @@
24589 if (verbosity != SILENT)
24590 say ("Skipping patch.\n");
24591 - skip_rest_of_patch = TRUE;
24593 + skip_rest_of_patch = true;
24602 /* Determine what kind of diff is in the remaining part of the patch file. */
24603 @@ -288,9 +294,10 @@
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;
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;
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)
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 @@
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++)
24653 - for (t = revision; *t && !ISSPACE ((unsigned char) *t); t++)
24655 + for (t = revision; *t; t++)
24656 + if (ISSPACE ((unsigned char) *t))
24659 + for (u = t + 1; ISSPACE ((unsigned char) *u); u++)
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));
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;
24681 @@ -419,12 +440,12 @@
24682 if (s[0] == '+' && s[1] == '0' && !ISDIGIT (s[2]))
24683 p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
24685 - p_strip_trailing_cr = strip_trailing_cr;
24686 p_start = this_line;
24687 p_sline = p_input_line;
24689 if (! ((name[OLD] || ! p_timestamp[OLD])
24690 - && (name[NEW] || ! p_timestamp[NEW])))
24691 + && (name[NEW] || ! p_timestamp[NEW]))
24692 + && ! name[INDEX])
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);
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);
24707 if (! ((name[OLD] || ! p_timestamp[OLD])
24708 - && (name[NEW] || ! p_timestamp[NEW])))
24709 + && (name[NEW] || ! p_timestamp[NEW]))
24710 + && ! name[INDEX])
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 @@
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):
24722 - Take the old and new names from the context header if present,
24723 @@ -542,7 +564,7 @@
24725 if (! posixly_correct)
24730 i = best_name (name, stat_errno);
24732 @@ -556,7 +578,8 @@
24736 - int readonly = outfile && strcmp (outfile, name[i]) != 0;
24737 + bool readonly = (outfile
24738 + && strcmp (outfile, name[i]) != 0);
24740 if (nope == NONE || strcmp (name[nope], name[i]) != 0)
24742 @@ -566,7 +589,7 @@
24743 version_controlled[i] = !! cs;
24746 - if (version_get (name[i], cs, 0, readonly,
24747 + if (version_get (name[i], cs, false, readonly,
24751 @@ -589,7 +612,8 @@
24752 if ((! is_empty) < p_says_nonexistent[reverse ^ is_empty])
24754 assert (i0 != NONE);
24755 - if (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")))
24767 + : "already exists"));
24770 if (i == NONE && p_says_nonexistent[reverse])
24771 @@ -611,8 +634,8 @@
24772 for (i = OLD; i <= INDEX; i++)
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];
24782 @@ -645,9 +668,9 @@
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. */
24789 -prefix_components (char *filename, int checkdirs)
24790 +prefix_components (char *filename, bool checkdirs)
24793 struct stat stat_buf;
24794 @@ -691,7 +714,7 @@
24795 if (name[i] && !ignore[i])
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])
24802 components_min = components[i];
24803 @@ -779,7 +802,7 @@
24807 - int overflow = 0;
24808 + bool overflow = false;
24809 char numbuf[LINENUM_LENGTH_BOUND + 1];
24811 for (s = s0; ISDIGIT (*s); s++)
24812 @@ -788,11 +811,11 @@
24813 overflow |= new_n / 10 != n;
24819 fatal ("missing line number at line %s: %s",
24820 format_linenum (numbuf, p_input_line), buf);
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. */
24830 -another_hunk (enum diff difftype, int rev)
24831 +another_hunk (enum diff difftype, bool rev)
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. */
24860 /* Pacify `gcc -Wall'. */
24861 fillsrc = filldst = repl_patch_line = repl_context = 0;
24862 @@ -864,7 +888,7 @@
24865 if (repl_beginning && repl_could_be_missing) {
24866 - repl_missing = TRUE;
24867 + repl_missing = true;
24870 if (p_max - p_end < 4) {
24871 @@ -887,7 +911,7 @@
24873 if (strnEQ(buf, "********", 8)) {
24874 if (repl_beginning && repl_could_be_missing) {
24875 - repl_missing = TRUE;
24876 + repl_missing = true;
24880 @@ -896,7 +920,7 @@
24883 if (repl_beginning && repl_could_be_missing) {
24884 - repl_missing = TRUE;
24885 + repl_missing = true;
24888 fatal ("unexpected `***' at line %s: %s",
24889 @@ -945,6 +969,7 @@
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));
24901 - repl_missing = TRUE;
24902 + repl_missing = true;
24906 @@ -1009,11 +1034,11 @@
24907 && (p_prefix_context != 0
24909 || p_repl_lines != 1))
24910 - repl_could_be_missing = FALSE;
24911 + repl_could_be_missing = false;
24914 case '+': case '!':
24915 - repl_could_be_missing = FALSE;
24916 + repl_could_be_missing = false;
24920 @@ -1025,7 +1050,7 @@
24923 } else if (repl_beginning && repl_could_be_missing) {
24924 - repl_missing = TRUE;
24925 + repl_missing = true;
24928 if (! repl_beginning)
24929 @@ -1057,7 +1082,7 @@
24931 if (repl_beginning && repl_could_be_missing &&
24932 (!ptrn_spaces_eaten || difftype == NEW_CONTEXT_DIFF) ) {
24933 - repl_missing = TRUE;
24934 + repl_missing = true;
24938 @@ -1071,9 +1096,11 @@
24940 if (p_end != p_ptrn_lines + 1) {
24941 ptrn_spaces_eaten |= (repl_beginning != 0);
24942 - some_context = TRUE;
24943 + some_context = true;
24945 - if (!repl_beginning)
24946 + if (repl_beginning)
24950 p_Char[p_end] = ' ';
24952 @@ -1089,12 +1116,14 @@
24955 } else if (repl_beginning && repl_could_be_missing) {
24956 - repl_missing = TRUE;
24957 + repl_missing = true;
24960 - some_context = TRUE;
24961 + some_context = true;
24963 - if (!repl_beginning)
24964 + if (repl_beginning)
24970 @@ -1108,7 +1137,7 @@
24973 if (repl_beginning && repl_could_be_missing) {
24974 - repl_missing = TRUE;
24975 + repl_missing = true;
24979 @@ -1136,6 +1165,9 @@
24980 fillcnt = p_repl_lines;
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 @@
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);
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. */
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)
25015 register FILE *fp = pfp;
25017 - register int i = 0;
25042 + if (c == ' ' || c == 'X')
25044 + else if (c == '\t')
25045 + i = (i + 8) & ~7;
25051 - if (c == ' ' || c == 'X')
25053 - else if (c == '\t')
25054 - i = (i + 8) & ~7;
25064 - while (c == '-' && 0 <= --rfc934_nesting)
25068 - goto patch_ends_in_middle_of_line;
25070 + while (c == '-' && 0 <= --rfc934_nesting)
25077 + goto patch_ends_in_middle_of_line;
25086 + goto patch_ends_in_middle_of_line;
25090 - goto patch_ends_in_middle_of_line;
25102 - b = realloc (b, s);
25106 - if (!using_plan_a)
25108 - return (size_t) -1;
25110 + b = realloc (b, s);
25113 + if (!using_plan_a)
25115 + return (size_t) -1;
25127 + goto patch_ends_in_middle_of_line;
25134 - goto patch_ends_in_middle_of_line;
25138 + while (*b == '#' && !pass_comments_through);
25140 if (strip_trailing_cr && 2 <= i && b[i - 2] == '\r')
25146 patch_ends_in_middle_of_line:
25147 @@ -1607,13 +1649,13 @@
25149 while ((c = getc (fp)) != '\n' && c != EOF)
25156 /* We don't trust ungetc. */
25157 Fseek (pfp, line_beginning, SEEK_SET);
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;
25172 @@ -1653,14 +1695,14 @@
25176 - return FALSE; /* not enough memory to swap hunk! */
25177 + return false; /* not enough memory to swap hunk! */
25180 /* now turn the new into the old */
25182 i = p_ptrn_lines + 1;
25183 if (tp_char[i] == '\n') { /* account for possible blank line */
25184 - blankline = TRUE;
25185 + blankline = true;
25188 if (p_efake >= 0) { /* fix non-freeable ptr range */
25189 @@ -1715,23 +1757,23 @@
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. */
25202 -pch_says_nonexistent (int which)
25204 +pch_says_nonexistent (bool which)
25206 return p_says_nonexistent[which];
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. */
25214 -pch_timestamp (int which)
25215 +pch_timestamp (bool which)
25217 return p_timestamp[which];
25219 @@ -1835,6 +1877,60 @@
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. */
25229 +get_ed_command_letter (char const *line)
25231 + char const *p = line;
25233 + bool pair = false;
25234 + if (! ISDIGIT (*p))
25236 + while (ISDIGIT (*++p))
25240 + if (! ISDIGIT (*++p))
25242 + while (ISDIGIT (*++p))
25261 + if (strncmp (p, "/.//", 4) != 0)
25270 + while (*p == ' ' || *p == '\t')
25277 /* Apply an ed script by feeding ed itself. */
25280 @@ -1842,13 +1938,11 @@
25282 static char const ed_program[] = ed_PROGRAM;
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;
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));
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);
25306 - for (t = buf; ISDIGIT (*t) || *t == ','; t++)
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) {
25314 if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
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) {
25321 if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
25322 @@ -1883,6 +1976,7 @@
25323 if (chars_read == 2 && strEQ (buf, ".\n"))
25326 + p_pass_comments_through = false;
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
25334 /* reading patches */
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 $ */
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
25362 + Copyright (C) 1990, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2001,
25363 + 2002, 2003 Free Software Foundation, Inc.
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.
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.
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. */
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
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.
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 @@
25413 /* Written by Paul Eggert <eggert@twinsun.com> */
25415 -/* FIXME: Multibyte characters are not supported yet. */
25418 # include <config.h>
25421 -#include <sys/types.h>
25422 -#include <quotearg.h>
25423 -#include <xalloc.h>
25424 +#include "quotearg.h"
25426 +#include "xalloc.h"
25429 -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
25430 -# define ISASCII(c) 1
25432 -# define ISASCII(c) isascii (c)
25435 -# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
25437 -# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
25439 +#include <errno.h>
25440 +#include <limits.h>
25441 +#include <stdlib.h>
25442 +#include <string.h>
25445 -# include <libintl.h>
25446 -# define _(text) gettext (text)
25448 -# define _(text) text
25450 +#include "gettext.h"
25451 +#define _(msgid) gettext (msgid)
25452 +#define N_(msgid) msgid
25455 -# include <limits.h>
25458 +/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */
25459 +# include <stdio.h>
25460 +# include <time.h>
25462 +# include <wchar.h>
25465 -# define CHAR_BIT 8
25468 +/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
25469 + other macros are defined only for documentation and to satisfy C
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
25478 -# define UCHAR_MAX ((unsigned char) -1)
25480 +#if !defined mbsinit && !HAVE_MBSINIT
25481 +# define mbsinit(ps) 1
25485 -# include <stdlib.h>
25487 +# if HAVE_WCTYPE_H
25488 +# include <wctype.h>
25490 +# if !defined iswprint && !HAVE_ISWPRINT
25491 +# define iswprint(wc) 1
25496 -# include <string.h>
25498 +# define SIZE_MAX ((size_t) -1)
25501 #define INT_BITS (sizeof (int) * CHAR_BIT)
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];
25511 /* Names of quoting styles. */
25521 shell_always_quoting_style,
25523 escape_quoting_style,
25524 - locale_quoting_style
25525 + locale_quoting_style,
25526 + clocale_quoting_style
25529 /* The default quoting options. */
25530 @@ -109,9 +118,10 @@
25531 struct quoting_options *
25532 clone_quoting_options (struct quoting_options *o)
25534 - struct quoting_options *p
25535 - = (struct quoting_options *) xmalloc (sizeof (struct quoting_options));
25537 + struct quoting_options *p = xmalloc (sizeof *p);
25538 *p = *(o ? o : &default_quoting_options);
25543 @@ -146,77 +156,92 @@
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)
25552 + char const *translation = _(msgid);
25553 + if (translation == msgid && s == clocale_quoting_style)
25554 + translation = "\"";
25555 + return translation;
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. */
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.
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. */
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)
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;
25599 if (len < buffersize) \
25600 buffer[len] = (c); \
25606 switch (quoting_style)
25608 - case shell_quoting_style:
25609 - if (! (argsize == (size_t) -1 ? arg[0] == '\0' : argsize == 0))
25613 - case '#': case '~':
25617 - for (i = 0; ; i++)
25619 - if (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize)
25621 + case c_quoting_style:
25623 + backslash_escapes = 1;
25624 + quote_string = "\"";
25625 + quote_string_len = 1;
25629 + case escape_quoting_style:
25630 + backslash_escapes = 1;
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;
25644 + case locale_quoting_style:
25645 + case clocale_quoting_style:
25647 + /* Get translations for open and closing quotation marks.
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".
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. */
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);
25682 case shell_always_quoting_style:
25684 @@ -224,84 +249,225 @@
25685 quote_string_len = 1;
25688 - case c_quoting_style:
25690 - quote_string = "\"";
25691 - quote_string_len = 1;
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);
25702 - quote_string = 0;
25703 - quote_string_len = 0;
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++)
25712 + unsigned char esc;
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)
25724 - case literal_quoting_style:
25726 + if (backslash_escapes)
25735 - case shell_quoting_style:
25736 - case shell_always_quoting_style:
25739 + switch (quoting_style)
25744 + case shell_quoting_style:
25745 + goto use_shell_always_quoting_style;
25747 + case c_quoting_style:
25748 + if (i + 2 < argsize && arg[i + 1] == '?')
25749 + switch (arg[i + 2])
25751 + case '!': case '\'':
25752 + case '(': case ')': case '-': case '/':
25753 + case '<': case '=': case '>':
25754 + /* Escape the second '?' in what would otherwise be
25770 - case c_quoting_style:
25771 - case escape_quoting_style:
25772 - case locale_quoting_style:
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;
25783 + c_and_shell_escape:
25784 + if (quoting_style == shell_quoting_style)
25785 + goto use_shell_always_quoting_style;
25787 + if (backslash_escapes)
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;
25800 + goto store_escape;
25805 + case '#': case '~':
25808 + /* Fall through. */
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;
25825 + switch (quoting_style)
25827 + case shell_quoting_style:
25828 + goto use_shell_always_quoting_style;
25830 + case shell_always_quoting_style:
25837 - if (quote_string_len
25838 - && strncmp (arg + i, quote_string, quote_string_len) == 0)
25839 - goto store_escape;
25840 - if (!ISGRAPH (c))
25843 - STORE ('0' + (c >> 6));
25844 - STORE ('0' + ((c >> 3) & 7));
25845 - c = '0' + (c & 7);
25852 - if (! (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
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. */
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. */
25880 + /* Length of multibyte sequence found so far. */
25885 + if (unibyte_locale)
25888 + printable = isprint (c);
25892 + mbstate_t mbstate;
25893 + memset (&mbstate, 0, sizeof mbstate);
25897 + if (argsize == SIZE_MAX)
25898 + argsize = strlen (arg);
25903 + size_t bytes = mbrtowc (&w, &arg[i + m],
25904 + argsize - (i + m), &mbstate);
25907 + else if (bytes == (size_t) -1)
25912 + else if (bytes == (size_t) -2)
25915 + while (i + m < argsize && arg[i + m])
25921 + if (! iswprint (w))
25926 + while (! mbsinit (&mbstate));
25929 + if (1 < m || (backslash_escapes && ! printable))
25931 + /* Output a multibyte sequence, or an escaped
25932 + unprintable unibyte character. */
25933 + size_t ilim = i + m;
25937 + if (backslash_escapes && ! printable)
25940 + STORE ('0' + (c >> 6));
25941 + STORE ('0' + ((c >> 3) & 7));
25942 + c = '0' + (c & 7);
25944 + if (ilim <= i + 1)
25955 + if (! (backslash_escapes
25956 + && o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
25965 @@ -310,60 +476,105 @@
25966 for (; *quote_string; quote_string++)
25967 STORE (*quote_string);
25970 if (len < buffersize)
25971 buffer[len] = '\0';
25974 + use_shell_always_quoting_style:
25975 + return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
25976 + shell_always_quoting_style, o);
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. */
25989 +quotearg_buffer (char *buffer, size_t buffersize,
25990 + char const *arg, size_t argsize,
25991 + struct quoting_options const *o)
25993 + struct quoting_options const *p = o ? o : &default_quoting_options;
25995 + size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
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). */
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)
26014 - static unsigned int nslots;
26015 - static struct slotvec
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;
26029 + static struct slotvec slotvec0 = {sizeof slot0, slot0};
26030 + static struct slotvec *slotvec = &slotvec0;
26036 + if (nslots <= n0)
26039 - size_t s = n1 * sizeof (struct slotvec);
26040 - if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
26042 - slotvec = (struct slotvec *) xrealloc (slotvec, s);
26043 - memset (slotvec + nslots, 0, (n1 - nslots) * sizeof (struct slotvec));
26045 + unsigned int n1 = n0 + 1;
26046 + size_t s = n1 * sizeof *slotvec;
26048 + if (SIZE_MAX / UINT_MAX <= sizeof *slotvec
26049 + && n1 != s / sizeof *slotvec)
26052 + if (slotvec == &slotvec0)
26054 + slotvec = xmalloc (sizeof *slotvec);
26055 + *slotvec = slotvec0;
26057 + slotvec = xrealloc (slotvec, s);
26058 + memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);
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);
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);
26083 -quotearg_n (unsigned int n, char const *arg)
26084 +quotearg_n (int n, char const *arg)
26086 - return quotearg_n_options (n, arg, &default_quoting_options);
26087 + return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
26091 @@ -372,13 +583,29 @@
26092 return quotearg_n (0, arg);
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)
26101 struct quoting_options o;
26104 memset (o.quote_these_too, 0, sizeof o.quote_these_too);
26105 - return quotearg_n_options (n, arg, &o);
26110 +quotearg_n_style (int n, enum quoting_style s, char const *arg)
26112 + struct quoting_options const o = quoting_options_from_style (s);
26113 + return quotearg_n_options (n, arg, SIZE_MAX, &o);
26117 +quotearg_n_style_mem (int n, enum quoting_style s,
26118 + char const *arg, size_t argsize)
26120 + struct quoting_options const o = quoting_options_from_style (s);
26121 + return quotearg_n_options (n, arg, argsize, &o);
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);
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
26138 /* quotearg.h - quote arguments for output
26139 - Copyright (C) 1998, 1999 Free Software Foundation, Inc.
26141 + Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software
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
26148 /* Written by Paul Eggert <eggert@twinsun.com> */
26150 +#ifndef QUOTEARG_H_
26151 +# define QUOTEARG_H_ 1
26153 +# include <stddef.h>
26155 /* Basic quoting styles. */
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 */
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
26171 +# ifndef DEFAULT_QUOTING_STYLE
26172 +# define DEFAULT_QUOTING_STYLE literal_quoting_style
26175 /* Names of quoting styles and their corresponding values. */
26176 extern char const *const quoting_style_args[];
26177 @@ -39,37 +47,27 @@
26179 struct quoting_options;
26182 -# if defined PROTOTYPES || defined __STDC__
26183 -# define PARAMS(Args) Args
26185 -# define PARAMS(Args) ()
26189 /* The functions listed below set and use a hidden variable
26190 that contains the default quoting style options. */
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);
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);
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);
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);
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);
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);
26238 /* Equivalent to quotearg_n (0, ARG). */
26239 -char *quotearg PARAMS ((char const *arg));
26240 +char *quotearg (char const *arg);
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);
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);
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);
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);
26263 /* Equivalent to quotearg_char (ARG, ':'). */
26264 -char *quotearg_colon PARAMS ((char const *arg));
26265 +char *quotearg_colon (char const *arg);
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
26272 +/* quote.c - quote arguments for output
26273 + Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
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.
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.
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. */
26289 +/* Written by Paul Eggert <eggert@twinsun.com> */
26292 +# include <config.h>
26296 +# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
26298 +#include <sys/types.h>
26299 +#include "quotearg.h"
26300 +#include "quote.h"
26302 +/* Return an unambiguous printable representation of NAME,
26303 + allocated in slot N, suitable for diagnostics. */
26305 +quote_n (int n, char const *name)
26307 + return quotearg_n_style (n, locale_quoting_style, name);
26310 +/* Return an unambiguous printable representation of NAME,
26311 + suitable for diagnostics. */
26313 +quote (char const *name)
26315 + return quote_n (0, name);
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
26321 +/* quote.h - prototypes for quote.c
26322 + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
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.
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.
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. */
26340 +# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
26341 +# define PARAMS(Args) Args
26343 +# define PARAMS(Args) ()
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
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.
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.
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,
26375 enclosed in @ signs as appropriate for your system.
26377 Please send bug reports for this version of patch to
26378 -bug-gnu-utils@prep.ai.mit.edu.
26379 +<bug-patch@gnu.org>.
26381 The Free Software Foundation is distributing this version of patch
26382 independently because as of this writing, Larry Wall has not released a
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
26391 +Copyright (C) 1989, 1990, 1991, 1992, 1993, 1997, 1999, 2002 Free
26392 +Software Foundation, Inc.
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
26400 -/* BSD compatible rename and directory rename function for System V.
26401 - Copyright (C) 1988, 1990 Free Software Foundation, Inc.
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.
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.
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. */
26418 -# include <config.h>
26421 -#include <sys/types.h>
26422 -#include <sys/stat.h>
26423 -#include <errno.h>
26428 -#if STAT_MACROS_BROKEN
26432 -#if !defined(S_ISDIR) && defined(S_IFDIR)
26433 -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
26436 -/* Rename file FROM to file TO.
26437 - Return 0 if successful, -1 if not. */
26440 -rename (char *from, char *to)
26442 - struct stat from_stats, to_stats;
26444 - if (stat (from, &from_stats))
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))
26452 - if (errno != ENOENT)
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. */
26462 - if (unlink (to) && errno != ENOENT)
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. */
26472 - if (S_ISDIR (from_stats.st_mode))
26474 - /* Need a setuid root process to link and unlink directories. */
26476 - pid_t pid = fork ();
26479 - case -1: /* Error. */
26480 - return -1; /* errno already set */
26482 - case 0: /* Child. */
26483 - execl (MVDIR, "mvdir", from, to, (char *) 0);
26486 - default: /* Parent. */
26487 - while (wait (&status) != pid)
26488 - /* Do nothing. */ ;
26492 - /* MVDIR failed. */
26500 -#endif /* MVDIR */
26503 - if (link (from, to))
26505 - if (unlink (from) && errno != ENOENT)
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
26517 +/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
26518 + Written by Bruno Haible <haible@clisp.cons.org>, 2001.
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.
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.
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. */
26534 +#ifndef _STDBOOL_H
26535 +#define _STDBOOL_H
26537 +/* ISO C 99 <stdbool.h> for platforms that lack it. */
26539 +/* 7.16. Boolean type and values */
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. */
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;
26554 +typedef bool _Bool;
26556 +#define bool _Bool
26558 +/* The other macros must be usable in preprocessor directives. */
26561 +#define __bool_true_false_are_defined 1
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
26568 +/* strcasecmp.c -- case insensitive string comparator
26569 + Copyright (C) 1998, 1999 Free Software Foundation, Inc.
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.
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.
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. */
26586 +# include <config.h>
26589 +#ifdef LENGTH_LIMIT
26590 +# define STRXCASECMP_FUNCTION strncasecmp
26591 +# define STRXCASECMP_DECLARE_N , size_t n
26592 +# define LENGTH_LIMIT_EXPR(Expr) Expr
26594 +# define STRXCASECMP_FUNCTION strcasecmp
26595 +# define STRXCASECMP_DECLARE_N /* empty */
26596 +# define LENGTH_LIMIT_EXPR(Expr) 0
26599 +#include <sys/types.h>
26600 +#include <ctype.h>
26602 +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
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. */
26610 +STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
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;
26616 + if (p1 == p2 || LENGTH_LIMIT_EXPR (n == 0))
26621 + c1 = TOLOWER (*p1);
26622 + c2 = TOLOWER (*p2);
26624 + if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
26630 + while (c1 == c2);
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
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
26644 +/* Prefer faster, non-thread-safe stdio functions if available.
26646 + Copyright (C) 2001, 2002 Free Software Foundation, Inc.
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.
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.
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,
26663 +/* Written by Jim Meyering. */
26665 +#ifndef UNLOCKED_IO_H
26666 +# define UNLOCKED_IO_H 1
26668 +# ifndef USE_UNLOCKED_IO
26669 +# define USE_UNLOCKED_IO 1
26672 +# if USE_UNLOCKED_IO
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. */
26679 +# if HAVE_DECL_CLEARERR_UNLOCKED
26681 +# define clearerr(x) clearerr_unlocked (x)
26683 +# if HAVE_DECL_FEOF_UNLOCKED
26685 +# define feof(x) feof_unlocked (x)
26687 +# if HAVE_DECL_FERROR_UNLOCKED
26689 +# define ferror(x) ferror_unlocked (x)
26691 +# if HAVE_DECL_FFLUSH_UNLOCKED
26693 +# define fflush(x) fflush_unlocked (x)
26695 +# if HAVE_DECL_FGETS_UNLOCKED
26697 +# define fgets(x,y,z) fgets_unlocked (x,y,z)
26699 +# if HAVE_DECL_FPUTC_UNLOCKED
26701 +# define fputc(x,y) fputc_unlocked (x,y)
26703 +# if HAVE_DECL_FPUTS_UNLOCKED
26705 +# define fputs(x,y) fputs_unlocked (x,y)
26707 +# if HAVE_DECL_FREAD_UNLOCKED
26709 +# define fread(w,x,y,z) fread_unlocked (w,x,y,z)
26711 +# if HAVE_DECL_FWRITE_UNLOCKED
26713 +# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
26715 +# if HAVE_DECL_GETC_UNLOCKED
26717 +# define getc(x) getc_unlocked (x)
26719 +# if HAVE_DECL_GETCHAR_UNLOCKED
26721 +# define getchar() getchar_unlocked ()
26723 +# if HAVE_DECL_PUTC_UNLOCKED
26725 +# define putc(x,y) putc_unlocked (x,y)
26727 +# if HAVE_DECL_PUTCHAR_UNLOCKED
26729 +# define putchar(x) putchar_unlocked (x)
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
26738 /* utility functions for `patch' */
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 $ */
26743 -/* Copyright 1986 Larry Wall
26744 - Copyright 1992, 1993, 1997-1998, 1999 Free Software Foundation, Inc.
26745 +/* Copyright (C) 1986 Larry Wall
26747 + Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
26748 + Software Foundation, Inc.
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
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>
26762 # define raise(sig) kill (getpid (), sig)
26766 -# include <stdarg.h>
26767 -# define vararg_start va_start
26769 -# define vararg_start(ap,p) va_start (ap)
26770 -# if HAVE_VARARGS_H
26771 -# include <varargs.h>
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)
26780 +#include <stdarg.h>
26782 -static void makedirs PARAMS ((char *));
26783 +static void makedirs (char *);
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. */
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)
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));
26805 - if (rename (from, to) == 0)
26806 - *from_needs_removal = 0;
26808 + if (rename (from, to) != 0)
26810 - int to_dir_known_to_exist = 0;
26811 + bool to_dir_known_to_exist = false;
26813 if (errno == ENOENT
26814 && (to_errno == -1 || to_errno == ENOENT))
26815 @@ -164,10 +150,7 @@
26817 to_dir_known_to_exist = 1;
26818 if (rename (from, to) == 0)
26820 - *from_needs_removal = 0;
26823 + goto rename_succeeded;
26826 if (errno == EXDEV)
26827 @@ -175,7 +158,7 @@
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));
26836 @@ -188,6 +171,14 @@
26837 pfatal ("Can't rename file %s to %s",
26838 quotearg_n (0, from), quotearg_n (1, to));
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. */
26846 + || (to_errno == 0 && to_st.st_nlink <= 1))
26847 + *from_needs_removal = 0;
26851 @@ -255,23 +246,27 @@
26853 static char const CLEARTOOL_CO[] = "cleartool co -unr -nc ";
26855 +static char const PERFORCE_CO[] = "p4 edit ";
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,
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. */
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)
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 @@
26885 strcpy (trybuf, filename);
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)
26892 /* Check that RCS file is not working file.
26893 Some hosts don't report file name length errors. */
26894 @@ -362,6 +357,23 @@
26899 + else if (!readonly && filestat &&
26900 + (getenv("P4PORT") || getenv("P4USER") || getenv("P4CONFIG")))
26904 + char *p = *getbuf = xmalloc (maxgetsize);
26905 + strcpy (p, PERFORCE_CO);
26906 + p += sizeof PERFORCE_CO - 1;
26907 + p += quote_system_arg (p, filename);
26918 @@ -369,12 +381,12 @@
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. */
26928 -version_get (char const *filename, char const *cs, int exists, int readonly,
26929 + Return true if successful. */
26931 +version_get (char const *filename, char const *cs, bool exists, bool readonly,
26932 char const *getbuf, struct stat *filestat)
26935 @@ -460,7 +472,7 @@
26936 *--p = '0' + (int) (n % 10);
26937 while ((n /= 10) != 0);
26944 @@ -490,7 +502,7 @@
26947 fprintf (stderr, "%s: **** ", program_name);
26948 - vararg_start (args, format);
26949 + va_start (args, format);
26950 vfprintf (stderr, format, args);
26952 putc ('\n', stderr);
26953 @@ -524,7 +536,7 @@
26954 int errnum = errno;
26956 fprintf (stderr, "%s: **** ", program_name);
26957 - vararg_start (args, format);
26958 + va_start (args, format);
26959 vfprintf (stderr, format, args);
26961 fflush (stderr); /* perror bypasses stdio on some hosts. */
26962 @@ -540,7 +552,7 @@
26963 say (char const *format, ...)
26966 - vararg_start (args, format);
26967 + va_start (args, format);
26968 vfprintf (stdout, format, args);
26971 @@ -555,7 +567,7 @@
26975 - vararg_start (args, format);
26976 + va_start (args, format);
26977 vfprintf (stdout, format, args);
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,
26987 ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
26988 ? open (TTY_DEVICE, O_RDONLY)
26990 @@ -607,15 +620,15 @@
26992 /* Return nonzero if it OK to reverse a patch. */
26996 ok_to_reverse (char const *format, ...)
27001 if (noreverse || ! (force && verbosity == SILENT))
27004 - vararg_start (args, format);
27005 + va_start (args, format);
27006 vfprintf (stdout, format, args);
27009 @@ -623,19 +636,17 @@
27012 printf (" Skipping patch.\n");
27013 - skip_rest_of_patch = TRUE;
27015 + skip_rest_of_patch = true;
27019 if (verbosity != SILENT)
27020 printf (" Applying it anyway.\n");
27025 say (reverse ? " Ignoring -R.\n" : " Assuming -R.\n");
27031 @@ -648,7 +659,7 @@
27033 if (verbosity != SILENT)
27034 say ("Skipping patch.\n");
27035 - skip_rest_of_patch = TRUE;
27036 + skip_rest_of_patch = true;
27040 @@ -711,7 +722,7 @@
27041 static sigset_t signals_to_block;
27043 #if ! HAVE_SIGACTION
27044 -static RETSIGTYPE fatal_exit_handler PARAMS ((int)) __attribute__ ((noreturn));
27045 +static RETSIGTYPE fatal_exit_handler (int) __attribute__ ((noreturn));
27047 fatal_exit_handler (int sig)
27049 @@ -721,7 +732,7 @@
27053 -set_signals (int reset)
27054 +set_signals (bool reset)
27058 @@ -743,7 +754,7 @@
27059 sigemptyset (&signals_to_block);
27060 for (i = 0; i < NUM_SIGS; i++)
27062 - int ignoring_signal;
27063 + bool ignoring_signal;
27065 if (sigaction (sigs[i], (struct sigaction *) 0, &initial_act) != 0)
27067 @@ -939,7 +950,13 @@
27069 else if (ISSPACE ((unsigned char) *t))
27071 + /* Allow file names with internal spaces,
27072 + but only if a tab separates the file name from the date. */
27074 + while (*u != '\t' && ISSPACE ((unsigned char) u[1]))
27076 + if (*u != '\t' && strchr (u + 1, '\t'))
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
27085 /* utility functions for `patch' */
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 $ */
27090 +/* Copyright (C) 1986 Larry Wall
27092 + Copyright (C) 1992, 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free
27093 + Software Foundation, Inc.
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.
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.
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. */
27110 /* An upper bound on the print length of a signed decimal line number.
27111 Add one for the sign. */
27114 XTERN enum backup_type backup_type;
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)));
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)));
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
27174 /* Print the version number. */
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 $ */
27179 #define XTERN extern
27180 #include <common.h>
27183 -#include <patchlevel.h>
27184 #include <version.h>
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.";
27192 static char const free_software_msgid[] = "\
27193 This program comes with NO WARRANTY, to the extent permitted by law.\n\
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);
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
27206 /* Print the version number. */
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 $ */
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
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.
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
27227 +# ifndef __attribute__
27228 +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
27229 +# define __attribute__(x)
27233 +# ifndef ATTRIBUTE_NORETURN
27234 +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
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 @@
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));
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[];
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;
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));
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)))
27271 +/* Declare and alloc memory for VAR of type TYPE. */
27272 +# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
27274 +/* Free VAR only if non NULL. */
27275 +# define XFREE(Var) \
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)))
27285 +/* Return a malloc'ed copy of SRC. */
27286 +# define CLONE(Src) CCLONE (Src, 1)
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)))
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
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.
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
27309 -# include <libintl.h>
27310 -# define _(Text) gettext (Text)
27312 -# define textdomain(Domain)
27313 -# define _(Text) Text
27315 -#define N_(Text) Text
27316 +#include "gettext.h"
27317 +#define _(msgid) gettext (msgid)
27318 +#define N_(msgid) msgid
27321 #include "xalloc.h"
27322 @@ -46,12 +41,14 @@
27323 # define EXIT_FAILURE 1
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). */
27330 +#ifndef HAVE_MALLOC
27331 +"you must run the autoconf test for a GNU libc compatible malloc"
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"
27340 /* Exit value when the requested amount of memory is not available.
27341 @@ -59,18 +56,22 @@
27342 int xalloc_exit_failure = EXIT_FAILURE;
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;
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");
27354 -xalloc_fail (void)
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);
27367 /* Allocate N bytes of memory dynamically, with error checking. */
27368 @@ -82,20 +83,19 @@
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. */
27383 xrealloc (void *p, size_t n)
27385 p = realloc (p, n);
27392 @@ -108,6 +108,6 @@