diff -uNr ircservices-5.0.45/Changes ircservices-5.0.46/Changes --- ircservices-5.0.45/Changes 2005-01-25 08:57:45 +0900 +++ ircservices-5.0.46/Changes 2005-02-21 21:39:03 +0900 @@ -1,5 +1,13 @@ Version 5.0 ----------- +2005/02/21 .46 Fixed some warnings during compilation. +2005/02/21 Fixed bug causing modified files to not be recompiled + properly when compiling with GNU make 3.79. +2005/02/20 The OperServ debug command LISTUSERS now includes the IP + address for each user before the user's mode string. +2005/02/19 Added workaround for GCC bugs on PowerPC systems. +2005/01/27 Fixed careless error in "make distclean". Reported by + Stanislav Zahariev 2005/01/21 .45 Added HybServ support to convert-db. Suggested by Stanislav Zahariev 2005/01/21 convert-db is now recompiled properly if the compilation diff -uNr ircservices-5.0.45/Makefile ircservices-5.0.46/Makefile --- ircservices-5.0.45/Makefile 2005-01-25 18:22:47 +0900 +++ ircservices-5.0.46/Makefile 2005-02-21 22:20:50 +0900 @@ -81,7 +81,7 @@ $(MAKE) -C lang spotless $(MAKE) -C modules spotless $(MAKE) -C tools spotless - rm -f config.cache config.h* configure.log conf-tmp Makefile.inc* \ + rm -rf config.cache config.h* configure.log conf-tmp Makefile.inc* \ langstrs.h version.c install: myall myinstall diff -uNr ircservices-5.0.45/configure ircservices-5.0.46/configure --- ircservices-5.0.45/configure 2005-01-07 02:12:31 +0900 +++ ircservices-5.0.46/configure 2005-02-21 22:07:37 +0900 @@ -1096,21 +1096,31 @@ fi log using flags: \`"$CC_FLAGS'" fi -# If -fstack-protector is enabled, test once more to make sure -# __builtin_apply() is working +# If -fstack-protector isn't disabled, test once more to make sure +# __builtin_apply() is working--but watch out for the __builtin_apply() +# bugs below, as well as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20076 if ! echo "$CC_FLAGS" | grep_q fno-stack-protector ; then log "-fstack-protector check" cat >$CONFTMP/test.c <1?9:42)); return 0; } EOT - if run $CC $CC_FLAGS $CONFTMP/test.c -o $CONFTMP/test && run $CONFTMP/test + if run $CC $CC_FLAGS -fno-inline-functions $CONFTMP/test.c -o $CONFTMP/test then + run $CONFTMP/test # to get the output into the log file a=`$CONFTMP/test` b=`$CONFTMP/test x` log "test results: a=[$a] b=[$b]" if [ "$a" != "42 2" -o "$b" != "9 1" ] ; then + log "-fstack-protector check failed!" cat <Warning: GCC version 2.96, provided in some Red Hat and -related Linux distributions, has bugs which cause Services to be compiled -incorrectly (see FAQ B.1 for details). Do not -use this compiler to compile Services in any circumstances. - -

Notice: Services will not work with the +

Notice: (1) Services will not work with the SSP (stack-smashing protector) [www.trl.ibm.com] patch to GCC, due to a bug in SSP triggered by Services that causes crashes. The @@ -83,6 +76,11 @@ presence of this patch and deactivate the stack-protection feature, or refuse to compile if it cannot be deactivated. +

