diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-06 17:39:23 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2004-05-06 17:39:23 +0000 |
commit | 949574a7aa068b33386829abb9141af1c715b6c1 (patch) | |
tree | 967dca5b8b09d367495aec6042e08ad61ebb48b2 | |
parent | e256acce3bfc22534b5738f8438faf328fda6a8b (diff) | |
download | samba-949574a7aa068b33386829abb9141af1c715b6c1.tar.gz |
r521: add some missing files remove some unused files
metze
-rwxr-xr-x | examples/VFS/configure | 1161 | ||||
-rwxr-xr-x | source/configure | 14847 | ||||
-rwxr-xr-x | source/include/config.h.in | 1161 | ||||
-rwxr-xr-x | source/include/proto.h | 5096 | ||||
-rwxr-xr-x | source/include/version.h | 1 | ||||
-rwxr-xr-x | source/nsswitch/winbindd_proto.h | 120 |
6 files changed, 22386 insertions, 0 deletions
diff --git a/examples/VFS/configure b/examples/VFS/configure new file mode 100755 index 00000000000..e70d69f02d7 --- /dev/null +++ b/examples/VFS/configure @@ -0,0 +1,1161 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-included-popt use bundled popt library, not from system" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file= + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +uname=`uname` + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:533: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:563: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:614: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 657 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:693: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:721: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + + +# Extract the first word of "libtool", so it can be a program name with args. +set dummy libtool; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:756: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LIBTOOL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LIBTOOL" in + /*) + ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_LIBTOOL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +LIBTOOL="$ac_cv_path_LIBTOOL" +if test -n "$LIBTOOL"; then + echo "$ac_t""$LIBTOOL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test "$LIBTOOL" = ""; then + echo + echo 'FATAL ERROR: libtool does not seem to be installed.' + echo $pkg_name cannot be built without a working libtool installation. + exit 1 +fi + +# +# Config CFLAGS settings +# +CFLAGS="-Wall" + +case "$uname" in + AIX) + if test "${GCC}" = "yes"; then + CFLAGS="$CFLAGS -I/usr/include -D_LINUX_SOURCE_COMPAT" + else + CFLAGS="-D_LINUX_SOURCE_COMPAT" + fi + ;; + SunOS) + if test "${GCC}" = "yes"; then + CFLAGS="$CFLAGS" + else + CFLAGS="" + fi + ;; +# Linux) +# CFLAGS="-Wall" +# ;; +esac + +# +# Config LDLAGS settings +# +LDFLAGS="-shared" + +case "$uname" in + AIX) + LDFLAGS="-Wl,-G,-bexpall,-bnoentry" + ;; + SunOS) + LDFLAGS="-G" + ;; +# Linux) +# echo "Linux found" +# LDFLAGS="-shared" +# ;; +esac + +################################################# +# Check to see if we should use the included popt + +# Check whether --with-included-popt or --without-included-popt was given. +if test "${with_included_popt+set}" = set; then + withval="$with_included_popt" + + case "$withval" in + yes) + INCLUDED_POPT=yes + ;; + no) + INCLUDED_POPT=no + ;; + esac +fi + +if test x"$INCLUDED_POPT" != x"yes"; then + echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 +echo "configure:857: checking for poptGetContext in -lpopt" >&5 +ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpopt $LIBS" +cat > conftest.$ac_ext <<EOF +#line 865 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char poptGetContext(); + +int main() { +poptGetContext() +; return 0; } +EOF +if { (eval echo configure:876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + INCLUDED_POPT=no +else + echo "$ac_t""no" 1>&6 +INCLUDED_POPT=yes +fi + +fi + +echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 +echo "configure:900: checking whether to use included popt" >&5 +if test x"$INCLUDED_POPT" = x"yes"; then + echo "$ac_t""$srcdir/popt" 1>&6 + CFLAGS="$CFLAGS -I../../source/popt" +else + echo "$ac_t""no" 1>&6 +fi + +CFLAGS="$CFLAGS -I../../source -I../../source/include -I../../source/ubiqx -I../../source/smbwrapper" + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@LIBTOOL@%$LIBTOOL%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"Makefile"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/source/configure b/source/configure new file mode 100755 index 00000000000..a530c780eb9 --- /dev/null +++ b/source/configure @@ -0,0 +1,14847 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_default_prefix=/usr/local/samba +ac_help="$ac_help + --with-fhs Use FHS-compliant paths (default=no)" +ac_help="$ac_help + --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)" +ac_help="$ac_help + --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)" +ac_help="$ac_help + --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)" +ac_help="$ac_help + --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)" +ac_help="$ac_help + --with-configdir=DIR Where to put configuration files (\$libdir)" +ac_help="$ac_help + --with-codepagedir=DIR Where to put codepage files (\$libdir/codepages)" +ac_help="$ac_help + --with-logfilebase=DIR Where to put log files (\$(VARDIR))" +ac_help="$ac_help + --enable-debug Turn on compiler debugging information (default=no)" +ac_help="$ac_help + --enable-cups Turn on CUPS support (default=auto)" +ac_help="$ac_help + --with-readline[=DIR] Look for readline include/libs in DIR (default=auto)" +ac_help="$ac_help + --with-smbwrapper Include SMB wrapper support (default=no)" +ac_help="$ac_help + --with-afs Include AFS support (default=no)" +ac_help="$ac_help + --with-dce-dfs Include DCE/DFS support (default=no)" +ac_help="$ac_help + --with-krb4=base-dir Include Kerberos IV support (default=no)" +ac_help="$ac_help + --with-krb5=base-dir Include Kerberos 5 support (default=no)" +ac_help="$ac_help + --with-automount Include AUTOMOUNT support (default=no)" +ac_help="$ac_help + --with-smbmount Include SMBMOUNT (Linux only) support (default=no)" +ac_help="$ac_help + --with-pam Include PAM password database support (default=no)" +ac_help="$ac_help + --with-pam_smbpass Include the smbpass PAM module (default=no)" +ac_help="$ac_help + --with-tdbsam Include experimental TDB SAM support (default=no)" +ac_help="$ac_help + --with-ldapsam Include experimental LDAP SAM support (default=no)" +ac_help="$ac_help + --with-nisplussam Include NISPLUS SAM support (default=no)" +ac_help="$ac_help + --with-nisplus-home Include NISPLUS_HOME support (default=no)" +ac_help="$ac_help + --with-ssl Include SSL support (default=no) + --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl/include) + --with-ssllib=DIR Where the SSL libraries are (defaults to /usr/local/ssl/lib)" +ac_help="$ac_help + --with-syslog Include experimental SYSLOG support (default=no)" +ac_help="$ac_help + --with-profiling-data Include gathering source code profile information (default=no)" +ac_help="$ac_help + --with-quotas Include experimental disk-quota support (default=no)" +ac_help="$ac_help + --with-utmp Include experimental utmp accounting (default=no)" +ac_help="$ac_help + --with-msdfs Include MS Dfs support (default=no)" +ac_help="$ac_help + --with-libsmbclient Build the libsmbclient shared library (default=no)" +ac_help="$ac_help + --with-spinlocks Use spin locks instead of fcntl locks (default=no)" +ac_help="$ac_help + --with-acl-support Include ACL support (default=no)" +ac_help="$ac_help + --with-sendfile-support Check for sendfile support (default=no)" +ac_help="$ac_help + --with-winbind Build winbind (default, if supported by OS)" +ac_help="$ac_help + --with-winbind-auth-challenge Enable winbindd_pam_auth_crap() functionality (default no)" +ac_help="$ac_help + --with-winbind-ldap-hack Enable winbindd_ldap_hack() functionality (default no)" +ac_help="$ac_help + --with-included-popt use bundled popt library, not from system" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=include/includes.h + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + + +################################################# +# Directory handling stuff to support both the +# legacy SAMBA directories and FHS compliant +# ones... + + +# Check whether --with-fhs or --without-fhs was given. +if test "${with_fhs+set}" = set; then + withval="$with_fhs" + codepagedir="\$(DATADIR)/samba/codepages" + configdir="${sysconfdir}/samba" + lockdir="\${VARDIR}/cache/samba" + piddir="\$(VARDIR)/run/samba" + logfilebase="\${VARDIR}/log/samba" + privatedir="\${CONFIGDIR}/private" + swatdir="\${DATADIR}/samba/swat" +else + codepagedir="\$(LIBDIR)/codepages" + configdir="\$(LIBDIR)" + logfilebase="\$(VARDIR)" + lockdir="\${VARDIR}/locks" + piddir="\$(VARDIR)/locks" + privatedir="\${prefix}/private" + swatdir="\${prefix}/swat" +fi + + +################################################# +# set private directory location +# Check whether --with-privatedir or --without-privatedir was given. +if test "${with_privatedir+set}" = set; then + withval="$with_privatedir" + case "$withval" in + yes|no) + # + # Just in case anybody calls it without argument + # + echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2 + ;; + * ) + privatedir="$withval" + ;; + esac +fi + + +################################################# +# set lock directory location +# Check whether --with-lockdir or --without-lockdir was given. +if test "${with_lockdir+set}" = set; then + withval="$with_lockdir" + case "$withval" in + yes|no) + # + # Just in case anybody calls it without argument + # + echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2 + ;; + * ) + lockdir="$withval" + ;; + esac +fi + + +################################################# +# set pid directory location +# Check whether --with-piddir or --without-piddir was given. +if test "${with_piddir+set}" = set; then + withval="$with_piddir" + case "$withval" in + yes|no) + # + # Just in case anybody calls it without argument + # + echo "configure: warning: --with-piddir called without argument - will use default" 1>&2 + ;; + * ) + piddir="$withval" + ;; + esac +fi + + +################################################# +# set SWAT directory location +# Check whether --with-swatdir or --without-swatdir was given. +if test "${with_swatdir+set}" = set; then + withval="$with_swatdir" + case "$withval" in + yes|no) + # + # Just in case anybody does it + # + echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2 + ;; + * ) + swatdir="$withval" + ;; + esac +fi + + +################################################# +# set configuration directory location +# Check whether --with-configdir or --without-configdir was given. +if test "${with_configdir+set}" = set; then + withval="$with_configdir" + case "$withval" in + yes|no) + # + # Just in case anybody does it + # + echo "configure: warning: --with-configdir called without argument - will use default" 1>&2 + ;; + * ) + configdir="$withval" + ;; + esac +fi + + +################################################# +# set codepage directory location +# Check whether --with-codepagedir or --without-codepagedir was given. +if test "${with_codepagedir+set}" = set; then + withval="$with_codepagedir" + case "$withval" in + yes|no) + # + # Just in case anybody does it + # + echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2 + ;; + * ) + codepagedir="$withval" + ;; + esac +fi + + +################################################# +# set log directory location +# Check whether --with-logfilebase or --without-logfilebase was given. +if test "${with_logfilebase+set}" = set; then + withval="$with_logfilebase" + case "$withval" in + yes|no) + # + # Just in case anybody does it + # + echo "configure: warning: --with-logfilebase called without argument - will use default" 1>&2 + ;; + * ) + logfilebase="$withval" + ;; + esac +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# compile with optimization and without debugging by default +CFLAGS="-O ${CFLAGS}" + +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + if eval "test x$enable_debug = xyes"; then + CFLAGS="${CFLAGS} -g" + fi +fi + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:814: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:844: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:895: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:927: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 938 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:974: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1002: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1064: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +for ac_prog in gawk mawk nawk awk +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1121: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + +LD=ld +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1152: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:1167: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1172 "configure" +#include "confdefs.h" + +int main() { + +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__; +; return 0; } +EOF +if { (eval echo configure:1183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:1200: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1205 "configure" +#include "confdefs.h" + +int main() { +return __MINGW32__; +; return 0; } +EOF +if { (eval echo configure:1212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1231: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +# Extract the first word of "passwd", so it can be a program name with args. +set dummy passwd; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1264: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_passwd_program'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$passwd_program" in + /*) + ac_cv_path_passwd_program="$passwd_program" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_passwd_program="$passwd_program" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_passwd_program="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_passwd_program" && ac_cv_path_passwd_program="/bin/passwd" + ;; +esac +fi +passwd_program="$ac_cv_path_passwd_program" +if test -n "$passwd_program"; then + echo "$ac_t""$passwd_program" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + +if test "x$CC" != xcc; then + echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 +echo "configure:1301: checking whether $CC and cc understand -c and -o together" >&5 +else + echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 +echo "configure:1304: checking whether cc understands -c and -o together" >&5 +fi +set dummy $CC; ac_cc="`echo $2 | + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" +if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'foo(){}' > conftest.c +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' +if { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + ac_try='cc -c conftest.c -o conftest.o 1>&5' + if { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<\EOF +#define NO_MINUS_C_MINUS_O 1 +EOF + +fi + +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then + BROKEN_CC= +else + BROKEN_CC=# +fi + + +echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 +echo "configure:1359: checking that the C compiler understands volatile" >&5 +if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 1365 "configure" +#include "confdefs.h" +#include <sys/types.h> +int main() { +volatile int i = 0 +; return 0; } +EOF +if { (eval echo configure:1372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_volatile=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_volatile=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_volatile" 1>&6 +if test x"$samba_cv_volatile" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_VOLATILE 1 +EOF + +fi + + + + +# Do some error checking and defaulting for the host and target type. +# The inputs are: +# configure --host=HOST --target=TARGET --build=BUILD NONOPT +# +# The rules are: +# 1. You are not allowed to specify --host, --target, and nonopt at the +# same time. +# 2. Host defaults to nonopt. +# 3. If nonopt is not specified, then host defaults to the current host, +# as determined by config.guess. +# 4. Target and build default to nonopt. +# 5. If nonopt is not specified, then target and build default to host. + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +case $host---$target---$nonopt in +NONE---*---* | *---NONE---* | *---*---NONE) ;; +*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; +esac + + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1422: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:1443: checking target system type" >&5 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:1461: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + + + case "$host_os" in + *irix6*) cat >> confdefs.h <<\EOF +#include <standards.h> +EOF + + ;; +esac + + + + echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 +echo "configure:1495: checking config.cache system type" >&5 + if { test x"${ac_cv_host_system_type+set}" = x"set" && + test x"$ac_cv_host_system_type" != x"$host"; } || + { test x"${ac_cv_build_system_type+set}" = x"set" && + test x"$ac_cv_build_system_type" != x"$build"; } || + { test x"${ac_cv_target_system_type+set}" = x"set" && + test x"$ac_cv_target_system_type" != x"$target"; }; then + echo "$ac_t""different" 1>&6 + { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; } + else + echo "$ac_t""same" 1>&6 + fi + ac_cv_host_system_type="$host" + ac_cv_build_system_type="$build" + ac_cv_target_system_type="$target" + + +DYNEXP= + +# +# Config CPPFLAG settings for strange OS's that must be set +# before other tests. +# +case "$host_os" in +# Try to work out if this is the native HPUX compiler that uses the -Ae flag. + *hpux*) + echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6 +echo "configure:1522: checking whether ${CC-cc} accepts -Ae" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then + ac_cv_prog_cc_Ae=yes +else + ac_cv_prog_cc_Ae=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6 + # mmap on HPUX is completely broken... + cat >> confdefs.h <<\EOF +#define MMAP_BLACKLIST 1 +EOF + + if test $ac_cv_prog_cc_Ae = yes; then + CPPFLAGS="$CPPFLAGS -Ae" + fi +# +# Defines needed for HPUX support. +# HPUX has bigcrypt but (sometimes?) doesn't use it for +# password hashing - hence the USE_BOTH_CRYPT_CALLS define. +# + case `uname -r` in + *9*|*10*) + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL" + cat >> confdefs.h <<\EOF +#define USE_BOTH_CRYPT_CALLS 1 +EOF + + cat >> confdefs.h <<\EOF +#define _HPUX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _ALIGNMENT_REQUIRED 1 +EOF + + cat >> confdefs.h <<\EOF +#define _MAX_ALIGNMENT 4 +EOF + + ;; + *11*) + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL" + cat >> confdefs.h <<\EOF +#define _HPUX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define POSIX_ACL_NEEDS_MASK 1 +EOF + + cat >> confdefs.h <<\EOF +#define _ALIGNMENT_REQUIRED 1 +EOF + + cat >> confdefs.h <<\EOF +#define _MAX_ALIGNMENT 4 +EOF + + cat >> confdefs.h <<\EOF +#define USE_BOTH_CRYPT_CALLS 1 +EOF + + ;; + esac + DYNEXP="-Wl,-E" + ;; + + +# +# CRAY Unicos has broken const handling + *unicos*) + echo "$ac_t""disabling const" 1>&6 + CPPFLAGS="$CPPFLAGS -Dconst=" + ;; + +# +# AIX4.x doesn't even admit to having large +# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set. +# + *aix4*) + echo "$ac_t""enabling large file support" 1>&6 + CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" + cat >> confdefs.h <<\EOF +#define _LARGE_FILES 1 +EOF + + ;; +# +# Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit +# to the existance of large files.. +# Note that -D_LARGEFILE64_SOURCE is different from the Sun +# recommendations on large file support, however it makes the +# compile work using gcc 2.7 and 2.8, whereas using the Sun +# recommendation makes the compile fail on gcc2.7. JRA. +# + *solaris*) + case `uname -r` in + 5.0*|5.1*|5.2*|5.3*|5.5*) + echo "$ac_t""no large file support" 1>&6 + ;; + 5.*) + echo "$ac_t""enabling large file support" 1>&6 + if test "$ac_cv_prog_gcc" = yes; then + ${CC-cc} -v >conftest.c 2>&1 + ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c` + rm -fr conftest.c + case "$ac_cv_gcc_compiler_version_number" in + *"gcc version 2.6"*|*"gcc version 2.7"*) + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + ;; + *) + CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + + ;; + esac + else + CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + + fi + ;; + esac + ;; +# +# VOS may need to have POSIX support and System V compatibility enabled. +# + *vos*) + case "$CPPFLAGS" in + *-D_POSIX_C_SOURCE*) + ;; + *) + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=199506L" + cat >> confdefs.h <<\EOF +#define _POSIX_C_SOURCE 199506L +EOF + + ;; + esac + case "$CPPFLAGS" in + *-D_SYSV*|*-D_SVID_SOURCE*) + ;; + *) + CPPFLAGS="$CPPFLAGS -D_SYSV" + cat >> confdefs.h <<\EOF +#define _SYSV 1 +EOF + + esac + ;; +# +# Tests needed for SINIX large file support. +# + *sysv4*) + if test $host = mips-sni-sysv4 ; then + echo $ac_n "checking for LFS support""... $ac_c" 1>&6 +echo "configure:1714: checking for LFS support" >&5 + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" + if test "$cross_compiling" = yes; then + SINIX_LFS_SUPPORT=cross +else + cat > conftest.$ac_ext <<EOF +#line 1721 "configure" +#include "confdefs.h" + +#include <unistd.h> +main () { +#if _LFS64_LARGEFILE == 1 +exit(0); +#else +exit(1); +#endif +} +EOF +if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + SINIX_LFS_SUPPORT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + SINIX_LFS_SUPPORT=no +fi +rm -fr conftest* +fi + + CPPFLAGS="$old_CPPFLAGS" + if test x$SINIX_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS" + LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS" + LIBS="`getconf LFS64_LIBS` $LIBS" + fi + echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6 + fi + ;; + +# Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support. +# + *linux*) + echo $ac_n "checking for LFS support""... $ac_c" 1>&6 +echo "configure:1764: checking for LFS support" >&5 + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + if test "$cross_compiling" = yes; then + LINUX_LFS_SUPPORT=cross +else + cat > conftest.$ac_ext <<EOF +#line 1771 "configure" +#include "confdefs.h" + +#include <unistd.h> +#include <sys/utsname.h> +main() { +#if _LFS64_LARGEFILE == 1 + struct utsname uts; + char *release; + int major, minor; + + /* Ensure this is glibc 2.2 or higher */ +#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) + int libc_major = __GLIBC__; + int libc_minor = __GLIBC_MINOR__; + + if (libc_major < 2) + exit(1); + if (libc_minor < 2) + exit(1); +#endif + + /* Ensure this is kernel 2.4 or higher */ + + uname(&uts); + release = uts.release; + major = atoi(strsep(&release, ".")); + minor = atoi(strsep(&release, ".")); + + if (major > 2 || (major == 2 && minor > 3)) + exit(0); + exit(1); +#else + exit(1); +#endif +} + +EOF +if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + LINUX_LFS_SUPPORT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + LINUX_LFS_SUPPORT=no +fi +rm -fr conftest* +fi + + CPPFLAGS="$old_CPPFLAGS" + if test x$LINUX_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _FILE_OFFSET_BITS 64 +EOF + + cat >> confdefs.h <<\EOF +#define _GNU_SOURCE 1 +EOF + + fi + echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6 + ;; + + *hurd*) + echo $ac_n "checking for LFS support""... $ac_c" 1>&6 +echo "configure:1842: checking for LFS support" >&5 + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + if test "$cross_compiling" = yes; then + GLIBC_LFS_SUPPORT=cross +else + cat > conftest.$ac_ext <<EOF +#line 1849 "configure" +#include "confdefs.h" + +#include <unistd.h> +main () { +#if _LFS64_LARGEFILE == 1 +exit(0); +#else +exit(1); +#endif +} +EOF +if { (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + GLIBC_LFS_SUPPORT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + GLIBC_LFS_SUPPORT=no +fi +rm -fr conftest* +fi + + CPPFLAGS="$old_CPPFLAGS" + if test x$GLIBC_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _GNU_SOURCE 1 +EOF + + fi + echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6 + ;; + +esac + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:1891: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <<EOF +#line 1898 "configure" +#include "confdefs.h" + +int main() { +} $ac_kw foo() { +; return 0; } +EOF +if { (eval echo configure:1905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <<EOF +#define inline $ac_cv_c_inline +EOF + ;; +esac + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1931: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 1946 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 1963 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 1980 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:2011: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2016 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 2041 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 2059 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext <<EOF +#line 2080 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:2091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:2119: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2124 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + ac_header_dirent=$ac_hdr; break +else + echo "$ac_t""no" 1>&6 +fi +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:2157: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2165 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir(); + +int main() { +opendir() +; return 0; } +EOF +if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:2198: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2206 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir(); + +int main() { +opendir() +; return 0; } +EOF +if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:2240: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2245 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/time.h> +#include <time.h> +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:2275: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2280 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/wait.h> +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:2296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2320: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2325 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2360: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2365 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2400: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2405 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in stdlib.h string.h strings.h syslog.h sys/file.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2440: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2445 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2480: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2485 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h sys/socket.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2520: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2525 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in syslog.h sys/syslog.h sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2560: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2565 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2600: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2605 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in security/pam_modules.h security/_pam_macros.h dlfcn.h synch.h pthread.h nsswitch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2640: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2645 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +# +# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. +# This causes configure to fail to detect it. Check for shadow separately on HPUX. +# +case "$host_os" in + *hpux*) + cat > conftest.$ac_ext <<EOF +#line 2684 "configure" +#include "confdefs.h" +#include <shadow.h> +int main() { +struct spwd testme +; return 0; } +EOF +if { (eval echo configure:2691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_shadow_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_shadow_h=no +fi +rm -f conftest* + if test x"$ac_cv_header_shadow_h" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SHADOW_H 1 +EOF + + fi + ;; +esac +for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2713: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2718 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2753: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2758 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in stropts.h poll.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2793: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2798 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in sys/capability.h syscall.h sys/syscall.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2833: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2838 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_hdr in sys/acl.h sys/cdefs.h glob.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2873: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2878 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +# For experimental utmp support (lastlog on some BSD-like systems) +for ac_hdr in utmp.h utmpx.h lastlog.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2915: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2920 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +# For quotas on Veritas VxFS filesystems +for ac_hdr in sys/fs/vx_quota.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2957: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2962 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +# For quotas on Linux XFS filesystems +for ac_hdr in linux/xqm.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2999: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3004 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +echo $ac_n "checking size of int""... $ac_c" 1>&6 +echo "configure:3037: checking size of int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_int=cross +else + cat > conftest.$ac_ext <<EOF +#line 3045 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(int)); + return(0); +} +EOF +if { (eval echo configure:3056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_int=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_int" 1>&6 +cat >> confdefs.h <<EOF +#define SIZEOF_INT $ac_cv_sizeof_int +EOF + + +echo $ac_n "checking size of long""... $ac_c" 1>&6 +echo "configure:3076: checking size of long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_long=cross +else + cat > conftest.$ac_ext <<EOF +#line 3084 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(long)); + return(0); +} +EOF +if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_long" 1>&6 +cat >> confdefs.h <<EOF +#define SIZEOF_LONG $ac_cv_sizeof_long +EOF + + +echo $ac_n "checking size of short""... $ac_c" 1>&6 +echo "configure:3115: checking size of short" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_short=cross +else + cat > conftest.$ac_ext <<EOF +#line 3123 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", sizeof(short)); + return(0); +} +EOF +if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_short=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_short=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_short" 1>&6 +cat >> confdefs.h <<EOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +EOF + + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:3155: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3160 "configure" +#include "confdefs.h" + +int main() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:3230: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <<EOF +#line 3237 "configure" +#include "confdefs.h" + +int main() { +} $ac_kw foo() { +; return 0; } +EOF +if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <<EOF +#define inline $ac_cv_c_inline +EOF + ;; +esac + +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:3270: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext <<EOF +#line 3277 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/param.h> +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:3288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext <<EOF +#line 3292 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/param.h> +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:3303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <<EOF +#line 3323 "configure" +#include "confdefs.h" +main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +EOF +if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + +echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 +echo "configure:3360: checking whether char is unsigned" >&5 +if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$GCC" = yes; then + # GCC predefines this symbol on systems where it applies. +cat > conftest.$ac_ext <<EOF +#line 3367 "configure" +#include "confdefs.h" +#ifdef __CHAR_UNSIGNED__ + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_c_char_unsigned=yes +else + rm -rf conftest* + ac_cv_c_char_unsigned=no +fi +rm -f conftest* + +else +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <<EOF +#line 3389 "configure" +#include "confdefs.h" +/* volatile prevents gcc2 from optimizing the test away on sparcs. */ +#if !defined(__STDC__) || __STDC__ != 1 +#define volatile +#endif +main() { + volatile char c = 255; exit(c < 0); +} +EOF +if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_char_unsigned=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_char_unsigned=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + cat >> confdefs.h <<\EOF +#define __CHAR_UNSIGNED__ 1 +EOF + +fi + + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:3424: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3429 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <signal.h> +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <<EOF +#define RETSIGTYPE $ac_cv_type_signal +EOF + + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:3465: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3470 "configure" +#include "confdefs.h" +#include <sys/types.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:3499: checking for mode_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3504 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:3532: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3537 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:3565: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3570 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:3598: checking for pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3603 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 +echo "configure:3631: checking for st_rdev in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3636 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/stat.h> +int main() { +struct stat s; s.st_rdev; +; return 0; } +EOF +if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_rdev=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_rdev=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 +if test $ac_cv_struct_st_rdev = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_RDEV 1 +EOF + +fi + +echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 +echo "configure:3665: checking for d_off in dirent" >&5 +if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3670 "configure" +#include "confdefs.h" + +#include <unistd.h> +#include <sys/types.h> +#include <dirent.h> +int main() { +struct dirent d; d.d_off; +; return 0; } +EOF +if { (eval echo configure:3680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_dirent_d_off=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_dirent_d_off=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_dirent_d_off" 1>&6 +if test $ac_cv_dirent_d_off = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DIRENT_D_OFF 1 +EOF + +fi + +echo $ac_n "checking for ino_t""... $ac_c" 1>&6 +echo "configure:3701: checking for ino_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3706 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ino_t=yes +else + rm -rf conftest* + ac_cv_type_ino_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_ino_t" 1>&6 +if test $ac_cv_type_ino_t = no; then + cat >> confdefs.h <<\EOF +#define ino_t unsigned +EOF + +fi + +echo $ac_n "checking for loff_t""... $ac_c" 1>&6 +echo "configure:3734: checking for loff_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3739 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_loff_t=yes +else + rm -rf conftest* + ac_cv_type_loff_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_loff_t" 1>&6 +if test $ac_cv_type_loff_t = no; then + cat >> confdefs.h <<\EOF +#define loff_t off_t +EOF + +fi + +echo $ac_n "checking for offset_t""... $ac_c" 1>&6 +echo "configure:3767: checking for offset_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3772 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_offset_t=yes +else + rm -rf conftest* + ac_cv_type_offset_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_offset_t" 1>&6 +if test $ac_cv_type_offset_t = no; then + cat >> confdefs.h <<\EOF +#define offset_t loff_t +EOF + +fi + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:3800: checking for ssize_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3805 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ssize_t=yes +else + rm -rf conftest* + ac_cv_type_ssize_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +if test $ac_cv_type_ssize_t = no; then + cat >> confdefs.h <<\EOF +#define ssize_t int +EOF + +fi + +echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 +echo "configure:3833: checking for wchar_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3838 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_wchar_t=yes +else + rm -rf conftest* + ac_cv_type_wchar_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_wchar_t" 1>&6 +if test $ac_cv_type_wchar_t = no; then + cat >> confdefs.h <<\EOF +#define wchar_t unsigned short +EOF + +fi + + +############################################ +# for cups support we need libcups, and a handful of header files + +# Check whether --enable-cups or --disable-cups was given. +if test "${enable_cups+set}" = set; then + enableval="$enable_cups" + : +fi + + +if test x$enable_cups != xno; then + # Extract the first word of "cups-config", so it can be a program name with args. +set dummy cups-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3880: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$CUPS_CONFIG" in + /*) + ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_CUPS_CONFIG="$CUPS_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_CUPS_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +CUPS_CONFIG="$ac_cv_path_CUPS_CONFIG" +if test -n "$CUPS_CONFIG"; then + echo "$ac_t""$CUPS_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + if test "x$CUPS_CONFIG" != x; then + cat >> confdefs.h <<\EOF +#define HAVE_CUPS 1 +EOF + + CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" + LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" + LIBS="$LIBS `$CUPS_CONFIG --libs`" + fi +fi + +############################################ +# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code +for ac_func in dlopen +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3929: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3934 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +if test x"$ac_cv_func_dlopen" = x"no"; then + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:3983: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 3991 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen(); + +int main() { +dlopen() +; return 0; } +EOF +if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -ldl"; + cat >> confdefs.h <<\EOF +#define HAVE_DLOPEN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi +# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then + +############################################ +# check if the compiler can do immediate structures +echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 +echo "configure:4032: checking for immediate structures" >&5 +if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4038 "configure" +#include "confdefs.h" + +#include <stdio.h> +int main() { + + typedef struct {unsigned x;} FOOBAR; +#define X_FOOBAR(x) ((FOOBAR) { x }) +#define FOO_ONE X_FOOBAR(1) + FOOBAR f = FOO_ONE; + static struct { + FOOBAR y; + } f2[] = { + {FOO_ONE} + }; + +; return 0; } +EOF +if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_immediate_structures=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_immediate_structures=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_immediate_structures" 1>&6 +if test x"$samba_cv_immediate_structures" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_IMMEDIATE_STRUCTURES 1 +EOF + +fi + +############################################ +# check for unix domain sockets +echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 +echo "configure:4079: checking for unix domain sockets" >&5 +if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4085 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <stdlib.h> +#include <stddef.h> +#include <sys/socket.h> +#include <sys/un.h> +int main() { + + struct sockaddr_un sunaddr; + sunaddr.sun_family = AF_UNIX; + +; return 0; } +EOF +if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_unixsocket=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_unixsocket=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_unixsocket" 1>&6 +if test x"$samba_cv_unixsocket" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UNIXSOCKET 1 +EOF + +fi + +echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 +echo "configure:4121: checking for socklen_t type" >&5 +if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4127 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +#include <sys/socket.h> +int main() { +socklen_t i = 0 +; return 0; } +EOF +if { (eval echo configure:4140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_socklen_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_socklen_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_socklen_t" 1>&6 +if test x"$samba_cv_socklen_t" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCKLEN_T_TYPE 1 +EOF + +fi + +echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 +echo "configure:4161: checking for sig_atomic_t type" >&5 +if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4167 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +#include <signal.h> +int main() { +sig_atomic_t i = 0 +; return 0; } +EOF +if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_sig_atomic_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_sig_atomic_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6 +if test x"$samba_cv_sig_atomic_t" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SIG_ATOMIC_T_TYPE 1 +EOF + +fi + +# stupid headers have the functions but no declaration. grrrr. + + echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 +echo "configure:4203: checking for errno declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4209 "configure" +#include "confdefs.h" +#include <errno.h> +int main() { +int i = (int)errno +; return 0; } +EOF +if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_errno_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_errno_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_errno_decl" 1>&6 + if test x"$ac_cv_have_errno_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ERRNO_DECL 1 +EOF + + fi + + + echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 +echo "configure:4238: checking for setresuid declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4244 "configure" +#include "confdefs.h" +#include <unistd.h> +int main() { +int i = (int)setresuid +; return 0; } +EOF +if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_setresuid_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_setresuid_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6 + if test x"$ac_cv_have_setresuid_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESUID_DECL 1 +EOF + + fi + + + echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 +echo "configure:4273: checking for setresgid declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4279 "configure" +#include "confdefs.h" +#include <unistd.h> +int main() { +int i = (int)setresgid +; return 0; } +EOF +if { (eval echo configure:4286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_setresgid_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_setresgid_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6 + if test x"$ac_cv_have_setresgid_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESGID_DECL 1 +EOF + + fi + + + echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 +echo "configure:4308: checking for asprintf declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4314 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +int i = (int)asprintf +; return 0; } +EOF +if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_asprintf_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_asprintf_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6 + if test x"$ac_cv_have_asprintf_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ASPRINTF_DECL 1 +EOF + + fi + + + echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 +echo "configure:4343: checking for vasprintf declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4349 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +int i = (int)vasprintf +; return 0; } +EOF +if { (eval echo configure:4356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_vasprintf_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_vasprintf_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6 + if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_VASPRINTF_DECL 1 +EOF + + fi + + + echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 +echo "configure:4378: checking for vsnprintf declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4384 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +int i = (int)vsnprintf +; return 0; } +EOF +if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_vsnprintf_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_vsnprintf_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6 + if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_VSNPRINTF_DECL 1 +EOF + + fi + + + echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 +echo "configure:4413: checking for snprintf declaration" >&5 +if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 4419 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +int i = (int)snprintf +; return 0; } +EOF +if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_snprintf_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_snprintf_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6 + if test x"$ac_cv_have_snprintf_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SNPRINTF_DECL 1 +EOF + + fi + + +# and glibc has setresuid under linux but the function does +# nothing until kernel 2.1.44! very dumb. +echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 +echo "configure:4450: checking for real setresuid" >&5 +if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + samba_cv_have_setresuid=cross +else + cat > conftest.$ac_ext <<EOF +#line 4459 "configure" +#include "confdefs.h" +#include <errno.h> +main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} +EOF +if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_have_setresuid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_have_setresuid=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_have_setresuid" 1>&6 +if test x"$samba_cv_have_setresuid" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESUID 1 +EOF + +fi + +# Do the same check for setresguid... +# +echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 +echo "configure:4489: checking for real setresgid" >&5 +if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + samba_cv_have_setresgid=cross +else + cat > conftest.$ac_ext <<EOF +#line 4498 "configure" +#include "confdefs.h" +#include <unistd.h> +#include <errno.h> +main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} +EOF +if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_have_setresgid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_have_setresgid=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_have_setresgid" 1>&6 +if test x"$samba_cv_have_setresgid" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESGID 1 +EOF + +fi + +echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +echo "configure:4527: checking for 8-bit clean memcmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_clean=no +else + cat > conftest.$ac_ext <<EOF +#line 4535 "configure" +#include "confdefs.h" + +main() +{ + char c0 = 0x40, c1 = 0x80, c2 = 0x81; + exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); +} + +EOF +if { (eval echo configure:4545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_memcmp_clean=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + + +############################################### +# Readline included by default unless explicitly asked not to +test "${with_readline+set}" != "set" && with_readline=yes + +# test for where we get readline() from +echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 +echo "configure:4569: checking whether to use readline" >&5 +# Check whether --with-readline or --without-readline was given. +if test "${with_readline+set}" = set; then + withval="$with_readline" + case "$with_readline" in + yes) + echo "$ac_t""yes" 1>&6 + + for ac_hdr in readline.h history.h readline/readline.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4581: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4586 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_hdr in readline/history.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4621: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4626 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + + for ac_hdr in readline.h readline/readline.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4662: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4667 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + + for termlib in ncurses curses termcap terminfo termlib; do + echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 +echo "configure:4695: checking for tgetent in -l${termlib}" >&5 +ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l${termlib} $LIBS" +cat > conftest.$ac_ext <<EOF +#line 4703 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent(); + +int main() { +tgetent() +; return 0; } +EOF +if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERMLIBS="-l${termlib}"; break +else + echo "$ac_t""no" 1>&6 +fi + + done + echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 +echo "configure:4736: checking for rl_callback_handler_install in -lreadline" >&5 +ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline $TERMLIBS $LIBS" +cat > conftest.$ac_ext <<EOF +#line 4744 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char rl_callback_handler_install(); + +int main() { +rl_callback_handler_install() +; return 0; } +EOF +if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERMLIBS="-lreadline $TERMLIBS" + cat >> confdefs.h <<\EOF +#define HAVE_LIBREADLINE 1 +EOF + + break +else + echo "$ac_t""no" 1>&6 +TERMLIBS= +fi + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + no) + echo "$ac_t""no" 1>&6 + ;; + *) + echo "$ac_t""yes" 1>&6 + + # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at + # alternate readline path + _ldflags=${LDFLAGS} + _cppflags=${CPPFLAGS} + + # Add additional search path + LDFLAGS="-L$with_readline/lib $LDFLAGS" + CPPFLAGS="-I$with_readline/include $CPPFLAGS" + + for ac_hdr in readline.h history.h readline/readline.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4806: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4811 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + for ac_hdr in readline/history.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4846: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4851 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + + for ac_hdr in readline.h readline/readline.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4887: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4892 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + + for termlib in ncurses curses termcap terminfo termlib; do + echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 +echo "configure:4920: checking for tgetent in -l${termlib}" >&5 +ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l${termlib} $LIBS" +cat > conftest.$ac_ext <<EOF +#line 4928 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent(); + +int main() { +tgetent() +; return 0; } +EOF +if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERMLIBS="-l${termlib}"; break +else + echo "$ac_t""no" 1>&6 +fi + + done + echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 +echo "configure:4961: checking for rl_callback_handler_install in -lreadline" >&5 +ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline $TERMLIBS $LIBS" +cat > conftest.$ac_ext <<EOF +#line 4969 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char rl_callback_handler_install(); + +int main() { +rl_callback_handler_install() +; return 0; } +EOF +if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + TERMLDFLAGS="-L$with_readline/lib" + TERMCPPFLAGS="-I$with_readline/include" + CPPFLAGS="-I$with_readline/include $CPPFLAGS" + TERMLIBS="-lreadline $TERMLIBS" + cat >> confdefs.h <<\EOF +#define HAVE_LIBREADLINE 1 +EOF + + break +else + echo "$ac_t""no" 1>&6 +TERMLIBS= CPPFLAGS=$_cppflags +fi + +else + echo "$ac_t""no" 1>&6 +fi +done + + + LDFLAGS=$_ldflags + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + + + +# The following test taken from the cvs sources +# If we can't find connect, try looking in -lsocket, -lnsl, and -linet. +# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has +# libsocket.so which has a bad implementation of gethostbyname (it +# only looks in /etc/hosts), so we only look for -lsocket if we need +# it. +for ac_func in connect +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5035: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5040 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +if test x"$ac_cv_func_connect" = x"no"; then + case "$LIBS" in + *-lnsl*) ;; + *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 +echo "configure:5091: checking for printf in -lnsl_s" >&5 +ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl_s $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5099 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char printf(); + +int main() { +printf() +; return 0; } +EOF +if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lnsl_s $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + case "$LIBS" in + *-lnsl*) ;; + *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 +echo "configure:5141: checking for printf in -lnsl" >&5 +ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5149 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char printf(); + +int main() { +printf() +; return 0; } +EOF +if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lnsl $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + case "$LIBS" in + *-lsocket*) ;; + *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +echo "configure:5191: checking for connect in -lsocket" >&5 +ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5199 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect(); + +int main() { +connect() +; return 0; } +EOF +if { (eval echo configure:5210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsocket $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + case "$LIBS" in + *-linet*) ;; + *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 +echo "configure:5241: checking for connect in -linet" >&5 +ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-linet $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5249 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect(); + +int main() { +connect() +; return 0; } +EOF +if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-linet $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + if test x"$ac_cv_lib_socket_connect" = x"yes" || + test x"$ac_cv_lib_inet_connect" = x"yes"; then + # ac_cv_func_connect=yes + # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run + cat >> confdefs.h <<\EOF +#define HAVE_CONNECT 1 +EOF + + fi +fi + +############################################### +# test for where we get get_yp_default_domain() from +for ac_func in yp_get_default_domain +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5304: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5309 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then + echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 +echo "configure:5358: checking for yp_get_default_domain in -lnsl" >&5 +ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5366 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yp_get_default_domain(); + +int main() { +yp_get_default_domain() +; return 0; } +EOF +if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lnsl"; + cat >> confdefs.h <<\EOF +#define HAVE_YP_GET_DEFAULT_DOMAIN 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +# Check if we have execl, if not we need to compile smbrun. +for ac_func in execl +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5407: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5412 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +if test x"$ac_cv_func_execl" = x"no"; then + RUNPROG="bin/smbrun\$(EXEEXT)" +else + RUNPROG="" +fi + +for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5468: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5473 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid mknod mknod64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5523: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5528 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5578: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5583 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5633: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5638 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5688: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5693 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5743: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5748 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5798: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5803 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5853: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5858 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5908: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5913 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in syslog vsyslog +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5963: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 5968 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +# syscall() is needed for smbwrapper. +for ac_func in syscall +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6020: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6025 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6076: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6081 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6131: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6136 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in __getcwd _getcwd +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6186: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6191 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in __xstat __fxstat __lxstat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6241: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6246 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in _stat _lstat _fstat __stat __lstat __fstat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6296: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6301 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6351: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6356 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6406: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6411 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in getdents _getdents __getdents _lseek __lseek _read __read +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6461: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6466 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in _write __write _fork __fork +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6516: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6521 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6571: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6576 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6626: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6631 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in pread _pread __pread pread64 _pread64 __pread64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6681: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6686 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6736: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6741 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +for ac_func in open64 _open64 __open64 creat64 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6791: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 6796 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +# +# stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX +# + +if test x$ac_cv_func_stat64 = xno ; then + echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6 +echo "configure:6850: checking for stat64 in <sys/stat.h>" >&5 + cat > conftest.$ac_ext <<EOF +#line 6852 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/stat.h> + +int main() { +struct stat64 st64; exit(stat64(".",&st64)); +; return 0; } +EOF +if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_stat64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + echo "$ac_t""$ac_cv_func_stat64" 1>&6 + if test x$ac_cv_func_stat64 = xyes ; then + cat >> confdefs.h <<\EOF +#define HAVE_STAT64 1 +EOF + + fi +fi + +if test x$ac_cv_func_lstat64 = xno ; then + echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6 +echo "configure:6883: checking for lstat64 in <sys/stat.h>" >&5 + cat > conftest.$ac_ext <<EOF +#line 6885 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/stat.h> + +int main() { +struct stat64 st64; exit(lstat64(".",&st64)); +; return 0; } +EOF +if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_lstat64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + echo "$ac_t""$ac_cv_func_lstat64" 1>&6 + if test x$ac_cv_func_lstat64 = xyes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LSTAT64 1 +EOF + + fi +fi + +if test x$ac_cv_func_fstat64 = xno ; then + echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6 +echo "configure:6916: checking for fstat64 in <sys/stat.h>" >&5 + cat > conftest.$ac_ext <<EOF +#line 6918 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/stat.h> + +int main() { +struct stat64 st64; exit(fstat64(0,&st64)); +; return 0; } +EOF +if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_fstat64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + echo "$ac_t""$ac_cv_func_fstat64" 1>&6 + if test x$ac_cv_func_fstat64 = xyes ; then + cat >> confdefs.h <<\EOF +#define HAVE_FSTAT64 1 +EOF + + fi +fi + +# +# If no strcasecmp, check for it in some known places +# It is in -lresolv on ReliantUNIX and UnixWare +# -lresolve *must* follow -lnsl for name resolution to work properly +# + +if test x$ac_cv_func_strcasecmp = xno ; then + echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 +echo "configure:6955: checking for strcasecmp in -lresolv" >&5 +ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <<EOF +#line 6963 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strcasecmp(); + +int main() { +strcasecmp() +; return 0; } +EOF +if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lresolv" + cat >> confdefs.h <<\EOF +#define HAVE_STRCASECMP 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +# +# Check for the functions putprpwnam, set_auth_parameters, +# getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity +# Needed for OSF1 and HPUX. +# + +case "$LIBS" in + *-lsecurity*) for ac_func in putprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7010: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7015 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 +echo "configure:7063: checking for putprpwnam in -lsecurity" >&5 +ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsecurity $LIBS" +cat > conftest.$ac_ext <<EOF +#line 7071 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char putprpwnam(); + +int main() { +putprpwnam() +; return 0; } +EOF +if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsecurity $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in putprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7112: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7117 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + +case "$LIBS" in + *-lsec*) for ac_func in putprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7171: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7176 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 +echo "configure:7224: checking for putprpwnam in -lsec" >&5 +ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsec $LIBS" +cat > conftest.$ac_ext <<EOF +#line 7232 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char putprpwnam(); + +int main() { +putprpwnam() +; return 0; } +EOF +if { (eval echo configure:7243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsec $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in putprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7273: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7278 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + + +case "$LIBS" in + *-lsecurity*) for ac_func in set_auth_parameters +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7333: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7338 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 +echo "configure:7386: checking for set_auth_parameters in -lsecurity" >&5 +ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsecurity $LIBS" +cat > conftest.$ac_ext <<EOF +#line 7394 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char set_auth_parameters(); + +int main() { +set_auth_parameters() +; return 0; } +EOF +if { (eval echo configure:7405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsecurity $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in set_auth_parameters +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7435: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7440 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + +case "$LIBS" in + *-lsec*) for ac_func in set_auth_parameters +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7494: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7499 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 +echo "configure:7547: checking for set_auth_parameters in -lsec" >&5 +ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsec $LIBS" +cat > conftest.$ac_ext <<EOF +#line 7555 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char set_auth_parameters(); + +int main() { +set_auth_parameters() +; return 0; } +EOF +if { (eval echo configure:7566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsec $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in set_auth_parameters +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7596: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7601 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + + +# UnixWare 7.x has its getspnam in -lgen +case "$LIBS" in + *-lgen*) for ac_func in getspnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7657: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7662 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 +echo "configure:7710: checking for getspnam in -lgen" >&5 +ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <<EOF +#line 7718 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getspnam(); + +int main() { +getspnam() +; return 0; } +EOF +if { (eval echo configure:7729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lgen $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in getspnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7759: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7764 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + + +case "$LIBS" in + *-lsecurity*) for ac_func in getspnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7819: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7824 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 +echo "configure:7872: checking for getspnam in -lsecurity" >&5 +ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsecurity $LIBS" +cat > conftest.$ac_ext <<EOF +#line 7880 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getspnam(); + +int main() { +getspnam() +; return 0; } +EOF +if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsecurity $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in getspnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7921: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7926 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:7949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + +case "$LIBS" in + *-lsec*) for ac_func in getspnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:7980: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 7985 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 +echo "configure:8033: checking for getspnam in -lsec" >&5 +ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsec $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8041 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getspnam(); + +int main() { +getspnam() +; return 0; } +EOF +if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsec $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in getspnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8082: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8087 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + + +case "$LIBS" in + *-lsecurity*) for ac_func in bigcrypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8142: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8147 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 +echo "configure:8195: checking for bigcrypt in -lsecurity" >&5 +ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsecurity $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8203 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char bigcrypt(); + +int main() { +bigcrypt() +; return 0; } +EOF +if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsecurity $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in bigcrypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8244: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8249 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + +case "$LIBS" in + *-lsec*) for ac_func in bigcrypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8303: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8308 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 +echo "configure:8356: checking for bigcrypt in -lsec" >&5 +ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsec $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8364 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char bigcrypt(); + +int main() { +bigcrypt() +; return 0; } +EOF +if { (eval echo configure:8375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsec $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in bigcrypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8405: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8410 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + + +case "$LIBS" in + *-lsecurity*) for ac_func in getprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8465: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8470 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 +echo "configure:8518: checking for getprpwnam in -lsecurity" >&5 +ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsecurity $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8526 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getprpwnam(); + +int main() { +getprpwnam() +; return 0; } +EOF +if { (eval echo configure:8537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsecurity $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in getprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8567: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8572 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + +case "$LIBS" in + *-lsec*) for ac_func in getprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8626: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8631 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + ;; + *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 +echo "configure:8679: checking for getprpwnam in -lsec" >&5 +ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsec $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8687 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getprpwnam(); + +int main() { +getprpwnam() +; return 0; } +EOF +if { (eval echo configure:8698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lsec $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + for ac_func in getprpwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:8728: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8733 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + ;; + esac + + +# this bit needs to be modified for each OS that is suported by +# smbwrapper. You need to specify how to created a shared library and +# how to compile C code to produce PIC object files + +# these are the defaults, good for lots of systems +HOST_OS="$host_os" +LDSHFLAGS="-shared" +SONAMEFLAG="#" +SHLD="\${CC}" +PICFLAG="" +PICSUFFIX="po.o" +SHLIBEXT="so" +# Assume non-shared by default and override below +BLDSHARED="false" +echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 +echo "configure:8799: checking ability to build shared libraries" >&5 + +# and these are for particular systems +case "$host_os" in + *linux*) cat >> confdefs.h <<\EOF +#define LINUX 1 +EOF + + BLDSHARED="true" + LDSHFLAGS="-shared" + DYNEXP="-Wl,--export-dynamic" + PICFLAG="-fPIC" + SONAMEFLAG="-Wl,-soname=" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *solaris*) cat >> confdefs.h <<\EOF +#define SUNOS5 1 +EOF + + BLDSHARED="true" + LDSHFLAGS="-G" + SONAMEFLAG="-h " + if test "${GCC}" = "yes"; then + PICFLAG="-fPIC" + if test "${ac_cv_prog_gnu_ld}" = "yes"; then + DYNEXP="-Wl,-E" + fi + else + PICFLAG="-KPIC" + ## ${CFLAGS} added for building 64-bit shared + ## libs using Sun's Compiler + LDSHFLAGS="-G \${CFLAGS}" + POBAD_CC="" + PICSUFFIX="po.o" + fi + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_GETGRNAM 1 +EOF + + ;; + *sunos*) cat >> confdefs.h <<\EOF +#define SUNOS4 1 +EOF + + BLDSHARED="true" + LDSHFLAGS="-G" + SONAMEFLAG="-Wl,-h," + PICFLAG="-KPIC" # Is this correct for SunOS + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_GETGRNAM 1 +EOF + + ;; + *freebsd*) BLDSHARED="true" + LDSHFLAGS="-shared" + DYNEXP="-Wl,--export-dynamic" + SONAMEFLAG="-Wl,-soname," + PICFLAG="-fPIC -DPIC" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_GETGRNAM 1 +EOF + + ;; + *openbsd*) BLDSHARED="true" + LDSHFLAGS="-shared" + DYNEXP="-Wl,-Bdynamic" + SONAMEFLAG="-Wl,-soname," + PICFLAG="-fPIC" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_GETGRNAM 1 +EOF + + ;; + *irix*) cat >> confdefs.h <<\EOF +#define IRIX 1 +EOF + + case "$host_os" in + *irix6*) cat >> confdefs.h <<\EOF +#define IRIX6 1 +EOF + + ;; + esac + ATTEMPT_WRAP32_BUILD=yes + BLDSHARED="true" + LDSHFLAGS="-set_version sgi1.0 -shared" + SONAMEFLAG="-soname " + SHLD="\${LD}" + if test "${GCC}" = "yes"; then + PICFLAG="-fPIC" + else + PICFLAG="-KPIC" + fi + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *aix*) cat >> confdefs.h <<\EOF +#define AIX 1 +EOF + + BLDSHARED="true" + LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry" + DYNEXP="-Wl,-brtl,-bexpall" + PICFLAG="-O2" + if test "${GCC}" != "yes"; then + ## for funky AIX compiler using strncpy() + CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" + fi + + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE DEV_BSIZE +EOF + + ;; + *hpux*) cat >> confdefs.h <<\EOF +#define HPUX 1 +EOF + + SHLIBEXT="sl" + # Use special PIC flags for the native HP-UX compiler. + if test $ac_cv_prog_cc_Ae = yes; then + BLDSHARED="true" + SHLD="/usr/bin/ld" + LDSHFLAGS="-B symbolic -b -z" + SONAMEFLAG="+h " + PICFLAG="+z" + fi + DYNEXP="-Wl,-E" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 8192 +EOF + + cat >> confdefs.h <<\EOF +#define POSIX_ACL_NEEDS_MASK 1 +EOF + + ;; + *qnx*) cat >> confdefs.h <<\EOF +#define QNX 1 +EOF + + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *osf*) cat >> confdefs.h <<\EOF +#define OSF1 1 +EOF + + BLDSHARED="true" + LDSHFLAGS="-shared" + SONAMEFLAG="-Wl,-soname," + PICFLAG="-fPIC" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + cat >> confdefs.h <<\EOF +#define BROKEN_GETGRNAM 1 +EOF + + ;; + *sco*) cat >> confdefs.h <<\EOF +#define SCO 1 +EOF + + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *unixware*) cat >> confdefs.h <<\EOF +#define UNIXWARE 1 +EOF + + BLDSHARED="true" + LDSHFLAGS="-shared" + SONAMEFLAG="-Wl,-soname," + PICFLAG="-KPIC" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *next2*) cat >> confdefs.h <<\EOF +#define NEXT2 1 +EOF + + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *dgux*) # Extract the first word of "groff", so it can be a program name with args. +set dummy groff; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:9018: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$ROFF"; then + ac_cv_prog_ROFF="$ROFF" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_ROFF="groff -etpsR -Tascii -man" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +ROFF="$ac_cv_prog_ROFF" +if test -n "$ROFF"; then + echo "$ac_t""$ROFF" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *sysv4*) + case "$host" in + *-univel-*) if test "$GCC" != yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_MEMSET 1 +EOF + + fi + LDSHFLAGS="-G" + DYNEXP="-Bexport" + ;; + *mips-sni-sysv4*) cat >> confdefs.h <<\EOF +#define RELIANTUNIX 1 +EOF +;; + esac + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *sysv5*) + if test "$GCC" != yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_MEMSET 1 +EOF + + fi + LDSHFLAGS="-G" + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; + *vos*) cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 4096 +EOF + + BLDSHARED="false" + LDSHFLAGS="" + ;; + *) + cat >> confdefs.h <<\EOF +#define STAT_ST_BLOCKSIZE 512 +EOF + + ;; +esac + +echo "$ac_t""$BLDSHARED" 1>&6 +echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 +echo "configure:9100: checking linker flags for shared libraries" >&5 +echo "$ac_t""$LDSHFLAGS" 1>&6 +echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 +echo "configure:9103: checking compiler flags for position-independent code" >&5 +echo "$ac_t""$PICFLAGS" 1>&6 + +# try to work out how to produce pic code with this compiler +if test x$PICFLAG = x; then + echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6 +echo "configure:9109: checking whether ${CC-cc} accepts -fpic" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then + ac_cv_prog_cc_fpic=yes +else + ac_cv_prog_cc_fpic=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6 + if test $ac_cv_prog_cc_fpic = yes; then + PICFLAG="-fpic"; + fi +fi +if test x$PICFLAG = x; then + echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6 +echo "configure:9130: checking whether ${CC-cc} accepts -KPIC" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then + ac_cv_prog_cc_KPIC=yes +else + ac_cv_prog_cc_KPIC=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6 + if test $ac_cv_prog_cc_KPIC = yes; then + PICFLAG="-KPIC"; + fi +fi +if test x$PICFLAG = x; then + echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6 +echo "configure:9151: checking whether ${CC-cc} accepts -Kpic" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then + ac_cv_prog_cc_Kpic=yes +else + ac_cv_prog_cc_Kpic=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6 + if test $ac_cv_prog_cc_Kpic = yes; then + PICFLAG="-Kpic"; + fi +fi + +################ + +echo $ac_n "checking for long long""... $ac_c" 1>&6 +echo "configure:9174: checking for long long" >&5 +if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_have_longlong=cross +else + cat > conftest.$ac_ext <<EOF +#line 9183 "configure" +#include "confdefs.h" +#include <stdio.h> +main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } +EOF +if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_have_longlong=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_have_longlong=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_have_longlong" 1>&6 +if test x"$samba_cv_have_longlong" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_LONGLONG 1 +EOF + +fi + +# +# Check if the compiler supports the LL prefix on long long integers. +# AIX needs this. + +echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 +echo "configure:9215: checking for LL suffix on long long integers" >&5 +if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 9221 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +long long i = 0x8000000000LL +; return 0; } +EOF +if { (eval echo configure:9228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_compiler_supports_ll=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_compiler_supports_ll=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6 +if test x"$samba_cv_compiler_supports_ll" = x"yes"; then + cat >> confdefs.h <<\EOF +#define COMPILER_SUPPORTS_LL 1 +EOF + +fi + + +echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 +echo "configure:9250: checking for 64 bit off_t" >&5 +if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_SIZEOF_OFF_T=cross +else + cat > conftest.$ac_ext <<EOF +#line 9259 "configure" +#include "confdefs.h" +#include <stdio.h> +#include <sys/stat.h> +main() { exit((sizeof(off_t) == 8) ? 0 : 1); } +EOF +if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_SIZEOF_OFF_T=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_SIZEOF_OFF_T=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6 +if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then + cat >> confdefs.h <<\EOF +#define SIZEOF_OFF_T 8 +EOF + +fi + +echo $ac_n "checking for off64_t""... $ac_c" 1>&6 +echo "configure:9288: checking for off64_t" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_OFF64_T=cross +else + cat > conftest.$ac_ext <<EOF +#line 9297 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <stdio.h> +#include <sys/stat.h> +main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } +EOF +if { (eval echo configure:9307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_OFF64_T=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_OFF64_T=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6 +if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_OFF64_T 1 +EOF + +fi + +echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 +echo "configure:9330: checking for 64 bit ino_t" >&5 +if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_SIZEOF_INO_T=cross +else + cat > conftest.$ac_ext <<EOF +#line 9339 "configure" +#include "confdefs.h" +#include <stdio.h> +#include <sys/stat.h> +main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } +EOF +if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_SIZEOF_INO_T=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_SIZEOF_INO_T=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6 +if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then + cat >> confdefs.h <<\EOF +#define SIZEOF_INO_T 8 +EOF + +fi + +echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 +echo "configure:9368: checking for ino64_t" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_INO64_T=cross +else + cat > conftest.$ac_ext <<EOF +#line 9377 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <stdio.h> +#include <sys/stat.h> +main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } +EOF +if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_INO64_T=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_INO64_T=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6 +if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_INO64_T 1 +EOF + +fi + +echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 +echo "configure:9410: checking for dev64_t" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_DEV64_T=cross +else + cat > conftest.$ac_ext <<EOF +#line 9419 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <stdio.h> +#include <sys/stat.h> +main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } +EOF +if { (eval echo configure:9429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_DEV64_T=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_DEV64_T=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_DEV64_T" 1>&6 +if test x"$samba_cv_HAVE_DEV64_T" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_DEV64_T 1 +EOF + +fi + +echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 +echo "configure:9452: checking for struct dirent64" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9458 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/types.h> +#include <dirent.h> +int main() { +struct dirent64 de; +; return 0; } +EOF +if { (eval echo configure:9470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_STRUCT_DIRENT64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_STRUCT_DIRENT64=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6 +if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_DIRENT64 1 +EOF + +fi + +echo $ac_n "checking for major macro""... $ac_c" 1>&6 +echo "configure:9491: checking for major macro" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_DEVICE_MAJOR_FN=cross +else + cat > conftest.$ac_ext <<EOF +#line 9500 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/types.h> +main() { dev_t dev; int i = major(dev); return 0; } +EOF +if { (eval echo configure:9509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_DEVICE_MAJOR_FN=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_DEVICE_MAJOR_FN=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_DEVICE_MAJOR_FN" 1>&6 +if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_DEVICE_MAJOR_FN 1 +EOF + +fi + +echo $ac_n "checking for minor macro""... $ac_c" 1>&6 +echo "configure:9532: checking for minor macro" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_DEVICE_MINOR_FN=cross +else + cat > conftest.$ac_ext <<EOF +#line 9541 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/types.h> +main() { dev_t dev; int i = minor(dev); return 0; } +EOF +if { (eval echo configure:9550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_DEVICE_MINOR_FN=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_DEVICE_MINOR_FN=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_DEVICE_MINOR_FN" 1>&6 +if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_DEVICE_MINOR_FN 1 +EOF + +fi + +echo $ac_n "checking for makedev macro""... $ac_c" 1>&6 +echo "configure:9573: checking for makedev macro" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_MAKEDEV_FN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_MAKEDEV_FN=cross +else + cat > conftest.$ac_ext <<EOF +#line 9582 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/types.h> +main() { dev_t dev = makedev(1,2); return 0; } +EOF +if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_MAKEDEV_FN=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_MAKEDEV_FN=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_MAKEDEV_FN" 1>&6 +if test x"$samba_cv_HAVE_MAKEDEV_FN" = x"yes"; then + cat >> confdefs.h <<\EOF +#define MAKEDEV_FN 1 +EOF + +fi + +echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 +echo "configure:9614: checking for unsigned char" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_UNSIGNED_CHAR=cross +else + cat > conftest.$ac_ext <<EOF +#line 9623 "configure" +#include "confdefs.h" +#include <stdio.h> +main() { char c; c=250; exit((c > 0)?0:1); } +EOF +if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_UNSIGNED_CHAR=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_UNSIGNED_CHAR=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6 +if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UNSIGNED_CHAR 1 +EOF + +fi + +echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 +echo "configure:9651: checking for sin_len in sock" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9657 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +int main() { +struct sockaddr_in sock; sock.sin_len = sizeof(sock); +; return 0; } +EOF +if { (eval echo configure:9666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_SOCK_SIN_LEN=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SOCK_SIN_LEN=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6 +if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCK_SIN_LEN 1 +EOF + +fi + +echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 +echo "configure:9687: checking whether seekdir returns void" >&5 +if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9693 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <dirent.h> +void seekdir(DIR *d, long loc) { return; } +int main() { +return 0; +; return 0; } +EOF +if { (eval echo configure:9702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_SEEKDIR_RETURNS_VOID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_SEEKDIR_RETURNS_VOID=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6 +if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then + cat >> confdefs.h <<\EOF +#define SEEKDIR_RETURNS_VOID 1 +EOF + +fi + +echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 +echo "configure:9723: checking for __FILE__ macro" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9729 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +printf("%s\n", __FILE__); +; return 0; } +EOF +if { (eval echo configure:9736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_FILE_MACRO=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_FILE_MACRO=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6 +if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FILE_MACRO 1 +EOF + +fi + +echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 +echo "configure:9757: checking for __FUNCTION__ macro" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9763 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +printf("%s\n", __FUNCTION__); +; return 0; } +EOF +if { (eval echo configure:9770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_FUNCTION_MACRO=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_FUNCTION_MACRO=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6 +if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FUNCTION_MACRO 1 +EOF + +fi + +echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 +echo "configure:9791: checking if gettimeofday takes tz argument" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_GETTIMEOFDAY_TZ=cross +else + cat > conftest.$ac_ext <<EOF +#line 9800 "configure" +#include "confdefs.h" + +#include <sys/time.h> +#include <unistd.h> +main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} +EOF +if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_GETTIMEOFDAY_TZ=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_GETTIMEOFDAY_TZ=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6 +if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTIMEOFDAY_TZ 1 +EOF + +fi + +echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 +echo "configure:9830: checking for __va_copy" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9836 "configure" +#include "confdefs.h" +#include <stdarg.h> +va_list ap1,ap2; +int main() { +__va_copy(ap1,ap2); +; return 0; } +EOF +if { (eval echo configure:9844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_VA_COPY=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_VA_COPY=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_VA_COPY" 1>&6 +if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_VA_COPY 1 +EOF + +fi + +echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 +echo "configure:9865: checking for C99 vsnprintf" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_C99_VSNPRINTF=cross +else + cat > conftest.$ac_ext <<EOF +#line 9874 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <stdarg.h> +void foo(const char *format, ...) { + va_list ap; + int len; + char buf[5]; + + va_start(ap, format); + len = vsnprintf(buf, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); + + va_start(ap, format); + len = vsnprintf(0, 0, format, ap); + va_end(ap); + if (len != 5) exit(1); + + if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); + + exit(0); +} +main() { foo("hello"); } + +EOF +if { (eval echo configure:9901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_C99_VSNPRINTF=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_C99_VSNPRINTF=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6 +if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_C99_VSNPRINTF 1 +EOF + +fi + +echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 +echo "configure:9924: checking for broken readdir" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_BROKEN_READDIR=cross +else + cat > conftest.$ac_ext <<EOF +#line 9933 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <dirent.h> +main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); +if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && +di->d_name[0] == 0) exit(0); exit(1);} +EOF +if { (eval echo configure:9941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_BROKEN_READDIR=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_BROKEN_READDIR=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6 +if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_READDIR 1 +EOF + +fi + +echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 +echo "configure:9964: checking for utimbuf" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 9970 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utime.h> +int main() { +struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); +; return 0; } +EOF +if { (eval echo configure:9978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UTIMBUF=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UTIMBUF=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6 +if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UTIMBUF 1 +EOF + +fi + + +for ac_func in pututline pututxline updwtmp updwtmpx getutmpx +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:10002: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 10007 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:10030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 +echo "configure:10056: checking for ut_name in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10062 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_name[0] = 'a'; +; return 0; } +EOF +if { (eval echo configure:10070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_NAME=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_NAME=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_NAME 1 +EOF + +fi + +echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 +echo "configure:10091: checking for ut_user in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10097 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_user[0] = 'a'; +; return 0; } +EOF +if { (eval echo configure:10105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_USER=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_USER=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_USER 1 +EOF + +fi + +echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 +echo "configure:10126: checking for ut_id in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10132 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_id[0] = 'a'; +; return 0; } +EOF +if { (eval echo configure:10140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_ID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_ID=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_ID 1 +EOF + +fi + +echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 +echo "configure:10161: checking for ut_host in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10167 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_host[0] = 'a'; +; return 0; } +EOF +if { (eval echo configure:10175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_HOST=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_HOST=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_HOST 1 +EOF + +fi + +echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 +echo "configure:10196: checking for ut_time in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10202 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; time_t t; ut.ut_time = t; +; return 0; } +EOF +if { (eval echo configure:10210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_TIME=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_TIME=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_TIME 1 +EOF + +fi + +echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 +echo "configure:10231: checking for ut_tv in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10237 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; struct timeval tv; ut.ut_tv = tv; +; return 0; } +EOF +if { (eval echo configure:10245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_TV=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_TV=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_TV 1 +EOF + +fi + +echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 +echo "configure:10266: checking for ut_type in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10272 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_type = 0; +; return 0; } +EOF +if { (eval echo configure:10280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_TYPE=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_TYPE=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_TYPE 1 +EOF + +fi + +echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 +echo "configure:10301: checking for ut_pid in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10307 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_pid = 0; +; return 0; } +EOF +if { (eval echo configure:10315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_PID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_PID=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_PID 1 +EOF + +fi + +echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 +echo "configure:10336: checking for ut_exit in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10342 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_exit.e_exit = 0; +; return 0; } +EOF +if { (eval echo configure:10350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_EXIT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_EXIT=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_EXIT 1 +EOF + +fi + +echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 +echo "configure:10371: checking for ut_addr in utmp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10377 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp ut; ut.ut_addr = 0; +; return 0; } +EOF +if { (eval echo configure:10385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UT_UT_ADDR=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UT_UT_ADDR=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6 +if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UT_UT_ADDR 1 +EOF + +fi + +if test x$ac_cv_func_pututline = xyes ; then + echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 +echo "configure:10407: checking whether pututline returns pointer" >&5 +if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 10413 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmp.h> +int main() { +struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); +; return 0; } +EOF +if { (eval echo configure:10421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_PUTUTLINE_RETURNS_UTMP=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_PUTUTLINE_RETURNS_UTMP=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6 + if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then + cat >> confdefs.h <<\EOF +#define PUTUTLINE_RETURNS_UTMP 1 +EOF + + fi +fi + +echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 +echo "configure:10443: checking for ut_syslen in utmpx" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10449 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <utmpx.h> +int main() { +struct utmpx ux; ux.ut_syslen = 0; +; return 0; } +EOF +if { (eval echo configure:10457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UX_UT_SYSLEN=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UX_UT_SYSLEN=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6 +if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UX_UT_SYSLEN 1 +EOF + +fi + +echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 +echo "configure:10478: checking for Linux kernel oplocks" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross +else + cat > conftest.$ac_ext <<EOF +#line 10487 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <fcntl.h> +#ifndef F_GETLEASE +#define F_GETLEASE 1025 +#endif +main() { + int fd = open("/dev/null", O_RDONLY); + return fcntl(fd, F_GETLEASE, 0) == -1; +} + +EOF +if { (eval echo configure:10501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6 +if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_KERNEL_OPLOCKS_LINUX 1 +EOF + +fi + +echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 +echo "configure:10524: checking for kernel change notify support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross +else + cat > conftest.$ac_ext <<EOF +#line 10533 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <fcntl.h> +#include <signal.h> +#ifndef F_NOTIFY +#define F_NOTIFY 1026 +#endif +main() { + exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0); +} + +EOF +if { (eval echo configure:10547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6 +if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes" && test x"$target_cpu" != x"s390"; then + cat >> confdefs.h <<\EOF +#define HAVE_KERNEL_CHANGE_NOTIFY 1 +EOF + +fi + +echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 +echo "configure:10570: checking for kernel share modes" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_KERNEL_SHARE_MODES=cross +else + cat > conftest.$ac_ext <<EOF +#line 10579 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <fcntl.h> +#include <signal.h> +#include <sys/file.h> +#ifndef LOCK_MAND +#define LOCK_MAND 32 +#define LOCK_READ 64 +#endif +main() { + exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); +} + +EOF +if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_KERNEL_SHARE_MODES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_KERNEL_SHARE_MODES=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6 +if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_KERNEL_SHARE_MODES 1 +EOF + +fi + + + + +echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 +echo "configure:10621: checking for IRIX kernel oplock type definitions" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10627 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <fcntl.h> +int main() { +oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; +; return 0; } +EOF +if { (eval echo configure:10635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6 +if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_KERNEL_OPLOCKS_IRIX 1 +EOF + +fi + +echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 +echo "configure:10656: checking for irix specific capabilities" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross +else + cat > conftest.$ac_ext <<EOF +#line 10665 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/capability.h> +main() { + cap_t cap; + if ((cap = cap_get_proc()) == NULL) + exit(1); + cap->cap_effective |= CAP_NETWORK_MGT; + cap->cap_inheritable |= CAP_NETWORK_MGT; + cap_set_proc(cap); + exit(0); +} + +EOF +if { (eval echo configure:10680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6 +if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_IRIX_SPECIFIC_CAPABILITIES 1 +EOF + +fi + +# +# Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h +# This is *really* broken but some systems (DEC OSF1) do this.... JRA. +# + +echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +echo "configure:10708: checking for int16 typedef included by rpc/rpc.h" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10714 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if defined(HAVE_RPC_RPC_H) +#include <rpc/rpc.h> +#endif +int main() { +int16 testvar; +; return 0; } +EOF +if { (eval echo configure:10724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6 +if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_INT16_FROM_RPC_RPC_H 1 +EOF + +fi + +echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +echo "configure:10745: checking for uint16 typedef included by rpc/rpc.h" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10751 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if defined(HAVE_RPC_RPC_H) +#include <rpc/rpc.h> +#endif +int main() { +uint16 testvar; +; return 0; } +EOF +if { (eval echo configure:10761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6 +if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UINT16_FROM_RPC_RPC_H 1 +EOF + +fi + +echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +echo "configure:10782: checking for int32 typedef included by rpc/rpc.h" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10788 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if defined(HAVE_RPC_RPC_H) +#include <rpc/rpc.h> +#endif +int main() { +int32 testvar; +; return 0; } +EOF +if { (eval echo configure:10798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6 +if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_INT32_FROM_RPC_RPC_H 1 +EOF + +fi + +echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 +echo "configure:10819: checking for uint32 typedef included by rpc/rpc.h" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10825 "configure" +#include "confdefs.h" +#include <sys/types.h> +#if defined(HAVE_RPC_RPC_H) +#include <rpc/rpc.h> +#endif +int main() { +uint32 testvar; +; return 0; } +EOF +if { (eval echo configure:10835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6 +if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_UINT32_FROM_RPC_RPC_H 1 +EOF + +fi + + +echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 +echo "configure:10857: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 10863 "configure" +#include "confdefs.h" +#include <sys/types.h> +#ifdef HAVE_SYS_SECURITY_H +#include <sys/security.h> +#include <prot.h> +#endif /* HAVE_SYS_SECURITY_H */ +#if defined(HAVE_RPC_RPC_H) +#include <rpc/rpc.h> +#endif +int main() { +int testvar; +; return 0; } +EOF +if { (eval echo configure:10877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6 +if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_RPC_AUTH_ERROR_CONFLICT 1 +EOF + +fi + +echo $ac_n "checking for test routines""... $ac_c" 1>&6 +echo "configure:10898: checking for test routines" >&5 +if test "$cross_compiling" = yes; then + echo "configure: warning: cannot run when cross-compiling" 1>&2 +else + cat > conftest.$ac_ext <<EOF +#line 10903 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/trivial.c" +EOF +if { (eval echo configure:10907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; } +fi +rm -fr conftest* +fi + + +echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 +echo "configure:10921: checking for ftruncate extend" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_FTRUNCATE_EXTEND=cross +else + cat > conftest.$ac_ext <<EOF +#line 10930 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/ftruncate.c" +EOF +if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_FTRUNCATE_EXTEND=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_FTRUNCATE_EXTEND=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6 +if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FTRUNCATE_EXTEND 1 +EOF + +fi + +echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 +echo "configure:10957: checking for broken getgroups" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_BROKEN_GETGROUPS=cross +else + cat > conftest.$ac_ext <<EOF +#line 10966 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/getgroups.c" +EOF +if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_BROKEN_GETGROUPS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_BROKEN_GETGROUPS=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6 +if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_GETGROUPS 1 +EOF + +fi + +echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 +echo "configure:10993: checking whether getpass should be replaced" >&5 +if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" +cat > conftest.$ac_ext <<EOF +#line 11001 "configure" +#include "confdefs.h" + +#define REPLACE_GETPASS 1 +#define NO_CONFIG_H 1 +#define main dont_declare_main +#include "${srcdir-.}/lib/getsmbpass.c" +#undef main + +int main() { + +; return 0; } +EOF +if { (eval echo configure:11014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_REPLACE_GETPASS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_REPLACE_GETPASS=no +fi +rm -f conftest* +CPPFLAGS="$SAVE_CPPFLAGS" + +fi + +echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6 +if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then + cat >> confdefs.h <<\EOF +#define REPLACE_GETPASS 1 +EOF + +fi + +echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 +echo "configure:11037: checking for broken inet_ntoa" >&5 +if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_REPLACE_INET_NTOA=cross +else + cat > conftest.$ac_ext <<EOF +#line 11046 "configure" +#include "confdefs.h" + +#include <stdio.h> +#include <sys/types.h> +#include <netinet/in.h> +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif +main() { struct in_addr ip; ip.s_addr = 0x12345678; +if (strcmp(inet_ntoa(ip),"18.52.86.120") && + strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } +exit(1);} +EOF +if { (eval echo configure:11060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_REPLACE_INET_NTOA=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_REPLACE_INET_NTOA=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6 +if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then + cat >> confdefs.h <<\EOF +#define REPLACE_INET_NTOA 1 +EOF + +fi + +echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 +echo "configure:11083: checking for secure mkstemp" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_SECURE_MKSTEMP=cross +else + cat > conftest.$ac_ext <<EOF +#line 11092 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +main() { + struct stat st; + char tpl[20]="/tmp/test.XXXXXX"; + int fd = mkstemp(tpl); + if (fd == -1) exit(1); + unlink(tpl); + if (fstat(fd, &st) != 0) exit(1); + if ((st.st_mode & 0777) != 0600) exit(1); + exit(0); +} +EOF +if { (eval echo configure:11109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_SECURE_MKSTEMP=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_SECURE_MKSTEMP=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6 +if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SECURE_MKSTEMP 1 +EOF + +fi + +echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 +echo "configure:11132: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_SYSCONF_SC_NGROUPS_MAX=cross +else + cat > conftest.$ac_ext <<EOF +#line 11141 "configure" +#include "confdefs.h" +#include <unistd.h> +main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } +EOF +if { (eval echo configure:11146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_SYSCONF_SC_NGROUPS_MAX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_SYSCONF_SC_NGROUPS_MAX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6 +if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then + cat >> confdefs.h <<\EOF +#define SYSCONF_SC_NGROUPS_MAX 1 +EOF + +fi + +echo $ac_n "checking for root""... $ac_c" 1>&6 +echo "configure:11169: checking for root" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_ROOT=cross +else + cat > conftest.$ac_ext <<EOF +#line 11178 "configure" +#include "confdefs.h" +main() { exit(getuid() != 0); } +EOF +if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_ROOT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_ROOT=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6 +if test x"$samba_cv_HAVE_ROOT" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ROOT 1 +EOF + +else + echo "configure: warning: running as non-root will disable some tests" 1>&2 +fi + +################## +# look for a method of finding the list of network interfaces +iface=no; +echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 +echo "configure:11210: checking for iface AIX" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_IFACE_AIX=cross +else + cat > conftest.$ac_ext <<EOF +#line 11219 "configure" +#include "confdefs.h" + +#define HAVE_IFACE_AIX 1 +#define AUTOCONF_TEST 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/interfaces.c" +EOF +if { (eval echo configure:11227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_IFACE_AIX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_IFACE_AIX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6 +if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then + iface=yes;cat >> confdefs.h <<\EOF +#define HAVE_IFACE_AIX 1 +EOF + +fi + +if test $iface = no; then +echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 +echo "configure:11251: checking for iface ifconf" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_IFACE_IFCONF=cross +else + cat > conftest.$ac_ext <<EOF +#line 11260 "configure" +#include "confdefs.h" + +#define HAVE_IFACE_IFCONF 1 +#define AUTOCONF_TEST 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/interfaces.c" +EOF +if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_IFACE_IFCONF=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_IFACE_IFCONF=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6 +if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then + iface=yes;cat >> confdefs.h <<\EOF +#define HAVE_IFACE_IFCONF 1 +EOF + +fi +fi + +if test $iface = no; then +echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 +echo "configure:11293: checking for iface ifreq" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_IFACE_IFREQ=cross +else + cat > conftest.$ac_ext <<EOF +#line 11302 "configure" +#include "confdefs.h" + +#define HAVE_IFACE_IFREQ 1 +#define AUTOCONF_TEST 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/interfaces.c" +EOF +if { (eval echo configure:11310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_IFACE_IFREQ=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_IFACE_IFREQ=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6 +if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then + iface=yes;cat >> confdefs.h <<\EOF +#define HAVE_IFACE_IFREQ 1 +EOF + +fi +fi + + +################################################ +# look for a method of setting the effective uid +seteuid=no; +if test $seteuid = no; then +echo $ac_n "checking for setresuid""... $ac_c" 1>&6 +echo "configure:11339: checking for setresuid" >&5 +if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETRESUID=cross +else + cat > conftest.$ac_ext <<EOF +#line 11348 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:11356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETRESUID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETRESUID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6 +if test x"$samba_cv_USE_SETRESUID" = x"yes"; then + seteuid=yes;cat >> confdefs.h <<\EOF +#define USE_SETRESUID 1 +EOF + +fi +fi + + +if test $seteuid = no; then +echo $ac_n "checking for setreuid""... $ac_c" 1>&6 +echo "configure:11382: checking for setreuid" >&5 +if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETREUID=cross +else + cat > conftest.$ac_ext <<EOF +#line 11391 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:11399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETREUID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETREUID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6 +if test x"$samba_cv_USE_SETREUID" = x"yes"; then + seteuid=yes;cat >> confdefs.h <<\EOF +#define USE_SETREUID 1 +EOF + +fi +fi + +if test $seteuid = no; then +echo $ac_n "checking for seteuid""... $ac_c" 1>&6 +echo "configure:11424: checking for seteuid" >&5 +if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETEUID=cross +else + cat > conftest.$ac_ext <<EOF +#line 11433 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:11441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETEUID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETEUID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6 +if test x"$samba_cv_USE_SETEUID" = x"yes"; then + seteuid=yes;cat >> confdefs.h <<\EOF +#define USE_SETEUID 1 +EOF + +fi +fi + +if test $seteuid = no; then +echo $ac_n "checking for setuidx""... $ac_c" 1>&6 +echo "configure:11466: checking for setuidx" >&5 +if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETUIDX=cross +else + cat > conftest.$ac_ext <<EOF +#line 11475 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:11483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETUIDX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETUIDX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6 +if test x"$samba_cv_USE_SETUIDX" = x"yes"; then + seteuid=yes;cat >> confdefs.h <<\EOF +#define USE_SETUIDX 1 +EOF + +fi +fi + + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:11508: checking for working mmap" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_MMAP=cross +else + cat > conftest.$ac_ext <<EOF +#line 11517 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/shared_mmap.c" +EOF +if { (eval echo configure:11521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_MMAP=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_MMAP=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6 +if test x"$samba_cv_HAVE_MMAP" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + +echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 +echo "configure:11544: checking for ftruncate needs root" >&5 +if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_FTRUNCATE_NEEDS_ROOT=cross +else + cat > conftest.$ac_ext <<EOF +#line 11553 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/ftruncroot.c" +EOF +if { (eval echo configure:11557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_FTRUNCATE_NEEDS_ROOT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_FTRUNCATE_NEEDS_ROOT=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6 +if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then + cat >> confdefs.h <<\EOF +#define FTRUNCATE_NEEDS_ROOT 1 +EOF + +fi + +echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 +echo "configure:11580: checking for fcntl locking" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_FCNTL_LOCK=cross +else + cat > conftest.$ac_ext <<EOF +#line 11589 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/fcntl_lock.c" +EOF +if { (eval echo configure:11593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_FCNTL_LOCK=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_FCNTL_LOCK=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6 +if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_FCNTL_LOCK 1 +EOF + +fi + +echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 +echo "configure:11616: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross +else + cat > conftest.$ac_ext <<EOF +#line 11625 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/fcntl_lock64.c" +EOF +if { (eval echo configure:11629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6 +if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_FCNTL64_LOCKS 1 +EOF + + +else + + + echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 +echo "configure:11654: checking for 64 bit fcntl locking" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + samba_cv_HAVE_STRUCT_FLOCK64=cross +else + cat > conftest.$ac_ext <<EOF +#line 11663 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <stdio.h> +#include <stdlib.h> + +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif + +#ifdef HAVE_SYS_FCNTL_H +#include <sys/fcntl.h> +#endif +main() { struct flock64 fl64; +#if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64) +exit(0); +#else +exit(1); +#endif +} +EOF +if { (eval echo configure:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_STRUCT_FLOCK64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_STRUCT_FLOCK64=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6 + + if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_FLOCK64 1 +EOF + + fi +fi + +echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:11712: checking for st_blocks in struct stat" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 11718 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +int main() { +struct stat st; st.st_blocks = 0; +; return 0; } +EOF +if { (eval echo configure:11727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_STAT_ST_BLOCKS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_STAT_ST_BLOCKS=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLOCKS" 1>&6 +if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STAT_ST_BLOCKS 1 +EOF + +fi + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:11748: checking for st_blksize in struct stat" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLKSIZE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 11754 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +int main() { +struct stat st; st.st_blksize = 0; +; return 0; } +EOF +if { (eval echo configure:11763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_STAT_ST_BLKSIZE=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_STAT_ST_BLKSIZE=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_STAT_ST_BLKSIZE" 1>&6 +if test x"$samba_cv_HAVE_STAT_ST_BLKSIZE" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STAT_ST_BLKSIZE 1 +EOF + +fi + +case "$host_os" in +*linux*) +echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 +echo "configure:11786: checking for broken RedHat 7.2 system header files" >&5 +if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 11792 "configure" +#include "confdefs.h" + +#ifdef HAVE_SYS_VFS_H +#include <sys/vfs.h> +#endif +#ifdef HAVE_SYS_CAPABILITY_H +#include <sys/capability.h> +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:11806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6 +if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then + cat >> confdefs.h <<\EOF +#define BROKEN_REDHAT_7_SYSTEM_HEADERS 1 +EOF + +fi +;; +esac + +echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 +echo "configure:11829: checking for broken nisplus include files" >&5 +if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 11835 "configure" +#include "confdefs.h" +#include <sys/acl.h> +#if defined(HAVE_RPCSVC_NIS_H) +#include <rpcsvc/nis.h> +#endif +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:11845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6 +if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then + cat >> confdefs.h <<\EOF +#define BROKEN_NISPLUS_INCLUDE_FILES 1 +EOF + +fi + + +################################################# +# check for smbwrapper support +echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 +echo "configure:11869: checking whether to use smbwrapper" >&5 +# Check whether --with-smbwrapper or --without-smbwrapper was given. +if test "${with_smbwrapper+set}" = set; then + withval="$with_smbwrapper" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_SMBWRAPPER 1 +EOF + + WRAPPROG="bin/smbsh\$(EXEEXT)" + WRAP="bin/smbwrapper.$SHLIBEXT" + + if test x$ATTEMPT_WRAP32_BUILD = x; then + WRAP32="" + else + WRAP32=bin/smbwrapper.32.$SHLIBEXT + fi + +# Conditions under which smbwrapper should not be built. + + if test x$PICFLAG = x; then + echo No support for PIC code - disabling smbwrapper and smbsh + WRAPPROG="" + WRAP="" + WRAP32="" + elif test x$ac_cv_func_syscall = xno; then + echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6 + WRAPPROG="" + WRAP="" + WRAP32="" + fi + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for the AFS filesystem +echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 +echo "configure:11916: checking whether to use AFS" >&5 +# Check whether --with-afs or --without-afs was given. +if test "${with_afs+set}" = set; then + withval="$with_afs" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_AFS 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + + +################################################# +# check for the DFS auth system +echo $ac_n "checking whether to use DCE/DFS auth""... $ac_c" 1>&6 +echo "configure:11942: checking whether to use DCE/DFS auth" >&5 +# Check whether --with-dfs or --without-dfs was given. +if test "${with_dfs+set}" = set; then + withval="$with_dfs" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_DFS 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for Kerberos IV auth system +echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 +echo "configure:11967: checking whether to use Kerberos IV" >&5 +# Check whether --with-krb4 or --without-krb4 was given. +if test "${with_krb4+set}" = set; then + withval="$with_krb4" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define KRB4_AUTH 1 +EOF + + echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 +echo "configure:11979: checking for dn_expand in -lresolv" >&5 +ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <<EOF +#line 11987 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dn_expand(); + +int main() { +dn_expand() +; return 0; } +EOF +if { (eval echo configure:11998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lresolv $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + LIBS="$LIBS -lkrb -ldes" + CFLAGS="$CFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for Kerberos 5 auth system +echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6 +echo "configure:12042: checking whether to use Kerberos 5" >&5 +# Check whether --with-krb5 or --without-krb5 was given. +if test "${with_krb5+set}" = set; then + withval="$with_krb5" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define KRB5_AUTH 1 +EOF + + LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err" + CFLAGS="$CFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for automount support +echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 +echo "configure:12070: checking whether to use AUTOMOUNT" >&5 +# Check whether --with-automount or --without-automount was given. +if test "${with_automount+set}" = set; then + withval="$with_automount" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_AUTOMOUNT 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for smbmount support +echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 +echo "configure:12095: checking whether to use SMBMOUNT" >&5 +# Check whether --with-smbmount or --without-smbmount was given. +if test "${with_smbmount+set}" = set; then + withval="$with_smbmount" + case "$withval" in + yes) + case "$host_os" in + *linux*) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_SMBMOUNT 1 +EOF + + MPROGS="bin/smbmount bin/smbmnt bin/smbumount" + ;; + *) + { echo "configure: error: not on a linux system!" 1>&2; exit 1; } + ;; + esac + ;; + *) + echo "$ac_t""no" 1>&6 + MPROGS= + ;; + esac +else + echo "$ac_t""no" 1>&6 + MPROGS= + +fi + + + +################################################# +# check for a PAM password database +with_pam_for_crypt=no +echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6 +echo "configure:12132: checking whether to use PAM password database" >&5 +# Check whether --with-pam or --without-pam was given. +if test "${with_pam+set}" = set; then + withval="$with_pam" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_PAM 1 +EOF + + LIBS="$LIBS -lpam" + with_pam_for_crypt=yes + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +# we can't build a pam module if we don't have pam. +echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 +echo "configure:12158: checking for pam_get_data in -lpam" >&5 +ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpam $LIBS" +cat > conftest.$ac_ext <<EOF +#line 12166 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pam_get_data(); + +int main() { +pam_get_data() +; return 0; } +EOF +if { (eval echo configure:12177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_LIBPAM 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + +################################################# +# check for pam_smbpass support +echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 +echo "configure:12204: checking whether to use pam_smbpass" >&5 +# Check whether --with-pam_smbpass or --without-pam_smbpass was given. +if test "${with_pam_smbpass+set}" = set; then + withval="$with_pam_smbpass" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + +# Conditions under which pam_smbpass should not be built. + + if test x$PICFLAG = x; then + echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6 + PAM_MOD="" + elif test x$ac_cv_lib_pam_pam_get_data = xno; then + echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6 + PAM_MOD="" + else + cat >> confdefs.h <<\EOF +#define WITH_PAM_SMBPASS 1 +EOF + + PAM_MOD="bin/pam_smbpass.so" + fi + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + + +############################################### +# test for where we get crypt() from, but only +# if not using PAM +if test $with_pam_for_crypt = no; then +for ac_func in crypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:12246: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 12251 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:12274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + +if test x"$ac_cv_func_crypt" = x"no"; then + echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:12300: checking for crypt in -lcrypt" >&5 +ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcrypt $LIBS" +cat > conftest.$ac_ext <<EOF +#line 12308 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char crypt(); + +int main() { +crypt() +; return 0; } +EOF +if { (eval echo configure:12319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lcrypt"; + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi +fi + +## +## moved after the check for -lcrypt in order to +## ensure that the necessary libraries are included +## check checking for truncated salt. Wrapped by the +## $with_pam_for_crypt variable as above --jerry +## +if test $with_pam_for_crypt = no; then +echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 +echo "configure:12354: checking for a crypt that needs truncated salt" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_HAVE_TRUNCATED_SALT=cross +else + cat > conftest.$ac_ext <<EOF +#line 12363 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/crypttest.c" +EOF +if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_HAVE_TRUNCATED_SALT=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_HAVE_TRUNCATED_SALT=yes +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6 +if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_TRUNCATED_SALT 1 +EOF + +fi +fi + + +######################################################################################## +## +## TESTS FOR SAM BACKENDS. KEEP THESE GROUPED TOGETHER +## +######################################################################################## + +## set the with_smbpasswd_sam as the default +with_smbpasswd_sam=yes + + + +################################################# +# check for a TDB password database +echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 +echo "configure:12405: checking whether to use TDB SAM database" >&5 +# Check whether --with-tdbsam or --without-tdbsam was given. +if test "${with_tdbsam+set}" = set; then + withval="$with_tdbsam" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_TDB_SAM 1 +EOF + + with_smbpasswd_sam=no + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for a LDAP password database +echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6 +echo "configure:12431: checking whether to use LDAP SAM database" >&5 +# Check whether --with-ldapsam or --without-ldapsam was given. +if test "${with_ldapsam+set}" = set; then + withval="$with_ldapsam" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_LDAP_SAM 1 +EOF + + LDAPLIBS="-lldap" + echo $ac_n "checking for ber_bvfree in -llber""... $ac_c" 1>&6 +echo "configure:12444: checking for ber_bvfree in -llber" >&5 +ac_lib_var=`echo lber'_'ber_bvfree | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-llber $LIBS" +cat > conftest.$ac_ext <<EOF +#line 12452 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char ber_bvfree(); + +int main() { +ber_bvfree() +; return 0; } +EOF +if { (eval echo configure:12463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LDAPLIBS="$LDAPLIBS -llber" +else + echo "$ac_t""no" 1>&6 +fi + + ## remove -lresolv as this should be included by the -lsasl dependency + ## in the OpenLDAP clients. By not requiring it specifically, we avoid + ## issues on platforms that don't have it + LDAPLIBS="$LDAPLIBS" + old_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $LDAPLIBS" + for ac_func in ldap_start_tls_s +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:12492: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 12497 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + LDFLAGS="$old_LDFLAGS" + with_smbpasswd_sam=no + +echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 +echo "configure:12548: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +if eval "test \"`echo '$''{'samba_cv_ldap_set_rebind_proc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 12554 "configure" +#include "confdefs.h" + +#include <lber.h> +#include <ldap.h> +int main() { +ldap_set_rebind_proc(0, 0, 0); +; return 0; } +EOF +if { (eval echo configure:12563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_ldap_set_rebind_proc=3 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_ldap_set_rebind_proc=2 +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_ldap_set_rebind_proc" 1>&6 +if test x"$samba_cv_ldap_set_rebind_proc" = x"3"; then + cat >> confdefs.h <<\EOF +#define LDAP_SET_REBIND_PROC_ARGS 3 +EOF + +else + cat >> confdefs.h <<\EOF +#define LDAP_SET_REBIND_PROC_ARGS 2 +EOF + +fi + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + + +################################################# +# check for a NISPLUS password database +echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 +echo "configure:12602: checking whether to use NISPLUS SAM database" >&5 +# Check whether --with-nisplussam or --without-nisplussam was given. +if test "${with_nisplussam+set}" = set; then + withval="$with_nisplussam" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_NISPLUS_SAM 1 +EOF + + with_smbpasswd_sam=no + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################ +# This test should come last because the +# smbpasswd SAM is only used if another format +# has not been defined +echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6 +echo "configure:12630: checking whether to use traditional smbpasswd file" >&5 +if test $with_smbpasswd_sam = yes; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_SMBPASSWD_SAM 1 +EOF + + PDBEDIT="" +else + echo "$ac_t""no" 1>&6 + PDBEDIT="bin/pdbedit\$(EXEEXT)" +fi + +######################################################################################## +## +## END OF TESTS FOR SAM BACKENDS. +## +######################################################################################## + +################################################# +# check for a NISPLUS_HOME support +echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 +echo "configure:12652: checking whether to use NISPLUS_HOME" >&5 +# Check whether --with-nisplus-home or --without-nisplus-home was given. +if test "${with_nisplus_home+set}" = set; then + withval="$with_nisplus_home" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_NISPLUS_HOME 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for the secure socket layer +echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 +echo "configure:12677: checking whether to use SSL" >&5 +# Check whether --with-ssl or --without-ssl was given. +if test "${with_ssl+set}" = set; then + withval="$with_ssl" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_SSL 1 +EOF + + withval="/usr/local/ssl" # default + + if test "${with_sslinc+set}" = set; then + + withval="$with_sslinc" + case "$withval" in + yes|no) + echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w + CFLAGS="-I/usr/local/ssl/include $CFLAGS" + ;; + * ) + CFLAGS="-I${withval} $CFLAGS" + ;; + esac + + else + + CFLAGS="-I/usr/local/ssl/include $CFLAGS" + + fi + + if test "${with_ssllib+set}" = set; then + + withval="$with_ssllib" + case "$withval" in + yes|no) + echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w + LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" + ;; + * ) + LDFLAGS="-L${withval}/lib $LDFLAGS" + ;; + esac + + else + + LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" + + fi + + LIBS="-lssl -lcrypto $LIBS" + +# if test ! -d ${withval}; then +# echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2 +# exit 1 +# fi + + CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for syslog logging +echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 +echo "configure:12751: checking whether to use syslog logging" >&5 +# Check whether --with-syslog or --without-syslog was given. +if test "${with_syslog+set}" = set; then + withval="$with_syslog" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_SYSLOG 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for a shared memory profiling support +echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 +echo "configure:12776: checking whether to use profiling" >&5 +# Check whether --with-profiling-data or --without-profiling-data was given. +if test "${with_profiling_data+set}" = set; then + withval="$with_profiling_data" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_PROFILE 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + + +################################################# +# check for experimental disk-quotas support +QUOTAOBJS=smbd/noquotas.o + +echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 +echo "configure:12804: checking whether to support disk-quotas" >&5 +# Check whether --with-quotas or --without-quotas was given. +if test "${with_quotas+set}" = set; then + withval="$with_quotas" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + QUOTAOBJS=smbd/quotas.o + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + + +################################################# +# check for experimental utmp accounting + +echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 +echo "configure:12828: checking whether to support utmp accounting" >&5 +# Check whether --with-utmp or --without-utmp was given. +if test "${with_utmp+set}" = set; then + withval="$with_utmp" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_UTMP 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for MS Dfs support + +echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6 +echo "configure:12854: checking whether to support Microsoft Dfs" >&5 +# Check whether --with-msdfs or --without-msdfs was given. +if test "${with_msdfs+set}" = set; then + withval="$with_msdfs" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_MSDFS 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# should we build libsmbclient? + +INSTALLCLIENTCMD_SH=: +INSTALLCLIENTCMD_A=: +LIBSMBCLIENT_SHARED= +LIBSMBCLIENT= +echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 +echo "configure:12884: checking whether to build the libsmbclient shared library" >&5 +# Check whether --with-libsmbclient or --without-libsmbclient was given. +if test "${with_libsmbclient+set}" = set; then + withval="$with_libsmbclient" + case "$withval" in + yes) + if test $BLDSHARED = true; then + INSTALLCLIENTCMD_SH="\$(INSTALLCMD)" + LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT + LIBSMBCLIENT=libsmbclient + echo "$ac_t""yes" 1>&6 + else + INSTALLCLIENTCMD_A="\$(INSTALLCMD)" + LIBSMBCLIENT=libsmbclient + echo "$ac_t""no shared library support -- will supply static library" 1>&6 + fi + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# these tests are taken from the GNU fileutils package +echo "checking how to get filesystem space usage" 1>&6 +echo "configure:12914: checking how to get filesystem space usage" >&5 +space=no + +# Test for statvfs64. +if test $space = no; then + # SVR4 + echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 +echo "configure:12921: checking statvfs64 function (SVR4)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statvfs64=cross +else + cat > conftest.$ac_ext <<EOF +#line 12929 "configure" +#include "confdefs.h" + +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <sys/types.h> +#include <sys/statvfs.h> + main () + { + struct statvfs64 fsd; + exit (statvfs64 (".", &fsd)); + } +EOF +if { (eval echo configure:12943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statvfs64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statvfs64=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6 + if test $fu_cv_sys_stat_statvfs64 = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATVFS64 1 +EOF + + fi +fi + +# Perform only the link test since it seems there are no variants of the +# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) +# because that got a false positive on SCO OSR5. Adding the declaration +# of a `struct statvfs' causes this test to fail (as it should) on such +# systems. That system is reported to work fine with STAT_STATFS4 which +# is what it gets when this test fails. +if test $space = no; then + # SVR4 + echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 +echo "configure:12976: checking statvfs function (SVR4)" >&5 +if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 12981 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/statvfs.h> +int main() { +struct statvfs fsd; statvfs (0, &fsd); +; return 0; } +EOF +if { (eval echo configure:12989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + fu_cv_sys_stat_statvfs=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + fu_cv_sys_stat_statvfs=no +fi +rm -f conftest* +fi + +echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6 + if test $fu_cv_sys_stat_statvfs = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATVFS 1 +EOF + + fi +fi + +if test $space = no; then + # DEC Alpha running OSF/1 + echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 +echo "configure:13014: checking for 3-argument statfs function (DEC OSF/1)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs3_osf1=no +else + cat > conftest.$ac_ext <<EOF +#line 13022 "configure" +#include "confdefs.h" + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/mount.h> + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd, sizeof (struct statfs))); + } +EOF +if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs3_osf1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs3_osf1=no +fi +rm -fr conftest* +fi + +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6 + if test $fu_cv_sys_stat_statfs3_osf1 = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS3_OSF1 1 +EOF + + fi +fi + +if test $space = no; then +# AIX + echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 +echo "configure:13062: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_bsize=no +else + cat > conftest.$ac_ext <<EOF +#line 13070 "configure" +#include "confdefs.h" + +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif +#ifdef HAVE_SYS_VFS_H +#include <sys/vfs.h> +#endif + main () + { + struct statfs fsd; + fsd.f_bsize = 0; + exit (statfs (".", &fsd)); + } +EOF +if { (eval echo configure:13089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs2_bsize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs2_bsize=no +fi +rm -fr conftest* +fi + +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6 + if test $fu_cv_sys_stat_statfs2_bsize = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS2_BSIZE 1 +EOF + + fi +fi + +if test $space = no; then +# SVR3 + echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 +echo "configure:13116: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs4=no +else + cat > conftest.$ac_ext <<EOF +#line 13124 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/statfs.h> + main () + { + struct statfs fsd; + exit (statfs (".", &fsd, sizeof fsd, 0)); + } +EOF +if { (eval echo configure:13134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs4=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs4=no +fi +rm -fr conftest* +fi + +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6 + if test $fu_cv_sys_stat_statfs4 = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS4 1 +EOF + + fi +fi + +if test $space = no; then +# 4.4BSD and NetBSD + echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 +echo "configure:13161: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_statfs2_fsize=no +else + cat > conftest.$ac_ext <<EOF +#line 13169 "configure" +#include "confdefs.h" +#include <sys/types.h> +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd)); + } +EOF +if { (eval echo configure:13185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_statfs2_fsize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_statfs2_fsize=no +fi +rm -fr conftest* +fi + +fi + + echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6 + if test $fu_cv_sys_stat_statfs2_fsize = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS2_FSIZE 1 +EOF + + fi +fi + +if test $space = no; then + # Ultrix + echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 +echo "configure:13212: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 + if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + fu_cv_sys_stat_fs_data=no +else + cat > conftest.$ac_ext <<EOF +#line 13220 "configure" +#include "confdefs.h" +#include <sys/types.h> +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifdef HAVE_SYS_MOUNT_H +#include <sys/mount.h> +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include <sys/fs_types.h> +#endif + main () + { + struct fs_data fsd; + /* Ultrix's statfs returns 1 for success, + 0 for not mounted, -1 for failure. */ + exit (statfs (".", &fsd) != 1); + } +EOF +if { (eval echo configure:13240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + fu_cv_sys_stat_fs_data=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + fu_cv_sys_stat_fs_data=no +fi +rm -fr conftest* +fi + +fi + + echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6 + if test $fu_cv_sys_stat_fs_data = yes; then + space=yes + cat >> confdefs.h <<\EOF +#define STAT_STATFS2_FS_DATA 1 +EOF + + fi +fi + +# +# As a gating factor for large file support, in order to +# use <4GB files we must have the following minimal support +# available. +# long long, and a 64 bit off_t or off64_t. +# If we don't have all of these then disable large +# file support. +# +echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 +echo "configure:13273: checking if large file support can be enabled" >&5 +cat > conftest.$ac_ext <<EOF +#line 13275 "configure" +#include "confdefs.h" + +#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8))) +#include <sys/types.h> +#else +__COMPILE_ERROR_ +#endif + +int main() { +int i +; return 0; } +EOF +if { (eval echo configure:13288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no +fi +rm -f conftest* +if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +# Check whether --with-spinlocks or --without-spinlocks was given. +if test "${with_spinlocks+set}" = set; then + withval="$with_spinlocks" + : +fi + +if test "x$with_spinlocks" = "xyes"; then + cat >> confdefs.h <<\EOF +#define USE_SPINLOCKS 1 +EOF + + + case "$host_cpu" in + sparc) + cat >> confdefs.h <<\EOF +#define SPARC_SPINLOCKS 1 +EOF + + ;; + + i386|i486|i586|i686) + cat >> confdefs.h <<\EOF +#define INTEL_SPINLOCKS 1 +EOF + + ;; + + mips) + cat >> confdefs.h <<\EOF +#define MIPS_SPINLOCKS 1 +EOF + + ;; + + powerpc) + cat >> confdefs.h <<\EOF +#define POWERPC_SPINLOCKS 1 +EOF + + ;; + esac +fi + +################################################# +# check for ACL support + +echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 +echo "configure:13355: checking whether to support ACLs" >&5 +# Check whether --with-acl-support or --without-acl-support was given. +if test "${with_acl_support+set}" = set; then + withval="$with_acl_support" + case "$withval" in + yes) + + case "$host_os" in + *sysv5*) + echo "$ac_t""Using UnixWare ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_UNIXWARE_ACLS 1 +EOF + + ;; + *solaris*) + echo "$ac_t""Using solaris ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_SOLARIS_ACLS 1 +EOF + + ;; + *hpux*) + echo "$ac_t""Using HPUX ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_HPUX_ACLS 1 +EOF + + ;; + *irix*) + echo "$ac_t""Using IRIX ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_IRIX_ACLS 1 +EOF + + ;; + *aix*) + echo "$ac_t""Using AIX ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_AIX_ACLS 1 +EOF + + ;; + *osf*) + echo "$ac_t""Using Tru64 ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_TRU64_ACLS 1 +EOF + + LIBS="$LIBS -lpacl" + ;; + *) + echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 +echo "configure:13408: checking for acl_get_file in -lacl" >&5 +ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lacl $LIBS" +cat > conftest.$ac_ext <<EOF +#line 13416 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char acl_get_file(); + +int main() { +acl_get_file() +; return 0; } +EOF +if { (eval echo configure:13427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-lacl $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for ACL support""... $ac_c" 1>&6 +echo "configure:13455: checking for ACL support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13461 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/acl.h> +int main() { + acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); +; return 0; } +EOF +if { (eval echo configure:13469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_POSIX_ACLS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_POSIX_ACLS=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 + if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then + echo "$ac_t""Using posix ACLs" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_POSIX_ACLS 1 +EOF + + echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 +echo "configure:13489: checking for acl_get_perm_np" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13495 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/acl.h> +int main() { + acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); +; return 0; } +EOF +if { (eval echo configure:13503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_ACL_GET_PERM_NP=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_ACL_GET_PERM_NP=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6 + if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ACL_GET_PERM_NP 1 +EOF + + fi + fi + ;; + esac + ;; + *) + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_NO_ACLS 1 +EOF + + ;; + esac +else + cat >> confdefs.h <<\EOF +#define HAVE_NO_ACLS 1 +EOF + + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# check for the historical SAMBA installation + +if test "x$prefix" = xNONE -a "$sbindir" = "\${exec_prefix}/sbin"; then + # Put all binaries under the /usr/local/samba/bin directory. + sbindir="$bindir" +fi + +################################################# +# check for sendfile support + +echo $ac_n "checking whether to check for support sendfile""... $ac_c" 1>&6 +echo "configure:13556: checking whether to check for support sendfile" >&5 +# Check whether --with-sendfile-support or --without-sendfile-support was given. +if test "${with_sendfile_support+set}" = set; then + withval="$with_sendfile_support" + case "$withval" in + yes) + + echo "$ac_t""yes" 1>&6; + + case "$host_os" in + *linux*) + echo $ac_n "checking for linux sendfile64 support""... $ac_c" 1>&6 +echo "configure:13568: checking for linux sendfile64 support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13574 "configure" +#include "confdefs.h" +#include <sys/sendfile.h> +int main() { +\ +int tofd, fromfd; +off64_t offset; +size_t total; +ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); + +; return 0; } +EOF +if { (eval echo configure:13586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILE64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILE64=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6 + + echo $ac_n "checking for linux sendfile support""... $ac_c" 1>&6 +echo "configure:13601: checking for linux sendfile support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13607 "configure" +#include "confdefs.h" +#include <sys/sendfile.h> +int main() { +\ +int tofd, fromfd; +off_t offset; +size_t total; +ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); + +; return 0; } +EOF +if { (eval echo configure:13619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILE=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILE=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 + +# Try and cope with broken Linux sendfile.... + echo $ac_n "checking for broken linux sendfile support""... $ac_c" 1>&6 +echo "configure:13635: checking for broken linux sendfile support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_LINUX_SENDFILE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13641 "configure" +#include "confdefs.h" +\ +#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) +#undef _FILE_OFFSET_BITS +#endif +#include <sys/sendfile.h> +int main() { +\ +int tofd, fromfd; +off_t offset; +size_t total; +ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); + +; return 0; } +EOF +if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" 1>&6 + + if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILE64 1 +EOF + + cat >> confdefs.h <<\EOF +#define LINUX_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + elif test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILE 1 +EOF + + cat >> confdefs.h <<\EOF +#define LINUX_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + elif test x"$samba_cv_HAVE_BROKEN_LINUX_SENDFILE" = x"yes"; then + cat >> confdefs.h <<\EOF +#define LINUX_BROKEN_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + else + echo "$ac_t""no" 1>&6; + fi + + ;; + *freebsd*) + echo $ac_n "checking for freebsd sendfile support""... $ac_c" 1>&6 +echo "configure:13713: checking for freebsd sendfile support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13719 "configure" +#include "confdefs.h" +\ +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/uio.h> +int main() { +\ +#define NULL (void *)0 + int fromfd, tofd, ret, total; + off_t offset, nwritten; + struct sf_hdtr { + struct iovec *headers; + int hdr_cnt; + struct iovec *trailers; + int trl_cnt; + } hdr; + struct iovec hdtrl; + hdr.headers = &hdtrl; + hdr.hdr_cnt = 1; + hdr.trailers = NULL; + hdr.trl_cnt = 0; + hdtrl.iov_base = NULL; + hdtrl.iov_len = 0; + ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); + +; return 0; } +EOF +if { (eval echo configure:13747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILE=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILE=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 + + if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILE 1 +EOF + + cat >> confdefs.h <<\EOF +#define FREEBSD_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + else + echo "$ac_t""no" 1>&6; + fi + ;; + + *hpux*) + echo $ac_n "checking for hpux sendfile64 support""... $ac_c" 1>&6 +echo "configure:13781: checking for hpux sendfile64 support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13787 "configure" +#include "confdefs.h" +\ +#include <sys/socket.h> +#include <sys/uio.h> +int main() { +\ + int fromfd, tofd; + size_t total=0; + struct iovec hdtrl[2]; + ssize_t nwritten; + off64_t offset; + + hdtrl[0].iov_base = 0; + hdtrl[0].iov_len = 0; + + nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); + +; return 0; } +EOF +if { (eval echo configure:13807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILE64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILE64=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILE64" 1>&6 + if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILE64 1 +EOF + + cat >> confdefs.h <<\EOF +#define HPUX_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + else + echo "$ac_t""no" 1>&6; + fi + + echo $ac_n "checking for hpux sendfile support""... $ac_c" 1>&6 +echo "configure:13838: checking for hpux sendfile support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13844 "configure" +#include "confdefs.h" +\ +#include <sys/socket.h> +#include <sys/uio.h> +int main() { +\ + int fromfd, tofd; + size_t total=0; + struct iovec hdtrl[2]; + ssize_t nwritten; + off_t offset; + + hdtrl[0].iov_base = 0; + hdtrl[0].iov_len = 0; + + nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); + +; return 0; } +EOF +if { (eval echo configure:13864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILE=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILE=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILE" 1>&6 + if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILE 1 +EOF + + cat >> confdefs.h <<\EOF +#define HPUX_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + else + echo "$ac_t""no" 1>&6; + fi + ;; + + *solaris*) + LIBS="$LIBS -lsendfile" + echo $ac_n "checking for solaris sendfilev64 support""... $ac_c" 1>&6 +echo "configure:13898: checking for solaris sendfilev64 support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13904 "configure" +#include "confdefs.h" +\ +#include <sys/sendfile.h> +int main() { +\ + int sfvcnt; + size_t xferred; + struct sendfilevec vec[2]; + ssize_t nwritten; + int tofd; + + sfvcnt = 2; + + vec[0].sfv_fd = SFV_FD_SELF; + vec[0].sfv_flag = 0; + vec[0].sfv_off = 0; + vec[0].sfv_len = 0; + + vec[1].sfv_fd = 0; + vec[1].sfv_flag = 0; + vec[1].sfv_off = 0; + vec[1].sfv_len = 0; + nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); + +; return 0; } +EOF +if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILEV64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILEV64=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILEV64" 1>&6 + + if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILEV64 1 +EOF + + cat >> confdefs.h <<\EOF +#define SOLARIS_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + else + echo "$ac_t""no" 1>&6; + fi + + echo $ac_n "checking for solaris sendfilev support""... $ac_c" 1>&6 +echo "configure:13963: checking for solaris sendfilev support" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_SENDFILEV'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13969 "configure" +#include "confdefs.h" +\ +#include <sys/sendfile.h> +int main() { +\ + int sfvcnt; + size_t xferred; + struct sendfilevec vec[2]; + ssize_t nwritten; + int tofd; + + sfvcnt = 2; + + vec[0].sfv_fd = SFV_FD_SELF; + vec[0].sfv_flag = 0; + vec[0].sfv_off = 0; + vec[0].sfv_len = 0; + + vec[1].sfv_fd = 0; + vec[1].sfv_flag = 0; + vec[1].sfv_off = 0; + vec[1].sfv_len = 0; + nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); + +; return 0; } +EOF +if { (eval echo configure:13996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_SENDFILEV=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_SENDFILEV=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_SENDFILEV" 1>&6 + + if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SENDFILEV 1 +EOF + + cat >> confdefs.h <<\EOF +#define SOLARIS_SENDFILE_API 1 +EOF + + cat >> confdefs.h <<\EOF +#define WITH_SENDFILE 1 +EOF + + else + echo "$ac_t""no" 1>&6; + fi + ;; + + *) + ;; + esac + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +################################################# +# Check whether winbind is supported on this platform. If so we need to +# build and install client programs (WINBIND_TARGETS), sbin programs +# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). + +echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 +echo "configure:14048: checking whether to build winbind" >&5 + +# Initially, the value of $host_os decides whether winbind is supported + +case "$host_os" in + *linux*|*irix*) + HAVE_WINBIND=yes + ;; + *solaris*) + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" + WINBIND_NSS_EXTRA_LIBS="-lsocket" + ;; + *hpux11*) + HAVE_WINBIND=yes + WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o" + ;; + *aix4*) + HAVE_WINBIND=yes + ;; + *) + HAVE_WINBIND=no + winbind_no_reason=", unsupported on $host_os" + ;; +esac + +# Check the setting of --with-winbindd + +# Check whether --with-winbind or --without-winbind was given. +if test "${with_winbind+set}" = set; then + withval="$with_winbind" + + case "$withval" in + yes) + HAVE_WINBIND=yes + ;; + no) + HAVE_WINBIND=no + winbind_reason="" + ;; + esac +fi + + +# We need unix domain sockets for winbind + +if test x"$HAVE_WINBIND" = x"yes"; then + if test x"$samba_cv_unixsocket" = x"no"; then + winbind_no_reason=", no unix domain socket support on $host_os" + HAVE_WINBIND=no + fi +fi + +# Display test results + +if test x"$HAVE_WINBIND" = x"yes"; then + + echo "$ac_t""yes" 1>&6 + + echo $ac_n "checking whether to enable winbind auth challenge/response code""... $ac_c" 1>&6 +echo "configure:14108: checking whether to enable winbind auth challenge/response code" >&5 + # Check whether --with-winbind-auth-challenge or --without-winbind-auth-challenge was given. +if test "${with_winbind_auth_challenge+set}" = set; then + withval="$with_winbind_auth_challenge" + + case "$withval" in + yes) + cat >> confdefs.h <<\EOF +#define WITH_WINBIND_AUTH_CRAP 1 +EOF + + echo "$ac_t""yes" 1>&6 + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +# Check for FreeBSD problem with getgroups + + WINBIND_TARGETS="bin/wbinfo\$(EXEEXT)" + WINBIND_STARGETS="bin/winbindd\$(EXEEXT)" + case "$host_os" in + *irix*) + WINBIND_LTARGETS="nsswitch/libns_winbind.so" + ;; + *) + WINBIND_LTARGETS="nsswitch/libnss_winbind.so" + ;; + esac + + + case "$with_pam" in + yes) + WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so" + ;; + esac + +# Check for Horrible winbindd ldap hack. + + echo $ac_n "checking whether to enable winbind ldap hack""... $ac_c" 1>&6 +echo "configure:14154: checking whether to enable winbind ldap hack" >&5 + # Check whether --with-winbind-ldap-hack or --without-winbind-ldap-hack was given. +if test "${with_winbind_ldap_hack+set}" = set; then + withval="$with_winbind_ldap_hack" + + case "$withval" in + yes) + cat >> confdefs.h <<\EOF +#define WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK 1 +EOF + + LIBS="$LIBS -lldap"; + echo "$ac_t""yes" 1>&6 + ;; + no) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + +else + echo "$ac_t""no$winbind_no_reason" 1>&6 + + WINBIND_TARGETS="" + WINBIND_STARGETS="" + WINBIND_LTARGETS="" + WINBIND_PAM_TARGETS="" +fi + + +# Check for FreeBSD problem with getgroups +# It returns EGID too many times in the list of groups +# and causes a security problem +echo $ac_n "checking whether or not getgroups returns EGID too many times""... $ac_c" 1>&6 +echo "configure:14192: checking whether or not getgroups returns EGID too many times" >&5 +if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + samba_cv_have_getgroups_too_many_egids=cross +else + cat > conftest.$ac_ext <<EOF +#line 14200 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#include <stdio.h> + +int main(int argc, char *argv[]) +{ + gid_t groups[10]; + int n = 10; + + n = getgroups(n, &groups); + /* Could actually pass back the number of EGIDs there ... */ + exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0); +} +EOF +if { (eval echo configure:14216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_have_getgroups_too_many_egids=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_have_getgroups_too_many_egids=yes +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_have_getgroups_too_many_egids" 1>&6 +if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETGROUPS_TOO_MANY_EGIDS 1 +EOF + +fi + +# Substitution time! + + + + + + + + +# Solaris has some extra fields in struct passwd that need to be +# initialised otherwise nscd crashes. Unfortunately autoconf < 2.50 +# doesn't have the AC_CHECK_MEMBER macro which would be handy for checking +# this. + +#AC_CHECK_MEMBER(struct passwd.pw_comment, +# AC_DEFINE(HAVE_PASSWD_PW_COMMENT, 1, [Defined if struct passwd has pw_comment field]), +# [#include <pwd.h>]) + +echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 +echo "configure:14257: checking whether struct passwd has pw_comment" >&5 +if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 14263 "configure" +#include "confdefs.h" +#include <pwd.h> +int main() { +struct passwd p; p.pw_comment; +; return 0; } +EOF +if { (eval echo configure:14270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_passwd_pw_comment=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_passwd_pw_comment=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6 +if test x"$samba_cv_passwd_pw_comment" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_PASSWD_PW_COMMENT 1 +EOF + +fi + +#AC_CHECK_MEMBER(struct passwd.pw_age, +# AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]), +# [#include <pwd.h>]) + +echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 +echo "configure:14295: checking whether struct passwd has pw_age" >&5 +if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 14301 "configure" +#include "confdefs.h" +#include <pwd.h> +int main() { +struct passwd p; p.pw_age; +; return 0; } +EOF +if { (eval echo configure:14308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_passwd_pw_age=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_passwd_pw_age=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6 +if test x"$samba_cv_passwd_pw_age" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_PASSWD_PW_AGE 1 +EOF + +fi + +################################################# +# Check to see if we should use the included popt + +# Check whether --with-included-popt or --without-included-popt was given. +if test "${with_included_popt+set}" = set; then + withval="$with_included_popt" + + case "$withval" in + yes) + INCLUDED_POPT=yes + ;; + no) + INCLUDED_POPT=no + ;; + esac +fi + +if test x"$INCLUDED_POPT" != x"yes"; then + echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 +echo "configure:14347: checking for poptGetContext in -lpopt" >&5 +ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpopt $LIBS" +cat > conftest.$ac_ext <<EOF +#line 14355 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char poptGetContext(); + +int main() { +poptGetContext() +; return 0; } +EOF +if { (eval echo configure:14366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + INCLUDED_POPT=no +else + echo "$ac_t""no" 1>&6 +INCLUDED_POPT=yes +fi + +fi + +echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 +echo "configure:14390: checking whether to use included popt" >&5 +if test x"$INCLUDED_POPT" = x"yes"; then + echo "$ac_t""$srcdir/popt" 1>&6 + BUILD_POPT='$(POPT_OBJS)' + FLAGS1="-I$srcdir/popt" +else + echo "$ac_t""no" 1>&6 + LIBS="$LIBS -lpopt" +fi + + + +################################################# +# final configure stuff +echo $ac_n "checking configure summary""... $ac_c" 1>&6 +echo "configure:14405: checking configure summary" >&5 +if test "$cross_compiling" = yes; then + echo "configure: warning: cannot run when cross-compiling" 1>&2 +else + cat > conftest.$ac_ext <<EOF +#line 14410 "configure" +#include "confdefs.h" +#include "${srcdir-.}/tests/summary.c" +EOF +if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }; exit 1; +fi +rm -fr conftest* +fi + + +builddir=`pwd` + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@codepagedir@%$codepagedir%g +s%@configdir@%$configdir%g +s%@lockdir@%$lockdir%g +s%@piddir@%$piddir%g +s%@logfilebase@%$logfilebase%g +s%@privatedir@%$privatedir%g +s%@swatdir@%$swatdir%g +s%@RUNPROG@%$RUNPROG%g +s%@MPROGS@%$MPROGS%g +s%@LDSHFLAGS@%$LDSHFLAGS%g +s%@SONAMEFLAG@%$SONAMEFLAG%g +s%@SHLD@%$SHLD%g +s%@HOST_OS@%$HOST_OS%g +s%@PAM_MOD@%$PAM_MOD%g +s%@PDBEDIT@%$PDBEDIT%g +s%@WRAP@%$WRAP%g +s%@WRAP32@%$WRAP32%g +s%@WRAPPROG@%$WRAPPROG%g +s%@PICFLAG@%$PICFLAG%g +s%@PICSUFFIX@%$PICSUFFIX%g +s%@SHLIBEXT@%$SHLIBEXT%g +s%@BLDSHARED@%$BLDSHARED%g +s%@INSTALLCLIENTCMD_SH@%$INSTALLCLIENTCMD_SH%g +s%@INSTALLCLIENTCMD_A@%$INSTALLCLIENTCMD_A%g +s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g +s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g +s%@CC@%$CC%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@AWK@%$AWK%g +s%@EXEEXT@%$EXEEXT%g +s%@passwd_program@%$passwd_program%g +s%@BROKEN_CC@%$BROKEN_CC%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@CPP@%$CPP%g +s%@CUPS_CONFIG@%$CUPS_CONFIG%g +s%@LIBOBJS@%$LIBOBJS%g +s%@TERMLIBS@%$TERMLIBS%g +s%@TERMLDFLAGS@%$TERMLDFLAGS%g +s%@ROFF@%$ROFF%g +s%@DYNEXP@%$DYNEXP%g +s%@LDAPLIBS@%$LDAPLIBS%g +s%@QUOTAOBJS@%$QUOTAOBJS%g +s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g +s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g +s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g +s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g +s%@WINBIND_NSS_EXTRA_OBJS@%$WINBIND_NSS_EXTRA_OBJS%g +s%@WINBIND_NSS_EXTRA_LIBS@%$WINBIND_NSS_EXTRA_LIBS%g +s%@BUILD_POPT@%$BUILD_POPT%g +s%@FLAGS1@%$FLAGS1%g +s%@builddir@%$builddir%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile script/findsmb"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <<EOF + CONFIG_HEADERS="include/config.h" +EOF +cat >> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/source/include/config.h.in b/source/include/config.h.in new file mode 100755 index 00000000000..c35d4570689 --- /dev/null +++ b/source/include/config.h.in @@ -0,0 +1,1161 @@ +/* include/config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +#undef _ALL_SOURCE +#endif + +/* Define if type char is unsigned and you are not using gcc. */ +#ifndef __CHAR_UNSIGNED__ +#undef __CHAR_UNSIGNED__ +#endif + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef gid_t + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if your struct stat has st_rdev. */ +#undef HAVE_ST_RDEV + +/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef mode_t + +/* Define if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Define to `long' if <sys/types.h> doesn't define. */ +#undef off_t + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef pid_t + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef uid_t + +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +#undef HAVE_VOLATILE +#undef HAVE_BROKEN_READDIR +#undef HAVE_C99_VSNPRINTF +#undef HAVE_ERRNO_DECL +#undef HAVE_LONGLONG +#undef HAVE_OFF64_T +#undef HAVE_REMSH +#undef HAVE_UNSIGNED_CHAR +#undef HAVE_UTIMBUF +#undef HAVE_SIG_ATOMIC_T_TYPE +#undef HAVE_SOCKLEN_T_TYPE +#undef ssize_t +#undef ino_t +#undef ssize_t +#undef loff_t +#undef offset_t +#undef aclent_t +#undef wchar_t +#undef HAVE_CONNECT +#undef HAVE_SHORT_INO_T +#undef WITH_SMBWRAPPER +#undef WITH_AFS +#undef WITH_DFS +#undef SUNOS5 +#undef SUNOS4 +#undef LINUX +#undef AIX +#undef BSD +#undef IRIX +#undef IRIX6 +#undef HPUX +#undef QNX +#undef SCO +#undef OSF1 +#undef NEXT2 +#undef RELIANTUNIX +#undef HAVE_MMAP +#undef HAVE_FCNTL_LOCK +#undef HAVE_FTRUNCATE_EXTEND +#undef FTRUNCATE_NEEDS_ROOT +#undef HAVE_TRAPDOOR_UID +#undef HAVE_ROOT +#undef HAVE_GETTIMEOFDAY_TZ +#undef HAVE_SOCK_SIN_LEN +#undef STAT_READ_FILSYS +#undef STAT_STATFS2_BSIZE +#undef STAT_STATFS2_FSIZE +#undef STAT_STATFS2_FS_DATA +#undef STAT_STATFS3_OSF1 +#undef STAT_STATFS4 +#undef STAT_STATVFS +#undef STAT_STATVFS64 +#undef HAVE_IFACE_AIX +#undef HAVE_IFACE_IFCONF +#undef HAVE_IFACE_IFREQ +#undef HAVE_CRYPT +#undef HAVE_PUTPRPWNAM +#undef HAVE_SET_AUTH_PARAMETERS +#undef WITH_SYSLOG +#undef WITH_PROFILE +#undef WITH_SSL +#undef WITH_LDAP +#undef WITH_NISPLUS +#undef WITH_TDBPWD +#undef WITH_PAM +#undef WITH_PAM_SMBPASS +#undef WITH_NISPLUS_HOME +#undef WITH_AUTOMOUNT +#undef WITH_SMBMOUNT +#undef HAVE_BROKEN_GETGROUPS +#undef REPLACE_GETPASS +#undef REPLACE_INET_NTOA +#undef HAVE_FILE_MACRO +#undef HAVE_FUNCTION_MACRO +#undef HAVE_VA_COPY +#undef HAVE_SETRESUID_DECL +#undef HAVE_SETRESUID +#undef WITH_NETATALK +#undef WITH_UTMP +#undef WITH_MSDFS +#undef WITH_VFS +#undef HAVE_INO64_T +#undef HAVE_DEV64_T +#undef HAVE_STRUCT_FLOCK64 +#undef SIZEOF_INO_T +#undef SIZEOF_OFF_T +#undef STAT_STATVFS64 +#undef HAVE_LIBREADLINE +#undef HAVE_KERNEL_SHARE_MODES +#undef HAVE_KERNEL_OPLOCKS_IRIX +#undef HAVE_KERNEL_OPLOCKS_LINUX +#undef HAVE_KERNEL_CHANGE_NOTIFY +#undef HAVE_IRIX_SPECIFIC_CAPABILITIES +#undef HAVE_INT16_FROM_RPC_RPC_H +#undef HAVE_UINT16_FROM_RPC_RPC_H +#undef HAVE_INT32_FROM_RPC_RPC_H +#undef HAVE_UINT32_FROM_RPC_RPC_H +#undef KRB4_AUTH +#undef KRB5_AUTH +#undef SEEKDIR_RETURNS_VOID +#undef HAVE_DIRENT_D_OFF +#undef HAVE_GETSPNAM +#undef HAVE_BIGCRYPT +#undef HAVE_GETPRPWNAM +#undef HAVE_FSTAT64 +#undef HAVE_LSTAT64 +#undef HAVE_STAT64 +#undef HAVE_SETRESGID +#undef HAVE_SETRESGID_DECL +#undef HAVE_SHADOW_H +#undef HAVE_MEMSET +#undef HAVE_STRCASECMP +#undef HAVE_STRUCT_DIRENT64 +#undef HAVE_TRUNCATED_SALT +#undef BROKEN_NISPLUS_INCLUDE_FILES +#undef HAVE_RPC_AUTH_ERROR_CONFLICT +#undef HAVE_EXPLICIT_LARGEFILE_SUPPORT +#undef USE_BOTH_CRYPT_CALLS +#undef HAVE_BROKEN_FCNTL64_LOCKS +#undef HAVE_SECURE_MKSTEMP +#undef HAVE_FNMATCH +#undef USE_SETEUID +#undef USE_SETRESUID +#undef USE_SETREUID +#undef USE_SETUIDX +#undef HAVE_DLOPEN +#undef HAVE_DLCLOSE +#undef HAVE_DLSYM +#undef HAVE_DLERROR +#undef SYSCONF_SC_NGROUPS_MAX +#undef HAVE_UT_UT_NAME +#undef HAVE_UT_UT_USER +#undef HAVE_UT_UT_ID +#undef HAVE_UT_UT_HOST +#undef HAVE_UT_UT_TIME +#undef HAVE_UT_UT_TV +#undef HAVE_UT_UT_TYPE +#undef HAVE_UT_UT_PID +#undef HAVE_UT_UT_EXIT +#undef HAVE_UT_UT_ADDR +#undef HAVE_UX_UT_SYSLEN +#undef PUTUTLINE_RETURNS_UTMP +#undef COMPILER_SUPPORTS_LL +#undef HAVE_YP_GET_DEFAULT_DOMAIN +#undef USE_SPINLOCKS +#undef SPARC_SPINLOCKS +#undef INTEL_SPINLOCKS +#undef MIPS_SPINLOCKS +#undef POWERPC_SPINLOCKS +#undef HAVE_POSIX_ACLS +#undef HAVE_ACL_GET_PERM_NP +#undef HAVE_UNIXWARE_ACLS +#undef HAVE_SOLARIS_ACLS +#undef HAVE_HPUX_ACLS +#undef HAVE_IRIX_ACLS +#undef HAVE_AIX_ACLS +#undef HAVE_TRU64_ACLS +#undef HAVE_NO_ACLS +#undef HAVE_LIBPAM +#undef HAVE_ASPRINTF_DECL +#undef HAVE_VASPRINTF_DECL +#undef HAVE_SNPRINTF_DECL +#undef HAVE_VSNPRINTF_DECL +#undef HAVE_UNIXSOCKET +#undef MMAP_BLACKLIST +#undef HAVE_CUPS +#undef WITH_LDAP_SAM +#undef WITH_NISPLUS_SAM +#undef WITH_SMBPASSWD_SAM +#undef WITH_TDB_SAM +#undef LINUX_QUOTAS_1 +#undef LINUX_QUOTAS_2 +#undef BROKEN_REDHAT_7_SYSTEM_HEADERS +#undef HAVE_IMMEDIATE_STRUCTURES +#undef HAVE_STAT_ST_BLOCKS +#undef STAT_ST_BLOCKSIZE +#undef HAVE_DEVICE_MAJOR_FN +#undef HAVE_DEVICE_MINOR_FN +#undef HAVE_MAKEDEV_FN +#undef HAVE_GETGROUPS_TOO_MANY_EGIDS +#undef HAVE_PASSWD_PW_COMMENT +#undef HAVE_PASSWD_PW_AGE +#undef HAVE_STAT_ST_BLKSIZE +#undef WITH_WINBIND_AUTH_CRAP +#undef WITH_HORRIBLE_LDAP_NATIVE_MODE_HACK + +/* + * Add these definitions to allow VFS modules to + * see the CPPFLAGS defines. + */ +#ifndef _HPUX_SOURCE +#undef _HPUX_SOURCE +#endif +#ifndef _POSIX_SOURCE +#undef _POSIX_SOURCE +#endif +#ifndef _LARGEFILE64_SOURCE +#undef _LARGEFILE64_SOURCE +#endif +#ifndef _ALIGNMENT_REQUIRED +#undef _ALIGNMENT_REQUIRED +#endif +#ifndef _MAX_ALIGNMENT +#undef _MAX_ALIGNMENT +#endif +#ifndef _LARGE_FILES +#undef _LARGE_FILES +#endif +#ifndef _FILE_OFFSET_BITS +#undef _FILE_OFFSET_BITS +#endif +#ifndef _GNU_SOURCE +#undef _GNU_SOURCE +#endif +#undef HAVE_SENDFILE +#undef HAVE_SENDFILE64 +#undef LINUX_SENDFILE_API +#undef LINUX_BROKEN_SENDFILE_API +#undef WITH_SENDFILE +#undef FREEBSD_SENDFILE_API +#undef HPUX_SENDFILE_API +#undef HAVE_SENDFILEV +#undef HAVE_SENDFILEV64 +#undef SOLARIS_SENDFILE_API +#undef LDAP_SET_REBIND_PROC_ARGS +#undef POSIX_ACL_NEEDS_MASK +#undef BROKEN_GETGRNAM + +/* The number of bytes in a int. */ +#undef SIZEOF_INT + +/* The number of bytes in a long. */ +#undef SIZEOF_LONG + +/* The number of bytes in a short. */ +#undef SIZEOF_SHORT + +/* Define if you have the __acl function. */ +#undef HAVE___ACL + +/* Define if you have the __chdir function. */ +#undef HAVE___CHDIR + +/* Define if you have the __close function. */ +#undef HAVE___CLOSE + +/* Define if you have the __closedir function. */ +#undef HAVE___CLOSEDIR + +/* Define if you have the __dup function. */ +#undef HAVE___DUP + +/* Define if you have the __dup2 function. */ +#undef HAVE___DUP2 + +/* Define if you have the __facl function. */ +#undef HAVE___FACL + +/* Define if you have the __fchdir function. */ +#undef HAVE___FCHDIR + +/* Define if you have the __fcntl function. */ +#undef HAVE___FCNTL + +/* Define if you have the __fork function. */ +#undef HAVE___FORK + +/* Define if you have the __fstat function. */ +#undef HAVE___FSTAT + +/* Define if you have the __fstat64 function. */ +#undef HAVE___FSTAT64 + +/* Define if you have the __fxstat function. */ +#undef HAVE___FXSTAT + +/* Define if you have the __getcwd function. */ +#undef HAVE___GETCWD + +/* Define if you have the __getdents function. */ +#undef HAVE___GETDENTS + +/* Define if you have the __llseek function. */ +#undef HAVE___LLSEEK + +/* Define if you have the __lseek function. */ +#undef HAVE___LSEEK + +/* Define if you have the __lstat function. */ +#undef HAVE___LSTAT + +/* Define if you have the __lstat64 function. */ +#undef HAVE___LSTAT64 + +/* Define if you have the __lxstat function. */ +#undef HAVE___LXSTAT + +/* Define if you have the __open function. */ +#undef HAVE___OPEN + +/* Define if you have the __open64 function. */ +#undef HAVE___OPEN64 + +/* Define if you have the __opendir function. */ +#undef HAVE___OPENDIR + +/* Define if you have the __pread function. */ +#undef HAVE___PREAD + +/* Define if you have the __pread64 function. */ +#undef HAVE___PREAD64 + +/* Define if you have the __pwrite function. */ +#undef HAVE___PWRITE + +/* Define if you have the __pwrite64 function. */ +#undef HAVE___PWRITE64 + +/* Define if you have the __read function. */ +#undef HAVE___READ + +/* Define if you have the __readdir function. */ +#undef HAVE___READDIR + +/* Define if you have the __readdir64 function. */ +#undef HAVE___READDIR64 + +/* Define if you have the __seekdir function. */ +#undef HAVE___SEEKDIR + +/* Define if you have the __stat function. */ +#undef HAVE___STAT + +/* Define if you have the __stat64 function. */ +#undef HAVE___STAT64 + +/* Define if you have the __sys_llseek function. */ +#undef HAVE___SYS_LLSEEK + +/* Define if you have the __telldir function. */ +#undef HAVE___TELLDIR + +/* Define if you have the __write function. */ +#undef HAVE___WRITE + +/* Define if you have the __xstat function. */ +#undef HAVE___XSTAT + +/* Define if you have the _acl function. */ +#undef HAVE__ACL + +/* Define if you have the _chdir function. */ +#undef HAVE__CHDIR + +/* Define if you have the _close function. */ +#undef HAVE__CLOSE + +/* Define if you have the _closedir function. */ +#undef HAVE__CLOSEDIR + +/* Define if you have the _dup function. */ +#undef HAVE__DUP + +/* Define if you have the _dup2 function. */ +#undef HAVE__DUP2 + +/* Define if you have the _facl function. */ +#undef HAVE__FACL + +/* Define if you have the _fchdir function. */ +#undef HAVE__FCHDIR + +/* Define if you have the _fcntl function. */ +#undef HAVE__FCNTL + +/* Define if you have the _fork function. */ +#undef HAVE__FORK + +/* Define if you have the _fstat function. */ +#undef HAVE__FSTAT + +/* Define if you have the _fstat64 function. */ +#undef HAVE__FSTAT64 + +/* Define if you have the _getcwd function. */ +#undef HAVE__GETCWD + +/* Define if you have the _getdents function. */ +#undef HAVE__GETDENTS + +/* Define if you have the _llseek function. */ +#undef HAVE__LLSEEK + +/* Define if you have the _lseek function. */ +#undef HAVE__LSEEK + +/* Define if you have the _lstat function. */ +#undef HAVE__LSTAT + +/* Define if you have the _lstat64 function. */ +#undef HAVE__LSTAT64 + +/* Define if you have the _open function. */ +#undef HAVE__OPEN + +/* Define if you have the _open64 function. */ +#undef HAVE__OPEN64 + +/* Define if you have the _opendir function. */ +#undef HAVE__OPENDIR + +/* Define if you have the _pread function. */ +#undef HAVE__PREAD + +/* Define if you have the _pread64 function. */ +#undef HAVE__PREAD64 + +/* Define if you have the _pwrite function. */ +#undef HAVE__PWRITE + +/* Define if you have the _pwrite64 function. */ +#undef HAVE__PWRITE64 + +/* Define if you have the _read function. */ +#undef HAVE__READ + +/* Define if you have the _readdir function. */ +#undef HAVE__READDIR + +/* Define if you have the _readdir64 function. */ +#undef HAVE__READDIR64 + +/* Define if you have the _seekdir function. */ +#undef HAVE__SEEKDIR + +/* Define if you have the _stat function. */ +#undef HAVE__STAT + +/* Define if you have the _stat64 function. */ +#undef HAVE__STAT64 + +/* Define if you have the _telldir function. */ +#undef HAVE__TELLDIR + +/* Define if you have the _write function. */ +#undef HAVE__WRITE + +/* Define if you have the asprintf function. */ +#undef HAVE_ASPRINTF + +/* Define if you have the atexit function. */ +#undef HAVE_ATEXIT + +/* Define if you have the bigcrypt function. */ +#undef HAVE_BIGCRYPT + +/* Define if you have the bzero function. */ +#undef HAVE_BZERO + +/* Define if you have the chmod function. */ +#undef HAVE_CHMOD + +/* Define if you have the chown function. */ +#undef HAVE_CHOWN + +/* Define if you have the chroot function. */ +#undef HAVE_CHROOT + +/* Define if you have the connect function. */ +#undef HAVE_CONNECT + +/* Define if you have the creat64 function. */ +#undef HAVE_CREAT64 + +/* Define if you have the crypt function. */ +#undef HAVE_CRYPT + +/* Define if you have the crypt16 function. */ +#undef HAVE_CRYPT16 + +/* Define if you have the dlclose function. */ +#undef HAVE_DLCLOSE + +/* Define if you have the dlerror function. */ +#undef HAVE_DLERROR + +/* Define if you have the dlopen function. */ +#undef HAVE_DLOPEN + +/* Define if you have the dlsym function. */ +#undef HAVE_DLSYM + +/* Define if you have the dup2 function. */ +#undef HAVE_DUP2 + +/* Define if you have the endnetgrent function. */ +#undef HAVE_ENDNETGRENT + +/* Define if you have the execl function. */ +#undef HAVE_EXECL + +/* Define if you have the fchmod function. */ +#undef HAVE_FCHMOD + +/* Define if you have the fchown function. */ +#undef HAVE_FCHOWN + +/* Define if you have the fcvt function. */ +#undef HAVE_FCVT + +/* Define if you have the fcvtl function. */ +#undef HAVE_FCVTL + +/* Define if you have the fopen64 function. */ +#undef HAVE_FOPEN64 + +/* Define if you have the fseek64 function. */ +#undef HAVE_FSEEK64 + +/* Define if you have the fseeko64 function. */ +#undef HAVE_FSEEKO64 + +/* Define if you have the fstat function. */ +#undef HAVE_FSTAT + +/* Define if you have the fstat64 function. */ +#undef HAVE_FSTAT64 + +/* Define if you have the fsync function. */ +#undef HAVE_FSYNC + +/* Define if you have the ftell64 function. */ +#undef HAVE_FTELL64 + +/* Define if you have the ftello64 function. */ +#undef HAVE_FTELLO64 + +/* Define if you have the ftruncate function. */ +#undef HAVE_FTRUNCATE + +/* Define if you have the ftruncate64 function. */ +#undef HAVE_FTRUNCATE64 + +/* Define if you have the getauthuid function. */ +#undef HAVE_GETAUTHUID + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getdents function. */ +#undef HAVE_GETDENTS + +/* Define if you have the getgrent function. */ +#undef HAVE_GETGRENT + +/* Define if you have the getgrnam function. */ +#undef HAVE_GETGRNAM + +/* Define if you have the getnetgrent function. */ +#undef HAVE_GETNETGRENT + +/* Define if you have the getprpwnam function. */ +#undef HAVE_GETPRPWNAM + +/* Define if you have the getpwanam function. */ +#undef HAVE_GETPWANAM + +/* Define if you have the getrlimit function. */ +#undef HAVE_GETRLIMIT + +/* Define if you have the getspnam function. */ +#undef HAVE_GETSPNAM + +/* Define if you have the getutmpx function. */ +#undef HAVE_GETUTMPX + +/* Define if you have the glob function. */ +#undef HAVE_GLOB + +/* Define if you have the grantpt function. */ +#undef HAVE_GRANTPT + +/* Define if you have the initgroups function. */ +#undef HAVE_INITGROUPS + +/* Define if you have the innetgr function. */ +#undef HAVE_INNETGR + +/* Define if you have the ldap_start_tls_s function. */ +#undef HAVE_LDAP_START_TLS_S + +/* Define if you have the link function. */ +#undef HAVE_LINK + +/* Define if you have the llseek function. */ +#undef HAVE_LLSEEK + +/* Define if you have the lseek64 function. */ +#undef HAVE_LSEEK64 + +/* Define if you have the lstat64 function. */ +#undef HAVE_LSTAT64 + +/* Define if you have the memmove function. */ +#undef HAVE_MEMMOVE + +/* Define if you have the memset function. */ +#undef HAVE_MEMSET + +/* Define if you have the mknod function. */ +#undef HAVE_MKNOD + +/* Define if you have the mknod64 function. */ +#undef HAVE_MKNOD64 + +/* Define if you have the mktime function. */ +#undef HAVE_MKTIME + +/* Define if you have the open64 function. */ +#undef HAVE_OPEN64 + +/* Define if you have the pathconf function. */ +#undef HAVE_PATHCONF + +/* Define if you have the pipe function. */ +#undef HAVE_PIPE + +/* Define if you have the poll function. */ +#undef HAVE_POLL + +/* Define if you have the pread function. */ +#undef HAVE_PREAD + +/* Define if you have the pread64 function. */ +#undef HAVE_PREAD64 + +/* Define if you have the putprpwnam function. */ +#undef HAVE_PUTPRPWNAM + +/* Define if you have the pututline function. */ +#undef HAVE_PUTUTLINE + +/* Define if you have the pututxline function. */ +#undef HAVE_PUTUTXLINE + +/* Define if you have the pwrite function. */ +#undef HAVE_PWRITE + +/* Define if you have the pwrite64 function. */ +#undef HAVE_PWRITE64 + +/* Define if you have the rand function. */ +#undef HAVE_RAND + +/* Define if you have the random function. */ +#undef HAVE_RANDOM + +/* Define if you have the rdchk function. */ +#undef HAVE_RDCHK + +/* Define if you have the readdir64 function. */ +#undef HAVE_READDIR64 + +/* Define if you have the readlink function. */ +#undef HAVE_READLINK + +/* Define if you have the realpath function. */ +#undef HAVE_REALPATH + +/* Define if you have the rename function. */ +#undef HAVE_RENAME + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the set_auth_parameters function. */ +#undef HAVE_SET_AUTH_PARAMETERS + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setgidx function. */ +#undef HAVE_SETGIDX + +/* Define if you have the setgroups function. */ +#undef HAVE_SETGROUPS + +/* Define if you have the setlinebuf function. */ +#undef HAVE_SETLINEBUF + +/* Define if you have the setluid function. */ +#undef HAVE_SETLUID + +/* Define if you have the setnetgrent function. */ +#undef HAVE_SETNETGRENT + +/* Define if you have the setpgid function. */ +#undef HAVE_SETPGID + +/* Define if you have the setpriv function. */ +#undef HAVE_SETPRIV + +/* Define if you have the setsid function. */ +#undef HAVE_SETSID + +/* Define if you have the setuidx function. */ +#undef HAVE_SETUIDX + +/* Define if you have the sigaction function. */ +#undef HAVE_SIGACTION + +/* Define if you have the sigblock function. */ +#undef HAVE_SIGBLOCK + +/* Define if you have the sigprocmask function. */ +#undef HAVE_SIGPROCMASK + +/* Define if you have the sigset function. */ +#undef HAVE_SIGSET + +/* Define if you have the snprintf function. */ +#undef HAVE_SNPRINTF + +/* Define if you have the srand function. */ +#undef HAVE_SRAND + +/* Define if you have the srandom function. */ +#undef HAVE_SRANDOM + +/* Define if you have the stat64 function. */ +#undef HAVE_STAT64 + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the strftime function. */ +#undef HAVE_STRFTIME + +/* Define if you have the strlcat function. */ +#undef HAVE_STRLCAT + +/* Define if you have the strlcpy function. */ +#undef HAVE_STRLCPY + +/* Define if you have the strndup function. */ +#undef HAVE_STRNDUP + +/* Define if you have the strnlen function. */ +#undef HAVE_STRNLEN + +/* Define if you have the strpbrk function. */ +#undef HAVE_STRPBRK + +/* Define if you have the strtoul function. */ +#undef HAVE_STRTOUL + +/* Define if you have the symlink function. */ +#undef HAVE_SYMLINK + +/* Define if you have the syscall function. */ +#undef HAVE_SYSCALL + +/* Define if you have the sysconf function. */ +#undef HAVE_SYSCONF + +/* Define if you have the syslog function. */ +#undef HAVE_SYSLOG + +/* Define if you have the updwtmp function. */ +#undef HAVE_UPDWTMP + +/* Define if you have the updwtmpx function. */ +#undef HAVE_UPDWTMPX + +/* Define if you have the usleep function. */ +#undef HAVE_USLEEP + +/* Define if you have the utime function. */ +#undef HAVE_UTIME + +/* Define if you have the utimes function. */ +#undef HAVE_UTIMES + +/* Define if you have the vasprintf function. */ +#undef HAVE_VASPRINTF + +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF + +/* Define if you have the vsyslog function. */ +#undef HAVE_VSYSLOG + +/* Define if you have the waitpid function. */ +#undef HAVE_WAITPID + +/* Define if you have the yp_get_default_domain function. */ +#undef HAVE_YP_GET_DEFAULT_DOMAIN + +/* Define if you have the <arpa/inet.h> header file. */ +#undef HAVE_ARPA_INET_H + +/* Define if you have the <compat.h> header file. */ +#undef HAVE_COMPAT_H + +/* Define if you have the <ctype.h> header file. */ +#undef HAVE_CTYPE_H + +/* Define if you have the <dirent.h> header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the <glob.h> header file. */ +#undef HAVE_GLOB_H + +/* Define if you have the <grp.h> header file. */ +#undef HAVE_GRP_H + +/* Define if you have the <history.h> header file. */ +#undef HAVE_HISTORY_H + +/* Define if you have the <lastlog.h> header file. */ +#undef HAVE_LASTLOG_H + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the <linux/xqm.h> header file. */ +#undef HAVE_LINUX_XQM_H + +/* Define if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the <ndir.h> header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the <net/if.h> header file. */ +#undef HAVE_NET_IF_H + +/* Define if you have the <netinet/in_ip.h> header file. */ +#undef HAVE_NETINET_IN_IP_H + +/* Define if you have the <netinet/in_systm.h> header file. */ +#undef HAVE_NETINET_IN_SYSTM_H + +/* Define if you have the <netinet/ip.h> header file. */ +#undef HAVE_NETINET_IP_H + +/* Define if you have the <netinet/tcp.h> header file. */ +#undef HAVE_NETINET_TCP_H + +/* Define if you have the <ns_api.h> header file. */ +#undef HAVE_NS_API_H + +/* Define if you have the <nss.h> header file. */ +#undef HAVE_NSS_H + +/* Define if you have the <nss_common.h> header file. */ +#undef HAVE_NSS_COMMON_H + +/* Define if you have the <nsswitch.h> header file. */ +#undef HAVE_NSSWITCH_H + +/* Define if you have the <poll.h> header file. */ +#undef HAVE_POLL_H + +/* Define if you have the <pthread.h> header file. */ +#undef HAVE_PTHREAD_H + +/* Define if you have the <readline.h> header file. */ +#undef HAVE_READLINE_H + +/* Define if you have the <readline/history.h> header file. */ +#undef HAVE_READLINE_HISTORY_H + +/* Define if you have the <readline/readline.h> header file. */ +#undef HAVE_READLINE_READLINE_H + +/* Define if you have the <rpc/rpc.h> header file. */ +#undef HAVE_RPC_RPC_H + +/* Define if you have the <rpcsvc/nis.h> header file. */ +#undef HAVE_RPCSVC_NIS_H + +/* Define if you have the <rpcsvc/yp_prot.h> header file. */ +#undef HAVE_RPCSVC_YP_PROT_H + +/* Define if you have the <rpcsvc/ypclnt.h> header file. */ +#undef HAVE_RPCSVC_YPCLNT_H + +/* Define if you have the <security/_pam_macros.h> header file. */ +#undef HAVE_SECURITY__PAM_MACROS_H + +/* Define if you have the <security/pam_appl.h> header file. */ +#undef HAVE_SECURITY_PAM_APPL_H + +/* Define if you have the <security/pam_modules.h> header file. */ +#undef HAVE_SECURITY_PAM_MODULES_H + +/* Define if you have the <shadow.h> header file. */ +#undef HAVE_SHADOW_H + +/* Define if you have the <stdarg.h> header file. */ +#undef HAVE_STDARG_H + +/* Define if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the <stropts.h> header file. */ +#undef HAVE_STROPTS_H + +/* Define if you have the <synch.h> header file. */ +#undef HAVE_SYNCH_H + +/* Define if you have the <sys/acl.h> header file. */ +#undef HAVE_SYS_ACL_H + +/* Define if you have the <sys/capability.h> header file. */ +#undef HAVE_SYS_CAPABILITY_H + +/* Define if you have the <sys/cdefs.h> header file. */ +#undef HAVE_SYS_CDEFS_H + +/* Define if you have the <sys/dir.h> header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the <sys/dustat.h> header file. */ +#undef HAVE_SYS_DUSTAT_H + +/* Define if you have the <sys/fcntl.h> header file. */ +#undef HAVE_SYS_FCNTL_H + +/* Define if you have the <sys/file.h> header file. */ +#undef HAVE_SYS_FILE_H + +/* Define if you have the <sys/filio.h> header file. */ +#undef HAVE_SYS_FILIO_H + +/* Define if you have the <sys/filsys.h> header file. */ +#undef HAVE_SYS_FILSYS_H + +/* Define if you have the <sys/fs/s5param.h> header file. */ +#undef HAVE_SYS_FS_S5PARAM_H + +/* Define if you have the <sys/fs/vx_quota.h> header file. */ +#undef HAVE_SYS_FS_VX_QUOTA_H + +/* Define if you have the <sys/id.h> header file. */ +#undef HAVE_SYS_ID_H + +/* Define if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the <sys/ipc.h> header file. */ +#undef HAVE_SYS_IPC_H + +/* Define if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define if you have the <sys/mode.h> header file. */ +#undef HAVE_SYS_MODE_H + +/* Define if you have the <sys/mount.h> header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define if you have the <sys/ndir.h> header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the <sys/priv.h> header file. */ +#undef HAVE_SYS_PRIV_H + +/* Define if you have the <sys/resource.h> header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define if you have the <sys/security.h> header file. */ +#undef HAVE_SYS_SECURITY_H + +/* Define if you have the <sys/select.h> header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the <sys/shm.h> header file. */ +#undef HAVE_SYS_SHM_H + +/* Define if you have the <sys/socket.h> header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define if you have the <sys/sockio.h> header file. */ +#undef HAVE_SYS_SOCKIO_H + +/* Define if you have the <sys/statfs.h> header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define if you have the <sys/statvfs.h> header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define if you have the <sys/syscall.h> header file. */ +#undef HAVE_SYS_SYSCALL_H + +/* Define if you have the <sys/syslog.h> header file. */ +#undef HAVE_SYS_SYSLOG_H + +/* Define if you have the <sys/termio.h> header file. */ +#undef HAVE_SYS_TERMIO_H + +/* Define if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the <sys/unistd.h> header file. */ +#undef HAVE_SYS_UNISTD_H + +/* Define if you have the <sys/vfs.h> header file. */ +#undef HAVE_SYS_VFS_H + +/* Define if you have the <sys/wait.h> header file. */ +#undef HAVE_SYS_WAIT_H + +/* Define if you have the <syscall.h> header file. */ +#undef HAVE_SYSCALL_H + +/* Define if you have the <syslog.h> header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the <termio.h> header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the <utime.h> header file. */ +#undef HAVE_UTIME_H + +/* Define if you have the <utmp.h> header file. */ +#undef HAVE_UTMP_H + +/* Define if you have the <utmpx.h> header file. */ +#undef HAVE_UTMPX_H + +/* Define if you have the acl library (-lacl). */ +#undef HAVE_LIBACL + +/* Define if you have the gen library (-lgen). */ +#undef HAVE_LIBGEN + +/* Define if you have the inet library (-linet). */ +#undef HAVE_LIBINET + +/* Define if you have the nsl library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the nsl_s library (-lnsl_s). */ +#undef HAVE_LIBNSL_S + +/* Define if you have the resolv library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define if you have the sec library (-lsec). */ +#undef HAVE_LIBSEC + +/* Define if you have the security library (-lsecurity). */ +#undef HAVE_LIBSECURITY + +/* Define if you have the socket library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Whether to enable POSIX support */ +#undef _POSIX_C_SOURCE + +/* Whether to enable System V compatibility */ +#undef _SYSV + diff --git a/source/include/proto.h b/source/include/proto.h new file mode 100755 index 00000000000..ee719cbc529 --- /dev/null +++ b/source/include/proto.h @@ -0,0 +1,5096 @@ +#ifndef _PROTO_H_ +#define _PROTO_H_ +/* This file is automatically generated with "make proto". DO NOT EDIT */ + + +/* The following definitions come from client/client.c */ + +void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),BOOL rec, BOOL dirs); +struct cli_state *do_connect(const char *server, const char *share); + +/* The following definitions come from client/clitar.c */ + +void cmd_block(void); +void cmd_tarmode(void); +void cmd_setmode(void); +void cmd_tar(void); +int process_tar(void); +int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind); + +/* The following definitions come from lib/access.c */ + +BOOL allow_access(char *deny_list,char *allow_list, + char *cname,char *caddr); +BOOL check_access(int sock, char *allow_list, char *deny_list); + +/* The following definitions come from lib/bitmap.c */ + +struct bitmap *bitmap_allocate(int n); +void bitmap_free(struct bitmap *bm); +BOOL bitmap_set(struct bitmap *bm, unsigned i); +BOOL bitmap_clear(struct bitmap *bm, unsigned i); +BOOL bitmap_query(struct bitmap *bm, unsigned i); +int bitmap_find(struct bitmap *bm, unsigned ofs); + +/* The following definitions come from lib/charcnv.c */ + +char *unix2dos_format_static(const char *str); +char *unix2dos_format(char *str); +char *dos2unix_format_static(const char *str); +char *dos2unix_format(char *str); +void interpret_character_set(char *str, int codepage); + +/* The following definitions come from lib/charset.c */ + +void charset_initialise(void); +void codepage_initialise(int client_codepage); +void add_char_string(const char *s); + +/* The following definitions come from lib/crc32.c */ + +uint32 crc32_calc_buffer( char *buffer, uint32 count); + +/* The following definitions come from lib/debug.c */ + +const char* debug_classname_from_index(int ndx); +int debug_lookup_classname(char* classname); +BOOL debug_parse_params(char **params, int *debuglevel_class); +BOOL debug_parse_levels(char *params_str); +void debug_message(int msg_type, pid_t src, void *buf, size_t len); +void debug_message_send(pid_t pid, int level); +void setup_logging(const char *pname, BOOL interactive); +BOOL reopen_logs( void ); +void force_check_log_size( void ); +BOOL need_to_check_log_size( void ); +void check_log_size( void ); +void dbgflush( void ); +BOOL dbghdr( int level, const char *file, const char *func, int line ); + +/* The following definitions come from lib/error.c */ + +NTSTATUS map_nt_error_from_unix(int unix_error); + +/* The following definitions come from lib/fault.c */ + +void fault_setup(void (*fn)(void *)); + +/* The following definitions come from lib/fsusage.c */ + +int sys_fsusage(const char *path, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); + +/* The following definitions come from lib/genrand.c */ + +void set_rand_reseed_data(unsigned char *data, size_t len); +void generate_random_buffer( unsigned char *out, int len, BOOL do_reseed_now); +char *generate_random_str(size_t len); + +/* The following definitions come from lib/getsmbpass.c */ + +char *getsmbpass(const char *prompt) ; + +/* The following definitions come from lib/hash.c */ + +BOOL hash_table_init(hash_table *table, int num_buckets, compare_function compare_func); +hash_element *hash_lookup(hash_table *table, char *key); +hash_element *hash_insert(hash_table *table, char *value, char *key); +void hash_remove(hash_table *table, hash_element *hash_elem); +void hash_clear(hash_table *table); + +/* The following definitions come from lib/interface.c */ + +void load_interfaces(void); +BOOL interfaces_changed(void); +BOOL ismyip(struct in_addr ip); +BOOL is_local_net(struct in_addr from); +int iface_count(void); +BOOL we_are_multihomed(void); +struct interface *get_interface(int n); +struct in_addr *iface_n_ip(int n); +struct in_addr *iface_n_bcast(int n); +unsigned iface_hash(void); +struct in_addr *iface_bcast(struct in_addr ip); +struct in_addr *iface_ip(struct in_addr ip); + +/* The following definitions come from lib/interfaces.c */ + +int get_interfaces(struct iface_struct *ifaces, int max_interfaces); + +/* The following definitions come from lib/kanji.c */ + +void interpret_coding_system(const char *str); +void initialize_multibyte_vectors( int client_codepage); + +/* The following definitions come from lib/md4.c */ + +void mdfour(unsigned char *out, unsigned char *in, int n); + +/* The following definitions come from lib/messages.c */ + +void ping_message(int msg_type, pid_t src, void *buf, size_t len); +void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len); +BOOL message_init(void); +BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len, + BOOL duplicates_allowed); +void message_dispatch(void); +void message_register(int msg_type, + void (*fn)(int msg_type, pid_t pid, void *buf, size_t len)); +void message_deregister(int msg_type); +BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type, + const void *buf, size_t len, + BOOL duplicates_allowed, + int *n_sent); + +/* The following definitions come from lib/ms_fnmatch.c */ + +int ms_fnmatch(const char *pattern, const char *string); + +/* The following definitions come from lib/pam_errors.c */ + +NTSTATUS pam_to_nt_status(int pam_error); +int nt_status_to_pam(NTSTATUS nt_status); +NTSTATUS pam_to_nt_status(int pam_error); +int nt_status_to_pam(NTSTATUS nt_status); + +/* The following definitions come from lib/pidfile.c */ + +pid_t pidfile_pid(const char *name); +void pidfile_create(const char *name); + +/* The following definitions come from lib/readline.c */ + +char *smb_readline(char *prompt, void (*callback)(void), + char **(completion_fn)(const char *text, int start, int end)); +void cmd_history(void); + +/* The following definitions come from lib/replace.c */ + +char *rep_inet_ntoa(struct in_addr ip); + +/* The following definitions come from lib/select.c */ + +void sys_select_signal(void); +int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval); +int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval); + +/* The following definitions come from lib/sendfile.c */ + +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count); +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count); +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count); +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count); +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count); +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count); + +/* The following definitions come from lib/signal.c */ + +void BlockSignals(BOOL block,int signum); +void CatchSignal(int signum,void (*handler)(int )); +void CatchChild(void); +void CatchChildLeaveStatus(void); + +/* The following definitions come from libsmb/cliconnect.c */ + +BOOL cli_session_setup(struct cli_state *cli, + const char *user, + const char *pass, int passlen, + const char *ntpass, int ntpasslen, + const char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_send_tconX(struct cli_state *cli, + const char *share, const char *dev, const char *pass, int passlen); +BOOL cli_tdis(struct cli_state *cli); +void cli_negprot_send(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_establish_connection(struct cli_state *cli, + const char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + const char *service, const char *service_type, + BOOL do_shutdown, BOOL do_tcon); +NTSTATUS cli_full_connection(struct cli_state **output_cli, + const char *my_name, const char *dest_host, + struct in_addr *dest_ip, int port, + const char *service, const char *service_type, + const char *user, const char *domain, + const char *password, int pass_len) ; +BOOL attempt_netbios_session_request(struct cli_state *cli, const char *srchost, const char *desthost, + struct in_addr *pdest_ip); + +/* The following definitions come from libsmb/cli_dfs.c */ + +struct cli_state *cli_dfs_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL *dfs_exists); +NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + char *comment, uint32 flags); +NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename); +NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *entrypath, char *servername, char *sharename, + uint32 info_level, DFS_INFO_CTR *ctr); +NTSTATUS cli_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, DFS_INFO_CTR *ctr); + +/* The following definitions come from libsmb/clidgram.c */ + +int cli_send_mailslot(int dgram_sock, BOOL unique, const char *mailslot, + char *buf, int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip, struct in_addr src_ip, + int dest_port, int src_port); +int cli_get_response(int dgram_sock, BOOL unique, const char *mailslot, char *buf, int bufsiz); +int cli_get_backup_list(const char *myname, const char *send_to_name); +int cli_get_backup_server(char *my_name, char *target, char *servername, int namesize); + +/* The following definitions come from libsmb/clientgen.c */ + +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +void cli_setup_bcc(struct cli_state *cli, void *p); +void cli_init_creds(struct cli_state *cli, const struct ntuser_creds *usr); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_close_connection(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); +BOOL cli_send_keepalive(struct cli_state *cli); + +/* The following definitions come from libsmb/clierror.c */ + +const char *cli_errstr(struct cli_state *cli); +NTSTATUS cli_nt_error(struct cli_state *cli); +void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode); +int cli_errno_from_dos(uint8 eclass, uint32 num); +int cli_errno_from_nt(NTSTATUS status); +int cli_errno(struct cli_state *cli); +BOOL cli_is_error(struct cli_state *cli); +BOOL cli_is_nt_error(struct cli_state *cli); +BOOL cli_is_dos_error(struct cli_state *cli); + +/* The following definitions come from libsmb/clifile.c */ + +uint32 unix_perms_to_wire(mode_t perms); +BOOL cli_unix_symlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_hardlink(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unix_chmod(struct cli_state *cli, const char *fname, mode_t mode); +BOOL cli_unix_chown(struct cli_state *cli, const char *fname, uid_t uid, gid_t gid); +BOOL cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); +BOOL cli_unlink(struct cli_state *cli, const char *fname); +BOOL cli_mkdir(struct cli_state *cli, const char *dname); +BOOL cli_rmdir(struct cli_state *cli, const char *dname); +int cli_nt_delete_on_close(struct cli_state *cli, int fnum, BOOL flag); +int cli_nt_create_full(struct cli_state *cli, const char *fname, uint32 DesiredAccess, + uint32 FileAttributes, uint32 ShareAccess, + uint32 CreateDisposition, uint32 CreateOptions); +int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess); +int cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode); +BOOL cli_close(struct cli_state *cli, int fnum); +NTSTATUS cli_locktype(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, unsigned char locktype); +BOOL cli_lock(struct cli_state *cli, int fnum, + uint32 offset, uint32 len, int timeout, enum brl_type lock_type); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); +BOOL cli_lock64(struct cli_state *cli, int fnum, + SMB_BIG_UINT offset, SMB_BIG_UINT len, int timeout, enum brl_type lock_type); +BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_UINT len); +BOOL cli_getattrE(struct cli_state *cli, int fd, + uint16 *attr, SMB_BIG_UINT *size, + time_t *c_time, time_t *a_time, time_t *m_time); +BOOL cli_getatr(struct cli_state *cli, const char *fname, + uint16 *attr, size_t *size, time_t *t); +BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, const char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path); + +/* The following definitions come from libsmb/clilist.c */ + +int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *, void *), void *state); + +/* The following definitions come from libsmb/cli_lsarpc.c */ + +struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_lsa_open_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_open_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + BOOL sec_qos, uint32 des_access, POLICY_HND *pol); +NTSTATUS cli_lsa_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +NTSTATUS cli_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_sids, DOM_SID *sids, + char ***domains, char ***names, uint32 **types); +NTSTATUS cli_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, int num_names, + const char **names, DOM_SID **sids, + uint32 **types); +NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 info_class, + fstring domain_name, DOM_SID *domain_sid); +NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, + uint32 *num_domains, char ***domain_names, + DOM_SID **domain_sids); +NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_context, uint32 pref_max_length, + uint32 *count, char ***privs_name, uint32 **privs_high, uint32 **privs_low); +NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys, + fstring description, uint16 *lang_id_desc); +NTSTATUS cli_lsa_enum_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *enum_ctx, uint32 pref_max_length, + uint32 *num_sids, DOM_SID **sids); +NTSTATUS cli_lsa_open_account(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *dom_pol, DOM_SID *sid, uint32 des_access, + POLICY_HND *user_pol); +NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *count, LUID_ATTR **set); +NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char *name, LUID *luid); +NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 sec_info, + SEC_DESC_BUF **psdb); +BOOL fetch_domain_sid( char *domain, char *remote_machine, DOM_SID *psid); + +/* The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + +/* The following definitions come from libsmb/cli_netlogon.c */ + +struct cli_state *cli_netlogon_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, + DOM_CHAL *srv_chal); +NTSTATUS new_cli_net_auth2(struct cli_state *cli, + uint16 sec_chan, + uint32 neg_flags, DOM_CHAL *srv_chal); +NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, + uint16 sec_chan, + const unsigned char mach_pwd[16]); +NTSTATUS cli_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 query_level); +NTSTATUS cli_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, DOM_CRED *ret_creds, + uint32 database_id, uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 database_id, UINT64_S seqnum, + uint32 *num_deltas, + SAM_DELTA_HDR **hdr_deltas, + SAM_DELTA_CTR **deltas); +NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *unix_username, const char *unix_password, + int logon_type); +NTSTATUS cli_netlogon_sam_network_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *unix_username, const char *unix_domain, const char *workstation, + const uint8 chal[8], + DATA_BLOB lm_response, DATA_BLOB nt_response, + NET_USER_INFO_3 *info3); + +/* The following definitions come from libsmb/clioplock.c */ + +BOOL cli_oplock_ack(struct cli_state *cli, int fnum, unsigned char level); +void cli_oplock_handler(struct cli_state *cli, + BOOL (*handler)(struct cli_state *, int, unsigned char)); + +/* The following definitions come from libsmb/cli_pipe_util.c */ + +struct cli_state *cli_pipe_initialise(struct cli_state *cli, char *system_name, + const char *pipe_name, + struct ntuser_creds *creds); +void cli_pipe_shutdown(struct cli_state *cli); + +/* The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/* The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, const char *pipe_name, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, unsigned int *rprcnt, + char **rdata, unsigned int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *, void *), + void *state); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + size_t *size, uint16 *mode); +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, size_t *size, uint16 *mode, + SMB_INO_T *ino); +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + time_t *w_time, SMB_INO_T *ino); +BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata); +NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name); + +/* The following definitions come from libsmb/clireadwrite.c */ + +ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + +/* The following definitions come from libsmb/cli_reg.c */ + +struct cli_state *cli_winreg_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *msg, uint32 timeout, uint16 flags); +NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx); + +/* The following definitions come from libsmb/cli_samr.c */ + +struct cli_state *cli_samr_initialise(struct cli_state *cli, char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol); +NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol); +NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol, uint32 access_mask, + DOM_SID *domain_sid, POLICY_HND *domain_pol); +NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 user_rid, POLICY_HND *user_pol); +NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 group_rid, POLICY_HND *group_pol); +NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + SAM_USERINFO_CTR **ctr); +NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 info_level, + GROUP_INFO_CTR **ctr); +NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 *num_groups, + DOM_GID **gid); +NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, + uint32 *num_aliases, uint32 **als_rids); +NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 *num_mem, + uint32 **rid, uint32 **attr); +NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); +NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups); +NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *alias_pol, uint32 *num_mem, + DOM_SID **sids); +NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 alias_rid, POLICY_HND *alias_pol); +NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint16 switch_value, + SAM_UNK_CTR *ctr); +void get_query_dispinfo_params(int loop_count, uint32 *max_entries, + uint32 *max_size); +NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 *start_idx, + uint16 switch_value, uint32 *num_entries, + uint32 max_entries, uint32 max_size, + SAM_DISPINFO_CTR *ctr); +NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_rids, uint32 *rids, + uint32 *num_names, char ***names, + uint32 **name_types); +NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_names, const char **names, + uint32 *num_rids, uint32 **rids, + uint32 **rid_types); +NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, char *acct_name, + uint32 acb_info, uint32 unknown, + POLICY_HND *user_pol, uint32 *rid); +NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr); +NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr); +NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol); +NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf); + +/* The following definitions come from libsmb/clisecdesc.c */ + +SEC_DESC *cli_query_secdesc(struct cli_state *cli, int fnum, + TALLOC_CTX *mem_ctx); +BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd); + +/* The following definitions come from libsmb/cli_spoolss.c */ + +struct cli_state *cli_spoolss_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printername, const char *datatype, uint32 access_required, + char *station, char *username, POLICY_HND *pol); +WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol); +WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 flags, uint32 level, + uint32 *num_printers, PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, int *num_ports, PORT_INFO_CTR *ctr); +WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr); +WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr, uint32 command); +WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + const char *env, PRINTER_DRIVER_CTR *ctr); +WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, const char *env, + uint32 *num_drivers, + PRINTER_DRIVER_CTR *ctr); +WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + DRIVER_DIRECTORY_CTR *ctr); +WERROR cli_spoolss_addprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, uint32 level, + PRINTER_DRIVER_CTR *ctr); +WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_INFO_CTR*ctr); +WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, const char *arch, + char *driver); +WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + char *name, char *environment, + fstring procdir); +WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, FORM *form); +WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, char *form_name, + FORM *form); +WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, char *formname, uint32 level, + FORM_1 *form); +WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, char *form_name); +WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, int level, uint32 *num_forms, + FORM_1 **forms); +WERROR cli_spoolss_setprinterdata (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, char* valname, char* value); + +/* The following definitions come from libsmb/cli_srvsvc.c */ + +struct cli_state *cli_svrsvc_initialise(struct cli_state *cli, + char *system_name, + struct ntuser_creds *creds); +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr); + +/* The following definitions come from libsmb/clistr.c */ + +int clistr_push(struct cli_state *cli, void *dest, const char *src, int dest_len, int flags); +int clistr_pull(struct cli_state *cli, char *dest, const void *src, int dest_len, int src_len, int flags); +int clistr_align_out(struct cli_state *cli, const void *p, int flags); +int clistr_align_in(struct cli_state *cli, const void *p, int flags); + +/* The following definitions come from libsmb/clitrans.c */ + +BOOL cli_send_trans(struct cli_state *cli, int trans, + const char *pipe_name, + int fid, int flags, + uint16 *setup, unsigned int lsetup, unsigned int msetup, + char *param, unsigned int lparam, unsigned int mparam, + char *data, unsigned int ldata, unsigned int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, unsigned int *param_len, + char **data, unsigned int *data_len); +BOOL cli_send_nt_trans(struct cli_state *cli, + int function, + int flags, + uint16 *setup, unsigned int lsetup, unsigned int msetup, + char *param, unsigned int lparam, unsigned int mparam, + char *data, unsigned int ldata, unsigned int mdata); +BOOL cli_receive_nt_trans(struct cli_state *cli, + char **param, unsigned int *param_len, + char **data, unsigned int *data_len); + +/* The following definitions come from libsmb/credentials.c */ + +char *credstr(const uchar *cred); +void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass, + uchar session_key[8]); +void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp, + DOM_CHAL *cred); +int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred, + UTIME timestamp); +BOOL clnt_deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred); +BOOL deal_with_creds(uchar sess_key[8], + DOM_CRED *sto_clnt_cred, + DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred); + +/* The following definitions come from libsmb/doserr.c */ + +const char *dos_errstr(WERROR werror); + +/* The following definitions come from libsmb/errormap.c */ + +NTSTATUS dos_to_ntstatus(int eclass, int ecode); +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode); +NTSTATUS werror_to_ntstatus(WERROR error); +WERROR ntstatus_to_werror(NTSTATUS error); + +/* The following definitions come from libsmb/namecache.c */ + +BOOL namecache_enable(void); +void namecache_store(const char *name, int name_type, + int num_names, struct in_addr *ip_list); +BOOL namecache_fetch(const char *name, int name_type, struct in_addr **ip_list, + int *num_names); +void namecache_flush(void); + +/* The following definitions come from libsmb/namequery.c */ + +struct node_status *node_status_query(int fd,struct nmb_name *name, + struct in_addr to_ip, int *num_names); +BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name); +BOOL name_register(int fd, const char *name, int name_type, + struct in_addr name_ip, int opcode, + BOOL bcast, + struct in_addr to_ip, int *count); +struct in_addr *name_query(int fd,const char *name,int name_type, + BOOL bcast,BOOL recurse, + struct in_addr to_ip, int *count, int *flags); +FILE *startlmhosts(const char *fname); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +void endlmhosts(FILE *fp); +BOOL name_register_wins(const char *name, int name_type); +BOOL name_resolve_bcast(const char *name, int name_type, + struct in_addr **return_ip_list, int *return_count); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL resolve_name_2(const char *name, struct in_addr **return_ip, int *count, int name_type); +BOOL resolve_srv_name(const char* srv_name, fstring dest_host, + struct in_addr *ip); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL lookup_dc_name(const char *srcname, const char *domain, + struct in_addr *dc_ip, char *ret_name); +BOOL get_dc_list(BOOL pdc_only, const char *group, struct in_addr **ip_list, int *count); +BOOL get_lmb_list(struct in_addr **ip_list, int *count); + +/* The following definitions come from libsmb/nmblib.c */ + +void debug_nmb_packet(struct packet_struct *p); +char *nmb_namestr(struct nmb_name *n); +struct packet_struct *copy_packet(struct packet_struct *packet); +void free_packet(struct packet_struct *packet); +struct packet_struct *parse_packet(char *buf,int length, + enum packet_type packet_type); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +void make_nmb_name( struct nmb_name *n, const char *name, int type); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +int build_packet(char *buf, struct packet_struct *p); +BOOL send_packet(struct packet_struct *p); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id); +struct packet_struct *receive_dgram_packet(int fd, int t, const char *mailslot_name); +BOOL match_mailslot_name(struct packet_struct *p, const char *mailslot_name); +void sort_query_replies(char *data, int n, struct in_addr ip); +char *dns_to_netbios_name(char *dns_name); +int name_mangle( char *In, char *Out, char name_type ); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); + +/* The following definitions come from libsmb/nterr.c */ + +const char *get_nt_error_msg(NTSTATUS nt_code); +const char *nt_errstr(NTSTATUS nt_code); +const char *get_nt_error_c_code(NTSTATUS nt_code); + +/* The following definitions come from libsmb/passchange.c */ + +BOOL remote_password_change(const char *remote_machine, const char *user_name, + const char *old_passwd, const char *new_passwd, + char *err_str, size_t err_str_len); + +/* The following definitions come from libsmb/pwd_cache.c */ + +void pwd_init(struct pwd_info *pwd); +BOOL pwd_is_nullpwd(const struct pwd_info *pwd); +BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_nullpwd(struct pwd_info *pwd); +void pwd_set_cleartext(struct pwd_info *pwd, const char *clr); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); + +/* The following definitions come from lib/smbrun.c */ + +int smbrun(char *cmd, int *outfd); + +/* The following definitions come from libsmb/smbdes.c */ + +void E_P16(const unsigned char *p14,unsigned char *p16); +void E_P24(const unsigned char *p21, const unsigned char *c8, unsigned char *p24); +void D_P16(const unsigned char *p14, const unsigned char *in, unsigned char *out); +void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *out); +void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key); +void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw); +void SamOEMhash( unsigned char *data, const unsigned char *key, int val); +void sam_pwd_hash(unsigned int rid, const uchar *in, uchar *out, int forw); + +/* The following definitions come from libsmb/smbencrypt.c */ + +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24); +void E_md4hash(const uchar *passwd, uchar *p16); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL encode_pw_buffer(char buffer[516], const char *new_pass, + int new_pw_len, BOOL nt_pass_set); +BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, + int new_pwrd_size, uint32 *new_pw_len, + uchar nt_p16[16], uchar p16[16]); +void nt_owf_genW(const UNISTR2 *pwd, uchar nt_p16[16]); + +/* The following definitions come from libsmb/smberr.c */ + +const char *smb_dos_err_name(uint8 class, uint16 num); +const char *get_dos_error_msg(WERROR result); +const char *smb_dos_err_class(uint8 class); +const char *smb_dos_errstr(char *inbuf); +WERROR map_werror_from_unix(int error); + +/* The following definitions come from libsmb/unexpected.c */ + +void unexpected_packet(struct packet_struct *p); +void clear_unexpected(time_t t); +struct packet_struct *receive_unexpected(enum packet_type packet_type, int id, + const char *mailslot_name); + +/* The following definitions come from lib/snprintf.c */ + + +/* The following definitions come from lib/substitute.c */ + +void sub_set_smb_name(const char *name); +const char* get_remote_machine_name(void); +void standard_sub_basic(char *str, int len); +void standard_sub_advanced(int snum, char *user, const char *connectpath, gid_t gid, char *str, int len); +void standard_sub_conn(connection_struct *conn, char *str, int len); +void standard_sub_home(int snum, char *user, char *str, int len); +void standard_sub_snum(int snum, char *str, int len); +void standard_sub_vuser(char *str, int len, user_struct *vuser); +void standard_sub_vsnum(char *str, int len, user_struct *vuser, int snum); + +/* The following definitions come from lib/sysacls.c */ + +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *path); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *type_p); +int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d); +int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d, SMB_ACL_PERM_T perm); +char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p); +SMB_ACL_T sys_acl_init(int count); +int sys_acl_create_entry(SMB_ACL_T *acl_p, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T tag_type); +int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d, void *qual_p); +int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T permset_d); +int sys_acl_valid(SMB_ACL_T acl_d); +int sys_acl_set_file(const char *name, SMB_ACL_TYPE_T type, SMB_ACL_T acl_d); +int sys_acl_set_fd(int fd, SMB_ACL_T acl_d); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T acl_d) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T posix_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); +int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T sys_acl_get_fd(int fd); +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen); +int sys_acl_free_text(char *text); +SMB_ACL_T sys_acl_init( int count); +int sys_acl_create_entry( SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual); +int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int sys_acl_valid( SMB_ACL_T theacl ); +int sys_acl_set_file( const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int sys_acl_set_fd( int fd, SMB_ACL_T theacl); +int sys_acl_delete_def_file(const char *name); +int sys_acl_free_acl(SMB_ACL_T the_acl) ; +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); + +/* The following definitions come from lib/system.c */ + +int sys_usleep(long usecs); +ssize_t sys_read(int fd, void *buf, size_t count); +ssize_t sys_write(int fd, const void *buf, size_t count); +ssize_t sys_send(int s, const void *msg, size_t len, int flags); +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); +ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); +int sys_fcntl_ptr(int fd, int cmd, void *arg); +int sys_fcntl_long(int fd, int cmd, long arg); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_fstat(int fd,SMB_STRUCT_STAT *sbuf); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_ftruncate(int fd, SMB_OFF_T offset); +SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +SMB_OFF_T sys_ftell(FILE *fp); +int sys_creat(const char *path, mode_t mode); +int sys_open(const char *path, int oflag, mode_t mode); +FILE *sys_fopen(const char *path, const char *type); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev); +char *sys_realpath(const char *path, char *resolved_path); +int sys_waitpid(pid_t pid,int *status,int options); +char *sys_getwd(char *s); +int sys_symlink(const char *oldpath, const char *newpath); +int sys_readlink(const char *path, char *buf, size_t bufsiz); +int sys_link(const char *oldpath, const char *newpath); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_chroot(const char *dname); +struct hostent *sys_gethostbyname(const char *name); +void oplock_set_capability(BOOL this_process, BOOL inherit); +long sys_random(void); +void sys_srandom(unsigned int seed); +int groups_max(void); +int sys_getgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +int sys_setgroups(int setlen, gid_t *gidset); +void sys_setpwent(void); +struct passwd *sys_getpwent(void); +void sys_endpwent(void); +struct passwd *sys_getpwnam(const char *name); +struct passwd *sys_getpwuid(uid_t uid); +int wsys_stat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_lstat(const smb_ucs2_t *wfname,SMB_STRUCT_STAT *sbuf); +int wsys_creat(const smb_ucs2_t *wfname, mode_t mode); +int wsys_open(const smb_ucs2_t *wfname, int oflag, mode_t mode); +FILE *wsys_fopen(const smb_ucs2_t *wfname, const char *type); +DIR *wsys_opendir(const smb_ucs2_t *wfname); +smb_ucs2_t *wsys_getwd(smb_ucs2_t *s); +int wsys_chown(const smb_ucs2_t *wfname, uid_t uid, gid_t gid); +int wsys_chroot(const smb_ucs2_t *wfname); +pid_t sys_fork(void); +pid_t sys_getpid(void); +int sys_popen(const char *command); +int sys_pclose(int fd); +void *sys_dlopen(const char *name, int flags); +void *sys_dlsym(void *handle, const char *symbol); +int sys_dlclose (void *handle); +const char *sys_dlerror(void); +void sys_adminlog(int priority, const char *format_str, ...); + +/* The following definitions come from lib/talloc.c */ + +TALLOC_CTX *talloc_init(void); +void *talloc(TALLOC_CTX *t, size_t size); +void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size); +void talloc_destroy_pool(TALLOC_CTX *t); +void talloc_destroy(TALLOC_CTX *t); +size_t talloc_pool_size(TALLOC_CTX *t); +const char * talloc_pool_name(TALLOC_CTX const *t); +void *talloc_zero(TALLOC_CTX *t, size_t size); +void *talloc_memdup(TALLOC_CTX *t, const void *p, size_t size); +char *talloc_strdup(TALLOC_CTX *t, const char *p); +char *talloc_describe_all(TALLOC_CTX *rt); +void talloc_get_allocation(TALLOC_CTX *t, + size_t *total_bytes, + int *n_chunks); + +/* The following definitions come from lib/time.c */ + +time_t get_time_t_min(void); +time_t get_time_t_max(void); +void GetTimeOfDay(struct timeval *tval); +void TimeInit(void); +void get_process_uptime(struct timeval *ret_time); +int TimeDiff(time_t t); +struct tm *LocalTime(time_t *t); +time_t nt_time_to_unix(NTTIME *nt); +time_t nt_time_to_unix_abs(NTTIME *nt); +time_t interpret_long_date(char *p); +void unix_to_nt_time(NTTIME *nt, time_t t); +void unix_to_nt_time_abs(NTTIME *nt, time_t t); +void put_long_date(char *p,time_t t); +BOOL null_mtime(time_t mtime); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +char *http_timestring(time_t t); +char *timestring(BOOL hires); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +void init_nt_time(NTTIME *nt); + +/* The following definitions come from lib/ufc.c */ + +char *ufc_crypt(const char *key,const char *salt); + +/* The following definitions come from lib/username.c */ + +BOOL name_is_local(const char *name); +char *get_user_home_dir(char *user); +char *get_user_service_home_dir(char *user); +BOOL map_username(char *user); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +BOOL user_in_group_list(char *user,char *gname); +BOOL user_in_list(char *user,char *list); +struct passwd *smb_getpwnam(char *user, BOOL allow_change); + +/* The following definitions come from lib/util.c */ + +const char *tmpdir(void); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +const char *Atoic(const char *p, int *n, const char *c); +const char *get_numlist(const char *p, uint32 **num, int *count); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +time_t file_modtime(const char *fname); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +SMB_OFF_T get_file_size(char *file_name); +char *attrib_string(uint16 mode); +void show_msg(char *buf); +void smb_setlen(char *buf,int len); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int set_message_bcc(char *buf,int num_bytes); +int set_message_end(void *outbuf,void *end_ptr); +void dos_clean_name(char *s); +void unix_clean_name(char *s); +void make_dir_struct(char *buf,const char *mask,const char *fname,SMB_OFF_T size,int mode,time_t date); +void close_low_fds(void); +int set_blocking(int fd, BOOL set); +ssize_t transfer_file_internal(int infd, int outfd, size_t n, ssize_t (*read_fn)(int, void *, size_t), + ssize_t (*write_fn)(int, const void *, size_t)); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n); +void msleep(unsigned int t); +void become_daemon(void); +BOOL yesno(char *p); +void *Realloc(void *p,size_t size); +void safe_free(void *p); +BOOL get_myname(char *my_name); +int interpret_protocol(char *str,int def); +BOOL is_ipaddress(const char *str); +uint32 interpret_addr(const char *str); +struct in_addr *interpret_addr2(const char *str); +BOOL is_zero_ip(struct in_addr ip); +void zero_ip(struct in_addr *ip); +char *automount_lookup(char *user_name); +char *automount_lookup(char *user_name); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL process_exists(pid_t pid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); +uid_t nametouid(char *name); +gid_t nametogid(char *name); +void smb_panic(const char *why); +char *readdirname(DIR *p); +BOOL is_in_path(const char *name, name_compare_entry *namelist); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void free_namearray(name_compare_entry *name_array); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL is_myname(char *s); +const char* get_my_primary_ip (void); +BOOL is_myname_or_ipaddr(char *s); +void set_remote_arch(enum remote_arch_types type); +enum remote_arch_types get_remote_arch(void); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void dump_data(int level,char *buf1,int len); +char *tab_depth(int depth); +int str_checksum(const char *s); +void zero_free(void *p, size_t size); +int set_maxfiles(int requested_max); +BOOL reg_split_key(const char *full_keyname, uint32 *reg_type, char *key_name); +int smb_mkstemp(char *template); +void *smb_xmalloc(size_t size); +void *smb_xmemdup(const void *p, size_t size); +char *smb_xstrdup(const char *s); +int smb_xvasprintf(char **ptr, const char *format, va_list ap); +void *memdup(void *p, size_t size); +char *myhostname(void); +char *lock_path(const char *name); +char *pid_path(char *name); +char *parent_dirname(const char *path); +BOOL ms_has_wild(char *s); +BOOL mask_match(const char *string, char *pattern, BOOL is_case_sensitive); +BOOL unix_wild_match(char *pattern, char *string); +DATA_BLOB data_blob(const void *p, size_t length); +DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length); +void data_blob_free(DATA_BLOB *d); +void data_blob_clear(DATA_BLOB *d); +int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); + +/* The following definitions come from lib/util_file.c */ + +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + int *file_lock_depth, BOOL update); +void endfilepwent(void *vp, int *file_lock_depth); +SMB_BIG_UINT getfilepwpos(void *vp); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +int getfileline(void *vp, char *linebuf, int linebuf_size); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *file_pload(const char *syscmd, size_t *size); +char *fd_load(int fd, size_t *size); +char *file_load(const char *fname, size_t *size); +char **file_lines_load(const char *fname, int *numlines, BOOL convert); +char **fd_lines_load(int fd, int *numlines, BOOL convert); +char **file_lines_pload(const char *syscmd, int *numlines, BOOL convert); +void file_lines_free(char **lines); +void file_lines_slashcont(char **lines); + +/* The following definitions come from lib/util_getent.c */ + +struct sys_grent * getgrent_list(void); +void grent_free (struct sys_grent *glist); +struct sys_pwent * getpwent_list(void); +void pwent_free (struct sys_pwent *plist); +struct sys_userlist *get_users_in_group(const char *gname); +void free_userlist(struct sys_userlist *list_head); + +/* The following definitions come from lib/util_seaccess.c */ + +void se_map_generic(uint32 *access_mask, struct generic_mapping *mapping); +void se_map_standard(uint32 *access_mask, struct standard_mapping *mapping); +BOOL se_access_check(SEC_DESC *sd, NT_USER_TOKEN *token, + uint32 acc_desired, uint32 *acc_granted, + NTSTATUS *status); +SEC_DESC_BUF *se_create_child_secdesc(TALLOC_CTX *ctx, SEC_DESC *parent_ctr, + BOOL child_container); + +/* The following definitions come from lib/util_sec.c */ + +void sec_init(void); +uid_t sec_initial_uid(void); +gid_t sec_initial_gid(void); +BOOL non_root_mode(void); +void gain_root_privilege(void); +void gain_root_group_privilege(void); +void set_effective_uid(uid_t uid); +void set_effective_gid(gid_t gid); +void save_re_uid(void); +void restore_re_uid(void); +void save_re_gid(void); +void restore_re_gid(void); +int set_re_uid(void); +void become_user_permanently(uid_t uid, gid_t gid); +BOOL is_setuid_root(void) ; + +/* The following definitions come from lib/util_sid.c */ + +void generate_wellknown_sids(void); +BOOL map_domain_sid_to_name(DOM_SID *sid, char *nt_domain); +BOOL lookup_known_rid(DOM_SID *sid, uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL map_domain_name_to_sid(DOM_SID *sid, char *nt_domain); +void split_domain_name(const char *fullname, char *domain, char *name); +char *sid_to_string(fstring sidstr_out, const DOM_SID *sid); +const char *sid_string_static(const DOM_SID *sid); +BOOL string_to_sid(DOM_SID *sidout, const char *sidstr); +BOOL sid_append_rid(DOM_SID *sid, uint32 rid); +BOOL sid_split_rid(DOM_SID *sid, uint32 *rid); +BOOL sid_peek_rid(DOM_SID *sid, uint32 *rid); +void sid_copy(DOM_SID *dst, const DOM_SID *src); +DOM_SID *sid_dup(DOM_SID *src); +BOOL sid_linearize(char *outbuf, size_t len, DOM_SID *sid); +BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid); +int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2); +int sid_compare_domain(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2); +BOOL sid_check_is_domain(const DOM_SID *sid); +BOOL sid_check_is_builtin(const DOM_SID *sid); +BOOL sid_check_is_in_our_domain(const DOM_SID *sid); +BOOL sid_check_is_in_builtin(const DOM_SID *sid); +size_t sid_size(DOM_SID *sid); +BOOL non_mappable_sid(DOM_SID *sid); +char *sid_binstring(DOM_SID *sid); + +/* The following definitions come from lib/util_sock.c */ + +BOOL is_a_socket(int fd); +void set_socket_options(int fd, const char *options); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +BOOL send_keepalive(int client); +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL send_smb(int fd,char *buffer); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind ); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +void client_setfd(int fd); +char *client_name(void); +char *client_addr(void); +char *get_socket_name(int fd); +char *get_socket_addr(int fd); +int create_pipe_sock(const char *socket_dir, + const char *socket_name, + mode_t dir_perms); +int sock_exec(const char *prog); + +/* The following definitions come from lib/util_str.c */ + +void set_first_token(char *ptr); +BOOL next_token(const char **ptr,char *buff,const char *sep, size_t bufsize); +char **toktocliplist(int *ctok, const char *sep); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +BOOL strequal(const char *s1, const char *s2); +BOOL strequal_unix(const char *s1, const char *s2); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL strcsequal(const char *s1,const char *s2); +int strwicmp(const char *psz1, const char *psz2); +void strlower(char *s); +void strupper(char *s); +char *strupper_static(const char *s); +void strnorm(char *s); +BOOL strisnormal(char *s); +void string_replace(char *s,char oldc,char newc); +char *skip_string(char *buf,size_t n); +size_t str_charnum(const char *s); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL strhasupper(const char *s); +BOOL strhaslower(const char *s); +size_t count_chars(const char *s,char c); +BOOL str_is_all(const char *s,char c); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength); +char *StrnCpy(char *dest,const char *src,size_t n); +char *strncpyn(char *dest, const char *src,size_t n, char c); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +BOOL in_list(char *s,char *list,BOOL casesensitive); +void string_free(char **s); +BOOL string_set(char **dest,const char *src); +void string_sub(char *s,const char *pattern,const char *insert, size_t len); +void fstring_sub(char *s,const char *pattern,const char *insert); +void pstring_sub(char *s,const char *pattern,const char *insert); +void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); +void split_at_last_component(char *path, char *front, char sep, char *back); +const char *octal_string(int i); +char *string_truncate(char *s, int length); +char *binary_string(char *buf, int len); + +/* The following definitions come from lib/util_unistr.c */ + +size_t unix_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); +void unistr_to_dos(char *dest, const char *src, size_t len); +char *skip_unibuf(char *src, size_t len); +char *dos_unistrn2(uint16 *src, int len); +char *dos_unistr2(uint16 *src); +char *dos_unistr2_to_str(UNISTR2 *str); +void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); +void unistr_to_ascii(char *dest, const uint16 *src, int len); +void unistr2_to_dos(char *dest, const UNISTR2 *str, size_t maxlen); +void unistr2_to_unix(char *dest, const UNISTR2 *str, size_t maxlen); +uint32 buffer2_to_uint32(BUFFER2 *str); +char *dos_buffer2_to_str(BUFFER2 *str); +char *dos_buffer2_to_multistr(BUFFER2 *str); +size_t dos_struni2(char *dst, const char *src, size_t max_len); +char *dos_unistr(char *buf); +int unistrlen(uint16 *s); +int unistrcpy(uint16 *dst, uint16 *src); +void default_unicode_map(smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_unicode_map(const char *codepage, smb_ucs2_t **pp_cp_to_ucs2, uint16 **pp_ucs2_to_cp); +BOOL load_dos_unicode_map(int codepage); +BOOL load_unix_unicode_map(const char *unix_char_set, BOOL override); +smb_ucs2_t *multibyte_to_unicode(smb_ucs2_t *dst, const char *src, + size_t dst_len, smb_ucs2_t *cp_to_ucs2); +char *unicode_to_unix(char *dst, const smb_ucs2_t *src, size_t dst_len); +smb_ucs2_t *unix_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t unicode_to_unix_char(char *dst, const smb_ucs2_t src); +char *unicode_to_dos(char *dst, const smb_ucs2_t *src, size_t dst_len); +size_t unicode_to_dos_char(char *dst, const smb_ucs2_t src); +smb_ucs2_t *dos_to_unicode(smb_ucs2_t *dst, const char *src, size_t dst_len); +size_t strlen_w(const smb_ucs2_t *src); +smb_ucs2_t *safe_strcpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src, size_t maxlength); +smb_ucs2_t *safe_strcat_w(smb_ucs2_t *dest, const smb_ucs2_t *src, size_t maxlength); +int strcmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +int strncmp_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2, size_t len); +smb_ucs2_t *strstr_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c); +smb_ucs2_t *strtok_w(smb_ucs2_t *s1, const smb_ucs2_t *s2); +smb_ucs2_t *strdup_w(const smb_ucs2_t *s); +int isupper_w( smb_ucs2_t val); +int islower_w( smb_ucs2_t val); +int isdigit_w( smb_ucs2_t val); +int isxdigit_w( smb_ucs2_t val); +int isspace_w( smb_ucs2_t val); +smb_ucs2_t toupper_w( smb_ucs2_t val ); +smb_ucs2_t tolower_w( smb_ucs2_t val ); +void set_first_token_w(smb_ucs2_t *ptr); +BOOL next_token_w(smb_ucs2_t **ptr, smb_ucs2_t *buff, smb_ucs2_t *sep, size_t bufsize); +smb_ucs2_t **toktocliplist_w(int *ctok, smb_ucs2_t *sep); +int StrCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t); +int StrnCaseCmp_w(const smb_ucs2_t *s, const smb_ucs2_t *t, size_t n); +BOOL strequal_w(const smb_ucs2_t *s1, const smb_ucs2_t *s2); +BOOL strnequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2,size_t n); +BOOL strcsequal_w(const smb_ucs2_t *s1,const smb_ucs2_t *s2); +void strlower_w(smb_ucs2_t *s); +void strupper_w(smb_ucs2_t *s); +void strnorm_w(smb_ucs2_t *s); +BOOL strisnormal_w(smb_ucs2_t *s); +void string_replace_w(smb_ucs2_t *s, smb_ucs2_t oldc, smb_ucs2_t newc); +smb_ucs2_t *skip_string_w(smb_ucs2_t *buf,size_t n); +size_t str_charnum_w(const smb_ucs2_t *s); +BOOL trim_string_w(smb_ucs2_t *s,const smb_ucs2_t *front,const smb_ucs2_t *back); +BOOL strhasupper_w(const smb_ucs2_t *s); +BOOL strhaslower_w(const smb_ucs2_t *s); +size_t count_chars_w(const smb_ucs2_t *s,smb_ucs2_t c); +BOOL str_is_all_w(const smb_ucs2_t *s,smb_ucs2_t c); +smb_ucs2_t *alpha_strcpy_w(smb_ucs2_t *dest, const smb_ucs2_t *src, const smb_ucs2_t *other_safe_chars, size_t maxlength); +smb_ucs2_t *StrnCpy_w(smb_ucs2_t *dest,const smb_ucs2_t *src,size_t n); +smb_ucs2_t *strncpyn_w(smb_ucs2_t *dest, const smb_ucs2_t *src,size_t n, smb_ucs2_t c); +size_t strhex_to_str_w(char *p, size_t len, const smb_ucs2_t *strhex); +BOOL in_list_w(smb_ucs2_t *s,smb_ucs2_t *list,BOOL casesensitive); +BOOL string_init_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_free_w(smb_ucs2_t **s); +BOOL string_set_w(smb_ucs2_t **dest,const smb_ucs2_t *src); +void string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void fstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert); +void pstring_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,smb_ucs2_t *insert); +void all_string_sub_w(smb_ucs2_t *s,const smb_ucs2_t *pattern,const smb_ucs2_t *insert, size_t len); +void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t sep, smb_ucs2_t *back); +smb_ucs2_t *octal_string_w(int i); +smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); +smb_ucs2_t doscp2ucs2(int w); +int ucs2doscp(smb_ucs2_t w); +int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags); + +/* The following definitions come from lib/wins_srv.c */ + +BOOL wins_srv_load_list( const char *src ); +struct in_addr wins_srv_ip( void ); +void wins_srv_died( struct in_addr boothill_ip ); +unsigned long wins_srv_count( void ); + +/* The following definitions come from locking/brlock.c */ + +void brl_init(int read_only); +void brl_shutdown(int read_only); +NTSTATUS brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum, + uint16 smbpid, pid_t pid, uint16 tid, + br_off start, br_off size, + enum brl_type lock_type); +BOOL brl_unlock(SMB_DEV_T dev, SMB_INO_T ino, int fnum, + uint16 smbpid, pid_t pid, uint16 tid, + br_off start, br_off size, + BOOL remove_pending_locks_only, + void (*pre_unlock_fn)(void *), + void *pre_unlock_data); +BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum, + uint16 smbpid, pid_t pid, uint16 tid, + br_off start, br_off size, + enum brl_type lock_type, int check_self); +void brl_close(SMB_DEV_T dev, SMB_INO_T ino, pid_t pid, int tid, int fnum); +int brl_forall(BRLOCK_FN(fn)); + +/* The following definitions come from locking/locking.c */ + +BOOL is_locked(files_struct *fsp,connection_struct *conn, + SMB_BIG_UINT count,SMB_BIG_UINT offset, + enum brl_type lock_type, BOOL check_self); +NTSTATUS do_lock_spin(files_struct *fsp,connection_struct *conn, uint16 lock_pid, + SMB_BIG_UINT count,SMB_BIG_UINT offset,enum brl_type lock_type); +NTSTATUS do_unlock(files_struct *fsp,connection_struct *conn, uint16 lock_pid, + SMB_BIG_UINT count,SMB_BIG_UINT offset); +void locking_close_file(files_struct *fsp); +BOOL locking_init(int read_only); +BOOL locking_end(void); +BOOL lock_share_entry(connection_struct *conn, + SMB_DEV_T dev, SMB_INO_T inode); +void unlock_share_entry(connection_struct *conn, + SMB_DEV_T dev, SMB_INO_T inode); +BOOL lock_share_entry_fsp(files_struct *fsp); +void unlock_share_entry_fsp(files_struct *fsp); +char *share_mode_str(int num, share_mode_entry *e); +int get_share_modes(connection_struct *conn, + SMB_DEV_T dev, SMB_INO_T inode, + share_mode_entry **pp_shares); +BOOL share_modes_identical( share_mode_entry *e1, share_mode_entry *e2); +ssize_t del_share_entry( SMB_DEV_T dev, SMB_INO_T inode, + share_mode_entry *entry, share_mode_entry **ppse); +ssize_t del_share_mode(files_struct *fsp, share_mode_entry **ppse); +BOOL set_share_mode(files_struct *fsp, uint16 port, uint16 op_type); +BOOL remove_share_oplock(files_struct *fsp); +BOOL downgrade_share_oplock(files_struct *fsp); +BOOL modify_delete_flag( SMB_DEV_T dev, SMB_INO_T inode, BOOL delete_on_close); +int share_mode_forall(SHAREMODE_FN(fn)); + +/* The following definitions come from locking/posix.c */ + +int fd_close_posix(struct connection_struct *conn, files_struct *fsp); +BOOL is_posix_locked(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count, enum brl_type lock_type); +BOOL set_posix_lock(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count, enum brl_type lock_type); +BOOL release_posix_lock(files_struct *fsp, SMB_BIG_UINT u_offset, SMB_BIG_UINT u_count); +void posix_locking_close_file(files_struct *fsp); +BOOL posix_locking_init(int read_only); +BOOL posix_locking_end(void); + +/* The following definitions come from msdfs/msdfs.c */ + +BOOL is_msdfs_link(connection_struct* conn, char* path, + struct referral** reflistp, int* refcnt, + SMB_STRUCT_STAT *sbufp); +BOOL dfs_redirect(char* pathname, connection_struct* conn, + BOOL findfirst_flag); +BOOL get_referred_path(char *pathname, struct junction_map* jn, + int* consumedcntp, BOOL* self_referralp); +int setup_dfs_referral(char* pathname, int max_referral_level, char** ppdata); +int dfs_path_error(char* inbuf, char* outbuf); +BOOL create_junction(char* pathname, struct junction_map* jn); +BOOL create_msdfs_link(struct junction_map* jn, BOOL exists); +BOOL remove_msdfs_link(struct junction_map* jn); +int enum_msdfs_links(struct junction_map* jn); + +/* The following definitions come from nmbd/asyncdns.c */ + +int asyncdns_fd(void); +void kill_async_dns_child(void); +void start_async_dns(void); +void run_dns_queue(void); +BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, + struct name_record **n); +BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question, + struct name_record **n); +void kill_async_dns_child(void); + +/* The following definitions come from nmbd/nmbd_become_dmb.c */ + +void add_domain_names(time_t t); + +/* The following definitions come from nmbd/nmbd_become_lmb.c */ + +void insert_permanent_name_into_unicast( struct subnet_record *subrec, + struct nmb_name *nmbname, uint16 nb_type ); +void unbecome_local_master_browser(struct subnet_record *subrec, struct work_record *work, + BOOL force_new_election); +void become_local_master_browser(struct subnet_record *subrec, struct work_record *work); +void set_workgroup_local_master_browser_name( struct work_record *work, const char *newname); + +/* The following definitions come from nmbd/nmbd_browserdb.c */ + +void update_browser_death_time( struct browse_cache_record *browc ); +struct browse_cache_record *create_browser_in_lmb_cache( char *work_name, + char *browser_name, + struct in_addr ip ); +struct browse_cache_record *find_browser_in_lmb_cache( char *browser_name ); +void expire_lmb_browsers( time_t t ); + +/* The following definitions come from nmbd/nmbd_browsesync.c */ + +void dmb_expire_and_sync_browser_lists(time_t t); +void announce_and_sync_with_domain_master_browser( struct subnet_record *subrec, + struct work_record *work); +void collect_all_workgroup_names_from_wins_server(time_t t); +void sync_all_dmbs(time_t t); + +/* The following definitions come from nmbd/nmbd.c */ + + +/* The following definitions come from nmbd/nmbd_elections.c */ + +void check_master_browser_exists(time_t t); +void run_elections(time_t t); +void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf); +BOOL check_elections(void); +void nmbd_message_election(int msg_type, pid_t src, void *buf, size_t len); + +/* The following definitions come from nmbd/nmbd_incomingdgrams.c */ + +void tell_become_backup(void); +void process_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_workgroup_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_local_master_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_master_browser_announce(struct subnet_record *subrec, + struct packet_struct *p,char *buf); +void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_get_backup_list_request(struct subnet_record *subrec, + struct packet_struct *p,char *buf); +void process_reset_browser(struct subnet_record *subrec, + struct packet_struct *p,char *buf); +void process_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf); +void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf); + +/* The following definitions come from nmbd/nmbd_incomingrequests.c */ + +void process_name_release_request(struct subnet_record *subrec, + struct packet_struct *p); +void process_name_refresh_request(struct subnet_record *subrec, + struct packet_struct *p); +void process_name_registration_request(struct subnet_record *subrec, + struct packet_struct *p); +void process_node_status_request(struct subnet_record *subrec, struct packet_struct *p); +void process_name_query_request(struct subnet_record *subrec, struct packet_struct *p); + +/* The following definitions come from nmbd/nmbd_lmhosts.c */ + +void load_lmhosts_file(char *fname); +BOOL find_name_in_lmhosts(struct nmb_name *nmbname, struct name_record **namerecp); + +/* The following definitions come from nmbd/nmbd_logonnames.c */ + +void add_logon_names(void); + +/* The following definitions come from nmbd/nmbd_mynames.c */ + +void register_my_workgroup_one_subnet(struct subnet_record *subrec); +BOOL register_my_workgroup_and_names(void); +void release_my_names(void); +void refresh_my_names(time_t t); + +/* The following definitions come from nmbd/nmbd_namelistdb.c */ + +void set_samba_nb_type(void); +void remove_name_from_namelist( struct subnet_record *subrec, + struct name_record *namerec ); +struct name_record *find_name_on_subnet( struct subnet_record *subrec, + struct nmb_name *nmbname, + BOOL self_only ); +struct name_record *find_name_for_remote_broadcast_subnet( + struct nmb_name *nmbname, + BOOL self_only ); +void update_name_ttl( struct name_record *namerec, int ttl ); +struct name_record *add_name_to_subnet( struct subnet_record *subrec, + const char *name, + int type, + uint16 nb_flags, + int ttl, + enum name_source source, + int num_ips, + struct in_addr *iplist); +void standard_success_register(struct subnet_record *subrec, + struct userdata_struct *userdata, + struct nmb_name *nmbname, uint16 nb_flags, int ttl, + struct in_addr registered_ip); +void standard_fail_register( struct subnet_record *subrec, + struct response_record *rrec, + struct nmb_name *nmbname ); +BOOL find_ip_in_name_record( struct name_record *namerec, struct in_addr ip ); +void add_ip_to_name_record( struct name_record *namerec, struct in_addr new_ip ); +void remove_ip_from_name_record( struct name_record *namerec, + struct in_addr remove_ip ); +void standard_success_release( struct subnet_record *subrec, + struct userdata_struct *userdata, + struct nmb_name *nmbname, + struct in_addr released_ip ); +void expire_names_on_subnet(struct subnet_record *subrec, time_t t); +void expire_names(time_t t); +void add_samba_names_to_subnet( struct subnet_record *subrec ); +void dump_all_namelists(void); + +/* The following definitions come from nmbd/nmbd_namequery.c */ + +BOOL query_name(struct subnet_record *subrec, char *name, int type, + query_name_success_function success_fn, + query_name_fail_function fail_fn, + struct userdata_struct *userdata); +BOOL query_name_from_wins_server(struct in_addr ip_to, + char *name, int type, + query_name_success_function success_fn, + query_name_fail_function fail_fn, + struct userdata_struct *userdata); + +/* The following definitions come from nmbd/nmbd_nameregister.c */ + +BOOL register_name(struct subnet_record *subrec, + const char *name, int type, uint16 nb_flags, + register_name_success_function success_fn, + register_name_fail_function fail_fn, + struct userdata_struct *userdata); +BOOL refresh_name(struct subnet_record *subrec, struct name_record *namerec, + refresh_name_success_function success_fn, + refresh_name_fail_function fail_fn, + struct userdata_struct *userdata); + +/* The following definitions come from nmbd/nmbd_namerelease.c */ + +BOOL release_name(struct subnet_record *subrec, struct name_record *namerec, + release_name_success_function success_fn, + release_name_fail_function fail_fn, + struct userdata_struct *userdata); + +/* The following definitions come from nmbd/nmbd_nodestatus.c */ + +BOOL node_status(struct subnet_record *subrec, struct nmb_name *nmbname, + struct in_addr send_ip, node_status_success_function success_fn, + node_status_fail_function fail_fn, struct userdata_struct *userdata); + +/* The following definitions come from nmbd/nmbd_packets.c */ + +uint16 get_nb_flags(char *buf); +void set_nb_flags(char *buf, uint16 nb_flags); +struct response_record *queue_register_name( struct subnet_record *subrec, + response_function resp_fn, + timeout_response_function timeout_fn, + register_name_success_function success_fn, + register_name_fail_function fail_fn, + struct userdata_struct *userdata, + struct nmb_name *nmbname, + uint16 nb_flags); +struct response_record *queue_register_multihomed_name( struct subnet_record *subrec, + response_function resp_fn, + timeout_response_function timeout_fn, + register_name_success_function success_fn, + register_name_fail_function fail_fn, + struct userdata_struct *userdata, + struct nmb_name *nmbname, + uint16 nb_flags, + struct in_addr register_ip); +struct response_record *queue_release_name( struct subnet_record *subrec, + response_function resp_fn, + timeout_response_function timeout_fn, + release_name_success_function success_fn, + release_name_fail_function fail_fn, + struct userdata_struct *userdata, + struct nmb_name *nmbname, + uint16 nb_flags, + struct in_addr release_ip); +struct response_record *queue_refresh_name( struct subnet_record *subrec, + response_function resp_fn, + timeout_response_function timeout_fn, + refresh_name_success_function success_fn, + refresh_name_fail_function fail_fn, + struct userdata_struct *userdata, + struct name_record *namerec, + struct in_addr refresh_ip); +struct response_record *queue_query_name( struct subnet_record *subrec, + response_function resp_fn, + timeout_response_function timeout_fn, + query_name_success_function success_fn, + query_name_fail_function fail_fn, + struct userdata_struct *userdata, + struct nmb_name *nmbname); +struct response_record *queue_query_name_from_wins_server( struct in_addr to_ip, + response_function resp_fn, + timeout_response_function timeout_fn, + query_name_success_function success_fn, + query_name_fail_function fail_fn, + struct userdata_struct *userdata, + struct nmb_name *nmbname); +struct response_record *queue_node_status( struct subnet_record *subrec, + response_function resp_fn, + timeout_response_function timeout_fn, + node_status_success_function success_fn, + node_status_fail_function fail_fn, + struct userdata_struct *userdata, + struct nmb_name *nmbname, + struct in_addr send_ip); +void reply_netbios_packet(struct packet_struct *orig_packet, + int rcode, enum netbios_reply_type_code rcv_code, int opcode, + int ttl, char *data,int len); +void run_packet_queue(void); +void retransmit_or_expire_response_records(time_t t); +BOOL listen_for_packets(BOOL run_election); +BOOL send_mailslot(BOOL unique, const char *mailslot,char *buf,int len, + const char *srcname, int src_type, + const char *dstname, int dest_type, + struct in_addr dest_ip,struct in_addr src_ip, + int dest_port); + +/* The following definitions come from nmbd/nmbd_processlogon.c */ + +void process_logon_packet(struct packet_struct *p,char *buf,int len, + const char *mailslot); + +/* The following definitions come from nmbd/nmbd_responserecordsdb.c */ + +void remove_response_record(struct subnet_record *subrec, + struct response_record *rrec); +struct response_record *make_response_record( struct subnet_record *subrec, + struct packet_struct *p, + response_function resp_fn, + timeout_response_function timeout_fn, + success_function success_fn, + fail_function fail_fn, + struct userdata_struct *userdata); +struct response_record *find_response_record(struct subnet_record **ppsubrec, + uint16 id); +BOOL is_refresh_already_queued(struct subnet_record *subrec, struct name_record *namerec); + +/* The following definitions come from nmbd/nmbd_sendannounce.c */ + +void send_browser_reset(int reset_type, const char *to_name, int to_type, struct in_addr to_ip); +void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work); +void announce_my_server_names(time_t t); +void announce_my_lm_server_names(time_t t); +void reset_announce_timer(void); +void announce_myself_to_domain_master_browser(time_t t); +void announce_my_servers_removed(void); +void announce_remote(time_t t); +void browse_sync_remote(time_t t); + +/* The following definitions come from nmbd/nmbd_serverlistdb.c */ + +void remove_all_servers(struct work_record *work); +struct server_record *find_server_in_workgroup(struct work_record *work, char *name); +void remove_server_from_workgroup(struct work_record *work, struct server_record *servrec); +struct server_record *create_server_on_workgroup(struct work_record *work, + char *name,int servertype, + int ttl,char *comment); +void update_server_ttl(struct server_record *servrec, int ttl); +void expire_servers(struct work_record *work, time_t t); +void write_browse_list_entry(FILE *fp, fstring name, uint32 rec_type, + fstring local_master_browser_name, fstring description); +void write_browse_list(time_t t, BOOL force_write); + +/* The following definitions come from nmbd/nmbd_subnetdb.c */ + +void close_subnet(struct subnet_record *subrec); +struct subnet_record *make_normal_subnet(struct interface *iface); +BOOL create_subnets(void); +BOOL we_are_a_wins_client(void); +struct subnet_record *get_next_subnet_maybe_unicast(struct subnet_record *subrec); +struct subnet_record *get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record *subrec); + +/* The following definitions come from nmbd/nmbd_synclists.c */ + +void sync_browse_lists(struct work_record *work, + char *name, int nm_type, + struct in_addr ip, BOOL local, BOOL servers); +void sync_check_completion(void); + +/* The following definitions come from nmbd/nmbd_winsproxy.c */ + +void make_wins_proxy_name_query_request( struct subnet_record *subrec, + struct packet_struct *incoming_packet, + struct nmb_name *question_name); + +/* The following definitions come from nmbd/nmbd_winsserver.c */ + +BOOL packet_is_for_wins_server(struct packet_struct *packet); +BOOL initialise_wins(void); +void wins_process_name_refresh_request(struct subnet_record *subrec, + struct packet_struct *p); +void wins_process_name_registration_request(struct subnet_record *subrec, + struct packet_struct *p); +void wins_process_multihomed_name_registration_request( struct subnet_record *subrec, + struct packet_struct *p); +void send_wins_name_query_response(int rcode, struct packet_struct *p, + struct name_record *namerec); +void wins_process_name_query_request(struct subnet_record *subrec, + struct packet_struct *p); +void wins_process_name_release_request(struct subnet_record *subrec, + struct packet_struct *p); +void initiate_wins_processing(time_t t); +void wins_write_database(BOOL background); + +/* The following definitions come from nmbd/nmbd_workgroupdb.c */ + +struct work_record *find_workgroup_on_subnet(struct subnet_record *subrec, + const char *name); +struct work_record *create_workgroup_on_subnet(struct subnet_record *subrec, + const char *name, int ttl); +void update_workgroup_ttl(struct work_record *work, int ttl); +void initiate_myworkgroup_startup(struct subnet_record *subrec, struct work_record *work); +void dump_workgroups(BOOL force_write); +void expire_workgroups_and_servers(time_t t); + +/* The following definitions come from nsswitch/wb_client.c */ + +BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, + enum SID_NAME_USE *name_type); +BOOL winbind_lookup_sid(DOM_SID *sid, + fstring dom_name, fstring name, + enum SID_NAME_USE *name_type); +BOOL winbind_sid_to_uid(uid_t *puid, DOM_SID *sid); +BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid); +BOOL winbind_sid_to_gid(gid_t *pgid, DOM_SID *sid); +BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid); +int winbind_initgroups(char *user, gid_t gid); +int winbind_getgroups(const char *user, int size, gid_t *list); +BOOL winbind_uidtoname(fstring name, uid_t uid); +BOOL winbind_gidtoname(fstring name, gid_t gid); +BOOL winbind_nametouid(uid_t *puid, const char *name); +BOOL winbind_nametogid(gid_t *pgid, const char *gname); + +/* The following definitions come from nsswitch/wb_common.c */ + +void free_response(struct winbindd_response *response); +void winbind_exclude_domain(const char *domain); +void init_request(struct winbindd_request *request, int request_type); +void init_response(struct winbindd_response *response); +void close_sock(void); +int winbind_open_pipe_sock(void); +int write_sock(void *buffer, int count); +int read_reply(struct winbindd_response *response); + +/* The following definitions come from param/loadparm.c */ + +void lp_talloc_free(void); +char *lp_logfile(void); +char *lp_configfile(void); +char *lp_tdb_passwd_file(void); +char *lp_smb_passwd_file(void); +char *lp_serverstring(void); +char *lp_printcapname(void); +char *lp_enumports_cmd(void); +char *lp_addprinter_cmd(void); +char *lp_deleteprinter_cmd(void); +char *lp_os2_driver_map(void); +char *lp_lockdir(void); +char *lp_piddir(void); +char *lp_utmpdir(void); +char *lp_wtmpdir(void); +BOOL lp_utmp(void); +char *lp_rootdir(void); +char *lp_source_environment(void); +char *lp_defaultservice(void); +char *lp_msg_command(void); +char *lp_dfree_command(void); +char *lp_hosts_equiv(void); +char *lp_auto_services(void); +char *lp_passwd_program(void); +char *lp_passwd_chat(void); +char *lp_passwordserver(void); +char *lp_name_resolve_order(void); +char *lp_workgroup(void); +char *lp_username_map(void); +char *lp_groupname_map(void); +char *lp_logon_script(void); +char *lp_logon_path(void); +char *lp_logon_drive(void); +char *lp_logon_home(void); +char *lp_remote_announce(void); +char *lp_remote_browse_sync(void); +char *lp_wins_server(void); +char *lp_interfaces(void); +char *lp_socket_address(void); +char *lp_nis_home_map_name(void); +char *lp_netbios_aliases(void); +char *lp_panic_action(void); +char *lp_adduser_script(void); +char *lp_deluser_script(void); +char *lp_wins_hook(void); +char *lp_domain_admin_group(void); +char *lp_domain_guest_group(void); +char *lp_template_homedir(void); +char *lp_template_shell(void); +char *lp_winbind_separator(void); +char *lp_acl_compatibility(void); +BOOL lp_winbind_enum_users(void); +BOOL lp_winbind_enum_groups(void); +BOOL lp_winbind_use_default_domain(void); +char *lp_codepagedir(void); +char *lp_ldap_server(void); +char *lp_ldap_suffix(void); +char *lp_ldap_filter(void); +char *lp_ldap_admin_dn(void); +int lp_ldap_port(void); +int lp_ldap_ssl(void); +char *lp_add_share_cmd(void); +char *lp_change_share_cmd(void); +char *lp_delete_share_cmd(void); +char *lp_mangling_method(void); +int lp_ssl_version(void); +char *lp_ssl_hosts(void); +char *lp_ssl_hosts_resign(void); +char *lp_ssl_cacertdir(void); +char *lp_ssl_cacertfile(void); +char *lp_ssl_server_cert(void); +char *lp_ssl_server_privkey(void); +char *lp_ssl_client_cert(void); +char *lp_ssl_client_privkey(void); +char *lp_ssl_ciphers(void); +char *lp_ssl_egdsocket(void); +char *lp_ssl_entropyfile(void); +int lp_ssl_entropybytes(void); +BOOL lp_ssl_enabled(void); +BOOL lp_ssl_reqClientCert(void); +BOOL lp_ssl_reqServerCert(void); +BOOL lp_ssl_compatibility(void); +BOOL lp_ms_add_printer_wizard(void); +BOOL lp_dns_proxy(void); +BOOL lp_wins_support(void); +BOOL lp_we_are_a_wins_server(void); +BOOL lp_wins_proxy(void); +BOOL lp_local_master(void); +BOOL lp_domain_logons(void); +BOOL lp_load_printers(void); +BOOL lp_use_rhosts(void); +BOOL lp_readprediction(void); +BOOL lp_readbmpx(void); +BOOL lp_readraw(void); +BOOL lp_large_readwrite(void); +BOOL lp_writeraw(void); +BOOL lp_null_passwords(void); +BOOL lp_obey_pam_restrictions(void); +BOOL lp_strip_dot(void); +BOOL lp_encrypted_passwords(void); +BOOL lp_update_encrypted(void); +BOOL lp_syslog_only(void); +BOOL lp_admin_log(void); +BOOL lp_timestamp_logs(void); +BOOL lp_debug_hires_timestamp(void); +BOOL lp_debug_pid(void); +BOOL lp_debug_uid(void); +BOOL lp_browse_list(void); +BOOL lp_nis_home_map(void); +BOOL lp_bind_interfaces_only(void); +BOOL lp_pam_password_change(void); +BOOL lp_unix_password_sync(void); +BOOL lp_passwd_chat_debug(void); +BOOL lp_nt_smb_support(void); +BOOL lp_nt_pipe_support(void); +BOOL lp_nt_status_support(void); +BOOL lp_stat_cache(void); +BOOL lp_allow_trusted_domains(void); +BOOL lp_restrict_anonymous(void); +BOOL lp_lanman_auth(void); +BOOL lp_host_msdfs(void); +BOOL lp_kernel_oplocks(void); +BOOL lp_enhanced_browsing(void); +BOOL lp_use_mmap(void); +BOOL lp_unix_extensions(void); +int lp_os_level(void); +int lp_max_ttl(void); +int lp_max_wins_ttl(void); +int lp_min_wins_ttl(void); +int lp_max_log_size(void); +int lp_max_open_files(void); +int lp_maxxmit(void); +int lp_maxmux(void); +int lp_passwordlevel(void); +int lp_usernamelevel(void); +int lp_readsize(void); +int lp_deadtime(void); +int lp_maxprotocol(void); +int lp_minprotocol(void); +int lp_security(void); +int lp_maxdisksize(void); +int lp_lpqcachetime(void); +int lp_max_smbd_processes(void); +int lp_disable_spoolss(void); +int lp_totalprintjobs(void); +int lp_syslog(void); +int lp_client_code_page(void); +int lp_lm_announce(void); +int lp_lm_interval(void); +int lp_machine_password_timeout(void); +int lp_change_notify_timeout(void); +int lp_stat_cache_size(void); +int lp_map_to_guest(void); +int lp_min_passwd_length(void); +int lp_oplock_break_wait_time(void); +int lp_lock_spin_count(void); +int lp_lock_sleep_time(void); +int lp_name_cache_timeout(void); +char *lp_preexec(int ); +char *lp_postexec(int ); +char *lp_rootpreexec(int ); +char *lp_rootpostexec(int ); +char *lp_servicename(int ); +char *lp_pathname(int ); +char *lp_dontdescend(int ); +char *lp_username(int ); +char *lp_guestaccount(int ); +char *lp_invalid_users(int ); +char *lp_valid_users(int ); +char *lp_admin_users(int ); +char *lp_printcommand(int ); +char *lp_lpqcommand(int ); +char *lp_lprmcommand(int ); +char *lp_lppausecommand(int ); +char *lp_lpresumecommand(int ); +char *lp_queuepausecommand(int ); +char *lp_queueresumecommand(int ); +char *lp_driverfile(int ); +char *lp_printerdriver(int ); +char *lp_hostsallow(int ); +char *lp_hostsdeny(int ); +char *lp_magicscript(int ); +char *lp_magicoutput(int ); +char *lp_comment(int ); +char *lp_force_user(int ); +char *lp_force_group(int ); +char *lp_readlist(int ); +char *lp_writelist(int ); +char *lp_printer_admin(int ); +char *lp_fstype(int ); +char *lp_vfsobj(int ); +char *lp_vfs_options(int ); +char *lp_mangled_map(int ); +char *lp_veto_files(int ); +char *lp_hide_files(int ); +char *lp_veto_oplocks(int ); +char *lp_driverlocation(int ); +BOOL lp_msdfs_root(int ); +BOOL lp_autoloaded(int ); +BOOL lp_preexec_close(int ); +BOOL lp_rootpreexec_close(int ); +BOOL lp_casesensitive(int ); +BOOL lp_preservecase(int ); +BOOL lp_shortpreservecase(int ); +BOOL lp_casemangle(int ); +BOOL lp_status(int ); +BOOL lp_hide_dot_files(int ); +BOOL lp_hideunreadable(int ); +BOOL lp_browseable(int ); +BOOL lp_readonly(int ); +BOOL lp_no_set_dir(int ); +BOOL lp_guest_ok(int ); +BOOL lp_guest_only(int ); +BOOL lp_print_ok(int ); +BOOL lp_postscript(int ); +BOOL lp_map_hidden(int ); +BOOL lp_map_archive(int ); +BOOL lp_locking(int ); +BOOL lp_strict_locking(int ); +BOOL lp_share_modes(int ); +BOOL lp_posix_locking(int ); +BOOL lp_oplocks(int ); +BOOL lp_level2_oplocks(int ); +BOOL lp_onlyuser(int ); +BOOL lp_manglednames(int ); +BOOL lp_widelinks(int ); +BOOL lp_symlinks(int ); +BOOL lp_syncalways(int ); +BOOL lp_strict_allocate(int ); +BOOL lp_strict_sync(int ); +BOOL lp_map_system(int ); +BOOL lp_delete_readonly(int ); +BOOL lp_fake_oplocks(int ); +BOOL lp_recursive_veto_delete(int ); +BOOL lp_dos_filemode(int ); +BOOL lp_dos_filetimes(int ); +BOOL lp_dos_filetime_resolution(int ); +BOOL lp_fake_dir_create_times(int ); +BOOL lp_blocking_locks(int ); +BOOL lp_inherit_perms(int ); +BOOL lp_inherit_acls(int ); +BOOL lp_use_client_driver(int ); +BOOL lp_default_devmode(int ); +BOOL lp_nt_acl_support(int ); +BOOL lp_force_unknown_acl_user(int ); +BOOL lp_use_sendfile(int ); +BOOL lp_profile_acls(int ); +int lp_create_mask(int ); +int lp_force_create_mode(int ); +int lp_security_mask(int ); +int lp_force_security_mode(int ); +int lp_dir_mask(int ); +int lp_force_dir_mode(int ); +int lp_dir_security_mask(int ); +int lp_force_dir_security_mode(int ); +int lp_max_connections(int ); +int lp_defaultcase(int ); +int lp_minprintspace(int ); +int lp_printing(int ); +int lp_oplock_contention_limit(int ); +int lp_csc_policy(int ); +int lp_write_cache_size(int ); +int lp_block_size(int ); +char lp_magicchar(int ); +int lp_winbind_cache_time(void); +BOOL lp_hide_local_users(void); +BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir); +int lp_add_service(char *pszService, int iDefaultService); +BOOL lp_add_printer(char *pszPrintername, int iDefaultService); +BOOL lp_file_list_changed(void); +BOOL lp_winbind_uid(uid_t *low, uid_t *high); +BOOL lp_winbind_gid(gid_t *low, gid_t *high); +void *lp_local_ptr(int snum, void *ptr); +BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue); +void init_locals(void); +BOOL lp_is_default(int snum, struct parm_struct *parm); +struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters); +BOOL lp_snum_ok(int iService); +void lp_add_one_printer(char *name, char *comment); +BOOL lp_loaded(void); +void lp_killunused(BOOL (*snumused) (int)); +void lp_killservice(int iServiceIn); +BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults, + BOOL add_ipc); +void lp_resetnumservices(void); +int lp_numservices(void); +void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint, char *(*dos_to_ext)(const char *)); +void lp_dump_one(FILE * f, BOOL show_defaults, int snum, char *(*dos_to_ext)(const char *)); +int lp_servicenumber(const char *pszServiceName); +char *volume_label(int snum); +int lp_server_role(void); +BOOL lp_domain_master(void); +BOOL lp_preferred_master(void); +void lp_remove_service(int snum); +void lp_copy_service(int snum, char *new_name); +int lp_default_server_announce(void); +int lp_major_announce_version(void); +int lp_minor_announce_version(void); +void lp_set_name_resolve_order(char *new_order); +char *lp_printername(int snum); +void get_private_directory(pstring priv_dir); +void lp_set_logfile(const char *name); +const char *get_called_name(void); +int lp_maxprintjobs(int snum); + +/* The following definitions come from param/params.c */ + +BOOL pm_process( char *FileName, + BOOL (*sfunc)(char *), + BOOL (*pfunc)(char *, char *) ); + +/* The following definitions come from passdb/machine_sid.c */ + +BOOL pdb_generate_sam_sid(void); + +/* The following definitions come from passdb/pampass.c */ + +BOOL smb_pam_claim_session(char *user, char *tty, char *rhost); +BOOL smb_pam_close_session(char *user, char *tty, char *rhost); +NTSTATUS smb_pam_accountcheck(const char * user); +NTSTATUS smb_pam_passcheck(char * user, char * password); +BOOL smb_pam_passchange(const char * user, const char * oldpassword, const char * newpassword); +NTSTATUS smb_pam_accountcheck(const char * user); +BOOL smb_pam_claim_session(char *user, char *tty, char *rhost); +BOOL smb_pam_close_session(char *in_user, char *tty, char *rhost); + +/* The following definitions come from passdb/pass_check.c */ + +void dfs_unlogin(void); +BOOL pass_check(char *user, char *password, int pwlen, struct passwd *pwd, + BOOL (*fn) (char *, char *)); + +/* The following definitions come from passdb/passdb.c */ + +BOOL initialize_password_db(BOOL reload); +BOOL pdb_init_sam(SAM_ACCOUNT **user); +BOOL pdb_init_sam_pw(SAM_ACCOUNT **new_sam_acct, struct passwd *pwd); +BOOL pdb_reset_sam(SAM_ACCOUNT *user); +BOOL pdb_free_sam(SAM_ACCOUNT *user); +struct sam_disp_info *pdb_sam_to_dispinfo(SAM_ACCOUNT *user); +char *pdb_encode_acct_ctrl(uint16 acct_ctrl, size_t length); +uint16 pdb_decode_acct_ctrl(const char *p); +void pdb_sethexpwd(char *p, unsigned char *pwd, uint16 acct_ctrl); +BOOL pdb_gethexpwd(char *p, unsigned char *pwd); +BOOL pdb_name_to_rid(char *user_name, uint32 *u_rid, uint32 *g_rid); +uid_t pdb_user_rid_to_uid(uint32 user_rid); +gid_t pdb_user_rid_to_gid(uint32 user_rid); +uint32 pdb_uid_to_user_rid(uid_t uid); +uint32 pdb_gid_to_group_rid(gid_t gid); +BOOL pdb_rid_is_user(uint32 rid); +BOOL local_lookup_rid(uint32 rid, char *name, enum SID_NAME_USE *psid_name_use); +BOOL local_lookup_name(const char *c_domain, const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psid_name_use); +DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid); +BOOL local_sid_to_uid(uid_t *puid, DOM_SID *psid, enum SID_NAME_USE *name_type); +DOM_SID *local_gid_to_sid(DOM_SID *psid, gid_t gid); +BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type); +void copy_id23_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_23 *from); +void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from); +void copy_sam_passwd(SAM_ACCOUNT *to, const SAM_ACCOUNT *from); +BOOL local_password_change(const char *user_name, int local_flags, + const char *new_passwd, + char *err_str, size_t err_str_len, + char *msg_str, size_t msg_str_len); +uint16 pdb_get_acct_ctrl (SAM_ACCOUNT *sampass); +time_t pdb_get_logon_time (SAM_ACCOUNT *sampass); +time_t pdb_get_logoff_time (SAM_ACCOUNT *sampass); +time_t pdb_get_kickoff_time (SAM_ACCOUNT *sampass); +time_t pdb_get_pass_last_set_time (SAM_ACCOUNT *sampass); +time_t pdb_get_pass_can_change_time (SAM_ACCOUNT *sampass); +time_t pdb_get_pass_must_change_time (SAM_ACCOUNT *sampass); +uint16 pdb_get_logon_divs (SAM_ACCOUNT *sampass); +uint32 pdb_get_hours_len (SAM_ACCOUNT *sampass); +uint8* pdb_get_hours (SAM_ACCOUNT *sampass); +uint8* pdb_get_nt_passwd (SAM_ACCOUNT *sampass); +uint8* pdb_get_lanman_passwd (SAM_ACCOUNT *sampass); +uint32 pdb_get_user_rid (SAM_ACCOUNT *sampass); +uint32 pdb_get_group_rid (SAM_ACCOUNT *sampass); +uid_t pdb_get_uid (SAM_ACCOUNT *sampass); +gid_t pdb_get_gid (SAM_ACCOUNT *sampass); +char* pdb_get_username (SAM_ACCOUNT *sampass); +char* pdb_get_domain (SAM_ACCOUNT *sampass); +char* pdb_get_nt_username (SAM_ACCOUNT *sampass); +char* pdb_get_fullname (SAM_ACCOUNT *sampass); +char* pdb_get_homedir (SAM_ACCOUNT *sampass); +char* pdb_get_dirdrive (SAM_ACCOUNT *sampass); +char* pdb_get_logon_script (SAM_ACCOUNT *sampass); +char* pdb_get_profile_path (SAM_ACCOUNT *sampass); +char* pdb_get_acct_desc (SAM_ACCOUNT *sampass); +char* pdb_get_workstations (SAM_ACCOUNT *sampass); +char* pdb_get_munged_dial (SAM_ACCOUNT *sampass); +uint32 pdb_get_unknown3 (SAM_ACCOUNT *sampass); +uint32 pdb_get_unknown5 (SAM_ACCOUNT *sampass); +uint32 pdb_get_unknown6 (SAM_ACCOUNT *sampass); +BOOL pdb_set_acct_ctrl (SAM_ACCOUNT *sampass, uint16 flags); +BOOL pdb_set_logon_time (SAM_ACCOUNT *sampass, time_t mytime); +BOOL pdb_set_logoff_time (SAM_ACCOUNT *sampass, time_t mytime); +BOOL pdb_set_kickoff_time (SAM_ACCOUNT *sampass, time_t mytime); +BOOL pdb_set_pass_can_change_time (SAM_ACCOUNT *sampass, time_t mytime); +BOOL pdb_set_pass_must_change_time (SAM_ACCOUNT *sampass, time_t mytime); +BOOL pdb_set_pass_last_set_time (SAM_ACCOUNT *sampass, time_t mytime); +BOOL pdb_set_hours_len (SAM_ACCOUNT *sampass, uint32 len); +BOOL pdb_set_logon_divs (SAM_ACCOUNT *sampass, uint16 hours); +BOOL pdb_set_init_flag (SAM_ACCOUNT *sampass, uint32 flag); +BOOL pdb_set_uid (SAM_ACCOUNT *sampass, uid_t uid); +BOOL pdb_set_gid (SAM_ACCOUNT *sampass, gid_t gid); +BOOL pdb_set_user_rid (SAM_ACCOUNT *sampass, uint32 rid); +BOOL pdb_set_group_rid (SAM_ACCOUNT *sampass, uint32 grid); +BOOL pdb_set_username(SAM_ACCOUNT *sampass, char *username); +BOOL pdb_set_domain(SAM_ACCOUNT *sampass, char *domain); +BOOL pdb_set_nt_username(SAM_ACCOUNT *sampass, char *nt_username); +BOOL pdb_set_fullname(SAM_ACCOUNT *sampass, char *fullname); +BOOL pdb_set_logon_script(SAM_ACCOUNT *sampass, char *logon_script, BOOL store); +BOOL pdb_set_profile_path (SAM_ACCOUNT *sampass, char *profile_path, BOOL store); +BOOL pdb_set_dir_drive (SAM_ACCOUNT *sampass, char *dir_drive, BOOL store); +BOOL pdb_set_homedir (SAM_ACCOUNT *sampass, char *homedir, BOOL store); +BOOL pdb_set_acct_desc (SAM_ACCOUNT *sampass, char *acct_desc); +BOOL pdb_set_workstations (SAM_ACCOUNT *sampass, char *workstations); +BOOL pdb_set_munged_dial (SAM_ACCOUNT *sampass, char *munged_dial); +BOOL pdb_set_nt_passwd (SAM_ACCOUNT *sampass, uint8 *pwd); +BOOL pdb_set_lanman_passwd (SAM_ACCOUNT *sampass, uint8 *pwd); +BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, const char *plaintext); +BOOL pdb_set_unknown_3 (SAM_ACCOUNT *sampass, uint32 unkn); +BOOL pdb_set_unknown_5 (SAM_ACCOUNT *sampass, uint32 unkn); +BOOL pdb_set_unknown_6 (SAM_ACCOUNT *sampass, uint32 unkn); +BOOL pdb_set_hours (SAM_ACCOUNT *sampass, uint8 *hours); +BOOL pdb_getsampwuid (SAM_ACCOUNT* user, uid_t uid); + +/* The following definitions come from passdb/pdb_ldap.c */ + +BOOL pdb_setsampwent(BOOL update); +void pdb_endsampwent(void); +BOOL pdb_getsampwent(SAM_ACCOUNT * user); +BOOL pdb_getsampwnam(SAM_ACCOUNT * user, const char *sname); +BOOL pdb_getsampwrid(SAM_ACCOUNT * user, uint32 rid); +BOOL pdb_delete_sam_account(const char *sname); +BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override); +BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd); + +/* The following definitions come from passdb/pdb_nisplus.c */ + +BOOL pdb_setsampwent(BOOL update); +void pdb_endsampwent(void); +BOOL pdb_getsampwent(SAM_ACCOUNT *user); +BOOL pdb_getsampwnam(SAM_ACCOUNT * user, const char *sname); +BOOL pdb_getsampwrid(SAM_ACCOUNT * user, uint32 rid); +BOOL pdb_delete_sam_account(const char *sname); +BOOL pdb_add_sam_account(SAM_ACCOUNT * newpwd); +BOOL pdb_update_sam_account(SAM_ACCOUNT * newpwd, BOOL override); + +/* The following definitions come from passdb/pdb_smbpasswd.c */ + +BOOL pdb_setsampwent (BOOL update); +void pdb_endsampwent (void); +BOOL pdb_getsampwent(SAM_ACCOUNT *user); +BOOL pdb_getsampwnam(SAM_ACCOUNT *sam_acct, const char *username); +BOOL pdb_getsampwrid(SAM_ACCOUNT *sam_acct,uint32 rid); +BOOL pdb_add_sam_account(SAM_ACCOUNT *sampass); +BOOL pdb_update_sam_account(SAM_ACCOUNT *sampass, BOOL override); +BOOL pdb_delete_sam_account (const char* username); + +/* The following definitions come from passdb/pdb_tdb.c */ + +BOOL pdb_setsampwent(BOOL update); +void pdb_endsampwent(void); +BOOL pdb_getsampwent(SAM_ACCOUNT *user); +BOOL pdb_getsampwnam (SAM_ACCOUNT *user, const char *sname); +BOOL pdb_getsampwrid (SAM_ACCOUNT *user, uint32 rid); +BOOL pdb_delete_sam_account(const char *sname); +BOOL pdb_update_sam_account (SAM_ACCOUNT *newpwd, BOOL override); +BOOL pdb_add_sam_account (SAM_ACCOUNT *newpwd); + +/* The following definitions come from passdb/secrets.c */ + +BOOL secrets_init(void); +void *secrets_fetch(const char *key, size_t *size); +BOOL secrets_store(const char *key, const void *data, size_t size); +BOOL secrets_delete(const char *key); +BOOL secrets_store_domain_sid(const char *domain, DOM_SID *sid); +BOOL secrets_fetch_domain_sid(const char *domain, DOM_SID *sid); +const char *trust_keystr(const char *domain); +BOOL secrets_lock_trust_account_password(const char *domain, BOOL dolock); +BOOL secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16], + time_t *pass_last_set_time); +BOOL secrets_store_trust_account_password(const char *domain, uint8 new_pwd[16]); +BOOL trust_password_delete(const char *domain); +void reset_globals_after_fork(void); +BOOL secrets_store_ldap_pw(const char* dn, const char* pw); +BOOL fetch_ldap_pw(const char *dn, char* pw, int len); +BOOL secrets_named_mutex(const char *name, unsigned int timeout); +void secrets_named_mutex_release(const char *name); + +/* The following definitions come from passdb/smbpassfile.c */ + +BOOL migrate_from_old_password_file(char *domain); + +/* The following definitions come from printing/load.c */ + +void add_all_printers(void); +void load_printers(void); + +/* The following definitions come from printing/lpq_parse.c */ + +BOOL parse_lpq_entry(int snum,char *line, + print_queue_struct *buf, + print_status_struct *status,BOOL first); + +/* The following definitions come from printing/nt_printing.c */ + +BOOL nt_printing_init(void); +uint32 update_c_setprinter(BOOL initialize); +uint32 get_c_setprinter(void); +int get_builtin_ntforms(nt_forms_struct **list); +BOOL get_a_builtin_ntform(UNISTR2 *uni_formname,nt_forms_struct *form); +int get_ntforms(nt_forms_struct **list); +int write_ntforms(nt_forms_struct **list, int number); +BOOL add_a_form(nt_forms_struct **list, const FORM *form, int *count); +BOOL delete_a_form(nt_forms_struct **list, UNISTR2 *del_name, int *count, WERROR *ret); +void update_a_form(nt_forms_struct **list, const FORM *form, int count); +int get_ntdrivers(fstring **list, char *architecture, uint32 version); +BOOL get_short_archi(char *short_archi, const char *long_archi); +WERROR clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, + uint32 level, struct current_user *user); +BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, + struct current_user *user, WERROR *perr); +uint32 get_a_printer_driver_9x_compatible(pstring line, const fstring model); +uint32 del_a_printer(char *sharename); +void add_a_specific_param(NT_PRINTER_INFO_LEVEL_2 *info_2, NT_PRINTER_PARAM **param); +BOOL unlink_specific_param_if_exist(NT_PRINTER_INFO_LEVEL_2 *info_2, NT_PRINTER_PARAM *param); +void free_nt_printer_param(NT_PRINTER_PARAM **param_ptr); +NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename); +NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode); +void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr); +void get_printer_subst_params(int snum, fstring *printername, fstring *sharename, fstring *portname); +WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level); +BOOL set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level); +BOOL del_driver_init(char *drivername); +uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level); +WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, NT_PRINTER_PARAM *param); +WERROR get_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level, fstring sharename); +uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level); +uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level); +WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level, + fstring drivername, const fstring architecture, uint32 version); +uint32 free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level); +BOOL printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3 ); +WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct current_user *user, + uint32 version, BOOL delete_files ); +BOOL get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer, uint32 level, uint32 param_index, + fstring value, uint8 **data, uint32 *type, uint32 *len); +BOOL get_specific_param(NT_PRINTER_INFO_LEVEL printer, uint32 level, + fstring value, uint8 **data, uint32 *type, uint32 *len); +WERROR nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr); +BOOL nt_printing_getsec(TALLOC_CTX *ctx, char *printername, SEC_DESC_BUF **secdesc_ctr); +void map_printer_permissions(SEC_DESC *sd); +BOOL print_access_check(struct current_user *user, int snum, int access_type); +BOOL print_time_access_check(int snum); +WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_default); + +/* The following definitions come from printing/pcap.c */ + +BOOL pcap_printername_ok(char *pszPrintername, const char *pszPrintcapname); +void pcap_printer_fn(void (*fn)(char *, char *)); + +/* The following definitions come from printing/print_cups.c */ + +void cups_printer_fn(void (*fn)(char *, char *)); +int cups_printername_ok(const char *name); + +/* The following definitions come from printing/printfsp.c */ + +files_struct *print_fsp_open(connection_struct *conn, char *fname); +void print_fsp_end(files_struct *fsp, BOOL normal_close); + +/* The following definitions come from printing/print_generic.c */ + + +/* The following definitions come from printing/printing.c */ + +BOOL print_backend_init(void); +BOOL print_job_exists(int jobid); +int print_job_snum(int jobid); +int print_job_fd(int jobid); +char *print_job_fname(int jobid); +BOOL print_job_set_place(int jobid, int place); +BOOL print_job_set_name(int jobid, char *name); +BOOL print_job_delete(struct current_user *user, int jobid, WERROR *errcode); +BOOL print_job_pause(struct current_user *user, int jobid, WERROR *errcode); +BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode); +int print_job_write(int jobid, const char *buf, int size); +int print_queue_length(int snum, print_status_struct *pstatus); +int print_job_start(struct current_user *user, int snum, char *jobname); +void print_job_endpage(int jobid); +BOOL print_job_end(int jobid, BOOL normal_close); +int print_queue_status(int snum, + print_queue_struct **queue, + print_status_struct *status); +int print_queue_snum(char *qname); +BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode); +BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode); +BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode); + +/* The following definitions come from printing/print_svid.c */ + +void sysv_printer_fn(void (*fn)(char *, char *)); +int sysv_printername_ok(char *name); + +/* The following definitions come from profile/profile.c */ + +void profile_message(int msg_type, pid_t src, void *buf, size_t len); +void reqprofile_message(int msg_type, pid_t src, void *buf, size_t len); +BOOL profile_setup(BOOL rdonly); + +/* The following definitions come from rpc_client/cli_login.c */ + +NTSTATUS cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16]); +BOOL cli_nt_srv_pwset(struct cli_state *cli, unsigned char *new_hashof_mach_pwd); +NTSTATUS cli_nt_login_interactive(struct cli_state *cli, char *unix_domain, char *unix_username, + uint32 smb_userid_low, char *unix_password, + NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3); +NTSTATUS cli_nt_login_network(struct cli_state *cli, char *unix_domain, char *unix_username, + uint32 smb_userid_low, const char lm_chal[8], + const char *lm_chal_resp, const char *nt_chal_resp, + NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3); +BOOL cli_nt_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr); + +/* The following definitions come from rpc_client/cli_netlogon.c */ + +BOOL cli_net_logon_ctrl2(struct cli_state *cli, NTSTATUS status_level); +NTSTATUS cli_net_auth2(struct cli_state *cli, uint16 sec_chan, + uint32 neg_flags, DOM_CHAL *srv_chal); +BOOL cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal); +BOOL cli_net_srv_pwset(struct cli_state *cli, uint8 hashed_mach_pwd[16]); +NTSTATUS cli_net_sam_logon(struct cli_state *cli, NET_ID_INFO_CTR *ctr, + NET_USER_INFO_3 *user_info3); +BOOL cli_net_sam_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr); + +/* The following definitions come from rpc_client/cli_pipe.c */ + +BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num, + prs_struct *data, prs_struct *rdata); +BOOL rpc_pipe_bind(struct cli_state *cli, const char *pipe_name, char *my_name); +void cli_nt_set_ntlmssp_flgs(struct cli_state *cli, uint32 ntlmssp_flgs); +BOOL cli_nt_session_open(struct cli_state *cli, const char *pipe_name); +void cli_nt_session_close(struct cli_state *cli); + +/* The following definitions come from rpc_client/cli_spoolss_notify.c */ + +BOOL spoolss_disconnect_from_client( struct cli_state *cli); +BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine); +WERROR cli_spoolss_reply_open_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printer, uint32 localprinter, uint32 type, + POLICY_HND *handle); +WERROR cli_spoolss_reply_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle); +WERROR cli_spoolss_routerreplyprinter (struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 condition, uint32 changd_id); +WERROR cli_spoolss_reply_rrpcn(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, PRINTER_MESSAGE_INFO *info, + NT_PRINTER_INFO_LEVEL *printer); + +/* The following definitions come from rpc_client/cli_trust.c */ + +BOOL change_trust_account_password( char *domain, const char *remote_machine_list); + +/* The following definitions come from rpcclient/cmd_dfs.c */ + + +/* The following definitions come from rpcclient/cmd_lsarpc.c */ + + +/* The following definitions come from rpcclient/cmd_netlogon.c */ + + +/* The following definitions come from rpcclient/cmd_reg.c */ + + +/* The following definitions come from rpcclient/cmd_samr.c */ + + +/* The following definitions come from rpcclient/cmd_spoolss.c */ + +BOOL get_short_archi(char *short_archi, const char *long_archi); +void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch); + +/* The following definitions come from rpcclient/cmd_srvsvc.c */ + + +/* The following definitions come from rpcclient/display_sec.c */ + +char *get_sec_mask_str(uint32 type); +void display_sec_access(SEC_ACCESS *info); +void display_sec_ace(SEC_ACE *ace); +void display_sec_acl(SEC_ACL *sec_acl); +void display_sec_desc(SEC_DESC *sec); + +/* The following definitions come from rpcclient/rpcclient.c */ + +void fetch_machine_sid(struct cli_state *cli); +int main(int argc, char *argv[]); + +/* The following definitions come from rpc_parse/parse_dfs.c */ + +void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d); +BOOL dfs_io_q_dfs_exist(const char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth); +BOOL dfs_io_r_dfs_exist(const char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int depth); +BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, const char *entrypath, + const char *servername, const char *sharename); +BOOL dfs_io_q_dfs_remove(const char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth); +BOOL dfs_io_r_dfs_remove(const char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int depth); +BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, const char *entrypath, const char *servername, + const char *sharename, const char *comment, uint32 flags); +BOOL dfs_io_q_dfs_add(const char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth); +BOOL dfs_io_r_dfs_add(const char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth); +BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, const char *entrypath, + const char *servername, const char *sharename, + uint32 info_level); +BOOL dfs_io_q_dfs_get_info(const char* desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth); +BOOL dfs_io_r_dfs_get_info(const char* desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, int depth); +BOOL init_dfs_q_dfs_enum(DFS_Q_DFS_ENUM *q_d, uint32 level, DFS_INFO_CTR *ctr); +BOOL dfs_io_q_dfs_enum(const char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int depth); +BOOL dfs_io_dfs_info_ctr(const char *desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint32 level, prs_struct* ps, int depth); +BOOL dfs_io_r_dfs_enum(const char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth); +BOOL dfs_io_dfs_storage_info(const char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_lsa.c */ + +void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name, + uint16 sid_name_use, const char *name, uint32 idx); +void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff); +void init_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, LSA_SEC_QOS *qos); +void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name, + uint32 attributes, uint32 desired_access, + LSA_SEC_QOS *qos); +BOOL lsa_io_q_open_pol(const char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, + int depth); +BOOL lsa_io_r_open_pol(const char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, + int depth); +void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, const char *server_name, + uint32 attributes, uint32 desired_access, + LSA_SEC_QOS *qos); +BOOL lsa_io_q_open_pol2(const char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps, + int depth); +BOOL lsa_io_r_open_pol2(const char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps, + int depth); +void init_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ *q_q, const POLICY_HND *hnd, + uint32 sec_info); +BOOL lsa_io_q_query_sec_obj(const char *desc, LSA_Q_QUERY_SEC_OBJ *q_q, + prs_struct *ps, int depth); +BOOL lsa_io_r_query_sec_obj(const char *desc, LSA_R_QUERY_SEC_OBJ *r_u, + prs_struct *ps, int depth); +void init_q_query(LSA_Q_QUERY_INFO *q_q, POLICY_HND *hnd, uint16 info_class); +BOOL lsa_io_q_query(const char *desc, LSA_Q_QUERY_INFO *q_q, prs_struct *ps, + int depth); +BOOL init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM * q_e, POLICY_HND *pol, + uint32 enum_context, uint32 preferred_len); +BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e, + prs_struct *ps, int depth); +void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context, + const char *domain_name, DOM_SID *domain_sid, + NTSTATUS status); +BOOL lsa_io_r_enum_trust_dom(const char *desc, LSA_R_ENUM_TRUST_DOM *r_e, + prs_struct *ps, int depth); +BOOL lsa_io_dom_query_5(const char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth); +BOOL lsa_io_r_query(const char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, + int depth); +void init_lsa_sid_enum(TALLOC_CTX *mem_ctx, LSA_SID_ENUM *sen, + int num_entries, DOM_SID *sids); +void init_q_lookup_sids(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_SIDS *q_l, + POLICY_HND *hnd, int num_sids, DOM_SID *sids, + uint16 level); +BOOL lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, + int depth); +BOOL lsa_io_r_lookup_sids(const char *desc, LSA_R_LOOKUP_SIDS *r_s, + prs_struct *ps, int depth); +void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, + POLICY_HND *hnd, int num_names, const char **names); +BOOL lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r, + prs_struct *ps, int depth); +BOOL lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *r_r, + prs_struct *ps, int depth); +void init_lsa_q_close(LSA_Q_CLOSE *q_c, POLICY_HND *hnd); +BOOL lsa_io_q_close(const char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth); +BOOL lsa_io_r_close(const char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_open_secret(const char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, int depth); +BOOL lsa_io_r_open_secret(const char *desc, LSA_R_OPEN_SECRET *r_c, prs_struct *ps, int depth); +void init_q_enum_privs(LSA_Q_ENUM_PRIVS *q_q, POLICY_HND *hnd, uint32 enum_context, uint32 pref_max_length); +BOOL lsa_io_q_enum_privs(const char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int depth); +void init_lsa_r_enum_privs(LSA_R_ENUM_PRIVS *r_u, uint32 enum_context, + uint32 count, LSA_PRIV_ENTRY *entries); +BOOL lsa_io_r_enum_privs(const char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int depth); +void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, const char *name, uint16 lang_id, uint16 lang_id_sys); +BOOL lsa_io_q_priv_get_dispname(const char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_struct *ps, int depth); +BOOL lsa_io_r_priv_get_dispname(const char *desc, LSA_R_PRIV_GET_DISPNAME *r_q, prs_struct *ps, int depth); +void init_lsa_q_enum_accounts(LSA_Q_ENUM_ACCOUNTS *trn, POLICY_HND *hnd, uint32 enum_context, uint32 pref_max_length); +BOOL lsa_io_q_enum_accounts(const char *desc, LSA_Q_ENUM_ACCOUNTS *q_q, prs_struct *ps, int depth); +void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS *r_u, uint32 enum_context); +BOOL lsa_io_r_enum_accounts(const char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth); +BOOL lsa_io_q_unk_get_connuser(const char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth); +BOOL lsa_io_r_unk_get_connuser(const char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth); +void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *sid, uint32 desired_access); +BOOL lsa_io_q_open_account(const char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_open_account(const char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth); +void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd); +BOOL lsa_io_q_enum_privsaccount(const char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_luid(const char *desc, LUID *r_c, prs_struct *ps, int depth); +BOOL lsa_io_luid_attr(const char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth); +BOOL lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *r_c, prs_struct *ps, int depth); +void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, uint32 count, uint32 control); +BOOL lsa_io_r_enum_privsaccount(const char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_getsystemaccount(const char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_getsystemaccount(const char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_setsystemaccount(const char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_setsystemaccount(const char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth); +void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, const char *name); +BOOL lsa_io_q_lookupprivvalue(const char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_lookupprivvalue(const char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_addprivs(const char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_addprivs(const char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth); +BOOL lsa_io_q_removeprivs(const char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth); +BOOL lsa_io_r_removeprivs(const char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth); +BOOL policy_handle_is_valid(const POLICY_HND *hnd); + +/* The following definitions come from rpc_parse/parse_misc.c */ + +TALLOC_CTX *get_current_rpc_talloc(void); +void set_current_rpc_talloc( TALLOC_CTX *ctx); +void main_loop_talloc_free(void); +TALLOC_CTX *main_loop_talloc_get(void); +TALLOC_CTX *get_talloc_ctx(void); +BOOL smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth); +BOOL smb_io_lookup_level(const char *desc, LOOKUP_LEVEL *level, prs_struct *ps, int depth); +uint32 get_enum_hnd(ENUM_HND *enh); +void init_enum_hnd(ENUM_HND *enh, uint32 hnd); +BOOL smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth); +BOOL smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth); +void init_dom_sid(DOM_SID *sid, const char *str_sid); +void init_dom_sid2(DOM_SID2 *sid2, const DOM_SID *sid); +BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth); +void init_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer); +BOOL smb_io_strhdr(const char *desc, STRHDR *hdr, prs_struct *ps, int depth); +void init_uni_hdr(UNIHDR *hdr, int len); +BOOL smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth); +void init_buf_hdr(BUFHDR *hdr, int max_len, int len); +BOOL smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset); +BOOL smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, + uint32 ptr_hdrbuf, uint32 max_len, uint32 len); +BOOL smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth); +void init_uni_hdr2(UNIHDR2 *hdr, int len); +BOOL smb_io_unihdr2(const char *desc, UNIHDR2 *hdr2, prs_struct *ps, int depth); +void init_unistr(UNISTR *str, const char *buf); +BOOL smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth); +void init_buffer3_uint32(BUFFER3 *str, uint32 val); +void init_buffer3_str(BUFFER3 *str, char *buf, int len); +void init_buffer3_hex(BUFFER3 *str, char *buf); +void init_buffer3_bytes(BUFFER3 *str, uint8 *buf, int len); +BOOL smb_io_buffer3(const char *desc, BUFFER3 *buf3, prs_struct *ps, int depth); +BOOL smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth); +void init_buffer2(BUFFER2 *str, uint8 *buf, int len); +BOOL smb_io_buffer2(const char *desc, BUFFER2 *buf2, uint32 buffer, prs_struct *ps, int depth); +void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf); +void copy_unistr2(UNISTR2 *str, const UNISTR2 *from); +void init_string2(STRING2 *str, const char *buf, int max_len, int str_len); +BOOL smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth); +void init_unistr2(UNISTR2 *str, const char *buf, size_t len); +void init_unistr2_from_unistr (UNISTR2 *to, UNISTR *from); +BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth); +void init_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx); +BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth); +void init_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type); +BOOL smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth); +void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid); +void init_log_info(DOM_LOG_INFO *log, const char *logon_srv, const char *acct_name, + uint16 sec_chan, const char *comp_name); +BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth); +BOOL smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth); +BOOL smb_io_cred(const char *desc, DOM_CRED *cred, prs_struct *ps, int depth); +void init_clnt_info2(DOM_CLNT_INFO2 *clnt, + const char *logon_srv, const char *comp_name, + DOM_CRED *clnt_cred); +BOOL smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth); +void init_clnt_info(DOM_CLNT_INFO *clnt, + const char *logon_srv, const char *acct_name, + uint16 sec_chan, const char *comp_name, + DOM_CRED *cred); +BOOL smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth); +void init_logon_id(DOM_LOGON_ID *log, uint32 log_id_low, uint32 log_id_high); +BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth); +void init_owf_info(OWF_INFO *hash, uint8 data[16]); +BOOL smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth); +BOOL smb_io_gid(const char *desc, DOM_GID *gid, prs_struct *ps, int depth); +BOOL smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth); +void init_unistr3(UNISTR3 *str, const char *buf); +BOOL smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth); +BOOL prs_uint64(const char *name, prs_struct *ps, int depth, UINT64_S *data64); +BOOL smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth); +BOOL smb_io_buffer4(const char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth); +BOOL make_uni_hdr(UNIHDR *hdr, int len); +BOOL make_bufhdr2(BUFHDR2 *hdr, uint32 info_level, uint32 length, uint32 buffer); + +/* The following definitions come from rpc_parse/parse_net.c */ + +BOOL net_io_q_logon_ctrl2(const char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth); +void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, const char *srv_name, + uint32 query_level); +void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level, + uint32 flags, uint32 pdc_status, + uint32 logon_attempts, uint32 tc_status, + const char *trusted_domain_name); +BOOL net_io_r_logon_ctrl2(const char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth); +BOOL net_io_q_logon_ctrl(const char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps, + int depth); +void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL *q_l, const char *srv_name, + uint32 query_level); +void init_net_r_logon_ctrl(NET_R_LOGON_CTRL *r_l, uint32 query_level, + uint32 flags, uint32 pdc_status); +BOOL net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps, + int depth); +void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t, + uint32 num_doms, const char *dom_name); +BOOL net_io_r_trust_dom(const char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth); +BOOL net_io_q_trust_dom(const char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth); +void init_q_req_chal(NET_Q_REQ_CHAL *q_c, + const char *logon_srv, const char *logon_clnt, + DOM_CHAL *clnt_chal); +BOOL net_io_q_req_chal(const char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth); +BOOL net_io_r_req_chal(const char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth); +BOOL net_io_q_auth(const char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth); +BOOL net_io_r_auth(const char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth); +void init_q_auth_2(NET_Q_AUTH_2 *q_a, + const char *logon_srv, const char *acct_name, uint16 sec_chan, const char *comp_name, + DOM_CHAL *clnt_chal, uint32 clnt_flgs); +BOOL net_io_q_auth_2(const char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth); +BOOL net_io_r_auth_2(const char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth); +void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s, const char *logon_srv, const char *acct_name, + uint16 sec_chan, const char *comp_name, DOM_CRED *cred, char nt_cypher[16]); +BOOL net_io_q_srv_pwset(const char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth); +BOOL net_io_r_srv_pwset(const char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth); +void init_id_info1(NET_ID_INFO_1 *id, const char *domain_name, + uint32 param_ctrl, uint32 log_id_low, uint32 log_id_high, + const char *user_name, const char *wksta_name, + const char *sess_key, + unsigned char lm_cypher[16], unsigned char nt_cypher[16]); +void init_id_info2(NET_ID_INFO_2 * id, const char *domain_name, + uint32 param_ctrl, + uint32 log_id_low, uint32 log_id_high, + const char *user_name, const char *wksta_name, + const uchar lm_challenge[8], + const uchar * lm_chal_resp, int lm_chal_resp_len, + const uchar * nt_chal_resp, int nt_chal_resp_len); +void init_sam_info(DOM_SAM_INFO *sam, + const char *logon_srv, const char *comp_name, DOM_CRED *clnt_cred, + DOM_CRED *rtn_cred, uint16 logon_level, + NET_ID_INFO_CTR *ctr); +void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, SAM_ACCOUNT *sampw, + uint16 logon_count, uint16 bad_pw_count, + uint32 num_groups, DOM_GID *gids, + uint32 user_flgs, uchar *sess_key, + const char *logon_srv, const char *logon_dom, + DOM_SID *dom_sid, const char *other_sids); +BOOL net_io_q_sam_logon(const char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth); +BOOL net_io_r_sam_logon(const char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth); +BOOL net_io_q_sam_logoff(const char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth); +BOOL net_io_r_sam_logoff(const char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth); +BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name, + const char *cli_name, DOM_CRED * cli_creds, + DOM_CRED *ret_creds, uint32 database_id); +BOOL net_io_q_sam_sync(const char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps, + int depth); +BOOL make_sam_account_info(SAM_ACCOUNT_INFO * info, + const UNISTR2 *user_name, + const UNISTR2 *full_name, + uint32 user_rid, uint32 group_rid, + const UNISTR2 *home_dir, + const UNISTR2 *dir_drive, + const UNISTR2 *log_scr, + const UNISTR2 *desc, + uint32 acb_info, + const UNISTR2 *prof_path, + const UNISTR2 *wkstas, + const UNISTR2 *unk_str, const UNISTR2 *mung_dial); +BOOL net_io_r_sam_sync(const char *desc, uint8 sess_key[16], + NET_R_SAM_SYNC * r_s, prs_struct *ps, int depth); +BOOL init_net_q_sam_deltas(NET_Q_SAM_DELTAS *q_s, const char *srv_name, + const char *cli_name, DOM_CRED *cli_creds, + uint32 database_id, UINT64_S dom_mod_count); +BOOL net_io_q_sam_deltas(const char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps, + int depth); +BOOL net_io_r_sam_deltas(const char *desc, uint8 sess_key[16], + NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_prs.c */ + +void prs_dump(const char *name, int v, prs_struct *ps); +void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name); +BOOL prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, BOOL io); +BOOL prs_read(prs_struct *ps, int fd, size_t len, int timeout); +void prs_mem_free(prs_struct *ps); +void prs_mem_clear(prs_struct *ps); +char *prs_alloc_mem(prs_struct *ps, size_t size); +TALLOC_CTX *prs_get_mem_context(prs_struct *ps); +void prs_give_memory(prs_struct *ps, char *buf, uint32 size, BOOL is_dynamic); +char *prs_take_memory(prs_struct *ps, uint32 *psize); +BOOL prs_set_buffer_size(prs_struct *ps, uint32 newsize); +BOOL prs_grow(prs_struct *ps, uint32 extra_space); +BOOL prs_force_grow(prs_struct *ps, uint32 extra_space); +char *prs_data_p(prs_struct *ps); +uint32 prs_data_size(prs_struct *ps); +uint32 prs_offset(prs_struct *ps); +BOOL prs_set_offset(prs_struct *ps, uint32 offset); +BOOL prs_append_prs_data(prs_struct *dst, prs_struct *src); +BOOL prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len); +BOOL prs_append_data(prs_struct *dst, char *src, uint32 len); +void prs_set_endian_data(prs_struct *ps, BOOL endian); +BOOL prs_align(prs_struct *ps); +BOOL prs_align_uint16(prs_struct *ps); +BOOL prs_align_uint64(prs_struct *ps); +BOOL prs_align_needed(prs_struct *ps, uint32 needed); +char *prs_mem_get(prs_struct *ps, uint32 extra_size); +void prs_switch_type(prs_struct *ps, BOOL io); +void prs_force_dynamic(prs_struct *ps); +BOOL prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8); +BOOL prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16); +BOOL prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32); +BOOL prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status); +BOOL prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status); +BOOL prs_uint8s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len); +BOOL prs_uint16s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len); +BOOL prs_uint16uni(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len); +BOOL prs_uint32s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len); +BOOL prs_buffer5(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str); +BOOL prs_buffer2(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER2 *str); +BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str); +BOOL prs_unistr2(BOOL charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str); +BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth); +BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str); +BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size); +BOOL prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset); +BOOL prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16, + uint32 ptr_uint16, uint32 start_offset); +BOOL prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset); +BOOL prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32, + uint32 ptr_uint32, uint32 data_size); +int tdb_prs_store(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps); +int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps, TALLOC_CTX *mem_ctx); +BOOL prs_hash1(prs_struct *ps, uint32 offset, uint8 sess_key[16]); + +/* The following definitions come from rpc_parse/parse_reg.c */ + +void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR *q_o, + uint16 unknown_0, uint32 level); +BOOL reg_io_q_open_hkcr(const char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_open_hkcr(const char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth); +void init_reg_q_open_hklm(REG_Q_OPEN_HKLM * q_o, + uint16 unknown_0, uint32 access_mask); +BOOL reg_io_q_open_hklm(const char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, + int depth); +BOOL reg_io_r_open_hklm(const char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, + int depth); +void init_reg_q_flush_key(REG_Q_FLUSH_KEY *q_u, POLICY_HND *pol); +BOOL reg_io_q_flush_key(const char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_flush_key(const char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth); +void init_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd, + const char *name, const char *class, SEC_ACCESS *sam_access, + SEC_DESC_BUF *sec_buf); +BOOL reg_io_q_create_key(const char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_create_key(const char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth); +void init_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd, + const char *name); +BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_delete_val(const char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth); +void init_reg_q_delete_key(REG_Q_DELETE_KEY *q_c, POLICY_HND *hnd, + const char *name); +BOOL reg_io_q_delete_key(const char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_delete_key(const char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth); +void init_reg_q_query_key(REG_Q_QUERY_KEY *q_o, POLICY_HND *hnd, + uint32 max_class_len); +BOOL reg_io_q_query_key(const char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_query_key(const char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth); +void init_reg_q_unk_1a(REG_Q_UNK_1A *q_o, POLICY_HND *hnd); +BOOL reg_io_q_unk_1a(const char *desc, REG_Q_UNK_1A *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_unk_1a(const char *desc, REG_R_UNK_1A *r_r, prs_struct *ps, int depth); +void init_reg_q_open_hku(REG_Q_OPEN_HKU *q_o, + uint16 unknown_0, uint32 level); +BOOL reg_io_q_open_hku(const char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_open_hku(const char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth); +void init_reg_q_close(REG_Q_CLOSE *q_c, POLICY_HND *hnd); +BOOL reg_io_q_close(const char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth); +BOOL reg_io_r_close(const char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth); +void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, SEC_DESC_BUF *sec_desc_buf); +BOOL reg_io_q_set_key_sec(const char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_set_key_sec(const char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth); +void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol, + uint32 sec_buf_size, SEC_DESC_BUF *psdb); +BOOL reg_io_q_get_key_sec(const char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth); +BOOL reg_io_r_get_key_sec(const char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth); +BOOL init_reg_q_info(REG_Q_INFO *q_i, POLICY_HND *pol, char* val_name); +BOOL reg_io_q_info(const char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth); +BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, + BUFFER2* buf, uint32 type, NTSTATUS status); +BOOL reg_io_r_info(const char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth); +void init_reg_q_enum_val(REG_Q_ENUM_VALUE *q_i, POLICY_HND *pol, + uint32 val_idx, uint32 max_val_len, + uint32 max_buf_len); +BOOL reg_io_q_enum_val(const char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth); +BOOL reg_io_r_enum_val(const char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth); +void init_reg_q_create_val(REG_Q_CREATE_VALUE *q_i, POLICY_HND *pol, + const char *val_name, uint32 type, + BUFFER3 *val); +BOOL reg_io_q_create_val(const char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth); +BOOL reg_io_r_create_val(const char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth); +void init_reg_q_enum_key(REG_Q_ENUM_KEY *q_i, POLICY_HND *pol, uint32 key_idx); +BOOL reg_io_q_enum_key(const char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth); +BOOL reg_io_r_enum_key(const char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth); +void init_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q, POLICY_HND *pol, + const char *key_name, uint32 unk); +BOOL reg_io_q_open_entry(const char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth); +void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r, + POLICY_HND *pol, NTSTATUS status); +BOOL reg_io_r_open_entry(const char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth); +void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, + const char *msg, uint32 timeout, uint16 flags); +BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, + int depth); +BOOL reg_io_r_shutdown(const char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps, + int depth); +void init_reg_q_abort_shutdown(REG_Q_ABORT_SHUTDOWN * q_s); +BOOL reg_io_q_abort_shutdown(const char *desc, REG_Q_ABORT_SHUTDOWN * q_s, + prs_struct *ps, int depth); +BOOL reg_io_r_abort_shutdown(const char *desc, REG_R_ABORT_SHUTDOWN * r_s, + prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_rpc.c */ + +void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags, + uint32 call_id, int data_len, int auth_len); +BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth); +void init_rpc_hdr_rb(RPC_HDR_RB *rpc, + uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid, + uint32 num_elements, uint16 context_id, uint8 num_syntaxes, + RPC_IFACE *abstract, RPC_IFACE *transfer); +BOOL smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth); +void init_rpc_hdr_ba(RPC_HDR_BA *rpc, + uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid, + const char *pipe_addr, + uint8 num_results, uint16 result, uint16 reason, + RPC_IFACE *transfer); +BOOL smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth); +void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum); +BOOL smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth); +BOOL smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth); +BOOL smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth); +void init_rpc_hdr_autha(RPC_HDR_AUTHA *rai, + uint16 max_tsize, uint16 max_rsize, + uint8 auth_type, uint8 auth_level, + uint8 stub_type_len); +BOOL smb_io_rpc_hdr_autha(const char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth); +BOOL rpc_hdr_auth_chk(RPC_HDR_AUTH *rai); +void init_rpc_hdr_auth(RPC_HDR_AUTH *rai, + uint8 auth_type, uint8 auth_level, + uint8 stub_type_len, + uint32 ptr); +BOOL smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth); +BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav, + const char *signature, uint32 msg_type); +void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, + const char *signature, uint32 msg_type); +BOOL smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth); +void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg, + uint32 neg_flgs, + fstring myname, fstring domain); +BOOL smb_io_rpc_auth_ntlmssp_neg(const char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth); +void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL *chl, + uint32 neg_flags, + uint8 challenge[8]); +BOOL smb_io_rpc_auth_ntlmssp_chal(const char *desc, RPC_AUTH_NTLMSSP_CHAL *chl, prs_struct *ps, int depth); +void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp, + uchar lm_resp[24], uchar nt_resp[24], + const char *domain, const char *user, const char *wks, + uint32 neg_flags); +BOOL smb_io_rpc_auth_ntlmssp_resp(const char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_struct *ps, int depth); +BOOL rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk, uint32 crc32, uint32 seq_num); +void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk, + uint32 ver, uint32 crc32, uint32 seq_num); +BOOL smb_io_rpc_auth_ntlmssp_chk(const char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_samr.c */ + +void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND * q_c, POLICY_HND *hnd); +BOOL samr_io_q_close_hnd(const char *desc, SAMR_Q_CLOSE_HND * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_close_hnd(const char *desc, SAMR_R_CLOSE_HND * r_u, + prs_struct *ps, int depth); +void init_samr_q_lookup_domain(SAMR_Q_LOOKUP_DOMAIN * q_u, + POLICY_HND *pol, const char *dom_name); +BOOL samr_io_q_lookup_domain(const char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u, + prs_struct *ps, int depth); +void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN * r_u, + DOM_SID *dom_sid, NTSTATUS status); +BOOL samr_io_r_lookup_domain(const char *desc, SAMR_R_LOOKUP_DOMAIN * r_u, + prs_struct *ps, int depth); +void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D * q_u, POLICY_HND *dom_pol, DOM_SID *sid); +BOOL samr_io_q_unknown_2d(const char *desc, SAMR_Q_UNKNOWN_2D * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_unknown_2d(const char *desc, SAMR_R_UNKNOWN_2D * r_u, + prs_struct *ps, int depth); +void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN * q_u, + POLICY_HND *pol, uint32 flags, + const DOM_SID *sid); +BOOL samr_io_q_open_domain(const char *desc, SAMR_Q_OPEN_DOMAIN * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_open_domain(const char *desc, SAMR_R_OPEN_DOMAIN * r_u, + prs_struct *ps, int depth); +void init_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO * q_u, + POLICY_HND *user_pol); +BOOL samr_io_q_get_usrdom_pwinfo(const char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u, + prs_struct *ps, int depth); +void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO *r_u, NTSTATUS status); +BOOL samr_io_r_get_usrdom_pwinfo(const char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_sec_obj(SAMR_Q_QUERY_SEC_OBJ * q_u, + POLICY_HND *user_pol, uint32 sec_info); +BOOL samr_io_q_query_sec_obj(const char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u, + prs_struct *ps, int depth); +void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO * q_u, + POLICY_HND *domain_pol, uint16 switch_value); +BOOL samr_io_q_query_dom_info(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u, + prs_struct *ps, int depth); +void init_unk_info3(SAM_UNK_INFO_3 *u_3, NTTIME nt_logout); +void init_unk_info6(SAM_UNK_INFO_6 * u_6); +void init_unk_info7(SAM_UNK_INFO_7 * u_7); +void init_unk_info12(SAM_UNK_INFO_12 * u_12, NTTIME nt_lock_duration, NTTIME nt_reset_time, uint16 lockout); +void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *server); +void init_unk_info2(SAM_UNK_INFO_2 * u_2, + const char *domain, const char *server, + uint32 seq_num, uint32 num_users, uint32 num_groups, uint32 num_alias); +void init_unk_info1(SAM_UNK_INFO_1 *u_1, uint16 min_pass_len, uint16 pass_hist, + uint32 flag, NTTIME nt_expire, NTTIME nt_min_age); +void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO * r_u, + uint16 switch_value, SAM_UNK_CTR * ctr, + NTSTATUS status); +BOOL samr_io_r_query_dom_info(const char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u, + prs_struct *ps, int depth); +BOOL samr_io_r_query_sec_obj(const char *desc, SAMR_R_QUERY_SEC_OBJ * r_u, + prs_struct *ps, int depth); +void init_sam_entry(SAM_ENTRY * sam, uint32 len_sam_name, uint32 rid); +void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS * q_e, POLICY_HND *pol, + uint32 start_idx, + uint16 acb_mask, uint16 unk_1, uint32 size); +BOOL samr_io_q_enum_dom_users(const char *desc, SAMR_Q_ENUM_DOM_USERS * q_e, + prs_struct *ps, int depth); +void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS * r_u, + uint32 next_idx, uint32 num_sam_entries); +BOOL samr_io_r_enum_dom_users(const char *desc, SAMR_R_ENUM_DOM_USERS * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO * q_e, POLICY_HND *pol, + uint16 switch_level, uint32 start_idx, + uint32 max_entries, uint32 max_size); +BOOL samr_io_q_query_dispinfo(const char *desc, SAMR_Q_QUERY_DISPINFO * q_e, + prs_struct *ps, int depth); +NTSTATUS init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 num_entries, + uint32 start_idx, DISP_USER_INFO *disp_user_info); +NTSTATUS init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 num_entries, + uint32 start_idx, DISP_USER_INFO *disp_user_info); +NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_entries, + uint32 start_idx, DISP_GROUP_INFO *disp_group_info); +NTSTATUS init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 num_entries, + uint32 start_idx, DISP_USER_INFO *disp_user_info); +NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_entries, + uint32 start_idx, DISP_GROUP_INFO *disp_group_info); +void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO * r_u, + uint32 num_entries, uint32 total_size, uint32 data_size, + uint16 switch_level, SAM_DISPINFO_CTR * ctr, + NTSTATUS status); +BOOL samr_io_r_query_dispinfo(const char *desc, SAMR_R_QUERY_DISPINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_open_group(SAMR_Q_OPEN_GROUP * q_c, + POLICY_HND *hnd, + uint32 access_mask, uint32 rid); +BOOL samr_io_q_open_group(const char *desc, SAMR_Q_OPEN_GROUP * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_open_group(const char *desc, SAMR_R_OPEN_GROUP * r_u, + prs_struct *ps, int depth); +void init_samr_group_info1(GROUP_INFO1 * gr1, + const char *acct_name, const char *acct_desc, + uint32 num_members); +BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1, + prs_struct *ps, int depth); +void init_samr_group_info3(GROUP_INFO3 *gr3); +BOOL samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth); +void init_samr_group_info4(GROUP_INFO4 * gr4, const char *acct_desc); +BOOL samr_io_group_info4(const char *desc, GROUP_INFO4 * gr4, + prs_struct *ps, int depth); +void init_samr_q_create_dom_group(SAMR_Q_CREATE_DOM_GROUP * q_e, + POLICY_HND *pol, const char *acct_desc, + uint32 access_mask); +BOOL samr_io_q_create_dom_group(const char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e, + prs_struct *ps, int depth); +BOOL samr_io_r_create_dom_group(const char *desc, SAMR_R_CREATE_DOM_GROUP * r_u, + prs_struct *ps, int depth); +void init_samr_q_delete_dom_group(SAMR_Q_DELETE_DOM_GROUP * q_c, + POLICY_HND *hnd); +BOOL samr_io_q_delete_dom_group(const char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_delete_dom_group(const char *desc, SAMR_R_DELETE_DOM_GROUP * r_u, + prs_struct *ps, int depth); +void init_samr_q_del_groupmem(SAMR_Q_DEL_GROUPMEM * q_e, + POLICY_HND *pol, uint32 rid); +BOOL samr_io_q_del_groupmem(const char *desc, SAMR_Q_DEL_GROUPMEM * q_e, + prs_struct *ps, int depth); +void init_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM * r_u, POLICY_HND *pol, + NTSTATUS status); +BOOL samr_io_r_del_groupmem(const char *desc, SAMR_R_DEL_GROUPMEM * r_u, + prs_struct *ps, int depth); +void init_samr_q_add_groupmem(SAMR_Q_ADD_GROUPMEM * q_e, + POLICY_HND *pol, uint32 rid); +BOOL samr_io_q_add_groupmem(const char *desc, SAMR_Q_ADD_GROUPMEM * q_e, + prs_struct *ps, int depth); +void init_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM * r_u, POLICY_HND *pol, + NTSTATUS status); +BOOL samr_io_r_add_groupmem(const char *desc, SAMR_R_ADD_GROUPMEM * r_u, + prs_struct *ps, int depth); +void init_samr_q_set_groupinfo(SAMR_Q_SET_GROUPINFO * q_e, + POLICY_HND *pol, GROUP_INFO_CTR * ctr); +BOOL samr_io_q_set_groupinfo(const char *desc, SAMR_Q_SET_GROUPINFO * q_e, + prs_struct *ps, int depth); +void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO * r_u, NTSTATUS status); +BOOL samr_io_r_set_groupinfo(const char *desc, SAMR_R_SET_GROUPINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO * q_e, + POLICY_HND *pol, uint16 switch_level); +BOOL samr_io_q_query_groupinfo(const char *desc, SAMR_Q_QUERY_GROUPINFO * q_e, + prs_struct *ps, int depth); +void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO * r_u, + GROUP_INFO_CTR * ctr, NTSTATUS status); +BOOL samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM * q_c, POLICY_HND *hnd); +BOOL samr_io_q_query_groupmem(const char *desc, SAMR_Q_QUERY_GROUPMEM * q_u, + prs_struct *ps, int depth); +void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM * r_u, + uint32 num_entries, uint32 *rid, + uint32 *attr, NTSTATUS status); +BOOL samr_io_r_query_groupmem(const char *desc, SAMR_R_QUERY_GROUPMEM * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS * q_u, + POLICY_HND *hnd); +BOOL samr_io_q_query_usergroups(const char *desc, SAMR_Q_QUERY_USERGROUPS * q_u, + prs_struct *ps, int depth); +void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS * r_u, + uint32 num_gids, DOM_GID * gid, + NTSTATUS status); +BOOL samr_io_gids(const char *desc, uint32 *num_gids, DOM_GID ** gid, + prs_struct *ps, int depth); +BOOL samr_io_r_query_usergroups(const char *desc, SAMR_R_QUERY_USERGROUPS * r_u, + prs_struct *ps, int depth); +void init_samr_q_enum_domains(SAMR_Q_ENUM_DOMAINS * q_e, + POLICY_HND *pol, + uint32 start_idx, uint32 size); +BOOL samr_io_q_enum_domains(const char *desc, SAMR_Q_ENUM_DOMAINS * q_e, + prs_struct *ps, int depth); +void init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS * r_u, + uint32 next_idx, uint32 num_sam_entries); +BOOL samr_io_r_enum_domains(const char *desc, SAMR_R_ENUM_DOMAINS * r_u, + prs_struct *ps, int depth); +void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS * q_e, + POLICY_HND *pol, + uint32 start_idx, uint32 size); +BOOL samr_io_q_enum_dom_groups(const char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e, + prs_struct *ps, int depth); +void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS * r_u, + uint32 next_idx, uint32 num_sam_entries); +BOOL samr_io_r_enum_dom_groups(const char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u, + prs_struct *ps, int depth); +void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES * q_e, + POLICY_HND *pol, uint32 start_idx, + uint32 size); +BOOL samr_io_q_enum_dom_aliases(const char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e, + prs_struct *ps, int depth); +void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES *r_u, uint32 next_idx, uint32 num_sam_entries); +BOOL samr_io_r_enum_dom_aliases(const char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u, + prs_struct *ps, int depth); +void init_samr_alias_info1(ALIAS_INFO1 * al1, const char *acct_name, uint32 num_member, const char *acct_desc); +BOOL samr_io_alias_info1(const char *desc, ALIAS_INFO1 * al1, + prs_struct *ps, int depth); +void init_samr_alias_info3(ALIAS_INFO3 * al3, const char *acct_desc); +BOOL samr_io_alias_info3(const char *desc, ALIAS_INFO3 * al3, + prs_struct *ps, int depth); +BOOL samr_alias_info_ctr(const char *desc, ALIAS_INFO_CTR * ctr, + prs_struct *ps, int depth); +void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO * q_e, + POLICY_HND *pol, uint16 switch_level); +BOOL samr_io_q_query_aliasinfo(const char *desc, SAMR_Q_QUERY_ALIASINFO * q_e, + prs_struct *ps, int depth); +void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO * r_u, + ALIAS_INFO_CTR * ctr, NTSTATUS status); +BOOL samr_io_r_query_aliasinfo(const char *desc, SAMR_R_QUERY_ALIASINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO * q_u, + POLICY_HND *hnd, ALIAS_INFO_CTR * ctr); +BOOL samr_io_q_set_aliasinfo(const char *desc, SAMR_Q_SET_ALIASINFO * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES * q_u, + POLICY_HND *hnd, + uint32 num_sids, + uint32 *ptr_sid, DOM_SID2 * sid); +BOOL samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u, + prs_struct *ps, int depth); +void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES * r_u, + uint32 num_rids, uint32 *rid, + NTSTATUS status); +BOOL samr_io_rids(const char *desc, uint32 *num_rids, uint32 **rid, + prs_struct *ps, int depth); +BOOL samr_io_r_query_useraliases(const char *desc, SAMR_R_QUERY_USERALIASES * r_u, + prs_struct *ps, int depth); +void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS * q_u, POLICY_HND *pol, + uint32 access_mask, uint32 rid); +BOOL samr_io_q_open_alias(const char *desc, SAMR_Q_OPEN_ALIAS * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_open_alias(const char *desc, SAMR_R_OPEN_ALIAS * r_u, + prs_struct *ps, int depth); +void init_samr_q_lookup_rids(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_RIDS * q_u, + POLICY_HND *pol, uint32 flags, + uint32 num_rids, uint32 *rid); +BOOL samr_io_q_lookup_rids(const char *desc, SAMR_Q_LOOKUP_RIDS * q_u, + prs_struct *ps, int depth); +void init_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS * r_u, + uint32 num_names, UNIHDR * hdr_name, + UNISTR2 *uni_name, uint32 *type); +BOOL samr_io_r_lookup_rids(const char *desc, SAMR_R_LOOKUP_RIDS * r_u, + prs_struct *ps, int depth); +void init_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS * q_u, POLICY_HND *hnd); +BOOL samr_io_q_delete_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_delete_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, + prs_struct *ps, int depth); +void init_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS * q_u, + POLICY_HND *hnd, const char *acct_desc); +BOOL samr_io_q_create_dom_alias(const char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_create_dom_alias(const char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u, + prs_struct *ps, int depth); +void init_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM * q_u, POLICY_HND *hnd, + DOM_SID *sid); +BOOL samr_io_q_add_aliasmem(const char *desc, SAMR_Q_ADD_ALIASMEM * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_add_aliasmem(const char *desc, SAMR_R_ADD_ALIASMEM * r_u, + prs_struct *ps, int depth); +void init_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM * q_u, POLICY_HND *hnd, + DOM_SID *sid); +BOOL samr_io_q_del_aliasmem(const char *desc, SAMR_Q_DEL_ALIASMEM * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_del_aliasmem(const char *desc, SAMR_R_DEL_ALIASMEM * r_u, + prs_struct *ps, int depth); +void init_samr_q_delete_dom_alias(SAMR_Q_DELETE_DOM_ALIAS * q_c, + POLICY_HND *hnd); +BOOL samr_io_q_delete_dom_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u, + prs_struct *ps, int depth); +void init_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS * r_u, + NTSTATUS status); +BOOL samr_io_r_delete_dom_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_aliasmem(SAMR_Q_QUERY_ALIASMEM * q_c, + POLICY_HND *hnd); +BOOL samr_io_q_query_aliasmem(const char *desc, SAMR_Q_QUERY_ALIASMEM * q_u, + prs_struct *ps, int depth); +void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM * r_u, + uint32 num_sids, DOM_SID2 * sid, + NTSTATUS status); +BOOL samr_io_r_query_aliasmem(const char *desc, SAMR_R_QUERY_ALIASMEM * r_u, + prs_struct *ps, int depth); +NTSTATUS init_samr_q_lookup_names(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_NAMES * q_u, + POLICY_HND *pol, uint32 flags, + uint32 num_names, const char **name); +BOOL samr_io_q_lookup_names(const char *desc, SAMR_Q_LOOKUP_NAMES * q_u, + prs_struct *ps, int depth); +NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u, + uint32 num_rids, + uint32 *rid, uint32 *type, + NTSTATUS status); +BOOL samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u, + prs_struct *ps, int depth); +void init_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER * q_c, + POLICY_HND *hnd); +BOOL samr_io_q_delete_dom_user(const char *desc, SAMR_Q_DELETE_DOM_USER * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_delete_dom_user(const char *desc, SAMR_R_DELETE_DOM_USER * r_u, + prs_struct *ps, int depth); +void init_samr_q_open_user(SAMR_Q_OPEN_USER * q_u, + POLICY_HND *pol, + uint32 access_mask, uint32 rid); +BOOL samr_io_q_open_user(const char *desc, SAMR_Q_OPEN_USER * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_open_user(const char *desc, SAMR_R_OPEN_USER * r_u, + prs_struct *ps, int depth); +void init_samr_q_create_user(SAMR_Q_CREATE_USER * q_u, + POLICY_HND *pol, + const char *name, + uint32 acb_info, uint32 access_mask); +BOOL samr_io_q_create_user(const char *desc, SAMR_Q_CREATE_USER * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_create_user(const char *desc, SAMR_R_CREATE_USER * r_u, + prs_struct *ps, int depth); +void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO * q_u, + POLICY_HND *hnd, uint16 switch_value); +BOOL samr_io_q_query_userinfo(const char *desc, SAMR_Q_QUERY_USERINFO * q_u, + prs_struct *ps, int depth); +void init_sam_user_info12(SAM_USER_INFO_12 * usr, + const uint8 lm_pwd[16], const uint8 nt_pwd[16]); +void init_sam_user_info10(SAM_USER_INFO_10 * usr, uint32 acb_info); +void init_sam_user_info11(SAM_USER_INFO_11 * usr, + NTTIME * expiry, + const char *mach_acct, + uint32 rid_user, uint32 rid_group, uint16 acct_ctrl); +void init_sam_user_info24(SAM_USER_INFO_24 * usr, char newpass[516], uint16 pw_len); +void init_sam_user_info23W(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all zeros */ + NTTIME * logoff_time, /* all zeros */ + NTTIME * kickoff_time, /* all zeros */ + NTTIME * pass_last_set_time, /* all zeros */ + NTTIME * pass_can_change_time, /* all zeros */ + NTTIME * pass_must_change_time, /* all zeros */ + UNISTR2 *user_name, + UNISTR2 *full_name, + UNISTR2 *home_dir, + UNISTR2 *dir_drive, + UNISTR2 *log_scr, + UNISTR2 *prof_path, + UNISTR2 *desc, + UNISTR2 *wkstas, + UNISTR2 *unk_str, + UNISTR2 *mung_dial, + uint32 user_rid, /* 0x0000 0000 */ + uint32 group_rid, + uint32 acb_info, + uint32 unknown_3, + uint16 logon_divs, + LOGON_HRS * hrs, + uint32 unknown_5, + char newpass[516], uint32 unknown_6); +void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all zeros */ + NTTIME * logoff_time, /* all zeros */ + NTTIME * kickoff_time, /* all zeros */ + NTTIME * pass_last_set_time, /* all zeros */ + NTTIME * pass_can_change_time, /* all zeros */ + NTTIME * pass_must_change_time, /* all zeros */ + const char *user_name, /* NULL */ + const char *full_name, + const char *home_dir, const char *dir_drive, const char *log_scr, + const char *prof_path, const char *desc, const char *wkstas, + const char *unk_str, const char *mung_dial, uint32 user_rid, /* 0x0000 0000 */ + uint32 group_rid, uint32 acb_info, + uint32 unknown_3, uint16 logon_divs, + LOGON_HRS * hrs, uint32 unknown_5, + char newpass[516], uint32 unknown_6); +void init_sam_user_info21W(SAM_USER_INFO_21 * usr, + NTTIME * logon_time, + NTTIME * logoff_time, + NTTIME * kickoff_time, + NTTIME * pass_last_set_time, + NTTIME * pass_can_change_time, + NTTIME * pass_must_change_time, + UNISTR2 *user_name, + UNISTR2 *full_name, + UNISTR2 *home_dir, + UNISTR2 *dir_drive, + UNISTR2 *log_scr, + UNISTR2 *prof_path, + UNISTR2 *desc, + UNISTR2 *wkstas, + UNISTR2 *unk_str, + UNISTR2 *mung_dial, + uchar lm_pwd[16], + uchar nt_pwd[16], + uint32 user_rid, + uint32 group_rid, + uint32 acb_info, + uint32 unknown_3, + uint16 logon_divs, + LOGON_HRS * hrs, + uint32 unknown_5, uint32 unknown_6); +void init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw); +void init_sam_user_info20A(SAM_USER_INFO_20 *usr, SAM_ACCOUNT *pw); +NTSTATUS make_samr_userinfo_ctr_usr21(TALLOC_CTX *ctx, SAM_USERINFO_CTR * ctr, + uint16 switch_value, + SAM_USER_INFO_21 * usr); +void init_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr, uchar * sess_key, + uint16 switch_value, void *info); +void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO * r_u, + SAM_USERINFO_CTR * ctr, NTSTATUS status); +BOOL samr_io_r_query_userinfo(const char *desc, SAMR_R_QUERY_USERINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_set_userinfo(SAMR_Q_SET_USERINFO * q_u, + POLICY_HND *hnd, unsigned char sess_key[16], + uint16 switch_value, void *info); +BOOL samr_io_q_set_userinfo(const char *desc, SAMR_Q_SET_USERINFO * q_u, + prs_struct *ps, int depth); +void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO * r_u, NTSTATUS status); +BOOL samr_io_r_set_userinfo(const char *desc, SAMR_R_SET_USERINFO * r_u, + prs_struct *ps, int depth); +void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2 * q_u, + POLICY_HND *hnd, unsigned char sess_key[16], + uint16 switch_value, SAM_USERINFO_CTR * ctr); +BOOL samr_io_q_set_userinfo2(const char *desc, SAMR_Q_SET_USERINFO2 * q_u, + prs_struct *ps, int depth); +void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2 * r_u, NTSTATUS status); +BOOL samr_io_r_set_userinfo2(const char *desc, SAMR_R_SET_USERINFO2 * r_u, + prs_struct *ps, int depth); +void init_samr_q_connect(SAMR_Q_CONNECT * q_u, + const char *srv_name, uint32 access_mask); +BOOL samr_io_q_connect(const char *desc, SAMR_Q_CONNECT * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_connect(const char *desc, SAMR_R_CONNECT * r_u, + prs_struct *ps, int depth); +void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON * q_u); +BOOL samr_io_q_connect_anon(const char *desc, SAMR_Q_CONNECT_ANON * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_connect_anon(const char *desc, SAMR_R_CONNECT_ANON * r_u, + prs_struct *ps, int depth); +void init_samr_q_get_dom_pwinfo(SAMR_Q_GET_DOM_PWINFO * q_u, + const char *srv_name); +BOOL samr_io_q_get_dom_pwinfo(const char *desc, SAMR_Q_GET_DOM_PWINFO * q_u, + prs_struct *ps, int depth); +BOOL samr_io_r_get_dom_pwinfo(const char *desc, SAMR_R_GET_DOM_PWINFO * r_u, + prs_struct *ps, int depth); +void init_enc_passwd(SAMR_ENC_PASSWD * pwd, char pass[512]); +BOOL samr_io_enc_passwd(const char *desc, SAMR_ENC_PASSWD * pwd, + prs_struct *ps, int depth); +void init_enc_hash(SAMR_ENC_HASH * hsh, uchar hash[16]); +BOOL samr_io_enc_hash(const char *desc, SAMR_ENC_HASH * hsh, + prs_struct *ps, int depth); +void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER * q_u, + const char *dest_host, const char *user_name, + char nt_newpass[516], + uchar nt_oldhash[16], + char lm_newpass[516], + uchar lm_oldhash[16]); +BOOL samr_io_q_chgpasswd_user(const char *desc, SAMR_Q_CHGPASSWD_USER * q_u, + prs_struct *ps, int depth); +void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER * r_u, NTSTATUS status); +BOOL samr_io_r_chgpasswd_user(const char *desc, SAMR_R_CHGPASSWD_USER * r_u, + prs_struct *ps, int depth); +void init_samr_q_unknown_2e(SAMR_Q_UNKNOWN_2E *q_u, + POLICY_HND *domain_pol, uint16 switch_value); +BOOL samr_io_q_unknown_2e(const char *desc, SAMR_Q_UNKNOWN_2E *q_u, + prs_struct *ps, int depth); +void init_samr_r_samr_unknown_2e(SAMR_R_UNKNOWN_2E * r_u, + uint16 switch_value, SAM_UNK_CTR * ctr, + NTSTATUS status); +BOOL samr_io_r_samr_unknown_2e(const char *desc, SAMR_R_UNKNOWN_2E * r_u, + prs_struct *ps, int depth); +void init_samr_q_set_domain_info(SAMR_Q_SET_DOMAIN_INFO *q_u, + POLICY_HND *domain_pol, uint16 switch_value, SAM_UNK_CTR *ctr); +BOOL samr_io_q_set_domain_info(const char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u, + prs_struct *ps, int depth); +void init_samr_r_set_domain_info(SAMR_R_SET_DOMAIN_INFO * r_u, NTSTATUS status); +BOOL samr_io_r_set_domain_info(const char *desc, SAMR_R_SET_DOMAIN_INFO * r_u, + prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_sec.c */ + +void init_sec_access(SEC_ACCESS *t, uint32 mask); +BOOL sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth); +void init_sec_ace(SEC_ACE *t, DOM_SID *sid, uint8 type, SEC_ACCESS mask, uint8 flag); +BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth); +SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, uint16 revision, int num_aces, SEC_ACE *ace_list); +SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src); +BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth); +size_t sec_desc_size(SEC_DESC *psd); +BOOL sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2); +BOOL sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2); +BOOL sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2); +SEC_DESC_BUF *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb); +SEC_DESC *make_sec_desc(TALLOC_CTX *ctx, uint16 revision, + DOM_SID *owner_sid, DOM_SID *grp_sid, + SEC_ACL *sacl, SEC_ACL *dacl, size_t *sd_size); +SEC_DESC *dup_sec_desc( TALLOC_CTX *ctx, SEC_DESC *src); +SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, DOM_SID *owner_sid, DOM_SID *grp_sid, + SEC_ACL *dacl, size_t *sd_size); +BOOL sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth); +SEC_DESC_BUF *make_sec_desc_buf(TALLOC_CTX *ctx, size_t len, SEC_DESC *sec_desc); +SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src); +BOOL sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_spoolss.c */ + +BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime); +BOOL smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, + prs_struct *ps, int depth); +BOOL spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode); +BOOL make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX *q_u, + const fstring printername, + const fstring datatype, + uint32 access_required, + const fstring clientname, + const fstring user_name); +BOOL make_spoolss_q_addprinterex( + TALLOC_CTX *mem_ctx, + SPOOL_Q_ADDPRINTEREX *q_u, + const char *srv_name, + const char* clientname, + const char* user_name, + uint32 level, + PRINTER_INFO_CTR *ctr); +BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, + PRINTER_INFO_2 *info); +BOOL spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_deleteprinterdriver( + TALLOC_CTX *mem_ctx, + SPOOL_Q_DELETEPRINTERDRIVER *q_u, + const char *server, + const char* arch, + const char* driver +); +BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, + const POLICY_HND *handle, + UNISTR2 *valuename, uint32 size); +BOOL spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd); +BOOL spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth); +BOOL smb_io_printer_info_0(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info, int depth); +BOOL smb_io_printer_info_1(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info, int depth); +BOOL smb_io_printer_info_2(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info, int depth); +BOOL smb_io_printer_info_3(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info, int depth); +BOOL smb_io_printer_info_4(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info, int depth); +BOOL smb_io_printer_info_5(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info, int depth); +BOOL smb_io_port_info_1(const char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth); +BOOL smb_io_port_info_2(const char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth); +BOOL smb_io_printer_driver_info_1(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1 *info, int depth) ; +BOOL smb_io_printer_driver_info_2(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2 *info, int depth) ; +BOOL smb_io_printer_driver_info_3(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3 *info, int depth); +BOOL smb_io_printer_driver_info_6(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6 *info, int depth); +BOOL smb_io_job_info_1(const char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int depth); +BOOL smb_io_job_info_2(const char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int depth); +BOOL smb_io_form_1(const char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth); +void spoolss_move_buffer(NEW_BUFFER *src, NEW_BUFFER **dest); +uint32 new_get_buffer_size(NEW_BUFFER *buffer); +BOOL smb_io_driverdir_1(const char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth); +BOOL smb_io_port_1(const char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth); +BOOL smb_io_port_2(const char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth); +BOOL smb_io_printprocessor_info_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth); +BOOL smb_io_printprocdatatype_info_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth); +BOOL smb_io_printmonitor_info_1(const char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 *info, int depth); +BOOL smb_io_printmonitor_info_2(const char *desc, NEW_BUFFER *buffer, PRINTMONITOR_2 *info, int depth); +uint32 spoolss_size_printer_info_0(PRINTER_INFO_0 *info); +uint32 spoolss_size_printer_info_1(PRINTER_INFO_1 *info); +uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info); +uint32 spoolss_size_printer_info_4(PRINTER_INFO_4 *info); +uint32 spoolss_size_printer_info_5(PRINTER_INFO_5 *info); +uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info); +uint32 spoolss_size_printer_driver_info_1(DRIVER_INFO_1 *info); +uint32 spoolss_size_printer_driver_info_2(DRIVER_INFO_2 *info); +uint32 spoolss_size_string_array(uint16 *string); +uint32 spoolss_size_printer_driver_info_3(DRIVER_INFO_3 *info); +uint32 spoolss_size_printer_driver_info_6(DRIVER_INFO_6 *info); +uint32 spoolss_size_job_info_1(JOB_INFO_1 *info); +uint32 spoolss_size_job_info_2(JOB_INFO_2 *info); +uint32 spoolss_size_form_1(FORM_1 *info); +uint32 spoolss_size_port_info_1(PORT_INFO_1 *info); +uint32 spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1 *info); +uint32 spoolss_size_printprocessordirectory_info_1(PRINTPROCESSOR_DIRECTORY_1 *info); +uint32 spoolss_size_port_info_2(PORT_INFO_2 *info); +uint32 spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1 *info); +uint32 spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1 *info); +uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p); +uint32 spoolss_size_printmonitor_info_1(PRINTMONITOR_1 *info); +uint32 spoolss_size_printmonitor_info_2(PRINTMONITOR_2 *info); +BOOL make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u, + const POLICY_HND *hnd, + const fstring architecture, + uint32 level, uint32 clientmajor, uint32 clientminor, + NEW_BUFFER *buffer, uint32 offered); +BOOL spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_enumprinters( + SPOOL_Q_ENUMPRINTERS *q_u, + uint32 flags, + fstring servername, + uint32 level, + NEW_BUFFER *buffer, + uint32 offered +); +BOOL make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u, + fstring servername, uint32 level, + NEW_BUFFER *buffer, uint32 offered); +BOOL spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_getprinter( + TALLOC_CTX *mem_ctx, + SPOOL_Q_GETPRINTER *q_u, + const POLICY_HND *hnd, + uint32 level, + NEW_BUFFER *buffer, + uint32 offered +); +BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u, + const POLICY_HND *hnd, uint32 level, PRINTER_INFO_CTR *info, + uint32 command); +BOOL spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd, + uint32 firstjob, + uint32 numofjobs, + uint32 level, + NEW_BUFFER *buffer, + uint32 offered); +BOOL spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u, + const char *name, + const char *environment, + uint32 level, + NEW_BUFFER *buffer, uint32 offered); +BOOL spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth); +BOOL spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth); +BOOL spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth); +BOOL spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth); +BOOL spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth); +BOOL spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u, + prs_struct *ps, int depth); +BOOL spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u, + prs_struct *ps, int depth); +BOOL spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u, + prs_struct *ps, int depth); +BOOL smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth); +BOOL spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth); +BOOL make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, + SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, + uint32 level, PRINTER_DRIVER_CTR *info); +BOOL make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx, + SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, + DRIVER_INFO_3 *info3); +BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src); +BOOL spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth); +BOOL uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni, + NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc); +BOOL uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni, + NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc); +BOOL uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni, + NT_PRINTER_INFO_LEVEL_2 **asc); +BOOL make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u, + fstring servername, fstring env_name, uint32 level, + NEW_BUFFER *buffer, uint32 offered); +BOOL spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u, + const POLICY_HND *hnd, + uint32 idx, uint32 valuelen, uint32 datalen); +BOOL make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, TALLOC_CTX *ctx, const POLICY_HND *hnd, + char* value, char* data); +BOOL spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth); +BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value, + uint32 type, const uint8 *data, uint32 len); +BOOL spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth); +void free_devmode(DEVICEMODE *devmode); +void free_printer_info_1(PRINTER_INFO_1 *printer); +void free_printer_info_2(PRINTER_INFO_2 *printer); +void free_printer_info_3(PRINTER_INFO_3 *printer); +void free_printer_info_4(PRINTER_INFO_4 *printer); +void free_printer_info_5(PRINTER_INFO_5 *printer); +void free_job_info_2(JOB_INFO_2 *job); +BOOL make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u, + const fstring string, uint32 printer, uint32 type); +BOOL spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_HND *hnd, + uint32 condition, uint32 change_id); +BOOL spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd); +BOOL spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, + uint32 change_low, uint32 change_high, + SPOOL_NOTIFY_INFO *info); +BOOL spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth); +BOOL spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth); +BOOL make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, const char *name, char *environment, int level, NEW_BUFFER *buffer, uint32 offered); +BOOL spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth); +BOOL smb_io_printprocessordirectory_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth); +BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle, + int level, FORM *form); +BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle, + int level, char *form_name, FORM *form); +BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form); +BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle, + char *formname, uint32 level, NEW_BUFFER *buffer, + uint32 offered); +BOOL make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS *q_u, POLICY_HND *handle, + uint32 level, NEW_BUFFER *buffer, + uint32 offered); + +/* The following definitions come from rpc_parse/parse_srv.c */ + +void init_srv_share_info1_str(SH_INFO_1_STR *sh1, const char *net_name, const char *remark); +void init_srv_share_info1(SH_INFO_1 *sh1, const char *net_name, uint32 type, const char *remark); +void init_srv_share_info2_str(SH_INFO_2_STR *sh2, + const char *net_name, const char *remark, + const char *path, const char *passwd); +void init_srv_share_info2(SH_INFO_2 *sh2, + const char *net_name, uint32 type, const char *remark, + uint32 perms, uint32 max_uses, uint32 num_uses, + const char *path, const char *passwd); +void init_srv_share_info501(SH_INFO_501 *sh501, const char *net_name, uint32 type, const char *remark, uint32 csc_policy); +void init_srv_share_info501_str(SH_INFO_501_STR *sh501, const char *net_name, const char *remark); +void init_srv_share_info502(SH_INFO_502 *sh502, + const char *net_name, uint32 type, const char *remark, + uint32 perms, uint32 max_uses, uint32 num_uses, + const char *path, const char *passwd, SEC_DESC *psd, size_t sd_size); +void init_srv_share_info502_str(SH_INFO_502_STR *sh502str, + SH_INFO_502 *ptrs, + const char *net_name, const char *remark, + const char *path, const char *passwd, SEC_DESC *psd, size_t sd_size); +void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n, + const char *srv_name, uint32 info_level, + uint32 preferred_len, ENUM_HND *hnd); +BOOL srv_io_q_net_share_enum(const char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_share_enum(const char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_share_get_info(const char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_share_get_info(const char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_share_set_info(const char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_share_set_info(const char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_share_add(const char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_share_add(const char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_share_del(const char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_share_del(const char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth); +void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, const char *name); +void init_srv_sess_info0(SESS_INFO_0 *ss0, const char *name); +void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, const char *name, const char *user); +void init_srv_sess_info1(SESS_INFO_1 *ss1, + const char *name, const char *user, + uint32 num_opens, uint32 open_time, uint32 idle_time, + uint32 user_flags); +void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n, + const char *srv_name, const char *qual_name, + uint32 sess_level, SRV_SESS_INFO_CTR *ctr, + uint32 preferred_len, + ENUM_HND *hnd); +BOOL srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth); +void init_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id); +void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, const char *usr_name, const char *net_name); +void init_srv_conn_info1(CONN_INFO_1 *ss1, + uint32 id, uint32 type, + uint32 num_opens, uint32 num_users, uint32 open_time, + const char *usr_name, const char *net_name); +void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n, + const char *srv_name, const char *qual_name, + uint32 conn_level, SRV_CONN_INFO_CTR *ctr, + uint32 preferred_len, + ENUM_HND *hnd); +BOOL srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth); +void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, const char *user_name, const char *path_name); +void init_srv_file_info3(FILE_INFO_3 *fl3, + uint32 id, uint32 perms, uint32 num_locks, + const char *path_name, const char *user_name); +void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n, + const char *srv_name, const char *qual_name, + uint32 file_level, SRV_FILE_INFO_CTR *ctr, + uint32 preferred_len, + ENUM_HND *hnd); +BOOL srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth); +void init_srv_info_100(SRV_INFO_100 *sv100, uint32 platform_id, const char *name); +void init_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, const char *name, + uint32 ver_major, uint32 ver_minor, + uint32 srv_type, const char *comment); +void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, const char *name, + const char *comment, uint32 ver_major, uint32 ver_minor, + uint32 srv_type, uint32 users, uint32 disc, uint32 hidden, + uint32 announce, uint32 ann_delta, uint32 licenses, + const char *usr_path); +void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv, + const char *server_name, uint32 switch_value); +BOOL srv_io_q_net_srv_get_info(const char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth); +void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv, + uint32 switch_value, SRV_INFO_CTR *ctr, WERROR status); +void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv, + uint32 switch_value, WERROR status); +BOOL srv_io_q_net_srv_set_info(const char *desc, SRV_Q_NET_SRV_SET_INFO *q_n, + prs_struct *ps, int depth); +BOOL srv_io_r_net_srv_get_info(const char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_srv_set_info(const char *desc, SRV_R_NET_SRV_SET_INFO *r_n, + prs_struct *ps, int depth); +BOOL srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth); +void init_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs, + uint32 hours, uint32 mins, uint32 secs, uint32 hunds, + uint32 zone, uint32 tintervals, uint32 day, + uint32 month, uint32 year, uint32 weekday); +BOOL srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_name_validate(const char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_name_validate(const char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_file_query_secdesc(const char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_file_query_secdesc(const char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth); +BOOL srv_io_q_net_file_set_secdesc(const char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth); +BOOL srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth); + +/* The following definitions come from rpc_parse/parse_wks.c */ + +void init_wks_q_query_info(WKS_Q_QUERY_INFO *q_u, + const char *server, uint16 switch_value) ; +BOOL wks_io_q_query_info(const char *desc, WKS_Q_QUERY_INFO *q_u, prs_struct *ps, int depth); +void init_wks_info_100(WKS_INFO_100 *inf, + uint32 platform_id, uint32 ver_major, uint32 ver_minor, + const char *my_name, const char *domain_name); +void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u, + uint32 switch_value, WKS_INFO_100 *wks100, + NTSTATUS status) ; +BOOL wks_io_r_query_info(const char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth); + +/* The following definitions come from rpc_server/srv_dfs.c */ + +BOOL api_netdfs_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_dfs_nt.c */ + +uint32 _dfs_exist(pipes_struct *p, DFS_Q_DFS_EXIST *q_u, DFS_R_DFS_EXIST *r_u); +WERROR _dfs_add(pipes_struct *p, DFS_Q_DFS_ADD* q_u, DFS_R_DFS_ADD *r_u); +WERROR _dfs_remove(pipes_struct *p, DFS_Q_DFS_REMOVE *q_u, + DFS_R_DFS_REMOVE *r_u); +WERROR _dfs_enum(pipes_struct *p, DFS_Q_DFS_ENUM *q_u, DFS_R_DFS_ENUM *r_u); +WERROR _dfs_get_info(pipes_struct *p, DFS_Q_DFS_GET_INFO *q_u, + DFS_R_DFS_GET_INFO *r_u); + +/* The following definitions come from rpc_server/srv_lsa.c */ + +BOOL api_ntlsa_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_lsa_hnd.c */ + +BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name); +BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *), void *data_ptr); +BOOL find_policy_by_hnd(pipes_struct *p, POLICY_HND *hnd, void **data_p); +BOOL close_policy_hnd(pipes_struct *p, POLICY_HND *hnd); +void close_policy_by_pipe(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_lsa_nt.c */ + +NTSTATUS _lsa_open_policy2(pipes_struct *p, LSA_Q_OPEN_POL2 *q_u, LSA_R_OPEN_POL2 *r_u); +NTSTATUS _lsa_open_policy(pipes_struct *p, LSA_Q_OPEN_POL *q_u, LSA_R_OPEN_POL *r_u); +NTSTATUS _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_ENUM_TRUST_DOM *r_u); +NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO *r_u); +NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_SIDS *r_u); +NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP_NAMES *r_u); +NTSTATUS _lsa_close(pipes_struct *p, LSA_Q_CLOSE *q_u, LSA_R_CLOSE *r_u); +NTSTATUS _lsa_open_secret(pipes_struct *p, LSA_Q_OPEN_SECRET *q_u, LSA_R_OPEN_SECRET *r_u); +NTSTATUS _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIVS *r_u); +NTSTATUS _lsa_priv_get_dispname(pipes_struct *p, LSA_Q_PRIV_GET_DISPNAME *q_u, LSA_R_PRIV_GET_DISPNAME *r_u); +NTSTATUS _lsa_unk_get_connuser(pipes_struct *p, LSA_Q_UNK_GET_CONNUSER *q_u, LSA_R_UNK_GET_CONNUSER *r_u); +NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u); +NTSTATUS _lsa_getsystemaccount(pipes_struct *p, LSA_Q_GETSYSTEMACCOUNT *q_u, LSA_R_GETSYSTEMACCOUNT *r_u); + +/* The following definitions come from rpc_server/srv_netlog.c */ + +BOOL api_netlog_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_netlog_nt.c */ + +NTSTATUS _net_logon_ctrl(pipes_struct *p, NET_Q_LOGON_CTRL *q_u, + NET_R_LOGON_CTRL *r_u); +NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_CTRL2 *r_u); +NTSTATUS _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u); +NTSTATUS _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u); +NTSTATUS _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u); +NTSTATUS _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u); +NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_u); +NTSTATUS _net_sam_logoff(pipes_struct *p, NET_Q_SAM_LOGOFF *q_u, NET_R_SAM_LOGOFF *r_u); +NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_u); + +/* The following definitions come from rpc_server/srv_pipe.c */ + +BOOL create_next_pdu(pipes_struct *p); +BOOL api_pipe_bind_auth_resp(pipes_struct *p, prs_struct *rpc_in_p); +BOOL setup_fault_pdu(pipes_struct *p, NTSTATUS status); +BOOL check_bind_req(char* pipe_name, RPC_IFACE* abstract, + RPC_IFACE* transfer); +BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p); +BOOL api_pipe_auth_process(pipes_struct *p, prs_struct *rpc_in); +struct current_user *get_current_user(struct current_user *user, pipes_struct *p); +BOOL api_pipe_request(pipes_struct *p); +BOOL api_rpcTNP(pipes_struct *p, const char *rpc_name, + struct api_struct *api_rpc_cmds); + +/* The following definitions come from rpc_server/srv_pipe_hnd.c */ + +pipes_struct *get_first_pipe(void); +pipes_struct *get_next_pipe(pipes_struct *p); +void set_pipe_handle_offset(int max_open_files); +void reset_chain_p(void); +void init_rpc_pipe_hnd(void); +pipes_struct *open_rpc_pipe_p(char *pipe_name, + connection_struct *conn, uint16 vuid); +void free_pipe_context(pipes_struct *p); +ssize_t write_to_pipe(pipes_struct *p, char *data, size_t n); +ssize_t read_from_pipe(pipes_struct *p, char *data, size_t n); +BOOL wait_rpc_pipe_hnd_state(pipes_struct *p, uint16 priority); +BOOL set_rpc_pipe_hnd_state(pipes_struct *p, uint16 device_state); +BOOL close_rpc_pipe_hnd(pipes_struct *p, connection_struct *conn); +pipes_struct *get_rpc_pipe_p(char *buf, int where); +pipes_struct *get_rpc_pipe(int pnum); + +/* The following definitions come from rpc_server/srv_reg.c */ + +BOOL api_reg_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_reg_nt.c */ + +NTSTATUS _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u); +NTSTATUS _reg_open(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM *r_u); +NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY *r_u); +NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u); + +/* The following definitions come from rpc_server/srv_samr.c */ + +BOOL api_samr_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_samr_nt.c */ + +NTSTATUS _samr_close_hnd(pipes_struct *p, SAMR_Q_CLOSE_HND *q_u, SAMR_R_CLOSE_HND *r_u); +NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_DOMAIN *r_u); +NTSTATUS _samr_get_usrdom_pwinfo(pipes_struct *p, SAMR_Q_GET_USRDOM_PWINFO *q_u, SAMR_R_GET_USRDOM_PWINFO *r_u); +NTSTATUS _samr_query_sec_obj(pipes_struct *p, SAMR_Q_QUERY_SEC_OBJ *q_u, SAMR_R_QUERY_SEC_OBJ *r_u); +NTSTATUS _samr_enum_dom_users(pipes_struct *p, SAMR_Q_ENUM_DOM_USERS *q_u, SAMR_R_ENUM_DOM_USERS *r_u); +NTSTATUS _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAMR_R_ENUM_DOM_GROUPS *r_u); +NTSTATUS _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, SAMR_R_ENUM_DOM_ALIASES *r_u); +NTSTATUS _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, SAMR_R_QUERY_DISPINFO *r_u); +NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAMR_R_QUERY_ALIASINFO *r_u); +NTSTATUS _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOKUP_NAMES *r_u); +NTSTATUS _samr_chgpasswd_user(pipes_struct *p, SAMR_Q_CHGPASSWD_USER *q_u, SAMR_R_CHGPASSWD_USER *r_u); +NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP_RIDS *r_u); +NTSTATUS _api_samr_open_user(pipes_struct *p, SAMR_Q_OPEN_USER *q_u, SAMR_R_OPEN_USER *r_u); +NTSTATUS _samr_query_userinfo(pipes_struct *p, SAMR_Q_QUERY_USERINFO *q_u, SAMR_R_QUERY_USERINFO *r_u); +NTSTATUS _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, SAMR_R_QUERY_USERGROUPS *r_u); +NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR_R_QUERY_DOMAIN_INFO *r_u); +NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_CREATE_USER *r_u); +NTSTATUS _samr_connect_anon(pipes_struct *p, SAMR_Q_CONNECT_ANON *q_u, SAMR_R_CONNECT_ANON *r_u); +NTSTATUS _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u); +NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_LOOKUP_DOMAIN *r_u); +NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_ENUM_DOMAINS *r_u); +NTSTATUS _api_samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OPEN_ALIAS *r_u); +NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SET_USERINFO *r_u); +NTSTATUS _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_SET_USERINFO2 *r_u); +NTSTATUS _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, SAMR_R_QUERY_USERALIASES *r_u); +NTSTATUS _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_R_QUERY_ALIASMEM *r_u); +NTSTATUS _samr_query_groupmem(pipes_struct *p, SAMR_Q_QUERY_GROUPMEM *q_u, SAMR_R_QUERY_GROUPMEM *r_u); +NTSTATUS _samr_add_aliasmem(pipes_struct *p, SAMR_Q_ADD_ALIASMEM *q_u, SAMR_R_ADD_ALIASMEM *r_u); +NTSTATUS _samr_del_aliasmem(pipes_struct *p, SAMR_Q_DEL_ALIASMEM *q_u, SAMR_R_DEL_ALIASMEM *r_u); +NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_ADD_GROUPMEM *r_u); +NTSTATUS _samr_del_groupmem(pipes_struct *p, SAMR_Q_DEL_GROUPMEM *q_u, SAMR_R_DEL_GROUPMEM *r_u); +NTSTATUS _samr_delete_dom_user(pipes_struct *p, SAMR_Q_DELETE_DOM_USER *q_u, SAMR_R_DELETE_DOM_USER *r_u ); +NTSTATUS _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, SAMR_R_DELETE_DOM_GROUP *r_u); +NTSTATUS _samr_delete_dom_alias(pipes_struct *p, SAMR_Q_DELETE_DOM_ALIAS *q_u, SAMR_R_DELETE_DOM_ALIAS *r_u); +NTSTATUS _samr_create_dom_group(pipes_struct *p, SAMR_Q_CREATE_DOM_GROUP *q_u, SAMR_R_CREATE_DOM_GROUP *r_u); +NTSTATUS _samr_create_dom_alias(pipes_struct *p, SAMR_Q_CREATE_DOM_ALIAS *q_u, SAMR_R_CREATE_DOM_ALIAS *r_u); +NTSTATUS _samr_query_groupinfo(pipes_struct *p, SAMR_Q_QUERY_GROUPINFO *q_u, SAMR_R_QUERY_GROUPINFO *r_u); +NTSTATUS _samr_set_groupinfo(pipes_struct *p, SAMR_Q_SET_GROUPINFO *q_u, SAMR_R_SET_GROUPINFO *r_u); +NTSTATUS _samr_get_dom_pwinfo(pipes_struct *p, SAMR_Q_GET_DOM_PWINFO *q_u, SAMR_R_GET_DOM_PWINFO *r_u); +NTSTATUS _samr_open_group(pipes_struct *p, SAMR_Q_OPEN_GROUP *q_u, SAMR_R_OPEN_GROUP *r_u); +NTSTATUS _samr_unknown_2d(pipes_struct *p, SAMR_Q_UNKNOWN_2D *q_u, SAMR_R_UNKNOWN_2D *r_u); + +/* The following definitions come from rpc_server/srv_spoolss.c */ + +BOOL api_spoolss_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_spoolss_nt.c */ + +void do_drv_upgrade_printer(int msg_type, pid_t src, void *buf, size_t len); +WERROR _spoolss_open_printer(pipes_struct *p, SPOOL_Q_OPEN_PRINTER *q_u, SPOOL_R_OPEN_PRINTER *r_u); +WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, SPOOL_R_OPEN_PRINTER_EX *r_u); +BOOL convert_devicemode(const char *printername, const DEVICEMODE *devmode, + NT_DEVICEMODE **pp_nt_devmode); +WERROR _spoolss_closeprinter(pipes_struct *p, SPOOL_Q_CLOSEPRINTER *q_u, SPOOL_R_CLOSEPRINTER *r_u); +WERROR _spoolss_deleteprinter(pipes_struct *p, SPOOL_Q_DELETEPRINTER *q_u, SPOOL_R_DELETEPRINTER *r_u); +WERROR _spoolss_deleteprinterdriver(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIVER *q_u, + SPOOL_R_DELETEPRINTERDRIVER *r_u); +WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPOOL_R_GETPRINTERDATA *r_u); +WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNEX *r_u); +void spoolss_notify_server_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx) ; +void spoolss_notify_printer_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_share_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_port_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_driver_name(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_comment(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_location(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_sepfile(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_print_processor(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_parameters(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_datatype(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_attributes(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void spoolss_notify_cjobs(int snum, + SPOOL_NOTIFY_INFO_DATA *data, + print_queue_struct *queue, + NT_PRINTER_INFO_LEVEL *printer, + TALLOC_CTX *mem_ctx); +void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 field, int id); +WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u); +WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u); +WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u); +WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u); +WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, SPOOL_R_STARTPAGEPRINTER *r_u); +WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u); +WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u); +WERROR _spoolss_enddocprinter(pipes_struct *p, SPOOL_Q_ENDDOCPRINTER *q_u, SPOOL_R_ENDDOCPRINTER *r_u); +WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R_WRITEPRINTER *r_u); +WERROR _spoolss_abortprinter(pipes_struct *p, SPOOL_Q_ABORTPRINTER *q_u, SPOOL_R_ABORTPRINTER *r_u); +WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u); +WERROR _spoolss_fcpn(pipes_struct *p, SPOOL_Q_FCPN *q_u, SPOOL_R_FCPN *r_u); +WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u); +WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u); +WERROR _spoolss_schedulejob( pipes_struct *p, SPOOL_Q_SCHEDULEJOB *q_u, SPOOL_R_SCHEDULEJOB *r_u); +WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u); +WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u); +WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u); +WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u); +WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u); +WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_R_ADDPRINTEREX *r_u); +WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, SPOOL_R_ADDPRINTERDRIVER *r_u); +WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, SPOOL_R_GETPRINTERDRIVERDIR *r_u); +WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u); +WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u); +WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u); +WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u); +WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u); +WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DELETEFORM *r_u); +WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *r_u); +WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, SPOOL_R_ENUMPRINTPROCESSORS *r_u); +WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u); +WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_u, SPOOL_R_ENUMPRINTMONITORS *r_u); +WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_u); +WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, SPOOL_R_GETPRINTERDATAEX *r_u); +WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u); +WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u); +WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u); +WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u); + +/* The following definitions come from rpc_server/srv_srvsvc.c */ + +BOOL api_srvsvc_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_srvsvc_nt.c */ + +BOOL share_info_db_init(void); +void map_generic_share_sd_bits(SEC_DESC *psd); +BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 desired_access); +WERROR _srv_net_srv_get_info(pipes_struct *p, SRV_Q_NET_SRV_GET_INFO *q_u, SRV_R_NET_SRV_GET_INFO *r_u); +WERROR _srv_net_srv_set_info(pipes_struct *p, SRV_Q_NET_SRV_SET_INFO *q_u, SRV_R_NET_SRV_SET_INFO *r_u); +WERROR _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u); +WERROR _srv_net_conn_enum(pipes_struct *p, SRV_Q_NET_CONN_ENUM *q_u, SRV_R_NET_CONN_ENUM *r_u); +WERROR _srv_net_sess_enum(pipes_struct *p, SRV_Q_NET_SESS_ENUM *q_u, SRV_R_NET_SESS_ENUM *r_u); +WERROR _srv_net_share_enum_all(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u); +WERROR _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET_SHARE_ENUM *r_u); +WERROR _srv_net_share_get_info(pipes_struct *p, SRV_Q_NET_SHARE_GET_INFO *q_u, SRV_R_NET_SHARE_GET_INFO *r_u); +WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, SRV_R_NET_SHARE_SET_INFO *r_u); +WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u); +WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u); +WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u); +WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC *q_u, + SRV_R_NET_FILE_QUERY_SECDESC *r_u); +WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_u, + SRV_R_NET_FILE_SET_SECDESC *r_u); +WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u); +WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u); + +/* The following definitions come from rpc_server/srv_util.c */ + +int make_dom_gids(TALLOC_CTX *ctx, char *gids_str, DOM_GID **ppgids); +void get_domain_user_groups(char *domain_groups, char *user); +NTSTATUS local_lookup_group_name(uint32 rid, char *group_name, uint32 *type); +NTSTATUS local_lookup_alias_name(uint32 rid, char *alias_name, uint32 *type); +NTSTATUS local_lookup_user_name(uint32 rid, char *user_name, uint32 *type); +NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid); +NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid); +NTSTATUS local_lookup_user_rid(char *user_name, uint32 *rid); + +/* The following definitions come from rpc_server/srv_wkssvc.c */ + +BOOL api_wkssvc_rpc(pipes_struct *p); + +/* The following definitions come from rpc_server/srv_wkssvc_nt.c */ + +NTSTATUS _wks_query_info(pipes_struct *p, WKS_Q_QUERY_INFO *q_u, WKS_R_QUERY_INFO *r_u); + +/* The following definitions come from smbd/blocking.c */ + +BOOL push_blocking_lock_request( char *inbuf, int length, int lock_timeout, + int lock_num, uint16 lock_pid, SMB_BIG_UINT offset, SMB_BIG_UINT count); +void remove_pending_lock_requests_by_fid(files_struct *fsp); +void remove_pending_lock_requests_by_mid(int mid); +unsigned blocking_locks_timeout(unsigned default_timeout); +void process_blocking_lock_queue(time_t t); + +/* The following definitions come from smbd/chgpasswd.c */ + +BOOL chgpasswd(char *name, const char *oldpass, const char *newpass, BOOL as_root); +BOOL chgpasswd(char *name, const char *oldpass, const char *newpass, BOOL as_root); +BOOL check_lanman_password(char *user, uchar * pass1, + uchar * pass2, SAM_ACCOUNT **hnd); +BOOL change_lanman_password(SAM_ACCOUNT *sampass, uchar * pass1, + uchar * pass2); +BOOL pass_oem_change(char *user, + uchar * lmdata, uchar * lmhash, + uchar * ntdata, uchar * nthash); +BOOL check_oem_password(char *user, + uchar * lmdata, uchar * lmhash, + uchar * ntdata, uchar * nthash, + SAM_ACCOUNT **hnd, char *new_passwd, + int new_passwd_size); +BOOL change_oem_password(SAM_ACCOUNT *hnd, char *new_passwd, + BOOL override); +BOOL check_plaintext_password(char *user, char *old_passwd, + int old_passwd_size, SAM_ACCOUNT **hnd); + +/* The following definitions come from smbd/close.c */ + +int close_file(files_struct *fsp, BOOL normal_close); + +/* The following definitions come from smbd/conn.c */ + +void conn_init(void); +int conn_num_open(void); +BOOL conn_snum_used(int snum); +connection_struct *conn_find(int cnum); +connection_struct *conn_new(void); +void conn_close_all(void); +BOOL conn_idle_all(time_t t, int deadtime); +void conn_free(connection_struct *conn); +void msg_force_tdis(int msg_type, pid_t pid, void *buf, size_t len); + +/* The following definitions come from smbd/connection.c */ + +TDB_CONTEXT *conn_tdb_ctx(void); +BOOL yield_connection(connection_struct *conn,const char *name); +BOOL claim_connection(connection_struct *conn,const char *name,int max_connections,BOOL Clear); + +/* The following definitions come from smbd/dfree.c */ + +SMB_BIG_UINT sys_disk_free(const char *path, BOOL small_query, + SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); + +/* The following definitions come from smbd/dir.c */ + +void init_dptrs(void); +char *dptr_path(int key); +char *dptr_wcard(int key); +BOOL dptr_set_wcard(int key, char *wcard); +BOOL dptr_set_attr(int key, uint16 attr); +uint16 dptr_attr(int key); +void dptr_close(int *key); +void dptr_closecnum(connection_struct *conn); +void dptr_idlecnum(connection_struct *conn); +void dptr_closepath(char *path,uint16 spid); +int dptr_create(connection_struct *conn,char *path, BOOL old_handle, BOOL expect_close,uint16 spid); +BOOL dptr_fill(char *buf1,unsigned int key); +void *dptr_fetch(char *buf,int *num); +void *dptr_fetch_lanman2(int dptr_num); +BOOL dir_check_ftype(connection_struct *conn,int mode,SMB_STRUCT_STAT *st,int dirtype); +BOOL get_dir_entry(connection_struct *conn,char *mask,int dirtype,char *fname, + SMB_OFF_T *size,int *mode,time_t *date,BOOL check_descend); +void *OpenDir(connection_struct *conn, const char *name, BOOL use_veto); +void CloseDir(void *p); +char *ReadDirName(void *p); +BOOL SeekDir(void *p,int pos); +int TellDir(void *p); +void DirCacheAdd( const char *path, const char *name, const char *dname, int snum ); +char *DirCacheCheck( const char *path, const char *name, int snum ); +void DirCacheFlush(int snum); + +/* The following definitions come from smbd/dosmode.c */ + +mode_t unix_mode(connection_struct *conn,int dosmode,const char *fname); +int dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf); +int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT *st); +int file_utime(connection_struct *conn, char *fname, struct utimbuf *times); +BOOL set_filetime(connection_struct *conn, char *fname, time_t mtime); + +/* The following definitions come from smbd/error.c */ + +int cached_error_packet(char *outbuf,files_struct *fsp,int line,const char *file); +int unix_error_packet(char *outbuf,int def_class,uint32 def_code, + int line, const char *file); +int error_packet(char *outbuf,NTSTATUS ntstatus, + uint8 eclass,uint32 ecode,int line, const char *file); + +/* The following definitions come from smbd/fileio.c */ + +SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos); +BOOL read_from_write_cache(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n); +ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n); +ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n); +void delete_write_cache(files_struct *fsp); +void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size); +ssize_t flush_write_cache(files_struct *fsp, enum flush_reason_enum reason); +void sync_file(connection_struct *conn, files_struct *fsp); +int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst); + +/* The following definitions come from smbd/filename.c */ + +BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component, + BOOL *bad_path, SMB_STRUCT_STAT *pst); +BOOL check_name(char *name,connection_struct *conn); + +/* The following definitions come from smbd/files.c */ + +files_struct *file_new(connection_struct *conn); +void file_close_conn(connection_struct *conn); +void file_init(void); +void file_close_user(int vuid); +files_struct *file_find_fd(int fd); +files_struct *file_find_dif(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id); +files_struct *file_find_fsp(files_struct *orig_fsp); +files_struct *file_find_di_first(SMB_DEV_T dev, SMB_INO_T inode); +files_struct *file_find_di_next(files_struct *start_fsp); +files_struct *file_find_print(void); +void file_sync_all(connection_struct *conn); +void file_free(files_struct *fsp); +files_struct *file_fsp(char *buf, int where); +void file_chain_reset(void); +void file_chain_save(void); +void file_chain_restore(void); + +/* The following definitions come from smbd/ipc.c */ + +void send_trans_reply(char *outbuf, + char *rparam, int rparam_len, + char *rdata, int rdata_len, + BOOL buffer_too_large); +int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int bufsize); + +/* The following definitions come from smbd/lanman.c */ + +int api_reply(connection_struct *conn,uint16 vuid,char *outbuf,char *data,char *params, + int tdscnt,int tpscnt,int mdrcnt,int mprcnt); + +/* The following definitions come from smbd/mangle.c */ + +void mangle_reset_cache(void); +BOOL mangle_is_mangled(const char *s); +BOOL mangle_is_8_3(const char *fname, BOOL check_case); +BOOL mangle_is_8_3_wildcards(const char *fname, BOOL check_case); +BOOL mangle_check_cache(char *s); +void mangle_map(char *OutName, BOOL need83, BOOL cache83, int snum); + +/* The following definitions come from smbd/mangle_hash2.c */ + +struct mangle_fns *mangle_hash2_init(void); + +/* The following definitions come from smbd/mangle_hash.c */ + +struct mangle_fns *mangle_hash_init(void); + +/* The following definitions come from smbd/mangle_map.c */ + +void mangle_map_filename(char *fname, int snum); + +/* The following definitions come from smbd/message.c */ + +int reply_sends(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_sendstrt(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_sendtxt(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_sendend(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); + +/* The following definitions come from smbd/negprot.c */ + +int reply_negprot(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, + int dum_buffsize); + +/* The following definitions come from smbd/noquotas.c */ + +BOOL disk_quotas(const char *path,SMB_BIG_UINT *bsize,SMB_BIG_UINT *dfree,SMB_BIG_UINT *dsize); + +/* The following definitions come from smbd/notify.c */ + +void remove_pending_change_notify_requests_by_fid(files_struct *fsp); +void remove_pending_change_notify_requests_by_mid(int mid); +void remove_pending_change_notify_requests_by_filename(files_struct *fsp); +int change_notify_timeout(void); +BOOL process_pending_change_notify_queue(time_t t); +BOOL change_notify_set(char *inbuf, files_struct *fsp, connection_struct *conn, uint32 flags); +BOOL init_change_notify(void); + +/* The following definitions come from smbd/notify_hash.c */ + +struct cnotify_fns *hash_notify_init(void) ; + +/* The following definitions come from smbd/notify_kernel.c */ + +struct cnotify_fns *kernel_notify_init(void) ; + +/* The following definitions come from smbd/nttrans.c */ + +int reply_ntcreate_and_X(connection_struct *conn, + char *inbuf,char *outbuf,int length,int bufsize); +int reply_ntcancel(connection_struct *conn, + char *inbuf,char *outbuf,int length,int bufsize); +int reply_nttranss(connection_struct *conn, + char *inbuf,char *outbuf,int length,int bufsize); +int reply_nttrans(connection_struct *conn, + char *inbuf,char *outbuf,int length,int bufsize); + +/* The following definitions come from smbd/open.c */ + +int fd_close(struct connection_struct *conn, files_struct *fsp); +files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, + int share_mode,int ofun, mode_t mode,int oplock_request, int *Access,int *action); +files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_STAT *psbuf, + uint32 desired_access, + int share_mode,int ofun, mode_t mode,int oplock_request, + int *Access,int *action); +files_struct *open_file_fchmod(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf); +int close_file_fchmod(files_struct *fsp); +files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf, + uint32 desired_access, int share_mode, int smb_ofun, mode_t unixmode, int *action); +files_struct *open_file_stat(connection_struct *conn, char *fname, SMB_STRUCT_STAT *psbuf); + +/* The following definitions come from smbd/oplock.c */ + +int32 get_number_of_exclusive_open_oplocks(void); +BOOL oplock_message_waiting(fd_set *fds); +BOOL receive_local_message( char *buffer, int buffer_len, int timeout); +BOOL set_file_oplock(files_struct *fsp, int oplock_type); +void release_file_oplock(files_struct *fsp); +BOOL remove_oplock(files_struct *fsp, BOOL break_to_none); +int setup_oplock_select_set( fd_set *fds); +BOOL process_local_message(char *buffer, int buf_size); +BOOL oplock_break_level2(files_struct *fsp, BOOL local_request, int token); +BOOL request_oplock_break(share_mode_entry *share_entry, BOOL async); +BOOL attempt_close_oplocked_file(files_struct *fsp); +void release_level_2_oplocks_on_change(files_struct *fsp); +BOOL init_oplocks(void); + +/* The following definitions come from smbd/oplock_irix.c */ + +struct kernel_oplocks *irix_init_kernel_oplocks(void) ; + +/* The following definitions come from smbd/oplock_linux.c */ + +struct kernel_oplocks *linux_init_kernel_oplocks(void) ; + +/* The following definitions come from smbd/password.c */ + +void generate_next_challenge(char *challenge); +BOOL set_challenge(unsigned char *challenge); +user_struct *get_valid_user_struct(uint16 vuid); +void invalidate_vuid(uint16 vuid); +void invalidate_all_vuids(void); +char *validated_username(uint16 vuid); +char *validated_domain(uint16 vuid); +NT_USER_TOKEN *create_nt_token(uid_t uid, gid_t gid, int ngroups, gid_t *groups, BOOL is_guest, NT_USER_TOKEN *sup_tok); +int register_vuid(uid_t uid,gid_t gid, char *unix_name, char *requested_name, + char *domain,BOOL guest, NT_USER_TOKEN **pptok); +void add_session_user(char *user); +BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8); +BOOL smb_password_ok(SAM_ACCOUNT *sampass, uchar chal[8], + uchar lm_pass[24], uchar nt_pass[24]); +BOOL pass_check_smb(char *user, char *domain, uchar *chal, + uchar *lm_pwd, uchar *nt_pwd, struct passwd *pwd); +BOOL password_ok(char *user, char *password, int pwlen, struct passwd *pwd); +BOOL user_ok(char *user,int snum); +BOOL authorise_login(int snum,char *user,char *password, int pwlen, + BOOL *guest,BOOL *force,uint16 vuid); +BOOL check_hosts_equiv(char *user); +struct cli_state *server_client(void); +struct cli_state *server_cryptkey(void); +BOOL server_validate(char *user, char *domain, + char *pass, int passlen, + char *ntpass, int ntpasslen); +BOOL domain_client_validate( char *user, char *domain, + char *smb_apasswd, int smb_apasslen, + char *smb_ntpasswd, int smb_ntpasslen, + BOOL *user_exists, NT_USER_TOKEN **pptoken); + +/* The following definitions come from smbd/pipes.c */ + +int reply_open_pipe_and_X(connection_struct *conn, + char *inbuf,char *outbuf,int length,int bufsize); +int reply_pipe_write(char *inbuf,char *outbuf,int length,int dum_bufsize); +int reply_pipe_write_and_X(char *inbuf,char *outbuf,int length,int bufsize); +int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize); +int reply_pipe_close(connection_struct *conn, char *inbuf,char *outbuf); + +/* The following definitions come from smbd/posix_acls.c */ + +SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T acl); +size_t get_nt_acl(files_struct *fsp, SEC_DESC **ppdesc); +BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd); +int chmod_acl(connection_struct *conn, const char *name, mode_t mode); +int inherit_access_acl(connection_struct *conn, const char *name, mode_t mode); +int fchmod_acl(files_struct *fsp, int fd, mode_t mode); +BOOL directory_has_default_acl(connection_struct *conn, const char *fname); + +/* The following definitions come from smbd/process.c */ + +BOOL push_oplock_pending_smb_message(char *buf, int msg_len); +BOOL receive_next_smb(char *inbuf, int bufsize, int timeout); +void respond_to_all_remaining_local_messages(void); +void process_smb(char *inbuf, char *outbuf); +const char *smb_fn_name(int type); +void construct_reply_common(char *inbuf,char *outbuf); +int chain_reply(char *inbuf,char *outbuf,int size,int bufsize); +void check_reload(int t); +void smbd_process(void); + +/* The following definitions come from smbd/reply.c */ + +int reply_special(char *inbuf,char *outbuf); +int reply_tcon(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_unknown(char *inbuf,char *outbuf); +int reply_ioctl(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int smb_create_user(char *unix_user, char *homedir); +int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_fclose(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_open(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_open_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_ulogoffX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_mknew(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_ctemp(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name); +int reply_unlink(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +void fail_readraw(void); +void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T startpos, size_t nread, + ssize_t mincount, char *outbuf); +int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_size, int dum_buffsize); +int reply_lockread(connection_struct *conn, char *inbuf,char *outbuf, int length, int dum_buffsiz); +int reply_read(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length, + files_struct *fsp, SMB_OFF_T startpos, size_t smb_maxcnt); +int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_writeunlock(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_write(connection_struct *conn, char *inbuf,char *outbuf,int size,int dum_buffsize); +int reply_write_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_lseek(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_flush(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_exit(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_close(connection_struct *conn, char *inbuf,char *outbuf, int size, + int dum_buffsize); +int reply_writeclose(connection_struct *conn, + char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_lock(connection_struct *conn, + char *inbuf,char *outbuf, int length, int dum_buffsize); +int reply_unlock(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_tdis(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_echo(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_printopen(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_printclose(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_printqueue(connection_struct *conn, + char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_printwrite(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +NTSTATUS mkdir_internal(connection_struct *conn, pstring directory); +int reply_mkdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +BOOL rmdir_internals(connection_struct *conn, char *directory); +int reply_rmdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, BOOL replace_if_exists); +int reply_mv(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +uint16 get_lock_pid( char *data, int data_offset, BOOL large_file_format); +SMB_BIG_UINT get_lock_count( char *data, int data_offset, BOOL large_file_format); +SMB_BIG_UINT get_lock_offset( char *data, int data_offset, BOOL large_file_format, BOOL *err); +int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_readbmpx(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_setattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_writebmpx(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); +int reply_writebs(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize); +int reply_getattrE(connection_struct *conn, char *inbuf,char *outbuf, int size, int dum_buffsize); + +/* The following definitions come from smbd/sec_ctx.c */ + +int get_current_groups(gid_t gid, int *p_ngroups, gid_t **p_groups); +void delete_nt_token(NT_USER_TOKEN **pptoken); +NT_USER_TOKEN *dup_nt_token(NT_USER_TOKEN *ptoken); +BOOL initialise_groups(char *user, uid_t uid, gid_t gid); +BOOL push_sec_ctx(void); +void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN *token); +void set_root_sec_ctx(void); +BOOL pop_sec_ctx(void); +void init_sec_ctx(void); + +/* The following definitions come from smbd/server.c */ + +int smbd_server_fd(void); +void smbd_set_server_fd(int fd); +BOOL allowable_number_of_smbd_processes(void); +BOOL reload_services(BOOL test); +int32 increment_smbd_process_count(void); +void exit_server(const char *reason); + +/* The following definitions come from smbd/service.c */ + +BOOL set_current_service(connection_struct *conn,BOOL do_chdir); +int add_home_service(char *service, char *homedir); +int find_service(char *service); +connection_struct *make_connection(char *service,char *user,char *password, int pwlen, char *dev,uint16 vuid, int *ecode); +void close_cnum(connection_struct *conn, uint16 vuid); + +/* The following definitions come from smbd/session.c */ + +BOOL session_claim(uint16 vuid); +void session_yield(uint16 vuid); + +/* The following definitions come from smbd/ssl.c */ + +int sslutil_init(int isServer); +int sslutil_accept(int fd); +int sslutil_fd_is_ssl(int fd); +int sslutil_connect(int fd); +int sslutil_disconnect(int fd); +int sslutil_negotiate_ssl(int fd, int msg_type); + +/* The following definitions come from smbd/statcache.c */ + +void stat_cache_add( char *full_orig_name, char *orig_translated_path); +BOOL stat_cache_lookup(connection_struct *conn, char *name, char *dirpath, + char **start, SMB_STRUCT_STAT *pst); +BOOL reset_stat_cache( void ); + +/* The following definitions come from smbd/trans2.c */ + +SMB_BIG_UINT get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf); +time_t interpret_long_unix_date(char *p); +NTSTATUS set_bad_path_error(int err, BOOL bad_path); +NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close); +NTSTATUS set_delete_on_close_over_all(files_struct *fsp, BOOL delete_on_close); +int reply_findclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_findnclose(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_transs2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); +int reply_trans2(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize); + +/* The following definitions come from smbd/uid.c */ + +BOOL change_to_guest(void); +BOOL change_to_user(connection_struct *conn, uint16 vuid); +BOOL change_to_root_user(void); +BOOL become_authenticated_pipe_user(pipes_struct *p); +BOOL unbecome_authenticated_pipe_user(void); +void init_conn_ctx(void); +void become_root(void); +void unbecome_root(void); +BOOL become_user(connection_struct *conn, uint16 vuid); +BOOL unbecome_user(void); +void add_supplementary_nt_login_groups(int *n_groups, gid_t **pp_groups, NT_USER_TOKEN **pptok); +BOOL lookup_name(const char *name, DOM_SID *psid, enum SID_NAME_USE *name_type); +BOOL lookup_sid(DOM_SID *sid, fstring dom_name, fstring name, enum SID_NAME_USE *name_type); +DOM_SID *uid_to_sid(DOM_SID *psid, uid_t uid); +DOM_SID *gid_to_sid(DOM_SID *psid, gid_t gid); +BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype); +BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype); + +/* The following definitions come from smbd/utmp.c */ + +void sys_utmp_yield(const char *username, const char *hostname, + const char *id_str, int id_num); +void sys_utmp_claim(const char *username, const char *hostname, + const char *id_str, int id_num); + +/* The following definitions come from smbd/vfs.c */ + +BOOL smbd_vfs_init(connection_struct *conn); +BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st); +int vfs_mkdir(connection_struct *conn, char *const fname, mode_t mode); +char *vfs_getwd(connection_struct *conn, char *unix_path); +BOOL vfs_object_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +BOOL vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf); +ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count); +ssize_t vfs_write_data(files_struct *fsp,const char *buffer,size_t N); +int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len); +int vfs_set_filelen(files_struct *fsp, SMB_OFF_T len); +SMB_OFF_T vfs_transfer_file(files_struct *in, files_struct *out, SMB_OFF_T n); +char *vfs_readdirname(connection_struct *conn, void *p); +int vfs_ChDir(connection_struct *conn, const char *path); +char *vfs_GetWd(connection_struct *conn, char *path); +BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks); + +/* The following definitions come from smbd/vfs-wrap.c */ + +int vfswrap_dummy_connect(connection_struct *conn, const char *service, const char *user); +void vfswrap_dummy_disconnect(connection_struct *conn); +SMB_BIG_UINT vfswrap_disk_free(connection_struct *conn, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, + SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); +DIR *vfswrap_opendir(connection_struct *conn, const char *fname); +struct dirent *vfswrap_readdir(connection_struct *conn, DIR *dirp); +int vfswrap_mkdir(connection_struct *conn, const char *path, mode_t mode); +int vfswrap_rmdir(connection_struct *conn, const char *path); +int vfswrap_closedir(connection_struct *conn, DIR *dirp); +int vfswrap_open(connection_struct *conn, const char *fname, int flags, mode_t mode); +int vfswrap_close(files_struct *fsp, int fd); +ssize_t vfswrap_read(files_struct *fsp, int fd, void *data, size_t n); +ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n); +ssize_t vfswrap_sendfile(int tofd, struct files_struct *fsp, int fromfd, const DATA_BLOB *hdr, + SMB_OFF_T offset, size_t n); +SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence); +int vfswrap_rename(connection_struct *conn, const char *oldname, const char *newname); +int vfswrap_fsync(files_struct *fsp, int fd); +int vfswrap_stat(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *sbuf); +int vfswrap_fstat(files_struct *fsp, int fd, SMB_STRUCT_STAT *sbuf); +int vfswrap_lstat(connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf); +int vfswrap_unlink(connection_struct *conn, const char *path); +int vfswrap_chmod(connection_struct *conn, const char *path, mode_t mode); +int vfswrap_fchmod(files_struct *fsp, int fd, mode_t mode); +int vfswrap_chown(connection_struct *conn, const char *path, uid_t uid, gid_t gid); +int vfswrap_fchown(files_struct *fsp, int fd, uid_t uid, gid_t gid); +int vfswrap_chdir(connection_struct *conn, const char *path); +char *vfswrap_getwd(connection_struct *conn, char *path); +int vfswrap_utime(connection_struct *conn, const char *path, struct utimbuf *times); +int vfswrap_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len); +BOOL vfswrap_lock(files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +int vfswrap_symlink(connection_struct *conn, const char *oldpath, const char *newpath); +int vfswrap_readlink(connection_struct *conn, const char *path, char *buf, size_t bufsiz); +int vfswrap_link(connection_struct *conn, const char *oldpath, const char *newpath); +int vfswrap_mknod(connection_struct *conn, const char *pathname, mode_t mode, SMB_DEV_T dev); +char *vfswrap_realpath(connection_struct *conn, const char *path, char *resolved_path); +size_t vfswrap_fget_nt_acl(files_struct *fsp, int fd, SEC_DESC **ppdesc); +size_t vfswrap_get_nt_acl(files_struct *fsp, const char *name, SEC_DESC **ppdesc); +BOOL vfswrap_fset_nt_acl(files_struct *fsp, int fd, uint32 security_info_sent, SEC_DESC *psd); +BOOL vfswrap_set_nt_acl(files_struct *fsp, const char *name, uint32 security_info_sent, SEC_DESC *psd); +int vfswrap_chmod_acl(connection_struct *conn, const char *name, mode_t mode); +int vfswrap_fchmod_acl(files_struct *fsp, int fd, mode_t mode); +int vfswrap_sys_acl_get_entry(struct connection_struct *conn, SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p); +int vfswrap_sys_acl_get_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_TAG_T *tag_type_p); +int vfswrap_sys_acl_get_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d, SMB_ACL_PERMSET_T *permset_p); +void * vfswrap_sys_acl_get_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry_d); +SMB_ACL_T vfswrap_sys_acl_get_file(struct connection_struct *conn, const char *path_p, SMB_ACL_TYPE_T type); +SMB_ACL_T vfswrap_sys_acl_get_fd(struct files_struct *fsp, int fd); +int vfswrap_sys_acl_clear_perms(struct connection_struct *conn, SMB_ACL_PERMSET_T permset); +int vfswrap_sys_acl_add_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +char * vfswrap_sys_acl_to_text(struct connection_struct *conn, SMB_ACL_T theacl, ssize_t *plen); +SMB_ACL_T vfswrap_sys_acl_init(struct connection_struct *conn, int count); +int vfswrap_sys_acl_create_entry(struct connection_struct *conn, SMB_ACL_T *pacl, SMB_ACL_ENTRY_T *pentry); +int vfswrap_sys_acl_set_tag_type(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tagtype); +int vfswrap_sys_acl_set_qualifier(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, void *qual); +int vfswrap_sys_acl_set_permset(struct connection_struct *conn, SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); +int vfswrap_sys_acl_valid(struct connection_struct *conn, SMB_ACL_T theacl ); +int vfswrap_sys_acl_set_file(struct connection_struct *conn, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); +int vfswrap_sys_acl_set_fd(struct files_struct *fsp, int fd, SMB_ACL_T theacl); +int vfswrap_sys_acl_delete_def_file(struct connection_struct *conn, const char *path); +int vfswrap_sys_acl_get_perm(struct connection_struct *conn, SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); +int vfswrap_sys_acl_free_text(struct connection_struct *conn, char *text); +int vfswrap_sys_acl_free_acl(struct connection_struct *conn, SMB_ACL_T posix_acl); +int vfswrap_sys_acl_free_qualifier(struct connection_struct *conn, void *qualifier, SMB_ACL_TAG_T tagtype); + +/* The following definitions come from smbwrapper/realcalls.c */ + +int real_utime(const char *name, struct utimbuf *buf); +int real_utimes(const char *name, struct timeval tv[2]); + +/* The following definitions come from smbwrapper/shared.c */ + +void smbw_setup_shared(void); +char *smbw_getshared(const char *name); +void smbw_setshared(const char *name, const char *val); +int smbw_setenv(const char *name, const char *value); +int smbw_shared_fd(int fd); + +/* The following definitions come from smbwrapper/smbw.c */ + +void smbw_init(void); +int smbw_fd(int fd); +int smbw_local_fd(int fd); +ino_t smbw_inode(const char *name); +void clean_fname(char *name); +char *smbw_parse_path(const char *fname, char *server, char *share, char *path); +int smbw_path(const char *path); +int smbw_errno(struct cli_state *c); +void get_envvar_auth_data(char *server, char *share, char **workgroup, + char **username, char **password); +void smbw_set_auth_data_fn(smbw_get_auth_data_fn fn); +struct smbw_server *smbw_server(char *server, char *share); +struct smbw_file *smbw_file(int fd); +int smbw_open(const char *fname, int flags, mode_t mode); +ssize_t smbw_pread(int fd, void *buf, size_t count, off_t ofs); +ssize_t smbw_read(int fd, void *buf, size_t count); +ssize_t smbw_write(int fd, void *buf, size_t count); +ssize_t smbw_pwrite(int fd, void *buf, size_t count, off_t ofs); +int smbw_close(int fd); +int smbw_fcntl(int fd, int cmd, long arg); +int smbw_access(const char *name, int mode); +int smbw_readlink(const char *path, char *buf, size_t bufsize); +int smbw_unlink(const char *fname); +int smbw_rename(const char *oldname, const char *newname); +int smbw_utime(const char *fname, void *buf); +int smbw_utimes(const char *fname, void *buf); +int smbw_chown(const char *fname, uid_t owner, gid_t group); +int smbw_chmod(const char *fname, mode_t newmode); +off_t smbw_lseek(int fd, off_t offset, int whence); +int smbw_dup(int fd); +int smbw_dup2(int fd, int fd2); +int smbw_fork(void); + +/* The following definitions come from smbwrapper/smbw_dir.c */ + +struct smbw_dir *smbw_dir(int fd); +int smbw_dirp(DIR *dirp); +int smbw_dir_open(const char *fname); +int smbw_dir_fstat(int fd, struct stat *st); +int smbw_dir_close(int fd); +int smbw_getdents(unsigned int fd, struct dirent *dirp, int count); +int smbw_chdir(const char *name); +off_t smbw_dir_lseek(int fd, off_t offset, int whence); +int smbw_mkdir(const char *fname, mode_t mode); +int smbw_rmdir(const char *fname); +char *smbw_getcwd(char *buf, size_t size); +int smbw_fchdir(unsigned int fd); +DIR *smbw_opendir(const char *fname); +struct dirent *smbw_readdir(DIR *dirp); +int smbw_closedir(DIR *dirp); +void smbw_seekdir(DIR *dirp, off_t offset); +off_t smbw_telldir(DIR *dirp); + +/* The following definitions come from smbwrapper/smbw_stat.c */ + +void smbw_setup_stat(struct stat *st, char *fname, size_t size, int mode); +BOOL smbw_getatr(struct smbw_server *srv, char *path, + uint16 *mode, size_t *size, + time_t *c_time, time_t *a_time, time_t *m_time, + SMB_INO_T *ino); +int smbw_stat_printjob(struct smbw_server *srv,char *path, + size_t *size, time_t *m_time); +int smbw_fstat(int fd, struct stat *st); +int smbw_stat(const char *fname, struct stat *st); + +/* The following definitions come from tdb/spinlock.c */ + +int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type); +int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type); +int tdb_create_rwlocks(int fd, unsigned int hash_size); +int tdb_clear_spinlocks(TDB_CONTEXT *tdb); +int tdb_clear_spinlocks(TDB_CONTEXT *tdb); + +/* The following definitions come from tdb/tdb.c */ + +void tdb_set_lock_alarm(sig_atomic_t *palarm); +void tdb_dump_all(TDB_CONTEXT *tdb); +int tdb_printfreelist(TDB_CONTEXT *tdb); +enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb); +const char *tdb_errorstr(TDB_CONTEXT *tdb); +TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state); +TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb); +TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey); +int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag); +int tdb_append(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA new_dbuf); +TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags, + int open_flags, mode_t mode); +TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, + int open_flags, mode_t mode, + tdb_log_func log_fn); +int tdb_close(TDB_CONTEXT *tdb); +int tdb_lockall(TDB_CONTEXT *tdb); +void tdb_unlockall(TDB_CONTEXT *tdb); +int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]); +void tdb_unlockkeys(TDB_CONTEXT *tdb); +int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainlock_read(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainunlock_read(TDB_CONTEXT *tdb, TDB_DATA key); +void tdb_logging_function(TDB_CONTEXT *tdb, void (*fn)(TDB_CONTEXT *, int , const char *, ...)); +int tdb_reopen(TDB_CONTEXT *tdb); +int tdb_reopen_all(void); + +/* The following definitions come from tdb/tdbutil.c */ + +int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout); +int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout); +void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval); +int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len); +int32 tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr); +int tdb_store_int32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, int32 v); +int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32 v); +BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len, uint32 *value); +BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value); +BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, uint32 value); +BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value); +int tdb_store_by_string(TDB_CONTEXT *tdb, const char *keystr, void *buffer, int len); +TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, const char *keystr); +int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32 *oldval, int32 change_val); +BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val); +size_t tdb_pack(char *buf, int bufsize, const char *fmt, ...); +int tdb_unpack(char *buf, int bufsize, const char *fmt, ...); +TDB_CONTEXT *tdb_open_log(const char *name, int hash_size, int tdb_flags, + int open_flags, mode_t mode); +int tdb_traverse_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, + void *state); + +/* The following definitions come from utils/nbio.c */ + +void nb_setup(struct cli_state *cli); +void nb_unlink(char *fname); +void nb_open(char *fname, int handle, int size); +void nb_write(int handle, int size, int offset); +void nb_read(int handle, int size, int offset); +void nb_close(int handle); +void nb_mkdir(char *fname); +void nb_rmdir(char *fname); +void nb_rename(char *old, char *new); +void nb_stat(char *fname, int size); +void nb_create(char *fname, int size); + +/* The following definitions come from utils/torture.c */ + +int cli_setfileinfo_test(struct cli_state *cli, int fnum, int level, char *data, int data_len); + +/* The following definitions come from web/cgi.c */ + +void cgi_load_variables(FILE *f1); +const char *cgi_variable(const char *name); +BOOL am_root(void); +char *cgi_user_name(void); +void cgi_setup(const char *rootdir, int auth_required); +const char *cgi_baseurl(void); +const char *cgi_pathinfo(void); +char *cgi_remote_host(void); +char *cgi_remote_addr(void); +BOOL cgi_waspost(void); + +/* The following definitions come from web/diagnose.c */ + +BOOL nmbd_running(void); +BOOL smbd_running(void); + +/* The following definitions come from web/startstop.c */ + +void start_smbd(void); +void start_nmbd(void); +void stop_smbd(void); +void stop_nmbd(void); +void kill_pid(pid_t pid); + +/* The following definitions come from web/statuspage.c */ + +void status_page(void); + +/* The following definitions come from web/swat.c */ + +#endif /* _PROTO_H_ */ diff --git a/source/include/version.h b/source/include/version.h new file mode 100755 index 00000000000..ed4d2a151a3 --- /dev/null +++ b/source/include/version.h @@ -0,0 +1 @@ +#define VERSION "2.2.9pre1" diff --git a/source/nsswitch/winbindd_proto.h b/source/nsswitch/winbindd_proto.h new file mode 100755 index 00000000000..96c29ce750d --- /dev/null +++ b/source/nsswitch/winbindd_proto.h @@ -0,0 +1,120 @@ +#ifndef _WINBINDD_PROTO_H_ +#define _WINBINDD_PROTO_H_ +/* This file is automatically generated with "make proto". DO NOT EDIT */ + + +/* The following definitions come from nsswitch/winbindd.c */ + +int main(int argc, char **argv); + +/* The following definitions come from nsswitch/winbindd_cache.c */ + +void wcache_flush_cache(void); +void winbindd_check_cache_size(time_t t); +struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status); + +/* The following definitions come from nsswitch/winbindd_cm.c */ + +NTSTATUS cm_get_lsa_handle(char *domain, CLI_POLICY_HND **return_hnd); +NTSTATUS cm_get_sam_handle(char *domain, CLI_POLICY_HND **return_hnd); +CLI_POLICY_HND *cm_get_sam_dom_handle(char *domain, DOM_SID *domain_sid); +CLI_POLICY_HND *cm_get_sam_user_handle(char *domain, DOM_SID *domain_sid, + uint32 user_rid); +CLI_POLICY_HND *cm_get_sam_group_handle(char *domain, DOM_SID *domain_sid, + uint32 group_rid); +NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd, + struct cli_state **cli); +void winbindd_cm_status(void); +void winbindd_cm_flush(void); + +/* The following definitions come from nsswitch/winbindd_group.c */ + +enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state); +enum winbindd_result winbindd_getgrgid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state); +enum winbindd_result winbindd_endgrent(struct winbindd_cli_state *state); +enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state); +enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state); +enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state); + +/* The following definitions come from nsswitch/winbindd_idmap.c */ + +BOOL winbindd_idmap_get_uid_from_sid(DOM_SID *sid, uid_t *uid); +BOOL winbindd_idmap_get_gid_from_sid(DOM_SID *sid, gid_t *gid); +BOOL winbindd_idmap_get_uid_from_rid(const char *dom_name, uint32 rid, uid_t *uid); +BOOL winbindd_idmap_get_gid_from_rid(const char *dom_name, uint32 rid, gid_t *gid); +BOOL get_sid_from_id(int id, DOM_SID *sid, BOOL isgroup); +BOOL winbindd_idmap_get_sid_from_uid(uid_t uid, DOM_SID *sid); +BOOL winbindd_idmap_get_sid_from_gid(gid_t gid, DOM_SID *sid); +BOOL winbindd_idmap_get_rid_from_uid(uid_t uid, uint32 *user_rid, + struct winbindd_domain **domain); +BOOL winbindd_idmap_get_rid_from_gid(gid_t gid, uint32 *group_rid, + struct winbindd_domain **domain); +BOOL winbindd_idmap_init(void); +BOOL winbindd_idmap_close(void); +void winbindd_idmap_status(void); + +/* The following definitions come from nsswitch/winbindd_misc.c */ + +enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *state); +enum winbindd_result winbindd_list_trusted_domains(struct winbindd_cli_state + *state); +enum winbindd_result winbindd_show_sequence(struct winbindd_cli_state *state); +enum winbindd_result winbindd_ping(struct winbindd_cli_state + *state); +enum winbindd_result winbindd_info(struct winbindd_cli_state *state); +enum winbindd_result winbindd_interface_version(struct winbindd_cli_state *state); +enum winbindd_result winbindd_domain_name(struct winbindd_cli_state *state); + +/* The following definitions come from nsswitch/winbindd_pam.c */ + +enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) ; +enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ; +enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state); + +/* The following definitions come from nsswitch/winbindd_rpc.c */ + + +/* The following definitions come from nsswitch/winbindd_sid.c */ + +enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state); +enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_uid_to_sid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_gid_to_sid(struct winbindd_cli_state *state); + +/* The following definitions come from nsswitch/winbindd_user.c */ + +enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state) ; +enum winbindd_result winbindd_getpwuid(struct winbindd_cli_state *state); +enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state); +enum winbindd_result winbindd_endpwent(struct winbindd_cli_state *state); +enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state); +enum winbindd_result winbindd_list_users(struct winbindd_cli_state *state); + +/* The following definitions come from nsswitch/winbindd_util.c */ + +struct winbindd_domain *domain_list(void); +void free_domain_list(void); +BOOL init_domain_list(void); +struct winbindd_domain *find_domain_from_name(const char *domain_name); +struct winbindd_domain *find_domain_from_sid(DOM_SID *sid); +BOOL winbindd_lookup_sid_by_name(struct winbindd_domain *domain, + const char *name, DOM_SID *sid, + enum SID_NAME_USE *type); +BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, + fstring dom_name, + fstring name, + enum SID_NAME_USE *type); +void free_getent_state(struct getent_state *state); +BOOL winbindd_param_init(void); +BOOL check_domain_env(char *domain_env, char *domain); +BOOL parse_domain_user(const char *domuser, fstring domain, fstring user); +void fill_domain_username(fstring name, const char *domain, const char *user); + +/* The following definitions come from nsswitch/winbindd_wins.c */ + +enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state); +enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state); +#endif /* _PROTO_H_ */ |