netcf-0.2.8/ 0000755 0000000 0000000 00000000000 12511256403 007566 5 0000000 0000000 netcf-0.2.8/GNUmakefile 0000644 0000000 0000000 00000010735 12502614043 011564 0000000 0000000 # Having a separate GNUmakefile lets me 'include' the dynamically
# generated rules created via cfg.mk (package-local configuration)
# as well as maint.mk (generic maintainer rules).
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
# Copyright (C) 2001, 2003, 2006-2015 Free Software Foundation, Inc.
# 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 3 of the License, 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 .
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
_gl-Makefile := $(wildcard [M]akefile)
ifneq ($(_gl-Makefile),)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
# Allow the user to add to this in the Makefile.
ALL_RECURSIVE_TARGETS =
include Makefile
# Some projects override e.g., _autoreconf here.
-include $(srcdir)/cfg.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
include $(srcdir)/maint.mk
# Ensure that $(VERSION) is up to date for dist-related targets, but not
# for others: rerunning autoreconf and recompiling everything isn't cheap.
_have-git-version-gen := \
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
_is-dist-target ?= $(filter-out %clean, \
$(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
ifneq (,$(_is-dist-target)$(_is-install-target))
_curr-ver := $(shell cd $(srcdir) \
&& $(_build-aux)/git-version-gen \
.tarball-version \
$(git-version-gen-tag-sed-script))
ifneq ($(_curr-ver),$(VERSION))
ifeq ($(_curr-ver),UNKNOWN)
$(info WARNING: unable to verify if $(VERSION) is the correct version)
else
ifneq (,$(_is-install-target))
# GNU Coding Standards state that 'make install' should not cause
# recompilation after 'make all'. But as long as changing the version
# string alters config.h, the cost of having 'make all' always have an
# up-to-date version is prohibitive. So, as a compromise, we merely
# warn when installing a version string that is out of date; the user
# should run 'autoreconf' (or something like 'make distcheck') to
# fix the version, 'make all' to propagate it, then 'make install'.
$(info WARNING: version string $(VERSION) is out of date;)
$(info run '$(MAKE) _version' to fix it)
else
$(info INFO: running autoreconf for new version string: $(_curr-ver))
GNUmakefile: _version
touch GNUmakefile
endif
endif
endif
endif
endif
.PHONY: _version
_version:
cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
$(MAKE) $(AM_MAKEFLAGS) Makefile
else
.DEFAULT_GOAL := abort-due-to-no-makefile
srcdir = .
# The package can override .DEFAULT_GOAL to run actions like autoreconf.
-include ./cfg.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
include ./maint.mk
ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
$(MAKECMDGOALS): abort-due-to-no-makefile
endif
abort-due-to-no-makefile:
@echo There seems to be no Makefile in this directory. 1>&2
@echo "You must run ./configure before running 'make'." 1>&2
@exit 1
endif
# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel, in case someone tries to build multiple
# targets, and one of them can cause a recursive target to be invoked.
# Only set this if Automake doesn't provide it.
AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) \
dist distcheck tags ctags
ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
ifneq ($(word 2, $(MAKECMDGOALS)), )
ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
.NOTPARALLEL:
endif
endif
netcf-0.2.8/config.h.in 0000644 0000000 0000000 00000160046 12511253706 011543 0000000 0000000 /* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* define to 1 if the libnl3 header netlink/route/link.h already includes
linux/if.h (which will conflict with net/if.h) */
#undef AVOID_NET_IF_H
/* Define to the number of bits in type 'ptrdiff_t'. */
#undef BITSIZEOF_PTRDIFF_T
/* Define to the number of bits in type 'sig_atomic_t'. */
#undef BITSIZEOF_SIG_ATOMIC_T
/* Define to the number of bits in type 'size_t'. */
#undef BITSIZEOF_SIZE_T
/* Define to the number of bits in type 'wchar_t'. */
#undef BITSIZEOF_WCHAR_T
/* Define to the number of bits in type 'wint_t'. */
#undef BITSIZEOF_WINT_T
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define as the bit index in the word where to find bit 0 of the exponent of
'double'. */
#undef DBL_EXPBIT0_BIT
/* Define as the word index where to find the exponent of 'double'. */
#undef DBL_EXPBIT0_WORD
/* Define to 1 if the system's ftello function has the Solaris bug. */
#undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE
/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
#undef FUNC_UNGETC_BROKEN
/* Define if gettimeofday clobbers the localtime buffer. */
#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
/* Define this to 'void' or 'struct timezone' to match the system's
declaration of the second argument to gettimeofday. */
#undef GETTIMEOFDAY_TIMEZONE
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module fscanf shall be considered present. */
#undef GNULIB_FSCANF
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module lock shall be considered present. */
#undef GNULIB_LOCK
/* Define to 1 if printf and friends should be labeled with attribute
"__gnu_printf__" instead of "__printf__" */
#undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module pthread shall be considered present. */
#undef GNULIB_PTHREAD
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module scanf shall be considered present. */
#undef GNULIB_SCANF
/* Define to 1 when the gnulib module close should be tested. */
#undef GNULIB_TEST_CLOSE
/* Define to 1 when the gnulib module dup should be tested. */
#undef GNULIB_TEST_DUP
/* Define to 1 when the gnulib module dup2 should be tested. */
#undef GNULIB_TEST_DUP2
/* Define to 1 when the gnulib module environ should be tested. */
#undef GNULIB_TEST_ENVIRON
/* Define to 1 when the gnulib module fdopen should be tested. */
#undef GNULIB_TEST_FDOPEN
/* Define to 1 when the gnulib module fstat should be tested. */
#undef GNULIB_TEST_FSTAT
/* Define to 1 when the gnulib module ftell should be tested. */
#undef GNULIB_TEST_FTELL
/* Define to 1 when the gnulib module ftello should be tested. */
#undef GNULIB_TEST_FTELLO
/* Define to 1 when the gnulib module getcwd should be tested. */
#undef GNULIB_TEST_GETCWD
/* Define to 1 when the gnulib module getdtablesize should be tested. */
#undef GNULIB_TEST_GETDTABLESIZE
/* Define to 1 when the gnulib module getpagesize should be tested. */
#undef GNULIB_TEST_GETPAGESIZE
/* Define to 1 when the gnulib module gettimeofday should be tested. */
#undef GNULIB_TEST_GETTIMEOFDAY
/* Define to 1 when the gnulib module lseek should be tested. */
#undef GNULIB_TEST_LSEEK
/* Define to 1 when the gnulib module lstat should be tested. */
#undef GNULIB_TEST_LSTAT
/* Define to 1 when the gnulib module malloc-posix should be tested. */
#undef GNULIB_TEST_MALLOC_POSIX
/* Define to 1 when the gnulib module memchr should be tested. */
#undef GNULIB_TEST_MEMCHR
/* Define to 1 when the gnulib module open should be tested. */
#undef GNULIB_TEST_OPEN
/* Define to 1 when the gnulib module posix_spawnattr_destroy should be
tested. */
#undef GNULIB_TEST_POSIX_SPAWNATTR_DESTROY
/* Define to 1 when the gnulib module posix_spawnattr_init should be tested.
*/
#undef GNULIB_TEST_POSIX_SPAWNATTR_INIT
/* Define to 1 when the gnulib module posix_spawnattr_setflags should be
tested. */
#undef GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS
/* Define to 1 when the gnulib module posix_spawnattr_setsigmask should be
tested. */
#undef GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK
/* Define to 1 when the gnulib module posix_spawnp should be tested. */
#undef GNULIB_TEST_POSIX_SPAWNP
/* Define to 1 when the gnulib module posix_spawn_file_actions_addclose should
be tested. */
#undef GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
/* Define to 1 when the gnulib module posix_spawn_file_actions_adddup2 should
be tested. */
#undef GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
/* Define to 1 when the gnulib module posix_spawn_file_actions_addopen should
be tested. */
#undef GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
/* Define to 1 when the gnulib module posix_spawn_file_actions_destroy should
be tested. */
#undef GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY
/* Define to 1 when the gnulib module posix_spawn_file_actions_init should be
tested. */
#undef GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT
/* Define to 1 when the gnulib module putenv should be tested. */
#undef GNULIB_TEST_PUTENV
/* Define to 1 when the gnulib module raise should be tested. */
#undef GNULIB_TEST_RAISE
/* Define to 1 when the gnulib module rawmemchr should be tested. */
#undef GNULIB_TEST_RAWMEMCHR
/* Define to 1 when the gnulib module realloc-posix should be tested. */
#undef GNULIB_TEST_REALLOC_POSIX
/* Define to 1 when the gnulib module setenv should be tested. */
#undef GNULIB_TEST_SETENV
/* Define to 1 when the gnulib module setlocale should be tested. */
#undef GNULIB_TEST_SETLOCALE
/* Define to 1 when the gnulib module sigprocmask should be tested. */
#undef GNULIB_TEST_SIGPROCMASK
/* Define to 1 when the gnulib module sleep should be tested. */
#undef GNULIB_TEST_SLEEP
/* Define to 1 when the gnulib module socket should be tested. */
#undef GNULIB_TEST_SOCKET
/* Define to 1 when the gnulib module stat should be tested. */
#undef GNULIB_TEST_STAT
/* Define to 1 when the gnulib module strchrnul should be tested. */
#undef GNULIB_TEST_STRCHRNUL
/* Define to 1 when the gnulib module strerror_r should be tested. */
#undef GNULIB_TEST_STRERROR_R
/* Define to 1 when the gnulib module symlink should be tested. */
#undef GNULIB_TEST_SYMLINK
/* Define to 1 when the gnulib module unsetenv should be tested. */
#undef GNULIB_TEST_UNSETENV
/* Define to 1 when the gnulib module usleep should be tested. */
#undef GNULIB_TEST_USLEEP
/* Define to 1 when the gnulib module vasprintf should be tested. */
#undef GNULIB_TEST_VASPRINTF
/* Define to 1 when the gnulib module waitpid should be tested. */
#undef GNULIB_TEST_WAITPID
/* Define to 1 if you have 'alloca' after including , a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
/* Define to 1 if you have and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the header file. */
#undef HAVE_BP_SYM_H
/* Define to 1 if you have the 'catgets' function. */
#undef HAVE_CATGETS
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define to 1 if you have the `confstr' function. */
#undef HAVE_CONFSTR
/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
*/
#undef HAVE_DECL_ALARM
/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
*/
#undef HAVE_DECL_FTELLO
/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you
don't. */
#undef HAVE_DECL_GETDTABLESIZE
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#undef HAVE_DECL_GETENV
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#undef HAVE_DECL_INET_NTOP
/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
don't. */
#undef HAVE_DECL_INET_PTON
/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
*/
#undef HAVE_DECL_SETENV
/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
*/
#undef HAVE_DECL_SLEEP
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR_R
/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you
don't. */
#undef HAVE_DECL_UNSETENV
/* Define to 1 if you have the declaration of `_putenv', and to 0 if you
don't. */
#undef HAVE_DECL__PUTENV
/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
don't. */
#undef HAVE_DECL__SNPRINTF
/* Define to 1 if you have the header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
/* Define if you have the declaration of environ. */
#undef HAVE_ENVIRON_DECL
/* Define to 1 if you have the header file. */
#undef HAVE_FEATURES_H
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the 'getdtablesize' function. */
#undef HAVE_GETDTABLESIZE
/* Define to 1 if you have the header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long_only' function. */
#undef HAVE_GETOPT_LONG_ONLY
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the 'gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define if you have the 'intmax_t' type in or . */
#undef HAVE_INTMAX_T
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
/* Define if exists, doesn't clash with , and
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
/* Define to 1 if defines AF_INET. */
#undef HAVE_IPV4
/* Define to 1 if defines AF_INET6. */
#undef HAVE_IPV6
/* Define if you have and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the header file. */
#undef HAVE_LANGINFO_H
/* Define if your file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Use libnl-1 */
#undef HAVE_LIBNL
/* Use libnl-3.0 */
#undef HAVE_LIBNL3
/* Define if pthread (-lpthread) */
#undef HAVE_LIBPTHREAD
/* Define to 1 if the system has the type 'long long int'. */
#undef HAVE_LONG_LONG_INT
/* Define to 1 if you have the 'lstat' function. */
#undef HAVE_LSTAT
/* Define if the 'malloc' function is POSIX compliant. */
#undef HAVE_MALLOC_POSIX
/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
config.h and . */
#undef HAVE_MAP_ANONYMOUS
/* Define to 1 if you have the `mbrtowc' function. */
#undef HAVE_MBRTOWC
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the 'mprotect' function. */
#undef HAVE_MPROTECT
/* Define to 1 on MSVC platforms that have the "invalid parameter handler"
concept. */
#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER
/* Define to 1 if you have the header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the 'newlocale' function. */
#undef HAVE_NEWLOCALE
/* Define to 1 if you have the header file. */
#undef HAVE_OS_H
/* Define to 1 if you have the header file. */
#undef HAVE_PATHS_H
/* Define to 1 if you have the `posix_spawn' function. */
#undef HAVE_POSIX_SPAWN
/* Define to 1 if the system has the type `posix_spawnattr_t'. */
#undef HAVE_POSIX_SPAWNATTR_T
/* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */
#undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T
/* Define to 1 if you have the `pthread_atfork' function. */
#undef HAVE_PTHREAD_ATFORK
/* Define if */
#undef HAVE_PTHREAD_H
/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */
#undef HAVE_PTHREAD_MUTEX_RECURSIVE
/* Define if the POSIX multithreading library has read/write locks. */
#undef HAVE_PTHREAD_RWLOCK
/* Define to 1 if the system has the type `pthread_spinlock_t'. */
#undef HAVE_PTHREAD_SPINLOCK_T
/* Define to 1 if the system has the type `pthread_t'. */
#undef HAVE_PTHREAD_T
/* Define to 1 if you have the `raise' function. */
#undef HAVE_RAISE
/* Define to 1 if you have the `rawmemchr' function. */
#undef HAVE_RAWMEMCHR
/* Define to 1 if accept is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ACCEPT
/* Define to 1 if accept4 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ACCEPT4
/* Define to 1 if atoll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ATOLL
/* Define to 1 if bind is declared even after undefining macros. */
#undef HAVE_RAW_DECL_BIND
/* Define to 1 if btowc is declared even after undefining macros. */
#undef HAVE_RAW_DECL_BTOWC
/* Define to 1 if canonicalize_file_name is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
/* Define to 1 if chdir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CHDIR
/* Define to 1 if chown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CHOWN
/* Define to 1 if connect is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CONNECT
/* Define to 1 if dprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DPRINTF
/* Define to 1 if dup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUP
/* Define to 1 if dup2 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUP2
/* Define to 1 if dup3 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUP3
/* Define to 1 if duplocale is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DUPLOCALE
/* Define to 1 if endusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ENDUSERSHELL
/* Define to 1 if environ is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ENVIRON
/* Define to 1 if euidaccess is declared even after undefining macros. */
#undef HAVE_RAW_DECL_EUIDACCESS
/* Define to 1 if faccessat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FACCESSAT
/* Define to 1 if fchdir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCHDIR
/* Define to 1 if fchmodat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCHMODAT
/* Define to 1 if fchownat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCHOWNAT
/* Define to 1 if fcntl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FCNTL
/* Define to 1 if fdatasync is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FDATASYNC
/* Define to 1 if ffsl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FFSL
/* Define to 1 if ffsll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FFSLL
/* Define to 1 if fpurge is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FPURGE
/* Define to 1 if fseeko is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSEEKO
/* Define to 1 if fstat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSTAT
/* Define to 1 if fstatat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSTATAT
/* Define to 1 if fsync is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FSYNC
/* Define to 1 if ftello is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FTELLO
/* Define to 1 if ftruncate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FTRUNCATE
/* Define to 1 if futimens is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FUTIMENS
/* Define to 1 if getcwd is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETCWD
/* Define to 1 if getdelim is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETDELIM
/* Define to 1 if getdomainname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETDOMAINNAME
/* Define to 1 if getdtablesize is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETDTABLESIZE
/* Define to 1 if getgroups is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETGROUPS
/* Define to 1 if gethostname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETHOSTNAME
/* Define to 1 if getline is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLINE
/* Define to 1 if getloadavg is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLOADAVG
/* Define to 1 if getlogin is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLOGIN
/* Define to 1 if getlogin_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETLOGIN_R
/* Define to 1 if getpagesize is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETPAGESIZE
/* Define to 1 if getpeername is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETPEERNAME
/* Define to 1 if gets is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETS
/* Define to 1 if getsockname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSOCKNAME
/* Define to 1 if getsockopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSOCKOPT
/* Define to 1 if getsubopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETSUBOPT
/* Define to 1 if gettimeofday is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETTIMEOFDAY
/* Define to 1 if getusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GETUSERSHELL
/* Define to 1 if grantpt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GRANTPT
/* Define to 1 if group_member is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GROUP_MEMBER
/* Define to 1 if imaxabs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_IMAXABS
/* Define to 1 if imaxdiv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_IMAXDIV
/* Define to 1 if inet_ntop is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INET_NTOP
/* Define to 1 if inet_pton is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INET_PTON
/* Define to 1 if initstate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INITSTATE
/* Define to 1 if initstate_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INITSTATE_R
/* Define to 1 if ioctl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_IOCTL
/* Define to 1 if isatty is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ISATTY
/* Define to 1 if lchmod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LCHMOD
/* Define to 1 if lchown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LCHOWN
/* Define to 1 if link is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LINK
/* Define to 1 if linkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LINKAT
/* Define to 1 if listen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LISTEN
/* Define to 1 if lseek is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LSEEK
/* Define to 1 if lstat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_LSTAT
/* Define to 1 if mbrlen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBRLEN
/* Define to 1 if mbrtowc is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBRTOWC
/* Define to 1 if mbsinit is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBSINIT
/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBSNRTOWCS
/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MBSRTOWCS
/* Define to 1 if memmem is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MEMMEM
/* Define to 1 if mempcpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MEMPCPY
/* Define to 1 if memrchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MEMRCHR
/* Define to 1 if mkdirat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKDIRAT
/* Define to 1 if mkdtemp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKDTEMP
/* Define to 1 if mkfifo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKFIFO
/* Define to 1 if mkfifoat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKFIFOAT
/* Define to 1 if mknod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKNOD
/* Define to 1 if mknodat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKNODAT
/* Define to 1 if mkostemp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKOSTEMP
/* Define to 1 if mkostemps is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKOSTEMPS
/* Define to 1 if mkstemp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKSTEMP
/* Define to 1 if mkstemps is declared even after undefining macros. */
#undef HAVE_RAW_DECL_MKSTEMPS
/* Define to 1 if nl_langinfo is declared even after undefining macros. */
#undef HAVE_RAW_DECL_NL_LANGINFO
/* Define to 1 if openat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_OPENAT
/* Define to 1 if pclose is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PCLOSE
/* Define to 1 if pipe is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PIPE
/* Define to 1 if pipe2 is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PIPE2
/* Define to 1 if popen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_POPEN
/* Define to 1 if posix_openpt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_POSIX_OPENPT
/* Define to 1 if posix_spawn is declared even after undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWN
/* Define to 1 if posix_spawnattr_destroy is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY
/* Define to 1 if posix_spawnattr_getflags is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS
/* Define to 1 if posix_spawnattr_getpgroup is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP
/* Define to 1 if posix_spawnattr_getschedparam is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM
/* Define to 1 if posix_spawnattr_getschedpolicy is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY
/* Define to 1 if posix_spawnattr_getsigdefault is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT
/* Define to 1 if posix_spawnattr_getsigmask is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK
/* Define to 1 if posix_spawnattr_init is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT
/* Define to 1 if posix_spawnattr_setflags is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS
/* Define to 1 if posix_spawnattr_setpgroup is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP
/* Define to 1 if posix_spawnattr_setschedparam is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM
/* Define to 1 if posix_spawnattr_setschedpolicy is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY
/* Define to 1 if posix_spawnattr_setsigdefault is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT
/* Define to 1 if posix_spawnattr_setsigmask is declared even after undefining
macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK
/* Define to 1 if posix_spawnp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWNP
/* Define to 1 if posix_spawn_file_actions_addclose is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
/* Define to 1 if posix_spawn_file_actions_adddup2 is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
/* Define to 1 if posix_spawn_file_actions_addopen is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
/* Define to 1 if posix_spawn_file_actions_destroy is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY
/* Define to 1 if posix_spawn_file_actions_init is declared even after
undefining macros. */
#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT
/* Define to 1 if pread is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PREAD
/* Define to 1 if pthread_sigmask is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PTHREAD_SIGMASK
/* Define to 1 if ptsname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PTSNAME
/* Define to 1 if ptsname_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PTSNAME_R
/* Define to 1 if pwrite is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PWRITE
/* Define to 1 if random is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RANDOM
/* Define to 1 if random_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RANDOM_R
/* Define to 1 if rawmemchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RAWMEMCHR
/* Define to 1 if readlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_READLINK
/* Define to 1 if readlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_READLINKAT
/* Define to 1 if realpath is declared even after undefining macros. */
#undef HAVE_RAW_DECL_REALPATH
/* Define to 1 if recv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RECV
/* Define to 1 if recvfrom is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RECVFROM
/* Define to 1 if renameat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RENAMEAT
/* Define to 1 if rmdir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RMDIR
/* Define to 1 if rpmatch is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RPMATCH
/* Define to 1 if secure_getenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SECURE_GETENV
/* Define to 1 if send is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SEND
/* Define to 1 if sendto is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SENDTO
/* Define to 1 if setenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETENV
/* Define to 1 if sethostname is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETHOSTNAME
/* Define to 1 if setlocale is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETLOCALE
/* Define to 1 if setsockopt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETSOCKOPT
/* Define to 1 if setstate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETSTATE
/* Define to 1 if setstate_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETSTATE_R
/* Define to 1 if setusershell is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETUSERSHELL
/* Define to 1 if shutdown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SHUTDOWN
/* Define to 1 if sigaction is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGACTION
/* Define to 1 if sigaddset is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGADDSET
/* Define to 1 if sigdelset is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGDELSET
/* Define to 1 if sigemptyset is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGEMPTYSET
/* Define to 1 if sigfillset is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGFILLSET
/* Define to 1 if sigismember is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGISMEMBER
/* Define to 1 if sigpending is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGPENDING
/* Define to 1 if sigprocmask is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SIGPROCMASK
/* Define to 1 if sleep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SLEEP
/* Define to 1 if snprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SNPRINTF
/* Define to 1 if socket is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SOCKET
/* Define to 1 if srandom is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SRANDOM
/* Define to 1 if srandom_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SRANDOM_R
/* Define to 1 if stat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STAT
/* Define to 1 if stpcpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STPCPY
/* Define to 1 if stpncpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STPNCPY
/* Define to 1 if strcasestr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRCASESTR
/* Define to 1 if strchrnul is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRCHRNUL
/* Define to 1 if strdup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRDUP
/* Define to 1 if strerror_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRERROR_R
/* Define to 1 if strncat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRNCAT
/* Define to 1 if strndup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRNDUP
/* Define to 1 if strnlen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRNLEN
/* Define to 1 if strpbrk is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRPBRK
/* Define to 1 if strsep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRSEP
/* Define to 1 if strsignal is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRSIGNAL
/* Define to 1 if strtod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOD
/* Define to 1 if strtoimax is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOIMAX
/* Define to 1 if strtok_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOK_R
/* Define to 1 if strtoll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOLL
/* Define to 1 if strtoull is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOULL
/* Define to 1 if strtoumax is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOUMAX
/* Define to 1 if strverscmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRVERSCMP
/* Define to 1 if symlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SYMLINK
/* Define to 1 if symlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SYMLINKAT
/* Define to 1 if tmpfile is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TMPFILE
/* Define to 1 if ttyname_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_TTYNAME_R
/* Define to 1 if unlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNLINK
/* Define to 1 if unlinkat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNLINKAT
/* Define to 1 if unlockpt is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNLOCKPT
/* Define to 1 if unsetenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UNSETENV
/* Define to 1 if usleep is declared even after undefining macros. */
#undef HAVE_RAW_DECL_USLEEP
/* Define to 1 if utimensat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_UTIMENSAT
/* Define to 1 if vdprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_VDPRINTF
/* Define to 1 if vsnprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_VSNPRINTF
/* Define to 1 if waitpid is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WAITPID
/* Define to 1 if wcpcpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCPCPY
/* Define to 1 if wcpncpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCPNCPY
/* Define to 1 if wcrtomb is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCRTOMB
/* Define to 1 if wcscasecmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCASECMP
/* Define to 1 if wcscat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCAT
/* Define to 1 if wcschr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCHR
/* Define to 1 if wcscmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCMP
/* Define to 1 if wcscoll is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCOLL
/* Define to 1 if wcscpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCPY
/* Define to 1 if wcscspn is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSCSPN
/* Define to 1 if wcsdup is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSDUP
/* Define to 1 if wcslen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSLEN
/* Define to 1 if wcsncasecmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNCASECMP
/* Define to 1 if wcsncat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNCAT
/* Define to 1 if wcsncmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNCMP
/* Define to 1 if wcsncpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNCPY
/* Define to 1 if wcsnlen is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNLEN
/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSNRTOMBS
/* Define to 1 if wcspbrk is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSPBRK
/* Define to 1 if wcsrchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSRCHR
/* Define to 1 if wcsrtombs is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSRTOMBS
/* Define to 1 if wcsspn is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSSPN
/* Define to 1 if wcsstr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSSTR
/* Define to 1 if wcstok is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSTOK
/* Define to 1 if wcswidth is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSWIDTH
/* Define to 1 if wcsxfrm is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCSXFRM
/* Define to 1 if wctob is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCTOB
/* Define to 1 if wcwidth is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WCWIDTH
/* Define to 1 if wmemchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WMEMCHR
/* Define to 1 if wmemcmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WMEMCMP
/* Define to 1 if wmemcpy is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WMEMCPY
/* Define to 1 if wmemmove is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WMEMMOVE
/* Define to 1 if wmemset is declared even after undefining macros. */
#undef HAVE_RAW_DECL_WMEMSET
/* Define to 1 if _Exit is declared even after undefining macros. */
#undef HAVE_RAW_DECL__EXIT
/* Define to 1 if you have the header file. */
#undef HAVE_READLINE_READLINE_H
/* Define if the 'realloc' function is POSIX compliant. */
#undef HAVE_REALLOC_POSIX
/* Define to 1 if the system has the type `sa_family_t'. */
#undef HAVE_SA_FAMILY_T
/* Define to 1 if you have the header file. */
#undef HAVE_SCHED_H
/* Define to 1 if you have the `sched_setparam' function. */
#undef HAVE_SCHED_SETPARAM
/* Define to 1 if you have the `sched_setscheduler' function. */
#undef HAVE_SCHED_SETSCHEDULER
/* Define to 1 if you have the header file. */
#undef HAVE_SEARCH_H
/* Define to 1 if you have the `setdtablesize' function. */
#undef HAVE_SETDTABLESIZE
/* Define to 1 if you have the `setegid' function. */
#undef HAVE_SETEGID
/* Define to 1 if you have the 'setenv' function. */
#undef HAVE_SETENV
/* Define to 1 if you have the `seteuid' function. */
#undef HAVE_SETEUID
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the 'shutdown' function. */
#undef HAVE_SHUTDOWN
/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
#undef HAVE_SIGNED_SIG_ATOMIC_T
/* Define to 1 if 'wchar_t' is a signed integer type. */
#undef HAVE_SIGNED_WCHAR_T
/* Define to 1 if 'wint_t' is a signed integer type. */
#undef HAVE_SIGNED_WINT_T
/* Define to 1 if the system has the type `sigset_t'. */
#undef HAVE_SIGSET_T
/* Define to 1 if you have the 'sleep' function. */
#undef HAVE_SLEEP
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define if the return value of the snprintf function is the number of of
bytes (excluding the terminating NUL) that would have been produced if the
buffer had been large enough. */
#undef HAVE_SNPRINTF_RETVAL_C99
/* Define to 1 if you have the header file. */
#undef HAVE_SPAWN_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
/* Define if exists, doesn't clash with , and declares
uintmax_t. */
#undef HAVE_STDINT_H_WITH_UINTMAX
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchrnul' function. */
#undef HAVE_STRCHRNUL
/* Define to 1 if you have the 'strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strnlen' function. */
#undef HAVE_STRNLEN
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
#undef HAVE_STRUCT_SOCKADDR_STORAGE
/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
/* Define to 1 if you have the 'symlink' function. */
#undef HAVE_SYMLINK
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_INTTYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TIMEB_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_UIO_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the `tsearch' function. */
#undef HAVE_TSEARCH
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `unsetenv' function. */
#undef HAVE_UNSETENV
/* Define to 1 if the system has the type 'unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
/* Define to 1 if you have the `uselocale' function. */
#undef HAVE_USELOCALE
/* Define to 1 if you have the 'usleep' function. */
#undef HAVE_USLEEP
/* Define to 1 if you have the 'vasnprintf' function. */
#undef HAVE_VASNPRINTF
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
/* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK
/* Define to 1 if you have the header file. */
#undef HAVE_WCHAR_H
/* Define if you have the 'wchar_t' type. */
#undef HAVE_WCHAR_T
/* Define to 1 if you have the `wcrtomb' function. */
#undef HAVE_WCRTOMB
/* Define to 1 if you have the `wcslen' function. */
#undef HAVE_WCSLEN
/* Define to 1 if you have the `wcsnlen' function. */
#undef HAVE_WCSNLEN
/* Define to 1 if you have the header file. */
#undef HAVE_WINSOCK2_H
/* Define if you have the 'wint_t' type. */
#undef HAVE_WINT_T
/* Define to 1 if O_NOATIME works. */
#undef HAVE_WORKING_O_NOATIME
/* Define to 1 if O_NOFOLLOW works. */
#undef HAVE_WORKING_O_NOFOLLOW
/* Define if you have the posix_spawn and posix_spawnp functions and they
work. */
#undef HAVE_WORKING_POSIX_SPAWN
/* Define to 1 if you have the header file. */
#undef HAVE_WS2TCPIP_H
/* Define to 1 if you have the header file. */
#undef HAVE_XLOCALE_H
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
/* Define to 1 if you have the `_ftelli64' function. */
#undef HAVE__FTELLI64
/* Define to 1 if you have the `_ftime' function. */
#undef HAVE__FTIME
/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */
#undef HAVE__SET_INVALID_PARAMETER_HANDLER
/* Define to 1 if you have the '__xpg_strerror_r' function. */
#undef HAVE___XPG_STRERROR_R
/* path to ifdown binary */
#undef IFDOWN
/* path to ifup binary */
#undef IFUP
/* Define to 1 if lseek does not detect pipes. */
#undef LSEEK_PIPE_BROKEN
/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
#undef MALLOC_0_IS_NONNULL
/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
#undef MAP_ANONYMOUS
/* The network driver */
#undef NETCF_DRIVER
/* Location of the netcf-transaction shell script */
#undef NETCF_TRANSACTION
/* Define to 1 if open() fails to recognize a trailing slash. */
#undef OPEN_TRAILING_SLASH_BUG
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if exists and defines unusable PRI* macros. */
#undef PRI_MACROS_BROKEN
/* Define to the type that is the result of default argument promotions of
type mode_t. */
#undef PROMOTED_MODE_T
/* Define if the pthread_in_use() detection is hard. */
#undef PTHREAD_IN_USE_DETECTION_HARD
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'ptrdiff_t'. */
#undef PTRDIFF_T_SUFFIX
/* Define to 1 if stat needs help when passed a directory name with a trailing
slash */
#undef REPLACE_FUNC_STAT_DIR
/* Define to 1 if stat needs help when passed a file name with a trailing
slash */
#undef REPLACE_FUNC_STAT_FILE
/* Define to 1 if strerror(0) does not return a message implying success. */
#undef REPLACE_STRERROR_0
/* Define if vasnprintf exists but is overridden by gnulib. */
#undef REPLACE_VASNPRINTF
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'sig_atomic_t'. */
#undef SIG_ATOMIC_T_SUFFIX
/* Define as the maximum value of type 'size_t', if the system doesn't define
it. */
#ifndef SIZE_MAX
# undef SIZE_MAX
#endif
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'size_t'. */
#undef SIZE_T_SUFFIX
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if the `S_IS*' macros in do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if the POSIX multithreading library can be used. */
#undef USE_POSIX_THREADS
/* Define if references to the POSIX multithreading library should be made
weak. */
#undef USE_POSIX_THREADS_WEAK
/* Define if the GNU Pth multithreading library can be used. */
#undef USE_PTH_THREADS
/* Define if references to the GNU Pth multithreading library should be made
weak. */
#undef USE_PTH_THREADS_WEAK
/* Define if the old Solaris multithreading library can be used. */
#undef USE_SOLARIS_THREADS
/* Define if references to the old Solaris multithreading library should be
made weak. */
#undef USE_SOLARIS_THREADS_WEAK
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable general extensions on OS X. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
# undef __USE_MINGW_ANSI_STDIO
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
whether compiling with -Ae or -D_HPUX_SOURCE=1. */
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Define if the native Windows multithreading API can be used. */
#undef USE_WINDOWS_THREADS
/* Version number of package */
#undef VERSION
/* Define to 1 if unsetenv returns void instead of int. */
#undef VOID_UNSETENV
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wchar_t'. */
#undef WCHAR_T_SUFFIX
/* Define if WSAStartup is needed. */
#undef WINDOWS_SOCKETS
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wint_t'. */
#undef WINT_T_SUFFIX
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#undef _DARWIN_USE_64_BIT_INODE
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
stat.st_size becomes 64-bit. */
#undef _GL_WINDOWS_64_BIT_ST_SIZE
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to 1 on Solaris. */
#undef _LCONV_C99
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
#undef _NETBSD_SOURCE
/* The _Noreturn keyword of C11. */
#if ! (defined _Noreturn \
|| (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|| 0x5110 <= __SUNPRO_C)
# define _Noreturn __attribute__ ((__noreturn__))
# elif defined _MSC_VER && 1200 <= _MSC_VER
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn
# endif
#endif
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 in order to get the POSIX compatible declarations of socket
functions. */
#undef _POSIX_PII_SOCKET
/* Define to 1 if you need to in order for 'stat' and other things to work. */
#undef _POSIX_SOURCE
/* For thread-safety on OSF/1, Solaris. */
#undef _REENTRANT
/* For thread-safety on AIX, FreeBSD. */
#undef _THREAD_SAFE
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
#undef __GETOPT_PREFIX
/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
.
Suppress extern inline with Sun C in standards-conformance mode, as it
mishandles inline functions that call each other. E.g., for 'inline void f
(void) { } inline void g (void) { f (); }', c99 incorrectly complains
'reference to static identifier "f" in extern inline function'.
This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
on configurations that mistakenly use 'static inline' to implement
functions or macros in standard C headers like . For example,
if isdigit is mistakenly implemented via a static inline function,
a program containing an extern inline function that calls isdigit
may not work since the C standard prohibits extern inline functions
from calling static functions. This bug is known to occur on:
OS X 10.8 and earlier; see:
http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
DragonFly; see
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
FreeBSD; see:
http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
for clang but remains for g++; see .
Assume DragonFly and FreeBSD will be similar. */
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
&& (defined __header_inline \
? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
&& ! defined __clang__) \
: ((! defined _DONT_USE_CTYPE_INLINE_ \
&& (defined __GNUC__ || defined __cplusplus)) \
|| (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
&& defined __GNUC__ && ! defined __cplusplus))))
# define _GL_EXTERN_INLINE_STDHEADER_BUG
#endif
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !(defined __SUNPRO_C && __STDC__))) \
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
# define _GL_EXTERN_INLINE_IN_USE
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_INLINE extern inline
# endif
# define _GL_EXTERN_INLINE extern
# define _GL_EXTERN_INLINE_IN_USE
#else
# define _GL_INLINE static _GL_UNUSED
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
/* In GCC, suppress bogus "no previous prototype for 'FOO'"
and "no previous declaration for 'FOO'" diagnostics,
when FOO is an inline function in the header; see
and
. */
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
# define _GL_INLINE_HEADER_CONST_PRAGMA \
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
# endif
# define _GL_INLINE_HEADER_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
_GL_INLINE_HEADER_CONST_PRAGMA
# define _GL_INLINE_HEADER_END \
_Pragma ("GCC diagnostic pop")
#else
# define _GL_INLINE_HEADER_BEGIN
# define _GL_INLINE_HEADER_END
#endif
/* Define to `int' if doesn't define. */
#undef gid_t
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to long or long long if and don't define. */
#undef intmax_t
/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
__APPLE__ && __MACH__ test for Mac OS X.
__APPLE_CC__ tests for the Apple compiler and its version.
__STDC_VERSION__ tests for the C99 mode. */
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
# define __GNUC_STDC_INLINE__ 1
#endif
/* Define to `int' if does not define. */
#undef mode_t
/* Define to the type of st_nlink in struct stat, or a supertype. */
#undef nlink_t
/* Define to `int' if does not define. */
#undef pid_t
/* Define as the type of the result of subtracting two pointers, if the system
doesn't define it. */
#undef ptrdiff_t
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to `unsigned int' if does not define. */
#undef size_t
/* type to use in place of socklen_t if not defined */
#undef socklen_t
/* Define as a signed type of the same size as size_t. */
#undef ssize_t
/* Define to `int' if doesn't define. */
#undef uid_t
/* Define as a marker that can be attached to declarations that might not
be used. This helps to reduce warnings, such as from
GCC -Wunused-parameter. */
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define _GL_UNUSED __attribute__ ((__unused__))
#else
# define _GL_UNUSED
#endif
/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
/* gcc supports the "unused" attribute on possibly unused labels, and
g++ has since version 4.5. Note to support C++ as well as C,
_GL_UNUSED_LABEL should be used with a trailing ; */
#if !defined __cplusplus || __GNUC__ > 4 \
|| (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# define _GL_UNUSED_LABEL _GL_UNUSED
#else
# define _GL_UNUSED_LABEL
#endif
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
#else
# define _GL_ATTRIBUTE_PURE /* empty */
#endif
/* The __const__ attribute was added in gcc 2.95. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
#else
# define _GL_ATTRIBUTE_CONST /* empty */
#endif
/* Define to an unsigned 32-bit type if lacks this type. */
#undef useconds_t
netcf-0.2.8/README 0000644 0000000 0000000 00000001213 12302622506 010362 0000000 0000000 Introduction
============
netcf is a cross-platform network configuration library.
It takes the description of a network interface in its own
platform-independent format and adapts the local system's network
configuration to provide that interface.
As an example, imagine you want to bond eth0 and eth1 together to bond0. On
Fedora, that requires modifying the files ifcfg-eth0, ifcfg-eth1 and
ifcfg-bond0 in /etc/sysconfig/network-scripts; on Debian, it requires
changing several entries in /etc/network/interfaces.
This library provides a convenient facility for programs that want to
shield themselves from the intricacies of networking setup.
netcf-0.2.8/COPYING 0000644 0000000 0000000 00000063650 11165427221 010555 0000000 0000000
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
^L
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
^L
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
^L
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
^L
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
^L
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
^L
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
^L
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
^L
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
netcf-0.2.8/ChangeLog 0000644 0000000 0000000 00000000000 12502615477 011260 0000000 0000000 netcf-0.2.8/tests/ 0000755 0000000 0000000 00000000000 12511256403 010730 5 0000000 0000000 netcf-0.2.8/tests/tutil.c 0000644 0000000 0000000 00000014510 11243262432 012156 0000000 0000000 /*
* tutil.c: Global utility functions for automated testing of netcf
*
* Copyright (C) 2009 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: David Lutterkort
*/
#include
#include
#include
#include "internal.h"
#include "cutest.h"
#include "safe-alloc.h"
#include "read-file.h"
#include "tutil.h"
const char *abs_top_srcdir;
const char *abs_top_builddir;
char *driver_name = NULL;
char *root, *src_root;
struct netcf *ncf;
void format_error(char **strp, const char *format, ...) {
va_list args;
int r;
va_start (args, format);
r = vasprintf (strp, format, args);
va_end (args);
if (r < 0)
die("Failed to format error message (out of memory)");
}
char *read_test_file(CuTest *tc, const char *relpath) {
char *path = NULL;
char *txt = NULL;
size_t length;
if (asprintf(&path, "%s/tests/%s", abs_top_srcdir, relpath) < 0)
CuFail(tc, "Could not format path for file");
txt = read_file(path, &length);
if (txt == NULL)
CuFail(tc, "Failed to read file");
return txt;
}
void assert_ncf_no_error(CuTest *tc) {
CuAssertIntEquals(tc, NETCF_NOERROR, ncf_error(ncf, NULL, NULL));
}
xmlDocPtr parse_xml(const char *xml_str) {
xmlParserCtxtPtr pctxt;
xmlDocPtr xml = NULL;
/* Set up a parser context so we can catch the details of XML errors. */
pctxt = xmlNewParserCtxt();
if (pctxt == NULL || pctxt->sax == NULL)
die("xmlNewParserCtxt failed");
xml = xmlCtxtReadDoc (pctxt, BAD_CAST xml_str, "netcf.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOWARNING);
if (xml == NULL)
die("failed to parse xml document");
if (xmlDocGetRootElement(xml) == NULL)
die("missing root element");
xmlFreeParserCtxt(pctxt);
return xml;
}
int xml_attrs_subset(xmlNodePtr n1, xmlNodePtr n2, char **err) {
for (xmlAttrPtr a1 = n1->properties; a1 != NULL; a1 = a1->next) {
xmlChar *v1 = xmlGetProp(n1, a1->name);
xmlChar *v2 = xmlGetProp(n2, a1->name);
if (!xmlStrEqual(v1, v2)) {
format_error(err, "Different values for attribute %s/@%s: %s != %s (lines %d and %d)", n1->name, a1->name, v1, v2, n1->line, n2->line);
return 0;
}
}
return 1;
}
xmlNodePtr xml_next_element(xmlNodePtr n) {
while (n != NULL && n->type != XML_ELEMENT_NODE)
n = n->next;
return n;
}
int xml_nodes_equal(xmlNodePtr n1, xmlNodePtr n2, char **err) {
if (n1 == NULL && n2 == NULL)
return 1;
if (n1 == NULL && n2 != NULL) {
format_error(err, "First node null, second node %s (line %d)",
n2->name, n2->line);
return 0;
}
if (n1 != NULL && n2 == NULL) {
format_error(err, "First node %s, second node null (line %d)",
n1->name, n1->line);
return 0;
}
if (!xmlStrEqual(n1->name, n2->name)) {
format_error(err, "Different node names: %s != %s (lines %d and %d)",
n1->name, n2->name, n1->line, n2->line);
return 0;
}
if (! xml_attrs_subset(n1, n2, err))
return 0;
if (! xml_attrs_subset(n2, n1, err))
return 0;
n1 = xml_next_element(n1->children);
n2 = xml_next_element(n2->children);
while (n1 != NULL && n2 != NULL) {
if (! xml_nodes_equal(n1, n2, err))
return 0;
n1 = xml_next_element(n1->next);
n2 = xml_next_element(n2->next);
}
if (n1 != NULL) {
format_error(err, "Additional element %s (line %d)",
n1->name, n1->line);
return 0;
} else if (n2 != NULL) {
format_error(err, "Additional element %s (line %d)",
n2->name, n2->line);
return 0;
}
return 1;
}
void assert_xml_equals(CuTest *tc, const char *fname,
char *exp, char *act) {
char *err, *msg;
xmlDocPtr exp_doc, act_doc;
int result;
exp_doc = parse_xml(exp);
act_doc = parse_xml(act);
result = xml_nodes_equal(xmlDocGetRootElement(exp_doc),
xmlDocGetRootElement(act_doc), &err);
xmlFreeDoc(exp_doc);
xmlFreeDoc(act_doc);
if (! result) {
format_error(&msg, "%s: %s\nExpected XML:\n%s\nActual XML:\n%s\n",
fname, err, exp, act);
CuFail(tc, msg);
}
}
void run(CuTest *tc, const char *format, ...) {
char *command;
va_list args;
int r;
va_start(args, format);
r = vasprintf(&command, format, args);
va_end (args);
if (r < 0)
CuFail(tc, "Failed to format command (out of memory)");
r = system(command);
if (r < 0 || (WIFEXITED(r) && WEXITSTATUS(r) != 0)) {
char *msg;
r = asprintf(&msg, "Command %s failed with status %d\n",
command, WEXITSTATUS(r));
CuFail(tc, msg);
free(msg);
}
}
void setup(CuTest *tc) {
int r;
if (asprintf(&root, "%s/build/test_%s/%s",
abs_top_builddir, driver_name, tc->name) < 0) {
CuFail(tc, "failed to set root");
}
run(tc, "test -d %s && chmod -R u+w %s || :", root, root);
run(tc, "rm -rf %s", root);
run(tc, "mkdir -p %s", root);
run(tc, "cp -pr %s/* %s", src_root, root);
run(tc, "chmod -R u+w %s", root);
run(tc, "chmod -R a-w %s/sys", root);
r = ncf_init(&ncf, root);
CuAssertIntEquals(tc, 0, r);
}
void teardown(ATTRIBUTE_UNUSED CuTest *tc) {
ncf_close(ncf);
free(root);
root = NULL;
}
/*
* Local variables:
* indent-tabs-mode: nil
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
/* vim: set ts=4 sw=4 et: */
netcf-0.2.8/tests/tutil.h 0000644 0000000 0000000 00000005474 11243262432 012174 0000000 0000000 /*
* tutil.h: Global utility functions for automated testing of netcf
*
* Copyright (C) 2009 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: David Lutterkort
*/
#ifndef _TUTIL_H
#define _TUTIL_H
#include
#include
#include "internal.h"
#include "cutest.h"
#include "safe-alloc.h"
#include "tutil.h"
#define die(msg) \
do { \
fprintf(stderr, "%s:%d: Fatal error: %s\n", __FILE__, __LINE__, msg); \
exit(EXIT_FAILURE); \
} while(0)
/* Write a string of FORMAT, ... to STRP */
void format_error(char **strp, const char *format, ...);
/* Read data from file, return pointer to result */
char *read_test_file(CuTest *tc, const char *relpath);
/* Assert that the ncf instance is in the NOERROR-state */
void assert_ncf_no_error(CuTest *tc);
/* Parse the xml in XML_STR and return a xmlDocPtr to the parsed structure */
xmlDocPtr parse_xml(const char *xml_str);
/* Check that all attributes of N1 and N2 are equal */
int xml_attrs_subset(xmlNodePtr n1, xmlNodePtr n2, char **err);
/* Get the next element of type XML_ELEMENT_NODE following N, or NULL */
xmlNodePtr xml_next_element(xmlNodePtr n);
/* Check that the nodes N1 and N2 are alike (including their children) */
int xml_nodes_equal(xmlNodePtr n1, xmlNodePtr n2, char **err);
/* Assert the the EXP (expected) and ACT (actual) XML text blobs are alike.
* FNAME is used for error reporting in the case that they are not alike. */
void assert_xml_equals(CuTest *tc, const char *fname,
char *exp, char *act);
/* Run command formed by FORMAT, raise an error if the the command did not
* exit with status 0 */
void run(CuTest *tc, const char *format, ...);
/* Setup test directories */
void setup(CuTest *tc);
/* Close and free all resources */
void teardown(ATTRIBUTE_UNUSED CuTest *tc);
#endif
/*
* Local variables:
* indent-tabs-mode: nil
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
/* vim: set ts=4 sw=4 et: */
netcf-0.2.8/tests/test-debian.c 0000644 0000000 0000000 00000016314 12302622507 013220 0000000 0000000 /*
* test-debian.c:
*
* Copyright (C) 2009-2011 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: David Lutterkort
* Author: Daniel Berrange
*/
#include
#include "netcf.h"
#include "internal.h"
#include "cutest.h"
#include "safe-alloc.h"
#include "read-file.h"
#include "tutil.h"
#include
#include
extern const char *abs_top_srcdir;
extern const char *abs_top_builddir;
extern char *driver_name;
extern char *root, *src_root;
extern struct netcf *ncf;
static void testListInterfaces(CuTest *tc) {
int nint;
char **names;
static const char *const exp_names[] =
{ "br0", "bond0", "lo", "eth3", "eth4" };
static const int exp_nint = ARRAY_CARDINALITY(exp_names);
nint = ncf_num_of_interfaces(ncf, NETCF_IFACE_ACTIVE|NETCF_IFACE_INACTIVE);
CuAssertIntEquals(tc, exp_nint, nint);
if (ALLOC_N(names, nint) < 0)
die("allocation failed");
nint = ncf_list_interfaces(ncf, nint, names, NETCF_IFACE_ACTIVE|NETCF_IFACE_INACTIVE);
CuAssertIntEquals(tc, exp_nint, nint);
for (int i=0; i < exp_nint; i++) {
int found = 0;
for (int j=0; j < nint; j++) {
if (STREQ(names[j], exp_names[i]))
found = 1;
}
CuAssert(tc, "Unknown interface name", found);
}
}
static void testLookupByName(CuTest *tc) {
struct netcf_if *nif;
nif = ncf_lookup_by_name(ncf, "br0");
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "br0", nif->name);
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
}
static void testLookupByMAC(CuTest *tc) {
static const char *const good_mac = "aa:bb:cc:dd:ee:ff";
static const char *const good_mac_caps = "AA:bb:cc:DD:Ee:ff";
struct netcf_if *nif;
int r;
r = ncf_lookup_by_mac_string(ncf, "00:00:00:00:00:00", 1, &nif);
CuAssertIntEquals(tc, 0, r);
CuAssertPtrEquals(tc, NULL, nif);
r = ncf_lookup_by_mac_string(ncf, good_mac, 1, &nif);
CuAssertIntEquals(tc, 1, r);
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "br0", nif->name);
CuAssertStrEquals(tc, good_mac, ncf_if_mac_string(nif));
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
r = ncf_lookup_by_mac_string(ncf, good_mac_caps, 1, &nif);
CuAssertIntEquals(tc, 1, r);
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "br0", nif->name);
CuAssertStrEquals(tc, good_mac, ncf_if_mac_string(nif));
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
}
static void testDefineUndefine(CuTest *tc) {
char *bridge_xml = NULL;
struct netcf_if *nif = NULL;
int r;
bridge_xml = read_test_file(tc, "interface/bridge42.xml");
CuAssertPtrNotNull(tc, bridge_xml);
nif = ncf_define(ncf, bridge_xml);
CuAssertPtrNotNull(tc, nif);
assert_ncf_no_error(tc);
r = ncf_if_undefine(nif);
CuAssertIntEquals(tc, 0, r);
assert_ncf_no_error(tc);
ncf_close(ncf);
r = ncf_init(&ncf, root);
CuAssertIntEquals(tc, 0, r);
nif = ncf_lookup_by_name(ncf, "br42");
CuAssertPtrEquals(tc, NULL, nif);
}
static void assert_transforms(CuTest *tc, const char *base) {
char *aug_fname = NULL, *ncf_fname = NULL;
char *aug_xml_exp = NULL, *ncf_xml_exp = NULL;
char *aug_xml_act = NULL, *ncf_xml_act = NULL;
int r;
r = asprintf(&aug_fname, "debian/schema/%s.xml", base);
r = asprintf(&ncf_fname, "interface/%s.xml", base);
aug_xml_exp = read_test_file(tc, aug_fname);
ncf_xml_exp = read_test_file(tc, ncf_fname);
/* Convert a NCF XML desc into an intermediate augeas XML */
r = ncf_get_aug(ncf, ncf_xml_exp, &aug_xml_act);
CuAssertIntEquals(tc, 0, r);
if (!aug_xml_act)
die("Intermediate XML is null");
/* Convert a intermediate augeas XML into NCF XML */
r = ncf_put_aug(ncf, aug_xml_exp, &ncf_xml_act);
CuAssertIntEquals(tc, 0, r);
// fprintf(stderr, "[%s]\n", aug_xml_exp);
// fprintf(stderr, "[%s]\n", ncf_xml_act);
if (!ncf_xml_act)
die("NCF XML is null");
assert_xml_equals(tc, ncf_fname, ncf_xml_exp, ncf_xml_act);
assert_xml_equals(tc, aug_fname, aug_xml_exp, aug_xml_act);
free(ncf_xml_exp);
free(ncf_xml_act);
free(aug_xml_exp);
free(aug_xml_act);
}
static void testTransforms(CuTest *tc) {
assert_transforms(tc, "bond");
assert_transforms(tc, "bond-arp");
assert_transforms(tc, "bond-defaults");
assert_transforms(tc, "bridge");
assert_transforms(tc, "bridge-no-address");
assert_transforms(tc, "bridge-vlan");
assert_transforms(tc, "bridge-empty");
assert_transforms(tc, "bridge-bond");
assert_transforms(tc, "ethernet-static");
assert_transforms(tc, "ethernet-static-no-prefix");
assert_transforms(tc, "ethernet-dhcp");
assert_transforms(tc, "vlan");
assert_transforms(tc, "ipv6-local");
assert_transforms(tc, "ipv6-static");
assert_transforms(tc, "ipv6-dhcp");
assert_transforms(tc, "ipv6-autoconf");
assert_transforms(tc, "ipv6-autoconf-dhcp");
assert_transforms(tc, "ipv6-static-multi");
}
static void testCorruptedSetup(CuTest *tc) {
int r;
ncf_close(ncf);
ncf = NULL;
r = ncf_init(&ncf, "/dev/null");
CuAssertIntEquals(tc, -1, r);
CuAssertPtrNotNull(tc, ncf);
r = ncf_error(ncf, NULL, NULL);
CuAssertIntEquals(tc, NETCF_EFILE, r);
}
int main(void) {
char *output = NULL;
CuSuite* suite = CuSuiteNew();
abs_top_srcdir = getenv("abs_top_srcdir");
if (abs_top_srcdir == NULL)
die("env var abs_top_srcdir must be set");
abs_top_builddir = getenv("abs_top_builddir");
if (abs_top_builddir == NULL)
die("env var abs_top_builddir must be set");
if (asprintf(&src_root, "%s/tests/debian/fsroot", abs_top_srcdir) < 0) {
die("failed to set src_root");
}
driver_name = strdup("debian");
if (driver_name == NULL) {
die("failed to set driver name");
}
CuSuiteSetup(suite, setup, teardown);
SUITE_ADD_TEST(suite, testListInterfaces);
SUITE_ADD_TEST(suite, testLookupByName);
SUITE_ADD_TEST(suite, testLookupByMAC);
SUITE_ADD_TEST(suite, testDefineUndefine);
SUITE_ADD_TEST(suite, testTransforms);
SUITE_ADD_TEST(suite, testCorruptedSetup);
CuSuiteRun(suite);
CuSuiteSummary(suite, &output);
CuSuiteDetails(suite, &output);
printf("%s\n", output);
free(output);
free(driver_name);
return suite->failCount;
}
/*
* Local variables:
* indent-tabs-mode: nil
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
/* vim: set ts=4 sw=4 et: */
netcf-0.2.8/tests/cutest.h 0000644 0000000 0000000 00000011620 11165427221 012332 0000000 0000000 /*
* This code is based on CuTest by Asim Jalis
* http://sourceforge.net/projects/cutest/
*
* The license for the original code is
* LICENSE
*
* Copyright (c) 2003 Asim Jalis
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in
* a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#ifndef CU_TEST_H
#define CU_TEST_H
#include
#include
/* CuTest */
typedef struct CuTest CuTest;
typedef void (*TestFunction)(CuTest *);
struct CuTest
{
const char* name;
TestFunction function;
int failed;
int ran;
const char* message;
jmp_buf *jumpBuf;
};
void CuTestInit(CuTest* t, const char* name, TestFunction function);
CuTest* CuTestNew(const char* name, TestFunction function);
void CuTestRun(CuTest* tc, TestFunction setup, TestFunction teardown);
/* Internal versions of assert functions -- use the public versions */
void CuFail_Line(CuTest* tc, const char* file, int line, const char* message2, const char* message);
void CuAssert_Line(CuTest* tc, const char* file, int line, const char* message, int condition);
void CuAssertStrEquals_LineMsg(CuTest* tc,
const char* file, int line, const char* message,
const char* expected, const char* actual);
void CuAssertIntEquals_LineMsg(CuTest* tc,
const char* file, int line, const char* message,
int expected, int actual);
void CuAssertDblEquals_LineMsg(CuTest* tc,
const char* file, int line, const char* message,
double expected, double actual, double delta);
void CuAssertPtrEquals_LineMsg(CuTest* tc,
const char* file, int line, const char* message,
const void* expected, const void* actual);
void CuAssertPtrNotEqual_LineMsg(CuTest* tc,
const char* file, int line, const char* message,
const void* expected, const void* actual);
/* public assert functions */
#define CuFail(tc, ms) CuFail_Line( (tc), __FILE__, __LINE__, NULL, (ms))
#define CuAssert(tc, ms, cond) CuAssert_Line((tc), __FILE__, __LINE__, (ms), (cond))
#define CuAssertTrue(tc, cond) CuAssert_Line((tc), __FILE__, __LINE__, "assert failed", (cond))
#define CuAssertStrEquals(tc,ex,ac) CuAssertStrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
#define CuAssertStrEquals_Msg(tc,ms,ex,ac) CuAssertStrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
#define CuAssertIntEquals(tc,ex,ac) CuAssertIntEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
#define CuAssertIntEquals_Msg(tc,ms,ex,ac) CuAssertIntEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
#define CuAssertDblEquals(tc,ex,ac,dl) CuAssertDblEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac),(dl))
#define CuAssertDblEquals_Msg(tc,ms,ex,ac,dl) CuAssertDblEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac),(dl))
#define CuAssertPtrEquals(tc,ex,ac) CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
#define CuAssertPtrEquals_Msg(tc,ms,ex,ac) CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
#define CuAssertPtrNotEqual(tc,ex,ac) CuAssertPtrNotEqual_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
#define CuAssertPtrNotEqual_Msg(tc,ms,ex,ac) CuAssertPtrNotEqual_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
#define CuAssertPtrNotNull(tc,p) CuAssert_Line((tc),__FILE__,__LINE__,"null pointer unexpected",(p != NULL))
#define CuAssertPtrNotNullMsg(tc,msg,p) CuAssert_Line((tc),__FILE__,__LINE__,(msg),(p != NULL))
/* CuSuite */
#define MAX_TEST_CASES 1024
#define SUITE_ADD_TEST(SUITE,TEST) CuSuiteAdd(SUITE, CuTestNew(#TEST, TEST))
typedef struct
{
int count;
CuTest* list[MAX_TEST_CASES];
int failCount;
TestFunction setup;
TestFunction teardown;
} CuSuite;
void CuSuiteInit(CuSuite* testSuite);
CuSuite* CuSuiteNew(void);
void CuSuiteSetup(CuSuite *testSuite,
TestFunction setup, TestFunction teardown);
void CuSuiteAdd(CuSuite* testSuite, CuTest *testCase);
void CuSuiteAddSuite(CuSuite* testSuite, CuSuite* testSuite2);
void CuSuiteRun(CuSuite* testSuite);
void CuSuiteSummary(CuSuite* testSuite, char **summary);
void CuSuiteDetails(CuSuite* testSuite, char **details);
#endif /* CU_TEST_H */
/*
* Local variables:
* indent-tabs-mode: nil
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
netcf-0.2.8/tests/test-suse.c 0000644 0000000 0000000 00000016635 12302622507 012763 0000000 0000000 /*
* test-suse.c:
*
* Copyright (C) 2009 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: David Lutterkort
*/
#include
#include "netcf.h"
#include "internal.h"
#include "cutest.h"
#include "safe-alloc.h"
#include "read-file.h"
#include "tutil.h"
#include
#include
extern const char *abs_top_srcdir;
extern const char *abs_top_builddir;
extern char *driver_name;
extern char *root, *src_root;
extern struct netcf *ncf;
static void testListInterfaces(CuTest *tc) {
int nint;
char **names;
static const char *const exp_names[] =
{ "br0", "bond0", "lo", "eth3", "eth4" };
static const int exp_nint = ARRAY_CARDINALITY(exp_names);
nint = ncf_num_of_interfaces(ncf, NETCF_IFACE_ACTIVE|NETCF_IFACE_INACTIVE);
CuAssertIntEquals(tc, exp_nint, nint);
if (ALLOC_N(names, nint) < 0)
die("allocation failed");
nint = ncf_list_interfaces(ncf, nint, names, NETCF_IFACE_ACTIVE|NETCF_IFACE_INACTIVE);
CuAssertIntEquals(tc, exp_nint, nint);
for (int i=0; i < exp_nint; i++) {
int found = 0;
for (int j=0; j < nint; j++) {
if (STREQ(names[j], exp_names[i]))
found = 1;
}
CuAssert(tc, "Unknown interface name", found);
}
}
static void testLookupByName(CuTest *tc) {
struct netcf_if *nif;
nif = ncf_lookup_by_name(ncf, "br0");
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "br0", nif->name);
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
}
/* Check that we get the right ifcfg- file when we have to
* look it up indirectly by HWADDR
*/
static void testLookupByNameDecoy(CuTest *tc) {
struct netcf_if *nif;
char *xml, *loc;
nif = ncf_lookup_by_name(ncf, "eth4");
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "eth4", nif->name);
xml = ncf_if_xml_desc(nif);
CuAssertPtrNotNull(tc, xml);
loc = strstr(xml, "");
CuAssertPtrNotNull(tc, loc);
free(xml);
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
}
static void testLookupByMAC(CuTest *tc) {
static const char *const good_mac = "aa:bb:cc:dd:ee:ff";
static const char *const good_mac_caps = "AA:bb:cc:DD:Ee:ff";
struct netcf_if *nif;
int r;
r = ncf_lookup_by_mac_string(ncf, "00:00:00:00:00:00", 1, &nif);
CuAssertIntEquals(tc, 0, r);
CuAssertPtrEquals(tc, NULL, nif);
r = ncf_lookup_by_mac_string(ncf, good_mac, 1, &nif);
CuAssertIntEquals(tc, 1, r);
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "br0", nif->name);
CuAssertStrEquals(tc, good_mac, ncf_if_mac_string(nif));
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
r = ncf_lookup_by_mac_string(ncf, good_mac_caps, 1, &nif);
CuAssertIntEquals(tc, 1, r);
CuAssertPtrNotNull(tc, nif);
CuAssertStrEquals(tc, "br0", nif->name);
CuAssertStrEquals(tc, good_mac, ncf_if_mac_string(nif));
ncf_if_free(nif);
CuAssertIntEquals(tc, 1, ncf->ref);
}
static void testDefineUndefine(CuTest *tc) {
char *bridge_xml = NULL;
struct netcf_if *nif = NULL;
int r;
bridge_xml = read_test_file(tc, "interface/bridge42.xml");
CuAssertPtrNotNull(tc, bridge_xml);
nif = ncf_define(ncf, bridge_xml);
CuAssertPtrNotNull(tc, nif);
assert_ncf_no_error(tc);
r = ncf_if_undefine(nif);
CuAssertIntEquals(tc, 0, r);
assert_ncf_no_error(tc);
ncf_close(ncf);
r = ncf_init(&ncf, root);
CuAssertIntEquals(tc, 0, r);
nif = ncf_lookup_by_name(ncf, "br42");
CuAssertPtrEquals(tc, NULL, nif);
}
static void assert_transforms(CuTest *tc, const char *base) {
char *aug_fname = NULL, *ncf_fname = NULL;
char *aug_xml_exp = NULL, *ncf_xml_exp = NULL;
char *aug_xml_act = NULL, *ncf_xml_act = NULL;
int r;
r = asprintf(&aug_fname, "suse/schema/%s.xml", base);
r = asprintf(&ncf_fname, "interface/%s.xml", base);
aug_xml_exp = read_test_file(tc, aug_fname);
ncf_xml_exp = read_test_file(tc, ncf_fname);
r = ncf_get_aug(ncf, ncf_xml_exp, &aug_xml_act);
CuAssertIntEquals(tc, 0, r);
r = ncf_put_aug(ncf, aug_xml_exp, &ncf_xml_act);
CuAssertIntEquals(tc, 0, r);
assert_xml_equals(tc, ncf_fname, ncf_xml_exp, ncf_xml_act);
assert_xml_equals(tc, aug_fname, aug_xml_exp, aug_xml_act);
free(ncf_xml_exp);
free(ncf_xml_act);
free(aug_xml_exp);
free(aug_xml_act);
}
static void testTransforms(CuTest *tc) {
assert_transforms(tc, "bond");
assert_transforms(tc, "bond-arp");
assert_transforms(tc, "bond-defaults");
assert_transforms(tc, "bridge");
assert_transforms(tc, "bridge-no-address");
assert_transforms(tc, "bridge-vlan");
assert_transforms(tc, "bridge-empty");
assert_transforms(tc, "bridge-bond");
assert_transforms(tc, "ethernet-static");
assert_transforms(tc, "ethernet-static-no-prefix");
assert_transforms(tc, "ethernet-dhcp");
assert_transforms(tc, "vlan");
assert_transforms(tc, "ipv6-local");
assert_transforms(tc, "ipv6-static");
assert_transforms(tc, "ipv6-dhcp");
assert_transforms(tc, "ipv6-autoconf");
assert_transforms(tc, "ipv6-autoconf-dhcp");
assert_transforms(tc, "ipv6-static-multi");
}
static void testCorruptedSetup(CuTest *tc) {
int r;
ncf_close(ncf);
ncf = NULL;
r = ncf_init(&ncf, "/dev/null");
CuAssertIntEquals(tc, -1, r);
CuAssertPtrNotNull(tc, ncf);
r = ncf_error(ncf, NULL, NULL);
CuAssertIntEquals(tc, NETCF_EFILE, r);
}
int main(void) {
char *output = NULL;
CuSuite* suite = CuSuiteNew();
abs_top_srcdir = getenv("abs_top_srcdir");
if (abs_top_srcdir == NULL)
die("env var abs_top_srcdir must be set");
abs_top_builddir = getenv("abs_top_builddir");
if (abs_top_builddir == NULL)
die("env var abs_top_builddir must be set");
if (asprintf(&src_root, "%s/tests/suse/fsroot", abs_top_srcdir) < 0) {
die("failed to set src_root");
}
driver_name = strdup("suse");
if (driver_name == NULL) {
die("failed to set driver name");
}
CuSuiteSetup(suite, setup, teardown);
SUITE_ADD_TEST(suite, testListInterfaces);
SUITE_ADD_TEST(suite, testLookupByName);
SUITE_ADD_TEST(suite, testLookupByNameDecoy);
SUITE_ADD_TEST(suite, testLookupByMAC);
SUITE_ADD_TEST(suite, testDefineUndefine);
SUITE_ADD_TEST(suite, testTransforms);
SUITE_ADD_TEST(suite, testCorruptedSetup);
CuSuiteRun(suite);
CuSuiteSummary(suite, &output);
CuSuiteDetails(suite, &output);
printf("%s\n", output);
free(output);
free(driver_name);
return suite->failCount;
}
/*
* Local variables:
* indent-tabs-mode: nil
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
/* vim: set ts=4 sw=4 et: */
netcf-0.2.8/tests/interface/ 0000755 0000000 0000000 00000000000 12507645210 012673 5 0000000 0000000 netcf-0.2.8/tests/interface/bridge-vlan.xml 0000644 0000000 0000000 00000000443 11264660112 015525 0000000 0000000
netcf-0.2.8/tests/interface/ipv6-autoconf.xml 0000644 0000000 0000000 00000000207 11262037101 016023 0000000 0000000
netcf-0.2.8/tests/interface/bridge-multi.xml~ 0000644 0000000 0000000 00000000760 12506276116 016126 0000000 0000000
netcf-0.2.8/tests/interface/eth2.xml 0000644 0000000 0000000 00000000242 11417625444 014203 0000000 0000000
netcf-0.2.8/tests/interface/bridge-multi.xml 0000644 0000000 0000000 00000000760 12506316422 015723 0000000 0000000
netcf-0.2.8/tests/interface/ethernet-static-multi.xml 0000644 0000000 0000000 00000000502 12501423230 017553 0000000 0000000
netcf-0.2.8/tests/interface/ethernet-dhcp.xml 0000644 0000000 0000000 00000000320 12302622507 016057 0000000 0000000