· 9 years ago · Dec 18, 2016, 01:26 PM
1diff -Naur ncftp-3.2.6-ep/autoconf_local/acconfig.h ncftp-3.2.6-zip/autoconf_local/acconfig.h
2--- ncftp-3.2.6-ep/autoconf_local/acconfig.h 2009-08-17 21:11:40.000000000 +0200
3+++ ncftp-3.2.6-zip/autoconf_local/acconfig.h 2016-11-13 03:17:24.000000000 +0100
4@@ -258,6 +258,9 @@
5 /* Define to `int' if <sys/types.h> doesn't define. */
6 #undef mode_t
7
8+/* Define this because you definitely don't have it. Used only for testing configure. */
9+#undef negative_control_t
10+
11 /* Define if you don't have <dirent.h>, but have <ndir.h>. */
12 #undef NDIR
13
14@@ -335,6 +338,8 @@
15 /* Format string for the scanf() family for 64 bit integers. */
16 #undef SCANF_LONG_LONG
17
18+#undef sa_family_t
19+
20 /* Define if scanning a "long long" with "%lld" works. */
21 #undef SCANF_LONG_LONG_LLD
22
23@@ -405,6 +410,9 @@
24
25 #undef SPRINTF_RETURNS_PTR
26
27+/* Define to `long' if <sys/types.h> doesn't define. */
28+#undef ssize_t
29+
30 /* If using the C implementation of alloca, define if you know the
31 direction of stack growth for your system; otherwise it will be
32 automatically deduced at run-time.
33diff -Naur ncftp-3.2.6-ep/autoconf_local/aclocal.m4 ncftp-3.2.6-zip/autoconf_local/aclocal.m4
34--- ncftp-3.2.6-ep/autoconf_local/aclocal.m4 2016-11-03 20:58:44.000000000 +0100
35+++ ncftp-3.2.6-zip/autoconf_local/aclocal.m4 2016-12-04 19:54:02.000000000 +0100
36@@ -272,10 +272,11 @@
37 dnl
38 AC_DEFUN(wi_EXTRA_IDIR, [
39 incdir="$1"
40-if test -r $incdir ; then
41+echo "wi_extra_idir $incdir" 1>&5
42+if test -r "$incdir" ; then
43 case "$CPPFLAGS" in
44 *${incdir}*)
45- # echo " + already had $incdir" 1>&6
46+ echo " + already had $incdir" 1>&5
47 ;;
48 *)
49 if test "$CPPFLAGS" = "" ; then
50@@ -283,7 +284,7 @@
51 else
52 CPPFLAGS="$CPPFLAGS -I$incdir"
53 fi
54- echo " + found $incdir" 1>&6
55+ echo " + found $incdir" 1>&5
56 ;;
57 esac
58 fi
59@@ -294,10 +295,11 @@
60 dnl
61 AC_DEFUN(wi_EXTRA_LDIR, [
62 libdir="$1"
63-if test -r $libdir ; then
64+echo "wi_extra_ldir $libdir" 1>&5
65+if test -r "$libdir" ; then
66 case "$LDFLAGS" in
67 *${libdir}*)
68- # echo " + already had $libdir" 1>&6
69+ echo " + already had $libdir" 1>&5
70 ;;
71 *)
72 if test "$LDFLAGS" = "" ; then
73@@ -305,7 +307,7 @@
74 else
75 LDFLAGS="$LDFLAGS -L$libdir"
76 fi
77- echo " + found $libdir" 1>&6
78+ echo " + found $libdir" 1>&5
79 ;;
80 esac
81 fi
82@@ -679,8 +681,28 @@
83 ;;
84 esac
85
86+CC_is_clang="no"
87+case "$CC" in
88+ *clang*)
89+ CC_is_clang="yes"
90+ ;;
91+ *)
92+ cc_dash_v=`${CC-gcc} -v 2>&1 | grep clang 2>/dev/null`
93+ if test -n "$cc_dash_v" ; then
94+ CC_is_clang="yes"
95+ fi
96+ ;;
97+esac
98+
99 if test "$wi_os_default_cflags" = yes ; then
100- if test "$GCC" = yes ; then
101+ if test "$CC_is_clang" = yes ; then
102+ wi_os_default_cflags="-Weverything -Wno-unknown-warning-option -Wno-disabled-macro-expansion -Wno-missing-variable-declarations -Wno-date-time"
103+ if test "$wi_replace_O_with_g" = yes ; then
104+ wi_os_default_cflags="-g $wi_os_default_cflags"
105+ else
106+ wi_os_default_cflags="-O2 $wi_os_default_cflags"
107+ fi
108+ elif test "$GCC" = yes ; then
109 #
110 # gcc
111 #
112@@ -689,7 +711,7 @@
113 2.7.*|2.8.*|2.9*)
114 wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline"
115 ;;
116- 3.*)
117+ [345].*)
118 wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline -Wmissing-format-attribute -Wformat-security"
119 wi_gcc_optimizer_flags='-Wdisabled-optimization'
120 ;;
121@@ -1124,6 +1146,41 @@
122 dnl
123 dnl
124 dnl
125+AC_DEFUN(wi_PROG_CC, [
126+ if test "x$had_CC" = "x" ; then
127+ AC_MSG_CHECKING([for CC environment variable])
128+ AC_MSG_RESULT(["${CC-no}"])
129+ fi
130+
131+ AC_MSG_CHECKING([for clang C compiler])
132+ CLANG_CC=`which "clang" 2>/dev/null`
133+ old_CC="$CC"
134+ CC="$CLANG_CC"
135+ AC_TRY_COMPILE([#include <stdlib.h>],[extern void exit(int status);],[
136+ AC_MSG_RESULT(["$CLANG_CC"])
137+ ],[
138+ AC_MSG_RESULT(["no"])
139+ unset CLANG_CC
140+ ])
141+ CC="$old_CC"; unset old_CC
142+
143+ AC_MSG_CHECKING([if CC should now be set])
144+ if test "x$CC" = "x" ; then
145+ if test "x$CLANG_CC" != "x" ; then
146+ CC="$CLANG_CC"
147+ export CC
148+ AC_MSG_RESULT(["$CC"])
149+ else
150+ AC_MSG_RESULT([no])
151+ fi
152+ else
153+ AC_MSG_RESULT([no])
154+ fi
155+ AC_PROG_CC
156+])
157+dnl
158+dnl
159+dnl
160 AC_DEFUN(wi_CFLAGS, [AC_REQUIRE([AC_PROG_CC])
161 wi_PROG_GCC_VERSION
162 AC_REQUIRE_CPP()
163@@ -1222,9 +1279,11 @@
164 AC_DEFUN(wi_ENV_VAR_MESSAGES, [
165 AC_MSG_CHECKING([if you set and exported the environment variable CC])
166 if test "x$CC" = x ; then
167- AC_MSG_RESULT([no (you may want to do that since configure scripts look for gcc first)])
168+ AC_MSG_RESULT([no (configure will try to locate a suitable C compiler)])
169+ had_CC="no"
170 else
171 AC_MSG_RESULT($CC)
172+ had_CC="yes"
173 fi
174 AC_MSG_CHECKING([for environment variable CFLAGS])
175 if test "x$CFLAGS" = x ; then
176@@ -4119,6 +4178,33 @@
177 dnl
178 dnl
179 dnl
180+dnl wi_CHECK_TYPE(TYPE, DEFAULT, INCLUDES)
181+AC_DEFUN(wi_CHECK_TYPE,
182+[AC_REQUIRE([AC_HEADER_STDC])dnl
183+AC_MSG_CHECKING(for $1)
184+AC_CACHE_VAL(ac_cv_type_$1,
185+[AC_EGREP_CPP(dnl
186+changequote(<<,>>)dnl
187+<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
188+changequote([,]), [
189+#ifdef HAVE_UNISTD_H
190+#include <unistd.h>
191+#endif
192+#include <sys/types.h>
193+#if STDC_HEADERS
194+#include <stdlib.h>
195+#include <stddef.h>
196+#endif
197+$3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
198+AC_MSG_RESULT($ac_cv_type_$1)
199+if test $ac_cv_type_$1 = no; then
200+ AC_DEFINE($1, $2)
201+fi
202+])
203+dnl
204+dnl
205+dnl
206+dnl
207 AC_DEFUN(wi_UNISTD_FUNC_PARAM_TYPES, [
208 AC_REQUIRE([AC_PROG_CPP])
209 AC_REQUIRE([wi_PATH_PERL])
210@@ -5553,15 +5639,17 @@
211 wi_CFLAGS_TO_ADD_LATER=""
212 changequote(!@, @!)dnl
213 if [ -x "$HOME/bin/OS" ] ; then
214- HOME_OS=`$HOME/bin/OS`
215+ HOME_OS=`$HOME/bin/OS 2>/dev/null`
216 HOME_OS="$HOME/$HOME_OS"
217+else
218+ HOME_OS="$HOME"
219 fi
220 host=`uname -n 2>/dev/null | tr '[A-Z]' '[a-z]'`
221 os=`uname -s 2>/dev/null | tr '[A-Z]' '[a-z]'`
222 if [ "$os" = "TvoPT" ] ; then os="sunos" ; fi
223 dnl work around inability to use $1
224-os_v=`uname -v 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;' | awk '-F[-/: ]' '{n = 1; print $n; }'`
225-os_r=`uname -r 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;' | awk '-F[-/: ]' '{n = 1; print $n; }'`
226+os_v=`uname -v 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;'`
227+os_r=`uname -r 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;'`
228 os_r1=`echo "${os_r}" | cut -c1`
229 arch=`uname -m 2>/dev/null | tr '[A-Z]' '[a-z]'`
230 archp=`uname -p 2>/dev/null | tr '[A-Z]' '[a-z]'`
231@@ -5709,6 +5797,7 @@
232 esac
233
234 libc=""
235+ [ -z "$os_r" ] && os_r="2.2.26"
236 os_r1=`echo "$os_r" | cut -d. -f1`
237 os_r2=`echo "$os_r" | cut -d. -f2`
238 os_r3=`echo "$os_r" | cut -d- -f1 | cut -d. -f3`
239@@ -5991,6 +6080,9 @@
240 fi
241 wi_cv_OS="$OS"
242
243+if test "x$HOME_OS" = "x" && test "x$OS" != "x" ; then
244+ HOME_OS="$HOME/$OS"
245+fi
246 AC_SUBST(NDEFS)
247 AC_SUBST(OS)
248 AC_SUBST(host)
249diff -Naur ncftp-3.2.6-ep/config.h.in ncftp-3.2.6-zip/config.h.in
250--- ncftp-3.2.6-ep/config.h.in 2016-08-14 03:32:20.000000000 +0200
251+++ ncftp-3.2.6-zip/config.h.in 2016-11-13 03:19:28.000000000 +0100
252@@ -93,6 +93,9 @@
253 /* Define to `int' if <sys/types.h> doesn't define. */
254 #undef mode_t
255
256+/* Define this because you definitely don't have it. Used only for testing configure. */
257+#undef negative_control_t
258+
259 /* Define if optind, optarg, etc., need to be declared as extern. */
260 #undef NEED_GETOPT_EXTERN_DECLS
261
262@@ -133,6 +136,8 @@
263 /* Format string for the scanf() family for 64 bit integers. */
264 #undef SCANF_LONG_LONG
265
266+#undef sa_family_t
267+
268 /* Define if scanning a "long long" with "%lld" works. */
269 #undef SCANF_LONG_LONG_LLD
270
271@@ -193,6 +198,9 @@
272
273 #undef sockopt_size_t
274
275+/* Define to `long' if <sys/types.h> doesn't define. */
276+#undef ssize_t
277+
278 /* If using the C implementation of alloca, define if you know the
279 direction of stack growth for your system; otherwise it will be
280 automatically deduced at run-time.
281diff -Naur ncftp-3.2.6-ep/configure ncftp-3.2.6-zip/configure
282--- ncftp-3.2.6-ep/configure 2016-08-14 04:16:34.000000000 +0200
283+++ ncftp-3.2.6-zip/configure 2016-12-04 19:54:12.000000000 +0100
284@@ -638,42 +638,319 @@
285 echo $ac_n "checking if you set and exported the environment variable CC""... $ac_c" 1>&6
286 echo "configure:640: checking if you set and exported the environment variable CC" >&5
287 if test "x$CC" = x ; then
288- echo "$ac_t""no (you may want to do that since configure scripts look for gcc first)" 1>&6
289+ echo "$ac_t""no (configure will try to locate a suitable C compiler)" 1>&6
290+ had_CC="no"
291 else
292 echo "$ac_t""$CC" 1>&6
293+ had_CC="yes"
294 fi
295 echo $ac_n "checking for environment variable CFLAGS""... $ac_c" 1>&6
296-echo "configure:647: checking for environment variable CFLAGS" >&5
297+echo "configure:649: checking for environment variable CFLAGS" >&5
298 if test "x$CFLAGS" = x ; then
299 echo "$ac_t""no (we will choose a default set for you)" 1>&6
300 else
301 echo "$ac_t""$CFLAGS" 1>&6
302 fi
303 echo $ac_n "checking for environment variable CPPFLAGS""... $ac_c" 1>&6
304-echo "configure:654: checking for environment variable CPPFLAGS" >&5
305+echo "configure:656: checking for environment variable CPPFLAGS" >&5
306 echo "$ac_t""${CPPFLAGS-no}" 1>&6
307 echo $ac_n "checking for environment variable LDFLAGS""... $ac_c" 1>&6
308-echo "configure:657: checking for environment variable LDFLAGS" >&5
309+echo "configure:659: checking for environment variable LDFLAGS" >&5
310 echo "$ac_t""${LDFLAGS-no}" 1>&6
311 echo $ac_n "checking for environment variable LIBS""... $ac_c" 1>&6
312-echo "configure:660: checking for environment variable LIBS" >&5
313+echo "configure:662: checking for environment variable LIBS" >&5
314 echo "$ac_t""${LIBS-no}" 1>&6
315
316
317+ if test "x$had_CC" = "x" ; then
318+ echo $ac_n "checking for CC environment variable""... $ac_c" 1>&6
319+echo "configure:668: checking for CC environment variable" >&5
320+ echo "$ac_t"""${CC-no}"" 1>&6
321+ fi
322+
323+ echo $ac_n "checking for clang C compiler""... $ac_c" 1>&6
324+echo "configure:673: checking for clang C compiler" >&5
325+ CLANG_CC=`which "clang" 2>/dev/null`
326+ old_CC="$CC"
327+ CC="$CLANG_CC"
328+ cat > conftest.$ac_ext <<EOF
329+#line 678 "configure"
330+#include "confdefs.h"
331+#include <stdlib.h>
332+int main() {
333+extern void exit(int status);
334+; return 0; }
335+EOF
336+if { (eval echo configure:685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
337+ rm -rf conftest*
338+
339+ echo "$ac_t"""$CLANG_CC"" 1>&6
340+
341+else
342+ echo "configure: failed program was:" >&5
343+ cat conftest.$ac_ext >&5
344+ rm -rf conftest*
345+
346+ echo "$ac_t"""no"" 1>&6
347+ unset CLANG_CC
348+
349+fi
350+rm -rf conftest*
351+ CC="$old_CC"; unset old_CC
352+
353+ echo $ac_n "checking if CC should now be set""... $ac_c" 1>&6
354+echo "configure:703: checking if CC should now be set" >&5
355+ if test "x$CC" = "x" ; then
356+ if test "x$CLANG_CC" != "x" ; then
357+ CC="$CLANG_CC"
358+ export CC
359+ echo "$ac_t"""$CC"" 1>&6
360+ else
361+ echo "$ac_t""no" 1>&6
362+ fi
363+ else
364+ echo "$ac_t""no" 1>&6
365+ fi
366+ # Extract the first word of "gcc", so it can be a program name with args.
367+set dummy gcc; ac_word=$2
368+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
369+echo "configure:718: checking for $ac_word" >&5
370+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
371+ echo $ac_n "(cached) $ac_c" 1>&6
372+else
373+ if test -n "$CC"; then
374+ ac_cv_prog_CC="$CC" # Let the user override the test.
375+else
376+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
377+ ac_dummy="$PATH"
378+ for ac_dir in $ac_dummy; do
379+ test -z "$ac_dir" && ac_dir=.
380+ if test -f $ac_dir/$ac_word; then
381+ ac_cv_prog_CC="gcc"
382+ break
383+ fi
384+ done
385+ IFS="$ac_save_ifs"
386+fi
387+fi
388+CC="$ac_cv_prog_CC"
389+if test -n "$CC"; then
390+ echo "$ac_t""$CC" 1>&6
391+else
392+ echo "$ac_t""no" 1>&6
393+fi
394+
395+if test -z "$CC"; then
396+ # Extract the first word of "cc", so it can be a program name with args.
397+set dummy cc; ac_word=$2
398+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
399+echo "configure:748: checking for $ac_word" >&5
400+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
401+ echo $ac_n "(cached) $ac_c" 1>&6
402+else
403+ if test -n "$CC"; then
404+ ac_cv_prog_CC="$CC" # Let the user override the test.
405+else
406+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
407+ ac_prog_rejected=no
408+ ac_dummy="$PATH"
409+ for ac_dir in $ac_dummy; do
410+ test -z "$ac_dir" && ac_dir=.
411+ if test -f $ac_dir/$ac_word; then
412+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
413+ ac_prog_rejected=yes
414+ continue
415+ fi
416+ ac_cv_prog_CC="cc"
417+ break
418+ fi
419+ done
420+ IFS="$ac_save_ifs"
421+if test $ac_prog_rejected = yes; then
422+ # We found a bogon in the path, so make sure we never use it.
423+ set dummy $ac_cv_prog_CC
424+ shift
425+ if test $# -gt 0; then
426+ # We chose a different compiler from the bogus one.
427+ # However, it has the same basename, so the bogon will be chosen
428+ # first if we set CC to just the basename; use the full file name.
429+ shift
430+ set dummy "$ac_dir/$ac_word" "$@"
431+ shift
432+ ac_cv_prog_CC="$@"
433+ fi
434+fi
435+fi
436+fi
437+CC="$ac_cv_prog_CC"
438+if test -n "$CC"; then
439+ echo "$ac_t""$CC" 1>&6
440+else
441+ echo "$ac_t""no" 1>&6
442+fi
443+
444+ if test -z "$CC"; then
445+ case "`uname -s`" in
446+ *win32* | *WIN32*)
447+ # Extract the first word of "cl", so it can be a program name with args.
448+set dummy cl; ac_word=$2
449+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
450+echo "configure:799: checking for $ac_word" >&5
451+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
452+ echo $ac_n "(cached) $ac_c" 1>&6
453+else
454+ if test -n "$CC"; then
455+ ac_cv_prog_CC="$CC" # Let the user override the test.
456+else
457+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
458+ ac_dummy="$PATH"
459+ for ac_dir in $ac_dummy; do
460+ test -z "$ac_dir" && ac_dir=.
461+ if test -f $ac_dir/$ac_word; then
462+ ac_cv_prog_CC="cl"
463+ break
464+ fi
465+ done
466+ IFS="$ac_save_ifs"
467+fi
468+fi
469+CC="$ac_cv_prog_CC"
470+if test -n "$CC"; then
471+ echo "$ac_t""$CC" 1>&6
472+else
473+ echo "$ac_t""no" 1>&6
474+fi
475+ ;;
476+ esac
477+ fi
478+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
479+fi
480+
481+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
482+echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
483+
484+ac_ext=c
485+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
486+ac_cpp='$CPP $CPPFLAGS'
487+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
488+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
489+cross_compiling=$ac_cv_prog_cc_cross
490+
491+cat > conftest.$ac_ext << EOF
492+
493+#line 842 "configure"
494+#include "confdefs.h"
495+
496+main(){return(0);}
497+EOF
498+if { (eval echo configure:847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
499+ ac_cv_prog_cc_works=yes
500+ # If we can't run a trivial program, we are probably using a cross compiler.
501+ if (./conftest; exit) 2>/dev/null; then
502+ ac_cv_prog_cc_cross=no
503+ else
504+ ac_cv_prog_cc_cross=yes
505+ fi
506+else
507+ echo "configure: failed program was:" >&5
508+ cat conftest.$ac_ext >&5
509+ ac_cv_prog_cc_works=no
510+fi
511+rm -fr conftest*
512+ac_ext=c
513+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514+ac_cpp='$CPP $CPPFLAGS'
515+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517+cross_compiling=$ac_cv_prog_cc_cross
518+
519+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
520+if test $ac_cv_prog_cc_works = no; then
521+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
522+fi
523+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
524+echo "configure:873: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
525+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
526+cross_compiling=$ac_cv_prog_cc_cross
527+
528+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
529+echo "configure:878: checking whether we are using GNU C" >&5
530+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
531+ echo $ac_n "(cached) $ac_c" 1>&6
532+else
533+ cat > conftest.c <<EOF
534+#ifdef __GNUC__
535+ yes;
536+#endif
537+EOF
538+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
539+ ac_cv_prog_gcc=yes
540+else
541+ ac_cv_prog_gcc=no
542+fi
543+fi
544+
545+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
546+
547+if test $ac_cv_prog_gcc = yes; then
548+ GCC=yes
549+else
550+ GCC=
551+fi
552+
553+ac_test_CFLAGS="${CFLAGS+set}"
554+ac_save_CFLAGS="$CFLAGS"
555+CFLAGS=
556+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
557+echo "configure:906: checking whether ${CC-cc} accepts -g" >&5
558+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
559+ echo $ac_n "(cached) $ac_c" 1>&6
560+else
561+ echo 'void f(){}' > conftest.c
562+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
563+ ac_cv_prog_cc_g=yes
564+else
565+ ac_cv_prog_cc_g=no
566+fi
567+rm -rf conftest*
568+
569+fi
570+
571+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
572+if test "$ac_test_CFLAGS" = set; then
573+ CFLAGS="$ac_save_CFLAGS"
574+elif test $ac_cv_prog_cc_g = yes; then
575+ if test "$GCC" = yes; then
576+ CFLAGS="-g -O2"
577+ else
578+ CFLAGS="-g"
579+ fi
580+else
581+ if test "$GCC" = yes; then
582+ CFLAGS="-O2"
583+ else
584+ CFLAGS=
585+ fi
586+fi
587+
588+
589+
590 #
591 # Take note if the user is or is not exporting a CFLAGS env var.
592 #
593 wi_orig_CFLAGS="$CFLAGS"
594 wi_CFLAGS_TO_ADD_LATER=""
595 if [ -x "$HOME/bin/OS" ] ; then
596- HOME_OS=`$HOME/bin/OS`
597+ HOME_OS=`$HOME/bin/OS 2>/dev/null`
598 HOME_OS="$HOME/$HOME_OS"
599+else
600+ HOME_OS="$HOME"
601 fi
602 host=`uname -n 2>/dev/null | tr '[A-Z]' '[a-z]'`
603 os=`uname -s 2>/dev/null | tr '[A-Z]' '[a-z]'`
604 if [ "$os" = "TvoPT" ] ; then os="sunos" ; fi
605-os_v=`uname -v 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;' | awk '-F[-/: ]' '{n = 1; print $n; }'`
606-os_r=`uname -r 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;' | awk '-F[-/: ]' '{n = 1; print $n; }'`
607+os_v=`uname -v 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;'`
608+os_r=`uname -r 2>/dev/null | sed 's/^[^0-9.]*//;s/[^0-9.].*$//;'`
609 os_r1=`echo "${os_r}" | cut -c1`
610 arch=`uname -m 2>/dev/null | tr '[A-Z]' '[a-z]'`
611 archp=`uname -p 2>/dev/null | tr '[A-Z]' '[a-z]'`
612@@ -821,6 +1098,7 @@
613 esac
614
615 libc=""
616+ [ -z "$os_r" ] && os_r="2.2.26"
617 os_r1=`echo "$os_r" | cut -d. -f1`
618 os_r2=`echo "$os_r" | cut -d. -f2`
619 os_r3=`echo "$os_r" | cut -d- -f1 | cut -d. -f3`
620@@ -878,22 +1156,22 @@
621 if test "$glibc_r1" = "" ; then glibc_r1=0 ; fi
622 if test "$glibc_r2" = "" ; then glibc_r2=0 ; fi
623 if test "$glibc_r3" = "" ; then glibc_r3=0 ; fi
624- glibc_int=`expr "$glibc_r1" '*' 10000 + "$glibc_r2" '*' 1000 + "$glibc_r3"`
625+ glibc_int=`expr "$glibc_r1" '*' 10000 + "$glibc_r2" '*' 100 + "$glibc_r3"`
626 NDEFS="$NDEFS -DLINUX_GLIBC=$glibc_int"
627 libc="glibc${glibc_r1}.${glibc_r2}"
628 OS="linux-$arch"
629 ;;
630 *)
631 if test -f /lib/libc-2.1.3.so ; then
632- NDEFS="$NDEFS -DLINUX_GLIBC=21003"
633+ NDEFS="$NDEFS -DLINUX_GLIBC=20103"
634 libc="glibc2.1"
635 OS="linux-$arch"
636 elif test -f /lib/libc-2.1.2.so ; then
637- NDEFS="$NDEFS -DLINUX_GLIBC=21002"
638+ NDEFS="$NDEFS -DLINUX_GLIBC=20102"
639 libc="glibc2.1"
640 OS="linux-$arch"
641 elif test -f /lib/libc-2.1.1.so ; then
642- NDEFS="$NDEFS -DLINUX_GLIBC=21001"
643+ NDEFS="$NDEFS -DLINUX_GLIBC=20101"
644 libc="glibc2.1"
645 OS="linux-$arch"
646 elif test -f /lib/libc.so.6 ; then
647@@ -1075,295 +1353,76 @@
648 *)
649 os_r1=`echo "$os_r" | cut -d. -f1`
650 if [ "$os_r1" = "" ] ; then os_r1=0 ; fi
651- os_r2=`echo "$os_r" | cut -d. -f2`
652- if [ "$os_r2" = "" ] ; then os_r2=0 ; fi
653- os_r3=`echo "$os_r" | cut -d. -f3`
654- if [ "$os_r3" = "" ] ; then os_r3=0 ; fi
655- os_int=`expr "$os_r1" '*' 100 + "$os_r2" '*' 10 + "$os_r3"`
656- OS="solaris${os_r}-$archp"
657- NDEFS="$NDEFS -DSOLARIS=$os_int"
658- SYS=solaris
659- ;;
660- esac
661- ;;
662- *)
663- OS="$os"
664- SYS="$os"
665-
666- if grep Novell /usr/include/sys/types.h ; then
667- OS="unixware${os_v}"
668- SYS="unixware"
669- fi
670- ;;
671-esac
672-
673-if [ "x$wi_cv_OS" != "x" ] && [ "$wi_cv_OS" != "$OS" ] ; then
674-
675- { echo "configure: error: Your config.cache file is invalid. It was created on $wi_cv_OS, but this machine is running $OS. Remove the config.cache file if you wish to continue." 1>&2; exit 1; }
676-fi
677-wi_cv_OS="$OS"
678-
679-
680-
681-
682-
683-
684-echo $ac_n "checking platform""... $ac_c" 1>&6
685-echo "configure:1113: checking platform" >&5
686-echo "$ac_t"""$OS"" 1>&6
687-
688-
689-case "$os" in
690- linux)
691- OS="linux-$arch-$libc"
692- ;;
693-esac
694-
695-if test -f sh/install-sh ; then chmod 755 sh/*.sh sh/config.* sh/install-sh ; fi
696-ac_aux_dir=
697-for ac_dir in sh $srcdir/sh; do
698- if test -f $ac_dir/install-sh; then
699- ac_aux_dir=$ac_dir
700- ac_install_sh="$ac_aux_dir/install-sh -c"
701- break
702- elif test -f $ac_dir/install.sh; then
703- ac_aux_dir=$ac_dir
704- ac_install_sh="$ac_aux_dir/install.sh -c"
705- break
706- fi
707-done
708-if test -z "$ac_aux_dir"; then
709- { echo "configure: error: can not find install-sh or install.sh in sh $srcdir/sh" 1>&2; exit 1; }
710-fi
711-ac_config_guess=$ac_aux_dir/config.guess
712-ac_config_sub=$ac_aux_dir/config.sub
713-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
714-
715-# Extract the first word of "gcc", so it can be a program name with args.
716-set dummy gcc; ac_word=$2
717-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
718-echo "configure:1146: checking for $ac_word" >&5
719-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
720- echo $ac_n "(cached) $ac_c" 1>&6
721-else
722- if test -n "$CC"; then
723- ac_cv_prog_CC="$CC" # Let the user override the test.
724-else
725- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
726- ac_dummy="$PATH"
727- for ac_dir in $ac_dummy; do
728- test -z "$ac_dir" && ac_dir=.
729- if test -f $ac_dir/$ac_word; then
730- ac_cv_prog_CC="gcc"
731- break
732- fi
733- done
734- IFS="$ac_save_ifs"
735-fi
736-fi
737-CC="$ac_cv_prog_CC"
738-if test -n "$CC"; then
739- echo "$ac_t""$CC" 1>&6
740-else
741- echo "$ac_t""no" 1>&6
742-fi
743-
744-if test -z "$CC"; then
745- # Extract the first word of "cc", so it can be a program name with args.
746-set dummy cc; ac_word=$2
747-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
748-echo "configure:1176: checking for $ac_word" >&5
749-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
750- echo $ac_n "(cached) $ac_c" 1>&6
751-else
752- if test -n "$CC"; then
753- ac_cv_prog_CC="$CC" # Let the user override the test.
754-else
755- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
756- ac_prog_rejected=no
757- ac_dummy="$PATH"
758- for ac_dir in $ac_dummy; do
759- test -z "$ac_dir" && ac_dir=.
760- if test -f $ac_dir/$ac_word; then
761- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
762- ac_prog_rejected=yes
763- continue
764- fi
765- ac_cv_prog_CC="cc"
766- break
767- fi
768- done
769- IFS="$ac_save_ifs"
770-if test $ac_prog_rejected = yes; then
771- # We found a bogon in the path, so make sure we never use it.
772- set dummy $ac_cv_prog_CC
773- shift
774- if test $# -gt 0; then
775- # We chose a different compiler from the bogus one.
776- # However, it has the same basename, so the bogon will be chosen
777- # first if we set CC to just the basename; use the full file name.
778- shift
779- set dummy "$ac_dir/$ac_word" "$@"
780- shift
781- ac_cv_prog_CC="$@"
782- fi
783-fi
784-fi
785-fi
786-CC="$ac_cv_prog_CC"
787-if test -n "$CC"; then
788- echo "$ac_t""$CC" 1>&6
789-else
790- echo "$ac_t""no" 1>&6
791-fi
792-
793- if test -z "$CC"; then
794- case "`uname -s`" in
795- *win32* | *WIN32*)
796- # Extract the first word of "cl", so it can be a program name with args.
797-set dummy cl; ac_word=$2
798-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
799-echo "configure:1227: checking for $ac_word" >&5
800-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
801- echo $ac_n "(cached) $ac_c" 1>&6
802-else
803- if test -n "$CC"; then
804- ac_cv_prog_CC="$CC" # Let the user override the test.
805-else
806- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
807- ac_dummy="$PATH"
808- for ac_dir in $ac_dummy; do
809- test -z "$ac_dir" && ac_dir=.
810- if test -f $ac_dir/$ac_word; then
811- ac_cv_prog_CC="cl"
812- break
813- fi
814- done
815- IFS="$ac_save_ifs"
816-fi
817-fi
818-CC="$ac_cv_prog_CC"
819-if test -n "$CC"; then
820- echo "$ac_t""$CC" 1>&6
821-else
822- echo "$ac_t""no" 1>&6
823-fi
824- ;;
825- esac
826- fi
827- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
828-fi
829-
830-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
831-echo "configure:1259: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
832-
833-ac_ext=c
834-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
835-ac_cpp='$CPP $CPPFLAGS'
836-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
837-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
838-cross_compiling=$ac_cv_prog_cc_cross
839+ os_r2=`echo "$os_r" | cut -d. -f2`
840+ if [ "$os_r2" = "" ] ; then os_r2=0 ; fi
841+ os_r3=`echo "$os_r" | cut -d. -f3`
842+ if [ "$os_r3" = "" ] ; then os_r3=0 ; fi
843+ os_int=`expr "$os_r1" '*' 100 + "$os_r2" '*' 10 + "$os_r3"`
844+ OS="solaris${os_r}-$archp"
845+ NDEFS="$NDEFS -DSOLARIS=$os_int"
846+ SYS=solaris
847+ ;;
848+ esac
849+ ;;
850+ *)
851+ OS="$os"
852+ SYS="$os"
853
854-cat > conftest.$ac_ext << EOF
855+ if grep Novell /usr/include/sys/types.h ; then
856+ OS="unixware${os_v}"
857+ SYS="unixware"
858+ fi
859+ ;;
860+esac
861
862-#line 1270 "configure"
863-#include "confdefs.h"
864+if [ "x$wi_cv_OS" != "x" ] && [ "$wi_cv_OS" != "$OS" ] ; then
865
866-main(){return(0);}
867-EOF
868-if { (eval echo configure:1275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
869- ac_cv_prog_cc_works=yes
870- # If we can't run a trivial program, we are probably using a cross compiler.
871- if (./conftest; exit) 2>/dev/null; then
872- ac_cv_prog_cc_cross=no
873- else
874- ac_cv_prog_cc_cross=yes
875- fi
876-else
877- echo "configure: failed program was:" >&5
878- cat conftest.$ac_ext >&5
879- ac_cv_prog_cc_works=no
880+ { echo "configure: error: Your config.cache file is invalid. It was created on $wi_cv_OS, but this machine is running $OS. Remove the config.cache file if you wish to continue." 1>&2; exit 1; }
881 fi
882-rm -fr conftest*
883-ac_ext=c
884-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
885-ac_cpp='$CPP $CPPFLAGS'
886-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
887-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
888-cross_compiling=$ac_cv_prog_cc_cross
889+wi_cv_OS="$OS"
890
891-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
892-if test $ac_cv_prog_cc_works = no; then
893- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
894+if test "x$HOME_OS" = "x" && test "x$OS" != "x" ; then
895+ HOME_OS="$HOME/$OS"
896 fi
897-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
898-echo "configure:1301: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
899-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
900-cross_compiling=$ac_cv_prog_cc_cross
901
902-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
903-echo "configure:1306: checking whether we are using GNU C" >&5
904-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
905- echo $ac_n "(cached) $ac_c" 1>&6
906-else
907- cat > conftest.c <<EOF
908-#ifdef __GNUC__
909- yes;
910-#endif
911-EOF
912-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
913- ac_cv_prog_gcc=yes
914-else
915- ac_cv_prog_gcc=no
916-fi
917-fi
918
919-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
920
921-if test $ac_cv_prog_gcc = yes; then
922- GCC=yes
923-else
924- GCC=
925-fi
926
927-ac_test_CFLAGS="${CFLAGS+set}"
928-ac_save_CFLAGS="$CFLAGS"
929-CFLAGS=
930-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
931-echo "configure:1334: checking whether ${CC-cc} accepts -g" >&5
932-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
933- echo $ac_n "(cached) $ac_c" 1>&6
934-else
935- echo 'void f(){}' > conftest.c
936-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
937- ac_cv_prog_cc_g=yes
938-else
939- ac_cv_prog_cc_g=no
940-fi
941-rm -rf conftest*
942
943-fi
944+echo $ac_n "checking platform""... $ac_c" 1>&6
945+echo "configure:1394: checking platform" >&5
946+echo "$ac_t"""$OS"" 1>&6
947
948-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
949-if test "$ac_test_CFLAGS" = set; then
950- CFLAGS="$ac_save_CFLAGS"
951-elif test $ac_cv_prog_cc_g = yes; then
952- if test "$GCC" = yes; then
953- CFLAGS="-g -O2"
954- else
955- CFLAGS="-g"
956- fi
957-else
958- if test "$GCC" = yes; then
959- CFLAGS="-O2"
960- else
961- CFLAGS=
962+
963+case "$os" in
964+ linux)
965+ OS="linux-$arch-$libc"
966+ ;;
967+esac
968+
969+if test -f sh/install-sh ; then chmod 755 sh/*.sh sh/config.* sh/install-sh ; fi
970+ac_aux_dir=
971+for ac_dir in sh $srcdir/sh; do
972+ if test -f $ac_dir/install-sh; then
973+ ac_aux_dir=$ac_dir
974+ ac_install_sh="$ac_aux_dir/install-sh -c"
975+ break
976+ elif test -f $ac_dir/install.sh; then
977+ ac_aux_dir=$ac_dir
978+ ac_install_sh="$ac_aux_dir/install.sh -c"
979+ break
980 fi
981+done
982+if test -z "$ac_aux_dir"; then
983+ { echo "configure: error: can not find install-sh or install.sh in sh $srcdir/sh" 1>&2; exit 1; }
984 fi
985+ac_config_guess=$ac_aux_dir/config.guess
986+ac_config_sub=$ac_aux_dir/config.sub
987+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
988
989
990 echo $ac_n "checking if the C compiler can use precompiled headers""... $ac_c" 1>&6
991-echo "configure:1367: checking if the C compiler can use precompiled headers" >&5
992+echo "configure:1426: checking if the C compiler can use precompiled headers" >&5
993 if eval "test \"`echo '$''{'wi_cv_cc_precomp'+set}'`\" = set"; then
994 echo $ac_n "(cached) $ac_c" 1>&6
995 else
996@@ -1407,14 +1466,14 @@
997 #
998 echo "Successfully compiled pchtest.h into the precompiled header file pchtest.h.gch." >&5
999 cat > conftest.$ac_ext <<EOF
1000-#line 1411 "configure"
1001+#line 1470 "configure"
1002 #include "confdefs.h"
1003 #include "pchtest.h"
1004 int main() {
1005 if (FOOBAR == 33) exit(0)
1006 ; return 0; }
1007 EOF
1008-if { (eval echo configure:1418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1009+if { (eval echo configure:1477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1010 rm -rf conftest*
1011 result="yes" ; wi_cv_cc_precomp_type="gcc_gch_files"
1012 else
1013@@ -1433,14 +1492,14 @@
1014 ${CC-cc} $CPPFLAGS -precomp pchtest.h -o pchtest.p >&5 2>&5
1015 if test -s pchtest.p ; then
1016 cat > conftest.$ac_ext <<EOF
1017-#line 1437 "configure"
1018+#line 1496 "configure"
1019 #include "confdefs.h"
1020 #include "pchtest.h"
1021 int main() {
1022 if (FOOBAR == 33) exit(0)
1023 ; return 0; }
1024 EOF
1025-if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1026+if { (eval echo configure:1503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1027 rm -rf conftest*
1028 result="yes" ; wi_cv_cc_precomp_type="gcc_dash_precomp"
1029 else
1030@@ -1518,7 +1577,7 @@
1031 wi_request_no_y2k_warnings=yes
1032
1033 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1034-echo "configure:1522: checking how to run the C preprocessor" >&5
1035+echo "configure:1581: checking how to run the C preprocessor" >&5
1036 # On Suns, sometimes $CPP names a directory.
1037 if test -n "$CPP" && test -d "$CPP"; then
1038 CPP=
1039@@ -1533,13 +1592,13 @@
1040 # On the NeXT, cc -E runs the code through the compiler's parser,
1041 # not just through cpp.
1042 cat > conftest.$ac_ext <<EOF
1043-#line 1537 "configure"
1044+#line 1596 "configure"
1045 #include "confdefs.h"
1046 #include <assert.h>
1047 Syntax Error
1048 EOF
1049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1050-{ (eval echo configure:1543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1051+{ (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1053 if test -z "$ac_err"; then
1054 :
1055@@ -1550,13 +1609,13 @@
1056 rm -rf conftest*
1057 CPP="${CC-cc} -E -traditional-cpp"
1058 cat > conftest.$ac_ext <<EOF
1059-#line 1554 "configure"
1060+#line 1613 "configure"
1061 #include "confdefs.h"
1062 #include <assert.h>
1063 Syntax Error
1064 EOF
1065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1066-{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1067+{ (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1069 if test -z "$ac_err"; then
1070 :
1071@@ -1567,13 +1626,13 @@
1072 rm -rf conftest*
1073 CPP="${CC-cc} -nologo -E"
1074 cat > conftest.$ac_ext <<EOF
1075-#line 1571 "configure"
1076+#line 1630 "configure"
1077 #include "confdefs.h"
1078 #include <assert.h>
1079 Syntax Error
1080 EOF
1081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1082-{ (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1083+{ (eval echo configure:1636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1084 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1085 if test -z "$ac_err"; then
1086 :
1087@@ -1631,7 +1690,7 @@
1088
1089 if test "$GCC" = yes ; then
1090 echo $ac_n "checking the version of GCC""... $ac_c" 1>&6
1091-echo "configure:1635: checking the version of GCC" >&5
1092+echo "configure:1694: checking the version of GCC" >&5
1093 if eval "test \"`echo '$''{'wi_cv_gcc_version'+set}'`\" = set"; then
1094 echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096@@ -1654,7 +1713,7 @@
1097 wi_cv_sunwspro_cc_version2="0"
1098 else
1099 echo $ac_n "checking if the C compiler is Sun WorkShop C""... $ac_c" 1>&6
1100-echo "configure:1658: checking if the C compiler is Sun WorkShop C" >&5
1101+echo "configure:1717: checking if the C compiler is Sun WorkShop C" >&5
1102 if eval "test \"`echo '$''{'wi_cv_cc_is_sunwspro_cc'+set}'`\" = set"; then
1103 echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105@@ -1688,14 +1747,14 @@
1106 echo "$ac_t""$wi_cv_cc_is_sunwspro_cc" 1>&6
1107 if test "$wi_cv_cc_is_sunwspro_cc" = yes ; then
1108 echo $ac_n "checking output of "cc -V" to determine version of Sun WorkShop C""... $ac_c" 1>&6
1109-echo "configure:1692: checking output of "cc -V" to determine version of Sun WorkShop C" >&5
1110+echo "configure:1751: checking output of "cc -V" to determine version of Sun WorkShop C" >&5
1111 echo "$ac_t"""version $wi_cv_sunwspro_cc_version"" 1>&6
1112 fi
1113 fi
1114
1115
1116 echo $ac_n "checking if we should customize your CFLAGS environment variable""... $ac_c" 1>&6
1117-echo "configure:1699: checking if we should customize your CFLAGS environment variable" >&5
1118+echo "configure:1758: checking if we should customize your CFLAGS environment variable" >&5
1119 wi_replace_O_with_g="no"
1120 case "$wi_orig_CFLAGS" in
1121 "")
1122@@ -1755,8 +1814,28 @@
1123 ;;
1124 esac
1125
1126+CC_is_clang="no"
1127+case "$CC" in
1128+ *clang*)
1129+ CC_is_clang="yes"
1130+ ;;
1131+ *)
1132+ cc_dash_v=`${CC-gcc} -v 2>&1 | grep clang 2>/dev/null`
1133+ if test -n "$cc_dash_v" ; then
1134+ CC_is_clang="yes"
1135+ fi
1136+ ;;
1137+esac
1138+
1139 if test "$wi_os_default_cflags" = yes ; then
1140- if test "$GCC" = yes ; then
1141+ if test "$CC_is_clang" = yes ; then
1142+ wi_os_default_cflags="-Weverything -Wno-unknown-warning-option -Wno-disabled-macro-expansion -Wno-missing-variable-declarations -Wno-date-time"
1143+ if test "$wi_replace_O_with_g" = yes ; then
1144+ wi_os_default_cflags="-g $wi_os_default_cflags"
1145+ else
1146+ wi_os_default_cflags="-O2 $wi_os_default_cflags"
1147+ fi
1148+ elif test "$GCC" = yes ; then
1149 #
1150 # gcc
1151 #
1152@@ -1765,7 +1844,7 @@
1153 2.7.*|2.8.*|2.9*)
1154 wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline"
1155 ;;
1156- 3.*)
1157+ 345.*)
1158 wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline -Wmissing-format-attribute -Wformat-security"
1159 wi_gcc_optimizer_flags='-Wdisabled-optimization'
1160 ;;
1161@@ -1916,14 +1995,14 @@
1162 # accepts this flag...
1163 #
1164 cat > conftest.$ac_ext <<EOF
1165-#line 1920 "configure"
1166+#line 1999 "configure"
1167 #include "confdefs.h"
1168
1169 int main() {
1170 int junk;
1171 ; return 0; }
1172 EOF
1173-if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1174+if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1175 :
1176 else
1177 echo "configure: failed program was:" >&5
1178@@ -1941,7 +2020,7 @@
1179
1180
1181 echo $ac_n "checking for ldd""... $ac_c" 1>&6
1182-echo "configure:1945: checking for ldd" >&5
1183+echo "configure:2024: checking for ldd" >&5
1184 if eval "test \"`echo '$''{'wi_cv_prog_ldd'+set}'`\" = set"; then
1185 echo $ac_n "(cached) $ac_c" 1>&6
1186 else
1187@@ -1976,7 +2055,7 @@
1188 # try these
1189 CFLAGS="$CFLAGS $ac_cv_ssp_flags"
1190 cat > conftest.$ac_ext <<EOF
1191-#line 1980 "configure"
1192+#line 2059 "configure"
1193 #include "confdefs.h"
1194
1195 #include <stdio.h>
1196@@ -1988,7 +2067,7 @@
1197
1198 ; return 0; }
1199 EOF
1200-if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1201+if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1202 :
1203 else
1204 echo "configure: failed program was:" >&5
1205@@ -2004,13 +2083,13 @@
1206 fi
1207 unset oldCFLAGS
1208 echo $ac_n "checking if stack protection CFLAGS can be used""... $ac_c" 1>&6
1209-echo "configure:2008: checking if stack protection CFLAGS can be used" >&5
1210+echo "configure:2087: checking if stack protection CFLAGS can be used" >&5
1211 echo "$ac_t""$ac_cv_ssp_flags" 1>&6
1212
1213 fi
1214
1215 echo $ac_n "checking if compiled programs use a shared library version of libgcc""... $ac_c" 1>&6
1216-echo "configure:2014: checking if compiled programs use a shared library version of libgcc" >&5
1217+echo "configure:2093: checking if compiled programs use a shared library version of libgcc" >&5
1218 if eval "test \"`echo '$''{'wi_cv_shared_libgcc'+set}'`\" = set"; then
1219 echo $ac_n "(cached) $ac_c" 1>&6
1220 else
1221@@ -2049,7 +2128,7 @@
1222 # accepts this flag...
1223 #
1224 cat > conftest.$ac_ext <<EOF
1225-#line 2053 "configure"
1226+#line 2132 "configure"
1227 #include "confdefs.h"
1228
1229 #include <stdio.h>
1230@@ -2059,7 +2138,7 @@
1231 strncpy(testvar, "hello world", sizeof(testvar) - 1);
1232 ; return 0; }
1233 EOF
1234-if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1235+if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1236 :
1237 else
1238 echo "configure: failed program was:" >&5
1239@@ -2090,7 +2169,7 @@
1240 # accepts this flag...
1241 #
1242 cat > conftest.$ac_ext <<EOF
1243-#line 2094 "configure"
1244+#line 2173 "configure"
1245 #include "confdefs.h"
1246
1247 #include <stdio.h>
1248@@ -2100,7 +2179,7 @@
1249 strncpy(testvar, "hello world", sizeof(testvar) - 1);
1250 ; return 0; }
1251 EOF
1252-if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1253+if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1254 :
1255 else
1256 echo "configure: failed program was:" >&5
1257@@ -2140,7 +2219,7 @@
1258 # Was it ./configure --enable-debug ?
1259 #
1260 echo $ac_n "checking if this is a debug build""... $ac_c" 1>&6
1261-echo "configure:2144: checking if this is a debug build" >&5
1262+echo "configure:2223: checking if this is a debug build" >&5
1263 if test "$DEBUGBUILD" = yes ; then
1264 echo "$ac_t""yes" 1>&6
1265 CFLAGS="$DEBUGCFLAGS"
1266@@ -2154,7 +2233,7 @@
1267
1268 CFLAGS=`echo "$CFLAGS" | sed s/-D__STDC_EXT__//g`
1269 echo $ac_n "checking if -D__STDC_EXT__ is needed with GCC on HP-UX""... $ac_c" 1>&6
1270-echo "configure:2158: checking if -D__STDC_EXT__ is needed with GCC on HP-UX" >&5
1271+echo "configure:2237: checking if -D__STDC_EXT__ is needed with GCC on HP-UX" >&5
1272 if test "$cross_compiling" = yes; then
1273
1274 # action if cross-compiling, guess
1275@@ -2163,7 +2242,7 @@
1276
1277 else
1278 cat > conftest.$ac_ext <<EOF
1279-#line 2167 "configure"
1280+#line 2246 "configure"
1281 #include "confdefs.h"
1282
1283 #include <stdio.h>
1284@@ -2179,7 +2258,7 @@
1285 #endif
1286 }
1287 EOF
1288-if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1289+if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1290 then
1291
1292 # action if true
1293@@ -2212,17 +2291,17 @@
1294 do
1295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1297-echo "configure:2216: checking for $ac_hdr" >&5
1298+echo "configure:2295: checking for $ac_hdr" >&5
1299 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1300 echo $ac_n "(cached) $ac_c" 1>&6
1301 else
1302 cat > conftest.$ac_ext <<EOF
1303-#line 2221 "configure"
1304+#line 2300 "configure"
1305 #include "confdefs.h"
1306 #include <$ac_hdr>
1307 EOF
1308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1309-{ (eval echo configure:2226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1310+{ (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1312 if test -z "$ac_err"; then
1313 rm -rf conftest*
1314@@ -2251,7 +2330,7 @@
1315 if test "x$ac_cv_sizeof_stat_st_size" = x ; then
1316
1317 echo $ac_n "checking size of st_size field in struct stat""... $ac_c" 1>&6
1318-echo "configure:2255: checking size of st_size field in struct stat" >&5
1319+echo "configure:2334: checking size of st_size field in struct stat" >&5
1320
1321 if test "x$ac_cv_header_unistd_h" = x ; then
1322 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_ST_SIZE." 1>&2; exit 1; }
1323@@ -2266,7 +2345,7 @@
1324
1325 else
1326 cat > conftest.$ac_ext <<EOF
1327-#line 2270 "configure"
1328+#line 2349 "configure"
1329 #include "confdefs.h"
1330
1331 /* program */
1332@@ -2296,7 +2375,7 @@
1333 }
1334
1335 EOF
1336-if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1337+if { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1338 then
1339
1340 # action if true
1341@@ -2332,7 +2411,7 @@
1342 if test "x$ac_cv_sizeof_off_t" = x ; then
1343
1344 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
1345-echo "configure:2336: checking size of off_t" >&5
1346+echo "configure:2415: checking size of off_t" >&5
1347
1348 if test "x$ac_cv_header_unistd_h" = x ; then
1349 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF_T." 1>&2; exit 1; }
1350@@ -2347,7 +2426,7 @@
1351
1352 else
1353 cat > conftest.$ac_ext <<EOF
1354-#line 2351 "configure"
1355+#line 2430 "configure"
1356 #include "confdefs.h"
1357
1358 /* program */
1359@@ -2377,7 +2456,7 @@
1360 }
1361
1362 EOF
1363-if { (eval echo configure:2381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1364+if { (eval echo configure:2460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1365 then
1366
1367 # action if true
1368@@ -2426,7 +2505,7 @@
1369 wi_cv_lfs64="yes"
1370
1371 echo $ac_n "checking size of st_size field in struct stat64""... $ac_c" 1>&6
1372-echo "configure:2430: checking size of st_size field in struct stat64" >&5
1373+echo "configure:2509: checking size of st_size field in struct stat64" >&5
1374
1375 if test "x$ac_cv_header_unistd_h" = x ; then
1376 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_STAT64_ST_SIZE." 1>&2; exit 1; }
1377@@ -2441,7 +2520,7 @@
1378
1379 else
1380 cat > conftest.$ac_ext <<EOF
1381-#line 2445 "configure"
1382+#line 2524 "configure"
1383 #include "confdefs.h"
1384
1385 /* program */
1386@@ -2471,7 +2550,7 @@
1387 }
1388
1389 EOF
1390-if { (eval echo configure:2475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1391+if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1392 then
1393
1394 # action if true
1395@@ -2509,7 +2588,7 @@
1396
1397
1398 echo $ac_n "checking size of off64_t""... $ac_c" 1>&6
1399-echo "configure:2513: checking size of off64_t" >&5
1400+echo "configure:2592: checking size of off64_t" >&5
1401
1402 if test "x$ac_cv_header_unistd_h" = x ; then
1403 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF64_T." 1>&2; exit 1; }
1404@@ -2524,7 +2603,7 @@
1405
1406 else
1407 cat > conftest.$ac_ext <<EOF
1408-#line 2528 "configure"
1409+#line 2607 "configure"
1410 #include "confdefs.h"
1411
1412 /* program */
1413@@ -2554,7 +2633,7 @@
1414 }
1415
1416 EOF
1417-if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1418+if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1419 then
1420
1421 # action if true
1422@@ -2592,7 +2671,7 @@
1423
1424
1425 echo $ac_n "checking size of st_size field in struct stat""... $ac_c" 1>&6
1426-echo "configure:2596: checking size of st_size field in struct stat" >&5
1427+echo "configure:2675: checking size of st_size field in struct stat" >&5
1428
1429 if test "x$ac_cv_header_unistd_h" = x ; then
1430 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_ST_SIZE." 1>&2; exit 1; }
1431@@ -2607,7 +2686,7 @@
1432
1433 else
1434 cat > conftest.$ac_ext <<EOF
1435-#line 2611 "configure"
1436+#line 2690 "configure"
1437 #include "confdefs.h"
1438
1439 /* program */
1440@@ -2637,7 +2716,7 @@
1441 }
1442
1443 EOF
1444-if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1445+if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1446 then
1447
1448 # action if true
1449@@ -2671,7 +2750,7 @@
1450
1451
1452 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
1453-echo "configure:2675: checking size of off_t" >&5
1454+echo "configure:2754: checking size of off_t" >&5
1455
1456 if test "x$ac_cv_header_unistd_h" = x ; then
1457 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF_T." 1>&2; exit 1; }
1458@@ -2686,7 +2765,7 @@
1459
1460 else
1461 cat > conftest.$ac_ext <<EOF
1462-#line 2690 "configure"
1463+#line 2769 "configure"
1464 #include "confdefs.h"
1465
1466 /* program */
1467@@ -2716,7 +2795,7 @@
1468 }
1469
1470 EOF
1471-if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1472+if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1473 then
1474
1475 # action if true
1476@@ -2764,7 +2843,7 @@
1477 fi
1478
1479 echo $ac_n "checking if we should add CFLAGS for LFS64 support""... $ac_c" 1>&6
1480-echo "configure:2768: checking if we should add CFLAGS for LFS64 support" >&5
1481+echo "configure:2847: checking if we should add CFLAGS for LFS64 support" >&5
1482 echo "$ac_t""$result" 1>&6
1483
1484 else
1485@@ -2775,7 +2854,7 @@
1486
1487 if test "$GCC" = yes ; then
1488 echo $ac_n "checking the version of GCC""... $ac_c" 1>&6
1489-echo "configure:2779: checking the version of GCC" >&5
1490+echo "configure:2858: checking the version of GCC" >&5
1491 if eval "test \"`echo '$''{'wi_cv_gcc_version'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494@@ -2798,7 +2877,7 @@
1495 wi_cv_sunwspro_cc_version2="0"
1496 else
1497 echo $ac_n "checking if the C compiler is Sun WorkShop C""... $ac_c" 1>&6
1498-echo "configure:2802: checking if the C compiler is Sun WorkShop C" >&5
1499+echo "configure:2881: checking if the C compiler is Sun WorkShop C" >&5
1500 if eval "test \"`echo '$''{'wi_cv_cc_is_sunwspro_cc'+set}'`\" = set"; then
1501 echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503@@ -2832,14 +2911,14 @@
1504 echo "$ac_t""$wi_cv_cc_is_sunwspro_cc" 1>&6
1505 if test "$wi_cv_cc_is_sunwspro_cc" = yes ; then
1506 echo $ac_n "checking output of "cc -V" to determine version of Sun WorkShop C""... $ac_c" 1>&6
1507-echo "configure:2836: checking output of "cc -V" to determine version of Sun WorkShop C" >&5
1508+echo "configure:2915: checking output of "cc -V" to determine version of Sun WorkShop C" >&5
1509 echo "$ac_t"""version $wi_cv_sunwspro_cc_version"" 1>&6
1510 fi
1511 fi
1512
1513
1514 echo $ac_n "checking if we should customize your CFLAGS environment variable""... $ac_c" 1>&6
1515-echo "configure:2843: checking if we should customize your CFLAGS environment variable" >&5
1516+echo "configure:2922: checking if we should customize your CFLAGS environment variable" >&5
1517 wi_replace_O_with_g="no"
1518 case "$wi_orig_CFLAGS" in
1519 "")
1520@@ -2899,8 +2978,28 @@
1521 ;;
1522 esac
1523
1524+CC_is_clang="no"
1525+case "$CC" in
1526+ *clang*)
1527+ CC_is_clang="yes"
1528+ ;;
1529+ *)
1530+ cc_dash_v=`${CC-gcc} -v 2>&1 | grep clang 2>/dev/null`
1531+ if test -n "$cc_dash_v" ; then
1532+ CC_is_clang="yes"
1533+ fi
1534+ ;;
1535+esac
1536+
1537 if test "$wi_os_default_cflags" = yes ; then
1538- if test "$GCC" = yes ; then
1539+ if test "$CC_is_clang" = yes ; then
1540+ wi_os_default_cflags="-Weverything -Wno-unknown-warning-option -Wno-disabled-macro-expansion -Wno-missing-variable-declarations -Wno-date-time"
1541+ if test "$wi_replace_O_with_g" = yes ; then
1542+ wi_os_default_cflags="-g $wi_os_default_cflags"
1543+ else
1544+ wi_os_default_cflags="-O2 $wi_os_default_cflags"
1545+ fi
1546+ elif test "$GCC" = yes ; then
1547 #
1548 # gcc
1549 #
1550@@ -2909,7 +3008,7 @@
1551 2.7.*|2.8.*|2.9*)
1552 wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline"
1553 ;;
1554- 3.*)
1555+ 345.*)
1556 wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline -Wmissing-format-attribute -Wformat-security"
1557 wi_gcc_optimizer_flags='-Wdisabled-optimization'
1558 ;;
1559@@ -3060,14 +3159,14 @@
1560 # accepts this flag...
1561 #
1562 cat > conftest.$ac_ext <<EOF
1563-#line 3064 "configure"
1564+#line 3163 "configure"
1565 #include "confdefs.h"
1566
1567 int main() {
1568 int junk;
1569 ; return 0; }
1570 EOF
1571-if { (eval echo configure:3071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1572+if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1573 :
1574 else
1575 echo "configure: failed program was:" >&5
1576@@ -3085,7 +3184,7 @@
1577
1578
1579 echo $ac_n "checking for ldd""... $ac_c" 1>&6
1580-echo "configure:3089: checking for ldd" >&5
1581+echo "configure:3188: checking for ldd" >&5
1582 if eval "test \"`echo '$''{'wi_cv_prog_ldd'+set}'`\" = set"; then
1583 echo $ac_n "(cached) $ac_c" 1>&6
1584 else
1585@@ -3120,7 +3219,7 @@
1586 # try these
1587 CFLAGS="$CFLAGS $ac_cv_ssp_flags"
1588 cat > conftest.$ac_ext <<EOF
1589-#line 3124 "configure"
1590+#line 3223 "configure"
1591 #include "confdefs.h"
1592
1593 #include <stdio.h>
1594@@ -3132,7 +3231,7 @@
1595
1596 ; return 0; }
1597 EOF
1598-if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1599+if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1600 :
1601 else
1602 echo "configure: failed program was:" >&5
1603@@ -3148,13 +3247,13 @@
1604 fi
1605 unset oldCFLAGS
1606 echo $ac_n "checking if stack protection CFLAGS can be used""... $ac_c" 1>&6
1607-echo "configure:3152: checking if stack protection CFLAGS can be used" >&5
1608+echo "configure:3251: checking if stack protection CFLAGS can be used" >&5
1609 echo "$ac_t""$ac_cv_ssp_flags" 1>&6
1610
1611 fi
1612
1613 echo $ac_n "checking if compiled programs use a shared library version of libgcc""... $ac_c" 1>&6
1614-echo "configure:3158: checking if compiled programs use a shared library version of libgcc" >&5
1615+echo "configure:3257: checking if compiled programs use a shared library version of libgcc" >&5
1616 if eval "test \"`echo '$''{'wi_cv_shared_libgcc'+set}'`\" = set"; then
1617 echo $ac_n "(cached) $ac_c" 1>&6
1618 else
1619@@ -3193,7 +3292,7 @@
1620 # accepts this flag...
1621 #
1622 cat > conftest.$ac_ext <<EOF
1623-#line 3197 "configure"
1624+#line 3296 "configure"
1625 #include "confdefs.h"
1626
1627 #include <stdio.h>
1628@@ -3203,7 +3302,7 @@
1629 strncpy(testvar, "hello world", sizeof(testvar) - 1);
1630 ; return 0; }
1631 EOF
1632-if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1633+if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1634 :
1635 else
1636 echo "configure: failed program was:" >&5
1637@@ -3234,7 +3333,7 @@
1638 # accepts this flag...
1639 #
1640 cat > conftest.$ac_ext <<EOF
1641-#line 3238 "configure"
1642+#line 3337 "configure"
1643 #include "confdefs.h"
1644
1645 #include <stdio.h>
1646@@ -3244,7 +3343,7 @@
1647 strncpy(testvar, "hello world", sizeof(testvar) - 1);
1648 ; return 0; }
1649 EOF
1650-if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1651+if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1652 :
1653 else
1654 echo "configure: failed program was:" >&5
1655@@ -3284,7 +3383,7 @@
1656 # Was it ./configure --enable-debug ?
1657 #
1658 echo $ac_n "checking if this is a debug build""... $ac_c" 1>&6
1659-echo "configure:3288: checking if this is a debug build" >&5
1660+echo "configure:3387: checking if this is a debug build" >&5
1661 if test "$DEBUGBUILD" = yes ; then
1662 echo "$ac_t""yes" 1>&6
1663 CFLAGS="$DEBUGCFLAGS"
1664@@ -3298,7 +3397,7 @@
1665
1666 CFLAGS=`echo "$CFLAGS" | sed s/-D__STDC_EXT__//g`
1667 echo $ac_n "checking if -D__STDC_EXT__ is needed with GCC on HP-UX""... $ac_c" 1>&6
1668-echo "configure:3302: checking if -D__STDC_EXT__ is needed with GCC on HP-UX" >&5
1669+echo "configure:3401: checking if -D__STDC_EXT__ is needed with GCC on HP-UX" >&5
1670 if test "$cross_compiling" = yes; then
1671
1672 # action if cross-compiling, guess
1673@@ -3307,7 +3406,7 @@
1674
1675 else
1676 cat > conftest.$ac_ext <<EOF
1677-#line 3311 "configure"
1678+#line 3410 "configure"
1679 #include "confdefs.h"
1680
1681 #include <stdio.h>
1682@@ -3323,7 +3422,7 @@
1683 #endif
1684 }
1685 EOF
1686-if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1687+if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1688 then
1689
1690 # action if true
1691@@ -3356,17 +3455,17 @@
1692 do
1693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1695-echo "configure:3360: checking for $ac_hdr" >&5
1696+echo "configure:3459: checking for $ac_hdr" >&5
1697 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1698 echo $ac_n "(cached) $ac_c" 1>&6
1699 else
1700 cat > conftest.$ac_ext <<EOF
1701-#line 3365 "configure"
1702+#line 3464 "configure"
1703 #include "confdefs.h"
1704 #include <$ac_hdr>
1705 EOF
1706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1707-{ (eval echo configure:3370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1708+{ (eval echo configure:3469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1710 if test -z "$ac_err"; then
1711 rm -rf conftest*
1712@@ -3395,7 +3494,7 @@
1713 if test "x$ac_cv_sizeof_stat_st_size" = x ; then
1714
1715 echo $ac_n "checking size of st_size field in struct stat""... $ac_c" 1>&6
1716-echo "configure:3399: checking size of st_size field in struct stat" >&5
1717+echo "configure:3498: checking size of st_size field in struct stat" >&5
1718
1719 if test "x$ac_cv_header_unistd_h" = x ; then
1720 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_ST_SIZE." 1>&2; exit 1; }
1721@@ -3410,7 +3509,7 @@
1722
1723 else
1724 cat > conftest.$ac_ext <<EOF
1725-#line 3414 "configure"
1726+#line 3513 "configure"
1727 #include "confdefs.h"
1728
1729 /* program */
1730@@ -3440,7 +3539,7 @@
1731 }
1732
1733 EOF
1734-if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1735+if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1736 then
1737
1738 # action if true
1739@@ -3476,7 +3575,7 @@
1740 if test "x$ac_cv_sizeof_off_t" = x ; then
1741
1742 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
1743-echo "configure:3480: checking size of off_t" >&5
1744+echo "configure:3579: checking size of off_t" >&5
1745
1746 if test "x$ac_cv_header_unistd_h" = x ; then
1747 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF_T." 1>&2; exit 1; }
1748@@ -3491,7 +3590,7 @@
1749
1750 else
1751 cat > conftest.$ac_ext <<EOF
1752-#line 3495 "configure"
1753+#line 3594 "configure"
1754 #include "confdefs.h"
1755
1756 /* program */
1757@@ -3521,7 +3620,7 @@
1758 }
1759
1760 EOF
1761-if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1762+if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1763 then
1764
1765 # action if true
1766@@ -3557,7 +3656,7 @@
1767 if test "x$ac_cv_sizeof_size_t" = x ; then
1768
1769 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
1770-echo "configure:3561: checking size of size_t" >&5
1771+echo "configure:3660: checking size of size_t" >&5
1772
1773 if test "x$ac_cv_header_unistd_h" = x ; then
1774 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_SIZE_T." 1>&2; exit 1; }
1775@@ -3572,7 +3671,7 @@
1776
1777 else
1778 cat > conftest.$ac_ext <<EOF
1779-#line 3576 "configure"
1780+#line 3675 "configure"
1781 #include "confdefs.h"
1782
1783 /* program */
1784@@ -3602,7 +3701,7 @@
1785 }
1786
1787 EOF
1788-if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1789+if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1790 then
1791
1792 # action if true
1793@@ -3656,7 +3755,7 @@
1794 # Recheck, to see if the defines took effect.
1795
1796 echo $ac_n "checking size of st_size field in struct stat""... $ac_c" 1>&6
1797-echo "configure:3660: checking size of st_size field in struct stat" >&5
1798+echo "configure:3759: checking size of st_size field in struct stat" >&5
1799
1800 if test "x$ac_cv_header_unistd_h" = x ; then
1801 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_ST_SIZE." 1>&2; exit 1; }
1802@@ -3671,7 +3770,7 @@
1803
1804 else
1805 cat > conftest.$ac_ext <<EOF
1806-#line 3675 "configure"
1807+#line 3774 "configure"
1808 #include "confdefs.h"
1809
1810 /* program */
1811@@ -3701,7 +3800,7 @@
1812 }
1813
1814 EOF
1815-if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1816+if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1817 then
1818
1819 # action if true
1820@@ -3735,7 +3834,7 @@
1821
1822
1823 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
1824-echo "configure:3739: checking size of off_t" >&5
1825+echo "configure:3838: checking size of off_t" >&5
1826
1827 if test "x$ac_cv_header_unistd_h" = x ; then
1828 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF_T." 1>&2; exit 1; }
1829@@ -3750,7 +3849,7 @@
1830
1831 else
1832 cat > conftest.$ac_ext <<EOF
1833-#line 3754 "configure"
1834+#line 3853 "configure"
1835 #include "confdefs.h"
1836
1837 /* program */
1838@@ -3780,7 +3879,7 @@
1839 }
1840
1841 EOF
1842-if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1843+if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1844 then
1845
1846 # action if true
1847@@ -3814,7 +3913,7 @@
1848
1849
1850 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
1851-echo "configure:3818: checking size of size_t" >&5
1852+echo "configure:3917: checking size of size_t" >&5
1853
1854 if test "x$ac_cv_header_unistd_h" = x ; then
1855 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_SIZE_T." 1>&2; exit 1; }
1856@@ -3829,7 +3928,7 @@
1857
1858 else
1859 cat > conftest.$ac_ext <<EOF
1860-#line 3833 "configure"
1861+#line 3932 "configure"
1862 #include "confdefs.h"
1863
1864 /* program */
1865@@ -3859,7 +3958,7 @@
1866 }
1867
1868 EOF
1869-if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1870+if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1871 then
1872
1873 # action if true
1874@@ -3903,7 +4002,7 @@
1875 unset ac_cv_sizeof_stat_st_size ac_cv_sizeof_off_t
1876
1877 echo $ac_n "checking size of st_size field in struct stat64""... $ac_c" 1>&6
1878-echo "configure:3907: checking size of st_size field in struct stat64" >&5
1879+echo "configure:4006: checking size of st_size field in struct stat64" >&5
1880
1881 if test "x$ac_cv_header_unistd_h" = x ; then
1882 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_STAT64_ST_SIZE." 1>&2; exit 1; }
1883@@ -3918,7 +4017,7 @@
1884
1885 else
1886 cat > conftest.$ac_ext <<EOF
1887-#line 3922 "configure"
1888+#line 4021 "configure"
1889 #include "confdefs.h"
1890
1891 /* program */
1892@@ -3948,7 +4047,7 @@
1893 }
1894
1895 EOF
1896-if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1897+if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1898 then
1899
1900 # action if true
1901@@ -3986,7 +4085,7 @@
1902
1903
1904 echo $ac_n "checking size of off64_t""... $ac_c" 1>&6
1905-echo "configure:3990: checking size of off64_t" >&5
1906+echo "configure:4089: checking size of off64_t" >&5
1907
1908 if test "x$ac_cv_header_unistd_h" = x ; then
1909 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF64_T." 1>&2; exit 1; }
1910@@ -4001,7 +4100,7 @@
1911
1912 else
1913 cat > conftest.$ac_ext <<EOF
1914-#line 4005 "configure"
1915+#line 4104 "configure"
1916 #include "confdefs.h"
1917
1918 /* program */
1919@@ -4031,7 +4130,7 @@
1920 }
1921
1922 EOF
1923-if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1924+if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1925 then
1926
1927 # action if true
1928@@ -4069,7 +4168,7 @@
1929
1930
1931 echo $ac_n "checking size of st_size field in struct stat""... $ac_c" 1>&6
1932-echo "configure:4073: checking size of st_size field in struct stat" >&5
1933+echo "configure:4172: checking size of st_size field in struct stat" >&5
1934
1935 if test "x$ac_cv_header_unistd_h" = x ; then
1936 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_ST_SIZE." 1>&2; exit 1; }
1937@@ -4084,7 +4183,7 @@
1938
1939 else
1940 cat > conftest.$ac_ext <<EOF
1941-#line 4088 "configure"
1942+#line 4187 "configure"
1943 #include "confdefs.h"
1944
1945 /* program */
1946@@ -4114,7 +4213,7 @@
1947 }
1948
1949 EOF
1950-if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1951+if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1952 then
1953
1954 # action if true
1955@@ -4148,7 +4247,7 @@
1956
1957
1958 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
1959-echo "configure:4152: checking size of off_t" >&5
1960+echo "configure:4251: checking size of off_t" >&5
1961
1962 if test "x$ac_cv_header_unistd_h" = x ; then
1963 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SIZEOF_OFF_T." 1>&2; exit 1; }
1964@@ -4163,7 +4262,7 @@
1965
1966 else
1967 cat > conftest.$ac_ext <<EOF
1968-#line 4167 "configure"
1969+#line 4266 "configure"
1970 #include "confdefs.h"
1971
1972 /* program */
1973@@ -4193,7 +4292,7 @@
1974 }
1975
1976 EOF
1977-if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1978+if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1979 then
1980
1981 # action if true
1982@@ -4228,7 +4327,7 @@
1983 fi
1984 fi
1985 echo $ac_n "checking if we should add CFLAGS for Large File Support""... $ac_c" 1>&6
1986-echo "configure:4232: checking if we should add CFLAGS for Large File Support" >&5
1987+echo "configure:4331: checking if we should add CFLAGS for Large File Support" >&5
1988 echo "$ac_t""$result" 1>&6
1989 unset orig_CFLAGS
1990
1991@@ -4260,7 +4359,7 @@
1992 ;;
1993 esac
1994 echo $ac_n "checking if we should add CFLAGS for reentrancy""... $ac_c" 1>&6
1995-echo "configure:4264: checking if we should add CFLAGS for reentrancy" >&5
1996+echo "configure:4363: checking if we should add CFLAGS for reentrancy" >&5
1997 echo "$ac_t""$result" 1>&6
1998
1999
2000@@ -4270,7 +4369,7 @@
2001 ac_cv_macosx_ldflags=no
2002
2003 echo $ac_n "checking if MACOSX_DEPLOYMENT_TARGET environment variable is set""... $ac_c" 1>&6
2004-echo "configure:4274: checking if MACOSX_DEPLOYMENT_TARGET environment variable is set" >&5
2005+echo "configure:4373: checking if MACOSX_DEPLOYMENT_TARGET environment variable is set" >&5
2006 echo "$ac_t""${MACOSX_DEPLOYMENT_TARGET-no}" 1>&6
2007
2008 test_macosx_sdk_path=`/bin/ls -1d /Developer/SDKs/MacOSX10.*u.sdk 2>/dev/null | sed -n 1,1p`
2009@@ -4298,7 +4397,7 @@
2010 ;;
2011 esac
2012 echo $ac_n "checking if Mac OS X universal SDK is available""... $ac_c" 1>&6
2013-echo "configure:4302: checking if Mac OS X universal SDK is available" >&5
2014+echo "configure:4401: checking if Mac OS X universal SDK is available" >&5
2015 echo "$ac_t""${test_macosx_sdk_path-no}" 1>&6
2016
2017 if test "${use_macosx_universal}" != no && test "${test_macosx_sdk_path}" != "no" ; then
2018@@ -4352,13 +4451,13 @@
2019 # esac
2020 fi
2021 echo $ac_n "checking if we should add CFLAGS for Mac OS X""... $ac_c" 1>&6
2022-echo "configure:4356: checking if we should add CFLAGS for Mac OS X" >&5
2023+echo "configure:4455: checking if we should add CFLAGS for Mac OS X" >&5
2024 echo "$ac_t""$ac_cv_macosx_cflags" 1>&6
2025 fi
2026
2027
2028 echo $ac_n "checking for strip""... $ac_c" 1>&6
2029-echo "configure:4362: checking for strip" >&5
2030+echo "configure:4461: checking for strip" >&5
2031 STRIP="strip"
2032 if [ "x$cross_compiling" = "xyes" ] ; then
2033 machine=`${CC-gcc} -dumpmachine 2>/dev/null`
2034@@ -4412,7 +4511,7 @@
2035 STRIPFLAG="$SFLAG"
2036
2037 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2038-echo "configure:4416: checking for object suffix" >&5
2039+echo "configure:4515: checking for object suffix" >&5
2040 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2041 echo $ac_n "(cached) $ac_c" 1>&6
2042 else
2043@@ -4421,7 +4520,7 @@
2044 ac_cv_objext="o"
2045 else
2046 echo 'int i = 1;' > conftest.$ac_ext
2047-if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2048+if { (eval echo configure:4524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2049 for ac_file in conftest.*; do
2050 case $ac_file in
2051 *.c) ;;
2052@@ -4440,12 +4539,12 @@
2053 ac_objext=$ac_cv_objext
2054
2055 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2056-echo "configure:4444: checking for Cygwin environment" >&5
2057+echo "configure:4543: checking for Cygwin environment" >&5
2058 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2059 echo $ac_n "(cached) $ac_c" 1>&6
2060 else
2061 cat > conftest.$ac_ext <<EOF
2062-#line 4449 "configure"
2063+#line 4548 "configure"
2064 #include "confdefs.h"
2065
2066 int main() {
2067@@ -4456,7 +4555,7 @@
2068 return __CYGWIN__;
2069 ; return 0; }
2070 EOF
2071-if { (eval echo configure:4460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2072+if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2073 rm -rf conftest*
2074 ac_cv_cygwin=yes
2075 else
2076@@ -4473,19 +4572,19 @@
2077 CYGWIN=
2078 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2079 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2080-echo "configure:4477: checking for mingw32 environment" >&5
2081+echo "configure:4576: checking for mingw32 environment" >&5
2082 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085 cat > conftest.$ac_ext <<EOF
2086-#line 4482 "configure"
2087+#line 4581 "configure"
2088 #include "confdefs.h"
2089
2090 int main() {
2091 return __MINGW32__;
2092 ; return 0; }
2093 EOF
2094-if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2095+if { (eval echo configure:4588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2096 rm -rf conftest*
2097 ac_cv_mingw32=yes
2098 else
2099@@ -4504,7 +4603,7 @@
2100
2101
2102 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2103-echo "configure:4508: checking for executable suffix" >&5
2104+echo "configure:4607: checking for executable suffix" >&5
2105 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2106 echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108@@ -4516,7 +4615,7 @@
2109 rm -rf conftest*
2110 echo 'int main () { return 0; }' > conftest.$ac_ext
2111 ac_cv_exeext=
2112- if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2113+ if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2114 for file in conftest.*; do
2115 case $file in
2116 *.c | *.o | *.obj) ;;
2117@@ -4550,14 +4649,15 @@
2118
2119 if test "${SYS-sunos}" = sunos ; then
2120 echo $ac_n "checking for System V compatibility directories""... $ac_c" 1>&6
2121-echo "configure:4554: checking for System V compatibility directories" >&5
2122+echo "configure:4653: checking for System V compatibility directories" >&5
2123 echo "$ac_t""" 1>&6
2124
2125 incdir=""/usr/5include""
2126-if test -r $incdir ; then
2127+echo "wi_extra_idir $incdir" 1>&5
2128+if test -r "$incdir" ; then
2129 case "$CPPFLAGS" in
2130 *${incdir}*)
2131- # echo " + already had $incdir" 1>&6
2132+ echo " + already had $incdir" 1>&5
2133 ;;
2134 *)
2135 if test "$CPPFLAGS" = "" ; then
2136@@ -4565,17 +4665,18 @@
2137 else
2138 CPPFLAGS="$CPPFLAGS -I$incdir"
2139 fi
2140- echo " + found $incdir" 1>&6
2141+ echo " + found $incdir" 1>&5
2142 ;;
2143 esac
2144 fi
2145
2146
2147 libdir=""/usr/5lib""
2148-if test -r $libdir ; then
2149+echo "wi_extra_ldir $libdir" 1>&5
2150+if test -r "$libdir" ; then
2151 case "$LDFLAGS" in
2152 *${libdir}*)
2153- # echo " + already had $libdir" 1>&6
2154+ echo " + already had $libdir" 1>&5
2155 ;;
2156 *)
2157 if test "$LDFLAGS" = "" ; then
2158@@ -4583,7 +4684,7 @@
2159 else
2160 LDFLAGS="$LDFLAGS -L$libdir"
2161 fi
2162- echo " + found $libdir" 1>&6
2163+ echo " + found $libdir" 1>&5
2164 ;;
2165 esac
2166 fi
2167@@ -4600,12 +4701,12 @@
2168
2169
2170 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2171-echo "configure:4604: checking for ANSI C header files" >&5
2172+echo "configure:4705: checking for ANSI C header files" >&5
2173 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2174 echo $ac_n "(cached) $ac_c" 1>&6
2175 else
2176 cat > conftest.$ac_ext <<EOF
2177-#line 4609 "configure"
2178+#line 4710 "configure"
2179 #include "confdefs.h"
2180 #include <stdlib.h>
2181 #include <stdarg.h>
2182@@ -4613,7 +4714,7 @@
2183 #include <float.h>
2184 EOF
2185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2186-{ (eval echo configure:4617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2187+{ (eval echo configure:4718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2189 if test -z "$ac_err"; then
2190 rm -rf conftest*
2191@@ -4630,7 +4731,7 @@
2192 if test $ac_cv_header_stdc = yes; then
2193 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2194 cat > conftest.$ac_ext <<EOF
2195-#line 4634 "configure"
2196+#line 4735 "configure"
2197 #include "confdefs.h"
2198 #include <string.h>
2199 EOF
2200@@ -4648,7 +4749,7 @@
2201 if test $ac_cv_header_stdc = yes; then
2202 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2203 cat > conftest.$ac_ext <<EOF
2204-#line 4652 "configure"
2205+#line 4753 "configure"
2206 #include "confdefs.h"
2207 #include <stdlib.h>
2208 EOF
2209@@ -4669,7 +4770,7 @@
2210 :
2211 else
2212 cat > conftest.$ac_ext <<EOF
2213-#line 4673 "configure"
2214+#line 4774 "configure"
2215 #include "confdefs.h"
2216 #include <ctype.h>
2217 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2218@@ -4680,7 +4781,7 @@
2219 exit (0); }
2220
2221 EOF
2222-if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2223+if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2224 then
2225 :
2226 else
2227@@ -4707,17 +4808,17 @@
2228 do
2229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2231-echo "configure:4711: checking for $ac_hdr" >&5
2232+echo "configure:4812: checking for $ac_hdr" >&5
2233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236 cat > conftest.$ac_ext <<EOF
2237-#line 4716 "configure"
2238+#line 4817 "configure"
2239 #include "confdefs.h"
2240 #include <$ac_hdr>
2241 EOF
2242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2243-{ (eval echo configure:4721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2244+{ (eval echo configure:4822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2246 if test -z "$ac_err"; then
2247 rm -rf conftest*
2248@@ -4744,12 +4845,12 @@
2249 done
2250
2251 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2252-echo "configure:4748: checking whether time.h and sys/time.h may both be included" >&5
2253+echo "configure:4849: checking whether time.h and sys/time.h may both be included" >&5
2254 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2256 else
2257 cat > conftest.$ac_ext <<EOF
2258-#line 4753 "configure"
2259+#line 4854 "configure"
2260 #include "confdefs.h"
2261 #include <sys/types.h>
2262 #include <sys/time.h>
2263@@ -4758,7 +4859,7 @@
2264 struct tm *tp;
2265 ; return 0; }
2266 EOF
2267-if { (eval echo configure:4762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2268+if { (eval echo configure:4863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2269 rm -rf conftest*
2270 ac_cv_header_time=yes
2271 else
2272@@ -4789,17 +4890,17 @@
2273 do
2274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2276-echo "configure:4793: checking for $ac_hdr" >&5
2277+echo "configure:4894: checking for $ac_hdr" >&5
2278 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2279 echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281 cat > conftest.$ac_ext <<EOF
2282-#line 4798 "configure"
2283+#line 4899 "configure"
2284 #include "confdefs.h"
2285 #include <$ac_hdr>
2286 EOF
2287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2288-{ (eval echo configure:4803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2289+{ (eval echo configure:4904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2291 if test -z "$ac_err"; then
2292 rm -rf conftest*
2293@@ -4826,7 +4927,7 @@
2294 done
2295
2296 echo $ac_n "checking for UNIX domain sockets""... $ac_c" 1>&6
2297-echo "configure:4830: checking for UNIX domain sockets" >&5
2298+echo "configure:4931: checking for UNIX domain sockets" >&5
2299 if eval "test \"`echo '$''{'wi_cv_unix_domain_sockets'+set}'`\" = set"; then
2300 echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302@@ -4839,7 +4940,7 @@
2303
2304 else
2305 cat > conftest.$ac_ext <<EOF
2306-#line 4843 "configure"
2307+#line 4944 "configure"
2308 #include "confdefs.h"
2309
2310 #if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
2311@@ -4865,7 +4966,7 @@
2312 exit(0); /* do have UNIX domain sockets */
2313 }
2314 EOF
2315-if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2316+if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2317 then
2318
2319 # action if true
2320@@ -4899,13 +5000,13 @@
2321 fi
2322
2323 echo $ac_n "checking for sun_len field in struct sockaddr_un""... $ac_c" 1>&6
2324-echo "configure:4903: checking for sun_len field in struct sockaddr_un" >&5
2325+echo "configure:5004: checking for sun_len field in struct sockaddr_un" >&5
2326 if eval "test \"`echo '$''{'wi_cv_sockaddr_un_sun_len'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329
2330 cat > conftest.$ac_ext <<EOF
2331-#line 4909 "configure"
2332+#line 5010 "configure"
2333 #include "confdefs.h"
2334
2335 /* includes */
2336@@ -4924,7 +5025,7 @@
2337
2338 ; return 0; }
2339 EOF
2340-if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2341+if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2342 rm -rf conftest*
2343
2344 wi_cv_sockaddr_un_sun_len=yes
2345@@ -4966,12 +5067,12 @@
2346 # Mostly for SunOS 4 -- needs to come first because other libs depend on it
2347
2348 echo $ac_n "checking for strerror""... $ac_c" 1>&6
2349-echo "configure:4970: checking for strerror" >&5
2350+echo "configure:5071: checking for strerror" >&5
2351 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354 cat > conftest.$ac_ext <<EOF
2355-#line 4975 "configure"
2356+#line 5076 "configure"
2357 #include "confdefs.h"
2358 /* System header to define __stub macros and hopefully few prototypes,
2359 which can conflict with char strerror(); below. */
2360@@ -4994,7 +5095,7 @@
2361
2362 ; return 0; }
2363 EOF
2364-if { (eval echo configure:4998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2365+if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2366 rm -rf conftest*
2367 eval "ac_cv_func_strerror=yes"
2368 else
2369@@ -5017,7 +5118,7 @@
2370 if test "$a" = no ; then
2371 # Not in libc, try lib44bsd.
2372 echo $ac_n "checking for strerror in -l44bsd""... $ac_c" 1>&6
2373-echo "configure:5021: checking for strerror in -l44bsd" >&5
2374+echo "configure:5122: checking for strerror in -l44bsd" >&5
2375 ac_lib_var=`echo 44bsd'_'strerror | sed 'y%./+-%__p_%'`
2376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2377 echo $ac_n "(cached) $ac_c" 1>&6
2378@@ -5025,7 +5126,7 @@
2379 ac_save_LIBS="$LIBS"
2380 LIBS="-l44bsd $LIBS"
2381 cat > conftest.$ac_ext <<EOF
2382-#line 5029 "configure"
2383+#line 5130 "configure"
2384 #include "confdefs.h"
2385 /* Override any gcc2 internal prototype to avoid an error. */
2386 /* We use char because int might match the return type of a gcc2
2387@@ -5036,7 +5137,7 @@
2388 strerror()
2389 ; return 0; }
2390 EOF
2391-if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2392+if { (eval echo configure:5141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2393 rm -rf conftest*
2394 eval "ac_cv_lib_$ac_lib_var=yes"
2395 else
2396@@ -5068,12 +5169,12 @@
2397
2398
2399 echo $ac_n "checking for socket""... $ac_c" 1>&6
2400-echo "configure:5072: checking for socket" >&5
2401+echo "configure:5173: checking for socket" >&5
2402 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2403 echo $ac_n "(cached) $ac_c" 1>&6
2404 else
2405 cat > conftest.$ac_ext <<EOF
2406-#line 5077 "configure"
2407+#line 5178 "configure"
2408 #include "confdefs.h"
2409 /* System header to define __stub macros and hopefully few prototypes,
2410 which can conflict with char socket(); below. */
2411@@ -5096,7 +5197,7 @@
2412
2413 ; return 0; }
2414 EOF
2415-if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2416+if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2417 rm -rf conftest*
2418 eval "ac_cv_func_socket=yes"
2419 else
2420@@ -5119,7 +5220,7 @@
2421 if test "$a" = no ; then
2422 # Not in libc, try libsocket.
2423 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2424-echo "configure:5123: checking for socket in -lsocket" >&5
2425+echo "configure:5224: checking for socket in -lsocket" >&5
2426 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2427 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2428 echo $ac_n "(cached) $ac_c" 1>&6
2429@@ -5127,7 +5228,7 @@
2430 ac_save_LIBS="$LIBS"
2431 LIBS="-lsocket $LIBS"
2432 cat > conftest.$ac_ext <<EOF
2433-#line 5131 "configure"
2434+#line 5232 "configure"
2435 #include "confdefs.h"
2436 /* Override any gcc2 internal prototype to avoid an error. */
2437 /* We use char because int might match the return type of a gcc2
2438@@ -5138,7 +5239,7 @@
2439 socket()
2440 ; return 0; }
2441 EOF
2442-if { (eval echo configure:5142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2443+if { (eval echo configure:5243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2444 rm -rf conftest*
2445 eval "ac_cv_lib_$ac_lib_var=yes"
2446 else
2447@@ -5173,7 +5274,7 @@
2448 unixware2*)
2449 # So far, only UnixWare needs this.
2450 echo $ac_n "checking for syslog in -lgen""... $ac_c" 1>&6
2451-echo "configure:5177: checking for syslog in -lgen" >&5
2452+echo "configure:5278: checking for syslog in -lgen" >&5
2453 ac_lib_var=`echo gen'_'syslog | sed 'y%./+-%__p_%'`
2454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2455 echo $ac_n "(cached) $ac_c" 1>&6
2456@@ -5181,7 +5282,7 @@
2457 ac_save_LIBS="$LIBS"
2458 LIBS="-lgen $LIBS"
2459 cat > conftest.$ac_ext <<EOF
2460-#line 5185 "configure"
2461+#line 5286 "configure"
2462 #include "confdefs.h"
2463 /* Override any gcc2 internal prototype to avoid an error. */
2464 /* We use char because int might match the return type of a gcc2
2465@@ -5192,7 +5293,7 @@
2466 syslog()
2467 ; return 0; }
2468 EOF
2469-if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2470+if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2471 rm -rf conftest*
2472 eval "ac_cv_lib_$ac_lib_var=yes"
2473 else
2474@@ -5239,12 +5340,12 @@
2475 # AC_CHECK_FUNC(socket,[a=yes],[a=no])
2476 #
2477 echo $ac_n "checking for socket""... $ac_c" 1>&6
2478-echo "configure:5243: checking for socket" >&5
2479+echo "configure:5344: checking for socket" >&5
2480 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2481 echo $ac_n "(cached) $ac_c" 1>&6
2482 else
2483 cat > conftest.$ac_ext <<EOF
2484-#line 5248 "configure"
2485+#line 5349 "configure"
2486 #include "confdefs.h"
2487 /* System header to define __stub macros and hopefully few prototypes,
2488 which can conflict with char socket(); below. */
2489@@ -5267,7 +5368,7 @@
2490
2491 ; return 0; }
2492 EOF
2493-if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2494+if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2495 rm -rf conftest*
2496 eval "ac_cv_func_socket=yes"
2497 else
2498@@ -5300,7 +5401,7 @@
2499 hpux1123456789*)
2500 # HP-UX 11 uses NSL for YP services
2501 echo $ac_n "checking for getpwent in -lnsl""... $ac_c" 1>&6
2502-echo "configure:5304: checking for getpwent in -lnsl" >&5
2503+echo "configure:5405: checking for getpwent in -lnsl" >&5
2504 ac_lib_var=`echo nsl'_'getpwent | sed 'y%./+-%__p_%'`
2505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2506 echo $ac_n "(cached) $ac_c" 1>&6
2507@@ -5308,7 +5409,7 @@
2508 ac_save_LIBS="$LIBS"
2509 LIBS="-lnsl $LIBS"
2510 cat > conftest.$ac_ext <<EOF
2511-#line 5312 "configure"
2512+#line 5413 "configure"
2513 #include "confdefs.h"
2514 /* Override any gcc2 internal prototype to avoid an error. */
2515 /* We use char because int might match the return type of a gcc2
2516@@ -5319,7 +5420,7 @@
2517 getpwent()
2518 ; return 0; }
2519 EOF
2520-if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2521+if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2522 rm -rf conftest*
2523 eval "ac_cv_lib_$ac_lib_var=yes"
2524 else
2525@@ -5350,12 +5451,12 @@
2526
2527 *)
2528 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2529-echo "configure:5354: checking for gethostbyname" >&5
2530+echo "configure:5455: checking for gethostbyname" >&5
2531 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2532 echo $ac_n "(cached) $ac_c" 1>&6
2533 else
2534 cat > conftest.$ac_ext <<EOF
2535-#line 5359 "configure"
2536+#line 5460 "configure"
2537 #include "confdefs.h"
2538 /* System header to define __stub macros and hopefully few prototypes,
2539 which can conflict with char gethostbyname(); below. */
2540@@ -5378,7 +5479,7 @@
2541
2542 ; return 0; }
2543 EOF
2544-if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2545+if { (eval echo configure:5483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2546 rm -rf conftest*
2547 eval "ac_cv_func_gethostbyname=yes"
2548 else
2549@@ -5401,7 +5502,7 @@
2550 if test "$a" = no ; then
2551 # Not in libc, try libnsl.
2552 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2553-echo "configure:5405: checking for gethostbyname in -lnsl" >&5
2554+echo "configure:5506: checking for gethostbyname in -lnsl" >&5
2555 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2557 echo $ac_n "(cached) $ac_c" 1>&6
2558@@ -5409,7 +5510,7 @@
2559 ac_save_LIBS="$LIBS"
2560 LIBS="-lnsl $LIBS"
2561 cat > conftest.$ac_ext <<EOF
2562-#line 5413 "configure"
2563+#line 5514 "configure"
2564 #include "confdefs.h"
2565 /* Override any gcc2 internal prototype to avoid an error. */
2566 /* We use char because int might match the return type of a gcc2
2567@@ -5420,7 +5521,7 @@
2568 gethostbyname()
2569 ; return 0; }
2570 EOF
2571-if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2572+if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2573 rm -rf conftest*
2574 eval "ac_cv_lib_$ac_lib_var=yes"
2575 else
2576@@ -5456,7 +5557,7 @@
2577 # See if we could access two well-known sites without help of any special
2578 # libraries, like resolv.
2579 echo $ac_n "checking if we need to look for a separate DNS resolver library""... $ac_c" 1>&6
2580-echo "configure:5460: checking if we need to look for a separate DNS resolver library" >&5
2581+echo "configure:5561: checking if we need to look for a separate DNS resolver library" >&5
2582 if eval "test \"`echo '$''{'wi_cv_look_for_resolv'+set}'`\" = set"; then
2583 echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585@@ -5474,7 +5575,7 @@
2586
2587 else
2588 cat > conftest.$ac_ext <<EOF
2589-#line 5478 "configure"
2590+#line 5579 "configure"
2591 #include "confdefs.h"
2592
2593 #if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
2594@@ -5501,7 +5602,7 @@
2595 exit(0);
2596 }
2597 EOF
2598-if { (eval echo configure:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2599+if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2600 then
2601
2602 # action if true
2603@@ -5529,7 +5630,7 @@
2604
2605 if test "$wi_cv_look_for_resolv" = yes ; then
2606 echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
2607-echo "configure:5533: checking for main in -lresolv" >&5
2608+echo "configure:5634: checking for main in -lresolv" >&5
2609 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
2610 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2611 echo $ac_n "(cached) $ac_c" 1>&6
2612@@ -5537,14 +5638,14 @@
2613 ac_save_LIBS="$LIBS"
2614 LIBS="-lresolv $LIBS"
2615 cat > conftest.$ac_ext <<EOF
2616-#line 5541 "configure"
2617+#line 5642 "configure"
2618 #include "confdefs.h"
2619
2620 int main() {
2621 main()
2622 ; return 0; }
2623 EOF
2624-if { (eval echo configure:5548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2625+if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2626 rm -rf conftest*
2627 eval "ac_cv_lib_$ac_lib_var=yes"
2628 else
2629@@ -5595,7 +5696,7 @@
2630 #
2631 if test "x$ac_cv_lib_db_main" = "x" ; then
2632 echo $ac_n "checking for main in -ldb""... $ac_c" 1>&6
2633-echo "configure:5599: checking for main in -ldb" >&5
2634+echo "configure:5700: checking for main in -ldb" >&5
2635 ac_lib_var=`echo db'_'main | sed 'y%./+-%__p_%'`
2636 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2637 echo $ac_n "(cached) $ac_c" 1>&6
2638@@ -5603,14 +5704,14 @@
2639 ac_save_LIBS="$LIBS"
2640 LIBS="-ldb $LIBS"
2641 cat > conftest.$ac_ext <<EOF
2642-#line 5607 "configure"
2643+#line 5708 "configure"
2644 #include "confdefs.h"
2645
2646 int main() {
2647 main()
2648 ; return 0; }
2649 EOF
2650-if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2651+if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2652 rm -rf conftest*
2653 eval "ac_cv_lib_$ac_lib_var=yes"
2654 else
2655@@ -5633,7 +5734,7 @@
2656 fi
2657 if test "x$ac_cv_lib_isode_main" = "x" ; then
2658 echo $ac_n "checking for main in -lisode""... $ac_c" 1>&6
2659-echo "configure:5637: checking for main in -lisode" >&5
2660+echo "configure:5738: checking for main in -lisode" >&5
2661 ac_lib_var=`echo isode'_'main | sed 'y%./+-%__p_%'`
2662 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2663 echo $ac_n "(cached) $ac_c" 1>&6
2664@@ -5641,14 +5742,14 @@
2665 ac_save_LIBS="$LIBS"
2666 LIBS="-lisode $LIBS"
2667 cat > conftest.$ac_ext <<EOF
2668-#line 5645 "configure"
2669+#line 5746 "configure"
2670 #include "confdefs.h"
2671
2672 int main() {
2673 main()
2674 ; return 0; }
2675 EOF
2676-if { (eval echo configure:5652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2677+if { (eval echo configure:5753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2678 rm -rf conftest*
2679 eval "ac_cv_lib_$ac_lib_var=yes"
2680 else
2681@@ -5671,7 +5772,7 @@
2682 fi
2683 if test "x$ac_cv_lib_com_err_main" = "x" ; then
2684 echo $ac_n "checking for main in -lcom_err""... $ac_c" 1>&6
2685-echo "configure:5675: checking for main in -lcom_err" >&5
2686+echo "configure:5776: checking for main in -lcom_err" >&5
2687 ac_lib_var=`echo com_err'_'main | sed 'y%./+-%__p_%'`
2688 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2689 echo $ac_n "(cached) $ac_c" 1>&6
2690@@ -5679,14 +5780,14 @@
2691 ac_save_LIBS="$LIBS"
2692 LIBS="-lcom_err $LIBS"
2693 cat > conftest.$ac_ext <<EOF
2694-#line 5683 "configure"
2695+#line 5784 "configure"
2696 #include "confdefs.h"
2697
2698 int main() {
2699 main()
2700 ; return 0; }
2701 EOF
2702-if { (eval echo configure:5690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2703+if { (eval echo configure:5791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2704 rm -rf conftest*
2705 eval "ac_cv_lib_$ac_lib_var=yes"
2706 else
2707@@ -5709,7 +5810,7 @@
2708 fi
2709 if test "x$ac_cv_lib_crypto_main" = "x" ; then
2710 echo $ac_n "checking for main in -lcrypto""... $ac_c" 1>&6
2711-echo "configure:5713: checking for main in -lcrypto" >&5
2712+echo "configure:5814: checking for main in -lcrypto" >&5
2713 ac_lib_var=`echo crypto'_'main | sed 'y%./+-%__p_%'`
2714 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2716@@ -5717,14 +5818,14 @@
2717 ac_save_LIBS="$LIBS"
2718 LIBS="-lcrypto $LIBS"
2719 cat > conftest.$ac_ext <<EOF
2720-#line 5721 "configure"
2721+#line 5822 "configure"
2722 #include "confdefs.h"
2723
2724 int main() {
2725 main()
2726 ; return 0; }
2727 EOF
2728-if { (eval echo configure:5728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2729+if { (eval echo configure:5829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2730 rm -rf conftest*
2731 eval "ac_cv_lib_$ac_lib_var=yes"
2732 else
2733@@ -5747,7 +5848,7 @@
2734 fi
2735 if test "x$ac_cv_lib_krb5_main" = "x" ; then
2736 echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
2737-echo "configure:5751: checking for main in -lkrb5" >&5
2738+echo "configure:5852: checking for main in -lkrb5" >&5
2739 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
2740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2741 echo $ac_n "(cached) $ac_c" 1>&6
2742@@ -5755,14 +5856,14 @@
2743 ac_save_LIBS="$LIBS"
2744 LIBS="-lkrb5 $LIBS"
2745 cat > conftest.$ac_ext <<EOF
2746-#line 5759 "configure"
2747+#line 5860 "configure"
2748 #include "confdefs.h"
2749
2750 int main() {
2751 main()
2752 ; return 0; }
2753 EOF
2754-if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2755+if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2756 rm -rf conftest*
2757 eval "ac_cv_lib_$ac_lib_var=yes"
2758 else
2759@@ -5785,7 +5886,7 @@
2760 fi
2761 if test "x$ac_cv_lib_gssapi_krb5_main" = "x" ; then
2762 echo $ac_n "checking for main in -lgssapi_krb5""... $ac_c" 1>&6
2763-echo "configure:5789: checking for main in -lgssapi_krb5" >&5
2764+echo "configure:5890: checking for main in -lgssapi_krb5" >&5
2765 ac_lib_var=`echo gssapi_krb5'_'main | sed 'y%./+-%__p_%'`
2766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2767 echo $ac_n "(cached) $ac_c" 1>&6
2768@@ -5793,14 +5894,14 @@
2769 ac_save_LIBS="$LIBS"
2770 LIBS="-lgssapi_krb5 $LIBS"
2771 cat > conftest.$ac_ext <<EOF
2772-#line 5797 "configure"
2773+#line 5898 "configure"
2774 #include "confdefs.h"
2775
2776 int main() {
2777 main()
2778 ; return 0; }
2779 EOF
2780-if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2781+if { (eval echo configure:5905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2782 rm -rf conftest*
2783 eval "ac_cv_lib_$ac_lib_var=yes"
2784 else
2785@@ -5823,7 +5924,7 @@
2786 fi
2787
2788 echo $ac_n "checking for SOCKSinit in -lsocks5""... $ac_c" 1>&6
2789-echo "configure:5827: checking for SOCKSinit in -lsocks5" >&5
2790+echo "configure:5928: checking for SOCKSinit in -lsocks5" >&5
2791 ac_lib_var=`echo socks5'_'SOCKSinit | sed 'y%./+-%__p_%'`
2792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2793 echo $ac_n "(cached) $ac_c" 1>&6
2794@@ -5831,7 +5932,7 @@
2795 ac_save_LIBS="$LIBS"
2796 LIBS="-lsocks5 $LIBS"
2797 cat > conftest.$ac_ext <<EOF
2798-#line 5835 "configure"
2799+#line 5936 "configure"
2800 #include "confdefs.h"
2801 /* Override any gcc2 internal prototype to avoid an error. */
2802 /* We use char because int might match the return type of a gcc2
2803@@ -5842,7 +5943,7 @@
2804 SOCKSinit()
2805 ; return 0; }
2806 EOF
2807-if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2808+if { (eval echo configure:5947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2809 rm -rf conftest*
2810 eval "ac_cv_lib_$ac_lib_var=yes"
2811 else
2812@@ -5866,17 +5967,17 @@
2813 do
2814 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2815 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2816-echo "configure:5870: checking for $ac_hdr" >&5
2817+echo "configure:5971: checking for $ac_hdr" >&5
2818 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2819 echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821 cat > conftest.$ac_ext <<EOF
2822-#line 5875 "configure"
2823+#line 5976 "configure"
2824 #include "confdefs.h"
2825 #include <$ac_hdr>
2826 EOF
2827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2828-{ (eval echo configure:5880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2829+{ (eval echo configure:5981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2831 if test -z "$ac_err"; then
2832 rm -rf conftest*
2833@@ -5915,14 +6016,14 @@
2834 fi
2835 fi
2836 echo $ac_n "checking if SOCKS5 will be used""... $ac_c" 1>&6
2837-echo "configure:5919: checking if SOCKS5 will be used" >&5
2838+echo "configure:6020: checking if SOCKS5 will be used" >&5
2839 echo "$ac_t""$ac_cv_lib_socks5_SOCKSinit" 1>&6
2840
2841 case "$OS" in
2842 solaris8-*)
2843 saved_LIBS="$LIBS"
2844 echo $ac_n "checking for sendfilev in -lsendfile""... $ac_c" 1>&6
2845-echo "configure:5926: checking for sendfilev in -lsendfile" >&5
2846+echo "configure:6027: checking for sendfilev in -lsendfile" >&5
2847 ac_lib_var=`echo sendfile'_'sendfilev | sed 'y%./+-%__p_%'`
2848 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2849 echo $ac_n "(cached) $ac_c" 1>&6
2850@@ -5930,7 +6031,7 @@
2851 ac_save_LIBS="$LIBS"
2852 LIBS="-lsendfile $LIBS"
2853 cat > conftest.$ac_ext <<EOF
2854-#line 5934 "configure"
2855+#line 6035 "configure"
2856 #include "confdefs.h"
2857 /* Override any gcc2 internal prototype to avoid an error. */
2858 /* We use char because int might match the return type of a gcc2
2859@@ -5941,7 +6042,7 @@
2860 sendfilev()
2861 ; return 0; }
2862 EOF
2863-if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2864+if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2865 rm -rf conftest*
2866 eval "ac_cv_lib_$ac_lib_var=yes"
2867 else
2868@@ -5971,12 +6072,12 @@
2869 for ac_func in sendfilev sendfilev64
2870 do
2871 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2872-echo "configure:5975: checking for $ac_func" >&5
2873+echo "configure:6076: checking for $ac_func" >&5
2874 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2875 echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877 cat > conftest.$ac_ext <<EOF
2878-#line 5980 "configure"
2879+#line 6081 "configure"
2880 #include "confdefs.h"
2881 /* System header to define __stub macros and hopefully few prototypes,
2882 which can conflict with char $ac_func(); below. */
2883@@ -5999,7 +6100,7 @@
2884
2885 ; return 0; }
2886 EOF
2887-if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2888+if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2889 rm -rf conftest*
2890 eval "ac_cv_func_$ac_func=yes"
2891 else
2892@@ -6025,7 +6126,7 @@
2893
2894 LIBS="$saved_LIBS"
2895 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2896-echo "configure:6029: checking for dlopen in -ldl" >&5
2897+echo "configure:6130: checking for dlopen in -ldl" >&5
2898 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2899 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2901@@ -6033,7 +6134,7 @@
2902 ac_save_LIBS="$LIBS"
2903 LIBS="-ldl $LIBS"
2904 cat > conftest.$ac_ext <<EOF
2905-#line 6037 "configure"
2906+#line 6138 "configure"
2907 #include "confdefs.h"
2908 /* Override any gcc2 internal prototype to avoid an error. */
2909 /* We use char because int might match the return type of a gcc2
2910@@ -6044,7 +6145,7 @@
2911 dlopen()
2912 ; return 0; }
2913 EOF
2914-if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2915+if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2916 rm -rf conftest*
2917 eval "ac_cv_lib_$ac_lib_var=yes"
2918 else
2919@@ -6074,7 +6175,7 @@
2920 ;;
2921 solaris9-*|solaris1[0-9]-*)
2922 echo $ac_n "checking for sendfilev in -lsendfile""... $ac_c" 1>&6
2923-echo "configure:6078: checking for sendfilev in -lsendfile" >&5
2924+echo "configure:6179: checking for sendfilev in -lsendfile" >&5
2925 ac_lib_var=`echo sendfile'_'sendfilev | sed 'y%./+-%__p_%'`
2926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2927 echo $ac_n "(cached) $ac_c" 1>&6
2928@@ -6082,7 +6183,7 @@
2929 ac_save_LIBS="$LIBS"
2930 LIBS="-lsendfile $LIBS"
2931 cat > conftest.$ac_ext <<EOF
2932-#line 6086 "configure"
2933+#line 6187 "configure"
2934 #include "confdefs.h"
2935 /* Override any gcc2 internal prototype to avoid an error. */
2936 /* We use char because int might match the return type of a gcc2
2937@@ -6093,7 +6194,7 @@
2938 sendfilev()
2939 ; return 0; }
2940 EOF
2941-if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2942+if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2943 rm -rf conftest*
2944 eval "ac_cv_lib_$ac_lib_var=yes"
2945 else
2946@@ -6123,12 +6224,12 @@
2947 for ac_func in sendfilev sendfilev64
2948 do
2949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2950-echo "configure:6127: checking for $ac_func" >&5
2951+echo "configure:6228: checking for $ac_func" >&5
2952 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2953 echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955 cat > conftest.$ac_ext <<EOF
2956-#line 6132 "configure"
2957+#line 6233 "configure"
2958 #include "confdefs.h"
2959 /* System header to define __stub macros and hopefully few prototypes,
2960 which can conflict with char $ac_func(); below. */
2961@@ -6151,7 +6252,7 @@
2962
2963 ; return 0; }
2964 EOF
2965-if { (eval echo configure:6155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2966+if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2967 rm -rf conftest*
2968 eval "ac_cv_func_$ac_func=yes"
2969 else
2970@@ -6183,23 +6284,23 @@
2971
2972
2973 echo $ac_n "checking for curses library headers""... $ac_c" 1>&6
2974-echo "configure:6187: checking for curses library headers" >&5
2975+echo "configure:6288: checking for curses library headers" >&5
2976 if test "$wi_cv_ncurses" != "no" ; then
2977 for ac_hdr in ncurses.h curses.h termios.h termio.h sgtty.h sys/ioctl.h
2978 do
2979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2981-echo "configure:6193: checking for $ac_hdr" >&5
2982+echo "configure:6294: checking for $ac_hdr" >&5
2983 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2984 echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986 cat > conftest.$ac_ext <<EOF
2987-#line 6198 "configure"
2988+#line 6299 "configure"
2989 #include "confdefs.h"
2990 #include <$ac_hdr>
2991 EOF
2992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2993-{ (eval echo configure:6203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2994+{ (eval echo configure:6304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2996 if test -z "$ac_err"; then
2997 rm -rf conftest*
2998@@ -6230,17 +6331,17 @@
2999 do
3000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3002-echo "configure:6234: checking for $ac_hdr" >&5
3003+echo "configure:6335: checking for $ac_hdr" >&5
3004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3005 echo $ac_n "(cached) $ac_c" 1>&6
3006 else
3007 cat > conftest.$ac_ext <<EOF
3008-#line 6239 "configure"
3009+#line 6340 "configure"
3010 #include "confdefs.h"
3011 #include <$ac_hdr>
3012 EOF
3013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3014-{ (eval echo configure:6244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3015+{ (eval echo configure:6345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3017 if test -z "$ac_err"; then
3018 rm -rf conftest*
3019@@ -6278,7 +6379,7 @@
3020 fi
3021
3022 echo $ac_n "checking for curses library""... $ac_c" 1>&6
3023-echo "configure:6282: checking for curses library" >&5
3024+echo "configure:6383: checking for curses library" >&5
3025
3026 wi_cv_lib_curses=no
3027 wi_cv_lib_curses_result=no
3028@@ -6291,7 +6392,7 @@
3029 fi
3030 LIBS="$ac_save_LIBS $LIBCURSES"
3031 cat > conftest.$ac_ext <<EOF
3032-#line 6295 "configure"
3033+#line 6396 "configure"
3034 #include "confdefs.h"
3035
3036 /* includes */
3037@@ -6314,7 +6415,7 @@
3038
3039 ; return 0; }
3040 EOF
3041-if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3042+if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3043 rm -rf conftest*
3044
3045 linked_with_LIBCURSES=yes
3046@@ -6338,7 +6439,7 @@
3047
3048 else
3049 cat > conftest.$ac_ext <<EOF
3050-#line 6342 "configure"
3051+#line 6443 "configure"
3052 #include "confdefs.h"
3053
3054 /* program */
3055@@ -6364,7 +6465,7 @@
3056 }
3057
3058 EOF
3059-if { (eval echo configure:6368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3060+if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3061 then
3062
3063 # action if true
3064@@ -6442,17 +6543,17 @@
3065 do
3066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3068-echo "configure:6446: checking for $ac_hdr" >&5
3069+echo "configure:6547: checking for $ac_hdr" >&5
3070 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3071 echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073 cat > conftest.$ac_ext <<EOF
3074-#line 6451 "configure"
3075+#line 6552 "configure"
3076 #include "confdefs.h"
3077 #include <$ac_hdr>
3078 EOF
3079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3080-{ (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3081+{ (eval echo configure:6557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3083 if test -z "$ac_err"; then
3084 rm -rf conftest*
3085@@ -6482,7 +6583,7 @@
3086 { echo "configure: error: Can't find validator.h" 1>&2; exit 1; }
3087 fi
3088 echo $ac_n "checking for SHA1_Init in -lssl""... $ac_c" 1>&6
3089-echo "configure:6486: checking for SHA1_Init in -lssl" >&5
3090+echo "configure:6587: checking for SHA1_Init in -lssl" >&5
3091 ac_lib_var=`echo ssl'_'SHA1_Init | sed 'y%./+-%__p_%'`
3092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3093 echo $ac_n "(cached) $ac_c" 1>&6
3094@@ -6490,7 +6591,7 @@
3095 ac_save_LIBS="$LIBS"
3096 LIBS="-lssl $LIBS"
3097 cat > conftest.$ac_ext <<EOF
3098-#line 6494 "configure"
3099+#line 6595 "configure"
3100 #include "confdefs.h"
3101 /* Override any gcc2 internal prototype to avoid an error. */
3102 /* We use char because int might match the return type of a gcc2
3103@@ -6501,7 +6602,7 @@
3104 SHA1_Init()
3105 ; return 0; }
3106 EOF
3107-if { (eval echo configure:6505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3108+if { (eval echo configure:6606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3109 rm -rf conftest*
3110 eval "ac_cv_lib_$ac_lib_var=yes"
3111 else
3112@@ -6530,7 +6631,7 @@
3113 fi
3114
3115 echo $ac_n "checking for query_send in -lsres""... $ac_c" 1>&6
3116-echo "configure:6534: checking for query_send in -lsres" >&5
3117+echo "configure:6635: checking for query_send in -lsres" >&5
3118 ac_lib_var=`echo sres'_'query_send | sed 'y%./+-%__p_%'`
3119 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3120 echo $ac_n "(cached) $ac_c" 1>&6
3121@@ -6538,7 +6639,7 @@
3122 ac_save_LIBS="$LIBS"
3123 LIBS="-lsres $LIBS"
3124 cat > conftest.$ac_ext <<EOF
3125-#line 6542 "configure"
3126+#line 6643 "configure"
3127 #include "confdefs.h"
3128 /* Override any gcc2 internal prototype to avoid an error. */
3129 /* We use char because int might match the return type of a gcc2
3130@@ -6549,7 +6650,7 @@
3131 query_send()
3132 ; return 0; }
3133 EOF
3134-if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3135+if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3136 rm -rf conftest*
3137 eval "ac_cv_lib_$ac_lib_var=yes"
3138 else
3139@@ -6578,7 +6679,7 @@
3140 fi
3141
3142 echo $ac_n "checking for p_val_status in -lval""... $ac_c" 1>&6
3143-echo "configure:6582: checking for p_val_status in -lval" >&5
3144+echo "configure:6683: checking for p_val_status in -lval" >&5
3145 ac_lib_var=`echo val'_'p_val_status | sed 'y%./+-%__p_%'`
3146 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3147 echo $ac_n "(cached) $ac_c" 1>&6
3148@@ -6586,7 +6687,7 @@
3149 ac_save_LIBS="$LIBS"
3150 LIBS="-lval $LIBS"
3151 cat > conftest.$ac_ext <<EOF
3152-#line 6590 "configure"
3153+#line 6691 "configure"
3154 #include "confdefs.h"
3155 /* Override any gcc2 internal prototype to avoid an error. */
3156 /* We use char because int might match the return type of a gcc2
3157@@ -6597,7 +6698,7 @@
3158 p_val_status()
3159 ; return 0; }
3160 EOF
3161-if { (eval echo configure:6601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3162+if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3163 rm -rf conftest*
3164 eval "ac_cv_lib_$ac_lib_var=yes"
3165 else
3166@@ -6617,7 +6718,7 @@
3167 else
3168 echo "$ac_t""no" 1>&6
3169 echo $ac_n "checking for pthread_rwlock_init in -lpthread""... $ac_c" 1>&6
3170-echo "configure:6621: checking for pthread_rwlock_init in -lpthread" >&5
3171+echo "configure:6722: checking for pthread_rwlock_init in -lpthread" >&5
3172 ac_lib_var=`echo pthread'_'pthread_rwlock_init | sed 'y%./+-%__p_%'`
3173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3175@@ -6625,7 +6726,7 @@
3176 ac_save_LIBS="$LIBS"
3177 LIBS="-lpthread $LIBS"
3178 cat > conftest.$ac_ext <<EOF
3179-#line 6629 "configure"
3180+#line 6730 "configure"
3181 #include "confdefs.h"
3182 /* Override any gcc2 internal prototype to avoid an error. */
3183 /* We use char because int might match the return type of a gcc2
3184@@ -6636,7 +6737,7 @@
3185 pthread_rwlock_init()
3186 ; return 0; }
3187 EOF
3188-if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3189+if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3190 rm -rf conftest*
3191 eval "ac_cv_lib_$ac_lib_var=yes"
3192 else
3193@@ -6664,7 +6765,7 @@
3194 fi
3195
3196 echo $ac_n "checking for p_val_status in -lval-threads""... $ac_c" 1>&6
3197-echo "configure:6668: checking for p_val_status in -lval-threads" >&5
3198+echo "configure:6769: checking for p_val_status in -lval-threads" >&5
3199 ac_lib_var=`echo val-threads'_'p_val_status | sed 'y%./+-%__p_%'`
3200 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3201 echo $ac_n "(cached) $ac_c" 1>&6
3202@@ -6672,7 +6773,7 @@
3203 ac_save_LIBS="$LIBS"
3204 LIBS="-lval-threads $LIBS"
3205 cat > conftest.$ac_ext <<EOF
3206-#line 6676 "configure"
3207+#line 6777 "configure"
3208 #include "confdefs.h"
3209 /* Override any gcc2 internal prototype to avoid an error. */
3210 /* We use char because int might match the return type of a gcc2
3211@@ -6683,7 +6784,7 @@
3212 p_val_status()
3213 ; return 0; }
3214 EOF
3215-if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3216+if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3217 rm -rf conftest*
3218 eval "ac_cv_lib_$ac_lib_var=yes"
3219 else
3220@@ -6718,12 +6819,12 @@
3221
3222
3223 echo $ac_n "checking for working const""... $ac_c" 1>&6
3224-echo "configure:6722: checking for working const" >&5
3225+echo "configure:6823: checking for working const" >&5
3226 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3227 echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229 cat > conftest.$ac_ext <<EOF
3230-#line 6727 "configure"
3231+#line 6828 "configure"
3232 #include "confdefs.h"
3233
3234 int main() {
3235@@ -6772,7 +6873,7 @@
3236
3237 ; return 0; }
3238 EOF
3239-if { (eval echo configure:6776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3240+if { (eval echo configure:6877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3241 rm -rf conftest*
3242 ac_cv_c_const=yes
3243 else
3244@@ -6793,12 +6894,12 @@
3245 fi
3246
3247 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3248-echo "configure:6797: checking for size_t" >&5
3249+echo "configure:6898: checking for size_t" >&5
3250 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3251 echo $ac_n "(cached) $ac_c" 1>&6
3252 else
3253 cat > conftest.$ac_ext <<EOF
3254-#line 6802 "configure"
3255+#line 6903 "configure"
3256 #include "confdefs.h"
3257 #include <sys/types.h>
3258 #if STDC_HEADERS
3259@@ -6826,12 +6927,12 @@
3260 fi
3261
3262 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3263-echo "configure:6830: checking for off_t" >&5
3264+echo "configure:6931: checking for off_t" >&5
3265 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3266 echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268 cat > conftest.$ac_ext <<EOF
3269-#line 6835 "configure"
3270+#line 6936 "configure"
3271 #include "confdefs.h"
3272 #include <sys/types.h>
3273 #if STDC_HEADERS
3274@@ -6859,12 +6960,12 @@
3275 fi
3276
3277 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3278-echo "configure:6863: checking for mode_t" >&5
3279+echo "configure:6964: checking for mode_t" >&5
3280 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3281 echo $ac_n "(cached) $ac_c" 1>&6
3282 else
3283 cat > conftest.$ac_ext <<EOF
3284-#line 6868 "configure"
3285+#line 6969 "configure"
3286 #include "confdefs.h"
3287 #include <sys/types.h>
3288 #if STDC_HEADERS
3289@@ -6892,12 +6993,12 @@
3290 fi
3291
3292 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3293-echo "configure:6896: checking for pid_t" >&5
3294+echo "configure:6997: checking for pid_t" >&5
3295 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3296 echo $ac_n "(cached) $ac_c" 1>&6
3297 else
3298 cat > conftest.$ac_ext <<EOF
3299-#line 6901 "configure"
3300+#line 7002 "configure"
3301 #include "confdefs.h"
3302 #include <sys/types.h>
3303 #if STDC_HEADERS
3304@@ -6925,12 +7026,12 @@
3305 fi
3306
3307 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3308-echo "configure:6929: checking for uid_t in sys/types.h" >&5
3309+echo "configure:7030: checking for uid_t in sys/types.h" >&5
3310 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3311 echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313 cat > conftest.$ac_ext <<EOF
3314-#line 6934 "configure"
3315+#line 7035 "configure"
3316 #include "confdefs.h"
3317 #include <sys/types.h>
3318 EOF
3319@@ -6960,7 +7061,7 @@
3320
3321
3322 echo $ac_n "checking what type main() should return""... $ac_c" 1>&6
3323-echo "configure:6964: checking what type main() should return" >&5
3324+echo "configure:7065: checking what type main() should return" >&5
3325 if eval "test \"`echo '$''{'wi_cv_main_void_return_t'+set}'`\" = set"; then
3326 echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328@@ -6987,7 +7088,7 @@
3329 fi
3330
3331 echo $ac_n "checking for 64-bit integral type: long long""... $ac_c" 1>&6
3332-echo "configure:6991: checking for 64-bit integral type: long long" >&5
3333+echo "configure:7092: checking for 64-bit integral type: long long" >&5
3334 LONGEST_INT="long"
3335 if test "$cross_compiling" = yes; then
3336
3337@@ -6998,7 +7099,7 @@
3338
3339 else
3340 cat > conftest.$ac_ext <<EOF
3341-#line 7002 "configure"
3342+#line 7103 "configure"
3343 #include "confdefs.h"
3344
3345 /* program */
3346@@ -7026,7 +7127,7 @@
3347
3348
3349 EOF
3350-if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3351+if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3352 then
3353
3354 # action if true
3355@@ -7052,7 +7153,7 @@
3356 if test "$wi_cv_type_long_long" = yes ; then
3357
3358 echo $ac_n "checking how to print a 64-bit integral type""... $ac_c" 1>&6
3359-echo "configure:7056: checking how to print a 64-bit integral type" >&5
3360+echo "configure:7157: checking how to print a 64-bit integral type" >&5
3361 wi_cv_printf_long_long=fail
3362
3363 if test "$cross_compiling" = yes; then
3364@@ -7063,7 +7164,7 @@
3365
3366 else
3367 cat > conftest.$ac_ext <<EOF
3368-#line 7067 "configure"
3369+#line 7168 "configure"
3370 #include "confdefs.h"
3371
3372 /* program */
3373@@ -7092,7 +7193,7 @@
3374 }
3375
3376 EOF
3377-if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3378+if { (eval echo configure:7197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3379 then
3380
3381 # action if true
3382@@ -7122,7 +7223,7 @@
3383
3384 else
3385 cat > conftest.$ac_ext <<EOF
3386-#line 7126 "configure"
3387+#line 7227 "configure"
3388 #include "confdefs.h"
3389
3390 /* program */
3391@@ -7151,7 +7252,7 @@
3392 }
3393
3394 EOF
3395-if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3396+if { (eval echo configure:7256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3397 then
3398
3399 # action if true
3400@@ -7181,7 +7282,7 @@
3401
3402
3403 echo $ac_n "checking how to scan a 64-bit integral type""... $ac_c" 1>&6
3404-echo "configure:7185: checking how to scan a 64-bit integral type" >&5
3405+echo "configure:7286: checking how to scan a 64-bit integral type" >&5
3406 wi_cv_scanf_long_long=fail
3407
3408 if test "$cross_compiling" = yes; then
3409@@ -7192,7 +7293,7 @@
3410
3411 else
3412 cat > conftest.$ac_ext <<EOF
3413-#line 7196 "configure"
3414+#line 7297 "configure"
3415 #include "confdefs.h"
3416
3417 /* program */
3418@@ -7224,7 +7325,7 @@
3419 }
3420
3421 EOF
3422-if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3423+if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3424 then
3425
3426 # action if true
3427@@ -7254,7 +7355,7 @@
3428
3429 else
3430 cat > conftest.$ac_ext <<EOF
3431-#line 7258 "configure"
3432+#line 7359 "configure"
3433 #include "confdefs.h"
3434
3435 /* program */
3436@@ -7286,7 +7387,7 @@
3437 }
3438
3439 EOF
3440-if { (eval echo configure:7290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3441+if { (eval echo configure:7391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3442 then
3443
3444 # action if true
3445@@ -7317,7 +7418,7 @@
3446 fi
3447
3448 echo $ac_n "checking if everything was available to use the 64-bit integral type""... $ac_c" 1>&6
3449-echo "configure:7321: checking if everything was available to use the 64-bit integral type" >&5
3450+echo "configure:7422: checking if everything was available to use the 64-bit integral type" >&5
3451
3452 if test "$wi_cv_type_long_long" = no ; then
3453 wi_cv_use_long_long_msg_result="no (long long type not available)"
3454@@ -7396,7 +7497,7 @@
3455
3456 wi_struct_timeval_field_checks="cached"
3457 echo $ac_n "checking what type the tv_sec field of struct timeval is""... $ac_c" 1>&6
3458-echo "configure:7400: checking what type the tv_sec field of struct timeval is" >&5
3459+echo "configure:7501: checking what type the tv_sec field of struct timeval is" >&5
3460 if eval "test \"`echo '$''{'wi_cv_struct_timeval_tv_sec'+set}'`\" = set"; then
3461 echo $ac_n "(cached) $ac_c" 1>&6
3462 else
3463@@ -7417,7 +7518,7 @@
3464
3465 else
3466 cat > conftest.$ac_ext <<EOF
3467-#line 7421 "configure"
3468+#line 7522 "configure"
3469 #include "confdefs.h"
3470
3471 /* program */
3472@@ -7497,7 +7598,7 @@
3473 }
3474
3475 EOF
3476-if { (eval echo configure:7501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3477+if { (eval echo configure:7602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3478 then
3479
3480 # action if true
3481@@ -7531,12 +7632,12 @@
3482 if test "$wi_struct_timeval_field_checks" = "uncached" ; then
3483 guess="$guess2"
3484 echo $ac_n "checking what type the tv_usec field of struct timeval is""... $ac_c" 1>&6
3485-echo "configure:7535: checking what type the tv_usec field of struct timeval is" >&5
3486+echo "configure:7636: checking what type the tv_usec field of struct timeval is" >&5
3487 echo "$ac_t""$guess$wi_cv_struct_timeval_tv_usec" 1>&6
3488 else
3489 guess="$guess2"
3490 echo $ac_n "checking what type the tv_usec field of struct timeval is""... $ac_c" 1>&6
3491-echo "configure:7540: checking what type the tv_usec field of struct timeval is" >&5
3492+echo "configure:7641: checking what type the tv_usec field of struct timeval is" >&5
3493 if eval "test \"`echo '$''{'wi_cv_struct_timeval_tv_usec'+set}'`\" = set"; then
3494 echo $ac_n "(cached) $ac_c" 1>&6
3495 else
3496@@ -7560,7 +7661,7 @@
3497 # Extract the first word of ""perl"", so it can be a program name with args.
3498 set dummy "perl"; ac_word=$2
3499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3500-echo "configure:7564: checking for $ac_word" >&5
3501+echo "configure:7665: checking for $ac_word" >&5
3502 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3503 echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505@@ -7598,7 +7699,7 @@
3506 # Extract the first word of ""mktemp"", so it can be a program name with args.
3507 set dummy "mktemp"; ac_word=$2
3508 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3509-echo "configure:7602: checking for $ac_word" >&5
3510+echo "configure:7703: checking for $ac_word" >&5
3511 if eval "test \"`echo '$''{'ac_cv_path_MKTEMP'+set}'`\" = set"; then
3512 echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514@@ -7643,7 +7744,7 @@
3515 fi
3516
3517 echo $ac_n "checking for return type from write""... $ac_c" 1>&6
3518-echo "configure:7647: checking for return type from write" >&5
3519+echo "configure:7748: checking for return type from write" >&5
3520 if eval "test \"`echo '$''{'wi_cv_write_return_t'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523@@ -7954,35 +8055,35 @@
3524 echo "$ac_t""$wi_cv_write_return_t" 1>&6
3525 if test "x$used_cache_for_wi_unistd_fpt" = "xno" ; then
3526 echo $ac_n "checking for size parameter to write""... $ac_c" 1>&6
3527-echo "configure:7958: checking for size parameter to write" >&5
3528+echo "configure:8059: checking for size parameter to write" >&5
3529 echo "$ac_t""$wi_cv_write_size_t" 1>&6
3530 echo $ac_n "checking for return type from send""... $ac_c" 1>&6
3531-echo "configure:7961: checking for return type from send" >&5
3532+echo "configure:8062: checking for return type from send" >&5
3533 echo "$ac_t""$wi_cv_send_return_t" 1>&6
3534 echo $ac_n "checking for size parameter to send""... $ac_c" 1>&6
3535-echo "configure:7964: checking for size parameter to send" >&5
3536+echo "configure:8065: checking for size parameter to send" >&5
3537 echo "$ac_t""$wi_cv_send_size_t" 1>&6
3538 echo $ac_n "checking for size parameter to connect""... $ac_c" 1>&6
3539-echo "configure:7967: checking for size parameter to connect" >&5
3540+echo "configure:8068: checking for size parameter to connect" >&5
3541 echo "$ac_t""$wi_cv_sockaddr_size_t" 1>&6
3542 echo $ac_n "checking for size parameter to setsockopt""... $ac_c" 1>&6
3543-echo "configure:7970: checking for size parameter to setsockopt" >&5
3544+echo "configure:8071: checking for size parameter to setsockopt" >&5
3545 echo "$ac_t""$wi_cv_sockopt_size_t" 1>&6
3546 echo $ac_n "checking for backlog parameter to listen""... $ac_c" 1>&6
3547-echo "configure:7973: checking for backlog parameter to listen" >&5
3548+echo "configure:8074: checking for backlog parameter to listen" >&5
3549 echo "$ac_t""$wi_cv_listen_backlog_t" 1>&6
3550 echo $ac_n "checking for seconds parameter to alarm""... $ac_c" 1>&6
3551-echo "configure:7976: checking for seconds parameter to alarm" >&5
3552+echo "configure:8077: checking for seconds parameter to alarm" >&5
3553 echo "$ac_t""$wi_cv_alarm_time_t" 1>&6
3554 echo $ac_n "checking for address parameter to gethostbyaddr""... $ac_c" 1>&6
3555-echo "configure:7979: checking for address parameter to gethostbyaddr" >&5
3556+echo "configure:8080: checking for address parameter to gethostbyaddr" >&5
3557 echo "$ac_t""$wi_cv_gethost_addrptr_t" 1>&6
3558 echo $ac_n "checking for size parameter to gethostname""... $ac_c" 1>&6
3559-echo "configure:7982: checking for size parameter to gethostname" >&5
3560+echo "configure:8083: checking for size parameter to gethostname" >&5
3561 echo "$ac_t""$wi_cv_gethostname_size_t" 1>&6
3562 else
3563 echo $ac_n "checking for size parameter to write""... $ac_c" 1>&6
3564-echo "configure:7986: checking for size parameter to write" >&5
3565+echo "configure:8087: checking for size parameter to write" >&5
3566 if eval "test \"`echo '$''{'wi_cv_write_size_t'+set}'`\" = set"; then
3567 echo $ac_n "(cached) $ac_c" 1>&6
3568 else
3569@@ -7991,7 +8092,7 @@
3570
3571 echo "$ac_t""$wi_cv_write_size_t" 1>&6
3572 echo $ac_n "checking for return type from send""... $ac_c" 1>&6
3573-echo "configure:7995: checking for return type from send" >&5
3574+echo "configure:8096: checking for return type from send" >&5
3575 if eval "test \"`echo '$''{'wi_cv_send_return_t'+set}'`\" = set"; then
3576 echo $ac_n "(cached) $ac_c" 1>&6
3577 else
3578@@ -8000,7 +8101,7 @@
3579
3580 echo "$ac_t""$wi_cv_send_return_t" 1>&6
3581 echo $ac_n "checking for size parameter to send""... $ac_c" 1>&6
3582-echo "configure:8004: checking for size parameter to send" >&5
3583+echo "configure:8105: checking for size parameter to send" >&5
3584 if eval "test \"`echo '$''{'wi_cv_send_size_t'+set}'`\" = set"; then
3585 echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587@@ -8009,7 +8110,7 @@
3588
3589 echo "$ac_t""$wi_cv_send_size_t" 1>&6
3590 echo $ac_n "checking for size parameter to connect""... $ac_c" 1>&6
3591-echo "configure:8013: checking for size parameter to connect" >&5
3592+echo "configure:8114: checking for size parameter to connect" >&5
3593 if eval "test \"`echo '$''{'wi_cv_sockaddr_size_t'+set}'`\" = set"; then
3594 echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596@@ -8018,7 +8119,7 @@
3597
3598 echo "$ac_t""$wi_cv_sockaddr_size_t" 1>&6
3599 echo $ac_n "checking for size parameter to setsockopt""... $ac_c" 1>&6
3600-echo "configure:8022: checking for size parameter to setsockopt" >&5
3601+echo "configure:8123: checking for size parameter to setsockopt" >&5
3602 if eval "test \"`echo '$''{'wi_cv_sockopt_size_t'+set}'`\" = set"; then
3603 echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605@@ -8027,7 +8128,7 @@
3606
3607 echo "$ac_t""$wi_cv_sockopt_size_t" 1>&6
3608 echo $ac_n "checking for backlog parameter to listen""... $ac_c" 1>&6
3609-echo "configure:8031: checking for backlog parameter to listen" >&5
3610+echo "configure:8132: checking for backlog parameter to listen" >&5
3611 if eval "test \"`echo '$''{'wi_cv_listen_backlog_t'+set}'`\" = set"; then
3612 echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614@@ -8036,7 +8137,7 @@
3615
3616 echo "$ac_t""$wi_cv_listen_backlog_t" 1>&6
3617 echo $ac_n "checking for seconds parameter to alarm""... $ac_c" 1>&6
3618-echo "configure:8040: checking for seconds parameter to alarm" >&5
3619+echo "configure:8141: checking for seconds parameter to alarm" >&5
3620 if eval "test \"`echo '$''{'wi_cv_alarm_time_t'+set}'`\" = set"; then
3621 echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623@@ -8045,7 +8146,7 @@
3624
3625 echo "$ac_t""$wi_cv_alarm_time_t" 1>&6
3626 echo $ac_n "checking for address parameter to gethostbyaddr""... $ac_c" 1>&6
3627-echo "configure:8049: checking for address parameter to gethostbyaddr" >&5
3628+echo "configure:8150: checking for address parameter to gethostbyaddr" >&5
3629 if eval "test \"`echo '$''{'wi_cv_gethost_addrptr_t'+set}'`\" = set"; then
3630 echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632@@ -8054,7 +8155,7 @@
3633
3634 echo "$ac_t""$wi_cv_gethost_addrptr_t" 1>&6
3635 echo $ac_n "checking for size parameter to gethostname""... $ac_c" 1>&6
3636-echo "configure:8058: checking for size parameter to gethostname" >&5
3637+echo "configure:8159: checking for size parameter to gethostname" >&5
3638 if eval "test \"`echo '$''{'wi_cv_gethostname_size_t'+set}'`\" = set"; then
3639 echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641@@ -8121,6 +8222,124 @@
3642 EOF
3643
3644
3645+echo $ac_n "checking for negative_control_t""... $ac_c" 1>&6
3646+echo "configure:8227: checking for negative_control_t" >&5
3647+if eval "test \"`echo '$''{'ac_cv_type_negative_control_t'+set}'`\" = set"; then
3648+ echo $ac_n "(cached) $ac_c" 1>&6
3649+else
3650+ cat > conftest.$ac_ext <<EOF
3651+#line 8232 "configure"
3652+#include "confdefs.h"
3653+
3654+#ifdef HAVE_UNISTD_H
3655+#include <unistd.h>
3656+#endif
3657+#include <sys/types.h>
3658+#if STDC_HEADERS
3659+#include <stdlib.h>
3660+#include <stddef.h>
3661+#endif
3662+
3663+EOF
3664+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3665+ egrep "(^|[^a-zA-Z_0-9])negative_control_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3666+ rm -rf conftest*
3667+ ac_cv_type_negative_control_t=yes
3668+else
3669+ rm -rf conftest*
3670+ ac_cv_type_negative_control_t=no
3671+fi
3672+rm -rf conftest*
3673+
3674+fi
3675+echo "$ac_t""$ac_cv_type_negative_control_t" 1>&6
3676+if test $ac_cv_type_negative_control_t = no; then
3677+ cat >> confdefs.h <<\EOF
3678+#define negative_control_t long
3679+EOF
3680+
3681+fi
3682+
3683+echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3684+echo "configure:8265: checking for ssize_t" >&5
3685+if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3686+ echo $ac_n "(cached) $ac_c" 1>&6
3687+else
3688+ cat > conftest.$ac_ext <<EOF
3689+#line 8270 "configure"
3690+#include "confdefs.h"
3691+
3692+#ifdef HAVE_UNISTD_H
3693+#include <unistd.h>
3694+#endif
3695+#include <sys/types.h>
3696+#if STDC_HEADERS
3697+#include <stdlib.h>
3698+#include <stddef.h>
3699+#endif
3700+
3701+EOF
3702+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3703+ egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3704+ rm -rf conftest*
3705+ ac_cv_type_ssize_t=yes
3706+else
3707+ rm -rf conftest*
3708+ ac_cv_type_ssize_t=no
3709+fi
3710+rm -rf conftest*
3711+
3712+fi
3713+echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3714+if test $ac_cv_type_ssize_t = no; then
3715+ cat >> confdefs.h <<\EOF
3716+#define ssize_t long
3717+EOF
3718+
3719+fi
3720+
3721+echo $ac_n "checking for sa_family_t""... $ac_c" 1>&6
3722+echo "configure:8303: checking for sa_family_t" >&5
3723+if eval "test \"`echo '$''{'ac_cv_type_sa_family_t'+set}'`\" = set"; then
3724+ echo $ac_n "(cached) $ac_c" 1>&6
3725+else
3726+ cat > conftest.$ac_ext <<EOF
3727+#line 8308 "configure"
3728+#include "confdefs.h"
3729+
3730+#ifdef HAVE_UNISTD_H
3731+#include <unistd.h>
3732+#endif
3733+#include <sys/types.h>
3734+#if STDC_HEADERS
3735+#include <stdlib.h>
3736+#include <stddef.h>
3737+#endif
3738+#include <sys/socket.h>
3739+#include <netinet/in.h>
3740+#include <arpa/inet.h>
3741+#include <netdb.h>
3742+
3743+EOF
3744+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3745+ egrep "(^|[^a-zA-Z_0-9])sa_family_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3746+ rm -rf conftest*
3747+ ac_cv_type_sa_family_t=yes
3748+else
3749+ rm -rf conftest*
3750+ ac_cv_type_sa_family_t=no
3751+fi
3752+rm -rf conftest*
3753+
3754+fi
3755+echo "$ac_t""$ac_cv_type_sa_family_t" 1>&6
3756+if test $ac_cv_type_sa_family_t = no; then
3757+ cat >> confdefs.h <<\EOF
3758+#define sa_family_t unsigned short
3759+EOF
3760+
3761+fi
3762+
3763
3764
3765 if test "x$ac_cv_header_unistd_h" = x ; then
3766@@ -8128,7 +8347,7 @@
3767 fi
3768
3769 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
3770-echo "configure:8132: checking types of arguments for select()" >&5
3771+echo "configure:8351: checking types of arguments for select()" >&5
3772 if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then
3773 echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775@@ -8142,7 +8361,7 @@
3776 for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
3777 for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
3778 cat > conftest.$ac_ext <<EOF
3779-#line 8146 "configure"
3780+#line 8365 "configure"
3781 #include "confdefs.h"
3782 #if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__) /* MG */
3783 # define _ALL_SOURCE 1 /* MG */
3784@@ -8161,7 +8380,7 @@
3785
3786 ; return 0; }
3787 EOF
3788-if { (eval echo configure:8165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3789+if { (eval echo configure:8384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3790 rm -rf conftest*
3791 ac_not_found=no ; break 3
3792 else
3793@@ -8202,14 +8421,14 @@
3794
3795 if test "$wi_cv_lfs64" != "yes" ; then
3796 echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
3797-echo "configure:8206: checking for struct stat64" >&5
3798+echo "configure:8425: checking for struct stat64" >&5
3799 echo "$ac_t""not needed" 1>&6
3800 wi_cv_struct_stat64=no
3801 else
3802 echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
3803-echo "configure:8211: checking for struct stat64" >&5
3804+echo "configure:8430: checking for struct stat64" >&5
3805 cat > conftest.$ac_ext <<EOF
3806-#line 8213 "configure"
3807+#line 8432 "configure"
3808 #include "confdefs.h"
3809
3810 /* includes */
3811@@ -8226,7 +8445,7 @@
3812
3813 ; return 0; }
3814 EOF
3815-if { (eval echo configure:8230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3816+if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3817 rm -rf conftest*
3818
3819 wi_cv_struct_stat64=yes
3820@@ -8254,9 +8473,9 @@
3821 fi
3822
3823 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
3824-echo "configure:8258: checking for sig_atomic_t" >&5
3825+echo "configure:8477: checking for sig_atomic_t" >&5
3826 cat > conftest.$ac_ext <<EOF
3827-#line 8260 "configure"
3828+#line 8479 "configure"
3829 #include "confdefs.h"
3830
3831 /* includes */
3832@@ -8281,7 +8500,7 @@
3833
3834 ; return 0; }
3835 EOF
3836-if { (eval echo configure:8285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3837+if { (eval echo configure:8504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3838 rm -rf conftest*
3839
3840 ac_cv_type_sig_atomic_t=yes
3841@@ -8305,7 +8524,7 @@
3842
3843
3844 echo $ac_n "checking how to access getopt() global variables""... $ac_c" 1>&6
3845-echo "configure:8309: checking how to access getopt() global variables" >&5
3846+echo "configure:8528: checking how to access getopt() global variables" >&5
3847 if eval "test \"`echo '$''{'wi_cv_getopt_decl'+set}'`\" = set"; then
3848 echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850@@ -8316,7 +8535,7 @@
3851 fi
3852
3853 cat > conftest.$ac_ext <<EOF
3854-#line 8320 "configure"
3855+#line 8539 "configure"
3856 #include "confdefs.h"
3857
3858 /* includes */
3859@@ -8335,7 +8554,7 @@
3860
3861 ; return 0; }
3862 EOF
3863-if { (eval echo configure:8339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3864+if { (eval echo configure:8558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3865 rm -rf conftest*
3866 wi_cv_getopt_decl="automatic"
3867 else
3868@@ -8350,7 +8569,7 @@
3869
3870 if test "$wi_cv_getopt_decl" = unknown ; then
3871 cat > conftest.$ac_ext <<EOF
3872-#line 8354 "configure"
3873+#line 8573 "configure"
3874 #include "confdefs.h"
3875
3876 /* includes */
3877@@ -8370,7 +8589,7 @@
3878
3879 ; return 0; }
3880 EOF
3881-if { (eval echo configure:8374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882+if { (eval echo configure:8593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3883 rm -rf conftest*
3884
3885 #
3886@@ -8408,9 +8627,9 @@
3887
3888
3889 echo $ac_n "checking for useable _res global variable""... $ac_c" 1>&6
3890-echo "configure:8412: checking for useable _res global variable" >&5
3891+echo "configure:8631: checking for useable _res global variable" >&5
3892 cat > conftest.$ac_ext <<EOF
3893-#line 8414 "configure"
3894+#line 8633 "configure"
3895 #include "confdefs.h"
3896
3897 /* includes */
3898@@ -8437,7 +8656,7 @@
3899
3900 ; return 0; }
3901 EOF
3902-if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3903+if { (eval echo configure:8660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3904 rm -rf conftest*
3905
3906 wi_cv__res_defdname=yes
3907@@ -8458,13 +8677,13 @@
3908 echo "$ac_t""$wi_cv__res_defdname" 1>&6
3909
3910 echo $ac_n "checking for struct cmsghdr""... $ac_c" 1>&6
3911-echo "configure:8462: checking for struct cmsghdr" >&5
3912+echo "configure:8681: checking for struct cmsghdr" >&5
3913 if eval "test \"`echo '$''{'wi_cv_struct_cmsghdr'+set}'`\" = set"; then
3914 echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916
3917 cat > conftest.$ac_ext <<EOF
3918-#line 8468 "configure"
3919+#line 8687 "configure"
3920 #include "confdefs.h"
3921
3922 /* includes */
3923@@ -8485,7 +8704,7 @@
3924
3925 ; return 0; }
3926 EOF
3927-if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928+if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3929 rm -rf conftest*
3930
3931 wi_cv_struct_cmsghdr=yes
3932@@ -8511,13 +8730,13 @@
3933 fi
3934
3935 echo $ac_n "checking for msg_control field in struct msghdr""... $ac_c" 1>&6
3936-echo "configure:8515: checking for msg_control field in struct msghdr" >&5
3937+echo "configure:8734: checking for msg_control field in struct msghdr" >&5
3938 if eval "test \"`echo '$''{'wi_cv_msghdr_control'+set}'`\" = set"; then
3939 echo $ac_n "(cached) $ac_c" 1>&6
3940 else
3941
3942 cat > conftest.$ac_ext <<EOF
3943-#line 8521 "configure"
3944+#line 8740 "configure"
3945 #include "confdefs.h"
3946
3947 /* includes */
3948@@ -8537,7 +8756,7 @@
3949
3950 ; return 0; }
3951 EOF
3952-if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3953+if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3954 rm -rf conftest*
3955
3956 wi_cv_msghdr_control=yes
3957@@ -8563,13 +8782,13 @@
3958 fi
3959
3960 echo $ac_n "checking for msg_accrights field in struct msghdr""... $ac_c" 1>&6
3961-echo "configure:8567: checking for msg_accrights field in struct msghdr" >&5
3962+echo "configure:8786: checking for msg_accrights field in struct msghdr" >&5
3963 if eval "test \"`echo '$''{'wi_cv_msghdr_accrights'+set}'`\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966
3967 cat > conftest.$ac_ext <<EOF
3968-#line 8573 "configure"
3969+#line 8792 "configure"
3970 #include "confdefs.h"
3971
3972 /* includes */
3973@@ -8589,7 +8808,7 @@
3974
3975 ; return 0; }
3976 EOF
3977-if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3978+if { (eval echo configure:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3979 rm -rf conftest*
3980
3981 wi_cv_msghdr_accrights=yes
3982@@ -8629,17 +8848,17 @@
3983 do
3984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3986-echo "configure:8633: checking for $ac_hdr" >&5
3987+echo "configure:8852: checking for $ac_hdr" >&5
3988 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3989 echo $ac_n "(cached) $ac_c" 1>&6
3990 else
3991 cat > conftest.$ac_ext <<EOF
3992-#line 8638 "configure"
3993+#line 8857 "configure"
3994 #include "confdefs.h"
3995 #include <$ac_hdr>
3996 EOF
3997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3998-{ (eval echo configure:8643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3999+{ (eval echo configure:8862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4001 if test -z "$ac_err"; then
4002 rm -rf conftest*
4003@@ -8667,11 +8886,11 @@
4004
4005 if test "$ac_cv_header_sys_select_h" = yes ; then
4006 echo $ac_n "checking if <sys/select.h> is compatible with <sys/time.h>""... $ac_c" 1>&6
4007-echo "configure:8671: checking if <sys/select.h> is compatible with <sys/time.h>" >&5
4008+echo "configure:8890: checking if <sys/select.h> is compatible with <sys/time.h>" >&5
4009 selecth=yes
4010 if test "$ac_cv_header_sys_time_h" = yes ; then
4011 cat > conftest.$ac_ext <<EOF
4012-#line 8675 "configure"
4013+#line 8894 "configure"
4014 #include "confdefs.h"
4015
4016 #if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
4017@@ -8691,7 +8910,7 @@
4018 tmval.tv_sec = 0;
4019 ; return 0; }
4020 EOF
4021-if { (eval echo configure:8695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4022+if { (eval echo configure:8914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023 rm -rf conftest*
4024 selecth=yes
4025 else
4026@@ -8720,12 +8939,12 @@
4027 for ac_func in getwd
4028 do
4029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4030-echo "configure:8724: checking for $ac_func" >&5
4031+echo "configure:8943: checking for $ac_func" >&5
4032 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4033 echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035 cat > conftest.$ac_ext <<EOF
4036-#line 8729 "configure"
4037+#line 8948 "configure"
4038 #include "confdefs.h"
4039 /* System header to define __stub macros and hopefully few prototypes,
4040 which can conflict with char $ac_func(); below. */
4041@@ -8748,7 +8967,7 @@
4042
4043 ; return 0; }
4044 EOF
4045-if { (eval echo configure:8752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4046+if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4047 rm -rf conftest*
4048 eval "ac_cv_func_$ac_func=yes"
4049 else
4050@@ -8776,12 +8995,12 @@
4051 for ac_func in getcwd getwd
4052 do
4053 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4054-echo "configure:8780: checking for $ac_func" >&5
4055+echo "configure:8999: checking for $ac_func" >&5
4056 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4057 echo $ac_n "(cached) $ac_c" 1>&6
4058 else
4059 cat > conftest.$ac_ext <<EOF
4060-#line 8785 "configure"
4061+#line 9004 "configure"
4062 #include "confdefs.h"
4063 /* System header to define __stub macros and hopefully few prototypes,
4064 which can conflict with char $ac_func(); below. */
4065@@ -8804,7 +9023,7 @@
4066
4067 ; return 0; }
4068 EOF
4069-if { (eval echo configure:8808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4070+if { (eval echo configure:9027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4071 rm -rf conftest*
4072 eval "ac_cv_func_$ac_func=yes"
4073 else
4074@@ -8842,12 +9061,12 @@
4075 for ac_func in fstat64 getdomainname gethostname getpass getpassphrase gnu_get_libc_release gnu_get_libc_version inet_aton inet_ntop llseek lseek64 lstat64 memmove mktime open64 pathconf readlink recvfile res_init sendfile setlocale setpgid setpgrp setsid setvbuf sigaction sigsetjmp stat64 strcasecmp strcoll strdup strerror strncoll strstr strtoq symlink sysconf sysctl sysinfo syslog tcgetattr uname waitpid
4076 do
4077 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4078-echo "configure:8846: checking for $ac_func" >&5
4079+echo "configure:9065: checking for $ac_func" >&5
4080 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4081 echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083 cat > conftest.$ac_ext <<EOF
4084-#line 8851 "configure"
4085+#line 9070 "configure"
4086 #include "confdefs.h"
4087 /* System header to define __stub macros and hopefully few prototypes,
4088 which can conflict with char $ac_func(); below. */
4089@@ -8870,7 +9089,7 @@
4090
4091 ; return 0; }
4092 EOF
4093-if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4094+if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4095 rm -rf conftest*
4096 eval "ac_cv_func_$ac_func=yes"
4097 else
4098@@ -8897,12 +9116,12 @@
4099 for ac_func in gethostbyaddr_r gethostbyname_r gethostbyname2_r getlogin_r getpwnam_r _posix_getpwnam_r getpwuid_r _posix_getpwuid_r getservbyname_r getservbyport_r gmtime_r localtime_r readdir_r
4100 do
4101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4102-echo "configure:8901: checking for $ac_func" >&5
4103+echo "configure:9120: checking for $ac_func" >&5
4104 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4105 echo $ac_n "(cached) $ac_c" 1>&6
4106 else
4107 cat > conftest.$ac_ext <<EOF
4108-#line 8906 "configure"
4109+#line 9125 "configure"
4110 #include "confdefs.h"
4111 /* System header to define __stub macros and hopefully few prototypes,
4112 which can conflict with char $ac_func(); below. */
4113@@ -8925,7 +9144,7 @@
4114
4115 ; return 0; }
4116 EOF
4117-if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4118+if { (eval echo configure:9148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4119 rm -rf conftest*
4120 eval "ac_cv_func_$ac_func=yes"
4121 else
4122@@ -8956,12 +9175,12 @@
4123 for ac_func in snprintf vsnprintf
4124 do
4125 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4126-echo "configure:8960: checking for $ac_func" >&5
4127+echo "configure:9179: checking for $ac_func" >&5
4128 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4129 echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131 cat > conftest.$ac_ext <<EOF
4132-#line 8965 "configure"
4133+#line 9184 "configure"
4134 #include "confdefs.h"
4135 /* System header to define __stub macros and hopefully few prototypes,
4136 which can conflict with char $ac_func(); below. */
4137@@ -8984,7 +9203,7 @@
4138
4139 ; return 0; }
4140 EOF
4141-if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4142+if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4143 rm -rf conftest*
4144 eval "ac_cv_func_$ac_func=yes"
4145 else
4146@@ -9012,7 +9231,7 @@
4147
4148 if test "$ac_cv_func_snprintf" != "no" ; then
4149 echo $ac_n "checking if snprintf works correctly""... $ac_c" 1>&6
4150-echo "configure:9016: checking if snprintf works correctly" >&5
4151+echo "configure:9235: checking if snprintf works correctly" >&5
4152
4153 if test "x$ac_cv_header_unistd_h" = x ; then
4154 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SNPRINTF_TERMINATES." 1>&2; exit 1; }
4155@@ -9031,7 +9250,7 @@
4156
4157 else
4158 cat > conftest.$ac_ext <<EOF
4159-#line 9035 "configure"
4160+#line 9254 "configure"
4161 #include "confdefs.h"
4162
4163 /* program */
4164@@ -9069,7 +9288,7 @@
4165 }
4166
4167 EOF
4168-if { (eval echo configure:9073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4169+if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4170 then
4171
4172 # action if true
4173@@ -9100,7 +9319,7 @@
4174
4175
4176 echo $ac_n "checking what snprintf() returns""... $ac_c" 1>&6
4177-echo "configure:9104: checking what snprintf() returns" >&5
4178+echo "configure:9323: checking what snprintf() returns" >&5
4179 if test "$cross_compiling" = yes; then
4180
4181 # action if cross compiling
4182@@ -9110,7 +9329,7 @@
4183
4184 else
4185 cat > conftest.$ac_ext <<EOF
4186-#line 9114 "configure"
4187+#line 9333 "configure"
4188 #include "confdefs.h"
4189
4190 /* program */
4191@@ -9143,7 +9362,7 @@
4192 }
4193
4194 EOF
4195-if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4196+if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4197 then
4198
4199 # action if true
4200@@ -9174,7 +9393,7 @@
4201
4202 if [ "$ac_cv_func_snprintf" = "no" ] || [ "$wi_cv_snprintf_terminates" = "no" ] || [ "$wi_cv_snprintf_returns_ptr" = "yes" ] ; then
4203 echo $ac_n "checking for snprintf in -lsnprintf""... $ac_c" 1>&6
4204-echo "configure:9178: checking for snprintf in -lsnprintf" >&5
4205+echo "configure:9397: checking for snprintf in -lsnprintf" >&5
4206 ac_lib_var=`echo snprintf'_'snprintf | sed 'y%./+-%__p_%'`
4207 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4208 echo $ac_n "(cached) $ac_c" 1>&6
4209@@ -9182,7 +9401,7 @@
4210 ac_save_LIBS="$LIBS"
4211 LIBS="-lsnprintf $LIBS"
4212 cat > conftest.$ac_ext <<EOF
4213-#line 9186 "configure"
4214+#line 9405 "configure"
4215 #include "confdefs.h"
4216 /* Override any gcc2 internal prototype to avoid an error. */
4217 /* We use char because int might match the return type of a gcc2
4218@@ -9193,7 +9412,7 @@
4219 snprintf()
4220 ; return 0; }
4221 EOF
4222-if { (eval echo configure:9197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4223+if { (eval echo configure:9416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4224 rm -rf conftest*
4225 eval "ac_cv_lib_$ac_lib_var=yes"
4226 else
4227@@ -9226,17 +9445,17 @@
4228 do
4229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4231-echo "configure:9230: checking for $ac_hdr" >&5
4232+echo "configure:9449: checking for $ac_hdr" >&5
4233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4234 echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236 cat > conftest.$ac_ext <<EOF
4237-#line 9235 "configure"
4238+#line 9454 "configure"
4239 #include "confdefs.h"
4240 #include <$ac_hdr>
4241 EOF
4242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4243-{ (eval echo configure:9240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4244+{ (eval echo configure:9459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4246 if test -z "$ac_err"; then
4247 rm -rf conftest*
4248@@ -9265,12 +9484,12 @@
4249 for ac_func in snprintf vsnprintf
4250 do
4251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4252-echo "configure:9269: checking for $ac_func" >&5
4253+echo "configure:9488: checking for $ac_func" >&5
4254 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4255 echo $ac_n "(cached) $ac_c" 1>&6
4256 else
4257 cat > conftest.$ac_ext <<EOF
4258-#line 9274 "configure"
4259+#line 9493 "configure"
4260 #include "confdefs.h"
4261 /* System header to define __stub macros and hopefully few prototypes,
4262 which can conflict with char $ac_func(); below. */
4263@@ -9293,7 +9512,7 @@
4264
4265 ; return 0; }
4266 EOF
4267-if { (eval echo configure:9297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4268+if { (eval echo configure:9516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4269 rm -rf conftest*
4270 eval "ac_cv_func_$ac_func=yes"
4271 else
4272@@ -9324,7 +9543,7 @@
4273
4274 if [ "$ac_cv_func_snprintf" = "no" ] || [ "$wi_cv_snprintf_terminates" = "no" ] || [ "$wi_cv_snprintf_returns_ptr" = "yes" ] ; then
4275 echo $ac_n "checking for snprintf in -lsnprintf""... $ac_c" 1>&6
4276-echo "configure:9328: checking for snprintf in -lsnprintf" >&5
4277+echo "configure:9547: checking for snprintf in -lsnprintf" >&5
4278 ac_lib_var=`echo snprintf'_'snprintf | sed 'y%./+-%__p_%'`
4279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4280 echo $ac_n "(cached) $ac_c" 1>&6
4281@@ -9332,7 +9551,7 @@
4282 ac_save_LIBS="$LIBS"
4283 LIBS="-lsnprintf $LIBS"
4284 cat > conftest.$ac_ext <<EOF
4285-#line 9336 "configure"
4286+#line 9555 "configure"
4287 #include "confdefs.h"
4288 /* Override any gcc2 internal prototype to avoid an error. */
4289 /* We use char because int might match the return type of a gcc2
4290@@ -9343,7 +9562,7 @@
4291 snprintf()
4292 ; return 0; }
4293 EOF
4294-if { (eval echo configure:9347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4295+if { (eval echo configure:9566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4296 rm -rf conftest*
4297 eval "ac_cv_lib_$ac_lib_var=yes"
4298 else
4299@@ -9376,17 +9595,17 @@
4300 do
4301 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4302 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4303-echo "configure:9380: checking for $ac_hdr" >&5
4304+echo "configure:9599: checking for $ac_hdr" >&5
4305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308 cat > conftest.$ac_ext <<EOF
4309-#line 9385 "configure"
4310+#line 9604 "configure"
4311 #include "confdefs.h"
4312 #include <$ac_hdr>
4313 EOF
4314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4315-{ (eval echo configure:9390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4316+{ (eval echo configure:9609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4318 if test -z "$ac_err"; then
4319 rm -rf conftest*
4320@@ -9415,12 +9634,12 @@
4321 for ac_func in snprintf vsnprintf
4322 do
4323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4324-echo "configure:9419: checking for $ac_func" >&5
4325+echo "configure:9638: checking for $ac_func" >&5
4326 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4327 echo $ac_n "(cached) $ac_c" 1>&6
4328 else
4329 cat > conftest.$ac_ext <<EOF
4330-#line 9424 "configure"
4331+#line 9643 "configure"
4332 #include "confdefs.h"
4333 /* System header to define __stub macros and hopefully few prototypes,
4334 which can conflict with char $ac_func(); below. */
4335@@ -9443,7 +9662,7 @@
4336
4337 ; return 0; }
4338 EOF
4339-if { (eval echo configure:9447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4340+if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4341 rm -rf conftest*
4342 eval "ac_cv_func_$ac_func=yes"
4343 else
4344@@ -9473,7 +9692,7 @@
4345
4346 if test "$ac_cv_func_snprintf" != "no" ; then
4347 echo $ac_n "checking if snprintf works correctly""... $ac_c" 1>&6
4348-echo "configure:9477: checking if snprintf works correctly" >&5
4349+echo "configure:9696: checking if snprintf works correctly" >&5
4350
4351 if test "x$ac_cv_header_unistd_h" = x ; then
4352 { echo "configure: error: Script needs to check for <unistd.h> before calling wi_SNPRINTF_TERMINATES." 1>&2; exit 1; }
4353@@ -9492,7 +9711,7 @@
4354
4355 else
4356 cat > conftest.$ac_ext <<EOF
4357-#line 9496 "configure"
4358+#line 9715 "configure"
4359 #include "confdefs.h"
4360
4361 /* program */
4362@@ -9530,7 +9749,7 @@
4363 }
4364
4365 EOF
4366-if { (eval echo configure:9534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4367+if { (eval echo configure:9753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4368 then
4369
4370 # action if true
4371@@ -9561,7 +9780,7 @@
4372
4373
4374 echo $ac_n "checking what snprintf() returns""... $ac_c" 1>&6
4375-echo "configure:9565: checking what snprintf() returns" >&5
4376+echo "configure:9784: checking what snprintf() returns" >&5
4377 if test "$cross_compiling" = yes; then
4378
4379 # action if cross compiling
4380@@ -9571,7 +9790,7 @@
4381
4382 else
4383 cat > conftest.$ac_ext <<EOF
4384-#line 9575 "configure"
4385+#line 9794 "configure"
4386 #include "confdefs.h"
4387
4388 /* program */
4389@@ -9604,7 +9823,7 @@
4390 }
4391
4392 EOF
4393-if { (eval echo configure:9608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4394+if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4395 then
4396
4397 # action if true
4398@@ -9641,14 +9860,14 @@
4399 fi
4400
4401 echo $ac_n "checking for sigsetjmp and siglongjmp""... $ac_c" 1>&6
4402-echo "configure:9645: checking for sigsetjmp and siglongjmp" >&5
4403+echo "configure:9864: checking for sigsetjmp and siglongjmp" >&5
4404 if eval "test \"`echo '$''{'wi_cv_func_sigsetjmp'+set}'`\" = set"; then
4405 echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407
4408
4409 cat > conftest.$ac_ext <<EOF
4410-#line 9652 "configure"
4411+#line 9871 "configure"
4412 #include "confdefs.h"
4413
4414 /* includes */
4415@@ -9671,7 +9890,7 @@
4416
4417 ; return 0; }
4418 EOF
4419-if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4420+if { (eval echo configure:9894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4421 rm -rf conftest*
4422
4423 wi_cv_func_sigsetjmp=yes
4424@@ -9701,12 +9920,12 @@
4425 for ac_func in setpgid setpgrp
4426 do
4427 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4428-echo "configure:9705: checking for $ac_func" >&5
4429+echo "configure:9924: checking for $ac_func" >&5
4430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4431 echo $ac_n "(cached) $ac_c" 1>&6
4432 else
4433 cat > conftest.$ac_ext <<EOF
4434-#line 9710 "configure"
4435+#line 9929 "configure"
4436 #include "confdefs.h"
4437 /* System header to define __stub macros and hopefully few prototypes,
4438 which can conflict with char $ac_func(); below. */
4439@@ -9729,7 +9948,7 @@
4440
4441 ; return 0; }
4442 EOF
4443-if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4444+if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4445 rm -rf conftest*
4446 eval "ac_cv_func_$ac_func=yes"
4447 else
4448@@ -9755,7 +9974,7 @@
4449
4450 fi
4451 echo $ac_n "checking if setpgrp behavior needs to be checked""... $ac_c" 1>&6
4452-echo "configure:9759: checking if setpgrp behavior needs to be checked" >&5
4453+echo "configure:9978: checking if setpgrp behavior needs to be checked" >&5
4454 if test "x$ac_cv_func_setpgid" = "xyes" ; then
4455 # OK, we will be using setpgid instead of setpgrp then...
4456 echo "$ac_t""no" 1>&6
4457@@ -9763,7 +9982,7 @@
4458 elif test "x$cross_compiling" = "xyes" ; then
4459 echo "$ac_t""yes" 1>&6
4460 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4461-echo "configure:9767: checking whether setpgrp takes no argument" >&5
4462+echo "configure:9986: checking whether setpgrp takes no argument" >&5
4463 case "`uname -a`" in
4464 *BSD*|*bsd*)
4465 ac_cv_func_setpgrp_void="no"
4466@@ -9781,7 +10000,7 @@
4467 # We're not cross compiling, so we can try this check
4468 echo "$ac_t""yes" 1>&6
4469 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4470-echo "configure:9785: checking whether setpgrp takes no argument" >&5
4471+echo "configure:10004: checking whether setpgrp takes no argument" >&5
4472 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4473 echo $ac_n "(cached) $ac_c" 1>&6
4474 else
4475@@ -9789,7 +10008,7 @@
4476 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4477 else
4478 cat > conftest.$ac_ext <<EOF
4479-#line 9793 "configure"
4480+#line 10012 "configure"
4481 #include "confdefs.h"
4482
4483 #ifdef HAVE_UNISTD_H
4484@@ -9809,7 +10028,7 @@
4485 }
4486
4487 EOF
4488-if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4489+if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4490 then
4491 ac_cv_func_setpgrp_void=no
4492 else
4493@@ -9836,13 +10055,13 @@
4494
4495
4496 echo $ac_n "checking whether setvbuf behavior can be checked""... $ac_c" 1>&6
4497-echo "configure:9840: checking whether setvbuf behavior can be checked" >&5
4498+echo "configure:10059: checking whether setvbuf behavior can be checked" >&5
4499 if test "x$cross_compiling" = "xyes" ; then
4500 echo "$ac_t""no" 1>&6
4501 else
4502 echo "$ac_t""yes" 1>&6
4503 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
4504-echo "configure:9846: checking whether setvbuf arguments are reversed" >&5
4505+echo "configure:10065: checking whether setvbuf arguments are reversed" >&5
4506 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
4507 echo $ac_n "(cached) $ac_c" 1>&6
4508 else
4509@@ -9850,7 +10069,7 @@
4510 ac_cv_func_setvbuf_reversed=no
4511 else
4512 cat > conftest.$ac_ext <<EOF
4513-#line 9854 "configure"
4514+#line 10073 "configure"
4515 #include "confdefs.h"
4516 #include <stdio.h>
4517 /* If setvbuf has the reversed format, exit 0. */
4518@@ -9864,7 +10083,7 @@
4519 exit(0); /* Non-reversed systems segv here. */
4520 }
4521 EOF
4522-if { (eval echo configure:9868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4523+if { (eval echo configure:10087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4524 then
4525 ac_cv_func_setvbuf_reversed=yes
4526 else
4527@@ -9891,19 +10110,19 @@
4528 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4529 # for constant arguments. Useless!
4530 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4531-echo "configure:9895: checking for working alloca.h" >&5
4532+echo "configure:10114: checking for working alloca.h" >&5
4533 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4534 echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536 cat > conftest.$ac_ext <<EOF
4537-#line 9900 "configure"
4538+#line 10119 "configure"
4539 #include "confdefs.h"
4540 #include <alloca.h>
4541 int main() {
4542 char *p = alloca(2 * sizeof(int));
4543 ; return 0; }
4544 EOF
4545-if { (eval echo configure:9907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4546+if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547 rm -rf conftest*
4548 ac_cv_header_alloca_h=yes
4549 else
4550@@ -9924,12 +10143,12 @@
4551 fi
4552
4553 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4554-echo "configure:9928: checking for alloca" >&5
4555+echo "configure:10147: checking for alloca" >&5
4556 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4557 echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559 cat > conftest.$ac_ext <<EOF
4560-#line 9933 "configure"
4561+#line 10152 "configure"
4562 #include "confdefs.h"
4563
4564 #ifdef __GNUC__
4565@@ -9957,7 +10176,7 @@
4566 char *p = (char *) alloca(1);
4567 ; return 0; }
4568 EOF
4569-if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4570+if { (eval echo configure:10180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4571 rm -rf conftest*
4572 ac_cv_func_alloca_works=yes
4573 else
4574@@ -9989,12 +10208,12 @@
4575
4576
4577 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4578-echo "configure:9993: checking whether alloca needs Cray hooks" >&5
4579+echo "configure:10212: checking whether alloca needs Cray hooks" >&5
4580 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4581 echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583 cat > conftest.$ac_ext <<EOF
4584-#line 9998 "configure"
4585+#line 10217 "configure"
4586 #include "confdefs.h"
4587 #if defined(CRAY) && ! defined(CRAY2)
4588 webecray
4589@@ -10019,12 +10238,12 @@
4590 if test $ac_cv_os_cray = yes; then
4591 for ac_func in _getb67 GETB67 getb67; do
4592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4593-echo "configure:10023: checking for $ac_func" >&5
4594+echo "configure:10242: checking for $ac_func" >&5
4595 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4596 echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598 cat > conftest.$ac_ext <<EOF
4599-#line 10028 "configure"
4600+#line 10247 "configure"
4601 #include "confdefs.h"
4602 /* System header to define __stub macros and hopefully few prototypes,
4603 which can conflict with char $ac_func(); below. */
4604@@ -10047,7 +10266,7 @@
4605
4606 ; return 0; }
4607 EOF
4608-if { (eval echo configure:10051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4609+if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4610 rm -rf conftest*
4611 eval "ac_cv_func_$ac_func=yes"
4612 else
4613@@ -10074,7 +10293,7 @@
4614 fi
4615
4616 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4617-echo "configure:10078: checking stack direction for C alloca" >&5
4618+echo "configure:10297: checking stack direction for C alloca" >&5
4619 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4620 echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622@@ -10082,7 +10301,7 @@
4623 ac_cv_c_stack_direction=0
4624 else
4625 cat > conftest.$ac_ext <<EOF
4626-#line 10086 "configure"
4627+#line 10305 "configure"
4628 #include "confdefs.h"
4629 find_stack_direction ()
4630 {
4631@@ -10101,7 +10320,7 @@
4632 exit (find_stack_direction() < 0);
4633 }
4634 EOF
4635-if { (eval echo configure:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4636+if { (eval echo configure:10324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4637 then
4638 ac_cv_c_stack_direction=1
4639 else
4640@@ -10142,7 +10361,7 @@
4641 fi
4642
4643 echo $ac_n "checking string parameter to waddstr""... $ac_c" 1>&6
4644-echo "configure:10146: checking string parameter to waddstr" >&5
4645+echo "configure:10365: checking string parameter to waddstr" >&5
4646 if eval "test \"`echo '$''{'wi_cv_waddstr_str_t'+set}'`\" = set"; then
4647 echo $ac_n "(cached) $ac_c" 1>&6
4648 else
4649@@ -10346,9 +10565,9 @@
4650
4651 # maxx or _maxx
4652 echo $ac_n "checking whether curses structure has maxx or _maxx field""... $ac_c" 1>&6
4653-echo "configure:10350: checking whether curses structure has maxx or _maxx field" >&5
4654+echo "configure:10569: checking whether curses structure has maxx or _maxx field" >&5
4655 cat > conftest.$ac_ext <<EOF
4656-#line 10352 "configure"
4657+#line 10571 "configure"
4658 #include "confdefs.h"
4659
4660 /* includes */
4661@@ -10379,7 +10598,7 @@
4662
4663 ; return 0; }
4664 EOF
4665-if { (eval echo configure:10383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4666+if { (eval echo configure:10602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4667 rm -rf conftest*
4668
4669 echo "$ac_t""maxx" 1>&6
4670@@ -10402,12 +10621,12 @@
4671 for ac_func in __getcurx __getcury __getmaxx __getmaxy __getbegx __getbegy
4672 do
4673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4674-echo "configure:10406: checking for $ac_func" >&5
4675+echo "configure:10625: checking for $ac_func" >&5
4676 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4677 echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679 cat > conftest.$ac_ext <<EOF
4680-#line 10411 "configure"
4681+#line 10630 "configure"
4682 #include "confdefs.h"
4683 /* System header to define __stub macros and hopefully few prototypes,
4684 which can conflict with char $ac_func(); below. */
4685@@ -10430,7 +10649,7 @@
4686
4687 ; return 0; }
4688 EOF
4689-if { (eval echo configure:10434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690+if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4691 rm -rf conftest*
4692 eval "ac_cv_func_$ac_func=yes"
4693 else
4694@@ -10458,9 +10677,9 @@
4695
4696 # getcurx
4697 echo $ac_n "checking for getcurx() functionality in curses library""... $ac_c" 1>&6
4698-echo "configure:10462: checking for getcurx() functionality in curses library" >&5
4699+echo "configure:10681: checking for getcurx() functionality in curses library" >&5
4700 cat > conftest.$ac_ext <<EOF
4701-#line 10464 "configure"
4702+#line 10683 "configure"
4703 #include "confdefs.h"
4704
4705 /* includes */
4706@@ -10491,7 +10710,7 @@
4707
4708 ; return 0; }
4709 EOF
4710-if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4711+if { (eval echo configure:10714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4712 rm -rf conftest*
4713
4714 cat >> confdefs.h <<\EOF
4715@@ -10512,9 +10731,9 @@
4716
4717 # getyx
4718 echo $ac_n "checking for getyx() functionality in curses library""... $ac_c" 1>&6
4719-echo "configure:10516: checking for getyx() functionality in curses library" >&5
4720+echo "configure:10735: checking for getyx() functionality in curses library" >&5
4721 cat > conftest.$ac_ext <<EOF
4722-#line 10518 "configure"
4723+#line 10737 "configure"
4724 #include "confdefs.h"
4725
4726 /* includes */
4727@@ -10545,7 +10764,7 @@
4728
4729 ; return 0; }
4730 EOF
4731-if { (eval echo configure:10549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4732+if { (eval echo configure:10768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733 rm -rf conftest*
4734
4735 cat >> confdefs.h <<\EOF
4736@@ -10566,9 +10785,9 @@
4737
4738 # getmaxx
4739 echo $ac_n "checking for getmaxx() functionality in curses library""... $ac_c" 1>&6
4740-echo "configure:10570: checking for getmaxx() functionality in curses library" >&5
4741+echo "configure:10789: checking for getmaxx() functionality in curses library" >&5
4742 cat > conftest.$ac_ext <<EOF
4743-#line 10572 "configure"
4744+#line 10791 "configure"
4745 #include "confdefs.h"
4746
4747 /* includes */
4748@@ -10598,7 +10817,7 @@
4749
4750 ; return 0; }
4751 EOF
4752-if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753+if { (eval echo configure:10821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754 rm -rf conftest*
4755
4756 cat >> confdefs.h <<\EOF
4757@@ -10619,9 +10838,9 @@
4758
4759 # getmaxyx
4760 echo $ac_n "checking for getmaxyx() functionality in curses library""... $ac_c" 1>&6
4761-echo "configure:10623: checking for getmaxyx() functionality in curses library" >&5
4762+echo "configure:10842: checking for getmaxyx() functionality in curses library" >&5
4763 cat > conftest.$ac_ext <<EOF
4764-#line 10625 "configure"
4765+#line 10844 "configure"
4766 #include "confdefs.h"
4767
4768 /* includes */
4769@@ -10651,7 +10870,7 @@
4770
4771 ; return 0; }
4772 EOF
4773-if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4774+if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775 rm -rf conftest*
4776
4777 cat >> confdefs.h <<\EOF
4778@@ -10672,9 +10891,9 @@
4779
4780 # getbegx
4781 echo $ac_n "checking for getbegx() functionality in curses library""... $ac_c" 1>&6
4782-echo "configure:10676: checking for getbegx() functionality in curses library" >&5
4783+echo "configure:10895: checking for getbegx() functionality in curses library" >&5
4784 cat > conftest.$ac_ext <<EOF
4785-#line 10678 "configure"
4786+#line 10897 "configure"
4787 #include "confdefs.h"
4788
4789 /* includes */
4790@@ -10705,7 +10924,7 @@
4791
4792 ; return 0; }
4793 EOF
4794-if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4795+if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4796 rm -rf conftest*
4797
4798 cat >> confdefs.h <<\EOF
4799@@ -10726,9 +10945,9 @@
4800
4801 # getbegyx
4802 echo $ac_n "checking for getbegyx() functionality in curses library""... $ac_c" 1>&6
4803-echo "configure:10730: checking for getbegyx() functionality in curses library" >&5
4804+echo "configure:10949: checking for getbegyx() functionality in curses library" >&5
4805 cat > conftest.$ac_ext <<EOF
4806-#line 10732 "configure"
4807+#line 10951 "configure"
4808 #include "confdefs.h"
4809
4810 /* includes */
4811@@ -10758,7 +10977,7 @@
4812
4813 ; return 0; }
4814 EOF
4815-if { (eval echo configure:10762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4816+if { (eval echo configure:10981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4817 rm -rf conftest*
4818
4819 cat >> confdefs.h <<\EOF
4820@@ -10779,9 +10998,9 @@
4821
4822 # touchwin
4823 echo $ac_n "checking for touchwin() functionality in curses library""... $ac_c" 1>&6
4824-echo "configure:10783: checking for touchwin() functionality in curses library" >&5
4825+echo "configure:11002: checking for touchwin() functionality in curses library" >&5
4826 cat > conftest.$ac_ext <<EOF
4827-#line 10785 "configure"
4828+#line 11004 "configure"
4829 #include "confdefs.h"
4830
4831 /* includes */
4832@@ -10809,7 +11028,7 @@
4833
4834 ; return 0; }
4835 EOF
4836-if { (eval echo configure:10813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4837+if { (eval echo configure:11032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838 rm -rf conftest*
4839
4840 cat >> confdefs.h <<\EOF
4841@@ -10830,9 +11049,9 @@
4842
4843 # beep
4844 echo $ac_n "checking for beep() functionality in curses library""... $ac_c" 1>&6
4845-echo "configure:10834: checking for beep() functionality in curses library" >&5
4846+echo "configure:11053: checking for beep() functionality in curses library" >&5
4847 cat > conftest.$ac_ext <<EOF
4848-#line 10836 "configure"
4849+#line 11055 "configure"
4850 #include "confdefs.h"
4851
4852 /* includes */
4853@@ -10859,7 +11078,7 @@
4854
4855 ; return 0; }
4856 EOF
4857-if { (eval echo configure:10863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858+if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4859 rm -rf conftest*
4860
4861 cat >> confdefs.h <<\EOF
4862@@ -10881,12 +11100,12 @@
4863 for ac_func in keypad nodelay curs_set doupdate wnoutrefresh
4864 do
4865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4866-echo "configure:10885: checking for $ac_func" >&5
4867+echo "configure:11104: checking for $ac_func" >&5
4868 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871 cat > conftest.$ac_ext <<EOF
4872-#line 10890 "configure"
4873+#line 11109 "configure"
4874 #include "confdefs.h"
4875 /* System header to define __stub macros and hopefully few prototypes,
4876 which can conflict with char $ac_func(); below. */
4877@@ -10909,7 +11128,7 @@
4878
4879 ; return 0; }
4880 EOF
4881-if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882+if { (eval echo configure:11132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4883 rm -rf conftest*
4884 eval "ac_cv_func_$ac_func=yes"
4885 else
4886@@ -10946,7 +11165,7 @@
4887
4888
4889 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4890-echo "configure:10950: checking for long file names" >&5
4891+echo "configure:11169: checking for long file names" >&5
4892 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
4893 echo $ac_n "(cached) $ac_c" 1>&6
4894 else
4895@@ -10990,7 +11209,7 @@
4896 fi
4897
4898 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4899-echo "configure:10994: checking whether ${MAKE-make} sets \${MAKE}" >&5
4900+echo "configure:11213: checking whether ${MAKE-make} sets \${MAKE}" >&5
4901 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4902 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
4903 echo $ac_n "(cached) $ac_c" 1>&6
4904@@ -11020,7 +11239,7 @@
4905 # Extract the first word of ""gtar"", so it can be a program name with args.
4906 set dummy "gtar"; ac_word=$2
4907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4908-echo "configure:11024: checking for $ac_word" >&5
4909+echo "configure:11243: checking for $ac_word" >&5
4910 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
4911 echo $ac_n "(cached) $ac_c" 1>&6
4912 else
4913@@ -11059,7 +11278,7 @@
4914 # Extract the first word of ""tar"", so it can be a program name with args.
4915 set dummy "tar"; ac_word=$2
4916 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4917-echo "configure:11063: checking for $ac_word" >&5
4918+echo "configure:11282: checking for $ac_word" >&5
4919 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
4920 echo $ac_n "(cached) $ac_c" 1>&6
4921 else
4922@@ -11107,7 +11326,7 @@
4923
4924
4925 echo $ac_n "checking how to create TAR files""... $ac_c" 1>&6
4926-echo "configure:11111: checking how to create TAR files" >&5
4927+echo "configure:11330: checking how to create TAR files" >&5
4928 x=""
4929 if [ -x /usr/bin/what ] ; then
4930 x=`/usr/bin/what "$TAR" 2>&1 | sed -n 's/.*pax.*/pax/g;/pax/p'`
4931@@ -11165,7 +11384,7 @@
4932 # Extract the first word of "ranlib", so it can be a program name with args.
4933 set dummy ranlib; ac_word=$2
4934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4935-echo "configure:11169: checking for $ac_word" >&5
4936+echo "configure:11388: checking for $ac_word" >&5
4937 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4938 echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940@@ -11195,7 +11414,7 @@
4941
4942
4943 echo $ac_n "checking for ar""... $ac_c" 1>&6
4944-echo "configure:11199: checking for ar" >&5
4945+echo "configure:11418: checking for ar" >&5
4946 AR="ar"
4947 if [ "x$cross_compiling" = "xyes" ] ; then
4948 machine=`${CC-gcc} -dumpmachine 2>/dev/null`
4949@@ -11226,7 +11445,7 @@
4950 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4951 # ./install, which can be erroneously created by make from ./install.sh.
4952 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4953-echo "configure:11230: checking for a BSD compatible install" >&5
4954+echo "configure:11449: checking for a BSD compatible install" >&5
4955 if test -z "$INSTALL"; then
4956 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4957 echo $ac_n "(cached) $ac_c" 1>&6
4958@@ -11282,7 +11501,7 @@
4959 # Extract the first word of ""pwd"", so it can be a program name with args.
4960 set dummy "pwd"; ac_word=$2
4961 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4962-echo "configure:11286: checking for $ac_word" >&5
4963+echo "configure:11505: checking for $ac_word" >&5
4964 if eval "test \"`echo '$''{'ac_cv_path_wi_PWD'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967@@ -11319,13 +11538,13 @@
4968
4969 if test "x$use_ccdv" = "xno" ; then
4970 echo $ac_n "checking for ccdv""... $ac_c" 1>&6
4971-echo "configure:11323: checking for ccdv" >&5
4972+echo "configure:11542: checking for ccdv" >&5
4973 echo "$ac_t""(disabled)" 1>&6
4974 else
4975 unset wi_cv_path_ccdv # can't use cache if it was a temp prog last time
4976 wi_used_cache_path_ccdv="yes"
4977 echo $ac_n "checking for ccdv""... $ac_c" 1>&6
4978-echo "configure:11329: checking for ccdv" >&5
4979+echo "configure:11548: checking for ccdv" >&5
4980 if eval "test \"`echo '$''{'wi_cv_path_ccdv'+set}'`\" = set"; then
4981 echo $ac_n "(cached) $ac_c" 1>&6
4982 else
4983@@ -11835,7 +12054,7 @@
4984
4985
4986 echo $ac_n "checking if shell can test for symlinks""... $ac_c" 1>&6
4987-echo "configure:11839: checking if shell can test for symlinks" >&5
4988+echo "configure:12058: checking if shell can test for symlinks" >&5
4989 if eval "test \"`echo '$''{'wi_cv_shell_test_symlinks'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4991 else
4992@@ -12318,25 +12537,25 @@
4993
4994
4995 echo $ac_n "checking CC""... $ac_c" 1>&6
4996-echo "configure:12322: checking CC" >&5
4997+echo "configure:12541: checking CC" >&5
4998 echo "$ac_t""$CC" 1>&6
4999 echo $ac_n "checking CFLAGS""... $ac_c" 1>&6
5000-echo "configure:12325: checking CFLAGS" >&5
5001+echo "configure:12544: checking CFLAGS" >&5
5002 echo "$ac_t""$CFLAGS" 1>&6
5003 echo $ac_n "checking CPPFLAGS""... $ac_c" 1>&6
5004-echo "configure:12328: checking CPPFLAGS" >&5
5005+echo "configure:12547: checking CPPFLAGS" >&5
5006 echo "$ac_t""$CPPFLAGS" 1>&6
5007 echo $ac_n "checking DEFS""... $ac_c" 1>&6
5008-echo "configure:12331: checking DEFS" >&5
5009+echo "configure:12550: checking DEFS" >&5
5010 echo "$ac_t""$DEFS" 1>&6
5011 echo $ac_n "checking NDEFS""... $ac_c" 1>&6
5012-echo "configure:12334: checking NDEFS" >&5
5013+echo "configure:12553: checking NDEFS" >&5
5014 echo "$ac_t""$NDEFS" 1>&6
5015 echo $ac_n "checking LDFLAGS""... $ac_c" 1>&6
5016-echo "configure:12337: checking LDFLAGS" >&5
5017+echo "configure:12556: checking LDFLAGS" >&5
5018 echo "$ac_t""$LDFLAGS" 1>&6
5019 echo $ac_n "checking LIBS""... $ac_c" 1>&6
5020-echo "configure:12340: checking LIBS" >&5
5021+echo "configure:12559: checking LIBS" >&5
5022 echo "$ac_t""$LIBS" 1>&6
5023 #
5024 # Also take the opportunity to do some post-configure clean-up
5025@@ -12495,12 +12714,12 @@
5026 s%@oldincludedir@%$oldincludedir%g
5027 s%@infodir@%$infodir%g
5028 s%@mandir@%$mandir%g
5029+s%@CC@%$CC%g
5030 s%@NDEFS@%$NDEFS%g
5031 s%@OS@%$OS%g
5032 s%@host@%$host%g
5033 s%@SYS@%$SYS%g
5034 s%@HOME_OS@%$HOME_OS%g
5035-s%@CC@%$CC%g
5036 s%@CPP@%$CPP%g
5037 s%@STRIP@%$STRIP%g
5038 s%@OBJEXT@%$OBJEXT%g
5039diff -Naur ncftp-3.2.6-ep/configure.in ncftp-3.2.6-zip/configure.in
5040--- ncftp-3.2.6-ep/configure.in 2016-08-14 04:15:28.000000000 +0200
5041+++ ncftp-3.2.6-zip/configure.in 2016-12-04 19:38:54.000000000 +0100
5042@@ -20,6 +20,7 @@
5043 dnl ---------------------------------------------------------------------------
5044 dnl
5045 wi_ENV_VAR_MESSAGES
5046+wi_PROG_CC
5047 wi_OS_VAR
5048
5049 case "$os" in
5050@@ -30,7 +31,6 @@
5051
5052 if test -f sh/install-sh ; then chmod 755 sh/*.sh sh/config.* sh/install-sh ; fi
5053 AC_CONFIG_AUX_DIR([sh])
5054-AC_PROG_CC
5055 wi_CC_PRECOMP
5056 wi_REQUEST_NO_Y2K_WARNINGS
5057 wi_CFLAGS_LFS_OR_LFS64
5058@@ -148,6 +148,13 @@
5059 wi_USE_LONG_LONG
5060 wi_STRUCT_TIMEVAL_FIELD_TYPES
5061 wi_UNISTD_FUNC_PARAM_TYPES
5062+wi_CHECK_TYPE(negative_control_t, long, [])
5063+wi_CHECK_TYPE(ssize_t, long, [])
5064+wi_CHECK_TYPE(sa_family_t, unsigned short, [#include <sys/socket.h>
5065+#include <netinet/in.h>
5066+#include <arpa/inet.h>
5067+#include <netdb.h>
5068+])
5069 wi_FUNC_SELECT_ARGTYPES
5070 wi_STRUCT_STAT64
5071 wi_TYPE_SIG_ATOMIC_T
5072diff -Naur ncftp-3.2.6-ep/doc/CHANGELOG.txt ncftp-3.2.6-zip/doc/CHANGELOG.txt
5073--- ncftp-3.2.6-ep/doc/CHANGELOG.txt 2016-09-24 00:49:32.000000000 +0200
5074+++ ncftp-3.2.6-zip/doc/CHANGELOG.txt 2016-12-04 19:59:38.000000000 +0100
5075@@ -1,7 +1,7 @@
5076 NcFTP Change Log:
5077 ================
5078
5079-3.2.6, 2016-09-23
5080+3.2.6, 2016-12-04
5081
5082 + If a recursive download operation is also requested with delete mode,
5083 attempt to remove empty directories after all files have completed
5084diff -Naur ncftp-3.2.6-ep/libncftp/c_opennologin.c ncftp-3.2.6-zip/libncftp/c_opennologin.c
5085--- ncftp-3.2.6-ep/libncftp/c_opennologin.c 2005-01-01 22:28:54.000000000 +0100
5086+++ ncftp-3.2.6-zip/libncftp/c_opennologin.c 2016-11-13 01:36:30.000000000 +0100
5087@@ -77,10 +77,10 @@
5088 elapsed = (int) (t1 - t0);
5089 if (elapsed < cip->redialDelay) {
5090 PrintF(cip, "Sleeping %u seconds.\n",
5091- (unsigned) cip->redialDelay - elapsed);
5092+ (unsigned int) (cip->redialDelay - elapsed));
5093 if (cip->redialStatusProc != 0)
5094 (*cip->redialStatusProc)(cip, kRedialStatusSleeping, cip->redialDelay - elapsed);
5095- (void) sleep((unsigned) cip->redialDelay - elapsed);
5096+ (void) sleep((unsigned int) (cip->redialDelay - elapsed));
5097 }
5098 }
5099 }
5100diff -Naur ncftp-3.2.6-ep/libncftp/ftp.c ncftp-3.2.6-zip/libncftp/ftp.c
5101--- ncftp-3.2.6-ep/libncftp/ftp.c 2016-10-30 18:37:54.000000000 +0100
5102+++ ncftp-3.2.6-zip/libncftp/ftp.c 2016-11-15 21:26:02.000000000 +0100
5103@@ -17,7 +17,14 @@
5104 const char gLibNcFTPVersion[] = kLibraryVersion;
5105
5106 #ifdef NO_SIGNALS
5107+#ifdef __clang__
5108+#pragma clang diagnostic push
5109+#pragma clang diagnostic ignored "-Wunused-const-variable"
5110+#endif
5111 static const char gNoSignalsMarker[] = "@(#) LibNcFTP - NO_SIGNALS";
5112+#ifdef __clang__
5113+#pragma clang diagnostic pop
5114+#endif
5115 #else
5116
5117 static int gGotSig = 0;
5118@@ -31,7 +38,14 @@
5119
5120
5121 #ifndef lint
5122+#ifdef __clang__
5123+#pragma clang diagnostic push
5124+#pragma clang diagnostic ignored "-Wunused-const-variable"
5125+#endif
5126 static const char gCopyright[] = "@(#) LibNcFTP Copyright 1995-2001, by Mike Gleason. All rights reserved.";
5127+#ifdef __clang__
5128+#pragma clang diagnostic pop
5129+#endif
5130 #endif
5131
5132 #ifdef HAVE_LIBSOCKS5
5133@@ -210,7 +224,7 @@
5134 cip->servCtlAddr.sin_addr.s_addr = ip_address.s_addr;
5135 } else {
5136 hpok = 1;
5137- cip->servCtlAddr.sin_family = hp.h_addrtype;
5138+ cip->servCtlAddr.sin_family = (sa_family_t) hp.h_addrtype;
5139 /* We'll fill in the rest of the structure below. */
5140 }
5141
5142@@ -980,6 +994,7 @@
5143 int setsbufs;
5144 size_t rbs, sbs;
5145 int passiveAttemptsRemaining = cip->maxNumberOfSuccessivePASVAttempts;
5146+ char servDataAddrStr[64];
5147
5148 /* Before we can transfer any data, and before we even ask the
5149 * remote server to start transferring via RETR/NLST/etc, we have
5150@@ -1087,6 +1102,7 @@
5151 goto bad;
5152 }
5153 FTPFixServerDataAddr(cip);
5154+ AddrToAddrStr(servDataAddrStr, sizeof(servDataAddrStr), &cip->servDataAddr, 0, NULL);
5155
5156 #ifdef HAVE_LIBSOCKS
5157 cip->ourDataAddr.sin_port = 0;
5158@@ -1107,13 +1123,14 @@
5159
5160 if (result == kTimeoutErr) {
5161 if (mode == kFallBackToSendPortMode) {
5162- FTPLogError(cip, kDontPerror, "Data connection timed out.\n");
5163+ FTPLogError(cip, kDontPerror, "Data connection to %s timed out.\n", servDataAddrStr);
5164 if (passiveAttemptsRemaining == 0) {
5165- FTPLogError(cip, kDontPerror, "Falling back to PORT instead of PASV mode.\n");
5166 (void) DisposeSocket(dataSocket);
5167 dataSocket = kClosedFileDescriptor;
5168 if (cip->hasPASV == kCommandAvailabilityUnknown)
5169 cip->hasPASV = kCommandNotAvailable;
5170+ if (cip->hasPASV == kCommandNotAvailable)
5171+ FTPLogError(cip, kDontPerror, "Falling back to PORT instead of PASV mode.\n");
5172 goto tryPort2;
5173 }
5174 } else {
5175@@ -1147,19 +1164,21 @@
5176 goto bad;
5177 }
5178 if ((mode == kFallBackToSendPortMode) && (passiveAttemptsRemaining == 0)) {
5179- FTPLogError(cip, kDoPerror, "connect failed.\n");
5180- FTPLogError(cip, kDontPerror, "Falling back to PORT instead of PASV mode.\n");
5181+ FTPLogError(cip, kDoPerror, "connect to %s failed.\n", servDataAddrStr);
5182 (void) DisposeSocket(dataSocket);
5183 dataSocket = kClosedFileDescriptor;
5184 if (cip->hasPASV == kCommandAvailabilityUnknown)
5185 cip->hasPASV = kCommandNotAvailable;
5186+ if (cip->hasPASV == kCommandNotAvailable)
5187+ FTPLogError(cip, kDontPerror, "Falling back to PORT instead of PASV mode.\n");
5188 goto tryPort2;
5189 }
5190- FTPLogError(cip, kDoPerror, "connect failed.\n");
5191+ FTPLogError(cip, kDoPerror, "connect to %s failed.\n", servDataAddrStr);
5192 result = kErrConnectDataSocket;
5193 cip->errNo = kErrConnectDataSocket;
5194 } else {
5195 /* Success, break loop because we do not need to do PASV again. */
5196+ PrintF(cip, "Connected to %s for PASV.\n", servDataAddrStr);
5197 break;
5198 }
5199
5200diff -Naur ncftp-3.2.6-ep/libncftp/ftw.c ncftp-3.2.6-zip/libncftp/ftw.c
5201--- ncftp-3.2.6-ep/libncftp/ftw.c 2016-10-30 18:31:10.000000000 +0100
5202+++ ncftp-3.2.6-zip/libncftp/ftw.c 2016-11-13 01:35:26.000000000 +0100
5203@@ -400,7 +400,7 @@
5204 #ifdef HAVE_PATHCONF
5205 nmx = pathconf(ftwip->curPath, _PC_NAME_MAX);
5206 if (nmx >= 256)
5207- debufsize = nmx;
5208+ debufsize = (size_t) nmx;
5209 #endif
5210 debufsize += sizeof(struct dirent) + 8;
5211 ftwip->direntbuf = calloc(debufsize, (size_t) 1);
5212diff -Naur ncftp-3.2.6-ep/libncftp/io_getmem.c ncftp-3.2.6-zip/libncftp/io_getmem.c
5213--- ncftp-3.2.6-ep/libncftp/io_getmem.c 2005-01-04 07:18:06.000000000 +0100
5214+++ ncftp-3.2.6-zip/libncftp/io_getmem.c 2016-11-13 01:33:18.000000000 +0100
5215@@ -216,7 +216,7 @@
5216 break;
5217 }
5218
5219- numberOfBytesLeftInMemBuf -= nread;
5220+ numberOfBytesLeftInMemBuf -= (size_t) nread;
5221 if (numberOfBytesLeftInMemBuf == 0) {
5222 /* Done (but maybe not at EOF of remote file). */
5223 atEOF = 0;
5224diff -Naur ncftp-3.2.6-ep/libncftp/io_list.c ncftp-3.2.6-zip/libncftp/io_list.c
5225--- ncftp-3.2.6-ep/libncftp/io_list.c 2016-10-30 18:37:18.000000000 +0100
5226+++ ncftp-3.2.6-zip/libncftp/io_list.c 2016-11-12 23:14:18.000000000 +0100
5227@@ -75,7 +75,11 @@
5228 break;
5229 }
5230
5231- (void) write(outfd, line, (write_size_t) strlen(line));
5232+ if (write(outfd, line, (write_size_t) strlen(line)) < 0) {
5233+ result = kErrLISTFailed;
5234+ cip->errNo = kErrLISTFailed;
5235+ break;
5236+ }
5237 }
5238
5239 DisposeSReadlineInfo(&lsSrl);
5240diff -Naur ncftp-3.2.6-ep/libncftp/io_sendfile.c ncftp-3.2.6-zip/libncftp/io_sendfile.c
5241--- ncftp-3.2.6-ep/libncftp/io_sendfile.c 2016-10-30 18:24:54.000000000 +0100
5242+++ ncftp-3.2.6-zip/libncftp/io_sendfile.c 2016-11-13 01:47:20.000000000 +0100
5243@@ -377,7 +377,7 @@
5244 errno = oerrno;
5245 } else {
5246 off1 = off;
5247- nwrote = sendfile(ofd, ifd, &off, (size_t) ntoread);
5248+ nwrote = (ssize_t) sendfile(ofd, ifd, &off, (size_t) ntoread);
5249 oerrno = errno;
5250 }
5251
5252@@ -714,7 +714,7 @@
5253 errno = ETIMEDOUT;
5254 goto umodebreak;
5255 }
5256- nwrote = write(ofd, dspp->buf + (nread - ntowrite), ntowrite);
5257+ nwrote = (ssize_t) write(ofd, dspp->buf + (nread - ntowrite), (size_t) ntowrite);
5258 if (nwrote < 0) {
5259 if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) {
5260 FD_ZERO(&wfds); FD_SET(ofd, &wfds);
5261diff -Naur ncftp-3.2.6-ep/libncftp/io_util.c ncftp-3.2.6-zip/libncftp/io_util.c
5262--- ncftp-3.2.6-ep/libncftp/io_util.c 2016-10-30 18:36:52.000000000 +0100
5263+++ ncftp-3.2.6-zip/libncftp/io_util.c 2016-11-13 01:32:36.000000000 +0100
5264@@ -166,7 +166,7 @@
5265 int xferTimeout;
5266 int ocancelXfer;
5267
5268- xferTimeout = cip->xferTimeout;
5269+ xferTimeout = (int) cip->xferTimeout;
5270 if (xferTimeout < 1)
5271 return (1);
5272
5273@@ -245,7 +245,7 @@
5274 int xferTimeout;
5275 int ocancelXfer;
5276
5277- xferTimeout = cip->xferTimeout;
5278+ xferTimeout = (int) cip->xferTimeout;
5279 if (xferTimeout < 1)
5280 return (1);
5281
5282diff -Naur ncftp-3.2.6-ep/libncftp/ncftp.h ncftp-3.2.6-zip/libncftp/ncftp.h
5283--- ncftp-3.2.6-ep/libncftp/ncftp.h 2016-10-30 18:17:36.000000000 +0100
5284+++ ncftp-3.2.6-zip/libncftp/ncftp.h 2016-11-12 20:16:24.000000000 +0100
5285@@ -13,7 +13,7 @@
5286 {
5287 #endif /* __cplusplus */
5288
5289-#define kLibraryVersion "@(#) LibNcFTP 3.2.6 (October 30, 2016)"
5290+#define kLibraryVersion "@(#) LibNcFTP 3.2.6 (November 12, 2016)"
5291
5292 /* This is used to verify validty of the data passed in. */
5293 #define kLibraryMagic "LibNcFTP 3.2.6"
5294diff -Naur ncftp-3.2.6-ep/libncftp/open.c ncftp-3.2.6-zip/libncftp/open.c
5295--- ncftp-3.2.6-ep/libncftp/open.c 2016-05-29 05:40:20.000000000 +0200
5296+++ ncftp-3.2.6-zip/libncftp/open.c 2016-11-13 01:28:08.000000000 +0100
5297@@ -978,10 +978,10 @@
5298 elapsed = (int) (t1 - t0);
5299 if (elapsed < cip->redialDelay) {
5300 PrintF(cip, "Sleeping %u seconds.\n",
5301- (unsigned) cip->redialDelay - elapsed);
5302+ (unsigned int) (cip->redialDelay - elapsed));
5303 if (cip->redialStatusProc != 0)
5304 (*cip->redialStatusProc)(cip, kRedialStatusSleeping, cip->redialDelay - elapsed);
5305- (void) sleep((unsigned) cip->redialDelay - elapsed);
5306+ (void) sleep((unsigned int) (cip->redialDelay - elapsed));
5307 }
5308 }
5309 }
5310diff -Naur ncftp-3.2.6-ep/libncftp/rftw.c ncftp-3.2.6-zip/libncftp/rftw.c
5311--- ncftp-3.2.6-ep/libncftp/rftw.c 2016-10-30 18:31:22.000000000 +0100
5312+++ ncftp-3.2.6-zip/libncftp/rftw.c 2016-11-13 01:26:46.000000000 +0100
5313@@ -110,7 +110,7 @@
5314
5315 nSubdirs = 0;
5316 ++ftwip->numDirs;
5317- ftwip->depth = depth;
5318+ ftwip->depth = (size_t) depth;
5319 if (ftwip->maxDepth < ftwip->depth) {
5320 ftwip->maxDepth = ftwip->depth;
5321 }
5322diff -Naur ncftp-3.2.6-ep/libncftp/rglobr.c ncftp-3.2.6-zip/libncftp/rglobr.c
5323--- ncftp-3.2.6-ep/libncftp/rglobr.c 2010-04-03 22:49:38.000000000 +0200
5324+++ ncftp-3.2.6-zip/libncftp/rglobr.c 2016-11-13 01:26:20.000000000 +0100
5325@@ -94,7 +94,7 @@
5326 fi.mdtm = ftwip->curStat.st_mtime;
5327 fi.size = (longest_int) ftwip->curStat.st_size;
5328 fi.type = ftwip->curType;
5329- fi.mode = ftwip->curStat.st_mode;
5330+ fi.mode = (int) ftwip->curStat.st_mode;
5331 AddFileInfo(xinfop->fileList, &fi);
5332
5333 /*
5334diff -Naur ncftp-3.2.6-ep/libncftp/u_decodehost.c ncftp-3.2.6-zip/libncftp/u_decodehost.c
5335--- ncftp-3.2.6-ep/libncftp/u_decodehost.c 2005-01-01 22:30:28.000000000 +0100
5336+++ ncftp-3.2.6-zip/libncftp/u_decodehost.c 2016-11-13 01:24:56.000000000 +0100
5337@@ -80,7 +80,7 @@
5338 port = atoi(cp);
5339 if ((port <= 0) || (port > 65535))
5340 return (-2);
5341- cip->port = port;
5342+ cip->port = (unsigned int) port;
5343 }
5344
5345 (void) STRNCPY(cip->host, hcp);
5346diff -Naur ncftp-3.2.6-ep/libncftp/u_decodeurl.c ncftp-3.2.6-zip/libncftp/u_decodeurl.c
5347--- ncftp-3.2.6-ep/libncftp/u_decodeurl.c 2016-10-30 17:40:54.000000000 +0100
5348+++ ncftp-3.2.6-zip/libncftp/u_decodeurl.c 2016-11-13 01:25:30.000000000 +0100
5349@@ -167,7 +167,7 @@
5350 URLCopyToken(portstr, sizeof(portstr), cp + 1, (size_t) (hend - (cp + 1)));
5351 port = atoi(portstr);
5352 if (port > 0)
5353- cip->port = port;
5354+ cip->port = (unsigned int) port;
5355 }
5356
5357 *hend = (char) sc;
5358diff -Naur ncftp-3.2.6-ep/libncftp/u_getpass.c ncftp-3.2.6-zip/libncftp/u_getpass.c
5359--- ncftp-3.2.6-ep/libncftp/u_getpass.c 2006-08-06 01:46:40.000000000 +0200
5360+++ ncftp-3.2.6-zip/libncftp/u_getpass.c 2016-11-13 01:24:30.000000000 +0100
5361@@ -67,7 +67,7 @@
5362 if (tcgetattr(fileno(stdout), &old_ti) != 0)
5363 return (pwbuf);
5364 new_ti = old_ti;
5365- new_ti.c_lflag &= ~ECHO;
5366+ new_ti.c_lflag &= (unsigned int) ~ECHO;
5367 if (tcsetattr(fileno(stdout), TCSAFLUSH, &new_ti) != 0)
5368 return (pwbuf);
5369 (void) FGets(pwbuf, pwbufsize, stdin);
5370diff -Naur ncftp-3.2.6-ep/libncftp/u_misc.c ncftp-3.2.6-zip/libncftp/u_misc.c
5371--- ncftp-3.2.6-ep/libncftp/u_misc.c 2015-09-27 22:45:20.000000000 +0200
5372+++ ncftp-3.2.6-zip/libncftp/u_misc.c 2016-11-13 01:23:32.000000000 +0100
5373@@ -290,7 +290,7 @@
5374 dirSepStr[0] = (char) dirSep;
5375 dirSepStr[1] = '\0';
5376 dEnd = Strnpcpy(dst, parentDir, dsize);
5377- nUsed = (dEnd - dst);
5378+ nUsed = (size_t) (dEnd - dst);
5379 if (nUsed >= (dsize - 3)) {
5380 #ifdef ENAMETOOLONG
5381 errno = ENAMETOOLONG;
5382diff -Naur ncftp-3.2.6-ep/libncftp/u_pathcat.c ncftp-3.2.6-zip/libncftp/u_pathcat.c
5383--- ncftp-3.2.6-ep/libncftp/u_pathcat.c 2006-07-27 17:48:56.000000000 +0200
5384+++ ncftp-3.2.6-zip/libncftp/u_pathcat.c 2016-11-13 01:23:04.000000000 +0100
5385@@ -290,7 +290,7 @@
5386 *cp++ = '/';
5387 }
5388 *cp = '\0';
5389- (void) Strnpcat(cp, src, sizeof(tmp) - (cp - tmp));
5390+ (void) Strnpcat(cp, src, sizeof(tmp) - (size_t) (cp - tmp));
5391 CompressPath(dst, tmp, dsize, dosCompat);
5392 } /* PathCat */
5393
5394@@ -370,7 +370,7 @@
5395 *cp++ = '/';
5396 }
5397 *cp = '\0';
5398- (void) Strnpcat(cp, src, dsize - (cp - tmp));
5399+ (void) Strnpcat(cp, src, dsize - (size_t) (cp - tmp));
5400 CompressPath(dst, tmp, dsize, dosCompat);
5401 free(tmp);
5402 return (0);
5403diff -Naur ncftp-3.2.6-ep/libncftp/u_scram.c ncftp-3.2.6-zip/libncftp/u_scram.c
5404--- ncftp-3.2.6-ep/libncftp/u_scram.c 2005-01-01 22:31:28.000000000 +0100
5405+++ ncftp-3.2.6-zip/libncftp/u_scram.c 2016-11-13 01:22:04.000000000 +0100
5406@@ -24,7 +24,7 @@
5407 ch = src[i];
5408 if (ch == 0)
5409 break;
5410- dst[i] = (unsigned char) (ch ^ (int) (k2[i % (int) keyLen]));
5411+ dst[i] = (unsigned char) (ch ^ (unsigned int) (k2[i % (int) keyLen]));
5412 }
5413 dst[i] = '\0';
5414 } /* Scramble */
5415diff -Naur ncftp-3.2.6-ep/libncftp/wincfg.h ncftp-3.2.6-zip/libncftp/wincfg.h
5416--- ncftp-3.2.6-ep/libncftp/wincfg.h 2001-11-17 12:03:04.000000000 +0100
5417+++ ncftp-3.2.6-zip/libncftp/wincfg.h 2016-11-27 21:25:36.000000000 +0100
5418@@ -16,6 +16,7 @@
5419 #define recv_size_t unsigned int
5420 #define send_return_t int
5421 #define send_size_t unsigned int
5422+#define sa_family_t short
5423
5424 #define SELECT_TYPE_ARG1 int
5425
5426diff -Naur ncftp-3.2.6-ep/ncftp/cmds.c ncftp-3.2.6-zip/ncftp/cmds.c
5427--- ncftp-3.2.6-ep/ncftp/cmds.c 2016-10-30 21:24:12.000000000 +0100
5428+++ ncftp-3.2.6-zip/ncftp/cmds.c 2016-11-13 01:07:28.000000000 +0100
5429@@ -63,6 +63,10 @@
5430 /* Did the user stupidly type passwords, etc., on our command line? */
5431 int gUserTypedSensitiveInfoAtShellSoDoNotSaveItToDisk = 0;
5432
5433+#ifdef __clang__
5434+#pragma clang diagnostic push
5435+#pragma clang diagnostic ignored "-Wpadded"
5436+#endif
5437 typedef struct SpoolCmdInfo {
5438 int xtype;
5439 int deleteFlag;
5440@@ -73,6 +77,9 @@
5441 const char *rcwd;
5442 int base;
5443 } SpoolCmdInfo;
5444+#ifdef __clang__
5445+#pragma clang diagnostic pop
5446+#endif
5447
5448 extern FTPConnectionInfo gConn;
5449 extern char gOurDirectoryPath[];
5450@@ -239,7 +246,8 @@
5451 (void) fflush(stdout);
5452 (void) fflush(stdin);
5453 (void) memset(ans, 0, sizeof(ans));
5454- (void) fgets(ans, sizeof(ans) - 1, stdin);
5455+ if (fgets(ans, sizeof(ans) - 1, stdin) == NULL)
5456+ ans[0] = '\0';
5457 Trace(0, "%s%s", buf, ans);
5458 switch ((int) ans[0]) {
5459 case 'y':
5460@@ -1156,7 +1164,8 @@
5461 printf(" [R!]esume all?");
5462 printf(" [S!]kip all? [C]ancel > ");
5463 fflush(stdin);
5464- (void) fgets(ans, sizeof(ans) - 1, stdin);
5465+ if (fgets(ans, sizeof(ans) - 1, stdin) == NULL)
5466+ ans[0] = '\0';
5467 switch ((int) ans[0]) {
5468 case 'c':
5469 case 'C':
5470@@ -1224,7 +1233,8 @@
5471 (void) memset(newname, 0, sizeof(newname));
5472 printf("\tSave as: ");
5473 fflush(stdin);
5474- (void) fgets(newname, sizeof(newname) - 1, stdin);
5475+ if (fgets(newname, sizeof(newname) - 1, stdin) == NULL)
5476+ newname[0] = '\0';
5477 newname[strlen(newname) - 1] = '\0';
5478 if (newname[0] == '\0') {
5479 /* Nevermind. */
5480@@ -1440,7 +1450,14 @@
5481 (void) sprintf(spec, "%%-%ds",
5482 (j < nCols - 1) ? widestName : widestName - 2
5483 );
5484+#ifdef __clang__
5485+#pragma clang diagnostic push
5486+#pragma clang diagnostic ignored "-Wformat-nonliteral"
5487+#endif
5488 (void) printf(spec, cmdnames[k]);
5489+#ifdef __clang__
5490+#pragma clang diagnostic pop
5491+#endif
5492 }
5493 }
5494 (void) printf("\n");
5495@@ -1667,9 +1684,8 @@
5496 Trace(0, "Selected bookmark from editor: [%s]\n", selectedBmName);
5497 }
5498 }
5499- return (0);
5500 }
5501- return (-1);
5502+ return (0);
5503 #endif /* ! Windows */
5504 } /* RunBookmarkEditor */
5505
5506@@ -2079,7 +2095,8 @@
5507 fprintf(stderr, "Cannot run command: %s\n", cmd);
5508 #else
5509 Trace(0, "Sys: %s\n", cmd);
5510- (void) system(cmd);
5511+ if ((i = system(cmd)) != 0)
5512+ Trace(0, "Sys: %s = %d\n", cmd, i);
5513 #endif
5514 } /* Sys */
5515
5516@@ -2675,7 +2692,8 @@
5517
5518 /* If the bookmark specified a local directory, change to it now. */
5519 if ((gLoadedBm != 0) && (gBm.ldir[0] != '\0')) {
5520- (void) chdir(gBm.ldir);
5521+ if (chdir(gBm.ldir) != 0)
5522+ Trace(-1, "Could not chdir to %s.\n", gBm.ldir);
5523 (void) STRNCPY(gPrevLocalCWD, gLocalCWD);
5524 if (FTPGetLocalCWD(gLocalCWD, sizeof(gLocalCWD)) != NULL) {
5525 Trace(-1, "Current local directory is %s.\n", gLocalCWD);
5526@@ -3124,7 +3142,8 @@
5527 if (remotesize < localsize)
5528 printf(" [R!]esume all?");
5529 printf(" [S!]kip all? [C]ancel > ");
5530- (void) fgets(ans, sizeof(ans) - 1, stdin);
5531+ if (fgets(ans, sizeof(ans) - 1, stdin) == NULL)
5532+ ans[0] = '\0';
5533 switch ((int) ans[0]) {
5534 case 'c':
5535 case 'C':
5536@@ -3192,7 +3211,8 @@
5537 (void) memset(newname, 0, sizeof(newname));
5538 printf("\tSave as: ");
5539 fflush(stdin);
5540- (void) fgets(newname, sizeof(newname) - 1, stdin);
5541+ if (fgets(newname, sizeof(newname) - 1, stdin) == NULL)
5542+ newname[0] = '\0';
5543 newname[strlen(newname) - 1] = '\0';
5544 if (newname[0] == '\0') {
5545 /* Nevermind. */
5546diff -Naur ncftp-3.2.6-ep/ncftp/gl_getline.c ncftp-3.2.6-zip/ncftp/gl_getline.c
5547--- ncftp-3.2.6-ep/ncftp/gl_getline.c 2016-10-30 21:17:04.000000000 +0100
5548+++ ncftp-3.2.6-zip/ncftp/gl_getline.c 2016-11-13 00:57:18.000000000 +0100
5549@@ -139,13 +139,11 @@
5550 # define IsLocalPathDelim(c) ((c == LOCAL_PATH_DELIM) || (c == LOCAL_PATH_ALTDELIM))
5551 # define UNC_PATH_PREFIX "//"
5552 # define IsUNCPrefixed(s) (IsLocalPathDelim(s[0]) && IsLocalPathDelim(s[1]))
5553-/* _StrFindLocalPathDelim(a) -- use windows-specific function; understands '/' and '\\' */
5554-/* _StrRFindLocalPathDelim(a) -- use windows-specific function; understands '/' and '\\' */
5555 # else
5556 # define LOCAL_PATH_DELIM '/'
5557 # define LOCAL_PATH_DELIM_STR "/"
5558-# define _StrFindLocalPathDelim(a) strchr(a, LOCAL_PATH_DELIM)
5559-# define _StrRFindLocalPathDelim(a) strrchr(a, LOCAL_PATH_DELIM)
5560+# define My_StrFindLocalPathDelim(a) strchr(a, LOCAL_PATH_DELIM)
5561+# define My_StrRFindLocalPathDelim(a) strrchr(a, LOCAL_PATH_DELIM)
5562 # define IsLocalPathDelim(c) (c == LOCAL_PATH_DELIM)
5563 # endif
5564 #endif
5565@@ -502,12 +500,14 @@
5566 gl_putc(int c)
5567 {
5568 char ch = (char) (unsigned char) c;
5569+ long rc;
5570
5571- (void) write(1, &ch, (write_size_t) 1);
5572+ rc = (long) write(1, &ch, (write_size_t) 1);
5573 if (ch == '\n') {
5574 ch = '\r';
5575- (void) write(1, &ch, (write_size_t) 1); /* RAW mode needs '\r', does not hurt */
5576+ rc = (long) write(1, &ch, (write_size_t) 1); /* RAW mode needs '\r', does not hurt */
5577 }
5578+ if (rc == -666) gl_error("\nDon't care about compiler warning\n");
5579 }
5580
5581 /******************** fairly portable part *********************************/
5582@@ -553,7 +553,8 @@
5583
5584 if (buf) {
5585 len = (write_size_t) strlen(buf);
5586- (void) write(1, buf, len);
5587+ if (write(1, buf, len) < 0)
5588+ gl_error("\ngl_puts failed\n");
5589 }
5590 #endif
5591 }
5592@@ -567,7 +568,8 @@
5593 write_size_t len = (write_size_t) strlen(buf);
5594
5595 gl_cleanup();
5596- (void) write(2, buf, len);
5597+ if (write(2, buf, len) < 0)
5598+ exit(2);
5599 exit(1);
5600 }
5601
5602@@ -2173,9 +2175,9 @@
5603
5604
5605
5606-#ifndef _StrFindLocalPathDelim
5607+#ifndef My_StrFindLocalPathDelim
5608 static char *
5609-_StrRFindLocalPathDelim(const char *src) /* TODO: optimize */
5610+My_StrRFindLocalPathDelim(const char *src) /* TODO: optimize */
5611 {
5612 const char *last;
5613 int c;
5614@@ -2376,7 +2378,7 @@
5615
5616 if (dir == NULL) {
5617 dirtoopen1 = NULL;
5618- cp = _StrRFindLocalPathDelim(start);
5619+ cp = My_StrRFindLocalPathDelim(start);
5620 if (cp == start) {
5621 dirtoopen = LOCAL_PATH_DELIM_STR; /* root dir */
5622 filepfxoffset = 1;
5623@@ -2504,7 +2506,7 @@
5624 if (searchHandle == NULL) {
5625 dirtoopen1 = NULL;
5626 dirtoopen2 = NULL;
5627- cp = _StrRFindLocalPathDelim(start);
5628+ cp = My_StrRFindLocalPathDelim(start);
5629 if (cp == start) {
5630 dirtoopen = LOCAL_PATH_DELIM_STR; /* root dir */
5631 filepfxoffset = 1;
5632diff -Naur ncftp-3.2.6-ep/ncftp/ls.c ncftp-3.2.6-zip/ncftp/ls.c
5633--- ncftp-3.2.6-ep/ncftp/ls.c 2016-10-30 21:24:12.000000000 +0100
5634+++ ncftp-3.2.6-zip/ncftp/ls.c 2016-11-13 01:20:28.000000000 +0100
5635@@ -402,6 +402,11 @@
5636 #endif
5637 }
5638
5639+#ifdef __clang__
5640+#pragma clang diagnostic push
5641+#pragma clang diagnostic ignored "-Wformat-nonliteral"
5642+#endif
5643+
5644 #ifdef HAVE_SNPRINTF
5645 (void) snprintf(
5646 plugstr,
5647@@ -417,6 +422,10 @@
5648 );
5649 #endif
5650
5651+#ifdef __clang__
5652+#pragma clang diagnostic pop
5653+#endif
5654+
5655 (void) fprintf(stream, "%s %12s %s%s %s%s%s%s%s\n",
5656 plugstr,
5657 sizestr,
5658diff -Naur ncftp-3.2.6-ep/ncftp/ls.h ncftp-3.2.6-zip/ncftp/ls.h
5659--- ncftp-3.2.6-ep/ncftp/ls.h 2016-10-30 21:24:12.000000000 +0100
5660+++ ncftp-3.2.6-zip/ncftp/ls.h 2016-11-13 01:18:58.000000000 +0100
5661@@ -7,6 +7,11 @@
5662
5663 #define kLsCacheItemLifetime 900 /* seconds */
5664
5665+#ifdef __clang__
5666+#pragma clang diagnostic push
5667+#pragma clang diagnostic ignored "-Wpadded"
5668+#endif
5669+
5670 typedef struct LsCacheItem {
5671 char *itempath;
5672 FTPFileInfoList fil;
5673@@ -14,6 +19,10 @@
5674 int hits;
5675 } LsCacheItem;
5676
5677+#ifdef __clang__
5678+#pragma clang diagnostic pop
5679+#endif
5680+
5681 #define kLsCacheSize 32
5682
5683 /* ls.c */
5684diff -Naur ncftp-3.2.6-ep/ncftp/progress.c ncftp-3.2.6-zip/ncftp/progress.c
5685--- ncftp-3.2.6-ep/ncftp/progress.c 2016-10-30 21:24:12.000000000 +0100
5686+++ ncftp-3.2.6-zip/ncftp/progress.c 2016-11-13 01:17:58.000000000 +0100
5687@@ -29,6 +29,11 @@
5688 #endif /* ncftp */
5689
5690
5691+#ifdef __clang__
5692+#pragma clang diagnostic push
5693+#pragma clang diagnostic ignored "-Wformat-nonliteral"
5694+#endif
5695+
5696 double
5697 FileSize(const double size, const char **uStr0, double *const uMult0)
5698 {
5699@@ -499,3 +504,7 @@
5700 break;
5701 }
5702 } /* PrPhilBar */
5703+
5704+#ifdef __clang__
5705+#pragma clang diagnostic pop
5706+#endif
5707diff -Naur ncftp-3.2.6-ep/ncftp/readln.c ncftp-3.2.6-zip/ncftp/readln.c
5708--- ncftp-3.2.6-ep/ncftp/readln.c 2016-10-30 21:24:12.000000000 +0100
5709+++ ncftp-3.2.6-zip/ncftp/readln.c 2016-11-12 23:16:28.000000000 +0100
5710@@ -135,8 +135,8 @@
5711 osigpipe = NcSignal(SIGPIPE, SIG_IGN);
5712 infp = popen(ncftpbookmarks, "r");
5713 if (infp != NULL) {
5714- columns = 0;
5715- (void) fscanf(infp, "%d", &columns);
5716+ if (fscanf(infp, "%d", &columns) != 1)
5717+ columns = 0;
5718 while (getc(infp) != EOF) {}
5719 (void) pclose(infp);
5720
5721diff -Naur ncftp-3.2.6-ep/ncftp/shell.h ncftp-3.2.6-zip/ncftp/shell.h
5722--- ncftp-3.2.6-ep/ncftp/shell.h 2016-10-30 21:24:12.000000000 +0100
5723+++ ncftp-3.2.6-zip/ncftp/shell.h 2016-11-13 01:08:14.000000000 +0100
5724@@ -6,10 +6,9 @@
5725 */
5726
5727 typedef struct ArgvInfo {
5728- char *cargv[255];
5729+ char *cargv[256];
5730 int cargc;
5731 int noglobargv[255];
5732- int reserved;
5733 char argbuf[2048];
5734 } ArgvInfo, *ArgvInfoPtr;
5735
5736@@ -39,6 +38,10 @@
5737 * table, so each command doesn't have to check the number of
5738 * arguments and print it's own usage messages if it doesn't want to.
5739 */
5740+#ifdef __clang__
5741+#pragma clang diagnostic push
5742+#pragma clang diagnostic ignored "-Wpadded"
5743+#endif
5744 typedef struct Command {
5745 const char *name;
5746 CmdProc proc;
5747@@ -46,6 +49,9 @@
5748 int flags;
5749 int minargs, maxargs;
5750 } Command;
5751+#ifdef __clang__
5752+#pragma clang diagnostic pop
5753+#endif
5754
5755 /* Parameter to GetCommandOrMacro(). */
5756 #define kAbbreviatedMatchAllowed 0
5757diff -Naur ncftp-3.2.6-ep/ncftp/spoolutil.c ncftp-3.2.6-zip/ncftp/spoolutil.c
5758--- ncftp-3.2.6-ep/ncftp/spoolutil.c 2016-10-30 21:24:12.000000000 +0100
5759+++ ncftp-3.2.6-zip/ncftp/spoolutil.c 2016-11-15 18:42:14.000000000 +0100
5760@@ -102,6 +102,8 @@
5761 c = 0;
5762 for (cp = line; *cp; cp++) {
5763 c = (int) *cp;
5764+ if (c == '\r')
5765+ continue;
5766 if ((c == '\n') && (cp[1] != '\0')) {
5767 if (putc('\\', ofp) == EOF)
5768 return (-1);
5769@@ -182,7 +184,7 @@
5770 SpoolName(sname, snsize, 'z', gSpoolSerial, when);
5771 if (SpoolFilePath(initialpath, ipsize, sdir, sname) == NULL) return NULL;
5772 #if (defined(WIN32) || defined(_WINDOWS)) && !defined(__CYGWIN__)
5773- if ((fp = _fsopen(finalpath, FOPEN_READ_BINARY, _SH_DENYNO)) != NULL)
5774+ if ((fp = _fsopen(finalpath, FOPEN_READ_TEXT, _SH_DENYNO)) != NULL)
5775 #else
5776 if ((fp = fopen(finalpath, "r")) != NULL)
5777 #endif
5778@@ -196,7 +198,7 @@
5779 SpoolName(sname, snsize, op[0], gSpoolSerial, when);
5780 if (SpoolFilePath(finalpath, fpsize, sdir, sname) == NULL) return NULL;
5781 #if (defined(WIN32) || defined(_WINDOWS)) && !defined(__CYGWIN__)
5782- if ((fp = _fsopen(finalpath, FOPEN_READ_BINARY, _SH_DENYNO)) != NULL)
5783+ if ((fp = _fsopen(finalpath, FOPEN_READ_TEXT, _SH_DENYNO)) != NULL)
5784 #else
5785 if ((fp = fopen(finalpath, "r")) != NULL)
5786 #endif
5787@@ -224,7 +226,7 @@
5788 #endif
5789
5790 return (fp);
5791-} /* OpenSpoolFile( */
5792+} /* OpenSpoolFile */
5793
5794
5795
5796diff -Naur ncftp-3.2.6-ep/ncftp/version.c ncftp-3.2.6-zip/ncftp/version.c
5797--- ncftp-3.2.6-ep/ncftp/version.c 2016-11-11 19:11:48.000000000 +0100
5798+++ ncftp-3.2.6-zip/ncftp/version.c 2016-12-04 20:00:12.000000000 +0100
5799@@ -6,7 +6,7 @@
5800
5801 /******************************************************************************/
5802
5803-const char gVersion[] = "@(#) NcFTP 3.2.6/548 Nov 11 2016, 12:11 PM";
5804+const char gVersion[] = "@(#) NcFTP 3.2.6/575 Dec 04 2016, 01:00 PM";
5805
5806 /******************************************************************************/
5807
5808diff -Naur ncftp-3.2.6-ep/sh/mksrctar.sh ncftp-3.2.6-zip/sh/mksrctar.sh
5809--- ncftp-3.2.6-ep/sh/mksrctar.sh 2016-11-11 19:13:02.000000000 +0100
5810+++ ncftp-3.2.6-zip/sh/mksrctar.sh 2016-11-27 22:16:20.000000000 +0100
5811@@ -54,6 +54,7 @@
5812 /sio\/configure$/d
5813 /Strn\/configure$/d
5814 /\.git$/d
5815+/\.svn$/d
5816 /DerivedData/d
5817 /xcuserdata/d
5818 /\.xcuserstate/d
5819diff -Naur ncftp-3.2.6-ep/sh_util/gpshare.c ncftp-3.2.6-zip/sh_util/gpshare.c
5820--- ncftp-3.2.6-ep/sh_util/gpshare.c 2010-04-06 00:41:06.000000000 +0200
5821+++ ncftp-3.2.6-zip/sh_util/gpshare.c 2016-11-13 00:53:40.000000000 +0100
5822@@ -402,7 +402,7 @@
5823 } else if (strncmp(line, "account", 7) == 0) {
5824 (void) STRNCPY(cip->acct, line + 8);
5825 } else if (strncmp(line, "port", 4) == 0) {
5826- cip->port = atoi(line + 5);
5827+ cip->port = (unsigned int) atoi(line + 5);
5828 }
5829 }
5830 if ((fp != NULL) && (fp != stdin))
5831@@ -469,13 +469,13 @@
5832 for (parse = buf; (tok = strtok(parse, ", \n\t\r")) != NULL; parse = NULL) {
5833 nt++;
5834 if (nt == 1) {
5835- cip->xferTimeout = atoi(tok);
5836- cip->connTimeout = atoi(tok);
5837- cip->ctrlTimeout = atoi(tok);
5838+ cip->xferTimeout = (unsigned int) atoi(tok);
5839+ cip->connTimeout = (unsigned int) atoi(tok);
5840+ cip->ctrlTimeout = (unsigned int) atoi(tok);
5841 } else if (nt == 2) {
5842- cip->connTimeout = atoi(tok);
5843+ cip->connTimeout = (unsigned int) atoi(tok);
5844 } else if (nt == 3) {
5845- cip->ctrlTimeout = atoi(tok);
5846+ cip->ctrlTimeout = (unsigned int) atoi(tok);
5847 }
5848 }
5849 } /* SetTimeouts */
5850diff -Naur ncftp-3.2.6-ep/sh_util/ncftpbatch.c ncftp-3.2.6-zip/sh_util/ncftpbatch.c
5851--- ncftp-3.2.6-ep/sh_util/ncftpbatch.c 2016-11-11 19:11:10.000000000 +0100
5852+++ ncftp-3.2.6-zip/sh_util/ncftpbatch.c 2016-11-16 01:29:44.000000000 +0100
5853@@ -38,9 +38,10 @@
5854 # define kSpoolLog "log.txt"
5855 #else
5856 # define kSpoolLog "log"
5857-# define kGlobalSpoolDir "/var/spool/ncftp"
5858 #endif
5859
5860+#define kMinimumReconnectDelaySameHost 30
5861+
5862 #define NEW_SLEEP_VAL(s) ((unsigned int) (((0.1 * (rand() % 15)) + 1.2) * (s)))
5863
5864 int gQuitRequested = 0;
5865@@ -79,6 +80,7 @@
5866 unsigned int gDelaySinceLastFailure;
5867 time_t gTimeOfFirstAttempt;
5868 time_t gTimeOfLastFailure;
5869+time_t gTimeOfLastFailureAny;
5870 char gHost[64];
5871 char gLastHost[64];
5872 char gHostIP[32];
5873@@ -759,6 +761,7 @@
5874 memset(gBatchMiscBuf, 0, sizeof(gBatchMiscBuf));
5875 gTimeOfFirstAttempt = 0;
5876 gTimeOfLastFailure = 0;
5877+ gTimeOfLastFailureAny = 0;
5878 savefp = NULL;
5879 gCurSpoolFileLinesRead = 0;
5880 InitHostVariables();
5881@@ -872,7 +875,7 @@
5882 #ifdef HAVE_PATHCONF
5883 nmx = pathconf(gLogFileName, _PC_NAME_MAX);
5884 if (nmx >= 512)
5885- debufsize = nmx;
5886+ debufsize = (size_t) nmx;
5887 #endif
5888 debufsize += sizeof(struct dirent) + 8;
5889 direntbuf = (struct dirent *) calloc(debufsize, (size_t) 1);
5890@@ -914,14 +917,14 @@
5891 if (fp == NULL) {
5892 #if (defined(WIN32) || defined(_WINDOWS)) && !defined(__CYGWIN__)
5893 /* gItemContents is not used on Win32 */
5894- if ((fp = _fsopen(gMyItemPath, FOPEN_READ_BINARY, _SH_DENYNO)) == NULL) {
5895+ if ((fp = _fsopen(gMyItemPath, FOPEN_READ_TEXT, _SH_DENYNO)) == NULL) {
5896 /* Could have been renamed already. */
5897 if (logErrors != 0)
5898 LogPerror("%s", gMyItemPath);
5899 return (-1);
5900 }
5901 #else
5902- if ((stat(gMyItemPath, &st) < 0) || ((fp = fopen(gMyItemPath, FOPEN_READ_BINARY)) == NULL)) {
5903+ if ((stat(gMyItemPath, &st) < 0) || ((fp = fopen(gMyItemPath, FOPEN_READ_TEXT)) == NULL)) {
5904 /* Could have been renamed already. */
5905 if (logErrors != 0)
5906 LogPerror("%s", gMyItemPath);
5907@@ -1059,7 +1062,7 @@
5908 */
5909 (void) STRNCPY(gHostIP, tok2);
5910 } else if (strcmp(tok1, "port") == 0) {
5911- gPort = atoi(tok2);
5912+ gPort = (unsigned int) atoi(tok2);
5913 } else if (strcmp(tok1, "passive") == 0) {
5914 if (isdigit((int) tok2[0]))
5915 gPassive = atoi(tok2);
5916@@ -1142,6 +1145,8 @@
5917 cp += strlen(cp) - 1;
5918 if (*cp == '\n')
5919 *cp-- = '\0';
5920+ if (*cp == '\r')
5921+ *cp-- = '\0';
5922 }
5923 } else if (strcmp(tok1, "job-name") == 0) {
5924 /* ignore */
5925@@ -1276,7 +1281,7 @@
5926 * command, such as our FTP session descriptors.
5927 */
5928 FTPCloseControlConnection(&gConn);
5929- gMyPID = getpid();
5930+ gMyPID = (unsigned int) getpid();
5931 CloseLog();
5932
5933 (void) execv(cmd, argv);
5934@@ -1697,9 +1702,11 @@
5935 gConn.ctrlTimeout = 135;
5936 gConn.xferTimeout = 300;
5937 if (ISTRCMP(gHost, gLastHost) == 0) {
5938- /* Same host, but last "recent" attempt to connect failed. */
5939- Log(1, "Skipping same failed host as recent attempt (%s).\n", gLastHost);
5940- return (-1); /* Try again next time. */
5941+ if ((time(NULL) - gTimeOfLastFailureAny) < kMinimumReconnectDelaySameHost) {
5942+ /* Same host, but last "recent" attempt to connect failed. */
5943+ Log(1, "Skipping same failed host as recent attempt (%s).\n", gLastHost);
5944+ return (-1); /* Try again next time. */
5945+ }
5946 }
5947 if (AddrStrToIPStr(resolvedIPstr, sizeof(resolvedIPstr), gHost, (int) gPort) == NULL) {
5948 LogEndItemResult(1, 1, "Couldn't resolve IP for %s, will try again next time.\n", gHost);
5949@@ -1859,8 +1866,9 @@
5950 }
5951 }
5952
5953- if (result != kNoErr)
5954- (void) time(&gTimeOfLastFailure);
5955+ if (result != kNoErr) {
5956+ gTimeOfLastFailureAny = time(&gTimeOfLastFailure);
5957+ }
5958
5959 switch (result) {
5960 case kErrSYMLINKFailed:
5961@@ -2310,14 +2318,16 @@
5962 DIR *DIRp;
5963 char *cp;
5964 int iyyyymmdd, ihhmmss;
5965- char dstr[64], zstr[64];
5966+ char dstr[64], zstr[64], jfstr[64];
5967 char yyyy[8], mm[4], dd[4];
5968 char HH[4], MM[4], SS[4];
5969 struct tm lt;
5970 time_t t;
5971- int iType = 0, nP = 0, nG = 0;
5972+ int iType = 0, nP = 0, nG = 0, nJobFiles = 0;
5973 double tP = 0.0, tG = 0.0, tX;
5974 const char *uStr;
5975+ int printedHeader = 0;
5976+ int nJobsInThisJobFile;
5977
5978 if ((DIRp = opendir(gSpoolDir)) == NULL) {
5979 PerrorBox(gSpoolDir);
5980@@ -2348,7 +2358,12 @@
5981 cp++;
5982
5983 if (iType == 'P') { nP++; } else if (iType == 'G') { nG++; }
5984- if (reportMode >= 4) { nItems++; continue; }
5985+
5986+ nJobFiles++;
5987+ nItems++;
5988+ if (reportMode >= 4) {
5989+ continue;
5990+ }
5991
5992 memset(dstr, 0, sizeof(dstr));
5993 (void) sprintf(dstr, "%08d%06d", iyyyymmdd, ihhmmss);
5994@@ -2361,6 +2376,7 @@
5995 t = UnMDTMDate(dstr);
5996
5997 if ((t == 0) || (t == (time_t) -1) || (Localtime(t, <) == NULL)) {
5998+ memset(zstr, 0, sizeof(zstr));
5999 } else {
6000 memset(dstr, 0, sizeof(dstr));
6001 memset(zstr, 0, sizeof(zstr));
6002@@ -2368,11 +2384,10 @@
6003 (void) strftime(dstr, sizeof(dstr) - 1, "%Y-%m-%d %H:%M:%S", <);
6004 }
6005
6006- if (reportMode == 2) {
6007+ if (reportMode == 3) {
6008 /* Only report what can be found from the spool filename itself. */
6009- nItems++;
6010- if (nItems == 1) {
6011- (void) printf("---Scheduled-For------------Job Name-------------------------------------------\n");
6012+ if (++printedHeader == 1) {
6013+ (void) printf("---Scheduled For------------Spool File-----------------------------------------\n");
6014 }
6015 if ((activeOnly == 0) || (gItemPath[0] == 'x')) {
6016 if ((t == 0) || (t == (time_t) -1) || (Localtime(t, <) == NULL)) {
6017@@ -2393,7 +2408,7 @@
6018 continue;
6019 }
6020
6021- /* reportMode == 1 or 3 */
6022+ /* reportMode == 1 or 2 */
6023
6024 if ((Stat(gItemPath, &st) < 0) || (S_ISREG(st.st_mode) == 0)) {
6025 /* Item may have been
6026@@ -2403,6 +2418,10 @@
6027 continue;
6028 }
6029
6030+ --nItems; /* We haven't actually loaded the first item from the spool file yet. */
6031+ if (iType == 'P') { nP--; } else if (iType == 'G') { nG--; }
6032+ nJobsInThisJobFile = 0;
6033+
6034 (void) STRNCPY(gMyItemPath, gItemPath);
6035 do {
6036 if (LoadCurrentSpoolFileContents(0) < 0) {
6037@@ -2413,6 +2432,7 @@
6038 break;
6039 }
6040
6041+ nJobsInThisJobFile++;
6042 nItems++;
6043 iType = gOperation;
6044 if (iType == 'P') { nP++; } else if (iType == 'G') { nG++; }
6045@@ -2422,11 +2442,11 @@
6046 else if ((iType == 'P') && (gLFileSize > 0))
6047 tP += gLFileSize;
6048
6049- if (reportMode == 3)
6050+ if (reportMode == 2)
6051 continue;
6052
6053- if (nItems == 1) {
6054- (void) printf("---Scheduled-For------------Host------------------------------Command------------------------------\n");
6055+ if (++printedHeader == 1) {
6056+ (void) printf("---Scheduled For------------Host------------------------------Command------------------------------\n");
6057 }
6058 if ((activeOnly == 0) || (gItemPath[0] == 'x')) {
6059 if ((t == 0) || (t == (time_t) -1) || (Localtime(t, <) == NULL)) {
6060@@ -2444,18 +2464,18 @@
6061 );
6062 }
6063 if (iType != 'P') {
6064- (void) printf("GET");
6065+ (void) printf("%s", (nJobsInThisJobFile < 2) ? "GET" : "+ G");
6066 if (gRecursive != 0) {
6067- (void) printf(" -R %s", gRFile);
6068+ (void) printf(" -R \"%s\"", gRFile);
6069 } else {
6070- (void) printf(" %s", gRFile);
6071+ (void) printf(" \"%s\"", gRFile);
6072 }
6073 } else {
6074- (void) printf("PUT");
6075+ (void) printf("%s", (nJobsInThisJobFile < 2) ? "PUT" : "+ P");
6076 if (gRecursive != 0) {
6077- (void) printf(" -R %s", gLFile);
6078+ (void) printf(" -R \"%s\"", gLFile);
6079 } else {
6080- (void) printf(" %s", gLFile);
6081+ (void) printf(" \"%s\"", gLFile);
6082 }
6083 }
6084 (void) printf("\n");
6085@@ -2469,28 +2489,46 @@
6086 (gGlobalSpooler != 0) ? "The" : "Your",
6087 gSpoolDir);
6088 } else {
6089- printf("\n");
6090+ if ((reportMode == 1) || (reportMode == 3))
6091+ printf("\n");
6092+
6093+ jfstr[0] = '\0';
6094+ if ((nG > 0) && (nP > 0)) {
6095+ } else if (nItems > nJobFiles) {
6096+#ifdef HAVE_SNPRINTF
6097+ (void) snprintf(jfstr, sizeof(jfstr), " in %d spool file%s", nJobFiles, (nJobFiles == 1) ? "" : "s");
6098+#else
6099+ (void) sprintf(jfstr, " in %d spool file%s", nJobFiles, (nJobFiles == 1) ? "" : "s");
6100+#endif
6101+ }
6102 if (nG > 0) {
6103 if (tG > 0.0) {
6104 tX = FileSize(tG, &uStr, NULL);
6105- printf("%d GET job%s queued for %.1f %s.\n", nG, ((nG == 1) ? "" : "s"), tX, uStr);
6106+ printf("%d GET job%s queued%s for %.1f %s.\n", nG, ((nG == 1) ? "" : "s"), jfstr, tX, uStr);
6107 } else {
6108- printf("%d GET job%s queued.\n", nG, ((nG == 1) ? "" : "s"));
6109+ printf("%d GET job%s queued%s.\n", nG, ((nG == 1) ? "" : "s"), jfstr);
6110 }
6111 }
6112 if (nP > 0) {
6113 if (tP > 0.0) {
6114 tX = FileSize(tP, &uStr, NULL);
6115- printf("%d PUT job%s queued for %.1f %s.\n", nP, ((nP == 1) ? "" : "s"), tX, uStr);
6116+ printf("%d PUT job%s queued%s for %.1f %s.\n", nP, ((nP == 1) ? "" : "s"), jfstr, tX, uStr);
6117 } else {
6118- printf("%d PUT job%s queued.\n", nP, ((nP == 1) ? "" : "s"));
6119+ printf("%d PUT job%s queued%s.\n", nP, ((nP == 1) ? "" : "s"), jfstr);
6120 }
6121 }
6122 if ((nItems - (nG + nP)) > 0) {
6123 printf("%d job%s in progress.\n", (nItems - (nG + nP)), (((nItems - (nG + nP)) == 1) ? "" : "s"));
6124 }
6125+ if (nItems > nJobFiles) {
6126+#ifdef HAVE_SNPRINTF
6127+ (void) snprintf(jfstr, sizeof(jfstr), " in %d spool file%s", nJobFiles, (nJobFiles == 1) ? "" : "s");
6128+#else
6129+ (void) sprintf(jfstr, " in %d spool file%s", nJobFiles, (nJobFiles == 1) ? "" : "s");
6130+#endif
6131+ }
6132 if ((nG > 0) && (nP > 0)) {
6133- printf("%d total job%s queued.\n", nItems, ((nItems == 1) ? "" : "s"));
6134+ printf("%d total job%s queued%s.\n", nItems, ((nItems == 1) ? "" : "s"), jfstr);
6135 }
6136 }
6137 } /* ListQueue */
6138@@ -2929,6 +2967,9 @@
6139
6140
6141 static void
6142+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6143+ __attribute__ ((noreturn))
6144+#endif
6145 Usage(void)
6146 {
6147 (void) fprintf(stderr, "Usages:\n");
6148@@ -3090,7 +3131,6 @@
6149 DisposeWinsock();
6150 exit(0);
6151 /*NOTREACHED*/
6152- break;
6153 case '|':
6154 readcore = atoi(opt.arg);
6155 break;
6156diff -Naur ncftp-3.2.6-ep/sh_util/ncftpget.c ncftp-3.2.6-zip/sh_util/ncftpget.c
6157--- ncftp-3.2.6-ep/sh_util/ncftpget.c 2016-05-29 17:56:44.000000000 +0200
6158+++ ncftp-3.2.6-zip/sh_util/ncftpget.c 2016-11-13 00:46:58.000000000 +0100
6159@@ -43,6 +43,9 @@
6160 extern Bookmark gBm;
6161
6162 static void
6163+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6164+ __attribute__ ((noreturn))
6165+#endif
6166 Usage(void)
6167 {
6168 FILE *fp;
6169@@ -251,7 +254,6 @@
6170 case 'z': case 'Z': case 'C':
6171 (void) fprintf(stderr, "The \"-%c\" option is not valid when used with conjunction with \"-%c\".\n", c, 'b');
6172 exit(kExitUsage);
6173- break;
6174 }
6175 }
6176
6177@@ -484,7 +486,7 @@
6178 GetoptReset(&opt);
6179 while ((c = Getopt(&opt, argc, argv, kGetoptOptions)) > 0) switch(c) {
6180 case 'P':
6181- fi.port = atoi(opt.arg);
6182+ fi.port = (unsigned int) atoi(opt.arg);
6183 break;
6184 case 'u':
6185 (void) STRNCPY(fi.user, opt.arg);
6186diff -Naur ncftp-3.2.6-ep/sh_util/ncftpls.c ncftp-3.2.6-zip/sh_util/ncftpls.c
6187--- ncftp-3.2.6-ep/sh_util/ncftpls.c 2010-10-31 19:21:08.000000000 +0100
6188+++ ncftp-3.2.6-zip/sh_util/ncftpls.c 2016-11-13 00:47:04.000000000 +0100
6189@@ -207,6 +207,9 @@
6190
6191
6192 static void
6193+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6194+ __attribute__ ((noreturn))
6195+#endif
6196 Usage(void)
6197 {
6198 FILE *fp;
6199@@ -494,7 +497,7 @@
6200 GetoptReset(&opt);
6201 while ((c = Getopt(&opt, argc, argv, kGetoptOptions)) > 0) switch(c) {
6202 case 'P':
6203- fi.port = atoi(opt.arg);
6204+ fi.port = (unsigned int) atoi(opt.arg);
6205 break;
6206 case 'u':
6207 (void) STRNCPY(fi.user, opt.arg);
6208diff -Naur ncftp-3.2.6-ep/sh_util/ncftpput.c ncftp-3.2.6-zip/sh_util/ncftpput.c
6209--- ncftp-3.2.6-ep/sh_util/ncftpput.c 2016-08-14 02:00:04.000000000 +0200
6210+++ ncftp-3.2.6-zip/sh_util/ncftpput.c 2016-11-13 02:14:40.000000000 +0100
6211@@ -45,10 +45,17 @@
6212 extern int gSendfileInProgress;
6213
6214 static void
6215+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6216+ __attribute__ ((noreturn))
6217+#endif
6218 Usage(void)
6219 {
6220 FILE *fp;
6221
6222+#ifdef __clang__
6223+#pragma clang diagnostic push
6224+#pragma clang diagnostic ignored "-Wunreachable-code"
6225+#endif
6226 fp = OpenPager();
6227 (void) fprintf(fp, "NcFTPPut %.5s\n\n", gVersion + 11);
6228 (void) fprintf(fp, "Usages:\n");
6229@@ -111,6 +118,10 @@
6230 ClosePager(fp);
6231 DisposeWinsock();
6232 exit(kExitUsage);
6233+
6234+#ifdef __clang__
6235+#pragma clang diagnostic pop
6236+#endif
6237 } /* Usage */
6238
6239
6240@@ -262,7 +273,6 @@
6241 case 'Z': case 'C':
6242 (void) fprintf(stderr, "The \"-%c\" option is not valid when used with conjunction with \"-%c\".\n", c, 'b');
6243 exit(kExitUsage);
6244- break;
6245 }
6246 }
6247
6248@@ -473,7 +483,7 @@
6249 GetoptReset(&opt);
6250 while ((c = Getopt(&opt, argc, argv, kGetoptOptions)) > 0) switch(c) {
6251 case 'P':
6252- fi.port = atoi(opt.arg);
6253+ fi.port = (unsigned int) atoi(opt.arg);
6254 break;
6255 case 'u':
6256 (void) STRNCPY(fi.user, opt.arg);
6257diff -Naur ncftp-3.2.6-ep/sio/config.h.in ncftp-3.2.6-zip/sio/config.h.in
6258--- ncftp-3.2.6-ep/sio/config.h.in 2005-03-25 02:15:00.000000000 +0100
6259+++ ncftp-3.2.6-zip/sio/config.h.in 2016-11-13 03:19:28.000000000 +0100
6260@@ -44,6 +44,9 @@
6261
6262 #undef main_void_return_t
6263
6264+/* Define this because you definitely don't have it. Used only for testing configure. */
6265+#undef negative_control_t
6266+
6267 #undef PRAGMA_HDRSTOP
6268
6269 #undef read_return_t
6270@@ -54,6 +57,8 @@
6271
6272 #undef recv_size_t
6273
6274+#undef sa_family_t
6275+
6276
6277 /* Define to the type of arg1 for select(). */
6278 #undef SELECT_TYPE_ARG1
6279@@ -74,6 +79,10 @@
6280 /* Define to `unsigned' if <sys/types.h> doesn't define. */
6281 #undef size_t
6282
6283+#undef SNPRINTF_RETURNS_PTR
6284+
6285+#undef SNPRINTF_TERMINATES
6286+
6287 #undef sockaddr_size_t
6288
6289 /* If SOCKS library is being used, define the major version (i.e. 5) */
6290@@ -81,6 +90,9 @@
6291
6292 #undef sockopt_size_t
6293
6294+/* Define to `long' if <sys/types.h> doesn't define. */
6295+#undef ssize_t
6296+
6297 /* If using the C implementation of alloca, define if you know the
6298 direction of stack growth for your system; otherwise it will be
6299 automatically deduced at run-time.
6300@@ -137,9 +149,15 @@
6301 /* Define if you have the sigsetjmp function. */
6302 #undef HAVE_SIGSETJMP
6303
6304+/* Define if you have the snprintf function. */
6305+#undef HAVE_SNPRINTF
6306+
6307 /* Define if you have the strerror function. */
6308 #undef HAVE_STRERROR
6309
6310+/* Define if you have the vsnprintf function. */
6311+#undef HAVE_VSNPRINTF
6312+
6313 /* Define if you have the <arpa/nameser.h> header file. */
6314 #undef HAVE_ARPA_NAMESER_H
6315
6316@@ -152,6 +170,9 @@
6317 /* Define if you have the <resolv.h> header file. */
6318 #undef HAVE_RESOLV_H
6319
6320+/* Define if you have the <snprintf.h> header file. */
6321+#undef HAVE_SNPRINTF_H
6322+
6323 /* Define if you have the <socks.h> header file. */
6324 #undef HAVE_SOCKS_H
6325
6326@@ -188,5 +209,8 @@
6327 /* Define if you have the resolv library (-lresolv). */
6328 #undef HAVE_LIBRESOLV
6329
6330+/* Define if you have the snprintf library (-lsnprintf). */
6331+#undef HAVE_LIBSNPRINTF
6332+
6333 /* Define if you have the socket library (-lsocket). */
6334 #undef HAVE_LIBSOCKET
6335diff -Naur ncftp-3.2.6-ep/sio/configure.in ncftp-3.2.6-zip/sio/configure.in
6336--- ncftp-3.2.6-ep/sio/configure.in 2016-10-30 03:21:14.000000000 +0100
6337+++ ncftp-3.2.6-zip/sio/configure.in 2016-11-15 00:11:22.000000000 +0100
6338@@ -69,6 +69,13 @@
6339 wi__RES_DEFDNAME
6340 wi_STRUCT_TIMEVAL_FIELD_TYPES
6341 wi_VOID_MAIN_RETURN_TYPE
6342+wi_CHECK_TYPE(negative_control_t, long, [])
6343+wi_CHECK_TYPE(ssize_t, long, [])
6344+wi_CHECK_TYPE(sa_family_t, unsigned short, [#include <sys/socket.h>
6345+#include <netinet/in.h>
6346+#include <arpa/inet.h>
6347+#include <netdb.h>
6348+])
6349 wi_UNISTD_FUNC_PARAM_TYPES
6350 wi_HEADER_SYS_SELECT_H
6351 wi_FUNC_SELECT_ARGTYPES
6352@@ -147,5 +154,6 @@
6353 AC_SUBST(DEFS)
6354 AC_SUBST(SFLAG)
6355 AC_SUBST(SIO_VERSION)
6356+AC_SUBST(DEBUGBUILD)
6357 AC_SUBST(MAKE)
6358 AC_OUTPUT([Makefile ucase_c/Makefile ucase_s/Makefile time_c/Makefile time_s/Makefile srltest/Makefile sendmessage/Makefile])
6359diff -Naur ncftp-3.2.6-ep/sio/DNSUtil.c ncftp-3.2.6-zip/sio/DNSUtil.c
6360--- ncftp-3.2.6-ep/sio/DNSUtil.c 2016-10-30 03:42:06.000000000 +0100
6361+++ ncftp-3.2.6-zip/sio/DNSUtil.c 2016-11-13 04:03:46.000000000 +0100
6362@@ -164,7 +164,7 @@
6363 my_h_errno = 0;
6364 h = NULL;
6365 memset(usehpbuf, 0, hpbufsize);
6366- rc = gethostbyaddr_r((gethost_addrptr_t) addr, asize, atype, hp, usehpbuf, hpbufsize, &h, &my_h_errno);
6367+ rc = gethostbyaddr_r((gethost_addrptr_t) addr, (sockaddr_size_t) asize, atype, hp, usehpbuf, hpbufsize, &h, &my_h_errno);
6368 if ((rc == 0) && (h != NULL))
6369 return (0);
6370 if ((rc == ERANGE) || ((rc == -1) && (errno == ERANGE))) {
6371@@ -189,7 +189,7 @@
6372 #else
6373 /* Note: gethostbyaddr is already threadsafe on: HP-UX, Tru64 */
6374 struct hostent *h;
6375- h = gethostbyaddr((gethost_addrptr_t) addr, asize, atype);
6376+ h = gethostbyaddr((gethost_addrptr_t) addr, (sockaddr_size_t) asize, atype);
6377 if (h != NULL) {
6378 memcpy(hp, h, sizeof(struct hostent));
6379 return (0);
6380diff -Naur ncftp-3.2.6-ep/sio/Makefile.in ncftp-3.2.6-zip/sio/Makefile.in
6381--- ncftp-3.2.6-ep/sio/Makefile.in 2016-11-03 20:45:44.000000000 +0100
6382+++ ncftp-3.2.6-zip/sio/Makefile.in 2016-11-15 00:17:44.000000000 +0100
6383@@ -15,6 +15,7 @@
6384 DEFS=@DEFS@@NDEFS@
6385 PREFIX=@prefix@
6386 LIB=libsio.a
6387+LIB_d=libsio_d.a
6388 LIBSO=libsio.so.5
6389 LIBSOS=libsio.so
6390 STRIP=@STRIP@
6391@@ -61,14 +62,15 @@
6392 -@RANLIB@ $(LIB)
6393 -@echo $(VER) > sio.version
6394 -@chmod a+r $(LIB) sio.h usio.h
6395- -@$(LIST) $(LIB)
6396+ -@if [ "x@DEBUGBUILD@" = xyes ] ; then $(COPY) "$(LIB)" "$(LIB_d)" ; fi
6397+ -@$(LIST) "$(LIB)" "$(LIB_d)" 2>/dev/null
6398
6399 install: $(LIB)
6400- $(COPY) $(LIB) $(PREFIX)/lib/$(LIB)
6401- -@@RANLIB@ $(PREFIX)/lib/$(LIB)
6402- $(COPY) sio.h usio.h $(PREFIX)/include
6403- chmod a+r $(PREFIX)/lib/$(LIB) $(PREFIX)/include/sio.h $(PREFIX)/include/usio.h
6404- -@$(LIST) $(PREFIX)/lib/$(LIB) $(PREFIX)/include/sio.h $(PREFIX)/include/usio.h
6405+ $(COPY) "$(LIB)" "$(PREFIX)/lib/$(LIB)"
6406+ -if [ "x@DEBUGBUILD@" = xyes ] ; then $(COPY) "$(LIB_d)" "$(PREFIX)/lib/$(LIB_d)" ; fi
6407+ $(COPY) sio.h usio.h "$(PREFIX)/include/"
6408+ -chmod a+r "$(PREFIX)/lib/$(LIB)" "$(PREFIX)/lib/$(LIB_d)" "$(PREFIX)/include/sio.h" "$(PREFIX)/include/usio.h" 2>/dev/null
6409+ -@$(LIST) "$(PREFIX)/lib/$(LIB)" "$(PREFIX)/lib/$(LIB_d)" "$(PREFIX)/include/sio.h" "$(PREFIX)/include/usio.h" 2>/dev/null
6410
6411 dynamic: $(LIBSO)
6412
6413@@ -162,7 +164,7 @@
6414 -@$(MKDIR) $(TMPDIR)/TAR
6415 -@$(MKDIR) $(TMPDIR)/TAR/$(TARDIR)
6416 -@chmod ga+r $(PACKAGE)
6417- find . -follow -depth -type f -print | cut -c3- | egrep -i -v '(((\.(o|so|log|a|lib|ncb|obj|exe|idb|cache|opt|zip|gz|swp|tar|plg|pch|gch))|(config\.h|Makefile))$$|(/\.)|(^\.)|(xcuserdata|dSYM))' | cpio -Lpdm $(TMPDIR)/TAR/$(TARDIR)
6418+ find . -follow -depth -type f -print | cut -c3- | egrep -i -v '(((\.(o|so|log|a|lib|ncb|obj|exe|idb|cache|opt|zip|gz|swp|tar|plg|pch|gch))|((^|/)(config\.h|config\.status|Makefile|autoheader|autoconf)))$$|(/\.)|(^\.)|(xcuserdata|dSYM))' | cpio -Lpdm $(TMPDIR)/TAR/$(TARDIR)
6419 ( cd $(TMPDIR)/TAR ; @TAR@ @TARFLAGS@ $(TARFILE) $(TARDIR) )
6420 $(COPY) $(TMPDIR)/TAR/$(TARFILE) .
6421 -@chmod 644 $(TARFILE)
6422diff -Naur ncftp-3.2.6-ep/sio/sio.h ncftp-3.2.6-zip/sio/sio.h
6423--- ncftp-3.2.6-ep/sio/sio.h 2016-10-30 03:56:02.000000000 +0100
6424+++ ncftp-3.2.6-zip/sio/sio.h 2016-11-12 21:30:04.000000000 +0100
6425@@ -7,7 +7,7 @@
6426 #ifndef sio_h
6427 #define sio_h 1
6428
6429-#define kSioVersion "@(#) libsio 6.2.2 (October 29, 2016)"
6430+#define kSioVersion "@(#) libsio 6.3 (November 12, 2016)"
6431
6432 #ifdef __cplusplus
6433 extern "C"
6434@@ -52,6 +52,7 @@
6435 #define kFullBufferNotRequired 00000
6436 #define kFullBufferRequired 00001
6437 #define kFullBufferRequiredExceptLast 00002
6438+#define kFullBufferOrEOF 00002 /* alias for kFullBufferRequiredExceptLast */
6439 #define kNoFirstSelect 00010
6440
6441 /* Parameter to AddrToAddrStr */
6442@@ -67,6 +68,8 @@
6443 #define kSNewFailed (-6)
6444 #define kSBindFailed (-7)
6445 #define kSListenFailed (-8)
6446+#define kSioErrInvalidArg (-9)
6447+#define kSioErrBadAddrStr (-10)
6448
6449 #define kSrlBufSize 2048
6450
6451@@ -200,8 +203,9 @@
6452 int SAccept(int, struct sockaddr_in *const, int);
6453
6454 /* SBind.c */
6455-int SBind(int, const int, const int, const int);
6456-int SListen(int, int);
6457+int SBind(int sockfd, const int port, const int nTries, const int reuseFlag);
6458+int SBindAddr(int sockfd, struct sockaddr_in *localAddr, const int nTries, const int reuseFlag);
6459+int SListen(int sfd, int backlog);
6460
6461 /* SClose.c */
6462 int SCloseSocket(int);
6463@@ -216,8 +220,12 @@
6464 /* SNew.c */
6465 int SNewStreamClient(void);
6466 int SNewDatagramClient(void);
6467-int SNewStreamServer(const int, const int, const int, int);
6468-int SNewDatagramServer(const int, const int, const int);
6469+int SNewStreamServerByAddr(struct sockaddr_in *const saddr, const int nTries, const int reuseFlag, const int listenQueueSize);
6470+int SNewStreamServerByName(const char *const addrStr, const int nTries, const int reuseFlag, const int listenQueueSize);
6471+int SNewStreamServer(const int port, const int nTries, const int reuseFlag, const int listenQueueSize);
6472+int SNewDatagramServerByAddr(struct sockaddr_in *const saddr, const int nTries, const int reuseFlag);
6473+int SNewDatagramServerByName(const char *const addrStr, const int nTries, const int reuseFlag);
6474+int SNewDatagramServer(const int port, const int nTries, const int reuseFlag);
6475
6476 /* SRead.c */
6477 int SRead(int, char *const, size_t, int, int);
6478diff -Naur ncftp-3.2.6-ep/sio/SBind.c ncftp-3.2.6-zip/sio/SBind.c
6479--- ncftp-3.2.6-ep/sio/SBind.c 2001-11-19 15:44:00.000000000 +0100
6480+++ ncftp-3.2.6-zip/sio/SBind.c 2016-11-12 21:06:18.000000000 +0100
6481@@ -6,15 +6,30 @@
6482 int
6483 SBind(int sockfd, const int port, const int nTries, const int reuseFlag)
6484 {
6485- unsigned int i;
6486- int on;
6487- sockopt_size_t onsize;
6488 struct sockaddr_in localAddr;
6489
6490 localAddr.sin_family = AF_INET;
6491 localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
6492 localAddr.sin_port = htons((unsigned short) port);
6493
6494+ return (SBindAddr(sockfd, &localAddr, nTries, reuseFlag));
6495+} /* SBind */
6496+
6497+
6498+
6499+
6500+int
6501+SBindAddr(int sockfd, struct sockaddr_in *localAddr, const int nTries, const int reuseFlag)
6502+{
6503+ unsigned int i;
6504+ int on;
6505+ sockopt_size_t onsize;
6506+
6507+ if ((sockfd < 0) || (localAddr == NULL) || (localAddr->sin_family != AF_INET)) {
6508+ errno = EINVAL;
6509+ return (kSioErrInvalidArg);
6510+ }
6511+
6512 if (reuseFlag != kReUseAddrNo) {
6513 /* This is mostly so you can quit the server and re-run it
6514 * again right away. If you don't do this, the OS may complain
6515@@ -41,11 +56,11 @@
6516 /* Try binding a few times, in case we get Address in Use
6517 * errors.
6518 */
6519- if (bind(sockfd, (struct sockaddr *) &localAddr, (sockaddr_size_t) sizeof(struct sockaddr_in)) == 0) {
6520+ if (bind(sockfd, (struct sockaddr *) localAddr, (sockaddr_size_t) sizeof(struct sockaddr_in)) == 0) {
6521 break;
6522 }
6523 if ((int) i == nTries) {
6524- return (-1);
6525+ return (kSBindFailed);
6526 }
6527 /* Give the OS time to clean up the old socket,
6528 * and then try again.
6529@@ -54,7 +69,7 @@
6530 }
6531
6532 return (0);
6533-} /* SBind */
6534+} /* SBindAddr */
6535
6536
6537
6538@@ -62,5 +77,11 @@
6539 int
6540 SListen(int sfd, int backlog)
6541 {
6542- return (listen(sfd, (listen_backlog_t) backlog));
6543+ if (sfd < 0) {
6544+ errno = EINVAL;
6545+ return (kSioErrInvalidArg);
6546+ }
6547+ if (listen(sfd, (listen_backlog_t) backlog) < 0)
6548+ return (kSListenFailed);
6549+ return (0);
6550 } /* SListen */
6551diff -Naur ncftp-3.2.6-ep/sio/SConnect.c ncftp-3.2.6-zip/sio/SConnect.c
6552--- ncftp-3.2.6-ep/sio/SConnect.c 2009-12-17 18:45:48.000000000 +0100
6553+++ ncftp-3.2.6-zip/sio/SConnect.c 2016-11-15 18:30:22.000000000 +0100
6554@@ -87,6 +87,8 @@
6555 SIOSETERRNO
6556 RESTORE_SIGPIPE
6557 } while ((result < 0) && (errno == EINTR));
6558+ if ((result < 0) && (errno == ETIMEDOUT))
6559+ return (kTimeoutErr);
6560 return (result);
6561 }
6562
6563@@ -120,11 +122,14 @@
6564 #else
6565 && (errno != EWOULDBLOCK) && (errno != EINPROGRESS)
6566 #endif
6567- ) {
6568+ )
6569+ {
6570 cErrno = errno;
6571 SIOSETERRNO
6572 shutdown(sfd, 2);
6573 errno = cErrno;
6574+ if (errno == ETIMEDOUT)
6575+ return (kTimeoutErr);
6576 return (-1);
6577 }
6578 cErrno = errno;
6579@@ -166,6 +171,8 @@
6580 } else if (errno != EINTR) {
6581 /* Don't bother turning off FIONBIO */
6582 SIOSETERRNO
6583+ if (errno == ETIMEDOUT)
6584+ return (kTimeoutErr);
6585 return (-1);
6586 }
6587 }
6588diff -Naur ncftp-3.2.6-ep/sio/SNew.c ncftp-3.2.6-zip/sio/SNew.c
6589--- ncftp-3.2.6-ep/sio/SNew.c 2001-11-19 15:44:10.000000000 +0100
6590+++ ncftp-3.2.6-zip/sio/SNew.c 2016-11-12 21:32:14.000000000 +0100
6591@@ -34,7 +34,67 @@
6592
6593
6594 int
6595-SNewStreamServer(const int port, const int nTries, const int reuseFlag, int listenQueueSize)
6596+SNewStreamServerByAddr(struct sockaddr_in *const saddr, const int nTries, const int reuseFlag, const int listenQueueSize)
6597+{
6598+ int oerrno;
6599+ int sfd;
6600+
6601+ if (saddr == NULL) {
6602+ errno = EINVAL;
6603+ return (kSioErrInvalidArg);
6604+ }
6605+
6606+ sfd = socket(AF_INET, SOCK_STREAM, 0);
6607+ if (sfd < 0)
6608+ return kSNewFailed;
6609+
6610+ if (SBindAddr(sfd, saddr, nTries, reuseFlag) < 0) {
6611+ oerrno = errno;
6612+ (void) closesocket(sfd);
6613+ errno = oerrno;
6614+ return kSBindFailed;
6615+ }
6616+
6617+ if (SListen(sfd, listenQueueSize) < 0) {
6618+ oerrno = errno;
6619+ (void) closesocket(sfd);
6620+ errno = oerrno;
6621+ return kSListenFailed;
6622+ }
6623+
6624+ return (sfd);
6625+} /* SNewStreamServerByAddr */
6626+
6627+
6628+
6629+
6630+int
6631+SNewStreamServerByName(const char *const addrStr, const int nTries, const int reuseFlag, const int listenQueueSize)
6632+{
6633+ struct sockaddr_in saddr;
6634+
6635+ if (addrStr == NULL) {
6636+ errno = EINVAL;
6637+ return (kSioErrInvalidArg);
6638+ }
6639+
6640+ if ((strchr(addrStr, ':') == NULL) && (isdigit((int) addrStr[0]))) {
6641+ /* Just a port number specified */
6642+ return (SNewStreamServer(atoi(addrStr), nTries, reuseFlag, listenQueueSize));
6643+ }
6644+
6645+ /* ip:port */
6646+ if (AddrStrToAddr(addrStr, &saddr, -1) < 0)
6647+ return (kSioErrBadAddrStr);
6648+
6649+ return (SNewStreamServerByAddr(&saddr, nTries, reuseFlag, listenQueueSize));
6650+} /* SNewStreamServerByName */
6651+
6652+
6653+
6654+
6655+int
6656+SNewStreamServer(const int port, const int nTries, const int reuseFlag, const int listenQueueSize)
6657 {
6658 int oerrno;
6659 int sfd;
6660@@ -62,6 +122,59 @@
6661
6662
6663
6664+
6665+int
6666+SNewDatagramServerByAddr(struct sockaddr_in *const saddr, const int nTries, const int reuseFlag)
6667+{
6668+ int oerrno;
6669+ int sfd;
6670+
6671+ if (saddr == NULL) {
6672+ errno = EINVAL;
6673+ return (kSioErrInvalidArg);
6674+ }
6675+
6676+ sfd = socket(AF_INET, SOCK_DGRAM, 0);
6677+ if (sfd < 0)
6678+ return kSNewFailed;
6679+
6680+ if (SBindAddr(sfd, saddr, nTries, reuseFlag) < 0) {
6681+ oerrno = errno;
6682+ (void) closesocket(sfd);
6683+ errno = oerrno;
6684+ return kSBindFailed;
6685+ }
6686+
6687+ return (sfd);
6688+} /* SNewDatagramServer */
6689+
6690+
6691+
6692+
6693+int
6694+SNewDatagramServerByName(const char *const addrStr, const int nTries, const int reuseFlag)
6695+{
6696+ struct sockaddr_in saddr;
6697+
6698+ if (addrStr == NULL) {
6699+ errno = EINVAL;
6700+ return (kSioErrInvalidArg);
6701+ }
6702+
6703+ if ((strchr(addrStr, ':') == NULL) && (isdigit((int) addrStr[0]))) {
6704+ /* Just a port number specified */
6705+ return (SNewDatagramServer(atoi(addrStr), nTries, reuseFlag));
6706+ }
6707+
6708+ /* ip:port */
6709+ if (AddrStrToAddr(addrStr, &saddr, -1) < 0)
6710+ return (kSioErrBadAddrStr);
6711+
6712+ return (SNewDatagramServerByAddr(&saddr, nTries, reuseFlag));
6713+} /* SNewDatagramServer */
6714+
6715+
6716+
6717
6718 int
6719 SNewDatagramServer(const int port, const int nTries, const int reuseFlag)
6720diff -Naur ncftp-3.2.6-ep/sio/SRead.c ncftp-3.2.6-zip/sio/SRead.c
6721--- ncftp-3.2.6-ep/sio/SRead.c 2016-10-30 04:19:14.000000000 +0100
6722+++ ncftp-3.2.6-zip/sio/SRead.c 2016-11-14 22:33:02.000000000 +0100
6723@@ -5,7 +5,7 @@
6724
6725 extern const char gSioVersion[];
6726 const char UNUSED(gSioVersion[]) = kSioVersion;
6727-static const char UNUSED(gCopyright[]) = "@(#) libsio Copyright 1992-2011, by Mike Gleason. All rights reserved.";
6728+static const char UNUSED(gCopyright[]) = "@(#) libsio Copyright 1992-2016, by Mike Gleason. All rights reserved.";
6729
6730
6731 /* Read up to "size" bytes on sfd before "tlen" seconds.
6732@@ -81,7 +81,7 @@
6733 } else if (result == 0) {
6734 /* timeout */
6735 nread = (read_return_t) size - (read_return_t) nleft;
6736- if ((nread > 0) && ((retry & (kFullBufferRequired|kFullBufferRequiredExceptLast)) == 0)) {
6737+ if ((nread > 0) && ((retry & (kFullBufferRequired|kFullBufferRequiredExceptLast)) == 0)) {
6738 RESTORE_SIGPIPE
6739 return ((int) nread);
6740 }
6741@@ -106,7 +106,7 @@
6742 if (nread <= 0) {
6743 if (nread == 0) {
6744 /* EOF */
6745- if (retry == ((retry & (kFullBufferRequiredExceptLast)) != 0))
6746+ if ((retry & (kFullBufferRequiredExceptLast)) != 0)
6747 nread = (read_return_t) size - (read_return_t) nleft;
6748 goto done;
6749 } else if (errno != EINTR) {
6750diff -Naur ncftp-3.2.6-ep/sio/StrAddr.c ncftp-3.2.6-zip/sio/StrAddr.c
6751--- ncftp-3.2.6-ep/sio/StrAddr.c 2016-10-30 03:43:48.000000000 +0100
6752+++ ncftp-3.2.6-zip/sio/StrAddr.c 2016-11-13 04:02:38.000000000 +0100
6753@@ -42,7 +42,7 @@
6754 while (isdigit((int) *cp))
6755 cp++;
6756 *cp = '\0';
6757- return (atoi(str));
6758+ return ((unsigned int) atoi(str));
6759 }
6760 for (;; cp++) {
6761 if ((*cp == '\0')
6762@@ -231,7 +231,7 @@
6763 while (isdigit((int) *cp))
6764 cp++;
6765 *cp = '\0';
6766- port = atoi(p2);
6767+ port = (unsigned int) atoi(p2);
6768 }
6769 *cp = '\0';
6770 break;
6771@@ -284,7 +284,7 @@
6772 errno = ENOENT;
6773 return (kAddrStrToAddrBadHost);
6774 }
6775- sa->sin_family = hp->h_addrtype;
6776+ sa->sin_family = (sa_family_t) hp->h_addrtype;
6777 memcpy(&sa->sin_addr.s_addr, hp->h_addr_list[0],
6778 (size_t) hp->h_length);
6779 }
6780diff -Naur ncftp-3.2.6-ep/sio/wincfg.h ncftp-3.2.6-zip/sio/wincfg.h
6781--- ncftp-3.2.6-ep/sio/wincfg.h 2001-11-17 12:02:20.000000000 +0100
6782+++ ncftp-3.2.6-zip/sio/wincfg.h 2016-11-27 21:24:36.000000000 +0100
6783@@ -19,6 +19,7 @@
6784 #define recv_size_t unsigned int
6785 #define send_return_t int
6786 #define send_size_t unsigned int
6787+#define sa_family_t short
6788
6789 /* #define CAN_USE_SYS_SELECT_H 1 */
6790
6791diff -Naur ncftp-3.2.6-ep/Strn/DStrInternal.h ncftp-3.2.6-zip/Strn/DStrInternal.h
6792--- ncftp-3.2.6-ep/Strn/DStrInternal.h 2001-11-16 17:39:46.000000000 +0100
6793+++ ncftp-3.2.6-zip/Strn/DStrInternal.h 2016-11-13 00:29:56.000000000 +0100
6794@@ -1,7 +1,7 @@
6795 /* DStrInternal.h */
6796
6797-#ifndef _DStrInternal_h_
6798-#define _DStrInternal_h_ 1
6799+#ifndef DStrInternal_h
6800+#define DStrInternal_h 1
6801
6802 #ifdef __cplusplus
6803 extern "C"
6804diff -Naur ncftp-3.2.6-ep/Strn/Strn.h ncftp-3.2.6-zip/Strn/Strn.h
6805--- ncftp-3.2.6-ep/Strn/Strn.h 2016-10-30 18:39:14.000000000 +0100
6806+++ ncftp-3.2.6-zip/Strn/Strn.h 2016-11-13 00:32:56.000000000 +0100
6807@@ -54,7 +54,7 @@
6808 char *Strncat_NoZeroPad(char *const, const char *const, const size_t);
6809 char *Strncpy_NoZeroPad(char *const, const char *const, const size_t);
6810
6811-#ifndef _DStrInternal_h_
6812+#ifndef DStrInternal_h
6813 typedef struct DStr {
6814 /* All of these structure fields are read-only; do not modify
6815 * them directly.
6816diff -Naur ncftp-3.2.6-ep/vis/bmed.c ncftp-3.2.6-zip/vis/bmed.c
6817--- ncftp-3.2.6-ep/vis/bmed.c 2011-02-03 00:14:06.000000000 +0100
6818+++ ncftp-3.2.6-zip/vis/bmed.c 2016-11-13 04:26:36.000000000 +0100
6819@@ -143,6 +143,10 @@
6820 int begy, begx;
6821 char spec[32];
6822
6823+#ifdef __clang__
6824+#pragma clang diagnostic push
6825+#pragma clang diagnostic ignored "-Wformat-nonliteral"
6826+#endif
6827 getmaxyx(gHostListWin, lmaxy, lmaxx);
6828 getbegyx(gHostListWin, begy, begx);
6829 getmaxyx(gHostWin, maxy, maxx);
6830@@ -226,6 +230,10 @@
6831 wprintw(gHostWin, spec, str);
6832 wmove(gHostWin, maxy - 1, 0);
6833 UpdateHostWindows(0);
6834+
6835+#ifdef __clang__
6836+#pragma clang diagnostic pop
6837+#endif
6838 } /* DrawHostList */
6839
6840
6841@@ -234,7 +242,7 @@
6842 int HostWinGetKey(void)
6843 {
6844 int c;
6845- int uc;
6846+ unsigned int uc;
6847 int escmode;
6848 int maxy;
6849
6850@@ -1084,6 +1092,9 @@
6851
6852 /*ARGSUSED*/
6853 static void
6854+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6855+__attribute__ ((noreturn))
6856+#endif
6857 SigIntHostWin(int UNUSED(sig))
6858 {
6859 LIBNCFTP_USE_VAR(sig);
6860diff -Naur ncftp-3.2.6-ep/vis/wgets.c ncftp-3.2.6-zip/vis/wgets.c
6861--- ncftp-3.2.6-ep/vis/wgets.c 2005-01-01 22:36:32.000000000 +0100
6862+++ ncftp-3.2.6-zip/vis/wgets.c 2016-11-13 04:05:56.000000000 +0100
6863@@ -152,16 +152,16 @@
6864 /* Just add a character to the end. No need to do
6865 * a memory move for this.
6866 */
6867- *gBufPtr = c;
6868+ *gBufPtr = (char) c;
6869 gBufLen++;
6870 wg_SetCursorPos(gBufPtr + 1);
6871 } else {
6872 /* Have to move characters after the cursor over one
6873 * position so we can insert a character.
6874 */
6875- n = limit - gBufPtr;
6876+ n = (size_t) (limit - gBufPtr);
6877 MEMMOVE(gBufPtr + 1, gBufPtr, n);
6878- *gBufPtr = c;
6879+ *gBufPtr = (char) c;
6880 gBufLen++;
6881 wg_SetCursorPos(gBufPtr + 1);
6882 }
6883@@ -189,10 +189,10 @@
6884 /* Delete the characters before the character under the
6885 * cursor, and move everything after it back one.
6886 */
6887- n = limit - gBufPtr;
6888+ n = (size_t) (limit - gBufPtr);
6889 memcpy(gBufPtr - count, gBufPtr, n);
6890 }
6891- gBufLen -= count;
6892+ gBufLen -= (size_t) count;
6893 wg_SetCursorPos(gBufPtr - count); /* Does a --gBufPtr. */
6894 gNeedUpdate = 1;
6895 gChanged = 1;
6896@@ -237,7 +237,7 @@
6897 /* Nothing in front to delete. */
6898 BEEP(1);
6899 } else {
6900- n = limit - gBufPtr - 1;
6901+ n = (size_t) (limit - gBufPtr) - 1;
6902 memcpy(gBufPtr, gBufPtr + 1, n);
6903 --gBufLen;
6904 gNeedUpdate = 1;
6905diff -Naur ncftp-3.2.6-ep/vis/wgets.h ncftp-3.2.6-zip/vis/wgets.h
6906--- ncftp-3.2.6-ep/vis/wgets.h 2002-03-27 09:27:14.000000000 +0100
6907+++ ncftp-3.2.6-zip/vis/wgets.h 2016-11-13 04:24:40.000000000 +0100
6908@@ -23,15 +23,16 @@
6909
6910 typedef struct WGetsParams {
6911 WINDOW *w; /* in */
6912- int sy, sx; /* in */
6913+ FTPLineListPtr history; /* in, out */
6914 char *dst; /* in, out */
6915- int fieldLen; /* in */
6916 size_t dstSize; /* in */
6917+ int sy, sx; /* in */
6918+ int fieldLen; /* in */
6919 int useCurrentContents; /* in */
6920 int echoMode; /* in */
6921 int changed; /* out */
6922 int dstLen; /* out */
6923- FTPLineListPtr history; /* in, out */
6924+ int reserved;
6925 } WGetsParams, *WGetsParamPtr;
6926
6927 int wg_Gets(WGetsParamPtr wgpp);
6928diff -Naur ncftp-3.2.6-ep/vis/wutil.c ncftp-3.2.6-zip/vis/wutil.c
6929--- ncftp-3.2.6-ep/vis/wutil.c 2005-01-01 22:36:44.000000000 +0100
6930+++ ncftp-3.2.6-zip/vis/wutil.c 2016-11-14 17:07:18.000000000 +0100
6931@@ -38,6 +38,9 @@
6932
6933
6934 void
6935+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6936+__attribute__ ((noreturn))
6937+#endif
6938 Exit(int exitStatus)
6939 {
6940 EndWin();
6941@@ -386,7 +389,8 @@
6942 maxx,
6943 maxy
6944 );
6945- (void) write(1, buf, strlen(buf));
6946+ if (write(1, buf, strlen(buf)) < 0)
6947+ return (-1);
6948 return (0);
6949 }
6950 return (-1);
6951diff -Naur ncftp-3.2.6-ep/vis/wutil.h ncftp-3.2.6-zip/vis/wutil.h
6952--- ncftp-3.2.6-ep/vis/wutil.h 2001-11-19 10:23:48.000000000 +0100
6953+++ ncftp-3.2.6-zip/vis/wutil.h 2016-11-13 04:26:02.000000000 +0100
6954@@ -9,7 +9,11 @@
6955 #define kBold 00040
6956
6957 void EndWin(void);
6958-void Exit(int exitStatus);
6959+void
6960+#if (defined(__GNUC__)) && (__GNUC__ >= 2)
6961+__attribute__ ((noreturn))
6962+#endif
6963+Exit(int exitStatus);
6964 void SaveScreen(void);
6965 void TTYWaitForReturn(void);
6966 void RestoreScreen(int pressKey);
6967diff -Naur ncftp-3.2.6-ep/win/bmed/bmed.vcproj ncftp-3.2.6-zip/win/bmed/bmed.vcproj
6968--- ncftp-3.2.6-ep/win/bmed/bmed.vcproj 2010-04-13 03:21:52.000000000 +0200
6969+++ ncftp-3.2.6-zip/win/bmed/bmed.vcproj 2016-11-27 22:13:18.000000000 +0100
6970@@ -119,7 +119,7 @@
6971 IntermediateDirectory=".\Release"
6972 ConfigurationType="1"
6973 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
6974- UseOfMFC="2"
6975+ UseOfMFC="1"
6976 ATLMinimizesCRunTimeLibraryUsage="false"
6977 CharacterSet="2"
6978 >
6979@@ -151,7 +151,7 @@
6980 AdditionalIncludeDirectories="..\..\Strn"
6981 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
6982 StringPooling="true"
6983- RuntimeLibrary="2"
6984+ RuntimeLibrary="0"
6985 EnableFunctionLevelLinking="true"
6986 UsePrecompiledHeader="2"
6987 PrecompiledHeaderThrough="stdafx.h"
6988diff -Naur ncftp-3.2.6-ep/win/bmed/bookmark.c ncftp-3.2.6-zip/win/bmed/bookmark.c
6989--- ncftp-3.2.6-ep/win/bmed/bookmark.c 2016-10-30 21:24:12.000000000 +0100
6990+++ ncftp-3.2.6-zip/win/bmed/bookmark.c 2016-10-30 21:24:14.000000000 +0100
6991@@ -0,0 +1,904 @@
6992+/* bookmark.c
6993+ *
6994+ * Copyright (c) 1992-2016 by Mike Gleason.
6995+ * All rights reserved.
6996+ *
6997+ */
6998+
6999+#include "syshdrs.h"
7000+#ifdef PRAGMA_HDRSTOP
7001+# pragma hdrstop
7002+#endif
7003+
7004+#include "bookmark.h"
7005+#include "util.h"
7006+
7007+/*
7008+ * The ~/.ncftp/bookmarks file contains a list of sites
7009+ * the user wants to remember.
7010+ *
7011+ * Unlike previous versions of the program, we now open/close
7012+ * the file every time we need it; That way we can have
7013+ * multiple ncftp processes changing the file. There is still
7014+ * a possibility that two different processes could be modifying
7015+ * the file at the same time.
7016+ */
7017+
7018+Bookmark gBm;
7019+int gLoadedBm = 0;
7020+int gBookmarkMatchMode = 0;
7021+int gNumBookmarks = 0;
7022+BookmarkPtr gBookmarkTable = NULL;
7023+
7024+extern char gOurDirectoryPath[];
7025+
7026+/* Converts a pre-loaded Bookmark structure into a RFC 1738
7027+ * Uniform Resource Locator.
7028+ */
7029+void
7030+BookmarkToURL(BookmarkPtr bmp, char *url, size_t urlsize)
7031+{
7032+ char pbuf[32];
7033+
7034+ /* //<user>:<password>@<host>:<port>/<url-path> */
7035+ /* Note that if an absolute path is given,
7036+ * you need to escape the first entry, i.e. /pub -> %2Fpub
7037+ */
7038+ (void) Strncpy(url, "ftp://", urlsize);
7039+ if (bmp->user[0] != '\0') {
7040+ (void) Strncat(url, bmp->user, urlsize);
7041+ if (bmp->pass[0] != '\0') {
7042+ (void) Strncat(url, ":", urlsize);
7043+ (void) Strncat(url, "PASSWORD", urlsize);
7044+ }
7045+ (void) Strncat(url, "@", urlsize);
7046+ }
7047+ (void) Strncat(url, bmp->name, urlsize);
7048+ if (bmp->port != 21) {
7049+ (void) sprintf(pbuf, ":%u", (unsigned int) bmp->port);
7050+ (void) Strncat(url, pbuf, urlsize);
7051+ }
7052+ if (bmp->dir[0] == '/') {
7053+ /* Absolute URL path, must escape first slash. */
7054+ (void) Strncat(url, "/%2F", urlsize);
7055+ (void) Strncat(url, bmp->dir + 1, urlsize);
7056+ (void) Strncat(url, "/", urlsize);
7057+ } else if (bmp->dir[0] != '\0') {
7058+ (void) Strncat(url, "/", urlsize);
7059+ (void) Strncat(url, bmp->dir, urlsize);
7060+ (void) Strncat(url, "/", urlsize);
7061+ }
7062+} /* BookmarkToURL */
7063+
7064+
7065+
7066+
7067+void
7068+SetBookmarkDefaults(BookmarkPtr bmp)
7069+{
7070+ (void) memset(bmp, 0, sizeof(Bookmark));
7071+
7072+ bmp->xferType = 'I';
7073+ bmp->xferMode = 'S'; /* Use FTP protocol default as ours too. */
7074+ bmp->hasSIZE = kCommandAvailabilityUnknown;
7075+ bmp->hasMDTM = kCommandAvailabilityUnknown;
7076+ bmp->hasUTIME = kCommandAvailabilityUnknown;
7077+ bmp->hasPASV = kCommandAvailabilityUnknown;
7078+ bmp->isUnix = 1;
7079+ bmp->lastCall = (time_t) 0;
7080+ bmp->deleted = 0;
7081+} /* SetBookmarkDefaults */
7082+
7083+
7084+
7085+
7086+/* Used when converting hex strings to integral types. */
7087+static int
7088+HexCharToNibble(int c)
7089+{
7090+ switch (c) {
7091+ case '0':
7092+ case '1':
7093+ case '2':
7094+ case '3':
7095+ case '4':
7096+ case '5':
7097+ case '6':
7098+ case '7':
7099+ case '8':
7100+ case '9':
7101+ return (c - '0');
7102+ case 'a':
7103+ case 'b':
7104+ case 'c':
7105+ case 'd':
7106+ case 'e':
7107+ case 'f':
7108+ return (c - 'a' + 10);
7109+ case 'A':
7110+ case 'B':
7111+ case 'C':
7112+ case 'D':
7113+ case 'E':
7114+ case 'F':
7115+ return (c - 'A' + 10);
7116+
7117+ }
7118+ return (-1); /* Error. */
7119+} /* HexCharToNibble */
7120+
7121+
7122+
7123+
7124+
7125+/* Fills in a Bookmark structure based off of a line from the NcFTP
7126+ * "bookmarks" file.
7127+ */
7128+int
7129+ParseHostLine(char *line, BookmarkPtr bmp)
7130+{
7131+ char token[128];
7132+ char pass[128];
7133+ char *s, *d;
7134+ char *tokenend;
7135+ long L;
7136+ int i;
7137+ int result;
7138+ int n, n1, n2;
7139+
7140+ SetBookmarkDefaults(bmp);
7141+ s = line;
7142+ tokenend = token;
7143+ tokenend += sizeof(token);
7144+ --tokenend;
7145+ result = -1;
7146+ for (i=1; ; i++) {
7147+ if (*s == '\0')
7148+ break;
7149+ /* Some tokens may need to have a comma in them. Since this is a
7150+ * field delimiter, these fields use \, to represent a comma, and
7151+ * \\ for a backslash. This chunk gets the next token, paying
7152+ * attention to the escaped stuff.
7153+ */
7154+ for (d = token; *s != '\0'; ) {
7155+ if ((*s == '\\') && (s[1] != '\0')) {
7156+ if (d < tokenend)
7157+ *d++ = s[1];
7158+ s += 2;
7159+ } else if (*s == ',') {
7160+ ++s;
7161+ break;
7162+ } else if ((*s == '$') && (s[1] != '\0') && (s[2] != '\0')) {
7163+ n1 = HexCharToNibble(s[1]);
7164+ n2 = HexCharToNibble(s[2]);
7165+ if ((n1 >= 0) && (n2 >= 0)) {
7166+ n = (n1 << 4) | n2;
7167+ if (d < tokenend)
7168+ *(unsigned char *)d++ = (unsigned char) n;
7169+ }
7170+ s += 3;
7171+ } else {
7172+ if (d < tokenend)
7173+ *d++ = *s;
7174+ ++s;
7175+ }
7176+ }
7177+ *d = '\0';
7178+ switch(i) {
7179+ case 1: (void) STRNCPY(bmp->bookmarkName, token); break;
7180+ case 2: (void) STRNCPY(bmp->name, token); break;
7181+ case 3: (void) STRNCPY(bmp->user, token); break;
7182+ case 4: (void) STRNCPY(bmp->pass, token); break;
7183+ case 5: (void) STRNCPY(bmp->acct, token); break;
7184+ case 6: (void) STRNCPY(bmp->dir, token);
7185+ result = 0; /* Good enough to have these fields. */
7186+ break;
7187+ case 7:
7188+ if (token[0] != '\0')
7189+ bmp->xferType = (int) token[0];
7190+ break;
7191+ case 8:
7192+ /* Most of the time, we won't have a port. */
7193+ if (token[0] == '\0')
7194+ bmp->port = (unsigned int) kDefaultFTPPort;
7195+ else
7196+ bmp->port = (unsigned int) atoi(token);
7197+ break;
7198+ case 9:
7199+ (void) sscanf(token, "%lx", &L);
7200+ bmp->lastCall = (time_t) L;
7201+ break;
7202+ case 10: bmp->hasSIZE = atoi(token); break;
7203+ case 11: bmp->hasMDTM = atoi(token); break;
7204+ case 12: bmp->hasPASV = atoi(token); break;
7205+ case 13: bmp->isUnix = atoi(token);
7206+ result = 3; /* Version 3 had all fields to here. */
7207+ break;
7208+ case 14: (void) STRNCPY(bmp->lastIP, token); break;
7209+ case 15: (void) STRNCPY(bmp->comment, token); break;
7210+ case 16:
7211+ case 17:
7212+ case 18:
7213+ case 19:
7214+ break;
7215+ case 20: bmp->xferMode = token[0];
7216+ result = 7; /* Version 7 has all fields to here. */
7217+ break;
7218+ case 21: bmp->hasUTIME = atoi(token);
7219+ break;
7220+ case 22: (void) STRNCPY(bmp->ldir, token);
7221+ result = 8; /* Version 8 has all fields to here. */
7222+ break;
7223+ default:
7224+ result = 99; /* Version >8 ? */
7225+ goto done;
7226+ }
7227+ }
7228+done:
7229+
7230+ /* Decode password, if it was base-64 encoded. */
7231+ if (strncmp(bmp->pass, kPasswordMagic, kPasswordMagicLen) == 0) {
7232+ FromBase64(pass, bmp->pass + kPasswordMagicLen, strlen(bmp->pass + kPasswordMagicLen), 1);
7233+ (void) STRNCPY(bmp->pass, pass);
7234+ }
7235+ return (result);
7236+} /* ParseHostLine */
7237+
7238+
7239+
7240+
7241+void
7242+CloseBookmarkFile(FILE *fp)
7243+{
7244+ if (fp != NULL)
7245+ (void) fclose(fp);
7246+} /* CloseBookmarkFile */
7247+
7248+
7249+
7250+
7251+
7252+int
7253+GetNextBookmark(FILE *fp, Bookmark *bmp)
7254+{
7255+ char line[512];
7256+
7257+ while (FGets(line, sizeof(line), fp) != NULL) {
7258+ if (ParseHostLine(line, bmp) >= 0)
7259+ return (0);
7260+ }
7261+ return (-1);
7262+} /* GetNextBookmark */
7263+
7264+
7265+
7266+
7267+/* Opens a NcFTP 2.x or 3.x style bookmarks file, and sets the file pointer
7268+ * so that it is ready to read the first data line.
7269+ */
7270+FILE *
7271+OpenBookmarkFile(int *numBookmarks0)
7272+{
7273+ char pathName[256], path2[256];
7274+ char line[256];
7275+ FILE *fp;
7276+ int version;
7277+ int numBookmarks;
7278+ Bookmark junkbm;
7279+
7280+ if (gOurDirectoryPath[0] == '\0')
7281+ return NULL; /* Don't create in root directory. */
7282+ (void) OurDirectoryPath(pathName, sizeof(pathName), kBookmarkFileName);
7283+ fp = fopen(pathName, FOPEN_READ_TEXT);
7284+ if (fp == NULL) {
7285+ /* See if it exists under the old name. */
7286+ (void) OurDirectoryPath(path2, sizeof(path2), kOldBookmarkFileName);
7287+ if (rename(path2, pathName) == 0) {
7288+ /* Rename succeeded, now open it. */
7289+ fp = fopen(pathName, FOPEN_READ_TEXT);
7290+ if (fp == NULL)
7291+ return NULL;
7292+ }
7293+ return NULL; /* Okay to not have one yet. */
7294+ }
7295+
7296+#if (defined(WIN32) || defined(_WINDOWS)) && !defined(__CYGWIN__)
7297+#else
7298+ (void) chmod(pathName, 00600);
7299+#endif
7300+ if (FGets(line, sizeof(line), fp) == NULL) {
7301+ (void) fprintf(stderr, "%s: invalid format.\n", pathName);
7302+ (void) fclose(fp);
7303+ return NULL;
7304+ }
7305+
7306+ /* Sample line we're looking for:
7307+ * "NcFTP bookmark-file version: 8"
7308+ */
7309+ version = -1;
7310+ (void) sscanf(line, "%*s %*s %*s %d", &version);
7311+ if (version < kBookmarkMinVersion) {
7312+ if (version < 0) {
7313+ (void) fprintf(stderr, "%s: invalid format, or bad version.\n", pathName);
7314+ (void) fclose(fp);
7315+ return NULL;
7316+ }
7317+ (void) STRNCPY(path2, pathName);
7318+ (void) sprintf(line, ".v%d", version);
7319+ (void) STRNCAT(path2, line);
7320+ (void) rename(pathName, path2);
7321+ (void) fprintf(stderr, "%s: old version.\n", pathName);
7322+ (void) fclose(fp);
7323+ return NULL;
7324+ }
7325+
7326+ /* Sample line we're looking for:
7327+ * "Number of entries: 28" or "# # # 1"
7328+ */
7329+ numBookmarks = -1;
7330+
7331+ /* At the moment, we can't trust the number stored in the
7332+ * file. It's there for future use.
7333+ */
7334+ if (FGets(line, sizeof(line), fp) == NULL) {
7335+ (void) fprintf(stderr, "%s: invalid format.\n", pathName);
7336+ (void) fclose(fp);
7337+ return NULL;
7338+ }
7339+
7340+ if (numBookmarks0 == (int *) 0) {
7341+ /* If the caller doesn't care how many bookmarks are *really*
7342+ * in the file, then we can return now.
7343+ */
7344+ return(fp);
7345+ }
7346+
7347+ /* Otherwise, we have to read through the whole file because
7348+ * unfortunately the header line can't be trusted.
7349+ */
7350+ for (numBookmarks = 0; ; numBookmarks++) {
7351+ if (GetNextBookmark(fp, &junkbm) < 0)
7352+ break;
7353+ }
7354+
7355+ /* Now we have to re-open and re-position the file.
7356+ * We don't use rewind() because it doesn't always work.
7357+ * This introduces a race condition, but the bookmark
7358+ * functionality wasn't designed to be air-tight.
7359+ */
7360+ CloseBookmarkFile(fp);
7361+ fp = fopen(pathName, FOPEN_READ_TEXT);
7362+ if (fp == NULL)
7363+ return (NULL);
7364+ if (FGets(line, sizeof(line), fp) == NULL) {
7365+ (void) fprintf(stderr, "%s: invalid format.\n", pathName);
7366+ (void) fclose(fp);
7367+ return NULL;
7368+ }
7369+
7370+ if (FGets(line, sizeof(line), fp) == NULL) {
7371+ (void) fprintf(stderr, "%s: invalid format.\n", pathName);
7372+ (void) fclose(fp);
7373+ return NULL;
7374+ }
7375+
7376+ /* NOW we're done. */
7377+ *numBookmarks0 = numBookmarks;
7378+ return (fp);
7379+} /* OpenBookmarkFile */
7380+
7381+
7382+
7383+
7384+/* Looks for a saved bookmark by the abbreviation given. */
7385+int
7386+GetBookmark(const char *const bmabbr, Bookmark *bmp)
7387+{
7388+ FILE *fp;
7389+ char line[512];
7390+ Bookmark byHostName;
7391+ Bookmark byHostAbbr;
7392+ Bookmark byBmAbbr;
7393+ size_t byBmNameFlag = 0;
7394+ size_t byBmAbbrFlag = 0;
7395+ size_t byHostNameFlag = 0;
7396+ size_t byHostAbbrFlag = 0;
7397+ int result = -1;
7398+ int exactMatch = 0;
7399+ size_t bmabbrLen;
7400+ char *cp;
7401+ char bmabbrtrunc[sizeof(bmp->bookmarkName)];
7402+
7403+ fp = OpenBookmarkFile(NULL);
7404+ if (fp == NULL)
7405+ return (-1);
7406+
7407+ memset(&byHostName, 0, sizeof(Bookmark));
7408+ memset(&byHostAbbr, 0, sizeof(Bookmark));
7409+ memset(&byBmAbbr, 0, sizeof(Bookmark));
7410+
7411+ STRNCPY(bmabbrtrunc, bmabbr);
7412+ bmabbrLen = strlen(bmabbr);
7413+ while (FGets(line, sizeof(line), fp) != NULL) {
7414+ if (ParseHostLine(line, bmp) < 0)
7415+ continue;
7416+ if (ISTREQ(bmp->bookmarkName, bmabbrtrunc)) {
7417+ /* Exact match, done. */
7418+ byBmNameFlag = bmabbrLen;
7419+ exactMatch = 1;
7420+ break;
7421+ } else if (ISTRNEQ(bmp->bookmarkName, bmabbr, bmabbrLen)) {
7422+ /* Remember this one, it matched an abbreviated
7423+ * bookmark name.
7424+ */
7425+ byBmAbbr = *bmp;
7426+ byBmAbbrFlag = bmabbrLen;
7427+ } else if (ISTREQ(bmp->name, bmabbr)) {
7428+ /* Remember this one, it matched a full
7429+ * host name.
7430+ */
7431+ byHostName = *bmp;
7432+ byHostNameFlag = bmabbrLen;
7433+ } else if ((cp = strchr(bmp->name, '.')) != NULL) {
7434+ /* See if it matched part of the hostname. */
7435+ if (ISTRNEQ(bmp->name, "ftp", 3)) {
7436+ cp = cp + 1;
7437+ } else if (ISTRNEQ(bmp->name, "www", 3)) {
7438+ cp = cp + 1;
7439+ } else {
7440+ cp = bmp->name;
7441+ }
7442+ if (ISTRNEQ(cp, bmabbr, bmabbrLen)) {
7443+ /* Remember this one, it matched a full
7444+ * host name.
7445+ */
7446+ byHostAbbr = *bmp;
7447+ byHostAbbrFlag = bmabbrLen;
7448+ }
7449+ }
7450+ }
7451+
7452+ if (gBookmarkMatchMode == 0) {
7453+ /* Only use a bookmark when the exact
7454+ * bookmark name was used.
7455+ */
7456+ if (exactMatch != 0) {
7457+ result = 0;
7458+ }
7459+ } else {
7460+ /* Pick the best match, if any. */
7461+ if (byBmNameFlag != 0) {
7462+ /* *bmp is already set. */
7463+ result = 0;
7464+ } else if (byBmAbbrFlag != 0) {
7465+ result = 0;
7466+ *bmp = byBmAbbr;
7467+ } else if (byHostNameFlag != 0) {
7468+ result = 0;
7469+ *bmp = byHostName;
7470+ } else if (byHostAbbrFlag != 0) {
7471+ result = 0;
7472+ *bmp = byHostAbbr;
7473+ }
7474+ }
7475+
7476+ if (result != 0)
7477+ memset(bmp, 0, sizeof(Bookmark));
7478+
7479+ CloseBookmarkFile(fp);
7480+ return (result);
7481+} /* GetBookmark */
7482+
7483+
7484+
7485+
7486+static int
7487+BookmarkSortProc(const void *a, const void *b)
7488+{
7489+ return (ISTRCMP((*(const Bookmark *)a).bookmarkName, (*(const Bookmark *)b).bookmarkName));
7490+} /* BookmarkSortProc */
7491+
7492+
7493+
7494+static int
7495+BookmarkSearchProc(const void *key, const void *b)
7496+{
7497+ return (ISTRCMP((const char *) key, (*(const Bookmark *)b).bookmarkName));
7498+} /* BookmarkSearchProc */
7499+
7500+
7501+
7502+BookmarkPtr
7503+SearchBookmarkTable(const char *key)
7504+{
7505+ return ((BookmarkPtr) bsearch(key, gBookmarkTable, (size_t) gNumBookmarks, sizeof(Bookmark), BookmarkSearchProc));
7506+} /* SearchBookmarkTable */
7507+
7508+
7509+
7510+
7511+void
7512+SortBookmarks(void)
7513+{
7514+ if ((gBookmarkTable == NULL) || (gNumBookmarks < 2))
7515+ return;
7516+
7517+ /* Sorting involves swapping entire Bookmark structures.
7518+ * Normally the proper thing to do is to use an array
7519+ * of pointers to Bookmarks and sort them, but even
7520+ * these days a large bookmark list can be sorted in
7521+ * the blink of an eye.
7522+ */
7523+ qsort(gBookmarkTable, (size_t) gNumBookmarks, sizeof(Bookmark), BookmarkSortProc);
7524+} /* SortBookmarks */
7525+
7526+
7527+
7528+int
7529+LoadBookmarkTable(void)
7530+{
7531+ int i, nb;
7532+ FILE *infp;
7533+
7534+ infp = OpenBookmarkFile(&nb);
7535+ if (infp == NULL) {
7536+ nb = 0;
7537+ }
7538+ if ((nb != gNumBookmarks) && (gBookmarkTable != NULL)) {
7539+ /* Re-loading the table from disk. */
7540+ gBookmarkTable = (Bookmark *) realloc(gBookmarkTable, (size_t) (nb + 1) * sizeof(Bookmark));
7541+ memset(gBookmarkTable, 0, (size_t) (nb + 1) * sizeof(Bookmark));
7542+ } else {
7543+ gBookmarkTable = calloc((size_t) (nb + 1), (size_t) sizeof(Bookmark));
7544+ }
7545+
7546+ if (gBookmarkTable == NULL) {
7547+ CloseBookmarkFile(infp);
7548+ return (-1);
7549+ }
7550+
7551+ for (i=0; i<nb; i++) {
7552+ if (GetNextBookmark(infp, gBookmarkTable + i) < 0) {
7553+ break;
7554+ }
7555+ }
7556+ gNumBookmarks = i;
7557+
7558+ CloseBookmarkFile(infp);
7559+ SortBookmarks();
7560+ return (0);
7561+} /* LoadBookmarkTable */
7562+
7563+
7564+
7565+
7566+/* Some characters need to be escaped so the file is editable and can
7567+ * be parsed correctly the next time it is read.
7568+ */
7569+static char *
7570+BmEscapeTok(char *dst, size_t dsize, char *src)
7571+{
7572+ char *dlim = dst + dsize - 1;
7573+ char *dst0 = dst;
7574+ int c;
7575+
7576+ while ((c = *src) != '\0') {
7577+ src++;
7578+ if ((c == '\\') || (c == ',') || (c == '$')) {
7579+ /* These need to be escaped. */
7580+ if ((dst + 1) < dlim) {
7581+ *dst++ = '\\';
7582+ *dst++ = (char) c;
7583+ }
7584+ } else if (!isprint(c)) {
7585+ /* Escape non-printing characters. */
7586+ if ((dst + 2) < dlim) {
7587+ (void) sprintf(dst, "$%02x", c);
7588+ dst += 3;
7589+ }
7590+ } else {
7591+ if (dst < dlim)
7592+ *dst++ = (char) c;
7593+ }
7594+ }
7595+ *dst = '\0';
7596+ return (dst0);
7597+} /* BmEscapeTok */
7598+
7599+
7600+
7601+
7602+/* Converts a Bookmark into a text string, and writes it to the saved
7603+ * bookmarks file.
7604+ */
7605+static int
7606+WriteBmLine(Bookmark *bmp, FILE *outfp, int savePassword)
7607+{
7608+ char tok[256];
7609+ char pass[160];
7610+
7611+ if (fprintf(outfp, "%s", bmp->bookmarkName) < 0) return (-1) ;/*1*/
7612+ if (fprintf(outfp, ",%s", BmEscapeTok(tok, sizeof(tok), bmp->name)) < 0) return (-1) ;/*2*/
7613+ if (fprintf(outfp, ",%s", BmEscapeTok(tok, sizeof(tok), bmp->user)) < 0) return (-1) ;/*3*/
7614+ if ((bmp->pass[0] != '\0') && (savePassword == 1)) {
7615+ (void) memcpy(pass, kPasswordMagic, kPasswordMagicLen);
7616+ ToBase64(pass + kPasswordMagicLen, bmp->pass, strlen(bmp->pass), 1);
7617+ if (fprintf(outfp, ",%s", pass) < 0) return (-1) ;/*4*/
7618+ } else {
7619+ if (fprintf(outfp, ",%s", "") < 0) return (-1) ;/*4*/
7620+ }
7621+ if (fprintf(outfp, ",%s", BmEscapeTok(tok, sizeof(tok), bmp->acct)) < 0) return (-1) ;/*5*/
7622+ if (fprintf(outfp, ",%s", BmEscapeTok(tok, sizeof(tok), bmp->dir)) < 0) return (-1) ;/*6*/
7623+ if (fprintf(outfp, ",%c", bmp->xferType) < 0) return (-1) ;/*7*/
7624+ if (fprintf(outfp, ",%u", (unsigned int) bmp->port) < 0) return (-1) ;/*8*/
7625+ if (fprintf(outfp, ",%lu", (unsigned long) bmp->lastCall) < 0) return (-1) ;/*9*/
7626+ if (fprintf(outfp, ",%d", bmp->hasSIZE) < 0) return (-1) ;/*10*/
7627+ if (fprintf(outfp, ",%d", bmp->hasMDTM) < 0) return (-1) ;/*11*/
7628+ if (fprintf(outfp, ",%d", bmp->hasPASV) < 0) return (-1) ;/*12*/
7629+ if (fprintf(outfp, ",%d", bmp->isUnix) < 0) return (-1) ;/*13*/
7630+ if (fprintf(outfp, ",%s", bmp->lastIP) < 0) return (-1) ;/*14*/
7631+ if (fprintf(outfp, ",%s", BmEscapeTok(tok, sizeof(tok), bmp->comment)) < 0) return (-1) ;/*15*/
7632+ if (fprintf(outfp, ",%s", "") < 0) return (-1) ;/*16*/
7633+ if (fprintf(outfp, ",%s", "") < 0) return (-1) ;/*17*/
7634+ if (fprintf(outfp, ",%s", "") < 0) return (-1) ;/*18*/
7635+ if (fprintf(outfp, ",%s", "") < 0) return (-1) ;/*19*/
7636+ if (fprintf(outfp, ",%c", bmp->xferMode) < 0) return (-1) ;/*20*/
7637+ if (fprintf(outfp, ",%d", bmp->hasUTIME) < 0) return (-1) ;/*21*/
7638+ if (fprintf(outfp, ",%s", BmEscapeTok(tok, sizeof(tok), bmp->ldir)) < 0) return (-1) ;/*22*/
7639+ if (fprintf(outfp, "\n") < 0) return (-1) ;
7640+ if (fflush(outfp) < 0) return (-1);
7641+ return (0);
7642+} /* WriteBmLine */
7643+
7644+
7645+
7646+static int
7647+SwapBookmarkFiles(void)
7648+{
7649+ char pidStr[32];
7650+ char pathName[256], path2[256];
7651+
7652+ (void) OurDirectoryPath(path2, sizeof(path2), kBookmarkFileName);
7653+ (void) OurDirectoryPath(pathName, sizeof(pathName), kTmpBookmarkFileName);
7654+#if (defined(WIN32) || defined(_WINDOWS)) && !defined(__CYGWIN__) && !defined(getpid)
7655+# define getpid _getpid
7656+#endif
7657+ (void) sprintf(pidStr, "-%u.txt", (unsigned int) getpid());
7658+ (void) STRNCAT(pathName, pidStr);
7659+
7660+ (void) remove(path2);
7661+ if (rename(pathName, path2) < 0) {
7662+ return (-1);
7663+ }
7664+ return (0);
7665+} /* SwapBookmarkFiles */
7666+
7667+
7668+
7669+
7670+
7671+
7672+/* Saves a Bookmark structure into the bookmarks file. */
7673+FILE *
7674+OpenTmpBookmarkFile(int nb)
7675+{
7676+ FILE *outfp;
7677+ char pidStr[32];
7678+ char pathName[256], path2[256];
7679+
7680+ if (gOurDirectoryPath[0] == '\0')
7681+ return (NULL); /* Don't create in root directory. */
7682+
7683+ (void) OurDirectoryPath(path2, sizeof(path2), kBookmarkFileName);
7684+ (void) OurDirectoryPath(pathName, sizeof(pathName), kTmpBookmarkFileName);
7685+ (void) sprintf(pidStr, "-%u.txt", (unsigned int) getpid());
7686+ (void) STRNCAT(pathName, pidStr);
7687+
7688+ outfp = fopen(pathName, FOPEN_WRITE_TEXT);
7689+ if (outfp == NULL) {
7690+ (void) fprintf(stderr, "Could not save bookmark.\n");
7691+ perror(pathName);
7692+ return (NULL);
7693+ }
7694+#if (defined(WIN32) || defined(_WINDOWS)) && !defined(__CYGWIN__)
7695+#else
7696+ (void) chmod(pathName, 00600);
7697+#endif
7698+ if (nb > 0) {
7699+ if (fprintf(outfp, "NcFTP bookmark-file version: %d\nNumber of bookmarks: %d\n", kBookmarkVersion, nb) < 0) {
7700+ (void) fprintf(stderr, "Could not save bookmark.\n");
7701+ perror(pathName);
7702+ (void) fclose(outfp);
7703+ return (NULL);
7704+ }
7705+ } else {
7706+ if (fprintf(outfp, "NcFTP bookmark-file version: %d\nNumber of bookmarks: ??\n", kBookmarkVersion) < 0) {
7707+ (void) fprintf(stderr, "Could not save bookmark.\n");
7708+ perror(pathName);
7709+ (void) fclose(outfp);
7710+ return (NULL);
7711+ }
7712+ }
7713+
7714+ return (outfp);
7715+} /* OpenTmpBookmarkFile */
7716+
7717+
7718+
7719+
7720+int
7721+SaveBookmarkTable(void)
7722+{
7723+ int i;
7724+ FILE *outfp;
7725+ int nb;
7726+
7727+ if ((gNumBookmarks < 1) || (gBookmarkTable == NULL))
7728+ return (0); /* Nothing to save. */
7729+
7730+ /* Get a count of live bookmarks. */
7731+ for (i=0, nb=0; i<gNumBookmarks; i++) {
7732+ if (gBookmarkTable[i].deleted == 0)
7733+ nb++;
7734+ }
7735+ outfp = OpenTmpBookmarkFile(nb);
7736+ if (outfp == NULL) {
7737+ return (-1);
7738+ }
7739+
7740+ for (i=0; i<gNumBookmarks; i++) {
7741+ if (gBookmarkTable[i].deleted == 0) {
7742+ if (WriteBmLine(gBookmarkTable + i, outfp, 1) < 0) {
7743+ CloseBookmarkFile(outfp);
7744+ return (-1);
7745+ }
7746+ }
7747+ }
7748+ CloseBookmarkFile(outfp);
7749+ if (SwapBookmarkFiles() < 0) {
7750+ return (-1);
7751+ }
7752+ return (0);
7753+} /* SaveBookmarkTable */
7754+
7755+
7756+
7757+/* Saves a Bookmark structure into the bookmarks file. */
7758+int
7759+PutBookmark(Bookmark *bmp, int savePassword)
7760+{
7761+ FILE *infp, *outfp;
7762+ char line[256];
7763+ char bmAbbr[64];
7764+ int replaced = 0;
7765+ size_t len;
7766+
7767+ outfp = OpenTmpBookmarkFile(0);
7768+ if (outfp == NULL)
7769+ return (-1);
7770+
7771+ (void) STRNCPY(bmAbbr, bmp->bookmarkName);
7772+ (void) STRNCAT(bmAbbr, ",");
7773+ len = strlen(bmAbbr);
7774+
7775+ /* This may fail the first time we ever save a bookmark. */
7776+ infp = OpenBookmarkFile(NULL);
7777+ if (infp != NULL) {
7778+ while (FGets(line, sizeof(line), infp) != NULL) {
7779+ if (strncmp(line, bmAbbr, len) == 0) {
7780+ /* Replace previous entry. */
7781+ if (WriteBmLine(bmp, outfp, savePassword) < 0) {
7782+ (void) fprintf(stderr, "Could not save bookmark.\n");
7783+ perror("reason");
7784+ (void) fclose(outfp);
7785+ }
7786+ replaced = 1;
7787+ } else {
7788+ if (fprintf(outfp, "%s\n", line) < 0) {
7789+ (void) fprintf(stderr, "Could not save bookmark.\n");
7790+ perror("reason");
7791+ (void) fclose(outfp);
7792+ return (-1);
7793+ }
7794+ }
7795+ }
7796+ CloseBookmarkFile(infp);
7797+ }
7798+
7799+ if (replaced == 0) {
7800+ /* Add it as a new bookmark. */
7801+ if (WriteBmLine(bmp, outfp, savePassword) < 0) {
7802+ (void) fprintf(stderr, "Could not save bookmark.\n");
7803+ perror("reason");
7804+ (void) fclose(outfp);
7805+ return (-1);
7806+ }
7807+ }
7808+
7809+ if (fclose(outfp) < 0) {
7810+ (void) fprintf(stderr, "Could not save bookmark.\n");
7811+ perror("reason");
7812+ return (-1);
7813+ }
7814+
7815+ if (SwapBookmarkFiles() < 0) {
7816+ (void) fprintf(stderr, "Could not rename bookmark file.\n");
7817+ perror("reason");
7818+ return (-1);
7819+ }
7820+ return (0);
7821+} /* PutBookmark */
7822+
7823+
7824+
7825+
7826+/* Tries to generate a bookmark abbreviation based off of the hostname. */
7827+void
7828+DefaultBookmarkName(char *dst, size_t siz, char *src)
7829+{
7830+ char str[128];
7831+ const char *token;
7832+ const char *cp;
7833+
7834+ (void) STRNCPY(str, src);
7835+
7836+ /* Pick the first "significant" part of the hostname. Usually
7837+ * this is the first word in the name, but if it's something like
7838+ * ftp.unl.edu, we would want to choose "unl" and not "ftp."
7839+ */
7840+ token = str;
7841+ if ((token = strtok(str, ".")) == NULL)
7842+ token = str;
7843+ else if ((ISTRNEQ(token, "ftp", 3)) || (ISTRNEQ(token, "www", 3))) {
7844+ if ((token = strtok(NULL, ".")) == NULL)
7845+ token = "";
7846+ }
7847+ for (cp = token; ; cp++) {
7848+ if (*cp == '\0') {
7849+ /* Token was all digits, like an IP address perhaps. */
7850+ token = "";
7851+ }
7852+ if (!isdigit((int) *cp))
7853+ break;
7854+ }
7855+ (void) Strncpy(dst, token, siz);
7856+} /* DefaultBookmarkName */
7857+
7858+
7859+
7860+
7861+int
7862+AddNewItemToBookmarkTable(void)
7863+{
7864+ int nb;
7865+ BookmarkPtr newTable, bmp;
7866+
7867+ if (gBookmarkTable == NULL)
7868+ return (-1);
7869+
7870+ nb = gNumBookmarks + 1;
7871+
7872+ newTable = (BookmarkPtr) realloc(gBookmarkTable, (size_t) (nb) * sizeof(Bookmark));
7873+ if (newTable == NULL)
7874+ return (-1);
7875+
7876+ gBookmarkTable = newTable;
7877+ gNumBookmarks = nb;
7878+
7879+ bmp = &newTable[nb - 1];
7880+ SetBookmarkDefaults(bmp);
7881+
7882+ return (nb - 1);
7883+} /* AddNewItemToBookmarkTable */
7884+
7885+
7886+
7887+
7888+void
7889+DisposeBookmarkTable(void)
7890+{
7891+ if (gBookmarkTable != NULL) {
7892+ free(gBookmarkTable);
7893+ gBookmarkTable = NULL;
7894+ }
7895+} /* DisposeBookmarkTable */