2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

Add magic.h, which should eventually contain all isc magic numbers, perhaps

macros to validate structures using them, and perhaps a do-all function
which can be used by debugging code to identify a structure and print
the contents by calling the correct dump function.
This commit is contained in:
Michael Graff 1999-09-25 01:23:39 +00:00
parent d164942128
commit 5d9d8d114f
2 changed files with 31 additions and 2 deletions

View File

@ -22,8 +22,8 @@ top_srcdir = @top_srcdir@
HEADERS = assertions.h base64.h boolean.h buffer.h bufferlist.h \
error.h event.h \
eventclass.h heap.h int.h interfaceiter.h lang.h lex.h lib.h \
list.h mem.h msgcat.h mutexblock.h netaddr.h rbtgen.h \
region.h result.h \
list.h magic.h mem.h msgcat.h mutexblock.h netaddr.h \
rbtgen.h region.h result.h \
resultclass.h rwlock.h serial.h sockaddr.h socket.h str.h \
symtab.h task.h timer.h types.h

View File

@ -0,0 +1,29 @@
/*
* Copyright (C) 1999 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef ISC_MAGIC_H
#define ISC_MAGIC_H
#include <isc/lang.h>
ISC_LANG_BEGINDECLS
#define ISC_MAGIC_VALID(a,b) (((a) != NULL) && ((a)->magic == (b)))
ISC_LANG_ENDDECLS
#endif /* ISC_MAGIC_H */