(2) Versions of GCC before 3.4 have bugs which cause Services to +crash. Services has workarounds for the Intel x86, SPARC, and PowerPC +platforms, but you will need to use GCC 3.4 or later on other systems. See +FAQ B.1.5 for details. +

  • GNU make [www.gnu.org], version 3.79 or later. Services uses complex Makefiles which may or may not work with diff -uNr ircservices-5.0.45/docs/faq.html ircservices-5.0.46/docs/faq.html --- ircservices-5.0.45/docs/faq.html 2004-06-29 17:17:38 +0900 +++ ircservices-5.0.46/docs/faq.html 2005-02-21 22:12:25 +0900 @@ -34,6 +34,8 @@

    B. Compiling and starting Services

    B.1. Red Hat says GCC 2.96 doesn't have bugs anymore. Why don't you allow it to be used with Services? +
    B.1.5. Why does configure complain that my + compiler has bugs in it? Can't you work around them?
    B.2. configure reports that my system doesn't have the strtok() function. Isn't that a bug?
    B.3. When I run "make", I get an error message like @@ -263,6 +265,24 @@ compiling Services anyway. + +

    B.1.5. Why does configure complain that my + compiler has bugs in it? Can't you work around them? +

    + GCC versions earlier than 3.4 have bugs which cause the + __builtin_apply() and __builtin_return() + pseudofunctions to be miscompiled (see GCC Bugzilla, bugs + 8028 and + 11151 + [gcc.gnu.org], for details). + Working around this problem requires the use of assembly language, + so workarounds are platform-specific; Services currently has + workarounds for these bugs on the Intel x86, SPARC, and PowerPC + platforms, but on other systems, you will need to use GCC 3.4 or + later, or the configure script will report an error and + refuse to continue. +

    +

    B.2. configure reports that my system doesn't have the strtok() function. Isn't that a bug? @@ -583,9 +603,20 @@

    C.10. Long messages from Services sometimes get a colon (":") inserted in the middle.

    - This is reported to be a bug in some IRC clients (at least the - mIRC client for Windows computers), and there is nothing Services - can do to fix it. + This is caused by a bug in the "mIRC" IRC client for Windows + computers; if you try to send a very long message using the + /operserv (or /nickserv, etc.) command, such as a + long global notice, then mIRC will insert a colon in the middle of + it. There is nothing Services can do to fix this (since Services + can't tell whether the colon was intentionally put there or not). + If you experience this problem, try upgrading mIRC to the latest + version or using another IRC client. Alternatively, as a + workaround you can use /msg OperServ instead of + /operserv. +

    + See also this thread + [trout.snt.utwente.nl] on the mIRC + forums.

    diff -uNr ircservices-5.0.45/modules/Makerules ircservices-5.0.46/modules/Makerules --- ircservices-5.0.45/modules/Makerules 2005-01-07 02:12:30 +0900 +++ ircservices-5.0.46/modules/Makerules 2005-02-21 18:03:09 +0900 @@ -78,8 +78,8 @@ ########################################################################### -.SECONDARY: .PHONY: FRC +FRC: ifeq ($(REALLY_COMPILE),) diff -uNr ircservices-5.0.45/modules/database/extsyms.c ircservices-5.0.46/modules/database/extsyms.c --- ircservices-5.0.45/modules/database/extsyms.c 2005-01-25 18:22:50 +0900 +++ ircservices-5.0.46/modules/database/extsyms.c 2005-02-21 22:20:52 +0900 @@ -66,7 +66,54 @@ } \ typeof(func) *__dblocal_##func = (typeof(func) *) __dblocal_##func##_stub; -#else /* not SPARC */ +#elif defined(__POWERPC__) + +# define IMPORT_FUNC(modulename, module, func) \ +static void __dblocal_##func##_stub0(void) { \ + void *ptr = NULL; \ + if (!module) \ + module = find_module(modulename); \ + if (module) \ + ptr = get_module_symbol(module, #func); \ + if (!ptr) \ + fatal_no_symbol(#func); \ + __dblocal_##func = ptr; \ +} \ +static void __dblocal_##func##_stub(void) { \ + asm("lwz r0,0(r1)\n \ + stwu r0,-104(r1)\n \ + stw r3,64(r1)\n \ + stw r4,68(r1)\n \ + stw r5,72(r1)\n \ + stw r6,76(r1)\n \ + stw r7,80(r1)\n \ + stw r8,84(r1)\n \ + stw r9,88(r1)\n \ + stw r10,92(r1)\n \ + mflr r0\n \ + stw r0,100(r1)"); \ + asm("mtctr %0\n \ + bctrl\n \ + lwz r10,92(r1)" : : "r" (__dblocal_##func##_stub0)); \ + asm("stw %0,96(r1)" : : "r" (__dblocal_##func)); \ + asm("lwz r3,64(r1)\n \ + lwz r4,68(r1)\n \ + lwz r5,72(r1)\n \ + lwz r6,76(r1)\n \ + lwz r7,80(r1)\n \ + lwz r8,84(r1)\n \ + lwz r9,88(r1)\n \ + lwz r10,92(r1)\n \ + lwz r11,96(r1)\n \ + mtctr r11\n \ + bctrl\n \ + lwz r0,100(r1)\n \ + mtlr r0\n \ + mr r0,r3"); \ +} \ +typeof(func) *__dblocal_##func = (typeof(func) *) __dblocal_##func##_stub; + +#else /* not SPARC and not PowerPC... must be our good old friend */ # define IMPORT_FUNC(modulename, module, func) \ static void __dblocal_##func##_stub0(void) { \ diff -uNr ircservices-5.0.45/modules/encryption/md5.c ircservices-5.0.46/modules/encryption/md5.c --- ircservices-5.0.45/modules/encryption/md5.c 2005-01-25 18:22:50 +0900 +++ ircservices-5.0.46/modules/encryption/md5.c 2005-02-21 22:20:52 +0900 @@ -345,7 +345,7 @@ return -1; MD5Init(&context); - MD5Update(&context, src, len); + MD5Update(&context, (unsigned char *)src, len); MD5Final(dest, &context); return 0; diff -uNr ircservices-5.0.45/modules/operserv/main.c ircservices-5.0.46/modules/operserv/main.c --- ircservices-5.0.45/modules/operserv/main.c 2005-01-25 18:22:51 +0900 +++ ircservices-5.0.46/modules/operserv/main.c 2005-02-21 22:20:52 +0900 @@ -1430,8 +1430,9 @@ snprintf(buf, sizeof(buf), "%04X", u->ni->status & 0xFFFF); else strcpy(buf, "-"); - notice(s_OperServ, source, "%s!%s@%s %s +%s %ld %u %s %s :%s", + notice(s_OperServ, source, "%s!%s@%s %s %s +%s %ld %u %s %s :%s", u->nick, u->username, u->host, u->fakehost ? u->fakehost : "-", + u->ipaddr ? u->ipaddr : "-", mode_flags_to_string(u->mode, MODE_USER), (long)u->signon, u->servicestamp, u->server->name, buf, u->realname); } diff -uNr ircservices-5.0.45/modules.c ircservices-5.0.46/modules.c --- ircservices-5.0.45/modules.c 2005-01-25 18:22:49 +0900 +++ ircservices-5.0.46/modules.c 2005-02-21 22:20:51 +0900 @@ -335,12 +335,18 @@ } module->name = sstrdup(name); - verptr = get_module_symbol(module, "module_version"); /* as above */ + verptr = get_module_symbol(module, "module_version"); + /* With static modules, module_version is known to be defined at + * compile time; furthermore, some linkers (hey there, MacOS) merge + * common constants into a single value, so all these would end up + * pointing to the same value. */ +#if !defined(STATIC_MODULES) if (verptr) { LIST_SEARCH_SCALAR(modulelist, module_version_ptr, verptr, mptr); if (mptr) verptr = NULL; } +#endif if (!verptr) { log("modules: Unable to load module `%s': No `module_version'" " symbol found", modulename); diff -uNr ircservices-5.0.45/tools/convert-hybserv.c ircservices-5.0.46/tools/convert-hybserv.c --- ircservices-5.0.45/tools/convert-hybserv.c 2005-01-25 18:22:50 +0900 +++ ircservices-5.0.46/tools/convert-hybserv.c 2005-02-21 22:20:51 +0900 @@ -583,6 +583,9 @@ * currently not used */ long level; NickInfo *ni; +#ifdef CLEAN_COMPILE + level = 0; +#endif if (level_s) level = strtol(level_s, &level_s, 10); if (!level_s || *level_s) { @@ -660,6 +663,9 @@ } else if (stricmp(s, "LIMIT") == 0) { long limit; +#ifdef CLEAN_COMPILE + limit = 0; +#endif s = next_token(NULL); if (s) limit = strtol(s, &s, 10); @@ -690,6 +696,9 @@ } else if (stricmp(s, "MON") == 0) { long modes; +#ifdef CLEAN_COMPILE + modes = 0; +#endif s = next_token(NULL); if (s) modes = strtol(s, &s, 10); @@ -711,6 +720,9 @@ } else if (stricmp(s, "MOFF") == 0) { long modes; +#ifdef CLEAN_COMPILE + modes = 0; +#endif s = next_token(NULL); if (s) modes = strtol(s, &s, 10); @@ -781,6 +793,9 @@ } else if (stricmp(s, "FTIME") == 0) { if (ci->suspendinfo) { long t; +#ifdef CLEAN_COMPILE + t = 0; +#endif s = next_token(NULL); if (s) t = strtol(s, &s, 10); diff -uNr ircservices-5.0.45/version.sh ircservices-5.0.46/version.sh --- ircservices-5.0.45/version.sh 2005-01-22 09:54:28 +0900 +++ ircservices-5.0.46/version.sh 2005-02-21 21:39:19 +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.45 +VERSION=5.0.46 # Increment Services build number if [ -f version.c ] ; then