This is an unofficial patch for ypbind 3.3. It fixes the compiling problems with gcc 2.8.x and egcs 1.x. This version of ypbind is 64bit clean. And it fixes some problems with glibc 2.x: 1. The timeout for pinging an server was to short. 2. ypbind doesn't remove it's binding file always, so glibc and libc5 will try to use bogus data for RPC calls to ypserv if no ypbind is running. 3. union semun is not longer defined in glibc 2.1, but needed for glibc 2.0. Thorsten Kukuk diff -u -r --new-file ypbind-3.3/Makefile.am ypbind/Makefile.am --- ypbind-3.3/Makefile.am Fri Jul 4 09:56:05 1997 +++ ypbind/Makefile.am Thu Feb 19 16:52:39 1998 @@ -2,19 +2,17 @@ sbin_PROGRAMS = ypbind ypbind_SOURCES = ypbind.c slave.c xdr_ypbind.c daemon.c openmax.c \ lockreg.c locktest.c errorlog.c readn.c writen.c \ - daemon.h ourhdr.h ypbind.h + daemon.h ourhdr.h ypbind.h patchlevel.h man_MANS = ypbind.8 CFLAGS = @CFLAGS@ @WARNFLAGS@ LDADD = @RESOLV@ EXTRA_DIST = yp.conf.example +CLEANFILES = *~ ypbind.8 patchlevel.h core + ypbind.8: ypbind.man -$(RM) -f $@ cd $(top_builddir) && sed -e "s+@SBINDIR@+${sbindir}+g" $< > $@ || $(RM) $@ - -dist-hook: - -mkdir $(distdir)/rpcsvc - -cp -p rpcsvc/yp_prot.h $(distdir)/rpcsvc .DELETE_ON_ERROR: diff -u -r --new-file ypbind-3.3/Makefile.in ypbind/Makefile.in --- ypbind-3.3/Makefile.in Fri Jul 4 16:30:47 1997 +++ ypbind/Makefile.in Sun Nov 8 10:13:26 1998 @@ -1,8 +1,14 @@ -# Makefile.in generated automatically by automake 1.2 from Makefile.am +# Makefile.in generated automatically by automake 1.3 from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. SHELL = /bin/sh @@ -26,6 +32,8 @@ includedir = @includedir@ oldincludedir = /usr/include +DISTDIR = + pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -43,12 +51,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ -NORMAL_INSTALL = true -PRE_INSTALL = true -POST_INSTALL = true -NORMAL_UNINSTALL = true -PRE_UNINSTALL = true -POST_UNINSTALL = true +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : CC = @CC@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ @@ -60,12 +68,14 @@ sbin_PROGRAMS = ypbind ypbind_SOURCES = ypbind.c slave.c xdr_ypbind.c daemon.c openmax.c \ lockreg.c locktest.c errorlog.c readn.c writen.c \ - daemon.h ourhdr.h ypbind.h + daemon.h ourhdr.h ypbind.h patchlevel.h man_MANS = ypbind.8 CFLAGS = @CFLAGS@ @WARNFLAGS@ LDADD = @RESOLV@ EXTRA_DIST = yp.conf.example + +CLEANFILES = *~ ypbind.8 patchlevel.h core ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h @@ -84,7 +94,8 @@ ypbind_LDFLAGS = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -MANS = ypbind.8 +man8dir = $(mandir)/man8 +MANS = $(man_MANS) NROFF = nroff DIST_COMMON = README COPYING INSTALL Makefile.am Makefile.in TODO \ @@ -97,17 +108,20 @@ TAR = tar GZIP = --best +DEP_FILES = .deps/daemon.P .deps/errorlog.P .deps/lockreg.P \ +.deps/locktest.P .deps/openmax.P .deps/readn.P .deps/slave.P \ +.deps/writen.P .deps/xdr_ypbind.P .deps/ypbind.P SOURCES = $(ypbind_SOURCES) OBJECTS = $(ypbind_OBJECTS) -default: all +all: Makefile $(PROGRAMS) $(MANS) config.h .SUFFIXES: -.SUFFIXES: .c .o -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -120,6 +134,7 @@ cd $(srcdir) && $(AUTOCONF) config.h: stamp-h + @: stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ @@ -135,7 +150,7 @@ clean-hdr: distclean-hdr: - rm -f config.h + -rm -f config.h maintainer-clean-hdr: patchlevel.h: $(top_builddir)/config.status patchlevel.h.in @@ -146,7 +161,7 @@ mostlyclean-sbinPROGRAMS: clean-sbinPROGRAMS: - test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) distclean-sbinPROGRAMS: @@ -154,69 +169,101 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(sbindir) + $(mkinstalldirs) $(DESTDIR)$(sbindir) @list='$(sbin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ - echo " $(INSTALL_PROGRAM) $$p $(sbindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_PROGRAM) $$p $(sbindir)/`echo $$p|sed '$(transform)'`; \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; \ done uninstall-sbinPROGRAMS: - $(NORMAL_UNINSTALL) + @$(NORMAL_UNINSTALL) list='$(sbin_PROGRAMS)'; for p in $$list; do \ - rm -f $(sbindir)/`echo $$p|sed '$(transform)'`; \ + rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \ done -.c.o: +.s.o: + $(COMPILE) -c $< + +.S.o: $(COMPILE) -c $< mostlyclean-compile: - rm -f *.o core + -rm -f *.o core *.core clean-compile: distclean-compile: - rm -f *.tab.c + -rm -f *.tab.c maintainer-clean-compile: ypbind: $(ypbind_OBJECTS) $(ypbind_DEPENDENCIES) @rm -f ypbind $(LINK) $(ypbind_LDFLAGS) $(ypbind_OBJECTS) $(ypbind_LDADD) $(LIBS) -install-man: $(MANS) - $(NORMAL_INSTALL) - $(mkinstalldirs) $(mandir)/man8 - @sect=8; \ - inst=`echo "ypbind" | sed '$(transform)'`.8; \ - if test -f $(srcdir)/ypbind.8; then file=$(srcdir)/ypbind.8; \ - else file=ypbind.8; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst -uninstall-man: - $(NORMAL_UNINSTALL) - inst=`echo "ypbind" | sed '$(transform)'`.8; \ - rm -f $(mandir)/man8/$$inst +install-man8: + $(mkinstalldirs) $(DESTDIR)$(man8dir) + @list='$(man8_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \ + done +uninstall-man8: + @list='$(man8_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \ + rm -f $(DESTDIR)$(man8dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) install-man8 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) uninstall-man8 tags: TAGS -ID: $(HEADERS) $(SOURCES) - here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) +ID: $(HEADERS) $(SOURCES) $(LISP) + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ - test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) -o $$here/TAGS) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: - rm -f TAGS ID + -rm -f TAGS ID maintainer-clean-tags: @@ -227,7 +274,7 @@ # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - rm -rf $(distdir) + -rm -rf $(distdir) GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst @@ -240,41 +287,59 @@ && $(MAKE) install \ && $(MAKE) installcheck \ && $(MAKE) dist - rm -rf $(distdir) + -rm -rf $(distdir) @echo "========================"; \ echo "$(distdir).tar.gz is ready for distribution"; \ echo "========================" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) - rm -rf $(distdir) + -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) - rm -rf $(distdir) + -rm -rf $(distdir) distdir: $(DISTFILES) - rm -rf $(distdir) + -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ done - $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook -daemon.o daemon.lo: daemon.c config.h ourhdr.h -errorlog.o errorlog.lo: errorlog.c config.h ourhdr.h -lockreg.o lockreg.lo: lockreg.c ourhdr.h -locktest.o locktest.lo: locktest.c ourhdr.h -openmax.o openmax.lo: openmax.c ourhdr.h -readn.o readn.lo: readn.c ourhdr.h -slave.o slave.lo: slave.c config.h rpcsvc/yp_prot.h ourhdr.h ypbind.h -writen.o writen.lo: writen.c ourhdr.h -xdr_ypbind.o xdr_ypbind.lo: xdr_ypbind.c rpcsvc/yp_prot.h -ypbind.o ypbind.lo: ypbind.c config.h rpcsvc/yp_prot.h ourhdr.h ypbind.h \ - patchlevel.h +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + -rm -rf .deps + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + -rm -rf .deps + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).P -c $< + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $< + @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \ + < .deps/$(*F).p > .deps/$(*F).P + @-rm -f .deps/$(*F).p info: dvi: check: all @@ -291,65 +356,61 @@ uninstall: uninstall-sbinPROGRAMS uninstall-man -all: Makefile $(PROGRAMS) $(MANS) config.h - install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install installdirs: - $(mkinstalldirs) $(sbindir) $(mandir)/man8 + $(mkinstalldirs) $(DATADIR)$(sbindir) $(DESTDIR)$(mandir)/man8 mostlyclean-generic: - test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: - test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - rm -f Makefile $(DISTCLEANFILES) - rm -f config.cache config.log stamp-h stamp-h[0-9]* - test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(DISTCLEANFILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: - test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean: mostlyclean-hdr mostlyclean-sbinPROGRAMS \ - mostlyclean-compile mostlyclean-tags \ + mostlyclean-compile mostlyclean-tags mostlyclean-depend \ mostlyclean-generic clean: clean-hdr clean-sbinPROGRAMS clean-compile clean-tags \ - clean-generic mostlyclean + clean-depend clean-generic mostlyclean distclean: distclean-hdr distclean-sbinPROGRAMS distclean-compile \ - distclean-tags distclean-generic clean - rm -f config.status + distclean-tags distclean-depend distclean-generic clean + -rm -f config.status maintainer-clean: maintainer-clean-hdr maintainer-clean-sbinPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ - maintainer-clean-generic distclean + maintainer-clean-depend maintainer-clean-generic \ + distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." - rm -f config.status + -rm -f config.status -.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ -maintainer-clean-hdr mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS \ -clean-sbinPROGRAMS maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \ +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS clean-sbinPROGRAMS \ +maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \ install-sbinPROGRAMS mostlyclean-compile distclean-compile \ -clean-compile maintainer-clean-compile install-man uninstall-man tags \ -mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ -distdir info dvi installcheck install-exec install-data install \ -uninstall all installdirs mostlyclean-generic distclean-generic \ -clean-generic maintainer-clean-generic clean mostlyclean distclean \ -maintainer-clean +clean-compile maintainer-clean-compile install-man8 uninstall-man8 \ +install-man uninstall-man tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir mostlyclean-depend \ +distclean-depend clean-depend maintainer-clean-depend info dvi \ +installcheck install-exec install-data install uninstall all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean ypbind.8: ypbind.man -$(RM) -f $@ cd $(top_builddir) && sed -e "s+@SBINDIR@+${sbindir}+g" $< > $@ || $(RM) $@ - -dist-hook: - -mkdir $(distdir)/rpcsvc - -cp -p rpcsvc/yp_prot.h $(distdir)/rpcsvc .DELETE_ON_ERROR: diff -u -r --new-file ypbind-3.3/aclocal.m4 ypbind/aclocal.m4 --- ypbind-3.3/aclocal.m4 Fri Jul 4 12:10:40 1997 +++ ypbind/aclocal.m4 Sun Nov 8 10:13:25 1998 @@ -1,4 +1,14 @@ -dnl aclocal.m4 generated automatically by aclocal 1.2 +dnl aclocal.m4 generated automatically by aclocal 1.3 + +dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +dnl This Makefile.in is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. dnl Tests for miscellaneous AC_DEFUN(ST_DECL_SVC_REGISTER, @@ -72,8 +82,8 @@ ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) -AM_SANITY_CHECK -AC_ARG_PROGRAM +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) @@ -81,7 +91,7 @@ AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) -AC_PROG_MAKE_SET]) +AC_REQUIRE([AC_PROG_MAKE_SET])]) # serial 1 @@ -108,10 +118,21 @@ # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "$@" = "X"; then + if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + test "[$]2" = conftestfile ) then diff -u -r --new-file ypbind-3.3/configure ypbind/configure --- ypbind-3.3/configure Fri Jul 4 13:08:10 1997 +++ ypbind/configure Sun Nov 8 10:13:27 1998 @@ -605,24 +605,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -PACKAGE=ypbind - -VERSION=3.3 - -if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } -fi -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:626: checking whether build environment is sane" >&5 +echo "configure:610: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -633,10 +617,21 @@ # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` - if test "" = "X"; then + if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + test "$2" = conftestfile ) then @@ -667,9 +662,54 @@ # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:667: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=ypbind + +VERSION=3.3-glibc4 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <> confdefs.h <&6 -echo "configure:673: checking for working aclocal" >&5 +echo "configure:713: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -682,7 +722,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:686: checking for working autoconf" >&5 +echo "configure:726: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -695,7 +735,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:699: checking for working automake" >&5 +echo "configure:739: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -708,7 +748,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:712: checking for working autoheader" >&5 +echo "configure:752: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -721,7 +761,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:725: checking for working makeinfo" >&5 +echo "configure:765: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -733,32 +773,6 @@ echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:738: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi @@ -769,7 +783,7 @@ # Extract the first word of "ypbind", so it can be a program name with args. set dummy ypbind; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:773: checking for $ac_word" >&5 +echo "configure:787: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_YPBIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -811,7 +825,7 @@ # 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:815: checking for $ac_word" >&5 +echo "configure:829: 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 @@ -840,7 +854,7 @@ # 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 +echo "configure:858: 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 @@ -888,7 +902,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:906: 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. @@ -898,11 +912,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -922,12 +936,12 @@ { 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:926: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:940: 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:931: checking whether we are using GNU C" >&5 +echo "configure:945: 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 @@ -936,7 +950,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:954: \"$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 @@ -951,7 +965,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:955: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:969: 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 @@ -998,7 +1012,7 @@ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1002: checking how to run the C preprocessor" >&5 +echo "configure:1016: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1013,13 +1027,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1030,13 +1044,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1059,12 +1073,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1063: checking for ANSI C header files" >&5 +echo "configure:1077: 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 < #include @@ -1072,7 +1086,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1089,7 +1103,7 @@ 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 @@ -1107,7 +1121,7 @@ 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 @@ -1128,7 +1142,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1139,7 +1153,7 @@ exit (0); } EOF -if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1163,12 +1177,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1167: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1181: 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 < #include @@ -1184,7 +1198,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1208,17 +1222,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1212: checking for $ac_hdr" >&5 +echo "configure:1226: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1248,17 +1262,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1252: checking for $ac_hdr" >&5 +echo "configure:1266: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1288,17 +1302,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1292: checking for $ac_hdr" >&5 +echo "configure:1306: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1326,12 +1340,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1330: checking for working const" >&5 +echo "configure:1344: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1401,12 +1415,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1405: checking for off_t" >&5 +echo "configure:1419: 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 < #if STDC_HEADERS @@ -1434,12 +1448,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1438: checking for pid_t" >&5 +echo "configure:1452: 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 < #if STDC_HEADERS @@ -1467,12 +1481,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1471: checking for size_t" >&5 +echo "configure:1485: 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 < #if STDC_HEADERS @@ -1500,12 +1514,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1504: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1518: 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 < #include @@ -1514,7 +1528,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1535,12 +1549,12 @@ fi echo $ac_n "checking for svc_register declaration in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:1539: checking for svc_register declaration in rpc/rpc.h" >&5 +echo "configure:1553: checking for svc_register declaration in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'st_cv_decl_svc_register'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if HAVE_RPC_SVC_SOC_H @@ -1552,7 +1566,7 @@ ; return 0; } EOF -if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* st_cv_decl_svc_register=no else @@ -1573,12 +1587,12 @@ fi echo $ac_n "checking whether rpc/rpc.h defines svc_getcaller""... $ac_c" 1>&6 -echo "configure:1577: checking whether rpc/rpc.h defines svc_getcaller" >&5 +echo "configure:1591: checking whether rpc/rpc.h defines svc_getcaller" >&5 if eval "test \"`echo '$''{'ac_cv_has_svc_getcaller'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if HAVE_RPC_SVC_SOC_H @@ -1600,7 +1614,7 @@ if test $ac_found = no; then cat > conftest.$ac_ext < EOF @@ -1631,12 +1645,12 @@ else echo $ac_n "checking for svc_getcaller""... $ac_c" 1>&6 -echo "configure:1635: checking for svc_getcaller" >&5 +echo "configure:1649: checking for svc_getcaller" >&5 if eval "test \"`echo '$''{'ac_cv_func_svc_getcaller'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_svc_getcaller=yes" else @@ -1686,7 +1700,7 @@ # See if it's in some other. for lib in nsl socket inet bsd; do echo $ac_n "checking for svc_getcaller in -l$lib""... $ac_c" 1>&6 -echo "configure:1690: checking for svc_getcaller in -l$lib" >&5 +echo "configure:1704: checking for svc_getcaller in -l$lib" >&5 ac_lib_var=`echo $lib'_'svc_getcaller | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1694,7 +1708,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1738,17 +1752,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1742: checking for $ac_hdr" >&5 +echo "configure:1756: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1777,12 +1791,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1781: checking for $ac_func" >&5 +echo "configure:1795: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1830,7 +1844,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:1834: checking for working mmap" >&5 +echo "configure:1848: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1838,7 +1852,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2001,12 +2015,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2005: checking return type of signal handlers" >&5 +echo "configure:2019: 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 < #include @@ -2023,7 +2037,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2042,12 +2056,12 @@ echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2046: checking for vprintf" >&5 +echo "configure:2060: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2094,12 +2108,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2098: checking for _doprnt" >&5 +echo "configure:2112: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2149,12 +2163,12 @@ for ac_func in mkdir putenv strdup strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2153: checking for $ac_func" >&5 +echo "configure:2167: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2204,12 +2218,12 @@ for ac_func in semget shmget do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2208: checking for $ac_func" >&5 +echo "configure:2222: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2262,12 +2276,12 @@ for ac_func in syslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2266: checking for $ac_func" >&5 +echo "configure:2280: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2318,7 +2332,7 @@ # syslog is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do echo $ac_n "checking for syslog in -l$lib""... $ac_c" 1>&6 -echo "configure:2322: checking for syslog in -l$lib" >&5 +echo "configure:2336: checking for syslog in -l$lib" >&5 ac_lib_var=`echo $lib'_'syslog | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2326,7 +2340,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2364,7 +2378,7 @@ done fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2368: checking for socket in -lsocket" >&5 +echo "configure:2382: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2372,7 +2386,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2411,7 +2425,7 @@ fi echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2415: checking for gethostbyname in -lnsl" >&5 +echo "configure:2429: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2419,7 +2433,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2458,7 +2472,7 @@ fi echo $ac_n "checking for res_gethostbyname in -lresolv""... $ac_c" 1>&6 -echo "configure:2462: checking for res_gethostbyname in -lresolv" >&5 +echo "configure:2476: checking for res_gethostbyname in -lresolv" >&5 ac_lib_var=`echo resolv'_'res_gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2466,7 +2480,7 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2506,7 +2520,7 @@ else echo $ac_n "checking for gethostbyname in -lresolv+""... $ac_c" 1>&6 -echo "configure:2510: checking for gethostbyname in -lresolv+" >&5 +echo "configure:2524: checking for gethostbyname in -lresolv+" >&5 ac_lib_var=`echo resolv+'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2514,7 +2528,7 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv+ $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2551,12 +2565,12 @@ for ac_func in _dns_gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2555: checking for $ac_func" >&5 +echo "configure:2569: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff -u -r --new-file ypbind-3.3/configure.in ypbind/configure.in --- ypbind-3.3/configure.in Fri Jul 4 12:07:25 1997 +++ ypbind/configure.in Sun Nov 8 10:10:01 1998 @@ -3,7 +3,7 @@ # dnl Process this file with autoconf to produce a configure script. AC_INIT(ypbind.c) -AM_INIT_AUTOMAKE(ypbind, 3.3) +AM_INIT_AUTOMAKE(ypbind, 3.3-glibc4) AM_CONFIG_HEADER(config.h) AC_REVISION($Revision: 1.7 $)dnl AC_PREFIX_DEFAULT(/usr) diff -u -r --new-file ypbind-3.3/daemon.c ypbind/daemon.c --- ypbind-3.3/daemon.c Mon Feb 17 19:08:33 1997 +++ ypbind/daemon.c Thu Feb 19 16:53:20 1998 @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: daemon.c,v 1.3 1997/02/17 18:08:33 swen Exp $" ; +static const char rcsid[] = "$Id: daemon.c,v 1.3 1997/02/17 18:08:33 swen Exp $" ; /* * Initialize a daemon process. diff -u -r --new-file ypbind-3.3/rpcsvc/yp_prot.h ypbind/rpcsvc/yp_prot.h --- ypbind-3.3/rpcsvc/yp_prot.h Mon Oct 7 17:58:25 1996 +++ ypbind/rpcsvc/yp_prot.h Thu Jan 1 01:00:00 1970 @@ -1,365 +0,0 @@ -/* @(#)yp_prot.h 1.15 90/01/03 Copyr 1990 Sun Microsystems, Inc */ - -/* - * This file contains symbols and structures defining the rpc protocol - * between the NIS clients and the NIS servers. The servers - * are the NIS database servers, and the NIS binders. - */ - -#ifndef _RPCSVC_YP_PROT_H -#define _RPCSVC_YP_PROT_H - -#include -#include - -/* - * The following procedures are supported by the protocol: - * - * YPPROC_NULL() returns () takes nothing, returns nothing. This indicates - * that the NIS server is alive. - * - * YPPROC_DOMAIN (char *) returns (bool_t) TRUE. Indicates that the - * responding NIS server does serve the named domain; FALSE indicates no - * support. - * - * YPPROC_DOMAIN_NONACK (char *) returns (TRUE) if the NIS server does serve - * the named domain, otherwise does not return. Used in the broadcast case. - * - * YPPROC_MATCH (struct ypreq_key) returns (struct ypresp_val). Returns the - * right-hand value for a passed left-hand key, within a named map and - * domain. - * - * YPPROC_FIRST (struct ypreq_nokey) returns (struct ypresp_key_val). - * Returns the first key-value pair from a named domain and map. - * - * YPPROC_NEXT (struct ypreq_key) returns (struct ypresp_key_val). Returns - * the key-value pair following a passed key-value pair within a named - * domain and map. - * - * YPPROC_XFR (struct ypreq_xfr) returns nothing. Indicates to a server that - * a map should be updated. - * - * YPPROC_CLEAR takes nothing, returns nothing. Instructs a NIS server to - * close the current map, so that old versions of the disk file don't get - * held open. - * - * YPPROC_ALL (struct ypreq_nokey), returns - * union switch (bool_t more) { - * TRUE: (struct ypresp_key_val); - * FALSE: (struct) {}; - * } - * - * YPPROC_MASTER (struct ypreq_nokey), returns (ypresp_master) - * - * YPPROC_ORDER (struct ypreq_nokey), returns (ypresp_order) - * - * YPPROC_MAPLIST (char *), returns (struct ypmaplist *) - */ - -/* Program and version symbols, magic numbers */ - -#define YPPROG ((u_long)100004) -#define YPVERS ((u_long)2) -#define YPVERS_ORIG ((u_long)1) -#define YPMAXRECORD ((u_long)1024) -#define YPMAXDOMAIN ((u_long)256) -#define YPMAXMAP ((u_long)64) -#define YPMAXPEER ((u_long)256) - -/* byte size of a large NIS packet */ -#define YPMSGSZ 1600 - -#ifndef DATUM -typedef struct { - char *dptr; - int dsize; -} datum; -#define DATUM -#endif - -struct ypmap_parms { - char *domain; /* Null string means not available */ - char *map; /* Null string means not available */ - unsigned long int ordernum; /* 0 means not available */ - char *owner; /* Null string means not available */ -}; - -/* - * Request parameter structures - */ - -struct ypreq_key { - char *domain; - char *map; - datum keydat; -}; - -struct ypreq_nokey { - char *domain; - char *map; -}; - -struct ypreq_xfr { - struct ypmap_parms map_parms; - unsigned long transid; - unsigned long proto; - unsigned short port; -}; - -struct ypreq_newxfr { - struct ypmap_parms map_parms; - unsigned long transid; - unsigned long proto; - char *name; -}; - -#define ypxfr_domain map_parms.domain -#define ypxfr_map map_parms.map -#define ypxfr_ordernum map_parms.ordernum -#define ypxfr_owner map_parms.owner - -/* - * Response parameter structures - */ - -struct ypresp_val { - long unsigned status; - datum valdat; -}; - -struct ypresp_key_val { - long unsigned status; - datum keydat; - datum valdat; -}; - -struct ypresp_master { - long unsigned status; - char *master; -}; - -struct ypresp_order { - long unsigned status; - unsigned long int ordernum; -}; - -struct ypmaplist { - char ypml_name[YPMAXMAP + 1]; - struct ypmaplist *ypml_next; -}; - -struct ypresp_maplist { - long unsigned status; - struct ypmaplist *list; -}; - -/* - * Procedure symbols. YPPROC_NULL, YPPROC_DOMAIN, and YPPROC_DOMAIN_NONACK - * must keep the same values (0, 1, and 2) that they had in the first version - * of the protocol. - */ - -#define YPPROC_NULL ((u_long)0) -#define YPPROC_DOMAIN ((u_long)1) -#define YPPROC_DOMAIN_NONACK ((u_long)2) -#define YPPROC_MATCH ((u_long)3) -#define YPPROC_FIRST ((u_long)4) -#define YPPROC_NEXT ((u_long)5) -#define YPPROC_XFR ((u_long)6) -#define YPPROC_CLEAR ((u_long)7) -#define YPPROC_ALL ((u_long)8) -#define YPPROC_MASTER ((u_long)9) -#define YPPROC_ORDER ((u_long)10) -#define YPPROC_MAPLIST ((u_long)11) -#define YPPROC_NEWXFR ((u_long)12) - -/* Return status values */ - -#define YP_TRUE ((long)1) /* General purpose success code */ -#define YP_NOMORE ((long)2) /* No more entries in map */ -#define YP_FALSE ((long)0) /* General purpose failure code */ -#define YP_NOMAP ((long)-1) /* No such map in domain */ -#define YP_NODOM ((long)-2) /* Domain not supported */ -#define YP_NOKEY ((long)-3) /* No such key in map */ -#define YP_BADOP ((long)-4) /* Invalid operation */ -#define YP_BADDB ((long)-5) /* Server data base is bad */ -#define YP_YPERR ((long)-6) /* NIS server error */ -#define YP_BADARGS ((long)-7) /* Request arguments bad */ -#define YP_VERS ((long)-8) /* NIS server version mismatch - server - * can't supply requested service. */ - -/* - * Domain binding data structure, used by ypclnt package and ypserv modules. - * Users of the ypclnt package (or of this protocol) don't HAVE to know about - * it, but it must be available to users because _yp_dobind is a public - * interface. - */ - -struct dom_binding { - struct dom_binding *dom_pnext; - char dom_domain[YPMAXDOMAIN + 1]; - struct sockaddr_in dom_server_addr; - unsigned short int dom_server_port; - int dom_socket; - CLIENT *dom_client; - unsigned short int dom_local_port; - long int dom_vers; -}; - - -/* - * Protocol between clients and NIS binder servers - */ - -/* - * The following procedures are supported by the protocol: - * - * YPBINDPROC_NULL() returns () - * takes nothing, returns nothing - * - * YPBINDPROC_DOMAIN takes (char *) returns (struct ypbind_resp) - * - * YPBINDPROC_SETDOM takes (struct ypbind_setdom) returns nothing - */ - -/* Program and version symbols, magic numbers */ - -#define YPBINDPROG ((u_long)100007) -#define YPBINDVERS ((u_long)2) -#define YPBINDVERS_ORIG ((u_long)1) - -/* Procedure symbols */ - -#define YPBINDPROC_NULL ((u_long)0) -#define YPBINDPROC_DOMAIN ((u_long)1) -#define YPBINDPROC_SETDOM ((u_long)2) -/* - * Response structure and overall result status codes. Success and failure - * represent two separate response message types. - */ - -enum ypbind_resptype {YPBIND_SUCC_VAL = 1, YPBIND_FAIL_VAL = 2}; - -struct ypbind_binding { - struct in_addr ypbind_binding_addr; /* In network order */ - unsigned short int ypbind_binding_port; /* In network order */ -}; -struct ypbind_resp { - enum ypbind_resptype ypbind_status; - union { - unsigned long ypbind_error; - struct ypbind_binding ypbind_bindinfo; - } ypbind_respbody; -}; - - -/* Detailed failure reason codes for response field ypbind_error*/ - -#define YPBIND_ERR_ERR 1 /* Internal error */ -#define YPBIND_ERR_NOSERV 2 /* No bound server for passed domain */ -#define YPBIND_ERR_RESC 3 /* System resource allocation failure */ - -/* - * Request data structure for ypbind "Set domain" procedure. - */ -struct ypbind_setdom { - char ypsetdom_domain[YPMAXDOMAIN + 1]; - struct ypbind_binding ypsetdom_binding; - unsigned short ypsetdom_vers; -}; -#define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr -#define ypsetdom_port ypsetdom_binding.ypbind_binding_port - -/* - * Protocol between clients (ypxfr, only) and yppush - * yppush speaks a protocol in the transient range, which - * is supplied to ypxfr as a command-line parameter when it - * is activated by ypserv. - */ -#define YPPUSHVERS ((u_long) 1) -#define YPPUSHVERS_ORIG ((u_long)1) - -/* Procedure symbols */ - -#define YPPUSHPROC_NULL ((u_long)0) -#define YPPUSHPROC_XFRRESP ((u_long)1) - -struct yppushresp_xfr { - unsigned long transid; - unsigned long status; -}; - -/* Status values for yppushresp_xfr.status */ - -#define YPPUSH_SUCC ((long)1) /* Success */ -#define YPPUSH_AGE ((long)2) /* Master's version not newer */ -#define YPPUSH_NOMAP ((long)-1) /* Can't find server for map */ -#define YPPUSH_NODOM ((long)-2) /* Domain not supported */ -#define YPPUSH_RSRC ((long)-3) /* Local resouce alloc failure */ -#define YPPUSH_RPC ((long)-4) /* RPC failure talking to server */ -#define YPPUSH_MADDR ((long)-5) /* Can't get master address */ -#define YPPUSH_YPERR ((long)-6) /* NIS server/map db error */ -#define YPPUSH_BADARGS ((long)-7) /* Request arguments bad */ -#define YPPUSH_DBM ((long)-8) /* Local dbm operation failed */ -#define YPPUSH_FILE ((long)-9) /* Local file I/O operation failed */ -#define YPPUSH_SKEW ((long)-10) /* Map version skew during transfer */ -#define YPPUSH_CLEAR ((long)-11) /* Can't send "Clear" req to local - * ypserv */ -#define YPPUSH_FORCE ((long)-12) /* No local order number in map - - * use -f flag. */ -#define YPPUSH_XFRERR ((long)-13) /* ypxfr error */ -#define YPPUSH_REFUSED ((long)-14) /* Transfer request refused by ypserv */ -#define YPPUSH_NOALIAS ((long)-15) /* Alias not found for map or domain */ - -struct ypresp_all { - bool_t more; - union { - struct ypresp_key_val val; - } ypresp_all_u; -}; - -#ifndef __P -#ifdef __STDC__ -#define __P(args) args -#else -#define __P(args) () -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -extern bool_t xdr_datum __P ((XDR *__xdrs, datum * __objp)); -extern bool_t xdr_ypdomain_wrap_string __P ((XDR *__xdrs, char ** __objp)); -extern bool_t xdr_ypmap_wrap_string __P ((XDR *__xdrs, char ** __objp)); -extern bool_t xdr_ypreq_key __P ((XDR *__xdrs, struct ypreq_key * __objp)); -extern bool_t xdr_ypreq_nokey __P ((XDR *__xdrs, struct ypreq_nokey * __objp)); -extern bool_t xdr_ypreq_xfr __P ((XDR *__xdrs, struct ypreq_xfr * __objp)); -extern bool_t xdr_ypreq_newxfr __P ((XDR *__xdrs, struct ypreq_newxfr * __objp)); -extern bool_t xdr_ypresp_val __P ((XDR *__xdrs, struct ypresp_val * __objp)); -extern bool_t xdr_ypresp_key_val __P ((XDR *__xdrs, struct ypresp_key_val * __objp)); -extern bool_t xdr_ypbind_resp __P ((XDR *__xdrs, struct ypbind_resp * __objp)); -extern bool_t xdr_ypbind_setdom __P ((XDR *__xdrs, struct ypbind_setdom * __objp)); -extern bool_t xdr_ypmap_parms __P ((XDR *__xdrs, struct ypmap_parms * __objp)); -extern bool_t xdr_ypowner_wrap_string __P ((XDR *__xdrs, char ** __objp)); -extern bool_t xdr_yppushresp_xfr __P ((XDR *__xdrs, struct yppushresp_xfr * __objp)); -extern bool_t xdr_ypresp_order __P ((XDR *__xdrs, struct ypresp_order * __objp)); -extern bool_t xdr_ypresp_master __P ((XDR *__xdrs, struct ypresp_master * __objp)); -extern bool_t xdr_ypall __P ((XDR *__xdrs, struct ypall_callback * __objp)); -extern bool_t xdr_ypresp_maplist __P ((XDR *__xdrs, struct ypresp_maplist * __objp)); - -extern bool_t xdr_domainname_ypbind __P ((XDR *__xdrs, char * __objp)); -extern bool_t xdr_ypbind_binding __P ((XDR *__xdrs, struct ypbind_binding * __objp)); -extern bool_t xdr_ypbind_resptype __P ((XDR *__xdrs, enum ypbind_resptype * __objp)); -extern bool_t xdr_ypstat __P ((XDR *__xdrs, enum ypbind_resptype * __objp)); -extern bool_t xdr_ypresp_all __P ((XDR *__xdrs, struct ypresp_all * __objp)); -extern bool_t xdr_ypresp_all_seq __P ((XDR *__xdrs, u_long * __objp)); -extern bool_t xdr_ypmaplist_str __P ((XDR *__xdrs, char * __objp)); -extern bool_t xdr_ypmaplist __P ((XDR *__xdrs, struct ypmaplist * __objp)); - -#ifdef __cplusplus -} -#endif - -#endif /* _RPCSVC_YP_PROT_H */ diff -u -r --new-file ypbind-3.3/slave.c ypbind/slave.c --- ypbind-3.3/slave.c Fri Jul 4 15:43:06 1997 +++ ypbind/slave.c Sun Nov 8 09:50:17 1998 @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: slave.c,v 1.14 1997/07/04 13:43:06 swen Exp $" ; +static const char rcsid[] = "$Id: slave.c,v 1.14 1997/07/04 13:43:06 swen Exp $" ; #include #include @@ -77,13 +77,13 @@ { struct sigaction sact; pid_t pid; - + pid = fork(); if (pid < 0) log_sys("fork failed"); if (0 != pid) /* parent */ return pid; - + inststr(Argv, Argc, "ypbind (slave)"); sigemptyset(&sact.sa_mask); @@ -94,12 +94,12 @@ sact.sa_handler = handle_hangup; if (0 != sigaction(SIGHUP, &sact, NULL)) log_ret("Could not install signal handler for SIGHUP"); - + for (;;) { hangup = 0; init_binding(); - + while (!hangup) { if (0 != ping_interval) @@ -149,7 +149,7 @@ struct binding ypdb; time_t t; int domain; - + time(&t); /* Check all bound domains */ for (domain = 0; domain < _MAXDOMAIN; domain++) @@ -178,7 +178,7 @@ { struct binding entry; int active; - + if (NULL == dom || (0 != get_entry(dom, &entry))) return; @@ -193,7 +193,7 @@ /* find empty slot */ for (active = 0; active < _MAXSERVER; active++) if (!entry.server[active].filled) break; - + /* FIXME: should we ignore add_server, when there are no more slots? */ active = active % _MAXSERVER; @@ -203,7 +203,7 @@ log_msg("add_server() domain: %s, host: %s, %sbroadcast, slot: %d", dom, host ? host : "unknown", use_broadcast ? "" : "no", active); - + if (NULL != raddrp) { if (!broken_server && @@ -230,7 +230,7 @@ entry.server[active].use_broadcast = use_broadcast; entry.server[active].filled = TRUE; entry.active = active; - + update_entry(&entry); return; } @@ -245,13 +245,13 @@ struct timeval timeout; CLIENT *clnt_handlep = NULL; int i = 0; - + struct hostent *host; if (debug) log_msg("bindto_server: domain %s, host %s", ypdomain, server); - - + + host = res_gethostbyname(server); if (NULL == host) { @@ -275,7 +275,7 @@ } return; } - + memset((char *)&server_addr, 0, sizeof server_addr); server_addr.sin_family = host->h_addrtype; server_addr.sin_port = htons(0); @@ -284,7 +284,7 @@ { memcpy(&server_addr.sin_addr, host->h_addr_list[i], host->h_length); - + timeout.tv_sec = 1; timeout.tv_usec = 0; clnt_handlep = clntudp_create(&server_addr, YPPROG, YPVERS, @@ -293,13 +293,13 @@ break; i++; } - + if (NULL == clnt_handlep) { log_msg("clnt_create for server %s failed", host->h_name); - return; + return; } - + timeout.tv_sec = 5; timeout.tv_usec = 0; status = clnt_call(clnt_handlep, YPPROC_DOMAIN, @@ -318,7 +318,7 @@ } else add_server(ypdomain, &server_addr, clnt_handlep, host->h_name, FALSE); - + return; } @@ -328,16 +328,16 @@ int status; bool_t out; struct timeval timeout; - + if (NULL != ypdb->server[active].client_handle) { - timeout.tv_sec = 2; + timeout.tv_sec = 5; timeout.tv_usec = 0; status = clnt_call(ypdb->server[active].client_handle, YPPROC_DOMAIN, (xdrproc_t) xdr_domainname_ypbind, ypdb->domain, (xdrproc_t) xdr_bool, (caddr_t)&out, timeout); - + if ((RPC_SUCCESS != status) || (TRUE != out)) { RPC_SUCCESS != status @@ -361,7 +361,7 @@ CLIENT *clnt_handlep; struct timeval timeout; int sock; - + if (*out) { if(debug) @@ -371,7 +371,7 @@ sizeof(addr->sin_addr.s_addr), AF_INET); log_msg("Answer from server %s .", hostentp->h_name); } - + sock = RPC_ANYSOCK; timeout.tv_sec = 1; timeout.tv_usec = 0; @@ -422,7 +422,7 @@ int count; int found_my_domain=0; /* set to 1 when an entry for the * local domain is found */ - + fp = fopen(path, "r"); if (NULL == fp) /* use broadcast, when yp.conf is not found */ { @@ -445,7 +445,7 @@ cp++; if (*cp == '\0') /* Leerzeile ignorieren */ continue; - + if (debug) log_msg("Trying entry: %s", cp); count = sscanf(cp, "domain %64s server %80s", tmpdomain, tmpserver); @@ -489,7 +489,7 @@ log_msg("no entry for the local domain %s, " "using broadcast", mydomain); add_server(mydomain, NULL, NULL, NULL, TRUE); - } + } return; } @@ -499,7 +499,7 @@ { #ifdef MAP_ANON struct binding * result; - result = (struct binding *) mmap(0, len, (PROT_READ | PROT_WRITE), + result = (struct binding *) mmap(0, len, (PROT_READ | PROT_WRITE), (MAP_ANON | MAP_SHARED), -1, 0); return result; #else @@ -513,12 +513,12 @@ struct binding * result = MAP_FAILED; #ifdef MAP_ANON int fd; - + fd = open("/dev/zero", O_RDWR); if (-1 == fd) result = MAP_FAILED; else - result = (struct binding *) mmap(0, len, (PROT_READ | PROT_WRITE), + result = (struct binding *) mmap(0, len, (PROT_READ | PROT_WRITE), (MAP_ANON | MAP_SHARED), fd, 0); #endif return result; @@ -528,7 +528,7 @@ mmap_shared_file(size_t len, int filedes) { struct binding * result; - result = (struct binding *) mmap(0, len, (PROT_READ | PROT_WRITE), + result = (struct binding *) mmap(0, len, (PROT_READ | PROT_WRITE), MAP_SHARED, filedes, 0); return result; } @@ -545,7 +545,7 @@ result = mmap_shared_dev_zero(len); if (MAP_FAILED == result) result = mmap_shared_file(len, filedes); - + return result; } #endif /* HAVE_MMAP */ @@ -562,26 +562,30 @@ { if ((semid = semget(IPC_PRIVATE, 2, IPC_CREAT|SHM_R|SHM_W)) < 0) log_sys("cannot create semaphore"); - - - if ((shmid = shmget(IPC_PRIVATE, + + + if ((shmid = shmget(IPC_PRIVATE, sizeof(struct binding) * _MAXDOMAIN, IPC_CREAT|SHM_R|SHM_W)) < 0) log_sys("cannot create shared memory segment"); - + ypbindlist = (struct binding *)shmat(shmid, NULL, 0); - + /* mark it for deletion just in case we are not able to * handle it on our own. handles case of failed attachment * as well */ - (void)shmctl(shmid, IPC_RMID, &dummy); - + (void)shmctl(shmid, IPC_RMID, &dummy); + if (!ypbindlist) log_sys("cannot attach to shared memory segment"); - + memset(ypbindlist, 0, sizeof(struct binding) * _MAXDOMAIN); - - semctl(semid, 0, SETALL, empty); + +#if defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) + semctl (semid, 0, SETALL, empty); +#else + semctl (semid, 0, SETALL, (union semun) empty); +#endif } else #endif /* HAVE_IPC */ @@ -612,7 +616,11 @@ { if(semid != -1) { - (void)semctl(semid, 0, IPC_RMID, NULL); +#if defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) + semctl (semid, 0, IPC_RMID, 0); +#else + semctl (semid, 0, IPC_RMID, (union semun) 0); +#endif semid = -1; } } @@ -620,13 +628,13 @@ #define IPC_LOCK_RETRY 5 #endif /* HAVE_IPC */ -void +void read_lock_binding(void) { int i, status; #if HAVE_IPC struct sembuf sops[2]; - + if (use_ipc) { sops[0].sem_num = 1; /* check if write semaphore is clear */ @@ -635,7 +643,7 @@ sops[1].sem_num = 0; /* then signal reading */ sops[1].sem_op = 1; sops[1].sem_flg = SEM_UNDO|IPC_NOWAIT; - + for(i=0; iserver[active].filled) { ypdb->active=active; - update_entry(ypdb); + update_entry(ypdb); } } } @@ -962,29 +970,29 @@ if ((fd = open(path, O_CREAT | O_RDWR | O_TRUNC, FILE_MODE)) == -1) return; } - + lockpid = lock_test(fd, F_RDLCK, 0, SEEK_SET, 0); - if (0 != lockpid) + if (0 != lockpid) log_quit("%s already locked by pid %d", path, lockpid); - + status = read_lock(fd, 0, SEEK_SET, 0); - if (0 != status) + if (0 != status) log_sys("set lock"); - + /* ok, if BINDINGDIR exists, and we can create the binding file, then * write to it.. */ entry->lockfd = fd; - + iov[0].iov_base = (caddr_t) &(udptransp->xp_port); iov[0].iov_len = sizeof udptransp->xp_port; iov[1].iov_base = (caddr_t) &ybr; iov[1].iov_len = sizeof ybr; - + memset(&ybr, 0, sizeof ybr); ybr.ypbind_status = YPBIND_SUCC_VAL; ybr.ypbind_respbody.ypbind_bindinfo.ypbind_binding_addr = entry->server[entry->active].server_addr; ybr.ypbind_respbody.ypbind_bindinfo.ypbind_binding_port = entry->server[entry->active].server_port; - + len = iov[0].iov_len + iov[1].iov_len ; if (writev(entry->lockfd, iov, 2) != len ) { @@ -999,7 +1007,7 @@ close_bindingfile(struct binding *ypdb) { char path[MAXPATHLEN]; - + if ( -1 != ypdb->lockfd) { close(ypdb->lockfd); diff -u -r --new-file ypbind-3.3/xdr_ypbind.c ypbind/xdr_ypbind.c --- ypbind-3.3/xdr_ypbind.c Mon Oct 7 18:03:39 1996 +++ ypbind/xdr_ypbind.c Thu Feb 19 16:51:52 1998 @@ -45,7 +45,7 @@ } switch (objp->ypbind_status) { case YPBIND_FAIL_VAL: - if (!xdr_u_long(xdrs, &objp->ypbind_respbody.ypbind_error)) + if (!xdr_u_int(xdrs, &objp->ypbind_respbody.ypbind_error)) { return (FALSE); } @@ -73,7 +73,7 @@ { return (FALSE); } - if (!xdr_u_short(xdrs, &objp->ypsetdom_vers)) + if (!xdr_u_int(xdrs, &objp->ypsetdom_vers)) { return (FALSE); } diff -u -r --new-file ypbind-3.3/ypbind.c ypbind/ypbind.c --- ypbind-3.3/ypbind.c Sat May 24 13:25:40 1997 +++ ypbind/ypbind.c Sun Nov 8 09:30:18 1998 @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: ypbind.c,v 1.10 1997/05/24 11:25:40 swen Exp $" ; +static const char rcsid[] = "$Id: ypbind.c,v 1.10 1997/05/24 11:25:40 swen Exp $" ; #include #include @@ -78,11 +78,11 @@ { static struct ypbind_resp result; struct binding *ypdb; - + memset((char *) &result, 0, sizeof(result)); result.ypbind_status = YPBIND_FAIL_VAL; ypdb = find_entry(arg1); - + read_lock_binding(); if (NULL == ypdb || !ypdb->is_alive) @@ -102,7 +102,7 @@ inet_ntoa(ypdb->server[ypdb->active].server_addr), ntohs(ypdb->server[ypdb->active].server_port)); } - + un_lock_read_binding(); return &result; } @@ -112,7 +112,7 @@ { static char *result; struct sockaddr_in *fromsin, bindsin; - + #if HAS_SVC_GETCALLER # if !SVC_GETCALLER_DECLARED extern struct sockaddr_in * svc_getcaller(SVCXPRT *xprt); @@ -121,7 +121,7 @@ # else /* wild guessing, may be wrong */ fromsin = (rqstp->rq_xprt)->xp_rtaddr.buf; #endif /* HAS_SVC_GETRPCCALLER */ - + result = NULL; switch (ypsetmode) { @@ -135,10 +135,10 @@ default: return (void *) &result; } - + if (ntohs(fromsin->sin_port) >= IPPORT_RESERVED) return (void *) &result; - + if (YPVERS != arg1.ypsetdom_vers) return (void *) &result; memset(&bindsin, 0, sizeof bindsin); @@ -174,12 +174,12 @@ char ypbindproc_domain_2_arg[YPMAXDOMAIN]; struct ypbind_setdom ypbindproc_setdom_2_arg; } argument; - + struct authunix_parms *creds; char *result; xdrproc_t xdr_argument, xdr_result; char *(*local)(char *, struct svc_req *); - + switch (rqstp->rq_proc) { case YPBINDPROC_NULL: @@ -187,13 +187,13 @@ xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) _ypbindproc_null_2; break; - + case YPBINDPROC_DOMAIN: xdr_argument = (xdrproc_t) xdr_domainname_ypbind; xdr_result = (xdrproc_t) xdr_ypbind_resp; local = (char *(*)(char *, struct svc_req *)) _ypbindproc_domain_2; break; - + case YPBINDPROC_SETDOM: switch (rqstp->rq_cred.oa_flavor) { @@ -213,7 +213,7 @@ xdr_result = (xdrproc_t) xdr_void; local = (char *(*)(char *, struct svc_req *)) _ypbindproc_setdom_2; break; - + default: svcerr_noproc(transp); return; @@ -289,23 +289,23 @@ ping_interval = 0; } } - + #if HAVE_SYSLOG log_open("ypbind", (LOG_PID | LOG_CONS), LOG_DAEMON); #endif yp_get_default_domain(&mydomain); if (NULL == mydomain || '\0' == mydomain[0] || 0 == strcmp("(none)", mydomain)) log_quit("domainname not set - aborting.\n"); - + if (0 != getuid()) log_quit("ypbind must be run as root"); - + /* detach from terminal and run in background, unless debug mode */ if (!debug) daemon_start(); create_pidfile(); - + /* no check for return code here */ pmap_unset(YPBINDPROG, YPBINDVERS); udptransp = svcudp_create(RPC_ANYSOCK); @@ -313,21 +313,21 @@ log_sys("cannot create udp service.\n"); if (!svc_register(udptransp, YPBINDPROG, YPBINDVERS, ypbindprog_2, IPPROTO_UDP)) log_sys("unable to register (YPBINDPROG, YPBINDVERS, udp).\n"); - + tcptransp = svctcp_create(RPC_ANYSOCK, 0, 0); if (NULL == tcptransp) log_sys("cannot create tcp service.\n"); if (!svc_register(tcptransp, YPBINDPROG, YPBINDVERS, ypbindprog_2, IPPROTO_TCP)) log_sys("unable to register (YPBINDPROG, YPBINDVERS, tcp).\n"); - + #ifdef BINDINGDIR - sprintf(path, "%s/%s.%ld", BINDINGDIR, mydomain, YPVERS); + sprintf(path, "%s/%s.%d", BINDINGDIR, mydomain, (int)YPVERS); unlink(path); #endif init_master_slave_communication(); childpid = start_slave(); - + /* This must be called after starting the slave to avoid * a pmap_unset, which would be bad for restart */ if(0 != atexit(terminate)) @@ -373,12 +373,15 @@ RETSIGTYPE sighandler(int sig) { +#ifdef BINDINGDIR + char path[MAXPATHLEN]; +#endif sigset_t set; struct sigaction sact; if (debug) log_msg("received signal %d", sig); - + if (SIGHUP == sig) { kill(childpid, sig); @@ -394,6 +397,10 @@ else { pmap_unset(YPBINDPROG, YPBINDVERS); +#ifdef BINDINGDIR + sprintf(path, "%s/%s.%d", BINDINGDIR, mydomain, (int)YPVERS); + unlink(path); +#endif /* reset signal handler, make sure, signals are not blocked for raise */ sact.sa_handler = SIG_DFL; sigemptyset(&sact.sa_mask); @@ -417,6 +424,10 @@ void terminate(void) { +#ifdef BINDINGDIR + char path[MAXPATHLEN]; +#endif + unlink(_PATH_YPPIDFILE); if (0 != childpid) kill(childpid, SIGTERM); @@ -425,6 +436,10 @@ terminate_master_slave_communication(); #endif pmap_unset(YPBINDPROG, YPBINDVERS); +#ifdef BINDINGDIR + sprintf(path, "%s/%s.%d", BINDINGDIR, mydomain, (int)YPVERS); + unlink(path); +#endif } @@ -438,9 +453,9 @@ if (strlen(src) <= strlen(dst[0])) { char *ptr; - + for (ptr = dst[0]; *ptr; *(ptr++) = '\0'); - + strcpy(dst[0], src); } else @@ -477,7 +492,7 @@ int fd; pid_t pid; char pbuf[10]; - + fd = open(_PATH_YPPIDFILE, O_CREAT | O_RDWR, FILE_MODE); if (fd < 0) log_sys("cannot create pidfile %s", _PATH_YPPIDFILE); @@ -492,7 +507,7 @@ return; } -/* +/* * $Log: ypbind.c,v $ * Revision 1.10 1997/05/24 11:25:40 swen * Fix bug which could lead ypbind to unregister itself from the portmapper.