mirror of https://github.com/getdnsapi/getdns.git
Merge branch 'develop' of https://github.com/verisign/getdns into develop
This commit is contained in:
commit
1672e9e744
|
@ -1,5 +1,18 @@
|
||||||
*~
|
*~
|
||||||
|
.deps/
|
||||||
|
.libs/
|
||||||
Makefile
|
Makefile
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
depcomp
|
depcomp
|
||||||
.deps/
|
*.lo
|
||||||
|
*.la
|
||||||
|
config.guess
|
||||||
|
config.sub
|
||||||
|
config.status
|
||||||
|
missing
|
||||||
|
libtool
|
||||||
|
ltmain.sh
|
||||||
|
example-all-functions
|
||||||
|
example-simple-answers
|
||||||
|
example-synchronous
|
||||||
|
example-tree
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#
|
||||||
|
# process with automake to produce Makefile.in
|
||||||
|
# files in each element of SUBDIRS
|
||||||
|
#
|
||||||
|
# Known to work with automake-1.12
|
||||||
|
#
|
||||||
|
|
||||||
|
SUBDIRS=src
|
786
Makefile.in
786
Makefile.in
|
@ -1,61 +1,749 @@
|
||||||
#
|
# Makefile.in generated by automake 1.12.4 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
#
|
||||||
|
# process with automake to produce Makefile.in
|
||||||
|
# files in each element of SUBDIRS
|
||||||
|
#
|
||||||
|
# Known to work with automake-1.12
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
package = @PACKAGE_NAME@
|
|
||||||
version = @PACKAGE_VERSION@
|
|
||||||
tarname = @PACKAGE_TARNAME@
|
|
||||||
distdir = $(tarname)-$(version)
|
|
||||||
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
bindir = @bindir@
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
am__make_dryrun = \
|
||||||
|
{ \
|
||||||
|
am__dry=no; \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||||
|
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||||
|
*) \
|
||||||
|
for am__flg in $$MAKEFLAGS; do \
|
||||||
|
case $$am__flg in \
|
||||||
|
*=*|--*) ;; \
|
||||||
|
*n*) am__dry=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done;; \
|
||||||
|
esac; \
|
||||||
|
test $$am__dry = yes; \
|
||||||
|
}
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = .
|
||||||
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in $(top_srcdir)/configure \
|
||||||
|
$(top_srcdir)/src/test/Makefile.in AUTHORS COPYING ChangeLog \
|
||||||
|
INSTALL NEWS config.guess config.sub depcomp install-sh \
|
||||||
|
ltmain.sh missing
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno config.status.lineno
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_CLEAN_FILES = src/test/Makefile
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-dvi-recursive install-exec-recursive \
|
||||||
|
install-html-recursive install-info-recursive \
|
||||||
|
install-pdf-recursive install-ps-recursive install-recursive \
|
||||||
|
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||||
|
ps-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||||
|
cscope distdir dist dist-all distcheck
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
CSCOPE = cscope
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
am__remove_distdir = \
|
||||||
|
if test -d "$(distdir)"; then \
|
||||||
|
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||||
|
&& rm -rf "$(distdir)" \
|
||||||
|
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||||
|
else :; fi
|
||||||
|
am__post_remove_distdir = $(am__remove_distdir)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
DIST_ARCHIVES = $(distdir).tar.gz
|
||||||
|
GZIP_ENV = --best
|
||||||
|
DIST_TARGETS = dist-gzip
|
||||||
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||||
|
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
subdirs = @subdirs@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
SUBDIRS = src
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
default:
|
.SUFFIXES:
|
||||||
cd src && $(MAKE) $@
|
am--refresh: Makefile
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
all : default
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
clean:
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
cd src && $(MAKE) $@
|
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||||
rm -f *.o
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
src/test/Makefile: $(top_builddir)/config.status $(top_srcdir)/src/test/Makefile.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
|
||||||
distclean:
|
mostlyclean-libtool:
|
||||||
cd src && $(MAKE) $@
|
-rm -f *.lo
|
||||||
rm -f config.log config.status Makefile
|
|
||||||
rm -fR autom4te.cache
|
|
||||||
|
|
||||||
$(distdir): FORCE
|
clean-libtool:
|
||||||
mkdir -p $(distdir)/src
|
-rm -rf .libs _libs
|
||||||
cp $(srcdir)/configure.ac $(distdir)
|
|
||||||
cp $(srcdir)/configure $(distdir)
|
|
||||||
cp $(srcdir)/Makefile.in $(distdir)
|
|
||||||
cp $(srcdir)/src/Makefile.in $(distdir)/src
|
|
||||||
|
|
||||||
distcheck: $(distdir).tar.gz
|
distclean-libtool:
|
||||||
gzip -cd $(distdir).tar.gz | tar xvf -
|
-rm -f libtool config.lt
|
||||||
cd $(distdir) && ./configure
|
|
||||||
cd $(distdir) && $(MAKE) all
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
cd $(distdir) && $(MAKE) check
|
# into them and run 'make' without going through this Makefile.
|
||||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
if test "$${remaining}" -ne 0; then
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
|
||||||
exit 1; \
|
@fail= failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
tags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
|
done
|
||||||
|
ctags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
|
done
|
||||||
|
cscopelist-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
|
||||||
|
done
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
fi
|
fi
|
||||||
cd $(distdir) && $(MAKE) clean
|
ctags: CTAGS
|
||||||
rm -rf $(distdir)
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
$(TAGS_FILES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
Makefile: Makefile.in config.status
|
GTAGS:
|
||||||
./config.status $@
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
configure.status: configure
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
./config.status --recheck
|
|
||||||
|
|
||||||
.PHONY: all distclean clean default
|
cscope: cscope.files
|
||||||
|
test ! -s cscope.files \
|
||||||
|
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||||
|
|
||||||
|
clean-cscope:
|
||||||
|
-rm -f cscope.files
|
||||||
|
|
||||||
|
cscope.files: clean-cscope cscopelist-recursive cscopelist
|
||||||
|
|
||||||
|
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-test -n "$(am__skip_mode_fix)" \
|
||||||
|
|| find "$(distdir)" -type d ! -perm -755 \
|
||||||
|
-exec chmod u+rwx,go+rx {} \; -o \
|
||||||
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|
|| chmod -R a+r "$(distdir)"
|
||||||
|
dist-gzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-bzip2: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-lzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-xz: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-tarZ: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-shar: distdir
|
||||||
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-zip: distdir
|
||||||
|
-rm -f $(distdir).zip
|
||||||
|
zip -rq $(distdir).zip $(distdir)
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist dist-all:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
case '$(DIST_ARCHIVES)' in \
|
||||||
|
*.tar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
|
*.tar.bz2*) \
|
||||||
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
|
*.tar.lz*) \
|
||||||
|
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||||
|
*.tar.xz*) \
|
||||||
|
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||||
|
*.tar.Z*) \
|
||||||
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
|
*.shar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||||
|
*.zip*) \
|
||||||
|
unzip $(distdir).zip ;;\
|
||||||
|
esac
|
||||||
|
chmod -R a-w $(distdir)
|
||||||
|
chmod u+w $(distdir)
|
||||||
|
mkdir $(distdir)/_build $(distdir)/_inst
|
||||||
|
chmod a-w $(distdir)
|
||||||
|
test -d $(distdir)/_build || exit 0; \
|
||||||
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
|
&& am__cwd=`pwd` \
|
||||||
|
&& $(am__cd) $(distdir)/_build \
|
||||||
|
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||||
|
distuninstallcheck \
|
||||||
|
&& chmod -R a-w "$$dc_install_base" \
|
||||||
|
&& ({ \
|
||||||
|
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||||
|
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||||
|
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||||
|
&& rm -rf "$$dc_destdir" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||||
|
&& rm -rf $(DIST_ARCHIVES) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||||
|
&& cd "$$am__cwd" \
|
||||||
|
|| exit 1
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
@(echo "$(distdir) archives ready for distribution: "; \
|
||||||
|
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||||
|
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||||
|
distuninstallcheck:
|
||||||
|
@test -n '$(distuninstallcheck_dir)' || { \
|
||||||
|
echo 'ERROR: trying to run $@ with an empty' \
|
||||||
|
'$$(distuninstallcheck_dir)' >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}; \
|
||||||
|
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||||
|
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}; \
|
||||||
|
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
|
if test -n "$(DESTDIR)"; then \
|
||||||
|
echo " (check DESTDIR support)"; \
|
||||||
|
fi ; \
|
||||||
|
$(distuninstallcheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
distcleancheck: distclean
|
||||||
|
@if test '$(srcdir)' = . ; then \
|
||||||
|
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||||
|
$(distcleancheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
|
||||||
|
cscopelist-recursive ctags-recursive install-am install-strip \
|
||||||
|
tags-recursive
|
||||||
|
|
||||||
|
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||||
|
all all-am am--refresh check check-am clean clean-cscope \
|
||||||
|
clean-generic clean-libtool cscope cscopelist \
|
||||||
|
cscopelist-recursive ctags ctags-recursive dist dist-all \
|
||||||
|
dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
|
||||||
|
dist-zip distcheck distclean distclean-generic \
|
||||||
|
distclean-libtool distclean-tags distcleancheck distdir \
|
||||||
|
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am tags tags-recursive uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/local/share/automake-1.12/config.guess
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/local/share/automake-1.12/config.sub
|
11
configure.ac
11
configure.ac
|
@ -1,12 +1,16 @@
|
||||||
# -*- Autoconf -*-
|
# -*- Autoconf -*-
|
||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
# known to work with autconf version: autoconf (GNU Autoconf) 2.69
|
||||||
|
#
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_PREREQ([2.68])
|
AC_PREREQ([2.68])
|
||||||
AC_INIT([getdns], [0.320], [melinda.shore@nomountain.net])
|
AC_INIT([getdns], [0.320], [melinda.shore@nomountain.net])
|
||||||
# AM_INIT_AUTOMAKE([getkey], [0.320])
|
AC_CONFIG_SRCDIR([src/common/getdns_general.c])
|
||||||
AC_CONFIG_SRCDIR([configure.ac])
|
AM_INIT_AUTOMAKE
|
||||||
|
LT_INIT
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
@ -27,5 +31,6 @@ AC_TYPE_UINT32_T
|
||||||
AC_TYPE_UINT64_T
|
AC_TYPE_UINT64_T
|
||||||
AC_TYPE_UINT8_T
|
AC_TYPE_UINT8_T
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile src/common/Makefile src/test/Makefile])
|
AC_CONFIG_FILES([Makefile src/Makefile src/common/Makefile src/example/Makefile src/test/Makefile])
|
||||||
|
AC_CONFIG_SUBDIRS([src/ src/common/ src/example/ src/test/])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -63,3 +63,6 @@ Local configuration via API or local file (e.g. /etc/getdns.conf, ~/.getdnsrc)
|
||||||
|
|
||||||
- max entries - flush oldest entries when max reached
|
- max entries - flush oldest entries when max reached
|
||||||
|
|
||||||
|
- if a TTL for an entry in the cache is within 1 minute of expiring the
|
||||||
|
library should refresh that cache entry after answering the query so
|
||||||
|
that the next request for that entry does not experience latency
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
The problem of how to fetch the trust anchor for DNSSEC validation can
|
||||||
|
be solved in a number of different ways. RFC 5011 provides a process
|
||||||
|
for updating the trust anchor, however the fundamental problem of how
|
||||||
|
to boot strap a trust anchor is a little more difficult.
|
||||||
|
|
||||||
|
Each of the solutions spans a continuum from easy for the operator but
|
||||||
|
offering weak security to hard for the operator but offering strong
|
||||||
|
security. Some of the options we considered are:
|
||||||
|
|
||||||
|
|
||||||
|
Manual
|
||||||
|
------
|
||||||
|
If the system operator manually fetches the KSK from a well trusted
|
||||||
|
source and places it on the system he can rest assured that the trust
|
||||||
|
anchor is the most reliable. This is also the most difficult approach
|
||||||
|
and fits least well with our goal of providing an easy to use library
|
||||||
|
for non-DNS experts.
|
||||||
|
|
||||||
|
Manual fetching can be done via a web browser, if the user ensures
|
||||||
|
that he handles the certificate for the ICANN website then it is a
|
||||||
|
respectably secure approach.
|
||||||
|
|
||||||
|
|
||||||
|
Key Fetch Tool in Source
|
||||||
|
------------------------
|
||||||
|
An application can be provided with the library that the system
|
||||||
|
operator can invoke to bootstrap the key material. This application
|
||||||
|
would include the ICANN website and could perform the key retrieval
|
||||||
|
using a valid certificate. Although the certificate may be included in
|
||||||
|
the source tree, the certificates are typically longer lived than the
|
||||||
|
root KSK.
|
||||||
|
|
||||||
|
|
||||||
|
Key in Source
|
||||||
|
-------------
|
||||||
|
The KSK can be placed in the sources which is probably the easiest for
|
||||||
|
the system operator and is sufficiently secure provided the source
|
||||||
|
deliver process is secure.
|
||||||
|
|
||||||
|
One downside to this approach is that the soruce package becomes stale
|
||||||
|
following a KSK roll. This can be partially mitigated by providing
|
||||||
|
clear diagnostic messages for the user if they attempt to validate
|
||||||
|
DNSSEC responses with outdated keys.
|
||||||
|
|
||||||
|
|
||||||
|
Automatically Fetch Key Via ICANN Website
|
||||||
|
-----------------------------------------
|
||||||
|
One of the easiest approaches is to embed the url from which we fetch
|
||||||
|
the KSK into the sources, the library can quietly fetch the KSK if one
|
||||||
|
isn't available on the system. This has some potential security
|
||||||
|
risks.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,527 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2011-11-20.07; # UTC
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 X Consortium
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to
|
||||||
|
# deal in the Software without restriction, including without limitation the
|
||||||
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# 'make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit=${DOITPROG-}
|
||||||
|
if test -z "$doit"; then
|
||||||
|
doit_exec=exec
|
||||||
|
else
|
||||||
|
doit_exec=$doit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put in absolute file names if you don't have them in your path;
|
||||||
|
# or use environment vars.
|
||||||
|
|
||||||
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
|
chmodprog=${CHMODPROG-chmod}
|
||||||
|
chownprog=${CHOWNPROG-chown}
|
||||||
|
cmpprog=${CMPPROG-cmp}
|
||||||
|
cpprog=${CPPROG-cp}
|
||||||
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
|
mvprog=${MVPROG-mv}
|
||||||
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
mvcmd=$mvprog
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
stripcmd=
|
||||||
|
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
|
no_target_directory=
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
|
|
||||||
|
In the 1st form, copy SRCFILE to DSTFILE.
|
||||||
|
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||||
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
-c (ignored)
|
||||||
|
-C install only if different (preserve the last data modification time)
|
||||||
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
|
-m MODE $chmodprog installed files to MODE.
|
||||||
|
-o USER $chownprog installed files to USER.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -ne 0; do
|
||||||
|
case $1 in
|
||||||
|
-c) ;;
|
||||||
|
|
||||||
|
-C) copy_on_change=true;;
|
||||||
|
|
||||||
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
case $mode in
|
||||||
|
*' '* | *' '* | *'
|
||||||
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
|
echo "$0: invalid mode: $mode" >&2
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-t) dst_arg=$2
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
--) shift
|
||||||
|
break;;
|
||||||
|
|
||||||
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
|
# When -t is used, the destination is already specified.
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dst_arg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dst_arg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dst_arg=$arg
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call 'install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
do_exit='(exit $ret); exit $ret'
|
||||||
|
trap "ret=129; $do_exit" 1
|
||||||
|
trap "ret=130; $do_exit" 2
|
||||||
|
trap "ret=141; $do_exit" 13
|
||||||
|
trap "ret=143; $do_exit" 15
|
||||||
|
|
||||||
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
case $mode in
|
||||||
|
# Optimize common cases.
|
||||||
|
*644) cp_umask=133;;
|
||||||
|
*755) cp_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw='% 200'
|
||||||
|
fi
|
||||||
|
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||||
|
*)
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw=,u+rw
|
||||||
|
fi
|
||||||
|
cp_umask=$mode$u_plus_rw;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $src in
|
||||||
|
-* | [=\(\)!]) src=./$src;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
dstdir=$dst
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dst_arg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dst=$dst_arg
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
if test -n "$no_target_directory"; then
|
||||||
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dstdir=$dst
|
||||||
|
dst=$dstdir/`basename "$src"`
|
||||||
|
dstdir_status=0
|
||||||
|
else
|
||||||
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)[^/].*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\).*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
|
if test $dstdir_status != 0; then
|
||||||
|
case $posix_mkdir in
|
||||||
|
'')
|
||||||
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
|
umask=`umask`
|
||||||
|
case $stripcmd.$umask in
|
||||||
|
# Optimize common cases.
|
||||||
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
mkdir_umask=`expr $umask + 22 \
|
||||||
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
|
- $umask % 10 % 4 + $umask % 2
|
||||||
|
`;;
|
||||||
|
*) mkdir_umask=$umask,go-w;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# With -d, create the new directory with the user-specified mode.
|
||||||
|
# Otherwise, rely on $mkdir_umask.
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
mkdir_mode=-m$mode
|
||||||
|
else
|
||||||
|
mkdir_mode=
|
||||||
|
fi
|
||||||
|
|
||||||
|
posix_mkdir=false
|
||||||
|
case $umask in
|
||||||
|
*[123567][0-7][0-7])
|
||||||
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
|
|
||||||
|
if (umask $mkdir_umask &&
|
||||||
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
if test -z "$dir_arg" || {
|
||||||
|
# Check for POSIX incompatibilities with -m.
|
||||||
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
|
# other-writable bit of parent directory when it shouldn't.
|
||||||
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
|
case $ls_ld_tmpdir in
|
||||||
|
d????-?r-*) different_mode=700;;
|
||||||
|
d????-?--*) different_mode=755;;
|
||||||
|
*) false;;
|
||||||
|
esac &&
|
||||||
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
then posix_mkdir=:
|
||||||
|
fi
|
||||||
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
|
else
|
||||||
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
|
fi
|
||||||
|
trap '' 0;;
|
||||||
|
esac;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && (
|
||||||
|
umask $mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
|
)
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||||
|
# or it failed possibly due to a race condition. Create the
|
||||||
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
|
case $dstdir in
|
||||||
|
/*) prefix='/';;
|
||||||
|
[-=\(\)!]*) prefix='./';;
|
||||||
|
*) prefix='';;
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
prefixes=
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test X"$d" = X && continue
|
||||||
|
|
||||||
|
prefix=$prefix$d
|
||||||
|
if test -d "$prefix"; then
|
||||||
|
prefixes=
|
||||||
|
else
|
||||||
|
if $posix_mkdir; then
|
||||||
|
(umask=$mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
test -d "$prefix" || exit 1
|
||||||
|
else
|
||||||
|
case $prefix in
|
||||||
|
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||||
|
*) qprefix=$prefix;;
|
||||||
|
esac
|
||||||
|
prefixes="$prefixes '$qprefix'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
prefix=$prefix/
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "$prefixes"; then
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
(umask $mkdir_umask &&
|
||||||
|
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||||
|
test -d "$dstdir" || exit 1
|
||||||
|
obsolete_mkdir_used=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||||
|
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||||
|
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
|
# Copy the file name to the temp name.
|
||||||
|
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# Rename the file to the real destination.
|
||||||
|
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||||
|
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
{
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
test ! -f "$dst" ||
|
||||||
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
|
} ||
|
||||||
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
|
(exit 1); exit 1
|
||||||
|
}
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
fi || exit 1
|
||||||
|
|
||||||
|
trap '' 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
|
@ -0,0 +1,330 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Common stub for a few missing GNU programs while installing.
|
||||||
|
|
||||||
|
scriptversion=2012-01-06.18; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||||
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
run=:
|
||||||
|
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||||
|
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||||
|
|
||||||
|
# In the cases where this matters, 'missing' is being run in the
|
||||||
|
# srcdir already.
|
||||||
|
if test -f configure.ac; then
|
||||||
|
configure_ac=configure.ac
|
||||||
|
else
|
||||||
|
configure_ac=configure.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg="missing on your system"
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
--run)
|
||||||
|
# Try to run requested program, and just exit if it succeeds.
|
||||||
|
run=
|
||||||
|
shift
|
||||||
|
"$@" && exit 0
|
||||||
|
# Exit code 63 means version mismatch. This often happens
|
||||||
|
# when the user try to use an ancient version of a tool on
|
||||||
|
# a file that requires a minimum version. In this case we
|
||||||
|
# we should proceed has if the program had been absent, or
|
||||||
|
# if --run hadn't been passed.
|
||||||
|
if test $? = 63; then
|
||||||
|
run=:
|
||||||
|
msg="probably too old"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||||
|
error status if there is no known handling for PROGRAM.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
--run try to run the given command, and emulate it if it fails
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal touch file 'aclocal.m4'
|
||||||
|
autoconf touch file 'configure'
|
||||||
|
autoheader touch file 'config.h.in'
|
||||||
|
autom4te touch the output file, or create a stub one
|
||||||
|
automake touch all 'Makefile.in' files
|
||||||
|
bison create 'y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
flex create 'lex.yy.c', if possible, from existing .c
|
||||||
|
help2man touch the output file
|
||||||
|
lex create 'lex.yy.c', if possible, from existing .c
|
||||||
|
makeinfo touch the output file
|
||||||
|
yacc create 'y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
|
||||||
|
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||||
|
'g' are ignored when checking the name.
|
||||||
|
|
||||||
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing $scriptversion (GNU Automake)"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: Unknown '$1' option"
|
||||||
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# normalize program name to check for.
|
||||||
|
program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
# Now exit if we have it, but it failed. Also exit now if we
|
||||||
|
# don't have it and --version was passed (most likely to detect
|
||||||
|
# the program). This is about non-GNU programs, so use $1 not
|
||||||
|
# $program.
|
||||||
|
case $1 in
|
||||||
|
lex*|yacc*)
|
||||||
|
# Not GNU programs, they don't have --version.
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
# Could not run --version or --help. This is probably someone
|
||||||
|
# running '$TOOL --version' or '$TOOL --help' to check whether
|
||||||
|
# $TOOL exists and not knowing $TOOL uses missing.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If it does not exist, or fails to run (possibly an outdated version),
|
||||||
|
# try to emulate it.
|
||||||
|
case $program in
|
||||||
|
aclocal*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified 'acinclude.m4' or '${configure_ac}'. You might want
|
||||||
|
to install the Automake and Perl packages. Grab them from
|
||||||
|
any GNU archive site."
|
||||||
|
touch aclocal.m4
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoconf*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified '${configure_ac}'. You might want to install the
|
||||||
|
Autoconf and GNU m4 packages. Grab them from any GNU
|
||||||
|
archive site."
|
||||||
|
touch configure
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoheader*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified 'acconfig.h' or '${configure_ac}'. You might want
|
||||||
|
to install the Autoconf and GNU m4 packages. Grab them
|
||||||
|
from any GNU archive site."
|
||||||
|
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||||
|
test -z "$files" && files="config.h"
|
||||||
|
touch_files=
|
||||||
|
for f in $files; do
|
||||||
|
case $f in
|
||||||
|
*:*) touch_files="$touch_files "`echo "$f" |
|
||||||
|
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||||
|
*) touch_files="$touch_files $f.in";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
touch $touch_files
|
||||||
|
;;
|
||||||
|
|
||||||
|
automake*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
|
||||||
|
You might want to install the Automake and Perl packages.
|
||||||
|
Grab them from any GNU archive site."
|
||||||
|
find . -type f -name Makefile.am -print |
|
||||||
|
sed 's/\.am$/.in/' |
|
||||||
|
while read f; do touch "$f"; done
|
||||||
|
;;
|
||||||
|
|
||||||
|
autom4te*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is needed, but is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them.
|
||||||
|
You can get '$1' as part of Autoconf from any GNU
|
||||||
|
archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo "#! /bin/sh"
|
||||||
|
echo "# Created by GNU Automake missing as a replacement of"
|
||||||
|
echo "# $ $@"
|
||||||
|
echo "exit 0"
|
||||||
|
chmod +x $file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
bison*|yacc*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' $msg. You should only need it if
|
||||||
|
you modified a '.y' file. You may need the Bison package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
Bison from any GNU archive site."
|
||||||
|
rm -f y.tab.c y.tab.h
|
||||||
|
if test $# -ne 1; then
|
||||||
|
eval LASTARG=\${$#}
|
||||||
|
case $LASTARG in
|
||||||
|
*.y)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" y.tab.c
|
||||||
|
fi
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" y.tab.h
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test ! -f y.tab.h; then
|
||||||
|
echo >y.tab.h
|
||||||
|
fi
|
||||||
|
if test ! -f y.tab.c; then
|
||||||
|
echo 'main() { return 0; }' >y.tab.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
lex*|flex*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified a '.l' file. You may need the Flex package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
Flex from any GNU archive site."
|
||||||
|
rm -f lex.yy.c
|
||||||
|
if test $# -ne 1; then
|
||||||
|
eval LASTARG=\${$#}
|
||||||
|
case $LASTARG in
|
||||||
|
*.l)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test ! -f lex.yy.c; then
|
||||||
|
echo 'main() { return 0; }' >lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
help2man*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified a dependency of a manual page. You may need the
|
||||||
|
Help2man package in order for those modifications to take
|
||||||
|
effect. You can get Help2man from any GNU archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo ".ab help2man is required to generate this page"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
makeinfo*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is $msg. You should only need it if
|
||||||
|
you modified a '.texi' or '.texinfo' file, or any other file
|
||||||
|
indirectly affecting the aspect of the manual. The spurious
|
||||||
|
call might also be the consequence of using a buggy 'make' (AIX,
|
||||||
|
DU, IRIX). You might want to install the Texinfo package or
|
||||||
|
the GNU make package. Grab either from any GNU archive site."
|
||||||
|
# The file to touch is that specified with -o ...
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -z "$file"; then
|
||||||
|
# ... or it is the one specified with @setfilename ...
|
||||||
|
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||||
|
file=`sed -n '
|
||||||
|
/^@setfilename/{
|
||||||
|
s/.* \([^ ]*\) *$/\1/
|
||||||
|
p
|
||||||
|
q
|
||||||
|
}' $infile`
|
||||||
|
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||||
|
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||||
|
fi
|
||||||
|
# If the file does not exist, the user really needs makeinfo;
|
||||||
|
# let's fail without touching anything.
|
||||||
|
test -f $file || exit 1
|
||||||
|
touch $file
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: '$1' is needed, and is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them. Check the 'README' file,
|
||||||
|
it often tells you about the needed prerequisites for installing
|
||||||
|
this package. You may also peek at any GNU archive site, in case
|
||||||
|
some other package would contain this missing '$1' program."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
|
@ -0,0 +1 @@
|
||||||
|
SUBDIRS = common example
|
599
src/Makefile.in
599
src/Makefile.in
|
@ -1,66 +1,567 @@
|
||||||
#
|
# Makefile.in generated by automake 1.12.4 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
#
|
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
package = @PACKAGE_NAME@
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
version = @PACKAGE_VERSION@
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
tarname = @PACKAGE_TARNAME@
|
# with or without modifications, as long as this notice is preserved.
|
||||||
distdir = $(tarname)-$(version)
|
|
||||||
|
|
||||||
prefix = @prefix@
|
# This program is distributed in the hope that it will be useful,
|
||||||
exec_prefix = @exec_prefix@
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
bindir = @bindir@
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
srcdir = @srcdir@
|
@SET_MAKE@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
am__make_dryrun = \
|
||||||
|
{ \
|
||||||
|
am__dry=no; \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||||
|
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||||
|
*) \
|
||||||
|
for am__flg in $$MAKEFLAGS; do \
|
||||||
|
case $$am__flg in \
|
||||||
|
*=*|--*) ;; \
|
||||||
|
*n*) am__dry=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done;; \
|
||||||
|
esac; \
|
||||||
|
test $$am__dry = yes; \
|
||||||
|
}
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = src
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in install-sh
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-dvi-recursive install-exec-recursive \
|
||||||
|
install-html-recursive install-info-recursive \
|
||||||
|
install-pdf-recursive install-ps-recursive install-recursive \
|
||||||
|
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||||
|
ps-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||||
|
distdir
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
subdirs = @subdirs@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
SUBDIRS = common example
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
default:
|
.SUFFIXES:
|
||||||
cd common && $(MAKE)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu src/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
all : default test
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
test:
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
cd test && $(MAKE) $@
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
clean:
|
mostlyclean-libtool:
|
||||||
cd common && $(MAKE) $@
|
-rm -f *.lo
|
||||||
cd test && $(MAKE) $@
|
|
||||||
rm -f *.o
|
|
||||||
|
|
||||||
distclean:
|
clean-libtool:
|
||||||
cd common && $(MAKE) $@
|
-rm -rf .libs _libs
|
||||||
cd test && $(MAKE) $@
|
|
||||||
rm -f libgetdns*.so config.log config.status Makefile
|
|
||||||
rm -fR autom4te.cache
|
|
||||||
|
|
||||||
$(distdir): FORCE
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
mkdir -p $(distdir)/src
|
# into them and run 'make' without going through this Makefile.
|
||||||
cp $(srcdir)/configure.ac $(distdir)
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
cp $(srcdir)/configure $(distdir)
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
cp $(srcdir)/Makefile.in $(distdir)
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
cp $(srcdir)/src/Makefile.in $(distdir)/src
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
|
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
|
||||||
|
@fail= failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
tags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
|
done
|
||||||
|
ctags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
|
done
|
||||||
|
cscopelist-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
|
||||||
|
done
|
||||||
|
|
||||||
distcheck: $(distdir).tar.gz
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
gzip -cd $(distdir).tar.gz | tar xvf -
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
cd $(distdir) && ./configure
|
unique=`for i in $$list; do \
|
||||||
cd $(distdir) && $(MAKE) all
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
cd $(distdir) && $(MAKE) check
|
done | \
|
||||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
mkid -fID $$unique
|
||||||
if test "$${remaining}" -ne 0; then
|
tags: TAGS
|
||||||
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
|
||||||
exit 1; \
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
fi
|
fi
|
||||||
cd $(distdir) && $(MAKE) clean
|
ctags: CTAGS
|
||||||
rm -rf $(distdir)
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
$(TAGS_FILES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
Makefile: Makefile.in config.status
|
GTAGS:
|
||||||
./config.status $@
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
|
||||||
configure.status: configure
|
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
|
||||||
./config.status --recheck
|
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
.PHONY: all distclean clean default
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
|
||||||
|
cscopelist-recursive ctags-recursive install-am install-strip \
|
||||||
|
tags-recursive
|
||||||
|
|
||||||
|
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||||
|
all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
cscopelist cscopelist-recursive ctags ctags-recursive \
|
||||||
|
distclean distclean-generic distclean-libtool distclean-tags \
|
||||||
|
distdir dvi dvi-am html html-am info info-am install \
|
||||||
|
install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am tags tags-recursive uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# dummy
|
|
|
@ -1 +0,0 @@
|
||||||
# dummy
|
|
|
@ -1 +0,0 @@
|
||||||
# dummy
|
|
|
@ -1 +0,0 @@
|
||||||
# dummy
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
||||||
|
lib_LTLIBRARIES = libgetdns.la
|
||||||
|
libgetdns_la_SOURCES = getdns_address.c getdns_context.c getdns_convert.c \
|
||||||
|
getdns_dict.c getdns_general.c getdns_hostname.c getdns_list.c \
|
||||||
|
getdns_service.c getdns_sync.c getdns_validate_dnssec.c \
|
||||||
|
getdns_core_only.h getdns_libevent.h
|
||||||
|
include_HEADERS = getdns_core_only.h
|
|
@ -1,70 +1,606 @@
|
||||||
#
|
# Makefile.in generated by automake 1.12.4 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
#
|
|
||||||
|
|
||||||
package = @PACKAGE_NAME@
|
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||||
version = @PACKAGE_VERSION@
|
|
||||||
tarname = @PACKAGE_TARNAME@
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
distdir = $(tarname)-$(version)
|
# 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.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
bindir = @bindir@
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
am__make_dryrun = \
|
||||||
|
{ \
|
||||||
|
am__dry=no; \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||||
|
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||||
|
*) \
|
||||||
|
for am__flg in $$MAKEFLAGS; do \
|
||||||
|
case $$am__flg in \
|
||||||
|
*=*|--*) ;; \
|
||||||
|
*n*) am__dry=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done;; \
|
||||||
|
esac; \
|
||||||
|
test $$am__dry = yes; \
|
||||||
|
}
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = src/common
|
||||||
|
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in $(top_srcdir)/depcomp ChangeLog \
|
||||||
|
install-sh
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
|
||||||
|
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||||
|
libgetdns_la_LIBADD =
|
||||||
|
am_libgetdns_la_OBJECTS = getdns_address.lo getdns_context.lo \
|
||||||
|
getdns_convert.lo getdns_dict.lo getdns_general.lo \
|
||||||
|
getdns_hostname.lo getdns_list.lo getdns_service.lo \
|
||||||
|
getdns_sync.lo getdns_validate_dnssec.lo
|
||||||
|
libgetdns_la_OBJECTS = $(am_libgetdns_la_OBJECTS)
|
||||||
|
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||||
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
|
am__depfiles_maybe = depfiles
|
||||||
|
am__mv = mv -f
|
||||||
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||||
|
$(LDFLAGS) -o $@
|
||||||
|
SOURCES = $(libgetdns_la_SOURCES)
|
||||||
|
DIST_SOURCES = $(libgetdns_la_SOURCES)
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
HEADERS = $(include_HEADERS)
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
subdirs = @subdirs@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
||||||
|
lib_LTLIBRARIES = libgetdns.la
|
||||||
|
libgetdns_la_SOURCES = getdns_address.c getdns_context.c getdns_convert.c \
|
||||||
|
getdns_dict.c getdns_general.c getdns_hostname.c getdns_list.c \
|
||||||
|
getdns_service.c getdns_sync.c getdns_validate_dnssec.c \
|
||||||
|
getdns_core_only.h getdns_libevent.h
|
||||||
|
|
||||||
CC=gcc
|
include_HEADERS = getdns_core_only.h
|
||||||
CFLAGS=-Wall -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
all: all-am
|
||||||
LDFLAGS=-L. -L/usr/local/lib
|
|
||||||
LDLIBS=-levent_core -lldns -lgetdns
|
|
||||||
PROGRAMS=example-simple-answers example-tree example-all-functions example-synchronous
|
|
||||||
|
|
||||||
.SUFFIXES: .c .o .a .lo .h
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .lo .o .obj
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/common/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu src/common/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||||
|
list2=; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
list2="$$list2 $$p"; \
|
||||||
|
else :; fi; \
|
||||||
|
done; \
|
||||||
|
test -z "$$list2" || { \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||||
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||||
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall-libLTLIBRARIES:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
$(am__strip_dir) \
|
||||||
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||||
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||||
|
done
|
||||||
|
|
||||||
|
clean-libLTLIBRARIES:
|
||||||
|
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; \
|
||||||
|
locs=`for p in $$list; do echo $$p; done | \
|
||||||
|
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||||
|
sort -u`; \
|
||||||
|
test -z "$$locs" || { \
|
||||||
|
echo rm -f $${locs}; \
|
||||||
|
rm -f $${locs}; \
|
||||||
|
}
|
||||||
|
libgetdns.la: $(libgetdns_la_OBJECTS) $(libgetdns_la_DEPENDENCIES) $(EXTRA_libgetdns_la_DEPENDENCIES)
|
||||||
|
$(LINK) -rpath $(libdir) $(libgetdns_la_OBJECTS) $(libgetdns_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_address.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_context.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_convert.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_dict.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_general.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_hostname.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_list.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_service.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_sync.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdns_validate_dnssec.Plo@am__quote@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||||
|
|
||||||
all: libgetdns example-simple-answers example-tree example-all-functions example-synchronous
|
.c.obj:
|
||||||
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
libgetdns: getdns_sync.o getdns_context.o getdns_list.o getdns_dict.o getdns_address.o getdns_convert.o getdns_general.o getdns_hostname.o getdns_service.o getdns_validate_dnssec.o
|
.c.lo:
|
||||||
$(CC) $(CFLAGS) -shared -o libgetdns.so $?
|
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
clean:
|
mostlyclean-libtool:
|
||||||
rm -f *.o $(PROGRAMS) libgetdns.so
|
-rm -f *.lo
|
||||||
|
|
||||||
distclean : clean
|
clean-libtool:
|
||||||
rm -f Makefile config.status config.log
|
-rm -rf .libs _libs
|
||||||
rm -Rf autom4te.cache
|
install-includeHEADERS: $(include_HEADERS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||||
|
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
$(distdir): FORCE
|
uninstall-includeHEADERS:
|
||||||
mkdir -p $(distdir)/src
|
@$(NORMAL_UNINSTALL)
|
||||||
cp configure.ac $(distdir)
|
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||||
cp configure $(distdir)
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
cp Makefile.in $(distdir)
|
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||||
cp src/Makefile.in $(distdir)/src
|
|
||||||
|
|
||||||
distcheck: $(distdir).tar.gz
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
gzip -cd $(distdir).tar.gz | tar xvf -
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
cd $(distdir) && ./configure
|
unique=`for i in $$list; do \
|
||||||
cd $(distdir) && $(MAKE) all
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
cd $(distdir) && $(MAKE) check
|
done | \
|
||||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
|
mkid -fID $$unique
|
||||||
if test "$${remaining}" -ne 0; then
|
tags: TAGS
|
||||||
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
|
|
||||||
exit 1; \
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
fi
|
fi
|
||||||
cd $(distdir) && $(MAKE) clean
|
ctags: CTAGS
|
||||||
rm -rf $(distdir)
|
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
@echo "*** Package $(distdir).tar.gz is ready for distribution"
|
$(TAGS_FILES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
Makefile: Makefile.in ../config.status
|
GTAGS:
|
||||||
cd .. && ./config.status $@
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
|
||||||
configure.status: configure
|
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
|
||||||
cd .. && ./config.status --recheck
|
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
.PHONY: clean
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||||
|
mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-includeHEADERS
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am: install-libLTLIBRARIES
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||||
|
clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \
|
||||||
|
distclean-compile distclean-generic distclean-libtool \
|
||||||
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-includeHEADERS install-info \
|
||||||
|
install-info-am install-libLTLIBRARIES install-man install-pdf \
|
||||||
|
install-pdf-am install-ps install-ps-am install-strip \
|
||||||
|
installcheck installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags uninstall uninstall-am uninstall-includeHEADERS \
|
||||||
|
uninstall-libLTLIBRARIES
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
|
|
|
@ -402,6 +402,18 @@ struct getdns_list_item {
|
||||||
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if list is not valid or params are NULL
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if list is not valid or params are NULL
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_list_get_length(struct getdns_list *list, size_t *answer);
|
getdns_return_t getdns_list_get_length(struct getdns_list *list, size_t *answer);
|
||||||
|
/**
|
||||||
|
* private function (API users should not be calling this), this uses library
|
||||||
|
* routines to make a copy of the list - would be faster to make the copy directly
|
||||||
|
* caller must ensure that dstlist points to unallocated storage - the address will
|
||||||
|
* be overwritten by a new list via a call to getdns_list_create()
|
||||||
|
* @param srclist pointer to list to copy
|
||||||
|
* @param srclist pointer to pointer to list to receive the copy (will be allocated)
|
||||||
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if list is invalid
|
||||||
|
* @return GETDNS_RETURN_GENERIC_ERROR if out of memory
|
||||||
|
*/
|
||||||
|
getdns_return_t getdns_list_copy(struct getdns_list *srclist, struct getdns_list **dstlist);
|
||||||
/**
|
/**
|
||||||
* get the enumerated data type of the indexed list item
|
* get the enumerated data type of the indexed list item
|
||||||
* @param list the list from which to fetch the data type
|
* @param list the list from which to fetch the data type
|
||||||
|
@ -410,8 +422,20 @@ getdns_return_t getdns_list_get_length(struct getdns_list *list, size_t *answer)
|
||||||
* @return GETDNS_RETURN_GOOD on success
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_list_get_data_type(struct getdns_list *this_list, size_t index, getdns_data_type *answer);
|
getdns_return_t getdns_list_get_data_type(struct getdns_list *list, size_t index, getdns_data_type *answer);
|
||||||
getdns_return_t getdns_list_get_dict(struct getdns_list *this_list, size_t index, struct getdns_dict **answer);
|
/**
|
||||||
|
* retrieve the dictionary value of the specified list item, the caller must not free
|
||||||
|
* storage associated with the return value. When the list is destroyed this
|
||||||
|
* dict data is also free()'d - keep this in mind when using this function.
|
||||||
|
* @param list the list from which to fetch the value
|
||||||
|
* @param index the item in the list from which to fetch the value
|
||||||
|
* @param **answer assigned a pointer to the dict value of the indexed element
|
||||||
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
||||||
|
* @return GETDNS_RETURN_WRONG_TYPE_REQUESTED if the data type does not match the contents of the indexed item
|
||||||
|
*/
|
||||||
|
getdns_return_t getdns_list_get_dict(struct getdns_list *list, size_t index, struct getdns_dict **answer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retrieve the list value of the specified list item, the caller must not free
|
* retrieve the list value of the specified list item, the caller must not free
|
||||||
* storage associated with the return value. When the list is destroyed any
|
* storage associated with the return value. When the list is destroyed any
|
||||||
|
@ -423,7 +447,7 @@ getdns_return_t getdns_list_get_dict(struct getdns_list *this_list, size_t index
|
||||||
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
||||||
* @return GETDNS_RETURN_WRONG_TYPE_REQUESTED if the data type does not match the contents of the indexed item
|
* @return GETDNS_RETURN_WRONG_TYPE_REQUESTED if the data type does not match the contents of the indexed item
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_list_get_list(struct getdns_list *this_list, size_t index, struct getdns_list **answer);
|
getdns_return_t getdns_list_get_list(struct getdns_list *list, size_t index, struct getdns_list **answer);
|
||||||
/**
|
/**
|
||||||
* retrieve the binary data value of the specified list item, the caller must not
|
* retrieve the binary data value of the specified list item, the caller must not
|
||||||
* free storage associated with the return value. When the list is destroyed any
|
* free storage associated with the return value. When the list is destroyed any
|
||||||
|
@ -435,7 +459,7 @@ getdns_return_t getdns_list_get_list(struct getdns_list *this_list, size_t index
|
||||||
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if the index is out of range or the list is NULL
|
||||||
* @return GETDNS_RETURN_WRONG_TYPE_REQUESTED if the data type does not match the contents of the indexed item
|
* @return GETDNS_RETURN_WRONG_TYPE_REQUESTED if the data type does not match the contents of the indexed item
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_list_get_bindata(struct getdns_list *this_list, size_t index, struct getdns_bindata **answer);
|
getdns_return_t getdns_list_get_bindata(struct getdns_list *list, size_t index, struct getdns_bindata **answer);
|
||||||
/**
|
/**
|
||||||
* retrieve the integer value of the specified list item
|
* retrieve the integer value of the specified list item
|
||||||
* @param list the list from which to fetch the item
|
* @param list the list from which to fetch the item
|
||||||
|
@ -453,7 +477,7 @@ getdns_return_t getdns_list_get_int(struct getdns_list *list, size_t index, uint
|
||||||
* @param dict dictionary from which to produce the list of names
|
* @param dict dictionary from which to produce the list of names
|
||||||
* @param **answer a pointer to the new list will be assigned to *answer
|
* @param **answer a pointer to the new list will be assigned to *answer
|
||||||
* @return GETDNS_RETURN_GOOD on success
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
* @return GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid
|
* @return GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or empty
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_dict_get_names(struct getdns_dict *dict, struct getdns_list **answer);
|
getdns_return_t getdns_dict_get_names(struct getdns_dict *dict, struct getdns_list **answer);
|
||||||
/**
|
/**
|
||||||
|
@ -467,7 +491,8 @@ getdns_return_t getdns_dict_get_names(struct getdns_dict *dict, struct getdns_li
|
||||||
getdns_return_t getdns_dict_get_data_type(struct getdns_dict *this_dict, char *name, getdns_data_type *answer);
|
getdns_return_t getdns_dict_get_data_type(struct getdns_dict *this_dict, char *name, getdns_data_type *answer);
|
||||||
/**
|
/**
|
||||||
* fetch the dictionary associated with the specified name, the dictionary should
|
* fetch the dictionary associated with the specified name, the dictionary should
|
||||||
* be free()'d by the caller via getdns_dict_destroy()
|
* not be free()'d by the caller, it will be freed when the parent dictionary is
|
||||||
|
* free()'d
|
||||||
* @param dict dictionary from which to fetch the dictionary
|
* @param dict dictionary from which to fetch the dictionary
|
||||||
* @param name a name/key value to look up in the dictionary
|
* @param name a name/key value to look up in the dictionary
|
||||||
* @param **answer a copy of the dictionary will be stored at this address
|
* @param **answer a copy of the dictionary will be stored at this address
|
||||||
|
@ -476,8 +501,9 @@ getdns_return_t getdns_dict_get_data_type(struct getdns_dict *this_dict, char *n
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_dict_get_dict(struct getdns_dict *this_dict, char *name, struct getdns_dict **answer);
|
getdns_return_t getdns_dict_get_dict(struct getdns_dict *this_dict, char *name, struct getdns_dict **answer);
|
||||||
/**
|
/**
|
||||||
* fetch the list associated with the specified name, the list should be free()'d
|
* fetch the list associated with the specified name
|
||||||
* by the caller via getdns_list_destroy()
|
* the list should not be free()'d by the caller, when the dictionary is destroyed
|
||||||
|
* the list will also be destroyed
|
||||||
* @param dict dictionary from which to fetch the list
|
* @param dict dictionary from which to fetch the list
|
||||||
* @param name a name/key value to look up in the dictionary
|
* @param name a name/key value to look up in the dictionary
|
||||||
* @param **answer a copy of the list will be stored at this address
|
* @param **answer a copy of the list will be stored at this address
|
||||||
|
@ -486,7 +512,7 @@ getdns_return_t getdns_dict_get_dict(struct getdns_dict *this_dict, char *name,
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_dict_get_list(struct getdns_dict *this_dict, char *name, struct getdns_list **answer);
|
getdns_return_t getdns_dict_get_list(struct getdns_dict *this_dict, char *name, struct getdns_list **answer);
|
||||||
/**
|
/**
|
||||||
* fetch the bindata associated with the specified name, the bindata should be
|
* fetch the bindata associated with the specified name, the bindata should not be
|
||||||
* free()'d by the caller
|
* free()'d by the caller
|
||||||
* @param dict dictionary from which to fetch the bindata
|
* @param dict dictionary from which to fetch the bindata
|
||||||
* @param name a name/key value to look up in the dictionary
|
* @param name a name/key value to look up in the dictionary
|
||||||
|
@ -517,7 +543,7 @@ struct getdns_list * getdns_list_create();
|
||||||
* you MUST copy those instances BEFORE you destroy the list else
|
* you MUST copy those instances BEFORE you destroy the list else
|
||||||
* unpleasant things will happen at run-time
|
* unpleasant things will happen at run-time
|
||||||
*/
|
*/
|
||||||
void getdns_list_destroy(struct getdns_list *this_list);
|
void getdns_list_destroy(struct getdns_list *list);
|
||||||
/**
|
/**
|
||||||
* add an item to the tail of a list - note that this was not in the getdns API
|
* add an item to the tail of a list - note that this was not in the getdns API
|
||||||
* description but the list_set functions seem to be designed to modify an existing
|
* description but the list_set functions seem to be designed to modify an existing
|
||||||
|
@ -549,7 +575,7 @@ getdns_return_t getdns_list_set_list(struct getdns_list *list, size_t index, str
|
||||||
*/
|
*/
|
||||||
getdns_return_t getdns_list_set_bindata(struct getdns_list *list, size_t index, struct getdns_bindata *child_bindata);
|
getdns_return_t getdns_list_set_bindata(struct getdns_list *list, size_t index, struct getdns_bindata *child_bindata);
|
||||||
/**
|
/**
|
||||||
* set the integrer value of the indexed item (zero based index)
|
* set the integer value of the indexed item (zero based index)
|
||||||
* @return GETDNS_RETURN_GOOD on success
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if index is out of range, or list is NULL
|
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if index is out of range, or list is NULL
|
||||||
*/
|
*/
|
||||||
|
@ -561,18 +587,51 @@ getdns_return_t getdns_list_set_int(struct getdns_list *list, size_t index, uint
|
||||||
*/
|
*/
|
||||||
struct getdns_dict *getdns_dict_create();
|
struct getdns_dict *getdns_dict_create();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* private function used to make a copy of a dict structure, the caller is responsible
|
||||||
|
* for freeing storage allocated to returned value
|
||||||
|
* NOTE: not thread safe - this needs to be fixed to be thread safe
|
||||||
|
* @param srcdict the dictionary structure to copy
|
||||||
|
* @param dstdict pointer to the location to write pointer to new dictionary
|
||||||
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
|
*/
|
||||||
|
getdns_return_t
|
||||||
|
getdns_dict_copy(struct getdns_dict *srcdict, struct getdns_dict **dstdict);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* destroy a dictionary and all items within that dictionary
|
* destroy a dictionary and all items within that dictionary
|
||||||
* be aware that if you have fetched any data from the dictionary it will
|
* be aware that if you have fetched any data from the dictionary it will
|
||||||
* no longer be available (you are likely to experience bad things if you try)
|
* no longer be available (you are likely to experience bad things if you try)
|
||||||
* @return pointer to an allocated dictionary, NULL if insufficient memory
|
|
||||||
*/
|
*/
|
||||||
void getdns_dict_destroy(struct getdns_dict *this_dict);
|
void getdns_dict_destroy(struct getdns_dict *dict);
|
||||||
|
|
||||||
getdns_return_t getdns_dict_set_dict(struct getdns_dict *this_dict, char *name, struct getdns_dict *child_dict);
|
getdns_return_t getdns_dict_set_dict(struct getdns_dict *dict, char *name, struct getdns_dict *child_dict);
|
||||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, char *name, struct getdns_list *child_list);
|
/**
|
||||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, char *name, struct getdns_bindata *child_bindata);
|
* create a new entry in the dictionary, or replace the value of an existing entry
|
||||||
getdns_return_t getdns_dict_set_int(struct getdns_dict *this_dict, char *name, uint32_t child_uint32);
|
* this routine makes a copy of the child_list
|
||||||
|
* @param dict dictionary in which to add or change the value
|
||||||
|
* @param name key that identifies which item in the dictionary to add/change
|
||||||
|
* @param child_list value to assign to the node identified by name
|
||||||
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
|
*/
|
||||||
|
getdns_return_t getdns_dict_set_list(struct getdns_dict *dict, char *name, struct getdns_list *child_list);
|
||||||
|
/**
|
||||||
|
* create a new entry in the dictionary, or replace the value of an existing entry
|
||||||
|
* this routine makes a copy of the child_bindata
|
||||||
|
* @param dict dictionary in which to add or change the value
|
||||||
|
* @param name key that identifies which item in the dictionary to add/change
|
||||||
|
* @param child_bindata value to assign to the node identified by name
|
||||||
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
|
*/
|
||||||
|
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *dict, char *name, struct getdns_bindata *child_bindata);
|
||||||
|
/**
|
||||||
|
* create a new entry in the dictionary, or replace the value of an existing entry
|
||||||
|
* @param dict dictionary in which to add or change the value
|
||||||
|
* @param name key that identifies which item in the dictionary to add/change
|
||||||
|
* @param child_uint32 value to assign to the node identified by name
|
||||||
|
* @return GETDNS_RETURN_GOOD on success
|
||||||
|
*/
|
||||||
|
getdns_return_t getdns_dict_set_int(struct getdns_dict *dict, char *name, uint32_t child_uint32);
|
||||||
|
|
||||||
/* Callback arguments */
|
/* Callback arguments */
|
||||||
typedef void (*getdns_callback_t)(
|
typedef void (*getdns_callback_t)(
|
||||||
|
@ -757,10 +816,15 @@ getdns_validate_dnssec(
|
||||||
struct getdns_list *trust_anchor_rdatas
|
struct getdns_list *trust_anchor_rdatas
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* creates a string that describes the dictionary in a human readable form
|
||||||
|
* one line per item in the dictionary
|
||||||
|
* TODO: maybe this should be json or something machine readable too
|
||||||
|
* @param dict dictionary to pretty print
|
||||||
|
* @return character array (caller must free this) containing pretty string
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
getdns_pretty_print_dict(
|
getdns_pretty_print_dict(struct getdns_dict *dict);
|
||||||
struct getdns_dict *some_dict
|
|
||||||
);
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
getdns_display_ip_address(
|
getdns_display_ip_address(
|
||||||
|
|
|
@ -33,8 +33,11 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <getdns_libevent.h>
|
#include <getdns_libevent.h>
|
||||||
|
|
||||||
/* stuff to make it compile pedantically */
|
/* TODO: change this to make the walk safe for reentrant/multi-thread calls */
|
||||||
#define UNUSED_PARAM(x) ((void)(x))
|
struct getdns_list *walkresultlist;
|
||||||
|
struct getdns_dict *walkresultdict;
|
||||||
|
char *walkresultchar;
|
||||||
|
int walkresultcharlen;
|
||||||
|
|
||||||
/*---------------------------------------- getdns_dict_cmp */
|
/*---------------------------------------- getdns_dict_cmp */
|
||||||
/**
|
/**
|
||||||
|
@ -104,27 +107,91 @@ getdns_dict_find(struct getdns_dict *dict, char *key, bool addifnotfnd)
|
||||||
ret = *item;
|
ret = *item;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *item;
|
return ret;
|
||||||
} /* getdns_dict_set_int */
|
} /* getdns_dict_find */
|
||||||
|
|
||||||
getdns_return_t getdns_dict_get_names(struct getdns_dict *this_dict, struct getdns_list **answer)
|
/*---------------------------------------- getdns_dict_visit */
|
||||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
|
/**
|
||||||
|
* private function called by the tree walk function invoked by getdns_dict_get_names
|
||||||
|
* it is called as each node is visited. twalk() calls 3x for each node and passes order
|
||||||
|
* to tell us whether it is a pre/in/post order
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
getdns_dict_visit(const void *node, VISIT order, int level)
|
||||||
|
{
|
||||||
|
struct getdns_dict_item *item;
|
||||||
|
size_t index;
|
||||||
|
|
||||||
|
item = *(struct getdns_dict_item **) node;
|
||||||
|
/* postorder is mis-named - it results in in-order traversal */
|
||||||
|
if(order == postorder || order == leaf)
|
||||||
|
{
|
||||||
|
if(getdns_list_add_item(walkresultlist, &index) == GETDNS_RETURN_GOOD)
|
||||||
|
{
|
||||||
|
switch(item->dtype)
|
||||||
|
{
|
||||||
|
case t_bindata:
|
||||||
|
getdns_list_set_bindata(walkresultlist, index, item->data.bindata);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_dict:
|
||||||
|
getdns_list_set_dict(walkresultlist, index, item->data.dict);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_int:
|
||||||
|
getdns_list_set_int(walkresultlist, index, item->data.n);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_list:
|
||||||
|
getdns_list_set_list(walkresultlist, index, item->data.list);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_invalid:
|
||||||
|
default:
|
||||||
|
// TODO: this is a fault of some kind, for now ignore it
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* getdns_dict_visit */
|
||||||
|
|
||||||
|
/*---------------------------------------- getdns_dict_get_names
|
||||||
|
TODO: this needs to be made thread safe by creating a thread specific list
|
||||||
|
the binary search tree implementation in the
|
||||||
|
*/
|
||||||
|
getdns_return_t
|
||||||
|
getdns_dict_get_names(struct getdns_dict *dict, struct getdns_list **answer)
|
||||||
|
{
|
||||||
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
|
if(dict != NULL && answer != NULL)
|
||||||
|
{
|
||||||
|
*answer = getdns_list_create();
|
||||||
|
walkresultlist = *answer;
|
||||||
|
|
||||||
|
twalk(dict->rootp, getdns_dict_visit);
|
||||||
|
|
||||||
|
retval = GETDNS_RETURN_GOOD;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
} /* getdns_dict_get_names */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_dict_get_data_type */
|
/*---------------------------------------- getdns_dict_get_data_type */
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_dict_get_data_type(struct getdns_dict *dict, char *name, getdns_data_type *answer)
|
getdns_dict_get_data_type(struct getdns_dict *dict, char *name, getdns_data_type *answer)
|
||||||
{
|
{
|
||||||
struct getdns_dict_item keyitem;
|
struct getdns_dict_item *item;
|
||||||
struct getdns_dict_item **item;
|
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(dict != NULL && name != NULL && answer != NULL)
|
if(dict != NULL && name != NULL && answer != NULL)
|
||||||
{
|
{
|
||||||
keyitem.key = name;
|
item = getdns_dict_find(dict, name, false);
|
||||||
item = tfind(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
if(item != NULL)
|
||||||
if(item != NULL && *item != NULL)
|
|
||||||
{
|
{
|
||||||
*answer = (*item)->dtype;
|
*answer = item->dtype;
|
||||||
retval = GETDNS_RETURN_GOOD;
|
retval = GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,21 +203,19 @@ getdns_dict_get_data_type(struct getdns_dict *dict, char *name, getdns_data_type
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_dict_get_dict(struct getdns_dict *dict, char *name, struct getdns_dict **answer)
|
getdns_dict_get_dict(struct getdns_dict *dict, char *name, struct getdns_dict **answer)
|
||||||
{
|
{
|
||||||
struct getdns_dict_item keyitem;
|
struct getdns_dict_item *item;
|
||||||
struct getdns_dict_item **item;
|
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(dict != NULL && name != NULL && answer != NULL)
|
if(dict != NULL && name != NULL && answer != NULL)
|
||||||
{
|
{
|
||||||
keyitem.key = name;
|
item = getdns_dict_find(dict, name, false);
|
||||||
item = tfind(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
if(item != NULL)
|
||||||
if(item != NULL && *item != NULL)
|
|
||||||
{
|
{
|
||||||
if((*item)->dtype != t_dict)
|
if(item->dtype != t_dict)
|
||||||
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*answer = (*item)->data.dict;
|
*answer = item->data.dict;
|
||||||
retval = GETDNS_RETURN_GOOD;
|
retval = GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,21 +228,19 @@ getdns_dict_get_dict(struct getdns_dict *dict, char *name, struct getdns_dict **
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_dict_get_list(struct getdns_dict *dict, char *name, struct getdns_list **answer)
|
getdns_dict_get_list(struct getdns_dict *dict, char *name, struct getdns_list **answer)
|
||||||
{
|
{
|
||||||
struct getdns_dict_item keyitem;
|
struct getdns_dict_item *item;
|
||||||
struct getdns_dict_item **item;
|
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(dict != NULL && name != NULL && answer != NULL)
|
if(dict != NULL && name != NULL && answer != NULL)
|
||||||
{
|
{
|
||||||
keyitem.key = name;
|
item = getdns_dict_find(dict, name, false);
|
||||||
item = tfind(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
if(item != NULL)
|
||||||
if(item != NULL && *item != NULL)
|
|
||||||
{
|
{
|
||||||
if((*item)->dtype != t_list)
|
if(item->dtype != t_list)
|
||||||
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*answer = (*item)->data.list;
|
*answer = item->data.list;
|
||||||
retval = GETDNS_RETURN_GOOD;
|
retval = GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,21 +253,19 @@ getdns_dict_get_list(struct getdns_dict *dict, char *name, struct getdns_list **
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_dict_get_bindata(struct getdns_dict *dict, char *name, struct getdns_bindata **answer)
|
getdns_dict_get_bindata(struct getdns_dict *dict, char *name, struct getdns_bindata **answer)
|
||||||
{
|
{
|
||||||
struct getdns_dict_item keyitem;
|
struct getdns_dict_item *item;
|
||||||
struct getdns_dict_item **item;
|
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(dict != NULL && name != NULL && answer != NULL)
|
if(dict != NULL && name != NULL && answer != NULL)
|
||||||
{
|
{
|
||||||
keyitem.key = name;
|
item = getdns_dict_find(dict, name, false);
|
||||||
item = tfind(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
if(item != NULL)
|
||||||
if(item != NULL && *item != NULL)
|
|
||||||
{
|
{
|
||||||
if((*item)->dtype != t_bindata)
|
if(item->dtype != t_bindata)
|
||||||
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*answer = (*item)->data.bindata;
|
*answer = item->data.bindata;
|
||||||
retval = GETDNS_RETURN_GOOD;
|
retval = GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,21 +278,19 @@ getdns_dict_get_bindata(struct getdns_dict *dict, char *name, struct getdns_bind
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_dict_get_int(struct getdns_dict *dict, char *name, uint32_t *answer)
|
getdns_dict_get_int(struct getdns_dict *dict, char *name, uint32_t *answer)
|
||||||
{
|
{
|
||||||
struct getdns_dict_item keyitem;
|
struct getdns_dict_item *item;
|
||||||
struct getdns_dict_item **item;
|
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(dict != NULL && name != NULL && answer != NULL)
|
if(dict != NULL && name != NULL && answer != NULL)
|
||||||
{
|
{
|
||||||
keyitem.key = name;
|
item = getdns_dict_find(dict, name, false);
|
||||||
item = tfind(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
if(item != NULL)
|
||||||
if(item != NULL && *item != NULL)
|
|
||||||
{
|
{
|
||||||
if((*item)->dtype != t_int)
|
if(item->dtype != t_int)
|
||||||
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*answer = (*item)->data.n;
|
*answer = item->data.n;
|
||||||
retval = GETDNS_RETURN_GOOD;
|
retval = GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -252,24 +311,75 @@ getdns_dict_create()
|
||||||
return dict;
|
return dict;
|
||||||
} /* getdns_dict_create */
|
} /* getdns_dict_create */
|
||||||
|
|
||||||
|
/*---------------------------------------- getdns_dict_visit_copyitem */
|
||||||
|
/**
|
||||||
|
* private function called by getdns_dict_copy() through the tree walk function
|
||||||
|
* is called as each node is visited. twalk() calls 3x for each node and passes order
|
||||||
|
* to tell us whether it is a pre/in/post order. We use this to copy the dictionary one item at
|
||||||
|
* a time - this could be sped up
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
getdns_dict_visit_copyitem(const void *node, VISIT order, int level)
|
||||||
|
{
|
||||||
|
struct getdns_dict_item *item;
|
||||||
|
|
||||||
|
item = *(struct getdns_dict_item **) node;
|
||||||
|
/* postorder is mis-named - it results in in-order traversal */
|
||||||
|
if(order == postorder || order == leaf)
|
||||||
|
{
|
||||||
|
switch(item->dtype)
|
||||||
|
{
|
||||||
|
case t_bindata:
|
||||||
|
getdns_dict_set_bindata(walkresultdict, item->key, item->data.bindata);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_dict:
|
||||||
|
getdns_dict_set_dict(walkresultdict, item->key, item->data.dict);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_int:
|
||||||
|
getdns_dict_set_int(walkresultdict, item->key, item->data.n);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_list:
|
||||||
|
getdns_dict_set_list(walkresultdict, item->key, item->data.list);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_invalid:
|
||||||
|
default:
|
||||||
|
// TODO: this is a fault of some kind, for now ignore it
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* getdns_dict_visit_copyitem */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_dict_copy */
|
/*---------------------------------------- getdns_dict_copy */
|
||||||
/**
|
/**
|
||||||
* private function used to make a copy of a dict structure
|
* private function used to make a copy of a dict structure, the caller is responsible
|
||||||
|
* for freeing storage allocated to returned value
|
||||||
|
* NOTE: not thread safe - this needs to be fixed to be thread safe
|
||||||
* @param srcdict the dictionary structure to copy
|
* @param srcdict the dictionary structure to copy
|
||||||
* @return the address of the copy of the dictionary structure on success
|
* @return the address of the copy of the dictionary structure on success
|
||||||
* @return NULL on error (out of memory, invalid srcdict)
|
* @return NULL on error (out of memory, invalid srcdict)
|
||||||
*/
|
*/
|
||||||
struct getdns_dict *
|
getdns_return_t
|
||||||
getdns_dict_copy(struct getdns_dict *srcdict)
|
getdns_dict_copy(struct getdns_dict *srcdict, struct getdns_dict **dstdict)
|
||||||
{
|
{
|
||||||
struct getdns_dict *newdict = NULL;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(srcdict != NULL)
|
if(srcdict != NULL && dstdict != NULL)
|
||||||
{
|
{
|
||||||
|
*dstdict = getdns_dict_create();
|
||||||
|
walkresultdict = *dstdict;
|
||||||
|
|
||||||
|
twalk(srcdict->rootp, getdns_dict_visit_copyitem);
|
||||||
|
|
||||||
|
retval = GETDNS_RETURN_GOOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
return newdict;
|
return retval;
|
||||||
} /* getdns_dict_copy */
|
} /* getdns_dict_copy */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_dict_item_free */
|
/*---------------------------------------- getdns_dict_item_free */
|
||||||
|
@ -331,37 +441,85 @@ getdns_dict_destroy(struct getdns_dict *dict)
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_dict_set_dict(struct getdns_dict *dict, char *name, struct getdns_dict *child_dict)
|
getdns_dict_set_dict(struct getdns_dict *dict, char *name, struct getdns_dict *child_dict)
|
||||||
{
|
{
|
||||||
struct getdns_dict_item keyitem;
|
struct getdns_dict_item *item;
|
||||||
struct getdns_dict_item **item;
|
struct getdns_dict *newdict;
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
if(dict != NULL && name != NULL && child_dict != NULL)
|
if(dict != NULL && name != NULL)
|
||||||
{
|
{
|
||||||
/* we try to find it first, if we do then clear the existing data */
|
item = getdns_dict_find(dict, name, true);
|
||||||
keyitem.key = name;
|
if(item != NULL)
|
||||||
item = tfind(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
|
||||||
if(item != NULL && *item != NULL)
|
|
||||||
{
|
{
|
||||||
getdns_dict_item_free(*item);
|
retval = getdns_dict_copy(child_dict, &newdict);
|
||||||
}
|
if(retval == GETDNS_RETURN_GOOD)
|
||||||
else
|
{
|
||||||
{
|
item->dtype = t_dict;
|
||||||
/* tsearch will add a node automatically for us */
|
item->data.dict = newdict;
|
||||||
item = tsearch(&keyitem, &(dict->rootp), getdns_dict_cmp);
|
}
|
||||||
(*item)->key = strdup(keyitem.key);
|
else
|
||||||
(*item)->dtype = t_dict;
|
item->dtype = t_invalid;
|
||||||
(*item)->data.dict = getdns_dict_copy(child_dict);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
} /* getdns_dict_set_dict */
|
} /* getdns_dict_set_dict */
|
||||||
|
|
||||||
getdns_return_t getdns_dict_set_list(struct getdns_dict *this_dict, char *name, struct getdns_list *child_list)
|
/*---------------------------------------- getdns_dict_set_list */
|
||||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_list); return GETDNS_RETURN_GOOD; }
|
getdns_return_t
|
||||||
|
getdns_dict_set_list(struct getdns_dict *dict, char *name, struct getdns_list *child_list)
|
||||||
|
{
|
||||||
|
struct getdns_dict_item *item;
|
||||||
|
struct getdns_list *newlist;
|
||||||
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
getdns_return_t getdns_dict_set_bindata(struct getdns_dict *this_dict, char *name, struct getdns_bindata *child_bindata)
|
if(dict != NULL && name != NULL)
|
||||||
{ UNUSED_PARAM(this_dict); UNUSED_PARAM(name); UNUSED_PARAM(child_bindata); return GETDNS_RETURN_GOOD; }
|
{
|
||||||
|
item = getdns_dict_find(dict, name, true);
|
||||||
|
if(item != NULL)
|
||||||
|
{
|
||||||
|
retval = getdns_list_copy(child_list, &newlist);
|
||||||
|
if(retval == GETDNS_RETURN_GOOD)
|
||||||
|
{
|
||||||
|
item->dtype = t_list;
|
||||||
|
item->data.list = newlist;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
item->dtype = t_invalid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
} /* getdns_dict_set_list */
|
||||||
|
|
||||||
|
/*---------------------------------------- getdns_dict_set_bindata */
|
||||||
|
getdns_return_t
|
||||||
|
getdns_dict_set_bindata(struct getdns_dict *dict, char *name, struct getdns_bindata *child_bindata)
|
||||||
|
{
|
||||||
|
struct getdns_dict_item *item;
|
||||||
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
|
if(dict != NULL && name != NULL && child_bindata != NULL)
|
||||||
|
{
|
||||||
|
item = getdns_dict_find(dict, name, true);
|
||||||
|
if(item != NULL)
|
||||||
|
{
|
||||||
|
item->dtype = t_bindata;
|
||||||
|
item->data.bindata = (struct getdns_bindata *) malloc(sizeof(struct getdns_bindata));
|
||||||
|
if(item->data.bindata != NULL)
|
||||||
|
{
|
||||||
|
item->data.bindata->data = (void *) malloc(item->data.bindata->size);
|
||||||
|
if(item->data.bindata->data != NULL)
|
||||||
|
{
|
||||||
|
item->data.bindata->size = child_bindata->size;
|
||||||
|
memcpy(item->data.bindata->data, child_bindata->data, child_bindata->size);
|
||||||
|
retval = GETDNS_RETURN_GOOD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
} /* getdns_dict_set_bindata */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_dict_set_int */
|
/*---------------------------------------- getdns_dict_set_int */
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
|
@ -370,21 +528,106 @@ getdns_dict_set_int(struct getdns_dict *dict, char *name, uint32_t child_uint32)
|
||||||
struct getdns_dict_item *item;
|
struct getdns_dict_item *item;
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_DICT_NAME;
|
||||||
|
|
||||||
item = getdns_dict_find(dict, name, true);
|
|
||||||
if(dict != NULL && name != NULL)
|
if(dict != NULL && name != NULL)
|
||||||
{
|
{
|
||||||
item->dtype = t_int;
|
item = getdns_dict_find(dict, name, true);
|
||||||
item->data.n = child_uint32;
|
if(item != NULL)
|
||||||
retval = GETDNS_RETURN_GOOD;
|
{
|
||||||
|
item->dtype = t_int;
|
||||||
|
item->data.n = child_uint32;
|
||||||
|
retval = GETDNS_RETURN_GOOD;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
} /* getdns_dict_set_int */
|
} /* getdns_dict_set_int */
|
||||||
|
|
||||||
|
/*---------------------------------------- getdns_dict_visit_print */
|
||||||
|
/**
|
||||||
|
* private function called by the tree walk function invoked by getdns_pretty_print_dict
|
||||||
|
* it is called as each node is visited. twalk() calls 3x for each node and passes order
|
||||||
|
* to tell us whether it is a pre/in/post order
|
||||||
|
* TODO: need to handle nested non-trivial data types
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
getdns_dict_visit_print(const void *node, VISIT order, int level)
|
||||||
|
{
|
||||||
|
struct getdns_dict_item *item;
|
||||||
|
int newlen;
|
||||||
|
char *dtypestr = NULL;
|
||||||
|
char *valstr = NULL;
|
||||||
|
char *itemstr = NULL;
|
||||||
|
|
||||||
|
item = *(struct getdns_dict_item **) node;
|
||||||
|
/* postorder is mis-named - it results in in-order traversal */
|
||||||
|
if(order == postorder || order == leaf)
|
||||||
|
{
|
||||||
|
switch(item->dtype)
|
||||||
|
{
|
||||||
|
case t_bindata:
|
||||||
|
dtypestr = "bindata";
|
||||||
|
valstr = strdup("NOT IMPLEMENTED");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_dict:
|
||||||
|
dtypestr = "dict";
|
||||||
|
valstr = strdup("NOT IMPLEMENTED");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_int:
|
||||||
|
dtypestr = "int";
|
||||||
|
asprintf(&valstr, "%d", item->data.n);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_list:
|
||||||
|
dtypestr = "list";
|
||||||
|
valstr = strdup("NOT IMPLEMENTED");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_invalid:
|
||||||
|
default:
|
||||||
|
dtypestr = "invalid";
|
||||||
|
valstr = strdup("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
newlen = asprintf(&itemstr, "key=\"%s\", type=\"%s\", value=\"%s\"\n", item->key, dtypestr, valstr);
|
||||||
|
if(newlen != -1)
|
||||||
|
{
|
||||||
|
walkresultchar = (char *) realloc(walkresultchar, walkresultcharlen + newlen + 1);
|
||||||
|
memcpy(walkresultchar + walkresultcharlen, itemstr, newlen);
|
||||||
|
walkresultcharlen += newlen;
|
||||||
|
walkresultchar[walkresultcharlen] = '\0';
|
||||||
|
}
|
||||||
|
// else
|
||||||
|
// TODO: this is a fault - do something
|
||||||
|
|
||||||
|
free(valstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* getdns_dict_visit_print */
|
||||||
|
|
||||||
|
/*---------------------------------------- getdns_pretty_print_dict */
|
||||||
char *
|
char *
|
||||||
getdns_pretty_print_dict(
|
getdns_pretty_print_dict(struct getdns_dict *dict)
|
||||||
struct getdns_dict *some_dict
|
{
|
||||||
)
|
char *retval = NULL;
|
||||||
{ UNUSED_PARAM(some_dict); return NULL; }
|
|
||||||
|
walkresultcharlen = 0;
|
||||||
|
walkresultchar = NULL;
|
||||||
|
|
||||||
|
if(dict != NULL && dict->rootp != NULL)
|
||||||
|
{
|
||||||
|
twalk(dict->rootp, getdns_dict_visit_print);
|
||||||
|
if(walkresultcharlen > 0)
|
||||||
|
{
|
||||||
|
retval = strdup(walkresultchar);
|
||||||
|
free(walkresultchar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
} /* getdns_pretty_print_dict */
|
||||||
|
|
||||||
/* getdns_dict.c */
|
/* getdns_dict.c */
|
||||||
|
|
|
@ -32,10 +32,7 @@
|
||||||
#include <getdns_libevent.h>
|
#include <getdns_libevent.h>
|
||||||
#include "getdns_core_only.h"
|
#include "getdns_core_only.h"
|
||||||
|
|
||||||
/* stuff to make it compile pedantically */
|
/*---------------------------------------- getdns_list_get_length */
|
||||||
#define UNUSED_PARAM(x) ((void)(x))
|
|
||||||
|
|
||||||
|
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_list_get_length(struct getdns_list *list, size_t *answer)
|
getdns_list_get_length(struct getdns_list *list, size_t *answer)
|
||||||
{
|
{
|
||||||
|
@ -64,8 +61,25 @@ getdns_list_get_data_type(struct getdns_list *list, size_t index, getdns_data_ty
|
||||||
return retval;
|
return retval;
|
||||||
} /* getdns_list_get_data_type */
|
} /* getdns_list_get_data_type */
|
||||||
|
|
||||||
getdns_return_t getdns_list_get_dict(struct getdns_list *this_list, size_t index, struct getdns_dict **answer)
|
/*---------------------------------------- getdns_list_get_dict */
|
||||||
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(answer); return GETDNS_RETURN_GOOD; }
|
getdns_return_t
|
||||||
|
getdns_list_get_dict(struct getdns_list *list, size_t index, struct getdns_dict **answer)
|
||||||
|
{
|
||||||
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_LIST_ITEM;
|
||||||
|
|
||||||
|
if(list != NULL && index < list->numinuse)
|
||||||
|
{
|
||||||
|
if(list->items[index].dtype != t_dict)
|
||||||
|
retval = GETDNS_RETURN_WRONG_TYPE_REQUESTED;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*answer = list->items[index].data.dict;
|
||||||
|
retval = GETDNS_RETURN_GOOD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
} /* getdns_list_get_dict */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_list_get_list */
|
/*---------------------------------------- getdns_list_get_list */
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
|
@ -162,15 +176,6 @@ getdns_list_realloc(struct getdns_list *list)
|
||||||
} /* getdns_list_realloc */
|
} /* getdns_list_realloc */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_list_copy */
|
/*---------------------------------------- getdns_list_copy */
|
||||||
/**
|
|
||||||
* private function (API users should not be calling this), this uses library
|
|
||||||
* routines to make a copy of the list - would be faster to make the copy directly
|
|
||||||
* @param list pointer to list to copy
|
|
||||||
* @param newlist pointer to pointer to list to receive the copy (will be allocated)
|
|
||||||
* @return GETDNS_RETURN_GOOD on success
|
|
||||||
* @return GETDNS_RETURN_NO_SUCH_LIST_ITEM if list is invalid
|
|
||||||
* @return GETDNS_RETURN_GENERIC_ERROR if out of memory
|
|
||||||
*/
|
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
getdns_list_copy(struct getdns_list *srclist, struct getdns_list **dstlist)
|
getdns_list_copy(struct getdns_list *srclist, struct getdns_list **dstlist)
|
||||||
{
|
{
|
||||||
|
@ -178,7 +183,7 @@ getdns_list_copy(struct getdns_list *srclist, struct getdns_list **dstlist)
|
||||||
size_t index;
|
size_t index;
|
||||||
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_LIST_ITEM;
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_LIST_ITEM;
|
||||||
|
|
||||||
if(srclist != NULL && *dstlist != NULL)
|
if(srclist != NULL && dstlist != NULL)
|
||||||
{
|
{
|
||||||
*dstlist = getdns_list_create();
|
*dstlist = getdns_list_create();
|
||||||
if(*dstlist != NULL)
|
if(*dstlist != NULL)
|
||||||
|
@ -296,8 +301,23 @@ getdns_list_add_item(struct getdns_list *list, size_t *index)
|
||||||
return retval;
|
return retval;
|
||||||
} /* getdns_list_add_item */
|
} /* getdns_list_add_item */
|
||||||
|
|
||||||
getdns_return_t getdns_list_set_dict(struct getdns_list *this_list, size_t index, struct getdns_dict *child_dict)
|
/*---------------------------------------- getdns_list_set_dict */
|
||||||
{ UNUSED_PARAM(this_list); UNUSED_PARAM(index); UNUSED_PARAM(child_dict); return GETDNS_RETURN_GOOD; }
|
getdns_return_t
|
||||||
|
getdns_list_set_dict(struct getdns_list *list, size_t index, struct getdns_dict *child_dict)
|
||||||
|
{
|
||||||
|
getdns_return_t retval = GETDNS_RETURN_NO_SUCH_LIST_ITEM;
|
||||||
|
|
||||||
|
if(list != NULL && child_dict != NULL)
|
||||||
|
{
|
||||||
|
if(list->numinuse > index)
|
||||||
|
{
|
||||||
|
list->items[index].dtype = t_dict;
|
||||||
|
retval = getdns_dict_copy(child_dict, &(list->items[index].data.dict));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
} /* getdns_list_set_dict */
|
||||||
|
|
||||||
/*---------------------------------------- getdns_set_list */
|
/*---------------------------------------- getdns_set_list */
|
||||||
getdns_return_t
|
getdns_return_t
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I/usr/local/include -I../common -std=c99
|
||||||
|
AM_LDFLAGS = -L../common -L/usr/local/lib -lgetdns -lldns -levent
|
||||||
|
bin_PROGRAMS = example_all_functions example_synchronous \
|
||||||
|
example_simple_answers example_tree
|
||||||
|
example_all_functions_SOURCES = example_all_functions.c
|
||||||
|
example_synchronous_SOURCES = example_synchronous.c
|
||||||
|
example_simple_answers_SOURCES = example_simple_answers.c
|
||||||
|
example_tree_SOURCES = example_tree.c
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,580 @@
|
||||||
|
# Makefile.in generated by automake 1.12.4 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__make_dryrun = \
|
||||||
|
{ \
|
||||||
|
am__dry=no; \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||||
|
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||||
|
*) \
|
||||||
|
for am__flg in $$MAKEFLAGS; do \
|
||||||
|
case $$am__flg in \
|
||||||
|
*=*|--*) ;; \
|
||||||
|
*n*) am__dry=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done;; \
|
||||||
|
esac; \
|
||||||
|
test $$am__dry = yes; \
|
||||||
|
}
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
bin_PROGRAMS = example_all_functions$(EXEEXT) \
|
||||||
|
example_synchronous$(EXEEXT) example_simple_answers$(EXEEXT) \
|
||||||
|
example_tree$(EXEEXT)
|
||||||
|
subdir = src/example
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||||
|
$(top_srcdir)/depcomp
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||||
|
PROGRAMS = $(bin_PROGRAMS)
|
||||||
|
am_example_all_functions_OBJECTS = example_all_functions.$(OBJEXT)
|
||||||
|
example_all_functions_OBJECTS = $(am_example_all_functions_OBJECTS)
|
||||||
|
example_all_functions_LDADD = $(LDADD)
|
||||||
|
am_example_simple_answers_OBJECTS = example_simple_answers.$(OBJEXT)
|
||||||
|
example_simple_answers_OBJECTS = $(am_example_simple_answers_OBJECTS)
|
||||||
|
example_simple_answers_LDADD = $(LDADD)
|
||||||
|
am_example_synchronous_OBJECTS = example_synchronous.$(OBJEXT)
|
||||||
|
example_synchronous_OBJECTS = $(am_example_synchronous_OBJECTS)
|
||||||
|
example_synchronous_LDADD = $(LDADD)
|
||||||
|
am_example_tree_OBJECTS = example_tree.$(OBJEXT)
|
||||||
|
example_tree_OBJECTS = $(am_example_tree_OBJECTS)
|
||||||
|
example_tree_LDADD = $(LDADD)
|
||||||
|
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||||
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
|
am__depfiles_maybe = depfiles
|
||||||
|
am__mv = mv -f
|
||||||
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||||
|
$(LDFLAGS) -o $@
|
||||||
|
SOURCES = $(example_all_functions_SOURCES) \
|
||||||
|
$(example_simple_answers_SOURCES) \
|
||||||
|
$(example_synchronous_SOURCES) $(example_tree_SOURCES)
|
||||||
|
DIST_SOURCES = $(example_all_functions_SOURCES) \
|
||||||
|
$(example_simple_answers_SOURCES) \
|
||||||
|
$(example_synchronous_SOURCES) $(example_tree_SOURCES)
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
subdirs = @subdirs@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I/usr/local/include -I../common -std=c99
|
||||||
|
AM_LDFLAGS = -L../common -L/usr/local/lib -lgetdns -lldns -levent
|
||||||
|
example_all_functions_SOURCES = example_all_functions.c
|
||||||
|
example_synchronous_SOURCES = example_synchronous.c
|
||||||
|
example_simple_answers_SOURCES = example_simple_answers.c
|
||||||
|
example_tree_SOURCES = example_tree.c
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .lo .o .obj
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/example/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu src/example/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed 's/$(EXEEXT)$$//' | \
|
||||||
|
while read p p1; do if test -f $$p || test -f $$p1; \
|
||||||
|
then echo "$$p"; echo "$$p"; else :; fi; \
|
||||||
|
done | \
|
||||||
|
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
|
||||||
|
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||||
|
sed 'N;N;N;s,\n, ,g' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||||
|
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||||
|
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||||
|
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||||
|
END { for (d in files) print "f", d, files[d] }' | \
|
||||||
|
while read type dir files; do \
|
||||||
|
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||||
|
test -z "$$files" || { \
|
||||||
|
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||||
|
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||||
|
} \
|
||||||
|
; done
|
||||||
|
|
||||||
|
uninstall-binPROGRAMS:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo "$$p"; done | \
|
||||||
|
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||||
|
-e 's/$$/$(EXEEXT)/' `; \
|
||||||
|
test -n "$$list" || exit 0; \
|
||||||
|
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||||
|
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||||
|
|
||||||
|
clean-binPROGRAMS:
|
||||||
|
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||||
|
echo " rm -f" $$list; \
|
||||||
|
rm -f $$list || exit $$?; \
|
||||||
|
test -n "$(EXEEXT)" || exit 0; \
|
||||||
|
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||||
|
echo " rm -f" $$list; \
|
||||||
|
rm -f $$list
|
||||||
|
example_all_functions$(EXEEXT): $(example_all_functions_OBJECTS) $(example_all_functions_DEPENDENCIES) $(EXTRA_example_all_functions_DEPENDENCIES)
|
||||||
|
@rm -f example_all_functions$(EXEEXT)
|
||||||
|
$(LINK) $(example_all_functions_OBJECTS) $(example_all_functions_LDADD) $(LIBS)
|
||||||
|
example_simple_answers$(EXEEXT): $(example_simple_answers_OBJECTS) $(example_simple_answers_DEPENDENCIES) $(EXTRA_example_simple_answers_DEPENDENCIES)
|
||||||
|
@rm -f example_simple_answers$(EXEEXT)
|
||||||
|
$(LINK) $(example_simple_answers_OBJECTS) $(example_simple_answers_LDADD) $(LIBS)
|
||||||
|
example_synchronous$(EXEEXT): $(example_synchronous_OBJECTS) $(example_synchronous_DEPENDENCIES) $(EXTRA_example_synchronous_DEPENDENCIES)
|
||||||
|
@rm -f example_synchronous$(EXEEXT)
|
||||||
|
$(LINK) $(example_synchronous_OBJECTS) $(example_synchronous_LDADD) $(LIBS)
|
||||||
|
example_tree$(EXEEXT): $(example_tree_OBJECTS) $(example_tree_DEPENDENCIES) $(EXTRA_example_tree_DEPENDENCIES)
|
||||||
|
@rm -f example_tree$(EXEEXT)
|
||||||
|
$(LINK) $(example_tree_OBJECTS) $(example_tree_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example_all_functions.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example_simple_answers.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example_synchronous.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example_tree.Po@am__quote@
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.c.lo:
|
||||||
|
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
|
||||||
|
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(PROGRAMS)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am: install-binPROGRAMS
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-binPROGRAMS
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||||
|
clean-generic clean-libtool cscopelist ctags distclean \
|
||||||
|
distclean-compile distclean-generic distclean-libtool \
|
||||||
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-binPROGRAMS install-data \
|
||||||
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
|
install-exec-am install-html install-html-am install-info \
|
||||||
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
|
install-ps install-ps-am install-strip installcheck \
|
||||||
|
installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags uninstall uninstall-am uninstall-binPROGRAMS
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
|
@ -83,3 +83,4 @@ configure.status: configure
|
||||||
|
|
||||||
.PHONY: all clean distclean
|
.PHONY: all clean distclean
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ void tstmsg_case_end();
|
||||||
/**
|
/**
|
||||||
* call to display message regarding the current test case
|
* call to display message regarding the current test case
|
||||||
* to display case end message
|
* to display case end message
|
||||||
|
* TODO: add macro to automatically output source file line
|
||||||
*/
|
*/
|
||||||
void tstmsg_case_msg(char *msg);
|
void tstmsg_case_msg(char *msg);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,319 @@
|
||||||
|
|
||||||
#define TSTMSGBUF 80
|
#define TSTMSGBUF 80
|
||||||
|
|
||||||
|
/*---------------------------------------- tst_bindatasetget */
|
||||||
|
/**
|
||||||
|
* test the bindata get and set routines
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
tst_bindatasetget(void)
|
||||||
|
{
|
||||||
|
char msg[TSTMSGBUF];
|
||||||
|
char key[20];
|
||||||
|
getdns_return_t retval;
|
||||||
|
struct getdns_dict *dict = NULL;
|
||||||
|
struct getdns_bindata *ans_bdata;
|
||||||
|
struct getdns_bindata *bindata;
|
||||||
|
|
||||||
|
tstmsg_case_begin("tst_bindatasetget");
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
/* test int get function against empty dict and with bogus params */
|
||||||
|
|
||||||
|
strcpy(key, "foo");
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_bindata() empty dict");
|
||||||
|
retval = getdns_dict_get_bindata(NULL, key, &ans_bdata);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
retval = getdns_dict_get_bindata(dict, key, NULL);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_bindata(dict, key, NULL),retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_bindata(dict, NULL, &ans_bindata)");
|
||||||
|
retval = getdns_dict_get_bindata(dict, NULL, &ans_bdata);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_bindata,retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_bindata(dict, key, &ans_bdata)");
|
||||||
|
retval = getdns_dict_get_bindata(dict, key, &ans_bdata);
|
||||||
|
sprintf(msg, "line %d: getdns_list_get_bindata,retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
|
/* TODO: test getdns_dict_set functions with bogus params */
|
||||||
|
|
||||||
|
/* test set and get legitimate use case */
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
strcpy(key, "foo");
|
||||||
|
bindata = (struct getdns_bindata *) malloc(sizeof(struct getdns_bindata));
|
||||||
|
bindata->size = strlen("foobar") + 1;
|
||||||
|
bindata->data = (void *) strdup("foobar");
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_set_bindata(dict, key, bindata)");
|
||||||
|
retval = getdns_dict_set_bindata(dict, key, bindata);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_set_bindata,retval=%d,key=%s", __LINE__, retval, key);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_bindata(dict, key, &ans_bdata)");
|
||||||
|
retval = getdns_dict_get_bindata(dict, key, &ans_bdata);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_bindata,retval=%d,key=%s,data=%s", __LINE__, retval, key, ans_bdata->data);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
free(bindata->data);
|
||||||
|
free(bindata);
|
||||||
|
|
||||||
|
tstmsg_case_end();
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* tst_bindatasetget */
|
||||||
|
|
||||||
|
/*---------------------------------------- tst_dictsetget */
|
||||||
|
/**
|
||||||
|
* test the dict get and set routines
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
tst_dictsetget(void)
|
||||||
|
{
|
||||||
|
char msg[TSTMSGBUF];
|
||||||
|
char key[20];
|
||||||
|
uint32_t int1;
|
||||||
|
uint32_t int2;
|
||||||
|
getdns_return_t retval;
|
||||||
|
struct getdns_dict *newdict;
|
||||||
|
struct getdns_dict *ansdict;
|
||||||
|
struct getdns_dict *dict = NULL;
|
||||||
|
|
||||||
|
tstmsg_case_begin("tst_dictsetget");
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
/* test get function against empty list and with bogus params */
|
||||||
|
|
||||||
|
strcpy(key, "foo");
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_dict() empty dict");
|
||||||
|
retval = getdns_dict_get_dict(NULL, key, &ansdict);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_dict(NULL, key, &ansdict),retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
retval = getdns_dict_get_dict(dict, key, NULL);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_dict(dict, key, NULL),retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_dict(dict, NULL, &ansdict)");
|
||||||
|
retval = getdns_dict_get_dict(dict, NULL, &ansdict);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_dict,retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_dict(dict, key, &ansdict)");
|
||||||
|
retval = getdns_dict_get_dict(dict, key, &ansdict);
|
||||||
|
sprintf(msg, "line %d: getdns_list_get_dict,retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
|
/* TODO: test getdns_dict_set functions with bogus params */
|
||||||
|
|
||||||
|
/* test set and get legitimate use case */
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
strcpy(key, "foo");
|
||||||
|
newdict = getdns_dict_create();
|
||||||
|
getdns_dict_set_int(newdict, "foo", 42);
|
||||||
|
getdns_dict_set_int(newdict, "bar", 52);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_set_dict(dict, key, newdict)");
|
||||||
|
retval = getdns_dict_set_dict(dict, key, newdict);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_set_dict,retval=%d,key=%s", __LINE__, retval, key);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
getdns_dict_destroy(newdict);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_dict(dict, key, &ansdict)");
|
||||||
|
retval = getdns_dict_get_dict(dict, key, &ansdict);
|
||||||
|
getdns_dict_get_int(ansdict, "foo", &int1);
|
||||||
|
getdns_dict_get_int(ansdict, "bar", &int2);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_dict,retval=%d,key=%s,int1=%d,int2=%d"
|
||||||
|
, __LINE__, retval, key, int1, int2);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
|
tstmsg_case_end();
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* tst_dictsetget */
|
||||||
|
|
||||||
|
/*---------------------------------------- tst_getnames */
|
||||||
|
/**
|
||||||
|
* exercise the getdns_dict_get_names function
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
tst_getnames(void)
|
||||||
|
{
|
||||||
|
size_t index;
|
||||||
|
size_t llen;
|
||||||
|
uint32_t ansint;
|
||||||
|
int i;
|
||||||
|
getdns_return_t result;
|
||||||
|
getdns_data_type dtype;
|
||||||
|
struct getdns_dict *dict = NULL;
|
||||||
|
struct getdns_list *list = NULL;
|
||||||
|
|
||||||
|
tstmsg_case_begin("tst_getnames");
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
/* degenerative use cases */
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_names(NULL, &list)");
|
||||||
|
getdns_dict_get_names(NULL, &list);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_names(dict, NULL)");
|
||||||
|
getdns_dict_get_names(dict, NULL);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_names(dict, &list), empty dictionary");
|
||||||
|
getdns_dict_get_names(dict, &list);
|
||||||
|
|
||||||
|
/* legit use case, add items out of order to exercise tree */
|
||||||
|
/* TODO: add elements of type dict, bindata, list to the dict */
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
getdns_dict_set_int(dict, "foo", i++);
|
||||||
|
getdns_dict_set_int(dict, "bar", i++);
|
||||||
|
getdns_dict_set_int(dict, "quz", i++);
|
||||||
|
getdns_dict_set_int(dict, "alpha", i++);
|
||||||
|
|
||||||
|
getdns_dict_get_names(dict, &list);
|
||||||
|
|
||||||
|
result = getdns_list_get_length(list, &llen);
|
||||||
|
if(llen != i)
|
||||||
|
{
|
||||||
|
tstmsg_case_msg("getdns_list_get_length returned unreasonable length, exiting");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(index=0; index<llen; index++)
|
||||||
|
{
|
||||||
|
getdns_list_get_data_type(list, index, &dtype);
|
||||||
|
printf(" list item %d: ", (int) index);
|
||||||
|
switch(dtype)
|
||||||
|
{
|
||||||
|
case t_bindata:
|
||||||
|
printf("NOTIMPLEMENTED");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_dict:
|
||||||
|
printf("NOTIMPLEMENTED");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_int:
|
||||||
|
getdns_list_get_int(list, index, &ansint);
|
||||||
|
printf("t_int, value=%d\n", ansint);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_invalid:
|
||||||
|
printf("data type invalid");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case t_list:
|
||||||
|
printf("NOTIMPLEMENTED");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
|
tstmsg_case_end();
|
||||||
|
} /* tst_getnames */
|
||||||
|
|
||||||
|
/*---------------------------------------- tst_listsetget */
|
||||||
|
/**
|
||||||
|
* test the list get and set routines
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
tst_listsetget(void)
|
||||||
|
{
|
||||||
|
char msg[TSTMSGBUF];
|
||||||
|
char key[20];
|
||||||
|
size_t index;
|
||||||
|
uint32_t int1;
|
||||||
|
uint32_t int2;
|
||||||
|
getdns_return_t retval;
|
||||||
|
struct getdns_list *newlist;
|
||||||
|
struct getdns_list *anslist;
|
||||||
|
struct getdns_dict *dict = NULL;
|
||||||
|
|
||||||
|
tstmsg_case_begin("tst_listsetget");
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
/* test get function against empty list and with bogus params */
|
||||||
|
|
||||||
|
strcpy(key, "foo");
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_list() empty dict");
|
||||||
|
retval = getdns_dict_get_list(NULL, key, &anslist);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_list(NULL, key, &anslist),retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
retval = getdns_dict_get_list(dict, key, NULL);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_list(dict, key, NULL),retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_list(dict, NULL, &anslist)");
|
||||||
|
retval = getdns_dict_get_list(dict, NULL, &anslist);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_list,retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_list(dict, key, &anslist)");
|
||||||
|
retval = getdns_dict_get_list(dict, key, &anslist);
|
||||||
|
sprintf(msg, "line %d: getdns_list_get_list,retval = %d", __LINE__, retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
|
/* TODO: test getdns_dict_set functions with bogus params */
|
||||||
|
|
||||||
|
/* test set and get legitimate use case */
|
||||||
|
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
strcpy(key, "foo");
|
||||||
|
newlist = getdns_list_create();
|
||||||
|
getdns_list_add_item(newlist, &index);
|
||||||
|
getdns_list_set_int(newlist, index, 42);
|
||||||
|
getdns_list_add_item(newlist, &index);
|
||||||
|
getdns_list_set_int(newlist, index, 52);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_set_list(dict, key, newlist)");
|
||||||
|
retval = getdns_dict_set_list(dict, key, newlist);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_set_list,retval=%d,key=%s", __LINE__, retval, key);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
getdns_list_destroy(newlist);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_list(dict, key, &anslist)");
|
||||||
|
retval = getdns_dict_get_list(dict, key, &anslist);
|
||||||
|
getdns_list_get_int(anslist, 0, &int1);
|
||||||
|
getdns_list_get_int(anslist, 1, &int2);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_list,retval=%d,key=%s,int1=%d,int2=%d"
|
||||||
|
, __LINE__, retval, key, int1, int2);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
|
tstmsg_case_end();
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* tst_listsetget */
|
||||||
|
|
||||||
/*---------------------------------------- tst_intsetget */
|
/*---------------------------------------- tst_intsetget */
|
||||||
/**
|
/**
|
||||||
* test the int get and set routines
|
* test the int get and set routines
|
||||||
|
@ -47,6 +360,7 @@ tst_intsetget(void)
|
||||||
uint32_t newint;
|
uint32_t newint;
|
||||||
getdns_return_t retval;
|
getdns_return_t retval;
|
||||||
struct getdns_dict *dict = NULL;
|
struct getdns_dict *dict = NULL;
|
||||||
|
getdns_data_type dtype;
|
||||||
|
|
||||||
tstmsg_case_begin("tst_intsetget");
|
tstmsg_case_begin("tst_intsetget");
|
||||||
|
|
||||||
|
@ -108,6 +422,11 @@ tst_intsetget(void)
|
||||||
sprintf(msg, "line %d: getdns_dict_get_int,retval=%d,key=%s,int=%d", __LINE__, retval, key, ans_int);
|
sprintf(msg, "line %d: getdns_dict_get_int,retval=%d,key=%s,int=%d", __LINE__, retval, key, ans_int);
|
||||||
tstmsg_case_msg(msg);
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_get_data_type(dict, key, &dtype)");
|
||||||
|
retval = getdns_dict_get_data_type(dict, key, &dtype);
|
||||||
|
sprintf(msg, "line %d: getdns_dict_get_data_type,retval=%d,key=%s,dtype=%d", __LINE__, retval, key, dtype);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
getdns_dict_destroy(dict);
|
getdns_dict_destroy(dict);
|
||||||
|
|
||||||
tstmsg_case_end();
|
tstmsg_case_end();
|
||||||
|
@ -115,6 +434,52 @@ tst_intsetget(void)
|
||||||
return;
|
return;
|
||||||
} /* tst_intsetget */
|
} /* tst_intsetget */
|
||||||
|
|
||||||
|
/*---------------------------------------- tst_copy */
|
||||||
|
/**
|
||||||
|
* test the copy and pretty print functions
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
tst_copy(void)
|
||||||
|
{
|
||||||
|
char *dictstr = NULL;
|
||||||
|
struct getdns_dict *dict1 = NULL;
|
||||||
|
struct getdns_dict *dict2 = NULL;
|
||||||
|
|
||||||
|
tstmsg_case_begin("tst_copy");
|
||||||
|
|
||||||
|
tstmsg_case_msg("empty list cases");
|
||||||
|
|
||||||
|
getdns_dict_copy(NULL, NULL);
|
||||||
|
dict1 = getdns_dict_create();
|
||||||
|
getdns_dict_copy(dict1, &dict2);
|
||||||
|
getdns_dict_copy(NULL, &dict1);
|
||||||
|
|
||||||
|
tstmsg_case_msg("dict1 populate");
|
||||||
|
|
||||||
|
getdns_dict_set_int(dict1, "foo", 42);
|
||||||
|
getdns_dict_set_int(dict1, "bar", 52);
|
||||||
|
getdns_dict_set_int(dict1, "quz", 62);
|
||||||
|
|
||||||
|
dictstr = getdns_pretty_print_dict(dict1);
|
||||||
|
printf("%s", dictstr);
|
||||||
|
free(dictstr);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_dict_copy(dict1, &dict2)");
|
||||||
|
|
||||||
|
getdns_dict_copy(dict1, &dict2);
|
||||||
|
|
||||||
|
dictstr = getdns_pretty_print_dict(dict2);
|
||||||
|
printf("%s", dictstr);
|
||||||
|
free(dictstr);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict1);
|
||||||
|
getdns_dict_destroy(dict2);
|
||||||
|
|
||||||
|
tstmsg_case_end();
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* tst_copy */
|
||||||
|
|
||||||
/*---------------------------------------- tst_create */
|
/*---------------------------------------- tst_create */
|
||||||
/**
|
/**
|
||||||
* test the create, destroy and allocation functions
|
* test the create, destroy and allocation functions
|
||||||
|
@ -156,15 +521,20 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
tst_create();
|
tst_create();
|
||||||
|
|
||||||
tst_intsetget();
|
|
||||||
|
|
||||||
/*
|
|
||||||
tst_listsetget();
|
|
||||||
|
|
||||||
tst_bindatasetget();
|
tst_bindatasetget();
|
||||||
|
|
||||||
|
tst_dictsetget();
|
||||||
|
|
||||||
|
tst_intsetget();
|
||||||
|
|
||||||
|
tst_listsetget();
|
||||||
|
|
||||||
|
tst_getnames();
|
||||||
|
|
||||||
|
tst_copy();
|
||||||
|
|
||||||
tstmsg_prog_end();
|
tstmsg_prog_end();
|
||||||
*/
|
|
||||||
return 0;
|
return 0;
|
||||||
} /* main */
|
} /* main */
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
TESTPROG tests_dict START
|
||||||
|
TESTCASE tests_dict:tst_create BEGIN
|
||||||
|
tests_dict:tst_create: getdns_dict_create
|
||||||
|
tests_dict:tst_create: getdns_dict_destroy(dict)
|
||||||
|
tests_dict:tst_create: getdns_dict_destroy(NULL)
|
||||||
|
TESTCASE tests_dict:tst_create END
|
||||||
|
TESTCASE tests_dict:tst_bindatasetget BEGIN
|
||||||
|
tests_dict:tst_bindatasetget: getdns_dict_get_bindata() empty dict
|
||||||
|
tests_dict:tst_bindatasetget: line 61: getdns_dict_get_bindata(NULL, key, &ans_bdata),retval = 305
|
||||||
|
tests_dict:tst_bindatasetget: line 65: getdns_dict_get_bindata(dict, key, NULL),retval = 305
|
||||||
|
tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, NULL, &ans_bindata)
|
||||||
|
tests_dict:tst_bindatasetget: line 70: getdns_dict_get_bindata,retval = 305
|
||||||
|
tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, key, &ans_bdata)
|
||||||
|
tests_dict:tst_bindatasetget: line 75: getdns_list_get_bindata,retval = 305
|
||||||
|
tests_dict:tst_bindatasetget: getdns_dict_set_bindata(dict, key, bindata)
|
||||||
|
tests_dict:tst_bindatasetget: line 93: getdns_dict_set_bindata,retval=0,key=foo
|
||||||
|
tests_dict:tst_bindatasetget: getdns_dict_get_bindata(dict, key, &ans_bdata)
|
||||||
|
tests_dict:tst_bindatasetget: line 98: getdns_dict_get_bindata,retval=0,key=foo,data=foobar
|
||||||
|
TESTCASE tests_dict:tst_bindatasetget END
|
||||||
|
TESTCASE tests_dict:tst_dictsetget BEGIN
|
||||||
|
tests_dict:tst_dictsetget: getdns_dict_get_dict() empty dict
|
||||||
|
tests_dict:tst_dictsetget: line 136: getdns_dict_get_dict(NULL, key, &ansdict),retval = 305
|
||||||
|
tests_dict:tst_dictsetget: line 140: getdns_dict_get_dict(dict, key, NULL),retval = 305
|
||||||
|
tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, NULL, &ansdict)
|
||||||
|
tests_dict:tst_dictsetget: line 145: getdns_dict_get_dict,retval = 305
|
||||||
|
tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, key, &ansdict)
|
||||||
|
tests_dict:tst_dictsetget: line 150: getdns_list_get_dict,retval = 305
|
||||||
|
tests_dict:tst_dictsetget: getdns_dict_set_dict(dict, key, newdict)
|
||||||
|
tests_dict:tst_dictsetget: line 168: getdns_dict_set_dict,retval=0,key=foo
|
||||||
|
tests_dict:tst_dictsetget: getdns_dict_get_dict(dict, key, &ansdict)
|
||||||
|
tests_dict:tst_dictsetget: line 177: getdns_dict_get_dict,retval=0,key=foo,int1=42,int2=52
|
||||||
|
TESTCASE tests_dict:tst_dictsetget END
|
||||||
|
TESTCASE tests_dict:tst_intsetget BEGIN
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_get_int() empty dict
|
||||||
|
tests_dict:tst_intsetget: line 375: getdns_dict_get_int(NULL, key, &ans_int),retval = 305
|
||||||
|
tests_dict:tst_intsetget: line 379: getdns_dict_get_int(dict, key, NULL),retval = 305
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_get_int(dict, NULL, &ans_int)
|
||||||
|
tests_dict:tst_intsetget: line 384: getdns_dict_get_int,retval = 305
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int)
|
||||||
|
tests_dict:tst_intsetget: line 389: getdns_list_get_int,retval = 305
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_set_int(dict, key, newint)
|
||||||
|
tests_dict:tst_intsetget: line 405: getdns_dict_set_int,retval=0,key=foo,int=42
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int)
|
||||||
|
tests_dict:tst_intsetget: line 410: getdns_dict_get_int,retval=0,key=foo,int=42
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_set_int(dict, key, newint)
|
||||||
|
tests_dict:tst_intsetget: line 417: getdns_dict_set_int,retval=0,key=bar,int=52
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_get_int(dict, key, &ans_int)
|
||||||
|
tests_dict:tst_intsetget: line 422: getdns_dict_get_int,retval=0,key=bar,int=52
|
||||||
|
tests_dict:tst_intsetget: getdns_dict_get_data_type(dict, key, &dtype)
|
||||||
|
tests_dict:tst_intsetget: line 427: getdns_dict_get_data_type,retval=0,key=bar,dtype=2
|
||||||
|
TESTCASE tests_dict:tst_intsetget END
|
||||||
|
TESTCASE tests_dict:tst_listsetget BEGIN
|
||||||
|
tests_dict:tst_listsetget: getdns_dict_get_list() empty dict
|
||||||
|
tests_dict:tst_listsetget: line 297: getdns_dict_get_list(NULL, key, &anslist),retval = 305
|
||||||
|
tests_dict:tst_listsetget: line 301: getdns_dict_get_list(dict, key, NULL),retval = 305
|
||||||
|
tests_dict:tst_listsetget: getdns_dict_get_list(dict, NULL, &anslist)
|
||||||
|
tests_dict:tst_listsetget: line 306: getdns_dict_get_list,retval = 305
|
||||||
|
tests_dict:tst_listsetget: getdns_dict_get_list(dict, key, &anslist)
|
||||||
|
tests_dict:tst_listsetget: line 311: getdns_list_get_list,retval = 305
|
||||||
|
tests_dict:tst_listsetget: getdns_dict_set_list(dict, key, newlist)
|
||||||
|
tests_dict:tst_listsetget: line 331: getdns_dict_set_list,retval=0,key=foo
|
||||||
|
tests_dict:tst_listsetget: getdns_dict_get_list(dict, key, &anslist)
|
||||||
|
tests_dict:tst_listsetget: line 340: getdns_dict_get_list,retval=0,key=foo,int1=42,int2=52
|
||||||
|
TESTCASE tests_dict:tst_listsetget END
|
||||||
|
TESTCASE tests_dict:tst_getnames BEGIN
|
||||||
|
tests_dict:tst_getnames: getdns_dict_get_names(NULL, &list)
|
||||||
|
tests_dict:tst_getnames: getdns_dict_get_names(dict, NULL)
|
||||||
|
tests_dict:tst_getnames: getdns_dict_get_names(dict, &list), empty dictionary
|
||||||
|
list item 0: t_int, value=3
|
||||||
|
list item 1: t_int, value=1
|
||||||
|
list item 2: t_int, value=0
|
||||||
|
list item 3: t_int, value=2
|
||||||
|
TESTCASE tests_dict:tst_getnames END
|
||||||
|
TESTCASE tests_dict:tst_copy BEGIN
|
||||||
|
tests_dict:tst_copy: empty list cases
|
||||||
|
tests_dict:tst_copy: dict1 populate
|
||||||
|
key="bar", type="int", value="52"
|
||||||
|
key="foo", type="int", value="42"
|
||||||
|
key="quz", type="int", value="62"
|
||||||
|
tests_dict:tst_copy: getdns_dict_copy(dict1, &dict2)
|
||||||
|
key="bar", type="int", value="52"
|
||||||
|
key="foo", type="int", value="42"
|
||||||
|
key="quz", type="int", value="62"
|
||||||
|
TESTCASE tests_dict:tst_copy END
|
||||||
|
TESTPROG tests_dict END
|
|
@ -34,6 +34,9 @@
|
||||||
|
|
||||||
#define TSTMSGBUF 80
|
#define TSTMSGBUF 80
|
||||||
|
|
||||||
|
/* TODO: might want a separate unit test for getdns_list_copy() - right now the code gets
|
||||||
|
covered as a result of other tests */
|
||||||
|
|
||||||
/*---------------------------------------- tst_bindatasetget */
|
/*---------------------------------------- tst_bindatasetget */
|
||||||
/**
|
/**
|
||||||
* test the list get and set routines
|
* test the list get and set routines
|
||||||
|
@ -112,6 +115,82 @@ tst_bindatasetget(void)
|
||||||
return;
|
return;
|
||||||
} /* tst_bindatasetget */
|
} /* tst_bindatasetget */
|
||||||
|
|
||||||
|
/*---------------------------------------- tst_dictsetget */
|
||||||
|
/**
|
||||||
|
* test the dict get and set routines
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
tst_dictsetget(void)
|
||||||
|
{
|
||||||
|
char msg[TSTMSGBUF];
|
||||||
|
size_t index;
|
||||||
|
uint32_t ans_int;
|
||||||
|
getdns_return_t retval;
|
||||||
|
struct getdns_list *list = NULL;
|
||||||
|
struct getdns_dict *dict = NULL;
|
||||||
|
struct getdns_dict *ansdict = NULL;
|
||||||
|
|
||||||
|
tstmsg_case_begin("tst_dictsetget");
|
||||||
|
|
||||||
|
list = getdns_list_create();
|
||||||
|
dict = getdns_dict_create();
|
||||||
|
|
||||||
|
/* test dict get function against empty list and with bogus params */
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_list_get_dict() empty list");
|
||||||
|
retval = getdns_list_get_dict(NULL, index, &dict);
|
||||||
|
sprintf(msg, "getdns_list_get_dict(NULL, index, &dict),retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
retval = getdns_list_get_dict(list, index, NULL);
|
||||||
|
sprintf(msg, "getdns_list_get_dict(list, index, NULL),retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_list_get_dict(list, 0, &dict)");
|
||||||
|
retval = getdns_list_get_dict(list, 0, &dict);
|
||||||
|
sprintf(msg, "getdns_list_get_dict,retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_list_get_dict(list, 1, &dict)");
|
||||||
|
retval = getdns_list_get_dict(list, 1, &dict);
|
||||||
|
sprintf(msg, "getdns_list_get_dict,retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
/* test int set function against empty list with bogus params */
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_list_set_dict() empty list");
|
||||||
|
retval = getdns_list_set_dict(NULL, index, dict);
|
||||||
|
sprintf(msg, "getdns_list_set_dict(NULL, index, dict),retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_list_set_dict(list, 0, dict)");
|
||||||
|
retval = getdns_list_set_dict(list, 0, dict);
|
||||||
|
sprintf(msg, "getdns_list_set_dict,retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
tstmsg_case_msg("getdns_list_set_dict(list, 1, dict)");
|
||||||
|
retval = getdns_list_set_dict(list, 1, dict);
|
||||||
|
sprintf(msg, "getdns_list_set_dict,retval = %d", retval);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
/* test set and get legitimate use case */
|
||||||
|
|
||||||
|
getdns_dict_set_int(dict, "foo", 42);
|
||||||
|
getdns_list_add_item(list, &index);
|
||||||
|
getdns_list_set_dict(list, index, dict);
|
||||||
|
retval = getdns_list_get_dict(list, index, &ansdict);
|
||||||
|
getdns_dict_get_int(ansdict, "foo", &ans_int);
|
||||||
|
sprintf(msg, "getdns_list_set/get_dict,retval=%d, ans=%d", retval, ans_int);
|
||||||
|
tstmsg_case_msg(msg);
|
||||||
|
|
||||||
|
getdns_dict_destroy(dict);
|
||||||
|
getdns_list_destroy(list);
|
||||||
|
|
||||||
|
tstmsg_case_end();
|
||||||
|
|
||||||
|
return;
|
||||||
|
} /* tst_dictsetget */
|
||||||
|
|
||||||
/*---------------------------------------- tst_listsetget */
|
/*---------------------------------------- tst_listsetget */
|
||||||
/**
|
/**
|
||||||
* test the list get and set routines
|
* test the list get and set routines
|
||||||
|
@ -347,12 +426,14 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
tst_create();
|
tst_create();
|
||||||
|
|
||||||
|
tst_bindatasetget();
|
||||||
|
|
||||||
|
tst_dictsetget();
|
||||||
|
|
||||||
tst_intsetget();
|
tst_intsetget();
|
||||||
|
|
||||||
tst_listsetget();
|
tst_listsetget();
|
||||||
|
|
||||||
tst_bindatasetget();
|
|
||||||
|
|
||||||
tstmsg_prog_end();
|
tstmsg_prog_end();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -11,6 +11,38 @@ TESTCASE tests_list:tst_create BEGIN
|
||||||
tests_list:tst_create: NUll, NULL, retval = 304
|
tests_list:tst_create: NUll, NULL, retval = 304
|
||||||
tests_list:tst_create: list, NULL, retval = 304
|
tests_list:tst_create: list, NULL, retval = 304
|
||||||
TESTCASE tests_list:tst_create END
|
TESTCASE tests_list:tst_create END
|
||||||
|
TESTCASE tests_list:tst_bindatasetget BEGIN
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata() empty list
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata(NULL, index, &ans_bindata),retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata(list, index, NULL),retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata(list, 0, &ans_bindata)
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata,retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata(list, 1, &ans_bindata)
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_get_bindata,retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set_bindata() empty list
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set_bindata(NULL, index, ans_bindata),retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set_bindata(list, 0, ans_bindata)
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set_bindata,retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set_bindata(list, 1, ans_bindata)
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set_bindata,retval = 304
|
||||||
|
tests_list:tst_bindatasetget: getdns_list_set/get_bindata,retval = 0, bindata->data = 7,foobar
|
||||||
|
TESTCASE tests_list:tst_bindatasetget END
|
||||||
|
TESTCASE tests_list:tst_dictsetget BEGIN
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict() empty list
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict(NULL, index, &dict),retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict(list, index, NULL),retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict(list, 0, &dict)
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict,retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict(list, 1, &dict)
|
||||||
|
tests_list:tst_dictsetget: getdns_list_get_dict,retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set_dict() empty list
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set_dict(NULL, index, dict),retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set_dict(list, 0, dict)
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set_dict,retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set_dict(list, 1, dict)
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set_dict,retval = 304
|
||||||
|
tests_list:tst_dictsetget: getdns_list_set/get_dict,retval=0, ans=42
|
||||||
|
TESTCASE tests_list:tst_dictsetget END
|
||||||
TESTCASE tests_list:tst_intsetget BEGIN
|
TESTCASE tests_list:tst_intsetget BEGIN
|
||||||
tests_list:tst_intsetget: getdns_list_get_int() empty list
|
tests_list:tst_intsetget: getdns_list_get_int() empty list
|
||||||
tests_list:tst_intsetget: getdns_list_get_int(NULL, index, &ans_int),retval = 304
|
tests_list:tst_intsetget: getdns_list_get_int(NULL, index, &ans_int),retval = 304
|
||||||
|
@ -33,7 +65,7 @@ TESTCASE tests_list:tst_listsetget BEGIN
|
||||||
tests_list:tst_listsetget: getdns_list_get_list(list, index, NULL),retval = 304
|
tests_list:tst_listsetget: getdns_list_get_list(list, index, NULL),retval = 304
|
||||||
tests_list:tst_listsetget: getdns_list_get_list(list, 0, &ans_list)
|
tests_list:tst_listsetget: getdns_list_get_list(list, 0, &ans_list)
|
||||||
tests_list:tst_listsetget: getdns_list_get_list,retval = 304
|
tests_list:tst_listsetget: getdns_list_get_list,retval = 304
|
||||||
tests_list:tst_listsetget: getdns_list_get_int(list, 1, &ans_list)
|
tests_list:tst_listsetget: getdns_list_get_list(list, 1, &ans_list)
|
||||||
tests_list:tst_listsetget: getdns_list_get_list,retval = 304
|
tests_list:tst_listsetget: getdns_list_get_list,retval = 304
|
||||||
tests_list:tst_listsetget: getdns_list_set_list() empty list
|
tests_list:tst_listsetget: getdns_list_set_list() empty list
|
||||||
tests_list:tst_listsetget: getdns_list_set_list(NULL, index, ans_list),retval = 304
|
tests_list:tst_listsetget: getdns_list_set_list(NULL, index, ans_list),retval = 304
|
||||||
|
|
Loading…
Reference in New Issue