mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
202. [func] isc_lex_getsourceline() changed from returning int
to returning unsigned long, the type of its underlying counter.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: master.c,v 1.52 2000/05/08 14:34:42 tale Exp $ */
|
||||
/* $Id: master.c,v 1.53 2000/05/24 15:07:55 tale Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -147,7 +147,7 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
|
||||
if (token->type == isc_tokentype_eol ||
|
||||
token->type == isc_tokentype_eof) {
|
||||
(*callbacks->error)(callbacks,
|
||||
"dns_master_load: %s:%d: unexpected end of %s",
|
||||
"dns_master_load: %s:%lu: unexpected end of %s",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
(token->type ==
|
||||
@@ -274,7 +274,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
if (token.type == isc_tokentype_initialws) {
|
||||
if (!current_known) {
|
||||
(*callbacks->error)(callbacks,
|
||||
"%s: %s:%d: No current owner name",
|
||||
"%s: %s:%lu: No current owner name",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
@@ -309,10 +309,13 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
goto cleanup;
|
||||
if (ctx->ttl > 0x7fffffffUL) {
|
||||
(callbacks->warn)(callbacks,
|
||||
"dns_master_load: %s:%d: $TTL %lu > MAXTTL, setting $TTL to 0",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
ctx->ttl);
|
||||
"%s: %s:%lu: "
|
||||
"$TTL %lu > MAXTTL, "
|
||||
"setting $TTL to 0",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
ctx->ttl);
|
||||
ctx->ttl = 0;
|
||||
}
|
||||
ctx->default_ttl = ctx->ttl;
|
||||
@@ -323,8 +326,9 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
"$INCLUDE") == 0) {
|
||||
if (ttl_offset != 0) {
|
||||
(callbacks->error)(callbacks,
|
||||
"dns_master_load: %s:%d: $INCLUDE "
|
||||
"%s: %s:%lu: $INCLUDE "
|
||||
"may not be used with $DATE",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
goto cleanup;
|
||||
@@ -379,16 +383,18 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
dump_time = (isc_stdtime_t)dump_time64;
|
||||
if (dump_time != dump_time64) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"dns_master_load: %s:%d: "
|
||||
"%s: %s:%lu: "
|
||||
"$DATE outside epoch",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
goto cleanup;
|
||||
}
|
||||
if (dump_time > current_time) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"dns_master_load: %s:%d: "
|
||||
"%s: %s:%lu: "
|
||||
"$DATE in future, using current date",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
dump_time = current_time;
|
||||
@@ -399,8 +405,9 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
} else if (strncasecmp(token.value.as_pointer,
|
||||
"$", 1) == 0) {
|
||||
(callbacks->error)(callbacks,
|
||||
"dns_master_load: %s:%d: "
|
||||
"%s: %s:%lu: "
|
||||
"unknown $ directive '%s'",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
token.value.as_pointer);
|
||||
@@ -524,7 +531,8 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
}
|
||||
} else {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"%s:%d: isc_lex_gettoken() returned unexpeced token type (%d)",
|
||||
"%s:%lu: isc_lex_gettoken() returned "
|
||||
"unexpeced token type (%d)",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
token.type);
|
||||
@@ -555,10 +563,13 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
== ISC_R_SUCCESS) {
|
||||
if (ctx->ttl > 0x7fffffffUL) {
|
||||
(callbacks->warn)(callbacks,
|
||||
"dns_master_load: %s:%d: TTL %lu > MAXTTL, setting TTL to 0",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
ctx->ttl);
|
||||
"%s: %s:%lu: "
|
||||
"TTL %lu > MAXTTL, "
|
||||
"setting TTL to 0",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
ctx->ttl);
|
||||
ctx->ttl = 0;
|
||||
}
|
||||
ctx->ttl_known = ISC_TRUE;
|
||||
@@ -568,7 +579,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
* BIND 4 / 8 'USE_SOA_MINIMUM' could be set here.
|
||||
*/
|
||||
(*callbacks->error)(callbacks,
|
||||
"%s: %s:%d: no TTL specified",
|
||||
"%s: %s:%lu: no TTL specified",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
@@ -578,7 +589,8 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
ctx->ttl = ctx->default_ttl;
|
||||
} else if (ctx->warn_1035) {
|
||||
(*callbacks->warn)(callbacks,
|
||||
"%s: %s:%d: using RFC 1035 TTL semantics",
|
||||
"%s: %s:%lu: "
|
||||
"using RFC 1035 TTL semantics",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
@@ -644,7 +656,8 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
isc_buffer_usedregion(&buffer, ®ion);
|
||||
len2 = region.length;
|
||||
(*callbacks->error)(callbacks,
|
||||
"%s: %s:%d: class (%.*s) != zone class (%.*s)",
|
||||
"%s: %s:%lu: class (%.*s) != "
|
||||
"zone class (%.*s)",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
@@ -744,7 +757,8 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
||||
ISC_LIST_PREPEND(current_list, this, link);
|
||||
} else if (this->ttl != ctx->ttl) {
|
||||
(*callbacks->warn)(callbacks,
|
||||
"%s: %s:%d: TTL set to prior TTL (%lu)",
|
||||
"%s: %s:%lu: "
|
||||
"TTL set to prior TTL (%lu)",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
@@ -1063,7 +1077,9 @@ commit(dns_rdatacallbacks_t *callbacks, isc_lex_t *lex,
|
||||
* Ignore out-of-zone data.
|
||||
*/
|
||||
(callbacks->warn)(callbacks,
|
||||
"dns_master_load: %s:%d: ignoring out-of-zone data",
|
||||
"%s: %s:%lu: "
|
||||
"ignoring out-of-zone data",
|
||||
"dns_master_load",
|
||||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex));
|
||||
ignore = ISC_TRUE;
|
||||
|
Reference in New Issue
Block a user