The previous patches didn't handle dhvpv6 being disabled well.
This change moves the #ifdefs a bit to handle it.
print out a specific error message about the first error in addition
to the usage string. This may be disabled by editing includes/site.h.
[ISC-Bugs #40321]
+ [ISC-Bugs #41454]
- The configure script will now exit with an error message if it cannot find
a GNU-style make tool (needed when building BIND libraries) or pkg-config
assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {}
+#ifndef UNIT_TEST
static const char copyright[] = "Copyright 2004-2015 Internet Systems Consortium.";
static const char arr [] = "All rights reserved.";
static const char message [] = "Internet Systems Consortium DHCP Client";
static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/";
+#endif /* UNIT_TEST */
u_int16_t local_port = 0;
u_int16_t remote_port = 0;
* which isn't compiled when building for unit tests
*/
static const char use_noarg[] = "No argument for command: %s";
+#ifdef DHCPv6
static const char use_v6command[] = "Command not used for DHCPv4: %s";
-#endif /* !UNIT_TEST */
+#endif
static void
usage(const char *sfmt, const char *sarg)
isc_file_basename(progname));
}
-#ifndef UNIT_TEST
int
main(int argc, char **argv) {
int fd;
/* In fact dispatch() never returns. */
return 0;
}
-#endif /* !UNIT_TEST */
void run_stateless(int exit_mode)
{
#endif /* DHCPv6 */
return;
}
+#endif /* !UNIT_TEST */
isc_result_t find_class (struct class **c,
const char *s, const char *file, int line)
* \return Nothing
*/
static const char use_noarg[] = "No argument for command: %s";
+#ifdef DHCPv6
static const char use_badproto[] = "Protocol already set, %s inappropriate";
static const char use_v4command[] = "Command not used for DHCPv6: %s";
static const char use_v6command[] = "Command not used for DHCPv4: %s";
+#endif
static void
usage(const char *sfmt, const char *sarg) {
/*
- * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2012,2015-2016 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
}
-
+#ifdef DHCPv6
ATF_TC(parse_byte_order);
ATF_TC_HEAD(parse_byte_order, tc)
atf_tc_pass();
}
-
+#endif /* DHCPv6 */
/* This macro defines main() method that will call specified
test cases. tp and simple_test_case names can be whatever you want
ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, simple_test_case);
+#ifdef DHCPv6
ATF_TP_ADD_TC(tp, parse_byte_order);
-
+#endif
return (atf_no_error());
}