[moodns-cvs] CVS: moodns/src Makefile.in,1.14,1.15 auth_data.c,1.11,1.12 database-ht.c,1.5,1.6 misc.
Status: Alpha
Brought to you by:
mawolf
From: Michael W. <ma...@us...> - 2002-02-21 05:09:48
|
Update of /cvsroot/moodns/moodns/src In directory usw-pr-cvs1:/tmp/cvs-serv21946/src Modified Files: Makefile.in auth_data.c database-ht.c misc.h protocol-header.c Log Message: Changes. These ones are mostly minor. Index: Makefile.in =================================================================== RCS file: /cvsroot/moodns/moodns/src/Makefile.in,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile.in 14 Feb 2002 03:45:32 -0000 1.14 --- Makefile.in 21 Feb 2002 05:09:45 -0000 1.15 *************** *** 90,94 **** VERSION = @VERSION@ ! BASIC_CFLAGS = $(DMALLOC_CFLAGS) -g -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -I.. -I/usr/local/include CFLAGS = $(PTHREAD_CFLAGS) $(BASIC_CFLAGS) --- 90,94 ---- VERSION = @VERSION@ ! BASIC_CFLAGS = $(DMALLOC_CFLAGS) -g -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wsign-compare -Werror -I.. -I/usr/local/include CFLAGS = $(PTHREAD_CFLAGS) $(BASIC_CFLAGS) *************** *** 98,105 **** OBJS = afgetln.o auth_data.o byte_array.o cache.o database.o heap.o ht.o \ ! log.o mtime.o options.o pool.o protocol.o protocol-header.o \ ! protocol-question.o protocol-rr.o record.o handle_client.o \ ! recursive_mutex.o security.o socket.o wpthread.o xmalloc.o \ ! database-ht.o OBJS2 = main.o --- 98,105 ---- OBJS = afgetln.o auth_data.o byte_array.o cache.o database.o heap.o ht.o \ ! log.o lookup.o misc.o mtime.o options.o pool.o protocol.o \ ! protocol-header.o protocol-question.o protocol-rr.o query.o record.o \ ! handle_client.o recursive_mutex.o security.o socket.o wpthread.o \ ! xmalloc.o database-ht.o OBJS2 = main.o *************** *** 124,129 **** # Fixme: we don't need all of this. ! mooquery: protocol.o protocol-header.o protocol-question.o protocol-rr.o record.o socket.o byte_array.o xmalloc.o ht.o mtime.o mooquery.o ! $(CC) $(CFLAGS) protocol.o protocol-header.o protocol-question.o protocol-rr.o record.o socket.o byte_array.o ht.o mtime.o xmalloc.o mooquery.o \ -o mooquery $(LIBS) --- 124,129 ---- # Fixme: we don't need all of this. ! mooquery: protocol.o protocol-header.o protocol-question.o protocol-rr.o record.o socket.o byte_array.o xmalloc.o ht.o mtime.o mooquery.o query.o wpthread.o ! $(CC) $(CFLAGS) protocol.o protocol-header.o protocol-question.o protocol-rr.o record.o socket.o byte_array.o ht.o mtime.o xmalloc.o mooquery.o query.o wpthread.o \ -o mooquery $(LIBS) *************** *** 198,202 **** # I'm not sure what would be a better way to do this. (I think think of some # gross hacks, but they'd be gross hacks.) - afgetln.o: afgetln.c misc.h xmalloc.h auth_data.o: auth_data.c misc.h options.h record.h ht.h auth_data.h \ --- 198,201 ---- *************** *** 212,225 **** xmalloc.h handle_client.o: handle_client.c misc.h socket.h byte_array.h \ ! database.h record.h protocol.h wpthread.h handle_client.h xmalloc.h heap.o: heap.c xmalloc.h heap.h ht.o: ht.c ht.h log.o: log.c log.h xmalloc.h main.o: main.c wpthread.h pool.h misc.h socket.h byte_array.h \ options.h log.h cache.h record.h security.h database.h \ handle_client.h protocol.h xmalloc.h mooquery.o: mooquery.c wpthread.h pool.h misc.h socket.h byte_array.h \ ! options.h log.h cache.h record.h security.h database.h protocol.h \ ! xmalloc.h mtime.o: mtime.c wpthread.h record.h misc.h heap.h ht.h cache.h \ mtime.h xmalloc.h --- 211,228 ---- xmalloc.h handle_client.o: handle_client.c misc.h socket.h byte_array.h \ ! database.h record.h cache.h lookup.h protocol.h wpthread.h \ ! handle_client.h xmalloc.h heap.o: heap.c xmalloc.h heap.h ht.o: ht.c ht.h log.o: log.c log.h xmalloc.h + lookup.o: lookup.c misc.h protocol.h record.h byte_array.h database.h \ + cache.h query.h lookup.h xmalloc.h main.o: main.c wpthread.h pool.h misc.h socket.h byte_array.h \ options.h log.h cache.h record.h security.h database.h \ handle_client.h protocol.h xmalloc.h + misc.o: misc.c record.h misc.h mooquery.o: mooquery.c wpthread.h pool.h misc.h socket.h byte_array.h \ ! options.h log.h cache.h record.h security.h database.h query.h \ ! protocol.h xmalloc.h mtime.o: mtime.c wpthread.h record.h misc.h heap.h ht.h cache.h \ mtime.h xmalloc.h *************** *** 233,236 **** --- 236,241 ---- protocol.o: protocol.c record.h misc.h byte_array.h protocol.h ht.h \ xmalloc.h + query.o: query.c socket.h byte_array.h misc.h protocol.h record.h \ + query.h xmalloc.h record.o: record.c record.h misc.h xmalloc.h recursive_mutex.o: recursive_mutex.c wpthread.h recursive_mutex.h Index: auth_data.c =================================================================== RCS file: /cvsroot/moodns/moodns/src/auth_data.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** auth_data.c 5 Feb 2002 14:28:24 -0000 1.11 --- auth_data.c 21 Feb 2002 05:09:45 -0000 1.12 *************** *** 25,36 **** http://cr.yp.to/djbdns/tinydns-data.html. */ - /* TODO: write a function load_auth_data_f which acts like load_auth_data, but - works with an already open stream rather than dealing with opening the file - itself. */ - /* TODO: Finish. Also: break down into functions; it's getting a bit messy. */ /* FIXME: implement the ip prefix crapola */ #if HAVE_CONFIG_H --- 25,34 ---- http://cr.yp.to/djbdns/tinydns-data.html. */ /* TODO: Finish. Also: break down into functions; it's getting a bit messy. */ /* FIXME: implement the ip prefix crapola */ + + /* FIXME: the IP address from @ lines is coming up as 0. Fix. */ #if HAVE_CONFIG_H Index: database-ht.c =================================================================== RCS file: /cvsroot/moodns/moodns/src/database-ht.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** database-ht.c 5 Feb 2002 14:29:41 -0000 1.5 --- database-ht.c 21 Feb 2002 05:09:45 -0000 1.6 *************** *** 132,136 **** struct record_chain *ch; ! ch = ht_get(CAST(d->database_handle)->table, (char *) key); retval = ch; --- 132,137 ---- struct record_chain *ch; ! // ch = ht_get(CAST(d->database_handle)->table, (char *) key); ! ch = ht_get(CAST(d->database_handle)->table, strdupa(key)); retval = ch; Index: misc.h =================================================================== RCS file: /cvsroot/moodns/moodns/src/misc.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** misc.h 5 Feb 2002 14:33:32 -0000 1.10 --- misc.h 21 Feb 2002 05:09:45 -0000 1.11 *************** *** 71,76 **** --- 71,97 ---- __FILE__, __LINE__, __FUNCTION__); + void initialise_roots(void); void inc_count(void); long get_count(void); + + + /* Neither of these is ANSI C compliant. Can it be done? + + I think that strdupa2 is part of glibc as strdupa, while strdupa is my + invention. But I could be mistaken. */ + #define strdupa(n) (char *) ({ \ + char *__x__; \ + __x__ = alloca(strlen(n) + 1); \ + strcpy(__x__, n); \ + }) + + #define strdupa2(s) (__extension__ \ + ({__const char *__old = (s); \ + size_t __len = strlen(__old) + 1; \ + char *__new = alloca(__len); \ + (char *) memcpy(__new, __old, __len); \ + })) + + #endif Index: protocol-header.c =================================================================== RCS file: /cvsroot/moodns/moodns/src/protocol-header.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** protocol-header.c 14 Feb 2002 03:41:55 -0000 1.1 --- protocol-header.c 21 Feb 2002 05:09:45 -0000 1.2 *************** *** 124,127 **** header_size(struct header *h) { ! return 12; /* XXX: Eew. */ } --- 124,127 ---- header_size(struct header *h) { ! return sizeof(*h); } |