diff -uNr ircservices-5.0.20/Changes ircservices-5.0.21/Changes --- ircservices-5.0.20/Changes 2003-06-25 02:57:44 +0900 +++ ircservices-5.0.21/Changes 2003-07-14 15:12:51 +0900 @@ -1,5 +1,13 @@ Version 5.0 ----------- +2003/07/09 .21 Fixed type-related warnings in some environments. +2003/07/09 Fixed errors when compiling in parallel (make -jN). +2003/07/04 Fixed warnings about builtin function name clash with GCC. + Reported by Craig McLure +2003/06/28 Fixed crash on abnormal disconnection from server. + Reported by Jeffrey A. Kent +2003/06/25 Fixed compilation failure on OpenBSD. Reported by + 2003/06/21 .20 Fixed a minor memory leak in the socket handling code. 2003/06/17 Minor tweaks to various Makefiles. 2003/06/16 Fixed bug causing data in socket write buffers to get diff -uNr ircservices-5.0.20/Makefile ircservices-5.0.21/Makefile --- ircservices-5.0.20/Makefile 2003-06-25 03:03:13 +0900 +++ ircservices-5.0.21/Makefile 2003-07-14 15:21:49 +0900 @@ -21,12 +21,12 @@ # Add any extra flags you want here. The default line below enables # warnings and debugging symbols on GCC. If you have a non-GCC compiler, # you may want to comment it out or change it. ("icc" below is the Intel -# C compiler for Linux, which doesn't understand GCC's -W options.) +# C compiler for Linux, which doesn't understand GCC's -W/-f options.) ifeq ($(CC),icc) MORE_CFLAGS = -g else -MORE_CFLAGS = -g -Wall -Wmissing-prototypes +MORE_CFLAGS = -g -Wall -Wmissing-prototypes -fno-builtin-log endif ######################## End configuration section ######################## @@ -165,6 +165,7 @@ version.c: $(OBJS) modules/.stamp sh version.sh +modules/.stamp: modules language.h: langstrs.h -touch $@ diff -uNr ircservices-5.0.20/TODO ircservices-5.0.21/TODO --- ircservices-5.0.20/TODO 2003-06-17 15:25:40 +0900 +++ ircservices-5.0.21/TODO 2003-07-09 10:30:27 +0900 @@ -47,6 +47,7 @@ Things to think about: +NS/CS Reason for FORBID ** Option/module to log all WALLOPS/GLOBOPS [Andrew Kempe ] CS VERBOSE option: like OPNOTICE but for everything (ACCESS etc.) diff -uNr ircservices-5.0.20/configure ircservices-5.0.21/configure --- ircservices-5.0.20/configure 2003-06-09 16:45:46 +0900 +++ ircservices-5.0.21/configure 2003-06-25 15:11:14 +0900 @@ -178,7 +178,7 @@ # Variable initialization. -MY_CONFIG_VERSION=4 +MY_CONFIG_VERSION=5 CONFIG_VERSION= PROGRAM=ircservices @@ -206,6 +206,7 @@ CC_DYN_LFLAGS= CC_DYN_LIBS= SYMS_NEED_UNDERSCORES= +RANLIB= TYPE_INT8= TYPE_INT16= @@ -504,6 +505,10 @@ fi if [ "$USE_DYNAMIC_MODULES" ] ; then STATIC_MODULES= + RANLIB= + fi + if [ "$USE_STATIC_MODULES" ] ; then + RANLIB= fi if [ "x$USER_CC" != "x" -o "x$CC" = "x" ] ; then # don't mix old flags and new compiler @@ -1204,6 +1209,69 @@ fi fi +# Also check for ranlib, and use it if found. +MODE="check_ranlib " +echo2 "Checking whether ranlib exists... " +if [ "$RANLIB" ] ; then + if [ "x$RANLIB" = xranlib ] ; then + log "cache says yes" + echo "(cached) yes." + else + log "cache says no" + echo "(cached) no." + fi +else + if run echo test >$CONFTMP/testfile ; then : ; else + log "couldn't create temp file!" + echo "" + echo "" + echo "*** WHOA THERE! ***" + echo "" + echo "Unable to create a temporary file!" + echo "Are you out of disk space?" + exit 4 + fi + if run ar -rc $CONFTMP/test.a $CONFTMP/testfile ; then + if run ranlib $CONFTMP/test.a ; then + log "ranlib found" + RANLIB=ranlib + echo "yes." + else + log "ranlib not found" + RANLIB='echo >/dev/null' + echo "no." + fi + else # no ar + log "couldn't run ar!" + if [ $STATIC_MODULES = 1 ] ; then + echo "" + cat <>Makefile.inc.new <
  • Compile the program. Run the command make (or gmake, depending on your system) from the top-level directory. -Compilation time will vary depending on your system; on the author's -Pentium II (400MHz, 896MB RAM) system, compiling the entire program takes -approximately one minute. +Compilation time will vary depending on your system; on the author's system +(1.7GHz Celeron, 1GB RAM), compiling the entire program takes approximately +one minute. If you have a multiple-processor system, you can use make +-jN (or gmake -jN) to compile in parallel using +N threads, which will significantly reduce compilation +time. Parallel compilation is also useful if your system has slow I/O +(such as disk access), since it lets one compilation run while another is +waiting for a disk access to complete.

  • Install the program and data files. Run the command make install (or gmake install) and the program and data files diff -uNr ircservices-5.0.20/lang/de.l ircservices-5.0.21/lang/de.l --- ircservices-5.0.20/lang/de.l 2003-06-25 02:56:51 +0900 +++ ircservices-5.0.21/lang/de.l 2003-06-27 10:56:51 +0900 @@ -4125,7 +4125,7 @@ DEL 2-5,7-9 Löscht Memos von 2 bis 5 und 7 bis 9. - + Achtung: Das Löschen eines Memos ist endgültig, und kann nicht rückgängig gemacht werden. diff -uNr ircservices-5.0.20/lang/pt.l ircservices-5.0.21/lang/pt.l --- ircservices-5.0.20/lang/pt.l 2003-06-03 12:22:04 +0900 +++ ircservices-5.0.21/lang/pt.l 2003-06-27 10:59:57 +0900 @@ -2502,7 +2502,7 @@ # usuarios que possuirem seus nicks registrados no %s # e identificados com sua senha poderao entrar no canal # controlado pela lista de acesso. - + #CHAN_HELP_SET_SECUREOPS # Sintaxe: SET canal SECUREOPS {ON | OFF} # diff -uNr ircservices-5.0.20/modules/Makefile ircservices-5.0.21/modules/Makefile --- ircservices-5.0.20/modules/Makefile 2003-06-25 03:03:13 +0900 +++ ircservices-5.0.21/modules/Makefile 2003-07-14 15:21:49 +0900 @@ -44,6 +44,7 @@ @echo '{0}};' >>modlist.c $(CC) -c modlist.c -o modlist.o ar -r modules.a modlist.o + $(RANLIB) modules.a install: @set -e ; for i in $(SUBDIRS) ; do \ diff -uNr ircservices-5.0.20/modules/Makerules ircservices-5.0.21/modules/Makerules --- ircservices-5.0.20/modules/Makerules 2003-06-17 15:39:45 +0900 +++ ircservices-5.0.21/modules/Makerules 2003-07-09 16:02:25 +0900 @@ -49,9 +49,13 @@ all-dynamic: $(MODULES) all-static: $(MODULES:.so=.a) - @if $(TEST_NT) ! -f $(DIRNAME).o -o .stamp -nt $(DIRNAME).o ; then \ - echo 'ld -r -o $(DIRNAME).o `ar -t .$(DIRNAME).a`' ; \ - ld -r -o $(DIRNAME).o `ar -t .$(DIRNAME).a` ; \ + @set -e ; \ + if $(TEST_NT) ! -f $(DIRNAME).o -o .stamp -nt $(DIRNAME).o ; then \ + rm -f .$(DIRNAME).lst2 ; \ + sort -u .$(DIRNAME).lst >.$(DIRNAME).lst2 ; \ + mv -f .$(DIRNAME).lst2 .$(DIRNAME).lst ; \ + echo 'ld -r -o $(DIRNAME).o' `cat .$(DIRNAME).lst` ; \ + ld -r -o $(DIRNAME).o `cat .$(DIRNAME).lst` ; \ echo 'ar -cr ../modules.a $(DIRNAME).o' ; \ ar -cr ../modules.a $(DIRNAME).o ; \ echo 'touch .stamp' ; \ @@ -67,7 +71,7 @@ $(MKDIR) $(DATDEST)/modules/$(DIRNAME) $(INSTALL_DAT) $(MODULES) $(DATDEST)/modules/$(DIRNAME) clean: - rm -f $(MODULES) $(MODULES:.so=.a) .$(DIRNAME).a *.o .mod* .compiled* + rm -f $(MODULES) $(MODULES:.so=.a) .$(DIRNAME).lst* *.o .mod* .compiled* endif spotless: clean @@ -102,9 +106,10 @@ # Compile one or more objects into a static module and generate a symbol # list. The .a file we create here is just a placeholder to show that -# we've compiled the module; the objects themselves go into ../modules.a. +# we've compiled the module; the objects themselves go into ../modules.a +# (via $(DIRNAME).o). $(TARGET).a: $(TARGET)_static.o $(OBJECTS) $(OTHEROBJ) - ar -cru .$(DIRNAME).a $^ + @for i in $^ ; do echo $$i >>.$(DIRNAME).lst ; done @set -e ; \ FILENAME=$(@:.a=) ; \ MODNAME=`echo $(DIRNAME)_$$FILENAME | sed -e 'y/-/_/' -e 's/_$$//'` ; \ @@ -119,20 +124,20 @@ echo >>.modsyms-$$FILENAME.c '{"module_config",module_config_'$$MODNAME'},' ; \ echo >>.modsyms-$$FILENAME.c '{"init_module",init_module_'$$MODNAME'},' ; \ echo >>.modsyms-$$FILENAME.c '{"exit_module",exit_module_'$$MODNAME'},' ; \ - rm -f .modsyms.tmp ; \ + rm -f .modsyms-$$FILENAME.tmp ; \ for file in $(@:.a=.c) $(OBJECTS-$(@:.a=.so):.o=.c) ; do \ grep '^EXPORT_' $$file \ | sed -e 's/^EXPORT_VAR[ ]*([ ]*\([^,]*\),[ ]*\([A-Za-z0-9_]*\)[ ]*)[ ]*$$/\&\2:\1 \2/' \ -e 's/^EXPORT_ARRAY[ ]*([ ]*\([^,]*\),[ ]*\([A-Za-z0-9_]*\)[ ]*)[ ]*$$/ \2:\1 \2[]/' \ -e 's/^EXPORT_FUNC[ ]*([ ]*\([A-Za-z0-9_]*\)[ ]*)[ ]*$$/ \1:void \1()/' ; \ - done >.modsyms.tmp ; \ - if grep >/dev/null 2>&1 '^EXPORT_' .modsyms.tmp ; then \ + done >.modsyms-$$FILENAME.tmp ; \ + if grep >/dev/null 2>&1 '^EXPORT_' .modsyms-$$FILENAME.tmp ; then \ echo >&2 "$$file: invalid use of EXPORT_xxx" ; \ exit 1 ; \ fi ; \ - sed 's/\(.\)\([^:]*\):.*/{"\2",\1\2},/' <.modsyms.tmp >>.modsyms-$$FILENAME.c ; \ - sed 's/[^:]*:\(.*\)/extern \1;/' <.modsyms.tmp >>.modext-$$FILENAME.h;\ - rm -f .modsyms.tmp ; \ + sed 's/\(.\)\([^:]*\):.*/{"\2",\1\2},/' <.modsyms-$$FILENAME.tmp >>.modsyms-$$FILENAME.c ; \ + sed 's/[^:]*:\(.*\)/extern \1;/' <.modsyms-$$FILENAME.tmp >>.modext-$$FILENAME.h;\ + rm -f .modsyms-$$FILENAME.tmp ; \ echo '{0}};' >>.modsyms-$$FILENAME.c @touch $@ diff -uNr ircservices-5.0.20/modules/httpd/main.c ircservices-5.0.21/modules/httpd/main.c --- ircservices-5.0.20/modules/httpd/main.c 2003-06-25 03:03:14 +0900 +++ ircservices-5.0.21/modules/httpd/main.c 2003-07-14 15:21:50 +0900 @@ -407,7 +407,7 @@ { if (!c->socket) { module_log("BUG: attempt to set timeout for client %d with no" - " socket!", c-clients); + " socket!", (int)(c-clients)); return; } if (IdleTimeout) { diff -uNr ircservices-5.0.20/modules/mail/smtp.c ircservices-5.0.21/modules/mail/smtp.c --- ircservices-5.0.20/modules/mail/smtp.c 2003-06-25 03:03:14 +0900 +++ ircservices-5.0.21/modules/mail/smtp.c 2003-07-14 15:21:50 +0900 @@ -197,7 +197,7 @@ si->replycode = strtol(buf, &s, 10); if (s != buf+3) { module_log("BUG: strtol ate %d characters from reply (should be" - " 3)!", s-buf); + " 3)!", (int)(s-buf)); } si->replychar = buf[3]; } diff -uNr ircservices-5.0.20/sockets.c ircservices-5.0.21/sockets.c --- ircservices-5.0.20/sockets.c 2003-06-25 03:03:13 +0900 +++ ircservices-5.0.21/sockets.c 2003-07-14 15:21:50 +0900 @@ -419,10 +419,12 @@ if (s->cb_connect) s->cb_connect(s, 0); } - s->flags &= ~SF_CONNECTING; - s->flags |= SF_CONNECTED; + if (s->fd >= 0) { /* the socket might have been closed */ + s->flags &= ~SF_CONNECTING; + s->flags |= SF_CONNECTED; + FD_SET(i, &sock_fds); + } FD_CLR(i, &write_fds); - FD_SET(i, &sock_fds); } else if (!(s->flags & SF_CONNECTED)) { log("sockets: BUG: got write-ready on fd %d but socket not" " connected!", i); @@ -1355,9 +1357,9 @@ } /* while (left > 0) */ - /* If data is left in the write buffer, tell check_sockets() to try - * and flush it */ - if (s->wptr != s->wend) + /* If the socket wasn't closed for an error and data is left in the + * write buffer, tell check_sockets() to try and flush it */ + if (s->fd >= 0 && s->wptr != s->wend) FD_SET(s->fd, &write_fds); errno = errno_save; diff -uNr ircservices-5.0.20/tools/convert-ptlink.c ircservices-5.0.21/tools/convert-ptlink.c --- ircservices-5.0.20/tools/convert-ptlink.c 2003-06-25 03:03:13 +0900 +++ ircservices-5.0.21/tools/convert-ptlink.c 2003-07-14 15:21:50 +0900 @@ -35,7 +35,8 @@ int32 tmp32, total, count; NickInfo *ni; NickGroupInfo *ngi; - char *s, ch; + char *s; + signed char ch; snprintf(filename, sizeof(filename), "%s/nick.db", sourcedir); if (!(f = open_db(filename, "r", 0))) @@ -280,7 +281,7 @@ int i, j, c; ChannelInfo *ci; NickInfo *ni; - char ch; + signed char ch; int16 tmp16, mlock_on, mlock_off; int32 tmp32; char *on, *off; @@ -494,7 +495,8 @@ dbFILE *f; int16 i, n, tmp16; int32 tmp32; - char *s, ch; + char *s; + signed char ch; snprintf(filename, sizeof(filename), "%s/oper.db", sourcedir); if (!(f = open_db(filename, "r", 0))) @@ -529,7 +531,7 @@ dbFILE *f; int16 tmp16, i, n; int32 tmp32; - char ch; + signed char ch; MaskData *md; snprintf(filename, sizeof(filename), "%s/akill.db", sourcedir); @@ -567,7 +569,7 @@ dbFILE *f; int16 tmp16, i, n; int32 tmp32; - char ch; + signed char ch; NewsItem *news; snprintf(filename, sizeof(filename), "%s/news.db", sourcedir); diff -uNr ircservices-5.0.20/version.sh ircservices-5.0.21/version.sh --- ircservices-5.0.20/version.sh 2003-06-25 02:57:55 +0900 +++ ircservices-5.0.21/version.sh 2003-07-14 15:13:02 +0900 @@ -6,7 +6,7 @@ # $PROGRAM is the string returned as the first part of a /VERSION reply, # and must not contain spaces. It is not used anywhere else. PROGRAM=ircservices -VERSION=5.0.20 +VERSION=5.0.21 # Increment Services build number if [ -f version.c ] ; then