feature-test.c revision 534057c9f91a3eb6e0541f3526459c716239b337
/*
* Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <config.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#include <Winsock2.h>
#endif
#ifndef MAXHOSTNAMELEN
#ifdef HOST_NAME_MAX
#define MAXHOSTNAMELEN HOST_NAME_MAX
#else
#define MAXHOSTNAMELEN 256
#endif
#endif
static void
usage() {
}
int
if (argc != 2) {
usage();
return (1);
}
#ifdef ALLOW_FILTER_AAAA
return (0);
#else
return (1);
#endif
}
#ifdef DNS_EDNS_VERSION
#else
printf("0\n");
#endif
return (0);
}
char hostname[MAXHOSTNAMELEN];
int n;
#ifdef WIN32
/* From lwres InitSocket() */
int err;
if (err != 0) {
exit(1);
}
#endif
if (n == -1) {
perror("gethostname");
return(1);
}
#ifdef WIN32
WSACleanup();
#endif
return (0);
}
#if defined(GSSAPI)
return (0);
#else
return (1);
#endif
}
#if defined(HAVE_DLOPEN) && defined(ISC_DLZ_DLOPEN)
return (0);
#else
return (1);
#endif
}
#ifdef HAVE_GEOIP
return (0);
#else
return (1);
#endif
}
#ifdef HAVE_LIBXML2
return (0);
#else
return (1);
#endif
}
#ifdef ENABLE_RPZ_NSIP
return (0);
#else
return (1);
#endif
}
#ifdef ENABLE_RPZ_NSDNAME
return (0);
#else
return (1);
#endif
}
#ifdef WITH_IDN
return (0);
#else
return (1);
#endif
}
#ifdef HAVE_LMDB
return (0);
#else
return (1);
#endif
}
#ifdef WIN32
return (0);
int s;
int n = -1;
int v6only = -1;
if (s >= 0) {
close(s);
}
return ((n == 0 && v6only == 0) ? 0 : 1);
#else
return (1);
#endif
}
usage();
return (1);
}