
#if defined(__APPLE__) || defined(__clang__)
#  define __USE_C99_MATH
#  define _Bool bool
#else /* !__APPLE__ */
#  include <cstdbool>
#endif /* __APPLE__ */

#include <cstdio>
#include <cstdlib>
#include <libdatovka/isds.h>

static
bool check_lib_version(void)
{
#if (ISDS_LIB_VER_NUM >= ISDS_LIB_VER_CHECK(0, 2, 1))
	return true;
#else /* < libdatovka-2.1 */
#  error "Insufficient library version." /* This should fail on compile time. */
	fprintf(stderr, "Insufficient libdatovka version '%s'.\n", isds_lib_ver_str());
	return false;
#endif /* >= libdatovka-2.1 */
}

/* Added in libdatovka-0.2.1. */
static
bool have_func_isds_DTInfo(void)
{
	/* This should fail on compile time. */
	return NULL != isds_DTInfo;
}

int main(void)
{
	if (!check_lib_version()) {
		return EXIT_FAILURE;
	}

	if (!have_func_isds_DTInfo()) {
		return EXIT_FAILURE;
	}

	return EXIT_SUCCESS;
}
